-
Notifications
You must be signed in to change notification settings - Fork 201
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
Merged
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
6bf4b9c
docs(accordion): general docs cleanup
jawinn 52fdb76
refactor(accordion): move around and organize existing css
jawinn f4fb6f8
feat(accordion): rename height and width properties and mods
jawinn e5fd334
refactor(accordion): use existing rtl custom property
jawinn 48aab28
refactor(accordion): organize open and disabled styles
jawinn 9c32ffc
feat(accordion): add new sized corner rounding tokens
jawinn f0431e1
feat(accordion)!: overall s2 migration with markup changes
jawinn 99db2ed
refactor(accordion): use custom properties for disabled styles
jawinn e2daa92
feat(accordion): add chevron rotation animation
jawinn 3196653
chore(accordion): updated metadata
jawinn ce1363c
feat(accordion): add quiet style
jawinn bf922d5
docs(accordion): additions to stories and tests
jawinn 4ab23fa
fix(accordion): remove variable assigned to itself
jawinn 61d9075
chore(accordion): changeset formatting adjustment
jawinn 93d193c
fix(accordion): use end edge to text token
jawinn ebe25e7
chore(accordion): use rgb slash syntax instead of rgba
jawinn ff5d516
fix(accordion): update minimum height tokens used
jawinn 601038d
feat(accordion): wip no inline padding variant
jawinn be9a5ad
feat(accordion): reduced font sizes and component heights
jawinn 4616363
chore(accordion): update metadata
jawinn d81edc9
fix(accordion): update wip no inline padding variant variables
jawinn f5ff709
feat(accordion): add no inline padding variant
saashapina e3f5d4a
chore: pr feedback
saashapina 721b6ee
chore: add new accordion tokens
saashapina 5d1abb1
fix: adjust min-width and default width
rise-erpelding 70bfd2f
fix: add comment about start spacing token
rise-erpelding 0812829
feat: use accordion-item-to-divider spacing token, use mod
rise-erpelding f049ed0
refactor: adjust top-to-text and bottom-to-text tokens
rise-erpelding a7eb6ef
fix: change outline-offset to not be negative
rise-erpelding c24755b
fix: use correct -icon- token for top to disclosure compact large
rise-erpelding dcc42f0
fix: adjust background colors
rise-erpelding 7841fab
feat: quiet down state has border radius
rise-erpelding 10ced88
test: remove hover from disabled test case
rise-erpelding 3df0397
fix: remove application of hover/focus/active states if disabled
rise-erpelding ad5ca39
fix: remove disclosure icon space calc comment and move custom prop
rise-erpelding 3129a5e
fix: use accordion-disclosure-indicator-height custom property
rise-erpelding 37e0a00
chore: update metadata
rise-erpelding c302ea5
Revert "feat: use accordion-item-to-divider spacing token, use mod"
rise-erpelding e9a5ab3
chore: update changeset
rise-erpelding f07d7a2
Revert "fix: remove application of hover/focus/active states if disab…
rise-erpelding a1e9a38
fix: use mod-stack in custom prop definition for colors
rise-erpelding adf3a2b
docs: document min-width and default-width
rise-erpelding b1f232e
chore: update metadata
rise-erpelding b776bbf
chore: create custom property for accordion-focus-indicator-gap token
rise-erpelding f3b1c35
fix: prevent hover from overriding active styles
rise-erpelding 0aa35a3
docs: storybook cleanup
rise-erpelding d85d936
fix: focus gap token and changeset updates
rise-erpelding File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,44 @@ | ||
--- | ||
"@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. | ||
- Adds no inline padding variant (`.spectrum-Accordion--noInlinePadding`) in which the item | ||
header does not have padding. | ||
- Per design spec, accordion items have a min-width and default width. Default width can be | ||
overridden with `--mod-accordion-item-width` but should not be smaller than | ||
`--spectrum-accordion-item-minimum-width`. | ||
|
||
#### Markup changes | ||
|
||
The HTML markup has changed slightly for the accordion header. The disclosure icon has been moved | ||
from outside 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-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` | ||
marissahuysentruyt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
New mods: | ||
|
||
- `--mod-accordion-animation-duration` | ||
- `--mod-accordion-edge-to-content-area` | ||
- `--mod-accordion-item-minimum-width` | ||
- `--mod-accordion-top-to-disclosure-indicator` |
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.