@adobe/spectrum-wc-core 2.0.0-beta.2 → 2.0.0-next.20260728161641

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 (58) hide show
  1. package/dist/components/accordion/AccordionItem.base.d.ts +16 -6
  2. package/dist/components/accordion/AccordionItem.base.js +6 -3
  3. package/dist/components/accordion/AccordionItem.base.js.map +1 -1
  4. package/dist/components/badge/Badge.base.d.ts +24 -8
  5. package/dist/components/badge/Badge.base.js +8 -5
  6. package/dist/components/badge/Badge.base.js.map +1 -1
  7. package/dist/components/button/Button.base.d.ts +16 -9
  8. package/dist/components/button/Button.base.js +7 -5
  9. package/dist/components/button/Button.base.js.map +1 -1
  10. package/dist/components/card/Card.base.d.ts +94 -46
  11. package/dist/components/card/Card.base.js +58 -19
  12. package/dist/components/card/Card.base.js.map +1 -1
  13. package/dist/components/card/Card.types.d.ts +1 -0
  14. package/dist/components/card/Card.types.js +2 -2
  15. package/dist/components/card/Card.types.js.map +1 -1
  16. package/dist/components/card/index.js +3 -3
  17. package/dist/controllers/index.d.ts +2 -0
  18. package/dist/controllers/index.js +13 -11
  19. package/dist/controllers/slot-presence-controller/index.d.ts +12 -0
  20. package/dist/controllers/slot-presence-controller/index.js +2 -0
  21. package/dist/controllers/slot-presence-controller/src/slot-presence-controller.d.ts +57 -0
  22. package/dist/controllers/slot-presence-controller/src/slot-presence-controller.js +44 -0
  23. package/dist/controllers/slot-presence-controller/src/slot-presence-controller.js.map +1 -0
  24. package/dist/controllers/slot-text-controller/index.d.ts +12 -0
  25. package/dist/controllers/slot-text-controller/index.js +2 -0
  26. package/dist/controllers/slot-text-controller/src/slot-text-controller.d.ts +92 -0
  27. package/dist/controllers/slot-text-controller/src/slot-text-controller.js +53 -0
  28. package/dist/controllers/slot-text-controller/src/slot-text-controller.js.map +1 -0
  29. package/dist/element/index.d.ts +1 -1
  30. package/dist/element/index.js +2 -2
  31. package/dist/element/spectrum-element.d.ts +2 -17
  32. package/dist/element/spectrum-element.js +9 -26
  33. package/dist/element/spectrum-element.js.map +1 -1
  34. package/dist/element/version.d.ts +2 -2
  35. package/dist/element/version.js +1 -1
  36. package/dist/element/version.js.map +1 -1
  37. package/dist/mixins/index.d.ts +0 -2
  38. package/dist/mixins/index.js +4 -6
  39. package/dist/mixins/linear-progress-mixin.d.ts +1 -2
  40. package/dist/mixins/linear-progress-mixin.js +5 -5
  41. package/dist/mixins/linear-progress-mixin.js.map +1 -1
  42. package/dist/utils/index.d.ts +1 -0
  43. package/dist/utils/index.js +10 -9
  44. package/dist/utils/is-focus-visible-in-tree.d.ts +33 -0
  45. package/dist/utils/is-focus-visible-in-tree.js +11 -0
  46. package/dist/utils/is-focus-visible-in-tree.js.map +1 -0
  47. package/package.json +30 -16
  48. package/CHANGELOG.md +0 -125
  49. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/defineProperty.js +0 -12
  50. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/toPrimitive.js +0 -14
  51. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/toPropertyKey.js +0 -9
  52. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/typeof.js +0 -11
  53. package/dist/mixins/observe-slot-presence.d.ts +0 -12
  54. package/dist/mixins/observe-slot-presence.js +0 -40
  55. package/dist/mixins/observe-slot-presence.js.map +0 -1
  56. package/dist/mixins/observe-slot-text.d.ts +0 -11
  57. package/dist/mixins/observe-slot-text.js +0 -60
  58. package/dist/mixins/observe-slot-text.js.map +0 -1
