@luzmo/lucero 1.0.1-alpha.14 → 1.0.1-alpha.16

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 (275) hide show
  1. package/components/accordion/index.cjs +183 -6
  2. package/components/accordion/index.js +136 -88
  3. package/components/action-bar/index.cjs +85 -4
  4. package/components/action-bar/index.js +72 -50
  5. package/components/action-button/index.cjs +205 -3
  6. package/components/action-button/index.js +167 -93
  7. package/components/action-group/index.cjs +7 -1
  8. package/components/action-group/index.js +12 -8
  9. package/components/action-group-DHp8RHDf.js +392 -0
  10. package/components/action-group-MPf19RPV.cjs +391 -0
  11. package/components/action-menu/index.cjs +91 -11
  12. package/components/action-menu/index.js +66 -47
  13. package/components/avatar/index.cjs +63 -3
  14. package/components/avatar/index.js +54 -42
  15. package/components/base-COw9n7UR.cjs +119 -0
  16. package/components/base-DmeVy0cq.js +120 -0
  17. package/components/button/index.cjs +134 -2
  18. package/components/button/index.js +106 -72
  19. package/components/button-base-7Ak55xFd.cjs +206 -0
  20. package/components/button-base-C3kf6BTK.js +207 -0
  21. package/components/button-group/index.cjs +45 -1
  22. package/components/button-group/index.js +37 -25
  23. package/components/calendar/index.cjs +632 -1
  24. package/components/calendar/index.js +637 -7
  25. package/components/checkbox/index.cjs +111 -4
  26. package/components/checkbox/index.js +98 -53
  27. package/components/checkbox-mixin-8cL-vfDy.js +84 -0
  28. package/components/checkbox-mixin-CE7dJj3J.cjs +83 -0
  29. package/components/clear-button-Co6oKSgl.js +59 -0
  30. package/components/clear-button-X_HDY2eH.cjs +58 -0
  31. package/components/close-button-DPBK6Kpu.cjs +59 -0
  32. package/components/close-button-Miw9ZjoJ.js +60 -0
  33. package/components/color-area/index.cjs +440 -13
  34. package/components/color-area/index.js +322 -187
  35. package/components/color-controller-BjDZaxhX.js +491 -0
  36. package/components/color-controller-C3c_vb2P.cjs +490 -0
  37. package/components/color-field/index.cjs +95 -2
  38. package/components/color-field/index.js +77 -41
  39. package/components/color-handle/index.cjs +64 -3
  40. package/components/color-handle/index.js +58 -37
  41. package/components/color-loupe/index.cjs +7 -1
  42. package/components/color-loupe/index.js +12 -8
  43. package/components/color-loupe-BQqNR8YD.cjs +88 -0
  44. package/components/color-loupe-B_DDFv8l.js +89 -0
  45. package/components/color-menu/index.cjs +217 -12
  46. package/components/color-menu/index.js +187 -93
  47. package/components/color-palette/index.cjs +89 -1
  48. package/components/color-palette/index.js +78 -51
  49. package/components/color-palette-group/index.cjs +259 -3
  50. package/components/color-palette-group/index.js +193 -105
  51. package/components/color-picker/index.cjs +114 -6
  52. package/components/color-picker/index.js +92 -72
  53. package/components/color-slider/index.cjs +585 -1
  54. package/components/color-slider/index.js +590 -7
  55. package/components/{directive-oAbCiebi.js → condition-attribute-with-id-Cn815e9W.js} +22 -22
  56. package/components/condition-attribute-with-id-DEc2Yjne.cjs +43 -0
  57. package/components/date-time-picker/index.cjs +1357 -31
  58. package/components/date-time-picker/index.js +951 -637
  59. package/components/dependency-manger-CcIE1uvQ.cjs +63 -0
  60. package/components/{dependency-manger-CEXvGQUV.js → dependency-manger-XHpQjFgK.js} +24 -14
  61. package/components/divider/index.cjs +54 -1
  62. package/components/divider/index.js +49 -30
  63. package/components/divider.module-Cm5LcDRV.cjs +20 -0
  64. package/components/divider.module-DauH6k2_.js +21 -0
  65. package/components/element-resolution-DCsrhGZO.cjs +112 -0
  66. package/components/element-resolution-nMlmW4Jy.js +113 -0
  67. package/components/field-group/index.cjs +7 -1
  68. package/components/field-group/index.js +12 -8
  69. package/components/field-group-DNmY8W9v.cjs +86 -0
  70. package/components/field-group-DVdAWCQF.js +87 -0
  71. package/components/field-label/index.cjs +7 -1
  72. package/components/field-label/index.js +12 -8
  73. package/components/field-label-CKH9EXpR.cjs +156 -0
  74. package/components/field-label-Dpsecoc6.js +157 -0
  75. package/components/focus-group-BqDAk9Is.js +337 -0
  76. package/components/focus-group-DFzOlalL.cjs +336 -0
  77. package/components/focus-visible-B-B8-P9R.cjs +104 -0
  78. package/components/focus-visible-BUPRWlsh.js +105 -0
  79. package/components/focusable-BPrTcZPd.cjs +262 -0
  80. package/components/focusable-ChCLg1k4.js +263 -0
  81. package/components/{directive-C7oCP5Bh.cjs → focusable-selectors-D0t_5P7C.cjs} +16 -5
  82. package/components/{focusable-selectors-B4YgbghQ.js → focusable-selectors-IltOAOd9.js} +7 -4
  83. package/components/icon/index.cjs +90 -1
  84. package/components/icon/index.js +74 -46
  85. package/components/index.cjs +174 -1
  86. package/components/index.js +174 -172
  87. package/components/infield-button/index.cjs +46 -2
  88. package/components/infield-button/index.js +41 -30
  89. package/components/label/index.cjs +37 -1
  90. package/components/label/index.js +36 -24
  91. package/components/{language-resolution-8yZa5r_P.js → language-resolution-BSGJAWiQ.js} +21 -16
  92. package/components/language-resolution-iN9EImbb.cjs +57 -0
  93. package/components/like-anchor-D62faRNG.cjs +79 -0
  94. package/components/like-anchor-v3cJ9RWM.js +80 -0
  95. package/components/manage-help-text-BYx84zZR.cjs +125 -0
  96. package/components/manage-help-text-DOuMTGht.js +126 -0
  97. package/components/menu/index.cjs +1297 -29
  98. package/components/menu/index.js +954 -499
  99. package/components/multi-language-field/index.cjs +132 -2
  100. package/components/multi-language-field/index.js +118 -88
  101. package/components/number-field/index.cjs +613 -10
  102. package/components/number-field/index.js +442 -243
  103. package/components/observe-slot-presence-9AwLGUQ_.cjs +78 -0
  104. package/components/observe-slot-presence-DcMdoumP.js +79 -0
  105. package/components/observe-slot-text-CSofZeeF.cjs +104 -0
  106. package/components/observe-slot-text-CjnkkBPn.js +105 -0
  107. package/components/options/index.cjs +693 -60
  108. package/components/options/index.js +519 -953
  109. package/components/overlay/index.cjs +367 -21
  110. package/components/overlay/index.js +273 -189
  111. package/components/overlay-CN8ISP1F.js +2485 -0
  112. package/components/overlay-LViy9VWM.cjs +2484 -0
  113. package/components/{pending-state-DTX7ggyF.js → pending-state-CXbe-Xul.js} +28 -13
  114. package/components/pending-state-e4RbXe9u.cjs +75 -0
  115. package/components/picker/index.cjs +9 -1
  116. package/components/picker/index.js +15 -11
  117. package/components/picker-DNde3awt.cjs +672 -0
  118. package/components/picker-PfUAF05y.js +673 -0
  119. package/components/picker-button/index.cjs +56 -4
  120. package/components/picker-button/index.js +45 -34
  121. package/components/platform-CxDar3Dn.cjs +68 -0
  122. package/components/platform-Cxn0WbyT.js +69 -0
  123. package/components/popover/index.cjs +7 -1
  124. package/components/popover/index.js +12 -8
  125. package/components/popover-BkbYhl3i.js +74 -0
  126. package/components/popover-BkgUf0kL.cjs +74 -0
  127. package/components/progress-circle/index.cjs +7 -1
  128. package/components/progress-circle/index.js +12 -8
  129. package/components/progress-circle-Hu_ivPHf.js +133 -0
  130. package/components/progress-circle-_Etqsj9f.cjs +132 -0
  131. package/components/radio/index.cjs +244 -2
  132. package/components/radio/index.js +192 -110
  133. package/components/{when-CDK1Tt5Y.js → random-id-BE6HA503.cjs} +7 -10
  134. package/components/{random-id-ByCz1xaq.js → random-id-BEc6QIUL.js} +3 -3
  135. package/components/roving-tabindex-AsmAh2In.cjs +95 -0
  136. package/components/roving-tabindex-DPF9NmrH.js +96 -0
  137. package/components/search/index.cjs +115 -8
  138. package/components/search/index.js +96 -66
  139. package/components/select/index.cjs +720 -51
  140. package/components/select/index.js +563 -347
  141. package/components/sized-mixin-DmkrNdWB.js +80 -0
  142. package/components/sized-mixin-UaTVa-AE.cjs +79 -0
  143. package/components/slider/index.cjs +119 -1
  144. package/components/slider/index.js +100 -1113
  145. package/components/{condition-attribute-with-id-Dv4lSRbe.js → slottable-request-event-CANixJnR.cjs} +15 -13
  146. package/components/{slottable-request-event-DggLA4Rx.js → slottable-request-event-D9WzrdWv.js} +12 -9
  147. package/components/strategies-DlMlaSJR.cjs +317 -0
  148. package/components/strategies-DlPQoTFE.js +318 -0
  149. package/components/streaming-listener-D4sHaMub.cjs +145 -0
  150. package/components/streaming-listener-cAz5zJyk.js +146 -0
  151. package/components/swatch/index.cjs +436 -7
  152. package/components/swatch/index.js +350 -205
  153. package/components/switch/index.cjs +61 -2
  154. package/components/switch/index.js +51 -34
  155. package/components/tabs/index.cjs +693 -26
  156. package/components/tabs/index.js +521 -388
  157. package/components/tags/index.cjs +201 -4
  158. package/components/tags/index.js +152 -87
  159. package/components/text-field/index.cjs +49 -3
  160. package/components/text-field/index.js +44 -30
  161. package/components/text-field-11tcnftU.cjs +338 -0
  162. package/components/text-field-Chi9J2Cz.js +339 -0
  163. package/components/text-field.module-CMBS0jSL.js +21 -0
  164. package/components/text-field.module-DIJdV_sA.cjs +20 -0
  165. package/components/toast/index.cjs +177 -12
  166. package/components/toast/index.js +145 -73
  167. package/components/tooltip/index.cjs +221 -6
  168. package/components/tooltip/index.js +156 -109
  169. package/components/unit-input/index.cjs +232 -8
  170. package/components/unit-input/index.js +201 -108
  171. package/components/utils.cjs +25 -1
  172. package/components/utils.js +22 -22
  173. package/package.json +1 -1
  174. package/components/NumberFormatter-DewVDY5w.cjs +0 -18
  175. package/components/NumberFormatter-DgOUVrge.js +0 -136
  176. package/components/NumberParser-Dik4a0h-.cjs +0 -18
  177. package/components/NumberParser-ci9J5EKv.js +0 -173
  178. package/components/action-group-DBImibFn.js +0 -258
  179. package/components/action-group-DJGMcRHb.cjs +0 -20
  180. package/components/async-directive-BX1T1e1_.cjs +0 -22
  181. package/components/async-directive-BfcqVjDp.js +0 -82
  182. package/components/base-BjTwmyRF.cjs +0 -22
  183. package/components/base-CBCg3yyw.cjs +0 -40
  184. package/components/base-D76d76ww.js +0 -26
  185. package/components/base-WsynuqaS.js +0 -677
  186. package/components/button-base-DbkDzb71.js +0 -144
  187. package/components/button-base-XgPLmwP-.cjs +0 -25
  188. package/components/checkbox-mixin-BDN0dBtS.cjs +0 -27
  189. package/components/checkbox-mixin-Do7EgtpQ.js +0 -70
  190. package/components/class-map-Di1D_rCm.cjs +0 -22
  191. package/components/class-map-NbVXqBU0.js +0 -51
  192. package/components/clear-button-DQcRdcUa.js +0 -53
  193. package/components/clear-button-OFUFFe7G.cjs +0 -18
  194. package/components/close-button-Cbnb7XXj.cjs +0 -18
  195. package/components/close-button-CqHYZhum.js +0 -51
  196. package/components/color-controller-B0uX6Zso.js +0 -3230
  197. package/components/color-controller-CoUL5f9K.cjs +0 -18
  198. package/components/color-loupe-CaA_Lfkk.cjs +0 -56
  199. package/components/color-loupe-CmMsXbjT.js +0 -81
  200. package/components/condition-attribute-with-id-DrQYZzFS.cjs +0 -18
  201. package/components/dependency-manger-C5HCkMMB.cjs +0 -18
  202. package/components/directive-helpers-Cm6gitnu.js +0 -62
  203. package/components/directive-helpers-DyIRTWwA.cjs +0 -22
  204. package/components/divider.module-DDvBo9zo.cjs +0 -18
  205. package/components/divider.module-DoQWQEIJ.js +0 -21
  206. package/components/element-resolution-BvRLGqIU.cjs +0 -18
  207. package/components/element-resolution-FCUT-wql.js +0 -91
  208. package/components/field-group-DXfBWrkO.js +0 -66
  209. package/components/field-group-DkGst3r5.cjs +0 -23
  210. package/components/field-label-CZ2zzChK.js +0 -106
  211. package/components/field-label-mO1AkUgR.cjs +0 -25
  212. package/components/flow-D-0MTYCm.js +0 -527
  213. package/components/flow-DM3dNAKs.cjs +0 -30
  214. package/components/focus-group-DHeTq18L.js +0 -218
  215. package/components/focus-group-DnxZUBhQ.cjs +0 -18
  216. package/components/focus-visible-B0P9aY_G.cjs +0 -18
  217. package/components/focus-visible-DBlJGoEW.js +0 -74
  218. package/components/focusable-BxtpnzWp.js +0 -153
  219. package/components/focusable-EbipgXRh.cjs +0 -18
  220. package/components/focusable-selectors-BgFlyFcY.cjs +0 -18
  221. package/components/if-defined-C9YGdo33.cjs +0 -22
  222. package/components/if-defined-DOaE2coe.js +0 -27
  223. package/components/index-BwxgAdzi.cjs +0 -57
  224. package/components/index-Cl54m8Yh.js +0 -1490
  225. package/components/index-HjQa8tew.js +0 -1174
  226. package/components/index-Wq3qZJGh.cjs +0 -113
  227. package/components/language-resolution-DJzmyzZq.cjs +0 -18
  228. package/components/like-anchor-Bvn_vLQ8.js +0 -69
  229. package/components/like-anchor-sod1C1fR.cjs +0 -32
  230. package/components/luzmo-icons-4nDFv1Lq.js +0 -229
  231. package/components/luzmo-icons-D4IvHgVd.cjs +0 -29
  232. package/components/manage-help-text-DhgARkZX.cjs +0 -30
  233. package/components/manage-help-text-syYnjKGL.js +0 -92
  234. package/components/mutation-controller-DH7YOCyj.js +0 -52
  235. package/components/mutation-controller-DkOMCW-c.cjs +0 -22
  236. package/components/observe-slot-presence-CmVi0zTc.js +0 -68
  237. package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
  238. package/components/observe-slot-text-BPfIQQtz.js +0 -87
  239. package/components/observe-slot-text-Ceb7SvYT.cjs +0 -18
  240. package/components/overlay-Cig9r6uU.js +0 -2747
  241. package/components/overlay-KSKMzzkh.cjs +0 -47
  242. package/components/pending-state-CaH1si5b.cjs +0 -26
  243. package/components/picker-BfBP7XJN.js +0 -461
  244. package/components/picker-xIphqE6d.cjs +0 -123
  245. package/components/platform-BM-uMWpX.js +0 -69
  246. package/components/platform-BiXhwqk3.cjs +0 -18
  247. package/components/popover-DjX0aAnY.js +0 -67
  248. package/components/popover-KFfO0IYL.cjs +0 -30
  249. package/components/progress-circle-BvRJNuNo.cjs +0 -33
  250. package/components/progress-circle-DXH9z8-6.js +0 -97
  251. package/components/query-BL-TJj7K.cjs +0 -22
  252. package/components/query-D_KR_GUc.js +0 -51
  253. package/components/query-assigned-elements-DjfhL1cl.js +0 -36
  254. package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
  255. package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
  256. package/components/query-assigned-nodes-C76XVPWY.js +0 -36
  257. package/components/random-id-CqvckpWe.cjs +0 -18
  258. package/components/roving-tabindex-By_fCy_e.cjs +0 -18
  259. package/components/roving-tabindex-DOg4z6ZU.js +0 -66
  260. package/components/sized-mixin-CPxE5C96.cjs +0 -18
  261. package/components/sized-mixin-D4ACoVUr.js +0 -63
  262. package/components/slottable-request-event-BfUUt1Mh.cjs +0 -18
  263. package/components/state-D8JEtYqe.cjs +0 -22
  264. package/components/state-Deh-vKYE.js +0 -29
  265. package/components/strategies-9indNIEb.js +0 -195
  266. package/components/strategies-BACP6MhR.cjs +0 -18
  267. package/components/streaming-listener-B00MvALi.cjs +0 -18
  268. package/components/streaming-listener-CP-JE6Fa.js +0 -91
  269. package/components/style-map-CeilmSgs.cjs +0 -22
  270. package/components/style-map-IgqIKvlE.js +0 -53
  271. package/components/text-field-CeG75PPO.cjs +0 -85
  272. package/components/text-field-DCl-AFM-.js +0 -314
  273. package/components/text-field.module-C2KVUJcX.js +0 -21
  274. package/components/text-field.module-DXhFA9G-.cjs +0 -18
  275. package/components/when-CDZyJPvd.cjs +0 -22
