@luzmo/lucero 1.0.1-alpha.17 → 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 (277) 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 -221
  204. package/components/tooltip/index.js +131 -155
  205. package/components/tooltip/tooltip.d.ts +12 -1
  206. package/components/unit-input/index.cjs +8 -232
  207. package/components/unit-input/index.js +108 -201
  208. package/components/utils.cjs +1 -25
  209. package/components/utils.js +22 -22
  210. package/components/{random-id-BE6HA503.cjs → when-CDK1Tt5Y.js} +10 -7
  211. package/components/when-CDZyJPvd.cjs +22 -0
  212. package/custom-elements.json +1 -1
  213. package/package.json +1 -1
  214. package/components/action-group-DHp8RHDf.js +0 -392
  215. package/components/action-group-MPf19RPV.cjs +0 -391
  216. package/components/base-COw9n7UR.cjs +0 -119
  217. package/components/base-DmeVy0cq.js +0 -120
  218. package/components/button-base-7Ak55xFd.cjs +0 -206
  219. package/components/button-base-C3kf6BTK.js +0 -207
  220. package/components/checkbox-mixin-8cL-vfDy.js +0 -84
  221. package/components/checkbox-mixin-CE7dJj3J.cjs +0 -83
  222. package/components/clear-button-Co6oKSgl.js +0 -59
  223. package/components/clear-button-X_HDY2eH.cjs +0 -58
  224. package/components/close-button-DPBK6Kpu.cjs +0 -59
  225. package/components/close-button-Miw9ZjoJ.js +0 -60
  226. package/components/color-controller-BjDZaxhX.js +0 -491
  227. package/components/color-controller-C3c_vb2P.cjs +0 -490
  228. package/components/color-loupe-BQqNR8YD.cjs +0 -88
  229. package/components/color-loupe-B_DDFv8l.js +0 -89
  230. package/components/condition-attribute-with-id-DEc2Yjne.cjs +0 -43
  231. package/components/dependency-manger-CcIE1uvQ.cjs +0 -63
  232. package/components/divider.module-Cm5LcDRV.cjs +0 -20
  233. package/components/divider.module-DauH6k2_.js +0 -21
  234. package/components/element-resolution-DCsrhGZO.cjs +0 -112
  235. package/components/element-resolution-nMlmW4Jy.js +0 -113
  236. package/components/field-group-DNmY8W9v.cjs +0 -86
  237. package/components/field-group-DVdAWCQF.js +0 -87
  238. package/components/field-label-CKH9EXpR.cjs +0 -156
  239. package/components/field-label-Dpsecoc6.js +0 -157
  240. package/components/focus-group-BqDAk9Is.js +0 -337
  241. package/components/focus-group-DFzOlalL.cjs +0 -336
  242. package/components/focus-visible-B-B8-P9R.cjs +0 -104
  243. package/components/focus-visible-BUPRWlsh.js +0 -105
  244. package/components/focusable-BPrTcZPd.cjs +0 -262
  245. package/components/focusable-ChCLg1k4.js +0 -263
  246. package/components/language-resolution-iN9EImbb.cjs +0 -57
  247. package/components/like-anchor-D62faRNG.cjs +0 -79
  248. package/components/like-anchor-v3cJ9RWM.js +0 -80
  249. package/components/manage-help-text-BYx84zZR.cjs +0 -125
  250. package/components/manage-help-text-DOuMTGht.js +0 -126
  251. package/components/observe-slot-presence-9AwLGUQ_.cjs +0 -78
  252. package/components/observe-slot-presence-DcMdoumP.js +0 -79
  253. package/components/observe-slot-text-CSofZeeF.cjs +0 -104
  254. package/components/observe-slot-text-CjnkkBPn.js +0 -105
  255. package/components/overlay-CN8ISP1F.js +0 -2485
  256. package/components/overlay-LViy9VWM.cjs +0 -2484
  257. package/components/pending-state-e4RbXe9u.cjs +0 -75
  258. package/components/picker-DNde3awt.cjs +0 -672
  259. package/components/picker-PfUAF05y.js +0 -673
  260. package/components/platform-CxDar3Dn.cjs +0 -68
  261. package/components/platform-Cxn0WbyT.js +0 -69
  262. package/components/popover-BkbYhl3i.js +0 -74
  263. package/components/popover-BkgUf0kL.cjs +0 -74
  264. package/components/progress-circle-Hu_ivPHf.js +0 -133
  265. package/components/progress-circle-_Etqsj9f.cjs +0 -132
  266. package/components/roving-tabindex-AsmAh2In.cjs +0 -95
  267. package/components/roving-tabindex-DPF9NmrH.js +0 -96
  268. package/components/sized-mixin-DmkrNdWB.js +0 -80
  269. package/components/sized-mixin-UaTVa-AE.cjs +0 -79
  270. package/components/strategies-DlMlaSJR.cjs +0 -317
  271. package/components/strategies-DlPQoTFE.js +0 -318
  272. package/components/streaming-listener-D4sHaMub.cjs +0 -145
  273. package/components/streaming-listener-cAz5zJyk.js +0 -146
  274. package/components/text-field-11tcnftU.cjs +0 -338
  275. package/components/text-field-Chi9J2Cz.js +0 -339
  276. package/components/text-field.module-CMBS0jSL.js +0 -21
  277. package/components/text-field.module-DIJdV_sA.cjs +0 -20
