@luzmo/lucero 1.0.1-alpha.4 → 1.0.1-alpha.42

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 (253) hide show
  1. package/components/accordion/index.cjs +6 -6
  2. package/components/accordion/index.js +14 -13
  3. package/components/action-bar/index.cjs +4 -4
  4. package/components/action-bar/index.js +20 -18
  5. package/components/action-button/index.cjs +3 -3
  6. package/components/action-button/index.js +7 -6
  7. package/components/action-group/index.cjs +1 -1
  8. package/components/action-group/index.js +2 -2
  9. package/components/{action-group-DBImibFn.js → action-group-Bwt9w8Vh.js} +10 -9
  10. package/components/action-group-D917z7XF.cjs +20 -0
  11. package/components/action-menu/index.cjs +9 -9
  12. package/components/action-menu/index.js +10 -10
  13. package/components/avatar/index.cjs +3 -3
  14. package/components/avatar/index.js +7 -7
  15. package/components/base-5nDSSNeT.cjs +18 -0
  16. package/components/base-CdYjmV_8.js +96 -0
  17. package/components/button/button-base.d.ts +16 -0
  18. package/components/button/button.d.ts +38 -2
  19. package/components/button/index.cjs +2 -2
  20. package/components/button/index.js +84 -50
  21. package/components/{button-base-DbkDzb71.js → button-base-B_SkfcFn.js} +54 -39
  22. package/components/button-base-BdzHcHRs.cjs +25 -0
  23. package/components/button-group/index.cjs +1 -1
  24. package/components/button-group/index.js +11 -9
  25. package/components/calendar/index.cjs +96 -1
  26. package/components/calendar/index.js +538 -6
  27. package/components/chat-message/chat-message.d.ts +127 -0
  28. package/components/chat-message/index.cjs +80 -0
  29. package/components/chat-message/index.d.ts +8 -0
  30. package/components/chat-message/index.js +254 -0
  31. package/components/chat-message-group/chat-message-group.d.ts +50 -0
  32. package/components/chat-message-group/index.cjs +24 -0
  33. package/components/chat-message-group/index.d.ts +7 -0
  34. package/components/chat-message-group/index.js +144 -0
  35. package/components/checkbox/index.cjs +4 -4
  36. package/components/checkbox/index.js +12 -10
  37. package/components/{checkbox-mixin-Do7EgtpQ.js → checkbox-mixin-DUbGDm7f.js} +9 -9
  38. package/components/{checkbox-mixin-BDN0dBtS.cjs → checkbox-mixin-DhN8CIXY.cjs} +3 -3
  39. package/components/close-button-CGZxCNlI.js +52 -0
  40. package/components/close-button-Decm0Qbb.cjs +18 -0
  41. package/components/color-area/index.cjs +5 -5
  42. package/components/color-area/index.js +12 -11
  43. package/components/color-controller-7sNUf7SP.js +386 -0
  44. package/components/color-controller-ChN-A9Ft.cjs +18 -0
  45. package/components/color-field/color-field.d.ts +8 -0
  46. package/components/color-field/index.cjs +4 -4
  47. package/components/color-field/index.js +38 -25
  48. package/components/color-handle/index.cjs +2 -2
  49. package/components/color-handle/index.js +8 -6
  50. package/components/color-loupe/index.cjs +1 -1
  51. package/components/color-loupe/index.js +2 -2
  52. package/components/color-loupe-CIEFp7ln.cjs +56 -0
  53. package/components/{color-loupe-CmMsXbjT.js → color-loupe-CLPX6xVb.js} +6 -4
  54. package/components/color-menu/index.cjs +8 -8
  55. package/components/color-menu/index.js +46 -46
  56. package/components/color-palette/color-palette.d.ts +6 -2
  57. package/components/color-palette/index.cjs +1 -1
  58. package/components/color-palette/index.js +35 -34
  59. package/components/color-palette-group/color-palette-group.d.ts +79 -0
  60. package/components/color-palette-group/index.cjs +28 -0
  61. package/components/color-palette-group/index.d.ts +7 -0
  62. package/components/color-palette-group/index.js +206 -0
  63. package/components/color-picker/color-picker.d.ts +31 -2
  64. package/components/color-picker/index.cjs +6 -5
  65. package/components/color-picker/index.js +16 -12
  66. package/components/color-slider/index.cjs +40 -1
  67. package/components/color-slider/index.js +452 -6
  68. package/components/date-time-picker/index.cjs +16 -16
  69. package/components/date-time-picker/index.js +105 -106
  70. package/components/{dependency-manger-CEXvGQUV.js → dependency-manger-CO-VPlqq.js} +4 -4
  71. package/components/{dependency-manger-C5HCkMMB.cjs → dependency-manger-uthev62E.cjs} +1 -1
  72. package/components/divider/index.cjs +1 -1
  73. package/components/divider/index.js +11 -9
  74. package/components/field-group/index.cjs +1 -1
  75. package/components/field-group/index.js +2 -2
  76. package/components/field-group-BYHNJmv0.cjs +23 -0
  77. package/components/{field-group-DXfBWrkO.js → field-group-CHmw159R.js} +7 -5
  78. package/components/field-label/index.cjs +1 -1
  79. package/components/field-label/index.js +2 -2
  80. package/components/{field-label-CZ2zzChK.js → field-label-Cy3xMWZ-.js} +9 -8
  81. package/components/field-label-DZoeqJJX.cjs +25 -0
  82. package/components/{focus-visible-DBlJGoEW.js → focus-visible-BvScGDCE.js} +20 -20
  83. package/components/focus-visible-D4BXb5RB.cjs +18 -0
  84. package/components/{focusable-BxtpnzWp.js → focusable-BjvsvVam.js} +3 -2
  85. package/components/focusable-CbVKgGfS.cjs +18 -0
  86. package/components/icon/index.cjs +1 -1
  87. package/components/icon/index.js +22 -20
  88. package/components/index.cjs +205 -1
  89. package/components/index.js +972 -167
  90. package/components/infield-button/index.cjs +2 -2
  91. package/components/infield-button/index.js +6 -5
  92. package/components/label/index.cjs +1 -1
  93. package/components/label/index.js +7 -5
  94. package/components/{language-resolution-8yZa5r_P.js → language-resolution-B-wjV5bb.js} +9 -8
  95. package/components/{directive-C7oCP5Bh.cjs → language-resolution-EUER43cg.cjs} +1 -5
  96. package/components/like-anchor-B2EqJPdw.cjs +32 -0
  97. package/components/{like-anchor-Bvn_vLQ8.js → like-anchor-CgqCU210.js} +23 -22
  98. package/components/{manage-help-text-DhgARkZX.cjs → manage-help-text-Bat9yGvF.cjs} +3 -3
  99. package/components/{manage-help-text-syYnjKGL.js → manage-help-text-C9sCHK3R.js} +8 -8
  100. package/components/menu/index.cjs +38 -13
  101. package/components/menu/index.js +138 -105
  102. package/components/menu/menu-item.d.ts +8 -1
  103. package/components/multi-language-field/index.cjs +2 -2
  104. package/components/multi-language-field/index.js +9 -7
  105. package/components/number-field/index.cjs +5 -5
  106. package/components/number-field/index.js +122 -85
  107. package/components/number-field/number-field.d.ts +145 -0
  108. package/components/observe-slot-presence-CNltc0C0.cjs +18 -0
  109. package/components/{observe-slot-presence-CmVi0zTc.js → observe-slot-presence-DFi6GE3H.js} +1 -1
  110. package/components/observe-slot-text-CBMHpuIK.cjs +18 -0
  111. package/components/{observe-slot-text-BPfIQQtz.js → observe-slot-text-DorVpCL4.js} +14 -15
  112. package/components/options/index.cjs +26 -58
  113. package/components/options/index.js +205 -849
  114. package/components/overlay/index.cjs +6 -6
  115. package/components/overlay/index.js +31 -32
  116. package/components/overlay-BhrVS5h7.cjs +47 -0
  117. package/components/overlay-C-No3oJQ.js +1736 -0
  118. package/components/{pending-state-CaH1si5b.cjs → pending-state-DQctFHI8.cjs} +2 -2
  119. package/components/{pending-state-DTX7ggyF.js → pending-state-Dx1u3EXA.js} +2 -2
  120. package/components/picker/index.cjs +1 -1
  121. package/components/picker/index.js +3 -3
  122. package/components/picker-DxYgh4LR.cjs +123 -0
  123. package/components/{picker-BmoXv1jt.js → picker-GyeSAxxY.js} +45 -45
  124. package/components/picker-button/index.cjs +4 -4
  125. package/components/picker-button/index.js +9 -8
  126. package/components/{platform-BiXhwqk3.cjs → platform-BJnOJJag.cjs} +1 -1
  127. package/components/{platform-BM-uMWpX.js → platform-CqwNrovd.js} +12 -12
  128. package/components/popover/index.cjs +1 -1
  129. package/components/popover/index.js +2 -2
  130. package/components/popover-lcZnODPK.cjs +30 -0
  131. package/components/{popover-DjX0aAnY.js → popover-ucIgjbQs.js} +8 -7
  132. package/components/progress-circle/index.cjs +1 -1
  133. package/components/progress-circle/index.js +2 -2
  134. package/components/{progress-circle-DXH9z8-6.js → progress-circle-D5J0ZwY0.js} +8 -7
  135. package/components/progress-circle-DgMbqrzG.cjs +33 -0
  136. package/components/prompt-box/index.d.ts +8 -0
  137. package/components/prompt-box/prompt-box.d.ts +326 -0
  138. package/components/radio/index.cjs +2 -2
  139. package/components/radio/index.js +12 -11
  140. package/components/search/index.cjs +6 -6
  141. package/components/search/index.js +6 -6
  142. package/components/select/index.cjs +43 -42
  143. package/components/select/index.js +142 -126
  144. package/components/select/select.d.ts +1 -1
  145. package/components/{base-BjTwmyRF.cjs → sized-mixin-DcvJLFeo.cjs} +1 -5
  146. package/components/{sized-mixin-D4ACoVUr.js → sized-mixin-cJbo3PKR.js} +5 -5
  147. package/components/slider/index.cjs +1 -1
  148. package/components/slider/index.js +48 -1101
  149. package/components/{strategies-9indNIEb.js → strategies-Bk97oVn1.js} +15 -50
  150. package/components/strategies-CNgBb6dM.cjs +18 -0
  151. package/components/{streaming-listener-CP-JE6Fa.js → streaming-listener-BlWm-XZU.js} +5 -6
  152. package/components/streaming-listener-D9Wc7skA.cjs +18 -0
  153. package/components/swatch/index.cjs +7 -7
  154. package/components/swatch/index.js +18 -17
  155. package/components/switch/index.cjs +2 -2
  156. package/components/switch/index.js +6 -5
  157. package/components/tabs/index.cjs +16 -24
  158. package/components/tabs/index.js +94 -162
  159. package/components/tags/index.cjs +5 -5
  160. package/components/tags/index.js +39 -25
  161. package/components/tags/tag.d.ts +2 -0
  162. package/components/tags/tags.d.ts +3 -1
  163. package/components/text-field/index.cjs +3 -3
  164. package/components/text-field/index.js +13 -11
  165. package/components/text-field/text-field.d.ts +1 -0
  166. package/components/{text-field-BIADXoLC.js → text-field-BHaLKkf1.js} +73 -99
  167. package/components/text-field-DFP7p8Rv.cjs +81 -0
  168. package/components/text-field.module-Bp4Mwuvj.js +21 -0
  169. package/components/text-field.module-eAEqjvZu.cjs +18 -0
  170. package/components/toast/index.cjs +11 -11
  171. package/components/toast/index.js +12 -10
  172. package/components/tooltip/index.cjs +4 -4
  173. package/components/tooltip/index.js +60 -36
  174. package/components/tooltip/tooltip.d.ts +12 -1
  175. package/components/utils.cjs +1 -1
  176. package/components/utils.js +14 -12
  177. package/components/voice-recorder-BRq_gEkz.js +210 -0
  178. package/components/voice-recorder-CAm5iDre.cjs +18 -0
  179. package/custom-elements.json +1 -1
  180. package/index.d.ts +4 -1
  181. package/package.json +84 -6
  182. package/utils/index.d.ts +1 -0
  183. package/utils/voice-recorder.d.ts +121 -0
  184. package/components/NumberFormatter-DewVDY5w.cjs +0 -18
  185. package/components/NumberFormatter-DgOUVrge.js +0 -136
  186. package/components/NumberParser-Dik4a0h-.cjs +0 -18
  187. package/components/NumberParser-ci9J5EKv.js +0 -173
  188. package/components/action-group-DJGMcRHb.cjs +0 -20
  189. package/components/async-directive-BX1T1e1_.cjs +0 -22
  190. package/components/async-directive-BfcqVjDp.js +0 -82
  191. package/components/base-CBCg3yyw.cjs +0 -40
  192. package/components/base-D76d76ww.js +0 -26
  193. package/components/base-WsynuqaS.js +0 -677
  194. package/components/button-base-XgPLmwP-.cjs +0 -25
  195. package/components/class-map-Di1D_rCm.cjs +0 -22
  196. package/components/class-map-NbVXqBU0.js +0 -51
  197. package/components/clear-button-DoeRUWQ3.js +0 -53
  198. package/components/clear-button-Qi1pMA5S.cjs +0 -18
  199. package/components/close-button-BFMBEw3q.cjs +0 -18
  200. package/components/close-button-BWXdHSx3.js +0 -51
  201. package/components/color-controller-DTp1juRz.js +0 -3198
  202. package/components/color-controller-_ZwyhvaU.cjs +0 -18
  203. package/components/color-loupe-CaA_Lfkk.cjs +0 -56
  204. package/components/directive-helpers-Cm6gitnu.js +0 -62
  205. package/components/directive-helpers-DyIRTWwA.cjs +0 -22
  206. package/components/directive-oAbCiebi.js +0 -44
  207. package/components/field-group-DkGst3r5.cjs +0 -23
  208. package/components/field-label-mO1AkUgR.cjs +0 -25
  209. package/components/flow-D-0MTYCm.js +0 -527
  210. package/components/flow-DM3dNAKs.cjs +0 -30
  211. package/components/focus-visible-B0P9aY_G.cjs +0 -18
  212. package/components/focusable-EbipgXRh.cjs +0 -18
  213. package/components/if-defined-C9YGdo33.cjs +0 -22
  214. package/components/if-defined-DOaE2coe.js +0 -27
  215. package/components/index-A-yOTB_d.js +0 -1490
  216. package/components/index-BLWuwZXx.cjs +0 -113
  217. package/components/index-BwxgAdzi.cjs +0 -57
  218. package/components/index-HjQa8tew.js +0 -1174
  219. package/components/language-resolution-DJzmyzZq.cjs +0 -18
  220. package/components/like-anchor-sod1C1fR.cjs +0 -32
  221. package/components/luzmo-icons-DbwDQtuO.js +0 -229
  222. package/components/luzmo-icons-DletXGWU.cjs +0 -29
  223. package/components/mutation-controller-DH7YOCyj.js +0 -52
  224. package/components/mutation-controller-DkOMCW-c.cjs +0 -22
  225. package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
  226. package/components/observe-slot-text-Ceb7SvYT.cjs +0 -18
  227. package/components/overlay-Cig9r6uU.js +0 -2747
  228. package/components/overlay-KSKMzzkh.cjs +0 -47
  229. package/components/picker-DWsBWdPN.cjs +0 -123
  230. package/components/popover-KFfO0IYL.cjs +0 -30
  231. package/components/progress-circle-BvRJNuNo.cjs +0 -33
  232. package/components/query-BL-TJj7K.cjs +0 -22
  233. package/components/query-D_KR_GUc.js +0 -51
  234. package/components/query-assigned-elements-DjfhL1cl.js +0 -36
  235. package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
  236. package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
  237. package/components/query-assigned-nodes-C76XVPWY.js +0 -36
  238. package/components/sized-mixin-CPxE5C96.cjs +0 -18
  239. package/components/state-D8JEtYqe.cjs +0 -22
  240. package/components/state-Deh-vKYE.js +0 -29
  241. package/components/strategies-BACP6MhR.cjs +0 -18
  242. package/components/streaming-listener-B00MvALi.cjs +0 -18
  243. package/components/style-map-CeilmSgs.cjs +0 -22
  244. package/components/style-map-IgqIKvlE.js +0 -53
  245. package/components/text-field-D5d_Gt0t.cjs +0 -85
  246. package/components/text-field.module-ColtFhf_.js +0 -21
  247. package/components/text-field.module-p_VF2tC_.cjs +0 -18
  248. package/components/unit-input/index.cjs +0 -43
  249. package/components/unit-input/index.d.ts +0 -7
  250. package/components/unit-input/index.js +0 -183
  251. package/components/unit-input/unit-input.d.ts +0 -33
  252. package/components/when-CDK1Tt5Y.js +0 -28
  253. package/components/when-CDZyJPvd.cjs +0 -22
