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

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 (136) hide show
  1. package/CHANGELOG.md +75 -9
  2. package/dist/components/accordion/Accordion.base.js +28 -22
  3. package/dist/components/accordion/Accordion.base.js.map +1 -1
  4. package/dist/components/accordion/AccordionItem.base.d.ts +16 -6
  5. package/dist/components/accordion/AccordionItem.base.js +6 -3
  6. package/dist/components/accordion/AccordionItem.base.js.map +1 -1
  7. package/dist/components/action-group/ActionGroup.base.d.ts +108 -0
  8. package/dist/components/action-group/ActionGroup.base.js +53 -0
  9. package/dist/components/action-group/ActionGroup.base.js.map +1 -0
  10. package/dist/components/action-group/ActionGroup.types.d.ts +17 -0
  11. package/dist/components/action-group/ActionGroup.types.js +12 -0
  12. package/dist/components/action-group/ActionGroup.types.js.map +1 -0
  13. package/dist/components/action-group/index.d.ts +13 -0
  14. package/dist/components/action-group/index.js +3 -0
  15. package/dist/components/alert-banner/AlertBanner.base.js +11 -10
  16. package/dist/components/alert-banner/AlertBanner.base.js.map +1 -1
  17. package/dist/components/asset/Asset.base.d.ts +1 -1
  18. package/dist/components/asset/Asset.base.js +14 -8
  19. package/dist/components/asset/Asset.base.js.map +1 -1
  20. package/dist/components/avatar/Avatar.base.js +18 -22
  21. package/dist/components/avatar/Avatar.base.js.map +1 -1
  22. package/dist/components/badge/Badge.base.d.ts +24 -8
  23. package/dist/components/badge/Badge.base.js +22 -17
  24. package/dist/components/badge/Badge.base.js.map +1 -1
  25. package/dist/components/button/Button.base.d.ts +20 -10
  26. package/dist/components/button/Button.base.js +17 -12
  27. package/dist/components/button/Button.base.js.map +1 -1
  28. package/dist/components/button-group/ButtonGroup.base.js +19 -12
  29. package/dist/components/button-group/ButtonGroup.base.js.map +1 -1
  30. package/dist/components/card/Card.base.d.ts +95 -46
  31. package/dist/components/card/Card.base.js +71 -23
  32. package/dist/components/card/Card.base.js.map +1 -1
  33. package/dist/components/card/Card.types.d.ts +1 -0
  34. package/dist/components/card/Card.types.js +2 -2
  35. package/dist/components/card/Card.types.js.map +1 -1
  36. package/dist/components/card/index.js +3 -3
  37. package/dist/components/divider/Divider.base.js +13 -8
  38. package/dist/components/divider/Divider.base.js.map +1 -1
  39. package/dist/components/dropzone/Dropzone.base.d.ts +74 -0
  40. package/dist/components/dropzone/Dropzone.base.js +82 -0
  41. package/dist/components/dropzone/Dropzone.base.js.map +1 -0
  42. package/dist/components/dropzone/Dropzone.types.d.ts +43 -0
  43. package/dist/components/dropzone/Dropzone.types.js +15 -0
  44. package/dist/components/dropzone/Dropzone.types.js.map +1 -0
  45. package/dist/components/dropzone/index.d.ts +13 -0
  46. package/dist/components/dropzone/index.js +3 -0
  47. package/dist/components/icon/Icon.base.d.ts +11 -7
  48. package/dist/components/icon/Icon.base.js +13 -20
  49. package/dist/components/icon/Icon.base.js.map +1 -1
  50. package/dist/components/illustrated-message/IllustratedMessage.base.d.ts +22 -8
  51. package/dist/components/illustrated-message/IllustratedMessage.base.js +33 -20
  52. package/dist/components/illustrated-message/IllustratedMessage.base.js.map +1 -1
  53. package/dist/components/infield-button/InfieldButton.base.d.ts +28 -0
  54. package/dist/components/infield-button/InfieldButton.base.js +22 -0
  55. package/dist/components/infield-button/InfieldButton.base.js.map +1 -0
  56. package/dist/components/infield-button/InfieldButton.types.d.ts +13 -0
  57. package/dist/components/infield-button/InfieldButton.types.js +11 -0
  58. package/dist/components/infield-button/InfieldButton.types.js.map +1 -0
  59. package/dist/components/infield-button/index.d.ts +13 -0
  60. package/dist/components/infield-button/index.js +3 -0
  61. package/dist/components/meter/Meter.base.js +11 -9
  62. package/dist/components/meter/Meter.base.js.map +1 -1
  63. package/dist/components/popover/Popover.base.js +46 -42
  64. package/dist/components/popover/Popover.base.js.map +1 -1
  65. package/dist/components/progress-circle/ProgressCircle.base.d.ts +0 -1
  66. package/dist/components/progress-circle/ProgressCircle.base.js +26 -22
  67. package/dist/components/progress-circle/ProgressCircle.base.js.map +1 -1
  68. package/dist/components/status-light/StatusLight.base.d.ts +1 -1
  69. package/dist/components/status-light/StatusLight.base.js +12 -9
  70. package/dist/components/status-light/StatusLight.base.js.map +1 -1
  71. package/dist/components/tabs/Tabs.base.js +44 -32
  72. package/dist/components/tabs/Tabs.base.js.map +1 -1
  73. package/dist/components/tooltip/Tooltip.base.js +57 -22
  74. package/dist/components/tooltip/Tooltip.base.js.map +1 -1
  75. package/dist/controllers/color-controller/src/color-controller.js +45 -44
  76. package/dist/controllers/color-controller/src/color-controller.js.map +1 -1
  77. package/dist/controllers/drag-and-drop-controller/index.d.ts +12 -0
  78. package/dist/controllers/drag-and-drop-controller/index.js +2 -0
  79. package/dist/controllers/drag-and-drop-controller/src/drag-and-drop-controller.d.ts +68 -0
  80. package/dist/controllers/drag-and-drop-controller/src/drag-and-drop-controller.js +56 -0
  81. package/dist/controllers/drag-and-drop-controller/src/drag-and-drop-controller.js.map +1 -0
  82. package/dist/controllers/index.d.ts +4 -1
  83. package/dist/controllers/index.js +14 -11
  84. package/dist/controllers/page-scroll-lock-controller/index.d.ts +12 -0
  85. package/dist/controllers/page-scroll-lock-controller/index.js +2 -0
  86. package/dist/controllers/{page-scroll-lock.js → page-scroll-lock-controller/src/page-scroll-lock.js} +1 -1
  87. package/dist/controllers/page-scroll-lock-controller/src/page-scroll-lock.js.map +1 -0
  88. package/dist/controllers/slot-presence-controller/index.d.ts +12 -0
  89. package/dist/controllers/slot-presence-controller/index.js +2 -0
  90. package/dist/controllers/slot-presence-controller/src/slot-presence-controller.d.ts +57 -0
  91. package/dist/controllers/slot-presence-controller/src/slot-presence-controller.js +44 -0
  92. package/dist/controllers/slot-presence-controller/src/slot-presence-controller.js.map +1 -0
  93. package/dist/controllers/slot-text-controller/index.d.ts +12 -0
  94. package/dist/controllers/slot-text-controller/index.js +2 -0
  95. package/dist/controllers/slot-text-controller/src/slot-text-controller.d.ts +92 -0
  96. package/dist/controllers/slot-text-controller/src/slot-text-controller.js +53 -0
  97. package/dist/controllers/slot-text-controller/src/slot-text-controller.js.map +1 -0
  98. package/dist/element/index.d.ts +1 -1
  99. package/dist/element/index.js +2 -2
  100. package/dist/element/spectrum-element.d.ts +58 -15
  101. package/dist/element/spectrum-element.js +55 -36
  102. package/dist/element/spectrum-element.js.map +1 -1
  103. package/dist/element/version.d.ts +2 -2
  104. package/dist/element/version.js +1 -1
  105. package/dist/element/version.js.map +1 -1
  106. package/dist/mixins/index.d.ts +0 -2
  107. package/dist/mixins/index.js +4 -6
  108. package/dist/mixins/linear-progress-mixin.d.ts +1 -2
  109. package/dist/mixins/linear-progress-mixin.js +35 -34
  110. package/dist/mixins/linear-progress-mixin.js.map +1 -1
  111. package/dist/mixins/pending-mixin.js +12 -11
  112. package/dist/mixins/pending-mixin.js.map +1 -1
  113. package/dist/mixins/sized-mixin.d.ts +28 -0
  114. package/dist/mixins/sized-mixin.js +6 -6
  115. package/dist/mixins/sized-mixin.js.map +1 -1
  116. package/dist/utils/dev-validation.d.ts +88 -0
  117. package/dist/utils/dev-validation.js +33 -0
  118. package/dist/utils/dev-validation.js.map +1 -0
  119. package/dist/utils/index.d.ts +2 -0
  120. package/dist/utils/index.js +12 -10
  121. package/dist/utils/is-focus-visible-in-tree.d.ts +33 -0
  122. package/dist/utils/is-focus-visible-in-tree.js +11 -0
  123. package/dist/utils/is-focus-visible-in-tree.js.map +1 -0
  124. package/package.json +68 -15
  125. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/defineProperty.js +0 -12
  126. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/toPrimitive.js +0 -14
  127. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/toPropertyKey.js +0 -9
  128. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/typeof.js +0 -11
  129. package/dist/controllers/page-scroll-lock.js.map +0 -1
  130. package/dist/mixins/observe-slot-presence.d.ts +0 -12
  131. package/dist/mixins/observe-slot-presence.js +0 -40
  132. package/dist/mixins/observe-slot-presence.js.map +0 -1
  133. package/dist/mixins/observe-slot-text.d.ts +0 -11
  134. package/dist/mixins/observe-slot-text.js +0 -60
  135. package/dist/mixins/observe-slot-text.js.map +0 -1
  136. /package/dist/controllers/{page-scroll-lock.d.ts → page-scroll-lock-controller/src/page-scroll-lock.d.ts} +0 -0
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright 2026 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+ /**
13
+ * Returns whether the deepest focused element in a tree is matched by
14
+ * `:focus-visible` (i.e. the platform would show a focus ring).
15
+ *
16
+ * Traverses shadow DOM boundaries via {@link getActiveElement} before testing
17
+ * the pseudo-class, so it reports the truly focused element rather than stopping
18
+ * at a shadow host.
19
+ *
20
+ * @param root - The document or shadow root to start traversal from. Pass a
21
+ * component's root node (`el.getRootNode()`) to scope the check to
22
+ * that tree. Defaults to `document`.
23
+ * @returns `true` if the active element matches `:focus-visible`, otherwise `false`.
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * // Inside a component, mirror focus-visible state to a reactive property.
28
+ * this.focused = isFocusVisibleInTree(
29
+ * this.getRootNode() as Document | ShadowRoot
30
+ * );
31
+ * ```
32
+ */
33
+ export declare function isFocusVisibleInTree(root?: Document | ShadowRoot): boolean;
@@ -0,0 +1,11 @@
1
+ import { getActiveElement as e } from "./get-active-element.js";
2
+ //#region utils/is-focus-visible-in-tree.ts
3
+ function t(t = document) {
4
+ var n;
5
+ let r = e(t);
6
+ return (n = r == null ? void 0 : r.matches(":focus-visible")) == null ? !1 : n;
7
+ }
8
+ //#endregion
9
+ export { t as isFocusVisibleInTree };
10
+
11
+ //# sourceMappingURL=is-focus-visible-in-tree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-focus-visible-in-tree.js","names":[],"sources":["../../utils/is-focus-visible-in-tree.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 { getActiveElement } from './get-active-element.js';\n\n/**\n * Returns whether the deepest focused element in a tree is matched by\n * `:focus-visible` (i.e. the platform would show a focus ring).\n *\n * Traverses shadow DOM boundaries via {@link getActiveElement} before testing\n * the pseudo-class, so it reports the truly focused element rather than stopping\n * at a shadow host.\n *\n * @param root - The document or shadow root to start traversal from. Pass a\n * component's root node (`el.getRootNode()`) to scope the check to\n * that tree. Defaults to `document`.\n * @returns `true` if the active element matches `:focus-visible`, otherwise `false`.\n *\n * @example\n * ```typescript\n * // Inside a component, mirror focus-visible state to a reactive property.\n * this.focused = isFocusVisibleInTree(\n * this.getRootNode() as Document | ShadowRoot\n * );\n * ```\n */\nexport function isFocusVisibleInTree(\n root: Document | ShadowRoot = document\n): boolean {\n const active = getActiveElement(root);\n return active?.matches(':focus-visible') ?? false;\n}\n"],"mappings":";;AAmCA,SAAgB,EACd,IAA8B,UACrB;;CACT,IAAM,IAAS,EAAiB,EAAK;AACrC,SAAA,IAAA,KAAA,OAAA,KAAA,IAAO,EAAQ,QAAQ,iBAAiB,KAAA,OAAI,KAAJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spectrum-wc-core",
3
- "version": "2.0.0-beta.2",
3
+ "version": "2.0.0-beta.3",
4
4
  "description": "Abstract base classes for Spectrum Web Components",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Adobe",
