-
Notifications
You must be signed in to change notification settings - Fork 61
[UIK-5669][accordion] rebranding #3135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: UIK-5351/add-more-variables-to-theme
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| SItemToggle[use][use='primary']:not(:first-child) { | ||
| margin-top: var(--intergalactic-spacing-content-gap-xsmall, 2px); | ||
| } | ||
|
|
||
| SItemToggle { | ||
| display: flex; | ||
| align-items: center; | ||
|
|
@@ -9,25 +13,87 @@ SItemToggle[use][use] { | |
| color: var(--intergalactic-text-primary, oklch(0.1 0.03 137 / 0.899)); | ||
| font-weight: var(--intergalactic-regular, 400); | ||
| } | ||
|
|
||
| SItemToggle[use][use='primary'] { | ||
| box-sizing: border-box; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we need this? |
||
| overflow: clip; | ||
|
j-mnizhek marked this conversation as resolved.
|
||
| background-color: var(--intergalactic-bg-secondary-neutral, oklch(0.98 0.001 180)); | ||
| padding: var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-3x, 12px); | ||
| margin-bottom: var(--intergalactic-spacing-05x, 2px); | ||
| border-radius: var(--intergalactic-surface-rounded, 8px); | ||
| padding: var(--intergalactic-spacing-content-padding-small, 8px) | ||
| var(--intergalactic-spacing-content-padding-large, 16px) | ||
| var(--intergalactic-spacing-content-padding-small, 8px) | ||
| var(--intergalactic-spacing-content-padding-xlarge, 20px); | ||
| } | ||
| SItemToggle[use][use='primary']:has(SItemChevron[selected]) { | ||
| border-bottom-left-radius: 0; | ||
| border-bottom-right-radius: 0; | ||
| } | ||
| SItemToggle[use][use='primary']:hover { | ||
| background-color: var(--intergalactic-bg-secondary-neutral-hover, oklch(0.97 0.001 180)); | ||
| } | ||
| SItemToggle[use][use='primary']::before { | ||
| content: ''; | ||
| position: absolute; | ||
| top: 0; | ||
| bottom: 0; | ||
| left: 0; | ||
| width: 2px; | ||
| z-index: 1; | ||
|
j-mnizhek marked this conversation as resolved.
|
||
| background-color: var(--intergalactic-border-accent, oklch(0.23 0.01 140)); | ||
| opacity: 0; | ||
| transition: opacity calc(var(--intergalactic-duration-accordion, 200) * 1ms) var(--intergalactic-easings-fast, cubic-bezier(0.5, 0, 0, 1.12)); | ||
| } | ||
| SItemToggle[use][use='primary']:has(SItemChevron[selected])::before { | ||
| opacity: 1; | ||
| } | ||
| SItemToggle[use][use='primary']:has(SItemChevron[selected]) + * { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think, we can use here more relevant selector |
||
| position: relative; | ||
| overflow: clip; | ||
| background-color: var(--intergalactic-bg-secondary-neutral, oklch(0.98 0.001 180)); | ||
| border-bottom-left-radius: var(--intergalactic-surface-rounded, 8px); | ||
| border-bottom-right-radius: var(--intergalactic-surface-rounded, 8px); | ||
| } | ||
| SItemToggle[use][use='primary']:has(SItemChevron[selected]) + *::before { | ||
| content: ''; | ||
| position: absolute; | ||
| top: 0; | ||
| bottom: 0; | ||
| left: 0; | ||
| width: 2px; | ||
| z-index: 1; | ||
| background-color: var(--intergalactic-border-accent, oklch(0.23 0.01 140)); | ||
| } | ||
| SItemToggle[use][use='secondary'] { | ||
| padding: var(--intergalactic-spacing-content-padding-small, 8px) var(--intergalactic-spacing-content-padding-xxsmall, 2px); | ||
| } | ||
| SItemToggle[use][use='secondary']:has(SItemChevron[selected]) + * { | ||
| border-left: 2px solid var(--intergalactic-border-accent, oklch(0.23 0.01 140)); | ||
| } | ||
|
|
||
| SItemToggle[disabled] { | ||
| opacity: var(--intergalactic-disabled-opacity, 0.4); | ||
| cursor: default; | ||
| } | ||
|
|
||
| SItemToggle[use][use='primary'] SItemChevron { | ||
| position: absolute; | ||
| top: 50%; | ||
| right: var(--intergalactic-spacing-content-padding-large, 16px); | ||
| flex-shrink: 0; | ||
| transform: translateY(-50%) rotate(0deg); | ||
| } | ||
| SItemToggle[use][use='primary'] SItemChevron[selected] { | ||
| transform: translateY(-50%) rotate(90deg); | ||
| } | ||
|
|
||
| SItemToggle[use][use='secondary'] SItemChevron { | ||
| margin-right: var(--intergalactic-spacing-content-gap-small, 4px); | ||
| } | ||
|
|
||
| SItemChevron { | ||
| margin-right: var(--intergalactic-spacing-2x, 8px); | ||
| transform: rotate(0deg); | ||
| transition: transform calc(var(--intergalactic-duration-accordion, 200) * 1ms) ease-out; | ||
| fill: var(--intergalactic-icon-primary-neutral, oklch(0.092 0.024 152.2 / 0.526)); | ||
| transition: transform calc(var(--intergalactic-duration-fast, 200) * 1ms) var(--intergalactic-easings-fast, cubic-bezier(0.5, 0, 0, 1.12)); | ||
| fill: var(--intergalactic-text-primary, oklch(0.1 0.03 137 / 0.899)); | ||
|
|
||
| &[selected] { | ||
| transform: rotate(90deg); | ||
|
|
@@ -38,4 +104,8 @@ SItemChevron { | |
| SItemChevron { | ||
| transition: none; | ||
| } | ||
|
|
||
| SItemToggle[use][use='primary']::before { | ||
| transition: none; | ||
| } | ||
| } | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,14 +9,14 @@ const Demo = () => { | |
| <Accordion.Item value={index} key={index} disabled={index === 2}> | ||
| <Accordion.Item.Toggle pb={2}> | ||
| <Accordion.Item.ToggleButton> | ||
| <Accordion.Item.Chevron mr={2} /> | ||
| <Accordion.Item.Chevron /> | ||
| Section | ||
| {' '} | ||
| {index + 1} | ||
| </Accordion.Item.ToggleButton> | ||
| </Accordion.Item.Toggle> | ||
| <Accordion.Item.Collapse> | ||
| <Box pt={3} px={6} pb={6}>{`This is section ${index + 1}`}</Box> | ||
| <Box pt={3} px={5} pb={6}>{`This is section ${index + 1}`}</Box> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks like this padding should be in Collapse component...
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Totally agree, but there is a nuance... We'll discuss this |
||
| </Accordion.Item.Collapse> | ||
| </Accordion.Item> | ||
| ))} | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.