@luzmo/lucero 1.0.1-alpha.18 → 1.0.1-alpha.19

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/NumberFormatter-DewVDY5w.cjs +18 -0
  2. package/components/NumberFormatter-DgOUVrge.js +136 -0
  3. package/components/NumberParser-Dik4a0h-.cjs +18 -0
  4. package/components/NumberParser-ci9J5EKv.js +173 -0
  5. package/components/accordion/index.cjs +6 -183
  6. package/components/accordion/index.js +88 -136
  7. package/components/action-bar/index.cjs +4 -85
  8. package/components/action-bar/index.js +50 -72
  9. package/components/action-button/index.cjs +3 -205
  10. package/components/action-button/index.js +93 -167
  11. package/components/action-group/index.cjs +1 -7
  12. package/components/action-group/index.js +8 -12
  13. package/components/action-group-C54IxNZk.cjs +20 -0
  14. package/components/action-group-C9dsPJg-.js +258 -0
  15. package/components/action-menu/index.cjs +11 -91
  16. package/components/action-menu/index.js +47 -66
  17. package/components/async-directive-BwIAw5tB.js +82 -0
  18. package/components/async-directive-DLz6JB0v.cjs +22 -0
  19. package/components/avatar/index.cjs +3 -63
  20. package/components/avatar/index.js +42 -54
  21. package/components/{focusable-selectors-D0t_5P7C.cjs → base-BjTwmyRF.cjs} +5 -16
  22. package/components/base-CFWO09N1.js +684 -0
  23. package/components/base-Cy0MQrPT.cjs +40 -0
  24. package/components/base-D76d76ww.js +26 -0
  25. package/components/button/index.cjs +2 -134
  26. package/components/button/index.js +72 -106
  27. package/components/button-base-B8bWcklV.js +144 -0
  28. package/components/button-base-tf95Lyl4.cjs +25 -0
  29. package/components/button-group/index.cjs +1 -45
  30. package/components/button-group/index.js +25 -37
  31. package/components/calendar/index.cjs +1 -632
  32. package/components/calendar/index.js +7 -637
  33. package/components/checkbox/index.cjs +4 -111
  34. package/components/checkbox/index.js +53 -98
  35. package/components/checkbox-mixin-BOTvuPEu.js +70 -0
  36. package/components/checkbox-mixin-BVPpXtsq.cjs +27 -0
  37. package/components/class-map-CGfNk3Ee.js +51 -0
  38. package/components/class-map-D-Y-hsN5.cjs +22 -0
  39. package/components/clear-button-CuPbWwZY.cjs +18 -0
  40. package/components/clear-button-DzZ5ulBW.js +53 -0
  41. package/components/close-button-BTo4yrFR.cjs +18 -0
  42. package/components/close-button-CuQdsez5.js +51 -0
  43. package/components/color-area/index.cjs +13 -440
  44. package/components/color-area/index.js +187 -322
  45. package/components/color-controller-B0uX6Zso.js +3230 -0
  46. package/components/color-controller-CoUL5f9K.cjs +18 -0
  47. package/components/color-field/index.cjs +2 -95
  48. package/components/color-field/index.js +41 -77
  49. package/components/color-handle/index.cjs +3 -64
  50. package/components/color-handle/index.js +37 -58
  51. package/components/color-loupe/index.cjs +1 -7
  52. package/components/color-loupe/index.js +8 -12
  53. package/components/color-loupe-CrM2DVY3.cjs +56 -0
  54. package/components/color-loupe-DmQe3SpP.js +81 -0
  55. package/components/color-menu/index.cjs +12 -217
  56. package/components/color-menu/index.js +93 -187
  57. package/components/color-palette/index.cjs +1 -89
  58. package/components/color-palette/index.js +51 -78
  59. package/components/color-palette-group/index.cjs +3 -259
  60. package/components/color-palette-group/index.js +105 -193
  61. package/components/color-picker/index.cjs +6 -114
  62. package/components/color-picker/index.js +72 -92
  63. package/components/color-slider/index.cjs +1 -585
  64. package/components/color-slider/index.js +7 -590
  65. package/components/condition-attribute-with-id-DrQYZzFS.cjs +18 -0
  66. package/components/condition-attribute-with-id-Dv4lSRbe.js +31 -0
  67. package/components/date-time-picker/index.cjs +31 -1357
  68. package/components/date-time-picker/index.js +637 -951
  69. package/components/{dependency-manger-XHpQjFgK.js → dependency-manger-CO-VPlqq.js} +14 -24
  70. package/components/dependency-manger-uthev62E.cjs +18 -0
  71. package/components/directive-C7oCP5Bh.cjs +22 -0
  72. package/components/directive-helpers-D4KMv2dC.js +62 -0
  73. package/components/directive-helpers-t-TVum7J.cjs +22 -0
  74. package/components/{slottable-request-event-CANixJnR.cjs → directive-oAbCiebi.js} +25 -14
  75. package/components/divider/index.cjs +1 -54
  76. package/components/divider/index.js +30 -49
  77. package/components/divider.module-DDvBo9zo.cjs +18 -0
  78. package/components/divider.module-DoQWQEIJ.js +21 -0
  79. package/components/element-resolution-BvRLGqIU.cjs +18 -0
  80. package/components/element-resolution-FCUT-wql.js +91 -0
  81. package/components/field-group/index.cjs +1 -7
  82. package/components/field-group/index.js +8 -12
  83. package/components/field-group-5WQMBOk4.cjs +23 -0
  84. package/components/field-group-D4B0IOdA.js +66 -0
  85. package/components/field-label/index.cjs +1 -7
  86. package/components/field-label/index.js +8 -12
  87. package/components/field-label-DxmPiC5p.js +106 -0
  88. package/components/field-label-Dz9kisdW.cjs +25 -0
  89. package/components/flow-D-0MTYCm.js +527 -0
  90. package/components/flow-DM3dNAKs.cjs +30 -0
  91. package/components/focus-group-DHeTq18L.js +218 -0
  92. package/components/focus-group-DnxZUBhQ.cjs +18 -0
  93. package/components/focus-visible-BvScGDCE.js +74 -0
  94. package/components/focus-visible-D4BXb5RB.cjs +18 -0
  95. package/components/focusable-B_KwfEec.cjs +18 -0
  96. package/components/focusable-C5JjRZmT.js +153 -0
  97. package/components/{focusable-selectors-IltOAOd9.js → focusable-selectors-B4YgbghQ.js} +4 -7
  98. package/components/focusable-selectors-BgFlyFcY.cjs +18 -0
  99. package/components/icon/index.cjs +1 -90
  100. package/components/icon/index.js +46 -74
  101. package/components/if-defined-DULpqYwi.js +27 -0
  102. package/components/if-defined-DaXWqfzc.cjs +22 -0
  103. package/components/index-CNK8wHXu.cjs +57 -0
  104. package/components/index-Cf6G4q52.js +1490 -0
  105. package/components/index-D3ICqC7S.js +1174 -0
  106. package/components/index-hqVbNKYy.cjs +113 -0
  107. package/components/index.cjs +1 -174
  108. package/components/index.js +172 -174
  109. package/components/infield-button/index.cjs +2 -46
  110. package/components/infield-button/index.js +30 -41
  111. package/components/label/index.cjs +1 -37
  112. package/components/label/index.js +24 -36
  113. package/components/{language-resolution-BSGJAWiQ.js → language-resolution-B-wjV5bb.js} +17 -21
  114. package/components/language-resolution-EUER43cg.cjs +18 -0
  115. package/components/like-anchor-Bu3pXbjT.cjs +32 -0
  116. package/components/like-anchor-DCFJN0LV.js +69 -0
  117. package/components/luzmo-icons-CiSek5iM.js +229 -0
  118. package/components/luzmo-icons-CtA-TJPd.cjs +29 -0
  119. package/components/manage-help-text-CHfMLzSa.js +92 -0
  120. package/components/manage-help-text-DNqdEkTA.cjs +30 -0
  121. package/components/menu/index.cjs +29 -1297
  122. package/components/menu/index.js +499 -954
  123. package/components/multi-language-field/index.cjs +2 -132
  124. package/components/multi-language-field/index.js +88 -118
  125. package/components/mutation-controller-DH7YOCyj.js +52 -0
  126. package/components/mutation-controller-DkOMCW-c.cjs +22 -0
  127. package/components/number-field/index.cjs +10 -613
  128. package/components/number-field/index.js +243 -442
  129. package/components/observe-slot-presence-CmVi0zTc.js +68 -0
  130. package/components/observe-slot-presence-bc9chhsi.cjs +18 -0
  131. package/components/observe-slot-text-C3moTjwy.js +87 -0
  132. package/components/observe-slot-text-D2VAEFSd.cjs +18 -0
  133. package/components/options/index.cjs +60 -693
  134. package/components/options/index.js +953 -519
  135. package/components/overlay/index.cjs +21 -367
  136. package/components/overlay/index.js +189 -273
  137. package/components/overlay-B3ajDLLq.cjs +47 -0
  138. package/components/overlay-CUKs69yr.js +2745 -0
  139. package/components/{pending-state-CXbe-Xul.js → pending-state-B2wWssTo.js} +13 -28
  140. package/components/pending-state-bJr-nEJl.cjs +26 -0
  141. package/components/picker/index.cjs +1 -9
  142. package/components/picker/index.js +11 -15
  143. package/components/picker-C0LvseZe.cjs +123 -0
  144. package/components/picker-W1qNmtsh.js +461 -0
  145. package/components/picker-button/index.cjs +4 -56
  146. package/components/picker-button/index.js +34 -45
  147. package/components/{condition-attribute-with-id-Cn815e9W.js → platform-BM-uMWpX.js} +49 -24
  148. package/components/platform-BiXhwqk3.cjs +18 -0
  149. package/components/popover/index.cjs +1 -7
  150. package/components/popover/index.js +8 -12
  151. package/components/popover-fwJeZHMQ.cjs +30 -0
  152. package/components/popover-iD8f5Jkp.js +67 -0
  153. package/components/progress-circle/index.cjs +1 -7
  154. package/components/progress-circle/index.js +8 -12
  155. package/components/progress-circle-DZxaMe8L.cjs +33 -0
  156. package/components/progress-circle-USIIU1up.js +97 -0
  157. package/components/query-BL-TJj7K.cjs +22 -0
  158. package/components/query-D_KR_GUc.js +51 -0
  159. package/components/query-assigned-elements-DjfhL1cl.js +36 -0
  160. package/components/query-assigned-elements-DsKsfk7G.cjs +22 -0
  161. package/components/query-assigned-nodes-BcKWmGzy.cjs +22 -0
  162. package/components/query-assigned-nodes-C76XVPWY.js +36 -0
  163. package/components/radio/index.cjs +2 -244
  164. package/components/radio/index.js +110 -192
  165. package/components/{random-id-BEc6QIUL.js → random-id-ByCz1xaq.js} +3 -3
  166. package/components/random-id-CqvckpWe.cjs +18 -0
  167. package/components/roving-tabindex-By_fCy_e.cjs +18 -0
  168. package/components/roving-tabindex-DOg4z6ZU.js +66 -0
  169. package/components/search/index.cjs +8 -115
  170. package/components/search/index.js +66 -96
  171. package/components/select/index.cjs +51 -720
  172. package/components/select/index.js +347 -563
  173. package/components/sized-mixin-CJbBHWRQ.js +63 -0
  174. package/components/sized-mixin-WPHH0a_D.cjs +18 -0
  175. package/components/slider/index.cjs +1 -119
  176. package/components/slider/index.js +1113 -100
  177. package/components/slottable-request-event-BfUUt1Mh.cjs +18 -0
  178. package/components/{slottable-request-event-D9WzrdWv.js → slottable-request-event-DggLA4Rx.js} +9 -12
  179. package/components/state-DwIwYPvt.js +29 -0
  180. package/components/state-vf0PJN3_.cjs +22 -0
  181. package/components/strategies-C6HsQpU2.cjs +18 -0
  182. package/components/strategies-CUMLHtQI.js +195 -0
  183. package/components/streaming-listener-BQ68fKMa.js +91 -0
  184. package/components/streaming-listener-DeGQYM-9.cjs +18 -0
  185. package/components/style-map-Bnhf_mVZ.js +53 -0
  186. package/components/style-map-DuMd5xlY.cjs +22 -0
  187. package/components/swatch/index.cjs +7 -436
  188. package/components/swatch/index.js +205 -350
  189. package/components/switch/index.cjs +2 -61
  190. package/components/switch/index.js +34 -51
  191. package/components/tabs/index.cjs +26 -693
  192. package/components/tabs/index.js +388 -521
  193. package/components/tags/index.cjs +4 -201
  194. package/components/tags/index.js +87 -152
  195. package/components/text-field/index.cjs +3 -49
  196. package/components/text-field/index.js +30 -44
  197. package/components/text-field-BkFPYo7S.cjs +85 -0
  198. package/components/text-field-C2n3rzCK.js +314 -0
  199. package/components/text-field.module-C2KVUJcX.js +21 -0
  200. package/components/text-field.module-DXhFA9G-.cjs +18 -0
  201. package/components/toast/index.cjs +12 -177
  202. package/components/toast/index.js +73 -145
  203. package/components/tooltip/index.cjs +6 -250
  204. package/components/tooltip/index.js +124 -177
  205. package/components/unit-input/index.cjs +8 -232
  206. package/components/unit-input/index.js +108 -201
  207. package/components/utils.cjs +1 -25
  208. package/components/utils.js +22 -22
  209. package/components/{random-id-BE6HA503.cjs → when-CDK1Tt5Y.js} +10 -7
  210. package/components/when-CDZyJPvd.cjs +22 -0
  211. package/package.json +1 -1
  212. package/components/action-group-DHp8RHDf.js +0 -392
  213. package/components/action-group-MPf19RPV.cjs +0 -391
  214. package/components/base-COw9n7UR.cjs +0 -119
  215. package/components/base-DmeVy0cq.js +0 -120
  216. package/components/button-base-7Ak55xFd.cjs +0 -206
  217. package/components/button-base-C3kf6BTK.js +0 -207
  218. package/components/checkbox-mixin-8cL-vfDy.js +0 -84
  219. package/components/checkbox-mixin-CE7dJj3J.cjs +0 -83
  220. package/components/clear-button-Co6oKSgl.js +0 -59
  221. package/components/clear-button-X_HDY2eH.cjs +0 -58
  222. package/components/close-button-DPBK6Kpu.cjs +0 -59
  223. package/components/close-button-Miw9ZjoJ.js +0 -60
  224. package/components/color-controller-BjDZaxhX.js +0 -491
  225. package/components/color-controller-C3c_vb2P.cjs +0 -490
  226. package/components/color-loupe-BQqNR8YD.cjs +0 -88
  227. package/components/color-loupe-B_DDFv8l.js +0 -89
  228. package/components/condition-attribute-with-id-DEc2Yjne.cjs +0 -43
  229. package/components/dependency-manger-CcIE1uvQ.cjs +0 -63
  230. package/components/divider.module-Cm5LcDRV.cjs +0 -20
  231. package/components/divider.module-DauH6k2_.js +0 -21
  232. package/components/element-resolution-DCsrhGZO.cjs +0 -112
  233. package/components/element-resolution-nMlmW4Jy.js +0 -113
  234. package/components/field-group-DNmY8W9v.cjs +0 -86
  235. package/components/field-group-DVdAWCQF.js +0 -87
  236. package/components/field-label-CKH9EXpR.cjs +0 -156
  237. package/components/field-label-Dpsecoc6.js +0 -157
  238. package/components/focus-group-BqDAk9Is.js +0 -337
  239. package/components/focus-group-DFzOlalL.cjs +0 -336
  240. package/components/focus-visible-B-B8-P9R.cjs +0 -104
  241. package/components/focus-visible-BUPRWlsh.js +0 -105
  242. package/components/focusable-BPrTcZPd.cjs +0 -262
  243. package/components/focusable-ChCLg1k4.js +0 -263
  244. package/components/language-resolution-iN9EImbb.cjs +0 -57
  245. package/components/like-anchor-D62faRNG.cjs +0 -79
  246. package/components/like-anchor-v3cJ9RWM.js +0 -80
  247. package/components/manage-help-text-BYx84zZR.cjs +0 -125
  248. package/components/manage-help-text-DOuMTGht.js +0 -126
  249. package/components/observe-slot-presence-9AwLGUQ_.cjs +0 -78
  250. package/components/observe-slot-presence-DcMdoumP.js +0 -79
  251. package/components/observe-slot-text-CSofZeeF.cjs +0 -104
  252. package/components/observe-slot-text-CjnkkBPn.js +0 -105
  253. package/components/overlay-CN8ISP1F.js +0 -2485
  254. package/components/overlay-LViy9VWM.cjs +0 -2484
  255. package/components/pending-state-e4RbXe9u.cjs +0 -75
  256. package/components/picker-DNde3awt.cjs +0 -672
  257. package/components/picker-PfUAF05y.js +0 -673
  258. package/components/platform-CxDar3Dn.cjs +0 -68
  259. package/components/platform-Cxn0WbyT.js +0 -69
  260. package/components/popover-BkbYhl3i.js +0 -74
  261. package/components/popover-BkgUf0kL.cjs +0 -74
  262. package/components/progress-circle-Hu_ivPHf.js +0 -133
  263. package/components/progress-circle-_Etqsj9f.cjs +0 -132
  264. package/components/roving-tabindex-AsmAh2In.cjs +0 -95
  265. package/components/roving-tabindex-DPF9NmrH.js +0 -96
  266. package/components/sized-mixin-DmkrNdWB.js +0 -80
  267. package/components/sized-mixin-UaTVa-AE.cjs +0 -79
  268. package/components/strategies-DlMlaSJR.cjs +0 -317
  269. package/components/strategies-DlPQoTFE.js +0 -318
  270. package/components/streaming-listener-D4sHaMub.cjs +0 -145
  271. package/components/streaming-listener-cAz5zJyk.js +0 -146
  272. package/components/text-field-11tcnftU.cjs +0 -338
  273. package/components/text-field-Chi9J2Cz.js +0 -339
  274. package/components/text-field.module-CMBS0jSL.js +0 -21
  275. package/components/text-field.module-DIJdV_sA.cjs +0 -20