@@ -23,6 +23,10 @@
23
23
  "types": "./dist/components/action-button/index.d.ts",
24
24
  "import": "./dist/components/action-button/index.js"
25
25
  },
26
+ "./components/action-group": {
27
+ "types": "./dist/components/action-group/index.d.ts",
28
+ "import": "./dist/components/action-group/index.js"
29
+ },
26
30
  "./components/alert-banner": {
27
31
  "types": "./dist/components/alert-banner/index.d.ts",
28
32
  "import": "./dist/components/alert-banner/index.js"
@@ -75,10 +79,22 @@
75
79
  "types": "./dist/components/divider/index.d.ts",
76
80
  "import": "./dist/components/divider/index.js"
77
81
  },
82
+ "./components/dropzone": {
83
+ "types": "./dist/components/dropzone/index.d.ts",
84
+ "import": "./dist/components/dropzone/index.js"
85
+ },
86
+ "./components/dropzone/index.js": {
87
+ "types": "./dist/components/dropzone/index.d.ts",
88
+ "import": "./dist/components/dropzone/index.js"
89
+ },
78
90
  "./components/icon": {
79
91
  "types": "./dist/components/icon/index.d.ts",
80
92
  "import": "./dist/components/icon/index.js"
81
93
  },
94
+ "./components/infield-button": {
95
+ "types": "./dist/components/infield-button/index.d.ts",
96
+ "import": "./dist/components/infield-button/index.js"
97
+ },
82
98
  "./components/illustrated-message": {
83
99
  "types": "./dist/components/illustrated-message/index.d.ts",
84
100
  "import": "./dist/components/illustrated-message/index.js"
@@ -131,6 +147,10 @@
131
147
  "types": "./dist/controllers/color-controller/index.d.ts",
132
148
  "import": "./dist/controllers/color-controller/index.js"
133
149
  },
