@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,60 +15,39 @@
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 z, r as v, x as y, n as s } from "../base-CFWO09N1.js";
19
+ import { e as b } from "../query-D_KR_GUc.js";
20
+ import { o as m } from "../if-defined-DULpqYwi.js";
21
+ import "../color-handle/index.js";
22
+ import { j as x, c as w } from "../platform-BM-uMWpX.js";
23
+ import { C } from "../color-controller-B0uX6Zso.js";
24
+ import { L as $ } from "../language-resolution-B-wjV5bb.js";
25
+ import { s as k } from "../streaming-listener-BQ68fKMa.js";
26
+ const g = () => {
27
+ if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
28
+ const u = document.createElement("style");
29
+ u.setAttribute("data-luzmo-vars", ""), u.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(u);
24
30
  }
25
31
  };
26
- initializeGlobalLuzmoCSSVariables();
27
- import { unsafeCSS, html } from "lit";
28
- import { property, query } from "lit/decorators.js";
29
- import { ifDefined } from "lit/directives/if-defined.js";
30
- import "../color-handle/index.js";
31
- import { a as LuzmoElement } from "../base-DmeVy0cq.js";
32
- import { j as isAndroid, c as isIOS } from "../platform-Cxn0WbyT.js";
33
- import { C as ColorController } from "../color-controller-BjDZaxhX.js";
34
- import { L as LanguageResolutionController } from "../language-resolution-BSGJAWiQ.js";
35
- import { s as streamingListener } from "../streaming-listener-cAz5zJyk.js";
36
- const styles = "@media (forced-colors: active){:host{--highcontrast-color-area-border-color-disabled: GrayText;--highcontrast-color-area-border-color: Canvas;--highcontrast-color-area-fill-color-disabled: Canvas}.gradient,:host([disabled]){forced-color-adjust:none}}:host{cursor:default;-webkit-user-select:none;user-select:none;min-inline-size:var(--luzmo-color-area-min-width, 64px);min-block-size:var(--luzmo-color-area-min-height, 64px);inline-size:var(--luzmo-color-area-width, 192px);block-size:var(--luzmo-color-area-height, 192px);box-sizing:border-box;border-radius:var(--luzmo-color-area-border-radius, var(--luzmo-border-radius-s));border:var(--luzmo-color-area-border-width, var(--luzmo-border-width)) solid var(--highcontrast-color-area-border-color, var(--luzmo-color-area-border-color, var(--luzmo-border-color)));display:inline-block;position:relative}:host([focused]){z-index:1}:host([disabled]){pointer-events:none;background:var(--highcontrast-color-area-fill-color-disabled, var(--luzmo-color-area-disabled-background-color, var(--luzmo-dimmed-color)));border:var(--luzmo-color-area-border-width, var(--luzmo-border-width)) solid var(--highcontrast-color-area-border-color-disabled)}:host([disabled]) .gradient{display:none}.handle{transform:translate(calc(var(--luzmo-color-area-width, 192px) - var(--luzmo-border-width)));inset-block-start:0}.handle:dir(rtl),:host([dir=rtl]) .handle{inset-inline-end:0}.gradient{inline-size:100%;block-size:100%;border-radius:var(--luzmo-color-area-border-radius, var(--luzmo-border-radius-s))}.slider{opacity:0;inline-size:100%;block-size:100%;z-index:0;pointer-events:none;margin:0;position:absolute;inset-block-start:0;inset-inline-start:0}:host{touch-action:none}:host:before{pointer-events:none}.gradient{overflow:hidden}.handle{transform:translate(var(--luzmo-color-area-default-width))}::slotted(*){width:100%;height:100%}:host([dir=rtl]) .gradient{transform:scaleX(-1)}.slider[orient=vertical]{-webkit-appearance:slider-vertical;-moz-appearance:slider-vertical;appearance:slider-vertical}.slider:focus{z-index:1}.fieldset{border:0;margin:0;padding:0}";
37
- var __defProp = Object.defineProperty;
38
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
39
- var __decorateClass = (decorators, target, key, kind) => {
40
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
41
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
42
- if (decorator = decorators[i])
43
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
44
- if (kind && result) __defProp(target, key, result);
45
- return result;
32
+ g();
33
+ const R = "@media (forced-colors: active){:host{--highcontrast-color-area-border-color-disabled: GrayText;--highcontrast-color-area-border-color: Canvas;--highcontrast-color-area-fill-color-disabled: Canvas}.gradient,:host([disabled]){forced-color-adjust:none}}:host{cursor:default;-webkit-user-select:none;user-select:none;min-inline-size:var(--luzmo-color-area-min-width, 64px);min-block-size:var(--luzmo-color-area-min-height, 64px);inline-size:var(--luzmo-color-area-width, 192px);block-size:var(--luzmo-color-area-height, 192px);box-sizing:border-box;border-radius:var(--luzmo-color-area-border-radius, var(--luzmo-border-radius-s));border:var(--luzmo-color-area-border-width, var(--luzmo-border-width)) solid var(--highcontrast-color-area-border-color, var(--luzmo-color-area-border-color, var(--luzmo-border-color)));display:inline-block;position:relative}:host([focused]){z-index:1}:host([disabled]){pointer-events:none;background:var(--highcontrast-color-area-fill-color-disabled, var(--luzmo-color-area-disabled-background-color, var(--luzmo-dimmed-color)));border:var(--luzmo-color-area-border-width, var(--luzmo-border-width)) solid var(--highcontrast-color-area-border-color-disabled)}:host([disabled]) .gradient{display:none}.handle{transform:translate(calc(var(--luzmo-color-area-width, 192px) - var(--luzmo-border-width)));inset-block-start:0}.handle:dir(rtl),:host([dir=rtl]) .handle{inset-inline-end:0}.gradient{inline-size:100%;block-size:100%;border-radius:var(--luzmo-color-area-border-radius, var(--luzmo-border-radius-s))}.slider{opacity:0;inline-size:100%;block-size:100%;z-index:0;pointer-events:none;margin:0;position:absolute;inset-block-start:0;inset-inline-start:0}:host{touch-action:none}:host:before{pointer-events:none}.gradient{overflow:hidden}.handle{transform:translate(var(--luzmo-color-area-default-width))}::slotted(*){width:100%;height:100%}:host([dir=rtl]) .gradient{transform:scaleX(-1)}.slider[orient=vertical]{-webkit-appearance:slider-vertical;-moz-appearance:slider-vertical;appearance:slider-vertical}.slider:focus{z-index:1}.fieldset{border:0;margin:0;padding:0}";
34
+ var A = Object.defineProperty, P = Object.getOwnPropertyDescriptor, i = (u, e, o, t) => {
35
+ for (var r = t > 1 ? void 0 : t ? P(e, o) : e, a = u.length - 1, n; a >= 0; a--)
36
+ (n = u[a]) && (r = (t ? n(e, o, r) : n(r)) || r);
37
+ return t && r && A(e, o, r), r;
46
38
  };
47
- class LuzmoColorArea extends LuzmoElement {
39
+ class l extends z {
48
40
  constructor() {
49
- super(...arguments);
50
- this.disabled = false;
51
- this.focused = false;
52
- this.labelX = "saturation";
53
- this.labelY = "luminosity";
54
- this.isLTR = true;
55
- this.languageResolver = new LanguageResolutionController(this);
56
- this.colorController = new ColorController(this, { manageAs: "hsv" });
57
- this.activeAxis = "x";
58
- this.step = 0.01;
59
- this.altered = 0;
60
- this.activeKeys = /* @__PURE__ */ new Set();
61
- this._valueChanged = false;
62
- this._pointerDown = false;
41
+ super(...arguments), this.disabled = !1, this.focused = !1, this.labelX = "saturation", this.labelY = "luminosity", this.isLTR = !0, this.languageResolver = new $(this), this.colorController = new C(this, { manageAs: "hsv" }), this.activeAxis = "x", this.step = 0.01, this.altered = 0, this.activeKeys = /* @__PURE__ */ new Set(), this._valueChanged = !1, this._pointerDown = !1;
63
42
  }
64
43
  static get styles() {
65
- return [unsafeCSS(styles)];
44
+ return [v(R)];
66
45
  }
67
46
  get hue() {
68
47
  return this.colorController.hue;
69
48
  }
70
- set hue(value) {
71
- this.colorController.hue = value;
49
+ set hue(e) {
50
+ this.colorController.hue = e;
72
51
  }
73
52
  get value() {
74
53
  return this.colorController.colorValue;
@@ -76,275 +55,184 @@ class LuzmoColorArea extends LuzmoElement {
76
55
  get color() {
77
56
  return this.colorController.colorValue;
78
57
  }
79
- set color(color) {
80
- this.colorController.color = color;
58
+ set color(e) {
59
+ this.colorController.color = e;
81
60
  }
82
61
  get x() {
83
62
  return this.colorController.color.hsv.s / 100;
84
63
  }
85
- set x(x) {
86
- if (x === this.x) {
64
+ set x(e) {
65
+ if (e === this.x)
87
66
  return;
88
- }
89
- const oldValue = this.x;
90
- if (this.inputX) {
91
- this.inputX.value = x.toString();
92
- this.colorController.color.set("s", this.inputX.valueAsNumber * 100);
93
- } else {
94
- this.colorController.color.set("s", x * 100);
95
- }
96
- this.requestUpdate("x", oldValue);
67
+ const o = this.x;
68
+ this.inputX ? (this.inputX.value = e.toString(), this.colorController.color.set("s", this.inputX.valueAsNumber * 100)) : this.colorController.color.set("s", e * 100), this.requestUpdate("x", o);
97
69
  }
98
70
  get y() {
99
71
  return this.colorController.color.hsv.v / 100;
100
72
  }
101
- set y(y) {
102
- if (y === this.y) {
73
+ set y(e) {
74
+ if (e === this.y)
103
75
  return;
104
- }
105
- const oldValue = this.y;
106
- if (this.inputY) {
107
- this.inputY.value = y.toString();
108
- this.colorController.color.set("v", this.inputY.valueAsNumber * 100);
109
- }
110
- this.requestUpdate("y", oldValue);
76
+ const o = this.y;
77
+ this.inputY && (this.inputY.value = e.toString(), this.colorController.color.set("v", this.inputY.valueAsNumber * 100)), this.requestUpdate("y", o);
111
78
  }
112
- focus(focusOptions = {}) {
113
- super.focus(focusOptions);
114
- this.forwardFocus();
79
+ focus(e = {}) {
80
+ super.focus(e), this.forwardFocus();
115
81
  }
116
82
  forwardFocus() {
117
- if (this.activeAxis === "x") {
118
- this.inputX.focus();
119
- } else {
120
- this.inputY.focus();
121
- }
83
+ this.activeAxis === "x" ? this.inputX.focus() : this.inputY.focus();
122
84
  }
123
85
  handleFocus() {
124
- this.focused = true;
125
- this._valueChanged = false;
86
+ this.focused = !0, this._valueChanged = !1;
126
87
  }
127
88
  handleBlur() {
128
- if (this._pointerDown) {
129
- return;
130
- }
131
- this.altered = 0;
132
- this.focused = false;
133
- this._valueChanged = false;
89
+ this._pointerDown || (this.altered = 0, this.focused = !1, this._valueChanged = !1);
134
90
  }
135
- handleKeydown(event) {
136
- const { code } = event;
137
- this.focused = true;
138
- this.altered = [event.shiftKey, event.ctrlKey, event.altKey].filter(
139
- (key) => !!key
140
- ).length;
141
- const isArrowKey = code.search("Arrow") === 0 || code.search("Page") === 0 || code.search("Home") === 0 || code.search("End") === 0;
142
- if (isArrowKey) {
143
- event.preventDefault();
144
- this.activeKeys.add(code);
145
- this.handleKeypress();
146
- }
91
+ handleKeydown(e) {
92
+ const { code: o } = e;
93
+ this.focused = !0, this.altered = [e.shiftKey, e.ctrlKey, e.altKey].filter(
94
+ (r) => !!r
95
+ ).length, (o.search("Arrow") === 0 || o.search("Page") === 0 || o.search("Home") === 0 || o.search("End") === 0) && (e.preventDefault(), this.activeKeys.add(o), this.handleKeypress());
147
96
  }
148
97
  handleKeypress() {
149
- let deltaX = 0;
150
- let deltaY = 0;
151
- const step = Math.max(this.step, this.altered * 5 * this.step);
152
- this.activeKeys.forEach((code) => {
153
- switch (code) {
98
+ let e = 0, o = 0;
99
+ const t = Math.max(this.step, this.altered * 5 * this.step);
100
+ this.activeKeys.forEach((r) => {
101
+ switch (r) {
154
102
  case "ArrowUp": {
155
- deltaY = step;
103
+ o = t;
156
104
  break;
157
105
  }
158
106
  case "ArrowDown": {
159
- deltaY = step * -1;
107
+ o = t * -1;
160
108
  break;
161
109
  }
162
110
  case "ArrowLeft": {
163
- deltaX = this.step * (this.isLTR ? -1 : 1);
111
+ e = this.step * (this.isLTR ? -1 : 1);
164
112
  break;
165
113
  }
166
114
  case "ArrowRight": {
167
- deltaX = this.step * (this.isLTR ? 1 : -1);
115
+ e = this.step * (this.isLTR ? 1 : -1);
168
116
  break;
169
117
  }
170
118
  case "PageUp": {
171
- deltaY = step * 10;
119
+ o = t * 10;
172
120
  break;
173
121
  }
174
122
  case "PageDown": {
175
- deltaY = step * -10;
123
+ o = t * -10;
176
124
  break;
177
125
  }
178
126
  case "Home": {
179
- deltaX = step * (this.isLTR ? -10 : 10);
127
+ e = t * (this.isLTR ? -10 : 10);
180
128
  break;
181
129
  }
182
130
  case "End": {
183
- deltaX = step * (this.isLTR ? 10 : -10);
131
+ e = t * (this.isLTR ? 10 : -10);
184
132
  break;
185
133
  }
186
134
  }
187
- });
188
- if (deltaX !== 0) {
189
- this.activeAxis = "x";
190
- this.inputX.focus();
191
- } else if (deltaY !== 0) {
192
- this.activeAxis = "y";
193
- this.inputY.focus();
194
- }
195
- this.x = Math.min(1, Math.max(this.x + deltaX, 0));
196
- this.y = Math.min(1, Math.max(this.y + deltaY, 0));
197
- this.colorController.savePreviousColor();
198
- if (deltaX !== 0 || deltaY !== 0) {
199
- this._valueChanged = true;
200
- this.dispatchEvent(
201
- new Event("input", {
202
- bubbles: true,
203
- composed: true
204
- })
205
- );
206
- const applyDefault = this.dispatchEvent(
207
- new Event("change", {
208
- bubbles: true,
209
- composed: true,
210
- cancelable: true
211
- })
212
- );
213
- if (!applyDefault) {
214
- this.colorController.restorePreviousColor();
215
- }
216
- }
135
+ }), e !== 0 ? (this.activeAxis = "x", this.inputX.focus()) : o !== 0 && (this.activeAxis = "y", this.inputY.focus()), this.x = Math.min(1, Math.max(this.x + e, 0)), this.y = Math.min(1, Math.max(this.y + o, 0)), this.colorController.savePreviousColor(), (e !== 0 || o !== 0) && (this._valueChanged = !0, this.dispatchEvent(
136
+ new Event("input", {
137
+ bubbles: !0,
138
+ composed: !0
139
+ })
140
+ ), this.dispatchEvent(
141
+ new Event("change", {
142
+ bubbles: !0,
143
+ composed: !0,
144
+ cancelable: !0
145
+ })
146
+ ) || this.colorController.restorePreviousColor());
217
147
  }
218
- handleKeyup(event) {
219
- event.preventDefault();
220
- const { code } = event;
221
- this.activeKeys.delete(code);
148
+ handleKeyup(e) {
149
+ e.preventDefault();
150
+ const { code: o } = e;
151
+ this.activeKeys.delete(o);
222
152
  }
223
- handleInput(event) {
224
- const { valueAsNumber, name } = event.target;
225
- this[name] = valueAsNumber;
153
+ handleInput(e) {
154
+ const { valueAsNumber: o, name: t } = e.target;
155
+ this[t] = o;
226
156
  }
227
- handleChange(event) {
228
- this.handleInput(event);
229
- this.dispatchEvent(
157
+ handleChange(e) {
158
+ this.handleInput(e), this.dispatchEvent(
230
159
  new Event("change", {
231
- bubbles: true,
232
- composed: true,
233
- cancelable: true
160
+ bubbles: !0,
161
+ composed: !0,
162
+ cancelable: !0
234
163
  })
235
164
  );
236
165
  }
237
- handlePointerdown(event) {
238
- if (event.button !== 0) {
239
- event.preventDefault();
166
+ handlePointerdown(e) {
167
+ if (e.button !== 0) {
168
+ e.preventDefault();
240
169
  return;
241
170
  }
242
- this._pointerDown = true;
243
- this.colorController.savePreviousColor();
244
- this.boundingClientRect = this.getBoundingClientRect();
245
- event.target.setPointerCapture(event.pointerId);
246
- if (event.pointerType === "mouse") {
247
- this.focused = true;
248
- }
171
+ this._pointerDown = !0, this.colorController.savePreviousColor(), this.boundingClientRect = this.getBoundingClientRect(), e.target.setPointerCapture(e.pointerId), e.pointerType === "mouse" && (this.focused = !0);
249
172
  }
250
- handlePointermove(event) {
251
- const [x, y] = this.calculateHandlePosition(event);
252
- this._valueChanged = false;
253
- this.x = x;
254
- this.y = y;
255
- this.dispatchEvent(
173
+ handlePointermove(e) {
174
+ const [o, t] = this.calculateHandlePosition(e);
175
+ this._valueChanged = !1, this.x = o, this.y = t, this.dispatchEvent(
256
176
  new Event("input", {
257
- bubbles: true,
258
- composed: true,
259
- cancelable: true
177
+ bubbles: !0,
178
+ composed: !0,
179
+ cancelable: !0
260
180
  })
261
181
  );
262
182
  }
263
- handlePointerup(event) {
264
- event.preventDefault();
265
- this._pointerDown = false;
266
- event.target.releasePointerCapture(event.pointerId);
267
- const applyDefault = this.dispatchEvent(
183
+ handlePointerup(e) {
184
+ e.preventDefault(), this._pointerDown = !1, e.target.releasePointerCapture(e.pointerId);
185
+ const o = this.dispatchEvent(
268
186
  new Event("change", {
269
- bubbles: true,
270
- composed: true,
271
- cancelable: true
187
+ bubbles: !0,
188
+ composed: !0,
189
+ cancelable: !0
272
190
  })
273
191
  );
274
- this.inputX.focus();
275
- if (event.pointerType === "mouse") {
276
- this.focused = false;
277
- }
278
- if (!applyDefault) {
279
- this.colorController.restorePreviousColor();
280
- }
192
+ this.inputX.focus(), e.pointerType === "mouse" && (this.focused = !1), o || this.colorController.restorePreviousColor();
281
193
  }
282
194
  /**
283
195
  * Returns the value under the cursor
284
196
  * @param: PointerEvent on slider
285
197
  * @return: Slider value that correlates to the position under the pointer
286
198
  */
287
- calculateHandlePosition(event) {
288
- if (!this.boundingClientRect) {
199
+ calculateHandlePosition(e) {
200
+ if (!this.boundingClientRect)
289
201
  return [this.x, this.y];
290
- }
291
- const rect = this.boundingClientRect;
292
- const minOffsetX = rect.left;
293
- const minOffsetY = rect.top;
294
- const offsetX = event.clientX;
295
- const offsetY = event.clientY;
296
- const width = rect.width;
297
- const height = rect.height;
298
- const percentX = Math.max(0, Math.min(1, (offsetX - minOffsetX) / width));
299
- const percentY = Math.max(0, Math.min(1, (offsetY - minOffsetY) / height));
300
- return [this.isLTR ? percentX : 1 - percentX, 1 - percentY];
202
+ const o = this.boundingClientRect, t = o.left, r = o.top, a = e.clientX, n = e.clientY, c = o.width, d = o.height, h = Math.max(0, Math.min(1, (a - t) / c)), p = Math.max(0, Math.min(1, (n - r) / d));
203
+ return [this.isLTR ? h : 1 - h, 1 - p];
301
204
  }
302
- handleAreaPointerdown(event) {
303
- if (event.button !== 0) {
304
- return;
305
- }
306
- event.stopPropagation();
307
- event.preventDefault();
308
- this.handle.dispatchEvent(new PointerEvent("pointerdown", event));
309
- this.handlePointermove(event);
205
+ handleAreaPointerdown(e) {
206
+ e.button === 0 && (e.stopPropagation(), e.preventDefault(), this.handle.dispatchEvent(new PointerEvent("pointerdown", e)), this.handlePointermove(e));
310
207
  }
311
208
  render() {
312
- const { width = 0, height = 0 } = this.boundingClientRect || {};
313
- const isMobile = isAndroid() || isIOS();
314
- const defaultAriaLabel = "Color Picker";
315
- const ariaLabel = defaultAriaLabel;
316
- const ariaRoleDescription = ifDefined(isMobile ? void 0 : "2d slider");
317
- const ariaLabelX = this.labelX;
318
- const ariaLabelY = this.labelY;
319
- const ariaValueX = new Intl.NumberFormat(this.languageResolver.language, {
209
+ const { width: e = 0, height: o = 0 } = this.boundingClientRect || {}, t = x() || w(), a = "Color Picker", n = m(t ? void 0 : "2d slider"), c = this.labelX, d = this.labelY, h = new Intl.NumberFormat(this.languageResolver.language, {
320
210
  style: "percent",
321
211
  unitDisplay: "narrow"
322
- }).format(this.x);
323
- const ariaValueY = new Intl.NumberFormat(this.languageResolver.language, {
212
+ }).format(this.x), p = new Intl.NumberFormat(this.languageResolver.language, {
324
213
  style: "percent",
325
214
  unitDisplay: "narrow"
326
- }).format(this.y);
327
- const style = {
215
+ }).format(this.y), f = {
328
216
  background: `linear-gradient(to top, black 0%, hsla(${this.hue}, 100%, 0.01%, 0) 100%),linear-gradient(to right, white 0%, hsla(${this.hue}, 100%, 0.01%, 0) 100%), hsl(${this.hue}, 100%, 50%);`
329
217
  };
330
- return html`
218
+ return y`
331
219
  <div
332
220
  @pointerdown=${this.handleAreaPointerdown}
333
221
  class="gradient"
334
- style="background: ${style.background}"
222
+ style="background: ${f.background}"
335
223
  >
336
224
  <slot name="gradient"></slot>
337
225
  </div>
338
226
 
339
227
  <luzmo-color-handle
340
- tabindex=${ifDefined(this.focused ? void 0 : "0")}
228
+ tabindex=${m(this.focused ? void 0 : "0")}
341
229
  @focus=${this.forwardFocus}
342
230
  ?focused=${this.focused}
343
231
  class="handle"
344
232
  color=${this.colorController.getHslString()}
345
233
  ?disabled=${this.disabled}
346
- style=${`transform: translate(${(this.isLTR ? this.x : 1 - this.x) * width}px, ${height - this.y * height}px);`}
347
- ${streamingListener({
234
+ style=${`transform: translate(${(this.isLTR ? this.x : 1 - this.x) * e}px, ${o - this.y * o}px);`}
235
+ ${k({
348
236
  start: ["pointerdown", this.handlePointerdown],
349
237
  streamInside: ["pointermove", this.handlePointermove],
350
238
  end: [
@@ -356,17 +244,17 @@ class LuzmoColorArea extends LuzmoElement {
356
244
 
357
245
  <fieldset
358
246
  class="fieldset"
359
- aria-label=${ifDefined(isMobile ? ariaLabel : void 0)}
247
+ aria-label=${m(t ? a : void 0)}
360
248
  >
361
249
  <div role="presentation">
362
250
  <input
363
251
  type="range"
364
252
  class="slider"
365
253
  name="x"
366
- aria-label=${isMobile ? ariaLabelX : `${ariaLabelX} ${ariaLabel}`}
367
- aria-roledescription=${ariaRoleDescription}
254
+ aria-label=${t ? c : `${c} ${a}`}
255
+ aria-roledescription=${n}
368
256
  aria-orientation="horizontal"
369
- aria-valuetext=${isMobile ? ariaValueX : `${ariaValueX}, ${ariaLabelX}${this._valueChanged ? "" : `, ${ariaValueY}, ${ariaLabelY}`}`}
257
+ aria-valuetext=${t ? h : `${h}, ${c}${this._valueChanged ? "" : `, ${p}, ${d}`}`}
370
258
  min="0"
371
259
  max="1"
372
260
  step=${this.step}
@@ -381,10 +269,10 @@ class LuzmoColorArea extends LuzmoElement {
381
269
  type="range"
382
270
  class="slider"
383
271
  name="y"
384
- aria-label=${isMobile ? ariaLabelY : `${ariaLabelY} ${ariaLabel}`}
385
- aria-roledescription=${ariaRoleDescription}
272
+ aria-label=${t ? d : `${d} ${a}`}
273
+ aria-roledescription=${n}
386
274
  aria-orientation="vertical"
387
- aria-valuetext=${isMobile ? ariaValueY : `${ariaValueY}, ${ariaLabelY}${this._valueChanged ? "" : `, ${ariaValueX}, ${ariaLabelX}`}`}
275
+ aria-valuetext=${t ? p : `${p}, ${d}${this._valueChanged ? "" : `, ${h}, ${c}`}`}
388
276
  orient="vertical"
389
277
  min="0"
390
278
  max="1"
@@ -398,13 +286,8 @@ class LuzmoColorArea extends LuzmoElement {
398
286
  </fieldset>
399
287
  `;
400
288
  }
401
- firstUpdated(changed) {
402
- super.firstUpdated(changed);
403
- this.boundingClientRect = this.getBoundingClientRect();
404
- this.addEventListener("focus", this.handleFocus);
405
- this.addEventListener("blur", this.handleBlur);
406
- this.addEventListener("keyup", this.handleKeyup);
407
- this.addEventListener("keydown", this.handleKeydown);
289
+ firstUpdated(e) {
290
+ super.firstUpdated(e), this.boundingClientRect = this.getBoundingClientRect(), this.addEventListener("focus", this.handleFocus), this.addEventListener("blur", this.handleBlur), this.addEventListener("keyup", this.handleKeyup), this.addEventListener("keydown", this.handleKeydown);
408
291
  }
409
292
  /**
410
293
  * Overrides the `updated` method to handle changes in property values.
@@ -418,99 +301,81 @@ class LuzmoColorArea extends LuzmoElement {
418
301
  * the `input[type="range"]` elements in shadow roots to prevent multiple
419
302
  * tab stops within the Color Area for certain browser settings (e.g., Webkit).
420
303
  */
421
- updated(changed) {
422
- super.updated(changed);
423
- if (this.x !== this.inputX.valueAsNumber) {
424
- this.colorController.color.set("s", this.inputX.valueAsNumber * 100);
425
- }
426
- if (this.y !== this.inputY.valueAsNumber) {
427
- this.colorController.color.set(
428
- "v",
429
- (1 - this.inputY.valueAsNumber) * 100
430
- );
431
- }
432
- if (changed.has("focused") && this.focused) {
433
- const parentX = this.inputX.parentElement;
434
- const parentY = this.inputY.parentElement;
435
- if (!parentX.shadowRoot && !parentY.shadowRoot) {
436
- parentX.attachShadow({ mode: "open" });
437
- parentY.attachShadow({ mode: "open" });
438
- const slot = '<div tabindex="-1"><slot></slot></div>';
439
- parentX.shadowRoot.innerHTML = slot;
440
- parentY.shadowRoot.innerHTML = slot;
304
+ updated(e) {
305
+ if (super.updated(e), this.x !== this.inputX.valueAsNumber && this.colorController.color.set("s", this.inputX.valueAsNumber * 100), this.y !== this.inputY.valueAsNumber && this.colorController.color.set(
306
+ "v",
307
+ (1 - this.inputY.valueAsNumber) * 100
308
+ ), e.has("focused") && this.focused) {
309
+ const o = this.inputX.parentElement, t = this.inputY.parentElement;
310
+ if (!o.shadowRoot && !t.shadowRoot) {
311
+ o.attachShadow({ mode: "open" }), t.attachShadow({ mode: "open" });
312
+ const r = '<div tabindex="-1"><slot></slot></div>';
313
+ o.shadowRoot.innerHTML = r, t.shadowRoot.innerHTML = r;
441
314
  }
442
315
  }
443
316
  }
444
317
  connectedCallback() {
445
- var _a;
446
- super.connectedCallback();
447
- if (!this.observer && window.ResizeObserver) {
448
- this.observer = new window.ResizeObserver((entries) => {
449
- for (const entry of entries) {
450
- this.boundingClientRect = entry.contentRect;
451
- }
452
- this.requestUpdate();
453
- });
454
- }
455
- (_a = this.observer) == null ? void 0 : _a.observe(this);
318
+ var e;
319
+ super.connectedCallback(), !this.observer && window.ResizeObserver && (this.observer = new window.ResizeObserver((o) => {
320
+ for (const t of o)
321
+ this.boundingClientRect = t.contentRect;
322
+ this.requestUpdate();
323
+ })), (e = this.observer) == null || e.observe(this);
456
324
  }
457
325
  disconnectedCallback() {
458
- var _a;
459
- (_a = this.observer) == null ? void 0 : _a.unobserve(this);
460
- super.disconnectedCallback();
326
+ var e;
327
+ (e = this.observer) == null || e.unobserve(this), super.disconnectedCallback();
461
328
  }
462
329
  }
463
- __decorateClass([
464
- property({ type: String, reflect: true })
465
- ], LuzmoColorArea.prototype, "dir", 2);
466
- __decorateClass([
467
- property({ type: Boolean, reflect: true })
468
- ], LuzmoColorArea.prototype, "disabled", 2);
469
- __decorateClass([
470
- property({ type: Boolean, reflect: true })
471
- ], LuzmoColorArea.prototype, "focused", 2);
472
- __decorateClass([
473
- property({ type: String, attribute: "label-x" })
474
- ], LuzmoColorArea.prototype, "labelX", 2);
475
- __decorateClass([
476
- property({ type: String, attribute: "label-y" })
477
- ], LuzmoColorArea.prototype, "labelY", 2);
478
- __decorateClass([
479
- property({ type: Boolean, attribute: "is-ltr" })
480
- ], LuzmoColorArea.prototype, "isLTR", 2);
481
- __decorateClass([
482
- query(".handle")
483
- ], LuzmoColorArea.prototype, "handle", 2);
484
- __decorateClass([
485
- property({ type: Number })
486
- ], LuzmoColorArea.prototype, "hue", 1);
487
- __decorateClass([
488
- property({ type: String })
489
- ], LuzmoColorArea.prototype, "value", 1);
490
- __decorateClass([
491
- property({ type: String })
492
- ], LuzmoColorArea.prototype, "color", 1);
493
- __decorateClass([
494
- property({ attribute: false })
495
- ], LuzmoColorArea.prototype, "activeAxis", 2);
496
- __decorateClass([
497
- property({ type: Number })
498
- ], LuzmoColorArea.prototype, "x", 1);
499
- __decorateClass([
500
- property({ type: Number })
501
- ], LuzmoColorArea.prototype, "y", 1);
502
- __decorateClass([
503
- property({ type: Number })
504
- ], LuzmoColorArea.prototype, "step", 2);
505
- __decorateClass([
506
- query('[name="x"]')
507
- ], LuzmoColorArea.prototype, "inputX", 2);
508
- __decorateClass([
509
- query('[name="y"]')
510
- ], LuzmoColorArea.prototype, "inputY", 2);
511
- if (!customElements.get("luzmo-color-area")) {
512
- customElements.define("luzmo-color-area", LuzmoColorArea);
513
- }
330
+ i([
331
+ s({ type: String, reflect: !0 })
332
+ ], l.prototype, "dir", 2);
333
+ i([
334
+ s({ type: Boolean, reflect: !0 })
335
+ ], l.prototype, "disabled", 2);
336
+ i([
337
+ s({ type: Boolean, reflect: !0 })
338
+ ], l.prototype, "focused", 2);
339
+ i([
340
+ s({ type: String, attribute: "label-x" })
341
+ ], l.prototype, "labelX", 2);
342
+ i([
343
+ s({ type: String, attribute: "label-y" })
344
+ ], l.prototype, "labelY", 2);
345
+ i([
346
+ s({ type: Boolean, attribute: "is-ltr" })
347
+ ], l.prototype, "isLTR", 2);
348
+ i([
349
+ b(".handle")
350
+ ], l.prototype, "handle", 2);
351
+ i([
352
+ s({ type: Number })
353
+ ], l.prototype, "hue", 1);
354
+ i([
355
+ s({ type: String })
356
+ ], l.prototype, "value", 1);
357
+ i([
358
+ s({ type: String })
359
+ ], l.prototype, "color", 1);
360
+ i([
361
+ s({ attribute: !1 })
362
+ ], l.prototype, "activeAxis", 2);
363
+ i([
364
+ s({ type: Number })
365
+ ], l.prototype, "x", 1);
366
+ i([
367
+ s({ type: Number })
368
+ ], l.prototype, "y", 1);
369
+ i([
370
+ s({ type: Number })
371
+ ], l.prototype, "step", 2);
372
+ i([
373
+ b('[name="x"]')
374
+ ], l.prototype, "inputX", 2);
375
+ i([
376
+ b('[name="y"]')
377
+ ], l.prototype, "inputY", 2);
378
+ customElements.get("luzmo-color-area") || customElements.define("luzmo-color-area", l);
514
379
  export {
515
- LuzmoColorArea
380
+ l as LuzmoColorArea
516
381
  };