@@ -15,597 +15,14 @@
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 { L as u } from "../index-D3ICqC7S.js";
19
+ const l = () => {
20
+ if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
21
+ const o = document.createElement("style");
22
+ o.setAttribute("data-luzmo-vars", ""), o.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(o);
24
23
  }
25
24
  };
26
- initializeGlobalLuzmoCSSVariables();
27
- import { TinyColor } from "@ctrl/tinycolor";
28
- import { unsafeCSS, html } from "lit";
29
- import { property, query } from "lit/decorators.js";
30
- import { ifDefined } from "lit/directives/if-defined.js";
31
- import { styleMap } from "lit/directives/style-map.js";
32
- import "../color-handle/index.js";
33
- import { F as Focusable } from "../focusable-ChCLg1k4.js";
34
- import { L as LanguageResolutionController } from "../language-resolution-BSGJAWiQ.js";
35
- import { s as streamingListener } from "../streaming-listener-cAz5zJyk.js";
36
- const extractHueAndSaturationRegExp = /^hs[v|l]a?\s?\((\d{1,3}\.?\d*?),?\s?(\d{1,3})/;
37
- const replaceHueAndSaturationRegExp = /(^hs[v|l]a?\s?\()\d{1,3}\.?\d*?(,?\s?)\d{1,3}/;
38
- const replaceHueRegExp = /(^hs[v|l]a?\()\d{1,3}/;
39
- const getHexValue = (color, isString) => isString ? color.toHexString() : color.toHex();
40
- class ColorController {
41
- constructor(host, {
42
- applyColorToState,
43
- extractColorFromState,
44
- maintains
45
- }) {
46
- this.maintains = "hue";
47
- this._hue = 0;
48
- this._opacity = 1;
49
- this.getColorProcesses = {
50
- rgb: (color, isString) => isString ? color.toRgbString() : color.toRgb(),
51
- prgb: (color, isString) => isString ? color.toPercentageRgbString() : color.toPercentageRgb(),
52
- hex8: (color, isString) => isString ? color.toHex8String() : color.toHex8(),
53
- name: (color) => color.toName() || color.toRgbString(),
54
- hsl: (color, isString) => {
55
- if (this.maintains === "hue") {
56
- if (isString) {
57
- const hslString = color.toHslString();
58
- return hslString.replace(replaceHueRegExp, `$1${this.hue}`);
59
- }
60
- const { s: s2, l: l2, a: a2 } = color.toHsl();
61
- return { h: this.hue, s: s2, l: l2, a: a2 };
62
- }
63
- if (isString) {
64
- const hslString = color.toHslString();
65
- return hslString.replace(
66
- replaceHueAndSaturationRegExp,
67
- `$1${this.hue}$2${this.saturation}`
68
- );
69
- }
70
- const { s, l, a } = color.toHsl();
71
- return { h: this.hue, s, l, a };
72
- },
73
- hsv: (color, isString) => {
74
- if (this.maintains === "hue") {
75
- if (isString) {
76
- const hsvString = color.toHsvString();
77
- return hsvString.replace(replaceHueRegExp, `$1${this.hue}`);
78
- }
79
- const { s: s2, v: v2, a: a2 } = color.toHsv();
80
- return { h: this.hue, s: s2, v: v2, a: a2 };
81
- }
82
- if (isString) {
83
- const hsvString = color.toHsvString();
84
- return hsvString.replace(
85
- replaceHueAndSaturationRegExp,
86
- `$1${this.hue}$2${this.saturation}`
87
- );
88
- }
89
- const { s, v, a } = color.toHsv();
90
- return { h: this.hue, s, v, a };
91
- },
92
- hex: getHexValue,
93
- hex3: getHexValue,
94
- hex4: getHexValue,
95
- hex6: getHexValue
96
- };
97
- this._color = new TinyColor({ h: 0, s: 1, v: 1 });
98
- this._previousColor = new TinyColor({ h: 0, s: 1, v: 1 });
99
- this._format = {
100
- format: "",
101
- isString: false
102
- };
103
- this.host = host;
104
- this.applyColorToState = applyColorToState;
105
- this.extractColorFromState = extractColorFromState;
106
- this.maintains = maintains || this.maintains;
107
- }
108
- setColorProcess(currentColor, nextColor, format, isString) {
109
- if (this.maintains === "hue") {
110
- this.setColorMaintainHue(currentColor, nextColor, format, isString);
111
- } else if (this.maintains === "saturation") {
112
- this.setColorMaintainSaturation(
113
- currentColor,
114
- nextColor,
115
- format,
116
- isString
117
- );
118
- }
119
- }
120
- setColorMaintainHue(currentColor, nextColor, format, isString) {
121
- const { h, s, v, a } = this._color.toHsv();
122
- let originalHue;
123
- if (isString && format.startsWith("hs")) {
124
- const values = extractHueAndSaturationRegExp.exec(nextColor);
125
- if (values !== null) {
126
- const [, h2] = values;
127
- originalHue = Number(h2);
128
- }
129
- } else if (!isString && format.startsWith("hs")) {
130
- const colorInput = currentColor.originalInput;
131
- const colorValues = Object.values(colorInput);
132
- originalHue = colorValues[0];
133
- }
134
- this.hue = originalHue || h;
135
- this.opacity = a ?? 1;
136
- this.applyColorToState({ h, s, v, a });
137
- }
138
- setColorMaintainSaturation(currentColor, nextColor, format, isString) {
139
- const { a } = this._color.toHsv();
140
- if (isString && format.startsWith("hs")) {
141
- const values = extractHueAndSaturationRegExp.exec(nextColor);
142
- if (values !== null) {
143
- const [, h, s] = values;
144
- this.hue = Number(h);
145
- this.saturation = Number(s);
146
- }
147
- } else if (!isString && format.startsWith("hs")) {
148
- const colorInput = currentColor.originalInput;
149
- const colorValues = Object.values(colorInput);
150
- this.hue = colorValues[0];
151
- this.saturation = colorValues[1];
152
- } else {
153
- const { h } = currentColor.toHsv();
154
- this.hue = h;
155
- }
156
- this.opacity = a ?? 1;
157
- this.applyColorToState(currentColor.toHsv());
158
- }
159
- applyColorFromState() {
160
- this._color = new TinyColor(this.extractColorFromState(this));
161
- }
162
- get hue() {
163
- return this._hue;
164
- }
165
- set hue(value) {
166
- const hue = Math.min(360, Math.max(0, value));
167
- if (hue === this.hue) {
168
- return;
169
- }
170
- const oldValue = this.hue;
171
- const { s, v, a } = this._color.toHsv();
172
- this._color = new TinyColor({ h: hue, s, v, a });
173
- this._hue = hue;
174
- this.host.requestUpdate("hue", oldValue);
175
- }
176
- get opacity() {
177
- return this._opacity;
178
- }
179
- set opacity(value) {
180
- const opacity = Math.min(1, Math.max(0, value));
181
- if (opacity === this.opacity) {
182
- return;
183
- }
184
- const oldValue = this.opacity;
185
- const { h, s, v } = this._color.toHsv();
186
- this._color = new TinyColor({ h, s, v, a: opacity });
187
- this._opacity = opacity;
188
- this.host.requestUpdate("opacity", oldValue);
189
- }
190
- /* c8 ignore next 3 */
191
- get value() {
192
- return this.color;
193
- }
194
- get color() {
195
- return this.getColorProcesses[this._format.format || "hex"](
196
- this._color,
197
- this._format.isString
198
- );
199
- }
200
- set color(color) {
201
- if (color === this.color) {
202
- return;
203
- }
204
- const oldValue = this._color;
205
- this._color = new TinyColor(color);
206
- const format = this._color.format;
207
- let isString = typeof color === "string" || color instanceof String;
208
- if (format.startsWith("hex")) {
209
- isString = color.startsWith("#");
210
- }
211
- this._format = {
212
- format,
213
- isString
214
- };
215
- this.setColorProcess(this._color, color, format, isString);
216
- this.host.requestUpdate("color", oldValue);
217
- }
218
- getColor(format) {
219
- const formatOptions = {
220
- hsl: "toHsl"
221
- };
222
- return this._color[formatOptions[format]]();
223
- }
224
- setColor(color) {
225
- this._color = color;
226
- const isString = typeof this._color.originalInput === "string" || this._color.originalInput instanceof String;
227
- this.setColorProcess(this._color, color, this._color.format, isString);
228
- }
229
- getHslString() {
230
- return this._color.toHslString();
231
- }
232
- savePreviousColor() {
233
- this._previousColor = this._color.clone();
234
- }
235
- restorePreviousColor() {
236
- this.setColor(this._previousColor);
237
- }
238
- }
239
- const styles = '.opacity-checkerboard{position:absolute;block-size:100%;inline-size:100%;background:repeating-conic-gradient(var(--luzmo-color-loupe-checkerboard-light, rgb(255, 255, 255)) 0 25%,var(--luzmo-color-loupe-checkerboard-dark, rgb(230, 230, 230)) 0 50%) var(--luzmo-color-loupe-checkerboard-position, left top)/calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2) calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2)}:host{--luzmo-color-slider-gradient-fallback: rgb(255 0 0) 0%, rgb(255 255 0) 17%, rgb(0 255 0) 33%, rgb(0 255 255) 50%, rgb(0 0 255) 67%, rgb(255 0 255) 83%, rgb(255 0 0) 100%;touch-action:none}:host([vertical]) .handle{inset-block-start:unset;inset-block-end:0}:host([vertical]) .slider{-webkit-appearance:slider-vertical;-moz-appearance:slider-vertical;appearance:slider-vertical}:host(:focus){outline:none}.gradient{overflow:hidden}::slotted(*){width:100%;height:100%}@media (forced-colors: active){:host{--highcontrast-color-slider-border-color: CanvasText;--highcontrast-color-slider-border-color-disabled: GrayText;--highcontrast-color-slider-background-color-disabled: Canvas;forced-color-adjust:none}}:host{--luzmo-color-handle-hitarea-border-radius: var( --luzmo-color-slider-handle-hitarea-border-radius, 0px );min-inline-size:var(--luzmo-color-slider-minimum-length, 80px);inline-size:var(--luzmo-color-slider-length, 192px);block-size:var(--luzmo-color-slider-control-track-width, 24px);-webkit-user-select:none;user-select:none;cursor:default;display:block;position:relative}:host([focused]){z-index:2}:host([disabled]){pointer-events:none}:host([disabled]) .gradient{display:none}:host([vertical]){min-block-size:var(--luzmo-color-slider-vertical-minimum-height, var(--luzmo-color-slider-minimum-length, 80px));block-size:var(--luzmo-color-slider-vertical-height, var(--luzmo-color-slider-length, 192px));min-inline-size:0;inline-size:var(--luzmo-color-slider-vertical-control-track-width, var(--luzmo-color-slider-control-track-height, 24px));display:inline-block}:host([vertical]) .handle{inset-inline-start:50%}.handle{inset-block-start:50%;inset-inline-start:0}.checkerboard{--luzmo-color-slider-border-color-local: var( --highcontrast-color-slider-border-color, var(--luzmo-color-slider-border-color, var(--luzmo-border-color)) )}.checkerboard:before{content:"";z-index:1;box-shadow:inset 0 0 0 var(--luzmo-color-slider-border-width, var(--luzmo-border-width)) var(--luzmo-color-slider-border-color-local);border-radius:var(--luzmo-color-slider-border-rounding, var(--luzmo-border-radius-s));position:absolute;top:0;right:0;bottom:0;left:0}:host([disabled]) .checkerboard{--luzmo-color-slider-border-color-local: var( --highcontrast-color-slider-border-color-disabled, var(--luzmo-color-slider-border-color-disabled, var(--luzmo-dimmed-color)) );background:var(--highcontrast-color-slider-background-color-disabled, var(--luzmo-color-slider-background-color-disabled, var(--luzmo-dimmed-color)))}.checkerboard,.gradient{inline-size:100%;block-size:100%;border-radius:var(--luzmo-color-slider-border-rounding, var(--luzmo-border-radius-s))}.gradient:dir(rtl),:host([dir=rtl]) .gradient{transform:scaleX(-1)}.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}';
240
- var __defProp = Object.defineProperty;
241
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
242
- var __decorateClass = (decorators, target, key, kind) => {
243
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
244
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
245
- if (decorator = decorators[i])
246
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
247
- if (kind && result) __defProp(target, key, result);
248
- return result;
249
- };
250
- class LuzmoColorSlider extends Focusable {
251
- constructor() {
252
- super(...arguments);
253
- this.disabled = false;
254
- this.focused = false;
255
- this.label = "hue";
256
- this.vertical = false;
257
- this.languageResolver = new LanguageResolutionController(this);
258
- this.colorController = new ColorController(this, {
259
- /* c8 ignore next 3 */
260
- applyColorToState: () => {
261
- if (this.mode === "opacity") {
262
- const color = new TinyColor(this.colorController.color);
263
- this.sliderHandlePosition = 100 * color.getAlpha();
264
- } else {
265
- this.sliderHandlePosition = 100 * (this.colorController.hue / 360);
266
- }
267
- },
268
- extractColorFromState: (controller) => {
269
- if (this.mode === "opacity") {
270
- return {
271
- ...controller.getColor("hsl"),
272
- a: this.value
273
- };
274
- }
275
- return {
276
- ...controller.getColor("hsl"),
277
- h: this.value
278
- };
279
- },
280
- maintains: "saturation"
281
- });
282
- this.sliderHandlePosition = 0;
283
- this.step = 1;
284
- this.isLTR = true;
285
- this._altered = 0;
286
- this._pointerDown = false;
287
- }
288
- static get styles() {
289
- return [unsafeCSS(styles)];
290
- }
291
- get value() {
292
- if (this.mode === "opacity") {
293
- return this.colorController.opacity;
294
- }
295
- return this.colorController.hue;
296
- }
297
- set value(value) {
298
- if (this.mode === "opacity") {
299
- this.colorController.opacity = value;
300
- } else {
301
- this.colorController.hue = value;
302
- }
303
- }
304
- get color() {
305
- return this.colorController.color;
306
- }
307
- set color(color) {
308
- this.colorController.color = color;
309
- }
310
- get altered() {
311
- return this._altered;
312
- }
313
- set altered(altered) {
314
- this._altered = altered;
315
- this.step = Math.max(1, this.altered * 10);
316
- }
317
- get focusElement() {
318
- return this.input;
319
- }
320
- handleKeydown(event) {
321
- const { key } = event;
322
- this.focused = true;
323
- this.altered = [event.shiftKey, event.ctrlKey, event.altKey].filter(
324
- (_key) => !!_key
325
- ).length;
326
- let delta = 0;
327
- switch (key) {
328
- case "ArrowUp": {
329
- delta = this.step;
330
- break;
331
- }
332
- case "ArrowDown": {
333
- delta = -this.step;
334
- break;
335
- }
336
- case "ArrowLeft": {
337
- delta = this.step * (this.isLTR ? -1 : 1);
338
- break;
339
- }
340
- case "ArrowRight": {
341
- delta = this.step * (this.isLTR ? 1 : -1);
342
- break;
343
- }
344
- default: {
345
- return;
346
- }
347
- }
348
- event.preventDefault();
349
- const range = this.mode === "opacity" ? 100 : 360;
350
- const mult = 100 / range;
351
- this.sliderHandlePosition = Math.min(
352
- 100,
353
- Math.max(0, this.sliderHandlePosition + delta * mult)
354
- );
355
- this.value = this.mode === "opacity" ? Math.min(1, Math.max(0, this.value + delta / 100)) : Math.min(360, Math.max(0, this.value + delta));
356
- this.colorController.applyColorFromState();
357
- if (delta !== 0) {
358
- this.dispatchEvent(
359
- new Event("input", {
360
- bubbles: true,
361
- composed: true
362
- })
363
- );
364
- this.dispatchEvent(
365
- new Event("change", {
366
- bubbles: true,
367
- composed: true
368
- })
369
- );
370
- }
371
- }
372
- handleInput(event) {
373
- const { valueAsNumber } = event.target;
374
- this.value = valueAsNumber;
375
- this.sliderHandlePosition = 100 * (this.mode === "opacity" ? this.value : this.value / 360);
376
- this.colorController.applyColorFromState();
377
- }
378
- handleChange(event) {
379
- this.handleInput(event);
380
- this.dispatchEvent(
381
- new Event("change", {
382
- bubbles: true,
383
- composed: true
384
- })
385
- );
386
- }
387
- focus(focusOptions = {}) {
388
- super.focus(focusOptions);
389
- this.forwardFocus();
390
- }
391
- forwardFocus() {
392
- this.input.focus();
393
- }
394
- handleFocus() {
395
- this.focused = true;
396
- }
397
- handleBlur() {
398
- if (this._pointerDown) {
399
- return;
400
- }
401
- this.altered = 0;
402
- this.focused = false;
403
- }
404
- handlePointerdown(event) {
405
- if (event.button !== 0) {
406
- event.preventDefault();
407
- return;
408
- }
409
- this._pointerDown = true;
410
- this.colorController.savePreviousColor();
411
- this.boundingClientRect = this.getBoundingClientRect();
412
- event.target.setPointerCapture(event.pointerId);
413
- if (event.pointerType === "mouse") {
414
- this.focused = true;
415
- }
416
- }
417
- handlePointermove(event) {
418
- this.sliderHandlePosition = this.calculateHandlePosition(event);
419
- this.value = (this.mode === "opacity" ? 1 : 360) * (this.sliderHandlePosition / 100);
420
- this.colorController.applyColorFromState();
421
- this.dispatchEvent(
422
- new Event("input", {
423
- bubbles: true,
424
- composed: true,
425
- cancelable: true
426
- })
427
- );
428
- }
429
- handlePointerup(event) {
430
- this._pointerDown = false;
431
- event.target.releasePointerCapture(event.pointerId);
432
- const applyDefault = this.dispatchEvent(
433
- new Event("change", {
434
- bubbles: true,
435
- composed: true,
436
- cancelable: true
437
- })
438
- );
439
- if (!applyDefault) {
440
- this.colorController.restorePreviousColor();
441
- }
442
- this.focus();
443
- if (event.pointerType === "mouse") {
444
- this.focused = false;
445
- }
446
- }
447
- /**
448
- * Returns the value under the cursor
449
- * @param: PointerEvent on slider
450
- * @return: Slider value that correlates to the position under the pointer
451
- */
452
- calculateHandlePosition(event) {
453
- if (!this.boundingClientRect) {
454
- return this.sliderHandlePosition;
455
- }
456
- const rect = this.boundingClientRect;
457
- const minOffset = this.vertical ? rect.top : rect.left;
458
- const offset = this.vertical ? event.clientY : event.clientX;
459
- const size = this.vertical ? rect.height : rect.width;
460
- const percent = Math.max(0, Math.min(1, (offset - minOffset) / size));
461
- const sliderHandlePosition = this.vertical || !this.isLTR ? 100 - 100 * percent : 100 * percent;
462
- return sliderHandlePosition;
463
- }
464
- handleGradientPointerdown(event) {
465
- if (event.button !== 0) {
466
- return;
467
- }
468
- event.stopPropagation();
469
- event.preventDefault();
470
- this.handle.dispatchEvent(new PointerEvent("pointerdown", event));
471
- this.handlePointermove(event);
472
- }
473
- get handlePositionStyles() {
474
- return `${this.vertical ? "inset-block-end" : "inset-inline-start"}: ${this.sliderHandlePosition}%`;
475
- }
476
- get getColorSliderStyle() {
477
- const orientation = this.vertical ? "top" : "right";
478
- if (this.mode === "opacity") {
479
- const color = new TinyColor(this.colorController.color).setAlpha(1).toRgbString();
480
- return {
481
- background: `linear-gradient(to ${orientation}, transparent, ${color})`
482
- };
483
- }
484
- return {
485
- background: `linear-gradient(to ${orientation}, var(--luzmo-color-slider-gradient, var(--luzmo-color-slider-gradient-fallback)))`
486
- };
487
- }
488
- render() {
489
- return html`
490
- <div
491
- class="opacity-checkerboard checkerboard"
492
- role="presentation"
493
- @pointerdown=${this.handleGradientPointerdown}
494
- >
495
- <div
496
- class="gradient"
497
- role="presentation"
498
- style=${styleMap(this.getColorSliderStyle)}
499
- >
500
- <slot name="gradient"></slot>
501
- </div>
502
- </div>
503
- <luzmo-color-handle
504
- tabindex=${ifDefined(this.focused ? void 0 : "0")}
505
- @focus=${this.forwardFocus}
506
- ?focused=${this.focused}
507
- class="handle"
508
- color=${this.mode === "opacity" ? this.color : "hsl(" + this.value + ", 100%, 50%)"}
509
- ?disabled=${this.disabled}
510
- style=${this.handlePositionStyles}
511
- ${streamingListener({
512
- start: ["pointerdown", this.handlePointerdown],
513
- streamInside: ["pointermove", this.handlePointermove],
514
- end: [
515
- ["pointerup", "pointercancel", "pointerleave"],
516
- this.handlePointerup
517
- ]
518
- })}
519
- ></luzmo-color-handle>
520
- <input
521
- type="range"
522
- class="slider"
523
- min="0"
524
- max=${this.mode === "opacity" ? "100" : "360"}
525
- aria-orientation=${ifDefined(this.vertical ? "vertical" : void 0)}
526
- orient=${ifDefined(this.vertical ? "vertical" : void 0)}
527
- step=${this.step}
528
- aria-label=${this.label}
529
- .value=${String(
530
- this.mode === "opacity" ? this.value * 100 : this.value
531
- )}
532
- aria-valuetext=${`${new Intl.NumberFormat(
533
- this.languageResolver.language,
534
- {
535
- maximumFractionDigits: 0,
536
- minimumIntegerDigits: 1,
537
- style: "unit",
538
- unit: this.mode === "opacity" ? "percent" : "degree",
539
- unitDisplay: "narrow"
540
- }
541
- ).format(this.mode === "opacity" ? this.value * 100 : this.value)}`}
542
- @input=${this.handleInput}
543
- @change=${this.handleChange}
544
- @keydown=${this.handleKeydown}
545
- />
546
- `;
547
- }
548
- firstUpdated(changed) {
549
- super.firstUpdated(changed);
550
- this.boundingClientRect = this.getBoundingClientRect();
551
- this.addEventListener("focus", this.handleFocus);
552
- this.addEventListener("blur", this.handleBlur);
553
- }
554
- updated(changedProperties) {
555
- if (changedProperties.has("mode")) {
556
- this.handle.style.insetInlineStart = "";
557
- this.handle.style.insetBlockEnd = "";
558
- if (this.mode === "opacity") {
559
- this.colorController.color = new TinyColor(
560
- this.colorController.color
561
- ).toRgbString();
562
- this.handle.style.insetInlineStart = 100 * this.colorController.opacity + "%";
563
- }
564
- }
565
- }
566
- }
567
- __decorateClass([
568
- property({ type: String, reflect: true })
569
- ], LuzmoColorSlider.prototype, "dir", 2);
570
- __decorateClass([
571
- property({ type: String, reflect: true })
572
- ], LuzmoColorSlider.prototype, "mode", 2);
573
- __decorateClass([
574
- property({ type: Boolean, reflect: true })
575
- ], LuzmoColorSlider.prototype, "disabled", 2);
576
- __decorateClass([
577
- property({ type: Boolean, reflect: true })
578
- ], LuzmoColorSlider.prototype, "focused", 2);
579
- __decorateClass([
580
- query(".handle")
581
- ], LuzmoColorSlider.prototype, "handle", 2);
582
- __decorateClass([
583
- property({ type: String })
584
- ], LuzmoColorSlider.prototype, "label", 2);
585
- __decorateClass([
586
- property({ type: Boolean, reflect: true })
587
- ], LuzmoColorSlider.prototype, "vertical", 2);
588
- __decorateClass([
589
- property({ type: Number })
590
- ], LuzmoColorSlider.prototype, "value", 1);
591
- __decorateClass([
592
- property({ type: Number, reflect: true })
593
- ], LuzmoColorSlider.prototype, "sliderHandlePosition", 2);
594
- __decorateClass([
595
- property({ type: String })
596
- ], LuzmoColorSlider.prototype, "color", 1);
597
- __decorateClass([
598
- property({ type: Number })
599
- ], LuzmoColorSlider.prototype, "step", 2);
600
- __decorateClass([
601
- property({ type: Boolean, attribute: "is-ltr" })
602
- ], LuzmoColorSlider.prototype, "isLTR", 2);
603
- __decorateClass([
604
- query("input")
605
- ], LuzmoColorSlider.prototype, "input", 2);
606
- if (!customElements.get("luzmo-color-slider")) {
607
- customElements.define("luzmo-color-slider", LuzmoColorSlider);
608
- }
25
+ l();
609
26
  export {
610
- LuzmoColorSlider
27
+ u as LuzmoColorSlider
611
28
  };
@@ -0,0 +1,18 @@
1
+ /*! * Lucero - The design system for Luzmo.
2
+ *
3
+ * Copyright © 2025 Luzmo
4
+ * All rights reserved.
5
+ * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
+ * This license allows users with a current active Luzmo account to use Lucero.
7
+ * This license terminates automatically if a user no longer has an active Luzmo account.
8
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
+ * SOFTWARE.
17
+ * */
18
+ "use strict";function o(t,i,r){const e=t.getAttribute(i);let s=e?e.split(/\s+/):[];s=s.filter(n=>!r.includes(n)),s.length>0?t.setAttribute(i,s.join(" ")):t.removeAttribute(i)}function d(t,i,r){const e=Array.isArray(r)?r:[r],s=t.getAttribute(i),n=s?s.split(/\s+/):[];return e.every(c=>n.includes(c))?()=>{}:(n.push(...e),t.setAttribute(i,n.join(" ")),()=>o(t,i,e))}exports.conditionAttributeWithId=d;exports.conditionAttributeWithoutId=o;
@@ -0,0 +1,31 @@
1
+ /*! * Lucero - The design system for Luzmo.
2
+ *
3
+ * Copyright © 2025 Luzmo
4
+ * All rights reserved.
5
+ * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
+ * This license allows users with a current active Luzmo account to use Lucero.
7
+ * This license terminates automatically if a user no longer has an active Luzmo account.
8
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
+ * SOFTWARE.
17
+ * */
18
+ function c(t, s, r) {
19
+ const e = t.getAttribute(s);
20
+ let i = e ? e.split(/\s+/) : [];
21
+ i = i.filter((n) => !r.includes(n)), i.length > 0 ? t.setAttribute(s, i.join(" ")) : t.removeAttribute(s);
22
+ }
23
+ function u(t, s, r) {
24
+ const e = Array.isArray(r) ? r : [r], i = t.getAttribute(s), n = i ? i.split(/\s+/) : [];
25
+ return e.every((o) => n.includes(o)) ? () => {
26
+ } : (n.push(...e), t.setAttribute(s, n.join(" ")), () => c(t, s, e));
27
+ }
28
+ export {
29
+ c as a,
30
+ u as c
31
+ };