@@ -0,0 +1,206 @@
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
+ import { unsafeCSS as d, html as m } from "lit";
19
+ import { MutationController as p } from "@lit-labs/observers/mutation-controller.js";
20
+ import { property as u, query as h } from "lit/decorators.js";
21
+ import { ifDefined as z } from "lit/directives/if-defined.js";
22
+ import { a as f } from "../base-CdYjmV_8.js";
23
+ import { R as g } from "../roving-tabindex-DOg4z6ZU.js";
24
+ import { S as b } from "../sized-mixin-cJbo3PKR.js";
25
+ const n = () => {
26
+ if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
27
+ const s = document.createElement("style");
28
+ s.setAttribute("data-luzmo-vars", ""), s.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-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: 10px;--luzmo-icon-size-xs: 12px;--luzmo-icon-size-s: 14px;--luzmo-icon-size-m: 16px;--luzmo-icon-size-l: 18px;--luzmo-icon-size-xl: 20px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(s);
29
+ }
30
+ };
31
+ n();
32
+ const v = ".color-palette-group{column-gap:var(--luzmo-color-palette-group-column-gap, var(--color-palette-group-column-gap));row-gap:var(--luzmo-color-palette-group-row-gap, var(--color-palette-group-row-gap));flex-wrap:wrap;display:flex}::slotted(*){flex-shrink:0}::slotted(:focus-visible){z-index:1}:host{--color-palette-group-column-gap: var(--luzmo-spacing-3);--color-palette-group-row-gap: var(--luzmo-spacing-3)}:host([size=s]){--color-palette-group-column-gap: var(--luzmo-spacing-2);--color-palette-group-row-gap: var(--luzmo-spacing-2)}:host,:host([size=l]),:host([size=xl]){--color-palette-group-column-gap: var(--luzmo-spacing-3);--color-palette-group-row-gap: var(--luzmo-spacing-3)}";
33
+ var x = Object.defineProperty, y = Object.getOwnPropertyDescriptor, i = (s, e, o, t) => {
34
+ for (var r = t > 1 ? void 0 : t ? y(e, o) : e, l = s.length - 1, c; l >= 0; l--)
35
+ (c = s[l]) && (r = (t ? c(e, o, r) : c(r)) || r);
36
+ return t && r && x(e, o, r), r;
37
+ };
38
+ class a extends b(f, {
39
+ validSizes: ["s", "m", "l", "xl"],
40
+ noDefaultSize: !0
41
+ }) {
42
+ constructor() {
43
+ super(), this.disabled = !1, this.horizontal = !1, this._palettes = [], this.rovingTabindexController = new g(
44
+ this,
45
+ {
46
+ focusInIndex: (e) => e.findIndex(
47
+ (o) => this.selected ? !o.disabled && o.value === this.selected : !o.disabled
48
+ ),
49
+ elements: () => this.palettes,
50
+ isFocusableElement: (e) => !e.disabled
51
+ }
52
+ ), this.label = "", this._onKeyDown = (e) => {
53
+ if (e.code === "Enter" || e.code === "Space") {
54
+ e.preventDefault();
55
+ const o = e.target;
56
+ if (o.value === void 0)
57
+ return;
58
+ this.deselectSelectedPalettes(), o.selected = !0, o.tabIndex = 0, o.setAttribute("aria-checked", "true"), this.setSelected(o.value, !0);
59
+ }
60
+ }, this.manageColorPalettes = () => {
61
+ if (!this.slotElement)
62
+ return;
63
+ const o = this.slotElement.assignedElements({
64
+ flatten: !0
65
+ }).reduce((t, r) => {
66
+ if (r.matches("luzmo-color-palette"))
67
+ t.push(r);
68
+ else {
69
+ const l = [
70
+ ...r.querySelectorAll(":scope > luzmo-color-palette")
71
+ ];
72
+ t.push(...l);
73
+ }
74
+ return t;
75
+ }, []);
76
+ this.palettes = o, this.manageChildren(), this.manageSelects();
77
+ }, new p(this, {
78
+ config: {
79
+ childList: !0,
80
+ subtree: !0
81
+ },
82
+ callback: () => {
83
+ this.manageColorPalettes();
84
+ },
85
+ skipInitial: !0
86
+ });
87
+ }
88
+ /**
89
+ * The styles of the color palette
90
+ * @internal
91
+ */
92
+ static get styles() {
93
+ return [d(v)];
94
+ }
95
+ /**
96
+ * The color palette elements in the group
97
+ * @internal
98
+ */
99
+ set palettes(e) {
100
+ e !== this.palettes && (this._palettes = e, this.rovingTabindexController.clearElementCache());
101
+ }
102
+ /**
103
+ * The color palette elements in the group
104
+ * @internal
105
+ */
106
+ get palettes() {
107
+ return this._palettes;
108
+ }
109
+ get selected() {
110
+ return this._selected;
111
+ }
112
+ set selected(e) {
113
+ this.requestUpdate("selected", this._selected), this._selected = e, this.updateComplete.then(() => {
114
+ this.applySelects(), this.manageChildren();
115
+ });
116
+ }
117
+ dispatchChange(e) {
118
+ this.dispatchEvent(
119
+ new Event("change", {
120
+ bubbles: !0,
121
+ composed: !0,
122
+ cancelable: !0
123
+ })
124
+ ) || (this.setSelected(e), this.palettes.map((t) => {
125
+ t.selected = !!(t.value && this.selected === t.value);
126
+ }));
127
+ }
128
+ setSelected(e, o) {
129
+ if (e === this.selected)
130
+ return;
131
+ const t = this.selected;
132
+ this.requestUpdate("selected", t), this._selected = e, o && this.dispatchChange(t);
133
+ }
134
+ focus(e) {
135
+ this.rovingTabindexController.focus(e);
136
+ }
137
+ deselectSelectedPalettes() {
138
+ this.palettes.forEach((e) => {
139
+ e.selected && (e.selected = !1, e.tabIndex = -1, e.setAttribute("aria-checked", "false"));
140
+ });
141
+ }
142
+ _handleClick(e) {
143
+ const o = e.target;
144
+ o.value !== void 0 && (this.deselectSelectedPalettes(), o.selected = !0, o.tabIndex = 0, o.setAttribute("aria-checked", "true"), this.setSelected(o.value, !0));
145
+ }
146
+ async applySelects() {
147
+ await this.manageSelects();
148
+ }
149
+ async manageSelects() {
150
+ if (this.palettes.length === 0)
151
+ return;
152
+ const e = this.palettes;
153
+ this.setAttribute("role", "radiogroup");
154
+ const o = [], t = e.map(async (l) => {
155
+ await l.updateComplete, l.setAttribute("role", "radio"), l.setAttribute("aria-checked", l.selected ? "true" : "false"), l.selected && o.push(l);
156
+ });
157
+ await Promise.all(t);
158
+ const r = o.map((l) => l.value).find(Boolean);
159
+ this.setSelected(r);
160
+ }
161
+ render() {
162
+ return m`
163
+ <div
164
+ class="color-palette-group"
165
+ aria-label=${z(this.label ?? void 0)}
166
+ role="radiogroup"
167
+ @keydown=${this._onKeyDown}
168
+ @slotchange=${this.manageColorPalettes}
169
+ >
170
+ <slot role="presentation"></slot>
171
+ </div>
172
+ `;
173
+ }
174
+ firstUpdated(e) {
175
+ super.firstUpdated(e), this.addEventListener("click", this._handleClick);
176
+ }
177
+ updated(e) {
178
+ super.updated(e), e.has("horizontal") && this.palettes.forEach((t) => {
179
+ t.horizontal = this.horizontal;
180
+ }), this.manageSelects(), this.manageChildren(), e.has("size") && this.manageChildren(e), e.has("label") && (this.label || e.get("label") !== void 0) && (this.label.length > 0 ? this.setAttribute("aria-label", this.label) : this.removeAttribute("aria-label"));
181
+ }
182
+ manageChildren(e) {
183
+ this.palettes.forEach((o) => {
184
+ o.setAttribute("aria-label", `color palette: ${o.value}`), o.selected = !!(o.value && this.selected === o.value), this.size && (this.size !== "m" || (e == null ? void 0 : e.get("size")) !== void 0) && (o.size = this.size), this.disabled && (o.disabled = !0), o.horizontal = this.horizontal;
185
+ });
186
+ }
187
+ }
188
+ i([
189
+ u({ type: Boolean, reflect: !0 })
190
+ ], a.prototype, "disabled", 2);
191
+ i([
192
+ u({ type: Boolean, reflect: !0 })
193
+ ], a.prototype, "horizontal", 2);
194
+ i([
195
+ u({ type: String })
196
+ ], a.prototype, "label", 2);
197
+ i([
198
+ u({ type: String })
199
+ ], a.prototype, "selected", 1);
200
+ i([
201
+ h("slot")
202
+ ], a.prototype, "slotElement", 2);
203
+ customElements.get("luzmo-color-palette-group") || customElements.define("luzmo-color-palette-group", a);
204
+ export {
205
+ a as LuzmoColorPaletteGroup
206
+ };
@@ -3,6 +3,7 @@ import { LuzmoElement } from '../../utils/base';
3
3
  import { ColorValue } from '../../utils/reactive-controllers/color';