150
+ "./controllers/drag-and-drop-controller.js": {
151
+ "types": "./dist/controllers/drag-and-drop-controller/index.d.ts",
152
+ "import": "./dist/controllers/drag-and-drop-controller/index.js"
153
+ },
134
154
  "./controllers/focus-group-navigation-controller.js": {
135
155
  "types": "./dist/controllers/focus-group-navigation-controller/focus-group-navigation-controller.d.ts",
136
156
  "import": "./dist/controllers/focus-group-navigation-controller/focus-group-navigation-controller.js"
@@ -151,6 +171,10 @@
151
171
  "types": "./dist/controllers/live-selection-controller/index.d.ts",
152
172
  "import": "./dist/controllers/live-selection-controller/index.js"
153
173
  },
174
+ "./controllers/page-scroll-lock-controller.js": {
175
+ "types": "./dist/controllers/page-scroll-lock-controller/index.d.ts",
176
+ "import": "./dist/controllers/page-scroll-lock-controller/index.js"
177
+ },
154
178
  "./controllers/pending-controller": {
155
179
  "types": "./dist/controllers/pending-controller/index.d.ts",
156
180
  "import": "./dist/controllers/pending-controller/index.js"
@@ -171,6 +195,22 @@
171
195
  "types": "./dist/controllers/slot-attribute-propagation-controller/index.d.ts",
172
196
  "import": "./dist/controllers/slot-attribute-propagation-controller/index.js"
173
197
  },
