@adobe/spectrum-wc-core 0.4.0-snapshot-test.20260714143259 → 2.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/dist/components/accordion/Accordion.base.d.ts +2 -4
  3. package/dist/components/accordion/Accordion.base.js +23 -31
  4. package/dist/components/accordion/Accordion.base.js.map +1 -1
  5. package/dist/components/button/Button.base.d.ts +8 -39
  6. package/dist/components/button/Button.base.js +14 -43
  7. package/dist/components/button/Button.base.js.map +1 -1
  8. package/dist/components/button-group/ButtonGroup.base.js +1 -1
  9. package/dist/components/button-group/ButtonGroup.base.js.map +1 -1
  10. package/dist/components/color-loupe/ColorLoupe.base.d.ts +15 -0
  11. package/dist/components/color-loupe/ColorLoupe.base.js +7 -3
  12. package/dist/components/color-loupe/ColorLoupe.base.js.map +1 -1
  13. package/dist/components/color-loupe/index.js +2 -2
  14. package/dist/components/illustrated-message/IllustratedMessage.base.js +1 -1
  15. package/dist/components/illustrated-message/IllustratedMessage.base.js.map +1 -1
  16. package/dist/components/popover/Popover.base.d.ts +3 -0
  17. package/dist/components/popover/Popover.base.js +18 -5
  18. package/dist/components/popover/Popover.base.js.map +1 -1
  19. package/dist/components/progress-bar/ProgressBar.base.d.ts +34 -0
  20. package/dist/components/progress-bar/ProgressBar.base.js +21 -0
  21. package/dist/components/progress-bar/ProgressBar.base.js.map +1 -0
  22. package/dist/components/progress-bar/ProgressBar.types.d.ts +12 -0
  23. package/dist/components/progress-bar/index.d.ts +13 -0
  24. package/dist/components/progress-bar/index.js +2 -0
  25. package/dist/components/progress-circle/ProgressCircle.base.d.ts +0 -7
  26. package/dist/components/progress-circle/ProgressCircle.base.js.map +1 -1
  27. package/dist/components/status-light/StatusLight.base.d.ts +5 -1
  28. package/dist/components/status-light/StatusLight.base.js.map +1 -1
  29. package/dist/components/tabs/Tabs.base.d.ts +35 -49
  30. package/dist/components/tabs/Tabs.base.js +33 -57
  31. package/dist/components/tabs/Tabs.base.js.map +1 -1
  32. package/dist/components/tooltip/Tooltip.base.d.ts +5 -0
  33. package/dist/components/tooltip/Tooltip.base.js.map +1 -1
  34. package/dist/controllers/color-controller/index.js +2 -1
  35. package/dist/controllers/focusgroup-navigation-controller/index.d.ts +1 -1
  36. package/dist/controllers/focusgroup-navigation-controller/index.js +2 -0
  37. package/dist/controllers/focusgroup-navigation-controller/src/focusgroup-navigation-controller.d.ts +19 -0
  38. package/dist/controllers/focusgroup-navigation-controller/src/focusgroup-navigation-controller.js +24 -21
  39. package/dist/controllers/focusgroup-navigation-controller/src/focusgroup-navigation-controller.js.map +1 -1
  40. package/dist/controllers/hover-controller/index.js +2 -0
  41. package/dist/controllers/index.d.ts +4 -1
  42. package/dist/controllers/index.js +13 -9
  43. package/dist/controllers/live-selection-controller/index.d.ts +12 -0
  44. package/dist/controllers/live-selection-controller/index.js +2 -0
  45. package/dist/controllers/live-selection-controller/src/live-selection-controller.d.ts +144 -0
  46. package/dist/controllers/live-selection-controller/src/live-selection-controller.js +36 -0
  47. package/dist/controllers/live-selection-controller/src/live-selection-controller.js.map +1 -0
  48. package/dist/controllers/pending-controller/index.d.ts +12 -0
  49. package/dist/controllers/pending-controller/index.js +2 -0
  50. package/dist/controllers/pending-controller/src/pending-controller.d.ts +95 -0
  51. package/dist/controllers/pending-controller/src/pending-controller.js +55 -0
  52. package/dist/controllers/pending-controller/src/pending-controller.js.map +1 -0
  53. package/dist/controllers/placement-controller/index.js +4 -3
  54. package/dist/controllers/slot-attribute-propagation-controller/index.js +2 -0
  55. package/dist/controllers/{slot-attribute-propagation → slot-attribute-propagation-controller}/src/slot-attribute-propagation-controller.d.ts +14 -4
  56. package/dist/controllers/{slot-attribute-propagation → slot-attribute-propagation-controller}/src/slot-attribute-propagation-controller.js +4 -3
  57. package/dist/controllers/slot-attribute-propagation-controller/src/slot-attribute-propagation-controller.js.map +1 -0
  58. package/dist/directives/index.d.ts +15 -0
  59. package/dist/directives/index.js +3 -0
  60. package/dist/directives/pending-spinner/index.d.ts +12 -0
  61. package/dist/directives/pending-spinner/index.js +1 -0
  62. package/dist/directives/pending-spinner/src/pending-spinner.d.ts +22 -0
  63. package/dist/directives/pending-spinner/src/pending-spinner.js +39 -0
  64. package/dist/directives/pending-spinner/src/pending-spinner.js.map +1 -0
  65. package/dist/element/version.d.ts +2 -2
  66. package/dist/element/version.js +1 -1
  67. package/dist/element/version.js.map +1 -1
  68. package/dist/mixins/index.d.ts +1 -0
  69. package/dist/mixins/index.js +3 -2
  70. package/dist/mixins/linear-progress-mixin.js +6 -3
  71. package/dist/mixins/linear-progress-mixin.js.map +1 -1
  72. package/dist/mixins/pending-mixin.d.ts +45 -0
  73. package/dist/mixins/pending-mixin.js +49 -0
  74. package/dist/mixins/pending-mixin.js.map +1 -0
  75. package/package.json +65 -2
  76. package/dist/controllers/slot-attribute-propagation/src/slot-attribute-propagation-controller.js.map +0 -1
  77. /package/dist/controllers/{slot-attribute-propagation → slot-attribute-propagation-controller}/index.d.ts +0 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,125 @@
