-
Notifications
You must be signed in to change notification settings - Fork 210
feat(in-line-alert): S2 migration #3659
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
23 commits
Select commit
Hold shift + click to select a range
4d1469b
feat(in-line-alert): S2 migration
cdransf f5d7597
chore(in-line-alert): allow only subtle or bold
cdransf 6e4906f
fix(in-line-alert): correct changelog to showcase custom properties r…
cdransf 5de8ce9
chore(in-line-alert): additional granular mods for background colors
cdransf ae89bde
fix(in-line-alert): resolve issues with button colors in bold + subtl…
cdransf 5f6f10a
chore(in-line-alert): add subtle and bold variants to testing grid
cdransf 14317e8
chore(in-line-alert): add subtle + bold closable tests
cdransf c07dd09
chore(in-line-alert): add link variant, control and test grid variants
cdransf 90e6089
chore(in-line-alert): add style variants to docs view
cdransf 839b9b7
chore(in-line-alert): refactor and significantly reduce styles
cdransf e71db2a
chore(in-line-alert): update docs + customize treatment titles
cdransf 4bce073
chore(in-line-alert): update WHC styles; drop button mods; add w/out …
cdransf 13b8300
fix(in-line-alert): revise WHC colors and restore borders for subtle/…
cdransf 00769b4
fix(in-line-alert): reorder custom properties; drop unnecessary selec…
cdransf cc20e02
fix(in-line-alert): set static variations on links and buttons ensure…
cdransf b9ee4f2
fix(in-line-alert): icon alignment
cdransf 59d53ad
fix(in-line-alert): add high contrast border width property
cdransf 0cbf276
fix(in-line-alert): use req'd font stacks
cdransf a8477e1
fix(in-line-alert): border treatment links + buttons
cdransf 25f72ab
fix(in-line-alert): show icon with text when no header is displayed
cdransf 24725ff
chore(in-line-alert): update changelog with usage notes for subtle/bo…
cdransf c904aa7
Update components/inlinealert/index.css
cdransf 613854e
fix(in-line-alert): combine border width declarations
cdransf 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,82 @@ | ||
| --- | ||
| `@spectrum-css/inlinealert`: major | ||
| --- | ||
|
|
||
| #### S2 migration in-line alert | ||
|
|
||
| This migrates the `in-line alert` component to Spectrum 2. Custom properties have been updated and added per the design specification. | ||
|
|
||
| Subtle and bold treatments have been added for each badge variant. | ||
|
|
||
| To use the subtle treatment, you will need to apply the `spectrum-InLineAlert--subtle` class: | ||
|
|
||
| ```html | ||
| <div | ||
| class="spectrum-InLineAlert spectrum-InLineAlert--info spectrum-InLineAlert--subtle" | ||
| > | ||
| <div class="spectrum-InLineAlert-header"> | ||
| Info variant with subtle fill | ||
| <svg | ||
| focusable="false" | ||
| aria-hidden="true" | ||
| role="img" | ||
| class=" spectrum-Icon spectrum-Icon--sizeM spectrum-InLineAlert-icon " | ||
| id="icon-52w58" | ||
| aria-label="InfoCircle" | ||
| > | ||
| <title id="InfoCircle">Info Circle</title> | ||
| <use xlink:href="#icon-info-circle" href="#icon-info-circle"></use> | ||
| </svg> | ||
| </div> | ||
| <div class="spectrum-InLineAlert-content">This is an alert.</div> | ||
| </div> | ||
| ``` | ||
|
|
||
| To use the bold treatment (which is reserved for high-attention alerts only), you will need to apply the `spectrum-InLineAlert--bold` class: | ||
|
|
||
| ```html | ||
| <div | ||
| class="spectrum-InLineAlert spectrum-InLineAlert--info spectrum-InLineAlert--bold" | ||
| > | ||
| <div class="spectrum-InLineAlert-header"> | ||
| Info variant with bold fill | ||
| <svg | ||
| focusable="false" | ||
| aria-hidden="true" | ||
| role="img" | ||
| class=" spectrum-Icon spectrum-Icon--sizeM spectrum-InLineAlert-icon " | ||
| id="icon-mty2x" | ||
| aria-label="InfoCircle" | ||
| > | ||
| <title id="InfoCircle">Info Circle</title> | ||
| <use xlink:href="#icon-info-circle" href="#icon-info-circle"></use> | ||
| </svg> | ||
| </div> | ||
| <div class="spectrum-InLineAlert-content">This is an alert.</div> | ||
| </div> | ||
| ``` | ||
|
|
||
| Because subtle and bold treatments draw a similar level of attention you should choose only one to use consistently within a single product. | ||
|
|
||
| ##### New mods | ||
|
|
||
| `--mod-inlinealert-border-and-icon-color-neutral` | ||
| `--mod-inlinealert-min-spacing-header-to-icon` | ||
| `--mod-inlinealert-spacing-content-link-button` | ||
| `--mod-inlinealert-spacing-header-content` | ||
|
|
||
| ##### Removed mods | ||
|
|
||
| `--mod-inlinealert-spacing-header-content-button` | ||
| `--mod-inlinealert-spacing-header-to-icon` | ||
|
|
||
| ##### New custom properties | ||
|
|
||
| `--spectrum-inlinealert-min-spacing-header-to-icon` | ||
| `--spectrum-inlinealert-spacing-content-link-button` | ||
| `--spectrum-inlinealert-spacing-header-content` | ||
|
|
||
| ##### Removed custom properties | ||
|
|
||
| `--spectrum-inlinealert-spacing-header-content-button` | ||
| `--spectrum-inlinealert-spacing-header-to-icon` | ||
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.