198
+ "./controllers/slot-presence-controller": {
199
+ "types": "./dist/controllers/slot-presence-controller/index.d.ts",
200
+ "import": "./dist/controllers/slot-presence-controller/index.js"
201
+ },
202
+ "./controllers/slot-presence-controller/index.js": {
203
+ "types": "./dist/controllers/slot-presence-controller/index.d.ts",
204
+ "import": "./dist/controllers/slot-presence-controller/index.js"
205
+ },
206
+ "./controllers/slot-text-controller": {
207
+ "types": "./dist/controllers/slot-text-controller/index.d.ts",
208
+ "import": "./dist/controllers/slot-text-controller/index.js"
209
+ },
210
+ "./controllers/slot-text-controller/index.js": {
211
+ "types": "./dist/controllers/slot-text-controller/index.d.ts",
212
+ "import": "./dist/controllers/slot-text-controller/index.js"
213
+ },
174
214
  "./directives": {
175
215
  "types": "./dist/directives/index.d.ts",
176
216
  "import": "./dist/directives/index.js"
@@ -215,14 +255,6 @@
215
255
  "types": "./dist/mixins/index.d.ts",
216
256
  "import": "./dist/mixins/index.js"
217
257
  },
218
- "./mixins/observe-slot-presence.js": {
219
- "types": "./dist/mixins/observe-slot-presence.d.ts",
220
- "import": "./dist/mixins/observe-slot-presence.js"
221
- },
222
- "./mixins/observe-slot-text.js": {
223
- "types": "./dist/mixins/observe-slot-text.d.ts",
224
- "import": "./dist/mixins/observe-slot-text.js"
225
- },
226
258
  "./mixins/sized-mixin.js": {
227
259
  "types": "./dist/mixins/sized-mixin.d.ts",
228
260
  "import": "./dist/mixins/sized-mixin.js"
@@ -310,9 +342,18 @@
310
342
  "components/divider/index.js": [
311
343
  "dist/components/divider/index.d.ts"
312
344
  ],
345
+ "components/dropzone": [
346
+ "dist/components/dropzone/index.d.ts"
347
+ ],
348
+ "components/dropzone/index.js": [
349
+ "dist/components/dropzone/index.d.ts"
350
+ ],
313
351
  "components/icon": [
314
352
  "dist/components/icon/index.d.ts"
315
353
  ],
354
+ "components/infield-button": [
355
+ "dist/components/infield-button/index.d.ts"
356
+ ],
316
357
  "components/illustrated-message": [
317
358
  "dist/components/illustrated-message/index.d.ts"
318
359
  ],
@@ -346,6 +387,9 @@
346
387
  "controllers/color-controller.js": [
347
388
  "dist/controllers/color-controller/index.d.ts"
348
389
  ],
390
+ "controllers/drag-and-drop-controller.js": [
391
+ "dist/controllers/drag-and-drop-controller/index.d.ts"
392
+ ],
349
393
  "controllers/focus-group-navigation-controller/focus-group-navigation-controller.js": [
350
394
  "dist/controllers/focus-group-navigation-controller/focus-group-navigation-controller.d.ts"
351
395
  ],
@@ -361,6 +405,9 @@
361
405
  "controllers/live-selection-controller/index.js": [
362
406
  "dist/controllers/live-selection-controller/index.d.ts"
363
407
  ],
408
+ "controllers/page-scroll-lock-controller.js": [
409
+ "dist/controllers/page-scroll-lock-controller/index.d.ts"
410
+ ],
364
411
  "controllers/pending-controller": [
365
412
  "dist/controllers/pending-controller/index.d.ts"
366
413
  ],
@@ -376,6 +423,18 @@
376
423
  "controllers/slot-attribute-propagation-controller.js": [
377
424
  "dist/controllers/slot-attribute-propagation-controller/index.d.ts"
378
425
  ],
426
+ "controllers/slot-presence-controller": [
427
+ "dist/controllers/slot-presence-controller/index.d.ts"
428
+ ],
429
+ "controllers/slot-presence-controller/index.js": [
430
+ "dist/controllers/slot-presence-controller/index.d.ts"
431
+ ],
432
+ "controllers/slot-text-controller": [
433
+ "dist/controllers/slot-text-controller/index.d.ts"
434
+ ],
435
+ "controllers/slot-text-controller/index.js": [
436
+ "dist/controllers/slot-text-controller/index.d.ts"
437
+ ],
379
438
  "directives": [
380
439
  "dist/directives/index.d.ts"
381
440
  ],
@@ -409,12 +468,6 @@
409
468
  "mixins/index.js": [
410
469
  "dist/mixins/index.d.ts"
411
470
  ],
412
- "mixins/observe-slot-presence.js": [
413
- "dist/mixins/observe-slot-presence.d.ts"
414
- ],
415
- "mixins/observe-slot-text.js": [
416
- "dist/mixins/observe-slot-text.d.ts"
417
- ],
418
471
  "mixins/sized-mixin.js": [
419
472
  "dist/mixins/sized-mixin.d.ts"
420
473
  ],
@@ -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 +0,0 @@
1
- {"version":3,"file":"page-scroll-lock.js","names":[],"sources":["../../controllers/page-scroll-lock.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 type { ReactiveController, ReactiveElement } from 'lit';\n\n// ────────────────────────────────────────────\n// Module-scoped reference-counted lock\n// ────────────────────────────────────────────\n//\n// Stacked blocking surfaces (e.g. nested modal dialogs, a modal popover opened\n// over another) must coordinate a single page-scroll lock. The document's\n// original `overflow` is captured once on the 0 -> 1 transition and restored\n// once on the 1 -> 0 transition. Saving per instance would let a later locker\n// capture an already-locked value (`hidden`) and then restore it permanently\n// when it releases, leaving the page unscrollable.\n\nlet lockCount = 0;\nlet savedOverflow = '';\n\nfunction acquirePageScrollLock(): void {\n if (lockCount === 0) {\n const html = document.documentElement;\n savedOverflow = html.style.overflow;\n html.style.overflow = 'hidden';\n }\n lockCount += 1;\n}\n\nfunction releasePageScrollLock(): void {\n if (lockCount === 0) {\n return;\n }\n lockCount -= 1;\n if (lockCount === 0) {\n document.documentElement.style.overflow = savedOverflow;\n savedOverflow = '';\n }\n}\n\n/**\n * Locks page scroll behind a blocking surface (a modal popover, dialog, or tray)\n * by setting `overflow: hidden` on the document element. A component's shadow\n * stylesheet cannot reach `<html>`, so this is done in JS.\n *\n * The lock is reference-counted at module scope so concurrent locks from stacked\n * surfaces do not clobber one another's saved state. Each host holds at most one\n * count (the per-instance `lock()` / `unlock()` are idempotent), and the\n * controller releases the host's count automatically on disconnect.\n */\nexport class PageScrollLockController implements ReactiveController {\n private _locked = false;\n\n constructor(host: ReactiveElement) {\n host.addController(this);\n }\n\n /** Lock page scroll on behalf of the host. Idempotent per host. */\n public lock(): void {\n if (this._locked) {\n return;\n }\n this._locked = true;\n acquirePageScrollLock();\n }\n\n /** Release the host's lock if it holds one. Idempotent per host. */\n public unlock(): void {\n if (!this._locked) {\n return;\n }\n this._locked = false;\n releasePageScrollLock();\n }\n\n public hostDisconnected(): void {\n this.unlock();\n }\n}\n"],"mappings":";AAyBA,IAAI,IAAY,GACZ,IAAgB;AAEpB,SAAS,IAA8B;AACrC,KAAI,MAAc,GAAG;EACnB,IAAM,IAAO,SAAS;AAEtB,EADA,IAAgB,EAAK,MAAM,UAC3B,EAAK,MAAM,WAAW;;AAExB,MAAa;;AAGf,SAAS,IAA8B;AACjC,OAAc,MAGlB,KACI,MAAc,MAChB,SAAS,gBAAgB,MAAM,WAAW,GAC1C,IAAgB;;AAcpB,IAAa,IAAb,MAAoE;CAGlE,YAAY,GAAuB;AACjC,iBAHgB,IAGhB,EAAK,cAAc,KAAK;;CAI1B,OAAoB;AACd,OAAK,YAGT,KAAK,UAAU,IACf,GAAuB;;CAIzB,SAAsB;AACf,OAAK,YAGV,KAAK,UAAU,IACf,GAAuB;;CAGzB,mBAAgC;AAC9B,OAAK,QAAQ"}
@@ -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"}