1
+ # @spectrum-web-components/core
2
+
3
+ ## 2.0.0-beta.2
4
+
5
+ ### Minor Changes
6
+
7
+ - [#6413](https://github.com/adobe/spectrum-web-components/pull/6413) [`b4f454b`](https://github.com/adobe/spectrum-web-components/commit/b4f454b979fe60212d1c7ea4f4b86a29def4666b) Thanks [@Rajdeepc](https://github.com/Rajdeepc)! - Add the 2nd-gen `<swc-close-button>`, migrated from the Spectrum 1 `<sp-close-button>`.
8
+ - **API**: `size`, `disabled`, `accessible-label`, and `static-color`; omits the legacy `variant` surface in favor of `static-color`.
9
+ - **Accessibility**: renders a real inner `<button type="button">` with delegated focus; requires `accessible-label` for its icon-only name; the cross icon remains decorative.
10
+ - **Styling**: ships Spectrum 2 sizing and static-color treatments plus the `--swc-close-button-*` custom-property surface for token-aligned overrides.
11
+ - **Docs and tests**: includes Storybook docs, consumer migration guidance, unit coverage, and Playwright accessibility and keyboard tests.
12
+
13
+ - [#6413](https://github.com/adobe/spectrum-web-components/pull/6413) [`b4f454b`](https://github.com/adobe/spectrum-web-components/commit/b4f454b979fe60212d1c7ea4f4b86a29def4666b) Thanks [@Rajdeepc](https://github.com/Rajdeepc)! - **feat(color-handle):** Added `<swc-color-handle>`, the Spectrum 2 migration of `sp-color-handle`.
14
+
15
+ A non-interactive color-picker primitive exposing `color`, `disabled`, `focused`, `open`, and the new `fill` property, with a built-in `<swc-color-loupe>` and an adaptive white-first dual border that meets WCAG 1.4.11 non-text contrast across the color spectrum. The `--mod-colorhandle-*` custom properties are removed; see the migration guide.
16
+
17
+ - [#6439](https://github.com/adobe/spectrum-web-components/pull/6439) [`7f0c3e9`](https://github.com/adobe/spectrum-web-components/commit/7f0c3e937e697e3e1d5d3973ce4f709542f1bbef) Thanks [@caseyisonit](https://github.com/caseyisonit)! - Extract the pending (busy) state into reusable, decoupled 2nd-gen core primitives so any pending-capable component can adopt it.
18
+ - **`@adobe/spectrum-wc-core`**: adds `PendingController` (`/controllers/pending-controller`) for the pending state (delayed activation, inline-size freeze, derived busy accessible name), the render-only `renderPendingSpinner` directive (`/directives/pending-spinner`), and `PendingMixin` (`/mixins`) which wires the controller, the `pending` / `pending-label` properties, and click suppression. `ButtonBase` no longer owns pending state.
19
+ - **`@adobe/spectrum-wc`**: `swc-button` and `swc-action-button` now consume these primitives via `PendingMixin`. No public API change — `pending` / `pending-label` and the busy behavior are unchanged.
20
+
21
+ - [#6413](https://github.com/adobe/spectrum-web-components/pull/6413) [`b4f454b`](https://github.com/adobe/spectrum-web-components/commit/b4f454b979fe60212d1c7ea4f4b86a29def4666b) Thanks [@Rajdeepc](https://github.com/Rajdeepc)! - **refactor(tabs):** Migrate `<swc-tabs>` keyboard navigation to `FocusgroupNavigationController`.
22
+
23
+ Arrow-key, Home, and End navigation is now handled by the controller rather than by manually computed deltas in `handleKeyDown`. The `handleKeyDown` method retains only Enter/Space activation; all roving-tabindex management is delegated to the controller. In automatic activation mode, `focusgroupNavigationActiveChange` events with `source: 'keyboard'` drive selection-follows-focus; events with `source: 'refresh'` or `source: 'programmatic'` are intentionally ignored so that mounting or toggling `disabled` cannot trigger spurious `change` events.
24
+
25
+ ### Patch Changes
26
+
27
+ - [#6518](https://github.com/adobe/spectrum-web-components/pull/6518) [`36052f3`](https://github.com/adobe/spectrum-web-components/commit/36052f305622ad8f46b44bf5d71e2b02ebd8229c) Thanks [@rubencarvalho](https://github.com/rubencarvalho)! - Fix inaccurate API reference tables for several 2nd-gen components by documenting CSS custom properties and JSDoc property descriptions that were missing from the generated Custom Elements Manifest.
28
+ - Added missing `@cssprop` entries: `swc-tabs`/`swc-tab` (5 props), `swc-action-button` and `swc-button` (down-state transform, button also gets `max-inline-size`), `swc-illustrated-message` (10 props covering illustration sizing/color and heading/description typography).
29
+ - Added missing `size`/`variant` property descriptions for `swc-button`, `swc-action-button`, `swc-close-button`, `swc-status-light`, and `swc-badge`.
30
+ - Fixed the Tabs docs page rendering only `swc-tabs`'s API table; `swc-tab` and `swc-tab-panel` (the other two elements of the three-element component) now get their own API tables too, matching the pattern already used by Accordion.
31
+
32
+ No component runtime changes; documentation and Storybook docs-page rendering only.
33
+
34
+ - [#6513](https://github.com/adobe/spectrum-web-components/pull/6513) [`41e0483`](https://github.com/adobe/spectrum-web-components/commit/41e0483f59d3956ce973bbe50b2d54a1d8c73e9f) Thanks [@blunteshwar](https://github.com/blunteshwar)! - **fix(color-loupe):** Added an adaptive white-first inner border to `<swc-color-loupe>` so its chrome meets WCAG 1.4.11 non-text contrast (≥3:1) across the color spectrum.
35
+
36
+ The inner border's opacity now escalates above its default floor only when the white outer halo can't itself carry 3:1 contrast against the loupe's color. The outer border, shape, and sizing are unchanged, and there is no public API change. This supersedes the prior practical-limits exception, matching the adaptive dual-border approach already shipped for `<swc-color-handle>`.
37
+
38
+ - [#6413](https://github.com/adobe/spectrum-web-components/pull/6413) [`b4f454b`](https://github.com/adobe/spectrum-web-components/commit/b4f454b979fe60212d1c7ea4f4b86a29def4666b) Thanks [@Rajdeepc](https://github.com/Rajdeepc)! - **fix(popover):** Fixed `swc-popover` staying dismissed on the next unrelated outside click after a trigger press was dragged off and released elsewhere.
39
+
40
+ A `pointerdown` on the trigger followed by a drag off the trigger and a release elsewhere never dispatches a `click`, so the internal reopen-guard flag was left stuck `true`, misattributing the next unrelated outside light-dismiss to that stale press and swallowing the following legitimate trigger click.
41
+
42
+ - [#6490](https://github.com/adobe/spectrum-web-components/pull/6490) [`1e053fe`](https://github.com/adobe/spectrum-web-components/commit/1e053fe761c20b1df70c842cb3f9dcee94e02d8d) Thanks [@cdransf](https://github.com/cdransf)! - **fix(slot-attribute-propagation-controller):** Fixed `SlotAttributePropagationController` permanently skipping re-propagation when a repeated value was recorded before its target slot had resolved, and added support for propagating attributes that are only sometimes present on the host.
43
+
44
+ `getValue` may now return `null` to remove the propagated attribute from assigned elements instead of setting it to an empty string. The `hostUpdated()` no-op guard now only records a value as applied once the slot actually resolves, so a slot that resolves after an earlier unsuccessful attempt with the same value is no longer skipped forever.
45
+
46
+ `SlotAttributePropagationController` is also now a public export of `@adobe/spectrum-wc-core` (`@spectrum-web-components/core/controllers/slot-attribute-propagation-controller.js`), alongside dedicated tests and a Storybook controller docs page. Existing consumers (`<swc-button-group>`, `<swc-illustrated-message>`) are unaffected aside from benefiting from the propagation-guard fix.
47
+
48
+ - [#6533](https://github.com/adobe/spectrum-web-components/pull/6533) [`5da5474`](https://github.com/adobe/spectrum-web-components/commit/5da54741eadcf61d60fd37d700ff457419a4d2ca) Thanks [@cdransf](https://github.com/cdransf)! - **fix(progress-circle):** Replaced the `animation: none` reduced-motion override on `<swc-progress-circle>`'s indeterminate state with a slowed, single-rotation animation driven by custom properties (`--swc-progress-circle-rotate-start`, `--swc-progress-circle-rotate-end`, `--swc-progress-circle-dashoffset-30`), so `prefers-reduced-motion: reduce` still conveys progress without the distracting spin.
49
+
50
+ ## 2.0.0-beta.1
51
+
52
+ ### Minor Changes
53
+
54
+ - [#6340](https://github.com/adobe/spectrum-web-components/pull/6340) [`57a77bc`](https://github.com/adobe/spectrum-web-components/commit/57a77bcee7eeb8f5a7b1084f3ad91543c2f92034) Thanks [@cdransf](https://github.com/cdransf)! - Added `<swc-action-button>` with full Spectrum 2 visual fidelity, migrated from the Spectrum 1 `<sp-action-button>`. See the [component docs](https://spectrum-web-components.adobe.com/?path=/docs/components-action-button--docs) and [migration guide](https://spectrum-web-components.adobe.com/?path=/docs/components-action-button-migration-guide--docs).
55
+ - **API**: `accessible-label` replaces `label`; `size` includes `xs` (not on `swc-button`); `quiet` and `static-color` retained as primary visual differentiators; `pending` / `pending-label` added (matching `swc-button`); `aria-haspopup` / `aria-expanded` forwarded to the inner `<button>` for menu-trigger patterns.
56
+ - **Breaking changes**: `toggles`, `selected`, `emphasized`, and `aria-pressed` removed (toggle UX moves to `swc-toggle-button` / `swc-toggle-button-group`); `href` and the link API removed (use native `<a>`); `hold-affordance` / `longpress` deferred; `label` renamed to `accessible-label`.
57
+ - **Accessibility**: semantics and focus land on the internal native `<button>` (`delegatesFocus: true`); host carries no `role="button"`; `aria-disabled="true"` on the inner `<button>` during pending state; dev-mode warning when icon-only usage is missing `accessible-label`.
58
+ - **Styling**: exposes `--swc-action-button-*` custom properties (replaces `--mod-actionbutton-*` / `--spectrum-actionbutton-*`); full Spectrum 2 token coverage across all size × quiet × static-color combinations; Windows High Contrast support.
59
+ - **Docs and tests**: per-component Storybook docs page, consumer migration guide, and full unit + accessibility test coverage.
60
+
61
+ - [#6395](https://github.com/adobe/spectrum-web-components/pull/6395) [`b4740eb`](https://github.com/adobe/spectrum-web-components/commit/b4740eb58f8a9410dbfae2969ca7a21c07bc63bd) Thanks [@Rajdeepc](https://github.com/Rajdeepc)! - - [#6395](https://github.com/adobe/spectrum-web-components/pull/6395) [`acd555a`](https://github.com/adobe/spectrum-web-components/commit/acd555a975508f9249a1394ac808a62b2d7cbfe3) - `ButtonGroup` — Added `<swc-button-group>` with full Spectrum 2 visual fidelity. See the [component docs](https://spectrum-web-components.adobe.com/?path=/docs/button-group--docs) and [migration guide](https://spectrum-web-components.adobe.com/?path=/docs/button-group-migration-guide--docs).
62
+
63
+ - [#6454](https://github.com/adobe/spectrum-web-components/pull/6454) [`591fa65`](https://github.com/adobe/spectrum-web-components/commit/591fa65574f7f8175373683e7495059b8ca27fa4) Thanks [@cdransf](https://github.com/cdransf)! - Added an `actions` slot to `<swc-illustrated-message>` for placing a `<swc-button>` or `<swc-button-group>` below the description. The component automatically propagates its `size` to every slotted element. Also adds `SlotAttributePropagationController`, an internal Lit `ReactiveController` that propagates any host attribute to slotted children; used by `IllustratedMessage` and `ButtonGroup`.
64
+
65
+ ## 2.0.0-beta.0
66
+
67
+ ### Minor Changes
68
+
69
+ - [#6395](https://github.com/adobe/spectrum-web-components/pull/6395) [`b4740eb`](https://github.com/adobe/spectrum-web-components/commit/b4740eb58f8a9410dbfae2969ca7a21c07bc63bd) Thanks [@Rajdeepc](https://github.com/Rajdeepc)! - `Button Group` — Added `<swc-button-group>` with full Spectrum 2 visual fidelity. See the [component docs](https://spectrum-web-components.adobe.com/?path=/docs/button-group--docs) and [migration guide](https://spectrum-web-components.adobe.com/?path=/docs/button-group-migration-guide--docs).
70
+
71
+ - [#6358](https://github.com/adobe/spectrum-web-components/pull/6358) [`fe85234`](https://github.com/adobe/spectrum-web-components/commit/fe8523478348419aaeb7dc3f925ef00c4b8b40aa) Thanks [@5t3ph](https://github.com/5t3ph)! - Add `HoverController`, a Lit `ReactiveController` that manages hover and keyboard-focus event wiring for components that use the native Popover API, such as Tooltip.
72
+
73
+ - [#6370](https://github.com/adobe/spectrum-web-components/pull/6370) [`7c1d0c5`](https://github.com/adobe/spectrum-web-components/commit/7c1d0c574c918474196fa0f6007b9f905455f772) Thanks [@blunteshwar](https://github.com/blunteshwar)! - Add the 2nd-gen `<swc-meter>`, migrated from the Spectrum 1 `<sp-meter>`.
74
+ - **API**: `value` (replaces `progress`) with `min-value` / `max-value` for arbitrary ranges; `variant` (`informative` default, `positive`, `notice`, `negative`) with unknown values normalized to `informative`; `label-position` (`top` / `side`, replaces the `side-label` boolean); `value-label` and `formatOptions` for locale-aware value text; `label` and `description` named slots; `accessible-label` for the no-visible-label case.
75
+ - **Accessibility**: the WAI-ARIA `meter` role and all `aria-value*`, `aria-labelledby`, and `aria-describedby` attributes live on the internal bar element, not the host; non-focusable, read-only; honors `prefers-reduced-motion: reduce` (WCAG 2.3.3) on the shared linear-progress base by dropping the fill transition.
76
+ - **Styling**: exposes the `--swc-linear-progress-*` custom-property surface (replaces `--mod-progressbar-*` / `--mod-meter-*`); adds `static-color="black"` alongside `white`.
77
+ - **Docs and tests**: per-component Storybook docs page, consumer migration guide, and full unit + accessibility test coverage.
78
+
79
+ - [#6337](https://github.com/adobe/spectrum-web-components/pull/6337) [`e334d4f`](https://github.com/adobe/spectrum-web-components/commit/e334d4f4d622325984912b9689aae05e5ac179ce) Thanks [@rubencarvalho](https://github.com/rubencarvalho)! - Add `PlacementController`, a Floating UI-backed reactive controller for positioning anchored floating elements relative to a trigger. This adds `@floating-ui/dom` as a runtime dependency of `@spectrum-web-components/core`.
80
+
81
+ - [#6387](https://github.com/adobe/spectrum-web-components/pull/6387) [`64a3d50`](https://github.com/adobe/spectrum-web-components/commit/64a3d50a6f4284cc32b8e13f2c8e05489012cef6) Thanks [@5t3ph](https://github.com/5t3ph)! - Add the 2nd-gen `<swc-tooltip>`, migrated from the Spectrum 1 `<sp-tooltip>`.
82
+ - **API**: `for` attribute wires the tooltip to a trigger by ID; `trigger-element` property for programmatic or cross-shadow-root wiring; `manual` opts out of automatic wiring; `delay` (default 1500ms) for hover warm-up; `offset`, `cross-offset`, `container-padding`, and `should-flip` for viewport-aware positioning; `labeling` switches ARIA wiring to `ariaLabelledByElements` for icon-only triggers; `variant` accepts `neutral` (default), `informative`, and `negative`.
83
+ - **Breaking changes from `<sp-tooltip>`**: `slot="icon"` removed; `variant="positive"` removed; `variant="info"` renamed to `variant="informative"`; `self-managed` attribute removed (automatic wiring is now the default; use `manual` to opt out); events renamed from `sp-opened`/`sp-closed` to `swc-open`/`swc-after-open`/`swc-close`/`swc-after-close`; authoring pattern changed — `<swc-tooltip>` is authored as a sibling of the trigger, not nested inside it.
84
+ - **Accessibility**: `role="tooltip"` set on the host; `Element.ariaDescribedByElements` wired on the trigger's inner interactive element on open; `Escape` closes without moving focus via native `popover="auto"`; WCAG 1.4.13 pointer bridge keeps the tooltip open when the pointer moves from the trigger into the bubble; high-contrast border in forced-colors mode.
85
+ - **Controllers**: `HoverController` manages hover and keyboard-focus wiring with warm-up/cooldown timing; `PlacementController` handles viewport-aware pixel positioning via Floating UI with automatic flip on viewport collision.
86
+ - **Docs and tests**: per-component Storybook docs page, consumer migration guide, and full unit + accessibility test coverage.
87
+
88
+ ## 0.1.0
89
+
90
+ ### Minor Changes
91
+
92
+ - [#6067](https://github.com/adobe/spectrum-web-components/pull/6067) [`ba14a2b`](https://github.com/adobe/spectrum-web-components/commit/ba14a2b6361a0089a9a8c72232f245cde0716d89) - `Core` — Refactored size mixin exports and badge type naming for consistency. Replaced `ElementSizes` record with `ELEMENT_SIZES` const array and `DEFAULT_ELEMENT_SIZES`; `VALID_SIZES` typed as `readonly ElementSize[]`. Badge exports renamed: `BADGE_VARIANTS_S2` → `BADGE_VARIANTS`, `BadgeVariantS2` → `BadgeVariant`, `BadgeColorVariantS2` → `BadgeColorVariant`.
93
+
94
+ - [#6122](https://github.com/adobe/spectrum-web-components/pull/6122) [`7b153b5`](https://github.com/adobe/spectrum-web-components/commit/7b153b5433a8f6d47850f8939b058f7bc431c48c) - `Badge` — Migrated to 2nd-gen with `subtle`/`outline` styles, additional color variants, and updated defaults. See the [component docs](https://spectrum-web-components.adobe.com/?path=/docs/components-badge--docs) and [migration guide](https://spectrum-web-components.adobe.com/?path=/docs/components-badge-migration-guide--docs).
95
+ `Divider` — Migrated to 2nd-gen. See the [component docs](https://spectrum-web-components.adobe.com/?path=/docs/components-divider--docs) and [migration guide](https://spectrum-web-components.adobe.com/?path=/docs/components-divider-migration-guide--docs).
96
+ `Progress Circle` — Migrated to 2nd-gen; removed `indeterminate` attribute. See the [component docs](https://spectrum-web-components.adobe.com/?path=/docs/components-progress-circle--docs) and [migration guide](https://spectrum-web-components.adobe.com/?path=/docs/components-progress-circle-migration-guide--docs).
97
+ `Status Light` — Migrated to 2nd-gen; removed `disabled` attribute and `accent` variant. See the [component docs](https://spectrum-web-components.adobe.com/?path=/docs/components-status-light--docs) and [migration guide](https://spectrum-web-components.adobe.com/?path=/docs/components-status-light-migration-guide--docs).
98
+
99
+ - [#6183](https://github.com/adobe/spectrum-web-components/pull/6183) [`8aa488e`](https://github.com/adobe/spectrum-web-components/commit/8aa488e3867725b1ed93b2b5c31cba686f116688) - `Tabs` — Added 2nd-gen tabs (`swc-tabs`, `swc-tab`, `swc-tab-panel`) with Spectrum 2 styling, selection indicator, and keyboard navigation. See the [component docs](https://spectrum-web-components.adobe.com/?path=/docs/components-tabs--docs) and [migration guide](https://spectrum-web-components.adobe.com/?path=/docs/components-tabs-migration-guide--docs).
100
+
101
+ ### Patch Changes
102
+
103
+ - [#5936](https://github.com/adobe/spectrum-web-components/pull/5936) [`f37dec6`](https://github.com/adobe/spectrum-web-components/commit/f37dec6ae39fd89a4c12e084b4a0f4d9092d79b0) - `Core` — Overhauled text direction management. Replaced active `dir` attribute management with passive CSS `:dir()` pseudo-class and `getComputedStyle(this).direction`; removed `MutationObserver`-based direction tracking and converted physical CSS properties to logical equivalents.
104
+
105
+ ## 0.0.4
106
+
107
+ ### Patch Changes
108
+
109
+ - [#5998](https://github.com/adobe/spectrum-web-components/pull/5998) [`6f5419a`](https://github.com/adobe/spectrum-web-components/commit/6f5419a4de29a1ee440a36c1a57d8c2e1476e2f6) - `Core` — Fixed missing export for `alert-banner` which could cause build failures in certain environments.
110
+
111
+ ## 0.0.3
112
+
113
+ ### Patch Changes
114
+
115
+ - [#5993](https://github.com/adobe/spectrum-web-components/pull/5993) [`95e1c25`](https://github.com/adobe/spectrum-web-components/commit/95e1c25672f62f3723dfa66129ae5ecdeabe578a) - `Core` — Replaced wildcard exports with explicit named exports for better bundler compatibility. Changed build target from ES2022 to ES2018. Added `@spectrum-web-components/core` as direct dependency to `@spectrum-web-components/shared`. Added `@lit-labs/observers` as dependency.
116
+
117
+ ## 0.0.2
118
+
119
+ ### Patch Changes
120
+
121
+ - [#5900](https://github.com/adobe/spectrum-web-components/pull/5900) [`283f0fe`](https://github.com/adobe/spectrum-web-components/commit/283f0fe07533c464e9fe1a3e7edebecb9128e11f) - `Core` — Added missing dependencies to package.json files of several components.
122
+
123
+ - [#5893](https://github.com/adobe/spectrum-web-components/pull/5893) [`1d76b70`](https://github.com/adobe/spectrum-web-components/commit/1d76b7093d8ff5f9b26f07a69086488341a02650) - `Overlay` — Fixed hover overlays to close with the Esc key when trigger is not focused.
124
+
125
+ - [#5866](https://github.com/adobe/spectrum-web-components/pull/5866) [`9cb816b`](https://github.com/adobe/spectrum-web-components/commit/9cb816b5ac80387fdc9bb87381f5149fecb1b595) - `Core` — Added `typesVersions` to improve TypeScript module resolution for users with `moduleResolution: "node"`.
@@ -51,11 +51,9 @@ export declare abstract class AccordionBase extends AccordionBase_base {
51
51
  */
52
52
  disabled: boolean;
53
53
  private assignedItems;
54
- private closeSiblingsOnOpen;
54
+ private readonly selectionController;
55
+ protected firstUpdated(changedProperties: PropertyValues): void;
55
56
  protected syncAccordionItems(): void;
56
- private enforceExclusiveOpen;
57
- connectedCallback(): void;
58
- disconnectedCallback(): void;
59
57
  protected update(changedProperties: PropertyValues): void;
60
58
  }
61
59
  export {};
@@ -2,70 +2,62 @@ import { ACCORDION_VALID_SIZES as e, SWC_ACCORDION_ITEM_TOGGLE_EVENT as t } from
2
2
  import { __decorate as n } from "../../_virtual/_@oxc-project_runtime@0.124.0/helpers/decorate.js";
3
3
  import { AccordionItemBase as r } from "./AccordionItem.base.js";
4
4
  import { property as i } from "lit/decorators.js";
5
- import { SpectrumElement as a } from "@adobe/spectrum-wc-core/element/index.js";
6
- import { SizedMixin as o } from "@adobe/spectrum-wc-core/mixins/index.js";
5
+ import { LiveSelectionController as a } from "@adobe/spectrum-wc-core/controllers/index.js";
6
+ import { SpectrumElement as o } from "@adobe/spectrum-wc-core/element/index.js";
7
+ import { SizedMixin as s } from "@adobe/spectrum-wc-core/mixins/index.js";
7
8
  //#region components/accordion/Accordion.base.ts
8
- var s = class extends o(a, {
9
+ var c = class extends s(o, {
9
10
  validSizes: e,
10
11
  defaultSize: "m"
11
12
  }) {
12
13
  constructor(...e) {
13
- super(...e), this.allowMultiple = !1, this.level = 3, this.density = "regular", this.quiet = !1, this.disabled = !1, this.closeSiblingsOnOpen = (e) => {
14
- if (this.disabled) {
15
- e.preventDefault();
16
- return;
17
- }
18
- if (this.allowMultiple) return;
19
- let t = e.target;
20
- t instanceof r && queueMicrotask(() => {
21
- if (t.open) for (let e of this.assignedItems()) e !== t && (e.open = !1);
22
- });
23
- };
14
+ super(...e), this.allowMultiple = !1, this.level = 3, this.density = "regular", this.quiet = !1, this.disabled = !1, this.selectionController = new a(this, {
15
+ getItems: () => this.assignedItems(),
16
+ readSelected: (e) => e.open,
17
+ deselect: (e) => {
18
+ e.open = !1;
19
+ },
20
+ observeEvent: t,
21
+ mode: () => this.allowMultiple ? "multiple" : "single"
22
+ });
24
23
  }
25
24
  assignedItems() {
26
25
  var e;
27
26
  let t = (e = this.renderRoot) == null ? void 0 : e.querySelector("slot");
28
27
  return t ? t.assignedElements({ flatten: !0 }).filter((e) => e instanceof r) : [];
29
28
  }
29
+ firstUpdated(e) {
30
+ super.firstUpdated(e), this.selectionController.refresh();
31
+ }
30
32
  syncAccordionItems() {
31
33
  for (let e of this.assignedItems()) e.setManagedHeading(this.level), e.size = this.size, e.setManagedParentDisabled(this.disabled);
32
34
  }
33
- enforceExclusiveOpen() {
34
- let e = !1;
35
- for (let t of this.assignedItems()) t.open && (e ? t.open = !1 : e = !0);
36
- }
37
- connectedCallback() {
38
- super.connectedCallback(), this.addEventListener(t, this.closeSiblingsOnOpen);
39
- }
40
- disconnectedCallback() {
41
- super.disconnectedCallback(), this.removeEventListener(t, this.closeSiblingsOnOpen);
42
- }
43
35
  update(e) {
44
36
  if (e.has("level")) {
45
37
  let e = Math.min(6, Math.max(2, this.level));
46
38
  this.level !== e && (this.level = e);
47
39
  }
48
- (e.has("level") || e.has("size") || e.has("disabled")) && this.syncAccordionItems(), e.has("disabled") && e.get("disabled") === !0 && !this.allowMultiple && this.enforceExclusiveOpen(), super.update(e);
40
+ (e.has("level") || e.has("size") || e.has("disabled")) && this.syncAccordionItems(), e.has("allowMultiple") && e.get("allowMultiple") === !0 && !this.allowMultiple && this.selectionController.refresh(), e.has("disabled") && e.get("disabled") === !0 && !this.disabled && !this.allowMultiple && this.selectionController.refresh(), super.update(e);
49
41
  }
50
42
  };
51
43
  n([i({
52
44
  type: Boolean,
53
45
  reflect: !0,
54
46
  attribute: "allow-multiple"
55
- })], s.prototype, "allowMultiple", void 0), n([i({
47
+ })], c.prototype, "allowMultiple", void 0), n([i({
56
48
  type: Number,
57
49
  reflect: !0
58
- })], s.prototype, "level", void 0), n([i({
50
+ })], c.prototype, "level", void 0), n([i({
59
51
  type: String,
60
52
  reflect: !0
61
- })], s.prototype, "density", void 0), n([i({
53
+ })], c.prototype, "density", void 0), n([i({
62
54
  type: Boolean,
63
55
  reflect: !0
64
- })], s.prototype, "quiet", void 0), n([i({
56
+ })], c.prototype, "quiet", void 0), n([i({
65
57
  type: Boolean,
66
58
  reflect: !0
67
- })], s.prototype, "disabled", void 0);
59
+ })], c.prototype, "disabled", void 0);
68
60
  //#endregion
69
- export { s as AccordionBase };
61
+ export { c as AccordionBase };
70
62
 
71
63
  //# sourceMappingURL=Accordion.base.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.base.js","names":[],"sources":["../../../components/accordion/Accordion.base.ts"],"sourcesContent":["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nimport { SpectrumElement } from '@adobe/spectrum-wc-core/element/index.js';\nimport { SizedMixin } from '@adobe/spectrum-wc-core/mixins/index.js';\n\nimport {\n ACCORDION_VALID_SIZES,\n type AccordionDensity,\n type AccordionHeadingLevel,\n type AccordionSize,\n SWC_ACCORDION_ITEM_TOGGLE_EVENT,\n} from './Accordion.types.js';\nimport { AccordionItemBase } from './AccordionItem.base.js';\n\n/**\n * Base class for accordion components. Manages item propagation, heading\n * level, density, and the exclusive-open constraint.\n *\n * @attribute {boolean} allowMultiple - Reflected as `allow-multiple`. When set,\n * multiple items may be open at the same time.\n * @attribute {number} level - Heading level (2–6) applied to every item header.\n * Values outside that range are clamped.\n * @attribute {AccordionSize} size - Size applied to all items.\n * @attribute {AccordionDensity} density - Vertical spacing between items.\n * @attribute {boolean} quiet - Renders the accordion in its quiet visual variant.\n * @attribute {boolean} disabled - Disables all items in the accordion.\n *\n * @slot - One or more `swc-accordion-item` elements.\n */\nexport abstract class AccordionBase extends SizedMixin(SpectrumElement, {\n validSizes: ACCORDION_VALID_SIZES,\n defaultSize: 'm',\n}) {\n // ──────────────────\n // PUBLIC API\n // ──────────────────\n\n /**\n * When set, multiple items may be open at the same time. By default only\n * one item can be open.\n */\n @property({ type: Boolean, reflect: true, attribute: 'allow-multiple' })\n public allowMultiple: boolean = false;\n\n /**\n * Heading level applied to every item header (2–6). Defaults to 3.\n * Values outside that range are clamped.\n */\n @property({ type: Number, reflect: true })\n public level: AccordionHeadingLevel = 3;\n\n /**\n * Size applied to all items. Defaults to `m`.\n */\n declare public size: AccordionSize;\n\n /**\n * Controls vertical spacing between items.\n *\n * @default regular\n */\n @property({ type: String, reflect: true })\n public density: AccordionDensity = 'regular';\n\n /**\n * Renders the accordion in its quiet (no-border) visual variant.\n */\n @property({ type: Boolean, reflect: true })\n public quiet: boolean = false;\n\n /**\n * Disables all items in the accordion. Individual items may also be\n * disabled independently.\n */\n @property({ type: Boolean, reflect: true })\n public disabled: boolean = false;\n\n // ──────────────────────\n // IMPLEMENTATION\n // ──────────────────────\n\n private assignedItems(): AccordionItemBase[] {\n const slot = this.renderRoot?.querySelector('slot');\n if (!slot) {\n return [];\n }\n return slot\n .assignedElements({ flatten: true })\n .filter((el): el is AccordionItemBase => el instanceof AccordionItemBase);\n }\n\n private closeSiblingsOnOpen = (event: Event): void => {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n if (this.allowMultiple) {\n return;\n }\n const toggling = event.target;\n if (!(toggling instanceof AccordionItemBase)) {\n return;\n }\n // Defer until after dispatch returns so that a canceled toggle (where the\n // item reverts open back to false) does not incorrectly close siblings.\n queueMicrotask(() => {\n if (!toggling.open) {\n return;\n }\n for (const item of this.assignedItems()) {\n if (item !== toggling) {\n item.open = false;\n }\n }\n });\n };\n\n protected syncAccordionItems(): void {\n for (const item of this.assignedItems()) {\n item.setManagedHeading(this.level);\n item.size = this.size;\n item.setManagedParentDisabled(this.disabled);\n }\n }\n\n private enforceExclusiveOpen(): void {\n let foundOpen = false;\n for (const item of this.assignedItems()) {\n if (item.open) {\n if (foundOpen) {\n item.open = false;\n } else {\n foundOpen = true;\n }\n }\n }\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener(\n SWC_ACCORDION_ITEM_TOGGLE_EVENT,\n this.closeSiblingsOnOpen\n );\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener(\n SWC_ACCORDION_ITEM_TOGGLE_EVENT,\n this.closeSiblingsOnOpen\n );\n }\n\n protected override update(changedProperties: PropertyValues): void {\n if (changedProperties.has('level')) {\n const clamped = Math.min(\n 6,\n Math.max(2, this.level)\n ) as AccordionHeadingLevel;\n if (this.level !== clamped) {\n this.level = clamped;\n }\n }\n if (\n changedProperties.has('level') ||\n changedProperties.has('size') ||\n changedProperties.has('disabled')\n ) {\n this.syncAccordionItems();\n }\n // changedProperties.get() returns the previous value; this fires only when\n // disabled transitions from true → false (re-enable).\n if (\n changedProperties.has('disabled') &&\n changedProperties.get('disabled') === true &&\n !this.allowMultiple\n ) {\n this.enforceExclusiveOpen();\n }\n super.update(changedProperties);\n }\n}\n"],"mappings":";;;;;;;AA0CA,IAAsB,IAAtB,cAA4C,EAAW,GAAiB;CACtE,YAAY;CACZ,aAAa;CACd,CAAC,CAAC;;oCAU+B,iBAOM,kBAaH,wBAMX,oBAOG,gCAgBI,MAAuB;AACpD,OAAI,KAAK,UAAU;AACjB,MAAM,gBAAgB;AACtB;;AAEF,OAAI,KAAK,cACP;GAEF,IAAM,IAAW,EAAM;AACjB,gBAAoB,KAK1B,qBAAqB;AACd,UAAS,KAGd,MAAK,IAAM,KAAQ,KAAK,eAAe,CACrC,CAAI,MAAS,MACX,EAAK,OAAO;KAGhB;;;CAjCJ,gBAA6C;;EAC3C,IAAM,KAAA,IAAO,KAAK,eAAA,OAAA,KAAA,IAAA,EAAY,cAAc,OAAO;AAInD,SAHK,IAGE,EACJ,iBAAiB,EAAE,SAAS,IAAM,CAAC,CACnC,QAAQ,MAAgC,aAAc,EAAkB,GAJlE,EAAE;;CAiCb,qBAAqC;AACnC,OAAK,IAAM,KAAQ,KAAK,eAAe,CAGrC,CAFA,EAAK,kBAAkB,KAAK,MAAM,EAClC,EAAK,OAAO,KAAK,MACjB,EAAK,yBAAyB,KAAK,SAAS;;CAIhD,uBAAqC;EACnC,IAAI,IAAY;AAChB,OAAK,IAAM,KAAQ,KAAK,eAAe,CACrC,CAAI,EAAK,SACH,IACF,EAAK,OAAO,KAEZ,IAAY;;CAMpB,oBAA0C;AAExC,EADA,MAAM,mBAAmB,EACzB,KAAK,iBACH,GACA,KAAK,oBACN;;CAGH,uBAA6C;AAE3C,EADA,MAAM,sBAAsB,EAC5B,KAAK,oBACH,GACA,KAAK,oBACN;;CAGH,OAA0B,GAAyC;AACjE,MAAI,EAAkB,IAAI,QAAQ,EAAE;GAClC,IAAM,IAAU,KAAK,IACnB,GACA,KAAK,IAAI,GAAG,KAAK,MAAM,CACxB;AACD,GAAI,KAAK,UAAU,MACjB,KAAK,QAAQ;;AAmBjB,GAfE,EAAkB,IAAI,QAAQ,IAC9B,EAAkB,IAAI,OAAO,IAC7B,EAAkB,IAAI,WAAW,KAEjC,KAAK,oBAAoB,EAKzB,EAAkB,IAAI,WAAW,IACjC,EAAkB,IAAI,WAAW,KAAK,MACtC,CAAC,KAAK,iBAEN,KAAK,sBAAsB,EAE7B,MAAM,OAAO,EAAkB;;;GA3IhC,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,WAAW;CAAkB,CAAC,CAAA,EAAA,EAAA,WAAA,iBAAA,KAAA,EAAA,KAOvE,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,SAAA,KAAA,EAAA,KAazC,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,WAAA,KAAA,EAAA,KAMzC,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,SAAA,KAAA,EAAA,KAO1C,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,YAAA,KAAA,EAAA"}
1
+ {"version":3,"file":"Accordion.base.js","names":[],"sources":["../../../components/accordion/Accordion.base.ts"],"sourcesContent":["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nimport { LiveSelectionController } from '@adobe/spectrum-wc-core/controllers/index.js';\nimport { SpectrumElement } from '@adobe/spectrum-wc-core/element/index.js';\nimport { SizedMixin } from '@adobe/spectrum-wc-core/mixins/index.js';\n\nimport {\n ACCORDION_VALID_SIZES,\n type AccordionDensity,\n type AccordionHeadingLevel,\n type AccordionSize,\n SWC_ACCORDION_ITEM_TOGGLE_EVENT,\n} from './Accordion.types.js';\nimport { AccordionItemBase } from './AccordionItem.base.js';\n\n/**\n * Base class for accordion components. Manages item propagation, heading\n * level, density, and the exclusive-open constraint.\n *\n * @attribute {boolean} allowMultiple - Reflected as `allow-multiple`. When set,\n * multiple items may be open at the same time.\n * @attribute {number} level - Heading level (2–6) applied to every item header.\n * Values outside that range are clamped.\n * @attribute {AccordionSize} size - Size applied to all items.\n * @attribute {AccordionDensity} density - Vertical spacing between items.\n * @attribute {boolean} quiet - Renders the accordion in its quiet visual variant.\n * @attribute {boolean} disabled - Disables all items in the accordion.\n *\n * @slot - One or more `swc-accordion-item` elements.\n */\nexport abstract class AccordionBase extends SizedMixin(SpectrumElement, {\n validSizes: ACCORDION_VALID_SIZES,\n defaultSize: 'm',\n}) {\n // ──────────────────\n // PUBLIC API\n // ──────────────────\n\n /**\n * When set, multiple items may be open at the same time. By default only\n * one item can be open.\n */\n @property({ type: Boolean, reflect: true, attribute: 'allow-multiple' })\n public allowMultiple: boolean = false;\n\n /**\n * Heading level applied to every item header (2–6). Defaults to 3.\n * Values outside that range are clamped.\n */\n @property({ type: Number, reflect: true })\n public level: AccordionHeadingLevel = 3;\n\n /**\n * Size applied to all items. Defaults to `m`.\n */\n declare public size: AccordionSize;\n\n /**\n * Controls vertical spacing between items.\n *\n * @default regular\n */\n @property({ type: String, reflect: true })\n public density: AccordionDensity = 'regular';\n\n /**\n * Renders the accordion in its quiet (no-border) visual variant.\n */\n @property({ type: Boolean, reflect: true })\n public quiet: boolean = false;\n\n /**\n * Disables all items in the accordion. Individual items may also be\n * disabled independently.\n */\n @property({ type: Boolean, reflect: true })\n public disabled: boolean = false;\n\n // ──────────────────────\n // IMPLEMENTATION\n // ──────────────────────\n\n private assignedItems(): AccordionItemBase[] {\n const slot = this.renderRoot?.querySelector('slot');\n if (!slot) {\n return [];\n }\n return slot\n .assignedElements({ flatten: true })\n .filter((el): el is AccordionItemBase => el instanceof AccordionItemBase);\n }\n\n // LiveSelectionController observes swc-accordion-item-toggle events and\n // enforces the exclusive-open constraint when allowMultiple is false. Items\n // own their own open state; the controller only closes siblings.\n private readonly selectionController = new LiveSelectionController(this, {\n getItems: () => this.assignedItems(),\n readSelected: (item) => item.open,\n deselect: (item) => {\n item.open = false;\n },\n observeEvent: SWC_ACCORDION_ITEM_TOGGLE_EVENT,\n mode: () => (this.allowMultiple ? 'multiple' : 'single'),\n });\n\n protected override firstUpdated(changedProperties: PropertyValues): void {\n super.firstUpdated(changedProperties);\n // The controller is event-driven and won't catch items that start open via\n // HTML attributes; read the initial DOM state and enforce the constraint now.\n this.selectionController.refresh();\n }\n\n protected syncAccordionItems(): void {\n for (const item of this.assignedItems()) {\n item.setManagedHeading(this.level);\n item.size = this.size;\n item.setManagedParentDisabled(this.disabled);\n }\n }\n\n protected override update(changedProperties: PropertyValues): void {\n if (changedProperties.has('level')) {\n const clamped = Math.min(\n 6,\n Math.max(2, this.level)\n ) as AccordionHeadingLevel;\n if (this.level !== clamped) {\n this.level = clamped;\n }\n }\n if (\n changedProperties.has('level') ||\n changedProperties.has('size') ||\n changedProperties.has('disabled')\n ) {\n this.syncAccordionItems();\n }\n // When allow-multiple is removed, enforce the stricter single-select\n // constraint over the current DOM state.\n if (\n changedProperties.has('allowMultiple') &&\n changedProperties.get('allowMultiple') === true &&\n !this.allowMultiple\n ) {\n this.selectionController.refresh();\n }\n // When the accordion is re-enabled after being disabled, enforce\n // exclusive-open so items that were opened while disabled are corrected.\n if (\n changedProperties.has('disabled') &&\n changedProperties.get('disabled') === true &&\n !this.disabled &&\n !this.allowMultiple\n ) {\n this.selectionController.refresh();\n }\n super.update(changedProperties);\n }\n}\n"],"mappings":";;;;;;;;AA2CA,IAAsB,IAAtB,cAA4C,EAAW,GAAiB;CACtE,YAAY;CACZ,aAAa;CACd,CAAC,CAAC;;oCAU+B,iBAOM,kBAaH,wBAMX,oBAOG,+BAmBY,IAAI,EAAwB,MAAM;GACvE,gBAAgB,KAAK,eAAe;GACpC,eAAe,MAAS,EAAK;GAC7B,WAAW,MAAS;AAClB,MAAK,OAAO;;GAEd,cAAc;GACd,YAAa,KAAK,gBAAgB,aAAa;GAChD,CAAC;;CArBF,gBAA6C;;EAC3C,IAAM,KAAA,IAAO,KAAK,eAAA,OAAA,KAAA,IAAA,EAAY,cAAc,OAAO;AAInD,SAHK,IAGE,EACJ,iBAAiB,EAAE,SAAS,IAAM,CAAC,CACnC,QAAQ,MAAgC,aAAc,EAAkB,GAJlE,EAAE;;CAoBb,aAAgC,GAAyC;AAIvE,EAHA,MAAM,aAAa,EAAkB,EAGrC,KAAK,oBAAoB,SAAS;;CAGpC,qBAAqC;AACnC,OAAK,IAAM,KAAQ,KAAK,eAAe,CAGrC,CAFA,EAAK,kBAAkB,KAAK,MAAM,EAClC,EAAK,OAAO,KAAK,MACjB,EAAK,yBAAyB,KAAK,SAAS;;CAIhD,OAA0B,GAAyC;AACjE,MAAI,EAAkB,IAAI,QAAQ,EAAE;GAClC,IAAM,IAAU,KAAK,IACnB,GACA,KAAK,IAAI,GAAG,KAAK,MAAM,CACxB;AACD,GAAI,KAAK,UAAU,MACjB,KAAK,QAAQ;;AA6BjB,GAzBE,EAAkB,IAAI,QAAQ,IAC9B,EAAkB,IAAI,OAAO,IAC7B,EAAkB,IAAI,WAAW,KAEjC,KAAK,oBAAoB,EAKzB,EAAkB,IAAI,gBAAgB,IACtC,EAAkB,IAAI,gBAAgB,KAAK,MAC3C,CAAC,KAAK,iBAEN,KAAK,oBAAoB,SAAS,EAKlC,EAAkB,IAAI,WAAW,IACjC,EAAkB,IAAI,WAAW,KAAK,MACtC,CAAC,KAAK,YACN,CAAC,KAAK,iBAEN,KAAK,oBAAoB,SAAS,EAEpC,MAAM,OAAO,EAAkB;;;GAlHhC,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,WAAW;CAAkB,CAAC,CAAA,EAAA,EAAA,WAAA,iBAAA,KAAA,EAAA,KAOvE,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,SAAA,KAAA,EAAA,KAazC,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,WAAA,KAAA,EAAA,KAMzC,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,SAAA,KAAA,EAAA,KAO1C,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,YAAA,KAAA,EAAA"}
@@ -1,5 +1,6 @@
1
1
  import { PropertyValues } from 'lit';
2
2
  import { SpectrumElement } from '../../element/index.js';
3
+ import { ButtonSize } from './Button.types.js';
3
4
  declare const ButtonBase_base: typeof SpectrumElement & {
4
5
  new (...args: any[]): import('../../mixins/index.js').SlotPresenceObservingInterface;
5
6
  prototype: import('../../mixins/index.js').SlotPresenceObservingInterface;
@@ -20,9 +21,6 @@ declare const ButtonBase_base: typeof SpectrumElement & {
20
21
  * PickerButton, and InfieldButton can extend this base without inheriting
21
22
  * the `swc-button` visual surface.
22
23
  *
23
- * @slot - Visible button label.
24
- * @slot icon - Optional leading icon.
25
- *
26
24
  * @attribute {ElementSize} size - The size of the button.
27
25
  *
28
26
  * @todo We currently have 3 levels of mixins on this class, but the mixin
@@ -30,53 +28,24 @@ declare const ButtonBase_base: typeof SpectrumElement & {
30
28
  */
31
29
  export declare abstract class ButtonBase extends ButtonBase_base {
32
30
  static shadowRootOptions: ShadowRootInit;
31
+ /**
32
+ * The size of the button.
33
+ *
34
+ * @default m
35
+ */
36
+ size: ButtonSize;
33
37
  /**
34
38
  * Whether the button is disabled. Removes focusability and prevents
35
39
  * interaction.
36
40
  */
37
41
  disabled: boolean;
38
- /**
39
- * Whether the button is in a pending (busy) state. The button remains
40
- * focusable but activation is suppressed.
41
- */
42
- pending: boolean;
43
42
  /**
44
43
  * Accessible label forwarded to the internal `<button>` element as
45
44
  * `aria-label`. Required for icon-only buttons, which have no visible text.
46
45
  */
47
46
  accessibleLabel?: string;
48
- /**
49
- * Custom accessible label used during the pending state. When omitted,
50
- * the pending label is derived from the resolved non-busy accessible name
51
- * plus a busy suffix (e.g. "Save, busy").
52
- */
53
- pendingLabel?: string;
54
- /**
55
- * Tracks whether the pending visual (disabled colors + spinner) is currently
56
- * active. Set to `true` after a 1-second delay once `pending` becomes true,
57
- * so the button does not immediately flash to its unavailable appearance.
58
- * Protected so subclasses can reference it in their `classMap` binding.
59
- */
60
- protected pendingActive: boolean;
61
- private _pendingTimer;
62
47
  protected get hasIcon(): boolean;
63
48
  protected get hasLabel(): boolean;
64
- /**
65
- * Resolves the accessible name for the button from `accessibleLabel` or
66
- * visible text content. Returns `null` when no accessible name is
67
- * determinable.
68
- *
69
- * @internal
70
- */
71
- protected getResolvedAccessibleName(): string | null;
72
- /**
73
- * Derives the pending-state accessible label. Prefers an explicit
74
- * `pendingLabel`, then falls back to the resolved non-busy accessible
75
- * name plus a ", busy" suffix, then a fixed "Busy" fallback.
76
- *
77
- * @internal
78
- */
79
- protected getPendingAccessibleName(): string;
80
49
  /**
81
50
  * Returns the set of attributes that should be forwarded to the internal
82
51
  * semantic `<button>` element, if not otherwise directly managed.
@@ -87,7 +56,7 @@ export declare abstract class ButtonBase extends ButtonBase_base {
87
56
  connectedCallback(): void;
88
57
  disconnectedCallback(): void;
89
58
  /**
90
- * Suppresses click activation while the button is `disabled` or `pending`.
59
+ * Suppresses click activation while the button is `disabled`.
91
60
  *
92
61
  * Slotted icon content lives in the light DOM, so pointer clicks on icons
93
62
  * bypass the disabled inner `<button>` and bubble on the host. The host
@@ -1,13 +1,13 @@
1
1
  import { __decorate as e } from "../../_virtual/_@oxc-project_runtime@0.124.0/helpers/decorate.js";
2
2
  import { BUTTON_VALID_SIZES as t } from "./Button.types.js";
3
- import { property as n, state as r } from "lit/decorators.js";
4
- import { SpectrumElement as i } from "@adobe/spectrum-wc-core/element/index.js";
5
- import { ObserveSlotPresence as a, ObserveSlotText as o, SizedMixin as s } from "@adobe/spectrum-wc-core/mixins/index.js";
3
+ import { property as n } from "lit/decorators.js";
4
+ import { SpectrumElement as r } from "@adobe/spectrum-wc-core/element/index.js";
5
+ import { ObserveSlotPresence as i, ObserveSlotText as a, SizedMixin as o } from "@adobe/spectrum-wc-core/mixins/index.js";
6
6
  //#region components/button/Button.base.ts
7
- var c, l = class extends s(o(a(i, "[slot=\"icon\"]"), ""), { validSizes: t }) {
7
+ var s, c = class extends o(a(i(r, "[slot=\"icon\"]"), ""), { validSizes: t }) {
8
8
  constructor(...e) {
9
- super(...e), this.disabled = !1, this.pending = !1, this.pendingActive = !1, this._pendingTimer = null, this.handleClick = (e) => {
10
- (this.disabled || this.pending) && (e.preventDefault(), e.stopImmediatePropagation());
9
+ super(...e), this.disabled = !1, this.handleClick = (e) => {
10
+ this.disabled && (e.preventDefault(), e.stopImmediatePropagation());
11
11
  };
12
12
  }
13
13
  get hasIcon() {
@@ -16,60 +16,31 @@ var c, l = class extends s(o(a(i, "[slot=\"icon\"]"), ""), { validSizes: t }) {
16
16
  get hasLabel() {
17
17
  return this.slotHasContent;
18
18
  }
19
- getResolvedAccessibleName() {
20
- var e, t;
21
- return (e = this.accessibleLabel) == null ? ((t = this.textContent) == null ? void 0 : t.trim()) || null : e;
22
- }
23
- getPendingAccessibleName() {
24
- if (this.pendingLabel) return this.pendingLabel;
25
- let e = this.getResolvedAccessibleName();
26
- return e ? `${e}, busy` : "Busy";
27
- }
28
19
  getForwardedButtonAttributes() {
29
- return {
30
- disabled: this.disabled,
31
- "aria-disabled": this.pending && !this.disabled ? "true" : void 0
32
- };
20
+ return { disabled: this.disabled };
33
21
  }
34
22
  connectedCallback() {
35
23
  super.connectedCallback(), this.addEventListener("click", this.handleClick, !0);
36
24
  }
37
25
  disconnectedCallback() {
38
- this.removeEventListener("click", this.handleClick, !0), this._pendingTimer !== null && (clearTimeout(this._pendingTimer), this._pendingTimer = null), this.pendingActive = !1, super.disconnectedCallback();
26
+ this.removeEventListener("click", this.handleClick, !0), super.disconnectedCallback();
39
27
  }
40
28
  update(e) {
41
29
  var t;
42
- if (e.has("pending")) if (this.pending) this._pendingTimer = setTimeout(() => {
43
- if (this.pending) {
44
- let e = this.renderRoot.querySelector("button");
45
- e && e.style.setProperty("--_swc-button-pending-inline-size", `${e.offsetWidth}px`), this.pendingActive = !0;
46
- }
47
- this._pendingTimer = null;
48
- }, 1e3);
49
- else {
50
- var n;
51
- this._pendingTimer !== null && (clearTimeout(this._pendingTimer), this._pendingTimer = null), (n = this.renderRoot.querySelector("button")) == null || n.style.removeProperty("--_swc-button-pending-inline-size"), this.pendingActive = !1;
52
- }
53
- super.update(e), (t = window.__swc) != null && t.DEBUG && (this.pending && this.disabled && window.__swc.warn(this, `<${this.localName}> should not set both "pending" and "disabled" simultaneously. Use "pending" to keep the button focusable while unavailable, or "disabled" to fully remove it from the tab order.`, "https://opensource.adobe.com/spectrum-web-components/components/button/#pending", { issues: ["pending + disabled"] }), this.hasIcon && !this.hasLabel && !this.accessibleLabel && window.__swc.warn(this, `<${this.localName}> with an icon and no label must have an "accessible-label" attribute to be accessible.`, "https://opensource.adobe.com/spectrum-web-components/components/button/#icon-only", { issues: ["accessible-label"] }));
30
+ super.update(e), (t = window.__swc) != null && t.DEBUG && this.hasIcon && !this.hasLabel && !this.accessibleLabel && window.__swc.warn(this, `<${this.localName}> with an icon and no label must have an "accessible-label" attribute to be accessible.`, "https://opensource.adobe.com/spectrum-web-components/components/button/#icon-only", { issues: ["accessible-label"] });
54
31
  }
55
32
  };
56
- c = l, c.shadowRootOptions = {
57
- ...i.shadowRootOptions,
33
+ s = c, s.shadowRootOptions = {
34
+ ...r.shadowRootOptions,
58
35
  delegatesFocus: !0
59
36
  }, e([n({
60
37
  type: Boolean,
61
38
  reflect: !0
62
- })], l.prototype, "disabled", void 0), e([n({
63
- type: Boolean,
64
- reflect: !0
65
- })], l.prototype, "pending", void 0), e([n({
39
+ })], c.prototype, "disabled", void 0), e([n({
66
40
  type: String,
67
41
  attribute: "accessible-label"
68
- })], l.prototype, "accessibleLabel", void 0), e([n({
69
- type: String,
70
- attribute: "pending-label"
71
- })], l.prototype, "pendingLabel", void 0), e([r()], l.prototype, "pendingActive", void 0);
42
+ })], c.prototype, "accessibleLabel", void 0);
72
43
  //#endregion
73
- export { l as ButtonBase };
44
+ export { c as ButtonBase };
74
45
 
75
46
  //# sourceMappingURL=Button.base.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.base.js","names":[],"sources":["../../../components/button/Button.base.ts"],"sourcesContent":["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { PropertyValues } from 'lit';\nimport { property, state } from 'lit/decorators.js';\n\nimport { SpectrumElement } from '@adobe/spectrum-wc-core/element/index.js';\nimport {\n ObserveSlotPresence,\n ObserveSlotText,\n SizedMixin,\n} from '@adobe/spectrum-wc-core/mixins/index.js';\n\nimport { BUTTON_VALID_SIZES } from './Button.types.js';\n\n/**\n * Abstract base class for all button-like components. Owns shared semantic\n * concerns: interaction state, sizing, slot-derived icon/label state,\n * accessible-name resolution, and host-to-internal-button attribute forwarding.\n *\n * Visual API specific to `sp-button` (`variant`, `fill-style`, `static-color`)\n * is intentionally absent so that ActionButton, ClearButton, CloseButton,\n * PickerButton, and InfieldButton can extend this base without inheriting\n * the `swc-button` visual surface.\n *\n * @slot - Visible button label.\n * @slot icon - Optional leading icon.\n *\n * @attribute {ElementSize} size - The size of the button.\n *\n * @todo We currently have 3 levels of mixins on this class, but the mixin\n * composition guide recommends a maximum of 2. Explore reducing after milestone 2.\n */\nexport abstract class ButtonBase extends SizedMixin(\n ObserveSlotText(ObserveSlotPresence(SpectrumElement, '[slot=\"icon\"]'), ''),\n { validSizes: BUTTON_VALID_SIZES }\n) {\n static override shadowRootOptions: ShadowRootInit = {\n ...SpectrumElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n // ──────────────────\n // SHARED API\n // ──────────────────\n\n /**\n * Whether the button is disabled. Removes focusability and prevents\n * interaction.\n */\n @property({ type: Boolean, reflect: true })\n public disabled: boolean = false;\n\n /**\n * Whether the button is in a pending (busy) state. The button remains\n * focusable but activation is suppressed.\n */\n @property({ type: Boolean, reflect: true })\n public pending: boolean = false;\n\n /**\n * Accessible label forwarded to the internal `<button>` element as\n * `aria-label`. Required for icon-only buttons, which have no visible text.\n */\n @property({ type: String, attribute: 'accessible-label' })\n public accessibleLabel?: string;\n\n /**\n * Custom accessible label used during the pending state. When omitted,\n * the pending label is derived from the resolved non-busy accessible name\n * plus a busy suffix (e.g. \"Save, busy\").\n */\n @property({ type: String, attribute: 'pending-label' })\n public pendingLabel?: string;\n\n /**\n * Tracks whether the pending visual (disabled colors + spinner) is currently\n * active. Set to `true` after a 1-second delay once `pending` becomes true,\n * so the button does not immediately flash to its unavailable appearance.\n * Protected so subclasses can reference it in their `classMap` binding.\n */\n @state()\n protected pendingActive: boolean = false;\n\n // ──────────────────────\n // IMPLEMENTATION\n // ──────────────────────\n\n private _pendingTimer: ReturnType<typeof setTimeout> | null = null;\n\n protected get hasIcon(): boolean {\n return this.slotContentIsPresent;\n }\n\n protected get hasLabel(): boolean {\n return this.slotHasContent;\n }\n\n /**\n * Resolves the accessible name for the button from `accessibleLabel` or\n * visible text content. Returns `null` when no accessible name is\n * determinable.\n *\n * @internal\n */\n protected getResolvedAccessibleName(): string | null {\n return this.accessibleLabel ?? (this.textContent?.trim() || null);\n }\n\n /**\n * Derives the pending-state accessible label. Prefers an explicit\n * `pendingLabel`, then falls back to the resolved non-busy accessible\n * name plus a \", busy\" suffix, then a fixed \"Busy\" fallback.\n *\n * @internal\n */\n protected getPendingAccessibleName(): string {\n if (this.pendingLabel) {\n return this.pendingLabel;\n }\n const resolvedName = this.getResolvedAccessibleName();\n return resolvedName ? `${resolvedName}, busy` : 'Busy';\n }\n\n /**\n * Returns the set of attributes that should be forwarded to the internal\n * semantic `<button>` element, if not otherwise directly managed.\n *\n * @internal\n */\n protected getForwardedButtonAttributes(): Record<\n string,\n string | boolean | undefined\n > {\n return {\n disabled: this.disabled,\n 'aria-disabled': this.pending && !this.disabled ? 'true' : undefined,\n };\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n // Capture phase so slotted light-DOM clicks are suppressed before host\n // listeners (e.g. Storybook actions) run.\n this.addEventListener('click', this.handleClick, true);\n }\n\n public override disconnectedCallback(): void {\n this.removeEventListener('click', this.handleClick, true);\n if (this._pendingTimer !== null) {\n clearTimeout(this._pendingTimer);\n this._pendingTimer = null;\n }\n this.pendingActive = false;\n super.disconnectedCallback();\n }\n\n /**\n * Suppresses click activation while the button is `disabled` or `pending`.\n *\n * Slotted icon content lives in the light DOM, so pointer clicks on icons\n * bypass the disabled inner `<button>` and bubble on the host. The host\n * listener (capture) and inner `@click` binding both call this handler.\n */\n protected readonly handleClick = (event: Event): void => {\n if (this.disabled || this.pending) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n };\n\n protected override update(changedProperties: PropertyValues): void {\n if (changedProperties.has('pending')) {\n if (this.pending) {\n this._pendingTimer = setTimeout(() => {\n if (this.pending) {\n const internalButton = this.renderRoot.querySelector('button');\n if (internalButton) {\n internalButton.style.setProperty(\n '--_swc-button-pending-inline-size',\n `${internalButton.offsetWidth}px`\n );\n }\n this.pendingActive = true;\n }\n this._pendingTimer = null;\n }, 1000);\n } else {\n if (this._pendingTimer !== null) {\n clearTimeout(this._pendingTimer);\n this._pendingTimer = null;\n }\n this.renderRoot\n .querySelector('button')\n ?.style.removeProperty('--_swc-button-pending-inline-size');\n this.pendingActive = false;\n }\n }\n super.update(changedProperties);\n if (window.__swc?.DEBUG) {\n if (this.pending && this.disabled) {\n window.__swc.warn(\n this,\n `<${this.localName}> should not set both \"pending\" and \"disabled\" simultaneously. Use \"pending\" to keep the button focusable while unavailable, or \"disabled\" to fully remove it from the tab order.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button/#pending',\n { issues: ['pending + disabled'] }\n );\n }\n if (this.hasIcon && !this.hasLabel && !this.accessibleLabel) {\n window.__swc.warn(\n this,\n `<${this.localName}> with an icon and no label must have an \"accessible-label\" attribute to be accessible.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button/#icon-only',\n { issues: ['accessible-label'] }\n );\n }\n }\n }\n}\n"],"mappings":";;;;;;OA0CsB,IAAtB,cAAyC,EACvC,EAAgB,EAAoB,GAAiB,kBAAgB,EAAE,GAAG,EAC1E,EAAE,YAAY,GAAoB,CACnC,CAAC;;+BAe2B,mBAOD,yBAwBS,yBAM2B,0BA4E5B,MAAuB;AACvD,IAAI,KAAK,YAAY,KAAK,aACxB,EAAM,gBAAgB,EACtB,EAAM,0BAA0B;;;CA7EpC,IAAc,UAAmB;AAC/B,SAAO,KAAK;;CAGd,IAAc,WAAoB;AAChC,SAAO,KAAK;;CAUd,4BAAqD;;AACnD,UAAA,IAAO,KAAK,oBAAA,SAAA,IAAoB,KAAK,gBAAA,OAAA,KAAA,IAAA,EAAa,MAAM,KAAI,OAAhD;;CAUd,2BAA6C;AAC3C,MAAI,KAAK,aACP,QAAO,KAAK;EAEd,IAAM,IAAe,KAAK,2BAA2B;AACrD,SAAO,IAAe,GAAG,EAAa,UAAU;;CASlD,+BAGE;AACA,SAAO;GACL,UAAU,KAAK;GACf,iBAAiB,KAAK,WAAW,CAAC,KAAK,WAAW,SAAS,KAAA;GAC5D;;CAGH,oBAA0C;AAIxC,EAHA,MAAM,mBAAmB,EAGzB,KAAK,iBAAiB,SAAS,KAAK,aAAa,GAAK;;CAGxD,uBAA6C;AAO3C,EANA,KAAK,oBAAoB,SAAS,KAAK,aAAa,GAAK,EACrD,KAAK,kBAAkB,SACzB,aAAa,KAAK,cAAc,EAChC,KAAK,gBAAgB,OAEvB,KAAK,gBAAgB,IACrB,MAAM,sBAAsB;;CAiB9B,OAA0B,GAAyC;;AACjE,MAAI,EAAkB,IAAI,UAAU,CAClC,KAAI,KAAK,QACP,MAAK,gBAAgB,iBAAiB;AACpC,OAAI,KAAK,SAAS;IAChB,IAAM,IAAiB,KAAK,WAAW,cAAc,SAAS;AAO9D,IANI,KACF,EAAe,MAAM,YACnB,qCACA,GAAG,EAAe,YAAY,IAC/B,EAEH,KAAK,gBAAgB;;AAEvB,QAAK,gBAAgB;KACpB,IAAK;OACH;;AAQL,GAPI,KAAK,kBAAkB,SACzB,aAAa,KAAK,cAAc,EAChC,KAAK,gBAAgB,QAEvB,IAAA,KAAK,WACF,cAAc,SAAS,KAAA,QAAA,EACtB,MAAM,eAAe,oCAAoC,EAC7D,KAAK,gBAAgB;;AAIzB,EADA,MAAM,OAAO,EAAkB,GAC/B,IAAI,OAAO,UAAA,QAAA,EAAO,UACZ,KAAK,WAAW,KAAK,YACvB,OAAO,MAAM,KACX,MACA,IAAI,KAAK,UAAU,oLACnB,mFACA,EAAE,QAAQ,CAAC,qBAAqB,EAAE,CACnC,EAEC,KAAK,WAAW,CAAC,KAAK,YAAY,CAAC,KAAK,mBAC1C,OAAO,MAAM,KACX,MACA,IAAI,KAAK,UAAU,0FACnB,qFACA,EAAE,QAAQ,CAAC,mBAAmB,EAAE,CACjC;;;6BAjL6C;CAClD,GAAG,EAAgB;CACnB,gBAAgB;CACjB,KAUA,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,YAAA,KAAA,EAAA,KAO1C,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,WAAA,KAAA,EAAA,KAO1C,EAAS;CAAE,MAAM;CAAQ,WAAW;CAAoB,CAAC,CAAA,EAAA,EAAA,WAAA,mBAAA,KAAA,EAAA,KAQzD,EAAS;CAAE,MAAM;CAAQ,WAAW;CAAiB,CAAC,CAAA,EAAA,EAAA,WAAA,gBAAA,KAAA,EAAA,KAStD,GAAO,CAAA,EAAA,EAAA,WAAA,iBAAA,KAAA,EAAA"}
1
+ {"version":3,"file":"Button.base.js","names":[],"sources":["../../../components/button/Button.base.ts"],"sourcesContent":["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nimport { SpectrumElement } from '@adobe/spectrum-wc-core/element/index.js';\nimport {\n ObserveSlotPresence,\n ObserveSlotText,\n SizedMixin,\n} from '@adobe/spectrum-wc-core/mixins/index.js';\n\nimport { BUTTON_VALID_SIZES, type ButtonSize } from './Button.types.js';\n\n/**\n * Abstract base class for all button-like components. Owns shared semantic\n * concerns: interaction state, sizing, slot-derived icon/label state,\n * accessible-name resolution, and host-to-internal-button attribute forwarding.\n *\n * Visual API specific to `sp-button` (`variant`, `fill-style`, `static-color`)\n * is intentionally absent so that ActionButton, ClearButton, CloseButton,\n * PickerButton, and InfieldButton can extend this base without inheriting\n * the `swc-button` visual surface.\n *\n * @attribute {ElementSize} size - The size of the button.\n *\n * @todo We currently have 3 levels of mixins on this class, but the mixin\n * composition guide recommends a maximum of 2. Explore reducing after milestone 2.\n */\nexport abstract class ButtonBase extends SizedMixin(\n ObserveSlotText(ObserveSlotPresence(SpectrumElement, '[slot=\"icon\"]'), ''),\n { validSizes: BUTTON_VALID_SIZES }\n) {\n static override shadowRootOptions: ShadowRootInit = {\n ...SpectrumElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n // ──────────────────\n // SHARED API\n // ──────────────────\n\n /**\n * The size of the button.\n *\n * @default m\n */\n declare public size: ButtonSize;\n\n /**\n * Whether the button is disabled. Removes focusability and prevents\n * interaction.\n */\n @property({ type: Boolean, reflect: true })\n public disabled: boolean = false;\n\n /**\n * Accessible label forwarded to the internal `<button>` element as\n * `aria-label`. Required for icon-only buttons, which have no visible text.\n */\n @property({ type: String, attribute: 'accessible-label' })\n public accessibleLabel?: string;\n\n // ──────────────────────\n // IMPLEMENTATION\n // ──────────────────────\n\n protected get hasIcon(): boolean {\n return this.slotContentIsPresent;\n }\n\n protected get hasLabel(): boolean {\n return this.slotHasContent;\n }\n\n /**\n * Returns the set of attributes that should be forwarded to the internal\n * semantic `<button>` element, if not otherwise directly managed.\n *\n * @internal\n */\n protected getForwardedButtonAttributes(): Record<\n string,\n string | boolean | undefined\n > {\n return {\n disabled: this.disabled,\n };\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n // Capture phase so slotted light-DOM clicks are suppressed before host\n // listeners (e.g. Storybook actions) run.\n this.addEventListener('click', this.handleClick, true);\n }\n\n public override disconnectedCallback(): void {\n this.removeEventListener('click', this.handleClick, true);\n super.disconnectedCallback();\n }\n\n /**\n * Suppresses click activation while the button is `disabled`.\n *\n * Slotted icon content lives in the light DOM, so pointer clicks on icons\n * bypass the disabled inner `<button>` and bubble on the host. The host\n * listener (capture) and inner `@click` binding both call this handler.\n */\n protected readonly handleClick = (event: Event): void => {\n if (this.disabled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n };\n\n protected override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n if (window.__swc?.DEBUG) {\n if (this.hasIcon && !this.hasLabel && !this.accessibleLabel) {\n window.__swc.warn(\n this,\n `<${this.localName}> with an icon and no label must have an \"accessible-label\" attribute to be accessible.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button/#icon-only',\n { issues: ['accessible-label'] }\n );\n }\n }\n }\n}\n"],"mappings":";;;;;;OAuCsB,IAAtB,cAAyC,EACvC,EAAgB,EAAoB,GAAiB,kBAAgB,EAAE,GAAG,EAC1E,EAAE,YAAY,GAAoB,CACnC,CAAC;;+BAsB2B,wBAuDO,MAAuB;AACvD,GAAI,KAAK,aACP,EAAM,gBAAgB,EACtB,EAAM,0BAA0B;;;CA7CpC,IAAc,UAAmB;AAC/B,SAAO,KAAK;;CAGd,IAAc,WAAoB;AAChC,SAAO,KAAK;;CASd,+BAGE;AACA,SAAO,EACL,UAAU,KAAK,UAChB;;CAGH,oBAA0C;AAIxC,EAHA,MAAM,mBAAmB,EAGzB,KAAK,iBAAiB,SAAS,KAAK,aAAa,GAAK;;CAGxD,uBAA6C;AAE3C,EADA,KAAK,oBAAoB,SAAS,KAAK,aAAa,GAAK,EACzD,MAAM,sBAAsB;;CAiB9B,OAA0B,GAAyC;;AAEjE,EADA,MAAM,OAAO,EAAkB,GAC/B,IAAI,OAAO,UAAA,QAAA,EAAO,SACZ,KAAK,WAAW,CAAC,KAAK,YAAY,CAAC,KAAK,mBAC1C,OAAO,MAAM,KACX,MACA,IAAI,KAAK,UAAU,0FACnB,qFACA,EAAE,QAAQ,CAAC,mBAAmB,EAAE,CACjC;;;6BA5F6C;CAClD,GAAG,EAAgB;CACnB,gBAAgB;CACjB,KAiBA,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,YAAA,KAAA,EAAA,KAO1C,EAAS;CAAE,MAAM;CAAQ,WAAW;CAAoB,CAAC,CAAA,EAAA,EAAA,WAAA,mBAAA,KAAA,EAAA"}
@@ -1,5 +1,5 @@
1
1
  import { __decorate as e } from "../../_virtual/_@oxc-project_runtime@0.124.0/helpers/decorate.js";
2
- import { SlotAttributePropagationController as t } from "../../controllers/slot-attribute-propagation/src/slot-attribute-propagation-controller.js";
2
+ import { SlotAttributePropagationController as t } from "../../controllers/slot-attribute-propagation-controller/src/slot-attribute-propagation-controller.js";
3
3
  import { BUTTON_GROUP_ALIGNMENTS as n, BUTTON_GROUP_ORIENTATIONS as r, BUTTON_GROUP_SIZES as i } from "./ButtonGroup.types.js";
4
4
  import { property as a, queryAssignedElements as o } from "lit/decorators.js";
5
5
  import { SpectrumElement as s } from "@adobe/spectrum-wc-core/element/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonGroup.base.js","names":[],"sources":["../../../components/button-group/ButtonGroup.base.ts"],"sourcesContent":["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { PropertyValues } from 'lit';\nimport { property, queryAssignedElements } from 'lit/decorators.js';\n\nimport type { ButtonBase } from '@adobe/spectrum-wc-core/components/button';\nimport { SpectrumElement } from '@adobe/spectrum-wc-core/element/index.js';\nimport { SizedMixin } from '@adobe/spectrum-wc-core/mixins/index.js';\n\nimport { SlotAttributePropagationController } from '../../controllers/slot-attribute-propagation/index.js';\nimport {\n BUTTON_GROUP_ALIGNMENTS,\n BUTTON_GROUP_ORIENTATIONS,\n BUTTON_GROUP_SIZES,\n type ButtonGroupAlignment,\n type ButtonGroupOrientation,\n type ButtonGroupSize,\n} from './ButtonGroup.types.js';\n\n/**\n * A button group clusters related actions together, providing consistent\n * spacing, sizing, and orientation. The host exposes `role=\"group\"` and\n * propagates `size` and `disabled` to slotted button children.\n *\n * This base class owns shared logic and accessibility semantics. Rendering\n * and styling live in the concrete SWC subclass.\n *\n * @slot - One or more `swc-button` elements.\n *\n * @attribute {ElementSize} size - The size of the button group and its children.\n */\nexport abstract class ButtonGroupBase extends SizedMixin(SpectrumElement, {\n validSizes: BUTTON_GROUP_SIZES,\n}) {\n /**\n * The size of the button group. Propagated to all slotted button children.\n *\n * @default m\n */\n declare public size: ButtonGroupSize;\n\n // ──────────────────\n // SHARED API\n // ──────────────────\n\n /**\n * @internal\n *\n * Valid orientation values for validation.\n */\n static readonly ORIENTATIONS: readonly string[] = BUTTON_GROUP_ORIENTATIONS;\n\n /**\n * @internal\n *\n * Valid alignment values for validation.\n */\n static readonly ALIGNMENTS: readonly string[] = BUTTON_GROUP_ALIGNMENTS;\n\n /**\n * The layout direction of the button group.\n *\n * Note: this property does NOT set `aria-orientation` on the host because\n * `aria-orientation` is only meaningful for roles that manage arrow-key\n * navigation (e.g. `toolbar`, `listbox`). Since button-group uses\n * sequential Tab navigation (not roving tabindex), the attribute would\n * be invalid.\n */\n @property({ type: String, reflect: true })\n public orientation: ButtonGroupOrientation = 'horizontal';\n\n /**\n * Whether all buttons in the group are disabled. When `true`, forces\n * every slotted button child to `disabled`. When `false`, children\n * retain their individual disabled state — a button slotted with\n * `disabled` remains disabled even when the group is enabled.\n */\n @property({ type: Boolean, reflect: true })\n public disabled = false;\n\n /**\n * The alignment of buttons within the group along the main axis.\n */\n @property({ type: String, reflect: true })\n public align: ButtonGroupAlignment = 'start';\n\n // ──────────────────────\n // IMPLEMENTATION\n // ──────────────────────\n\n @queryAssignedElements({ flatten: true })\n private buttons!: ButtonBase[];\n\n /**\n * Tracks buttons that were individually disabled before the group\n * forced all children disabled. Used to restore their state when\n * the group becomes enabled again.\n */\n private individuallyDisabled = new WeakSet<ButtonBase>();\n\n private readonly _sizePropagation = new SlotAttributePropagationController(\n this,\n {\n attribute: 'size',\n getValue: () => this.size,\n }\n );\n\n protected override firstUpdated(changed: PropertyValues<this>): void {\n super.firstUpdated(changed);\n this.setAttribute('role', 'group');\n }\n\n protected override update(changedProperties: PropertyValues): void {\n if (window.__swc?.DEBUG) {\n const constructor = this.constructor as typeof ButtonGroupBase;\n if (!constructor.ORIENTATIONS.includes(this.orientation)) {\n window.__swc.warn(\n this,\n `<${this.localName}> element expects the \"orientation\" attribute to be one of the following:`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button-group/',\n { issues: [...constructor.ORIENTATIONS] }\n );\n }\n if (!constructor.ALIGNMENTS.includes(this.align)) {\n window.__swc.warn(\n this,\n `<${this.localName}> element expects the \"align\" attribute to be one of the following:`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button-group/',\n { issues: [...constructor.ALIGNMENTS] }\n );\n }\n }\n super.update(changedProperties);\n }\n\n protected override updated(changed: PropertyValues<this>): void {\n super.updated(changed);\n\n if (changed.has('disabled')) {\n const wasDisabled = changed.get('disabled');\n if (this.disabled || wasDisabled) {\n this.propagateDisabledToChildren();\n }\n }\n }\n\n /**\n * Handles slotchange events from the default slot. Ensures newly slotted\n * children receive the current size and disabled state.\n */\n protected handleSlotchange(): void {\n this._sizePropagation.propagate();\n\n if (this.disabled) {\n this.propagateDisabledToChildren();\n }\n }\n\n /**\n * Propagates disabled state to slotted button children.\n *\n * Uses a one-directional model: when the group is disabled, all children\n * are forced disabled (tracking which were already individually disabled).\n * When the group is enabled, children are restored to their individual\n * disabled state — a button slotted with `disabled` remains disabled.\n *\n * On slotchange when the group is enabled, buttons are not touched so\n * their declarative `disabled` attribute is preserved.\n */\n private propagateDisabledToChildren(): void {\n for (const button of this.buttons) {\n if (this.disabled) {\n if (button.disabled) {\n this.individuallyDisabled.add(button);\n }\n button.disabled = true;\n } else {\n button.disabled = this.individuallyDisabled.has(button);\n }\n }\n\n if (!this.disabled) {\n this.individuallyDisabled = new WeakSet();\n }\n }\n}\n"],"mappings":";;;;;;;OAyCsB,IAAtB,cAA8C,EAAW,GAAiB,EACxE,YAAY,GACb,CAAC,CAAC;;kCAoC4C,8BAS3B,iBAMmB,qDAcN,IAAI,SAAqB,0BAEpB,IAAI,EACtC,MACA;GACE,WAAW;GACX,gBAAgB,KAAK;GACtB,CACF;;CAED,aAAgC,GAAqC;AAEnE,EADA,MAAM,aAAa,EAAQ,EAC3B,KAAK,aAAa,QAAQ,QAAQ;;CAGpC,OAA0B,GAAyC;;AACjE,OAAA,IAAI,OAAO,UAAA,QAAA,EAAO,OAAO;GACvB,IAAM,IAAc,KAAK;AASzB,GARK,EAAY,aAAa,SAAS,KAAK,YAAY,IACtD,OAAO,MAAM,KACX,MACA,IAAI,KAAK,UAAU,4EACnB,iFACA,EAAE,QAAQ,CAAC,GAAG,EAAY,aAAa,EAAE,CAC1C,EAEE,EAAY,WAAW,SAAS,KAAK,MAAM,IAC9C,OAAO,MAAM,KACX,MACA,IAAI,KAAK,UAAU,sEACnB,iFACA,EAAE,QAAQ,CAAC,GAAG,EAAY,WAAW,EAAE,CACxC;;AAGL,QAAM,OAAO,EAAkB;;CAGjC,QAA2B,GAAqC;AAG9D,MAFA,MAAM,QAAQ,EAAQ,EAElB,EAAQ,IAAI,WAAW,EAAE;GAC3B,IAAM,IAAc,EAAQ,IAAI,WAAW;AAC3C,IAAI,KAAK,YAAY,MACnB,KAAK,6BAA6B;;;CASxC,mBAAmC;AAGjC,EAFA,KAAK,iBAAiB,WAAW,EAE7B,KAAK,YACP,KAAK,6BAA6B;;CAetC,8BAA4C;AAC1C,OAAK,IAAM,KAAU,KAAK,QACxB,CAAI,KAAK,YACH,EAAO,YACT,KAAK,qBAAqB,IAAI,EAAO,EAEvC,EAAO,WAAW,MAElB,EAAO,WAAW,KAAK,qBAAqB,IAAI,EAAO;AAI3D,EAAK,KAAK,aACR,KAAK,uCAAuB,IAAI,SAAS;;;wBArIK,kBAOF,MAW/C,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,eAAA,KAAA,EAAA,KASzC,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,YAAA,KAAA,EAAA,KAM1C,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,SAAA,KAAA,EAAA,KAOzC,EAAsB,EAAE,SAAS,IAAM,CAAC,CAAA,EAAA,EAAA,WAAA,WAAA,KAAA,EAAA"}
1
+ {"version":3,"file":"ButtonGroup.base.js","names":[],"sources":["../../../components/button-group/ButtonGroup.base.ts"],"sourcesContent":["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { PropertyValues } from 'lit';\nimport { property, queryAssignedElements } from 'lit/decorators.js';\n\nimport type { ButtonBase } from '@adobe/spectrum-wc-core/components/button';\nimport { SpectrumElement } from '@adobe/spectrum-wc-core/element/index.js';\nimport { SizedMixin } from '@adobe/spectrum-wc-core/mixins/index.js';\n\nimport { SlotAttributePropagationController } from '../../controllers/slot-attribute-propagation-controller/index.js';\nimport {\n BUTTON_GROUP_ALIGNMENTS,\n BUTTON_GROUP_ORIENTATIONS,\n BUTTON_GROUP_SIZES,\n type ButtonGroupAlignment,\n type ButtonGroupOrientation,\n type ButtonGroupSize,\n} from './ButtonGroup.types.js';\n\n/**\n * A button group clusters related actions together, providing consistent\n * spacing, sizing, and orientation. The host exposes `role=\"group\"` and\n * propagates `size` and `disabled` to slotted button children.\n *\n * This base class owns shared logic and accessibility semantics. Rendering\n * and styling live in the concrete SWC subclass.\n *\n * @slot - One or more `swc-button` elements.\n *\n * @attribute {ElementSize} size - The size of the button group and its children.\n */\nexport abstract class ButtonGroupBase extends SizedMixin(SpectrumElement, {\n validSizes: BUTTON_GROUP_SIZES,\n}) {\n /**\n * The size of the button group. Propagated to all slotted button children.\n *\n * @default m\n */\n declare public size: ButtonGroupSize;\n\n // ──────────────────\n // SHARED API\n // ──────────────────\n\n /**\n * @internal\n *\n * Valid orientation values for validation.\n */\n static readonly ORIENTATIONS: readonly string[] = BUTTON_GROUP_ORIENTATIONS;\n\n /**\n * @internal\n *\n * Valid alignment values for validation.\n */\n static readonly ALIGNMENTS: readonly string[] = BUTTON_GROUP_ALIGNMENTS;\n\n /**\n * The layout direction of the button group.\n *\n * Note: this property does NOT set `aria-orientation` on the host because\n * `aria-orientation` is only meaningful for roles that manage arrow-key\n * navigation (e.g. `toolbar`, `listbox`). Since button-group uses\n * sequential Tab navigation (not roving tabindex), the attribute would\n * be invalid.\n */\n @property({ type: String, reflect: true })\n public orientation: ButtonGroupOrientation = 'horizontal';\n\n /**\n * Whether all buttons in the group are disabled. When `true`, forces\n * every slotted button child to `disabled`. When `false`, children\n * retain their individual disabled state — a button slotted with\n * `disabled` remains disabled even when the group is enabled.\n */\n @property({ type: Boolean, reflect: true })\n public disabled = false;\n\n /**\n * The alignment of buttons within the group along the main axis.\n */\n @property({ type: String, reflect: true })\n public align: ButtonGroupAlignment = 'start';\n\n // ──────────────────────\n // IMPLEMENTATION\n // ──────────────────────\n\n @queryAssignedElements({ flatten: true })\n private buttons!: ButtonBase[];\n\n /**\n * Tracks buttons that were individually disabled before the group\n * forced all children disabled. Used to restore their state when\n * the group becomes enabled again.\n */\n private individuallyDisabled = new WeakSet<ButtonBase>();\n\n private readonly _sizePropagation = new SlotAttributePropagationController(\n this,\n {\n attribute: 'size',\n getValue: () => this.size,\n }\n );\n\n protected override firstUpdated(changed: PropertyValues<this>): void {\n super.firstUpdated(changed);\n this.setAttribute('role', 'group');\n }\n\n protected override update(changedProperties: PropertyValues): void {\n if (window.__swc?.DEBUG) {\n const constructor = this.constructor as typeof ButtonGroupBase;\n if (!constructor.ORIENTATIONS.includes(this.orientation)) {\n window.__swc.warn(\n this,\n `<${this.localName}> element expects the \"orientation\" attribute to be one of the following:`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button-group/',\n { issues: [...constructor.ORIENTATIONS] }\n );\n }\n if (!constructor.ALIGNMENTS.includes(this.align)) {\n window.__swc.warn(\n this,\n `<${this.localName}> element expects the \"align\" attribute to be one of the following:`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button-group/',\n { issues: [...constructor.ALIGNMENTS] }\n );\n }\n }\n super.update(changedProperties);\n }\n\n protected override updated(changed: PropertyValues<this>): void {\n super.updated(changed);\n\n if (changed.has('disabled')) {\n const wasDisabled = changed.get('disabled');\n if (this.disabled || wasDisabled) {\n this.propagateDisabledToChildren();\n }\n }\n }\n\n /**\n * Handles slotchange events from the default slot. Ensures newly slotted\n * children receive the current size and disabled state.\n */\n protected handleSlotchange(): void {\n this._sizePropagation.propagate();\n\n if (this.disabled) {\n this.propagateDisabledToChildren();\n }\n }\n\n /**\n * Propagates disabled state to slotted button children.\n *\n * Uses a one-directional model: when the group is disabled, all children\n * are forced disabled (tracking which were already individually disabled).\n * When the group is enabled, children are restored to their individual\n * disabled state — a button slotted with `disabled` remains disabled.\n *\n * On slotchange when the group is enabled, buttons are not touched so\n * their declarative `disabled` attribute is preserved.\n */\n private propagateDisabledToChildren(): void {\n for (const button of this.buttons) {\n if (this.disabled) {\n if (button.disabled) {\n this.individuallyDisabled.add(button);\n }\n button.disabled = true;\n } else {\n button.disabled = this.individuallyDisabled.has(button);\n }\n }\n\n if (!this.disabled) {\n this.individuallyDisabled = new WeakSet();\n }\n }\n}\n"],"mappings":";;;;;;;OAyCsB,IAAtB,cAA8C,EAAW,GAAiB,EACxE,YAAY,GACb,CAAC,CAAC;;kCAoC4C,8BAS3B,iBAMmB,qDAcN,IAAI,SAAqB,0BAEpB,IAAI,EACtC,MACA;GACE,WAAW;GACX,gBAAgB,KAAK;GACtB,CACF;;CAED,aAAgC,GAAqC;AAEnE,EADA,MAAM,aAAa,EAAQ,EAC3B,KAAK,aAAa,QAAQ,QAAQ;;CAGpC,OAA0B,GAAyC;;AACjE,OAAA,IAAI,OAAO,UAAA,QAAA,EAAO,OAAO;GACvB,IAAM,IAAc,KAAK;AASzB,GARK,EAAY,aAAa,SAAS,KAAK,YAAY,IACtD,OAAO,MAAM,KACX,MACA,IAAI,KAAK,UAAU,4EACnB,iFACA,EAAE,QAAQ,CAAC,GAAG,EAAY,aAAa,EAAE,CAC1C,EAEE,EAAY,WAAW,SAAS,KAAK,MAAM,IAC9C,OAAO,MAAM,KACX,MACA,IAAI,KAAK,UAAU,sEACnB,iFACA,EAAE,QAAQ,CAAC,GAAG,EAAY,WAAW,EAAE,CACxC;;AAGL,QAAM,OAAO,EAAkB;;CAGjC,QAA2B,GAAqC;AAG9D,MAFA,MAAM,QAAQ,EAAQ,EAElB,EAAQ,IAAI,WAAW,EAAE;GAC3B,IAAM,IAAc,EAAQ,IAAI,WAAW;AAC3C,IAAI,KAAK,YAAY,MACnB,KAAK,6BAA6B;;;CASxC,mBAAmC;AAGjC,EAFA,KAAK,iBAAiB,WAAW,EAE7B,KAAK,YACP,KAAK,6BAA6B;;CAetC,8BAA4C;AAC1C,OAAK,IAAM,KAAU,KAAK,QACxB,CAAI,KAAK,YACH,EAAO,YACT,KAAK,qBAAqB,IAAI,EAAO,EAEvC,EAAO,WAAW,MAElB,EAAO,WAAW,KAAK,qBAAqB,IAAI,EAAO;AAI3D,EAAK,KAAK,aACR,KAAK,uCAAuB,IAAI,SAAS;;;wBArIK,kBAOF,MAW/C,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,eAAA,KAAA,EAAA,KASzC,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,YAAA,KAAA,EAAA,KAM1C,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,SAAA,KAAA,EAAA,KAOzC,EAAsB,EAAE,SAAS,IAAM,CAAC,CAAA,EAAA,EAAA,WAAA,WAAA,KAAA,EAAA"}
@@ -1,4 +1,9 @@
1
1
  import { SpectrumElement } from '../../element/index.js';
2
+ /**
3
+ * Minimum inner-border opacity (matches the existing `transparent-black-200`
4
+ * token) so the default look on mid/dark colors is unchanged.
5
+ */
6
+ export declare const COLOR_LOUPE_ALPHA_FLOOR = 0.12;
2
7
  /**
3
8
  * A visual magnifier that shows the currently picked color, including
4
9
  * transparency over an opacity checkerboard, inside a loupe shape.
@@ -23,4 +28,14 @@ export declare abstract class ColorLoupeBase extends SpectrumElement {
23
28
  * when the component is rendered without a `color` attribute.
24
29
  */
25
30
  color: string;
31
+ /**
32
+ * The adaptive inner-border opacity for the current `color`, derived by the
33
+ * white-first strategy (shared with `<swc-color-handle>`) so the loupe
34
+ * chrome meets WCAG 1.4.11 (≥3:1) across the color spectrum. The white
35
+ * outer border is unchanged; the rendering layer applies this value to the
36
+ * inner border only.
37
+ *
38
+ * @internal
39
+ */
40
+ protected get borderAlpha(): number;
26
41
  }