package/CHANGELOG.md DELETED
@@ -1,125 +0,0 @@
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"`.
@@ -1,12 +0,0 @@
1
- import { toPropertyKey as e } from "./toPropertyKey.js";
2
- //#region \0@oxc-project+runtime@0.124.0/helpers/defineProperty.js
3
- function t(t, n, r) {
4
- return (n = e(n)) in t ? Object.defineProperty(t, n, {
5
- value: r,
6
- enumerable: !0,
7
- configurable: !0,
8
- writable: !0
9
- }) : t[n] = r, t;
10
- }
11
- //#endregion
12
- export { t as _defineProperty };
@@ -1,14 +0,0 @@
1
- import { _typeof as e } from "./typeof.js";
2
- //#region \0@oxc-project+runtime@0.124.0/helpers/toPrimitive.js
3
- function t(t, n) {
4
- if (e(t) != "object" || !t) return t;
5
- var r = t[Symbol.toPrimitive];
6
- if (r !== void 0) {
7
- var i = r.call(t, n || "default");
8
- if (e(i) != "object") return i;
9
- throw TypeError("@@toPrimitive must return a primitive value.");
10
- }
11
- return (n === "string" ? String : Number)(t);
12
- }
13
- //#endregion
14
- export { t as toPrimitive };
@@ -1,9 +0,0 @@
1
- import { _typeof as e } from "./typeof.js";
2
- import { toPrimitive as t } from "./toPrimitive.js";
3
- //#region \0@oxc-project+runtime@0.124.0/helpers/toPropertyKey.js
4
- function n(n) {
5
- var r = t(n, "string");
6
- return e(r) == "symbol" ? r : r + "";
7
- }
8
- //#endregion
9
- export { n as toPropertyKey };
@@ -1,11 +0,0 @@
1
- //#region \0@oxc-project+runtime@0.124.0/helpers/typeof.js
2
- function e(t) {
3
- "@babel/helpers - typeof";
4
- return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
5
- return typeof e;
6
- } : function(e) {
7
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
8
- }, e(t);
9
- }
10
- //#endregion
11
- export { e as _typeof };
@@ -1,12 +0,0 @@
1
- import { ReactiveElement } from 'lit';
2
- type Constructor<T = Record<string, unknown>> = {
3
- new (...args: any[]): T;
4
- prototype: T;
5
- };
6
- export interface SlotPresenceObservingInterface {
7
- slotContentIsPresent: boolean;
8
- getSlotContentPresence(selector: string): boolean;
9
- managePresenceObservedSlot(): void;
10
- }
11
- export declare function ObserveSlotPresence<T extends Constructor<ReactiveElement>>(constructor: T, lightDomSelector: string | string[]): T & Constructor<SlotPresenceObservingInterface>;
12
- export {};
@@ -1,40 +0,0 @@
1
- import { MutationController as e } from "@lit-labs/observers/mutation-controller.js";
2
- //#region mixins/observe-slot-presence.ts
3
- var t = Symbol("slotContentIsPresent");
4
- function n(n, r) {
5
- let i = Array.isArray(r) ? r : [r];
6
- class a extends n {
7
- constructor(...n) {
8
- super(...n), this[t] = /* @__PURE__ */ new Map(), this.managePresenceObservedSlot = () => {
9
- let e = !1;
10
- i.forEach((n) => {
11
- let r = !!this.querySelector(`:scope > ${n}`), i = this[t].get(n) || !1;
12
- e = e || i !== r, this[t].set(n, !!this.querySelector(`:scope > ${n}`));
13
- }), e && this.updateComplete.then(() => {
14
- this.requestUpdate();
15
- });
16
- }, new e(this, {
17
- config: {
18
- childList: !0,
19
- subtree: !0
20
- },
21
- callback: () => {
22
- this.managePresenceObservedSlot();
23
- }
24
- }), this.managePresenceObservedSlot();
25
- }
26
- get slotContentIsPresent() {
27
- if (i.length === 1) return this[t].get(i[0]) || !1;
28
- throw Error("Multiple selectors provided to `ObserveSlotPresence` use `getSlotContentPresence(selector: string)` instead.");
29
- }
30
- getSlotContentPresence(e) {
31
- if (this[t].has(e)) return this[t].get(e) || !1;
32
- throw Error(`The provided selector \`${e}\` is not being observed.`);
33
- }
34
- }
35
- return a;
36
- }
37
- //#endregion
38
- export { n as ObserveSlotPresence };
39
-
40
- //# sourceMappingURL=observe-slot-presence.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"observe-slot-presence.js","names":[],"sources":["../../mixins/observe-slot-presence.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 */\nimport { ReactiveElement } from 'lit';\nimport { MutationController } from '@lit-labs/observers/mutation-controller.js';\n\nconst slotContentIsPresent = Symbol('slotContentIsPresent');\n\ntype Constructor<T = Record<string, unknown>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n prototype: T;\n};\n\nexport interface SlotPresenceObservingInterface {\n slotContentIsPresent: boolean;\n getSlotContentPresence(selector: string): boolean;\n managePresenceObservedSlot(): void;\n}\n\nexport function ObserveSlotPresence<T extends Constructor<ReactiveElement>>(\n constructor: T,\n lightDomSelector: string | string[]\n): T & Constructor<SlotPresenceObservingInterface> {\n const lightDomSelectors = Array.isArray(lightDomSelector)\n ? lightDomSelector\n : [lightDomSelector];\n class SlotPresenceObservingElement\n extends constructor\n implements SlotPresenceObservingInterface\n {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constructor(...args: any[]) {\n super(...args);\n\n new MutationController(this, {\n config: {\n childList: true,\n subtree: true,\n },\n callback: () => {\n this.managePresenceObservedSlot();\n },\n });\n\n this.managePresenceObservedSlot();\n }\n\n /**\n * @internal\n */\n public get slotContentIsPresent(): boolean {\n if (lightDomSelectors.length === 1) {\n return this[slotContentIsPresent].get(lightDomSelectors[0]) || false;\n } else {\n throw new Error(\n 'Multiple selectors provided to `ObserveSlotPresence` use `getSlotContentPresence(selector: string)` instead.'\n );\n }\n }\n private [slotContentIsPresent]: Map<string, boolean> = new Map();\n\n /**\n * @internal\n */\n public getSlotContentPresence(selector: string): boolean {\n if (this[slotContentIsPresent].has(selector)) {\n return this[slotContentIsPresent].get(selector) || false;\n }\n throw new Error(\n `The provided selector \\`${selector}\\` is not being observed.`\n );\n }\n\n /**\n * @internal\n */\n public managePresenceObservedSlot = (): void => {\n let changes = false;\n lightDomSelectors.forEach((selector) => {\n const nextValue = !!this.querySelector(`:scope > ${selector}`);\n const previousValue = this[slotContentIsPresent].get(selector) || false;\n changes = changes || previousValue !== nextValue;\n this[slotContentIsPresent].set(\n selector,\n !!this.querySelector(`:scope > ${selector}`)\n );\n });\n if (changes) {\n this.updateComplete.then(() => {\n this.requestUpdate();\n });\n }\n };\n }\n return SlotPresenceObservingElement;\n}\n"],"mappings":";;AAcA,IAAM,IAAuB,OAAO,uBAAuB;AAc3D,SAAgB,EACd,GACA,GACiD;CACjD,IAAM,IAAoB,MAAM,QAAQ,EAAiB,GACrD,IACA,CAAC,EAAiB;CACtB,MAAM,UACI,EAEV;EAEE,YAAY,GAAG,GAAa;AAa1B,GAZA,MAAM,GAAG,EAAK,OA2BP,qBAA8C,IAAI,KAAK,0CAiBhB;IAC9C,IAAI,IAAU;AAUd,IATA,EAAkB,SAAS,MAAa;KACtC,IAAM,IAAY,CAAC,CAAC,KAAK,cAAc,YAAY,IAAW,EACxD,IAAgB,KAAK,GAAsB,IAAI,EAAS,IAAI;AAElE,KADA,IAAU,KAAW,MAAkB,GACvC,KAAK,GAAsB,IACzB,GACA,CAAC,CAAC,KAAK,cAAc,YAAY,IAAW,CAC7C;MACD,EACE,KACF,KAAK,eAAe,WAAW;AAC7B,UAAK,eAAe;MACpB;MAxDJ,IAAI,EAAmB,MAAM;IAC3B,QAAQ;KACN,WAAW;KACX,SAAS;KACV;IACD,gBAAgB;AACd,UAAK,4BAA4B;;IAEpC,CAAC,EAEF,KAAK,4BAA4B;;EAMnC,IAAW,uBAAgC;AACzC,OAAI,EAAkB,WAAW,EAC/B,QAAO,KAAK,GAAsB,IAAI,EAAkB,GAAG,IAAI;AAE/D,SAAU,MACR,+GACD;;EAQL,uBAA8B,GAA2B;AACvD,OAAI,KAAK,GAAsB,IAAI,EAAS,CAC1C,QAAO,KAAK,GAAsB,IAAI,EAAS,IAAI;AAErD,SAAU,MACR,2BAA2B,EAAS,2BACrC;;;AAwBL,QAAO"}
@@ -1,11 +0,0 @@
1
- import { ReactiveElement } from 'lit';
2
- type Constructor<T = Record<string, unknown>> = {
3
- new (...args: any[]): T;
4
- prototype: T;
5
- };
6
- export interface SlotTextObservingInterface {
7
- slotHasContent: boolean;
8
- manageTextObservedSlot(): void;
9
- }
10
- export declare function ObserveSlotText<T extends Constructor<ReactiveElement>>(constructor: T, slotName?: string, excludedSelectors?: string[]): T & Constructor<SlotTextObservingInterface>;
11
- export {};
@@ -1,60 +0,0 @@
1
- import { __decorate as e } from "../_virtual/_@oxc-project_runtime@0.124.0/helpers/decorate.js";
2
- import { _defineProperty as t } from "../_virtual/_@oxc-project_runtime@0.124.0/helpers/defineProperty.js";
3
- import { property as n, queryAssignedNodes as r } from "lit/decorators.js";
4
- import { MutationController as i } from "@lit-labs/observers/mutation-controller.js";
5
- //#region mixins/observe-slot-text.ts
6
- var a = Symbol("assignedNodes");
7
- function o(o, s, c = []) {
8
- let l;
9
- var u;
10
- let d = (e) => (t) => e.matches(t);
11
- l = u = a;
12
- class f extends o {
13
- constructor(...e) {
14
- super(...e), t(this, l, void 0), this.slotHasContent = !1, new i(this, {
15
- config: {
16
- characterData: !0,
17
- subtree: !0
18
- },
19
- callback: (e) => {
20
- for (let t of e) if (t.type === "characterData") {
21
- this.manageTextObservedSlot();
22
- return;
23
- }
24
- }
25
- });
26
- }
27
- manageTextObservedSlot() {
28
- this[a] && (this.slotHasContent = [...this[a]].filter((e) => {
29
- let t = e;
30
- return t.tagName ? !c.some(d(t)) : t.textContent ? t.textContent.trim() : !1;
31
- }).length > 0);
32
- }
33
- update(e) {
34
- if (!this.hasUpdated) {
35
- let { childNodes: e } = this;
36
- this.slotHasContent = [...e].filter((e) => {
37
- let t = e;
38
- return t.tagName ? c.some(d(t)) ? !1 : s ? t.getAttribute("slot") === s : !t.hasAttribute("slot") : t.textContent ? t.textContent.trim() : !1;
39
- }).length > 0;
40
- }
41
- super.update(e);
42
- }
43
- firstUpdated(e) {
44
- super.firstUpdated(e), this.updateComplete.then(() => {
45
- this.manageTextObservedSlot();
46
- });
47
- }
48
- }
49
- return e([n({
50
- type: Boolean,
51
- attribute: !1
52
- })], f.prototype, "slotHasContent", void 0), e([r({
53
- slot: s,
54
- flatten: !0
55
- })], f.prototype, u, void 0), f;
56
- }
57
- //#endregion
58
- export { o as ObserveSlotText };
59
-
60
- //# sourceMappingURL=observe-slot-text.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"observe-slot-text.js","names":[],"sources":["../../mixins/observe-slot-text.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 */\nimport { PropertyValues, ReactiveElement } from 'lit';\nimport { property, queryAssignedNodes } from 'lit/decorators.js';\nimport { MutationController } from '@lit-labs/observers/mutation-controller.js';\n\nconst assignedNodesList = Symbol('assignedNodes');\n\ntype Constructor<T = Record<string, unknown>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n prototype: T;\n};\n\nexport interface SlotTextObservingInterface {\n slotHasContent: boolean;\n manageTextObservedSlot(): void;\n}\n\nexport function ObserveSlotText<T extends Constructor<ReactiveElement>>(\n constructor: T,\n slotName?: string,\n excludedSelectors: string[] = []\n): T & Constructor<SlotTextObservingInterface> {\n const notExcluded = (el: HTMLElement) => (selector: string) => {\n return el.matches(selector);\n };\n\n class SlotTextObservingElement\n extends constructor\n implements SlotTextObservingInterface\n {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constructor(...args: any[]) {\n super(...args);\n\n new MutationController(this, {\n config: {\n characterData: true,\n subtree: true,\n },\n callback: (mutationsList: Array<MutationRecord>) => {\n for (const mutation of mutationsList) {\n if (mutation.type === 'characterData') {\n this.manageTextObservedSlot();\n return;\n }\n }\n },\n });\n }\n\n /**\n * @internal\n */\n @property({ type: Boolean, attribute: false })\n public slotHasContent = false;\n\n @queryAssignedNodes({\n slot: slotName,\n flatten: true,\n })\n private [assignedNodesList]!: NodeListOf<HTMLElement>;\n\n /**\n * @internal\n */\n public manageTextObservedSlot(): void {\n if (!this[assignedNodesList]) {\n return;\n }\n const assignedNodes = [...this[assignedNodesList]].filter(\n (currentNode) => {\n const node = currentNode as HTMLElement;\n if (node.tagName) {\n return !excludedSelectors.some(notExcluded(node));\n }\n return node.textContent ? node.textContent.trim() : false;\n }\n );\n this.slotHasContent = assignedNodes.length > 0;\n }\n\n protected override update(changedProperties: PropertyValues): void {\n if (!this.hasUpdated) {\n const { childNodes } = this;\n const textNodes = [...childNodes].filter((currentNode) => {\n const node = currentNode as HTMLElement;\n if (node.tagName) {\n const excluded = excludedSelectors.some(notExcluded(node));\n return !excluded\n ? // This pass happens at element upgrade and before slot rendering.\n // Confirm it would exist in a targeted slot if there was one supplied.\n slotName\n ? node.getAttribute('slot') === slotName\n : !node.hasAttribute('slot')\n : false;\n }\n return node.textContent ? node.textContent.trim() : false;\n });\n this.slotHasContent = textNodes.length > 0;\n }\n super.update(changedProperties);\n }\n\n protected override firstUpdated(changedProperties: PropertyValues): void {\n super.firstUpdated(changedProperties);\n this.updateComplete.then(() => {\n this.manageTextObservedSlot();\n });\n }\n }\n return SlotTextObservingElement;\n}\n"],"mappings":";;;;;AAeA,IAAM,IAAoB,OAAO,gBAAgB;AAajD,SAAgB,EACd,GACA,GACA,IAA8B,EAAE,EACa;;;CAC7C,IAAM,KAAe,OAAqB,MACjC,EAAG,QAAQ,EAAS;KAiC3B,IAIS;CAlCX,MAAM,UACI,EAEV;EAEE,YAAY,GAAG,GAAa;AAG1B,GAFA,MAAM,GAAG,EAAK,oBA4BP,wBANe,IApBtB,IAAI,EAAmB,MAAM;IAC3B,QAAQ;KACN,eAAe;KACf,SAAS;KACV;IACD,WAAW,MAAyC;AAClD,UAAK,IAAM,KAAY,EACrB,KAAI,EAAS,SAAS,iBAAiB;AACrC,WAAK,wBAAwB;AAC7B;;;IAIP,CAAC;;EAkBJ,yBAAsC;AAC/B,QAAK,OAYV,KAAK,iBATiB,CAAC,GAAG,KAAK,GAAmB,CAAC,QAChD,MAAgB;IACf,IAAM,IAAO;AAIb,WAHI,EAAK,UACA,CAAC,EAAkB,KAAK,EAAY,EAAK,CAAC,GAE5C,EAAK,cAAc,EAAK,YAAY,MAAM,GAAG;KAEvD,CACmC,SAAS;;EAG/C,OAA0B,GAAyC;AACjE,OAAI,CAAC,KAAK,YAAY;IACpB,IAAM,EAAE,kBAAe;AAevB,SAAK,iBAda,CAAC,GAAG,EAAW,CAAC,QAAQ,MAAgB;KACxD,IAAM,IAAO;AAWb,YAVI,EAAK,UACU,EAAkB,KAAK,EAAY,EAAK,CAAC,GAOtD,KAHA,IACE,EAAK,aAAa,OAAO,KAAK,IAC9B,CAAC,EAAK,aAAa,OAAO,GAG3B,EAAK,cAAc,EAAK,YAAY,MAAM,GAAG;MACpD,CAC8B,SAAS;;AAE3C,SAAM,OAAO,EAAkB;;EAGjC,aAAgC,GAAyC;AAEvE,GADA,MAAM,aAAa,EAAkB,EACrC,KAAK,eAAe,WAAW;AAC7B,SAAK,wBAAwB;KAC7B;;;AAGN,WAzDG,EAAS;EAAE,MAAM;EAAS,WAAW;EAAO,CAAC,CAAA,EAAA,EAAA,WAAA,kBAAA,KAAA,EAAA,KAG7C,EAAmB;EAClB,MAAM;EACN,SAAS;EACV,CAAC,CAAA,EAAA,EAAA,WAAA,GAAA,KAAA,EAAA,EAmDG"}