You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(alertbanner): start migration to spectrum two
Migrates the component to spectrum two.
- Theme files are removed, and their custom properties integrated into
the main index.css.
- Renames misspelled mod custom property (noted in docs)
- Simplifies background color styles by changing a single custom
property per variant, as done on other components.
* feat(alertbanner): spectrum 2 spacing and mod name cleanup
Adjust some spacings to match the Spectrum 2 spec spacing.
And renames some mods so they are more consistent with current naming
conventions, and their purpose is more clear.
=== Update spacing to match the Spectrum 2 spec ===
One issue with the S1 version was that there was too much space between
the text and the button, when the button wrapped to the next line. And
there was a different token defined for the space from the bottom edge
to the text, and vertically between the button and the text.
This helps resolve this by moving some of the spacing to padding on the
AlertBanner-body, and subtracting this value from some of the other
custom properties. Along with using both column-gap and row-gap
properties.
=== adjust storybook template spacing and decorator ===
Improves spacing in Storybook template, especially the Chromatic only
template. Decorator and wrapper styles are modeled after those used in
Action button, so they look more similar. Previously the layout was a
little cramped and the "detail" elements were missing their margins
because they were display inline.
* docs(alertbanner): custom storybook docs page and template updates
Creates a custom MDX docs page in Storybook for the Alert banner
component. And reworks the stories and chromatic-only templates a little
to facilitate and increase coverage.
Includes Storybook VRT coverage for the max width changes in PR #2762 .
Tests the display of the alert banner when in a container larger than
and smaller than its max-inline-size.
* chore(alertbanner): linter updates and update mods
- Add stylelint disable line comments for some false positives caught by
the linter.
- Re-generate mods file
* docs(alertbanner): use stories and template from main
Use the stories and updated template from main, with a few things left
out that are not yet available in the spectrum-two branch.
* feat(alertbanner): support no close button or no action button
Adds spacing to the end of the alert banner when the close button is
not displayed, or both the close button and action button are not
displayed. These are allowed combinations of options.
* feat(alertbanner): use spec defined line-height token
* feat(alertbanner): add font-family token and mod
* feat(alertbanner): add cjk line-height
* feat(alertbanner): remove unnecessary styles for end element
Remove styles for .spectrum-AlertBanner-end, which were no longer doing
anything after the removal of the divider.
Alert banner now uses Spectrum 2 tokens and specifications. In this new design, the divider has been removed.
8
+
9
+
The following changes have been made to the mod custom properties:
10
+
11
+
-`--mod-alert-banner-size` was renamed to `--mod-alert-banner-inline-size`
12
+
-`--mod-alert-banner-neutral-background` was previously misspelled. The mod `--mod-alert-banner-background` was also added, which will take precendence over the variant background mods.
13
+
-`--mod-alert-banner-top-text` was renamed to `--mod-alert-banner-top-to-text`
14
+
-`--mod-alert-banner-top-icon` was renamed to `--mod-alert-banner-top-to-icon`
15
+
-`--mod-alert-banner-bottom-text` was renamed to `--mod-alert-banner-bottom-to-text`
16
+
-`--mod-alert-banner-start-edge` was renamed to `--mod-alert-banner-inline-start-to-content`
17
+
-`--mod-alert-banner-edge-to-button` was renamed to `--mod-alert-banner-block-edge-to-button`
18
+
- The spacing on either side of the close button is now controlled by two separate mods; `--mod-alert-banner-close-button-to-inline-end` and `--mod-alert-banner-close-button-to-content`. The previous `--mod-alert-banner-close-button-spacing` has been removed.
19
+
- A new mod `--mod-alert-banner-inline-end-to-content` was added, which handles the inline end spacing when the alert banner does not have a close button. Or when there is neither a close button or an action button.
--spectrum-alert-banner-icon-size:var(--spectrum-workflow-icon-size-100); /* stylelint-disable-line spectrum-tools/no-unused-custom-properties -- used in passthrough */
--spectrum-alert-banner-close-button-to-content:var(--spectrum-spacing-300); /* stylelint-disable-line spectrum-tools/no-unused-custom-properties -- used in passthrough */
29
+
--spectrum-alert-banner-close-button-to-inline-end:var(--spectrum-alert-banner-close-button-spacing); /* stylelint-disable-line spectrum-tools/no-unused-custom-properties -- used in passthrough */
30
+
31
+
/* Top and bottom margins for AlertBanner-text. Subtracts the vertical spacing that is already included in the
32
+
padding-block of its parent AlertBanner-body element. */
/* --mod-* for alert-banner-text-to-button-vertical will only accept values larger than alert-banner-edge-to-bottom, as gap only recognizes positive values */
0 commit comments