@adobe/spectrum-wc-core 0.4.0-snapshot-test.20260714143259

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 (269) hide show
  1. package/README.md +39 -0
  2. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/decorate.js +9 -0
  3. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/defineProperty.js +12 -0
  4. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/toPrimitive.js +14 -0
  5. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/toPropertyKey.js +9 -0
  6. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/typeof.js +11 -0
  7. package/dist/components/accordion/Accordion.base.d.ts +61 -0
  8. package/dist/components/accordion/Accordion.base.js +71 -0
  9. package/dist/components/accordion/Accordion.base.js.map +1 -0
  10. package/dist/components/accordion/Accordion.types.d.ts +22 -0
  11. package/dist/components/accordion/Accordion.types.js +21 -0
  12. package/dist/components/accordion/Accordion.types.js.map +1 -0
  13. package/dist/components/accordion/AccordionItem.base.d.ts +86 -0
  14. package/dist/components/accordion/AccordionItem.base.js +90 -0
  15. package/dist/components/accordion/AccordionItem.base.js.map +1 -0
  16. package/dist/components/accordion/index.d.ts +14 -0
  17. package/dist/components/accordion/index.js +4 -0
  18. package/dist/components/action-button/ActionButton.types.d.ts +15 -0
  19. package/dist/components/action-button/ActionButton.types.js +12 -0
  20. package/dist/components/action-button/ActionButton.types.js.map +1 -0
  21. package/dist/components/action-button/index.d.ts +12 -0
  22. package/dist/components/action-button/index.js +2 -0
  23. package/dist/components/alert-banner/AlertBanner.base.d.ts +36 -0
  24. package/dist/components/alert-banner/AlertBanner.base.js +56 -0
  25. package/dist/components/alert-banner/AlertBanner.base.js.map +1 -0
  26. package/dist/components/alert-banner/AlertBanner.types.d.ts +13 -0
  27. package/dist/components/alert-banner/AlertBanner.types.js +10 -0
  28. package/dist/components/alert-banner/AlertBanner.types.js.map +1 -0
  29. package/dist/components/alert-banner/index.d.ts +13 -0
  30. package/dist/components/alert-banner/index.js +3 -0
  31. package/dist/components/asset/Asset.base.d.ts +22 -0
  32. package/dist/components/asset/Asset.base.js +25 -0
  33. package/dist/components/asset/Asset.base.js.map +1 -0
  34. package/dist/components/asset/Asset.types.d.ts +13 -0
  35. package/dist/components/asset/Asset.types.js +6 -0
  36. package/dist/components/asset/Asset.types.js.map +1 -0
  37. package/dist/components/asset/index.d.ts +13 -0
  38. package/dist/components/asset/index.js +3 -0
  39. package/dist/components/avatar/Avatar.base.d.ts +53 -0
  40. package/dist/components/avatar/Avatar.base.js +56 -0
  41. package/dist/components/avatar/Avatar.base.js.map +1 -0
  42. package/dist/components/avatar/Avatar.types.d.ts +19 -0
  43. package/dist/components/avatar/Avatar.types.js +24 -0
  44. package/dist/components/avatar/Avatar.types.js.map +1 -0
  45. package/dist/components/avatar/index.d.ts +13 -0
  46. package/dist/components/avatar/index.js +3 -0
  47. package/dist/components/badge/Badge.base.d.ts +98 -0
  48. package/dist/components/badge/Badge.base.js +44 -0
  49. package/dist/components/badge/Badge.base.js.map +1 -0
  50. package/dist/components/badge/Badge.types.d.ts +21 -0
  51. package/dist/components/badge/Badge.types.js +43 -0
  52. package/dist/components/badge/Badge.types.js.map +1 -0
  53. package/dist/components/badge/index.d.ts +13 -0
  54. package/dist/components/badge/index.js +3 -0
  55. package/dist/components/button/Button.base.d.ts +99 -0
  56. package/dist/components/button/Button.base.js +75 -0
  57. package/dist/components/button/Button.base.js.map +1 -0
  58. package/dist/components/button/Button.types.d.ts +19 -0
  59. package/dist/components/button/Button.types.js +16 -0
  60. package/dist/components/button/Button.types.js.map +1 -0
  61. package/dist/components/button/index.d.ts +13 -0
  62. package/dist/components/button/index.js +3 -0
  63. package/dist/components/button-group/ButtonGroup.base.d.ts +89 -0
  64. package/dist/components/button-group/ButtonGroup.base.js +53 -0
  65. package/dist/components/button-group/ButtonGroup.base.js.map +1 -0
  66. package/dist/components/button-group/ButtonGroup.types.d.ts +17 -0
  67. package/dist/components/button-group/ButtonGroup.types.js +15 -0
  68. package/dist/components/button-group/ButtonGroup.types.js.map +1 -0
  69. package/dist/components/button-group/index.d.ts +13 -0
  70. package/dist/components/button-group/index.js +3 -0
  71. package/dist/components/card/Card.base.d.ts +123 -0
  72. package/dist/components/card/Card.base.js +75 -0
  73. package/dist/components/card/Card.base.js.map +1 -0
  74. package/dist/components/card/Card.types.d.ts +17 -0
  75. package/dist/components/card/Card.types.js +21 -0
  76. package/dist/components/card/Card.types.js.map +1 -0
  77. package/dist/components/card/index.d.ts +13 -0
  78. package/dist/components/card/index.js +3 -0
  79. package/dist/components/color-handle/ColorHandle.base.d.ts +51 -0
  80. package/dist/components/color-handle/ColorHandle.base.js +39 -0
  81. package/dist/components/color-handle/ColorHandle.base.js.map +1 -0
  82. package/dist/components/color-handle/ColorHandle.types.d.ts +30 -0
  83. package/dist/components/color-handle/color-contrast.d.ts +55 -0
  84. package/dist/components/color-handle/color-contrast.js +49 -0
  85. package/dist/components/color-handle/color-contrast.js.map +1 -0
  86. package/dist/components/color-handle/index.d.ts +14 -0
  87. package/dist/components/color-handle/index.js +3 -0
  88. package/dist/components/color-loupe/ColorLoupe.base.d.ts +26 -0
  89. package/dist/components/color-loupe/ColorLoupe.base.js +17 -0
  90. package/dist/components/color-loupe/ColorLoupe.base.js.map +1 -0
  91. package/dist/components/color-loupe/index.d.ts +12 -0
  92. package/dist/components/color-loupe/index.js +2 -0
  93. package/dist/components/divider/Divider.base.d.ts +43 -0
  94. package/dist/components/divider/Divider.base.js +37 -0
  95. package/dist/components/divider/Divider.base.js.map +1 -0
  96. package/dist/components/divider/Divider.types.d.ts +15 -0
  97. package/dist/components/divider/Divider.types.js +10 -0
  98. package/dist/components/divider/Divider.types.js.map +1 -0
  99. package/dist/components/divider/index.d.ts +13 -0
  100. package/dist/components/divider/index.js +3 -0
  101. package/dist/components/icon/Icon.base.d.ts +32 -0
  102. package/dist/components/icon/Icon.base.js +35 -0
  103. package/dist/components/icon/Icon.base.js.map +1 -0
  104. package/dist/components/icon/Icon.types.d.ts +13 -0
  105. package/dist/components/icon/Icon.types.js +12 -0
  106. package/dist/components/icon/Icon.types.js.map +1 -0
  107. package/dist/components/icon/index.d.ts +13 -0
  108. package/dist/components/icon/index.js +3 -0
  109. package/dist/components/illustrated-message/IllustratedMessage.base.d.ts +46 -0
  110. package/dist/components/illustrated-message/IllustratedMessage.base.js +46 -0
  111. package/dist/components/illustrated-message/IllustratedMessage.base.js.map +1 -0
  112. package/dist/components/illustrated-message/IllustratedMessage.types.d.ts +15 -0
  113. package/dist/components/illustrated-message/IllustratedMessage.types.js +10 -0
  114. package/dist/components/illustrated-message/IllustratedMessage.types.js.map +1 -0
  115. package/dist/components/illustrated-message/index.d.ts +13 -0
  116. package/dist/components/illustrated-message/index.js +3 -0
  117. package/dist/components/meter/Meter.base.d.ts +40 -0
  118. package/dist/components/meter/Meter.base.js +30 -0
  119. package/dist/components/meter/Meter.base.js.map +1 -0
  120. package/dist/components/meter/Meter.types.d.ts +13 -0
  121. package/dist/components/meter/Meter.types.js +11 -0
  122. package/dist/components/meter/Meter.types.js.map +1 -0
  123. package/dist/components/meter/index.d.ts +13 -0
  124. package/dist/components/meter/index.js +3 -0
  125. package/dist/components/popover/Popover.base.d.ts +223 -0
  126. package/dist/components/popover/Popover.base.js +270 -0
  127. package/dist/components/popover/Popover.base.js.map +1 -0
  128. package/dist/components/popover/Popover.types.d.ts +39 -0
  129. package/dist/components/popover/Popover.types.js +24 -0
  130. package/dist/components/popover/Popover.types.js.map +1 -0
  131. package/dist/components/popover/index.d.ts +13 -0
  132. package/dist/components/popover/index.js +3 -0
  133. package/dist/components/progress-circle/ProgressCircle.base.d.ts +91 -0
  134. package/dist/components/progress-circle/ProgressCircle.base.js +73 -0
  135. package/dist/components/progress-circle/ProgressCircle.base.js.map +1 -0
  136. package/dist/components/progress-circle/ProgressCircle.types.d.ts +15 -0
  137. package/dist/components/progress-circle/ProgressCircle.types.js +10 -0
  138. package/dist/components/progress-circle/ProgressCircle.types.js.map +1 -0
  139. package/dist/components/progress-circle/index.d.ts +13 -0
  140. package/dist/components/progress-circle/index.js +3 -0
  141. package/dist/components/status-light/StatusLight.base.d.ts +65 -0
  142. package/dist/components/status-light/StatusLight.base.js +29 -0
  143. package/dist/components/status-light/StatusLight.base.js.map +1 -0
  144. package/dist/components/status-light/StatusLight.types.d.ts +19 -0
  145. package/dist/components/status-light/StatusLight.types.js +32 -0
  146. package/dist/components/status-light/StatusLight.types.js.map +1 -0
  147. package/dist/components/status-light/index.d.ts +13 -0
  148. package/dist/components/status-light/index.js +3 -0
  149. package/dist/components/tabs/Tab.base.d.ts +49 -0
  150. package/dist/components/tabs/Tab.base.js +39 -0
  151. package/dist/components/tabs/Tab.base.js.map +1 -0
  152. package/dist/components/tabs/Tab.types.d.ts +17 -0
  153. package/dist/components/tabs/TabPanel.base.d.ts +49 -0
  154. package/dist/components/tabs/TabPanel.base.js +36 -0
  155. package/dist/components/tabs/TabPanel.base.js.map +1 -0
  156. package/dist/components/tabs/TabPanel.types.d.ts +17 -0
  157. package/dist/components/tabs/Tabs.base.d.ts +235 -0
  158. package/dist/components/tabs/Tabs.base.js +225 -0
  159. package/dist/components/tabs/Tabs.base.js.map +1 -0
  160. package/dist/components/tabs/Tabs.types.d.ts +55 -0
  161. package/dist/components/tabs/Tabs.types.js +6 -0
  162. package/dist/components/tabs/Tabs.types.js.map +1 -0
  163. package/dist/components/tabs/index.d.ts +17 -0
  164. package/dist/components/tabs/index.js +5 -0
  165. package/dist/components/tooltip/Tooltip.base.d.ts +154 -0
  166. package/dist/components/tooltip/Tooltip.base.js +163 -0
  167. package/dist/components/tooltip/Tooltip.base.js.map +1 -0
  168. package/dist/components/tooltip/Tooltip.types.d.ts +18 -0
  169. package/dist/components/tooltip/Tooltip.types.js +15 -0
  170. package/dist/components/tooltip/Tooltip.types.js.map +1 -0
  171. package/dist/components/tooltip/index.d.ts +13 -0
  172. package/dist/components/tooltip/index.js +3 -0
  173. package/dist/controllers/color-controller/index.d.ts +12 -0
  174. package/dist/controllers/color-controller/index.js +1 -0
  175. package/dist/controllers/color-controller/src/color-controller.d.ts +226 -0
  176. package/dist/controllers/color-controller/src/color-controller.js +252 -0
  177. package/dist/controllers/color-controller/src/color-controller.js.map +1 -0
  178. package/dist/controllers/focusgroup-navigation-controller/index.d.ts +12 -0
  179. package/dist/controllers/focusgroup-navigation-controller/src/focusgroup-navigation-controller.d.ts +477 -0
  180. package/dist/controllers/focusgroup-navigation-controller/src/focusgroup-navigation-controller.js +342 -0
  181. package/dist/controllers/focusgroup-navigation-controller/src/focusgroup-navigation-controller.js.map +1 -0
  182. package/dist/controllers/hover-controller/index.d.ts +12 -0
  183. package/dist/controllers/hover-controller/src/hover-controller.d.ts +118 -0
  184. package/dist/controllers/hover-controller/src/hover-controller.js +90 -0
  185. package/dist/controllers/hover-controller/src/hover-controller.js.map +1 -0
  186. package/dist/controllers/index.d.ts +20 -0
  187. package/dist/controllers/index.js +11 -0
  188. package/dist/controllers/language-resolution.d.ts +87 -0
  189. package/dist/controllers/language-resolution.js +56 -0
  190. package/dist/controllers/language-resolution.js.map +1 -0
  191. package/dist/controllers/page-scroll-lock.d.ts +20 -0
  192. package/dist/controllers/page-scroll-lock.js +30 -0
  193. package/dist/controllers/page-scroll-lock.js.map +1 -0
  194. package/dist/controllers/placement-controller/index.d.ts +12 -0
  195. package/dist/controllers/placement-controller/index.js +3 -0
  196. package/dist/controllers/placement-controller/src/fallback-placements.d.ts +9 -0
  197. package/dist/controllers/placement-controller/src/fallback-placements.js +71 -0
  198. package/dist/controllers/placement-controller/src/fallback-placements.js.map +1 -0
  199. package/dist/controllers/placement-controller/src/placement-controller.d.ts +152 -0
  200. package/dist/controllers/placement-controller/src/placement-controller.js +129 -0
  201. package/dist/controllers/placement-controller/src/placement-controller.js.map +1 -0
  202. package/dist/controllers/placement-controller/src/placement-conversion.d.ts +35 -0
  203. package/dist/controllers/placement-controller/src/placement-conversion.js +54 -0
  204. package/dist/controllers/placement-controller/src/placement-conversion.js.map +1 -0
  205. package/dist/controllers/placement-controller/src/types.d.ts +128 -0
  206. package/dist/controllers/placement-controller/src/types.js +29 -0
  207. package/dist/controllers/placement-controller/src/types.js.map +1 -0
  208. package/dist/controllers/slot-attribute-propagation/index.d.ts +12 -0
  209. package/dist/controllers/slot-attribute-propagation/src/slot-attribute-propagation-controller.d.ts +55 -0
  210. package/dist/controllers/slot-attribute-propagation/src/slot-attribute-propagation-controller.js +32 -0
  211. package/dist/controllers/slot-attribute-propagation/src/slot-attribute-propagation-controller.js.map +1 -0
  212. package/dist/element/define-element.d.ts +16 -0
  213. package/dist/element/define-element.js +8 -0
  214. package/dist/element/define-element.js.map +1 -0
  215. package/dist/element/index.d.ts +14 -0
  216. package/dist/element/index.js +4 -0
  217. package/dist/element/spectrum-element.d.ts +26 -0
  218. package/dist/element/spectrum-element.js +66 -0
  219. package/dist/element/spectrum-element.js.map +1 -0
  220. package/dist/element/version.d.ts +19 -0
  221. package/dist/element/version.js +6 -0
  222. package/dist/element/version.js.map +1 -0
  223. package/dist/mixins/disabled-mixin.d.ts +30 -0
  224. package/dist/mixins/disabled-mixin.js +27 -0
  225. package/dist/mixins/disabled-mixin.js.map +1 -0
  226. package/dist/mixins/index.d.ts +17 -0
  227. package/dist/mixins/index.js +6 -0
  228. package/dist/mixins/linear-progress-mixin.d.ts +42 -0
  229. package/dist/mixins/linear-progress-mixin.js +111 -0
  230. package/dist/mixins/linear-progress-mixin.js.map +1 -0
  231. package/dist/mixins/observe-slot-presence.d.ts +12 -0
  232. package/dist/mixins/observe-slot-presence.js +40 -0
  233. package/dist/mixins/observe-slot-presence.js.map +1 -0
  234. package/dist/mixins/observe-slot-text.d.ts +11 -0
  235. package/dist/mixins/observe-slot-text.js +60 -0
  236. package/dist/mixins/observe-slot-text.js.map +1 -0
  237. package/dist/mixins/sized-mixin.d.ts +21 -0
  238. package/dist/mixins/sized-mixin.js +42 -0
  239. package/dist/mixins/sized-mixin.js.map +1 -0
  240. package/dist/utils/actual-placement.d.ts +10 -0
  241. package/dist/utils/actual-placement.js +8 -0
  242. package/dist/utils/actual-placement.js.map +1 -0
  243. package/dist/utils/capitalize.d.ts +26 -0
  244. package/dist/utils/capitalize.js +8 -0
  245. package/dist/utils/capitalize.js.map +1 -0
  246. package/dist/utils/deep-contains.d.ts +26 -0
  247. package/dist/utils/deep-contains.js +14 -0
  248. package/dist/utils/deep-contains.js.map +1 -0
  249. package/dist/utils/dismissible-stack.d.ts +26 -0
  250. package/dist/utils/dismissible-stack.js +16 -0
  251. package/dist/utils/dismissible-stack.js.map +1 -0
  252. package/dist/utils/focusable-selectors.d.ts +43 -0
  253. package/dist/utils/focusable-selectors.js +18 -0
  254. package/dist/utils/focusable-selectors.js.map +1 -0
  255. package/dist/utils/get-active-element.d.ts +31 -0
  256. package/dist/utils/get-active-element.js +11 -0
  257. package/dist/utils/get-active-element.js.map +1 -0
  258. package/dist/utils/get-label-from-slot.d.ts +12 -0
  259. package/dist/utils/get-label-from-slot.js +10 -0
  260. package/dist/utils/get-label-from-slot.js.map +1 -0
  261. package/dist/utils/index.d.ts +20 -0
  262. package/dist/utils/index.js +10 -0
  263. package/dist/utils/resolve-trigger.d.ts +42 -0
  264. package/dist/utils/resolve-trigger.js +23 -0
  265. package/dist/utils/resolve-trigger.js.map +1 -0
  266. package/dist/utils/transition.d.ts +53 -0
  267. package/dist/utils/transition.js +26 -0
  268. package/dist/utils/transition.js.map +1 -0
  269. package/package.json +400 -0
