-
Notifications
You must be signed in to change notification settings - Fork 202
feat(accordion): spectrum 2 migration #3684
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: spectrum-two
Are you sure you want to change the base?
Changes from all commits
c1f27e4
ffd5a15
d2150ff
cb25f68
b11a3bf
5d62446
25dfd2a
75f319e
1da74de
4b73eca
64fc1af
e39fdc7
928b583
b5302d6
0a343e9
377915a
c7ef49c
a4928b2
815ae41
f2ef82b
69c610f
b935581
aef4d60
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
"@spectrum-css/accordion": major | ||
--- | ||
|
||
### Spectrum 2 migration | ||
|
||
Accordion now uses Spectrum 2 tokens and specifications. | ||
|
||
New sized tokens are used for corner rounding, the spacing around the disclosure icon, and | ||
the spacing around the content area. | ||
|
||
#### New features | ||
|
||
- Adds the optional "quiet" style, which does not show dividers between accordion items. | ||
- Adds CSS transition to animate the rotation of the disclosure indicator when expanding and | ||
collapsing the accordion item. | ||
|
||
#### Markup changes | ||
|
||
The HTML markup has changed slightly for the accordion header. The disclosure icon has been moved | ||
from outside the the button (`spectrum-Accordion-itemHeader`), to within the button. The extra | ||
element with class `spectrum-Accordion-itemIconContainer`, previously wrapping the icon, has | ||
been removed. A span with class `spectrum-Accordion-itemTitle` has been added around the heading | ||
text. | ||
|
||
#### Mod changes | ||
|
||
The following `--mod` custom properties have been renamed to better reflect how they are used: | ||
|
||
- `--mod-accordion-item-height` has been renamed to `--mod-accordion-item-minimum-height` | ||
- `--mod-accordion-item-width` has been renamed to `--mod-accordion-item-minimum-width` | ||
- `--mod-accordion-min-block-size` has been renamed to `--mod-accordion-item-min-block-size` | ||
- `--mod-accordion-component-edge-to-text` has been renamed to `--mod-accordion-content-padding-inline` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,16 @@ export const isQuiet = { | |
control: { type: "boolean" }, | ||
}; | ||
|
||
export const hasNoInlinePadding = { | ||
name: "No Inline Padding Styling", | ||
type: { name: "boolean" }, | ||
table: { | ||
type: { summary: "boolean" }, | ||
category: "Component", | ||
}, | ||
control: { type: "boolean" }, | ||
}; | ||
|
||
Comment on lines
+52
to
+61
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. We usually keep this variants file for global types, I would say that |
||
export const staticColor = { | ||
name: "Static color", | ||
description: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think something about the no inline padding variant would also go here.