@@ -15,34 +15,50 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- import { y as z, R as v } from "../luzmo-icons-4nDFv1Lq.js";
19
- import { x as u, r as m, n as l, a as w } from "../base-WsynuqaS.js";
20
- import { o as x } from "../if-defined-DOaE2coe.js";
21
- import { n as b } from "../when-CDK1Tt5Y.js";
22
- import { F as y } from "../focusable-BxtpnzWp.js";
23
- import { S as p } from "../sized-mixin-D4ACoVUr.js";
24
- import { s as k } from "../mutation-controller-DH7YOCyj.js";
25
- import { o as S } from "../query-assigned-elements-DjfhL1cl.js";
26
- import { R as C } from "../roving-tabindex-DOg4z6ZU.js";
27
- const g = () => {
28
- if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
29
- const c = document.createElement("style");
30
- c.setAttribute("data-luzmo-vars", ""), c.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(c);
18
+ const initializeGlobalLuzmoCSSVariables = () => {
19
+ if (typeof document !== "undefined" && !document.querySelector("style[data-luzmo-vars]")) {
20
+ const styleElement = document.createElement("style");
21
+ styleElement.setAttribute("data-luzmo-vars", "");
22
+ styleElement.textContent = `html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}`;
23
+ document.head.appendChild(styleElement);
31
24
  }
32
25
  };
33
- g();
34
- const A = '@media (forced-colors: active){:host{--highcontrast-swatch-disabled-icon-color: GrayText;--highcontrast-swatch-focus-indicator-color: ButtonText;--highcontrast-swatch-background-color-selected: Background;--highcontrast-swatch-border-color-selected: Highlight;--highcontrast-swatch-border-color: ButtonText;--highcontrast-swatch-fill-foreground-color: ButtonText}.fill{forced-color-adjust:none}:host([disabled]){--highcontrast-swatch-border-color: GrayText}}:host{box-sizing:border-box;inline-size:var(--luzmo-swatch-size, var(--swatch-size));block-size:var(--luzmo-swatch-size, var(--swatch-size));-webkit-user-select:none;user-select:none;outline:none;justify-content:center;align-items:center;display:flex;position:relative}.disabled-icon{inline-size:var(--luzmo-swatch-disabled-icon-size, var(--swatch-disabled-icon-size));block-size:var(--luzmo-swatch-disabled-icon-size, var(--swatch-disabled-icon-size))}:host,:host:before{border-radius:var(--luzmo-swatch-border-radius, var(--swatch-border-radius))}:host([selected]){background-color:var(--highcontrast-swatch-background-color-selected, var(--luzmo-swatch-inner-border-color-selected, var(--swatch-inner-border-color-selected)))}:host([selected]) .fill:before{box-shadow:none;border-radius:0}:host([selected]):before{opacity:1}:host .is-image .fill:before{background-color:initial}:host([mixed-value]) .fill{background:none;background:var(--picked-color, transparent)}:host([mixed-value]) .mixed-value-icon{color:var(--swatch-dash-icon-color);display:block}:host([nothing]) .fill{background-color:initial;background-color:var(--picked-color, transparent);background-image:none}:host([nothing]) .fill:after{inline-size:var(--luzmo-swatch-slash-thickness, var(--swatch-slash-thickness));content:"";block-size:200%;background:var(--highcontrast-swatch-fill-foreground-color, var(--luzmo-swatch-slash-icon-color, var(--swatch-slash-icon-color)));position:absolute;transform:rotate(-45deg)}:host([nothing][shape=rectangle]) .fill:after{transform:rotate(-25deg)}:host([disabled]) .disabled-icon{display:block}:host:before{content:"";border-width:var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected));border-style:solid;border-color:var(--highcontrast-swatch-border-color-selected, var(--luzmo-swatch-border-color-selected, var(--swatch-border-color-selected)));opacity:0;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}:host:after{content:"";inset:calc(var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)) * -2);background-color:var(--luzmo-swatch-focus-indicator-background-color, var(--luzmo-background-color));z-index:-1;opacity:0;border-width:var(--luzmo-swatch-focus-indicator-width, var(--swatch-focus-indicator-width));border-style:solid;border-color:var(--highcontrast-swatch-focus-indicator-color, var(--luzmo-swatch-focus-indicator-color, var(--swatch-focus-indicator-color)));border-radius:var(--luzmo-swatch-focus-indicator-border-radius, var(--swatch-focus-indicator-border-radius));transition:opacity var(--luzmo-animation-duration) ease-in-out;position:absolute}:host(:focus-visible):after{opacity:1}.fill{inline-size:100%;block-size:100%;box-sizing:border-box;border-radius:var(--luzmo-swatch-border-radius, var(--swatch-border-radius));justify-content:center;align-items:center;display:flex;position:relative;overflow:hidden}.fill:before{content:"";z-index:0;box-sizing:border-box;box-shadow:inset 0 0 0 var(--luzmo-swatch-border-thickness, var(--swatch-border-thickness)) var(--highcontrast-swatch-border-color, var(--luzmo-swatch-border-color, var(--swatch-border-color)));border-radius:var(--luzmo-swatch-border-radius, var(--swatch-border-radius));position:absolute;top:0;right:0;bottom:0;left:0}:host([border=none]) .fill:before,.fill:before{background-color:initial;background-color:var(--picked-color, transparent)}:host([border=none]) .fill:before{box-shadow:none}.mixed-value-icon{pointer-events:none;color:#0000;color:var(--picked-color, transparent);display:none}.disabled-icon{z-index:1;pointer-events:none;color:var(--highcontrast-swatch-disabled-icon-color, var(--luzmo-swatch-disabled-icon-color, var(--swatch-disabled-icon-color)));stroke:var(--highcontrast-swatch-disabled-icon-color, var(--luzmo-swatch-disabled-icon-color, var(--swatch-disabled-icon-color)));display:none;position:relative}.disabled-icon path:first-child{fill:var(--highcontrast-swatch-disabled-icon-color, var(--luzmo-swatch-disabled-icon-color, var(--swatch-disabled-icon-color)))}.disabled-icon path:last-child{fill:var(--luzmo-swatch-icon-border-color, var(--swatch-icon-border-color))}:host([shape=rectangle]){inline-size:calc(var(--luzmo-swatch-size, var(--swatch-size)) * 2)}:host([rounding=none]),:host([rounding=none]) .fill,:host([rounding=none]) .fill:before,:host([rounding=none][selected]) .fill,:host([rounding=none][selected]) .fill:before,:host([rounding=none]):after,:host([rounding=none]):before{border-radius:0}:host([rounding=full][selected]:not([shape=rectangle])) .fill,:host([rounding=full][selected]:not([shape=rectangle])) .fill:before,:host([rounding=full]:not([shape=rectangle])),:host([rounding=full]:not([shape=rectangle])) .fill,:host([rounding=full]:not([shape=rectangle])) .fill:before,:host([rounding=full]:not([shape=rectangle])):after,:host([rounding=full]:not([shape=rectangle])):before{border-radius:100%}:host([selected]) .fill{width:calc(var(--luzmo-swatch-size, var(--swatch-size)) - 2 * var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)));height:calc(var(--luzmo-swatch-size, var(--swatch-size)) - 2 * var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)))}:host([selected][shape=rectangle]) .fill{width:calc(var(--luzmo-swatch-size, var(--swatch-size)) * 2 - 2 * var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)))}::slotted([slot=image]){object-fit:contain;inline-size:100%;block-size:100%;transition:width var(--luzmo-animation-duration) ease-in-out,height var(--luzmo-animation-duration) ease-in-out}:host([size=xl]){--swatch-size: var(--luzmo-component-height-xl);--swatch-disabled-icon-size: 24px;--swatch-slash-thickness: 6px}:host([size=l]){--swatch-size: var(--luzmo-component-height-l);--swatch-disabled-icon-size: 20px;--swatch-slash-thickness: 5px}:host([size=s]){--swatch-size: var(--luzmo-component-height-s);--swatch-disabled-icon-size: 16px;--swatch-slash-thickness: 3px}:host([size=xs]){--swatch-size: var(--luzmo-component-height-xs);--swatch-disabled-icon-size: 16px;--swatch-slash-thickness: 2px}:host([size=xxs]){--swatch-size: var(--luzmo-component-height-xxs);--swatch-disabled-icon-size: 14px;--swatch-slash-thickness: 2px}:host{--swatch-size: var(--luzmo-component-height);--swatch-disabled-icon-size: 18px;--swatch-slash-thickness: 4px}:host{--swatch-border-radius: var(--luzmo-border-radius-s);--swatch-focus-indicator-border-radius: var(--luzmo-border-radius-s);--swatch-border-thickness: var(--luzmo-border-width);--swatch-border-thickness-selected: var(--luzmo-border-width);--swatch-focus-indicator-width: var(--luzmo-indicator-width);--swatch-focus-indicator-gap: var(--luzmo-indicator-gap);--swatch-border-color: var(--luzmo-border-color-down);--swatch-icon-border-color: var(--luzmo-border-color);--swatch-border-color-selected: var(--luzmo-border-color-full-down);--swatch-inner-border-color-selected: var(--luzmo-background-color);--swatch-disabled-icon-color: rgb(255, 255, 255);--swatch-dash-icon-color: var(--luzmo-font-color);--swatch-slash-icon-color: var(--luzmo-negative-color);--swatch-focus-indicator-color: var(--luzmo-primary)}.fill:before{background:var(--picked-color, transparent)}:host([border=none]) .fill:before{background:var(--picked-color, transparent)}:host .is-image .fill:before{background:#0000}:host .opacity-checkerboard{background:repeating-conic-gradient(var(--luzmo-swatch-checkerboard-light, rgb(255, 255, 255)) 0 25%,var(--luzmo-swatch-checkerboard-dark, rgb(230, 230, 230)) 0 50%) var(--luzmo-swatch-checkerboard-position, left top)/calc(var(--luzmo-swatch-checkerboard-size, 8px) * 2) calc(var(--luzmo-swatch-checkerboard-size, 8px) * 2)}';
35
- var E = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, n = (c, e, o, r) => {
36
- for (var t = r > 1 ? void 0 : r ? _(e, o) : e, s = c.length - 1, i; s >= 0; s--)
37
- (i = c[s]) && (t = (r ? i(e, o, t) : i(t)) || t);
38
- return r && t && E(e, o, t), t;
26
+ initializeGlobalLuzmoCSSVariables();
27
+ import { luzmoIcon, luzmoDash } from "@luzmo/icons";
28
+ import { html, unsafeCSS } from "lit";
29
+ import { property, queryAssignedElements } from "lit/decorators.js";
30
+ import { ifDefined } from "lit/directives/if-defined.js";
31
+ import { when } from "lit/directives/when.js";
32
+ import { F as Focusable } from "../focusable-ChCLg1k4.js";
33
+ import { S as SizedMixin } from "../sized-mixin-DmkrNdWB.js";
34
+ import { MutationController } from "@lit-labs/observers/mutation-controller.js";
35
+ import { a as LuzmoElement } from "../base-DmeVy0cq.js";
36
+ import { R as RovingTabindexController } from "../roving-tabindex-DPF9NmrH.js";
37
+ const styles$1 = '@media (forced-colors: active){:host{--highcontrast-swatch-disabled-icon-color: GrayText;--highcontrast-swatch-focus-indicator-color: ButtonText;--highcontrast-swatch-background-color-selected: Background;--highcontrast-swatch-border-color-selected: Highlight;--highcontrast-swatch-border-color: ButtonText;--highcontrast-swatch-fill-foreground-color: ButtonText}.fill{forced-color-adjust:none}:host([disabled]){--highcontrast-swatch-border-color: GrayText}}:host{box-sizing:border-box;inline-size:var(--luzmo-swatch-size, var(--swatch-size));block-size:var(--luzmo-swatch-size, var(--swatch-size));-webkit-user-select:none;user-select:none;outline:none;justify-content:center;align-items:center;display:flex;position:relative}.disabled-icon{inline-size:var(--luzmo-swatch-disabled-icon-size, var(--swatch-disabled-icon-size));block-size:var(--luzmo-swatch-disabled-icon-size, var(--swatch-disabled-icon-size))}:host,:host:before{border-radius:var(--luzmo-swatch-border-radius, var(--swatch-border-radius))}:host([selected]){background-color:var(--highcontrast-swatch-background-color-selected, var(--luzmo-swatch-inner-border-color-selected, var(--swatch-inner-border-color-selected)))}:host([selected]) .fill:before{box-shadow:none;border-radius:0}:host([selected]):before{opacity:1}:host .is-image .fill:before{background-color:initial}:host([mixed-value]) .fill{background:none;background:var(--picked-color, transparent)}:host([mixed-value]) .mixed-value-icon{color:var(--swatch-dash-icon-color);display:block}:host([nothing]) .fill{background-color:initial;background-color:var(--picked-color, transparent);background-image:none}:host([nothing]) .fill:after{inline-size:var(--luzmo-swatch-slash-thickness, var(--swatch-slash-thickness));content:"";block-size:200%;background:var(--highcontrast-swatch-fill-foreground-color, var(--luzmo-swatch-slash-icon-color, var(--swatch-slash-icon-color)));position:absolute;transform:rotate(-45deg)}:host([nothing][shape=rectangle]) .fill:after{transform:rotate(-25deg)}:host([disabled]) .disabled-icon{display:block}:host:before{content:"";border-width:var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected));border-style:solid;border-color:var(--highcontrast-swatch-border-color-selected, var(--luzmo-swatch-border-color-selected, var(--swatch-border-color-selected)));opacity:0;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}:host:after{content:"";inset:calc(var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)) * -2);background-color:var(--luzmo-swatch-focus-indicator-background-color, var(--luzmo-background-color));z-index:-1;opacity:0;border-width:var(--luzmo-swatch-focus-indicator-width, var(--swatch-focus-indicator-width));border-style:solid;border-color:var(--highcontrast-swatch-focus-indicator-color, var(--luzmo-swatch-focus-indicator-color, var(--swatch-focus-indicator-color)));border-radius:var(--luzmo-swatch-focus-indicator-border-radius, var(--swatch-focus-indicator-border-radius));transition:opacity var(--luzmo-animation-duration) ease-in-out;position:absolute}:host(:focus-visible):after{opacity:1}.fill{inline-size:100%;block-size:100%;box-sizing:border-box;border-radius:var(--luzmo-swatch-border-radius, var(--swatch-border-radius));justify-content:center;align-items:center;display:flex;position:relative;overflow:hidden}.fill:before{content:"";z-index:0;box-sizing:border-box;box-shadow:inset 0 0 0 var(--luzmo-swatch-border-thickness, var(--swatch-border-thickness)) var(--highcontrast-swatch-border-color, var(--luzmo-swatch-border-color, var(--swatch-border-color)));border-radius:var(--luzmo-swatch-border-radius, var(--swatch-border-radius));position:absolute;top:0;right:0;bottom:0;left:0}:host([border=none]) .fill:before,.fill:before{background-color:initial;background-color:var(--picked-color, transparent)}:host([border=none]) .fill:before{box-shadow:none}.mixed-value-icon{pointer-events:none;color:#0000;color:var(--picked-color, transparent);display:none}.disabled-icon{z-index:1;pointer-events:none;color:var(--highcontrast-swatch-disabled-icon-color, var(--luzmo-swatch-disabled-icon-color, var(--swatch-disabled-icon-color)));stroke:var(--highcontrast-swatch-disabled-icon-color, var(--luzmo-swatch-disabled-icon-color, var(--swatch-disabled-icon-color)));display:none;position:relative}.disabled-icon path:first-child{fill:var(--highcontrast-swatch-disabled-icon-color, var(--luzmo-swatch-disabled-icon-color, var(--swatch-disabled-icon-color)))}.disabled-icon path:last-child{fill:var(--luzmo-swatch-icon-border-color, var(--swatch-icon-border-color))}:host([shape=rectangle]){inline-size:calc(var(--luzmo-swatch-size, var(--swatch-size)) * 2)}:host([rounding=none]),:host([rounding=none]) .fill,:host([rounding=none]) .fill:before,:host([rounding=none][selected]) .fill,:host([rounding=none][selected]) .fill:before,:host([rounding=none]):after,:host([rounding=none]):before{border-radius:0}:host([rounding=full][selected]:not([shape=rectangle])) .fill,:host([rounding=full][selected]:not([shape=rectangle])) .fill:before,:host([rounding=full]:not([shape=rectangle])),:host([rounding=full]:not([shape=rectangle])) .fill,:host([rounding=full]:not([shape=rectangle])) .fill:before,:host([rounding=full]:not([shape=rectangle])):after,:host([rounding=full]:not([shape=rectangle])):before{border-radius:100%}:host([selected]) .fill{width:calc(var(--luzmo-swatch-size, var(--swatch-size)) - 2 * var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)));height:calc(var(--luzmo-swatch-size, var(--swatch-size)) - 2 * var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)))}:host([selected][shape=rectangle]) .fill{width:calc(var(--luzmo-swatch-size, var(--swatch-size)) * 2 - 2 * var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)))}::slotted([slot=image]){object-fit:contain;inline-size:100%;block-size:100%;transition:width var(--luzmo-animation-duration) ease-in-out,height var(--luzmo-animation-duration) ease-in-out}:host([size=xl]){--swatch-size: var(--luzmo-component-height-xl);--swatch-disabled-icon-size: 24px;--swatch-slash-thickness: 6px}:host([size=l]){--swatch-size: var(--luzmo-component-height-l);--swatch-disabled-icon-size: 20px;--swatch-slash-thickness: 5px}:host([size=s]){--swatch-size: var(--luzmo-component-height-s);--swatch-disabled-icon-size: 16px;--swatch-slash-thickness: 3px}:host([size=xs]){--swatch-size: var(--luzmo-component-height-xs);--swatch-disabled-icon-size: 16px;--swatch-slash-thickness: 2px}:host([size=xxs]){--swatch-size: var(--luzmo-component-height-xxs);--swatch-disabled-icon-size: 14px;--swatch-slash-thickness: 2px}:host{--swatch-size: var(--luzmo-component-height);--swatch-disabled-icon-size: 18px;--swatch-slash-thickness: 4px}:host{--swatch-border-radius: var(--luzmo-border-radius-s);--swatch-focus-indicator-border-radius: var(--luzmo-border-radius-s);--swatch-border-thickness: var(--luzmo-border-width);--swatch-border-thickness-selected: var(--luzmo-border-width);--swatch-focus-indicator-width: var(--luzmo-indicator-width);--swatch-focus-indicator-gap: var(--luzmo-indicator-gap);--swatch-border-color: var(--luzmo-border-color-down);--swatch-icon-border-color: var(--luzmo-border-color);--swatch-border-color-selected: var(--luzmo-border-color-full-down);--swatch-inner-border-color-selected: var(--luzmo-background-color);--swatch-disabled-icon-color: rgb(255, 255, 255);--swatch-dash-icon-color: var(--luzmo-font-color);--swatch-slash-icon-color: var(--luzmo-negative-color);--swatch-focus-indicator-color: var(--luzmo-primary)}.fill:before{background:var(--picked-color, transparent)}:host([border=none]) .fill:before{background:var(--picked-color, transparent)}:host .is-image .fill:before{background:#0000}:host .opacity-checkerboard{background:repeating-conic-gradient(var(--luzmo-swatch-checkerboard-light, rgb(255, 255, 255)) 0 25%,var(--luzmo-swatch-checkerboard-dark, rgb(230, 230, 230)) 0 50%) var(--luzmo-swatch-checkerboard-position, left top)/calc(var(--luzmo-swatch-checkerboard-size, 8px) * 2) calc(var(--luzmo-swatch-checkerboard-size, 8px) * 2)}';
38
+ var __defProp$1 = Object.defineProperty;
39
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
40
+ var __decorateClass$1 = (decorators, target, key, kind) => {
41
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
42
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
43
+ if (decorator = decorators[i])
44
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
45
+ if (kind && result) __defProp$1(target, key, result);
46
+ return result;
39
47
  };
40
- class a extends p(y, {
48
+ class LuzmoSwatch extends SizedMixin(Focusable, {
41
49
  validSizes: ["xxs", "xs", "s", "m", "l", "xl"],
42
- noDefaultSize: !0
50
+ noDefaultSize: true
43
51
  }) {
44
52
  constructor() {
45
- super(...arguments), this.color = "", this.label = "", this.mixedValue = !1, this.nothing = !1, this.role = "button", this.selected = !1, this.readonly = !1, this.renderDisabled = () => u`
53
+ super(...arguments);
54
+ this.color = "";
55
+ this.label = "";
56
+ this.mixedValue = false;
57
+ this.nothing = false;
58
+ this.role = "button";
59
+ this.selected = false;
60
+ this.readonly = false;
61
+ this.renderDisabled = () => html`
46
62
  <svg
47
63
  xmlns="http://www.w3.org/2000/svg"
48
64
  class="disabled-icon"
@@ -59,48 +75,59 @@ class a extends p(y, {
59
75
  fill="var(--swatch-disabled-icon-stroke-color)"
60
76
  />
61
77
  </svg>
62
- `, this.renderMixedValue = () => z(v);
78
+ `;
79
+ this.renderMixedValue = () => luzmoIcon(luzmoDash);
63
80
  }
64
81
  static get styles() {
65
- return [m(A)];
82
+ return [unsafeCSS(styles$1)];
66
83
  }
67
84
  get value() {
68
85
  return this._value || this.color || this.label;
69
86
  }
70
- set value(e) {
71
- if (e === this._value)
87
+ set value(value) {
88
+ if (value === this._value) {
72
89
  return;
73
- const o = this.value;
74
- this._value = e, this.requestUpdate("value", o);
90
+ }
91
+ const oldValue = this.value;
92
+ this._value = value;
93
+ this.requestUpdate("value", oldValue);
75
94
  }
76
95
  get focusElement() {
77
96
  return this;
78
97
  }
79
- toggle(e) {
80
- this.readonly || (this.selected = e ?? !this.selected);
98
+ toggle(force) {
99
+ if (!this.readonly) {
100
+ this.selected = force ?? !this.selected;
101
+ }
81
102
  }
82
103
  handleClick() {
83
- if (this.disabled || this.mixedValue)
104
+ if (this.disabled || this.mixedValue) {
84
105
  return;
85
- this.toggle(), this.dispatchEvent(
106
+ }
107
+ this.toggle();
108
+ const applyDefault = this.dispatchEvent(
86
109
  new Event("change", {
87
- cancelable: !0,
88
- bubbles: !0
110
+ cancelable: true,
111
+ bubbles: true
89
112
  })
90
- ) || this.toggle();
113
+ );
114
+ if (!applyDefault) {
115
+ this.toggle();
116
+ }
91
117
  }
92
- handleKeydown(e) {
93
- const { code: o } = e;
94
- switch (o) {
118
+ handleKeydown(event) {
119
+ const { code } = event;
120
+ switch (code) {
95
121
  case "Space": {
96
- e.preventDefault(), this.addEventListener("keyup", this.handleKeyup);
122
+ event.preventDefault();
123
+ this.addEventListener("keyup", this.handleKeyup);
97
124
  break;
98
125
  }
99
126
  }
100
127
  }
101
- handleKeypress(e) {
102
- const { code: o } = e;
103
- switch (o) {
128
+ handleKeypress(event) {
129
+ const { code } = event;
130
+ switch (code) {
104
131
  case "Enter":
105
132
  case "NumpadEnter": {
106
133
  this.click();
@@ -108,105 +135,154 @@ class a extends p(y, {
108
135
  }
109
136
  }
110
137
  }
111
- handleKeyup(e) {
112
- const { code: o } = e;
113
- switch (o) {
138
+ handleKeyup(event) {
139
+ const { code } = event;
140
+ switch (code) {
114
141
  case "Space": {
115
- this.removeEventListener("keyup", this.handleKeyup), this.click();
142
+ this.removeEventListener("keyup", this.handleKeyup);
143
+ this.click();
116
144
  break;
117
145
  }
118
146
  }
119
147
  }
120
148
  render() {
121
- return u`
149
+ return html`
122
150
  <div
123
151
  class="opacity-checkerboard fill"
124
- style=${x(
152
+ style=${ifDefined(
125
153
  this.color ? `--picked-color: ${this.color}` : void 0
126
154
  )}
127
155
  >
128
156
  <slot name="image"></slot>
129
- ${b(this.disabled, this.renderDisabled)}
130
- ${b(this.mixedValue, this.renderMixedValue)}
157
+ ${when(this.disabled, this.renderDisabled)}
158
+ ${when(this.mixedValue, this.renderMixedValue)}
131
159
  </div>
132
160
  `;
133
161
  }
134
- willUpdate(e) {
135
- var o;
136
- if (this.getAttribute("role") || this.setAttribute("role", "button"), (e.has("selected") || e.has("role")) && !this.readonly) {
137
- const r = this.role === "button" ? "aria-pressed" : "aria-checked", t = this.role === "button" ? "aria-checked" : "aria-pressed";
138
- e.has("role") && this.removeAttribute(t), this.setAttribute(r, this.selected ? "true" : "false");
162
+ willUpdate(changes) {
163
+ var _a;
164
+ if (!this.getAttribute("role")) {
165
+ this.setAttribute("role", "button");
166
+ }
167
+ if ((changes.has("selected") || changes.has("role")) && !this.readonly) {
168
+ const selectedAttribute = this.role === "button" ? "aria-pressed" : "aria-checked";
169
+ const removedSelectedAttribute = this.role === "button" ? "aria-checked" : "aria-pressed";
170
+ if (changes.has("role")) {
171
+ this.removeAttribute(removedSelectedAttribute);
172
+ }
173
+ this.setAttribute(selectedAttribute, this.selected ? "true" : "false");
174
+ }
175
+ if (changes.has("label") || changes.has("color") || changes.has("mixedValue")) {
176
+ if (this.label !== this.color && ((_a = this.label) == null ? void 0 : _a.length)) {
177
+ this.setAttribute("aria-label", this.label);
178
+ } else if (this.color) {
179
+ this.setAttribute("aria-label", this.color);
180
+ } else if (this.mixedValue) {
181
+ this.setAttribute("aria-label", "Mixed");
182
+ } else {
183
+ this.removeAttribute("aria-label");
184
+ }
139
185
  }
140
- (e.has("label") || e.has("color") || e.has("mixedValue")) && (this.label !== this.color && ((o = this.label) != null && o.length) ? this.setAttribute("aria-label", this.label) : this.color ? this.setAttribute("aria-label", this.color) : this.mixedValue ? this.setAttribute("aria-label", "Mixed") : this.removeAttribute("aria-label"));
141
186
  }
142
- firstUpdated(e) {
143
- super.firstUpdated(e), this.addEventListener("click", this.handleClick), this.addEventListener("keydown", this.handleKeydown), this.addEventListener("keypress", this.handleKeypress), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0");
187
+ firstUpdated(changes) {
188
+ super.firstUpdated(changes);
189
+ this.addEventListener("click", this.handleClick);
190
+ this.addEventListener("keydown", this.handleKeydown);
191
+ this.addEventListener("keypress", this.handleKeypress);
192
+ if (!this.hasAttribute("tabindex")) {
193
+ this.setAttribute("tabindex", "0");
194
+ }
144
195
  }
145
196
  }
146
- n([
147
- l({ reflect: !0 })
148
- ], a.prototype, "border", 2);
149
- n([
150
- l()
151
- ], a.prototype, "color", 2);
152
- n([
153
- l()
154
- ], a.prototype, "label", 2);
155
- n([
156
- l({ type: Boolean, reflect: !0, attribute: "mixed-value" })
157
- ], a.prototype, "mixedValue", 2);
158
- n([
159
- l({ type: Boolean, reflect: !0 })
160
- ], a.prototype, "nothing", 2);
161
- n([
162
- l({ reflect: !0 })
163
- ], a.prototype, "role", 2);
164
- n([
165
- l({ reflect: !0 })
166
- ], a.prototype, "rounding", 2);
167
- n([
168
- l({ type: Boolean, reflect: !0 })
169
- ], a.prototype, "selected", 2);
170
- n([
171
- l({ type: Boolean, reflect: !0 })
172
- ], a.prototype, "readonly", 2);
173
- n([
174
- l({ reflect: !0 })
175
- ], a.prototype, "shape", 2);
176
- n([
177
- l()
178
- ], a.prototype, "value", 1);
179
- const D = ":host{justify-content:flex-start;align-items:flex-start;gap:var(--luzmo-swatch-group-spacing-regular, var(--swatch-group-spacing-regular));flex-flow:wrap;display:inline-flex}:host([density=compact]){gap:var(--luzmo-swatch-group-spacing-compact, var(--swatch-group-spacing-compact))}:host([density=spacious]){gap:var(--luzmo-swatch-group-spacing-spacious, var(--swatch-group-spacing-spacious))}:host{--swatch-group-spacing-compact: 2px;--swatch-group-spacing-regular: 4px;--swatch-group-spacing-spacious: 8px}";
180
- var L = Object.defineProperty, M = Object.getOwnPropertyDescriptor, h = (c, e, o, r) => {
181
- for (var t = r > 1 ? void 0 : r ? M(e, o) : e, s = c.length - 1, i; s >= 0; s--)
182
- (i = c[s]) && (t = (r ? i(e, o, t) : i(t)) || t);
183
- return r && t && L(e, o, t), t;
197
+ __decorateClass$1([
198
+ property({ reflect: true })
199
+ ], LuzmoSwatch.prototype, "border", 2);
200
+ __decorateClass$1([
201
+ property()
202
+ ], LuzmoSwatch.prototype, "color", 2);
203
+ __decorateClass$1([
204
+ property()
205
+ ], LuzmoSwatch.prototype, "label", 2);
206
+ __decorateClass$1([
207
+ property({ type: Boolean, reflect: true, attribute: "mixed-value" })
208
+ ], LuzmoSwatch.prototype, "mixedValue", 2);
209
+ __decorateClass$1([
210
+ property({ type: Boolean, reflect: true })
211
+ ], LuzmoSwatch.prototype, "nothing", 2);
212
+ __decorateClass$1([
213
+ property({ reflect: true })
214
+ ], LuzmoSwatch.prototype, "role", 2);
215
+ __decorateClass$1([
216
+ property({ reflect: true })
217
+ ], LuzmoSwatch.prototype, "rounding", 2);
218
+ __decorateClass$1([
219
+ property({ type: Boolean, reflect: true })
220
+ ], LuzmoSwatch.prototype, "selected", 2);
221
+ __decorateClass$1([
222
+ property({ type: Boolean, reflect: true })
223
+ ], LuzmoSwatch.prototype, "readonly", 2);
224
+ __decorateClass$1([
225
+ property({ reflect: true })
226
+ ], LuzmoSwatch.prototype, "shape", 2);
227
+ __decorateClass$1([
228
+ property()
229
+ ], LuzmoSwatch.prototype, "value", 1);
230
+ const styles = ":host{justify-content:flex-start;align-items:flex-start;gap:var(--luzmo-swatch-group-spacing-regular, var(--swatch-group-spacing-regular));flex-flow:wrap;display:inline-flex}:host([density=compact]){gap:var(--luzmo-swatch-group-spacing-compact, var(--swatch-group-spacing-compact))}:host([density=spacious]){gap:var(--luzmo-swatch-group-spacing-spacious, var(--swatch-group-spacing-spacious))}:host{--swatch-group-spacing-compact: 2px;--swatch-group-spacing-regular: 4px;--swatch-group-spacing-spacious: 8px}";
231
+ var __defProp = Object.defineProperty;
232
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
233
+ var __decorateClass = (decorators, target, key, kind) => {
234
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
235
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
236
+ if (decorator = decorators[i])
237
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
238
+ if (kind && result) __defProp(target, key, result);
239
+ return result;
184
240
  };
185
- class d extends p(w, {
241
+ class LuzmoSwatchGroup extends SizedMixin(LuzmoElement, {
186
242
  validSizes: ["xs", "s", "m", "l"],
187
- noDefaultSize: !0
243
+ noDefaultSize: true
188
244
  }) {
189
245
  constructor() {
190
- super(), this._selected = [], this.selectedSet = /* @__PURE__ */ new Set(), this.rovingTabindexController = new C(this, {
191
- focusInIndex: (e) => {
192
- let o = -1;
193
- const r = e.findIndex((t, s) => (!e[o] && !t.disabled && (o = s), t.selected && !t.disabled));
194
- return e[r] ? r : o;
246
+ super();
247
+ this._selected = [];
248
+ this.selectedSet = /* @__PURE__ */ new Set();
249
+ this.rovingTabindexController = new RovingTabindexController(this, {
250
+ focusInIndex: (elements) => {
251
+ let firstEnabledIndex = -1;
252
+ const firstSelectedIndex = elements.findIndex((el, index) => {
253
+ if (!elements[firstEnabledIndex] && !el.disabled) {
254
+ firstEnabledIndex = index;
255
+ }
256
+ return el.selected && !el.disabled;
257
+ });
258
+ return elements[firstSelectedIndex] ? firstSelectedIndex : firstEnabledIndex;
195
259
  },
196
260
  elements: () => this.swatches,
197
- isFocusableElement: (e) => !e.disabled
198
- }), this.manageChange = async () => {
199
- const e = /* @__PURE__ */ new Set();
200
- this.selectedSet = new Set(this.selected), await Promise.all(this.swatches.map((o) => o.updateComplete)), this.swatches.forEach((o) => {
201
- e.add(o.value), o.selected && this.selectedSet.add(o.value);
202
- }), this.selectedSet.forEach((o) => {
203
- e.has(o) || this.selectedSet.delete(o);
204
- }), this._selected = [...this.selectedSet], this.rovingTabindexController.clearElementCache();
205
- }, new k(this, {
261
+ isFocusableElement: (el) => !el.disabled
262
+ });
263
+ this.manageChange = async () => {
264
+ const presentSet = /* @__PURE__ */ new Set();
265
+ this.selectedSet = new Set(this.selected);
266
+ await Promise.all(this.swatches.map((swatch) => swatch.updateComplete));
267
+ this.swatches.forEach((swatch) => {
268
+ presentSet.add(swatch.value);
269
+ if (swatch.selected) {
270
+ this.selectedSet.add(swatch.value);
271
+ }
272
+ });
273
+ this.selectedSet.forEach((value) => {
274
+ if (!presentSet.has(value)) {
275
+ this.selectedSet.delete(value);
276
+ }
277
+ });
278
+ this._selected = [...this.selectedSet];
279
+ this.rovingTabindexController.clearElementCache();
280
+ };
281
+ new MutationController(this, {
206
282
  config: {
207
- attributes: !0,
208
- childList: !0,
209
- subtree: !0
283
+ attributes: true,
284
+ childList: true,
285
+ subtree: true
210
286
  },
211
287
  callback: () => {
212
288
  this.manageChange();
@@ -214,129 +290,198 @@ class d extends p(w, {
214
290
  });
215
291
  }
216
292
  static get styles() {
217
- return [m(D)];
293
+ return [unsafeCSS(styles)];
218
294
  }
219
295
  get selected() {
220
296
  return this._selected;
221
297
  }
222
- set selected(e) {
223
- if (e === this.selected)
298
+ set selected(selected) {
299
+ if (selected === this.selected) {
224
300
  return;
225
- const o = this.selected;
226
- this._selected = e, this.requestUpdate("selected", o);
301
+ }
302
+ const oldSelected = this.selected;
303
+ this._selected = selected;
304
+ this.requestUpdate("selected", oldSelected);
227
305
  }
228
- focus(e) {
229
- this.rovingTabindexController.focus(e);
306
+ focus(options) {
307
+ this.rovingTabindexController.focus(options);
230
308
  }
231
- handleChange(e) {
232
- e.stopPropagation();
233
- const o = this.selected;
309
+ handleChange(event) {
310
+ event.stopPropagation();
311
+ const oldSelected = this.selected;
234
312
  if (!this.selects) {
235
- e.preventDefault();
313
+ event.preventDefault();
236
314
  return;
237
315
  }
238
316
  if (this.selects === "single") {
239
- const { target: t } = e;
240
- if (t.tabIndex = 0, t.selected = !0, this.selectedSet.has(t.value))
317
+ const { target } = event;
318
+ target.tabIndex = 0;
319
+ target.selected = true;
320
+ if (this.selectedSet.has(target.value)) {
241
321
  return;
242
- this.selectedSet.clear(), this.selectedSet.add(t.value), this.rovingTabindexController.elements.forEach((s) => {
243
- s !== t && (s.selected = !1);
322
+ }
323
+ this.selectedSet.clear();
324
+ this.selectedSet.add(target.value);
325
+ this.rovingTabindexController.elements.forEach((child) => {
326
+ if (child === target) {
327
+ return;
328
+ }
329
+ child.selected = false;
244
330
  });
245
331
  } else if (this.selects === "multiple") {
246
- const { target: t } = e;
247
- t.selected ? this.selectedSet.add(t.value) : this.selectedSet.delete(t.value);
332
+ const { target } = event;
333
+ if (target.selected) {
334
+ this.selectedSet.add(target.value);
335
+ } else {
336
+ this.selectedSet.delete(target.value);
337
+ }
248
338
  }
249
- this._selected = [...this.selectedSet], this.dispatchEvent(
339
+ this._selected = [...this.selectedSet];
340
+ const applyDefault = this.dispatchEvent(
250
341
  new Event("change", {
251
- cancelable: !0,
252
- bubbles: !0
342
+ cancelable: true,
343
+ bubbles: true
253
344
  })
254
- ) || (this._selected = o, e.preventDefault());
345
+ );
346
+ if (!applyDefault) {
347
+ this._selected = oldSelected;
348
+ event.preventDefault();
349
+ }
255
350
  }
256
- getPassthroughSwatchActions(e) {
257
- const o = {};
258
- e.has("selects") && (this.selects || e.get("selects") !== void 0) && (o.selects = this.selects), e.has("border") && (this.border || e.get("border") !== void 0) && (o.border = this.border), e.has("rounding") && (this.rounding || e.get("rounding") !== void 0) && (o.rounding = this.rounding), e.has("size") && (this.size !== "m" || e.get("size") !== void 0) && (o.size = this.size), e.has("shape") && (this.shape || e.get("shape") !== void 0) && (o.shape = this.shape);
259
- const r = [];
260
- return Object.keys(o).length > 0 && r.push((t) => {
261
- "border" in o && (t.border = o.border), "rounding" in o && (t.rounding = o.rounding), "shape" in o && (t.shape = o.shape), "size" in o && (t.size = o.size);
262
- }), r;
351
+ getPassthroughSwatchActions(changes) {
352
+ const targetValues = {};
353
+ if (changes.has("selects") && (this.selects || changes.get("selects") !== void 0)) {
354
+ targetValues.selects = this.selects;
355
+ }
356
+ if (changes.has("border") && (this.border || changes.get("border") !== void 0)) {
357
+ targetValues.border = this.border;
358
+ }
359
+ if (changes.has("rounding") && (this.rounding || changes.get("rounding") !== void 0)) {
360
+ targetValues.rounding = this.rounding;
361
+ }
362
+ if (changes.has("size") && (this.size !== "m" || changes.get("size") !== void 0)) {
363
+ targetValues.size = this.size;
364
+ }
365
+ if (changes.has("shape") && (this.shape || changes.get("shape") !== void 0)) {
366
+ targetValues.shape = this.shape;
367
+ }
368
+ const passThroughSwatchActions = [];
369
+ if (Object.keys(targetValues).length > 0) {
370
+ passThroughSwatchActions.push((swatch) => {
371
+ if ("border" in targetValues) {
372
+ swatch.border = targetValues.border;
373
+ }
374
+ if ("rounding" in targetValues) {
375
+ swatch.rounding = targetValues.rounding;
376
+ }
377
+ if ("shape" in targetValues) {
378
+ swatch.shape = targetValues.shape;
379
+ }
380
+ if ("size" in targetValues) {
381
+ swatch.size = targetValues.size;
382
+ }
383
+ });
384
+ }
385
+ return passThroughSwatchActions;
263
386
  }
264
- getSelectionSwatchActions(e) {
265
- const o = [];
266
- if (!e.has("selects"))
267
- return o;
268
- this.selects ? this.setAttribute(
269
- "role",
270
- this.selects === "single" ? "radiogroup" : "group"
271
- ) : this.removeAttribute("role");
272
- const r = {
387
+ getSelectionSwatchActions(changes) {
388
+ const selectionSwatchActions = [];
389
+ if (!changes.has("selects")) {
390
+ return selectionSwatchActions;
391
+ }
392
+ if (this.selects) {
393
+ this.setAttribute(
394
+ "role",
395
+ this.selects === "single" ? "radiogroup" : "group"
396
+ );
397
+ } else {
398
+ this.removeAttribute("role");
399
+ }
400
+ const swatchRoles = {
273
401
  single: "radio",
274
402
  multiple: "checkbox"
275
- }, t = this.selects ? r[this.selects] : "button";
276
- return o.push((s) => {
277
- s.setAttribute("role", t);
278
- }), o;
403
+ };
404
+ const swatchRole = this.selects ? swatchRoles[this.selects] : "button";
405
+ selectionSwatchActions.push((swatch) => {
406
+ swatch.setAttribute("role", swatchRole);
407
+ });
408
+ return selectionSwatchActions;
279
409
  }
280
410
  render() {
281
- return u`
411
+ return html`
282
412
  <slot
283
413
  @change=${this.handleChange}
284
414
  @slotchange=${this.manageChange}
285
415
  ></slot>
286
416
  `;
287
417
  }
288
- willUpdate(e) {
289
- const o = [
290
- ...this.getPassthroughSwatchActions(e),
291
- ...this.getSelectionSwatchActions(e)
418
+ willUpdate(changes) {
419
+ const swatchActions = [
420
+ ...this.getPassthroughSwatchActions(changes),
421
+ ...this.getSelectionSwatchActions(changes)
292
422
  ];
293
- let r = new Set(this.selected);
294
- const t = /* @__PURE__ */ new Set();
295
- e.has("selected") && o.push((i) => {
296
- t.add(i.value), i.selected = !!(r.has(i.value) || !this.hasUpdated && i.selected);
297
- });
298
- const s = () => {
299
- r = new Set(this.selected), this.swatches.forEach((i) => {
300
- o.forEach((f) => {
301
- f(i);
423
+ let nextSelected = new Set(this.selected);
424
+ const currentValues = /* @__PURE__ */ new Set();
425
+ if (changes.has("selected")) {
426
+ swatchActions.push((swatch) => {
427
+ currentValues.add(swatch.value);
428
+ swatch.selected = nextSelected.has(swatch.value) || !this.hasUpdated && swatch.selected ? true : false;
429
+ });
430
+ }
431
+ const doActions = () => {
432
+ nextSelected = new Set(this.selected);
433
+ this.swatches.forEach((swatch) => {
434
+ swatchActions.forEach((action) => {
435
+ action(swatch);
302
436
  });
303
- }), e.has("selected") && (this._selected = [...r.values()].filter(
304
- (i) => t.has(i)
305
- ));
437
+ });
438
+ if (changes.has("selected")) {
439
+ this._selected = [...nextSelected.values()].filter(
440
+ (selectedValue) => currentValues.has(selectedValue)
441
+ );
442
+ }
306
443
  };
307
- this.hasUpdated ? s() : this.renderRoot.addEventListener(
308
- "slotchange",
309
- () => {
310
- requestAnimationFrame(s);
311
- },
312
- { once: !0 }
313
- );
444
+ if (this.hasUpdated) {
445
+ doActions();
446
+ } else {
447
+ this.renderRoot.addEventListener(
448
+ "slotchange",
449
+ () => {
450
+ requestAnimationFrame(doActions);
451
+ },
452
+ { once: true }
453
+ );
454
+ }
314
455
  }
315
456
  }
316
- h([
317
- l({ reflect: !0 })
318
- ], d.prototype, "border", 2);
319
- h([
320
- l({ reflect: !0 })
321
- ], d.prototype, "density", 2);
322
- h([
323
- l({ reflect: !0 })
324
- ], d.prototype, "rounding", 2);
325
- h([
326
- l({ type: Array })
327
- ], d.prototype, "selected", 1);
328
- h([
329
- l()
330
- ], d.prototype, "selects", 2);
331
- h([
332
- l({ reflect: !0 })
333
- ], d.prototype, "shape", 2);
334
- h([
335
- S({ flatten: !0 })
336
- ], d.prototype, "swatches", 2);
337
- customElements.get("luzmo-swatch") || customElements.define("luzmo-swatch", a);
338
- customElements.get("luzmo-swatch-group") || customElements.define("luzmo-swatch-group", d);
457
+ __decorateClass([
458
+ property({ reflect: true })
459
+ ], LuzmoSwatchGroup.prototype, "border", 2);
460
+ __decorateClass([
461
+ property({ reflect: true })
462
+ ], LuzmoSwatchGroup.prototype, "density", 2);
463
+ __decorateClass([
464
+ property({ reflect: true })
465
+ ], LuzmoSwatchGroup.prototype, "rounding", 2);
466
+ __decorateClass([
467
+ property({ type: Array })
468
+ ], LuzmoSwatchGroup.prototype, "selected", 1);
469
+ __decorateClass([
470
+ property()
471
+ ], LuzmoSwatchGroup.prototype, "selects", 2);
472
+ __decorateClass([
473
+ property({ reflect: true })
474
+ ], LuzmoSwatchGroup.prototype, "shape", 2);
475
+ __decorateClass([
476
+ queryAssignedElements({ flatten: true })
477
+ ], LuzmoSwatchGroup.prototype, "swatches", 2);
478
+ if (!customElements.get("luzmo-swatch")) {
479
+ customElements.define("luzmo-swatch", LuzmoSwatch);
480
+ }
481
+ if (!customElements.get("luzmo-swatch-group")) {
482
+ customElements.define("luzmo-swatch-group", LuzmoSwatchGroup);
483
+ }
339
484
  export {
340
- a as LuzmoSwatch,
341
- d as LuzmoSwatchGroup
485
+ LuzmoSwatch,
486
+ LuzmoSwatchGroup
342
487
  };