@@ -0,0 +1,43 @@
1
+ //#region components/badge/Badge.types.ts
2
+ var e = [
3
+ "s",
4
+ "m",
5
+ "l",
6
+ "xl"
7
+ ], t = [
8
+ "accent",
9
+ "informative",
10
+ "neutral",
11
+ "positive",
12
+ "notice",
13
+ "negative"
14
+ ], n = [
15
+ "fuchsia",
16
+ "indigo",
17
+ "magenta",
18
+ "purple",
19
+ "seafoam",
20
+ "yellow",
21
+ "gray",
22
+ "red",
23
+ "orange",
24
+ "chartreuse",
25
+ "celery",
26
+ "green",
27
+ "cyan",
28
+ "blue",
29
+ "pink",
30
+ "turquoise",
31
+ "brown",
32
+ "cinnamon",
33
+ "silver"
34
+ ], r = [
35
+ "block-start",
36
+ "block-end",
37
+ "inline-start",
38
+ "inline-end"
39
+ ], i = [...t, ...n];
40
+ //#endregion
41
+ export { e as BADGE_VALID_SIZES, i as BADGE_VARIANTS, n as BADGE_VARIANTS_COLOR, t as BADGE_VARIANTS_SEMANTIC, r as FIXED_VALUES };
42
+
43
+ //# sourceMappingURL=Badge.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Badge.types.js","names":[],"sources":["../../../components/badge/Badge.types.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 { ElementSize } from '@adobe/spectrum-wc-core/mixins/index.js';\n\n// ──────────────────\n// SHARED\n// ──────────────────\n\nexport const BADGE_VALID_SIZES = [\n 's',\n 'm',\n 'l',\n 'xl',\n] as const satisfies readonly ElementSize[];\n\nexport const BADGE_VARIANTS_SEMANTIC = [\n 'accent',\n 'informative',\n 'neutral',\n 'positive',\n 'notice',\n 'negative',\n] as const;\n\nexport const BADGE_VARIANTS_COLOR = [\n 'fuchsia',\n 'indigo',\n 'magenta',\n 'purple',\n 'seafoam',\n 'yellow',\n 'gray',\n 'red',\n 'orange',\n 'chartreuse',\n 'celery',\n 'green',\n 'cyan',\n 'blue',\n 'pink',\n 'turquoise',\n 'brown',\n 'cinnamon',\n 'silver',\n] as const;\n\nexport const FIXED_VALUES = [\n 'block-start',\n 'block-end',\n 'inline-start',\n 'inline-end',\n] as const;\n\n// ──────────────────\n// CANONICAL\n// ──────────────────\n\nexport const BADGE_VARIANTS = [\n ...BADGE_VARIANTS_SEMANTIC,\n ...BADGE_VARIANTS_COLOR,\n] as const;\n\n// ──────────────────\n// TYPES\n// ──────────────────\n\n// Shared\nexport type FixedValues = (typeof FIXED_VALUES)[number];\nexport type BadgeSize = (typeof BADGE_VALID_SIZES)[number];\nexport type BadgeSemanticVariant = (typeof BADGE_VARIANTS_SEMANTIC)[number];\n\n// Canonical\nexport type BadgeColorVariant = (typeof BADGE_VARIANTS_COLOR)[number];\nexport type BadgeVariant = (typeof BADGE_VARIANTS)[number];\n"],"mappings":";AAkBA,IAAa,IAAoB;CAC/B;CACA;CACA;CACA;CACD,EAEY,IAA0B;CACrC;CACA;CACA;CACA;CACA;CACA;CACD,EAEY,IAAuB;CAClC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EAEY,IAAe;CAC1B;CACA;CACA;CACA;CACD,EAMY,IAAiB,CAC5B,GAAG,GACH,GAAG,EACJ"}
@@ -0,0 +1,13 @@
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
+ export * from './Badge.base.js';
13
+ export * from './Badge.types.js';
@@ -0,0 +1,3 @@
1
+ import { BADGE_VALID_SIZES as e, BADGE_VARIANTS as t, BADGE_VARIANTS_COLOR as n, BADGE_VARIANTS_SEMANTIC as r, FIXED_VALUES as i } from "./Badge.types.js";
2
+ import { BadgeBase as a } from "./Badge.base.js";
3
+ export { e as BADGE_VALID_SIZES, t as BADGE_VARIANTS, n as BADGE_VARIANTS_COLOR, r as BADGE_VARIANTS_SEMANTIC, a as BadgeBase, i as FIXED_VALUES };
@@ -0,0 +1,99 @@
1
+ import { PropertyValues } from 'lit';
2
+ import { SpectrumElement } from '../../element/index.js';
3
+ declare const ButtonBase_base: typeof SpectrumElement & {
4
+ new (...args: any[]): import('../../mixins/index.js').SlotPresenceObservingInterface;
5
+ prototype: import('../../mixins/index.js').SlotPresenceObservingInterface;
6
+ } & {
7
+ new (...args: any[]): import('../../mixins/index.js').SlotTextObservingInterface;
8
+ prototype: import('../../mixins/index.js').SlotTextObservingInterface;
9
+ } & {
10
+ new (...args: any[]): import('../../mixins/index.js').SizedElementInterface;
11
+ prototype: import('../../mixins/index.js').SizedElementInterface;
12
+ } & import('../../mixins/index.js').SizedElementConstructor;
13
+ /**
14
+ * Abstract base class for all button-like components. Owns shared semantic
15
+ * concerns: interaction state, sizing, slot-derived icon/label state,
16
+ * accessible-name resolution, and host-to-internal-button attribute forwarding.
17
+ *
18
+ * Visual API specific to `sp-button` (`variant`, `fill-style`, `static-color`)
19
+ * is intentionally absent so that ActionButton, ClearButton, CloseButton,
20
+ * PickerButton, and InfieldButton can extend this base without inheriting
21
+ * the `swc-button` visual surface.
22
+ *
23
+ * @slot - Visible button label.
24
+ * @slot icon - Optional leading icon.
25
+ *
26
+ * @attribute {ElementSize} size - The size of the button.
27
+ *
28
+ * @todo We currently have 3 levels of mixins on this class, but the mixin
29
+ * composition guide recommends a maximum of 2. Explore reducing after milestone 2.
30
+ */
31
+ export declare abstract class ButtonBase extends ButtonBase_base {
32
+ static shadowRootOptions: ShadowRootInit;
33
+ /**
34
+ * Whether the button is disabled. Removes focusability and prevents
35
+ * interaction.
36
+ */
37
+ 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
+ /**
44
+ * Accessible label forwarded to the internal `<button>` element as
45
+ * `aria-label`. Required for icon-only buttons, which have no visible text.
46
+ */
47
+ 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
+ protected get hasIcon(): boolean;
63
+ 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
+ /**
81
+ * Returns the set of attributes that should be forwarded to the internal
82
+ * semantic `<button>` element, if not otherwise directly managed.
83
+ *
84
+ * @internal
85
+ */
86
+ protected getForwardedButtonAttributes(): Record<string, string | boolean | undefined>;
87
+ connectedCallback(): void;
88
+ disconnectedCallback(): void;
89
+ /**
90
+ * Suppresses click activation while the button is `disabled` or `pending`.
91
+ *
92
+ * Slotted icon content lives in the light DOM, so pointer clicks on icons
93
+ * bypass the disabled inner `<button>` and bubble on the host. The host
94
+ * listener (capture) and inner `@click` binding both call this handler.
95
+ */
96
+ protected readonly handleClick: (event: Event) => void;
97
+ protected update(changedProperties: PropertyValues): void;
98
+ }
99
+ export {};
@@ -0,0 +1,75 @@
1
+ import { __decorate as e } from "../../_virtual/_@oxc-project_runtime@0.124.0/helpers/decorate.js";
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";
6
+ //#region components/button/Button.base.ts
7
+ var c, l = class extends s(o(a(i, "[slot=\"icon\"]"), ""), { validSizes: t }) {
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());
11
+ };
12
+ }
13
+ get hasIcon() {
14
+ return this.slotContentIsPresent;
15
+ }
16
+ get hasLabel() {
17
+ return this.slotHasContent;
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
+ getForwardedButtonAttributes() {
29
+ return {
30
+ disabled: this.disabled,
31
+ "aria-disabled": this.pending && !this.disabled ? "true" : void 0
32
+ };
33
+ }
34
+ connectedCallback() {
35
+ super.connectedCallback(), this.addEventListener("click", this.handleClick, !0);
36
+ }
37
+ disconnectedCallback() {
38
+ this.removeEventListener("click", this.handleClick, !0), this._pendingTimer !== null && (clearTimeout(this._pendingTimer), this._pendingTimer = null), this.pendingActive = !1, super.disconnectedCallback();
39
+ }
40
+ update(e) {
41
+ 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"] }));
54
+ }
55
+ };
56
+ c = l, c.shadowRootOptions = {
57
+ ...i.shadowRootOptions,
58
+ delegatesFocus: !0
59
+ }, e([n({
60
+ type: Boolean,
61
+ reflect: !0
62
+ })], l.prototype, "disabled", void 0), e([n({
63
+ type: Boolean,
64
+ reflect: !0
65
+ })], l.prototype, "pending", void 0), e([n({
66
+ type: String,
67
+ 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);
72
+ //#endregion
73
+ export { l as ButtonBase };
74
+
75
+ //# sourceMappingURL=Button.base.js.map
@@ -0,0 +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"}
@@ -0,0 +1,19 @@
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
+ export declare const BUTTON_VALID_SIZES: readonly ["s", "m", "l", "xl"];
13
+ export declare const BUTTON_VARIANTS: readonly ["primary", "secondary", "accent", "negative"];
14
+ export declare const BUTTON_FILL_STYLES: readonly ["fill", "outline"];
15
+ export declare const BUTTON_STATIC_COLORS: readonly ["white", "black"];
16
+ export type ButtonSize = (typeof BUTTON_VALID_SIZES)[number];
17
+ export type ButtonVariant = (typeof BUTTON_VARIANTS)[number];
18
+ export type ButtonFillStyle = (typeof BUTTON_FILL_STYLES)[number];
19
+ export type ButtonStaticColor = (typeof BUTTON_STATIC_COLORS)[number];
@@ -0,0 +1,16 @@
1
+ //#region components/button/Button.types.ts
2
+ var e = [
3
+ "s",
4
+ "m",
5
+ "l",
6
+ "xl"
7
+ ], t = [
8
+ "primary",
9
+ "secondary",
10
+ "accent",
11
+ "negative"
12
+ ], n = ["fill", "outline"], r = ["white", "black"];
13
+ //#endregion
14
+ export { n as BUTTON_FILL_STYLES, r as BUTTON_STATIC_COLORS, e as BUTTON_VALID_SIZES, t as BUTTON_VARIANTS };
15
+
16
+ //# sourceMappingURL=Button.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.types.js","names":[],"sources":["../../../components/button/Button.types.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 { ElementSize } from '@adobe/spectrum-wc-core/mixins/index.js';\n\n// ──────────────────\n// SHARED\n// ──────────────────\n\nexport const BUTTON_VALID_SIZES = [\n 's',\n 'm',\n 'l',\n 'xl',\n] as const satisfies readonly ElementSize[];\n\nexport const BUTTON_VARIANTS = [\n 'primary',\n 'secondary',\n 'accent',\n 'negative',\n] as const;\n\nexport const BUTTON_FILL_STYLES = ['fill', 'outline'] as const;\n\nexport const BUTTON_STATIC_COLORS = ['white', 'black'] as const;\n\n// ──────────────────\n// TYPES\n// ──────────────────\n\nexport type ButtonSize = (typeof BUTTON_VALID_SIZES)[number];\nexport type ButtonVariant = (typeof BUTTON_VARIANTS)[number];\nexport type ButtonFillStyle = (typeof BUTTON_FILL_STYLES)[number];\nexport type ButtonStaticColor = (typeof BUTTON_STATIC_COLORS)[number];\n"],"mappings":";AAkBA,IAAa,IAAqB;CAChC;CACA;CACA;CACA;CACD,EAEY,IAAkB;CAC7B;CACA;CACA;CACA;CACD,EAEY,IAAqB,CAAC,QAAQ,UAAU,EAExC,IAAuB,CAAC,SAAS,QAAQ"}
@@ -0,0 +1,13 @@
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
+ export * from './Button.base.js';
13
+ export * from './Button.types.js';
@@ -0,0 +1,3 @@
1
+ import { BUTTON_FILL_STYLES as e, BUTTON_STATIC_COLORS as t, BUTTON_VALID_SIZES as n, BUTTON_VARIANTS as r } from "./Button.types.js";
2
+ import { ButtonBase as i } from "./Button.base.js";
3
+ export { e as BUTTON_FILL_STYLES, t as BUTTON_STATIC_COLORS, n as BUTTON_VALID_SIZES, r as BUTTON_VARIANTS, i as ButtonBase };
@@ -0,0 +1,89 @@
1
+ import { PropertyValues } from 'lit';
2
+ import { SpectrumElement } from '../../element/index.js';
3
+ import { ButtonGroupAlignment, ButtonGroupOrientation, ButtonGroupSize } from './ButtonGroup.types.js';
4
+ declare const ButtonGroupBase_base: typeof SpectrumElement & {
5
+ new (...args: any[]): import('../../mixins/index.js').SizedElementInterface;
6
+ prototype: import('../../mixins/index.js').SizedElementInterface;
7
+ } & import('../../mixins/index.js').SizedElementConstructor;
8
+ /**
9
+ * A button group clusters related actions together, providing consistent
10
+ * spacing, sizing, and orientation. The host exposes `role="group"` and
11
+ * propagates `size` and `disabled` to slotted button children.
12
+ *
13
+ * This base class owns shared logic and accessibility semantics. Rendering
14
+ * and styling live in the concrete SWC subclass.
15
+ *
16
+ * @slot - One or more `swc-button` elements.
17
+ *
18
+ * @attribute {ElementSize} size - The size of the button group and its children.
19
+ */
20
+ export declare abstract class ButtonGroupBase extends ButtonGroupBase_base {
21
+ /**
22
+ * The size of the button group. Propagated to all slotted button children.
23
+ *
24
+ * @default m
25
+ */
26
+ size: ButtonGroupSize;
27
+ /**
28
+ * @internal
29
+ *
30
+ * Valid orientation values for validation.
31
+ */
32
+ static readonly ORIENTATIONS: readonly string[];
33
+ /**
34
+ * @internal
35
+ *
36
+ * Valid alignment values for validation.
37
+ */
38
+ static readonly ALIGNMENTS: readonly string[];
39
+ /**
40
+ * The layout direction of the button group.
41
+ *
42
+ * Note: this property does NOT set `aria-orientation` on the host because
43
+ * `aria-orientation` is only meaningful for roles that manage arrow-key
44
+ * navigation (e.g. `toolbar`, `listbox`). Since button-group uses
45
+ * sequential Tab navigation (not roving tabindex), the attribute would
46
+ * be invalid.
47
+ */
48
+ orientation: ButtonGroupOrientation;
49
+ /**
50
+ * Whether all buttons in the group are disabled. When `true`, forces
51
+ * every slotted button child to `disabled`. When `false`, children
52
+ * retain their individual disabled state — a button slotted with
53
+ * `disabled` remains disabled even when the group is enabled.
54
+ */
55
+ disabled: boolean;
56
+ /**
57
+ * The alignment of buttons within the group along the main axis.
58
+ */
59
+ align: ButtonGroupAlignment;
60
+ private buttons;
61
+ /**
62
+ * Tracks buttons that were individually disabled before the group
63
+ * forced all children disabled. Used to restore their state when
64
+ * the group becomes enabled again.
65
+ */
66
+ private individuallyDisabled;
67
+ private readonly _sizePropagation;
68
+ protected firstUpdated(changed: PropertyValues<this>): void;
69
+ protected update(changedProperties: PropertyValues): void;
70
+ protected updated(changed: PropertyValues<this>): void;
71
+ /**
72
+ * Handles slotchange events from the default slot. Ensures newly slotted
73
+ * children receive the current size and disabled state.
74
+ */
75
+ protected handleSlotchange(): void;
76
+ /**
77
+ * Propagates disabled state to slotted button children.
78
+ *
79
+ * Uses a one-directional model: when the group is disabled, all children
80
+ * are forced disabled (tracking which were already individually disabled).
81
+ * When the group is enabled, children are restored to their individual
82
+ * disabled state — a button slotted with `disabled` remains disabled.
83
+ *
84
+ * On slotchange when the group is enabled, buttons are not touched so
85
+ * their declarative `disabled` attribute is preserved.
86
+ */
87
+ private propagateDisabledToChildren;
88
+ }
89
+ export {};
@@ -0,0 +1,53 @@
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";
3
+ import { BUTTON_GROUP_ALIGNMENTS as n, BUTTON_GROUP_ORIENTATIONS as r, BUTTON_GROUP_SIZES as i } from "./ButtonGroup.types.js";
4
+ import { property as a, queryAssignedElements as o } from "lit/decorators.js";
5
+ import { SpectrumElement as s } from "@adobe/spectrum-wc-core/element/index.js";
6
+ import { SizedMixin as c } from "@adobe/spectrum-wc-core/mixins/index.js";
7
+ //#region components/button-group/ButtonGroup.base.ts
8
+ var l, u = class extends c(s, { validSizes: i }) {
9
+ constructor(...e) {
10
+ super(...e), this.orientation = "horizontal", this.disabled = !1, this.align = "start", this.individuallyDisabled = /* @__PURE__ */ new WeakSet(), this._sizePropagation = new t(this, {
11
+ attribute: "size",
12
+ getValue: () => this.size
13
+ });
14
+ }
15
+ firstUpdated(e) {
16
+ super.firstUpdated(e), this.setAttribute("role", "group");
17
+ }
18
+ update(e) {
19
+ var t;
20
+ if ((t = window.__swc) != null && t.DEBUG) {
21
+ let e = this.constructor;
22
+ e.ORIENTATIONS.includes(this.orientation) || window.__swc.warn(this, `<${this.localName}> element expects the "orientation" attribute to be one of the following:`, "https://opensource.adobe.com/spectrum-web-components/components/button-group/", { issues: [...e.ORIENTATIONS] }), e.ALIGNMENTS.includes(this.align) || window.__swc.warn(this, `<${this.localName}> element expects the "align" attribute to be one of the following:`, "https://opensource.adobe.com/spectrum-web-components/components/button-group/", { issues: [...e.ALIGNMENTS] });
23
+ }
24
+ super.update(e);
25
+ }
26
+ updated(e) {
27
+ if (super.updated(e), e.has("disabled")) {
28
+ let t = e.get("disabled");
29
+ (this.disabled || t) && this.propagateDisabledToChildren();
30
+ }
31
+ }
32
+ handleSlotchange() {
33
+ this._sizePropagation.propagate(), this.disabled && this.propagateDisabledToChildren();
34
+ }
35
+ propagateDisabledToChildren() {
36
+ for (let e of this.buttons) this.disabled ? (e.disabled && this.individuallyDisabled.add(e), e.disabled = !0) : e.disabled = this.individuallyDisabled.has(e);
37
+ this.disabled || (this.individuallyDisabled = /* @__PURE__ */ new WeakSet());
38
+ }
39
+ };
40
+ l = u, l.ORIENTATIONS = r, l.ALIGNMENTS = n, e([a({
41
+ type: String,
42
+ reflect: !0
43
+ })], u.prototype, "orientation", void 0), e([a({
44
+ type: Boolean,
45
+ reflect: !0
46
+ })], u.prototype, "disabled", void 0), e([a({
47
+ type: String,
48
+ reflect: !0
49
+ })], u.prototype, "align", void 0), e([o({ flatten: !0 })], u.prototype, "buttons", void 0);
50
+ //#endregion
51
+ export { u as ButtonGroupBase };
52
+
53
+ //# sourceMappingURL=ButtonGroup.base.js.map
@@ -0,0 +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"}
@@ -0,0 +1,17 @@
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
+ export declare const BUTTON_GROUP_SIZES: readonly ["s", "m", "l", "xl"];
13
+ export declare const BUTTON_GROUP_ORIENTATIONS: readonly ["horizontal", "vertical"];
14
+ export declare const BUTTON_GROUP_ALIGNMENTS: readonly ["start", "center", "end"];
15
+ export type ButtonGroupSize = (typeof BUTTON_GROUP_SIZES)[number];
16
+ export type ButtonGroupOrientation = (typeof BUTTON_GROUP_ORIENTATIONS)[number];
17
+ export type ButtonGroupAlignment = (typeof BUTTON_GROUP_ALIGNMENTS)[number];
@@ -0,0 +1,15 @@
1
+ //#region components/button-group/ButtonGroup.types.ts
2
+ var e = [
3
+ "s",
4
+ "m",
5
+ "l",
6
+ "xl"
7
+ ], t = ["horizontal", "vertical"], n = [
8
+ "start",
9
+ "center",
10
+ "end"
11
+ ];
12
+ //#endregion
13
+ export { n as BUTTON_GROUP_ALIGNMENTS, t as BUTTON_GROUP_ORIENTATIONS, e as BUTTON_GROUP_SIZES };
14
+
15
+ //# sourceMappingURL=ButtonGroup.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonGroup.types.js","names":[],"sources":["../../../components/button-group/ButtonGroup.types.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 { ElementSize } from '@adobe/spectrum-wc-core/mixins/index.js';\n\n// ──────────────────\n// SHARED\n// ──────────────────\n\nexport const BUTTON_GROUP_SIZES = [\n 's',\n 'm',\n 'l',\n 'xl',\n] as const satisfies readonly ElementSize[];\n\nexport const BUTTON_GROUP_ORIENTATIONS = ['horizontal', 'vertical'] as const;\n\nexport const BUTTON_GROUP_ALIGNMENTS = ['start', 'center', 'end'] as const;\n\n// ──────────────────\n// TYPES\n// ──────────────────\n\nexport type ButtonGroupSize = (typeof BUTTON_GROUP_SIZES)[number];\nexport type ButtonGroupOrientation = (typeof BUTTON_GROUP_ORIENTATIONS)[number];\nexport type ButtonGroupAlignment = (typeof BUTTON_GROUP_ALIGNMENTS)[number];\n"],"mappings":";AAkBA,IAAa,IAAqB;CAChC;CACA;CACA;CACA;CACD,EAEY,IAA4B,CAAC,cAAc,WAAW,EAEtD,IAA0B;CAAC;CAAS;CAAU;CAAM"}
@@ -0,0 +1,13 @@
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
+ export * from './ButtonGroup.base.js';
13
+ export * from './ButtonGroup.types.js';
@@ -0,0 +1,3 @@
1
+ import { BUTTON_GROUP_ALIGNMENTS as e, BUTTON_GROUP_ORIENTATIONS as t, BUTTON_GROUP_SIZES as n } from "./ButtonGroup.types.js";
2
+ import { ButtonGroupBase as r } from "./ButtonGroup.base.js";
3
+ export { e as BUTTON_GROUP_ALIGNMENTS, t as BUTTON_GROUP_ORIENTATIONS, n as BUTTON_GROUP_SIZES, r as ButtonGroupBase };