diff --git a/.changeset/angry-needles-behave.md b/.changeset/angry-needles-behave.md
new file mode 100644
index 00000000000..ff2b31a96dc
--- /dev/null
+++ b/.changeset/angry-needles-behave.md
@@ -0,0 +1,23 @@
+---
+"@spectrum-css/radio": major
+---
+
+### Spectrum 2 migration
+
+Updates:
+
+- High contrast tokens have been modified
+- Typography tokens modified
+
+#### New tokens
+
+`--spectrum-radio-border-width`
+`--spectrum-radio-text-font-weight`
+`--spectrum-radio-text-font-style`
+
+#### Modified tokens
+
+`--spectrum-radio-emphasized-accent-color`
+`--spectrum-radio-emphasized-accent-color-hover`
+`--spectrum-radio-emphasized-accent-color-down`
+`--spectrum-radio-emphasized-accent-color-focus`
diff --git a/.changeset/beige-dragons-tickle.md b/.changeset/beige-dragons-tickle.md
new file mode 100644
index 00000000000..a9603d574fe
--- /dev/null
+++ b/.changeset/beige-dragons-tickle.md
@@ -0,0 +1,49 @@
+---
+"@spectrum-css/illustratedmessage": major
+"@spectrum-css/dropzone": major
+---
+
+### S2 Illustrated Message Migration
+
+This migration contains new tokens for t-shirt sizes (S, M, L), vertical and horizontal orientation along with their maximum width, illustration sizes, and content spacing. Dropzone `--mod` names are renamed to match the semantic tokens in illustrated message.
+
+#### Illustrated Message
+
+New properties
+`--spectrum-illustrated-message-heading-to-description`
+`--spectrum-illustrated-message-illustration-to-heading`
+`--spectrum-illustrated-message-illustration-to-content`
+`--spectrum-illustrated-message-description-to-action`
+`--spectrum-illustrated-message-illustration-color`
+`--spectrum-illustrated-message-illustration-size`
+`--spectrum-illustrated-message-small-cjk-title-font-size`
+`--spectrum-illustrated-message-large-cjk-title-font-size`
+`--spectrum-illustrated-message-large-body-font-size`
+`--spectrum-illustrated-message-horizontal-maximum-width`
+
+New mods
+`--mod-illustrated-message-description-to-action`
+`--mod-illustrated-message-heading-to-description`
+`--mod-illustrated-message-illustration-to-content`
+`--mod-illustrated-message-horizontal-maximum-width`
+
+Removed properties
+`--spectrum-illustrated-message-title-to-heading`
+`--spectrum-illustrated-message-description-max-inline-size`
+`--spectrum-illustrated-message-heading-max-inline-size`
+`--spectrum-illustrated-message-illustration-accent-color`
+`--mod-illustrated-message-illustration-accent-color`
+`--highcontrast-illustrated-message-illustration-accent-color`
+
+#### Dropzone
+
+New mods
+`--mod-drop-zone-body-to-action`
+`--mod-drop-zone-illustration-to-title`
+
+#### Dropzone nested mods
+
+Renamed mods
+`--mod-illustrated-message-title-to-heading` > `--mod-illustrated-message-illustration-to-heading`
+`--mod-illustrated-message-heading-to-body` > `--mod-illustrated-message-heading-to-description`
+`--mod-illustrated-message-content-maximum-width` > `--mod-illustrated-message-vertical-maximum-width`
diff --git a/.changeset/big-beds-care.md b/.changeset/big-beds-care.md
new file mode 100644
index 00000000000..6b296b0347d
--- /dev/null
+++ b/.changeset/big-beds-care.md
@@ -0,0 +1,39 @@
+---
+"@spectrum-css/dropzone": major
+---
+
+### Spectrum 2 migration
+
+Since dropzone shares a lot of illustrated message's new content tokens (typography and spacing), tons of unused`--mods` were removed.
+
+The component reflects the [new design](https://www.figma.com/design/eoZHKJH9a3LJkHYCGt60Vb/S2-token-specs?node-id=10141-2822&m=dev) of the borders that includes dash length and dash gap.
+
+#### SVG Border
+
+To support the intention of the design, an SVG element is used. There are custom `--mod` tokens to adjust the length of dashed lines and the gap between them. It's understood it may be too much to consume an additional element so there's a fallback where the SVG element is not necessary - dropzone will use the standard `border` CSS property.
+
+#### New mods
+
+`--mod-drop-zone-content-height`
+`--mod-drop-zone-edge-to-text`
+`--mod-drop-zone-title-line-height`
+`--mod-drop-zone-border-dash-length`
+`--mod-drop-zone-border-dash-gap`
+
+#### Removed mods
+
+`--mod-drop-zone-body-color`
+`--mod-drop-zone-body-font-family`
+`--mod-drop-zone-body-font-style`
+`--mod-drop-zone-body-font-weight`
+`--mod-drop-zone-body-line-height`
+`--mod-drop-zone-content-color`
+`--mod-drop-zone-content-edge-to-text`
+`--mod-drop-zone-content-font-size`
+`--mod-drop-zone-heading-color`
+`--mod-drop-zone-heading-font-family`
+`--mod-drop-zone-heading-font-size`
+`--mod-drop-zone-heading-font-style`
+`--mod-drop-zone-heading-font-weight`
+`--mod-drop-zone-heading-line-height`
+`--mod-drop-zone-heading-to-body` `--mod-drop-zone-illustration-to-heading` `--mod-drop-zone-illustration-to-title`
diff --git a/.changeset/big-jars-pump.md b/.changeset/big-jars-pump.md
new file mode 100644
index 00000000000..debc67c7479
--- /dev/null
+++ b/.changeset/big-jars-pump.md
@@ -0,0 +1,82 @@
+---
+"@spectrum-css/inlinealert": major
+---
+
+#### Spectrum 2 migration
+
+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
+
+
+ Info variant with subtle fill
+
+
+
This is an alert.
+
+```
+
+To use the bold treatment (which is reserved for high-attention alerts only), you will need to apply the `spectrum-InLineAlert--bold` class:
+
+```html
+
+
+ Info variant with bold fill
+
+
+
This is an alert.
+
+```
+
+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`
diff --git a/.changeset/breezy-impalas-push.md b/.changeset/breezy-impalas-push.md
new file mode 100644
index 00000000000..e39b5117aec
--- /dev/null
+++ b/.changeset/breezy-impalas-push.md
@@ -0,0 +1,11 @@
+---
+"@spectrum-css/switch": patch
+---
+
+### S2 switch fixes
+
+This work addresses minor regressions in the Switch component. Animation tokens are reimplemented and their usage updated within the style definitions.
+
+Reference:
+
+- [S2 switch migration](https://github.com/adobe/spectrum-css/pull/2651)
diff --git a/.changeset/calm-hats-sleep.md b/.changeset/calm-hats-sleep.md
new file mode 100644
index 00000000000..8b357dbd180
--- /dev/null
+++ b/.changeset/calm-hats-sleep.md
@@ -0,0 +1,5 @@
+---
+"@spectrum-css/bundle": major
+---
+
+Release bundle with the latest styles on the S2 feature branch.
diff --git a/.changeset/chatty-lands-attack.md b/.changeset/chatty-lands-attack.md
new file mode 100644
index 00000000000..5780ab4adbb
--- /dev/null
+++ b/.changeset/chatty-lands-attack.md
@@ -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`
+
+New mods:
+
+- `--mod-accordion-animation-duration`
+- `--mod-accordion-edge-to-content-area`
+- `--mod-accordion-item-minimum-width`
+- `--mod-accordion-top-to-disclosure-indicator`
diff --git a/.changeset/chilled-peaches-enjoy.md b/.changeset/chilled-peaches-enjoy.md
new file mode 100644
index 00000000000..f7a8def296a
--- /dev/null
+++ b/.changeset/chilled-peaches-enjoy.md
@@ -0,0 +1,27 @@
+---
+"@spectrum-css/actionbutton": major
+---
+
+Action button now uses Spectrum 2 tokens and design specifications. A few notable changes:
+
+- Medium is now the default size and `.spectrum-ActionButton--sizeM` has been removed.
+- Includes the Spectrum 2 down state transform.
+- The component border was not removed and its color was changed to `transparent` in order to continue support for Windows High Contrast / forced colors, which still shows a border. The mod custom properties for border were removed to avoid interference with Windows High Contrast / forced colors accessibility.
+- Some selectors to target the icon + text button and the icon-only button have been simplified using `:has`. This removes some overly complex `calc()` functions used for inline spacing, uses the design tokens more directly, and removes the previously documented need for the component's child elements to use a specific source order.
+- Background and content colors were updated.
+- Mod custom properties have been adjusted:
+ - Renamed:
+ - `--mod-line-height-100` renamed to `--mod-actionbutton-line-height`.
+ - `--mod-sans-font-family-stack` renamed to `--mod-button-font-family`.
+ - `--mod-animation-duration-100` renamed to `--mod-button-animation-duration`.
+ - Removed:
+ - `--mod-actionbutton-border-color-default`
+ - `--mod-actionbutton-border-color-disabled`
+ - `--mod-actionbutton-border-color-down`
+ - `--mod-actionbutton-border-color-focus`
+ - `--mod-actionbutton-border-color-hover`
+ - `--mod-actionbutton-border-width`
+ - `--mod-actionbutton-static-content-color`
+ - New:
+ - `--mod-actionbutton-font-weight`
+ - `--mod-actionbutton-font-style`
diff --git a/.changeset/chilly-peaches-sniff.md b/.changeset/chilly-peaches-sniff.md
new file mode 100644
index 00000000000..ff068af2dd2
--- /dev/null
+++ b/.changeset/chilly-peaches-sniff.md
@@ -0,0 +1,21 @@
+---
+"@spectrum-css/statuslight": major
+---
+
+#### Spectrum 2 migration
+
+New non-semantic colors were added to the variants list, while the `accent` semantic variant was removed. There were also some new and updated color and text-to-visual tokens used to match the designs, along with normalizing font family, font style, and font weight.
+
+New mods added:
+
+- `--mod-statuslight-font-family`
+- `--mod-statuslight-font-style`
+- `--mod-statuslight-nonsemantic-brown-color`
+- `--mod-statuslight-nonsemantic-cinnamon-color`
+- `--mod-statuslight-nonsemantic-pink-color`
+- `--mod-statuslight-nonsemantic-silver-color`
+- `--mod-statuslight-nonsemantic-turquoise-color`
+
+Removed mods:
+
+- `--mod-statuslight-semantic-accent-color`
diff --git a/.changeset/clean-oranges-smell.md b/.changeset/clean-oranges-smell.md
new file mode 100644
index 00000000000..3deb7bdb737
--- /dev/null
+++ b/.changeset/clean-oranges-smell.md
@@ -0,0 +1,11 @@
+---
+"@spectrum-css/preview": major
+---
+
+Updates Storybook to use the latest icon sets for Spectrum 2. Includes changes to the directories that
+are used for loading in the sprite sheet and the individual icons, as they have moved.
+
+The global Icon Loader has been updated to apply the existing key name renaming from file names to icon
+names. This is now done once at the loader step, rather than each time within the Icon component template.
+The loader also now excludes the handful of 22x20 workflow icons, as these are not yet handled within the
+design system.
diff --git a/.changeset/cute-pillows-stand.md b/.changeset/cute-pillows-stand.md
new file mode 100644
index 00000000000..99bfac2be60
--- /dev/null
+++ b/.changeset/cute-pillows-stand.md
@@ -0,0 +1,7 @@
+---
+"@spectrum-css/statuslight": patch
+---
+
+### S2 status light fix
+
+This work removes the reference to `default-font-family` in favor for `sans-font-family-stack` to ensure the status light's font renders appropriately for web.
diff --git a/.changeset/cute-windows-unite.md b/.changeset/cute-windows-unite.md
new file mode 100644
index 00000000000..a32d9caff7b
--- /dev/null
+++ b/.changeset/cute-windows-unite.md
@@ -0,0 +1,5 @@
+---
+"@spectrum-css/ui-icons": minor
+---
+
+Updates ui-icons to include linkout-75 icon.
diff --git a/.changeset/deep-sloths-fetch.md b/.changeset/deep-sloths-fetch.md
new file mode 100644
index 00000000000..6187473f470
--- /dev/null
+++ b/.changeset/deep-sloths-fetch.md
@@ -0,0 +1,24 @@
+---
+"@spectrum-css/actionbar": major
+---
+
+### Actionbar S2 Migration
+
+Action bar now has some updated colors, corner radius, and icons. There's a new look to the default and emphasized variants.
+
+The emphasized has changed from an `accent` background color to a `neutral` background color. In light mode, the clear button and action buttons are `staticWhite` and in dark mode they are `staticBlack`.
+
+#### New tokens
+
+`--spectrum-actionbar-emphasized-actionbutton-label-color`
+`--spectrum-actionbar-emphasized-icon-color`
+`--spectrum-actionbar-minimum-width`
+`--spectrum-actionbar-spacing-label-to-action-group`
+`--spectrum-actionbar-spacing-action-group-edge`
+`--spectrum-actionbar-close-button-to-counter`
+
+#### New mods
+
+`--mod-actionbar-minimum-width`
+`--mod-actionbar-spacing-action-group-edge`
+`--mod-actionbar-spacing-label-to-action-group`
diff --git a/.changeset/dirty-melons-look.md b/.changeset/dirty-melons-look.md
new file mode 100644
index 00000000000..790dd58227b
--- /dev/null
+++ b/.changeset/dirty-melons-look.md
@@ -0,0 +1,5 @@
+---
+"@spectrum-css/swatch": patch
+---
+
+Updates the add swatch icon to use the ui rather than workflow icon
diff --git a/.changeset/early-ends-fail.md b/.changeset/early-ends-fail.md
new file mode 100644
index 00000000000..f37d0e64b3f
--- /dev/null
+++ b/.changeset/early-ends-fail.md
@@ -0,0 +1,5 @@
+---
+"@spectrum-css/icon": minor
+---
+
+Adds icon class for link out 75 icon
diff --git a/.changeset/eighty-terms-lead.md b/.changeset/eighty-terms-lead.md
new file mode 100644
index 00000000000..659876812b8
--- /dev/null
+++ b/.changeset/eighty-terms-lead.md
@@ -0,0 +1,61 @@
+---
+"@spectrum-css/rating": major
+---
+
+#### Spectrum 2 migration
+
+This migrates the `rating` component to S2. Custom properties have been remapped and added per the design specification.
+
+##### Additions
+
+The medium component variation is the default and a t-shirt size medium variation has been added.
+
+A tooltip may be displayed to a user indicating whether interacting with the component will clear or edit the rating. A control and documentation example have been added.
+
+A rating may have a partially filled star. The width and fill of this star is controlled by adding `.is-partial` to the parent `span` with classes of `spectrum-Rating-icon` and `is-selected` and then setting `--mod-rating-icon-fill` to the necessary fill percentage (e.g. `50%`).
+
+##### New mods
+
+`--mod-rating-width`
+`--mod-rating-height`
+`--mod-rating-bottom-to-content-area`
+`--mod-rating-edge-to-content-area`
+`--mod-rating-top-to-content-area`
+`--mod-rating-icon-fill`
+
+##### Removed mods
+
+`--mod-rating-icon-spacing-vertical-top`
+`--mod-rating-icon-count`
+`--mod-rating-indicator-border-radius`
+`--mod-rating-indicator-height`
+`--mod-rating-icon-color-key-focus`
+
+##### New custom properties
+
+`--spectrum-rating-width`
+`--spectrum-component-size-difference-down`
+`--spectrum-component-size-minimum-perspective-down`
+`--spectrum-corner-radius-medium-size-medium`
+`--spectrum-corner-radius-medium-size-small`
+`--spectrum-neutral-content-color-default`
+`--spectrum-neutral-content-color-down`
+`--spectrum-neutral-content-color-hover`
+`--spectrum-spacing-75`
+`--spectrum-workflow-icon-size-75`
+
+##### Removed custom properties
+
+`--spectrum-rating-indicator-width`
+`--spectrum-rating-icon-color-key-focus`
+`--spectrum-rating-icon-spacing-vertical-top`
+`--spectrum-rating-indicator-height`
+`--spectrum-rating-indicator-border-radius`
+`--spectrum-accent-content-color-key-focus`
+`--spectrum-border-width-200`
+`--spectrum-component-top-to-workflow-icon-100`
+`--spectrum-corner-radius-100`
+`--spectrum-neutral-subdued-content-color-default`
+`--spectrum-neutral-subdued-content-color-down`
+`--spectrum-neutral-subdued-content-color-hover`
+`--spectrum-neutral-subdued-content-color-key-focus`
diff --git a/.changeset/fair-coins-buy.md b/.changeset/fair-coins-buy.md
new file mode 100644
index 00000000000..8971c89f310
--- /dev/null
+++ b/.changeset/fair-coins-buy.md
@@ -0,0 +1,7 @@
+---
+"@spectrum-css/link": patch
+---
+
+### S2 link fix
+
+This work adds the static color focus ring tokens to links (so that static white and static black links do _not_ have the usual blue focus ring).
diff --git a/.changeset/few-doors-smile.md b/.changeset/few-doors-smile.md
new file mode 100644
index 00000000000..872a7c98e6d
--- /dev/null
+++ b/.changeset/few-doors-smile.md
@@ -0,0 +1,5 @@
+---
+"@spectrum-css/buttongroup": patch
+---
+
+Adds a new `--mod-buttongroup-flex-wrap` custom property to leverage if a user wishes to customize the `flex-wrap` property.
diff --git a/.changeset/flat-snails-admire.md b/.changeset/flat-snails-admire.md
new file mode 100644
index 00000000000..eeaa8dde839
--- /dev/null
+++ b/.changeset/flat-snails-admire.md
@@ -0,0 +1,7 @@
+---
+"@spectrum-css/infieldprogresscircle": major
+---
+
+#### Spectrum 2 migration
+
+In-field progress circle is a new component created to replace progress circle (size S) in t-shirt size components. The button, textfield, combo box, and picker `template.js` files have all been updated to call for infield progress circles. This component comes in four sizes: (S, M, L, XL), has updated color variants (default, white, black), and has a unified track thickness.
diff --git a/.changeset/fluffy-hands-appear.md b/.changeset/fluffy-hands-appear.md
new file mode 100644
index 00000000000..9ab1060e135
--- /dev/null
+++ b/.changeset/fluffy-hands-appear.md
@@ -0,0 +1,5 @@
+---
+"@spectrum-css/switch": patch
+---
+
+Fix active down state specificity by increasing the specificity of the active state selector. This change was necessary because the `postcss-hover-media-feature` plugin converts hover styles into a media query for devices that support hover. Without this adjustment, the hover styles could override the active down state styles due to the way CSS specificity and order are handled. By adding the additional `.spectrum-Switch` class in the active state selector, we ensure that the active state takes precedence over the hover state, maintaining the correct visual behavior of the switch component across different interaction states.
diff --git a/.changeset/four-lemons-warn.md b/.changeset/four-lemons-warn.md
new file mode 100644
index 00000000000..5f55065100f
--- /dev/null
+++ b/.changeset/four-lemons-warn.md
@@ -0,0 +1,30 @@
+---
+"@spectrum-css/combobox": major
+"@spectrum-css/helptext": minor
+---
+
+### Combobox S2 Migration
+
+#### New Changes
+
+- Removed quiet styling variant
+- Updated corner radius to match S2 specifications
+- Changed outline thickness for better visibility
+- Replaced picker button with in-field button component
+- Added help text along with invalid state
+- Modified the WHCM invalid/error state in help text
+
+### New tokens
+
+`--spectrum-combobox-font-weight`
+`--spectrum-combobox-line-height-cjk`
+`--spectrum-combobox-spacing-alert-icon-to-text`
+`--spectrum-combobox-spacing-to-help-text`
+
+### New mods
+
+`--mod-combobox-line-height-cjk`
+`--mod-combobox-popover-animation-distance`
+`--mod-combobox-spacing-alert-icon-to-text`
+`--mod-combobox-spacing-to-help-text`
+`--mod-combobox-textfield-background-color`
diff --git a/.changeset/fresh-crabs-deliver.md b/.changeset/fresh-crabs-deliver.md
new file mode 100644
index 00000000000..faec2d41674
--- /dev/null
+++ b/.changeset/fresh-crabs-deliver.md
@@ -0,0 +1,16 @@
+---
+"@spectrum-css/breadcrumb": major
+---
+
+#### Spectrum 2 Breadcrumbs migration
+
+The breadcrumbs component is now updated to use the S2 specs and tokens. This includes updated spacing, heights, colors, font sizes, etc.
+
+There has been a major design change to the variant classes related to density and sizing, to align their terminology better with t-shirt sizes:
+
+- The "compact" variant no longer exists. The `spectrum-Breadcrumbs--compact` class and associated custom properties are removed. The default (medium) breadcrumbs are now sized similar to what was previously called compact.
+- There is a new "large" variant, which uses the `spectrum-Breadcrumbs--sizeL` class. This is sized similarly to what was previously the default.
+
+In the multiline variant, the size of the title item can optionally be customized using an additional child heading element that applies one of the
+typography component's `spectrum-Heading--size*` classes. The preferred sizes specified in the design spec are small, medium, large (default), and
+extra-large. If an additional heading element is not used within the title item, the text will still be sized correctly to the default.
diff --git a/.changeset/fresh-seahorses-join.md b/.changeset/fresh-seahorses-join.md
new file mode 100644
index 00000000000..c61e578bd5b
--- /dev/null
+++ b/.changeset/fresh-seahorses-join.md
@@ -0,0 +1,9 @@
+---
+"@spectrum-css/button": patch
+---
+
+#### Remove spectrum-ButtonWithFocusRing placeholder class extend
+
+Removes the need for the extend from this placeholder class, as the styles it provides have diverged slightly from what is in button and it was causing some unnecessary CSS to override.
+
+This should not result in any changed visuals or behavior, as the same CSS has been integrated.
diff --git a/.changeset/fresh-spoons-try.md b/.changeset/fresh-spoons-try.md
new file mode 100644
index 00000000000..39f9d2e0885
--- /dev/null
+++ b/.changeset/fresh-spoons-try.md
@@ -0,0 +1,7 @@
+---
+"@spectrum-css/logicbutton": patch
+---
+
+### S2 logic button fix
+
+Adds `border-style: solid` to the styles to avoid a 3D effect on the border.
diff --git a/.changeset/friendly-dolls-raise.md b/.changeset/friendly-dolls-raise.md
new file mode 100644
index 00000000000..e8504c217f4
--- /dev/null
+++ b/.changeset/friendly-dolls-raise.md
@@ -0,0 +1,5 @@
+---
+"@spectrum-css/avatar": major
+---
+
+Adds support for new avatar-size tokens (avatar-size-800 to avatar-size-1500). Updates avatar component story to support new sizes. Adds support for avatar-border-color and avatar-border-thickness.
diff --git a/.changeset/giant-windows-smoke.md b/.changeset/giant-windows-smoke.md
new file mode 100644
index 00000000000..da6f755a334
--- /dev/null
+++ b/.changeset/giant-windows-smoke.md
@@ -0,0 +1,26 @@
+---
+"@spectrum-css/colorwheel": major
+---
+
+#### Spectrum 2 migration
+
+This change migrates the colorwheel component to S2. It adds the `--spectrum-colorwheel-border-color-rgb` and `--spectrum-colorwheel-border-opacity` custom properties. It updates `--spectrum-colorwheel-border-color` to leverage these tokens in an `rgba(...)` function.
+
+This removes the `spectrum-ColorWheel-border` and associated template DOM node as the outside/underlying border are no longer present in the S2 designs. `::before` and `::after` pseudo elements are now used to draw the exterior and interior borders that overlay the exterior and interior edges of the color wheel.
+
+Support is provided for the `240px` and `192px` sizes outlined in the design requirements.
+
+The `forced-colors` media query has been moved to the bottom of the file consistent with our other component implementations.
+
+Stories, tests and documentation have been updated to be consistent with these changes.
+
+The following mods have been removed:
+
+```css
+--mod-colorwheel-height
+--mod-colorwheel-width
+--mod-colorwheel-min-width
+--mod-colorwheel-path-borders
+--mod-colorwheel-colorarea-margin
+--mod-colorwheel-border-width
+```
diff --git a/.changeset/gold-cats-hide.md b/.changeset/gold-cats-hide.md
new file mode 100644
index 00000000000..e99c3ae0940
--- /dev/null
+++ b/.changeset/gold-cats-hide.md
@@ -0,0 +1,13 @@
+---
+"@spectrum-css/popover": minor
+---
+
+Restores drop shadow for nested popovers. This is done by moving the default popover to `box-shadow` and using `filter` for popovers with tip. This allows for visual consistency across all popovers.
+
+##### New mods
+
+`--mod-popover-box-shadow`
+
+##### New custom properties
+
+`--spectrum-popover-box-shadow`
diff --git a/.changeset/healthy-chicken-clap.md b/.changeset/healthy-chicken-clap.md
new file mode 100644
index 00000000000..e0364a1a8a7
--- /dev/null
+++ b/.changeset/healthy-chicken-clap.md
@@ -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`
diff --git a/.changeset/hip-shoes-listen.md b/.changeset/hip-shoes-listen.md
new file mode 100644
index 00000000000..5fb94d03452
--- /dev/null
+++ b/.changeset/hip-shoes-listen.md
@@ -0,0 +1,5 @@
+---
+"@spectrum-css/tokens": patch
+---
+
+Adds `--spectrum-table-selected-row-background-color-rgb` to `light-vars.css` and `dark-vars.css` for custom tokens.
diff --git a/.changeset/honest-animals-stop.md b/.changeset/honest-animals-stop.md
new file mode 100644
index 00000000000..b0ed21b7a14
--- /dev/null
+++ b/.changeset/honest-animals-stop.md
@@ -0,0 +1,7 @@
+---
+"@spectrum-css/fieldlabel": patch
+---
+
+#### Fix fieldlabel required icon wrapping
+
+Addresses case where fieldlabel required icon could appear on its own line when wrapping by applying text-wrap: pretty; to the parent label class and adding a non-breaking space character between the label content and required marker.
diff --git a/.changeset/hot-books-fail.md b/.changeset/hot-books-fail.md
new file mode 100644
index 00000000000..4c71ab8b722
--- /dev/null
+++ b/.changeset/hot-books-fail.md
@@ -0,0 +1,13 @@
+---
+"@spectrum-css/picker": major
+---
+
+#### Spectrum 2 migration
+
+Picker now uses Spectrum 2 tokens and specifications. A few notable changes:
+
+- The mod custom property `--mod-line-height-100` has been renamed to `--mod-button-line-height`.
+- The mod custom property `--mod-sans-font-family-stack` has been renamed to `--mod-button-font-family`.
+- The mod custom property `--mod-animation-duration-100` has been renamed to `--mod-button-animation-duration`.
+- The mod custom property `--mod-picker-spacing-text-to-alert-icon-inline-start` has been renamed to `--mod-picker-spacing-text-to-icon-inline-end`. This removed the fallback that was marked as deprecated in a previous version.
+- The mod custom property `--mod-picker-spacing-text-to-icon` has been removed. Use `--mod-picker-spacing-text-to-icon-inline-end` for the spacing between text and visual (indicator or disclosure), or `--mod-picker-spacing-starting-icon-to-text` for the space between the optional workflow icon and the text.
diff --git a/.changeset/itchy-kids-travel.md b/.changeset/itchy-kids-travel.md
new file mode 100644
index 00000000000..06d6804752b
--- /dev/null
+++ b/.changeset/itchy-kids-travel.md
@@ -0,0 +1,24 @@
+---
+"@spectrum-css/progresscircle": major
+---
+
+#### Spectrum 2 migration
+
+This is the Spectrum 2 styles migration of the progress circle. The original markup has changed to an svg and circle element to allow CSS styles such as `stroke-linecap`. This was necessary to match the design. The `--small/--medium/--large` sizing classes have been deprecated in favor of t-shirt classes `--sizeS/--sizeM/--sizeL`
+
+##### Animation
+
+`@keyframes spectrum-dashoffset-animation`:
+This animation was created by React Spectrum and used to keep the same speed and bezier curve.
+
+##### Added tokens
+
+##### Removed styles & mods
+
+`--spectrum-progress-circle-track-border-color-over-background`
+`--spectrum-progress-circle-fill-border-color-over-background`
+`--spectrum-progress-circle-track-border-style`
+`--spectrum-progress-circle-track-border-style`
+`--highcontrast-progress-circle-track-border-style`
+`--mod-progress-circle-track-border-style`
+`--spectrum-progress-circle-track-border-style`
diff --git a/.changeset/itchy-shrimps-help.md b/.changeset/itchy-shrimps-help.md
new file mode 100644
index 00000000000..68598dd4f7c
--- /dev/null
+++ b/.changeset/itchy-shrimps-help.md
@@ -0,0 +1,5 @@
+---
+"@spectrum-css/picker": patch
+---
+
+S2 Popover has an updated default position, bottom-start. The correct `.spectrum-Popover--bottom-start` class was added to the open popover selector blocks for picker so that the spacing from the picker to the popover is correctly adjusted.
diff --git a/.changeset/itchy-waves-work.md b/.changeset/itchy-waves-work.md
new file mode 100644
index 00000000000..296143885ff
--- /dev/null
+++ b/.changeset/itchy-waves-work.md
@@ -0,0 +1,82 @@
+---
+"@spectrum-css/stepper": major
+---
+
+### Number field S2 Migration
+
+This work migrations the stepper/number field component to Spectrum 2! 🎉 The S1 stepper was very minimal, and didn't align with SWC or React's implementation. This migration should bring parity to the CSS component. New features include:
+
+- the display name for this component has changed from `stepper` to `number field` (based on design's, React's and SWC's naming conventions.)
+ - _**Note:**_ The NPM package name has remained as "stepper," and hasn't yet changed to "number field.""
+- an error state with alert icon
+- optional help text
+- embedded field label & optional positions
+
+#### Quick overview
+
+Because of all the new features and to align more with design, SWC and React, below is a quick recap of the following tokens & classes that have been renamed in the CSS:
+
+- All `.spectrum-Stepper*` class names have been converted to `.spectrum-NumberField*`
+- The `.hide-stepper` class has been converted to `.spectrum-NumberField--hiddenStepper`
+- Custom properties have been renamed from `--spectrum-stepper*` to `--spectrum-numberfield*`
+- Modifiable custom properties have been renamed from `--mod-stepper*` to `--mod-numberfield*`
+- Markup has changed
+- Styling lives on different elements
+- Lots more Chromatic test coverage
+
+#### Markup
+
+Following React's lead, the markup of the number field has changed. More obviously, help text and field label components are embedded into `.spectrum-NumberField`, instead of necessitating separate components. The number field now incorporates an error state that better reflects the embedded textfield's error state, so there is now an alert icon within the markup in an invalid number field. Additionally, a new `.spectrum-NumberField-inputs` containing wrapper was introduced to encapsulate the textfield element and infield button elements. This container allowed for some extra alignment styles for those 2 elements and then freed up the opportunity to introduced an "unstyled" `input` (as described more below). Custom classes were also added to the nested textfield and input elements to ensure styles for number field were passed correctly to the correct elements (`.spectrum-NumberField-textfield` and `.spectrum-NumberField-input`).
+
+Stemming from the infield button S2 migration, there is also an extra container for the inline (previously "stacked") stepper buttons.
+
+#### Styling
+
+The `.spectrum-NumberField-textfield` div is where the S2 design language lives (instead of on the input element), while the actual `input` (`.spectrum-NumberField-input`) is unstyled and incorporated more subtly. Breaking changes were introduced in all previous custom properties, where any `--spectrum-stepper-*` or `--mod-stepper-*` properties were renamed to `--spectrum-numberfield-*`or `--mod-numberfield-*`. This also applied to class names, where `.spectrum-Stepper` changed to `.spectrum-NumberField`. The `hide-stepper` class has also been updated to match our class naming conventions (`.spectrum-NumberField--hiddenStepper`).
+
+#### Mods
+
+Modifiable custom properties have been renamed from `--mod-stepper*` to `--mod-numberfield`.
+
+##### Removed custom properties include
+
+--mod-stepper-animation-duration
+--mod-stepper-button-border-width
+--mod-stepper-button-width
+--mod-stepper-button-width-quiet
+--mod-stepper-buttons-background-color
+--mod-stepper-buttons-border-color
+--mod-stepper-buttons-border-color-focus
+--mod-stepper-buttons-border-color-focus-hover
+--mod-stepper-buttons-border-color-hover
+--mod-stepper-buttons-border-color-keyboard-focus
+--mod-stepper-buttons-border-style
+--mod-stepper-buttons-border-width
+--mod-stepper-focus-indicator-visibility
+--mod-stepper-height (renamed to --mod-numberfield-block-size)
+--mod-stepper-width (renamed to --mod-numberfield-inline-size)
+
+##### New custom properties include
+
+--mod-numberfield-background-color
+--mod-numberfield-background-color-disabled
+--mod-numberfield-block-size (renamed from --mod-stepper-height)
+--mod-numberfield-border-color-disabled
+--mod-numberfield-border-color-invalid-default
+--mod-numberfield-border-color-invalid-focus
+--mod-numberfield-border-color-invalid-focus-hover
+--mod-numberfield-border-color-invalid-hover
+--mod-numberfield-border-color-invalid-keyboard-focus
+--mod-numberfield-button-inline-offset
+--mod-numberfield-font-family
+--mod-numberfield-font-size
+--mod-numberfield-font-style
+--mod-numberfield-font-weight
+--mod-numberfield-hidden-stepper-min-inline-size
+--mod-numberfield-inline-size (renamed from --mod-stepper-width)
+--mod-numberfield-label-to-field
+--mod-numberfield-line-height
+--mod-numberfield-min-inline-size
+--mod-numberfield-spacing-block-end-edge-to-text
+--mod-numberfield-spacing-block-start-edge-to-text
+--mod-numberfield-spacing-field-to-helptext
diff --git a/.changeset/khaki-icons-hammer.md b/.changeset/khaki-icons-hammer.md
new file mode 100644
index 00000000000..7a84d651601
--- /dev/null
+++ b/.changeset/khaki-icons-hammer.md
@@ -0,0 +1,62 @@
+---
+"@spectrum-css/tag": major
+---
+
+Tag now uses Spectrum 2 tokens and specifications:
+
+- The invalid variant has been removed, tag errors are now displayed with help text within the tag group only.
+- Borders remain in high contrast but are otherwise transparent.
+- Thumbnail has been added as a visual option.
+- Tag now has a max-inline-size.
+- Read-only tags are now supported.
+- Passthroughs for clear button have been updated to match the current spec.
+- Default t-shirt size for tag is small.
+- Clear button has accessibly sized target.
+- Emphasized tags have accent coloring only when they are selected.
+
+Changed mods:
+
+- "--mod-tag-avatar-spacing-inline-end" --> "--mod-tag-visual-spacing-inline-end",
+- "--mod-tag-icon-spacing-inline-end" --> "--mod-tag-visual-spacing-inline-end",
+- "--mod-tag-spacing-inline-start" --> "--mod-tag-label-spacing-inline",
+- "--mod-tag-label-spacing-inline-end" --> "--mod-tag-label-spacing-inline"
+- "--mod-tag-clear-button-spacing-inline-start" --> "--mod-tag-label-to-clear-icon",
+- "--mod-tag-clear-button-spacing-inline-end" --> "--mod-tag-edge-to-clear-icon"
+
+Added mods:
+
+- "--mod-tag-avatar-size",
+- "--mod-tag-clear-button-size",
+- "--mod-tag-label-font-family",
+- "--mod-tag-label-font-style",
+- "--mod-tag-label-line-height-cjk",
+- "--mod-tag-maximum-width-multiplier",
+- "--mod-tag-min-inline-size",
+- "--mod-tag-thumbnail-size",
+- "--mod-tag-visual-spacing-inline-start"
+
+Removed mods:
+
+- "--mod-tag-background-color-invalid-selected",
+- "--mod-tag-background-color-invalid-selected-active",
+- "--mod-tag-background-color-invalid-selected-focus",
+- "--mod-tag-background-color-invalid-selected-hover",
+- "--mod-tag-border-color-emphasized-active",
+- "--mod-tag-border-color-emphasized-focus",
+- "--mod-tag-border-color-emphasized-hover",
+- "--mod-tag-border-color-invalid",
+- "--mod-tag-border-color-invalid-active",
+- "--mod-tag-border-color-invalid-focus",
+- "--mod-tag-border-color-invalid-hover",
+- "--mod-tag-border-color-invalid-selected",
+- "--mod-tag-border-color-invalid-selected-active",
+- "--mod-tag-border-color-invalid-selected-focus",
+- "--mod-tag-border-color-invalid-selected-hover",
+- "--mod-tag-border-color-selected-active",
+- "--mod-tag-border-color-selected-focus",
+- "--mod-tag-border-color-selected-hover",
+- "--mod-tag-content-color-invalid",
+- "--mod-tag-content-color-invalid-active",
+- "--mod-tag-content-color-invalid-focus",
+- "--mod-tag-content-color-invalid-hover",
+- "--mod-tag-content-color-invalid-selected",
diff --git a/.changeset/late-worms-reply.md b/.changeset/late-worms-reply.md
new file mode 100644
index 00000000000..145328d49ca
--- /dev/null
+++ b/.changeset/late-worms-reply.md
@@ -0,0 +1,7 @@
+---
+"@spectrum-css/floatingactionbutton": patch
+---
+
+## S2 floating action button fix
+
+Opts to use the color property as opposed to fill for the icon. This correctly passes the floating action button icon colors to the component, to override the fill property style that is set on the embedded `.spectrum-Icon`.
diff --git a/.changeset/legal-lands-warn.md b/.changeset/legal-lands-warn.md
new file mode 100644
index 00000000000..63e5aac327d
--- /dev/null
+++ b/.changeset/legal-lands-warn.md
@@ -0,0 +1,54 @@
+---
+"@spectrum-css/contextualhelp": major
+---
+
+#### S2 migration for contextual help
+
+This migrates the contextual help component to the latest Spectrum 2 designs. Custom properties have been remapped and added per the design specification.
+
+Typographic and color tokens have been updated per design specifications.
+
+All existing popover positioning variations are supported.
+
+##### New custom properties
+
+`--spectrum-contextual-help-body-color`
+`--spectrum-contextual-help-body-line-height`
+`--spectrum-contextual-help-body-sans-serif-font-family`
+`--spectrum-contextual-help-body-sans-serif-font-style`
+`--spectrum-contextual-help-body-sans-serif-font-weight`
+`--spectrum-contextual-help-title-color`
+`--spectrum-contextual-help-title-font-style`
+`--spectrum-contextual-help-title-font-weight`
+`--spectrum-contextual-help-title-line-height`
+`--spectrum-contextual-help-title-sans-serif-font-family`
+
+##### New mods
+
+`--mod-contextual-help-body-line-height`
+`--mod-contextual-help-body-sans-serif-font-family`
+`--mod-contextual-help-body-sans-serif-font-style`
+`--mod-contextual-help-body-sans-serif-font-weight`
+`--mod-contextual-help-body-size`
+`--mod-contextual-help-title-color`
+`--mod-contextual-help-title-font-style`
+`--mod-contextual-help-title-font-weight`
+`--mod-contextual-help-title-line-height`
+`--mod-contextual-help-title-sans-serif-font-family`
+`--mod-contextual-help-content-spacing`
+`--mod-contextual-help-heading-size`
+`--mod-contextual-help-link-spacing`
+`--mod-contextual-help-min-inline-size`
+`--mod-contextual-help-padding`
+`--mod-contextual-help-popover-maximum-width`
+
+##### Removed mods
+
+`--mod-contextual-help-title-sans-serif-font-family`
+`--mod-spectrum-contextual-help-body-size`
+`--mod-spectrum-contextual-help-content-spacing`
+`--mod-spectrum-contextual-help-heading-size`
+`--mod-spectrum-contextual-help-link-spacing`
+`--mod-spectrum-contextual-help-minimum-width`
+`--mod-spectrum-contextual-help-padding`
+`--mod-spectrum-contextual-help-popover-maximum-width`
diff --git a/.changeset/lemon-flowers-poke.md b/.changeset/lemon-flowers-poke.md
new file mode 100644
index 00000000000..34307255d04
--- /dev/null
+++ b/.changeset/lemon-flowers-poke.md
@@ -0,0 +1,62 @@
+---
+"@spectrum-css/alertdialog": major
+---
+
+#### S2 migration for alert dialog
+
+This migrates the `alert dialog` component to the latest Spectrum 2 designs. Custom properties have been remapped and added per the design specification.
+
+The icon in the dialog header has been moved from the right side to the left.
+
+The dialog divider has been removed.
+
+Primary button style has been updated to filled.
+
+The following variants remain supported:
+
+- Confirmation
+- Information
+- Destructive
+- Warning (with `AlertDiamond` icon)
+- Error (with `AlertTriangle` icon)
+
+Dialog buttons may be displayed either horizontally or vertically.
+
+##### Removed custom properties
+
+`--spectrum-alert-dialog-description-to-buttons`
+`--spectrum-alert-dialog-divider-to-description`
+`--spectrum-alert-dialog-padding`
+`--spectrum-alert-dialog-title-size`
+`--spectrum-alert-dialog-title-to-divider`
+`--spectrum-alert-dialog-title-to-icon`
+
+##### New custom properties
+
+`--spectrum-alert-dialog-background-color`
+`--spectrum-alert-dialog-corner-radius`
+`--spectrum-alert-dialog-description-font-size`
+`--spectrum-alert-dialog-description-to-button-group`
+`--spectrum-alert-dialog-edge-to-content`
+`--spectrum-alert-dialog-heading-size`
+`--spectrum-alert-dialog-title-to-description`
+
+##### Removed mods
+
+`--mod-alert-dialog-body-font-size`
+`--mod-alert-dialog-description-to-buttons`
+`--mod-alert-dialog-divider-to-description`
+`--mod-alert-dialog-padding`
+`--mod-alert-dialog-title-to-divider`
+`--mod-alert-dialog-title-to-icon`
+
+##### New mods
+
+`--mod-alert-dialog-background-color`
+`--mod-alert-dialog-corner-radius`
+`--mod-alert-dialog-description-content-size`
+`--mod-alert-dialog-description-to-button-group`
+`--mod-alert-dialog-edge-to-content`
+`--mod-alert-dialog-heading-size`
+`--mod-alert-dialog-minimum-title-to-icon`
+`--mod-alert-dialog-title-to-description`
diff --git a/.changeset/lemon-weeks-work.md b/.changeset/lemon-weeks-work.md
new file mode 100644
index 00000000000..3ac5745d3eb
--- /dev/null
+++ b/.changeset/lemon-weeks-work.md
@@ -0,0 +1,11 @@
+---
+"@spectrum-css/tokens": minor
+---
+
+#### Tokens
+
+Adds custom vars for coachmark action menu vertical spacing. These help provide consistent spacing between states when the action menu is and is not visible.
+
+In `tokens/custom/large-vars.css`: `--spectrum-coachmark-action-menu-vertical-offset`.
+
+In `tokens/custom/medium-vars.css`: `--spectrum-coachmark-action-menu-vertical-offset`.
diff --git a/.changeset/light-years-speak.md b/.changeset/light-years-speak.md
new file mode 100644
index 00000000000..71ecddca62f
--- /dev/null
+++ b/.changeset/light-years-speak.md
@@ -0,0 +1,23 @@
+---
+"@spectrum-css/tooltip": major
+---
+
+#### Spectrum 2 migration
+
+This migration includes updated colors, rounding, a bigger tip, and the removal of variants (only neutral is available in Spectrum 2). As a result of the deprecation of variants, icons have also been removed.
+
+The redesign of the tip, specifically the rounding, required a reworking of how we use clip-path and transform.
+
+Some custom property mods have been removed:
+
+- `--mod-tooltip-background-color-informative`
+- `--mod-tooltip-background-color-negative`
+- `--mod-tooltip-background-color-positive`
+- `--mod-tooltip-icon-spacing-block-start`
+- `--mod-tooltip-icon-spacing-inline-end`
+- `--mod-tooltip-icon-spacing-inline-start`
+- `--mod-tooltip-icon-width`
+
+And one mod has been added:
+
+- `--mod-tooltip-tip-corner-radius`
diff --git a/.changeset/lovely-geckos-hammer.md b/.changeset/lovely-geckos-hammer.md
new file mode 100644
index 00000000000..00550a17385
--- /dev/null
+++ b/.changeset/lovely-geckos-hammer.md
@@ -0,0 +1,5 @@
+---
+"@spectrum-css/link": minor
+---
+
+Fixes keyboard focus shift by changing padding to outline-offset
diff --git a/.changeset/mean-eggs-learn.md b/.changeset/mean-eggs-learn.md
new file mode 100644
index 00000000000..7df3bbecb4c
--- /dev/null
+++ b/.changeset/mean-eggs-learn.md
@@ -0,0 +1,5 @@
+---
+"@spectrum-css/thumbnail": minor
+---
+
+Replaces `corner-radius-75` with `thumbnail-corner-radius`.
diff --git a/.changeset/metal-fireants-switch.md b/.changeset/metal-fireants-switch.md
new file mode 100644
index 00000000000..df127153dc4
--- /dev/null
+++ b/.changeset/metal-fireants-switch.md
@@ -0,0 +1,52 @@
+---
+"@spectrum-css/dialog": major
+"@spectrum-css/modal": patch
+"@spectrum-css/underlay": patch
+---
+
+#### Spectrum 2 Standard dialog migration
+
+This is the migration for standard dialog. The Divider component is no longer supported in S2 dialogs. In addition, some new and updated tokens are in place to update dialog corner rounding, font treatments, spacing/padding, and maximum/minimum widths. There were several new elements implemented as well, including optional header and footer content, hero/cover images, checkbox and text-only options in the footer content area.
+
+The `.spectrum-Dialog--small`, `.spectrum-Dialog--medium`, and `.spectrum-Dialog--large` sizing classes were deprecated and removed from the CSS in favor of the t-shirt sizes. Additionally, the spelling of the `.spectrum-Dialog--dismissable` class was corrected to `.spectrum-Dialog--dismissible`.
+
+Mod properties are either "new," have been renamed to reflect the respective dialog language, or were removed:
+
+_New Mods_
+`--mod-standard-dialog-spacing-title-to-header-content`
+`--mod-standard-dialog-spacing-title-to-description`
+`--mod-standard-dialog-header-content-font-size`
+
+_Renamed Mods_
+`--mod-dialog-confirm-small-width` > `--mod-standard-dialog-max-width-small`
+`--mod-dialog-confirm-medium-width` > `--mod-standard-dialog-max-width`
+`--mod-dialog-confirm-large-width` > `--mod-standard-dialog-max-width-large`
+`--mod-dialog-confirm-border-radius` > `--mod-standard-dialog-border-radius`
+`--mod-dialog-confirm-description-text-size` > `--mod-standard-dialog-description-font-size`
+`--mod-dialog-confirm-description-text-line-height` > `--mod-standard-dialog-description-line-height`
+`--mod-dialog-confirm-description-text-color` > `--mod-standard-dialog-description-text-color`
+`--mod-dialog-confirm-description-font-weight` > `--mod-standard-dialog-description-font-weight`
+`--mod-dialog-heading-font-weight` > `--mod-standard-dialog-heading-font-weight`
+`--mod-dialog-confirm-title-text-line-height` > `--mod-standard-dialog-heading-line-height`
+`--mod-dialog-confirm-title-text-color` > `--mod-standard-dialog-heading-text-color`
+`--mod-dialog-confirm-title-text-size` > `--mod-standard-dialog-heading-font-size`
+`--mod-dialog-confirm-hero-height` > `--mod-standard-dialog-hero-block-size`
+`--mod-dialog-min-inline-size` > `--mod-standard-dialog-min-inline-size`
+`--mod-dialog-confirm-padding-grid` > `--mod-standard-dialog-spacing-grid-padding`
+`--mod-dialog-confirm-footer-padding-top` > `--mod-standard-dialog-spacing-description-to-footer`
+`--mod-dialog-confirm-close-button-padding` > `--mod-standard-dialog-spacing-edge-to-close-button`
+`--mod-dialog-confirm-gap-size` > `--mod-standard-dialog-spacing-footer-to-button-group`
+
+_Removed Mods_
+`--mod-dialog-confirm-buttongroup-padding-top`
+`--mod-dialog-confirm-close-button-size`
+`--mod-dialog-confirm-description-margin`
+`--mod-dialog-confirm-description-padding`
+`--mod-dialog-confirm-divider-block-spacing-end`
+`--mod-dialog-confirm-divider-block-spacing-start`
+`--mod-dialog-confirm-divider-height`
+
+Modal and underlay updates
+
+- Modal component now uses the updated corner rounding.
+- Underlay has an updated comment that addresses the overlay-color/overlay-opacity tokens.
diff --git a/.changeset/mighty-pigs-accept.md b/.changeset/mighty-pigs-accept.md
new file mode 100644
index 00000000000..83be0beb618
--- /dev/null
+++ b/.changeset/mighty-pigs-accept.md
@@ -0,0 +1,15 @@
+---
+"@spectrum-css/progressbar": minor
+"@spectrum-css/meter": minor
+---
+
+Adjust progressbar styles, story and template to support proper width token and sizes for medium (desktop) and large (mobile) platforms.
+
+- Progress bar and meter now use the same tokens to control their width.
+- Progress bar and meter now have a set width regardless of t-shirt size.
+
+Removed mods
+`--mod-meter-inline-size`
+
+New mods
+`--mod-progressbar-inline-size`
diff --git a/.changeset/modern-chairs-sit.md b/.changeset/modern-chairs-sit.md
new file mode 100644
index 00000000000..efb2d950b1c
--- /dev/null
+++ b/.changeset/modern-chairs-sit.md
@@ -0,0 +1,23 @@
+---
+"@spectrum-css/dialog": major
+"@spectrum-css/modal": minor
+---
+
+#### S2 Takeover dialog
+
+This is the migration for the fullscreen/fullscreenTakeover dialog stories (these stories correspond to the "takeover dialog" in Figma). The Divider component support was removed in S2 standard dialog migration ([#2860](https://github.com/adobe/spectrum-css/pull/2860)). New and updated tokens are in place to update fullscreen/fullscreenTakeover dialog sizing, grid spacing, spacing in the header, and font sizes. Fullscreen/fullscreenTakeover dialogs do not support additional footer content or checkboxes (in comparison to the standard dialog).
+
+Takeover dialogs also support replacing text in the header and body areas with other components. This required an additional `.spectrum-Dialog-headerContentWrapper` element that should center whatever component/content within.
+
+Class names updated to match naming convention (remove hyphens and capitalize second word):
+`.spectrum-Dialog-header-content` > `.spectrum-Dialog-headerContent`
+`.spectrum-Dialog-footer-content` > `.spectrum-Dialog-footerContent`
+
+_New Mods_
+`--mod-takeover-dialog-grid-spacing`
+`--mod-takeover-dialog-spacing-header-content-gap`
+`--mod-takeover-dialog-title-font-size`
+
+#### Modal updates
+
+- Modal component now uses the updated margin token (`window-to-edge`) found in the takeover dialog design specs. This work also introduced `--spectrum-modal-takeover-window-to-edge`
diff --git a/.changeset/nasty-rats-rhyme.md b/.changeset/nasty-rats-rhyme.md
new file mode 100644
index 00000000000..f1cd0b500bd
--- /dev/null
+++ b/.changeset/nasty-rats-rhyme.md
@@ -0,0 +1,5 @@
+---
+"@spectrum-css/bundle": major
+---
+
+Updated picker and table changes brought into the released bundle.
diff --git a/.changeset/nice-cows-shout.md b/.changeset/nice-cows-shout.md
new file mode 100644
index 00000000000..fbbcb96fb06
--- /dev/null
+++ b/.changeset/nice-cows-shout.md
@@ -0,0 +1,62 @@
+---
+"@spectrum-css/coachmark": major
+---
+
+#### S2 coachmark migration
+
+This migrates the `coachmark` component to S2. Custom properties have been remapped per the design spec.
+
+| Before | After |
+| ------------------------------------------ | ----------------------------------------------- |
+| --spectrum-heading-sans-serif-font-weight | --spectrum-title-sans-serif-font-weight |
+| --spectrum-coach-mark-title-size | --spectrum-coach-mark-title-font-size |
+| --spectrum-heading-line-height | --spectrum-title-line-height |
+| --spectrum-heading-serif-font-style | --spectrum-title-serif-font-style |
+| --spectrum-coach-mark-body-size | --spectrum-coach-mark-body-font-size |
+| --spectrum-body-sans-serif-font-style | --spectrum-body-serif-font-style |
+| --spectrum-coach-mark-pagination-body-size | --spectrum-coach-mark-pagination-body-font-size |
+
+### New properties
+
+```css
+--spectrum-coach-mark-edge-to-content
+--spectrum-coach-mark-maximum-width
+--spectrum-coach-mark-media-height
+--spectrum-coach-mark-media-minimum-height
+--spectrum-coach-mark-minimum-width
+--spectrum-coach-mark-pagination-color
+--spectrum-coach-mark-pagination-text-to-bottom-edge
+--spectrum-coach-mark-width
+--spectrum-coachmark-body-to-footer
+--spectrum-coachmark-border-radius
+--spectrum-coachmark-border-size
+--spectrum-coachmark-buttongroup-display
+--spectrum-coachmark-buttongroup-mobile-display
+--spectrum-coachmark-content-font-size
+--spectrum-coachmark-content-font-weight
+--spectrum-coachmark-header-to-body
+--spectrum-coachmark-heading-to-action-button
+--spectrum-coachmark-max-width
+--spectrum-coachmark-media-fixed-height
+--spectrum-coachmark-media-min-height
+--spectrum-coachmark-menu-display
+--spectrum-coachmark-menu-mobile-display
+--spectrum-coachmark-min-width
+--spectrum-coachmark-padding
+--spectrum-coachmark-step-color
+--spectrum-coachmark-step-font-size
+--spectrum-coachmark-step-font-style
+--spectrum-coachmark-step-text-font-weight
+--spectrum-coachmark-step-text-line-height
+--spectrum-coachmark-step-to-bottom
+--spectrum-coachmark-title-color
+--spectrum-coachmark-title-font-family
+--spectrum-coachmark-title-font-size
+--spectrum-coachmark-title-font-style
+--spectrum-coachmark-title-text-font-weight
+--spectrum-coachmark-title-text-line-height
+```
+
+## Additions
+
+Adds `--spectrum-coachmark-media-fixed-height` for fixed `4:3` image variant and an accompanying `--mod-coachmark-media-fixed-height` mod. This variation has been added to the `coachmark` component story as a boolean control labeled as `Fixed image height`. The class is conditionally added within the `hasImage` block and, as such, will only impact rendering when `hasImage` is also `true`.
diff --git a/.changeset/nine-kings-repair.md b/.changeset/nine-kings-repair.md
new file mode 100644
index 00000000000..de6461f105a
--- /dev/null
+++ b/.changeset/nine-kings-repair.md
@@ -0,0 +1,18 @@
+---
+"@spectrum-css/button": major
+---
+
+#### S2 Button migration
+
+Button now uses Spectrum 2 tokens and specifications, which includes many color changes to all variants. A few other notable changes:
+
+- Outline buttons are no longer available in accent and negative options — use the filled variant instead.
+- Medium size is now the default. The class `.spectrum-Button--sizeM` is now unnecessary for this size, and has been removed.
+- The `.spectrum-Button--fill` class is no longer needed and has been removed.
+
+The following `--mod` custom properties have been renamed:
+
+- `--mod-line-height-100` has been renamed to `--mod-button-line-height`
+- `--mod-sans-font-family-stack` has been renamed to `--mod-button-font-family`
+- `--mod-animation-duration-100` has been renamed to `--mod-button-animation-duration`
+- `--mod-bold-font-weight` has been renamed to `--mod-button-font-weight`
diff --git a/.changeset/old-goats-chew.md b/.changeset/old-goats-chew.md
new file mode 100644
index 00000000000..92074ba5f71
--- /dev/null
+++ b/.changeset/old-goats-chew.md
@@ -0,0 +1,5 @@
+---
+"@spectrum-css/tokens": patch
+---
+
+Adds `--spectrum-corner-radius-1000: 9999px;` to global-vars.css to override value of 0.5. This should ensure our components that use this custom property are properly rounded (i.e. the fully rounded swatch or search field)
diff --git a/.changeset/olive-tools-hang.md b/.changeset/olive-tools-hang.md
new file mode 100644
index 00000000000..4f8a291984d
--- /dev/null
+++ b/.changeset/olive-tools-hang.md
@@ -0,0 +1,57 @@
+---
+"@spectrum-css/ui-icons": major
+---
+
+Iconography in v1 inclued 2 sizes, `medium` and `large`, as well as a single SVG asset that included both versions to be toggled with classes via CSS (found in folder`combined`). Icons in v2 no longer have multiple sizes and all assets are sourced from a single folder`svg` which can be found in the `dist` directory of this workspace. **Raw SVG assets can no longer be sourced from the top-level of the workspace and must be loaded from `@spectrum-css/ui-icons/dist/svg/*.svg` instead.** Please find below an outline of the new, deprecated, and unchanged icons.
+
+| Icon name | Migration notes |
+| ----------------- | --------------- |
+| Arrow75 | Deprecated |
+| Arrow100 | - |
+| Arrow200 | Deprecated |
+| Arrow300 | Deprecated |
+| Arrow400 | - |
+| Arrow500 | Deprecated |
+| Arrow600 | Deprecated |
+| Asterisk75 | Deprecated |
+| Asterisk100 | - |
+| Asterisk200 | - |
+| Asterisk300 | - |
+| Checkmark50 | - |
+| Checkmark75 | - |
+| Checkmark100 | - |
+| Checkmark200 | - |
+| Checkmark300 | - |
+| Checkmark400 | - |
+| Checkmark500 | Deprecated |
+| Checkmark600 | Deprecated |
+| Chevron50 | - |
+| Chevron75 | - |
+| Chevron100 | - |
+| Chevron200 | - |
+| Chevron300 | - |
+| Chevron400 | - |
+| Chevron500 | Deprecated |
+| Chevron600 | Deprecated |
+| CornerTriangle75 | - |
+| CornerTriangle100 | - |
+| CornerTriangle200 | - |
+| CornerTriangle300 | - |
+| Cross75 | - |
+| Cross100 | - |
+| Cross200 | - |
+| Cross300 | - |
+| Cross400 | - |
+| Cross500 | - |
+| Cross600 | - |
+| Dash50 | - |
+| Dash75 | - |
+| Dash100 | - |
+| Dash200 | - |
+| Dash300 | - |
+| Dash400 | Deprecated |
+| Dash500 | Deprecated |
+| Dash600 | Deprecated |
+| SingleGripper | Deprecated |
+| DoubleGripper | Deprecated |
+| TripleGripper | Deprecated |
diff --git a/.changeset/open-squids-refuse.md b/.changeset/open-squids-refuse.md
new file mode 100644
index 00000000000..e63c2bfcf56
--- /dev/null
+++ b/.changeset/open-squids-refuse.md
@@ -0,0 +1,20 @@
+---
+"@spectrum-css/picker": major
+---
+
+### S2 Picker component refactor
+
+- Refactors Picker component to use proper custom property naming conventions
+- Adds size-specific animation distances for Popover component
+- Improves component structure with proper class by renaming `spectrum-Picker` to `spectrum-Picker-button`
+- `spectrum-Picker` now encapsulates help text, label, and popover components
+- Adds `flex-shrink` to progress circle for better layout control when truncation and loading is visible
+- Updates Popover animation distance to use `spectrum-Picker` custom properties
+
+#### New token
+
+`--spectrum-picker-popover-animation-distance`
+
+#### Renamed tokens
+
+`spectrum-picker-spacing-picker-to-popover` --> `--spectrum-picker-popover-animation-distance`
diff --git a/.changeset/petite-toys-greet.md b/.changeset/petite-toys-greet.md
new file mode 100644
index 00000000000..11c8cae1034
--- /dev/null
+++ b/.changeset/petite-toys-greet.md
@@ -0,0 +1,87 @@
+---
+"@spectrum-css/table": major
+---
+
+### S2 table migration
+
+Compared to the S1 table, this component has updated corner rounding, updated color tokens, some updated spacing, and an overall refreshed look.
+
+#### Net-new features
+
+- The S2 table supports an empty state, rendering an illustrated message component.
+- As data is loading to the table, this component will render a progress circle during the loading state.
+- There are 2 selection modes: single-select and multi-select. Multi-select tables (`selectionMode: "multiple"`) render an indeterminate checkbox in the `thead`/`div` equivalent. Single-select tables (`selectionMode: "single"`) do not render the indeterminate checkbox in the header row. (Note: the `selectionMode` arg is disabled and will not render in the Storybook control table.)
+- For tables with sortable column, there are three new S2 icons used: `Sort` to indicate "general" sorting, `SortUp` for ascending sort direction, `SortDown` for descending sort direction.
+- Tables support thumbnail, avatar, and icon components as content within a cell.
+- Focus indicators for entire rows have been updated for rows to include a side focus indicator.
+
+#### Description of other S2 table work
+
+T-shirt sizing for tables is not technically supported, so t-shirt size classes (i.e. `.spectrum-Table--sizeS`), have been removed across all density variants.
+
+The `.spectrum-Table-cell--alignRight` class has been renamed to `.spectrum-Table-cell--alignEnd` to reflect the preference for "logical" positioning. The `.spectrum-Table-cell--alignCenter` class has been refactored to `.spectrum-Table-cell--alignStart`.
+
+In S1, the CSS table component only supported thumbnails. Because the S2 table supports thumbnails, as well as avatars and icons, most of the language regarding thumbnails has also changed. For instance, the `showThumbnail` storybook arg was refactored to `visualElement`. The following CSS classes have been removed or refactored to remove the thumbnail language in favor of "visual" instead:
+
+- `.spectrum-Table-thumbnailInner` >> `.spectrum-Table-visualInner`
+
+- `.spectrum-Table-row--thumbnail` >> **removed**
+- `.spectrum-Table-cell--thumbnail` >> **removed**
+- `.spectrum-Table-thumbnailInner` >> **removed**
+- `.spectrum-Table-thumbnailContent` >> **removed**
+- `.spectrum-Table-thumbnailInner` >> **removed**
+
+The drop zones have been refactored to approach the drop zone indicators as pseudo elements, as opposed to `outline` properties.
+
+Because there are multiple sort icons in the S2 table, `.spectrum-Table-sortedIcon` has been renamed to `.spectrum-Table-sortIcon`.
+
+Individual cell focus rings have rounded corners.
+
+The outer table border extends all the way around the `thead`/`div` equivalent.
+
+In Storybook, several new stories have been added to the docs page and the testing grid for Chromatic. These stories include `EmptyState`, `LoadingState`, `SingleSelect`, `NumericalData`, `TableStates`, `Sortable`. Documentation has been added for each of these stories, as well as expanded in other stories.
+
+#### Mods
+
+##### Renamed Modifiers
+
+| Old Modifier | New modifier |
+| -------------------------------------------------- | ------------------------------------------------- |
+| `--mod-table-border-radius--quiet` | `--mod-table-border-radius-quiet` |
+| `--mod-table-header-top-to-text` | `--mod-table-header-row-top-to-text` |
+| `--mod-table-header-bottom-to-text` | `--mod-table-header-row-bottom-to-text` |
+| `--mod-table-cell-inline-space` | `--mod-table-cell-inline-spacing` |
+| `--mod-table-checkbox-to-text` | `--mod-table-checkbox-to-cell-content` |
+| `--mod-table-header-background-color--quiet` | `--mod-table-header-background-color-quiet` |
+| `--mod-table-header-bottom-to-text` | `--mod-table-header-row-bottom-to-text` |
+| `--mod-table-header-top-to-text` | `--mod-table-header-row-top-to-text` |
+| `--mod-table-min-row-height--compact` | `--mod-table-min-row-height-compact` |
+| `--mod-table-min-row-height--spacious` | `--mod-table-min-row-height-spacious` |
+| `--mod-table-outer-border-inline-width--quiet` | `--mod-table-outer-border-inline-width-quiet` |
+| `--mod-table-row-background-color--quiet` | `--mod-table-row-background-color-quiet` |
+| `--mod-table-row-checkbox-block-spacing--compact` | `--mod-table-row-checkbox-block-spacing-compact` |
+| `--mod-table-row-checkbox-block-spacing--spacious` | `--mod-table-row-checkbox-block-spacing-spacious` |
+| `--mod-table-thumbnail-to-text` | `--mod-table-visual-to-text` |
+
+##### New Modifiers
+
+- `--mod-table-avatar-size`
+- `--mod-table-avatar-size-compact`
+- `--mod-table-avatar-size-spacious`
+- `--mod-table-section-header-inline-start-spacing`
+- `--mod-table-summary-row-bottom-to-text`
+- `--mod-table-summary-row-min-height`
+- `--mod-table-summary-row-top-to-text`
+
+##### Removed Modifiers
+
+- `--mod-table-edge-to-content`
+- `--mod-table-header-row-checkbox-block-spacing`
+- `--mod-table-avatar-size-spacious`
+- `--mod-table-row-bottom-to-text--compact`
+- `--mod-table-row-bottom-to-text--spacious`
+- `--mod-table-row-top-to-text--compact`
+- `--mod-table-row-top-to-text--spacious`
+- `--mod-table-thumbnail-block-spacing`
+- `--mod-table-thumbnail-block-spacing-compact`
+- `--mod-table-thumbnail-block-spacing-spacious`
diff --git a/.changeset/polite-moments-stay.md b/.changeset/polite-moments-stay.md
new file mode 100644
index 00000000000..38fb80afbed
--- /dev/null
+++ b/.changeset/polite-moments-stay.md
@@ -0,0 +1,5 @@
+---
+"@spectrum-css/modal": patch
+---
+
+In Spectrum 2, elements that would typically be children of a modal (like dialogs, alert dialogs, and tray) have background-color token specs defined. Because modal _also_ had a defined background color, there was some antialiasing bleed-through happening on the corners, since both the modal and its child now had background colors on top of each other. `--spectrum-modal-background-color` is now redefined as `transparent` to avoid these conflicts in S2. `--mod-modal-background-color` is still available to consumers.
diff --git a/.changeset/pre.json b/.changeset/pre.json
new file mode 100644
index 00000000000..e7510b9ae31
--- /dev/null
+++ b/.changeset/pre.json
@@ -0,0 +1,184 @@
+{
+ "mode": "pre",
+ "tag": "next",
+ "initialVersions": {
+ "@spectrum-tools/gh-action-file-diff": "2.1.0",
+ "@spectrum-css/preview": "11.0.1-next.2",
+ "@spectrum-css/accordion": "7.0.1",
+ "@spectrum-css/actionbar": "10.0.1",
+ "@spectrum-css/actionbutton": "7.0.1",
+ "@spectrum-css/actiongroup": "6.0.1",
+ "@spectrum-css/actionmenu": "7.0.0",
+ "@spectrum-css/alertbanner": "3.0.1",
+ "@spectrum-css/alertdialog": "4.0.1",
+ "@spectrum-css/asset": "7.0.1",
+ "@spectrum-css/assetcard": "5.0.1",
+ "@spectrum-css/assetlist": "8.0.1",
+ "@spectrum-css/avatar": "9.0.1",
+ "@spectrum-css/badge": "6.0.1",
+ "@spectrum-css/breadcrumb": "11.0.1",
+ "@spectrum-css/button": "14.0.1",
+ "@spectrum-css/buttongroup": "9.0.1",
+ "@spectrum-css/calendar": "7.0.1",
+ "@spectrum-css/card": "11.0.1",
+ "@spectrum-css/checkbox": "10.0.1",
+ "@spectrum-css/clearbutton": "7.0.1",
+ "@spectrum-css/closebutton": "6.0.1",
+ "@spectrum-css/coachindicator": "4.0.1",
+ "@spectrum-css/coachmark": "9.0.1",
+ "@spectrum-css/colorarea": "7.0.1",
+ "@spectrum-css/colorhandle": "10.0.1",
+ "@spectrum-css/colorloupe": "7.0.1",
+ "@spectrum-css/colorslider": "8.0.1",
+ "@spectrum-css/colorwheel": "6.0.1",
+ "@spectrum-css/combobox": "4.0.1",
+ "@spectrum-css/commons": "11.0.0",
+ "@spectrum-css/contextualhelp": "5.0.1",
+ "@spectrum-css/datepicker": "4.0.1",
+ "@spectrum-css/dial": "5.0.1",
+ "@spectrum-css/dialog": "12.0.1",
+ "@spectrum-css/divider": "5.0.1",
+ "@spectrum-css/dropindicator": "7.0.1",
+ "@spectrum-css/dropzone": "8.0.1",
+ "@spectrum-css/fieldgroup": "7.0.1",
+ "@spectrum-css/fieldlabel": "10.0.1",
+ "@spectrum-css/floatingactionbutton": "4.0.1",
+ "@spectrum-css/form": "1.0.1",
+ "@spectrum-css/helptext": "7.0.1",
+ "@spectrum-css/icon": "9.0.1",
+ "@spectrum-css/illustratedmessage": "9.0.1",
+ "@spectrum-css/infieldbutton": "6.0.1",
+ "@spectrum-css/inlinealert": "10.0.1",
+ "@spectrum-css/link": "7.0.1",
+ "@spectrum-css/logicbutton": "6.0.1",
+ "@spectrum-css/menu": "9.0.1",
+ "@spectrum-css/meter": "1.0.1",
+ "@spectrum-css/miller": "8.0.1",
+ "@spectrum-css/modal": "7.0.1",
+ "@spectrum-css/opacitycheckerboard": "4.0.1",
+ "@spectrum-css/page": "9.0.1",
+ "@spectrum-css/pagination": "10.0.1",
+ "@spectrum-css/picker": "9.0.1",
+ "@spectrum-css/pickerbutton": "6.0.1",
+ "@spectrum-css/popover": "8.0.1",
+ "@spectrum-css/progressbar": "6.0.1",
+ "@spectrum-css/progresscircle": "5.0.1",
+ "@spectrum-css/radio": "10.0.1",
+ "@spectrum-css/rating": "6.0.1",
+ "@spectrum-css/search": "8.0.1",
+ "@spectrum-css/sidenav": "7.0.1",
+ "@spectrum-css/slider": "6.0.1",
+ "@spectrum-css/splitview": "7.0.1",
+ "@spectrum-css/statuslight": "9.0.1",
+ "@spectrum-css/steplist": "7.0.1",
+ "@spectrum-css/stepper": "7.0.1",
+ "@spectrum-css/swatch": "8.0.1",
+ "@spectrum-css/swatchgroup": "5.0.1",
+ "@spectrum-css/switch": "6.0.1",
+ "@spectrum-css/table": "8.0.1",
+ "@spectrum-css/tabs": "6.0.1",
+ "@spectrum-css/tag": "10.0.1",
+ "@spectrum-css/taggroup": "7.0.1",
+ "@spectrum-css/textfield": "8.0.1",
+ "@spectrum-css/thumbnail": "8.0.1",
+ "@spectrum-css/toast": "11.0.1",
+ "@spectrum-css/tooltip": "7.0.1",
+ "@spectrum-css/tray": "5.0.1",
+ "@spectrum-css/treeview": "12.0.1",
+ "@spectrum-css/typography": "8.0.1",
+ "@spectrum-css/underlay": "6.0.1",
+ "@spectrum-css/well": "7.0.1",
+ "@spectrum-tools/postcss-rgb-mapping": "1.0.0",
+ "@spectrum-tools/stylelint-no-missing-var": "2.0.1",
+ "@spectrum-tools/stylelint-no-unknown-custom-properties": "2.0.2",
+ "@spectrum-tools/stylelint-no-unused-custom-properties": "2.0.3",
+ "@spectrum-css/tokens": "16.0.0",
+ "@spectrum-css/bundle": "1.0.0",
+ "@spectrum-css/generator": "4.1.0",
+ "@spectrum-css/ui-icons": "1.1.2",
+ "@spectrum-css/infieldprogresscircle": "0.0.0"
+ },
+ "changesets": [
+ "angry-needles-behave",
+ "beige-dragons-tickle",
+ "big-beds-care",
+ "big-jars-pump",
+ "breezy-impalas-push",
+ "calm-hats-sleep",
+ "chatty-lands-attack",
+ "chilled-peaches-enjoy",
+ "chilly-peaches-sniff",
+ "clean-oranges-smell",
+ "cute-pillows-stand",
+ "deep-sloths-fetch",
+ "dirty-melons-look",
+ "eighty-terms-lead",
+ "fair-coins-buy",
+ "few-doors-smile",
+ "flat-snails-admire",
+ "fluffy-hands-appear",
+ "four-lemons-warn",
+ "fresh-crabs-deliver",
+ "fresh-seahorses-join",
+ "fresh-spoons-try",
+ "friendly-dolls-raise",
+ "giant-windows-smoke",
+ "healthy-chicken-clap",
+ "hip-shoes-listen",
+ "honest-animals-stop",
+ "hot-books-fail",
+ "itchy-kids-travel",
+ "itchy-shrimps-help",
+ "itchy-waves-work",
+ "khaki-icons-hammer",
+ "late-worms-reply",
+ "lemon-flowers-poke",
+ "lemon-weeks-work",
+ "light-years-speak",
+ "lovely-geckos-hammer",
+ "mean-eggs-learn",
+ "metal-fireants-switch",
+ "mighty-pigs-accept",
+ "modern-chairs-sit",
+ "nasty-rats-rhyme",
+ "nice-cows-shout",
+ "nine-kings-repair",
+ "old-goats-chew",
+ "olive-tools-hang",
+ "open-squids-refuse",
+ "petite-toys-greet",
+ "polite-moments-stay",
+ "proud-jokes-rule",
+ "proud-schools-reply",
+ "puny-kids-rhyme",
+ "real-jobs-flow",
+ "red-kiwis-flash",
+ "rotten-meals-share",
+ "serious-cameras-hammer",
+ "serious-clouds-jam",
+ "shaggy-schools-sing",
+ "six-donuts-march",
+ "slow-eyes-lay",
+ "small-impalas-search",
+ "smart-spoons-sneeze",
+ "spotty-bats-deny",
+ "spotty-onions-study",
+ "stale-pans-carry",
+ "strange-glasses-allow",
+ "strong-pianos-work",
+ "stupid-lemons-battle",
+ "sweet-brooms-fetch",
+ "tame-bobcats-beam",
+ "tame-knives-train",
+ "tasty-eagles-draw",
+ "thick-ears-win",
+ "tiny-candles-win",
+ "tiny-taxis-show",
+ "true-shrimps-dream",
+ "twenty-ravens-divide",
+ "twenty-tables-know",
+ "upset-roses-live",
+ "warm-loops-guess",
+ "wild-lemons-spend"
+ ]
+}
diff --git a/.changeset/proud-jokes-rule.md b/.changeset/proud-jokes-rule.md
new file mode 100644
index 00000000000..e46dac82405
--- /dev/null
+++ b/.changeset/proud-jokes-rule.md
@@ -0,0 +1,7 @@
+---
+"@spectrum-css/progressbar": major
+---
+
+#### Spectrum 2 migration
+
+Progress bar now uses Spectrum 2 tokens and specifications. This migration includes updated colors, font sizes, and spacing. No mods were harmed in the migration of this component (all `--mod` properties remain the same).
diff --git a/.changeset/proud-schools-reply.md b/.changeset/proud-schools-reply.md
new file mode 100644
index 00000000000..88c11c502ea
--- /dev/null
+++ b/.changeset/proud-schools-reply.md
@@ -0,0 +1,44 @@
+---
+"@spectrum-css/swatchgroup": major
+"@spectrum-css/swatch": major
+"@spectrum-css/tokens": minor
+---
+
+#### S2 migration for Swatch group
+
+This migrates the `swatch` and `swatchgroup` components to the latest Spectrum 2 designs. Custom properties have been remapped and added per the design specification.
+
+An `Add Swatch` variant has been added with the required color tokens and the specified add UI icon.
+
+The `Add Swatch` and `Mixed Value` variants may not be combined with background colors or images. To implement the `Add Swatch` you need to apply the `is-addSwatch` class to the `spectrum-Swatch` element. `Add swatch` keyboard focus may be applied by adding the `is-keyboardFocused` class to this combination of classes.
+
+The `spectrum-Swatch-icon` is used to set the expected color to icons contained within the swatch.
+
+The light and no border variants have been removed. Individual swatches have a border set to `--spectrum-gray-1000` at `42%` opacity, while the border opacity is set to `20%` in swatch groups.
+
+##### Removed custom properties
+
+`--spectrum-swatch-border-color`
+`--spectrum-swatch-dash-icon-color` (replaced by `--spectrum-swatch-icon-color`)
+
+##### New custom properties
+
+`--spectrum-swatch-border-color-rgb`
+`--spectrum-swatch-border-opacity`
+`--spectrum-corner-radius-full`
+`--spectrum-corner-radius-none`
+`--spectrum-swatch-disabled-icon-border-opacity`
+`--spectrum-swatch-icon-color`
+`--spectrum-swatch-rectangle-width-multiplier`
+
+##### New mods
+
+`--mod-add-button-background`
+`--mod-add-button-background-down`
+`--mod-add-button-background-hover`
+`--mod-add-button-background-keyboard-focus`
+`--mod-corner-radius-full`
+`--mod-mixed-button-background`
+`--mod-swatchgroup-border-color`
+`--mod-swatch-border-color-rgb`
+`--mod-swatch-border-opacity`
diff --git a/.changeset/public-facts-boil.md b/.changeset/public-facts-boil.md
new file mode 100644
index 00000000000..437a593971d
--- /dev/null
+++ b/.changeset/public-facts-boil.md
@@ -0,0 +1,38 @@
+---
+"@spectrum-css/taggroup": major
+---
+
+The Spectrum 2 version of Tag Group is a major change from its Spectrum 1 counterpart.
+
+Major style changes include:
+
+- Use of new tokens and custom properties for spacing tags. The method of spacing between tags has changed. Where previously tags were spaced using tokens to represent inline and block margins on each tag, tags are now spaced by tokens representing the gaps between tags.
+- Rather than being a single size, Tag group now comes in t-shirt sizes: Small, medium, and large. These sizes should determine the sizes of the embedded components, but also the spacing between tags.
+- Tag group can now accommodate a side label. To do so, it makes use of a grid layout.
+- In order to match the layout in the spec, more embedded components besides Tag have been added. Field label, Help text, and Action button (quiet) components have been added to the Storybook implementation, and styles are set for these embedded components within the tag group layout.
+
+In order to support the aforementioned spacing changes, the two mod properties for margin have been removed:
+
+- `--mod-tag-group-item-margin-block`
+- `--mod-tag-group-item-margin-inline`
+
+Instead, please customize spacing between tags with:
+
+- `--mod-tag-group-block-tag-spacing`
+- `--mod-tag-group-inline-tag-spacing`
+
+These custom properties may need to be set to be double the previous margin values in order to achieve the same spacing.
+
+To support custom spacing of the embedded components, several other new mod properties have been added:
+
+- `--mod-tag-group-block-spacing-label-to-tags`
+- `--mod-tag-group-inline-spacing-label-to-tags`
+- `--mod-tag-group-spacing-help-text-to-tags`
+
+To support the optional empty state (when there are no tags in the tag group), several passthroughs to modify the body typography text element have been added, including:
+
+- `--mod-body-cjk-line-height`
+- `--mod-body-font-size`
+- `--mod-body-line-height`
+- `--mod-body-margin-end`
+- `--mod-body-margin-start`
diff --git a/.changeset/puny-kids-rhyme.md b/.changeset/puny-kids-rhyme.md
new file mode 100644
index 00000000000..92b42d35e33
--- /dev/null
+++ b/.changeset/puny-kids-rhyme.md
@@ -0,0 +1,76 @@
+---
+"@spectrum-css/tokens": minor
+---
+
+Package update from `@adobe/spectrum-tokens@13.0.0-beta.58` to `@adobe/spectrum-tokens@13.3.0`.
+
+#### New custom properties
+
+- `--spectrum-card-background-loading-color`
+- `--spectrum-card-background-well-color`
+- `--spectrum-card-default-width-extra-small`
+- `--spectrum-card-default-width-small`
+- `--spectrum-card-default-width-medium`
+- `--spectrum-card-default-width-large`
+- `--spectrum-card-default-width-extra-large`
+- `--spectrum-card-description-to-footer`
+- `--spectrum-card-edge-to-content-default-extra-small`
+- `--spectrum-card-edge-to-content-default-small`
+- `--spectrum-card-edge-to-content-default-medium`
+- `--spectrum-card-edge-to-content-default-large`
+- `--spectrum-card-edge-to-content-default-extra-large`
+- `--spectrum-card-edge-to-content-compact-extra-small`
+- `--spectrum-card-edge-to-content-compact-small`
+- `--spectrum-card-edge-to-content-compact-medium`
+- `--spectrum-card-edge-to-content-compact-large`
+- `--spectrum-card-edge-to-content-compact-extra-large`
+- `--spectrum-card-edge-to-content-spacious-extra-small`
+- `--spectrum-card-edge-to-content-spacious-small`
+- `--spectrum-card-edge-to-content-spacious-medium`
+- `--spectrum-card-edge-to-content-spacious-large`
+- `--spectrum-card-edge-to-content-spacious-extra-large`
+- `--spectrum-card-header-to-description`
+- `--spectrum-card-minimum-width-extra-small`
+- `--spectrum-card-minimum-width-small`
+- `--spectrum-card-minimum-width-medium`
+- `--spectrum-card-minimum-width-large`
+- `--spectrum-card-minimum-width-extra-large`
+- `--spectrum-card-maximum-width-extra-small`
+- `--spectrum-card-maximum-width-small`
+- `--spectrum-card-maximum-width-medium`
+- `--spectrum-card-maximum-width-large`
+- `--spectrum-card-maximum-width-extra-large`
+- `--spectrum-card-minimum-height-extra-small`
+- `--spectrum-card-minimum-height-small`
+- `--spectrum-card-minimum-height-medium`
+- `--spectrum-card-minimum-height-large`
+- `--spectrum-card-minimum-height-extra-large`
+- `--spectrum-card-selection-background-size-small`
+- `--spectrum-card-selection-background-size-medium`
+- `--spectrum-card-selection-background-size-large`
+- `--spectrum-card-selection-background-size-extra-large`
+- `--spectrum-collection-card-minimum-height-extra-small`
+- `--spectrum-collection-card-minimum-height-small`
+- `--spectrum-collection-card-minimum-height-medium`
+- `--spectrum-collection-card-minimum-height-large`
+- `--spectrum-collection-card-minimum-height-extra-large`
+- `--spectrum-collection-card-minimum-height-hero-extra-small`
+- `--spectrum-collection-card-minimum-height-hero-small`
+- `--spectrum-collection-card-minimum-height-hero-medium`
+- `--spectrum-collection-card-minimum-height-hero-large`
+- `--spectrum-collection-card-minimum-height-hero-extra-large`
+- `--spectrum-segmented-control-item-maximum-width`
+- `--spectrum-user-card-minimum-height-small`
+- `--spectrum-user-card-minimum-height-medium`
+- `--spectrum-user-card-minimum-height-large`
+- `--spectrum-user-card-minimum-height-extra-large`
+- `--spectrum-user-card-minimum-height-title-below-small`
+- `--spectrum-user-card-minimum-height-title-below-medium`
+- `--spectrum-user-card-minimum-height-title-below-large`
+- `--spectrum-user-card-minimum-height-title-below-extra-large`
+
+#### Updated custom properties
+
+- `--spectrum-card-selection-background-color` was mapped to `var(--spectrum-gray-100)`; updated to:
+ - light: `var(--spectrum-transparent-white-600)`
+ - dark: `var(--spectrum-transparent-black-600)`
diff --git a/.changeset/real-jobs-flow.md b/.changeset/real-jobs-flow.md
new file mode 100644
index 00000000000..5e60e73c382
--- /dev/null
+++ b/.changeset/real-jobs-flow.md
@@ -0,0 +1,42 @@
+---
+"@spectrum-css/table": minor
+---
+
+### S2 table migration (continued)
+
+#### Net-new features
+
+- New sparkline SVGs available for cell content
+
+#### Description of other S2 table work
+
+A new `.spectrum-Table-headCell--alignEnd` class was created to correspond to tables that may have end-aligned numerical data so the head cell follows the text alignment correctly.
+
+Semantically, if a table should enable column sorting, the content of a column's head cell should actually be a button, since it is triggering an action. If the column header cell could trigger a menu, the content of that cell should also be a button. New markup has been included to improve the semantic design of the content of header cells, utilizing button components to signify an action can be triggered, or a menu can be triggered.
+
+In Storybook, new stories have been added to the docs page and the testing grid for Chromatic. These stories include `WithMenuButton`, `WithChartContent`. Documentation has been added for each of these stories, as well as expanded in other stories.
+
+#### Mods
+
+##### Renamed Modifiers
+
+| Old Modifier | New modifier |
+| ------------------------------ | ----------------------------------------- |
+| `--mod-table-row-active-color` | `--mod-table-row-background-color-active` |
+
+##### New Modifiers
+
+- `--mod-table-header-font-style`
+- `--mod-table-header-icons-color-active`
+- `--mod-table-header-icons-color-default`
+- `--mod-table-header-icons-color-hover`
+- `--mod-table-header-icons-color-key-focus`
+- `--mod-table-row-font-family`
+- `--mod-table-row-font-style`
+- `--mod-table-row-text-color-active`
+- `--mod-table-row-text-color-hover`
+
+##### Removed Modifiers
+
+- `--mod-table-header-background-color-quiet`
+- `--mod-table-row-background-color-quiet`
diff --git a/.changeset/red-kiwis-flash.md b/.changeset/red-kiwis-flash.md
new file mode 100644
index 00000000000..c9a914f0e7f
--- /dev/null
+++ b/.changeset/red-kiwis-flash.md
@@ -0,0 +1,32 @@
+---
+"@spectrum-css/toast": major
+---
+
+#### S2 toast migration
+
+This migrates the `toast` component to S2. Custom properties have been remapped per the design spec. Mods have been added and placeholder icons have been updated from the new workflow icons. The toast no longer supports a divider.
+
+##### Tokens
+
+| Before | After |
+| ---------------------------- | ---------------------------- |
+| --spectrum-corner-radius-100 | --spectrum-corner-radius-800 |
+
+##### Mods
+
+The following mods have been added.
+
+`--mod-toast-font-family`
+`--mod-toast-font-style`
+`--mod-toast-icon-block-size`
+`--mod-toast-spacing-action-button-to-close`
+`--mod-toast-spacing-bottom-edge-to-close-button`
+`--mod-toast-spacing-close-button-to-edge`
+`--mod-toast-spacing-text-to-close-button`
+`--mod-toast-spacing-top-edge-to-close-button`
+
+##### Passthroughs
+
+The following passthrough has been added.
+
+`--mod-closebutton-icon-color-default`
diff --git a/.changeset/ripe-symbols-wear.md b/.changeset/ripe-symbols-wear.md
new file mode 100644
index 00000000000..ec8119cbde2
--- /dev/null
+++ b/.changeset/ripe-symbols-wear.md
@@ -0,0 +1,5 @@
+---
+"@spectrum-css/popover": patch
+---
+
+Defines the missing `--spectrum-popover-border-width` custom property. The variable was already being used in our style definitions, but its value was lost at some point so it was undefined in the browser. This work should correct that.
diff --git a/.changeset/rotten-meals-share.md b/.changeset/rotten-meals-share.md
new file mode 100644
index 00000000000..0b425e6a0d5
--- /dev/null
+++ b/.changeset/rotten-meals-share.md
@@ -0,0 +1,17 @@
+---
+"@spectrum-css/popover": major
+---
+
+#### S2 Popover Migration
+
+The S2 popover using new tokens for border color, padding, corner radius and elevation/drop shadows.
+
+Renamed Mods
+
+| Old mod | New mod |
+| --------------------------------------------- | ------------------------------------ |
+| `--mod-popover-shadow-blur` | `--mod-popover-drop-shadow-blur` |
+| `--mod-popover-shadow-color` | `--mod-popover-drop-shadow-color` |
+| `--mod-popover-shadow-horizontal` | `--mod-popover-drop-shadow-x` |
+| `--mod-popover-shadow-vertical` | `--mod-popover-drop-shadow-y` |
+| `--mod-popover-content-area-spacing-vertical` | `--mod-popover-content-area-spacing` |
diff --git a/.changeset/serious-cameras-hammer.md b/.changeset/serious-cameras-hammer.md
new file mode 100644
index 00000000000..29af1134593
--- /dev/null
+++ b/.changeset/serious-cameras-hammer.md
@@ -0,0 +1,26 @@
+---
+"@spectrum-css/badge": major
+---
+
+This migrates the base Badge component to S2 designs, but does not include the "Notification" or "Highlight" types.
+
+- New semantic color: "notice"
+- Updated/expanded non-semantic colors
+ - **New colors**:
+ - pink
+ - turquoise
+ - brown
+ - cinnamon
+ - silver
+- New "styles" to be used alongside a color choice, such as `spectrum-Badge--accent spectrum-Badge--style-subtle`
+ - subtle (lighter version of bg color)
+ - outline (border color, only semantic colors)
+- Updated border-radius per size
+- Updated border-width
+ - updated related padding/margin definitions to account for border-width
+
+## New mods
+
+New mods added for each new color, as well as for the style-related application of each valid color, ex. `--mod-badge-subtle-background-color-accent` and `--mod-badge-outline-border-color-informative`. See the full [diff of updates](https://github.com/adobe/spectrum-css/pull/3740/files#diff-d1bfd5593c10aaa98222e6c01ca001131fcde194e824b096673ab02a9ef3874f).
+
+Also added for the default `--mod-badge-border-color` and `--mod-badge-border-width`
diff --git a/.changeset/serious-clouds-jam.md b/.changeset/serious-clouds-jam.md
new file mode 100644
index 00000000000..27a3928b0f8
--- /dev/null
+++ b/.changeset/serious-clouds-jam.md
@@ -0,0 +1,11 @@
+---
+"@spectrum-css/colorslider": minor
+---
+
+#### S2 colorslider migration
+
+This migrates the `colorslider` component to S2. Custom properties have been remapped per the design spec.
+
+| Before | After |
+| ------------------------- | -------------------------- |
+| `--spectrum-gray-900-rgb` | `--spectrum-gray-1000-rgb` |
diff --git a/.changeset/shaggy-schools-sing.md b/.changeset/shaggy-schools-sing.md
new file mode 100644
index 00000000000..53ca1f1e1c2
--- /dev/null
+++ b/.changeset/shaggy-schools-sing.md
@@ -0,0 +1,13 @@
+---
+"@spectrum-css/search": major
+---
+
+#### Spectrum 2 migration
+
+Search now uses Spectrum 2 tokens and specifications. The following items have been adjusted:
+
+- Quiet variant has been deprecated and code removed (including removal of the custom property `--mod-search-quiet-button-offset`).
+- Updates to colors, corner rounding, and spacing.
+- Custom property mod adjustments:
+ - Added `--mod-search-top-to-icon`.
+ - Removed `--mod-workflow-icon-size-100`.
diff --git a/.changeset/six-donuts-march.md b/.changeset/six-donuts-march.md
new file mode 100644
index 00000000000..6d79d9ad921
--- /dev/null
+++ b/.changeset/six-donuts-march.md
@@ -0,0 +1,36 @@
+---
+"@spectrum-css/checkbox": major
+---
+
+#### Spectrum 2 migration
+
+Checkbox's control and color tokens have been updated by the latest S2 tokens:
+
+##### Updates
+
+- Checkbox has a background color token: `--spectrum-checkbox-background-color`
+- New typography additions: line-height, font-weight, and font style
+- `spectrum-Checkbox--sizeM` is now the default style settings of the component.
+- Fixed typo in `--mod-focus-indicator-thickness`
+- Removed interactive state selectors in `--emphasized` variant that was overriding other variants
+- Refactored WHCM settings for read-only and disabled states
+- `--mod-checkbox-spacing` has been renamed to `--mod-checkbox-margin-block`
+
+##### New tokens
+
+`--spectrum-component-size-width-ratio-down`
+`--spectrum-checkbox-bottom-to-text`
+`--spectrum-checkbox-top-to-control`
+`--spectrum-accent-content-color-default`
+`--spectrum-accent-content-color-hover`
+`--spectrum-accent-content-color-down`
+`--spectrum-accent-content-color-key-focus`
+
+##### Modified tokens
+
+`--spectrum-checkbox-checkmark-color`
+`--spectrum-checkbox-invalid-color-down`
+`--spectrum-checkbox-control-color-default`
+`--spectrum-checkbox-control-color-hover`
+`--spectrum-checkbox-control-color-down`
+`--spectrum-checkbox-control-color-focus`
diff --git a/.changeset/slow-eyes-lay.md b/.changeset/slow-eyes-lay.md
new file mode 100644
index 00000000000..584493934bf
--- /dev/null
+++ b/.changeset/slow-eyes-lay.md
@@ -0,0 +1,38 @@
+---
+"@spectrum-css/divider": major
+---
+
+#### Spectrum 2 migration
+
+This migrates the `divider` component to S2. Custom properties have been remapped and updated per the design spec.
+
+##### New properties
+
+```css
+--spectrum-divider-horizontal-minimum-width
+--spectrum-divider-vertical-minimum-height
+```
+
+##### New mods
+
+```css
+--mod-divider-inline-minimum-size
+--mod-divider-block-minimum-size
+```
+
+##### Removed mods
+
+```css
+--mod-divider-background-color-large-static-black
+--mod-divider-background-color-large-static-white
+--mod-divider-background-color-medium-static-black
+--mod-divider-background-color-medium-static-white
+--mod-divider-background-color-small-static-black
+--mod-divider-background-color-small-static-white
+```
+
+##### Additions
+
+This adds new minimum width and height tokens for the divider and the `minDimensionValues` arg has been removed in favor of these tokens and the rules with which they're applied.
+
+The default size for the Storybook control has been changed to `medium` (the new default size for the component). All sizes are now displayed for the static color variants in the docs.
diff --git a/.changeset/small-impalas-search.md b/.changeset/small-impalas-search.md
new file mode 100644
index 00000000000..53317c408e0
--- /dev/null
+++ b/.changeset/small-impalas-search.md
@@ -0,0 +1,10 @@
+---
+"@spectrum-css/statuslight": patch
+---
+
+Removes references to the accent variant, since the accent status light was deprecated in S2.
+
+Removed variant:
+
+`.spectrum-StatusLight--accent`
+`--spectrum-statuslight-semantic-accent-color`
diff --git a/.changeset/smart-spoons-sneeze.md b/.changeset/smart-spoons-sneeze.md
new file mode 100644
index 00000000000..0f5c77fc207
--- /dev/null
+++ b/.changeset/smart-spoons-sneeze.md
@@ -0,0 +1,15 @@
+---
+"@spectrum-css/button": patch
+---
+
+### S2 button fixes
+
+This work addresses some regressions noticed in the migrated S2 button. Mainly, the borders were gray where they were not supposed to be. Most of the changes are to ensure that the correct S2 tokens are being used appropriately in the styles and button follows the S2 design specs.
+
+Additionally, there was some missing style support for the `.spectrum-Button--noWrap` option, so this work reimplements a "no wrapping" option for button components, and removes some of the repetitiveness in the no wrap test cases and story.
+
+PRs used as reference:
+
+- [S2 button migration](https://github.com/adobe/spectrum-css/pull/2600)
+- [Add text wrapping option](https://github.com/adobe/spectrum-css/pull/3086)
+- [PostCSS plugin updates/fixes](https://github.com/adobe/spectrum-css/pull/3502)
diff --git a/.changeset/sour-donuts-go.md b/.changeset/sour-donuts-go.md
new file mode 100644
index 00000000000..fd1a3362efd
--- /dev/null
+++ b/.changeset/sour-donuts-go.md
@@ -0,0 +1,28 @@
+---
+"@spectrum-css/meter": major
+"@spectrum-css/progressbar": major
+---
+
+### S2 meter migration with base progress bar updates
+
+This migration updates the meter component and the progress bar component. Both needed the track to have a full corner radius to make the rounded look. The progress bar's HTML template now includes the help text component but it is only used in the meter. Also includes a bug fix for progress bar in order to better support the side label variant.
+
+#### New updates
+
+- Includes `--sizeM` and `--sizeXL` (using progress bar's sizes)
+- Includes help text component for more context
+- Shares progress bar's field label typography
+- Added help text visual test
+- Added static black variant
+
+Since the progress bar and meter are now using the same tokens for track thickness in size variants, font size, and spacing, the following mods have been removed from meter but are still able to be used in progress bar:
+
+- `--mod-progressbar-thickness`
+- `--mod-progressbar-font-size`
+- `--mod-progressbar-spacing-top-to-text`
+
+These mods can continue to be used as before.
+
+#### New mods
+
+- `--mod-meter-help-text-to-progress-bar`
diff --git a/.changeset/spotty-bats-deny.md b/.changeset/spotty-bats-deny.md
new file mode 100644
index 00000000000..b77d1682b85
--- /dev/null
+++ b/.changeset/spotty-bats-deny.md
@@ -0,0 +1,42 @@
+---
+"@spectrum-css/card": major
+---
+
+Previously:
+
+```css
+.spectrum-Card.is-selected::before {
+ background-color: rgba(
+ var(
+ --mod-card-selected-background-color-rgb,
+ var(--spectrum-card-selected-background-color-rgb)
+ ),
+ var(--spectrum-card-selected-background-opacity)
+ );
+}
+```
+
+Styles now use `--spectrum-card-selection-background-color` which maps to a transparent global property of `--spectrum-transparent-(black|white)-600` depending on color context.
+
+Updated:
+
+```css
+.spectrum-Card.is-selected::before {
+ background-color: var(
+ --mod-card-background-color-selected,
+ var(--spectrum-card-selection-background-color)
+ );
+}
+```
+
+#### Removed variants
+
+Removed the quiet variant which is no longer supported in Spectrum 2.
+
+#### Removed/replaced properties
+
+- `--mod-card-selected-background-color-rgb`. Use `--mod-card-background-color-selected` to override the selected background color.
+- `--mod-card-content-margin-top-quiet`. Use `--mod-card-content-margin-top` with appropriate selectors to override.
+- `--mod-card-minimum-width-quiet`. Use `--mod-card-minimum-width` with appropriate selectors to override.
+- `--mod-card-actions-background-color-rgb`. No replacement, using token value `--spectrum-card-selection-background-color` directly.
+- `--mod-card-actions-background-color-opacity`. No replacement, using token value `--spectrum-card-selection-background-color` directly.
diff --git a/.changeset/spotty-onions-study.md b/.changeset/spotty-onions-study.md
new file mode 100644
index 00000000000..748417e1c22
--- /dev/null
+++ b/.changeset/spotty-onions-study.md
@@ -0,0 +1,7 @@
+---
+"@spectrum-css/colorarea": major
+---
+
+#### Spectrum 2 migration
+
+This change migrates the `colorarea` component to S2. It leverages updated tokens and the `rgba(...)` color function, replacing the existing `TODO` and hardcoded values.
diff --git a/.changeset/stale-pans-carry.md b/.changeset/stale-pans-carry.md
new file mode 100644
index 00000000000..8693f140857
--- /dev/null
+++ b/.changeset/stale-pans-carry.md
@@ -0,0 +1,12 @@
+---
+"@spectrum-css/tooltip": minor
+---
+
+#### S2: restore negative and informative semantic variants
+
+This restores the negative and informative tooltip semantic variant styles, story controls and test cases. Icons have been removed for all variants as they are not present in the specifications provided by design.
+
+##### Restored mods
+
+`--mod-tooltip-background-color-informative`
+`--mod-tooltip-background-color-negative"`
diff --git a/.changeset/strange-glasses-allow.md b/.changeset/strange-glasses-allow.md
new file mode 100644
index 00000000000..3d89c6a85a4
--- /dev/null
+++ b/.changeset/strange-glasses-allow.md
@@ -0,0 +1,7 @@
+---
+"@spectrum-css/colorloupe": major
+---
+
+#### Spectrum 2 migration
+
+Migrates color loupe to Spectrum 2 tokens. Color loupe now uses the new drop shadow tokens `--spectrum-drop-shadow-elevated-x`, `--spectrum-drop-shadow-elevated-y`, `--spectrum-drop-shadow-elevated-blur`, and `--spectrum-drop-shadow-elevated-color` rather than specific color loupe tokens.
diff --git a/.changeset/strong-pianos-work.md b/.changeset/strong-pianos-work.md
new file mode 100644
index 00000000000..20e62c598ed
--- /dev/null
+++ b/.changeset/strong-pianos-work.md
@@ -0,0 +1,33 @@
+---
+"@spectrum-css/menu": major
+---
+
+### Spectrum 2 migration
+
+Menu now uses Spectrum 2 tokens and specifications.
+
+Removes custom menu item background color tokens: `@adobe/spectrum-tokens` has been updated to include many tokens relating to the menu component, including some that replace custom tokens that had previously been added. As such, these custom menu item color tokens that are now available from `@adobe/spectrum-tokens` have been removed.
+
+In addition to other small token and minor style changes, there were several new features that were added to this version of menu, including:
+
+- A thumbnail can now be used in place of an icon
+- A section description can now be included below the menu section heading
+- The actions area previously held action switches for multi-select, and in this version, an external link action icon can be included in that area
+
+### New mods
+
+- `--mod-menu-item-corner-radius`
+- `--mod-menu-item-linkout-icon-height`
+- `--mod-menu-item-linkout-icon-width`
+- `--mod-menu-item-thumbnail-height`
+- `--mod-menu-item-thumbnail-opacity-disabled`
+- `--mod-menu-item-thumbnail-to-label`
+- `--mod-menu-item-thumbnail-width`
+- `--mod-menu-item-top-to-thumbnail`
+- `--mod-menu-item-top-to-workflow-icon`
+- `--mod-menu-section-description-color`
+- `--mod-menu-section-description-font-size`
+- `--mod-menu-section-description-font-weight`
+- `--mod-menu-section-description-line-height`
+- `--mod-menu-section-description-line-height-cjk`
+- `--mod-menu-section-header-to-description`
diff --git a/.changeset/stupid-lemons-battle.md b/.changeset/stupid-lemons-battle.md
new file mode 100644
index 00000000000..0173b1791a4
--- /dev/null
+++ b/.changeset/stupid-lemons-battle.md
@@ -0,0 +1,89 @@
+---
+"@spectrum-css/tokens": minor
+---
+
+### @adobe/spectrum-tokens@13.7.0
+
+#### Minor Changes
+
+[#499 0c1a81b](https://github.com/adobe/spectrum-css/pull/499) Thanks [@larz0](https://github.com/larz0)!
+
+Added new accodion tokens
+
+Added (19)
+
+- `accordion-edge-to-content-area-small`
+- `accordion-edge-to-content-area-medium`
+- `accordion-edge-to-content-area-large`
+- `accordion-edge-to-content-area-extra-large`
+- `single-calendar-popover-minimum-width`
+- `single-calendar-popover-minimum-height`
+- `double-calendar-popover-minimum-width`
+- `double-calendar-popover-minimum-height`
+- `triple-calendar-popover-minimum-width`
+- `triple-calendar-popover-minimum-height`
+- `date-field-minimum-width`
+- `date-field-text-to-visual`
+- `time-field-minimum-width`
+- `time-field-text-to-visual`
+- `date-picker-visual-to-field-button`
+- `date-picker-text-to-visual`
+- `date-picker-minimum-width`
+- `segmented-text-field-gap`
+- `segmented-text-field-rounding`
+
+
+
+### @adobe/spectrum-tokens@13.6.0
+
+#### Minor Changes
+
+[#497 fc0682e](https://github.com/adobe/spectrum-css/pull/497) Thanks [@larz0](https://github.com/larz0)!
+
+Added horizontal card tokens.
+
+Added (3)
+
+- `card-horizontal-edge-to-content-compact`
+- `card-horizontal-edge-to-content-default`
+- `card-horizontal-edge-to-content-spacious`
+
+
+
+### @adobe/spectrum-tokens@13.5.0
+
+#### Minor Changes
+
+[#494 f569623](https://github.com/adobe/spectrum-css/pull/494) Thanks [@larz0](https://github.com/larz0)!
+
+Added vf-related-line-height tokens for desktop and mobile. These tokens are required for the upcoming composite typography tokens.
+
+
+Newly Deprecated (1)
+
+- `drop-zone-content-maximum-width`
+
+
+
+Added (18)
+
+- `line-height-font-size-25`
+- `line-height-font-size-50`
+- `line-height-font-size-75`
+- `line-height-font-size-100`
+- `line-height-font-size-200`
+- `line-height-font-size-300`
+- `line-height-font-size-400`
+- `line-height-font-size-500`
+- `line-height-font-size-600`
+- `line-height-font-size-700`
+- `line-height-font-size-800`
+- `line-height-font-size-900`
+- `line-height-font-size-1000`
+- `line-height-font-size-1100`
+- `line-height-font-size-1200`
+- `line-height-font-size-1300`
+- `line-height-font-size-1400`
+- `line-height-font-size-1500`
+
+
diff --git a/.changeset/sweet-brooms-fetch.md b/.changeset/sweet-brooms-fetch.md
new file mode 100644
index 00000000000..23d212be9a5
--- /dev/null
+++ b/.changeset/sweet-brooms-fetch.md
@@ -0,0 +1,417 @@
+---
+"@spectrum-css/tokens": minor
+---
+
+### Tokens changed
+
+
Updated from @adobe/spectrum-tokens@13.7.0 to @adobe/spectrum-tokens@13.10.0.
+
+
This update introduces new tokens for accordion, field disclosure icons, icon sizes (add, drag handle, gripper, link out), and tag field dimensions, along with stack item and list view global properties.
+
+
Note that deprecated tokens are still available but will be removed in a future release. Please migrate to new tokens as appropriate.
+
diff --git a/.changeset/tame-bobcats-beam.md b/.changeset/tame-bobcats-beam.md
new file mode 100644
index 00000000000..a45cb615339
--- /dev/null
+++ b/.changeset/tame-bobcats-beam.md
@@ -0,0 +1,19 @@
+---
+"@spectrum-css/alertbanner": major
+---
+
+#### Spectrum 2 migration
+
+Alert banner now uses Spectrum 2 tokens and specifications. In this new design, the divider has been removed.
+
+The following changes have been made to the mod custom properties:
+
+- `--mod-alert-banner-size` was renamed to `--mod-alert-banner-inline-size`
+- `--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.
+- `--mod-alert-banner-top-text` was renamed to `--mod-alert-banner-top-to-text`
+- `--mod-alert-banner-top-icon` was renamed to `--mod-alert-banner-top-to-icon`
+- `--mod-alert-banner-bottom-text` was renamed to `--mod-alert-banner-bottom-to-text`
+- `--mod-alert-banner-start-edge` was renamed to `--mod-alert-banner-inline-start-to-content`
+- `--mod-alert-banner-edge-to-button` was renamed to `--mod-alert-banner-block-edge-to-button`
+- 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.
+- 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.
diff --git a/.changeset/tame-knives-train.md b/.changeset/tame-knives-train.md
new file mode 100644
index 00000000000..2c774a96d25
--- /dev/null
+++ b/.changeset/tame-knives-train.md
@@ -0,0 +1,5 @@
+---
+"@spectrum-css/icon": major
+---
+
+Updates the icon component to use the new Spectrum 2 icon sets. The `.spectrum-UIIcon--medium` and `.spectrum-UIIcon--large` classes have been removed, as UI icons are now delivered with a single SVG. The color property also now makes use of the `--iconPrimary` custom property that is defined in some of the SVG files. Storybook has been updated to use and load the new SVGs, whose name format and directories have changed.
diff --git a/.changeset/tasty-eagles-draw.md b/.changeset/tasty-eagles-draw.md
new file mode 100644
index 00000000000..e8ab14b3d38
--- /dev/null
+++ b/.changeset/tasty-eagles-draw.md
@@ -0,0 +1,31 @@
+---
+"@spectrum-css/link": major
+---
+
+#### Spectrum 2 migration
+
+The link component is updated with S2 specifications, colors, and typography. There is a new inline variant which uses the `.spectrum-Link--inline` modifier class and the default is the standalone variant.
+
+##### Note
+
+- Quiet styling does not apply to the inline variant so that it is distinguishable from the surrounding text and the underline indicator is clear
+- `--mod-spectrum-link-font-weight` can be used to adjust inline variant to match surrounding text. Apply font weights to this mod `inherit` does not apply.
+
+#### New tokens
+
+##### Color
+
+`spectrum-link-focus-indicator-color`
+`spectrum-link-focus-indicator-thickness`
+`spectrum-link-focus-indicator-gap`
+`spectrum-link-corner-radius`
+
+##### Typography
+
+`spectrum-link-line-height`
+`spectrum-link-line-height-cjk-100`
+`spectrum-link-font-size`
+`spectrum-link-font-style`
+`spectrum-link-font-weight`
+`spectrum-link-text-underline-thickness`
+`spectrum-link-text-underline-gap`
diff --git a/.changeset/thick-ears-win.md b/.changeset/thick-ears-win.md
new file mode 100644
index 00000000000..6ed63c2d287
--- /dev/null
+++ b/.changeset/thick-ears-win.md
@@ -0,0 +1,15 @@
+---
+"@spectrum-css/colorhandle": minor
+"@spectrum-css/colorslider": minor
+"@spectrum-css/colorarea": minor
+"@spectrum-css/colorwheel": minor
+"@spectrum-css/slider": minor
+---
+
+#### Including the touch action rule for draggable content
+
+The slider, color slider, color area, color wheel, color handle all deserve to have their touch-action property managed so that trying to set the value of those interfaces doesn't cause page scrolling in touch context.
+
+Adding `touch-action: none` to a slider or any draggable component is necessary to prevent the browser's default touch behaviors—such as scrolling, pinch-zooming, or double-tap zooming from interfering with the component's intended interaction.
+
+These components also include `user-select: none` to prevent selection or highlighting of any text elements.
diff --git a/.changeset/tiny-candles-win.md b/.changeset/tiny-candles-win.md
new file mode 100644
index 00000000000..dbed7db2f34
--- /dev/null
+++ b/.changeset/tiny-candles-win.md
@@ -0,0 +1,5 @@
+---
+"@spectrum-css/icon": minor
+---
+
+Updates the icon component to use size tokens for newly added ui icons.
diff --git a/.changeset/tiny-taxis-show.md b/.changeset/tiny-taxis-show.md
new file mode 100644
index 00000000000..d3c02ead3d6
--- /dev/null
+++ b/.changeset/tiny-taxis-show.md
@@ -0,0 +1,15 @@
+---
+"@spectrum-css/tokens": patch
+---
+
+Updated from [@adobe/spectrum-tokens](https://github.com/adobe/spectrum-tokens) v13.10.0 -> [13.10.1](https://github.com/adobe/spectrum-tokens/releases/tag/%40adobe/spectrum-tokens%4013.10.1).
+
+- [#517](https://github.com/adobe/spectrum-tokens/pull/517) [`8f8f8a6`](https://github.com/adobe/spectrum-tokens/commit/8f8f8a60b7adf5105ced4f914cf30928117ddc5e) Thanks [@larz0](https://github.com/larz0)!
+
+#### Updated tokens
+
+- `accordion-focus-indicator-gap`
+ - value: `0px` -> `2px`
+- `accordion-top-to-text-medium`
+ - desktop.value: `12px` -> `9px`
+ - mobile.value: `16px` -> `10px`
diff --git a/.changeset/true-shrimps-dream.md b/.changeset/true-shrimps-dream.md
new file mode 100644
index 00000000000..40dff0a8945
--- /dev/null
+++ b/.changeset/true-shrimps-dream.md
@@ -0,0 +1,34 @@
+---
+"@spectrum-css/infieldbutton": major
+---
+
+#### Spectrum 2 migration
+
+In-field buttons are used to represent actions within input fields. They're currently used inside number field. This component has updated colors, corner radius, and icons compared to the Spectrum 1 version. The "Error" and "Key-focus" variants have been removed, since this now utilizes those states from the parent component.
+
+The position styles and controls have also been removed now that there's a consistent corner radius.
+
+##### Removed mods
+
+Due to deprecation of the position variants in the infield button, some spacing and border radius mods have been removed.
+
+`--mod-infield-button-inner-edge-to-fill`
+`--mod-infield-button-stacked-border-radius-reset`
+`--mod-infield-button-stacked-bottom-border-block-end-width`
+`--mod-infield-button-stacked-bottom-border-radius-end-end`
+`--mod-infield-button-stacked-bottom-border-radius-end-start`
+`--mod-infield-button-stacked-fill-padding-inline`
+`--mod-infield-button-stacked-fill-padding-inner`
+
+##### New tokens
+
+These new tokens are the inline variant & stepper (number field) use case. The padding changes here.
+
+`--spectrum-in-field-button-side-edge-to-fill-small`
+`--spectrum-in-field-button-side-edge-to-fill-medium`
+`--spectrum-in-field-button-side-edge-to-fill-large`
+`--spectrum-in-field-button-side-edge-to-fill-extra-large`
+`--spectrum-field-edge-to-icon-75`
+`--spectrum-field-edge-to-icon-100`
+`--spectrum-field-edge-to-icon-200`
+`--spectrum-field-edge-to-icon-300`
diff --git a/.changeset/twenty-ravens-divide.md b/.changeset/twenty-ravens-divide.md
new file mode 100644
index 00000000000..01f7271a5fe
--- /dev/null
+++ b/.changeset/twenty-ravens-divide.md
@@ -0,0 +1,8 @@
+---
+"@spectrum-css/coachmark": minor
+---
+
+CSS references to popover custom properties/tokens were updated to reflect some mod name changes in the S2 popover (#3365). The corner radius token was updated to correspond to the new S2 popover corner radius, as well as some updated popover mod names:
+
+- `--mod-popover-content-area-spacing-vertical` was updated to `--mod-popover-content-area-spacing`.
+- `--spectrum-border-width-100` was updated to `--spectrum-corner-radius-large-default`
diff --git a/.changeset/twenty-tables-know.md b/.changeset/twenty-tables-know.md
new file mode 100644
index 00000000000..ddb0511a1ad
--- /dev/null
+++ b/.changeset/twenty-tables-know.md
@@ -0,0 +1,10 @@
+---
+"@spectrum-css/opacitycheckerboard": major
+"@spectrum-css/thumbnail": minor
+---
+
+#### S2 thumbnail migration
+
+Adds thumbnail specific `thumbnail-opacity-checkerboard-square-size` token aliased to `--spectrum-opacity-checkerboard-size`. This impacts the display of the `opacity-checkerboard` when used within the `thumbnail` component.
+
+This also corrects an issue with a token name in the `thumbnail` component by renaming `--spectrum-thumbnail-border-color-opacity` to `--spectrum-thumbnail-border-opacity`.
diff --git a/.changeset/upset-roses-live.md b/.changeset/upset-roses-live.md
new file mode 100644
index 00000000000..6e812c7515c
--- /dev/null
+++ b/.changeset/upset-roses-live.md
@@ -0,0 +1,90 @@
+---
+"@spectrum-css/ui-icons": minor
+---
+
+Makes updates to the initial S2 icons update to include some additional icons with names as follows:
+
+| Icon name |
+| ----------------- |
+| Add50 |
+| Add75 |
+| Add100 |
+| Add200 |
+| Add300 |
+| DragHandle75 |
+| DragHandle100 |
+| DragHandle200 |
+| DragHandle300 |
+| Gripper100 |
+| LinkOut100 |
+| LinkOut200 |
+| LinkOut300 |
+| LinkOut400 |
+
+Such that the full set of changes for Spectrum 2 is as follows:
+
+| Icon name | Migration notes |
+| ----------------- | --------------- |
+| Add50 | **New** |
+| Add75 | **New** |
+| Add100 | **New** |
+| Add200 | **New** |
+| Add300 | **New** |
+| Arrow75 | Deprecated |
+| Arrow100 | - |
+| Arrow200 | Deprecated |
+| Arrow300 | Deprecated |
+| Arrow400 | - |
+| Arrow500 | Deprecated |
+| Arrow600 | Deprecated |
+| Asterisk75 | Deprecated |
+| Asterisk100 | - |
+| Asterisk200 | - |
+| Asterisk300 | - |
+| Checkmark50 | - |
+| Checkmark75 | - |
+| Checkmark100 | - |
+| Checkmark200 | - |
+| Checkmark300 | - |
+| Checkmark400 | - |
+| Checkmark500 | Deprecated |
+| Checkmark600 | Deprecated |
+| Chevron50 | - |
+| Chevron75 | - |
+| Chevron100 | - |
+| Chevron200 | - |
+| Chevron300 | - |
+| Chevron400 | - |
+| Chevron500 | Deprecated |
+| Chevron600 | Deprecated |
+| CornerTriangle75 | - |
+| CornerTriangle100 | - |
+| CornerTriangle200 | - |
+| CornerTriangle300 | - |
+| Cross75 | - |
+| Cross100 | - |
+| Cross200 | - |
+| Cross300 | - |
+| Cross400 | - |
+| Cross500 | - |
+| Cross600 | - |
+| Dash50 | - |
+| Dash75 | - |
+| Dash100 | - |
+| Dash200 | - |
+| Dash300 | - |
+| Dash400 | Deprecated |
+| Dash500 | Deprecated |
+| Dash600 | Deprecated |
+| DragHandle75 | **New** |
+| DragHandle100 | **New** |
+| DragHandle200 | **New** |
+| DragHandle300 | **New** |
+| Gripper100 | **New** |
+| SingleGripper | Deprecated |
+| DoubleGripper | Deprecated |
+| TripleGripper | Deprecated |
+| LinkOut100 | **New** |
+| LinkOut200 | **New** |
+| LinkOut300 | **New** |
+| LinkOut400 | **New** |
diff --git a/.changeset/warm-loops-guess.md b/.changeset/warm-loops-guess.md
new file mode 100644
index 00000000000..80e75cc9e1f
--- /dev/null
+++ b/.changeset/warm-loops-guess.md
@@ -0,0 +1,12 @@
+---
+"@spectrum-css/picker": patch
+---
+
+### S2 picker fixes
+
+This work addresses some regressions noticed in the migrated S2 picker component. Mainly, S2 border colors were fixed (most of them are transparent, including disabled).
+
+PRs used as reference:
+
+- [Picker docs to storybook migration](https://github.com/adobe/spectrum-css/pull/3200)
+- [S2 picker migration](https://github.com/adobe/spectrum-css/pull/2697)
diff --git a/.changeset/wild-lemons-spend.md b/.changeset/wild-lemons-spend.md
new file mode 100644
index 00000000000..438e874c219
--- /dev/null
+++ b/.changeset/wild-lemons-spend.md
@@ -0,0 +1,26 @@
+---
+"@spectrum-css/helptext": major
+---
+
+#### Spectrum 2 migration
+
+The help text S2 component has some updated spacing and typography tokens. The error message validation icon has also been updated.
+
+##### New mods
+
+`--mod-helptext-font-family`
+`--mod-helptext-font-style`
+`--mod-helptext-font-weight`
+`--mod-helptext-top-edge-to-workflow-icon`
+`--mod-helptext-bottom-edge-to-workflow-icon`
+
+##### Renamed mods
+
+`--mod-helptext-bottom-to-workflow-icon` >> `--mod-helptext-edge-to-workflow-icon`
+
+##### Deprecated tokens
+
+`--spectrum-help-text-top-to-workflow-icon-small`
+`--spectrum-help-text-top-to-workflow-icon-medium`
+`--spectrum-help-text-top-to-workflow-icon-large`
+`--spectrum-help-text-top-to-workflow-icon-extra-large`
diff --git a/.env.example b/.env.example
index 040d2780a41..1834f01232a 100644
--- a/.env.example
+++ b/.env.example
@@ -19,3 +19,6 @@ WATCH_MODE=true
NX_VERBOSE_LOGGING=false
NX_SKIP_NX_CACHE=false
NX_PERF_LOGGING=false
+
+ARTIFACTORY_API_KEY=
+ARTIFACTORY_API_TOKEN=
diff --git a/.github/QUICK-START.md b/.github/QUICK-START.md
index 963eb0580fb..4b97fcab7e8 100644
--- a/.github/QUICK-START.md
+++ b/.github/QUICK-START.md
@@ -3,6 +3,7 @@
This guide will show you how to quickly install Spectrum CSS and use it to display the Button component.
## Install using Node/yarn
+
Install the components you want along with their dependencies. Here's an example:
```shell
@@ -12,26 +13,34 @@ yarn add -DW @spectrum-css/tokens @spectrum-css/typography @spectrum-css/page @s
Spectrum CSS components utilize custom properties in order to change themes and scales. For these to apply, a couple of classes need to be added to the document’s `` tag based on the [visual language](https://github.com/adobe/spectrum-css?tab=readme-ov-file#visual-language), [scale](https://github.com/adobe/spectrum-css?tab=readme-ov-file#scales), and [theme](https://github.com/adobe/spectrum-css?tab=readme-ov-file#themes-colorstops) you wish to use. For example, the following code snippet will display styling for the default Spectrum visual language using medium scale and light color theme:
```html
-
+
```
-Use the `index.css` files in your project to include component and global styles ([Spectrum and Express contexts](https://github.com/adobe/spectrum-css?tab=readme-ov-file#visual-language), [background theme/colorstop](https://github.com/adobe/spectrum-css?tab=readme-ov-file#themes-colorstops), [platform scaling](https://github.com/adobe/spectrum-css?tab=readme-ov-file#scales), etc.) for the component. If you don't need all of the global styles, peek at the docs for [including assets](https://github.com/adobe/spectrum-css?tab=readme-ov-file#including-assets)). Use this file by including the stylesheet (plus stylesheets for dependencies) in the `` tag:
+Use the `index.css` files in your project to include component and global styles ([background theme/colorstop](https://github.com/adobe/spectrum-css?tab=readme-ov-file#themes-colorstops), [platform scaling](https://github.com/adobe/spectrum-css?tab=readme-ov-file#scales), etc.) for the component. If you don't need all of the global styles, peek at the docs for [including assets](https://github.com/adobe/spectrum-css?tab=readme-ov-file#including-assets)). Use this file by including the stylesheet (plus stylesheets for dependencies) in the `` tag:
```html
-
-
+
+
-
-
+
+
```
Inside the `` tag, add the markup for your component (Spectrum button in our example). The example also includes the CSS class names `spectrum-Button--fill` and `spectrum-Button--accent`, to use the accent variant:
```html
-
-
+
({ ...a, [c]: true }), {}),
})}"
id=${ifDefined(id)}
diff --git a/components/accordion/themes/express.css b/components/accordion/themes/express.css
deleted file mode 100644
index 9fd550418f2..00000000000
--- a/components/accordion/themes/express.css
+++ /dev/null
@@ -1,16 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--express */
-
-@import "./spectrum.css";
diff --git a/components/accordion/themes/spectrum-two.css b/components/accordion/themes/spectrum-two.css
deleted file mode 100644
index 7097b1adc62..00000000000
--- a/components/accordion/themes/spectrum-two.css
+++ /dev/null
@@ -1,20 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-@container style(--system: spectrum) {
- .spectrum-Accordion {
- --spectrum-accordion-divider-color: var(--spectrum-gray-200);
- --spectrum-accordion-item-content-disabled-color: var(--spectrum-disabled-content-color);
- --spectrum-accordion-item-content-color: var(--spectrum-body-color);
- }
-}
diff --git a/components/accordion/themes/spectrum.css b/components/accordion/themes/spectrum.css
deleted file mode 100644
index 572d3f1db1b..00000000000
--- a/components/accordion/themes/spectrum.css
+++ /dev/null
@@ -1,24 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--legacy */
-
-@import "./spectrum-two.css";
-
-@container style(--system: legacy) {
- .spectrum-Accordion {
- --spectrum-accordion-divider-color: var(--spectrum-gray-300);
- --spectrum-accordion-item-content-disabled-color: var(--spectrum-gray-400);
- --spectrum-accordion-item-content-color: var(--spectrum-gray-800);
- }
-}
diff --git a/components/actionbar/CHANGELOG.md b/components/actionbar/CHANGELOG.md
index 41dfbaa259f..85eb79c8547 100644
--- a/components/actionbar/CHANGELOG.md
+++ b/components/actionbar/CHANGELOG.md
@@ -1,5 +1,49 @@
# Change log
+## 11.0.0-next.2
+
+### Major Changes
+
+- [#3657](https://github.com/adobe/spectrum-css/pull/3657) [`c06e995`](https://github.com/adobe/spectrum-css/commit/c06e9953caaaafa3c3f1841057e26c6212754ae5) Thanks [@aramos-adobe](https://github.com/aramos-adobe)!
+
+#### Action bar S2 migration
+
+Action bar now has some updated colors, corner radius, and icons. There's a new look to the default and emphasized variants.
+
+The emphasized has changed from an `accent` background color to a `neutral` background color. In light mode, the clear button and action buttons are `staticWhite` and in dark mode they are `staticBlack`.
+
+##### New tokens
+
+`--spectrum-actionbar-emphasized-actionbutton-label-color`
+`--spectrum-actionbar-emphasized-icon-color`
+`--spectrum-actionbar-minimum-width`
+`--spectrum-actionbar-spacing-label-to-action-group`
+`--spectrum-actionbar-spacing-action-group-edge`
+`--spectrum-actionbar-close-button-to-counter`
+
+##### New modifiers
+
+`--mod-actionbar-minimum-width`
+`--mod-actionbar-spacing-action-group-edge`
+`--mod-actionbar-spacing-label-to-action-group`
+
+## 11.0.0-next.1
+
+### Patch Changes
+
+- Updated dependencies [[`60a156d`](https://github.com/adobe/spectrum-css/commit/60a156d7c0efcc999bc440274bbbbf586beb274b)]:
+ - @spectrum-css/tokens@16.1.0-next.0
+
+## 11.0.0-next.0
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @spectrum-css/closebutton@7.0.0-next.0
+ - @spectrum-css/fieldlabel@11.0.0-next.0
+ - @spectrum-css/actiongroup@7.0.0-next.0
+ - @spectrum-css/popover@9.0.0-next.0
+
## 10.1.1
### Patch Changes
diff --git a/components/actionbar/dist/metadata.json b/components/actionbar/dist/metadata.json
index 3632db90bf7..2073a6be7d6 100644
--- a/components/actionbar/dist/metadata.json
+++ b/components/actionbar/dist/metadata.json
@@ -4,94 +4,83 @@
".spectrum-ActionBar",
".spectrum-ActionBar .spectrum-ActionBar-popover",
".spectrum-ActionBar .spectrum-ActionGroup",
- ".spectrum-ActionBar .spectrum-CloseButton",
".spectrum-ActionBar .spectrum-FieldLabel",
".spectrum-ActionBar .spectrum-FieldLabel:lang(ja)",
".spectrum-ActionBar .spectrum-FieldLabel:lang(ko)",
".spectrum-ActionBar .spectrum-FieldLabel:lang(zh)",
- ".spectrum-ActionBar--emphasized .spectrum-ActionBar-popover",
- ".spectrum-ActionBar--emphasized .spectrum-FieldLabel",
".spectrum-ActionBar--fixed",
".spectrum-ActionBar--flexible .spectrum-ActionBar-popover",
".spectrum-ActionBar--sticky",
".spectrum-ActionBar.is-open",
+ ".spectrum-ActionBar.spectrum-ActionBar--emphasized",
".spectrum-ActionBar:lang(ja)",
".spectrum-ActionBar:lang(ko)",
".spectrum-ActionBar:lang(zh)"
],
"modifiers": [
+ "--mod-actionbar-close-button-to-counter",
"--mod-actionbar-corner-radius",
- "--mod-actionbar-emphasized-background-color",
- "--mod-actionbar-emphasized-item-counter-color",
"--mod-actionbar-height",
"--mod-actionbar-item-counter-color",
- "--mod-actionbar-item-counter-font-size",
- "--mod-actionbar-item-counter-line-height",
"--mod-actionbar-item-counter-line-height-cjk",
+ "--mod-actionbar-minimum-width",
"--mod-actionbar-popover-background-color",
"--mod-actionbar-popover-border-color",
"--mod-actionbar-shadow-blur",
"--mod-actionbar-shadow-color",
"--mod-actionbar-shadow-horizontal",
"--mod-actionbar-shadow-vertical",
- "--mod-actionbar-spacing-action-group-end",
- "--mod-actionbar-spacing-action-group-top",
- "--mod-actionbar-spacing-close-button-end",
- "--mod-actionbar-spacing-close-button-start",
- "--mod-actionbar-spacing-close-button-top",
- "--mod-actionbar-spacing-item-counter-end",
- "--mod-actionbar-spacing-item-counter-top",
- "--mod-actionbar-spacing-outer-edge"
+ "--mod-actionbar-spacing-action-group-edge",
+ "--mod-actionbar-spacing-bottom-area",
+ "--mod-actionbar-spacing-label-to-action-group",
+ "--mod-actionbar-spacing-outer-edge",
+ "--mod-actionbar-spacing-top-area"
],
"component": [
+ "--spectrum-action-bar-border-color",
+ "--spectrum-action-bar-bottom-to-content-area",
+ "--spectrum-action-bar-close-button-to-counter",
+ "--spectrum-action-bar-counter-font-size",
+ "--spectrum-action-bar-edge-to-content-area",
"--spectrum-action-bar-height",
- "--spectrum-action-bar-top-to-item-counter",
+ "--spectrum-action-bar-label-to-action-group-area",
+ "--spectrum-action-bar-minimum-width",
+ "--spectrum-action-bar-top-to-content-area",
+ "--spectrum-actionbar-close-button-to-counter",
"--spectrum-actionbar-corner-radius",
- "--spectrum-actionbar-emphasized-background-color",
- "--spectrum-actionbar-emphasized-item-counter-color",
"--spectrum-actionbar-height",
"--spectrum-actionbar-item-counter-color",
- "--spectrum-actionbar-item-counter-font-size",
"--spectrum-actionbar-item-counter-line-height",
"--spectrum-actionbar-item-counter-line-height-cjk",
+ "--spectrum-actionbar-minimum-width",
"--spectrum-actionbar-popover-background-color",
"--spectrum-actionbar-popover-border-color",
"--spectrum-actionbar-shadow-blur",
"--spectrum-actionbar-shadow-color",
"--spectrum-actionbar-shadow-horizontal",
"--spectrum-actionbar-shadow-vertical",
- "--spectrum-actionbar-spacing-action-group-end",
- "--spectrum-actionbar-spacing-action-group-top",
- "--spectrum-actionbar-spacing-close-button-end",
- "--spectrum-actionbar-spacing-close-button-start",
- "--spectrum-actionbar-spacing-close-button-top",
- "--spectrum-actionbar-spacing-item-counter-end",
- "--spectrum-actionbar-spacing-item-counter-top",
- "--spectrum-actionbar-spacing-outer-edge"
+ "--spectrum-actionbar-spacing-bottom-area",
+ "--spectrum-actionbar-spacing-label-to-action-group",
+ "--spectrum-actionbar-spacing-outer-edge",
+ "--spectrum-actionbar-spacing-padding-inline",
+ "--spectrum-actionbar-spacing-top-area"
],
"global": [
+ "--spectrum-background-elevated-color",
"--spectrum-cjk-line-height-100",
- "--spectrum-corner-radius-100",
- "--spectrum-drop-shadow-blur",
- "--spectrum-drop-shadow-color",
- "--spectrum-drop-shadow-x",
- "--spectrum-drop-shadow-y",
- "--spectrum-font-size-100",
+ "--spectrum-corner-radius-medium-size-extra-large",
+ "--spectrum-drop-shadow-elevated-blur",
+ "--spectrum-drop-shadow-elevated-color",
+ "--spectrum-drop-shadow-elevated-x",
+ "--spectrum-drop-shadow-elevated-y",
"--spectrum-gray-25",
- "--spectrum-gray-400",
- "--spectrum-informative-background-color-default",
"--spectrum-line-height-100",
"--spectrum-neutral-content-color-default",
- "--spectrum-spacing-100",
- "--spectrum-spacing-300",
- "--spectrum-spacing-400",
- "--spectrum-spacing-75",
- "--spectrum-white"
+ "--spectrum-spacing-300"
],
- "system-theme": [
- "--system-action-bar-popover-background-color",
- "--system-action-bar-popover-border-color"
+ "passthroughs": [
+ "--mod-fieldlabel-font-size",
+ "--mod-fieldlabel-line-height"
],
- "passthroughs": [],
"high-contrast": ["--highcontrast-actionbar-popover-border-color"]
}
diff --git a/components/actionbar/index.css b/components/actionbar/index.css
index 474499e462f..737af9a4382 100644
--- a/components/actionbar/index.css
+++ b/components/actionbar/index.css
@@ -11,42 +11,37 @@
* governing permissions and limitations under the License.
*/
-@import "./themes/spectrum-two.css";
-
.spectrum-ActionBar {
+ /* Layout */
--spectrum-actionbar-height: var(--spectrum-action-bar-height);
- --spectrum-actionbar-corner-radius: var(--spectrum-corner-radius-100);
-
- /* item counter field label */
- --spectrum-actionbar-item-counter-font-size: var(--spectrum-font-size-100);
+ --spectrum-actionbar-minimum-width: var(--spectrum-action-bar-minimum-width);
+ --spectrum-actionbar-corner-radius: var(--spectrum-corner-radius-medium-size-extra-large);
+ --spectrum-actionbar-spacing-label-to-action-group: var(--spectrum-action-bar-label-to-action-group-area);
+ --spectrum-actionbar-spacing-padding-inline: var(--spectrum-action-bar-edge-to-content-area);
+ --spectrum-actionbar-spacing-top-area: var(--spectrum-action-bar-top-to-content-area);
+ --spectrum-actionbar-spacing-bottom-area: var(--spectrum-action-bar-bottom-to-content-area);
+ --spectrum-actionbar-close-button-to-counter: var(--spectrum-action-bar-close-button-to-counter);
+ /* stylelint-disable-next-line spectrum-tools/no-unused-custom-properties -- defines the field label mod */
--spectrum-actionbar-item-counter-line-height: var(--spectrum-line-height-100);
--spectrum-actionbar-item-counter-color: var(--spectrum-neutral-content-color-default);
- /* emphasized variation colors */
- --spectrum-actionbar-emphasized-background-color: var(--spectrum-informative-background-color-default);
- --spectrum-actionbar-emphasized-item-counter-color: var(--spectrum-white);
+ /* colors - applied to popover */
+ --spectrum-actionbar-popover-background-color: var(--spectrum-background-elevated-color);
+ --spectrum-actionbar-popover-border-color: var(--spectrum-action-bar-border-color);
/* spacing of action bar bottom and horizontal outer edge */
--spectrum-actionbar-spacing-outer-edge: var(--spectrum-spacing-300);
- /* spacing of close button */
- --spectrum-actionbar-spacing-close-button-top: var(--spectrum-spacing-100);
- --spectrum-actionbar-spacing-close-button-start: var(--spectrum-spacing-100);
- --spectrum-actionbar-spacing-close-button-end: var(--spectrum-spacing-75);
-
- /* spacing of item counter field label */
- --spectrum-actionbar-spacing-item-counter-top: var(--spectrum-action-bar-top-to-item-counter);
- --spectrum-actionbar-spacing-item-counter-end: var(--spectrum-spacing-400);
-
- /* spacing of action group */
- --spectrum-actionbar-spacing-action-group-top: var(--spectrum-spacing-100);
- --spectrum-actionbar-spacing-action-group-end: var(--spectrum-spacing-100);
-
/* drop shadow */
- --spectrum-actionbar-shadow-horizontal: var(--spectrum-drop-shadow-x);
- --spectrum-actionbar-shadow-vertical: var(--spectrum-drop-shadow-y);
- --spectrum-actionbar-shadow-blur: var(--spectrum-drop-shadow-blur);
- --spectrum-actionbar-shadow-color: var(--spectrum-drop-shadow-color);
+ --spectrum-actionbar-shadow-horizontal: var(--spectrum-drop-shadow-elevated-x);
+ --spectrum-actionbar-shadow-vertical: var(--spectrum-drop-shadow-elevated-y);
+ --spectrum-actionbar-shadow-blur: var(--spectrum-drop-shadow-elevated-blur);
+ --spectrum-actionbar-shadow-color: var(--spectrum-drop-shadow-elevated-color);
+
+ &.spectrum-ActionBar--emphasized {
+ --spectrum-actionbar-item-counter-color: var(--spectrum-gray-25);
+ --spectrum-actionbar-popover-background-color: var(--spectrum-neutral-content-color-default);
+ }
/* cjk language support for item counter */
&:lang(ja),
@@ -56,17 +51,6 @@
}
}
-/* windows high contrast mode */
-@media (forced-colors: active) {
- .spectrum-ActionBar {
- --highcontrast-actionbar-popover-border-color: CanvasText;
- }
-
- .spectrum-ActionBar--emphasized .spectrum-ActionBar-popover {
- --highcontrast-actionbar-popover-border-color: CanvasText;
- }
-}
-
/* ActionBar is outer wrapper with nested popover component within */
.spectrum-ActionBar {
/* creates horizontal spacing to edge */
@@ -93,11 +77,12 @@
.spectrum-ActionBar-popover {
/* popover is ActionBar height */
block-size: var(--mod-actionbar-height, var(--spectrum-actionbar-height));
+ min-inline-size: var(--mod-actionbar-minimum-width, var(--spectrum-actionbar-minimum-width));
box-sizing: border-box;
inline-size: 100%;
margin: auto;
- padding-block-start: 0;
- padding-block-end: 0;
+ padding-inline: var(--mod-actionbar-spacing-action-group-edge, var(--spectrum-actionbar-spacing-padding-inline));
+ padding-block: var(--mod-actionbar-spacing-top-area, var(--spectrum-actionbar-spacing-top-area)) var(--mod-actionbar-spacing-bottom-area, var(--spectrum-actionbar-spacing-bottom-area));
/* Be relative so our width can be restricted */
position: relative;
@@ -114,27 +99,15 @@
/* inner layout of content items */
display: flex;
flex-direction: row;
- }
-
- /* close button */
- .spectrum-CloseButton {
- margin-inline-start: var(--mod-actionbar-spacing-close-button-start, var(--spectrum-actionbar-spacing-close-button-start));
- margin-inline-end: var(--mod-actionbar-spacing-close-button-end, var(--spectrum-actionbar-spacing-close-button-end));
- margin-block-start: var(--mod-actionbar-spacing-close-button-top, var(--spectrum-actionbar-spacing-close-button-top));
- flex-shrink: 0;
+ align-items: center;
}
/* item counter */
.spectrum-FieldLabel {
- margin-inline-end: var(--mod-actionbar-spacing-item-counter-end, var(--spectrum-actionbar-spacing-item-counter-end));
- margin-block-start: var(--mod-actionbar-spacing-item-counter-top, var(--spectrum-actionbar-spacing-item-counter-top));
-
- /* neutralize padding for correct spacing within ActionBar */
- padding: 0;
-
- font-size: var(--mod-actionbar-item-counter-font-size, var(--spectrum-actionbar-item-counter-font-size));
+ --mod-fieldlabel-font-size: var(--spectrum-action-bar-counter-font-size);
+ --mod-fieldlabel-line-height: var(--spectrum-actionbar-item-counter-line-height);
color: var(--mod-actionbar-item-counter-color, var(--spectrum-actionbar-item-counter-color));
- line-height: var(--mod-actionbar-item-counter-line-height, var(--spectrum-actionbar-item-counter-line-height));
+ padding-inline-start: var(--mod-actionbar-close-button-to-counter, var(--spectrum-actionbar-close-button-to-counter));
/* cjk language support */
&:lang(ja),
@@ -146,26 +119,9 @@
/* action group */
.spectrum-ActionGroup {
- margin-inline-end: var(--mod-actionbar-spacing-action-group-end, var(--spectrum-actionbar-spacing-action-group-end));
- margin-block-start: var(--mod-actionbar-spacing-action-group-top, var(--spectrum-actionbar-spacing-action-group-top));
-
/* align to end by default */
margin-inline-start: auto;
- }
-}
-
-.spectrum-ActionBar--emphasized {
- .spectrum-ActionBar-popover {
- filter: none;
- background-color: var(--mod-actionbar-emphasized-background-color, var(--spectrum-actionbar-emphasized-background-color));
-
- /* border transparent instead of none so WHCM will have visible border */
- border-color: transparent;
- }
-
- /* ensure text is legible on emphasized background */
- .spectrum-FieldLabel {
- color: var(--mod-actionbar-emphasized-item-counter-color, var(--spectrum-actionbar-emphasized-item-counter-color));
+ padding-inline-start: var(--mod-actionbar-spacing-label-to-action-group, var(--spectrum-actionbar-spacing-label-to-action-group)); /* space between label and action group */
}
}
@@ -183,3 +139,10 @@
.spectrum-ActionBar--flexible .spectrum-ActionBar-popover {
inline-size: auto;
}
+
+/* windows high contrast mode */
+@media (forced-colors: active) {
+ .spectrum-ActionBar {
+ --highcontrast-actionbar-popover-border-color: CanvasText;
+ }
+}
diff --git a/components/actionbar/package.json b/components/actionbar/package.json
index 9df58b27132..0cde6f4fda4 100644
--- a/components/actionbar/package.json
+++ b/components/actionbar/package.json
@@ -1,6 +1,6 @@
{
"name": "@spectrum-css/actionbar",
- "version": "10.1.1",
+ "version": "11.0.0-next.2",
"description": "The Spectrum CSS actionbar component",
"license": "Apache-2.0",
"author": "Adobe",
@@ -25,11 +25,11 @@
},
"main": "dist/index.css",
"peerDependencies": {
- "@spectrum-css/actiongroup": ">=6.0.0 <7.0.0",
- "@spectrum-css/closebutton": ">=6.0.0 <7.0.0",
- "@spectrum-css/fieldlabel": ">=10.0.0 <11.0.0",
- "@spectrum-css/popover": ">=8.0.0 <9.0.0",
- "@spectrum-css/tokens": ">=16.0.0 <17.0.0"
+ "@spectrum-css/actiongroup": ">=7.0.0-next.0",
+ "@spectrum-css/closebutton": ">=7.0.0-next.0",
+ "@spectrum-css/fieldlabel": ">=11.0.0-next.0",
+ "@spectrum-css/popover": ">=9.0.0-next.0",
+ "@spectrum-css/tokens": ">=16.1.0-next.0"
},
"peerDependenciesMeta": {
"@spectrum-css/actiongroup": {
@@ -49,11 +49,11 @@
}
},
"devDependencies": {
- "@spectrum-css/actiongroup": "6.1.0",
- "@spectrum-css/closebutton": "6.1.0",
- "@spectrum-css/fieldlabel": "10.1.0",
- "@spectrum-css/popover": "8.2.0",
- "@spectrum-css/tokens": "16.0.2"
+ "@spectrum-css/actiongroup": "7.0.0-next.1",
+ "@spectrum-css/closebutton": "7.0.0-next.1",
+ "@spectrum-css/fieldlabel": "11.0.0-next.2",
+ "@spectrum-css/popover": "9.0.0-next.2",
+ "@spectrum-css/tokens": "16.1.0-next.5"
},
"keywords": [
"design-system",
diff --git a/components/actionbar/stories/actionbar.stories.js b/components/actionbar/stories/actionbar.stories.js
index aa2e867ea09..c19710c0051 100644
--- a/components/actionbar/stories/actionbar.stories.js
+++ b/components/actionbar/stories/actionbar.stories.js
@@ -72,6 +72,10 @@ export default {
},
packageJson,
metadata,
+ status: {
+ type: "migrated",
+ },
+ tags: ["migrated"],
},
};
@@ -92,7 +96,7 @@ WithForcedColors.parameters = {
// ********* DOCS ONLY ********* //
/**
- * The emphasized action bar has a blue background that adds visual emphasis on the actions and selection. Use this for when the bar should call attention (e.g., floating in a table).
+ * The emphasized action bar has a neutral background that adds visual emphasis on the actions and selection. Use this for when the bar should call attention (e.g., floating in a table).
*/
export const Emphasized = BehavioralTemplate.bind({});
Emphasized.tags = ["!dev"];
diff --git a/components/actionbar/stories/template.js b/components/actionbar/stories/template.js
index 8b134157bd2..44b7d8265e3 100644
--- a/components/actionbar/stories/template.js
+++ b/components/actionbar/stories/template.js
@@ -1,20 +1,16 @@
-import { Container } from "@spectrum-css/preview/decorators";
import { Template as ActionGroup } from "@spectrum-css/actiongroup/stories/template.js";
import { Template as CloseButton } from "@spectrum-css/closebutton/stories/template.js";
import { Template as FieldLabel } from "@spectrum-css/fieldlabel/stories/template.js";
import { Template as Popover } from "@spectrum-css/popover/stories/template.js";
+import { Container } from "@spectrum-css/preview/decorators";
import { html } from "lit";
import { classMap } from "lit/directives/class-map.js";
import { styleMap } from "lit/directives/style-map.js";
import "../index.css";
-import "../themes/spectrum.css";
-/* Must be imported last */
-import "../themes/express.css";
export const Template = ({
rootClass = "spectrum-ActionBar",
- size = "m",
isOpen = true,
isEmphasized = false,
isSticky = false,
@@ -28,7 +24,6 @@ export const Template = ({
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--express */
-
-@import "./spectrum.css";
diff --git a/components/actionbar/themes/spectrum-two.css b/components/actionbar/themes/spectrum-two.css
deleted file mode 100644
index 157c2dc9294..00000000000
--- a/components/actionbar/themes/spectrum-two.css
+++ /dev/null
@@ -1,20 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-@container style(--system: spectrum) {
- .spectrum-ActionBar {
- /* colors - applied to popover */
- --spectrum-actionbar-popover-background-color: var(--spectrum-gray-25);
- --spectrum-actionbar-popover-border-color: var(--spectrum-gray-400);
- }
-}
diff --git a/components/actionbar/themes/spectrum.css b/components/actionbar/themes/spectrum.css
deleted file mode 100644
index 27971810d3d..00000000000
--- a/components/actionbar/themes/spectrum.css
+++ /dev/null
@@ -1,23 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--legacy */
-
-@import "./spectrum-two.css";
-
-@container style(--system: legacy) {
- .spectrum-ActionBar {
- --spectrum-actionbar-popover-background-color: var(--spectrum-gray-50);
- --spectrum-actionbar-popover-border-color: var(--spectrum-gray-400);
- }
-}
diff --git a/components/actionbutton/CHANGELOG.md b/components/actionbutton/CHANGELOG.md
index f984f549e3f..0ded167aaae 100644
--- a/components/actionbutton/CHANGELOG.md
+++ b/components/actionbutton/CHANGELOG.md
@@ -1,10 +1,56 @@
# Change log
+## 8.0.0-next.2
+
+### Patch Changes
+
+- Updated dependencies [[`60a156d`](https://github.com/adobe/spectrum-css/commit/60a156d7c0efcc999bc440274bbbbf586beb274b)]:
+ - @spectrum-css/tokens@16.1.0-next.0
+
+## 8.0.0-next.1
+
+### Major Changes
+
+📝 [#2669](https://github.com/adobe/spectrum-css/pull/2669) [`b2c6357`](https://github.com/adobe/spectrum-css/commit/b2c6357c542737fb996cf8378354f525adde1fc2) Thanks [@mdt2](https://github.com/mdt2)!
+
+Action button now uses Spectrum 2 tokens and design specifications. A few notable changes:
+
+- Medium is now the default size and `.spectrum-ActionButton--sizeM` has been removed.
+- Includes the Spectrum 2 down state transform.
+- The component border was not removed and its color was changed to `transparent` in order to continue support for Windows High Contrast / forced colors, which still shows a border. The mod custom properties for border were removed to avoid interference with Windows High Contrast / forced colors accessibility.
+- Some selectors to target the icon + text button and the icon-only button have been simplified using `:has`. This removes some overly complex `calc()` functions used for inline spacing, uses the design tokens more directly, and removes the previously documented need for the component's child elements to use a specific source order.
+- Background and content colors were updated.
+- Mod custom properties have been adjusted:
+ - Renamed:
+ - `--mod-line-height-100` renamed to `--mod-actionbutton-line-height`.
+ - `--mod-sans-font-family-stack` renamed to `--mod-button-font-family`.
+ - `--mod-animation-duration-100` renamed to `--mod-button-animation-duration`.
+ - Removed:
+ - `--mod-actionbutton-border-color-default`
+ - `--mod-actionbutton-border-color-disabled`
+ - `--mod-actionbutton-border-color-down`
+ - `--mod-actionbutton-border-color-focus`
+ - `--mod-actionbutton-border-color-hover`
+ - `--mod-actionbutton-border-width`
+ - `--mod-actionbutton-static-content-color`
+ - New:
+ - `--mod-actionbutton-font-weight`
+ - `--mod-actionbutton-font-style`
+
+## 8.0.0-next.0
+
+### Patch Changes
+
+- Updated dependencies [[`a25e0a9`](https://github.com/adobe/spectrum-css/commit/a25e0a99e5a4736ab4e607e00739343101a2633b)]:
+ - @spectrum-css/icon@10.0.0-next.0
+
## 7.1.3
### Patch Changes
-- [#3644](https://github.com/adobe/spectrum-css/pull/3644) [`5adef1d`](https://github.com/adobe/spectrum-css/commit/5adef1d15d07516dc9c1aac7bbcf9ac5bdeb9e97) Thanks [@marissahuysentruyt](https://github.com/marissahuysentruyt)! - Fix support for `--mod-actionbutton-border-radius` to make sure it is surfaced to consumers, and properly overwrites the default border radius setting.
+📝 [#3644](https://github.com/adobe/spectrum-css/pull/3644) [`5adef1d`](https://github.com/adobe/spectrum-css/commit/5adef1d15d07516dc9c1aac7bbcf9ac5bdeb9e97) Thanks [@marissahuysentruyt](https://github.com/marissahuysentruyt)!
+
+Fix support for `--mod-actionbutton-border-radius` to make sure it is surfaced to consumers, and properly overwrites the default border radius setting.
## 7.1.2
diff --git a/components/actionbutton/dist/metadata.json b/components/actionbutton/dist/metadata.json
index 08d99aab279..655e8bdff1f 100644
--- a/components/actionbutton/dist/metadata.json
+++ b/components/actionbutton/dist/metadata.json
@@ -2,29 +2,25 @@
"sourceFile": "index.css",
"selectors": [
".spectrum-ActionButton",
+ ".spectrum-ActionButton .spectrum-ActionButton-hold",
+ ".spectrum-ActionButton .spectrum-ActionButton-icon",
+ ".spectrum-ActionButton .spectrum-ActionButton-label",
".spectrum-ActionButton--sizeL",
- ".spectrum-ActionButton--sizeM",
".spectrum-ActionButton--sizeS",
".spectrum-ActionButton--sizeXL",
".spectrum-ActionButton--sizeXS",
".spectrum-ActionButton-hold",
- ".spectrum-ActionButton-hold + .spectrum-ActionButton-icon",
".spectrum-ActionButton-icon",
- ".spectrum-ActionButton-icon:only-child",
".spectrum-ActionButton-label",
".spectrum-ActionButton-label:empty",
".spectrum-ActionButton.is-disabled",
".spectrum-ActionButton.is-selected",
- ".spectrum-ActionButton.is-selected .spectrum-ActionButton-hold",
- ".spectrum-ActionButton.is-selected .spectrum-ActionButton-icon",
- ".spectrum-ActionButton.is-selected .spectrum-ActionButton-label",
- ".spectrum-ActionButton.spectrum-ActionButton--emphasized:not(.spectrum-ActionButton--staticBlack, .spectrum-ActionButton--staticWhite)",
+ ".spectrum-ActionButton.is-selected.spectrum-ActionButton--emphasized",
+ ".spectrum-ActionButton.is-selected.spectrum-ActionButton--staticBlack",
+ ".spectrum-ActionButton.is-selected.spectrum-ActionButton--staticWhite",
".spectrum-ActionButton.spectrum-ActionButton--quiet",
- ".spectrum-ActionButton.spectrum-ActionButton--sizeL",
- ".spectrum-ActionButton.spectrum-ActionButton--sizeM",
- ".spectrum-ActionButton.spectrum-ActionButton--sizeS",
- ".spectrum-ActionButton.spectrum-ActionButton--sizeXL",
- ".spectrum-ActionButton.spectrum-ActionButton--sizeXS",
+ ".spectrum-ActionButton.spectrum-ActionButton--quiet.is-selected",
+ ".spectrum-ActionButton.spectrum-ActionButton--quiet:disabled:not(.is-selected)",
".spectrum-ActionButton.spectrum-ActionButton--staticBlack",
".spectrum-ActionButton.spectrum-ActionButton--staticBlack.spectrum-ActionButton--quiet",
".spectrum-ActionButton.spectrum-ActionButton--staticWhite",
@@ -37,7 +33,9 @@
".spectrum-ActionButton:focus",
".spectrum-ActionButton:focus-visible",
".spectrum-ActionButton:focus-visible:after",
+ ".spectrum-ActionButton:has(.spectrum-ActionButton-icon)",
".spectrum-ActionButton:hover",
+ ".spectrum-ActionButton:not(:has(.spectrum-ActionButton-label))",
"[dir=\"rtl\"] .spectrum-ActionButton",
"a.spectrum-ActionButton"
],
@@ -56,13 +54,7 @@
"--mod-actionbutton-background-color-hover",
"--mod-actionbutton-background-color-hover-selected",
"--mod-actionbutton-background-color-hover-selected-emphasized",
- "--mod-actionbutton-border-color-default",
- "--mod-actionbutton-border-color-disabled",
- "--mod-actionbutton-border-color-down",
- "--mod-actionbutton-border-color-focus",
- "--mod-actionbutton-border-color-hover",
"--mod-actionbutton-border-radius",
- "--mod-actionbutton-border-width",
"--mod-actionbutton-content-color-default",
"--mod-actionbutton-content-color-default-selected",
"--mod-actionbutton-content-color-default-selected-emphasized",
@@ -85,15 +77,14 @@
"--mod-actionbutton-focus-indicator-gap",
"--mod-actionbutton-focus-indicator-thickness",
"--mod-actionbutton-font-size",
+ "--mod-actionbutton-font-style",
+ "--mod-actionbutton-font-weight",
"--mod-actionbutton-height",
"--mod-actionbutton-icon-size",
"--mod-actionbutton-label-color",
+ "--mod-actionbutton-line-height",
"--mod-actionbutton-min-width",
- "--mod-actionbutton-static-content-color",
- "--mod-actionbutton-text-to-visual",
- "--mod-animation-duration-100",
- "--mod-line-height-100",
- "--mod-sans-font-family-stack"
+ "--mod-actionbutton-text-to-visual"
],
"component": [
"--spectrum-action-button-edge-to-hold-icon-extra-large",
@@ -101,46 +92,36 @@
"--spectrum-action-button-edge-to-hold-icon-large",
"--spectrum-action-button-edge-to-hold-icon-medium",
"--spectrum-action-button-edge-to-hold-icon-small",
- "--spectrum-actionbutton-background-color",
+ "--spectrum-actionbutton-animation-duration",
"--spectrum-actionbutton-background-color-default",
"--spectrum-actionbutton-background-color-disabled",
"--spectrum-actionbutton-background-color-down",
"--spectrum-actionbutton-background-color-focus",
"--spectrum-actionbutton-background-color-hover",
- "--spectrum-actionbutton-background-color-selected",
- "--spectrum-actionbutton-background-color-selected-disabled",
- "--spectrum-actionbutton-background-color-selected-down",
- "--spectrum-actionbutton-background-color-selected-focus",
- "--spectrum-actionbutton-background-color-selected-hover",
"--spectrum-actionbutton-border-color",
- "--spectrum-actionbutton-border-color-default",
- "--spectrum-actionbutton-border-color-disabled",
- "--spectrum-actionbutton-border-color-down",
- "--spectrum-actionbutton-border-color-focus",
- "--spectrum-actionbutton-border-color-hover",
"--spectrum-actionbutton-border-radius",
- "--spectrum-actionbutton-border-radius-default",
"--spectrum-actionbutton-border-width",
- "--spectrum-actionbutton-content-color",
- "--spectrum-actionbutton-content-color-selected",
+ "--spectrum-actionbutton-content-color-default",
+ "--spectrum-actionbutton-content-color-disabled",
+ "--spectrum-actionbutton-content-color-down",
+ "--spectrum-actionbutton-content-color-focus",
+ "--spectrum-actionbutton-content-color-hover",
+ "--spectrum-actionbutton-downstate-perspective",
"--spectrum-actionbutton-edge-to-hold-icon",
"--spectrum-actionbutton-edge-to-text",
"--spectrum-actionbutton-edge-to-visual",
"--spectrum-actionbutton-edge-to-visual-only",
+ "--spectrum-actionbutton-focus-indicator-border-radius",
"--spectrum-actionbutton-focus-indicator-color",
"--spectrum-actionbutton-focus-indicator-gap",
"--spectrum-actionbutton-focus-indicator-thickness",
"--spectrum-actionbutton-font-size",
+ "--spectrum-actionbutton-font-style",
+ "--spectrum-actionbutton-font-weight",
"--spectrum-actionbutton-height",
"--spectrum-actionbutton-icon-size",
- "--spectrum-actionbutton-sized-edge-to-hold-icon",
- "--spectrum-actionbutton-sized-edge-to-text",
- "--spectrum-actionbutton-sized-edge-to-visual",
- "--spectrum-actionbutton-sized-edge-to-visual-only",
- "--spectrum-actionbutton-sized-font-size",
- "--spectrum-actionbutton-sized-height",
- "--spectrum-actionbutton-sized-icon-size",
- "--spectrum-actionbutton-sized-text-to-visual",
+ "--spectrum-actionbutton-line-height",
+ "--spectrum-actionbutton-min-width",
"--spectrum-actionbutton-text-to-visual"
],
"global": [
@@ -171,17 +152,23 @@
"--spectrum-component-height-300",
"--spectrum-component-height-50",
"--spectrum-component-height-75",
+ "--spectrum-component-size-difference-down",
+ "--spectrum-component-size-minimum-perspective-down",
+ "--spectrum-component-size-width-ratio-down",
"--spectrum-corner-radius-medium-size-extra-large",
"--spectrum-corner-radius-medium-size-extra-small",
"--spectrum-corner-radius-medium-size-large",
"--spectrum-corner-radius-medium-size-medium",
"--spectrum-corner-radius-medium-size-small",
+ "--spectrum-default-font-style",
"--spectrum-disabled-background-color",
"--spectrum-disabled-content-color",
"--spectrum-disabled-static-black-background-color",
"--spectrum-disabled-static-black-content-color",
"--spectrum-disabled-static-white-background-color",
"--spectrum-disabled-static-white-content-color",
+ "--spectrum-downstate-height",
+ "--spectrum-downstate-width",
"--spectrum-focus-indicator-color",
"--spectrum-focus-indicator-gap",
"--spectrum-focus-indicator-thickness",
@@ -192,9 +179,10 @@
"--spectrum-font-size-75",
"--spectrum-gray-100",
"--spectrum-gray-200",
- "--spectrum-gray-50",
+ "--spectrum-gray-25",
"--spectrum-line-height-100",
"--spectrum-logical-rotation",
+ "--spectrum-medium-font-weight",
"--spectrum-neutral-background-color-selected-default",
"--spectrum-neutral-background-color-selected-down",
"--spectrum-neutral-background-color-selected-hover",
@@ -213,10 +201,12 @@
"--spectrum-text-to-visual-75",
"--spectrum-transparent-black-100",
"--spectrum-transparent-black-200",
+ "--spectrum-transparent-black-25",
"--spectrum-transparent-black-800",
"--spectrum-transparent-black-900",
"--spectrum-transparent-white-100",
"--spectrum-transparent-white-200",
+ "--spectrum-transparent-white-25",
"--spectrum-transparent-white-800",
"--spectrum-transparent-white-900",
"--spectrum-white",
@@ -226,75 +216,18 @@
"--spectrum-workflow-icon-size-50",
"--spectrum-workflow-icon-size-75"
],
- "system-theme": [
- "--system-action-button-background-color-default",
- "--system-action-button-background-color-disabled",
- "--system-action-button-background-color-down",
- "--system-action-button-background-color-focus",
- "--system-action-button-background-color-hover",
- "--system-action-button-background-color-selected",
- "--system-action-button-background-color-selected-down",
- "--system-action-button-background-color-selected-focus",
- "--system-action-button-background-color-selected-hover",
- "--system-action-button-border-color-default",
- "--system-action-button-border-color-disabled",
- "--system-action-button-border-color-down",
- "--system-action-button-border-color-focus",
- "--system-action-button-border-color-hover",
- "--system-action-button-content-color-selected",
- "--system-action-button-quiet-background-color-default",
- "--system-action-button-quiet-background-color-disabled",
- "--system-action-button-quiet-background-color-down",
- "--system-action-button-quiet-background-color-focus",
- "--system-action-button-quiet-background-color-hover",
- "--system-action-button-quiet-background-color-selected-disabled",
- "--system-action-button-size-l-border-radius-default",
- "--system-action-button-size-m-border-radius-default",
- "--system-action-button-size-s-border-radius-default",
- "--system-action-button-size-xl-border-radius-default",
- "--system-action-button-size-xs-border-radius-default",
- "--system-action-button-static-black-background-color-default",
- "--system-action-button-static-black-background-color-disabled",
- "--system-action-button-static-black-background-color-down",
- "--system-action-button-static-black-background-color-focus",
- "--system-action-button-static-black-background-color-hover",
- "--system-action-button-static-black-background-color-selected-disabled",
- "--system-action-button-static-black-border-color-default",
- "--system-action-button-static-black-border-color-disabled",
- "--system-action-button-static-black-border-color-down",
- "--system-action-button-static-black-border-color-focus",
- "--system-action-button-static-black-border-color-hover",
- "--system-action-button-static-black-quiet-background-color-default",
- "--system-action-button-static-black-quiet-background-color-disabled",
- "--system-action-button-static-black-quiet-background-color-down",
- "--system-action-button-static-black-quiet-background-color-focus",
- "--system-action-button-static-black-quiet-background-color-hover",
- "--system-action-button-static-white-background-color-default",
- "--system-action-button-static-white-background-color-disabled",
- "--system-action-button-static-white-background-color-down",
- "--system-action-button-static-white-background-color-focus",
- "--system-action-button-static-white-background-color-hover",
- "--system-action-button-static-white-background-color-selected-disabled",
- "--system-action-button-static-white-border-color-default",
- "--system-action-button-static-white-border-color-disabled",
- "--system-action-button-static-white-border-color-down",
- "--system-action-button-static-white-border-color-focus",
- "--system-action-button-static-white-border-color-hover",
- "--system-action-button-static-white-quiet-background-color-default",
- "--system-action-button-static-white-quiet-background-color-disabled",
- "--system-action-button-static-white-quiet-background-color-down",
- "--system-action-button-static-white-quiet-background-color-focus",
- "--system-action-button-static-white-quiet-background-color-hover"
- ],
"passthroughs": [
"--mod-button-animation-duration",
"--mod-button-font-family",
"--mod-button-line-height"
],
"high-contrast": [
- "--highcontrast-actionbutton-background-color",
+ "--highcontrast-actionbutton-animation-duration",
+ "--highcontrast-actionbutton-background-color-default",
+ "--highcontrast-actionbutton-background-color-disabled",
"--highcontrast-actionbutton-border-color",
- "--highcontrast-actionbutton-content-color",
+ "--highcontrast-actionbutton-content-color-default",
+ "--highcontrast-actionbutton-content-color-disabled",
"--highcontrast-actionbutton-focus-indicator-color"
]
}
diff --git a/components/actionbutton/index.css b/components/actionbutton/index.css
index ac4f410471e..e08737894eb 100644
--- a/components/actionbutton/index.css
+++ b/components/actionbutton/index.css
@@ -1,283 +1,278 @@
/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
+Copyright 2025 Adobe. All rights reserved.
+This file is licensed to you under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License. You may obtain a copy
+of the License at http://www.apache.org/licenses/LICENSE-2.0
-@import "@spectrum-css/commons/basebutton.css";
-@import "./themes/spectrum-two.css";
-
-@media (forced-colors: active) {
- .spectrum-ActionButton {
- /* force a more visible focus indicator color */
- --highcontrast-actionbutton-focus-indicator-color: ButtonText;
- --highcontrast-actionbutton-content-color: ButtonText;
-
- &::after {
- /* make sure focus indicator renders */
- forced-color-adjust: none;
- }
+Unless required by applicable law or agreed to in writing, software distributed under
+the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
+OF ANY KIND, either express or implied. See the License for the specific language
+governing permissions and limitations under the License.
+*/
- &.is-selected {
- --highcontrast-actionbutton-background-color: Highlight;
- --highcontrast-actionbutton-border-color: HighlightText;
- --highcontrast-actionbutton-content-color: HighlightText;
-
- .spectrum-ActionButton-icon,
- .spectrum-ActionButton-hold,
- .spectrum-ActionButton-label {
- /* ensure custom text colors from above get applied */
- /* it seems like this shouldn't have to be done, but colors are wrong without it */
- forced-color-adjust: none;
- }
- }
-
- &:disabled,
- &.is-disabled {
- --highcontrast-actionbutton-content-color: GrayText;
- --highcontrast-actionbutton-border-color: GrayText;
- --highcontrast-actionbutton-background-color: ButtonFace;
- }
- }
-}
+@import "@spectrum-css/commons/basebutton.css";
.spectrum-ActionButton {
- --spectrum-actionbutton-background-color: var(--highcontrast-actionbutton-background-color, var(--mod-actionbutton-background-color-default, var(--spectrum-actionbutton-background-color-default)));
- --spectrum-actionbutton-border-color: var(--highcontrast-actionbutton-border-color, var(--mod-actionbutton-border-color-default, var(--spectrum-actionbutton-border-color-default)));
- --spectrum-actionbutton-content-color: var(--highcontrast-actionbutton-content-color, var(--mod-actionbutton-content-color-default, var(--spectrum-neutral-content-color-default)));
-
- --spectrum-actionbutton-border-radius: var(--mod-actionbutton-border-radius, var(--spectrum-actionbutton-border-radius-default));
- --spectrum-actionbutton-border-width: var(--mod-actionbutton-border-width, var(--spectrum-border-width-100));
-
- --spectrum-actionbutton-focus-indicator-gap: var(--mod-actionbutton-focus-indicator-gap, var(--spectrum-focus-indicator-gap));
- --spectrum-actionbutton-focus-indicator-thickness: var(--mod-actionbutton-focus-indicator-thickness, var(--spectrum-focus-indicator-thickness));
- --spectrum-actionbutton-focus-indicator-color: var(--highcontrast-actionbutton-focus-indicator-color, var(--mod-actionbutton-focus-indicator-color, var(--spectrum-focus-indicator-color)));
+ --spectrum-actionbutton-animation-duration: var(--spectrum-animation-duration-100);
+ --spectrum-actionbutton-border-radius: var(--spectrum-corner-radius-medium-size-medium);
+ --spectrum-actionbutton-border-width: var(--spectrum-border-width-100);
+ --spectrum-actionbutton-border-color: transparent;
+
+ --spectrum-actionbutton-content-color-default: var(--spectrum-neutral-content-color-default);
+ --spectrum-actionbutton-content-color-hover: var(--spectrum-neutral-content-color-hover);
+ --spectrum-actionbutton-content-color-down: var(--spectrum-neutral-content-color-down);
+ --spectrum-actionbutton-content-color-focus: var(--spectrum-neutral-content-color-key-focus);
+ --spectrum-actionbutton-content-color-disabled: var(--spectrum-disabled-content-color);
+
+ --spectrum-actionbutton-background-color-default: var(--spectrum-gray-100);
+ --spectrum-actionbutton-background-color-hover: var(--spectrum-gray-200);
+ --spectrum-actionbutton-background-color-down: var(--spectrum-gray-200);
+ --spectrum-actionbutton-background-color-focus: var(--spectrum-gray-200);
+ --spectrum-actionbutton-background-color-disabled: var(--spectrum-disabled-background-color);
+
+ --spectrum-actionbutton-focus-indicator-gap: var(--spectrum-focus-indicator-gap);
+ --spectrum-actionbutton-focus-indicator-thickness: var(--spectrum-focus-indicator-thickness);
+ --spectrum-actionbutton-focus-indicator-color: var(--spectrum-focus-indicator-color);
+ --spectrum-actionbutton-focus-indicator-border-radius: calc(var(--spectrum-actionbutton-border-radius) + var(--spectrum-actionbutton-focus-indicator-gap));
+
+ --spectrum-actionbutton-min-width: calc((var(--spectrum-component-edge-to-visual-only-100) * 2) + var(--spectrum-workflow-icon-size-100));
+ --spectrum-actionbutton-height: var(--spectrum-component-height-100);
+
+ --spectrum-actionbutton-icon-size: var(--spectrum-workflow-icon-size-100);
+ --spectrum-actionbutton-font-size: var(--spectrum-font-size-100);
+ --spectrum-actionbutton-font-weight: var(--spectrum-medium-font-weight);
+ --spectrum-actionbutton-font-style: var(--spectrum-default-font-style);
+
+ /* Take up full component height for line-height, in order to help prevent characters from being cut off in some languages (e.g. Thai). */
+ --spectrum-actionbutton-line-height: var(--spectrum-actionbutton-height);
+
+ --spectrum-actionbutton-text-to-visual: var(--spectrum-text-to-visual-100);
+ --spectrum-actionbutton-edge-to-hold-icon: var(--spectrum-action-button-edge-to-hold-icon-medium);
+ --spectrum-actionbutton-edge-to-visual: var(--spectrum-component-edge-to-visual-100);
+ --spectrum-actionbutton-edge-to-text: var(--spectrum-component-edge-to-text-100);
+ --spectrum-actionbutton-edge-to-visual-only: var(--spectrum-component-edge-to-visual-only-100);
+
+ /* stylelint-disable-next-line spectrum-tools/no-unknown-custom-properties -- height and width are set by implementations */
+ --spectrum-actionbutton-downstate-perspective: max(var(--spectrum-downstate-height), var(--spectrum-downstate-width) * var(--spectrum-component-size-width-ratio-down));
&:dir(rtl) {
--spectrum-logical-rotation: matrix(-1, 0, 0, 1, 0, 0);
}
&.spectrum-ActionButton--quiet {
- --spectrum-actionbutton-border-color: transparent;
- }
+ --spectrum-actionbutton-background-color-default: transparent;
+ --spectrum-actionbutton-background-color-hover: var(--spectrum-gray-200);
+ --spectrum-actionbutton-background-color-down: var(--spectrum-gray-200);
+ --spectrum-actionbutton-background-color-focus: var(--spectrum-gray-200);
+ --spectrum-actionbutton-background-color-disabled: transparent;
- /* Emphasized styles are only applied to the "selected" state of the button and are not applied in static color modes */
- &.spectrum-ActionButton--emphasized:not(.spectrum-ActionButton--staticBlack, .spectrum-ActionButton--staticWhite) {
- --mod-actionbutton-background-color-default-selected: var(--mod-actionbutton-background-color-default-selected-emphasized, var(--spectrum-accent-background-color-default));
- --mod-actionbutton-background-color-hover-selected: var(--mod-actionbutton-background-color-hover-selected-emphasized, var(--spectrum-accent-background-color-hover));
- --mod-actionbutton-background-color-down-selected: var(--mod-actionbutton-background-color-down-selected-emphasized, var(--spectrum-accent-background-color-down));
- --mod-actionbutton-background-color-focus-selected: var(--mod-actionbutton-background-color-focus-selected-emphasized, var(--spectrum-accent-background-color-key-focus));
-
- --mod-actionbutton-content-color-default-selected: var(--mod-actionbutton-content-color-default-selected-emphasized, var(--spectrum-white));
- --mod-actionbutton-content-color-hover-selected: var(--mod-actionbutton-content-color-hover-selected-emphasized, var(--spectrum-white));
- --mod-actionbutton-content-color-down-selected: var(--mod-actionbutton-content-color-down-selected-emphasized, var(--spectrum-white));
- --mod-actionbutton-content-color-focus-selected: var(--mod-actionbutton-content-color-focus-selected-emphasized, var(--spectrum-white));
+ &.is-selected {
+ --spectrum-actionbutton-background-color-disabled: var(--spectrum-disabled-background-color);
+ }
}
&.spectrum-ActionButton--staticBlack {
- --mod-actionbutton-background-color-default-selected: var(--spectrum-transparent-black-800);
- --mod-actionbutton-background-color-hover-selected: var(--spectrum-transparent-black-900);
- --mod-actionbutton-background-color-down-selected: var(--spectrum-transparent-black-900);
- --mod-actionbutton-background-color-focus-selected: var(--spectrum-transparent-black-900);
-
- --mod-actionbutton-content-color-default: var(--spectrum-black);
- --mod-actionbutton-content-color-hover: var(--spectrum-black);
- --mod-actionbutton-content-color-down: var(--spectrum-black);
- --mod-actionbutton-content-color-focus: var(--spectrum-black);
- --mod-actionbutton-content-color-disabled: var(--spectrum-disabled-static-black-content-color);
-
- --mod-actionbutton-content-color-default-selected: var(--mod-actionbutton-static-content-color, var(--spectrum-white));
- --mod-actionbutton-content-color-hover-selected: var(--mod-actionbutton-static-content-color, var(--spectrum-white));
- --mod-actionbutton-content-color-down-selected: var(--mod-actionbutton-static-content-color, var(--spectrum-white));
- --mod-actionbutton-content-color-focus-selected: var(--mod-actionbutton-static-content-color, var(--spectrum-white));
-
- --mod-actionbutton-focus-indicator-color: var(--spectrum-static-black-focus-indicator-color);
+ --spectrum-actionbutton-background-color-default: var(--spectrum-transparent-black-100);
+ --spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-black-200);
+ --spectrum-actionbutton-background-color-down: var(--spectrum-transparent-black-200);
+ --spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-black-200);
+ --spectrum-actionbutton-background-color-disabled: var(--spectrum-disabled-static-black-background-color);
+
+ --spectrum-actionbutton-content-color-default: var(--spectrum-transparent-black-800);
+ --spectrum-actionbutton-content-color-hover: var(--spectrum-transparent-black-900);
+ --spectrum-actionbutton-content-color-down: var(--spectrum-transparent-black-900);
+ --spectrum-actionbutton-content-color-focus: var(--spectrum-transparent-black-900);
+ --spectrum-actionbutton-content-color-disabled: var(--spectrum-disabled-static-black-content-color);
+
+ --spectrum-actionbutton-focus-indicator-color: var(--spectrum-static-black-focus-indicator-color);
+
+ &.spectrum-ActionButton--quiet {
+ --spectrum-actionbutton-background-color-default: transparent;
+ --spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-black-200);
+ --spectrum-actionbutton-background-color-down: var(--spectrum-transparent-black-200);
+ --spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-black-200);
+ --spectrum-actionbutton-background-color-disabled: var(--spectrum-transparent-black-25);
+ }
}
&.spectrum-ActionButton--staticWhite {
- /* background color _not_ selected is coming from the system theme layer */
- --mod-actionbutton-background-color-default-selected: var(--spectrum-transparent-white-800);
- --mod-actionbutton-background-color-hover-selected: var(--spectrum-transparent-white-900);
- --mod-actionbutton-background-color-down-selected: var(--spectrum-transparent-white-900);
- --mod-actionbutton-background-color-focus-selected: var(--spectrum-transparent-white-900);
-
- --mod-actionbutton-content-color-default: var(--spectrum-white);
- --mod-actionbutton-content-color-hover: var(--spectrum-white);
- --mod-actionbutton-content-color-down: var(--spectrum-white);
- --mod-actionbutton-content-color-focus: var(--spectrum-white);
- --mod-actionbutton-content-color-disabled: var(--spectrum-disabled-static-white-content-color);
-
- --mod-actionbutton-content-color-default-selected: var(--mod-actionbutton-static-content-color, var(--spectrum-black));
- --mod-actionbutton-content-color-hover-selected: var(--mod-actionbutton-static-content-color, var(--spectrum-black));
- --mod-actionbutton-content-color-down-selected: var(--mod-actionbutton-static-content-color, var(--spectrum-black));
- --mod-actionbutton-content-color-focus-selected: var(--mod-actionbutton-static-content-color, var(--spectrum-black));
-
- --mod-actionbutton-focus-indicator-color: var(--spectrum-static-white-focus-indicator-color);
+ --spectrum-actionbutton-background-color-default: var(--spectrum-transparent-white-100);
+ --spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-white-200);
+ --spectrum-actionbutton-background-color-down: var(--spectrum-transparent-white-200);
+ --spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-white-200);
+ --spectrum-actionbutton-background-color-disabled: var(--spectrum-disabled-static-white-background-color);
+
+ --spectrum-actionbutton-content-color-default: var(--spectrum-transparent-white-800);
+ --spectrum-actionbutton-content-color-hover: var(--spectrum-transparent-white-900);
+ --spectrum-actionbutton-content-color-down: var(--spectrum-transparent-white-900);
+ --spectrum-actionbutton-content-color-focus: var(--spectrum-transparent-white-900);
+ --spectrum-actionbutton-content-color-disabled: var(--spectrum-disabled-static-white-content-color);
+
+ --spectrum-actionbutton-focus-indicator-color: var(--spectrum-static-white-focus-indicator-color);
+
+ &.spectrum-ActionButton--quiet {
+ --spectrum-actionbutton-background-color-default: transparent;
+ --spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-white-200);
+ --spectrum-actionbutton-background-color-down: var(--spectrum-transparent-white-200);
+ --spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-white-200);
+ --spectrum-actionbutton-background-color-disabled: var(--spectrum-transparent-white-25);
+ }
}
&.is-selected {
- --mod-actionbutton-background-color-default: var(--mod-actionbutton-background-color-default-selected, var(--spectrum-actionbutton-background-color-selected));
- --mod-actionbutton-background-color-hover: var(--mod-actionbutton-background-color-hover-selected, var(--spectrum-actionbutton-background-color-selected-hover));
- --mod-actionbutton-background-color-down: var(--mod-actionbutton-background-color-down-selected, var(--spectrum-actionbutton-background-color-selected-down));
- --mod-actionbutton-background-color-focus: var(--mod-actionbutton-background-color-focus-selected, var(--spectrum-actionbutton-background-color-selected-focus));
- --mod-actionbutton-background-color-disabled: var(--spectrum-actionbutton-background-color-selected-disabled);
-
- --mod-actionbutton-border-color-default: transparent;
- --mod-actionbutton-border-color-hover: transparent;
- --mod-actionbutton-border-color-down: transparent;
- --mod-actionbutton-border-color-focus: transparent;
- --mod-actionbutton-border-color-disabled: transparent;
-
- --mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-default-selected, var(--spectrum-actionbutton-content-color-selected));
- --mod-actionbutton-content-color-hover: var(--mod-actionbutton-content-color-hover-selected, var(--spectrum-actionbutton-content-color-selected));
- --mod-actionbutton-content-color-down: var(--mod-actionbutton-content-color-down-selected, var(--spectrum-actionbutton-content-color-selected));
- --mod-actionbutton-content-color-focus: var(--mod-actionbutton-content-color-focus-selected, var(--spectrum-actionbutton-content-color-selected));
- }
+ --mod-actionbutton-background-color-default: var(--mod-actionbutton-background-color-default-selected, var(--spectrum-neutral-background-color-selected-default));
+ --mod-actionbutton-background-color-hover: var(--mod-actionbutton-background-color-hover-selected, var(--spectrum-neutral-background-color-selected-hover));
+ --mod-actionbutton-background-color-down: var(--mod-actionbutton-background-color-down-selected, var(--spectrum-neutral-background-color-selected-down));
+ --mod-actionbutton-background-color-focus: var(--mod-actionbutton-background-color-focus-selected, var(--spectrum-neutral-background-color-selected-key-focus));
+
+ --mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-default-selected, var(--spectrum-gray-25));
+ --mod-actionbutton-content-color-hover: var(--mod-actionbutton-content-color-hover-selected, var(--spectrum-gray-25));
+ --mod-actionbutton-content-color-down: var(--mod-actionbutton-content-color-down-selected, var(--spectrum-gray-25));
+ --mod-actionbutton-content-color-focus: var(--mod-actionbutton-content-color-focus-selected, var(--spectrum-gray-25));
+
+ &.spectrum-ActionButton--emphasized {
+ --mod-actionbutton-background-color-default: var(--mod-actionbutton-background-color-default-selected-emphasized, var(--spectrum-accent-background-color-default));
+ --mod-actionbutton-background-color-hover: var(--mod-actionbutton-background-color-hover-selected-emphasized, var(--spectrum-accent-background-color-hover));
+ --mod-actionbutton-background-color-down: var(--mod-actionbutton-background-color-down-selected-emphasized, var(--spectrum-accent-background-color-down));
+ --mod-actionbutton-background-color-focus: var(--mod-actionbutton-background-color-focus-selected-emphasized, var(--spectrum-accent-background-color-key-focus));
+
+ --mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-default-selected-emphasized, var(--spectrum-white));
+ --mod-actionbutton-content-color-hover: var(--mod-actionbutton-content-color-hover-selected-emphasized, var(--spectrum-white));
+ --mod-actionbutton-content-color-down: var(--mod-actionbutton-content-color-down-selected-emphasized, var(--spectrum-white));
+ --mod-actionbutton-content-color-focus: var(--mod-actionbutton-content-color-focus-selected-emphasized, var(--spectrum-white));
+ }
- &:hover {
- --mod-actionbutton-background-color-default: var(--mod-actionbutton-background-color-hover, var(--spectrum-actionbutton-background-color-hover));
- --mod-actionbutton-border-color-default: var(--mod-actionbutton-border-color-hover, var(--spectrum-actionbutton-border-color-hover));
- --mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-hover, var(--spectrum-neutral-content-color-hover));
- }
+ &.spectrum-ActionButton--staticWhite {
+ --spectrum-actionbutton-background-color-default: var(--spectrum-transparent-white-800);
+ --spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-white-900);
+ --spectrum-actionbutton-background-color-down: var(--spectrum-transparent-white-900);
+ --spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-white-900);
+ --spectrum-actionbutton-background-color-disabled: var(--spectrum-disabled-static-white-background-color);
+
+ --spectrum-actionbutton-content-color-default: var(--spectrum-black);
+ --spectrum-actionbutton-content-color-hover: var(--spectrum-black);
+ --spectrum-actionbutton-content-color-down: var(--spectrum-black);
+ --spectrum-actionbutton-content-color-focus: var(--spectrum-black);
+ }
- &:focus-visible {
- --mod-actionbutton-background-color-default: var(--mod-actionbutton-background-color-focus, var(--spectrum-actionbutton-background-color-focus));
- --mod-actionbutton-border-color-default: var(--mod-actionbutton-border-color-focus, var(--spectrum-actionbutton-border-color-focus));
- --mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-focus, var(--spectrum-neutral-content-color-key-focus));
+ &.spectrum-ActionButton--staticBlack {
+ --spectrum-actionbutton-background-color-default: var(--spectrum-transparent-black-800);
+ --spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-black-900);
+ --spectrum-actionbutton-background-color-down: var(--spectrum-transparent-black-900);
+ --spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-black-900);
+ --spectrum-actionbutton-background-color-disabled: var(--spectrum-disabled-static-black-background-color);
+
+ --spectrum-actionbutton-content-color-default: var(--spectrum-white);
+ --spectrum-actionbutton-content-color-hover: var(--spectrum-white);
+ --spectrum-actionbutton-content-color-down: var(--spectrum-white);
+ --spectrum-actionbutton-content-color-focus: var(--spectrum-white);
+ }
}
+}
- &:active {
- --mod-actionbutton-background-color-default: var(--mod-actionbutton-background-color-down, var(--spectrum-actionbutton-background-color-down));
- --mod-actionbutton-border-color-default: var(--mod-actionbutton-border-color-down, var(--spectrum-actionbutton-border-color-down));
- --mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-down, var(--spectrum-neutral-content-color-down));
- }
+.spectrum-ActionButton--sizeXS {
+ --spectrum-actionbutton-border-radius: var(--spectrum-corner-radius-medium-size-extra-small);
- &:disabled,
- &.is-disabled {
- --mod-actionbutton-background-color-default: var(--mod-actionbutton-background-color-disabled, var(--spectrum-actionbutton-background-color-disabled));
- --mod-actionbutton-border-color-default: var(--mod-actionbutton-border-color-disabled, var(--spectrum-actionbutton-border-color-disabled));
- --mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-disabled, var(--spectrum-disabled-content-color));
- }
-}
+ --spectrum-actionbutton-min-width: calc((var(--spectrum-component-edge-to-visual-only-50) * 2) + var(--spectrum-workflow-icon-size-50));
+ --spectrum-actionbutton-height: var(--spectrum-component-height-50);
-.spectrum-ActionButton,
-.spectrum-ActionButton--sizeM {
- --spectrum-actionbutton-sized-height: var(--spectrum-component-height-100);
- --spectrum-actionbutton-sized-icon-size: var(--spectrum-workflow-icon-size-100);
- --spectrum-actionbutton-sized-font-size: var(--spectrum-font-size-100);
- --spectrum-actionbutton-sized-text-to-visual: var(--spectrum-text-to-visual-100);
- --spectrum-actionbutton-sized-edge-to-hold-icon: var(--spectrum-action-button-edge-to-hold-icon-medium);
- --spectrum-actionbutton-sized-edge-to-visual: var(--spectrum-component-edge-to-visual-100);
- --spectrum-actionbutton-sized-edge-to-text: var(--spectrum-component-edge-to-text-100);
- --spectrum-actionbutton-sized-edge-to-visual-only: var(--spectrum-component-edge-to-visual-only-100);
-}
+ --spectrum-actionbutton-icon-size: var(--spectrum-workflow-icon-size-50);
+ --spectrum-actionbutton-font-size: var(--spectrum-font-size-50);
+ --spectrum-actionbutton-text-to-visual: var(--spectrum-text-to-visual-50);
+ --spectrum-actionbutton-edge-to-hold-icon: var(--spectrum-action-button-edge-to-hold-icon-extra-small);
+ --spectrum-actionbutton-edge-to-visual: var(--spectrum-component-edge-to-visual-50);
+ --spectrum-actionbutton-edge-to-text: var(--spectrum-component-edge-to-text-50);
+ --spectrum-actionbutton-edge-to-visual-only: var(--spectrum-component-edge-to-visual-only-50);
-.spectrum-ActionButton--sizeXS {
- --spectrum-actionbutton-sized-height: var(--spectrum-component-height-50);
- --spectrum-actionbutton-sized-icon-size: var(--spectrum-workflow-icon-size-50);
- --spectrum-actionbutton-sized-font-size: var(--spectrum-font-size-50);
- --spectrum-actionbutton-sized-text-to-visual: var(--spectrum-text-to-visual-50);
- --spectrum-actionbutton-sized-edge-to-hold-icon: var(--spectrum-action-button-edge-to-hold-icon-extra-small);
- --spectrum-actionbutton-sized-edge-to-visual: var(--spectrum-component-edge-to-visual-50);
- --spectrum-actionbutton-sized-edge-to-text: var(--spectrum-component-edge-to-text-50);
- --spectrum-actionbutton-sized-edge-to-visual-only: var(--spectrum-component-edge-to-visual-only-50);
+ --spectrum-actionbutton-downstate-perspective: var(--spectrum-component-size-minimum-perspective-down);
}
.spectrum-ActionButton--sizeS {
- --spectrum-actionbutton-sized-height: var(--spectrum-component-height-75);
- --spectrum-actionbutton-sized-icon-size: var(--spectrum-workflow-icon-size-75);
- --spectrum-actionbutton-sized-font-size: var(--spectrum-font-size-75);
- --spectrum-actionbutton-sized-text-to-visual: var(--spectrum-text-to-visual-75);
- --spectrum-actionbutton-sized-edge-to-hold-icon: var(--spectrum-action-button-edge-to-hold-icon-small);
- --spectrum-actionbutton-sized-edge-to-visual: var(--spectrum-component-edge-to-visual-75);
- --spectrum-actionbutton-sized-edge-to-text: var(--spectrum-component-edge-to-text-75);
- --spectrum-actionbutton-sized-edge-to-visual-only: var(--spectrum-component-edge-to-visual-only-75);
+ --spectrum-actionbutton-border-radius: var(--spectrum-corner-radius-medium-size-small);
+
+ --spectrum-actionbutton-min-width: calc((var(--spectrum-component-edge-to-visual-only-75) * 2) + var(--spectrum-workflow-icon-size-75));
+ --spectrum-actionbutton-height: var(--spectrum-component-height-75);
+
+ --spectrum-actionbutton-icon-size: var(--spectrum-workflow-icon-size-75);
+ --spectrum-actionbutton-font-size: var(--spectrum-font-size-75);
+ --spectrum-actionbutton-text-to-visual: var(--spectrum-text-to-visual-75);
+ --spectrum-actionbutton-edge-to-hold-icon: var(--spectrum-action-button-edge-to-hold-icon-small);
+ --spectrum-actionbutton-edge-to-visual: var(--spectrum-component-edge-to-visual-75);
+ --spectrum-actionbutton-edge-to-text: var(--spectrum-component-edge-to-text-75);
+ --spectrum-actionbutton-edge-to-visual-only: var(--spectrum-component-edge-to-visual-only-75);
+
+ --spectrum-actionbutton-downstate-perspective: var(--spectrum-component-size-minimum-perspective-down);
}
.spectrum-ActionButton--sizeL {
- --spectrum-actionbutton-sized-height: var(--spectrum-component-height-200);
- --spectrum-actionbutton-sized-icon-size: var(--spectrum-workflow-icon-size-200);
- --spectrum-actionbutton-sized-font-size: var(--spectrum-font-size-200);
- --spectrum-actionbutton-sized-text-to-visual: var(--spectrum-text-to-visual-200);
- --spectrum-actionbutton-sized-edge-to-hold-icon: var(--spectrum-action-button-edge-to-hold-icon-large);
- --spectrum-actionbutton-sized-edge-to-visual: var(--spectrum-component-edge-to-visual-200);
- --spectrum-actionbutton-sized-edge-to-text: var(--spectrum-component-edge-to-text-200);
- --spectrum-actionbutton-sized-edge-to-visual-only: var(--spectrum-component-edge-to-visual-only-200);
+ --spectrum-actionbutton-border-radius: var(--spectrum-corner-radius-medium-size-large);
+
+ --spectrum-actionbutton-min-width: calc((var(--spectrum-component-edge-to-visual-only-200) * 2) + var(--spectrum-workflow-icon-size-200));
+ --spectrum-actionbutton-height: var(--spectrum-component-height-200);
+
+ --spectrum-actionbutton-icon-size: var(--spectrum-workflow-icon-size-200);
+ --spectrum-actionbutton-font-size: var(--spectrum-font-size-200);
+ --spectrum-actionbutton-text-to-visual: var(--spectrum-text-to-visual-200);
+ --spectrum-actionbutton-edge-to-hold-icon: var(--spectrum-action-button-edge-to-hold-icon-large);
+ --spectrum-actionbutton-edge-to-visual: var(--spectrum-component-edge-to-visual-200);
+ --spectrum-actionbutton-edge-to-text: var(--spectrum-component-edge-to-text-200);
+ --spectrum-actionbutton-edge-to-visual-only: var(--spectrum-component-edge-to-visual-only-200);
}
.spectrum-ActionButton--sizeXL {
- --spectrum-actionbutton-sized-height: var(--spectrum-component-height-300);
- --spectrum-actionbutton-sized-icon-size: var(--spectrum-workflow-icon-size-300);
- --spectrum-actionbutton-sized-font-size: var(--spectrum-font-size-300);
- --spectrum-actionbutton-sized-text-to-visual: var(--spectrum-text-to-visual-300);
- --spectrum-actionbutton-sized-edge-to-hold-icon: var(--spectrum-action-button-edge-to-hold-icon-extra-large);
- --spectrum-actionbutton-sized-edge-to-visual: var(--spectrum-component-edge-to-visual-300);
- --spectrum-actionbutton-sized-edge-to-text: var(--spectrum-component-edge-to-text-300);
- --spectrum-actionbutton-sized-edge-to-visual-only: var(--spectrum-component-edge-to-visual-only-300);
+ --spectrum-actionbutton-border-radius: var(--spectrum-corner-radius-medium-size-extra-large);
+
+ --spectrum-actionbutton-min-width: calc((var(--spectrum-component-edge-to-visual-only-300) * 2) + var(--spectrum-workflow-icon-size-300));
+ --spectrum-actionbutton-height: var(--spectrum-component-height-300);
+
+ --spectrum-actionbutton-icon-size: var(--spectrum-workflow-icon-size-300);
+ --spectrum-actionbutton-font-size: var(--spectrum-font-size-300);
+ --spectrum-actionbutton-text-to-visual: var(--spectrum-text-to-visual-300);
+ --spectrum-actionbutton-edge-to-hold-icon: var(--spectrum-action-button-edge-to-hold-icon-extra-large);
+ --spectrum-actionbutton-edge-to-visual: var(--spectrum-component-edge-to-visual-300);
+ --spectrum-actionbutton-edge-to-text: var(--spectrum-component-edge-to-text-300);
+ --spectrum-actionbutton-edge-to-visual-only: var(--spectrum-component-edge-to-visual-only-300);
}
.spectrum-ActionButton {
- /* Variables leveraging t-shirt sizing */
- --spectrum-actionbutton-height: var(--mod-actionbutton-height, var(--spectrum-actionbutton-sized-height));
- --spectrum-actionbutton-icon-size: var(--mod-actionbutton-icon-size, var(--spectrum-actionbutton-sized-icon-size));
- --spectrum-actionbutton-font-size: var(--mod-actionbutton-font-size, var(--spectrum-actionbutton-sized-font-size));
- --spectrum-actionbutton-text-to-visual: var(--mod-actionbutton-text-to-visual, var(--spectrum-actionbutton-sized-text-to-visual));
- --spectrum-actionbutton-edge-to-hold-icon: var(--mod-actionbutton-edge-to-hold-icon, var(--spectrum-actionbutton-sized-edge-to-hold-icon));
-
- --spectrum-actionbutton-edge-to-visual: var(--mod-actionbutton-edge-to-visual, calc(var(--spectrum-actionbutton-sized-edge-to-visual) - var(--spectrum-actionbutton-border-width)));
- --spectrum-actionbutton-edge-to-text: var(--mod-actionbutton-edge-to-text, calc(var(--spectrum-actionbutton-sized-edge-to-text) - var(--spectrum-actionbutton-border-width)));
- --spectrum-actionbutton-edge-to-visual-only: var(--mod-actionbutton-edge-to-visual-only, calc(var(--spectrum-actionbutton-sized-edge-to-visual-only) - var(--spectrum-actionbutton-border-width)));
-
@extend %spectrum-BaseButton;
-
position: relative;
- min-inline-size: var(--mod-actionbutton-min-width, calc(var(--mod-actionbutton-edge-to-visual-only, var(--spectrum-actionbutton-sized-edge-to-visual-only)) * 2 + var(--spectrum-actionbutton-icon-size)));
- block-size: var(--spectrum-actionbutton-height);
+ min-inline-size: var(--mod-actionbutton-min-width, var(--spectrum-actionbutton-min-width));
+ block-size: var(--mod-actionbutton-height, var(--spectrum-actionbutton-height));
+ line-height: var(--mod-actionbutton-line-height, var(--spectrum-actionbutton-line-height));
- border-radius: var(--spectrum-actionbutton-border-radius);
+ border-radius: var(--mod-actionbutton-border-radius, var(--spectrum-actionbutton-border-radius));
border-width: var(--spectrum-actionbutton-border-width);
+ border-color: var(--highcontrast-actionbutton-border-color, var(--spectrum-actionbutton-border-color));
+ border-style: solid;
- gap: calc(var(--spectrum-actionbutton-text-to-visual) + var(--spectrum-actionbutton-edge-to-text) - var(--spectrum-actionbutton-edge-to-visual-only));
-
- /* Start with text-only padding */
- padding-inline: var(--spectrum-actionbutton-edge-to-text);
-
- background-color: var(--spectrum-actionbutton-background-color);
- border-color: var(--spectrum-actionbutton-border-color);
- color: var(--spectrum-actionbutton-content-color);
-
- transition: border-color var(--mod-actionbutton-animation-duration, var(--spectrum-animation-duration-100)) ease-in-out;
-
- &::after {
- position: absolute;
- inset: 0;
-
- margin: calc((var(--spectrum-actionbutton-focus-indicator-gap) + var(--spectrum-actionbutton-border-width)) * -1);
+ gap: var(--mod-actionbutton-text-to-visual, var(--spectrum-actionbutton-text-to-visual));
+ padding-inline: calc(var(--mod-actionbutton-edge-to-text, var(--spectrum-actionbutton-edge-to-text)) - var(--spectrum-actionbutton-border-width));
- border-radius: var(--mod-actionbutton-focus-indicator-border-radius, calc(var(--spectrum-actionbutton-border-radius) + var(--spectrum-actionbutton-focus-indicator-gap)));
+ background-color: var(--highcontrast-actionbutton-background-color-default, var(--mod-actionbutton-background-color-default, var(--spectrum-actionbutton-background-color-default)));
+ color: var(--highcontrast-actionbutton-content-color-default, var(--mod-actionbutton-content-color-default, var(--spectrum-actionbutton-content-color-default)));
- transition: box-shadow var(--mod-actionbutton-animation-duration, var(--spectrum-animation-duration-100)) ease-in-out;
-
- pointer-events: none;
- content: "";
+ &:hover {
+ background-color: var(--highcontrast-actionbutton-background-color-default, var(--mod-actionbutton-background-color-hover, var(--spectrum-actionbutton-background-color-hover)));
+ color: var(--highcontrast-actionbutton-content-color-default, var(--mod-actionbutton-content-color-hover, var(--spectrum-actionbutton-content-color-hover)));
}
&:focus-visible {
- /* kill the default ring */
- box-shadow: none;
- outline: none;
+ background-color: var(--highcontrast-actionbutton-background-color-default, var(--mod-actionbutton-background-color-focus, var(--spectrum-actionbutton-background-color-focus)));
+ color: var(--highcontrast-actionbutton-content-color-default, var(--mod-actionbutton-content-color-focus, var(--spectrum-actionbutton-content-color-focus)));
+ }
- &::after {
- box-shadow: 0 0 0 var(--spectrum-actionbutton-focus-indicator-thickness) var(--spectrum-actionbutton-focus-indicator-color);
- }
+ &:active {
+ background-color: var(--highcontrast-actionbutton-background-color-default, var(--mod-actionbutton-background-color-down, var(--spectrum-actionbutton-background-color-down)));
+ color: var(--highcontrast-actionbutton-content-color-default, var(--mod-actionbutton-content-color-down, var(--spectrum-actionbutton-content-color-down)));
+ transform: perspective(var(--spectrum-actionbutton-downstate-perspective)) translateZ(var(--spectrum-component-size-difference-down));
+ }
+
+ &:disabled,
+ &.is-disabled {
+ background-color: var(--highcontrast-actionbutton-background-color-disabled, var(--mod-actionbutton-background-color-disabled, var(--spectrum-actionbutton-background-color-disabled)));
+ color: var(--highcontrast-actionbutton-content-color-disabled, var(--mod-actionbutton-content-color-disabled, var(--spectrum-actionbutton-content-color-disabled)));
}
}
@@ -285,32 +280,31 @@ a.spectrum-ActionButton {
@extend %spectrum-AnchorButton;
}
-/* Nested sub-component: Icon */
.spectrum-ActionButton-icon {
@extend %spectrum-ButtonIcon;
- inline-size: var(--spectrum-actionbutton-icon-size);
- block-size: var(--spectrum-actionbutton-icon-size);
-
- /* adjust icon positioning to match UI kit */
- margin-inline-start: calc(var(--spectrum-actionbutton-edge-to-visual) - var(--spectrum-actionbutton-edge-to-text));
- margin-inline-end: calc(var(--spectrum-actionbutton-edge-to-visual-only) - var(--spectrum-actionbutton-edge-to-text));
-
+ inline-size: var(--mod-actionbutton-icon-size, var(--spectrum-actionbutton-icon-size));
+ block-size: var(--mod-actionbutton-icon-size, var(--spectrum-actionbutton-icon-size));
color: inherit;
+}
- /* Augment the margin correction for the icon only scenario */
- .spectrum-ActionButton-hold + &,
- &:only-child {
- margin-inline-start: calc(var(--spectrum-actionbutton-edge-to-visual-only) - var(--spectrum-actionbutton-edge-to-text));
- }
+/* Icon and label text */
+.spectrum-ActionButton:has(.spectrum-ActionButton-icon) {
+ padding-inline-start: calc(var(--mod-actionbutton-edge-to-visual, var(--spectrum-actionbutton-edge-to-visual)) - var(--spectrum-actionbutton-border-width));
+}
+
+/* Icon only */
+.spectrum-ActionButton:not(:has(.spectrum-ActionButton-label)) {
+ padding-inline: calc(var(--mod-actionbutton-edge-to-visual-only, var(--spectrum-actionbutton-edge-to-visual-only)) - var(--spectrum-actionbutton-border-width));
}
.spectrum-ActionButton-label {
@extend %spectrum-ButtonLabel;
pointer-events: none;
- line-height: var(--spectrum-actionbutton-height);
- font-size: var(--spectrum-actionbutton-font-size);
+ font-size: var(--mod-actionbutton-font-size, var(--spectrum-actionbutton-font-size));
+ font-weight: var(--mod-actionbutton-font-weight, var(--spectrum-actionbutton-font-weight));
+ font-style: var(--mod-actionbutton-font-style, var(--spectrum-actionbutton-font-style));
white-space: nowrap;
color: var(--mod-actionbutton-label-color, inherit);
@@ -320,10 +314,103 @@ a.spectrum-ActionButton {
.spectrum-ActionButton-hold {
position: absolute;
- inset-inline-end: calc(var(--spectrum-actionbutton-edge-to-hold-icon) - var(--spectrum-actionbutton-border-width));
- inset-block-end: calc(var(--spectrum-actionbutton-edge-to-hold-icon) - var(--spectrum-actionbutton-border-width));
-
+ inset-inline-end: calc(var(--mod-actionbutton-edge-to-hold-icon, var(--spectrum-actionbutton-edge-to-hold-icon)) - var(--spectrum-actionbutton-border-width));
+ inset-block-end: calc(var(--mod-actionbutton-edge-to-hold-icon, var(--spectrum-actionbutton-edge-to-hold-icon)) - var(--spectrum-actionbutton-border-width));
color: inherit;
+ transform: var(--spectrum-logical-rotation);
+}
+
+/* Focus indicator */
+.spectrum-ActionButton {
+ transition: border-color var(--highcontrast-actionbutton-animation-duration, var(--mod-actionbutton-animation-duration, var(--spectrum-actionbutton-animation-duration))) ease-in-out;
+
+ &::after {
+ position: absolute;
+ inset: 0;
+ margin: calc((var(--mod-actionbutton-focus-indicator-gap, var(--spectrum-actionbutton-focus-indicator-gap)) + var(--spectrum-actionbutton-border-width)) * -1);
+ border-radius: var(--mod-actionbutton-focus-indicator-border-radius, var(--spectrum-actionbutton-focus-indicator-border-radius));
+ transition: box-shadow var(--highcontrast-actionbutton-animation-duration, var(--mod-actionbutton-animation-duration, var(--spectrum-actionbutton-animation-duration))) ease-in-out;
+ pointer-events: none;
+ content: "";
+ }
+
+ &:focus-visible {
+ box-shadow: none;
+ outline: none;
+
+ &::after {
+ box-shadow: 0 0 0 var(--mod-actionbutton-focus-indicator-thickness, var(--spectrum-actionbutton-focus-indicator-thickness)) var(--highcontrast-actionbutton-focus-indicator-color, var(--mod-actionbutton-focus-indicator-color, var(--spectrum-actionbutton-focus-indicator-color)));
+ }
+ }
+}
+
+@media (forced-colors: active) {
+ .spectrum-ActionButton {
+ /**
+ * Default
+ * - Uses "Button*" system color pairings.
+ * - Focus indicator is outside the element and should contrast with its background (default of Canvas).
+ */
+ --highcontrast-actionbutton-border-color: ButtonBorder;
+ --highcontrast-actionbutton-background-color-default: ButtonFace;
+ --highcontrast-actionbutton-content-color-default: ButtonText;
+
+ --highcontrast-actionbutton-background-color-disabled: ButtonFace;
+ --highcontrast-actionbutton-content-color-disabled: GrayText;
+
+ --highcontrast-actionbutton-focus-indicator-color: CanvasText;
+
+ /**
+ * Avoid performance and rendering issues with transitions between system colors.
+ * Fixes bug in Windows High Contrast where border flashes the wrong color after hover (quiet).
+ */
+ --highcontrast-actionbutton-animation-duration: 0;
+
+ &::after {
+ /* Make sure the box-shadow for the focus indicator renders. */
+ forced-color-adjust: none;
+ }
- transform: var(--spectrum-logical-rotation,);
+ .spectrum-ActionButton-icon,
+ .spectrum-ActionButton-hold,
+ .spectrum-ActionButton-label {
+ /* Removes the extra unwanted background on label ("readability backplate") that can cause text to be unreadable. */
+ forced-color-adjust: none;
+ }
+
+ /**
+ * Quiet
+ * - Default blends in with background and has no border.
+ * - Quiet + disabled does not show border unless selected.
+ */
+ &.spectrum-ActionButton--quiet {
+ --highcontrast-actionbutton-border-color: Canvas;
+ --highcontrast-actionbutton-background-color-default: Canvas;
+ --highcontrast-actionbutton-background-color-disabled: Canvas;
+ --highcontrast-actionbutton-content-color-default: CanvasText;
+
+ &:disabled:not(.is-selected) {
+ --highcontrast-actionbutton-border-color: Canvas;
+ }
+ }
+
+ /* Interaction shows a change in border color. */
+ &:hover,
+ &:active,
+ &:focus-visible {
+ --highcontrast-actionbutton-border-color: Highlight;
+ }
+
+ /* Selected always shows as a solid highlighted color. */
+ &.is-selected {
+ --highcontrast-actionbutton-border-color: Highlight;
+ --highcontrast-actionbutton-background-color-default: Highlight;
+ --highcontrast-actionbutton-content-color-default: HighlightText;
+ }
+
+ /* Disabled has a GrayText border and content color. */
+ &:disabled {
+ --highcontrast-actionbutton-border-color: GrayText;
+ }
+ }
}
diff --git a/components/actionbutton/package.json b/components/actionbutton/package.json
index 8da72e88bf0..ae14aa05cb8 100644
--- a/components/actionbutton/package.json
+++ b/components/actionbutton/package.json
@@ -1,6 +1,6 @@
{
"name": "@spectrum-css/actionbutton",
- "version": "7.1.3",
+ "version": "8.0.0-next.2",
"description": "The Spectrum CSS action button component",
"license": "Apache-2.0",
"author": "Adobe",
@@ -25,8 +25,8 @@
},
"main": "dist/index.css",
"peerDependencies": {
- "@spectrum-css/icon": ">=9.0.0 <10.0.0",
- "@spectrum-css/tokens": ">=16.0.0 <17.0.0"
+ "@spectrum-css/icon": ">=10.0.0-next.0",
+ "@spectrum-css/tokens": ">=16.1.0-next.0"
},
"peerDependenciesMeta": {
"@spectrum-css/icon": {
@@ -37,9 +37,9 @@
}
},
"devDependencies": {
- "@spectrum-css/commons": "11.0.0",
- "@spectrum-css/icon": "9.1.0",
- "@spectrum-css/tokens": "16.0.2"
+ "@spectrum-css/commons": "12.0.0-next.0",
+ "@spectrum-css/icon": "10.0.0-next.2",
+ "@spectrum-css/tokens": "16.1.0-next.5"
},
"keywords": [
"design-system",
diff --git a/components/actionbutton/stories/actionbutton.stories.js b/components/actionbutton/stories/actionbutton.stories.js
index a08f0f7bbfc..d1599920baa 100644
--- a/components/actionbutton/stories/actionbutton.stories.js
+++ b/components/actionbutton/stories/actionbutton.stories.js
@@ -1,22 +1,18 @@
import { default as IconStories } from "@spectrum-css/icon/stories/icon.stories.js";
-import { Sizes } from "@spectrum-css/preview/decorators";
+import { Sizes, withDownStateDimensionCapture } from "@spectrum-css/preview/decorators";
import { disableDefaultModes } from "@spectrum-css/preview/modes";
import { isActive, isDisabled, isEmphasized, isFocused, isHovered, isQuiet, isSelected, size, staticColor } from "@spectrum-css/preview/types";
import metadata from "../dist/metadata.json";
import packageJson from "../package.json";
import { ActionButtonGroup } from "./actionbutton.test.js";
-import { ActionButtonsWithIconOptions, IconOnlyOption, TreatmentTemplate } from "./template.js";
+import { ActionButtonsWithIconOptions, IconOnlyOption, Template, TreatmentTemplate } from "./template.js";
/**
* The action button component represents an action a user can take.
*
* ## Usage notes
*
- * For action buttons that only contain an icon with no label, do not include the element with the `.spectrum-ActionButton-label` class in the markup. If an icon and a label are both used, ensure that the element with the `.spectrum-ActionButton-label` class comes after the `.spectrum-Icon` element.
- *
- * If the hold icon is used, ensure that the element with the `.spectrum-ActionButton-hold` class comes before the `.spectrum-Icon` element.
- *
- * When using `.spectrum-ActionButton--staticWhite` or `.spectrum-ActionButton--staticBlack`, use the `--mod-actionbutton-content-color-default` custom property to set the text color when selected.
+ * For action buttons that only contain an icon with no label, do not include the element with the `.spectrum-ActionButton-label` class in the markup.
*/
export default {
title: "Action button",
@@ -25,6 +21,7 @@ export default {
size: size(["xs", "s", "m", "l", "xl"]),
iconName: {
...(IconStories?.argTypes?.iconName ?? {}),
+ name: "Workflow icon",
if: false,
},
label: {
@@ -37,9 +34,15 @@ export default {
control: { type: "text" },
},
isQuiet,
- isEmphasized,
+ isEmphasized: {
+ ...isEmphasized,
+ if: { arg: "staticColor", truthy: false },
+ },
isDisabled,
- isSelected,
+ isSelected: {
+ ...isSelected,
+ description: "An optional state used when treating the action button as a toggle.",
+ },
isHovered,
isFocused,
isActive,
@@ -63,7 +66,10 @@ export default {
control: "select",
options: ["true", "menu", "listbox", "tree", "grid", "dialog", "false"],
},
- staticColor,
+ staticColor: {
+ ...staticColor,
+ if: { arg: "isEmphasized", truthy: false },
+ },
},
args: {
rootClass: "spectrum-ActionButton",
@@ -88,14 +94,24 @@ export default {
type: "figma",
url: "https://www.figma.com/design/Mngz9H7WZLbrCvGQf3GnsY/S2-%2F-Desktop?node-id=702-2877",
},
+ downState: {
+ selectors: [".spectrum-ActionButton:not(:disabled)"],
+ },
packageJson,
metadata,
docs: {
story: {
height: "auto",
},
- }
+ },
+ status: {
+ type: "migrated",
+ },
},
+ decorators: [
+ withDownStateDimensionCapture,
+ ],
+ tags: ["migrated"],
};
export const Default = ActionButtonGroup.bind({});
@@ -106,7 +122,9 @@ Default.tags = ["!autodocs"];
/**
* Action buttons should always have a label, unless they are only using an icon that is universally understood and accessible. They can have an optional icon, but it should not be used for decoration. Use an icon only when necessary and when it has a strong association with the label text.
*
- * The label can be hidden to create an icon-only action button. If the label is hidden, an icon is required, and the label will appear in a tooltip on hover.
+ * The label can be hidden to create an icon-only action button. If the label is hidden, an icon is required, and the implementation should show the label with a tooltip on hover.
+ *
+ * Action buttons can be used as toggles instead of for taking direct action. The optional "selected" state displayed below is used for when the action button is toggleable.
*/
export const Standard = TreatmentTemplate.bind({});
Standard.args = Default.args;
@@ -117,7 +135,9 @@ Standard.parameters = {
Standard.storyName = "Default";
/**
- * The emphasized action button has a blue background for its selected state in order to provide a visual prominence. This is optimal for when the selection should call attention, such as within a tool bar.
+ * The emphasized action button has a blue background for its selected state in order to provide a visual prominence.
+ * This is optimal for when the selection should call attention, such as within a tool bar.
+ * For this variant, the `.spectrum-ActionButton--emphasized` class is applied to `.spectrum-ActionButton`.
*/
export const Emphasized = TreatmentTemplate.bind({});
Emphasized.tags = ["!dev"];
@@ -130,9 +150,6 @@ Emphasized.parameters = {
},
};
-/**
- * Adding the `.spectrum-ActionButton--emphasized` class to a quiet action button can be effective in calling attention.
- */
export const EmphasizedQuiet = TreatmentTemplate.bind({});
EmphasizedQuiet.tags = ["!dev"];
EmphasizedQuiet.args = {
@@ -144,7 +161,7 @@ EmphasizedQuiet.parameters = {
disableSnapshot: true,
},
};
-EmphasizedQuiet.storyName = "Emphasized (quiet)";
+EmphasizedQuiet.storyName = "Quiet, emphasized";
/**
* Quiet action buttons have no visible background until they’re interacted with. This style works best when a clear layout (vertical stack, table, grid) makes it easy to parse the buttons. Too many quiet components in a small space can be hard to read.
@@ -161,7 +178,10 @@ Quiet.parameters = {
};
/**
- * An action button can have a hold icon (a small corner triangle). This icon indicates that holding down the action button for a short amount of time can reveal a popover menu, which can be used, for example, to switch between related actions. Because of the way padding is calculated, the hold icon must be placed before the workflow icon in the markup.
+ * An action button can have a hold icon (a small corner triangle). This icon indicates that holding down the action button for a
+ * short amount of time can reveal a [popover](/docs/components-popover--docs) menu, which can be used, for example, to switch
+ * between related actions. Note that this popover menu is not demonstrated here—this would be handled by the implementation.
+ * Because of the way padding is calculated, the hold icon must be placed before the workflow icon in the markup.
*/
export const HoldIcon = IconOnlyOption.bind({});
HoldIcon.tags = ["!dev"];
@@ -190,6 +210,14 @@ StaticWhiteQuiet.parameters = {
chromatic: { disableSnapshot: true }
};
+/**
+ * When an action button needs to be placed on top of a color background or a visual, use the static color
+ * option. Use static black on light color or image backgrounds, and static white on dark color or image
+ * backgrounds, regardless of the color theme. For more info, see the
+ * [design guidelines](https://spectrum.adobe.com/page/action-button/#Static-color).
+ *
+ * Emphasized is not supported for the static black and static white variants.
+ */
export const StaticBlackDocs = TreatmentTemplate.bind({});
StaticBlackDocs.tags = ["!dev"];
StaticBlackDocs.args = {
@@ -226,6 +254,28 @@ Sizing.parameters = {
chromatic: { disableSnapshot: true },
};
+/**
+ * When the action button text is too long for the available horizontal space, it truncates at the end.
+ * To demonstrate what this looks like, this example sets a maximum width on the button.
+ *
+ * Implementations should also reveal the full text on hover, per this component's
+ * [design guidelines on text overflow](https://spectrum.adobe.com/page/action-button/#Text-overflow).
+ * This is not demonstrated here.
+ */
+export const TextOverflowBehavior = Template.bind({});
+TextOverflowBehavior.tags = ["!dev"];
+TextOverflowBehavior.args = {
+ label: "This is extra long text that will cause text truncation",
+ customStyles: {
+ "max-inline-size": "120px",
+ },
+};
+TextOverflowBehavior.parameters = {
+ chromatic: {
+ disableSnapshot: true,
+ },
+};
+
// ********* VRT ONLY ********* //
export const WithForcedColors = ActionButtonGroup.bind({});
WithForcedColors.args = Default.args;
diff --git a/components/actionbutton/stories/actionbutton.test.js b/components/actionbutton/stories/actionbutton.test.js
index fb37fdc910f..4a26724f80b 100644
--- a/components/actionbutton/stories/actionbutton.test.js
+++ b/components/actionbutton/stories/actionbutton.test.js
@@ -62,11 +62,6 @@ export const ActionButtonGroup = Variants({
testHeading: "Static black",
staticColor: "black",
},
- {
- testHeading: "Static black - emphasized",
- staticColor: "black",
- isEmphasized: true,
- },
{
testHeading: "Static black - quiet",
staticColor: "black",
@@ -76,11 +71,6 @@ export const ActionButtonGroup = Variants({
testHeading: "Static white",
staticColor: "white",
},
- {
- testHeading: "Static white - emphasized",
- staticColor: "white",
- isEmphasized: true,
- },
{
testHeading: "Static white - quiet",
staticColor: "white",
diff --git a/components/actionbutton/stories/template.js b/components/actionbutton/stories/template.js
index 425b7e4115c..942c3bccefa 100644
--- a/components/actionbutton/stories/template.js
+++ b/components/actionbutton/stories/template.js
@@ -7,9 +7,6 @@ import { when } from "lit/directives/when.js";
import { capitalize } from "lodash-es";
import "../index.css";
-import "../themes/spectrum.css";
-/* Must be imported last */
-import "../themes/express.css";
/**
* @todo load order should not influence the icon size but it is; fix this
@@ -70,7 +67,6 @@ export const Template = ({
role = "button",
} = {}, context = {}) => {
const { updateArgs } = context;
-
return html`
Icon({
size,
- iconName: "CornerTriangle",
+ iconName: "CornerTriangle" + ({
+ xs: "75",
+ s: "75",
+ m: "100",
+ l: "200",
+ xl: "300",
+ }[size] || "100"),
setName: "ui",
customClasses: [`${rootClass}-hold`],
}, context)
@@ -134,64 +136,74 @@ export const Template = ({
`;
};
+/**
+ * Displays multiple action buttons in a row, with different combinations of
+ * label, icon, and hold button (has popup).
+ */
export const ActionButtonsWithIconOptions = (args, context) => Container({
withBorder: false,
direction: "row",
wrapperStyles: {
columnGap: "12px",
},
- content: html`
- ${Template({
+ content: [
+ Template({
...args,
iconName: undefined,
- }, context)}
- ${Template({
+ }, context),
+ Template({
...args,
- }, context)}
- ${Template({
+ }, context),
+ Template({
...args,
hideLabel: true,
- }, context)}
- ${Template({
+ }, context),
+ Template({
...args,
hideLabel: true,
hasPopup: "true",
- }, context)}
- ${Template({
+ }, context),
+ Template({
...args,
iconName: undefined,
hasPopup: "true",
- }, context)}
- `
+ }, context)
+ ],
}, context);
+/**
+ * Displays two action buttons in a row:
+ * - icon only action button
+ * - icon only action button with hold button (has popup)
+ */
export const IconOnlyOption = (args, context) => Container({
withBorder: false,
direction: "row",
wrapperStyles: {
columnGap: "12px",
},
- content: html`
- ${Template({
+ content: [
+ Template({
...args,
hideLabel: true,
hasPopup: "true",
- }, context)}
- ${Template({
+ }, context),
+ Template({
...args,
hideLabel: true,
isQuiet: true,
hasPopup: "true",
- }, context)}
- `
+ }, context),
+ ],
}, context);
+/**
+ * Displays multiple groups of action buttons for:
+ * default, selected, disabled, and selected + disabled
+ */
export const TreatmentTemplate = (args, context) => Container({
withBorder: false,
direction: "row",
- wrapperStyles: {
- rowGap: "12px",
- },
content: html`${[
{ isSelected: false, isDisabled: false, heading: "Default" },
{ isSelected: true, isDisabled: false, heading: "Selected" },
@@ -200,10 +212,13 @@ export const TreatmentTemplate = (args, context) => Container({
].map(({ isSelected, isDisabled, heading }) => Container({
withBorder: false,
heading: heading,
+ containerStyles: {
+ rowGap: "8px",
+ },
content: ActionButtonsWithIconOptions({
...args,
isSelected,
isDisabled,
- })
+ }, context)
}, context))}`,
}, context);
diff --git a/components/actionbutton/themes/express.css b/components/actionbutton/themes/express.css
deleted file mode 100644
index a2f9f796101..00000000000
--- a/components/actionbutton/themes/express.css
+++ /dev/null
@@ -1,71 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--express */
-
-@import "./spectrum.css";
-
-@container style(--system: express) {
- .spectrum-ActionButton {
- --spectrum-actionbutton-background-color-default: var(--spectrum-gray-200);
- --spectrum-actionbutton-background-color-hover: var(--spectrum-gray-300);
- --spectrum-actionbutton-background-color-down: var(--spectrum-gray-400);
- --spectrum-actionbutton-background-color-focus: var(--spectrum-gray-300);
- --spectrum-actionbutton-background-color-disabled: var(--spectrum-gray-200);
-
- --spectrum-actionbutton-border-color-default: transparent;
- --spectrum-actionbutton-border-color-hover: transparent;
- --spectrum-actionbutton-border-color-down: transparent;
- --spectrum-actionbutton-border-color-focus: transparent;
- --spectrum-actionbutton-border-color-disabled: transparent;
-
- &.spectrum-ActionButton--quiet {
- --spectrum-actionbutton-background-color-default: transparent;
- --spectrum-actionbutton-background-color-hover: var(--spectrum-gray-300);
- --spectrum-actionbutton-background-color-down: var(--spectrum-gray-400);
- --spectrum-actionbutton-background-color-focus: var(--spectrum-gray-300);
- }
-
- &.spectrum-ActionButton--staticBlack,
- &.spectrum-ActionButton--staticWhite {
- --spectrum-actionbutton-border-color-default: transparent;
- --spectrum-actionbutton-border-color-hover: transparent;
- --spectrum-actionbutton-border-color-down: transparent;
- --spectrum-actionbutton-border-color-focus: transparent;
- }
-
- &.spectrum-ActionButton--staticBlack {
- --spectrum-actionbutton-background-color-disabled: transparent;
-
- &,
- &.spectrum-ActionButton--quiet {
- --spectrum-actionbutton-background-color-default: var(--spectrum-transparent-black-200);
- --spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-black-300);
- --spectrum-actionbutton-background-color-down: var(--spectrum-transparent-black-400);
- --spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-black-300);
- }
- }
-
- &.spectrum-ActionButton--staticWhite {
- --spectrum-actionbutton-background-color-disabled: transparent;
-
- &,
- &.spectrum-ActionButton--quiet {
- --spectrum-actionbutton-background-color-default: var(--spectrum-transparent-white-200);
- --spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-white-300);
- --spectrum-actionbutton-background-color-down: var(--spectrum-transparent-white-400);
- --spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-white-300);
- }
- }
- }
-}
diff --git a/components/actionbutton/themes/spectrum-two.css b/components/actionbutton/themes/spectrum-two.css
deleted file mode 100644
index b436e9a77b5..00000000000
--- a/components/actionbutton/themes/spectrum-two.css
+++ /dev/null
@@ -1,112 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-@container style(--system: spectrum) {
- .spectrum-ActionButton {
- --spectrum-actionbutton-background-color-default: var(--spectrum-gray-100);
- --spectrum-actionbutton-background-color-hover: var(--spectrum-gray-200);
- --spectrum-actionbutton-background-color-down: var(--spectrum-gray-200);
- --spectrum-actionbutton-background-color-focus: var(--spectrum-gray-200);
- --spectrum-actionbutton-background-color-disabled: var(--spectrum-disabled-background-color);
-
- --spectrum-actionbutton-background-color-selected: var(--spectrum-neutral-background-color-selected-default);
- --spectrum-actionbutton-background-color-selected-hover: var(--spectrum-neutral-background-color-selected-hover);
- --spectrum-actionbutton-background-color-selected-down: var(--spectrum-neutral-background-color-selected-down);
- --spectrum-actionbutton-background-color-selected-focus: var(--spectrum-neutral-background-color-selected-key-focus);
-
- --spectrum-actionbutton-border-color-default: transparent;
- --spectrum-actionbutton-border-color-hover: transparent;
- --spectrum-actionbutton-border-color-down: transparent;
- --spectrum-actionbutton-border-color-focus: transparent;
- --spectrum-actionbutton-border-color-disabled: transparent;
-
- --spectrum-actionbutton-content-color-selected: var(--spectrum-gray-50);
-
- &.spectrum-ActionButton--sizeM {
- --spectrum-actionbutton-border-radius-default: var(--spectrum-corner-radius-medium-size-medium);
- }
-
- &.spectrum-ActionButton--sizeXS {
- --spectrum-actionbutton-border-radius-default: var(--spectrum-corner-radius-medium-size-extra-small);
- }
-
- &.spectrum-ActionButton--sizeS {
- --spectrum-actionbutton-border-radius-default: var(--spectrum-corner-radius-medium-size-small);
- }
-
- &.spectrum-ActionButton--sizeL {
- --spectrum-actionbutton-border-radius-default: var(--spectrum-corner-radius-medium-size-large);
- }
-
- &.spectrum-ActionButton--sizeXL {
- --spectrum-actionbutton-border-radius-default: var(--spectrum-corner-radius-medium-size-extra-large);
- }
-
- &.spectrum-ActionButton--quiet {
- --spectrum-actionbutton-background-color-default: transparent;
- --spectrum-actionbutton-background-color-hover: var(--spectrum-gray-200);
- --spectrum-actionbutton-background-color-down: var(--spectrum-gray-200);
- --spectrum-actionbutton-background-color-focus: var(--spectrum-gray-200);
- --spectrum-actionbutton-background-color-disabled: transparent;
- --spectrum-actionbutton-background-color-selected-disabled: var(--spectrum-disabled-background-color);
- }
-
- &.spectrum-ActionButton--staticBlack {
- --spectrum-actionbutton-border-color-default: transparent;
- --spectrum-actionbutton-border-color-hover: transparent;
- --spectrum-actionbutton-border-color-down: transparent;
- --spectrum-actionbutton-border-color-focus: transparent;
- --spectrum-actionbutton-border-color-disabled: transparent;
-
- --spectrum-actionbutton-background-color-disabled: var(--spectrum-disabled-static-black-background-color);
- --spectrum-actionbutton-background-color-selected-disabled: var(--spectrum-disabled-static-black-background-color);
-
- --spectrum-actionbutton-background-color-default: var(--spectrum-transparent-black-100);
- --spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-black-200);
- --spectrum-actionbutton-background-color-down: var(--spectrum-transparent-black-200);
- --spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-black-200);
-
- &.spectrum-ActionButton--quiet {
- --spectrum-actionbutton-background-color-default: transparent;
- --spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-black-200);
- --spectrum-actionbutton-background-color-down: var(--spectrum-transparent-black-200);
- --spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-black-200);
- --spectrum-actionbutton-background-color-disabled: transparent;
- }
- }
-
- &.spectrum-ActionButton--staticWhite {
- --spectrum-actionbutton-border-color-default: transparent;
- --spectrum-actionbutton-border-color-hover: transparent;
- --spectrum-actionbutton-border-color-down: transparent;
- --spectrum-actionbutton-border-color-focus: transparent;
- --spectrum-actionbutton-border-color-disabled: transparent;
-
- --spectrum-actionbutton-background-color-disabled: var(--spectrum-disabled-static-white-background-color);
- --spectrum-actionbutton-background-color-selected-disabled: var(--spectrum-disabled-static-white-background-color);
-
- --spectrum-actionbutton-background-color-default: var(--spectrum-transparent-white-100);
- --spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-white-200);
- --spectrum-actionbutton-background-color-down: var(--spectrum-transparent-white-200);
- --spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-white-200);
-
- &.spectrum-ActionButton--quiet {
- --spectrum-actionbutton-background-color-default: transparent;
- --spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-white-200);
- --spectrum-actionbutton-background-color-down: var(--spectrum-transparent-white-200);
- --spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-white-200);
- --spectrum-actionbutton-background-color-disabled: transparent;
- }
- }
- }
-}
diff --git a/components/actionbutton/themes/spectrum.css b/components/actionbutton/themes/spectrum.css
deleted file mode 100644
index 0c07028cf58..00000000000
--- a/components/actionbutton/themes/spectrum.css
+++ /dev/null
@@ -1,93 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--legacy */
-
-@import "./spectrum-two.css";
-
-@container style(--system: legacy) {
- .spectrum-ActionButton {
- --spectrum-actionbutton-background-color-default: var(--spectrum-gray-75);
- --spectrum-actionbutton-background-color-hover: var(--spectrum-gray-200);
- --spectrum-actionbutton-background-color-down: var(--spectrum-gray-300);
- --spectrum-actionbutton-background-color-focus: var(--spectrum-gray-200);
- --spectrum-actionbutton-background-color-disabled: transparent;
- --spectrum-actionbutton-background-color-selected-disabled: var(--spectrum-disabled-background-color);
-
- --spectrum-actionbutton-border-color-default: var(--spectrum-gray-400);
- --spectrum-actionbutton-border-color-hover: var(--spectrum-gray-500);
- --spectrum-actionbutton-border-color-down: var(--spectrum-gray-600);
- --spectrum-actionbutton-border-color-focus: var(--spectrum-gray-500);
- --spectrum-actionbutton-border-color-disabled: var(--spectrum-disabled-border-color);
-
- --spectrum-actionbutton-content-color-selected: var(--spectrum-gray-75);
-
- &.spectrum-ActionButton--sizeXS,
- &.spectrum-ActionButton--sizeS,
- &.spectrum-ActionButton--sizeM,
- &.spectrum-ActionButton--sizeL,
- &.spectrum-ActionButton--sizeXL {
- --spectrum-actionbutton-border-radius-default: var(--spectrum-corner-radius-100);
- }
-
- &.spectrum-ActionButton--quiet {
- --spectrum-actionbutton-background-color-hover: var(--spectrum-gray-200);
- --spectrum-actionbutton-background-color-down: var(--spectrum-gray-300);
- --spectrum-actionbutton-background-color-focus: var(--spectrum-gray-200);
- }
-
- &.spectrum-ActionButton--staticBlack {
- --spectrum-actionbutton-border-color-default: var(--spectrum-transparent-black-400);
- --spectrum-actionbutton-border-color-hover: var(--spectrum-transparent-black-500);
- --spectrum-actionbutton-border-color-down: var(--spectrum-transparent-black-600);
- --spectrum-actionbutton-border-color-focus: var(--spectrum-transparent-black-500);
- --spectrum-actionbutton-border-color-disabled: var(--spectrum-disabled-static-black-border-color);
-
- --spectrum-actionbutton-background-color-default: transparent;
- --spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-black-300);
- --spectrum-actionbutton-background-color-down: var(--spectrum-transparent-black-400);
- --spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-black-300);
- --spectrum-actionbutton-background-color-disabled: transparent;
-
- &.spectrum-ActionButton--quiet {
- --spectrum-actionbutton-background-color-default: transparent;
- --spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-black-300);
- --spectrum-actionbutton-background-color-down: var(--spectrum-transparent-black-400);
- --spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-black-300);
- --spectrum-actionbutton-background-color-disabled: transparent;
- }
- }
-
- &.spectrum-ActionButton--staticWhite {
- --spectrum-actionbutton-border-color-default: var(--spectrum-transparent-white-400);
- --spectrum-actionbutton-border-color-hover: var(--spectrum-transparent-white-500);
- --spectrum-actionbutton-border-color-down: var(--spectrum-transparent-white-600);
- --spectrum-actionbutton-border-color-focus: var(--spectrum-transparent-white-500);
- --spectrum-actionbutton-border-color-disabled: var(--spectrum-disabled-static-white-border-color);
-
- --spectrum-actionbutton-background-color-default: transparent;
- --spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-white-300);
- --spectrum-actionbutton-background-color-down: var(--spectrum-transparent-white-400);
- --spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-white-300);
- --spectrum-actionbutton-background-color-disabled: transparent;
-
- &.spectrum-ActionButton--quiet {
- --spectrum-actionbutton-background-color-default: transparent;
- --spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-white-300);
- --spectrum-actionbutton-background-color-down: var(--spectrum-transparent-white-400);
- --spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-white-300);
- --spectrum-actionbutton-background-color-disabled: transparent;
- }
- }
- }
-}
diff --git a/components/actiongroup/CHANGELOG.md b/components/actiongroup/CHANGELOG.md
index 7a9d2ac5c56..36cd6e0a42d 100644
--- a/components/actiongroup/CHANGELOG.md
+++ b/components/actiongroup/CHANGELOG.md
@@ -1,5 +1,19 @@
# Change log
+## 7.0.0-next.1
+
+### Patch Changes
+
+- Updated dependencies [[`60a156d`](https://github.com/adobe/spectrum-css/commit/60a156d7c0efcc999bc440274bbbbf586beb274b)]:
+ - @spectrum-css/tokens@16.1.0-next.0
+
+## 7.0.0-next.0
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @spectrum-css/actionbutton@8.0.0-next.0
+
## 7.0.0
### Minor Changes
@@ -218,7 +232,7 @@ Output for all component CSS files is now being run through a lightweight optimi
## 4.1.10
-📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/actiongroup@4.1.9...@spectrum-css/actiongroup@4.1.10)
+🗓 2024-01-16 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/actiongroup@4.1.9...@spectrum-css/actiongroup@4.1.10)
**Note:** Version bump only for package @spectrum-css/actiongroup
@@ -334,7 +348,7 @@ Output for all component CSS files is now being run through a lightweight optimi
- refactor(actiongroup)!: replace focus-ring with focus-visible([d792847](https://github.com/adobe/spectrum-css/commit/d792847))
-### 🛑 BREAKING CHANGE
+### 🛑 BREAKING CHANGES
- use native focus-visible pseudo class for focus styling
@@ -370,7 +384,7 @@ Output for all component CSS files is now being run through a lightweight optimi
## 3.0.56
-📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/actiongroup@3.0.55...@spectrum-css/actiongroup@3.0.56)
+🗓 2023-07-14 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/actiongroup@3.0.55...@spectrum-css/actiongroup@3.0.56)
**Note:** Version bump only for package @spectrum-css/actiongroup
@@ -423,6 +437,7 @@ Output for all component CSS files is now being run through a lightweight optimi
## 3.0.48
🗓 2023-06-01 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/actiongroup@3.0.47...@spectrum-css/actiongroup@3.0.48)
+
**Note:** Version bump only for package @spectrum-css/actiongroup
## 3.0.47
diff --git a/components/actiongroup/dist/metadata.json b/components/actiongroup/dist/metadata.json
index c78e7d30965..8d4d2ba86b7 100644
--- a/components/actiongroup/dist/metadata.json
+++ b/components/actiongroup/dist/metadata.json
@@ -53,11 +53,6 @@
"--spectrum-spacing-100",
"--spectrum-spacing-75"
],
- "system-theme": [
- "--system-action-group-gap-size-compact",
- "--system-action-group-horizontal-spacing-compact",
- "--system-action-group-vertical-spacing-compact"
- ],
"passthroughs": ["--mod-actionbutton-focus-indicator-border-radius"],
"high-contrast": []
}
diff --git a/components/actiongroup/index.css b/components/actiongroup/index.css
index bbd26cb0f65..ac427bc8636 100644
--- a/components/actiongroup/index.css
+++ b/components/actiongroup/index.css
@@ -11,9 +11,13 @@
* governing permissions and limitations under the License.
*/
-@import "./themes/spectrum-two.css";
-
.spectrum-ActionGroup {
+ --spectrum-actiongroup-gap-size-compact: 0;
+
+ /* account for button border */
+ --spectrum-actiongroup-horizontal-spacing-compact: -1px;
+ --spectrum-actiongroup-vertical-spacing-compact: -1px;
+
--spectrum-actiongroup-button-spacing-reset: 0;
--spectrum-actiongroup-border-radius-reset: 0;
--spectrum-actiongroup-border-radius: var(--spectrum-corner-radius-100);
diff --git a/components/actiongroup/package.json b/components/actiongroup/package.json
index 96adaf21bfa..b5a704179ef 100644
--- a/components/actiongroup/package.json
+++ b/components/actiongroup/package.json
@@ -1,6 +1,6 @@
{
"name": "@spectrum-css/actiongroup",
- "version": "6.1.0",
+ "version": "7.0.0-next.1",
"description": "The Spectrum CSS actiongroup component",
"license": "Apache-2.0",
"author": "Adobe",
@@ -25,8 +25,8 @@
},
"main": "dist/index.css",
"peerDependencies": {
- "@spectrum-css/actionbutton": ">=7.0.0 <8.0.0",
- "@spectrum-css/tokens": ">=16.0.0 <17.0.0"
+ "@spectrum-css/actionbutton": ">=8.0.0-next.0",
+ "@spectrum-css/tokens": ">=16.1.0-next.0"
},
"peerDependenciesMeta": {
"@spectrum-css/actionbutton": {
@@ -37,8 +37,8 @@
}
},
"devDependencies": {
- "@spectrum-css/actionbutton": "7.1.3",
- "@spectrum-css/tokens": "16.0.2"
+ "@spectrum-css/actionbutton": "8.0.0-next.2",
+ "@spectrum-css/tokens": "16.1.0-next.5"
},
"keywords": [
"design-system",
diff --git a/components/actiongroup/stories/actiongroup.stories.js b/components/actiongroup/stories/actiongroup.stories.js
index a83857b9e54..0fd9731f55b 100644
--- a/components/actiongroup/stories/actiongroup.stories.js
+++ b/components/actiongroup/stories/actiongroup.stories.js
@@ -5,7 +5,7 @@ import { size } from "@spectrum-css/preview/types";
import metadata from "../dist/metadata.json";
import packageJson from "../package.json";
import { ActionGroups } from "./actiongroup.test.js";
-import { OverflowOption, TreatmentTemplate } from "./template.js";
+import { OverflowOption, Template, TreatmentTemplate } from "./template.js";
/**
* An action group is a grouping of [action buttons](/docs/components-action-button--docs) that are related to each other.
@@ -99,7 +99,11 @@ export default {
},
packageJson,
metadata,
+ status: {
+ type: "migrated",
+ },
},
+ tags: ["migrated"],
};
export const Default = ActionGroups.bind({});
@@ -279,6 +283,15 @@ JustifiedIconOnlyCompact.parameters = {
chromatic: { disableSnapshot: true },
};
+export const Quiet = Template.bind({});
+Quiet.tags = ["!dev"];
+Quiet.args = {
+ areQuiet: true,
+};
+Quiet.parameters = {
+ chromatic: { disableSnapshot: true },
+};
+
/**
* When space is limited in an action group, there are 2 options for the group's overflow behavior: wrap or collapse. By default, an action group is set to wrap, meaning that the action buttons inside the group wrap to form another line. Alternatively, an action group can be set to collapse inside a **More (...)** action button.
*/
diff --git a/components/actiongroup/stories/template.js b/components/actiongroup/stories/template.js
index d13cdac64aa..25d8f25f4e0 100644
--- a/components/actiongroup/stories/template.js
+++ b/components/actiongroup/stories/template.js
@@ -6,9 +6,6 @@ import { styleMap } from "lit/directives/style-map.js";
import { capitalize } from "lodash-es";
import "../index.css";
-import "../themes/spectrum.css";
-/* Must be imported last */
-import "../themes/express.css";
export const Template = ({
rootClass = "spectrum-ActionGroup",
diff --git a/components/actiongroup/themes/express.css b/components/actiongroup/themes/express.css
deleted file mode 100644
index 3fd8de9cdbb..00000000000
--- a/components/actiongroup/themes/express.css
+++ /dev/null
@@ -1,26 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--express */
-
-@import "./spectrum.css";
-
-@container style(--system: express) {
- .spectrum-ActionGroup {
- --spectrum-actiongroup-gap-size-compact: var(--spectrum-spacing-50);
-
- /* account for button border */
- --spectrum-actiongroup-horizontal-spacing-compact: calc(-1px * var(--spectrum-spacing-50));
- --spectrum-actiongroup-vertical-spacing-compact: calc(-1px * var(--spectrum-spacing-50));
- }
-}
diff --git a/components/actiongroup/themes/spectrum-two.css b/components/actiongroup/themes/spectrum-two.css
deleted file mode 100644
index b25c0f945b2..00000000000
--- a/components/actiongroup/themes/spectrum-two.css
+++ /dev/null
@@ -1,22 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-@container style(--system: spectrum) {
- .spectrum-ActionGroup {
- --spectrum-actiongroup-gap-size-compact: 0;
-
- /* account for button border */
- --spectrum-actiongroup-horizontal-spacing-compact: -1px;
- --spectrum-actiongroup-vertical-spacing-compact: -1px;
- }
-}
diff --git a/components/actiongroup/themes/spectrum.css b/components/actiongroup/themes/spectrum.css
deleted file mode 100644
index 3d81bc564b5..00000000000
--- a/components/actiongroup/themes/spectrum.css
+++ /dev/null
@@ -1,16 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--legacy */
-
-@import "./spectrum-two.css";
diff --git a/components/actionmenu/CHANGELOG.md b/components/actionmenu/CHANGELOG.md
index 6525a5264c9..72e215dfc0e 100644
--- a/components/actionmenu/CHANGELOG.md
+++ b/components/actionmenu/CHANGELOG.md
@@ -1,5 +1,22 @@
# Change log
+## 8.0.0-next.1
+
+### Patch Changes
+
+- Updated dependencies [[`60a156d`](https://github.com/adobe/spectrum-css/commit/60a156d7c0efcc999bc440274bbbbf586beb274b)]:
+ - @spectrum-css/tokens@16.1.0-next.0
+
+## 8.0.0-next.0
+
+### Patch Changes
+
+- Updated dependencies [[`a25e0a9`](https://github.com/adobe/spectrum-css/commit/a25e0a99e5a4736ab4e607e00739343101a2633b)]:
+ - @spectrum-css/icon@10.0.0-next.0
+ - @spectrum-css/actionbutton@8.0.0-next.0
+ - @spectrum-css/menu@10.0.0-next.0
+ - @spectrum-css/popover@9.0.0-next.0
+
## 7.1.1
### Patch Changes
@@ -166,6 +183,7 @@ Output for all component CSS files is now being run through a lightweight optimi
### 🛑 BREAKING CHANGE
- Removes component-builder & component-builder-simple for script leveraging postcss
+
- Imports added to index.css and themes/express.css
## 5.1.3
diff --git a/components/actionmenu/package.json b/components/actionmenu/package.json
index fb419a0891e..aff315379ec 100644
--- a/components/actionmenu/package.json
+++ b/components/actionmenu/package.json
@@ -1,6 +1,6 @@
{
"name": "@spectrum-css/actionmenu",
- "version": "7.1.1",
+ "version": "8.0.0-next.1",
"description": "The Spectrum CSS actionmenu component",
"license": "Apache-2.0",
"author": "Adobe",
@@ -25,11 +25,11 @@
},
"main": "dist/index.css",
"peerDependencies": {
- "@spectrum-css/actionbutton": ">=7.0.0 <8.0.0",
- "@spectrum-css/icon": ">=9.0.0 <10.0.0",
- "@spectrum-css/menu": ">=9.0.0 <10.0.0",
- "@spectrum-css/popover": ">=8.0.0 <9.0.0",
- "@spectrum-css/tokens": ">=16.0.0 <17.0.0"
+ "@spectrum-css/actionbutton": ">=8.0.0-next.0",
+ "@spectrum-css/icon": ">=10.0.0-next.0",
+ "@spectrum-css/menu": ">=10.0.0-next.0",
+ "@spectrum-css/popover": ">=9.0.0-next.0",
+ "@spectrum-css/tokens": ">=16.1.0-next.0"
},
"peerDependenciesMeta": {
"@spectrum-css/actionbutton": {
@@ -49,11 +49,11 @@
}
},
"devDependencies": {
- "@spectrum-css/actionbutton": "7.1.3",
- "@spectrum-css/icon": "9.1.0",
- "@spectrum-css/menu": "9.2.0",
- "@spectrum-css/popover": "8.2.0",
- "@spectrum-css/tokens": "16.0.2"
+ "@spectrum-css/actionbutton": "8.0.0-next.2",
+ "@spectrum-css/icon": "10.0.0-next.2",
+ "@spectrum-css/menu": "10.0.0-next.3",
+ "@spectrum-css/popover": "9.0.0-next.2",
+ "@spectrum-css/tokens": "16.1.0-next.5"
},
"keywords": [
"design-system",
diff --git a/components/actionmenu/stories/actionmenu.stories.js b/components/actionmenu/stories/actionmenu.stories.js
index e9cdd3b8a14..b3cab764ac2 100644
--- a/components/actionmenu/stories/actionmenu.stories.js
+++ b/components/actionmenu/stories/actionmenu.stories.js
@@ -31,9 +31,6 @@ export default {
control: { type: "text" },
},
items: { table: { disable: true } },
- id: { table: { disable: true } },
- testId: { table: { disable: true } },
- triggerId: { table: { disable: true } },
},
args: {
isOpen: false,
diff --git a/components/alertbanner/CHANGELOG.md b/components/alertbanner/CHANGELOG.md
index 8248ff62d67..4e594d9637b 100644
--- a/components/alertbanner/CHANGELOG.md
+++ b/components/alertbanner/CHANGELOG.md
@@ -1,10 +1,35 @@
# Change log
+## 4.0.0-next.2
+
+### Patch Changes
+
+- Updated dependencies [[`60a156d`](https://github.com/adobe/spectrum-css/commit/60a156d7c0efcc999bc440274bbbbf586beb274b)]:
+ - @spectrum-css/tokens@16.1.0-next.0
+
+## 4.0.0-next.1
+
+### Patch Changes
+
+- Updated dependencies [[`c6836fb`](https://github.com/adobe/spectrum-css/commit/c6836fb132effcfb09e4ca6d0d8923564bfe2914)]:
+ - @spectrum-css/divider@6.0.0-next.0
+
+## 4.0.0-next.0
+
+### Patch Changes
+
+- Updated dependencies [[`a25e0a9`](https://github.com/adobe/spectrum-css/commit/a25e0a99e5a4736ab4e607e00739343101a2633b)]:
+ - @spectrum-css/icon@10.0.0-next.0
+ - @spectrum-css/button@15.0.0-next.0
+ - @spectrum-css/closebutton@7.0.0-next.0
+
## 3.1.1
### Patch Changes
-- [#3624](https://github.com/adobe/spectrum-css/pull/3624) [`754f99a`](https://github.com/adobe/spectrum-css/commit/754f99afc3c1918cdc0d173150989bcc1e6a7d2f) Thanks [@marissahuysentruyt](https://github.com/marissahuysentruyt)! - In the alert banner spectrum.css (the S1 stylesheet), --system: legacy was corrected in the container query.
+📝 [#3624](https://github.com/adobe/spectrum-css/pull/3624) [`754f99a`](https://github.com/adobe/spectrum-css/commit/754f99afc3c1918cdc0d173150989bcc1e6a7d2f) Thanks [@marissahuysentruyt](https://github.com/marissahuysentruyt)!
+
+In the alert banner `spectrum.css` (the S1 stylesheet), `--system: legacy` was corrected in the container query.
## 3.1.0
diff --git a/components/alertbanner/dist/metadata.json b/components/alertbanner/dist/metadata.json
index 15b6983e631..2e9ddb2f699 100644
--- a/components/alertbanner/dist/metadata.json
+++ b/components/alertbanner/dist/metadata.json
@@ -6,82 +6,90 @@
".spectrum-AlertBanner--negative",
".spectrum-AlertBanner-body",
".spectrum-AlertBanner-content",
- ".spectrum-AlertBanner-end",
".spectrum-AlertBanner-icon",
".spectrum-AlertBanner-text",
- ".spectrum-AlertBanner.is-open"
+ ".spectrum-AlertBanner.is-open",
+ ".spectrum-AlertBanner:has(.spectrum-CloseButton) .spectrum-AlertBanner-body",
+ ".spectrum-AlertBanner:lang(ja)",
+ ".spectrum-AlertBanner:lang(ko)",
+ ".spectrum-AlertBanner:lang(zh)"
],
"modifiers": [
- "--mod-alert-banner-bottom-text",
- "--mod-alert-banner-close-button-spacing",
- "--mod-alert-banner-edge-to-button",
- "--mod-alert-banner-edge-to-divider",
+ "--mod-alert-banner-background",
+ "--mod-alert-banner-block-edge-to-button",
+ "--mod-alert-banner-bottom-to-text",
+ "--mod-alert-banner-close-button-to-content",
+ "--mod-alert-banner-close-button-to-inline-end",
"--mod-alert-banner-font-color",
+ "--mod-alert-banner-font-family",
"--mod-alert-banner-font-size",
"--mod-alert-banner-icon-size",
"--mod-alert-banner-icon-to-text",
"--mod-alert-banner-informative-background",
+ "--mod-alert-banner-inline-end-to-content",
+ "--mod-alert-banner-inline-size",
+ "--mod-alert-banner-inline-start-to-content",
+ "--mod-alert-banner-line-height",
"--mod-alert-banner-max-inline-size",
"--mod-alert-banner-min-height",
"--mod-alert-banner-negative-background",
"--mod-alert-banner-neutral-background",
- "--mod-alert-banner-size",
- "--mod-alert-banner-start-edge",
+ "--mod-alert-banner-text-margin-block-end",
+ "--mod-alert-banner-text-margin-block-start",
"--mod-alert-banner-text-to-button-horizontal",
"--mod-alert-banner-text-to-button-vertical",
- "--mod-alert-banner-text-to-divider",
- "--mod-alert-banner-top-icon",
- "--mod-alert-banner-top-text"
+ "--mod-alert-banner-top-to-close-button",
+ "--mod-alert-banner-top-to-icon",
+ "--mod-alert-banner-top-to-text"
],
"component": [
- "--spectrum-alert-banner-bottom-text",
+ "--spectrum-alert-banner-background",
+ "--spectrum-alert-banner-block-edge-to-button",
"--spectrum-alert-banner-bottom-to-text",
"--spectrum-alert-banner-close-button-spacing",
- "--spectrum-alert-banner-edge-to-button",
- "--spectrum-alert-banner-edge-to-divider",
+ "--spectrum-alert-banner-close-button-to-content",
+ "--spectrum-alert-banner-close-button-to-inline-end",
"--spectrum-alert-banner-font-color",
+ "--spectrum-alert-banner-font-family",
"--spectrum-alert-banner-font-size",
"--spectrum-alert-banner-icon-size",
"--spectrum-alert-banner-icon-to-text",
- "--spectrum-alert-banner-informative-background",
+ "--spectrum-alert-banner-inline-end-to-content",
+ "--spectrum-alert-banner-inline-size",
+ "--spectrum-alert-banner-inline-start-to-content",
+ "--spectrum-alert-banner-line-height",
"--spectrum-alert-banner-max-inline-size",
"--spectrum-alert-banner-min-height",
"--spectrum-alert-banner-minimum-height",
- "--spectrum-alert-banner-negative-background",
"--spectrum-alert-banner-neutral-background",
- "--spectrum-alert-banner-size",
- "--spectrum-alert-banner-start-edge",
+ "--spectrum-alert-banner-text-margin-block-end",
+ "--spectrum-alert-banner-text-margin-block-start",
"--spectrum-alert-banner-text-to-button-horizontal",
"--spectrum-alert-banner-text-to-button-vertical",
- "--spectrum-alert-banner-text-to-divider",
- "--spectrum-alert-banner-top-icon",
- "--spectrum-alert-banner-top-text",
"--spectrum-alert-banner-top-to-text",
"--spectrum-alert-banner-top-to-workflow-icon",
"--spectrum-alert-banner-width"
],
"global": [
"--spectrum-border-width-100",
+ "--spectrum-cjk-line-height-100",
"--spectrum-font-size-100",
"--spectrum-informative-background-color-default",
+ "--spectrum-line-height-100",
"--spectrum-negative-background-color-default",
"--spectrum-neutral-subdued-background-color-default",
+ "--spectrum-sans-font-family-stack",
+ "--spectrum-spacing-200",
"--spectrum-spacing-300",
"--spectrum-text-to-visual-300",
"--spectrum-white",
"--spectrum-workflow-icon-size-100"
],
- "system-theme": ["--system-alert-banner-neutral-background"],
"passthroughs": [
- "--mod-button-margin-block",
- "--mod-button-margin-left",
- "--mod-button-margin-right",
"--mod-closebutton-align-self",
"--mod-closebutton-margin-inline",
"--mod-closebutton-margin-top",
- "--mod-divider-vertical-align",
- "--mod-divider-vertical-height",
- "--mod-divider-vertical-margin"
+ "--mod-icon-size"
],
"high-contrast": [
"--highcontrast-alert-banner-border-color",
diff --git a/components/alertbanner/index.css b/components/alertbanner/index.css
index 2f483970fb8..6659d42cbd1 100644
--- a/components/alertbanner/index.css
+++ b/components/alertbanner/index.css
@@ -11,52 +11,67 @@
* governing permissions and limitations under the License.
*/
-@import "./themes/spectrum-two.css";
-
.spectrum-AlertBanner {
+ --spectrum-alert-banner-neutral-background: var(--spectrum-neutral-subdued-background-color-default);
+
--spectrum-alert-banner-min-height: var(--spectrum-alert-banner-minimum-height);
--spectrum-alert-banner-max-inline-size: var(--spectrum-alert-banner-width);
- --spectrum-alert-banner-size: auto;
+ --spectrum-alert-banner-inline-size: auto;
+
--spectrum-alert-banner-font-size: var(--spectrum-font-size-100);
- --spectrum-alert-banner-icon-size: var(--spectrum-workflow-icon-size-100);
+ --spectrum-alert-banner-line-height: var(--spectrum-line-height-100);
+ --spectrum-alert-banner-font-family: var(--spectrum-sans-font-family-stack);
+ --spectrum-alert-banner-icon-size: var(--spectrum-workflow-icon-size-100); /* stylelint-disable-line spectrum-tools/no-unused-custom-properties -- used in passthrough */
/* spacing */
--spectrum-alert-banner-icon-to-text: var(--spectrum-text-to-visual-300);
- --spectrum-alert-banner-start-edge: var(--spectrum-spacing-300);
+ --spectrum-alert-banner-inline-start-to-content: var(--spectrum-spacing-300);
+ --spectrum-alert-banner-inline-end-to-content: var(--spectrum-spacing-300);
--spectrum-alert-banner-text-to-button-horizontal: var(--spectrum-spacing-300);
- --spectrum-alert-banner-text-to-divider: var(--spectrum-spacing-300);
- --spectrum-alert-banner-top-icon: var(--spectrum-alert-banner-top-to-workflow-icon);
- --spectrum-alert-banner-top-text: var(--spectrum-alert-banner-top-to-text);
- --spectrum-alert-banner-bottom-text: var(--spectrum-alert-banner-bottom-to-text);
+ --spectrum-alert-banner-block-edge-to-button: var(--spectrum-spacing-200);
+ --spectrum-alert-banner-close-button-to-content: var(--spectrum-spacing-300); /* stylelint-disable-line spectrum-tools/no-unused-custom-properties -- used in passthrough */
+ --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 */
+
+ /* Top and bottom margins for AlertBanner-text. Subtracts the vertical spacing that is already included in the
+ padding-block of its parent AlertBanner-body element. */
+ --spectrum-alert-banner-text-margin-block-start: max(0px, var(--mod-alert-banner-top-to-text, var(--spectrum-alert-banner-top-to-text)) - var(--mod-alert-banner-block-edge-to-button, var(--spectrum-alert-banner-block-edge-to-button)));
+ --spectrum-alert-banner-text-margin-block-end: max(0px, var(--mod-alert-banner-bottom-to-text, var(--spectrum-alert-banner-bottom-to-text)) - var(--mod-alert-banner-block-edge-to-button, var(--spectrum-alert-banner-block-edge-to-button)));
/* colors */
- --spectrum-alert-banner-informative-background: var(--spectrum-informative-background-color-default);
- --spectrum-alert-banner-negative-background: var(--spectrum-negative-background-color-default);
+ --spectrum-alert-banner-background: var(--mod-alert-banner-neutral-background, var(--spectrum-neutral-subdued-background-color-default));
--spectrum-alert-banner-font-color: var(--spectrum-white);
- /* settings for nested Divider */
- --mod-divider-vertical-margin: var(--mod-alert-banner-edge-to-divider, var(--spectrum-alert-banner-edge-to-divider));
- --mod-divider-vertical-height: auto;
- --mod-divider-vertical-align: stretch;
+ /* @passthrough -- settings for nested Close button */
+ --mod-closebutton-margin-inline: var(--mod-alert-banner-close-button-to-content, var(--spectrum-alert-banner-close-button-to-content)) var(--mod-alert-banner-close-button-to-inline-end, var(--spectrum-alert-banner-close-button-to-inline-end));
+ --mod-closebutton-margin-top: var(--mod-alert-banner-top-to-close-button, var(--spectrum-alert-banner-block-edge-to-button));
+ --mod-closebutton-align-self: flex-start;
- /* settings for nested Button */
- --mod-button-margin-block: var(--mod-alert-banner-edge-to-button, var(--spectrum-alert-banner-edge-to-button));
- --mod-button-margin-right: var(--mod-alert-banner-text-to-divider, var(--spectrum-alert-banner-text-to-divider));
- --mod-button-margin-left: auto;
+ &:lang(ja),
+ &:lang(zh),
+ &:lang(ko) {
+ --spectrum-alert-banner-line-height: var(--spectrum-cjk-line-height-100);
+ }
+}
- /* settings for nested CloseButton */
- --mod-closebutton-margin-inline: var(--mod-alert-banner-close-button-spacing, var(--spectrum-alert-banner-close-button-spacing));
- --mod-closebutton-margin-top: var(--mod-alert-banner-close-button-spacing, var(--spectrum-alert-banner-close-button-spacing));
- --mod-closebutton-align-self: flex-start;
+.spectrum-AlertBanner--info {
+ --spectrum-alert-banner-background: var(--mod-alert-banner-informative-background, var(--spectrum-informative-background-color-default));
+}
+
+.spectrum-AlertBanner--negative {
+ --spectrum-alert-banner-background: var(--mod-alert-banner-negative-background, var(--spectrum-negative-background-color-default));
+}
+.spectrum-AlertBanner {
display: none;
justify-content: space-between;
- inline-size: var(--mod-alert-banner-size, var(--spectrum-alert-banner-size));
+ inline-size: var(--mod-alert-banner-inline-size, var(--spectrum-alert-banner-inline-size));
max-inline-size: var(--mod-alert-banner-max-inline-size, var(--spectrum-alert-banner-max-inline-size));
min-block-size: var(--mod-alert-banner-min-height, var(--spectrum-alert-banner-min-height));
font-size: var(--mod-alert-banner-font-size, var(--spectrum-alert-banner-font-size));
+ font-family: var(--mod-alert-banner-font-family, var(--spectrum-alert-banner-font-family));
+ line-height: var(--mod-alert-banner-line-height, var(--spectrum-alert-banner-line-height));
color: var(--mod-alert-banner-font-color, var(--spectrum-alert-banner-font-color));
- background-color: var(--mod-alert-banner-neutral-background, var(--spectrum-alert-banner-neutral-background));
+ background: var(--mod-alert-banner-background, var(--spectrum-alert-banner-background));
border: var(--highcontrast-alert-banner-border-width, 0) solid var(--highcontrast-alert-banner-border-color, transparent);
&.is-open {
@@ -64,46 +79,47 @@
}
}
-.spectrum-AlertBanner--info {
- background-color: var(--mod-alert-banner-informative-background, var(--spectrum-alert-banner-informative-background));
-}
-
-.spectrum-AlertBanner--negative {
- background-color: var(--mod-alert-banner-negative-background, var(--spectrum-alert-banner-negative-background));
-}
-
.spectrum-AlertBanner-body {
inline-size: 100%;
display: flex;
-
- /* --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 */
- gap: max(calc(var(--mod-alert-banner-text-to-button-vertical, var(--spectrum-alert-banner-text-to-button-vertical)) - var(--mod-alert-banner-edge-to-button, var(--spectrum-alert-banner-edge-to-button))), 0px);
flex-wrap: wrap;
align-items: center;
- margin-inline-start: var(--mod-alert-banner-start-edge, var(--spectrum-alert-banner-start-edge));
-}
+ justify-content: flex-end;
-.spectrum-AlertBanner-content {
- display: flex;
+ /* Inline spacing between text and button, only when the button has not wrapped to the next line. */
+ column-gap: var(--mod-alert-banner-text-to-button-horizontal, var(--spectrum-alert-banner-text-to-button-horizontal));
+
+ /* Block spacing between text and button, when the button has wrapped to the next line. Takes into
+ account the existing margins on the text. */
+ row-gap: max(var(--mod-alert-banner-text-to-button-vertical, 0px), var(--spectrum-alert-banner-text-to-button-vertical) - var(--spectrum-alert-banner-text-margin-block-end));
+
+ padding-block: var(--mod-alert-banner-block-edge-to-button, var(--spectrum-alert-banner-block-edge-to-button));
+ margin-inline-start: var(--mod-alert-banner-inline-start-to-content, var(--spectrum-alert-banner-inline-start-to-content));
+ margin-inline-end: var(--mod-alert-banner-inline-end-to-content, var(--spectrum-alert-banner-inline-end-to-content));
+
+ /* When dismissible, this spacing is handled by the margin-inline-start on the close button instead. */
+ .spectrum-AlertBanner:has(.spectrum-CloseButton) & {
+ margin-inline-end: 0;
+ }
}
-.spectrum-AlertBanner-end {
+.spectrum-AlertBanner-content {
display: flex;
- align-items: center;
+ flex-grow: 1;
}
.spectrum-AlertBanner-icon {
- inline-size: var(--mod-alert-banner-icon-size, var(--spectrum-alert-banner-icon-size));
- block-size: var(--mod-alert-banner-icon-size, var(--spectrum-alert-banner-icon-size));
- margin-block-start: var(--mod-alert-banner-top-icon, var(--spectrum-alert-banner-top-icon));
+ /* @passthrough -- icon-size */
+ --mod-icon-size: var(--mod-alert-banner-icon-size, var(--spectrum-alert-banner-icon-size));
+
+ margin-block-start: calc(var(--mod-alert-banner-top-to-icon, var(--spectrum-alert-banner-top-to-workflow-icon)) - var(--mod-alert-banner-block-edge-to-button, var(--spectrum-alert-banner-block-edge-to-button)));
margin-inline-end: var(--mod-alert-banner-icon-to-text, var(--spectrum-alert-banner-icon-to-text));
flex-shrink: 0;
}
.spectrum-AlertBanner-text {
- margin-block-start: var(--mod-alert-banner-top-text, var(--spectrum-alert-banner-top-text));
- margin-block-end: var(--mod-alert-banner-bottom-text, var(--spectrum-alert-banner-bottom-text));
- margin-inline-end: var(--mod-alert-banner-text-to-button-horizontal, var(--spectrum-alert-banner-text-to-button-horizontal));
+ margin-block-start: var(--mod-alert-banner-text-margin-block-start, var(--spectrum-alert-banner-text-margin-block-start));
+ margin-block-end: var(--mod-alert-banner-text-margin-block-end, var(--spectrum-alert-banner-text-margin-block-end));
}
@media (forced-colors: active) {
diff --git a/components/alertbanner/package.json b/components/alertbanner/package.json
index 2ff3525a182..cc160b91a20 100644
--- a/components/alertbanner/package.json
+++ b/components/alertbanner/package.json
@@ -1,6 +1,6 @@
{
"name": "@spectrum-css/alertbanner",
- "version": "3.1.1",
+ "version": "4.0.0-next.2",
"description": "The Spectrum CSS alertbanner component",
"license": "Apache-2.0",
"author": "Adobe",
@@ -25,11 +25,11 @@
},
"main": "dist/index.css",
"peerDependencies": {
- "@spectrum-css/button": ">=14.0.0 <15.0.0",
- "@spectrum-css/closebutton": ">=6.0.0 <7.0.0",
- "@spectrum-css/divider": ">=5.0.0 <6.0.0",
- "@spectrum-css/icon": ">=9.0.0 <10.0.0",
- "@spectrum-css/tokens": ">=16.0.0 <17.0.0"
+ "@spectrum-css/button": ">=15.0.0-next.0",
+ "@spectrum-css/closebutton": ">=7.0.0-next.0",
+ "@spectrum-css/divider": ">=6.0.0-next.0",
+ "@spectrum-css/icon": ">=10.0.0-next.0",
+ "@spectrum-css/tokens": ">=16.1.0-next.0"
},
"peerDependenciesMeta": {
"@spectrum-css/button": {
@@ -49,11 +49,11 @@
}
},
"devDependencies": {
- "@spectrum-css/button": "14.1.6",
- "@spectrum-css/closebutton": "6.1.0",
- "@spectrum-css/divider": "5.1.0",
- "@spectrum-css/icon": "9.1.0",
- "@spectrum-css/tokens": "16.0.2"
+ "@spectrum-css/button": "15.0.0-next.2",
+ "@spectrum-css/closebutton": "7.0.0-next.1",
+ "@spectrum-css/divider": "6.0.0-next.1",
+ "@spectrum-css/icon": "10.0.0-next.2",
+ "@spectrum-css/tokens": "16.1.0-next.5"
},
"keywords": [
"design-system",
diff --git a/components/alertbanner/stories/alertbanner.stories.js b/components/alertbanner/stories/alertbanner.stories.js
index cd49c21a70e..c6d638008c2 100644
--- a/components/alertbanner/stories/alertbanner.stories.js
+++ b/components/alertbanner/stories/alertbanner.stories.js
@@ -75,7 +75,11 @@ export default {
},
packageJson,
metadata,
+ status: {
+ type: "migrated",
+ },
},
+ tags: ["migrated"],
};
export const Default = AlertBannerGroup.bind({});
diff --git a/components/alertbanner/stories/alertbanner.test.js b/components/alertbanner/stories/alertbanner.test.js
index dee63d20c8d..0b86e7fbfaa 100644
--- a/components/alertbanner/stories/alertbanner.test.js
+++ b/components/alertbanner/stories/alertbanner.test.js
@@ -3,6 +3,7 @@ import { Template } from "./template.js";
export const AlertBannerGroup = Variants({
Template,
+ TestTemplate: Template,
stateDirection: "column",
wrapperStyles: {
"inline-size": "100%",
diff --git a/components/alertbanner/stories/template.js b/components/alertbanner/stories/template.js
index 3eb719c0612..ec0278583fd 100644
--- a/components/alertbanner/stories/template.js
+++ b/components/alertbanner/stories/template.js
@@ -1,6 +1,5 @@
import { Template as Button } from "@spectrum-css/button/stories/template.js";
import { Template as CloseButton } from "@spectrum-css/closebutton/stories/template.js";
-import { Template as Divider } from "@spectrum-css/divider/stories/template.js";
import { Template as Icon } from "@spectrum-css/icon/stories/template.js";
import { Container, getRandomId } from "@spectrum-css/preview/decorators";
import { html } from "lit";
@@ -10,9 +9,6 @@ import { styleMap } from "lit/directives/style-map.js";
import { when } from "lit/directives/when.js";
import "../index.css";
-import "../themes/spectrum.css";
-/* Must be imported last */
-import "../themes/express.css";
export const Template = ({
rootClass = "spectrum-AlertBanner",
@@ -26,6 +22,12 @@ export const Template = ({
customClasses = [],
customStyles = {},
} = {}, context = {}) => {
+ const { updateArgs } = context;
+
+ const onclick = () => {
+ updateArgs({ isOpen: false });
+ };
+
return html`
- ${Divider({
- vertical: true,
- size: "s",
- tag: "div",
- }, context)}
${CloseButton({
size: "m",
staticColor: "white",
@@ -118,62 +115,62 @@ export const TextOverflowTemplate = (args) => html`
export const ActionableOptionsTemplate = (args, context) => Container({
withBorder: false,
direction: "column",
- containerStyles: { alignItems: "stretch" },
- wrapperStyles: { alignItems: "stretch" },
- content: html`
- ${Container({
+ containerStyles: { "align-items": "stretch" },
+ wrapperStyles: { "align-items": "stretch" },
+ content: [
+ Container({
withBorder: false,
direction: "column",
heading: "Action button and close button",
- containerStyles: { alignItems: "stretch" },
- wrapperStyles: { alignItems: "stretch" },
+ containerStyles: { "align-items": "stretch" },
+ wrapperStyles: { "align-items": "stretch" },
content: Template({
- ...args,
- variant: "neutral",
- text: "Your trial has expired",
- actionButtonText: "Buy now",
+ ...args,
+ variant: "neutral",
+ text: "Your trial has expired",
+ actionButtonText: "Buy now",
}, context),
- }, context)}
- ${Container({
+ }, context),
+ Container({
withBorder: false,
direction: "column",
heading: "Action button only",
- containerStyles: { alignItems: "stretch" },
- wrapperStyles: { alignItems: "stretch" },
+ containerStyles: { "align-items": "stretch" },
+ wrapperStyles: { "align-items": "stretch" },
content: Template({
- ...args,
- variant: "neutral",
- text: "Your trial has expired",
- actionButtonText: "Buy now",
- showCloseButton: false,
+ ...args,
+ variant: "neutral",
+ text: "Your trial has expired",
+ actionButtonText: "Buy now",
+ showCloseButton: false,
}, context),
- }, context)}
- ${Container({
+ }, context),
+ Container({
withBorder: false,
direction: "column",
heading: "Close button only",
- containerStyles: { alignItems: "stretch" },
- wrapperStyles: { alignItems: "stretch" },
+ containerStyles: { "align-items": "stretch" },
+ wrapperStyles: { "align-items": "stretch" },
content: Template({
...args,
variant: "neutral",
text: "Your trial has expired",
actionButtonText: "",
}),
- }, context)}
- ${Container({
+ }, context),
+ Container({
withBorder: false,
direction: "column",
heading: "Text only",
- containerStyles: { alignItems: "stretch" },
- wrapperStyles: { alignItems: "stretch" },
+ containerStyles: { "align-items": "stretch" },
+ wrapperStyles: { "align-items": "stretch" },
content: Template({
- ...args,
- variant: "neutral",
- text: "Your trial has expired",
- actionButtonText: "",
- showCloseButton: false,
+ ...args,
+ variant: "neutral",
+ text: "Your trial has expired",
+ actionButtonText: "",
+ showCloseButton: false,
}, context),
- }, context)}
- `,
+ }, context),
+ ],
}, context);
diff --git a/components/alertbanner/themes/express.css b/components/alertbanner/themes/express.css
deleted file mode 100644
index a86424d5e4b..00000000000
--- a/components/alertbanner/themes/express.css
+++ /dev/null
@@ -1,22 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--express */
-
-@import "./spectrum.css";
-
-@container style(--system: express) {
- .spectrum-AlertBanner {
- --spectrum-alert-banner-neutral-background: var(--spectrum-neutral-background-color-default);
- }
-}
diff --git a/components/alertbanner/themes/spectrum-two.css b/components/alertbanner/themes/spectrum-two.css
deleted file mode 100644
index 3e038dbd7a4..00000000000
--- a/components/alertbanner/themes/spectrum-two.css
+++ /dev/null
@@ -1,18 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-@container style(--system: spectrum) {
- .spectrum-AlertBanner {
- --spectrum-alert-banner-neutral-background: var(--spectrum-neutral-subdued-background-color-default);
- }
-}
diff --git a/components/alertbanner/themes/spectrum.css b/components/alertbanner/themes/spectrum.css
deleted file mode 100644
index 4dd42f109fe..00000000000
--- a/components/alertbanner/themes/spectrum.css
+++ /dev/null
@@ -1,22 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--legacy */
-
-@import "./spectrum-two.css";
-
-@container style(--system: legacy) {
- .spectrum-AlertBanner {
- --spectrum-alert-banner-neutral-background: var(--spectrum-neutral-subdued-background-color-default);
- }
-}
diff --git a/components/alertdialog/CHANGELOG.md b/components/alertdialog/CHANGELOG.md
index 689a56fbdc1..0bd0f7fa469 100644
--- a/components/alertdialog/CHANGELOG.md
+++ b/components/alertdialog/CHANGELOG.md
@@ -1,5 +1,101 @@
# Change log
+## 5.0.0-next.4
+
+### Major Changes
+
+- [#3725](https://github.com/adobe/spectrum-css/pull/3725) [`f977e60`](https://github.com/adobe/spectrum-css/commit/f977e60a7f32eb7147bd1546d04a02557011e7d9) Thanks [@cdransf](https://github.com/cdransf)!
+
+#### S2 migration
+
+This migrates the `alert dialog` component to the latest Spectrum 2 designs. Custom properties have been remapped and added per the design specification.
+
+The icon in the dialog header has been moved from the right side to the left.
+
+The dialog divider has been removed.
+
+Primary button style has been updated to filled.
+
+The following variants remain supported:
+
+- Confirmation
+- Information
+- Destructive
+- Warning (with `AlertDiamond` icon)
+- Error (with `AlertTriangle` icon)
+
+Dialog buttons may be displayed either horizontally or vertically.
+
+##### Removed custom properties
+
+`--spectrum-alert-dialog-description-to-buttons`
+`--spectrum-alert-dialog-divider-to-description`
+`--spectrum-alert-dialog-padding`
+`--spectrum-alert-dialog-title-size`
+`--spectrum-alert-dialog-title-to-divider`
+`--spectrum-alert-dialog-title-to-icon`
+
+##### New custom properties
+
+`--spectrum-alert-dialog-background-color`
+`--spectrum-alert-dialog-corner-radius`
+`--spectrum-alert-dialog-description-font-size`
+`--spectrum-alert-dialog-description-to-button-group`
+`--spectrum-alert-dialog-edge-to-content`
+`--spectrum-alert-dialog-heading-size`
+`--spectrum-alert-dialog-title-to-description`
+
+##### Removed mods
+
+`--mod-alert-dialog-body-font-size`
+`--mod-alert-dialog-description-to-buttons`
+`--mod-alert-dialog-divider-to-description`
+`--mod-alert-dialog-padding`
+`--mod-alert-dialog-title-to-divider`
+`--mod-alert-dialog-title-to-icon`
+
+##### New mods
+
+`--mod-alert-dialog-background-color`
+`--mod-alert-dialog-corner-radius`
+`--mod-alert-dialog-description-content-size`
+`--mod-alert-dialog-description-to-button-group`
+`--mod-alert-dialog-edge-to-content`
+`--mod-alert-dialog-heading-size`
+`--mod-alert-dialog-minimum-title-to-icon`
+`--mod-alert-dialog-title-to-description`
+
+## 5.0.0-next.3
+
+### Patch Changes
+
+- Updated dependencies [[`60a156d`](https://github.com/adobe/spectrum-css/commit/60a156d7c0efcc999bc440274bbbbf586beb274b)]:
+ - @spectrum-css/tokens@16.1.0-next.0
+ - @spectrum-css/modal@8.0.0-next.1
+ - @spectrum-css/underlay@7.0.0-next.0
+
+## 5.0.0-next.2
+
+### Patch Changes
+
+- Updated dependencies [[`cb1b957`](https://github.com/adobe/spectrum-css/commit/cb1b957c05ecf02d3f473de09a8bfd5f2b5d42bf)]:
+ - @spectrum-css/modal@7.1.1-next.0
+
+## 5.0.0-next.1
+
+### Patch Changes
+
+- Updated dependencies [[`c6836fb`](https://github.com/adobe/spectrum-css/commit/c6836fb132effcfb09e4ca6d0d8923564bfe2914)]:
+ - @spectrum-css/divider@6.0.0-next.0
+
+## 5.0.0-next.0
+
+### Patch Changes
+
+- Updated dependencies [[`a25e0a9`](https://github.com/adobe/spectrum-css/commit/a25e0a99e5a4736ab4e607e00739343101a2633b)]:
+ - @spectrum-css/icon@10.0.0-next.0
+ - @spectrum-css/buttongroup@10.0.0-next.0
+
## 4.1.0
### Minor Changes
diff --git a/components/alertdialog/dist/metadata.json b/components/alertdialog/dist/metadata.json
index 03bf62123f2..7510ea9f7aa 100644
--- a/components/alertdialog/dist/metadata.json
+++ b/components/alertdialog/dist/metadata.json
@@ -5,80 +5,85 @@
".spectrum-AlertDialog .spectrum-Icon",
".spectrum-AlertDialog--error",
".spectrum-AlertDialog--warning",
+ ".spectrum-AlertDialog-buttongroup",
".spectrum-AlertDialog-content",
".spectrum-AlertDialog-grid",
".spectrum-AlertDialog-header",
".spectrum-AlertDialog-heading"
],
"modifiers": [
+ "--mod-alert-dialog-background-color",
"--mod-alert-dialog-body-color",
"--mod-alert-dialog-body-font-family",
- "--mod-alert-dialog-body-font-size",
"--mod-alert-dialog-body-font-style",
"--mod-alert-dialog-body-font-weight",
"--mod-alert-dialog-body-line-height",
- "--mod-alert-dialog-description-to-buttons",
- "--mod-alert-dialog-divider-to-description",
+ "--mod-alert-dialog-corner-radius",
+ "--mod-alert-dialog-description-content-size",
+ "--mod-alert-dialog-description-to-button-group",
+ "--mod-alert-dialog-edge-to-content",
"--mod-alert-dialog-error-icon-color",
+ "--mod-alert-dialog-heading-size",
"--mod-alert-dialog-icon-size",
"--mod-alert-dialog-max-width",
"--mod-alert-dialog-min-width",
- "--mod-alert-dialog-padding",
+ "--mod-alert-dialog-minimum-title-to-icon",
"--mod-alert-dialog-title-color",
"--mod-alert-dialog-title-font-family",
- "--mod-alert-dialog-title-font-size",
"--mod-alert-dialog-title-font-style",
"--mod-alert-dialog-title-font-weight",
"--mod-alert-dialog-title-line-height",
- "--mod-alert-dialog-title-to-divider",
- "--mod-alert-dialog-title-to-icon",
+ "--mod-alert-dialog-title-to-description",
"--mod-alert-dialog-warning-icon-color"
],
"component": [
+ "--spectrum-alert-dialog-background-color",
"--spectrum-alert-dialog-body-color",
"--spectrum-alert-dialog-body-font-family",
- "--spectrum-alert-dialog-body-font-size",
"--spectrum-alert-dialog-body-font-style",
"--spectrum-alert-dialog-body-font-weight",
"--spectrum-alert-dialog-body-line-height",
- "--spectrum-alert-dialog-description-size",
- "--spectrum-alert-dialog-description-to-buttons",
- "--spectrum-alert-dialog-divider-to-description",
+ "--spectrum-alert-dialog-corner-radius",
+ "--spectrum-alert-dialog-description-content-size",
+ "--spectrum-alert-dialog-description-font-size",
+ "--spectrum-alert-dialog-description-to-button-group",
+ "--spectrum-alert-dialog-edge-to-content",
"--spectrum-alert-dialog-error-icon-color",
+ "--spectrum-alert-dialog-heading-size",
"--spectrum-alert-dialog-icon-size",
"--spectrum-alert-dialog-max-width",
"--spectrum-alert-dialog-maximum-width",
"--spectrum-alert-dialog-min-width",
+ "--spectrum-alert-dialog-minimum-title-to-icon",
"--spectrum-alert-dialog-minimum-width",
- "--spectrum-alert-dialog-padding",
"--spectrum-alert-dialog-title-color",
"--spectrum-alert-dialog-title-font-family",
"--spectrum-alert-dialog-title-font-size",
"--spectrum-alert-dialog-title-font-style",
"--spectrum-alert-dialog-title-font-weight",
"--spectrum-alert-dialog-title-line-height",
- "--spectrum-alert-dialog-title-size",
- "--spectrum-alert-dialog-title-to-divider",
- "--spectrum-alert-dialog-title-to-icon",
+ "--spectrum-alert-dialog-title-to-description",
"--spectrum-alert-dialog-warning-icon-color"
],
"global": [
+ "--spectrum-background-layer-2-color",
"--spectrum-body-color",
"--spectrum-body-sans-serif-font-style",
"--spectrum-body-sans-serif-font-weight",
+ "--spectrum-corner-radius-extra-large-default",
"--spectrum-heading-color",
"--spectrum-heading-line-height",
"--spectrum-heading-sans-serif-font-style",
"--spectrum-heading-sans-serif-font-weight",
- "--spectrum-line-height-100",
+ "--spectrum-line-height-200",
"--spectrum-negative-visual-color",
"--spectrum-notice-visual-color",
"--spectrum-sans-font-family-stack",
- "--spectrum-spacing-200",
+ "--spectrum-spacing-100",
"--spectrum-spacing-300",
+ "--spectrum-spacing-500",
"--spectrum-workflow-icon-size-100"
],
- "system-theme": [],
"passthroughs": ["--mod-buttongroup-justify-content", "--mod-icon-color"],
"high-contrast": []
}
diff --git a/components/alertdialog/index.css b/components/alertdialog/index.css
index 14e6e555f2c..0bc24598937 100644
--- a/components/alertdialog/index.css
+++ b/components/alertdialog/index.css
@@ -1,5 +1,5 @@
/*!
- * Copyright 2024 Adobe. All rights reserved.
+ * Copyright 2025 Adobe. All rights reserved.
*
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
@@ -15,32 +15,34 @@
--spectrum-alert-dialog-min-width: var(--spectrum-alert-dialog-minimum-width);
--spectrum-alert-dialog-max-width: var(--spectrum-alert-dialog-maximum-width);
--spectrum-alert-dialog-icon-size: var(--spectrum-workflow-icon-size-100);
+ --spectrum-alert-dialog-corner-radius: var(--spectrum-corner-radius-extra-large-default);
/* color */
--spectrum-alert-dialog-warning-icon-color: var(--spectrum-notice-visual-color);
--spectrum-alert-dialog-error-icon-color: var(--spectrum-negative-visual-color);
+ --spectrum-alert-dialog-background-color: var(--spectrum-background-layer-2-color);
/* typography */
--spectrum-alert-dialog-title-font-family: var(--spectrum-sans-font-family-stack);
--spectrum-alert-dialog-title-font-weight: var(--spectrum-heading-sans-serif-font-weight);
--spectrum-alert-dialog-title-font-style: var(--spectrum-heading-sans-serif-font-style);
- --spectrum-alert-dialog-title-font-size: var(--spectrum-alert-dialog-title-size);
--spectrum-alert-dialog-title-line-height: var(--spectrum-heading-line-height);
--spectrum-alert-dialog-title-color: var(--spectrum-heading-color);
+ --spectrum-alert-dialog-heading-size: var(--spectrum-alert-dialog-title-font-size);
+ --spectrum-alert-dialog-description-content-size: var(--spectrum-alert-dialog-description-font-size);
--spectrum-alert-dialog-body-font-family: var(--spectrum-sans-font-family-stack);
--spectrum-alert-dialog-body-font-weight: var(--spectrum-body-sans-serif-font-weight);
--spectrum-alert-dialog-body-font-style: var(--spectrum-body-sans-serif-font-style);
- --spectrum-alert-dialog-body-font-size: var(--spectrum-alert-dialog-description-size);
- --spectrum-alert-dialog-body-line-height: var(--spectrum-line-height-100);
+ --spectrum-alert-dialog-body-line-height: var(--spectrum-line-height-200);
--spectrum-alert-dialog-body-color: var(--spectrum-body-color);
/* spacing */
- --spectrum-alert-dialog-title-to-divider: var(--spectrum-spacing-200);
- --spectrum-alert-dialog-divider-to-description: var(--spectrum-spacing-300);
- --spectrum-alert-dialog-title-to-icon: var(--spectrum-spacing-300);
+ --spectrum-alert-dialog-title-to-description: var(--spectrum-spacing-300);
+ --spectrum-alert-dialog-minimum-title-to-icon: var(--spectrum-spacing-100);
+ --spectrum-alert-dialog-description-to-button-group: var(--spectrum-spacing-500);
- /* mods for nested component */
+ /* @passthrough -- mods for nested component */
--mod-buttongroup-justify-content: flex-end;
}
@@ -51,13 +53,14 @@
min-inline-size: var(--mod-alert-dialog-min-width, var(--spectrum-alert-dialog-min-width));
max-inline-size: var(--mod-alert-dialog-max-width, var(--spectrum-alert-dialog-max-width));
max-block-size: inherit;
+ background-color: var(--mod-alert-dialog-background-color, var(--spectrum-alert-dialog-background-color));
outline: none;
- padding: var(--mod-alert-dialog-padding, var(--spectrum-alert-dialog-padding));
+ padding: var(--mod-alert-dialog-edge-to-content, var(--spectrum-alert-dialog-edge-to-content));
+ border-radius: var(--mod-alert-dialog-corner-radius, var(--spectrum-alert-dialog-corner-radius));
.spectrum-Icon {
inline-size: var(--mod-alert-dialog-icon-size, var(--spectrum-alert-dialog-icon-size));
block-size: var(--mod-alert-dialog-icon-size, var(--spectrum-alert-dialog-icon-size));
- margin-inline-start: var(--mod-alert-dialog-title-to-icon, var(--spectrum-alert-dialog-title-to-icon));
flex-shrink: 0;
}
}
@@ -74,40 +77,45 @@
.spectrum-AlertDialog-grid {
display: grid;
+ inline-size: 100%;
}
.spectrum-AlertDialog-header {
display: flex;
- justify-content: space-between;
- align-items: baseline;
+ gap: var(--mod-alert-dialog-minimum-title-to-icon, var(--spectrum-alert-dialog-minimum-title-to-icon));
+ align-items: center;
+ margin-block-end: var(--mod-alert-dialog-title-to-description, var(--spectrum-alert-dialog-title-to-description));
}
.spectrum-AlertDialog-heading {
font-family: var(--mod-alert-dialog-title-font-family, var(--spectrum-alert-dialog-title-font-family));
font-weight: var(--mod-alert-dialog-title-font-weight, var(--spectrum-alert-dialog-title-font-weight));
font-style: var(--mod-alert-dialog-title-font-style, var(--spectrum-alert-dialog-title-font-style));
- font-size: var(--mod-alert-dialog-title-font-size, var(--spectrum-alert-dialog-title-font-size));
+ font-size: var(--mod-alert-dialog-heading-size, var(--spectrum-alert-dialog-heading-size));
line-height: var(--mod-alert-dialog-title-line-height, var(--spectrum-alert-dialog-title-line-height));
color: var(--mod-alert-dialog-title-color, var(--spectrum-alert-dialog-title-color));
margin: 0;
- margin-block-end: var(--mod-alert-dialog-title-to-divider, var(--spectrum-alert-dialog-title-to-divider));
}
.spectrum-AlertDialog-content {
font-family: var(--mod-alert-dialog-body-font-family, var(--spectrum-alert-dialog-body-font-family));
font-weight: var(--mod-alert-dialog-body-font-weight, var(--spectrum-alert-dialog-body-font-weight));
font-style: var(--mod-alert-dialog-body-font-style, var(--spectrum-alert-dialog-body-font-style));
- font-size: var(--mod-alert-dialog-body-font-size, var(--spectrum-alert-dialog-body-font-size));
+ font-size: var(--mod-alert-dialog-description-content-size, var(--spectrum-alert-dialog-description-content-size));
line-height: var(--mod-alert-dialog-body-line-height, var(--spectrum-alert-dialog-body-line-height));
color: var(--mod-alert-dialog-body-color, var(--spectrum-alert-dialog-body-color));
margin: 0;
- margin-block-start: var(--mod-alert-dialog-divider-to-description, var(--spectrum-alert-dialog-divider-to-description));
- margin-block-end: var(--mod-alert-dialog-description-to-buttons, var(--spectrum-alert-dialog-description-to-buttons));
+ margin-block-end: var(--mod-alert-dialog-description-to-button-group, var(--spectrum-alert-dialog-description-to-button-group));
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
+.spectrum-AlertDialog-buttongroup {
+ display: flex;
+ justify-content: end;
+}
+
@media (forced-colors: active) {
.spectrum-AlertDialog {
border: solid;
diff --git a/components/alertdialog/package.json b/components/alertdialog/package.json
index a2745ced457..d0e0f948c88 100644
--- a/components/alertdialog/package.json
+++ b/components/alertdialog/package.json
@@ -1,6 +1,6 @@
{
"name": "@spectrum-css/alertdialog",
- "version": "4.1.0",
+ "version": "5.0.0-next.4",
"description": "The Spectrum CSS alertdialog component",
"license": "Apache-2.0",
"author": "Adobe",
@@ -25,12 +25,12 @@
},
"main": "dist/index.css",
"peerDependencies": {
- "@spectrum-css/buttongroup": ">=9.0.0 <10.0.0",
- "@spectrum-css/divider": ">=5.0.0 <6.0.0",
- "@spectrum-css/icon": ">=9.0.0 <10.0.0",
- "@spectrum-css/modal": ">=7.0.0 <8.0.0",
- "@spectrum-css/tokens": ">=16.0.0 <17.0.0",
- "@spectrum-css/underlay": ">=6.0.0 <7.0.0"
+ "@spectrum-css/buttongroup": ">=10.0.0-next.0",
+ "@spectrum-css/divider": ">=6.0.0-next.0",
+ "@spectrum-css/icon": ">=10.0.0-next.0",
+ "@spectrum-css/modal": ">=8.0.0-next.1",
+ "@spectrum-css/tokens": ">=16.1.0-next.0",
+ "@spectrum-css/underlay": ">=7.0.0-next.0"
},
"peerDependenciesMeta": {
"@spectrum-css/buttongroup": {
@@ -53,12 +53,12 @@
}
},
"devDependencies": {
- "@spectrum-css/buttongroup": "9.1.0",
- "@spectrum-css/divider": "5.1.0",
- "@spectrum-css/icon": "9.1.0",
- "@spectrum-css/modal": "7.1.0",
- "@spectrum-css/tokens": "16.0.2",
- "@spectrum-css/underlay": "6.1.0"
+ "@spectrum-css/buttongroup": "10.0.0-next.1",
+ "@spectrum-css/divider": "6.0.0-next.1",
+ "@spectrum-css/icon": "10.0.0-next.2",
+ "@spectrum-css/modal": "8.0.0-next.1",
+ "@spectrum-css/tokens": "16.1.0-next.5",
+ "@spectrum-css/underlay": "7.0.0-next.0"
},
"keywords": [
"design-system",
diff --git a/components/alertdialog/stories/alertdialog.stories.js b/components/alertdialog/stories/alertdialog.stories.js
index 87c83d18ff9..e5b563f7658 100644
--- a/components/alertdialog/stories/alertdialog.stories.js
+++ b/components/alertdialog/stories/alertdialog.stories.js
@@ -32,12 +32,31 @@ export default {
control: { type: "text" },
},
isOpen,
- variant: { table: { disable: true } },
- buttons: { table: { disable: true } },
+ variant: {
+ name: "Variant",
+ type: { name: "string" },
+ table: {
+ type: { summary: "string" },
+ category: "Component",
+ },
+ options: ["confirmation", "information", "destructive", "warning", "error"],
+ control: "select",
+ },
+ hasVerticalButtons: {
+ name: "Vertical buttons",
+ description: "In limited horizontal space, the button group may stack vertically.",
+ type: { name: "boolean" },
+ table: {
+ type: { summary: "boolean" },
+ category: "Component",
+ },
+ control: "boolean",
+ }
},
args: {
rootClass: "spectrum-AlertDialog",
- isOpen: false,
+ isOpen: true,
+ hasVerticalButtons: false,
variant: "confirmation",
},
parameters: {
@@ -47,7 +66,7 @@ export default {
},
design: {
type: "figma",
- url: "https://www.figma.com/design/Mngz9H7WZLbrCvGQf3GnsY/S2-%2F-Desktop?node-id=21917-157",
+ url: "https://www.figma.com/design/Mngz9H7WZLbrCvGQf3GnsY/S2---Desktop?node-id=21917-157",
},
docs: {
story: {
@@ -56,25 +75,21 @@ export default {
},
packageJson,
metadata,
+ status: {
+ type: "migrated",
+ }
},
+ tags: ["migrated"],
decorators: [
withUnderlayWrapper,
],
};
export const Default = AlertDialogGroup.bind({});
+Default.storyName = "Default (confirmation)";
Default.args = {
isOpen: true,
heading: "Enable smart filters?",
- buttons: [{
- variant: "secondary",
- treatment: "outline",
- label: "Remind me later"
- }, {
- treatment: "fill",
- label: "Enable",
- variant: "accent"
- }],
content: "Smart filters are nondestructive and will preserve your original images.",
};
@@ -101,22 +116,14 @@ Information.args = {
isOpen: true,
variant: "information",
heading: "Informative Dialog with a wrapping title text because the text is longer than the width of the alert dialog",
- buttons: [{
- variant: "secondary",
- treatment: "outline",
- label: "No, thanks"
- },{
- variant: "secondary",
- treatment: "outline",
- label: "Remind me later"
- }, {
- variant: "primary",
- treatment: "outline",
- label: "Rate now",
- }],
content: "If you enjoy our app, would you mind taking a moment to rate it?",
};
Information.parameters = {
+ docs: {
+ story: {
+ height: "400px",
+ }
+ },
chromatic: { disableSnapshot: true },
};
@@ -129,16 +136,7 @@ Warning.args = {
isOpen: true,
variant: "warning",
heading: "Unverified format",
- icon: true,
- buttons: [{
- variant: "secondary",
- treatment: "outline",
- label: "Cancel"
- }, {
- treatment: "outline",
- label: "Continue",
- variant: "primary"
- }],
+ icon: "Warning",
content: "This format has not been verified and may not be viewable for some users. Do you want to continue publishing?",
};
Warning.parameters = {
@@ -154,17 +152,8 @@ Error.args = {
isOpen: true,
variant: "error",
heading: "Unable to share",
- icon: true,
- buttons: [{
- variant: "secondary",
- treatment: "outline",
- label: "Cancel"
- }, {
- treatment: "outline",
- label: "Continue",
- variant: "primary"
- }],
- content: "An error occured while sharing your project. Please verify the email address and try again.",
+ icon: "Alert",
+ content: "An error occurred while sharing your project. Please verify the email address and try again.",
};
Error.parameters = {
chromatic: { disableSnapshot: true },
@@ -179,36 +168,41 @@ Destructive.args = {
isOpen: true,
variant: "destructive",
heading: "Delete 3 documents?",
- buttons: [{
- variant: "secondary",
- treatment: "outline",
- label: "Cancel"
- }, {
- treatment: "fill",
- label: "Delete",
- variant: "negative"
- }],
content: "Are you sure you want to delete the 3 selected documents?",
};
Destructive.parameters = {
chromatic: { disableSnapshot: true },
};
+/**
+ * When the title and description text are too long for the available horizontal space, they wrap to form another line.
+ */
+export const Overflow = Template.bind({});
+Overflow.tags = ["!dev"];
+Overflow.args = {
+ isOpen: true,
+ variant: "confirmation",
+ heading: "Alert dialogs allow for text overflow by wrapping when the description and dialog are too long",
+ content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ultrices est eu lacus interdum, vitae volutpat tortor laoreet. Phasellus consectetur erat quis massa congue, vel placerat ipsum hendrerit. Aenean eleifend augue quam, quis blandit lacus pretium eget. Aliquam aliquam fermentum nunc, sed dictum metus varius in. Suspendisse in nisl libero. Nulla egestas massa eget lectus ullamcorper placerat. Vivamus cursus, nunc quis pharetra auctor, eros mi tempus elit, sit amet placerat ipsum velit ut dolor. Nam sit amet eleifend erat. Duis sollicitudin orci sit amet tellus tincidunt, vel lobortis risus pellentesque. Integer viverra urna elementum metus dignissim placerat. Nulla posuere eros ipsum."
+};
+Overflow.parameters = {
+ chromatic: { disableSnapshot: true },
+ docs: {
+ story: {
+ height: "525px",
+ },
+ },
+};
+
+/**
+ * The dialog description may also scroll if the height of the dialog is constrained.
+ */
export const Scroll = Template.bind({});
Scroll.tags = ["!dev"];
Scroll.args = {
isOpen: true,
variant: "confirmation",
heading: "Enable Smart Filters?",
- buttons: [{
- variant: "secondary",
- treatment: "outline",
- label: "Remind me later"
- }, {
- treatment: "fill",
- label: "Enable",
- variant: "accent"
- }],
content: "Smart filters are nondestructive and will preserve your original images. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ultrices est eu lacus interdum, vitae volutpat tortor laoreet. Phasellus consectetur erat quis massa congue, vel placerat ipsum hendrerit. Aenean eleifend augue quam, quis blandit lacus pretium eget. Aliquam aliquam fermentum nunc, sed dictum metus varius in. Suspendisse in nisl libero. Nulla egestas massa eget lectus ullamcorper placerat. Vivamus cursus, nunc quis pharetra auctor, eros mi tempus elit, sit amet placerat ipsum velit ut dolor. Nam sit amet eleifend erat. Duis sollicitudin orci sit amet tellus tincidunt, vel lobortis risus pellentesque. Integer viverra urna elementum metus dignissim placerat. Nulla posuere eros ipsum. Pellentesque viverra urna justo, eu ultricies nisl fermentum et. Vivamus tristique porttitor dictum.",
customStyles: {
"max-block-size": "275px",
@@ -217,3 +211,16 @@ Scroll.args = {
Scroll.parameters = {
chromatic: { disableSnapshot: true },
};
+
+/**
+ * Buttons are stacked by the importance of the action, with the most critical or primary action at the bottom.
+ */
+export const VerticalButtons = Template.bind({});
+VerticalButtons.storyName = "Vertical buttons";
+VerticalButtons.tags = ["!dev"];
+VerticalButtons.args = {
+ hasVerticalButtons: true,
+ isOpen: true,
+ heading: "Vertical button group",
+ content: "This is what an alert dialog looks like with buttons arranged vertically.",
+};
diff --git a/components/alertdialog/stories/alertdialog.test.js b/components/alertdialog/stories/alertdialog.test.js
index a74e2092864..c2c850cb58c 100644
--- a/components/alertdialog/stories/alertdialog.test.js
+++ b/components/alertdialog/stories/alertdialog.test.js
@@ -2,72 +2,39 @@ import { Variants } from "@spectrum-css/preview/decorators";
import { Dialog, Template } from "./template.js";
export const AlertDialogGroup = Variants({
- // Test this without Modal to focus on the dialog solo
Template,
TestTemplate: Dialog,
wrapperStyles: {
"z-index": "1",
"inline-size": "fit-content",
- "background-color": "var(--spectrum-gray-50, white)",
+ "background-color": "transparent",
+ "border": "none",
"min-block-size": "auto",
},
testData: [{}, {
+ testHeading: "Vertical button display",
+ heading: "Vertical button group",
+ content: "This is what an alert dialog looks like with buttons arranged vertically.",
+ hasVerticalButtons: true,
+ }, {
+ testHeading: "Warning",
variant: "warning",
heading: "Unverified format",
- icon: true,
- buttons: [{
- variant: "secondary",
- treatment: "outline",
- label: "Cancel"
- }, {
- treatment: "outline",
- label: "Continue",
- variant: "primary"
- }],
content: "This format has not been verified and may not be viewable for some users. Do you want to continue publishing?",
}, {
+ testHeading: "Error",
variant: "error",
heading: "Unable to share",
- icon: true,
- buttons: [{
- variant: "secondary",
- treatment: "outline",
- label: "Cancel"
- }, {
- treatment: "outline",
- label: "Continue",
- variant: "primary"
- }],
content: "An error occured while sharing your project. Please verify the email address and try again.",
}, {
+ testHeading: "Destructive",
variant: "destructive",
heading: "Delete 3 documents?",
- buttons: [{
- variant: "secondary",
- treatment: "outline",
- label: "Cancel"
- }, {
- treatment: "fill",
- label: "Delete",
- variant: "negative"
- }],
content: "Are you sure you want to delete the 3 selected documents?",
}, {
+ testHeading: "Informative",
variant: "information",
- heading: "Informative Dialog with a wrapping title text because the text is longer than the width of the alert dialog",
- buttons: [{
- variant: "secondary",
- treatment: "outline",
- label: "No, thanks"
- },{
- variant: "secondary",
- treatment: "outline",
- label: "Remind me later"
- }, {
- variant: "primary",
- treatment: "outline",
- label: "Rate now",
- }],
+ heading: "Informative dialog with a wrapping title text because the text is longer than the width of the alert dialog",
content: "If you enjoy our app, would you mind taking a moment to rate it?",
}],
});
diff --git a/components/alertdialog/stories/template.js b/components/alertdialog/stories/template.js
index 5de1e37972c..7504cc687da 100644
--- a/components/alertdialog/stories/template.js
+++ b/components/alertdialog/stories/template.js
@@ -1,5 +1,4 @@
import { Template as ButtonGroup } from "@spectrum-css/buttongroup/stories/template.js";
-import { Template as Divider } from "@spectrum-css/divider/stories/template.js";
import { Template as Icon } from "@spectrum-css/icon/stories/template.js";
import { Template as Modal } from "@spectrum-css/modal/stories/template.js";
import { getRandomId } from "@spectrum-css/preview/decorators";
@@ -11,14 +10,70 @@ import { when } from "lit/directives/when.js";
import "../index.css";
+const iconMap = {
+ warning: "AlertDiamond",
+ error: "AlertTriangle"
+};
+
+const buttonMap = {
+ confirmation: [{
+ variant: "secondary",
+ treatment: "outline",
+ label: "Remind me later"
+ }, {
+ variant: "accent",
+ treatment: "fill",
+ label: "Enable"
+ }],
+ information: [{
+ variant: "secondary",
+ treatment: "outline",
+ label: "No, thanks"
+ },{
+ variant: "secondary",
+ treatment: "outline",
+ label: "Remind me later"
+ }, {
+ variant: "primary",
+ treatment: "fill",
+ label: "Rate now"
+ }],
+ destructive: [{
+ variant: "secondary",
+ treatment: "outline",
+ label: "Cancel"
+ }, {
+ variant: "negative",
+ treatment: "fill",
+ label: "Delete"
+ }],
+ warning: [{
+ variant: "secondary",
+ treatment: "outline",
+ label: "Cancel"
+ }, {
+ variant: "primary",
+ treatment: "fill",
+ label: "Continue"
+ }],
+ error: [{
+ variant: "secondary",
+ treatment: "outline",
+ label: "Cancel"
+ }, {
+ variant: "primary",
+ treatment: "fill",
+ label: "Continue"
+ }],
+};
+
export const Dialog = ({
rootClass = "spectrum-AlertDialog",
heading,
content,
customClasses = [],
- buttons,
variant,
- icon = false,
+ hasVerticalButtons,
id = getRandomId("alertdialog"),
customStyles = {},
} = {}, context = {}) => {
@@ -26,7 +81,7 @@ export const Dialog = ({
`;
};
diff --git a/components/toast/stories/toast.stories.js b/components/toast/stories/toast.stories.js
index 9271ef70225..26e9a593a15 100644
--- a/components/toast/stories/toast.stories.js
+++ b/components/toast/stories/toast.stories.js
@@ -30,6 +30,16 @@ export default {
},
control: "text",
},
+ hasButton: {
+ name: "Has button",
+ description: "Adds a button that is directly related to the toast's message.",
+ type: { name: "boolean" },
+ table: {
+ type: { summary: "boolean" },
+ category: "Component",
+ },
+ control: "boolean",
+ },
inlineButtonLabel: {
name: "Inline button label",
description: "Label for the inline button; if blank, no button is shown",
@@ -39,6 +49,7 @@ export default {
type: { summary: "string" },
},
control: "text",
+ if: { arg: "hasButton", truthy: true },
},
},
args: {
@@ -54,7 +65,11 @@ export default {
url: "https://www.figma.com/design/Mngz9H7WZLbrCvGQf3GnsY/S2-%2F-Desktop?node-id=2666-4482",
},
metadata,
+ status: {
+ type: "migrated",
+ },
},
+ tags: ["migrated"],
};
/**
@@ -64,6 +79,7 @@ export default {
export const Default = ToastGroup.bind({});
Default.args = {
message: "File has been archived",
+ hasButton: true,
inlineButtonLabel: "Undo",
variant: "neutral"
};
@@ -142,7 +158,7 @@ Wrapping.parameters = {
};
/**
- * A toast can have up to one action: [a static white, secondary, outline button](?path=/docs/components-button--docs#static-white---secondary). This label should be kept concise, and it should only be used when there’s a direct action available that is related to the toast text.
+ * A toast can have up to one button: [a static white, secondary, outline button](?path=/docs/components-button--docs#static-white---secondary). That button's label should be kept concise, and it should only be used when there’s a direct action available that is related to the toast text.
*/
export const Action = ActionTemplate.bind({});
diff --git a/components/toast/stories/toast.test.js b/components/toast/stories/toast.test.js
index 7e784b44980..ef23bab9eb1 100644
--- a/components/toast/stories/toast.test.js
+++ b/components/toast/stories/toast.test.js
@@ -34,14 +34,14 @@ export const ToastGroup = Variants({
{
testHeading: "Wrapping without button",
variant: "info",
- message: "A new version of Lightroom Classic is now available. Use the Update button below to start using the new version.",
- inlineButtonLabel: undefined
+ message: "A new version of Lightroom Classic is now available.",
+ hasButton: false
},
{
testHeading: "Short message, no required action",
variant: "neutral",
message: "The toast is done.",
- inlineButtonLabel: undefined
+ hasButton: false
},
]
});
diff --git a/components/toast/themes/express.css b/components/toast/themes/express.css
deleted file mode 100644
index 2de113b03ed..00000000000
--- a/components/toast/themes/express.css
+++ /dev/null
@@ -1,22 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--express */
-
-@import "./spectrum.css";
-
-@container style(--system: express) {
- .spectrum-Toast {
- --spectrum-toast-background-color-default: var(--spectrum-neutral-background-color-default);
- }
-}
diff --git a/components/toast/themes/spectrum-two.css b/components/toast/themes/spectrum-two.css
deleted file mode 100644
index 1097d457299..00000000000
--- a/components/toast/themes/spectrum-two.css
+++ /dev/null
@@ -1,19 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-@container style(--system: spectrum) {
- .spectrum-Toast {
- --spectrum-toast-background-color-default: var(--spectrum-neutral-subdued-background-color-default);
- --spectrum-toast-divider-color: var(--spectrum-transparent-white-400);
- }
-}
diff --git a/components/toast/themes/spectrum.css b/components/toast/themes/spectrum.css
deleted file mode 100644
index 3f6e05c5d78..00000000000
--- a/components/toast/themes/spectrum.css
+++ /dev/null
@@ -1,22 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--legacy */
-
-@import "./spectrum-two.css";
-
-@container style(--system: legacy) {
- .spectrum-Toast {
- --spectrum-toast-divider-color: var(--spectrum-transparent-white-300);
- }
-}
diff --git a/components/tooltip/CHANGELOG.md b/components/tooltip/CHANGELOG.md
index 6a20990e026..e3c64a97904 100644
--- a/components/tooltip/CHANGELOG.md
+++ b/components/tooltip/CHANGELOG.md
@@ -1,5 +1,34 @@
# Change log
+## 8.0.0-next.2
+
+### Minor Changes
+
+📝 [#3641](https://github.com/adobe/spectrum-css/pull/3641) [`0b730ea`](https://github.com/adobe/spectrum-css/commit/0b730ea73e16b98c4e01c7cc5e67beda8ef77e38) Thanks [@cdransf](https://github.com/cdransf)!
+
+#### S2: restore negative and informative semantic variants
+
+This restores the negative and informative tooltip semantic variant styles, story controls and test cases. Icons have been removed for all variants as they are not present in the specifications provided by design.
+
+##### Restored mods
+
+`--mod-tooltip-background-color-informative`
+`--mod-tooltip-background-color-negative"`
+
+## 8.0.0-next.1
+
+### Patch Changes
+
+- Updated dependencies [[`60a156d`](https://github.com/adobe/spectrum-css/commit/60a156d7c0efcc999bc440274bbbbf586beb274b)]:
+ - @spectrum-css/tokens@16.1.0-next.0
+
+## 8.0.0-next.0
+
+### Patch Changes
+
+- Updated dependencies [[`a25e0a9`](https://github.com/adobe/spectrum-css/commit/a25e0a99e5a4736ab4e607e00739343101a2633b)]:
+ - @spectrum-css/icon@10.0.0-next.0
+
## 7.1.0
### Minor Changes
diff --git a/components/tooltip/dist/metadata.json b/components/tooltip/dist/metadata.json
index 7f6d6d0b94d..70c561020d0 100644
--- a/components/tooltip/dist/metadata.json
+++ b/components/tooltip/dist/metadata.json
@@ -51,8 +51,6 @@
".spectrum-Tooltip--left.is-open",
".spectrum-Tooltip--negative",
".spectrum-Tooltip--negative .spectrum-Tooltip-tip",
- ".spectrum-Tooltip--positive",
- ".spectrum-Tooltip--positive .spectrum-Tooltip-tip",
".spectrum-Tooltip--right",
".spectrum-Tooltip--right .spectrum-Tooltip-tip",
".spectrum-Tooltip--right .spectrum-Tooltip-tip:dir(rtl)",
@@ -99,7 +97,6 @@
".spectrum-Tooltip--top.is-open",
".spectrum-Tooltip-label",
".spectrum-Tooltip-tip",
- ".spectrum-Tooltip-typeIcon",
".spectrum-Tooltip.is-open",
".spectrum-Tooltip:lang(ja)",
".spectrum-Tooltip:lang(ko)",
@@ -311,18 +308,12 @@
"--mod-tooltip-background-color-default",
"--mod-tooltip-background-color-informative",
"--mod-tooltip-background-color-negative",
- "--mod-tooltip-background-color-positive",
"--mod-tooltip-border-radius",
"--mod-tooltip-cjk-line-height",
"--mod-tooltip-content-color",
"--mod-tooltip-font-size",
"--mod-tooltip-font-weight",
"--mod-tooltip-height",
- "--mod-tooltip-icon-height",
- "--mod-tooltip-icon-spacing-block-start",
- "--mod-tooltip-icon-spacing-inline-end",
- "--mod-tooltip-icon-spacing-inline-start",
- "--mod-tooltip-icon-width",
"--mod-tooltip-line-height",
"--mod-tooltip-margin",
"--mod-tooltip-max-inline-size",
@@ -332,28 +323,22 @@
"--mod-tooltip-spacing-inline",
"--mod-tooltip-tip-antialiasing-inset",
"--mod-tooltip-tip-block-size",
+ "--mod-tooltip-tip-corner-radius",
"--mod-tooltip-tip-height-percentage",
"--mod-tooltip-tip-square-size"
],
"component": [
"--spectrum-tooltip-animation-distance",
"--spectrum-tooltip-animation-duration",
- "--spectrum-tooltip-backgound-color-default-neutral",
"--spectrum-tooltip-background-color-default",
"--spectrum-tooltip-background-color-informative",
"--spectrum-tooltip-background-color-negative",
- "--spectrum-tooltip-background-color-positive",
"--spectrum-tooltip-border-radius",
"--spectrum-tooltip-cjk-line-height",
"--spectrum-tooltip-content-color",
"--spectrum-tooltip-font-size",
"--spectrum-tooltip-font-weight",
"--spectrum-tooltip-height",
- "--spectrum-tooltip-icon-height",
- "--spectrum-tooltip-icon-spacing-block-start",
- "--spectrum-tooltip-icon-spacing-inline-end",
- "--spectrum-tooltip-icon-spacing-inline-start",
- "--spectrum-tooltip-icon-width",
"--spectrum-tooltip-line-height",
"--spectrum-tooltip-margin",
"--spectrum-tooltip-max-inline-size",
@@ -364,11 +349,10 @@
"--spectrum-tooltip-spacing-inline",
"--spectrum-tooltip-tip-antialiasing-inset",
"--spectrum-tooltip-tip-block-size",
+ "--spectrum-tooltip-tip-corner-radius",
"--spectrum-tooltip-tip-height",
"--spectrum-tooltip-tip-height-percentage",
- "--spectrum-tooltip-tip-inline-size",
- "--spectrum-tooltip-tip-square-size",
- "--spectrum-tooltip-tip-width"
+ "--spectrum-tooltip-tip-square-size"
],
"global": [
"--spectrum-animation-duration-0",
@@ -378,25 +362,18 @@
"--spectrum-component-edge-to-text-75",
"--spectrum-component-height-75",
"--spectrum-component-top-to-text-75",
- "--spectrum-component-top-to-workflow-icon-75",
- "--spectrum-corner-radius-100",
+ "--spectrum-corner-radius-400",
"--spectrum-font-size-75",
+ "--spectrum-gray-25",
"--spectrum-informative-background-color-default",
- "--spectrum-line-height-100",
"--spectrum-negative-background-color-default",
- "--spectrum-neutral-subdued-background-color-default",
- "--spectrum-positive-background-color-default",
+ "--spectrum-neutral-background-color-default",
"--spectrum-regular-font-weight",
- "--spectrum-text-to-visual-75",
- "--spectrum-white",
- "--spectrum-workflow-icon-size-50"
+ "--spectrum-spacing-75"
],
- "system-theme": ["--system-tooltip-backgound-color-default-neutral"],
"passthroughs": [],
"high-contrast": [
"--highcontrast-tooltip-background-color-default",
- "--highcontrast-tooltip-background-color-informative",
- "--highcontrast-tooltip-background-color-negative",
- "--highcontrast-tooltip-background-color-positive"
+ "--highcontrast-tooltip-border-width"
]
}
diff --git a/components/tooltip/index.css b/components/tooltip/index.css
index f488b9cbf49..11b18eb1b18 100644
--- a/components/tooltip/index.css
+++ b/components/tooltip/index.css
@@ -11,24 +11,23 @@
* governing permissions and limitations under the License.
*/
-@import "./themes/spectrum-two.css";
@import "@spectrum-css/commons/overlay.css";
.spectrum-Tooltip {
--spectrum-tooltip-animation-duration: var(--spectrum-animation-duration-100);
+ --spectrum-tooltip-animation-distance: var(--spectrum-spacing-75);
/* override if additional spacing to source is required */
--spectrum-tooltip-margin: 0px;
--spectrum-tooltip-height: var(--spectrum-component-height-75);
--spectrum-tooltip-max-inline-size: var(--spectrum-tooltip-maximum-width);
- --spectrum-tooltip-border-radius: var(--spectrum-corner-radius-100);
-
- --spectrum-tooltip-icon-width: var(--spectrum-workflow-icon-size-50);
- --spectrum-tooltip-icon-height: var(--spectrum-workflow-icon-size-50);
+ --spectrum-tooltip-border-radius: var(--spectrum-corner-radius-400);
--spectrum-tooltip-font-size: var(--spectrum-font-size-75);
- --spectrum-tooltip-line-height: var(--spectrum-line-height-100);
+
+ /* @todo set line-height using font size specific line-height tokens when they are finalized along with the new variable font. */
+ --spectrum-tooltip-line-height: 1.2;
--spectrum-tooltip-cjk-line-height: var(--spectrum-cjk-line-height-100);
--spectrum-tooltip-font-weight: var(--spectrum-regular-font-weight);
@@ -39,51 +38,26 @@
--spectrum-tooltip-spacing-block-start: var(--spectrum-component-top-to-text-75);
--spectrum-tooltip-spacing-block-end: var(--spectrum-component-bottom-to-text-75);
- /* icon spacing */
- --spectrum-tooltip-icon-spacing-inline-start: var(--spectrum-text-to-visual-75);
- --spectrum-tooltip-icon-spacing-inline-end: var(--spectrum-text-to-visual-75);
- --spectrum-tooltip-icon-spacing-block-start: var(--spectrum-component-top-to-workflow-icon-75);
+ --spectrum-tooltip-content-color: var(--spectrum-gray-25);
+ --spectrum-tooltip-background-color-default: var(--spectrum-neutral-background-color-default);
/* colors */
--spectrum-tooltip-background-color-informative: var(--spectrum-informative-background-color-default);
- --spectrum-tooltip-background-color-positive: var(--spectrum-positive-background-color-default);
--spectrum-tooltip-background-color-negative: var(--spectrum-negative-background-color-default);
- --spectrum-tooltip-content-color: var(--spectrum-white);
-
/* tip */
- --spectrum-tooltip-tip-inline-size: var(--spectrum-tooltip-tip-width);
--spectrum-tooltip-tip-block-size: var(--spectrum-tooltip-tip-height);
- /* Width and height of square element used to render the tip triangle. */
- --spectrum-tooltip-tip-square-size: var(--spectrum-tooltip-tip-inline-size);
-
/* Percentage value of height divided by width, for calculating clip-path within a square tip. */
- --spectrum-tooltip-tip-height-percentage: 50%;
+ --spectrum-tooltip-tip-height-percentage: 100%;
/* Tip inset from container edges for clip-paths calculation, to fix hairline gap in Chrome cause by antialiasing. */
--spectrum-tooltip-tip-antialiasing-inset: 0.5px;
/* pointer tip - default spacing to edge - corner radius plus half of tip width to neutralize override */
- --spectrum-tooltip-pointer-corner-spacing: var(--spectrum-corner-radius-100);
+ --spectrum-tooltip-pointer-corner-spacing: var(--mod-tooltip-border-radius, var(--spectrum-tooltip-border-radius));
- /* neutral background changes per theme */
- --spectrum-tooltip-background-color-default: var(--spectrum-tooltip-backgound-color-default-neutral);
-}
-
-@media (forced-colors: active) {
- .spectrum-Tooltip {
- border: 1px solid transparent;
- }
-
- .spectrum-Tooltip-tip {
- --highcontrast-tooltip-background-color-default: CanvasText;
- --highcontrast-tooltip-background-color-informative: CanvasText;
- --highcontrast-tooltip-background-color-positive: CanvasText;
- --highcontrast-tooltip-background-color-negative: CanvasText;
-
- forced-color-adjust: none;
- }
+ --highcontrast-tooltip-border-width: 0px;
}
.spectrum-Tooltip {
@@ -133,15 +107,11 @@
/****** Variants ******/
.spectrum-Tooltip--info {
- background-color: var(--highcontrast-tooltip-background-color-informative, var(--mod-tooltip-background-color-informative, var(--spectrum-tooltip-background-color-informative)));
-}
-
-.spectrum-Tooltip--positive {
- background-color: var(--highcontrast-tooltip-background-color-positive, var(--mod-tooltip-background-color-positive, var(--spectrum-tooltip-background-color-positive)));
+ background-color: var(--highcontrast-tooltip-background-color-default, var(--mod-tooltip-background-color-informative, var(--spectrum-tooltip-background-color-informative)));
}
.spectrum-Tooltip--negative {
- background-color: var(--highcontrast-tooltip-background-color-negative, var(--mod-tooltip-background-color-negative, var(--spectrum-tooltip-background-color-negative)));
+ background-color: var(--highcontrast-tooltip-background-color-default, var(--mod-tooltip-background-color-negative, var(--spectrum-tooltip-background-color-negative)));
}
.spectrum-Tooltip.is-open {
@@ -155,26 +125,24 @@
block-size: var(--mod-tooltip-tip-square-size, var(--spectrum-tooltip-tip-square-size));
inline-size: var(--mod-tooltip-tip-square-size, var(--spectrum-tooltip-tip-square-size));
- inset-block-start: 100%;
+ inset-block-start: calc(100% - (0.5 * var(--mod-tooltip-tip-square-size, var(--spectrum-tooltip-tip-square-size))) - var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset)) + var(--highcontrast-tooltip-border-width));
/* stylelint-disable-next-line csstools/use-logical -- intentional use of non-logical property */
- left: 50%;
- transform: translateX(-50%);
+ left: calc(50% - (0.5 * var(--mod-tooltip-tip-square-size, var(--spectrum-tooltip-tip-square-size))));
+ transform: rotate(-45deg);
background-color: var(--highcontrast-tooltip-background-color-default, var(--mod-tooltip-background-color-default, var(--spectrum-tooltip-background-color-default)));
/* Default: Pointing down ▽ */
- clip-path: polygon(0 calc(0% - var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset))), 50% var(--mod-tooltip-tip-height-percentage, var(--spectrum-tooltip-tip-height-percentage)), 100% calc(0% - var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset))));
+ clip-path: polygon(0 0, 100% var(--mod-tooltip-tip-height-percentage, var(--spectrum-tooltip-tip-height-percentage)), 0 100%);
- .spectrum-Tooltip--info & {
- background-color: var(--highcontrast-tooltip-background-color-informative, var(--mod-tooltip-background-color-informative, var(--spectrum-tooltip-background-color-informative)));
- }
+ border-radius: 0 0 0 var(--mod-tooltip-tip-corner-radius, var(--spectrum-tooltip-tip-corner-radius));
- .spectrum-Tooltip--positive & {
- background-color: var(--highcontrast-tooltip-background-color-positive, var(--mod-tooltip-background-color-positive, var(--spectrum-tooltip-background-color-positive)));
+ .spectrum-Tooltip--info & {
+ background-color: var(--highcontrast-tooltip-background-color-default, var(--mod-tooltip-background-color-informative, var(--spectrum-tooltip-background-color-informative)));
}
.spectrum-Tooltip--negative & {
- background-color: var(--highcontrast-tooltip-background-color-negative, var(--mod-tooltip-background-color-negative, var(--spectrum-tooltip-background-color-negative)));
+ background-color: var(--highcontrast-tooltip-background-color-default, var(--mod-tooltip-background-color-negative, var(--spectrum-tooltip-background-color-negative)));
}
/*** Tip Placement ***/
@@ -184,7 +152,8 @@
.spectrum-Tooltip--top-right &,
.spectrum-Tooltip--top-start &,
.spectrum-Tooltip--top-end & {
- inset-block-start: 100%;
+ inset-block-start: calc(100% - (0.5 * var(--mod-tooltip-tip-square-size, var(--spectrum-tooltip-tip-square-size))) - var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset)) + var(--highcontrast-tooltip-border-width));
+ transform: rotate(-45deg);
}
/* tip is horizontal at top pointing up △ */
@@ -193,20 +162,8 @@
.spectrum-Tooltip--bottom-right &,
.spectrum-Tooltip--bottom-start &,
.spectrum-Tooltip--bottom-end & {
- clip-path: polygon(50% calc(100% - var(--mod-tooltip-tip-height-percentage, var(--spectrum-tooltip-tip-height-percentage))), 0 calc(100% + var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset))), 100% calc(100% + var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset))));
- inset-block: auto 100%;
- }
-
- /* tip is horizontal and at the edge */
- .spectrum-Tooltip--top-left &,
- .spectrum-Tooltip--bottom-left &,
- .spectrum-Tooltip--top-right &,
- .spectrum-Tooltip--bottom-right &,
- .spectrum-Tooltip--top-start &,
- .spectrum-Tooltip--bottom-start &,
- .spectrum-Tooltip--top-end &,
- .spectrum-Tooltip--bottom-end & {
- transform: none;
+ inset-block: auto calc(100% - (0.5 * var(--mod-tooltip-tip-square-size, var(--spectrum-tooltip-tip-square-size))) - var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset)) + var(--highcontrast-tooltip-border-width));
+ transform: rotate(135deg);
}
/* tip is horizontal at left △ ▽ */
@@ -256,8 +213,7 @@
.spectrum-Tooltip--end &,
.spectrum-Tooltip--end-top &,
.spectrum-Tooltip--end-bottom & {
- inset-block-start: 50%;
- transform: translateY(-50%);
+ inset-block-start: calc(50% - (0.5 * var(--mod-tooltip-tip-square-size, var(--spectrum-tooltip-tip-square-size))));
}
/* tip is vertical and at edge */
@@ -269,7 +225,6 @@
.spectrum-Tooltip--start-bottom &,
.spectrum-Tooltip--end-top &,
.spectrum-Tooltip--end-bottom & {
- transform: none;
inset-block-start: auto;
}
@@ -280,8 +235,8 @@
.spectrum-Tooltip--end &,
.spectrum-Tooltip--end-top &,
.spectrum-Tooltip--end-bottom & {
- clip-path: polygon(calc(100% - var(--mod-tooltip-tip-height-percentage, var(--spectrum-tooltip-tip-height-percentage))) 50%, calc(100% + var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset))) 100%, calc(100% + var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset))) 0);
- inset-inline: auto 100%;
+ inset-inline: auto calc(100% - (0.5 * var(--mod-tooltip-tip-square-size, var(--spectrum-tooltip-tip-square-size))) - var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset)) + var(--highcontrast-tooltip-border-width));
+ transform: rotate(45deg);
}
/* tip is vertical pointing ▷ right or end, for LTR. */
@@ -291,8 +246,8 @@
.spectrum-Tooltip--start &,
.spectrum-Tooltip--start-top &,
.spectrum-Tooltip--start-bottom & {
- clip-path: polygon(calc(0% - var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset))) 0, calc(0% - var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset))) 100%, var(--mod-tooltip-tip-height-percentage, var(--spectrum-tooltip-tip-height-percentage)) 50%);
- inset-inline-start: 100%;
+ inset-inline-start: calc(100% - (0.5 * var(--mod-tooltip-tip-square-size, var(--spectrum-tooltip-tip-square-size))) - var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset)) + var(--highcontrast-tooltip-border-width));
+ transform: rotate(-135deg);
}
/* tip is vertical at top ◁ ▷ */
@@ -319,9 +274,9 @@
.spectrum-Tooltip--end-top &,
.spectrum-Tooltip--end-bottom & {
&:dir(rtl) {
- clip-path: polygon(calc(0% - var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset))) 0, calc(0% - var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset))) 100%, var(--mod-tooltip-tip-height-percentage, var(--spectrum-tooltip-tip-height-percentage)) 50%);
+ transform: rotate(-135deg);
right: auto;
- left: 100%;
+ left: calc(100% - (0.5 * var(--mod-tooltip-tip-square-size, var(--spectrum-tooltip-tip-square-size))) - var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset)) + var(--highcontrast-tooltip-border-width));
}
}
@@ -333,25 +288,13 @@
.spectrum-Tooltip--start-top &,
.spectrum-Tooltip--start-bottom & {
&:dir(rtl) {
- clip-path: polygon(var(--mod-tooltip-tip-height-percentage, var(--spectrum-tooltip-tip-height-percentage)) 50%, calc(100% + var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset))) 100%, calc(100% + var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset))) 0);
+ transform: rotate(45deg);
left: auto;
- right: 100%;
+ right: calc(100% - (0.5 * var(--mod-tooltip-tip-square-size, var(--spectrum-tooltip-tip-square-size))) - var(--mod-tooltip-tip-antialiasing-inset, var(--spectrum-tooltip-tip-antialiasing-inset)) + var(--highcontrast-tooltip-border-width));
}
}
}
-/****** Icon ******/
-.spectrum-Tooltip-typeIcon {
- /* subtract tooltip padding from icon start margin */
- margin-inline-start: calc(var(--mod-tooltip-icon-spacing-inline-start, var(--spectrum-tooltip-icon-spacing-inline-start)) - var(--mod-tooltip-spacing-inline, var(--spectrum-tooltip-spacing-inline)));
- margin-inline-end: var(--mod-tooltip-icon-spacing-inline-end, var(--spectrum-tooltip-icon-spacing-inline-end));
- margin-block-start: var(--mod-tooltip-icon-spacing-block-start, var(--spectrum-tooltip-icon-spacing-block-start));
- inline-size: var(--mod-tooltip-icon-width, var(--spectrum-tooltip-icon-width));
- block-size: var(--mod-tooltip-icon-height, var(--spectrum-tooltip-icon-height));
- align-self: flex-start;
- flex-shrink: 0;
-}
-
/****** Label ******/
.spectrum-Tooltip-label {
/* Make sure line height is correct to prevent problems in Windows */
@@ -649,3 +592,15 @@
}
}
}
+
+@media (forced-colors: active) {
+ .spectrum-Tooltip {
+ --highcontrast-tooltip-border-width: 1px;
+
+ border: var(--highcontrast-tooltip-border-width) solid CanvasText;
+ }
+
+ .spectrum-Tooltip-tip {
+ --highcontrast-tooltip-background-color-default: CanvasText;
+ }
+}
diff --git a/components/tooltip/package.json b/components/tooltip/package.json
index e3f32998488..c11cf93706c 100644
--- a/components/tooltip/package.json
+++ b/components/tooltip/package.json
@@ -1,6 +1,6 @@
{
"name": "@spectrum-css/tooltip",
- "version": "7.1.0",
+ "version": "8.0.0-next.2",
"description": "The Spectrum CSS tooltip component",
"license": "Apache-2.0",
"author": "Adobe",
@@ -25,8 +25,8 @@
},
"main": "dist/index.css",
"peerDependencies": {
- "@spectrum-css/icon": ">=9.0.0 <10.0.0",
- "@spectrum-css/tokens": ">=16.0.0 <17.0.0"
+ "@spectrum-css/icon": ">=10.0.0-next.0",
+ "@spectrum-css/tokens": ">=16.1.0-next.0"
},
"peerDependenciesMeta": {
"@spectrum-css/icon": {
@@ -37,9 +37,9 @@
}
},
"devDependencies": {
- "@spectrum-css/commons": "11.0.0",
- "@spectrum-css/icon": "9.1.0",
- "@spectrum-css/tokens": "16.0.2"
+ "@spectrum-css/commons": "12.0.0-next.0",
+ "@spectrum-css/icon": "10.0.0-next.2",
+ "@spectrum-css/tokens": "16.1.0-next.5"
},
"keywords": [
"design-system",
diff --git a/components/tooltip/stories/template.js b/components/tooltip/stories/template.js
index 5c5c260f4d6..109f3ad0aee 100644
--- a/components/tooltip/stories/template.js
+++ b/components/tooltip/stories/template.js
@@ -1,4 +1,3 @@
-import { Template as Icon } from "@spectrum-css/icon/stories/template.js";
import { Container } from "@spectrum-css/preview/decorators";
import { html } from "lit";
import { classMap } from "lit/directives/class-map.js";
@@ -7,32 +6,18 @@ import { when } from "lit/directives/when.js";
import { capitalize } from "lodash-es";
import "../index.css";
-import "../themes/spectrum.css";
-/* Must be imported last */
-import "../themes/express.css";
export const Template = ({
rootClass = "spectrum-Tooltip",
label,
- variant = "neutral",
placement,
+ variant = "neutral",
isOpen = true,
isFocused = false,
showOnHover = false,
customStyles = {},
customClasses = [],
-} = {}, context = {}) => {
- let variantIcon;
- if (variant === "info") {
- variantIcon = "Info";
- }
- else if (variant === "positive") {
- variantIcon = "CheckmarkCircle";
- }
- else if (variant === "negative") {
- variantIcon = "Alert";
- }
-
+} = {}) => {
if (showOnHover) {
document.addEventListener("DOMContentLoaded", () => {
[...document.querySelectorAll(`.${rootClass}`)].forEach(tooltip => {
@@ -54,14 +39,6 @@ export const Template = ({
})}
style=${styleMap(customStyles)}
>
- ${when(variantIcon, () =>
- Icon({
- iconName: variantIcon,
- setName: "workflow",
- size: "m",
- customClasses: [`${rootClass}-typeIcon`],
- }, context)
- )}
${when(label, () => html`
{
const variants = [
"neutral",
"info",
- "positive",
"negative",
];
diff --git a/components/tooltip/stories/tooltip.stories.js b/components/tooltip/stories/tooltip.stories.js
index a594409e4b7..9b8541ea287 100644
--- a/components/tooltip/stories/tooltip.stories.js
+++ b/components/tooltip/stories/tooltip.stories.js
@@ -28,7 +28,7 @@ export default {
type: { summary: "string" },
category: "Component",
},
- options: ["neutral", "info", "positive", "negative"],
+ options: ["neutral", "info", "negative"],
control: "inline-radio",
},
placement: {
@@ -96,7 +96,11 @@ export default {
},
packageJson,
metadata,
+ status: {
+ type: "migrated",
+ },
},
+ tags: ["migrated"],
};
export const Default = PlacementVariants.bind({});
@@ -133,14 +137,10 @@ ShowOnHover.parameters = {
/**
* By default, tooltips are the neutral variant. This is the most common variant because most tooltips are used to only
- * disclose additional information, without conveying a semantic meaning. The neutral variant never includes an icon.
+ * disclose additional information, without conveying a semantic meaning.
*
- * Tooltips also come in other semantic variants: informative (blue), positive (green), and negative (red). These use
+ * Tooltips also come in other semantic variants: informative (blue) and negative (red). These use
* [semantic colors](https://spectrum.adobe.com/page/color-system/#Color-semantics) to communicate the meaning.
- *
- * These semantic variants include an icon to supplement the messaging. These icons are predefined and can not be
- * customized. Unless it's being used to provide context about the exact same icon, a semantic tooltip should always
- * show an icon. Doing this is essential for helping users with color vision deficiency to discern the message tone.
*/
export const SemanticVariants = SemanticVariantGroup.bind({});
SemanticVariants.tags = ["!dev"];
diff --git a/components/tooltip/stories/tooltip.test.js b/components/tooltip/stories/tooltip.test.js
index 358dab79a27..eb77d5faeb0 100644
--- a/components/tooltip/stories/tooltip.test.js
+++ b/components/tooltip/stories/tooltip.test.js
@@ -5,7 +5,7 @@ import { Template } from "./template.js";
export const PlacementVariants = Variants({
Template,
testData: [
- ...["neutral", "info", "positive", "negative"].map(variant => ({
+ ...["neutral", "info", "negative"].map(variant => ({
testHeading: capitalize(variant),
variant,
})),
diff --git a/components/tooltip/themes/express.css b/components/tooltip/themes/express.css
deleted file mode 100644
index ec00162e91a..00000000000
--- a/components/tooltip/themes/express.css
+++ /dev/null
@@ -1,22 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--express */
-
-@import "./spectrum.css";
-
-@container style(--system: express) {
- .spectrum-Tooltip {
- --spectrum-tooltip-backgound-color-default-neutral: var(--spectrum-neutral-background-color-default);
- }
-}
diff --git a/components/tooltip/themes/spectrum-two.css b/components/tooltip/themes/spectrum-two.css
deleted file mode 100644
index 42b423e3448..00000000000
--- a/components/tooltip/themes/spectrum-two.css
+++ /dev/null
@@ -1,18 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-@container style(--system: spectrum) {
- .spectrum-Tooltip {
- --spectrum-tooltip-backgound-color-default-neutral: var(--spectrum-neutral-subdued-background-color-default);
- }
-}
diff --git a/components/tooltip/themes/spectrum.css b/components/tooltip/themes/spectrum.css
deleted file mode 100644
index 3d81bc564b5..00000000000
--- a/components/tooltip/themes/spectrum.css
+++ /dev/null
@@ -1,16 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--legacy */
-
-@import "./spectrum-two.css";
diff --git a/components/tray/CHANGELOG.md b/components/tray/CHANGELOG.md
index 2237276890d..ce2c1a3eca1 100644
--- a/components/tray/CHANGELOG.md
+++ b/components/tray/CHANGELOG.md
@@ -1,5 +1,36 @@
# Change log
+## 6.0.0-next.3
+
+### Patch Changes
+
+- Updated dependencies [[`60a156d`](https://github.com/adobe/spectrum-css/commit/60a156d7c0efcc999bc440274bbbbf586beb274b)]:
+ - @spectrum-css/tokens@16.1.0-next.0
+ - @spectrum-css/modal@8.0.0-next.1
+
+## 6.0.0-next.2
+
+### Patch Changes
+
+- Updated dependencies [[`cb1b957`](https://github.com/adobe/spectrum-css/commit/cb1b957c05ecf02d3f473de09a8bfd5f2b5d42bf)]:
+ - @spectrum-css/modal@7.1.1-next.0
+
+## 6.0.0-next.1
+
+### Patch Changes
+
+- Updated dependencies [[`c6836fb`](https://github.com/adobe/spectrum-css/commit/c6836fb132effcfb09e4ca6d0d8923564bfe2914)]:
+ - @spectrum-css/divider@6.0.0-next.0
+
+## 6.0.0-next.0
+
+### Patch Changes
+
+- Updated dependencies [[`a25e0a9`](https://github.com/adobe/spectrum-css/commit/a25e0a99e5a4736ab4e607e00739343101a2633b)]:
+ - @spectrum-css/icon@10.0.0-next.0
+ - @spectrum-css/button@15.0.0-next.0
+ - @spectrum-css/dialog@13.0.0-next.0
+
## 5.1.0
### Minor Changes
diff --git a/components/tray/dist/metadata.json b/components/tray/dist/metadata.json
index 2d510b6a7aa..db6c152c441 100644
--- a/components/tray/dist/metadata.json
+++ b/components/tray/dist/metadata.json
@@ -36,7 +36,6 @@
"--spectrum-background-layer-2-color",
"--spectrum-corner-radius-100"
],
- "system-theme": [],
"passthroughs": ["--mod-modal-max-width"],
"high-contrast": ["--highcontrast-tray-background-color"]
}
diff --git a/components/tray/package.json b/components/tray/package.json
index 757673c9925..d91a0f3932a 100644
--- a/components/tray/package.json
+++ b/components/tray/package.json
@@ -1,6 +1,6 @@
{
"name": "@spectrum-css/tray",
- "version": "5.1.0",
+ "version": "6.0.0-next.3",
"description": "The Spectrum CSS tray component",
"license": "Apache-2.0",
"author": "Adobe",
@@ -25,12 +25,12 @@
},
"main": "dist/index.css",
"peerDependencies": {
- "@spectrum-css/button": ">=14.0.0 <15.0.0",
- "@spectrum-css/dialog": ">=12.0.0 <13.0.0",
- "@spectrum-css/divider": ">=5.0.0 <6.0.0",
- "@spectrum-css/icon": ">=9.0.0 <10.0.0",
- "@spectrum-css/modal": ">=7.0.0 <8.0.0",
- "@spectrum-css/tokens": ">=16.0.0 <17.0.0"
+ "@spectrum-css/button": ">=15.0.0-next.0",
+ "@spectrum-css/dialog": ">=13.0.0-next.0",
+ "@spectrum-css/divider": ">=6.0.0-next.0",
+ "@spectrum-css/icon": ">=10.0.0-next.0",
+ "@spectrum-css/modal": ">=8.0.0-next.1",
+ "@spectrum-css/tokens": ">=16.1.0-next.0"
},
"peerDependenciesMeta": {
"@spectrum-css/button": {
@@ -53,12 +53,12 @@
}
},
"devDependencies": {
- "@spectrum-css/button": "14.1.6",
- "@spectrum-css/dialog": "12.1.0",
- "@spectrum-css/divider": "5.1.0",
- "@spectrum-css/icon": "9.1.0",
- "@spectrum-css/modal": "7.1.0",
- "@spectrum-css/tokens": "16.0.2"
+ "@spectrum-css/button": "15.0.0-next.2",
+ "@spectrum-css/dialog": "13.0.0-next.3",
+ "@spectrum-css/divider": "6.0.0-next.1",
+ "@spectrum-css/icon": "10.0.0-next.2",
+ "@spectrum-css/modal": "8.0.0-next.1",
+ "@spectrum-css/tokens": "16.1.0-next.5"
},
"keywords": [
"design-system",
diff --git a/components/treeview/CHANGELOG.md b/components/treeview/CHANGELOG.md
index 50df5078888..b786ce22428 100644
--- a/components/treeview/CHANGELOG.md
+++ b/components/treeview/CHANGELOG.md
@@ -1,5 +1,20 @@
# Change log
+## 13.0.0-next.1
+
+### Patch Changes
+
+- Updated dependencies [[`60a156d`](https://github.com/adobe/spectrum-css/commit/60a156d7c0efcc999bc440274bbbbf586beb274b)]:
+ - @spectrum-css/tokens@16.1.0-next.0
+ - @spectrum-css/thumbnail@9.0.0-next.0
+
+## 13.0.0-next.0
+
+### Patch Changes
+
+- Updated dependencies [[`a25e0a9`](https://github.com/adobe/spectrum-css/commit/a25e0a99e5a4736ab4e607e00739343101a2633b)]:
+ - @spectrum-css/icon@10.0.0-next.0
+
## 12.1.0
### Minor Changes
@@ -215,6 +230,7 @@ Output for all component CSS files is now being run through a lightweight optimi
### 🛑 BREAKING CHANGE
- Removes component-builder & component-builder-simple for script leveraging postcss
+
- Imports added to index.css and themes/express.css
## 9.2.6
diff --git a/components/treeview/dist/metadata.json b/components/treeview/dist/metadata.json
index 0e5af238587..7456a1853f8 100644
--- a/components/treeview/dist/metadata.json
+++ b/components/treeview/dist/metadata.json
@@ -4,7 +4,6 @@
".spectrum-TreeView",
".spectrum-TreeView .spectrum-TreeView",
".spectrum-TreeView--sizeL",
- ".spectrum-TreeView--sizeM",
".spectrum-TreeView--sizeS",
".spectrum-TreeView--sizeXL",
".spectrum-TreeView--thumbnail .spectrum-TreeView-itemThumbnail",
@@ -168,10 +167,6 @@
"--spectrum-neutral-content-color-default",
"--spectrum-text-to-visual-75"
],
- "system-theme": [
- "--system-tree-view-item-background-color-focus",
- "--system-tree-view-item-background-color-hover"
- ],
"passthroughs": [],
"high-contrast": [
"--highcontrast-treeview-heading-color",
diff --git a/components/treeview/index.css b/components/treeview/index.css
index 2c55ebea3be..20e3fd46ea6 100644
--- a/components/treeview/index.css
+++ b/components/treeview/index.css
@@ -11,8 +11,6 @@
* governing permissions and limitations under the License.
*/
-@import "./themes/spectrum-two.css";
-
@media (forced-colors: active) {
.spectrum-TreeView {
--highcontrast-treeview-item-background-color-selected: Highlight;
@@ -54,8 +52,39 @@
}
}
-.spectrum-TreeView,
-.spectrum-TreeView--sizeM {
+.spectrum-TreeView {
+ --spectrum-treeview-item-background-color-hover: var(--spectrum-gray-100);
+ --spectrum-treeview-item-background-color-focus: var(--spectrum-gray-100);
+
+ --spectrum-treeview-item-border-size: var(--mod-treeview-item-border-size, var(--spectrum-border-width-200));
+ --spectrum-treeview-item-border-size-selected: var(--mod-treeview-item-border-size-selected, 1px);
+ --spectrum-treeview-item-border-radius: var(--mod-treeview-item-border-radius, 0px);
+
+ --spectrum-treeview-item-border-color-selected: var(--highcontrast-treeview-item-border-color-selected, var(--mod-treeview-item-border-color-selected, var(--spectrum-blue-800)));
+ --spectrum-treeview-item-border-color-focus: var(--highcontrast-treeview-item-border-color-focus, var(--mod-treeview-item-border-color-focus, var(--spectrum-blue-700)));
+
+ --spectrum-treeview-item-border-color-quiet-selected: var(--highcontrast-treeview-item-border-color-selected, var(--mod-treeview-item-border-color-selected-quiet, transparent));
+
+ --spectrum-treeview-item-background-color-hover: var(--spectrum-gray-100);
+ --spectrum-treeview-item-background-color-focus: var(--spectrum-gray-100);
+
+ --spectrum-treeview-item-icon-gap: var(--mod-treeview-item-icon-gap, var(--spectrum-text-to-visual-75));
+ --spectrum-treeview-item-icon-color: var(--highcontrast-treeview-item-icon-color, var(--mod-treeview-item-icon-color, var(--spectrum-gray-700)));
+ --spectrum-treeview-item-icon-color-hover: var(--highcontrast-treeview-item-text-color-focus, var(--mod-treeview-item-icon-color-hover, var(--spectrum-gray-900)));
+ --spectrum-treeview-item-icon-color-focus: var(--highcontrast-treeview-item-icon-color-focus, var(--mod-treeview-item-icon-color-focus, var(--spectrum-gray-900)));
+ --spectrum-treeview-item-icon-color-selected: var(--highcontrast-treeview-item-icon-color-selected, var(--mod-treeview-item-icon-color-selected, var(--spectrum-gray-900)));
+ --spectrum-treeview-item-icon-color-disabled: var(--highcontrast-treeview-item-icon-color-disabled, var(--mod-treeview-item-icon-color-disabled, var(--spectrum-disabled-content-color)));
+
+ --spectrum-treeview-item-text-color: var(--highcontrast-treeview-item-text-color, var(--mod-treeview-item-text-color, var(--spectrum-neutral-content-color-default)));
+ --spectrum-treeview-item-text-color-selected: var(--highcontrast-treeview-item-text-color-selected, var(--mod-treeview-item-text-color-selected, var(--spectrum-gray-900)));
+ --spectrum-treeview-item-text-color-disabled: var(--highcontrast-treeview-item-text-color-disabled, var(--mod-treeview-item-text-color-disabled, var(--spectrum-gray-500)));
+ --spectrum-treeview-item-text-color-focus: var(--highcontrast-treeview-item-text-color-focus, var(--mod-treeview-item-text-color-focus, var(--spectrum-gray-900)));
+ --spectrum-treeview-item-text-color-hover: var(--highcontrast-treeview-item-text-color-focus, var(--mod-treeview-item-text-color-hover, var(--spectrum-gray-900)));
+
+ --spectrum-treeview-indicator-animation-duration: var(--mod-treeview-indicator-animation-duration, var(--spectrum-animation-duration-100));
+
+ --spectrum-treeview-item-min-block-size: var(--mod-treeview-item-min-block-size, var(--spectrum-treeview-item-sized-min-block-size));
+
--spectrum-treeview-font-size: var(--mod-treeview-font-size, var(--spectrum-font-size-100));
--spectrum-treeview-item-sized-min-block-size: var(--mod-treeview-item-min-block-size, var(--spectrum-component-height-100));
diff --git a/components/treeview/package.json b/components/treeview/package.json
index e8b95a1755d..8724900bd08 100644
--- a/components/treeview/package.json
+++ b/components/treeview/package.json
@@ -1,6 +1,6 @@
{
"name": "@spectrum-css/treeview",
- "version": "12.1.0",
+ "version": "13.0.0-next.1",
"description": "The Spectrum CSS Tree view component",
"license": "Apache-2.0",
"author": "Adobe",
@@ -25,9 +25,9 @@
},
"main": "dist/index.css",
"peerDependencies": {
- "@spectrum-css/icon": ">=9.0.0 <10.0.0",
- "@spectrum-css/thumbnail": ">=8.0.0 <9.0.0",
- "@spectrum-css/tokens": ">=16.0.0 <17.0.0"
+ "@spectrum-css/icon": ">=10.0.0-next.0",
+ "@spectrum-css/thumbnail": ">=9.0.0-next.0",
+ "@spectrum-css/tokens": ">=16.1.0-next.0"
},
"peerDependenciesMeta": {
"@spectrum-css/icon": {
@@ -41,9 +41,9 @@
}
},
"devDependencies": {
- "@spectrum-css/icon": "9.1.0",
- "@spectrum-css/thumbnail": "8.1.0",
- "@spectrum-css/tokens": "16.0.2"
+ "@spectrum-css/icon": "10.0.0-next.2",
+ "@spectrum-css/thumbnail": "9.0.0-next.0",
+ "@spectrum-css/tokens": "16.1.0-next.5"
},
"keywords": [
"design-system",
diff --git a/components/treeview/stories/template.js b/components/treeview/stories/template.js
index df31e3ed464..7114a75a1ac 100644
--- a/components/treeview/stories/template.js
+++ b/components/treeview/stories/template.js
@@ -9,9 +9,6 @@ import { styleMap } from "lit/directives/style-map.js";
import { when } from "lit/directives/when.js";
import "../index.css";
-import "../themes/spectrum.css";
-/* Must be imported last */
-import "../themes/express.css";
export const TreeViewItem = ({
rootClass = "spectrum-TreeView",
@@ -25,7 +22,7 @@ export const TreeViewItem = ({
isOpen,
isDropTarget,
icon,
- iconSet,
+ iconSet = "workflow",
thumbnail,
items,
variant,
diff --git a/components/treeview/themes/express.css b/components/treeview/themes/express.css
deleted file mode 100644
index 9fd550418f2..00000000000
--- a/components/treeview/themes/express.css
+++ /dev/null
@@ -1,16 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--express */
-
-@import "./spectrum.css";
diff --git a/components/treeview/themes/spectrum-two.css b/components/treeview/themes/spectrum-two.css
deleted file mode 100644
index 215290b3b6e..00000000000
--- a/components/treeview/themes/spectrum-two.css
+++ /dev/null
@@ -1,19 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-@container style(--system: spectrum) {
- .spectrum-TreeView {
- --spectrum-treeview-item-background-color-hover: var(--spectrum-gray-100);
- --spectrum-treeview-item-background-color-focus: var(--spectrum-gray-100);
- }
-}
diff --git a/components/treeview/themes/spectrum.css b/components/treeview/themes/spectrum.css
deleted file mode 100644
index 7698b2b4c3e..00000000000
--- a/components/treeview/themes/spectrum.css
+++ /dev/null
@@ -1,23 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--legacy */
-
-@import "./spectrum-two.css";
-
-@container style(--system: legacy) {
- .spectrum-TreeView {
- --spectrum-treeview-item-background-color-hover: var(--spectrum-gray-200);
- --spectrum-treeview-item-background-color-focus: var(--spectrum-gray-200);
- }
-}
diff --git a/components/typography/CHANGELOG.md b/components/typography/CHANGELOG.md
index 3f4235dc81b..d8e7774b27e 100644
--- a/components/typography/CHANGELOG.md
+++ b/components/typography/CHANGELOG.md
@@ -1,5 +1,12 @@
# Change log
+## 9.0.0-next.0
+
+### Patch Changes
+
+- Updated dependencies [[`60a156d`](https://github.com/adobe/spectrum-css/commit/60a156d7c0efcc999bc440274bbbbf586beb274b)]:
+ - @spectrum-css/tokens@16.1.0-next.0
+
## 8.1.0
### Minor Changes
diff --git a/components/typography/dist/metadata.json b/components/typography/dist/metadata.json
index 5d45be326da..3ef566f741d 100644
--- a/components/typography/dist/metadata.json
+++ b/components/typography/dist/metadata.json
@@ -751,7 +751,6 @@
"--spectrum-sans-font-family-stack",
"--spectrum-serif-font-family-stack"
],
- "system-theme": [],
"passthroughs": [],
"high-contrast": [
"--highcontrast-body-font-color",
diff --git a/components/typography/package.json b/components/typography/package.json
index 823b68fde7e..26b88afdeb0 100644
--- a/components/typography/package.json
+++ b/components/typography/package.json
@@ -1,6 +1,6 @@
{
"name": "@spectrum-css/typography",
- "version": "8.1.0",
+ "version": "9.0.0-next.0",
"description": "The Spectrum CSS typography component",
"license": "Apache-2.0",
"author": "Adobe",
@@ -25,7 +25,7 @@
},
"main": "dist/index.css",
"peerDependencies": {
- "@spectrum-css/tokens": ">=16.0.1"
+ "@spectrum-css/tokens": ">=16.1.0-next.0"
},
"peerDependenciesMeta": {
"@spectrum-css/tokens": {
@@ -33,7 +33,7 @@
}
},
"devDependencies": {
- "@spectrum-css/tokens": "16.0.2"
+ "@spectrum-css/tokens": "16.1.0-next.5"
},
"keywords": [
"design-system",
diff --git a/components/typography/stories/typography.stories.js b/components/typography/stories/typography.stories.js
index c6595cb6a24..ac19708ed4f 100644
--- a/components/typography/stories/typography.stories.js
+++ b/components/typography/stories/typography.stories.js
@@ -4,16 +4,16 @@ import { size } from "@spectrum-css/preview/types";
import metadata from "../dist/metadata.json";
import packageJson from "../package.json";
import {
- DocsBodyVariants,
- DocsCodeVariants,
- DocsDetailVariants,
- DocsHeadingBodyPairing,
- DocsHeadingVariants,
- DocsInternationalizedBodyVariants,
- DocsInternationalizedCodeVariants,
- DocsInternationalizedDetailVariants,
- DocsInternationalizedHeadingBodyPairing,
- DocsInternationalizedHeadingVariants, Template
+ DocsBodyVariants,
+ DocsCodeVariants,
+ DocsDetailVariants,
+ DocsHeadingBodyPairing,
+ DocsHeadingVariants,
+ DocsInternationalizedBodyVariants,
+ DocsInternationalizedCodeVariants,
+ DocsInternationalizedDetailVariants,
+ DocsInternationalizedHeadingBodyPairing,
+ DocsInternationalizedHeadingVariants, Template
} from "./template.js";
import { TypographyGroup } from "./typography.test.js";
diff --git a/components/underlay/CHANGELOG.md b/components/underlay/CHANGELOG.md
index 9bfc0d72e3b..1a4ee79d250 100644
--- a/components/underlay/CHANGELOG.md
+++ b/components/underlay/CHANGELOG.md
@@ -1,5 +1,12 @@
# Change log
+## 7.0.0-next.0
+
+### Patch Changes
+
+- Updated dependencies [[`60a156d`](https://github.com/adobe/spectrum-css/commit/60a156d7c0efcc999bc440274bbbbf586beb274b)]:
+ - @spectrum-css/tokens@16.1.0-next.0
+
## 6.1.0
### Minor Changes
diff --git a/components/underlay/dist/metadata.json b/components/underlay/dist/metadata.json
index 6b35fb4f7f0..21a3e4aa1d0 100644
--- a/components/underlay/dist/metadata.json
+++ b/components/underlay/dist/metadata.json
@@ -30,7 +30,6 @@
"--spectrum-black-rgb",
"--spectrum-overlay-opacity"
],
- "system-theme": [],
"passthroughs": [],
"high-contrast": []
}
diff --git a/components/underlay/package.json b/components/underlay/package.json
index 2fe0b79a89e..e63ff238378 100644
--- a/components/underlay/package.json
+++ b/components/underlay/package.json
@@ -1,6 +1,6 @@
{
"name": "@spectrum-css/underlay",
- "version": "6.1.0",
+ "version": "7.0.0-next.0",
"description": "The Spectrum CSS underlay component",
"license": "Apache-2.0",
"author": "Adobe",
@@ -25,7 +25,7 @@
},
"main": "dist/index.css",
"peerDependencies": {
- "@spectrum-css/tokens": ">=16.0.1"
+ "@spectrum-css/tokens": ">=16.1.0-next.0"
},
"peerDependenciesMeta": {
"@spectrum-css/tokens": {
@@ -33,8 +33,8 @@
}
},
"devDependencies": {
- "@spectrum-css/commons": "11.0.0",
- "@spectrum-css/tokens": "16.0.2"
+ "@spectrum-css/commons": "12.0.0-next.0",
+ "@spectrum-css/tokens": "16.1.0-next.5"
},
"keywords": [
"design-system",
diff --git a/components/well/CHANGELOG.md b/components/well/CHANGELOG.md
index b8c8d703baa..3f47b06b539 100644
--- a/components/well/CHANGELOG.md
+++ b/components/well/CHANGELOG.md
@@ -1,5 +1,12 @@
# Change log
+## 8.0.0-next.0
+
+### Patch Changes
+
+- Updated dependencies [[`60a156d`](https://github.com/adobe/spectrum-css/commit/60a156d7c0efcc999bc440274bbbbf586beb274b)]:
+ - @spectrum-css/tokens@16.1.0-next.0
+
## 7.1.0
### Minor Changes
diff --git a/components/well/dist/metadata.json b/components/well/dist/metadata.json
index 3587fa73f7a..c9fdd7f6da1 100644
--- a/components/well/dist/metadata.json
+++ b/components/well/dist/metadata.json
@@ -27,7 +27,6 @@
"--spectrum-gray-1000-rgb",
"--spectrum-gray-800-rgb"
],
- "system-theme": ["--system-well-border-color"],
"passthroughs": [],
"high-contrast": []
}
diff --git a/components/well/index.css b/components/well/index.css
index 26abcff0032..1aabb0c2b55 100644
--- a/components/well/index.css
+++ b/components/well/index.css
@@ -11,9 +11,9 @@
* governing permissions and limitations under the License.
*/
-@import "./themes/spectrum-two.css";
-
.spectrum-Well {
+ --spectrum-well-border-color: rgba(var(--spectrum-gray-1000-rgb), 0.05);
+
--spectrum-well-border-width: var(--spectrum-border-width-100);
--spectrum-well-content-color: var(--spectrum-body-color);
--spectrum-well-background-color: rgba(var(--spectrum-gray-800-rgb), 0.02);
diff --git a/components/well/package.json b/components/well/package.json
index 3df20666bcd..6eeffa2eba9 100644
--- a/components/well/package.json
+++ b/components/well/package.json
@@ -1,6 +1,6 @@
{
"name": "@spectrum-css/well",
- "version": "7.1.0",
+ "version": "8.0.0-next.0",
"description": "The Spectrum CSS well component",
"license": "Apache-2.0",
"author": "Adobe",
@@ -25,7 +25,7 @@
},
"main": "dist/index.css",
"peerDependencies": {
- "@spectrum-css/tokens": ">=16.0.1"
+ "@spectrum-css/tokens": ">=16.1.0-next.0"
},
"peerDependenciesMeta": {
"@spectrum-css/tokens": {
@@ -33,7 +33,7 @@
}
},
"devDependencies": {
- "@spectrum-css/tokens": "16.0.2"
+ "@spectrum-css/tokens": "16.1.0-next.5"
},
"keywords": [
"design-system",
diff --git a/components/well/stories/template.js b/components/well/stories/template.js
index c9645cfdcdb..5e8210305d1 100644
--- a/components/well/stories/template.js
+++ b/components/well/stories/template.js
@@ -5,9 +5,6 @@ import { ifDefined } from "lit/directives/if-defined.js";
import { styleMap } from "lit/directives/style-map.js";
import "../index.css";
-import "../themes/spectrum.css";
-/* Must be imported last */
-import "../themes/express.css";
export const Template = ({
rootClass = "spectrum-Well",
diff --git a/components/well/themes/express.css b/components/well/themes/express.css
deleted file mode 100644
index 9fd550418f2..00000000000
--- a/components/well/themes/express.css
+++ /dev/null
@@ -1,16 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--express */
-
-@import "./spectrum.css";
diff --git a/components/well/themes/spectrum-two.css b/components/well/themes/spectrum-two.css
deleted file mode 100644
index f4a2ef0983e..00000000000
--- a/components/well/themes/spectrum-two.css
+++ /dev/null
@@ -1,18 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-@container style(--system: spectrum) {
- .spectrum-Well {
- --spectrum-well-border-color: rgba(var(--spectrum-gray-1000-rgb), 0.05);
- }
-}
diff --git a/components/well/themes/spectrum.css b/components/well/themes/spectrum.css
deleted file mode 100644
index 5cfe7120396..00000000000
--- a/components/well/themes/spectrum.css
+++ /dev/null
@@ -1,22 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/* @combine .spectrum.spectrum--legacy */
-
-@import "./spectrum-two.css";
-
-@container style(--system: legacy) {
- .spectrum-Well {
- --spectrum-well-border-color: rgba(var(--spectrum-gray-900-rgb), 0.05);
- }
-}
diff --git a/package.json b/package.json
index 8e07206b99e..5b822a7e300 100644
--- a/package.json
+++ b/package.json
@@ -67,12 +67,10 @@
"devDependencies": {
"@adobe/token-diff-generator": "^2.0.0",
"@changesets/changelog-github": "^0.5.1",
- "@changesets/cli": "^2.29.4",
+ "@changesets/cli": "^2.29.5",
"@commitlint/cli": "^19.8.1",
"@commitlint/config-conventional": "^19.8.1",
"@nx/devkit": "^21.2.1",
- "@spectrum-tools/postcss-add-theming-layer": "1.0.2",
- "@spectrum-tools/postcss-property-rollup": "0.0.1",
"@spectrum-tools/postcss-rgb-mapping": "1.1.0",
"@yarnpkg/types": "^4.0.1",
"at-rule-packer": "^0.5.0",
@@ -113,7 +111,7 @@
"postcss-selector-replace": "^1.0.2",
"postcss-sorting": "^9.1.0",
"postcss-values-parser": "^6.0.2",
- "prettier": "^3.5.3",
+ "prettier": "^3.6.0",
"rimraf": "^6.0.1",
"semver": "^7.7.2",
"stylelint": "^16.21.0",
diff --git a/plugins/postcss-add-theming-layer/CHANGELOG.md b/plugins/postcss-add-theming-layer/CHANGELOG.md
deleted file mode 100644
index 761d4dfbac9..00000000000
--- a/plugins/postcss-add-theming-layer/CHANGELOG.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# Change Log
-
-## 1.0.2
-
-### Patch Changes
-
-- [#3527](https://github.com/adobe/spectrum-css/pull/3527) [`5f1751c`](https://github.com/adobe/spectrum-css/commit/5f1751c82a5fe55ae0d999f5f50cfeca4c8a5c75) Thanks [@castastrophe](https://github.com/castastrophe)! - Minor dependency updates to align with the larger project.
-
-## 1.0.1
-
-### Patch Changes
-
-📝 [#3541](https://github.com/adobe/spectrum-css/pull/3541) [`1a3245c`](https://github.com/adobe/spectrum-css/commit/1a3245c3a660bc52ed260f18b6cceab5ee81541d) Thanks [@castastrophe](https://github.com/castastrophe)!
-
-- Dependency alignment across the project.
-
- Set component peerDependencies as optional to reduce console warnings on downstream projects.
-
-## 1.0.0
-
-### Major Changes
-
-📝 [#3502](https://github.com/adobe/spectrum-css/pull/3502) [`562396e`](https://github.com/adobe/spectrum-css/commit/562396eaf21769341f78ea3761393b65f00e751b) Thanks [@castastrophe](https://github.com/castastrophe)!
-
-- The PostCSS plugin previously published as `postcss-splitinator`. This new package creates a polyfill for style queries by creating a layer of `--system` prefixed custom properties to be loaded by attaching a unique selector. This allows the toggling of component-level property definitions by theme or context. There are many options available to customize the output that are documented in the package [README](plugins/postcss-add-theming-layer/README.md).
diff --git a/plugins/postcss-add-theming-layer/README.md b/plugins/postcss-add-theming-layer/README.md
deleted file mode 100644
index 610310f5662..00000000000
--- a/plugins/postcss-add-theming-layer/README.md
+++ /dev/null
@@ -1,115 +0,0 @@
-# postcss-add-theming-layer
-
-> Leveraging style container queries to create an abstraction layer for supporting multiple theming systems.
-
-## Installation
-
-Add the dependency to your project:
-
-```sh
-npm install postcss-add-theming-layer
-```
-
-or
-
-```sh
-yarn add -DW postcss-add-theming-layer
-```
-
-Use the plugin in your PostCSS configuration:
-
-```js
-module.exports = {
- plugins: {
- "postcss-add-theming-layer": {},
- },
-};
-```
-
-or as part of your CLI command:
-
-```sh
-postcss -u postcss-add-theming-layer -o dist/index.css src/index.css
-```
-
-## Options
-
-### `selectorPrefix` [string]
-
-This optional input will prefix the new theming layer selector with the provided string. This can be useful if you want to namespace the injected selectors for the new theming layer to avoid conflicts.
-
-### `skipMapping` [boolean=false]
-
-Skip the mapping of the variables to the system variables. This can be useful if you only want to extract the variables and not map them to the system variables.
-
-### `preserveVariables` [boolean=true]
-
-When used with `skipMapping`, this option will preserve the variables defined inside the container query in the output by injecting them to the root selector.
-
-### `referencesOnly` [boolean=false]
-
-This option will only output those variables that are referencing the newly created system variables and not the system variables themselves. This can be used as a bridge between an old and new implementation for the component.
-
-### `stripLocalSelectors` [boolean=false]
-
-This option will remove the local selectors (those that map to system variables) from the output leaving only the system definitions.
-
-### `processIdentifier` [(identifierValue: string, identifierName: string) => string]`
-
-Customize the selectors that variables are placed in. Passed the value and key of the variable that was passed to the container, i.e. `identifierValue = spectrum` and `identifierName = system` for the example below. By default, `identifierName` is used as-is.
-
-## Usage
-
-This plugin turns this:
-
-```css
-@container style(--system: legacy) {
- .component {
- --background-color: blue;
- }
- .component.is-selected {
- --background-color: darkblue;
- }
- .component .icon {
- --color: gray;
- }
-}
-
-@container style(--system: modern) {
- .component {
- --background-color: purple;
- }
- .component.is-selected {
- --background-color: darkpurple;
- }
- .component .icon {
- --color: white;
- }
-}
-```
-
-Into this:
-
-```css
-.legacy {
- --system-component-background-color: blue;
- --system-component-selected-background-color: darkblue;
-}
-
-.modern {
- --system-component-background-color: purple;
- --system-component-selected-background-color: darkpurple;
-}
-
-.component {
- --background-color: var(--system-component-background-color);
-}
-
-.component.is-selected {
- --background-color: var(--system-component-selected-background-color);
-}
-```
-
-## Usage notes
-
-This plugin will ignore any underscore-prefixed variables, as they are considered private and not part of the theming layer.
diff --git a/plugins/postcss-add-theming-layer/expected/basic.css b/plugins/postcss-add-theming-layer/expected/basic.css
deleted file mode 100644
index 711a906a74d..00000000000
--- a/plugins/postcss-add-theming-layer/expected/basic.css
+++ /dev/null
@@ -1,41 +0,0 @@
-.legacy {
- --system-component-background-color: blue;
- --system-component-selected-background-color: darkblue;
- --system-component-icon-color: gray;
- --system-where-component-background-color: blue;
- --system-component-where-selected-background-color: darkblue;
- --system-component-has-icon-color: gray
-}
-
-.modern {
- --system-component-background-color: purple;
- --system-component-selected-background-color: indigo;
- --system-component-icon-color: white;
- --system-where-component-background-color: indigo;
- --system-component-where-selected-background-color: darkpurple;
- --system-component-has-icon-color: white
-}
-
-.component {
- --background-color: var(--system-component-background-color)
-}
-
-.component.is-selected {
- --background-color: var(--system-component-selected-background-color)
-}
-
-.component .icon {
- --color: var(--system-component-icon-color)
-}
-
-:where(.component) {
- --background-color: var(--system-where-component-background-color)
-}
-
-.component:where(:selected,.is-selected) {
- --background-color: var(--system-component-where-selected-background-color)
-}
-
-.component:has(.icon) {
- --color: var(--system-component-has-icon-color)
-}
diff --git a/plugins/postcss-add-theming-layer/fixtures/basic.css b/plugins/postcss-add-theming-layer/fixtures/basic.css
deleted file mode 100644
index 50692d97093..00000000000
--- a/plugins/postcss-add-theming-layer/fixtures/basic.css
+++ /dev/null
@@ -1,49 +0,0 @@
-@container style(--system: legacy) {
- .component {
- --background-color: blue;
- }
- .component.is-selected {
- --background-color: darkblue;
- }
- .component .icon {
- --color: gray;
- }
-
- :where(.component) {
- --background-color: blue;
- }
-
- .component:where(:selected, .is-selected) {
- --background-color: darkblue;
- }
-
- .component:has(.icon) {
- --color: gray;
- }
-}
-
-@container style(--system: modern) {
- .component {
- --background-color: purple;
- }
-
- .component.is-selected {
- --background-color: indigo;
- }
-
- .component .icon {
- --color: white;
- }
-
- :where(.component) {
- --background-color: indigo;
- }
-
- .component:where(:selected, .is-selected) {
- --background-color: darkpurple;
- }
-
- .component:has(.icon) {
- --color: white;
- }
-}
diff --git a/plugins/postcss-add-theming-layer/index.js b/plugins/postcss-add-theming-layer/index.js
deleted file mode 100644
index 38c11bb69f1..00000000000
--- a/plugins/postcss-add-theming-layer/index.js
+++ /dev/null
@@ -1,201 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-const selectorParser = require("postcss-selector-parser");
-const {
- cleanPropertyName,
- extractFallbackValue,
- getVariableName,
- checkForReplacement
-} = require("./utilities.js");
-
-/**
- * @typedef Options
- * @property {string} [selectorPrefix] - The prefix to use for the new selectors
- * @property {boolean} [skipMapping=false] - Skip the mapping of the variables to the system variables. This can be useful if you only want to extract the variables and not map them to the system variables.
- * @property {boolean} [preserveVariables=false] - When used with `skipMapping`, this option will preserve the variables defined inside the container query in the output by injecting them to the root selector.
- * @property {boolean} [referencesOnly=false] - This option will only output those variables that are referencing the newly created system variables and not the system variables themselves. This can be used as a bridge between an old and new implementation for the component.
- * @property {boolean} [stripLocalSelectors=false] - This option will remove the local selectors (those that map to system variables) from the output leaving only the system definitions.
- * @property {(identifierValue: string, identifierName: string) => string} [processIdentifier] - A function that processes the identifier value and creates a new selector
-*/
-
-/** @type import('postcss').PluginCreator */
-module.exports = ({
- selectorPrefix,
- skipMapping = false,
- preserveVariables = true,
- referencesOnly = false,
- stripLocalSelectors = false,
- processIdentifier,
-}) => ({
- postcssPlugin: "postcss-add-theming-layer",
- OnceExit(root, { Rule, Declaration }) {
- // Fallback function to process the identifier value and create a new selector
- if (typeof processIdentifier !== "function") {
- // If the base prefix exists and differs from the identifier value, append the identifier value to the base prefix as the new class name
- processIdentifier = (identifierValue) => selectorPrefix && selectorPrefix !== identifierValue ? `.${selectorPrefix}--${identifierValue}` : `.${identifierValue}`;
- }
-
- // This object will store the mappings for each selector
- const systemMap = new Map();
- const conversionMap = new Map();
-
- // Step 1: loop over all the container style queries and create a new selector for each
- // to be used as a theming toggle for components where style queries are not natively supported
- // @todo should there be a support check around this?
- root.walkAtRules(/container/, (container) => {
- if (skipMapping) {
- if (preserveVariables) {
- // Iterate over each rule in the container and append them to the root
- container.walkRules((rule) => {
- root.insertAfter(root.first, rule);
- });
- }
-
- container.remove();
- return;
- }
-
- // Extract the custom property name and it's value to use in creating the new selector
- // Identifier name is the prefix used for the custom properties created for the bridge
- // Identifier value is used to create the new selector
- const [, identifierName, identifierValue] = container.params.match(
- /\(\s*--(.*?)\s*[:=]\s*(.*?)\s*\)/
- );
-
- const selectorMap = systemMap.get(identifierName) ?? {};
-
- // Create a new rule using this selector to attach the new system-level custom properties
- let rule;
-
- // If we're only interested in references, we can skip the next step of appending the new rule
- if (!referencesOnly) {
- rule = new Rule({
- selector: processIdentifier(identifierValue, identifierName),
- source: container.source,
- });
-
- container.parent.insertAfter(container, rule);
- }
-
- // Iterate over each custom property in the container to create a new mapping that supports the new selector
- container.walkDecls(/^--[A-Z|a-z]/, (decl) => {
- selectorParser((selectors) => {
- selectors.each((s) => {
- // Check if the property is already mapped
- const variableName = getVariableName(s, decl.prop, {
- identifierName,
- identifierValue,
- selectorPrefix
- });
-
- const newDecl = decl.clone({
- prop: variableName,
- });
- newDecl.raws.before = "\n ";
-
- const uniqueSet = conversionMap.get(decl.prop) ?? new Set();
- conversionMap.set(decl.prop, uniqueSet.add(variableName));
-
- if (!referencesOnly) {
- rule.append(newDecl);
- }
-
- const selector = s.toString();
- selectorMap[selector] = selectorMap[selector] ?? {};
-
- const selectorNode = selectorMap[selector];
-
- // Check for fallbacks in the var() function
- const fallbackValue = extractFallbackValue(decl.value);
- if (fallbackValue) {
- // The final declaration should have the override present
- selectorNode[decl.prop] = `var(${fallbackValue}, var(${variableName}))`;
-
- // The system-level declaration should only have the fallback
- newDecl.value = `var(${fallbackValue})`;
- }
- else {
- selectorNode[decl.prop] = `var(${variableName})`;
- }
-
- selectorMap[selector] = selectorNode;
- });
- }).processSync(decl.parent.selector, { lossless: false });
- });
-
- systemMap.set(identifierName, selectorMap);
-
- if (rule) {
- rule.walkDecls((decl) => {
- const convertedProps = [...conversionMap.keys()];
-
- if (!convertedProps.some((key) => decl.value.includes(key))) return;
-
- // loop over all the updated properties and update internal references to the new variables
- for (let [prop, mappedValues] of conversionMap.entries()) {
- // Check if this key exists in the value
- if (!decl.value.match(new RegExp(`${prop}[^-]`))) continue;
-
- const systemValues = [...mappedValues];
-
- // If there is only one system variable, replace all instances of the prop with the system variable
- if (systemValues.length === 1) {
- decl.value = decl.value.replace(new RegExp(prop, "g"), systemValues[0]);
- continue;
- }
-
- const replacement = checkForReplacement(decl, prop, [
- `--${identifierName}-${cleanPropertyName(prop, { selectorPrefix })}`,
- ], systemValues);
-
- if (replacement) {
- decl.value = replacement;
- continue;
- }
-
- // @note: this will be an empty variable because we didn't find a match but it will match the format of the other variables
- decl.value = decl.value.replace(new RegExp(decl.prop, "g"), `--${identifierName}-${cleanPropertyName(decl.prop, { selectorPrefix })}`);
- }
- });
- }
-
- container.remove();
- });
-
- // Our job here is done
- if (skipMapping || stripLocalSelectors) return;
-
- const rules = [];
- for (let [, selectorMap] of systemMap.entries()) {
- // This adds the new selectors to the root with their respective system-level mappings
- for (let [selector, props] of Object.entries(selectorMap)) {
- const rule = new Rule({ selector });
-
- for (let [prop, value] of Object.entries(props)) {
- const decl = new Declaration({ prop, value });
- decl.raws.before = "\n ";
-
- rule.append(decl);
- }
-
- rules.push(rule);
- }
- }
-
- // Insert the new rules in order after the first rule in the root
- root.append(rules);
- },
-});
-
-module.exports.postcss = true;
diff --git a/plugins/postcss-add-theming-layer/package.json b/plugins/postcss-add-theming-layer/package.json
deleted file mode 100644
index 4b8fcdab5b4..00000000000
--- a/plugins/postcss-add-theming-layer/package.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "name": "@spectrum-tools/postcss-add-theming-layer",
- "version": "1.0.2",
- "description": "Leveraging style container queries to create an abstraction layer for supporting multiple theming systems",
- "license": "Apache-2.0",
- "author": "Adobe",
- "contributors": [
- "Cassondra Roberts "
- ],
- "homepage": "https://opensource.adobe.com/spectrum-css/",
- "repository": {
- "type": "git",
- "url": "https://github.com/adobe/spectrum-css.git",
- "directory": "plugins/postcss-add-theming-layer"
- },
- "bugs": {
- "url": "https://github.com/adobe/spectrum-css/issues"
- },
- "main": "index.js",
- "files": [
- "package.json",
- "index.js",
- "*.md"
- ],
- "dependencies": {
- "postcss-selector-parser": "^7.1.0",
- "postcss-values-parser": "^6.0.2"
- },
- "peerDependencies": {
- "postcss": ">=8"
- },
- "devDependencies": {
- "ava": "^6.4.0",
- "c8": "^10.1.3",
- "postcss": "^8.5.6"
- },
- "keywords": [
- "css",
- "theming",
- "custom properties",
- "postcss",
- "postcss-plugin"
- ]
-}
diff --git a/plugins/postcss-add-theming-layer/project.json b/plugins/postcss-add-theming-layer/project.json
deleted file mode 100644
index 7797edce0f8..00000000000
--- a/plugins/postcss-add-theming-layer/project.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
- "name": "postcss-add-theming-layer",
- "tags": ["tooling", "postcss"],
- "targets": {
- "format": {
- "defaultConfiguration": "plugins"
- },
- "lint": {
- "defaultConfiguration": "plugins"
- },
- "test": {
- "defaultConfiguration": "plugins"
- }
- }
-}
diff --git a/plugins/postcss-add-theming-layer/test.js b/plugins/postcss-add-theming-layer/test.js
deleted file mode 100644
index ed431c85f20..00000000000
--- a/plugins/postcss-add-theming-layer/test.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-const fs = require("fs");
-const test = require("ava");
-const postcss = require("postcss");
-const plugin = require("./index.js");
-
-function compare(
- t,
- fixtureFilePath,
- expectedFilePath,
- options = {}
-) {
- return postcss([plugin(options)])
- .process(readFile(`./fixtures/${fixtureFilePath}`), {
- from: fixtureFilePath,
- })
- .then((result) => {
- const actual = result.css;
- const expected = readFile(`./expected/${expectedFilePath}`);
- t.is(actual, expected);
- t.is(result.warnings().length, 0);
- });
-}
-
-function readFile(filename) {
- return fs.readFileSync(filename, "utf8");
-}
-
-test("create basic output", (t) => {
- return compare(t, "basic.css", "basic.css");
-});
diff --git a/plugins/postcss-add-theming-layer/utilities.js b/plugins/postcss-add-theming-layer/utilities.js
deleted file mode 100644
index 0988f27ce38..00000000000
--- a/plugins/postcss-add-theming-layer/utilities.js
+++ /dev/null
@@ -1,244 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-const valuesParser = require("postcss-values-parser");
-
-/**
- * Clean the property name to be used as a variable name
- * @param {string} prop
- * @param {{ selectorPrefix: string }} options
- * @returns {string} The clean variable name
- */
-function cleanPropertyName(prop, { selectorPrefix = "" } = {}) {
- if (!prop) return;
- return (
- prop
- // Remove the provided prefix if used
- .replace(new RegExp(selectorPrefix, "gi"), "")
- // Remove mod from the new property name
- .replace(/-?mod-/g, "-")
- // Remove state-based prefix
- .replace(/is-/g, "")
- // Remove the internal identifier marker
- .replace(/^_/g, "")
- // If a string has a lowercase letter followed by an uppercase letter, insert a dash between them
- .replace(/([a-z])([A-Z])/g, "$1-$2")
- // If a string has two uppercase letters followed by a lowercase letter, insert a dash between them
- .replace(/([A-Z])([A-Z])([a-z])/g, "$1-$2$3")
- .replace(/([a-z])([0-9])/g, "$1-$2")
- // Remove all whitespace
- .replace(/\s+/g, "")
- // Remove non-alphanumeric characters
- .replace(/\W/g, "-")
- // Replace multiple dashes with a single dash
- .replace(/-+/g, "-")
- // Remove any leading or trailing dashes
- .replace(/^-/g, "")
- .replace(/-$/g, "")
- .toLowerCase()
- );
-}
-
-/**
- * Extract the fallback value from a var() function
- * @param {string} declValue
- * @returns {string} The fallback value
- */
-function extractFallbackValue(declValue) {
- const parsed = valuesParser.parse(declValue);
- let fallbackValue;
-
- parsed.walk((node) => {
- if (node.type !== "func" || node.value !== "var") {
- return;
- }
-
- // Assuming the second argument of the var() function is the fallback
- const fallbackNode = node.nodes[2];
- if (fallbackNode) {
- // Convert the fallback node back to a string
- fallbackValue = valuesParser.stringify(fallbackNode);
- }
- });
-
- return fallbackValue;
-}
-
-/**
- * Get the base selector for a given selector
- * @param {string} selector
- * @param {{ selectorPrefix: string }} options
- * @returns {string} The base selector
- */
-function getBaseSelector(selector, { selectorPrefix = "" } = {}) {
- let baseSelector;
-
- if (!selector || !selector.nodes) return baseSelector;
-
- // This regex is designed to pull spectrum- out of a selector
- const baseRegex = new RegExp(
- `^(${selectorPrefix ? `${selectorPrefix}-` : ""}[A-Z][^\\W-.\\s]+)`,
- );
-
- // Iterate over the selector nodes to find a common root class name
- const found = [];
- selector.each((node) => {
- if (node.type !== "class") return;
- if (!node.value) return;
-
- const value = node.value ?? node.toString();
- const matches = value.match(baseRegex);
- if (!matches) return;
-
- const [, foundSelector] = matches;
- if (foundSelector) found.push(foundSelector);
- });
-
- if (found.length === 1) {
- return cleanPropertyName(found[0], { selectorPrefix });
- }
-
- let countMap = new Map();
-
- // Find and return the most common base selector in the array
- found.forEach((s) => countMap.set(s, (countMap.get(s) || 0) + 1));
-
- let count = 0;
- for (let [s, c] of countMap.entries()) {
- if (c > count) {
- baseSelector = s;
- count = c;
- }
- }
-
- // Remove the selector prefix from the returned base selector
- return baseSelector ? cleanPropertyName(baseSelector, { selectorPrefix }) : baseSelector;
-}
-
-/**
- * Fallback function to process the name of the new variable
- * @param {string} selector
- * @param {string} prop
- * @param {{ identifierName: string, identifierValue: string, selectorPrefix: string }} options
- * @returns {string} The new variable name
- */
-function getVariableName(
- selector,
- prop,
- { selectorPrefix = "", identifierName, identifierValue } = {},
-) {
- const baseSelector = getBaseSelector(selector, { selectorPrefix }) ?? "";
-
- const clean = (prop) =>
- prop &&
- cleanPropertyName(
- prop
- .replace(new RegExp(selectorPrefix, "gi"), "")
- // Remove the identifers if they exist
- .replace(new RegExp(baseSelector, "gi"), "")
- // Check for identifiers in the property name that don't include the dash
- .replace(new RegExp(baseSelector?.replace(/-/g, ""), "gi"), "")
- .replace(new RegExp(identifierName, "gi"), "")
- .replace(new RegExp(identifierValue, "gi"), ""),
- { selectorPrefix }
- );
-
- let property = [];
-
- function processSelector(node) {
- if (node.type === "pseudo") {
- property.push(node.value.slice(1));
- }
- else if (node.type === "tag") {
- property.push(node.value);
- }
- else if (node.type === "combinator") {
- switch (node.value) {
- case " ": // Descendant combinator
- break;
- case ">":
- property.push("child-of");
- break;
- case "+":
- property.push("next-to");
- break;
- case "~":
- property.push("sibling-of");
- break;
- }
- }
- else if (node.type === "class") {
- if (node.value === baseSelector) return;
- property.push(clean(node.value));
- return;
- }
-
- if (!node.nodes) return;
- node.each(processSelector);
- }
-
- selector.each(processSelector);
-
- // Dedupe the property array, removing the 2nd instance of a property
- property = property
- .filter((value, index) => property.indexOf(value) === index)
- .filter(Boolean);
-
- return `--${[identifierName, baseSelector, clean([...property, prop].filter(Boolean).join("-"))].filter(Boolean).join("-").toLowerCase()}`;
-}
-
-/**
- * Check for a replacement value based on the provided guesses
- * @param {import('postcss').Declaration} decl
- * @param {string} replace
- * @param {string[]} guesses
- * @param {string[]} systemValues
- * @returns {string|undefined|void} The updated declaration value
- */
-function checkForReplacement(
- decl,
- replace,
- guesses = [],
- systemValues = [],
-) {
- if (!decl || !replace || guesses.length === 0) return;
-
- const replacer = new RegExp(replace, "g");
-
- for (const g of guesses) {
- if (systemValues.includes(g)) {
- return decl.value.replace(replacer, g);
- }
-
- const values = systemValues.filter((value) => value.startsWith(g));
- if (values.length === 0) continue;
-
- if (values.length === 1) {
- return decl.value.replace(replacer, values[0]);
- }
-
- if (values.length > 1) {
- return decl.value.replace(replacer, values[0]);
- }
-
- continue;
- }
-}
-
-module.exports = {
- cleanPropertyName,
- extractFallbackValue,
- getBaseSelector,
- getVariableName,
- checkForReplacement,
-};
diff --git a/plugins/postcss-property-rollup/CHANGELOG.md b/plugins/postcss-property-rollup/CHANGELOG.md
deleted file mode 100644
index cfcc225c5d1..00000000000
--- a/plugins/postcss-property-rollup/CHANGELOG.md
+++ /dev/null
@@ -1,45 +0,0 @@
-# Change log
-
-## 0.0.1
-
-### Patch Changes
-
-📝 [#3541](https://github.com/adobe/spectrum-css/pull/3541) [`1a3245c`](https://github.com/adobe/spectrum-css/commit/1a3245c3a660bc52ed260f18b6cceab5ee81541d) Thanks [@castastrophe](https://github.com/castastrophe)!
-
-- Dependency alignment across the project.
-
- Set component peerDependencies as optional to reduce console warnings on downstream projects.
-
-## 2.0.1
-
-### Patch Changes
-
-📝 [#2775](https://github.com/adobe/spectrum-css/pull/2775) [`2452637`](https://github.com/adobe/spectrum-css/commit/2452637d1179b9b2b025dafeb5834720712413d7) Thanks [@castastrophe](https://github.com/castastrophe)!
-
-- Dependency minor and patch updates to support new features in tools leveraged
-
-## 2.0.0
-
-🗓 2024-01-29 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/postcss-combininator@1.0.2...postcss-combininator@2.0.0)
-
-### 🛑 BREAKING CHANGE
-
-Upgrade to PostCSS v8 [bd6c40e](https://github.com/adobe/spectrum-css/commit/bd6c40eb5a4b43df94dff1f325502e5cd08b7f5f)
-
-## 1.0.2
-
-🗓 2023-04-25 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/postcss-combininator@1.0.0...postcss-combininator@1.0.2)
-
-**Note:** Version bump only for package postcss-combininator
-
-## 1.0.1
-
-🗓 2023-04-25 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/postcss-combininator@1.0.0...postcss-combininator@1.0.1)
-
-**Note:** Version bump only for package postcss-combininator
-
-## 1.0.0
-
-🗓 2023-03-27
-
-**Note:** Version bump only for package postcss-combininator
diff --git a/plugins/postcss-property-rollup/README.md b/plugins/postcss-property-rollup/README.md
deleted file mode 100644
index a7a653d2a1b..00000000000
--- a/plugins/postcss-property-rollup/README.md
+++ /dev/null
@@ -1,74 +0,0 @@
-# postcss-property-rollup
-
-> Combines multiple blocks of custom properties
-
-## Installation
-
-```sh
-npm install postcss-property-rollup
-```
-
-## Usage
-
-On the command line:
-
-```sh
-postcss -u postcss-property-rollup -o dist/index.css src/index.css
-```
-
-or in the PostCSS configuration:
-
-```js
-module.exports = {
- plugins: {
- "postcss-property-rollup": {},
- },
-};
-```
-
-This plugin turns this:
-
-```css
-.lorem {
- --spectrum-actionbutton-background-color: blue;
- --spectrum-actionbutton-border-color: transparent;
-}
-
-.ipsum {
- --spectrum-actionbutton-background-color: purple;
-}
-```
-
-Into this:
-
-```css
-.ipsum {
- --spectrum-actionbutton-border-color: transparent;
- --spectrum-actionbutton-background-color: purple;
-}
-```
-
-The resulting selector comes from the last rule unless a `newSelector` option is provided, and all duplicate properties in the subsequent rules override the previous declarations.
-
-## Options
-
-### `newSelector`
-
-Type: `string`
-Default: `null`
-
-The selector to use for the combined rule. If not provided, the last selector in the list will be used.
-
-### `ignore`
-
-Type: `string[]`
-Default: `[]`
-
-An array of selectors to ignore when combining rules.
-
-### `keyword`
-
-Type: `string`
-Default: `combine`
-
-The `@` prefixed comment keyword to search for when determining what code to roll-up into the new selector.
diff --git a/plugins/postcss-property-rollup/expected/basic.css b/plugins/postcss-property-rollup/expected/basic.css
deleted file mode 100644
index 201ab4356c5..00000000000
--- a/plugins/postcss-property-rollup/expected/basic.css
+++ /dev/null
@@ -1,4 +0,0 @@
-.spectrum--express {
- --spectrum-actionbutton-background-color: purple;
- --spectrum-actionbutton-border-color: transparent;
-}
diff --git a/plugins/postcss-property-rollup/fixtures/basic.css b/plugins/postcss-property-rollup/fixtures/basic.css
deleted file mode 100644
index d7614ec6ee3..00000000000
--- a/plugins/postcss-property-rollup/fixtures/basic.css
+++ /dev/null
@@ -1,9 +0,0 @@
-/* @combine */
-.spectrum {
- --spectrum-actionbutton-background-color: blue;
- --spectrum-actionbutton-border-color: transparent;
-}
-
-.spectrum--express {
- --spectrum-actionbutton-background-color: purple;
-}
diff --git a/plugins/postcss-property-rollup/index.js b/plugins/postcss-property-rollup/index.js
deleted file mode 100644
index 2d986684c94..00000000000
--- a/plugins/postcss-property-rollup/index.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-/**
- * @typedef Options
- * @property ignore {string[]} - List of selectors to ignore
- * @property newSelector {string} - New selector to create with the combined declarations
- */
-
-/** @type import('postcss').PluginCreator */
-module.exports = ({
- ignore = [],
- newSelector,
-} = {}) => {
- return {
- postcssPlugin: "postcss-property-rollup",
- OnceExit(root, { Rule }) {
- let shouldCombine = false;
- let localSelector;
- // Check the file for a comment with @combine and fetch the preceeding selector(s)
- root.walkComments((comment) => {
- if (!comment.text.includes("@combine")) return;
-
- shouldCombine = true;
-
- // Remove the @combine from the string
- const selectors = comment.text.replace("@combine", "").trim();
-
- comment.remove();
-
- if (!selectors) return;
-
- // Prefer the selectors from the comment over one provided in the config
- if (!localSelector) localSelector = selectors;
- });
-
- if (!shouldCombine) return;
-
- if (localSelector) newSelector = localSelector;
-
- const rules = [];
- const declarations = {};
-
- root.walkRules((rule) => {
- if (ignore.includes(rule.selector)) return;
- rules.push(rule);
- rule.walkDecls(/^--/, (decl) => {
- declarations[decl.prop] = decl;
- decl.remove();
- });
- });
-
- if (!rules.length) return;
-
- if (newSelector) {
- // Create a new rule with the combined declarations
- const newRule = new Rule({ selector: newSelector });
- for (const decl of Object.values(declarations)) {
- newRule.append(decl);
- }
- root.append(newRule);
-
- // Remove the rules from the root
- rules.forEach((rule) => {
- rule.remove();
- });
-
- return;
- }
-
- // If no new selector is provided, combine the declarations into the last rule
- const lastIdx = rules.length - 1;
- const lastRule = rules[lastIdx];
-
- if (!lastRule) return;
-
- rules.forEach((rule, index) => {
- if (index !== lastIdx) rule.remove();
- });
-
- for (const decl of Object.values(declarations)) {
- lastRule.append(decl);
- }
- },
- };
-};
-
-module.exports.postcss = true;
diff --git a/plugins/postcss-property-rollup/package.json b/plugins/postcss-property-rollup/package.json
deleted file mode 100644
index b7034377974..00000000000
--- a/plugins/postcss-property-rollup/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "@spectrum-tools/postcss-property-rollup",
- "version": "0.0.1",
- "description": "Combines custom properties from multiple selectors into a single selector",
- "license": "Apache-2.0",
- "author": "Adobe",
- "contributors": [
- "Cassondra Roberts "
- ],
- "homepage": "https://opensource.adobe.com/spectrum-css/",
- "repository": {
- "type": "git",
- "url": "https://github.com/adobe/spectrum-css.git",
- "directory": "plugins/postcss-property-rollup"
- },
- "bugs": {
- "url": "https://github.com/adobe/spectrum-css/issues"
- },
- "main": "index.js",
- "files": [
- "package.json",
- "index.js",
- "*.md"
- ],
- "peerDependencies": {
- "postcss": ">=8"
- },
- "devDependencies": {
- "ava": "^6.4.0",
- "c8": "^10.1.3",
- "postcss": "^8.5.6"
- },
- "keywords": [
- "css",
- "theming",
- "custom properties",
- "postcss",
- "postcss-plugin"
- ]
-}
diff --git a/plugins/postcss-property-rollup/project.json b/plugins/postcss-property-rollup/project.json
deleted file mode 100644
index 681869f7a14..00000000000
--- a/plugins/postcss-property-rollup/project.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
- "name": "postcss-property-rollup",
- "tags": ["tooling", "postcss"],
- "targets": {
- "format": {
- "defaultConfiguration": "plugins"
- },
- "lint": {
- "defaultConfiguration": "plugins"
- },
- "test": {
- "defaultConfiguration": "plugins"
- }
- }
-}
diff --git a/plugins/postcss-property-rollup/test.js b/plugins/postcss-property-rollup/test.js
deleted file mode 100644
index 2e2923f7b91..00000000000
--- a/plugins/postcss-property-rollup/test.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- *
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-const fs = require("fs");
-const test = require("ava");
-const postcss = require("postcss");
-const plugin = require("./index.js");
-
-function compare(
- t,
- fixtureFilePath,
- expectedFilePath,
- options = {
- processIdentifier: (identifier) => {
- if (identifier === "express") {
- return "spectrum--express";
- }
- return identifier;
- },
- }
-) {
- return postcss([plugin(options)])
- .process(readFile(`./fixtures/${fixtureFilePath}`), {
- from: fixtureFilePath,
- })
- .then((result) => {
- const actual = result.css;
- const expected = readFile(`./expected/${expectedFilePath}`);
- t.is(actual, expected);
- t.is(result.warnings().length, 0);
- });
-}
-
-function readFile(filename) {
- return fs.readFileSync(filename, "utf8");
-}
-
-test("create basic output", (t) => {
- return compare(t, "basic.css", "basic.css");
-});
diff --git a/plugins/postcss-rgb-mapping/index.js b/plugins/postcss-rgb-mapping/index.js
index ce1df4515d1..22ee0214eb9 100644
--- a/plugins/postcss-rgb-mapping/index.js
+++ b/plugins/postcss-rgb-mapping/index.js
@@ -25,7 +25,7 @@ function rgbMappingFunction ({
}) {
return {
- postcssPlugin: "postcss-rgb-mapping",
+ postcssPlugin: "@spectrum-tools/postcss-rgb-mapping",
/** @type {import('postcss').RootProcessor} */
Root(root) {
/* Gather all the custom properties that reference "unprocessed" transparent tokens (i.e. transparent-white-200) */
diff --git a/plugins/stylelint-no-missing-var/CHANGELOG.md b/plugins/stylelint-no-missing-var/CHANGELOG.md
index a222116b019..fc2214fb983 100644
--- a/plugins/stylelint-no-missing-var/CHANGELOG.md
+++ b/plugins/stylelint-no-missing-var/CHANGELOG.md
@@ -4,7 +4,9 @@
### Patch Changes
-- [#3527](https://github.com/adobe/spectrum-css/pull/3527) [`5f1751c`](https://github.com/adobe/spectrum-css/commit/5f1751c82a5fe55ae0d999f5f50cfeca4c8a5c75) Thanks [@castastrophe](https://github.com/castastrophe)! - Minor dependency updates to align with the larger project.
+📝 [#3527](https://github.com/adobe/spectrum-css/pull/3527) [`5f1751c`](https://github.com/adobe/spectrum-css/commit/5f1751c82a5fe55ae0d999f5f50cfeca4c8a5c75) Thanks [@castastrophe](https://github.com/castastrophe)!
+
+- Minor dependency updates to align with the larger project.
## 2.0.1
diff --git a/plugins/stylelint-no-unknown-custom-properties/CHANGELOG.md b/plugins/stylelint-no-unknown-custom-properties/CHANGELOG.md
index 4d2d09b6cac..9b66e2074f8 100644
--- a/plugins/stylelint-no-unknown-custom-properties/CHANGELOG.md
+++ b/plugins/stylelint-no-unknown-custom-properties/CHANGELOG.md
@@ -4,7 +4,9 @@
### Patch Changes
-- [#3527](https://github.com/adobe/spectrum-css/pull/3527) [`5f1751c`](https://github.com/adobe/spectrum-css/commit/5f1751c82a5fe55ae0d999f5f50cfeca4c8a5c75) Thanks [@castastrophe](https://github.com/castastrophe)! - Minor dependency updates to align with the larger project.
+📝 [#3527](https://github.com/adobe/spectrum-css/pull/3527) [`5f1751c`](https://github.com/adobe/spectrum-css/commit/5f1751c82a5fe55ae0d999f5f50cfeca4c8a5c75) Thanks [@castastrophe](https://github.com/castastrophe)!
+
+- Minor dependency updates to align with the larger project.
## 2.0.2
diff --git a/plugins/stylelint-no-unknown-custom-properties/index.js b/plugins/stylelint-no-unknown-custom-properties/index.js
index 443af61c20e..69ec3f8ad67 100644
--- a/plugins/stylelint-no-unknown-custom-properties/index.js
+++ b/plugins/stylelint-no-unknown-custom-properties/index.js
@@ -30,7 +30,6 @@ const messages = ruleMessages(ruleName, {
expected: (prop) => `Custom property ${prop.magenta} not defined`,
});
-import fg from "fast-glob";
import { parse } from "postcss";
import valuesParser from "postcss-values-parser";
@@ -71,14 +70,6 @@ const ruleFunction = (enabled, options = {}) => {
const sharedDefinitions = new Set();
- for (const themePath of fg.sync(["themes/*.css"], { cwd: componentRoot, absolute: true })) {
- const content = readFileSync(themePath, "utf8");
- if (!content) continue;
- parse(content).walkDecls(/^--/, ({ prop }) => {
- sharedDefinitions.add(prop);
- });
- }
-
function fetchResolutions(depName) {
let req;
try {
diff --git a/plugins/stylelint-no-unused-custom-properties/CHANGELOG.md b/plugins/stylelint-no-unused-custom-properties/CHANGELOG.md
index 3d00882fc9d..364204278d1 100644
--- a/plugins/stylelint-no-unused-custom-properties/CHANGELOG.md
+++ b/plugins/stylelint-no-unused-custom-properties/CHANGELOG.md
@@ -4,7 +4,9 @@
### Patch Changes
-- [#3527](https://github.com/adobe/spectrum-css/pull/3527) [`5f1751c`](https://github.com/adobe/spectrum-css/commit/5f1751c82a5fe55ae0d999f5f50cfeca4c8a5c75) Thanks [@castastrophe](https://github.com/castastrophe)! - Minor dependency updates to align with the larger project.
+📝 [#3527](https://github.com/adobe/spectrum-css/pull/3527) [`5f1751c`](https://github.com/adobe/spectrum-css/commit/5f1751c82a5fe55ae0d999f5f50cfeca4c8a5c75) Thanks [@castastrophe](https://github.com/castastrophe)!
+
+- Minor dependency updates to align with the larger project.
## 2.0.4
diff --git a/plugins/stylelint-theme-alignment/CHANGELOG.md b/plugins/stylelint-theme-alignment/CHANGELOG.md
deleted file mode 100644
index 86056dd1405..00000000000
--- a/plugins/stylelint-theme-alignment/CHANGELOG.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Change log
-
-## 1.2.1
-
-### Patch Changes
-
-- [#3527](https://github.com/adobe/spectrum-css/pull/3527) [`5f1751c`](https://github.com/adobe/spectrum-css/commit/5f1751c82a5fe55ae0d999f5f50cfeca4c8a5c75) Thanks [@castastrophe](https://github.com/castastrophe)! - Minor dependency updates to align with the larger project.
-
-## 1.2.0
-
-### Minor Changes
-
-📝 [#3502](https://github.com/adobe/spectrum-css/pull/3502) [`562396e`](https://github.com/adobe/spectrum-css/commit/562396eaf21769341f78ea3761393b65f00e751b) Thanks [@castastrophe](https://github.com/castastrophe)!
-
-- Fixes a bug where the source file is expected to be "spectrum-two" instead of "spectrum".
-
-## 1.1.0
-
-### Minor Changes
-
-📝 [#3403](https://github.com/adobe/spectrum-css/pull/3403) [`48626b8`](https://github.com/adobe/spectrum-css/commit/48626b8ca11043d290c0fe987ec501b88bd6e339) Thanks [@castastrophe](https://github.com/castastrophe)!
-
-- Allow the base filename to be passed into the tool so that the core theme can be updated. Great preparations for S2 roll-out when spectrum-two.css theme files will become our primary source of theme content.
-
-## 1.0.0
-
-### Major Changes
-
-📝 [#3026](https://github.com/adobe/spectrum-css/pull/3026) [`544a803`](https://github.com/adobe/spectrum-css/commit/544a8039e84423a4db3137a0688f27b7812e291f) Thanks [@castastrophe](https://github.com/castastrophe)!
-
-- Initial release of the stylelint theme alignment tool. This package uses the base file (themes/spectrum.css) for a Spectrum CSS component as a "source of truth" and validates the sub-themes (i.e., themes/express.css) use only selectors and custom properties defined in the base file.
diff --git a/plugins/stylelint-theme-alignment/README.md b/plugins/stylelint-theme-alignment/README.md
deleted file mode 100644
index 1aa58cd7fa4..00000000000
--- a/plugins/stylelint-theme-alignment/README.md
+++ /dev/null
@@ -1,78 +0,0 @@
-# stylelint-no-unused-custom-properties
-
-> Remove or report on unused variable definitions
-
-## Installation
-
-```sh
-yarn add -D @spectrum-tools/stylelint-no-unused-custom-properties
-```
-
-## Usage
-
-Assuming you have some variables defined and rule(s) that use them:
-
-```css
-:root {
- --prefix-component-background-color: blue;
- --prefix-component-width: 10px;
- --prefix-component-height: 10px;
- --prefix-component-size: 10px;
-}
-
-.component {
- background-color: var(--prefix-component-background-color);
-
- width: var(--prefix-component-width);
- height: var(--prefix-component-height);
-}
-```
-
-The variables that are not used in any rule will be removed from the output or reported to the console:
-
-```css
-:root {
- --prefix-component-background-color: blue;
- --prefix-component-width: 10px;
- --prefix-component-height: 10px;
-}
-
-.component {
- background-color: var(--prefix-component-background-color);
-
- width: var(--prefix-component-width);
- height: var(--prefix-component-height);
-}
-```
-
-To allow variables to be defined without being used, such as when you want to pass custom properties down to a child component, you can add a `/* @passthrough */` comment to the variable definition:
-
-```css
-:root {
- /* @passthrough */
- --nested-component-background-color: blue;
- --prefix-component-width: 10px;
- --prefix-component-height: 10px;
- --prefix-component-size: 10px;
-}
-```
-
-To allow a group of properties to be passed down, you can prefix the set with `/* @passthrough start */` and suffix it with `/* @passthrough end */`:
-
-```css
-:root {
- /* @passthrough start */
- --nested-component-background-color: blue;
- --nested-component-width: 10px;
- /* @passthrough end */
-
- --prefix-component-height: 10px;
- --prefix-component-size: 10px;
-}
-```
-
-## Options
-
-### `ignoreList` (default: `[]`)
-
-An array of strings or regular expressions that will be matched against the variable name. If a match is found, the variable will be ignored.
diff --git a/plugins/stylelint-theme-alignment/index.js b/plugins/stylelint-theme-alignment/index.js
deleted file mode 100644
index 98653a2225a..00000000000
--- a/plugins/stylelint-theme-alignment/index.js
+++ /dev/null
@@ -1,158 +0,0 @@
-/*!
- * Copyright 2024 Adobe. All rights reserved.
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
- * OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-import fs from "node:fs";
-import { basename, relative, sep } from "node:path";
-
-import postcss from "postcss";
-import valuesParser from "postcss-values-parser";
-import stylelint from "stylelint";
-import { isString } from "stylelint/lib/utils/validateTypes.mjs";
-
-const {
- createPlugin,
- utils: { report, ruleMessages, validateOptions }
-} = stylelint;
-
-import "colors";
-
-const ruleName = "spectrum-tools/theme-alignment";
-const messages = ruleMessages(ruleName, {
- missing: (baseFile, sourceFile, rootPath) => `A base file (${relative(rootPath, baseFile)}) is required to validate ${relative(rootPath, sourceFile)}.`,
- // Report if a selector is in this file but not in the base file
- expected: (selector, baseFile, rootPath) => `Selector "${selector}" is not used or defined in the base file (${relative(rootPath, baseFile)}).`,
- // Report if a custom property is used in this file but not in the base file
- referenced: (property, baseFile, rootPath) => `Custom property "${property}" is not used or defined by the base file (${relative(rootPath, baseFile)}).`,
-});
-
-/** @type {import('stylelint').Plugin} */
-const ruleFunction = (enabled, options = {}) => {
- return (root, result) => {
- const validOptions = validateOptions(
- result,
- ruleName,
- {
- actual: enabled,
- possible: [true],
- },
- {
- actual: options,
- possible: {
- baseFilename: isString,
- },
- optional: true,
- },
- );
-
- if (!validOptions) return;
-
-
- const { baseFilename = "spectrum" } = options;
-
- const sourceFile = root.source.input.file;
- const parts = sourceFile ? sourceFile.split(sep) : [];
- const isTheme = parts[parts.length - 2] === "themes";
- const filename = parts[parts.length - 1];
-
- if (!isTheme || basename(filename, ".css") === baseFilename) return;
-
- // All the parts of the source file but replace the filename with the baseFilename
- const baseFile = [...parts.slice(0, -1), `${baseFilename}.css`].join(sep);
- const rootPath = parts.slice(0, -2).join(sep);
-
- // If the base file doesn't exist, throw an error
- if (!fs.existsSync(baseFile)) {
- report({
- message: messages.missing,
- messageArgs: [baseFile, sourceFile, rootPath],
- node: root,
- result,
- ruleName,
- });
- return;
- }
-
- // Read in the base file and parse it
- const baseContent = fs.readFileSync(baseFile, "utf8");
- const baseRoot = postcss.parse(baseContent);
-
- /* A list of all selectors in the base file */
- const baseSelectors = new Set();
- /* A list of all properties in the base file */
- const baseProperties = new Set();
-
- /* Iterate over selectors in the base root */
- baseRoot.walkRules((rule) => {
- rule.selectors.forEach((selector) => {
- // Add this selector to the selectors set
- baseSelectors.add(selector);
- });
-
- rule.walkDecls((decl) => {
- // If this is a custom property, add it to the properties set
- if (decl.prop.startsWith("--")) {
- baseProperties.add(decl.prop);
- }
-
- // If the value of this declaration includes a custom property, add it to the properties set
- const parsed = valuesParser.parse(decl.value);
- parsed.walk((node) => {
- if (node.type === "func" && node.value === "var") {
- baseProperties.add(node.nodes[0].value);
- }
- });
- });
- });
-
- /* Iterate over selectors in the source root and validate that they align with the base */
- root.walkRules((rule) => {
- rule.selectors.forEach((selector) => {
- // Check if this selector exists in the base
- if (!baseSelectors.has(selector)) {
- // Report any selectors that don't exist in the base
- report({
- message: messages.expected,
- messageArgs: [selector, baseFile, rootPath],
- node: rule,
- result,
- ruleName,
- });
- return;
- }
- });
-
- rule.walkDecls((decl) => {
- const isProperty = decl.prop.startsWith("--");
- // @todo should report that this is setting something other than a custom property in the theme file
- if (!isProperty) {
- return;
- }
-
- // If this is a custom property, check if it's used in the base
- if (!baseProperties.has(decl.prop)) {
- report({
- message: messages.referenced,
- messageArgs: [decl.prop, baseFile, rootPath],
- node: decl,
- result,
- ruleName,
- });
- }
- });
- });
- };
-};
-
-ruleFunction.ruleName = ruleName;
-ruleFunction.messages = messages;
-
-export default createPlugin(ruleName, ruleFunction);
diff --git a/plugins/stylelint-theme-alignment/package.json b/plugins/stylelint-theme-alignment/package.json
deleted file mode 100644
index 0afc7dad3dd..00000000000
--- a/plugins/stylelint-theme-alignment/package.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "name": "@spectrum-tools/stylelint-theme-alignment",
- "version": "1.2.1",
- "description": "A utility to ensure that all custom properties are intially defined in a core resource file and all subsequent uses leverage only values defined there first.",
- "license": "Apache-2.0",
- "author": "Adobe",
- "contributors": [
- "Cassondra Roberts "
- ],
- "homepage": "https://opensource.adobe.com/spectrum-css",
- "repository": {
- "type": "git",
- "url": "https://github.com/adobe/spectrum-css.git",
- "directory": "plugins/stylelint-theme-alignment"
- },
- "bugs": {
- "url": "https://github.com/adobe/spectrum-css/issues"
- },
- "type": "module",
- "main": "index.js",
- "files": [
- "package.json",
- "index.js",
- "*.md"
- ],
- "dependencies": {
- "colors": "^1.4.0",
- "postcss": "^8.5.6",
- "postcss-values-parser": "^6.0.2"
- },
- "peerDependencies": {
- "stylelint": ">=16"
- },
- "devDependencies": {
- "stylelint": "^16.21.0"
- },
- "keywords": [
- "css",
- "lint",
- "properties",
- "report",
- "stylelint-plugin"
- ]
-}
diff --git a/plugins/stylelint-theme-alignment/project.json b/plugins/stylelint-theme-alignment/project.json
deleted file mode 100644
index 90709f217ad..00000000000
--- a/plugins/stylelint-theme-alignment/project.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
- "name": "stylelint-theme-alignment",
- "tags": ["tooling", "stylelint"],
- "targets": {
- "format": {
- "defaultConfiguration": "plugins"
- },
- "lint": {
- "defaultConfiguration": "plugins"
- }
- }
-}
diff --git a/postcss.config.js b/postcss.config.js
index 71b276317e7..f5293934ffb 100644
--- a/postcss.config.js
+++ b/postcss.config.js
@@ -15,12 +15,7 @@ const fs = require("node:fs");
const { join, basename } = require("node:path");
module.exports = ({
- skipMapping = false,
- referencesOnly = false,
- preserveVariables = true,
- stripLocalSelectors = false,
resolveImports = true,
- shouldCombine = false,
lint = true,
verbose = true,
minify = false,
@@ -84,19 +79,6 @@ module.exports = ({
prefix: "is-"
} : false,
"postcss-hover-media-feature": {},
- /* --------------------------------------------------- */
- /* ------------------- VARIABLE PARSING -------------- */
- "@spectrum-tools/postcss-add-theming-layer": {
- selectorPrefix: "spectrum",
- skipMapping,
- preserveVariables,
- referencesOnly,
- stripLocalSelectors,
- debug: verbose,
- },
- "@spectrum-tools/postcss-property-rollup": shouldCombine ? {
- newSelector: ".spectrum",
- } : false,
...additionalPlugins,
/* --------------------------------------------------- */
/* ------------------- POLYFILLS --------------------- */
diff --git a/schemas/metadata.schema.json b/schemas/metadata.schema.json
index c91ce98e0f2..1352f802900 100644
--- a/schemas/metadata.schema.json
+++ b/schemas/metadata.schema.json
@@ -10,71 +10,54 @@
"pattern": "^.+\\.css$",
"description": "The path to the source file used in generating the metadata."
},
- "selectors": {
- "description": "These are the selectors available for the component.",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "modifiers": {
- "description": "These are the modifiers available for the component.",
- "type": "array",
- "items": {
- "type": "string",
- "pattern": "^--mod-"
- }
- },
- "component": {
- "description": "The component-level custom properties for the component.",
- "type": "array",
- "items": {
- "type": "string",
- "pattern": "^--spectrum-"
- }
- },
- "global": {
- "description": "The global custom properties used in this component as generated by the design tokens.",
- "type": "array",
- "items": {
- "type": "string",
- "pattern": "^--spectrum-"
- }
- },
- "system-theme": {
- "description": "The system theme hooks created by the postcss tooling to allow theme toggling on a component.",
- "type": "array",
- "items": {
- "type": "string",
- "pattern": "^--system-"
- }
- },
- "passthroughs": {
- "description": "Modifier custom properties for nested components that are passed through by this component.",
- "type": "array",
- "items": {
- "type": "string",
- "pattern": "^--mod-"
- }
- },
- "high-contrast": {
- "description": "Custom properties that allow high-contrast styles to be applied to the component.",
- "type": "array",
- "items": {
- "type": "string",
- "pattern": "^--highcontrast-"
- }
- }
+ "selectors": {
+ "description": "These are the selectors available for the component.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "modifiers": {
+ "description": "These are the modifiers available for the component.",
+ "type": "array",
+ "items": {
+ "type": "string",
+ "pattern": "^--mod-"
+ }
+ },
+ "component": {
+ "description": "The component-level custom properties for the component.",
+ "type": "array",
+ "items": {
+ "type": "string",
+ "pattern": "^--spectrum-"
+ }
+ },
+ "global": {
+ "description": "The global custom properties used in this component as generated by the design tokens.",
+ "type": "array",
+ "items": {
+ "type": "string",
+ "pattern": "^--spectrum-"
+ }
+ },
+ "passthroughs": {
+ "description": "Modifier custom properties for nested components that are passed through by this component.",
+ "type": "array",
+ "items": {
+ "type": "string",
+ "pattern": "^--mod-"
+ }
+ },
+ "high-contrast": {
+ "description": "Custom properties that allow high-contrast styles to be applied to the component.",
+ "type": "array",
+ "items": {
+ "type": "string",
+ "pattern": "^--highcontrast-"
+ }
+ }
},
- "required": [
- "sourceFile",
- "selectors",
- "modifiers",
- "component",
- "global",
- "system-theme",
- "passthroughs",
- "high-contrast"
- ],
+ "required": ["sourceFile", "selectors", "modifiers", "component", "global", "passthroughs", "high-contrast"],
"additionalProperties": false
}
diff --git a/stylelint.config.js b/stylelint.config.js
index e0afd5518ec..bbfa2e8866b 100644
--- a/stylelint.config.js
+++ b/stylelint.config.js
@@ -11,7 +11,6 @@ module.exports = {
"@spectrum-tools/stylelint-no-missing-var",
"@spectrum-tools/stylelint-no-unused-custom-properties",
"@spectrum-tools/stylelint-no-unknown-custom-properties",
- "@spectrum-tools/stylelint-theme-alignment",
// "stylelint-high-performance-animation",
],
ignoreFiles: [
@@ -164,7 +163,6 @@ module.exports = {
* Local/custom plugins
* -------------------------------------------------------------- */
"spectrum-tools/no-missing-var": true,
- "spectrum-tools/theme-alignment": null,
"spectrum-tools/no-unused-custom-properties": null,
"spectrum-tools/no-unknown-custom-properties": null,
},
@@ -222,21 +220,6 @@ module.exports = {
"custom-property-pattern": [/^(spectrum|color|scale|system)/, {}],
}
},
- {
- /* Validate that the legacy themes don't introduce any new selectors or custom properties */
- files: ["components/*/themes/express.css", "components/*/themes/spectrum.css"],
- rules: {
- "spectrum-tools/no-unused-custom-properties": null,
- "selector-class-pattern": [
- "^(spectrum-|is-|u-)[A-Za-z0-9-]+", {
- resolveNestedSelectors: true
- }
- ],
- "spectrum-tools/theme-alignment": [true, {
- baseFilename: "spectrum-two",
- }],
- },
- },
{
/* Allow "tree shaking" of unused custom properties in the bundle */
files: ["tools/bundle/**/*.css"],
diff --git a/tasks/component-builder.js b/tasks/component-builder.js
index 5a388b0c2fe..3f882beab72 100644
--- a/tasks/component-builder.js
+++ b/tasks/component-builder.js
@@ -204,79 +204,6 @@ async function build({ cwd = process.cwd(), clean = false, minify = false, compo
]);
}
-/**
- * The builder for the individual themes assets
- * @param {object} config
- * @param {string} config.cwd - Current working directory for the component being built
- * @param {boolean} config.clean - Should the built assets be cleaned before running the build
- * @returns Promise
- */
-async function buildThemes({ cwd = process.cwd(), minify = false, clean = false } = {}) {
- // This fetches the content of the files and returns an array of objects with the content and input paths
- const contentData = await fetchContent(["themes/*.css"], { cwd, clean });
-
- // Nothing to do if there's no content
- if (!contentData || contentData.length === 0) return;
-
- const imports = contentData.map(({ input }) => input);
- const importMap = imports.map((i) => `@import "${i}";`).join("\n");
-
- const basePostCSSOptions = {
- cwd,
- clean,
- map: false,
- env: "production",
- lint: false,
- };
-
- const promises = [];
-
- contentData.forEach(async ({ content, input }) => {
- const theme = path.basename(input, ".css");
-
- promises.push(
- processCSS(content, path.join(cwd, input), path.join(cwd, "dist", "themes", `${theme}.css`), {
- ...basePostCSSOptions,
- shouldCombine: true,
- // Only output the new selectors with the system mappings
- stripLocalSelectors: true,
- }),
- minify ? processCSS(content, path.join(cwd, input), path.join(cwd, "dist", "themes", `${theme}.min.css`), {
- ...basePostCSSOptions,
- shouldCombine: true,
- // Only output the new selectors with the system mappings
- stripLocalSelectors: true,
- }) : Promise.resolve(),
- );
- });
-
- promises.push(
- processCSS(undefined, path.join(cwd, "index.css"), path.join(cwd, "dist", "index-base.css"), {
- ...basePostCSSOptions,
- referencesOnly: true,
- // Only output the new selectors with the system mappings
- stripLocalSelectors: true,
- }),
- minify ? processCSS(undefined, path.join(cwd, "index.css"), path.join(cwd, "dist", "index-base.min.css"), {
- ...basePostCSSOptions,
- referencesOnly: true,
- // Only output the new selectors with the system mappings
- stripLocalSelectors: true,
- }) : Promise.resolve(),
- // Expect this file to have component-specific selectors mapping to the system tokens but not the system tokens themselves
- processCSS(importMap, path.join(cwd, "index.css"), path.join(cwd, "dist", "index-theme.css"), {
- ...basePostCSSOptions,
- referencesOnly: true,
- }),
- minify ? processCSS(importMap, path.join(cwd, "index.css"), path.join(cwd, "dist", "index-theme.min.css"), {
- ...basePostCSSOptions,
- referencesOnly: true,
- }) : Promise.resolve(),
- );
-
- return Promise.all(promises);
-}
-
/**
* The main entry point for this tool; this builds a CSS component
* @param {object} config
@@ -318,42 +245,33 @@ async function main({
const key = `[build] ${`@spectrum-css/${componentName}`.cyan}`;
console.time(key);
- // Create the dist directory if it doesn't exist
- if (!fs.existsSync(path.join(cwd, "dist"))) {
- fs.mkdirSync(path.join(cwd, "dist"));
+ const reports = [];
+ const errors = [];
+
+ await build({ cwd, clean, minify }).then((report) => reports.push(report)).catch((err) => errors.push(err));
+
+ const logs = reports.flat(Infinity).filter(Boolean);
+ const errs = errors.flat(Infinity).filter(Boolean);
+
+ console.log(`\n\n${key} 🔨`);
+ console.log(`${"".padStart(30, "-")}`);
+
+ if (errs && errs.length > 0) {
+ errs.forEach((err) => console.error(err));
+ }
+ else {
+ if (logs && logs.length > 0) {
+ logs.forEach((log) => console.log(log));
+ }
+ else console.log("No assets created.".gray);
}
- return Promise.all([
- build({ cwd, clean, minify }),
- buildThemes({ cwd, clean, minify }),
- ])
- .then((report) => {
- const logs = report.flat(Infinity).filter(Boolean);
-
- console.log(`\n\n${key} 🔨`);
- console.log(`${"".padStart(30, "-")}`);
-
- if (logs && logs.length > 0) {
- logs.forEach((log) => console.log(log));
- }
- else console.log("No assets created.".gray);
-
- console.log(`${"".padStart(30, "-")}`);
- console.timeEnd(key);
- console.log("");
- })
- .catch((err) => {
- console.log(`\n\n${key} 🔨`);
- console.log(`${"".padStart(30, "-")}`);
-
- console.trace(err);
-
- console.log(`${"".padStart(30, "-")}`);
- console.timeEnd(key);
- console.log("");
-
- process.exit(1);
- });
+ console.log(`${"".padStart(30, "-")}`);
+ console.timeEnd(key);
+ console.log("");
+
+ if (errs && errs.length > 0) process.exit(1);
+ else process.exit(0);
}
exports.processCSS = processCSS;
diff --git a/tasks/component-reporter.js b/tasks/component-reporter.js
index 90a2da7d1cd..b281de49bc9 100644
--- a/tasks/component-reporter.js
+++ b/tasks/component-reporter.js
@@ -69,6 +69,9 @@ async function extractModifiers(
const selectors = new Set();
const root = postcss.parse(content);
root.walkRules((rule) => {
+ // Check that the selector is not inside a keyframe
+ if (rule.parent.type === "atrule" && rule.parent.name === "keyframes") return;
+
if (rule.selectors) {
rule.selectors.forEach((selector) => {
// If the selector is not a base selector, add it to the set
@@ -173,10 +176,6 @@ async function main({
const processed = await processCSS(undefined, sourceCSS, undefined, {
cwd,
- skipMapping: false,
- referencesOnly: false,
- preserveVariables: true,
- stripLocalSelectors: false,
map: false,
env: "production",
});
@@ -187,11 +186,10 @@ async function main({
cwd,
sourcePath: sourceCSS,
componentName,
- baseSelectors: [".spectrum", ".spectrum--express", ".spectrum--legacy"],
+ baseSelectors: [".spectrum"],
dataModel: {
modifiers: ["mod"],
spectrum: ["spectrum"],
- "system-theme": ["system"],
"high-contrast": ["highcontrast"],
},
}
@@ -206,7 +204,6 @@ async function main({
modifiers: meta.modifiers,
component: meta.component,
global: meta.global,
- "system-theme": meta["system-theme"],
passthroughs: meta.passthroughs,
"high-contrast": meta["high-contrast"],
}, null, 2),
diff --git a/tokens/CHANGELOG.md b/tokens/CHANGELOG.md
index c6234234fb0..0fbb2134d34 100644
--- a/tokens/CHANGELOG.md
+++ b/tokens/CHANGELOG.md
@@ -1,5 +1,628 @@
# Change log
+## 16.1.0-next.5
+
+### Patch Changes
+
+- [#3969](https://github.com/adobe/spectrum-css/pull/3969) [`d952e0c`](https://github.com/adobe/spectrum-css/commit/d952e0c4d234f5e742432fe906965a52a50b228e) Thanks [@renovate](https://github.com/apps/renovate)! - Updated from [@adobe/spectrum-tokens](https://github.com/adobe/spectrum-tokens) v13.10.0 -> [13.10.1](https://github.com/adobe/spectrum-tokens/releases/tag/%40adobe/spectrum-tokens%4013.10.1).
+
+ - [#517](https://github.com/adobe/spectrum-tokens/pull/517) [`8f8f8a6`](https://github.com/adobe/spectrum-tokens/commit/8f8f8a60b7adf5105ced4f914cf30928117ddc5e) Thanks [@larz0](https://github.com/larz0)!
+
+ #### Updated tokens
+
+ - `accordion-focus-indicator-gap`
+ - value: `0px` -> `2px`
+ - `accordion-top-to-text-medium`
+ - desktop.value: `12px` -> `9px`
+ - mobile.value: `16px` -> `10px`
+
+## 16.1.0-next.4
+
+### Patch Changes
+
+- [#3818](https://github.com/adobe/spectrum-css/pull/3818) [`f20e1e7`](https://github.com/adobe/spectrum-css/commit/f20e1e7ff402b591706cc791d9207fdedb80cd1e) Thanks [@marissahuysentruyt](https://github.com/marissahuysentruyt)! - Adds `--spectrum-table-selected-row-background-color-rgb` to `light-vars.css` and `dark-vars.css` for custom tokens.
+
+## 16.1.0-next.3
+
+### Minor Changes
+
+- [#3758](https://github.com/adobe/spectrum-css/pull/3758) [`f0d187f`](https://github.com/adobe/spectrum-css/commit/f0d187ff016d49c46ac125cb37ae274644608505) Thanks [@renovate](https://github.com/apps/renovate)!
+
+#### @adobe/spectrum-tokens@13.7.0
+
+- [#499 0c1a81b](https://github.com/adobe/spectrum-css/pull/499) Thanks [@larz0](https://github.com/larz0)!
+
+Added new accordion tokens.
+
+Added
+
+- `accordion-edge-to-content-area-small`
+- `accordion-edge-to-content-area-medium`
+- `accordion-edge-to-content-area-large`
+- `accordion-edge-to-content-area-extra-large`
+- `single-calendar-popover-minimum-width`
+- `single-calendar-popover-minimum-height`
+- `double-calendar-popover-minimum-width`
+- `double-calendar-popover-minimum-height`
+- `triple-calendar-popover-minimum-width`
+- `triple-calendar-popover-minimum-height`
+- `date-field-minimum-width`
+- `date-field-text-to-visual`
+- `time-field-minimum-width`
+- `time-field-text-to-visual`
+- `date-picker-visual-to-field-button`
+- `date-picker-text-to-visual`
+- `date-picker-minimum-width`
+- `segmented-text-field-gap`
+- `segmented-text-field-rounding`
+
+
+
+### @adobe/spectrum-tokens@13.6.0
+
+- [#497 fc0682e](https://github.com/adobe/spectrum-css/pull/497) Thanks [@larz0](https://github.com/larz0)!
+
+Added horizontal card tokens.
+
+Added
+
+- `card-horizontal-edge-to-content-compact`
+- `card-horizontal-edge-to-content-default`
+- `card-horizontal-edge-to-content-spacious`
+
+
+
+### @adobe/spectrum-tokens@13.5.0
+
+- [#494 f569623](https://github.com/adobe/spectrum-css/pull/494) Thanks [@larz0](https://github.com/larz0)!
+
+Added vf-related-line-height tokens for desktop and mobile. These tokens are required for the upcoming composite typography tokens.
+
+
+Newly deprecated
+
+- `drop-zone-content-maximum-width`
+
+
+
+
+Added
+
+- `line-height-font-size-25`
+- `line-height-font-size-50`
+- `line-height-font-size-75`
+- `line-height-font-size-100`
+- `line-height-font-size-200`
+- `line-height-font-size-300`
+- `line-height-font-size-400`
+- `line-height-font-size-500`
+- `line-height-font-size-600`
+- `line-height-font-size-700`
+- `line-height-font-size-800`
+- `line-height-font-size-900`
+- `line-height-font-size-1000`
+- `line-height-font-size-1100`
+- `line-height-font-size-1200`
+- `line-height-font-size-1300`
+- `line-height-font-size-1400`
+- `line-height-font-size-1500`
+
+
+
+- [#3843](https://github.com/adobe/spectrum-css/pull/3843) [`1cdfcbf`](https://github.com/adobe/spectrum-css/commit/1cdfcbff6cb3369d710cec78733536d5dd72e7d4) Thanks [@renovate](https://github.com/apps/renovate)!
+
+### Tokens changed
+
+
Updated from @adobe/spectrum-tokens@13.7.0 to @adobe/spectrum-tokens@13.10.0.
+
+
This update introduces new tokens for accordion, field disclosure icons, icon sizes (add, drag handle, gripper, link out), and tag field dimensions, along with stack item and list view global properties.
+
+
Note that deprecated tokens are still available but will be removed in a future release. Please migrate to new tokens as appropriate.