@@ -15,98 +15,73 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
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);
18
+ import { a as d, r as m, x as p, n as u } from "../base-CFWO09N1.js";
19
+ import { s as h } from "../mutation-controller-DH7YOCyj.js";
20
+ import { e as z } from "../query-D_KR_GUc.js";
21
+ import { o as g } from "../if-defined-DULpqYwi.js";
22
+ import { R as f } from "../roving-tabindex-DOg4z6ZU.js";
23
+ import { S as b } from "../sized-mixin-CJbBHWRQ.js";
24
+ const n = () => {
25
+ if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
26
+ const s = document.createElement("style");
27
+ s.setAttribute("data-luzmo-vars", ""), s.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(s);
24
28
  }
25
29
  };
26
- initializeGlobalLuzmoCSSVariables();
27
- import { unsafeCSS, html } from "lit";
28
- import { MutationController } from "@lit-labs/observers/mutation-controller.js";
29
- import { property, query } from "lit/decorators.js";
30
- import { ifDefined } from "lit/directives/if-defined.js";
31
- import { a as LuzmoElement } from "../base-DmeVy0cq.js";
32
- import { R as RovingTabindexController } from "../roving-tabindex-DPF9NmrH.js";
33
- import { S as SizedMixin } from "../sized-mixin-DmkrNdWB.js";
34
- const styles = ".color-palette-group{column-gap:var(--luzmo-color-palette-group-column-gap, var(--color-palette-group-column-gap));row-gap:var(--luzmo-color-palette-group-row-gap, var(--color-palette-group-row-gap));flex-wrap:wrap;display:flex}::slotted(*){flex-shrink:0}::slotted(:focus-visible){z-index:1}:host{--color-palette-group-column-gap: var(--luzmo-spacing-3);--color-palette-group-row-gap: var(--luzmo-spacing-3)}:host([size=s]){--color-palette-group-column-gap: var(--luzmo-spacing-2);--color-palette-group-row-gap: var(--luzmo-spacing-2)}:host,:host([size=l]),:host([size=xl]){--color-palette-group-column-gap: var(--luzmo-spacing-3);--color-palette-group-row-gap: var(--luzmo-spacing-3)}";
35
- var __defProp = Object.defineProperty;
36
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
37
- var __decorateClass = (decorators, target, key, kind) => {
38
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
39
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
40
- if (decorator = decorators[i])
41
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
42
- if (kind && result) __defProp(target, key, result);
43
- return result;
30
+ n();
31
+ const v = ".color-palette-group{column-gap:var(--luzmo-color-palette-group-column-gap, var(--color-palette-group-column-gap));row-gap:var(--luzmo-color-palette-group-row-gap, var(--color-palette-group-row-gap));flex-wrap:wrap;display:flex}::slotted(*){flex-shrink:0}::slotted(:focus-visible){z-index:1}:host{--color-palette-group-column-gap: var(--luzmo-spacing-3);--color-palette-group-row-gap: var(--luzmo-spacing-3)}:host([size=s]){--color-palette-group-column-gap: var(--luzmo-spacing-2);--color-palette-group-row-gap: var(--luzmo-spacing-2)}:host,:host([size=l]),:host([size=xl]){--color-palette-group-column-gap: var(--luzmo-spacing-3);--color-palette-group-row-gap: var(--luzmo-spacing-3)}";
32
+ var x = Object.defineProperty, y = Object.getOwnPropertyDescriptor, i = (s, e, o, l) => {
33
+ for (var r = l > 1 ? void 0 : l ? y(e, o) : e, t = s.length - 1, c; t >= 0; t--)
34
+ (c = s[t]) && (r = (l ? c(e, o, r) : c(r)) || r);
35
+ return l && r && x(e, o, r), r;
44
36
  };
45
- class LuzmoColorPaletteGroup extends SizedMixin(LuzmoElement, {
37
+ class a extends b(d, {
46
38
  validSizes: ["s", "m", "l", "xl"],
47
- noDefaultSize: true
39
+ noDefaultSize: !0
48
40
  }) {
49
41
  constructor() {
50
- super();
51
- this.disabled = false;
52
- this.horizontal = false;
53
- this._palettes = [];
54
- this.rovingTabindexController = new RovingTabindexController(
42
+ super(), this.disabled = !1, this.horizontal = !1, this._palettes = [], this.rovingTabindexController = new f(
55
43
  this,
56
44
  {
57
- focusInIndex: (elements) => elements.findIndex(
58
- (el) => this.selected ? !el.disabled && el.value === this.selected : !el.disabled
45
+ focusInIndex: (e) => e.findIndex(
46
+ (o) => this.selected ? !o.disabled && o.value === this.selected : !o.disabled
59
47
  ),
60
48
  elements: () => this.palettes,
61
- isFocusableElement: (el) => !el.disabled
49
+ isFocusableElement: (e) => !e.disabled
62
50
  }
63
- );
64
- this.label = "";
65
- this._onKeyDown = (event) => {
66
- if (event.code === "Enter" || event.code === "Space") {
67
- event.preventDefault();
68
- const target = event.target;
69
- if (target.value === void 0) {
51
+ ), this.label = "", this._onKeyDown = (e) => {
52
+ if (e.code === "Enter" || e.code === "Space") {
53
+ e.preventDefault();
54
+ const o = e.target;
55
+ if (o.value === void 0)
70
56
  return;
71
- }
72
- this.deselectSelectedPalettes();
73
- target.selected = true;
74
- target.tabIndex = 0;
75
- target.setAttribute("aria-checked", "true");
76
- this.setSelected(target.value, true);
57
+ this.deselectSelectedPalettes(), o.selected = !0, o.tabIndex = 0, o.setAttribute("aria-checked", "true"), this.setSelected(o.value, !0);
77
58
  }
78
- };
79
- this.manageColorPalettes = () => {
80
- if (!this.slotElement) {
59
+ }, this.manageColorPalettes = () => {
60
+ if (!this.slotElement)
81
61
  return;
82
- }
83
- const assignedElements = this.slotElement.assignedElements({
84
- flatten: true
85
- });
86
- const palettes = assignedElements.reduce((acc, el) => {
87
- if (el.matches("luzmo-color-palette")) {
88
- acc.push(el);
89
- } else {
90
- const paletteDescendents = [
91
- ...el.querySelectorAll(`:scope > ${"luzmo-color-palette"}`)
62
+ const o = this.slotElement.assignedElements({
63
+ flatten: !0
64
+ }).reduce((l, r) => {
65
+ if (r.matches("luzmo-color-palette"))
66
+ l.push(r);
67
+ else {
68
+ const t = [
69
+ ...r.querySelectorAll(":scope > luzmo-color-palette")
92
70
  ];
93
- acc.push(...paletteDescendents);
71
+ l.push(...t);
94
72
  }
95
- return acc;
73
+ return l;
96
74
  }, []);
97
- this.palettes = palettes;
98
- this.manageChildren();
99
- this.manageSelects();
100
- };
101
- new MutationController(this, {
75
+ this.palettes = o, this.manageChildren(), this.manageSelects();
76
+ }, new h(this, {
102
77
  config: {
103
- childList: true,
104
- subtree: true
78
+ childList: !0,
79
+ subtree: !0
105
80
  },
106
81
  callback: () => {
107
82
  this.manageColorPalettes();
108
83
  },
109
- skipInitial: true
84
+ skipInitial: !0
110
85
  });
111
86
  }
112
87
  /**
@@ -114,18 +89,14 @@ class LuzmoColorPaletteGroup extends SizedMixin(LuzmoElement, {
114
89
  * @internal
115
90
  */
116
91
  static get styles() {
117
- return [unsafeCSS(styles)];
92
+ return [m(v)];
118
93
  }
119
94
  /**
120
95
  * The color palette elements in the group
121
96
  * @internal
122
97
  */
123
- set palettes(palettes) {
124
- if (palettes === this.palettes) {
125
- return;
126
- }
127
- this._palettes = palettes;
128
- this.rovingTabindexController.clearElementCache();
98
+ set palettes(e) {
99
+ e !== this.palettes && (this._palettes = e, this.rovingTabindexController.clearElementCache());
129
100
  }
130
101
  /**
131
102
  * The color palette elements in the group
@@ -137,92 +108,60 @@ class LuzmoColorPaletteGroup extends SizedMixin(LuzmoElement, {
137
108
  get selected() {
138
109
  return this._selected;
139
110
  }
140
- set selected(selected) {
141
- this.requestUpdate("selected", this._selected);
142
- this._selected = selected;
143
- this.updateComplete.then(() => {
144
- this.applySelects();
145
- this.manageChildren();
111
+ set selected(e) {
112
+ this.requestUpdate("selected", this._selected), this._selected = e, this.updateComplete.then(() => {
113
+ this.applySelects(), this.manageChildren();
146
114
  });
147
115
  }
148
- dispatchChange(old) {
149
- const applyDefault = this.dispatchEvent(
116
+ dispatchChange(e) {
117
+ this.dispatchEvent(
150
118
  new Event("change", {
151
- bubbles: true,
152
- composed: true,
153
- cancelable: true
119
+ bubbles: !0,
120
+ composed: !0,
121
+ cancelable: !0
154
122
  })
155
- );
156
- if (!applyDefault) {
157
- this.setSelected(old);
158
- this.palettes.map((palette) => {
159
- palette.selected = palette.value && this.selected === palette.value ? true : false;
160
- });
161
- }
123
+ ) || (this.setSelected(e), this.palettes.map((l) => {
124
+ l.selected = !!(l.value && this.selected === l.value);
125
+ }));
162
126
  }
163
- setSelected(selected, announce) {
164
- if (selected === this.selected) {
127
+ setSelected(e, o) {
128
+ if (e === this.selected)
165
129
  return;
166
- }
167
- const old = this.selected;
168
- this.requestUpdate("selected", old);
169
- this._selected = selected;
170
- if (!announce) {
171
- return;
172
- }
173
- this.dispatchChange(old);
130
+ const l = this.selected;
131
+ this.requestUpdate("selected", l), this._selected = e, o && this.dispatchChange(l);
174
132
  }
175
- focus(options) {
176
- this.rovingTabindexController.focus(options);
133
+ focus(e) {
134
+ this.rovingTabindexController.focus(e);
177
135
  }
178
136
  deselectSelectedPalettes() {
179
- this.palettes.forEach((palette) => {
180
- if (!palette.selected) {
181
- return;
182
- }
183
- palette.selected = false;
184
- palette.tabIndex = -1;
185
- palette.setAttribute("aria-checked", "false");
137
+ this.palettes.forEach((e) => {
138
+ e.selected && (e.selected = !1, e.tabIndex = -1, e.setAttribute("aria-checked", "false"));
186
139
  });
187
140
  }
188
- _handleClick(event) {
189
- const target = event.target;
190
- if (target.value === void 0) {
191
- return;
192
- }
193
- this.deselectSelectedPalettes();
194
- target.selected = true;
195
- target.tabIndex = 0;
196
- target.setAttribute("aria-checked", "true");
197
- this.setSelected(target.value, true);
141
+ _handleClick(e) {
142
+ const o = e.target;
143
+ o.value !== void 0 && (this.deselectSelectedPalettes(), o.selected = !0, o.tabIndex = 0, o.setAttribute("aria-checked", "true"), this.setSelected(o.value, !0));
198
144
  }
199
145
  async applySelects() {
200
146
  await this.manageSelects();
201
147
  }
202
148
  async manageSelects() {
203
- if (this.palettes.length === 0) {
149
+ if (this.palettes.length === 0)
204
150
  return;
205
- }
206
- const options = this.palettes;
151
+ const e = this.palettes;
207
152
  this.setAttribute("role", "radiogroup");
208
- const selections = [];
209
- const updates = options.map(async (option) => {
210
- await option.updateComplete;
211
- option.setAttribute("role", "radio");
212
- option.setAttribute("aria-checked", option.selected ? "true" : "false");
213
- if (option.selected) {
214
- selections.push(option);
215
- }
153
+ const o = [], l = e.map(async (t) => {
154
+ await t.updateComplete, t.setAttribute("role", "radio"), t.setAttribute("aria-checked", t.selected ? "true" : "false"), t.selected && o.push(t);
216
155
  });
217
- await Promise.all(updates);
218
- const selected = selections.map((palette) => palette.value).find(Boolean);
219
- this.setSelected(selected);
156
+ await Promise.all(l);
157
+ const r = o.map((t) => t.value).find(Boolean);
158
+ this.setSelected(r);
220
159
  }
221
160
  render() {
222
- return html`
161
+ return p`
223
162
  <div
224
163
  class="color-palette-group"
225
- aria-label=${ifDefined(this.label ?? void 0)}
164
+ aria-label=${g(this.label ?? void 0)}
226
165
  role="radiogroup"
227
166
  @keydown=${this._onKeyDown}
228
167
  @slotchange=${this.manageColorPalettes}
@@ -231,63 +170,36 @@ class LuzmoColorPaletteGroup extends SizedMixin(LuzmoElement, {
231
170
  </div>
232
171
  `;
233
172
  }
234
- firstUpdated(changes) {
235
- super.firstUpdated(changes);
236
- this.addEventListener("click", this._handleClick);
173
+ firstUpdated(e) {
174
+ super.firstUpdated(e), this.addEventListener("click", this._handleClick);
237
175
  }
238
- updated(changes) {
239
- super.updated(changes);
240
- const hasHorizontal = changes.has("horizontal");
241
- if (hasHorizontal) {
242
- this.palettes.forEach((palette) => {
243
- palette.horizontal = this.horizontal;
244
- });
245
- }
246
- this.manageSelects();
247
- this.manageChildren();
248
- if (changes.has("size")) {
249
- this.manageChildren(changes);
250
- }
251
- if (changes.has("label") && (this.label || changes.get("label") !== void 0)) {
252
- if (this.label.length > 0) {
253
- this.setAttribute("aria-label", this.label);
254
- } else {
255
- this.removeAttribute("aria-label");
256
- }
257
- }
176
+ updated(e) {
177
+ super.updated(e), e.has("horizontal") && this.palettes.forEach((l) => {
178
+ l.horizontal = this.horizontal;
179
+ }), this.manageSelects(), this.manageChildren(), e.has("size") && this.manageChildren(e), e.has("label") && (this.label || e.get("label") !== void 0) && (this.label.length > 0 ? this.setAttribute("aria-label", this.label) : this.removeAttribute("aria-label"));
258
180
  }
259
- manageChildren(changes) {
260
- this.palettes.forEach((palette) => {
261
- palette.setAttribute("aria-label", `color palette: ${palette.value}`);
262
- palette.selected = palette.value && this.selected === palette.value ? true : false;
263
- if (this.size && (this.size !== "m" || (changes == null ? void 0 : changes.get("size")) !== void 0)) {
264
- palette.size = this.size;
265
- }
266
- if (this.disabled) {
267
- palette.disabled = true;
268
- }
269
- palette.horizontal = this.horizontal;
181
+ manageChildren(e) {
182
+ this.palettes.forEach((o) => {
183
+ o.setAttribute("aria-label", `color palette: ${o.value}`), o.selected = !!(o.value && this.selected === o.value), this.size && (this.size !== "m" || (e == null ? void 0 : e.get("size")) !== void 0) && (o.size = this.size), this.disabled && (o.disabled = !0), o.horizontal = this.horizontal;
270
184
  });
271
185
  }
272
186
  }
273
- __decorateClass([
274
- property({ type: Boolean, reflect: true })
275
- ], LuzmoColorPaletteGroup.prototype, "disabled", 2);
276
- __decorateClass([
277
- property({ type: Boolean, reflect: true })
278
- ], LuzmoColorPaletteGroup.prototype, "horizontal", 2);
279
- __decorateClass([
280
- property({ type: String })
281
- ], LuzmoColorPaletteGroup.prototype, "label", 2);
282
- __decorateClass([
283
- property({ type: String })
284
- ], LuzmoColorPaletteGroup.prototype, "selected", 1);
285
- __decorateClass([
286
- query("slot")
287
- ], LuzmoColorPaletteGroup.prototype, "slotElement", 2);
288
- if (!customElements.get("luzmo-color-palette-group")) {
289
- customElements.define("luzmo-color-palette-group", LuzmoColorPaletteGroup);
290
- }
187
+ i([
188
+ u({ type: Boolean, reflect: !0 })
189
+ ], a.prototype, "disabled", 2);
190
+ i([
191
+ u({ type: Boolean, reflect: !0 })
192
+ ], a.prototype, "horizontal", 2);
193
+ i([
194
+ u({ type: String })
195
+ ], a.prototype, "label", 2);
196
+ i([
197
+ u({ type: String })
198
+ ], a.prototype, "selected", 1);
199
+ i([
200
+ z("slot")
201
+ ], a.prototype, "slotElement", 2);
202
+ customElements.get("luzmo-color-palette-group") || customElements.define("luzmo-color-palette-group", a);
291
203
  export {
292
- LuzmoColorPaletteGroup
204
+ a as LuzmoColorPaletteGroup
293
205
  };
@@ -15,68 +15,7 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- "use strict";
19
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
20
- const lit = require("lit");
21
- const decorators_js = require("lit/decorators.js");
22
- const base = require("../base-COw9n7UR.cjs");
23
- const sizedMixin = require("../sized-mixin-UaTVa-AE.cjs");
24
- require("../color-menu/index.cjs");
25
- require("../overlay/index.cjs");
26
- const slottableRequestEvent = require("../slottable-request-event-CANixJnR.cjs");
27
- require("../popover/index.cjs");
28
- require("../swatch/index.cjs");
29
- const styles = "luzmo-popover{margin-left:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap));margin-right:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap))}luzmo-swatch{cursor:pointer}:host([read-only]) luzmo-swatch{cursor:default;pointer-events:none}:host{--luzmo-popover-content-area-spacing-vertical: 0;--color-picker-popover-horizontal-gap: var(--luzmo-spacing-4)}:host([size=s]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-3)}:host([size=l]),:host([size=xl]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-5)}";
30
- var __defProp = Object.defineProperty;
31
- var __decorateClass = (decorators, target, key, kind) => {
32
- var result = void 0;
33
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
34
- if (decorator = decorators[i])
35
- result = decorator(target, key, result) || result;
36
- if (result) __defProp(target, key, result);
37
- return result;
38
- };
39
- const _LuzmoColorPicker = class _LuzmoColorPicker extends sizedMixin.SizedMixin(base.LuzmoElement) {
40
- constructor() {
41
- super(...arguments);
42
- this.color = "rgb(255, 0, 0)";
43
- this.open = false;
44
- this.disabled = false;
45
- this.readOnly = false;
46
- this.placement = "left-start";
47
- this.rounding = "full";
48
- this.swatches = [];
49
- this.noAlphaChannel = false;
50
- this._renderMenu = false;
51
- }
52
- overlayCloseEvent() {
53
- this.open = false;
54
- }
55
- overlayOpenEvent() {
56
- this.open = true;
57
- }
58
- handleColorChange() {
59
- const menuColor = this.menuElement.color;
60
- this.color = typeof menuColor === "string" ? menuColor : String(menuColor);
61
- this.dispatchEvent(
62
- new Event("change", {
63
- bubbles: true,
64
- composed: true
65
- })
66
- );
67
- }
68
- firstUpdated() {
69
- this.overlayElement.addEventListener("slottable-request", (event) => {
70
- this._renderMenu = event.data === slottableRequestEvent.removeSlottableRequest ? false : true;
71
- });
72
- }
73
- updated(changedProperties) {
74
- if (changedProperties.has("open") && this.open === true) {
75
- this._renderMenu = true;
76
- }
77
- }
78
- renderColorMenu() {
79
- return lit.html`
18
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../base-Cy0MQrPT.cjs"),h=require("../state-vf0PJN3_.cjs"),u=require("../query-BL-TJj7K.cjs"),c=require("../sized-mixin-WPHH0a_D.cjs");require("../color-menu/index.cjs");require("../overlay/index.cjs");const d=require("../slottable-request-event-BfUUt1Mh.cjs");require("../popover/index.cjs");require("../swatch/index.cjs");const m="luzmo-popover{margin-left:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap));margin-right:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap))}luzmo-swatch{cursor:pointer}:host([read-only]) luzmo-swatch{cursor:default;pointer-events:none}:host{--luzmo-popover-content-area-spacing-vertical: 0;--color-picker-popover-horizontal-gap: var(--luzmo-spacing-4)}:host([size=s]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-3)}:host([size=l]),:host([size=xl]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-5)}";var y=Object.defineProperty,o=(i,r,a,v)=>{for(var l=void 0,n=i.length-1,p;n>=0;n--)(p=i[n])&&(l=p(r,a,l)||l);return l&&y(r,a,l),l};const s=class s extends c.SizedMixin(t.LuzmoElement){constructor(){super(...arguments),this.color="rgb(255, 0, 0)",this.open=!1,this.disabled=!1,this.readOnly=!1,this.placement="left-start",this.rounding="full",this.swatches=[],this.noAlphaChannel=!1,this._renderMenu=!1}overlayCloseEvent(){this.open=!1}overlayOpenEvent(){this.open=!0}handleColorChange(){const r=this.menuElement.color;this.color=typeof r=="string"?r:String(r),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}firstUpdated(){this.overlayElement.addEventListener("slottable-request",r=>{this._renderMenu=r.data!==d.removeSlottableRequest})}updated(r){r.has("open")&&this.open===!0&&(this._renderMenu=!0)}renderColorMenu(){return t.x`
80
19
  <luzmo-color-menu
81
20
  .size=${this.size}
82
21
  .color=${this.color}
@@ -84,73 +23,26 @@ const _LuzmoColorPicker = class _LuzmoColorPicker extends sizedMixin.SizedMixin(
84
23
  .swatches=${this.swatches}
85
24
  @change=${this.handleColorChange}
86
25
  ></luzmo-color-menu>
87
- `;
88
- }
89
- render() {
90
- return lit.html`
26
+ `}render(){return t.x`
91
27
  <luzmo-swatch
92
28
  id="trigger"
93
29
  .shape=${this.shape}
94
30
  .rounding=${this.rounding}
95
31
  .size=${this.size}
96
32
  .color=${this.color}
97
- .selected=${this.open && !this.disabled}
33
+ .selected=${this.open&&!this.disabled}
98
34
  ?disabled=${this.disabled}
99
35
  ?read-only=${this.readOnly}
100
36
  @luzmo-closed=${this.overlayCloseEvent}
101
37
  @luzmo-opened=${this.overlayOpenEvent}
102
38
  ></luzmo-swatch>
103
39
  <luzmo-overlay
104
- trigger=${this.disabled || this.readOnly ? "" : "trigger@click"}
40
+ trigger=${this.disabled||this.readOnly?"":"trigger@click"}
105
41
  .placement=${this.placement}
106
42
  type="auto"
107
43
  >
108
44
  <luzmo-popover style="position:relative">
109
- ${this._renderMenu ? this.renderColorMenu() : lit.html``}
45
+ ${this._renderMenu?this.renderColorMenu():t.x``}
110
46
  </luzmo-popover>
111
47
  </luzmo-overlay>
112
- `;
113
- }
114
- };
115
- _LuzmoColorPicker.styles = lit.unsafeCSS(styles);
116
- let LuzmoColorPicker = _LuzmoColorPicker;
117
- __decorateClass([
118
- decorators_js.property({ type: String, reflect: true })
119
- ], LuzmoColorPicker.prototype, "color");
120
- __decorateClass([
121
- decorators_js.property({ type: Boolean, reflect: true })
122
- ], LuzmoColorPicker.prototype, "open");
123
- __decorateClass([
124
- decorators_js.property({ type: Boolean, reflect: true })
125
- ], LuzmoColorPicker.prototype, "disabled");
126
- __decorateClass([
127
- decorators_js.property({ type: Boolean, reflect: true, attribute: "read-only" })
128
- ], LuzmoColorPicker.prototype, "readOnly");
129
- __decorateClass([
130
- decorators_js.property({ type: String, reflect: true })
131
- ], LuzmoColorPicker.prototype, "placement");
132
- __decorateClass([
133
- decorators_js.property({ type: String, reflect: true })
134
- ], LuzmoColorPicker.prototype, "rounding");
135
- __decorateClass([
136
- decorators_js.property({ type: String, reflect: true })
137
- ], LuzmoColorPicker.prototype, "shape");
138
- __decorateClass([
139
- decorators_js.property({ type: Array, reflect: true })
140
- ], LuzmoColorPicker.prototype, "swatches");
141
- __decorateClass([
142
- decorators_js.property({ type: Boolean, reflect: true, attribute: "no-alpha-channel" })
143
- ], LuzmoColorPicker.prototype, "noAlphaChannel");
144
- __decorateClass([
145
- decorators_js.query("luzmo-color-menu")
146
- ], LuzmoColorPicker.prototype, "menuElement");
147
- __decorateClass([
148
- decorators_js.query("luzmo-overlay")
149
- ], LuzmoColorPicker.prototype, "overlayElement");
150
- __decorateClass([
151
- decorators_js.state()
152
- ], LuzmoColorPicker.prototype, "_renderMenu");
153
- if (!customElements.get("luzmo-color-picker")) {
154
- customElements.define("luzmo-color-picker", LuzmoColorPicker);
155
- }
156
- exports.LuzmoColorPicker = LuzmoColorPicker;
48
+ `}};s.styles=t.r(m);let e=s;o([t.n({type:String,reflect:!0})],e.prototype,"color");o([t.n({type:Boolean,reflect:!0})],e.prototype,"open");o([t.n({type:Boolean,reflect:!0})],e.prototype,"disabled");o([t.n({type:Boolean,reflect:!0,attribute:"read-only"})],e.prototype,"readOnly");o([t.n({type:String,reflect:!0})],e.prototype,"placement");o([t.n({type:String,reflect:!0})],e.prototype,"rounding");o([t.n({type:String,reflect:!0})],e.prototype,"shape");o([t.n({type:Array,reflect:!0})],e.prototype,"swatches");o([t.n({type:Boolean,reflect:!0,attribute:"no-alpha-channel"})],e.prototype,"noAlphaChannel");o([u.e("luzmo-color-menu")],e.prototype,"menuElement");o([u.e("luzmo-overlay")],e.prototype,"overlayElement");o([h.r()],e.prototype,"_renderMenu");customElements.get("luzmo-color-picker")||customElements.define("luzmo-color-picker",e);exports.LuzmoColorPicker=e;