4
4
  import '../color-menu';
5
5
  import '../overlay';
6
+ import { Placement } from '../overlay/overlay-types';
6
7
  import '../popover';
7
8
  import '../swatch';
8
9
  import { SwatchRounding, SwatchShape } from './../swatch/swatch';
@@ -17,13 +18,41 @@ declare const LuzmoColorPicker_base: typeof LuzmoElement & {
17
18
  */
18
19
  export declare class LuzmoColorPicker extends LuzmoColorPicker_base {
19
20
  static styles: import("lit").CSSResult;
21
+ /**
22
+ * The color of the color picker.
23
+ */
20
24
  color?: ColorValue;
25
+ /**
26
+ * Whether the color picker is open.
27
+ */
21
28
  open: boolean;
29
+ /**
30
+ * Whether the color picker is disabled.
31
+ */
22
32
  disabled: boolean;
23
- placement: string;
33
+ /**
34
+ * Whether the color picker is read only.
35
+ */
36
+ readOnly: boolean;
37
+ /**
38
+ * The placement of the color picker.
39
+ */
40
+ placement: Placement;
41
+ /**
42
+ * The rounding of the color picker.
43
+ */
24
44
  rounding?: SwatchRounding;
25
- shape: SwatchShape;
45
+ /**
46
+ * The shape of the color picker.
47
+ */
48
+ shape?: SwatchShape;
49
+ /**
50
+ * The swatches of the color picker.
51
+ */
26
52
  swatches: string[];
53
+ /**
54
+ * Whether the color picker has an alpha channel.
55
+ */
27
56
  noAlphaChannel: boolean;
28
57
  private menuElement;
29
58
  private overlayElement;
@@ -15,7 +15,7 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../base-CBCg3yyw.cjs"),c=require("../state-D8JEtYqe.cjs"),u=require("../query-BL-TJj7K.cjs"),h=require("../sized-mixin-CPxE5C96.cjs");require("../color-menu/index.cjs");require("../overlay/index.cjs");const d=require("../slottable-request-event-BfUUt1Mh.cjs");require("../popover/index.cjs");require("../swatch/index.cjs");const m="luzmo-popover{margin-left:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap));margin-right:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap))}luzmo-swatch{cursor:pointer}:host{--luzmo-popover-content-area-spacing-vertical: 0;--color-picker-popover-horizontal-gap: var(--luzmo-spacing-4)}:host([size=s]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-3)}:host([size=l]),:host([size=xl]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-5)}";var v=Object.defineProperty,o=(i,r,a,g)=>{for(var l=void 0,n=i.length-1,p;n>=0;n--)(p=i[n])&&(l=p(r,a,l)||l);return l&&v(r,a,l),l};const s=class s extends h.SizedMixin(t.LuzmoElement){constructor(){super(...arguments),this.color="rgb(255, 0, 0)",this.open=!1,this.disabled=!1,this.placement="left-start",this.rounding="full",this.swatches=[],this.noAlphaChannel=!1,this._renderMenu=!1}overlayCloseEvent(){this.open=!1}overlayOpenEvent(){this.open=!0}handleColorChange(){const r=this.menuElement.color;this.color=typeof r=="string"?r:String(r),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}firstUpdated(){this.overlayElement.addEventListener("slottable-request",r=>{this._renderMenu=r.data!==d.removeSlottableRequest})}updated(r){r.has("open")&&this.open===!0&&(this._renderMenu=!0)}renderColorMenu(){return t.x`
18
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("lit"),t=require("lit/decorators.js"),h=require("../base-5nDSSNeT.cjs"),c=require("../sized-mixin-DcvJLFeo.cjs");require("../color-menu/index.cjs");require("../overlay/index.cjs");const d=require("../slottable-request-event-BfUUt1Mh.cjs");require("../popover/index.cjs");require("../swatch/index.cjs");const y="luzmo-popover{margin-left:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap));margin-right:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap))}luzmo-swatch{cursor:pointer}:host([read-only]) luzmo-swatch{cursor:default;pointer-events:none}:host{--luzmo-popover-content-area-spacing-vertical: 0;--color-picker-popover-horizontal-gap: var(--luzmo-spacing-4)}:host([size=s]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-3)}:host([size=l]),:host([size=xl]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-5)}";var m=Object.defineProperty,r=(i,o,a,v)=>{for(var l=void 0,s=i.length-1,u;s>=0;s--)(u=i[s])&&(l=u(o,a,l)||l);return l&&m(o,a,l),l};const p=class p extends c.SizedMixin(h.LuzmoElement){constructor(){super(...arguments),this.color="rgb(255, 0, 0)",this.open=!1,this.disabled=!1,this.readOnly=!1,this.placement="left-start",this.rounding="full",this.swatches=[],this.noAlphaChannel=!1,this._renderMenu=!1}overlayCloseEvent(){this.open=!1}overlayOpenEvent(){this.open=!0}handleColorChange(){const o=this.menuElement.color;this.color=typeof o=="string"?o:String(o),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}firstUpdated(){this.overlayElement.addEventListener("slottable-request",o=>{this._renderMenu=o.data!==d.removeSlottableRequest})}updated(o){o.has("open")&&this.open===!0&&(this._renderMenu=!0)}renderColorMenu(){return n.html`
19
19
  <luzmo-color-menu
20
20
  .size=${this.size}
21
21
  .color=${this.color}
@@ -23,7 +23,7 @@
23
23
  .swatches=${this.swatches}
24
24
  @change=${this.handleColorChange}
25
25
  ></luzmo-color-menu>
26
- `}render(){return t.x`
26
+ `}render(){return n.html`
27
27
  <luzmo-swatch
28
28
  id="trigger"
29
29
  .shape=${this.shape}
@@ -32,16 +32,17 @@
32
32
  .color=${this.color}
33
33
  .selected=${this.open&&!this.disabled}
34
34
  ?disabled=${this.disabled}
35
+ ?read-only=${this.readOnly}
35
36
  @luzmo-closed=${this.overlayCloseEvent}
36
37
  @luzmo-opened=${this.overlayOpenEvent}
37
38
  ></luzmo-swatch>
38
39
  <luzmo-overlay
39
- trigger=${this.disabled?"":"trigger@click"}
40
+ trigger=${this.disabled||this.readOnly?"":"trigger@click"}
40
41
  .placement=${this.placement}
41
42
  type="auto"
42
43
  >
43
44
  <luzmo-popover style="position:relative">
44
- ${this._renderMenu?this.renderColorMenu():t.x``}
45
+ ${this._renderMenu?this.renderColorMenu():n.html``}
45
46
  </luzmo-popover>
46
47
  </luzmo-overlay>
47
- `}};s.styles=t.r(m);let e=s;o([t.n({type:String,reflect:!0})],e.prototype,"color");o([t.n({type:Boolean,reflect:!0})],e.prototype,"open");o([t.n({type:Boolean,reflect:!0})],e.prototype,"disabled");o([t.n({type:String,reflect:!0})],e.prototype,"placement");o([t.n({type:String,reflect:!0})],e.prototype,"rounding");o([t.n({type:String,reflect:!0})],e.prototype,"shape");o([t.n({type:Array,reflect:!0})],e.prototype,"swatches");o([t.n({type:Boolean,reflect:!0,attribute:"no-alpha-channel"})],e.prototype,"noAlphaChannel");o([u.e("luzmo-color-menu")],e.prototype,"menuElement");o([u.e("luzmo-overlay")],e.prototype,"overlayElement");o([c.r()],e.prototype,"_renderMenu");customElements.get("luzmo-color-picker")||customElements.define("luzmo-color-picker",e);exports.LuzmoColorPicker=e;
48
+ `}};p.styles=n.unsafeCSS(y);let e=p;r([t.property({type:String,reflect:!0})],e.prototype,"color");r([t.property({type:Boolean,reflect:!0})],e.prototype,"open");r([t.property({type:Boolean,reflect:!0})],e.prototype,"disabled");r([t.property({type:Boolean,reflect:!0,attribute:"read-only"})],e.prototype,"readOnly");r([t.property({type:String,reflect:!0})],e.prototype,"placement");r([t.property({type:String,reflect:!0})],e.prototype,"rounding");r([t.property({type:String,reflect:!0})],e.prototype,"shape");r([t.property({type:Array,reflect:!0})],e.prototype,"swatches");r([t.property({type:Boolean,reflect:!0,attribute:"no-alpha-channel"})],e.prototype,"noAlphaChannel");r([t.query("luzmo-color-menu")],e.prototype,"menuElement");r([t.query("luzmo-overlay")],e.prototype,"overlayElement");r([t.state()],e.prototype,"_renderMenu");customElements.get("luzmo-color-picker")||customElements.define("luzmo-color-picker",e);exports.LuzmoColorPicker=e;
@@ -15,10 +15,10 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- import { a as z, r as d, x as u, n as l } from "../base-WsynuqaS.js";
19
- import { r as h } from "../state-Deh-vKYE.js";
20
- import { e as c } from "../query-D_KR_GUc.js";
21
- import { S as g } from "../sized-mixin-D4ACoVUr.js";
18
+ import { unsafeCSS as z, html as u } from "lit";
19
+ import { property as l, query as c, state as d } from "lit/decorators.js";
20
+ import { a as h } from "../base-CdYjmV_8.js";
21
+ import { S as g } from "../sized-mixin-cJbo3PKR.js";
22
22
  import "../color-menu/index.js";
23
23
  import "../overlay/index.js";
24
24
  import { r as f } from "../slottable-request-event-DggLA4Rx.js";
@@ -27,19 +27,19 @@ import "../swatch/index.js";
27
27
  const p = () => {
28
28
  if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
29
29
  const t = document.createElement("style");
30
- t.setAttribute("data-luzmo-vars", ""), t.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(t);
30
+ t.setAttribute("data-luzmo-vars", ""), t.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-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: 10px;--luzmo-icon-size-xs: 12px;--luzmo-icon-size-s: 14px;--luzmo-icon-size-m: 16px;--luzmo-icon-size-l: 18px;--luzmo-icon-size-xl: 20px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(t);
31
31
  }
32
32
  };
33
33
  p();
34
- const b = "luzmo-popover{margin-left:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap));margin-right:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap))}luzmo-swatch{cursor:pointer}:host{--luzmo-popover-content-area-spacing-vertical: 0;--color-picker-popover-horizontal-gap: var(--luzmo-spacing-4)}:host([size=s]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-3)}:host([size=l]),:host([size=xl]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-5)}";
35
- var v = Object.defineProperty, e = (t, r, s, x) => {
34
+ const b = "luzmo-popover{margin-left:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap));margin-right:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap))}luzmo-swatch{cursor:pointer}:host([read-only]) luzmo-swatch{cursor:default;pointer-events:none}:host{--luzmo-popover-content-area-spacing-vertical: 0;--color-picker-popover-horizontal-gap: var(--luzmo-spacing-4)}:host([size=s]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-3)}:host([size=l]),:host([size=xl]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-5)}";
35
+ var v = Object.defineProperty, e = (t, r, s, y) => {
36
36
  for (var n = void 0, i = t.length - 1, m; i >= 0; i--)
37
37
  (m = t[i]) && (n = m(r, s, n) || n);
38
38
  return n && v(r, s, n), n;
39
39
  };
40
- const a = class a extends g(z) {
40
+ const a = class a extends g(h) {
41
41
  constructor() {
42
- super(...arguments), this.color = "rgb(255, 0, 0)", this.open = !1, this.disabled = !1, this.placement = "left-start", this.rounding = "full", this.swatches = [], this.noAlphaChannel = !1, this._renderMenu = !1;
42
+ super(...arguments), this.color = "rgb(255, 0, 0)", this.open = !1, this.disabled = !1, this.readOnly = !1, this.placement = "left-start", this.rounding = "full", this.swatches = [], this.noAlphaChannel = !1, this._renderMenu = !1;
43
43
  }
44
44
  overlayCloseEvent() {
45
45
  this.open = !1;
@@ -85,11 +85,12 @@ const a = class a extends g(z) {
85
85
  .color=${this.color}
86
86
  .selected=${this.open && !this.disabled}
87
87
  ?disabled=${this.disabled}
88
+ ?read-only=${this.readOnly}
88
89
  @luzmo-closed=${this.overlayCloseEvent}
89
90
  @luzmo-opened=${this.overlayOpenEvent}
90
91
  ></luzmo-swatch>
91
92
  <luzmo-overlay
92
- trigger=${this.disabled ? "" : "trigger@click"}
93
+ trigger=${this.disabled || this.readOnly ? "" : "trigger@click"}
93
94
  .placement=${this.placement}
94
95
  type="auto"
95
96
  >
@@ -100,7 +101,7 @@ const a = class a extends g(z) {
100
101
  `;
