-
Notifications
You must be signed in to change notification settings - Fork 202
feat(textfield, textarea): migrate to spectrum 2 #2856
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
rise-erpelding
merged 26 commits into
spectrum-two
from
rise-erpelding/css-767-textfield-s2-migration
Apr 1, 2025
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
d6dd813
feat(textfield): migrate to s2
rise-erpelding d1a2f9c
test(textfield, textarea): testapalooza
rise-erpelding 4de0c71
docs(textfield, textarea): required label docs
rise-erpelding 695de22
feat(textfield,textarea): s2 icons
rise-erpelding d5196de
fix(textfield): disabled readonly text color
rise-erpelding 26b4a15
fix(textfield): remove char count custom props to use textfield custo…
rise-erpelding 9d744a5
fix(textfield): bring back props lost in rebase
rise-erpelding d19dd53
fix(textfield): remove nonexistent ::after styles
rise-erpelding 5d4bc61
fix(textfield): use min-width multiplier correctly
rise-erpelding daa11c8
fix(textfield): correct focus hover borders
rise-erpelding d16fcb4
fix(textfield,textarea): small PR fixes
rise-erpelding c2ef1b7
chore: regenerate metadata
rise-erpelding 5a940a9
docs: update jsdoc comments
rise-erpelding 9dca22d
fix: remove :focus-visible selectors, see #2306
rise-erpelding cfb0d54
docs: invalid stories separated, update story formatting
rise-erpelding c7eefb5
docs: remove isLoading from controls
rise-erpelding 0e15d15
docs: add control descriptions
rise-erpelding 3338255
test: add disabled & hover
rise-erpelding 710cd4b
fix: scope generic selectors to .spectrum-Textfield
rise-erpelding a4fafb3
fix: add WHCM readonly border, disabled bg color
rise-erpelding 9976179
fix: adjust WHCM placeholder text to match value
rise-erpelding 647ddd9
fix: adjust WHCM keyfocus border color to match spec
rise-erpelding 16406fa
fix: adjust high contrast focus hover colors
rise-erpelding 5d0c8e0
fix: prevent WHCM orange flash
rise-erpelding e3ba0dd
fix: readonly & disabled selector
rise-erpelding dcc9e1a
fix: remove invalid border colors
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,48 @@ | ||
--- | ||
"@spectrum-css/textfield": major | ||
--- | ||
|
||
Migrate to Spectrum 2 | ||
|
||
- Default styles are used for medium | ||
- Removal of quiet variant | ||
- Style adjustments to match design spec: | ||
- Spacing start/end edge to value for XL component should use `component-edge-to-text-300`, not `-200` | ||
- Spacing top edge to value should change with size, now uses different spacing tokens for each component tshirt size according to spec (`component-top-to-text-75`, `-100`, `-200`, and `-300`) | ||
- Spacing bottom edge to value should change with size, now uses different spacing tokens for each component tshirt size according to spec (`component-bottom-to-text-75`, `-100`, `-200`, and `-300`) | ||
- Border thickness has been increased to 2px, and border colors have been updated to match spec | ||
- Adjust side label inline spacing to field, should be `spacing-200` for all tshirt sizes | ||
- Change disabled background color to `gray-25` | ||
- Change disabled-border-color from transparent to `disabled-border-color` | ||
- Use new and updated tokens: | ||
- use tokens for textfield width (`field-default-width-small`, `-medium`, `-large`, `-extra-large`) | ||
- use updated corner radius tokens | ||
- use different component-bottom-to-text tokens for character-count-spacing-block | ||
- update tokens for alert icon block spacing | ||
- update tokens for alert and invalid inline-start spacing | ||
- update font tokens | ||
|
||
Adds mods: | ||
|
||
- `--mod-textfield-character-count-color` | ||
- `--mod-textfield-character-count-font-style` | ||
- `--mod-textfield-character-count-line-height` | ||
- `--mod-textfield-character-count-line-height-cjk` | ||
- `--mod-textfield-font-style` | ||
- `--mod-textfield-line-height` (used for multiline only) | ||
- `--mod-textfield-line-height-cjk` | ||
|
||
Removes mods: | ||
|
||
- `--mod-text-area-min-block-size-quiet` | ||
- `--mod-textfield-character-count-spacing-block-quiet` | ||
- `--mod-textfield-icon-spacing-inline-end-quiet-invalid` | ||
- `--mod-textfield-icon-spacing-inline-end-quiet-valid` | ||
- `--mod-textfield-label-spacing-block-quiet` | ||
- `--mod-textfield-spacing-block-quiet` | ||
- `--mod-textfield-spacing-inline-quiet` | ||
|
||
Changed mods: | ||
|
||
- `--mod-texfield-animation-duration` --> `--mod-textfield-animation-duration` | ||
- `--mod-texfield-placeholder-font-size` --> `--mod-texfield-placeholder-font-size` |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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.