-
Notifications
You must be signed in to change notification settings - Fork 904
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove stitches from Stories (#3322)
- Loading branch information
Showing
70 changed files
with
5,963 additions
and
5,204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
@import '@radix-ui/colors/gray.css'; | ||
@import '@radix-ui/colors/blue.css'; | ||
@import '@radix-ui/colors/green.css'; | ||
@import '@radix-ui/colors/red.css'; | ||
@import '@radix-ui/colors/purple.css'; | ||
@import '@radix-ui/colors/gray-dark.css'; | ||
@import '@radix-ui/colors/blue-dark.css'; | ||
@import '@radix-ui/colors/green-dark.css'; | ||
@import '@radix-ui/colors/red-dark.css'; | ||
@import '@radix-ui/colors/purple-dark.css'; | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
*::before, | ||
*::after { | ||
box-sizing: inherit; | ||
} | ||
|
||
[hidden] { | ||
display: none; | ||
} | ||
|
||
:root { | ||
--color-white: #fff; | ||
--color-gray100: #ccc; | ||
--color-gray300: #aaa; | ||
--color-black: #111; | ||
--color-red: crimson; | ||
--color-green: green; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
declined: | ||
- primitives | ||
- "@radix-ui/react-accordion" | ||
- "@radix-ui/react-alert-dialog" | ||
- "@radix-ui/react-aspect-ratio" | ||
- "@radix-ui/react-avatar" | ||
- "@radix-ui/react-checkbox" | ||
- "@radix-ui/react-collapsible" | ||
- "@radix-ui/react-context-menu" | ||
- "@radix-ui/react-dialog" | ||
- "@radix-ui/react-dropdown-menu" | ||
- "@radix-ui/react-form" | ||
- "@radix-ui/react-hover-card" | ||
- "@radix-ui/react-label" | ||
- "@radix-ui/react-menu" | ||
- "@radix-ui/react-menubar" | ||
- "@radix-ui/react-navigation-menu" | ||
- "@radix-ui/react-popover" | ||
- "@radix-ui/react-popper" | ||
- "@radix-ui/react-presence" | ||
- "@radix-ui/react-progress" | ||
- "@radix-ui/react-radio-group" | ||
- "@radix-ui/react-scroll-area" | ||
- "@radix-ui/react-select" | ||
- "@radix-ui/react-separator" | ||
- "@radix-ui/react-slider" | ||
- "@radix-ui/react-switch" | ||
- "@radix-ui/react-tabs" | ||
- "@radix-ui/react-toast" | ||
- "@radix-ui/react-toggle" | ||
- "@radix-ui/react-toggle-group" | ||
- "@radix-ui/react-toolbar" | ||
- "@radix-ui/react-tooltip" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
159 changes: 159 additions & 0 deletions
159
packages/react/accordion/src/Accordion.stories.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
.root { | ||
font-family: sans-serif; | ||
&[data-orientation='horizontal'] { | ||
display: flex; | ||
max-width: 40em; | ||
height: 50vh; | ||
} | ||
&[data-orientation='vertical'] { | ||
max-width: 20em; | ||
} | ||
} | ||
|
||
.item { | ||
&[data-orientation='horizontal'] { | ||
display: flex; | ||
border-right: 1px solid var(--gray-1); | ||
} | ||
|
||
&[data-orientation='vertical'] { | ||
border-bottom: 1px solid var(--gray-1); | ||
} | ||
} | ||
|
||
.header { | ||
margin: 0; | ||
&[data-orientation='horizontal'] { | ||
height: 100%; | ||
} | ||
} | ||
|
||
.trigger { | ||
/* because it's a button, we want to stretch it */ | ||
&[data-orientation='horizontal'] { | ||
height: 100%; | ||
} | ||
&[data-orientation='vertical'] { | ||
width: 100%; | ||
} | ||
text-align: inherit; | ||
box-sizing: border-box; | ||
appearance: none; | ||
border: none; | ||
padding: 10px; | ||
background-color: black; | ||
color: var(--gray-1); | ||
font-family: inherit; | ||
font-size: 1.2em; | ||
|
||
&:focus { | ||
outline: 2px solid var(--red-8); | ||
color: var(--red-9); | ||
} | ||
|
||
&[data-disabled] { | ||
color: var(--gray-9); | ||
} | ||
|
||
&[data-state='open'] { | ||
background-color: var(--red-9); | ||
color: var(--gray-1); | ||
|
||
&:focus { | ||
color: var(--gray-12); | ||
} | ||
} | ||
} | ||
|
||
.content { | ||
padding: 10px; | ||
line-height: 1.5; | ||
} | ||
|
||
.animatedContent { | ||
overflow: hidden; | ||
&[data-state='open'] { | ||
animation: accordion-slideDown 300ms ease-out; | ||
} | ||
&[data-state='closed'] { | ||
animation: accordion-slideUp 300ms ease-out; | ||
} | ||
} | ||
|
||
.animated2DContent { | ||
overflow: hidden; | ||
&[data-state='open'] { | ||
animation: accordion-open2D 1000ms ease-out; | ||
} | ||
&[data-state='closed'] { | ||
animation: accordion-close2D 1000ms ease-out; | ||
} | ||
} | ||
|
||
.rootAttr, | ||
.itemAttr, | ||
.headerAttr, | ||
.triggerAttr, | ||
.contentAttr { | ||
background-color: var(--blue-a12); | ||
border: 2px solid var(--blue-9); | ||
padding: 10px; | ||
|
||
&[data-state='closed'] { | ||
border-color: var(--red-9); | ||
} | ||
&[data-state='open'] { | ||
border-color: var(--green-9); | ||
} | ||
&[data-disabled] { | ||
border-style: dashed; | ||
} | ||
&:disabled { | ||
opacity: 0.5; | ||
} | ||
} | ||
|
||
.contentAttr { | ||
/* ensure we can see the content (because it has `hidden` attribute) */ | ||
display: block; | ||
} | ||
|
||
@keyframes accordion-slideDown { | ||
from { | ||
height: 0; | ||
} | ||
to { | ||
height: var(--radix-accordion-content-height); | ||
} | ||
} | ||
|
||
@keyframes accordion-slideUp { | ||
from { | ||
height: var(--radix-accordion-content-height); | ||
} | ||
to { | ||
height: 0; | ||
} | ||
} | ||
|
||
@keyframes accordion-open2D { | ||
from { | ||
width: 0; | ||
height: 0; | ||
} | ||
to { | ||
width: var(--radix-accordion-content-width); | ||
height: var(--radix-accordion-content-height); | ||
} | ||
} | ||
|
||
@keyframes accordion-close2D { | ||
from { | ||
width: var(--radix-accordion-content-width); | ||
height: var(--radix-accordion-content-height); | ||
} | ||
to { | ||
width: 0; | ||
height: 0; | ||
} | ||
} |
Oops, something went wrong.