101
102
  }
102
103
  };
103
- a.styles = d(b);
104
+ a.styles = z(b);
104
105
  let o = a;
105
106
  e([
106
107
  l({ type: String, reflect: !0 })
@@ -111,6 +112,9 @@ e([
111
112
  e([
112
113
  l({ type: Boolean, reflect: !0 })
113
114
  ], o.prototype, "disabled");
115
+ e([
116
+ l({ type: Boolean, reflect: !0, attribute: "read-only" })
117
+ ], o.prototype, "readOnly");
114
118
  e([
115
119
  l({ type: String, reflect: !0 })
116
120
  ], o.prototype, "placement");
@@ -133,7 +137,7 @@ e([
133
137
  c("luzmo-overlay")
134
138
  ], o.prototype, "overlayElement");
135
139
  e([
136
- h()
140
+ d()
137
141
  ], o.prototype, "_renderMenu");
138
142
  customElements.get("luzmo-color-picker") || customElements.define("luzmo-color-picker", o);
139
143
  export {
@@ -15,4 +15,43 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-BwxgAdzi.cjs");exports.LuzmoColorSlider=e.LuzmoColorSlider;
18
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@ctrl/tinycolor"),y=require("lit"),n=require("lit/decorators.js"),f=require("lit/directives/if-defined.js"),_=require("lit/directives/style-map.js");require("../color-handle/index.cjs");const x=require("../focusable-CbVKgGfS.cjs"),P=require("../language-resolution-EUER43cg.cjs"),H=require("../streaming-listener-D9Wc7skA.cjs"),C=/^hs[v|l]a?\s?\((\d{1,3}\.?\d*?),?\s?(\d{1,3})/,z=/(^hs[v|l]a?\s?\()\d{1,3}\.?\d*?(,?\s?)\d{1,3}/,S=/(^hs[v|l]a?\()\d{1,3}/,v=(p,t)=>t?p.toHexString():p.toHex();class k{constructor(t,{applyColorToState:e,extractColorFromState:r,maintains:s}){this.maintains="hue",this._hue=0,this._opacity=1,this.getColorProcesses={rgb:(o,i)=>i?o.toRgbString():o.toRgb(),prgb:(o,i)=>i?o.toPercentageRgbString():o.toPercentageRgb(),hex8:(o,i)=>i?o.toHex8String():o.toHex8(),name:o=>o.toName()||o.toRgbString(),hsl:(o,i)=>{if(this.maintains==="hue"){if(i)return o.toHslString().replace(S,`$1${this.hue}`);const{s:c,l:m,a:b}=o.toHsl();return{h:this.hue,s:c,l:m,a:b}}if(i)return o.toHslString().replace(z,`$1${this.hue}$2${this.saturation}`);const{s:h,l:d,a:g}=o.toHsl();return{h:this.hue,s:h,l:d,a:g}},hsv:(o,i)=>{if(this.maintains==="hue"){if(i)return o.toHsvString().replace(S,`$1${this.hue}`);const{s:c,v:m,a:b}=o.toHsv();return{h:this.hue,s:c,v:m,a:b}}if(i)return o.toHsvString().replace(z,`$1${this.hue}$2${this.saturation}`);const{s:h,v:d,a:g}=o.toHsv();return{h:this.hue,s:h,v:d,a:g}},hex:v,hex3:v,hex4:v,hex6:v},this._color=new u.TinyColor({h:0,s:1,v:1}),this._previousColor=new u.TinyColor({h:0,s:1,v:1}),this._format={format:"",isString:!1},this.host=t,this.applyColorToState=e,this.extractColorFromState=r,this.maintains=s||this.maintains}setColorProcess(t,e,r,s){this.maintains==="hue"?this.setColorMaintainHue(t,e,r,s):this.maintains==="saturation"&&this.setColorMaintainSaturation(t,e,r,s)}setColorMaintainHue(t,e,r,s){const{h:o,s:i,v:h,a:d}=this._color.toHsv();let g;if(s&&r.startsWith("hs")){const c=C.exec(e);if(c!==null){const[,m]=c;g=Number(m)}}else if(!s&&r.startsWith("hs")){const c=t.originalInput;g=Object.values(c)[0]}this.hue=g||o,this.opacity=d??1,this.applyColorToState({h:o,s:i,v:h,a:d})}setColorMaintainSaturation(t,e,r,s){const{a:o}=this._color.toHsv();if(s&&r.startsWith("hs")){const i=C.exec(e);if(i!==null){const[,h,d]=i;this.hue=Number(h),this.saturation=Number(d)}}else if(!s&&r.startsWith("hs")){const i=t.originalInput,h=Object.values(i);this.hue=h[0],this.saturation=h[1]}else{const{h:i}=t.toHsv();this.hue=i}this.opacity=o??1,this.applyColorToState(t.toHsv())}applyColorFromState(){this._color=new u.TinyColor(this.extractColorFromState(this))}get hue(){return this._hue}set hue(t){const e=Math.min(360,Math.max(0,t));if(e===this.hue)return;const r=this.hue,{s,v:o,a:i}=this._color.toHsv();this._color=new u.TinyColor({h:e,s,v:o,a:i}),this._hue=e,this.host.requestUpdate("hue",r)}get opacity(){return this._opacity}set opacity(t){const e=Math.min(1,Math.max(0,t));if(e===this.opacity)return;const r=this.opacity,{h:s,s:o,v:i}=this._color.toHsv();this._color=new u.TinyColor({h:s,s:o,v:i,a:e}),this._opacity=e,this.host.requestUpdate("opacity",r)}get value(){return this.color}get color(){return this.getColorProcesses[this._format.format||"hex"](this._color,this._format.isString)}set color(t){if(t===this.color)return;const e=this._color;this._color=new u.TinyColor(t);const r=this._color.format;let s=typeof t=="string"||t instanceof String;r.startsWith("hex")&&(s=t.startsWith("#")),this._format={format:r,isString:s},this.setColorProcess(this._color,t,r,s),this.host.requestUpdate("color",e)}getColor(t){const e={hsl:"toHsl"};return this._color[e[t]]()}setColor(t){this._color=t;const e=typeof this._color.originalInput=="string"||this._color.originalInput instanceof String;this.setColorProcess(this._color,t,this._color.format,e)}getHslString(){return this._color.toHslString()}savePreviousColor(){this._previousColor=this._color.clone()}restorePreviousColor(){this.setColor(this._previousColor)}}const $='.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}';var R=Object.defineProperty,T=Object.getOwnPropertyDescriptor,a=(p,t,e,r)=>{for(var s=r>1?void 0:r?T(t,e):t,o=p.length-1,i;o>=0;o--)(i=p[o])&&(s=(r?i(t,e,s):i(s))||s);return r&&s&&R(t,e,s),s};class l extends x.Focusable{constructor(){super(...arguments),this.disabled=!1,this.focused=!1,this.label="hue",this.vertical=!1,this.languageResolver=new P.LanguageResolutionController(this),this.colorController=new k(this,{applyColorToState:()=>{if(this.mode==="opacity"){const t=new u.TinyColor(this.colorController.color);this.sliderHandlePosition=100*t.getAlpha()}else this.sliderHandlePosition=100*(this.colorController.hue/360)},extractColorFromState:t=>this.mode==="opacity"?{...t.getColor("hsl"),a:this.value}:{...t.getColor("hsl"),h:this.value},maintains:"saturation"}),this.sliderHandlePosition=0,this.step=1,this.isLTR=!0,this._altered=0,this._pointerDown=!1}static get styles(){return[y.unsafeCSS($)]}get value(){return this.mode==="opacity"?this.colorController.opacity:this.colorController.hue}set value(t){this.mode==="opacity"?this.colorController.opacity=t:this.colorController.hue=t}get color(){return this.colorController.color}set color(t){this.colorController.color=t}get altered(){return this._altered}set altered(t){this._altered=t,this.step=Math.max(1,this.altered*10)}get focusElement(){return this.input}handleKeydown(t){const{key:e}=t;this.focused=!0,this.altered=[t.shiftKey,t.ctrlKey,t.altKey].filter(i=>!!i).length;let r=0;switch(e){case"ArrowUp":{r=this.step;break}case"ArrowDown":{r=-this.step;break}case"ArrowLeft":{r=this.step*(this.isLTR?-1:1);break}case"ArrowRight":{r=this.step*(this.isLTR?1:-1);break}default:return}t.preventDefault();const o=100/(this.mode==="opacity"?100:360);this.sliderHandlePosition=Math.min(100,Math.max(0,this.sliderHandlePosition+r*o)),this.value=this.mode==="opacity"?Math.min(1,Math.max(0,this.value+r/100)):Math.min(360,Math.max(0,this.value+r)),this.colorController.applyColorFromState(),r!==0&&(this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}handleInput(t){const{valueAsNumber:e}=t.target;this.value=e,this.sliderHandlePosition=100*(this.mode==="opacity"?this.value:this.value/360),this.colorController.applyColorFromState()}handleChange(t){this.handleInput(t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}focus(t={}){super.focus(t),this.forwardFocus()}forwardFocus(){this.input.focus()}handleFocus(){this.focused=!0}handleBlur(){this._pointerDown||(this.altered=0,this.focused=!1)}handlePointerdown(t){if(t.button!==0){t.preventDefault();return}this._pointerDown=!0,this.colorController.savePreviousColor(),this.boundingClientRect=this.getBoundingClientRect(),t.target.setPointerCapture(t.pointerId),t.pointerType==="mouse"&&(this.focused=!0)}handlePointermove(t){this.sliderHandlePosition=this.calculateHandlePosition(t),this.value=(this.mode==="opacity"?1:360)*(this.sliderHandlePosition/100),this.colorController.applyColorFromState(),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0,cancelable:!0}))}handlePointerup(t){this._pointerDown=!1,t.target.releasePointerCapture(t.pointerId),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0,cancelable:!0}))||this.colorController.restorePreviousColor(),this.focus(),t.pointerType==="mouse"&&(this.focused=!1)}calculateHandlePosition(t){if(!this.boundingClientRect)return this.sliderHandlePosition;const e=this.boundingClientRect,r=this.vertical?e.top:e.left,s=this.vertical?t.clientY:t.clientX,o=this.vertical?e.height:e.width,i=Math.max(0,Math.min(1,(s-r)/o));return this.vertical||!this.isLTR?100-100*i:100*i}handleGradientPointerdown(t){t.button===0&&(t.stopPropagation(),t.preventDefault(),this.handle.dispatchEvent(new PointerEvent("pointerdown",t)),this.handlePointermove(t))}get handlePositionStyles(){return`${this.vertical?"inset-block-end":"inset-inline-start"}: ${this.sliderHandlePosition}%`}get getColorSliderStyle(){const t=this.vertical?"top":"right";if(this.mode==="opacity"){const e=new u.TinyColor(this.colorController.color).setAlpha(1).toRgbString();return{background:`linear-gradient(to ${t}, transparent, ${e})`}}return{background:`linear-gradient(to ${t}, var(--luzmo-color-slider-gradient, var(--luzmo-color-slider-gradient-fallback)))`}}render(){return y.html`
19
+ <div
20
+ class="opacity-checkerboard checkerboard"
21
+ role="presentation"
22
+ @pointerdown=${this.handleGradientPointerdown}
23
+ >
24
+ <div
25
+ class="gradient"
26
+ role="presentation"
27
+ style=${_.styleMap(this.getColorSliderStyle)}
28
+ >
29
+ <slot name="gradient"></slot>
30
+ </div>
31
+ </div>
32
+ <luzmo-color-handle
33
+ tabindex=${f.ifDefined(this.focused?void 0:"0")}
34
+ @focus=${this.forwardFocus}
35
+ ?focused=${this.focused}
36
+ class="handle"
37
+ color=${this.mode==="opacity"?this.color:"hsl("+this.value+", 100%, 50%)"}
38
+ ?disabled=${this.disabled}
39
+ style=${this.handlePositionStyles}
40
+ ${H.streamingListener({start:["pointerdown",this.handlePointerdown],streamInside:["pointermove",this.handlePointermove],end:[["pointerup","pointercancel","pointerleave"],this.handlePointerup]})}
41
+ ></luzmo-color-handle>
42
+ <input
43
+ type="range"
44
+ class="slider"
45
+ min="0"
46
+ max=${this.mode==="opacity"?"100":"360"}
47
+ aria-orientation=${f.ifDefined(this.vertical?"vertical":void 0)}
48
+ orient=${f.ifDefined(this.vertical?"vertical":void 0)}
49
+ step=${this.step}
50
+ aria-label=${this.label}
51
+ .value=${String(this.mode==="opacity"?this.value*100:this.value)}
52
+ aria-valuetext=${`${new Intl.NumberFormat(this.languageResolver.language,{maximumFractionDigits:0,minimumIntegerDigits:1,style:"unit",unit:this.mode==="opacity"?"percent":"degree",unitDisplay:"narrow"}).format(this.mode==="opacity"?this.value*100:this.value)}`}
53
+ @input=${this.handleInput}
54
+ @change=${this.handleChange}
55
+ @keydown=${this.handleKeydown}
56
+ />
57
+ `}firstUpdated(t){super.firstUpdated(t),this.boundingClientRect=this.getBoundingClientRect(),this.addEventListener("focus",this.handleFocus),this.addEventListener("blur",this.handleBlur)}updated(t){t.has("mode")&&(this.handle.style.insetInlineStart="",this.handle.style.insetBlockEnd="",this.mode==="opacity"&&(this.colorController.color=new u.TinyColor(this.colorController.color).toRgbString(),this.handle.style.insetInlineStart=100*this.colorController.opacity+"%"))}}a([n.property({type:String,reflect:!0})],l.prototype,"dir",2);a([n.property({type:String,reflect:!0})],l.prototype,"mode",2);a([n.property({type:Boolean,reflect:!0})],l.prototype,"disabled",2);a([n.property({type:Boolean,reflect:!0})],l.prototype,"focused",2);a([n.query(".handle")],l.prototype,"handle",2);a([n.property({type:String})],l.prototype,"label",2);a([n.property({type:Boolean,reflect:!0})],l.prototype,"vertical",2);a([n.property({type:Number})],l.prototype,"value",1);a([n.property({type:Number,reflect:!0})],l.prototype,"sliderHandlePosition",2);a([n.property({type:String})],l.prototype,"color",1);a([n.property({type:Number})],l.prototype,"step",2);a([n.property({type:Boolean,attribute:"is-ltr"})],l.prototype,"isLTR",2);a([n.query("input")],l.prototype,"input",2);customElements.get("luzmo-color-slider")||customElements.define("luzmo-color-slider",l);exports.LuzmoColorSlider=l;