@luzmo/lucero 1.0.1-alpha.3 → 1.0.1-alpha.30

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 (232) hide show
  1. package/components/accordion/index.cjs +6 -6
  2. package/components/accordion/index.js +13 -12
  3. package/components/action-bar/index.cjs +4 -4
  4. package/components/action-bar/index.js +11 -9
  5. package/components/action-button/index.cjs +3 -3
  6. package/components/action-button/index.js +6 -5
  7. package/components/action-group/index.cjs +1 -1
  8. package/components/action-group/index.js +1 -1
  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 +9 -9
  13. package/components/avatar/index.cjs +3 -3
  14. package/components/avatar/index.js +6 -6
  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 +34 -29
  21. package/components/{button-base-DbkDzb71.js → button-base-B5uul3tZ.js} +54 -39
  22. package/components/button-base-C7or8-FB.cjs +25 -0
  23. package/components/button-group/index.cjs +1 -1
  24. package/components/button-group/index.js +10 -8
  25. package/components/calendar/index.cjs +96 -1
  26. package/components/calendar/index.js +538 -6
  27. package/components/checkbox/index.cjs +4 -4
  28. package/components/checkbox/index.js +6 -4
  29. package/components/{checkbox-mixin-Do7EgtpQ.js → checkbox-mixin-DUbGDm7f.js} +9 -9
  30. package/components/{checkbox-mixin-BDN0dBtS.cjs → checkbox-mixin-DhN8CIXY.cjs} +3 -3
  31. package/components/{clear-button-DoeRUWQ3.js → clear-button-BFtJVPzm.js} +14 -13
  32. package/components/clear-button-_a8GjtJC.cjs +18 -0
  33. package/components/{close-button-BWXdHSx3.js → close-button-D9qjjy2w.js} +13 -12
  34. package/components/close-button-TZ08VFmi.cjs +18 -0
  35. package/components/color-area/index.cjs +5 -5
  36. package/components/color-area/index.js +11 -10
  37. package/components/color-controller-7sNUf7SP.js +386 -0
  38. package/components/color-controller-ChN-A9Ft.cjs +18 -0
  39. package/components/color-field/color-field.d.ts +8 -0
  40. package/components/color-field/index.cjs +4 -4
  41. package/components/color-field/index.js +37 -24
  42. package/components/color-handle/index.cjs +2 -2
  43. package/components/color-handle/index.js +7 -5
  44. package/components/color-loupe/index.cjs +1 -1
  45. package/components/color-loupe/index.js +1 -1
  46. package/components/color-loupe-CIEFp7ln.cjs +56 -0
  47. package/components/{color-loupe-CmMsXbjT.js → color-loupe-CLPX6xVb.js} +6 -4
  48. package/components/color-menu/index.cjs +8 -8
  49. package/components/color-menu/index.js +45 -45
  50. package/components/color-palette/color-palette.d.ts +38 -3
  51. package/components/color-palette/index.cjs +1 -1
  52. package/components/color-palette/index.js +53 -39
  53. package/components/color-palette-group/color-palette-group.d.ts +79 -0
  54. package/components/color-palette-group/index.cjs +28 -0
  55. package/components/color-palette-group/index.d.ts +7 -0
  56. package/components/color-palette-group/index.js +206 -0
  57. package/components/color-picker/color-picker.d.ts +31 -2
  58. package/components/color-picker/index.cjs +6 -5
  59. package/components/color-picker/index.js +15 -11
  60. package/components/color-slider/index.cjs +40 -1
  61. package/components/color-slider/index.js +452 -6
  62. package/components/date-time-picker/index.cjs +16 -16
  63. package/components/date-time-picker/index.js +104 -105
  64. package/components/{dependency-manger-CEXvGQUV.js → dependency-manger-CO-VPlqq.js} +4 -4
  65. package/components/{dependency-manger-C5HCkMMB.cjs → dependency-manger-uthev62E.cjs} +1 -1
  66. package/components/divider/index.cjs +1 -1
  67. package/components/divider/index.js +10 -8
  68. package/components/field-group/index.cjs +1 -1
  69. package/components/field-group/index.js +1 -1
  70. package/components/field-group-BYHNJmv0.cjs +23 -0
  71. package/components/{field-group-DXfBWrkO.js → field-group-CHmw159R.js} +7 -5
  72. package/components/field-label/index.cjs +1 -1
  73. package/components/field-label/index.js +1 -1
  74. package/components/{field-label-CZ2zzChK.js → field-label-Cy3xMWZ-.js} +9 -8
  75. package/components/field-label-DZoeqJJX.cjs +25 -0
  76. package/components/{focus-visible-DBlJGoEW.js → focus-visible-BvScGDCE.js} +20 -20
  77. package/components/focus-visible-D4BXb5RB.cjs +18 -0
  78. package/components/{focusable-BxtpnzWp.js → focusable-BjvsvVam.js} +3 -2
  79. package/components/focusable-CbVKgGfS.cjs +18 -0
  80. package/components/icon/index.cjs +1 -1
  81. package/components/icon/index.js +22 -20
  82. package/components/index.cjs +1 -1
  83. package/components/index.js +139 -137
  84. package/components/infield-button/index.cjs +2 -2
  85. package/components/infield-button/index.js +4 -3
  86. package/components/label/index.cjs +1 -1
  87. package/components/label/index.js +6 -4
  88. package/components/{language-resolution-8yZa5r_P.js → language-resolution-B-wjV5bb.js} +9 -8
  89. package/components/{directive-C7oCP5Bh.cjs → language-resolution-EUER43cg.cjs} +1 -5
  90. package/components/like-anchor-B2EqJPdw.cjs +32 -0
  91. package/components/{like-anchor-Bvn_vLQ8.js → like-anchor-CgqCU210.js} +23 -22
  92. package/components/{manage-help-text-DhgARkZX.cjs → manage-help-text-Bat9yGvF.cjs} +3 -3
  93. package/components/{manage-help-text-syYnjKGL.js → manage-help-text-C9sCHK3R.js} +8 -8
  94. package/components/menu/index.cjs +38 -13
  95. package/components/menu/index.js +137 -104
  96. package/components/menu/menu-item.d.ts +8 -1
  97. package/components/multi-language-field/index.cjs +2 -2
  98. package/components/multi-language-field/index.js +8 -6
  99. package/components/number-field/index.cjs +6 -6
  100. package/components/number-field/index.js +33 -34
  101. package/components/observe-slot-presence-CNltc0C0.cjs +18 -0
  102. package/components/{observe-slot-presence-CmVi0zTc.js → observe-slot-presence-DFi6GE3H.js} +1 -1
  103. package/components/observe-slot-text-CBMHpuIK.cjs +18 -0
  104. package/components/{observe-slot-text-BPfIQQtz.js → observe-slot-text-DorVpCL4.js} +14 -15
  105. package/components/options/index.cjs +26 -58
  106. package/components/options/index.js +205 -849
  107. package/components/overlay/index.cjs +6 -6
  108. package/components/overlay/index.js +30 -31
  109. package/components/overlay-DpWon1Rp.js +1736 -0
  110. package/components/overlay-nUwFClQq.cjs +47 -0
  111. package/components/{pending-state-CaH1si5b.cjs → pending-state-DQctFHI8.cjs} +2 -2
  112. package/components/{pending-state-DTX7ggyF.js → pending-state-Dx1u3EXA.js} +2 -2
  113. package/components/picker/index.cjs +1 -1
  114. package/components/picker/index.js +2 -2
  115. package/components/{picker-BmoXv1jt.js → picker-Cm6_didQ.js} +44 -44
  116. package/components/picker-DxYgh4LR.cjs +123 -0
  117. package/components/picker-button/index.cjs +4 -4
  118. package/components/picker-button/index.js +7 -6
  119. package/components/{platform-BiXhwqk3.cjs → platform-BJnOJJag.cjs} +1 -1
  120. package/components/{platform-BM-uMWpX.js → platform-CqwNrovd.js} +12 -12
  121. package/components/popover/index.cjs +1 -1
  122. package/components/popover/index.js +1 -1
  123. package/components/popover-lcZnODPK.cjs +30 -0
  124. package/components/{popover-DjX0aAnY.js → popover-ucIgjbQs.js} +8 -7
  125. package/components/progress-circle/index.cjs +1 -1
  126. package/components/progress-circle/index.js +1 -1
  127. package/components/{progress-circle-DXH9z8-6.js → progress-circle-D5J0ZwY0.js} +8 -7
  128. package/components/progress-circle-DgMbqrzG.cjs +33 -0
  129. package/components/radio/index.cjs +2 -2
  130. package/components/radio/index.js +11 -10
  131. package/components/search/index.cjs +6 -6
  132. package/components/search/index.js +5 -5
  133. package/components/select/index.cjs +43 -43
  134. package/components/select/index.js +106 -91
  135. package/components/select/select.d.ts +1 -1
  136. package/components/{base-BjTwmyRF.cjs → sized-mixin-DcvJLFeo.cjs} +1 -5
  137. package/components/{sized-mixin-D4ACoVUr.js → sized-mixin-cJbo3PKR.js} +5 -5
  138. package/components/slider/index.cjs +1 -1
  139. package/components/slider/index.js +48 -1101
  140. package/components/{strategies-9indNIEb.js → strategies-Bk97oVn1.js} +15 -50
  141. package/components/strategies-CNgBb6dM.cjs +18 -0
  142. package/components/{streaming-listener-CP-JE6Fa.js → streaming-listener-BlWm-XZU.js} +5 -6
  143. package/components/streaming-listener-D9Wc7skA.cjs +18 -0
  144. package/components/swatch/index.cjs +7 -7
  145. package/components/swatch/index.js +17 -16
  146. package/components/switch/index.cjs +2 -2
  147. package/components/switch/index.js +5 -4
  148. package/components/tabs/index.cjs +16 -24
  149. package/components/tabs/index.js +93 -161
  150. package/components/tags/index.cjs +4 -4
  151. package/components/tags/index.js +14 -13
  152. package/components/text-field/index.cjs +3 -3
  153. package/components/text-field/index.js +12 -10
  154. package/components/text-field/text-field.d.ts +1 -0
  155. package/components/{text-field-BIADXoLC.js → text-field-BTEpwGFu.js} +73 -99
  156. package/components/text-field-JMrsh-zo.cjs +81 -0
  157. package/components/{text-field.module-ColtFhf_.js → text-field.module-C2KVUJcX.js} +1 -1
  158. package/components/{text-field.module-p_VF2tC_.cjs → text-field.module-DXhFA9G-.cjs} +1 -1
  159. package/components/toast/index.cjs +11 -11
  160. package/components/toast/index.js +10 -8
  161. package/components/tooltip/index.cjs +4 -4
  162. package/components/tooltip/index.js +60 -36
  163. package/components/tooltip/tooltip.d.ts +12 -1
  164. package/components/unit-input/index.cjs +6 -6
  165. package/components/unit-input/index.js +10 -9
  166. package/components/utils.cjs +1 -1
  167. package/components/utils.js +6 -6
  168. package/custom-elements.json +1 -1
  169. package/index.d.ts +1 -0
  170. package/package.json +67 -1
  171. package/components/NumberFormatter-DewVDY5w.cjs +0 -18
  172. package/components/NumberFormatter-DgOUVrge.js +0 -136
  173. package/components/NumberParser-Dik4a0h-.cjs +0 -18
  174. package/components/NumberParser-ci9J5EKv.js +0 -173
  175. package/components/action-group-DJGMcRHb.cjs +0 -20
  176. package/components/async-directive-BX1T1e1_.cjs +0 -22
  177. package/components/async-directive-BfcqVjDp.js +0 -82
  178. package/components/base-CBCg3yyw.cjs +0 -40
  179. package/components/base-D76d76ww.js +0 -26
  180. package/components/base-WsynuqaS.js +0 -677
  181. package/components/button-base-XgPLmwP-.cjs +0 -25
  182. package/components/class-map-Di1D_rCm.cjs +0 -22
  183. package/components/class-map-NbVXqBU0.js +0 -51
  184. package/components/clear-button-Qi1pMA5S.cjs +0 -18
  185. package/components/close-button-BFMBEw3q.cjs +0 -18
  186. package/components/color-controller-DTp1juRz.js +0 -3198
  187. package/components/color-controller-_ZwyhvaU.cjs +0 -18
  188. package/components/color-loupe-CaA_Lfkk.cjs +0 -56
  189. package/components/directive-helpers-Cm6gitnu.js +0 -62
  190. package/components/directive-helpers-DyIRTWwA.cjs +0 -22
  191. package/components/directive-oAbCiebi.js +0 -44
  192. package/components/field-group-DkGst3r5.cjs +0 -23
  193. package/components/field-label-mO1AkUgR.cjs +0 -25
  194. package/components/flow-D-0MTYCm.js +0 -527
  195. package/components/flow-DM3dNAKs.cjs +0 -30
  196. package/components/focus-visible-B0P9aY_G.cjs +0 -18
  197. package/components/focusable-EbipgXRh.cjs +0 -18
  198. package/components/if-defined-C9YGdo33.cjs +0 -22
  199. package/components/if-defined-DOaE2coe.js +0 -27
  200. package/components/index-A-yOTB_d.js +0 -1490
  201. package/components/index-BLWuwZXx.cjs +0 -113
  202. package/components/index-BwxgAdzi.cjs +0 -57
  203. package/components/index-HjQa8tew.js +0 -1174
  204. package/components/language-resolution-DJzmyzZq.cjs +0 -18
  205. package/components/like-anchor-sod1C1fR.cjs +0 -32
  206. package/components/luzmo-icons-DbwDQtuO.js +0 -229
  207. package/components/luzmo-icons-DletXGWU.cjs +0 -29
  208. package/components/mutation-controller-DH7YOCyj.js +0 -52
  209. package/components/mutation-controller-DkOMCW-c.cjs +0 -22
  210. package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
  211. package/components/observe-slot-text-Ceb7SvYT.cjs +0 -18
  212. package/components/overlay-Cig9r6uU.js +0 -2747
  213. package/components/overlay-KSKMzzkh.cjs +0 -47
  214. package/components/picker-DWsBWdPN.cjs +0 -123
  215. package/components/popover-KFfO0IYL.cjs +0 -30
  216. package/components/progress-circle-BvRJNuNo.cjs +0 -33
  217. package/components/query-BL-TJj7K.cjs +0 -22
  218. package/components/query-D_KR_GUc.js +0 -51
  219. package/components/query-assigned-elements-DjfhL1cl.js +0 -36
  220. package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
  221. package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
  222. package/components/query-assigned-nodes-C76XVPWY.js +0 -36
  223. package/components/sized-mixin-CPxE5C96.cjs +0 -18
  224. package/components/state-D8JEtYqe.cjs +0 -22
  225. package/components/state-Deh-vKYE.js +0 -29
  226. package/components/strategies-BACP6MhR.cjs +0 -18
  227. package/components/streaming-listener-B00MvALi.cjs +0 -18
  228. package/components/style-map-CeilmSgs.cjs +0 -22
  229. package/components/style-map-IgqIKvlE.js +0 -53
  230. package/components/text-field-D5d_Gt0t.cjs +0 -85
  231. package/components/when-CDK1Tt5Y.js +0 -28
  232. package/components/when-CDZyJPvd.cjs +0 -22
@@ -0,0 +1,56 @@
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";const p=require("lit"),u=require("lit/decorators.js"),n=require("./base-5nDSSNeT.cjs"),d=':host{inline-size:var(--luzmo-color-loupe-width, 48px);block-size:var(--luzmo-color-loupe-height, 64px);transform:translateY(var(--luzmo-color-loupe-animation-distance, 8px));opacity:0;transform-origin:bottom;pointer-events:none;filter:drop-shadow(var(--luzmo-color-loupe-drop-shadow-x, 0) var(--luzmo-color-loupe-drop-shadow-y, 2px) var(--luzmo-color-loupe-drop-shadow-blur, 8px) var(--luzmo-color-loupe-drop-shadow-color, rgba(0, 0, 0, .25)));transition:transform .1s ease-in-out,opacity .125s ease-in-out;position:absolute;inset-block-end:calc(var(--luzmo-color-handle-size, 16px) - var(--luzmo-color-handle-outer-border-width, 1px) + var(--luzmo-color-loupe-offset, 12px));inset-inline-end:calc(50% - var(--luzmo-color-loupe-width, 48px) / 2)}:host:dir(rtl),:host([dir=rtl]){inset-inline-end:calc(50% - var(--luzmo-color-loupe-width, 48px) / 2 - 1px)}:host([open]){opacity:1;transform:translate(0)}.luzmo-color-loupe-inner-border{fill:var(--luzmo-picked-color);stroke:var(--luzmo-color-loupe-inner-border-color, rgba(0, 0, 0, .1));stroke-width:var(--luzmo-color-loupe-inner-border-width, 1px)}.luzmo-color-loupe-outer-border{fill:none;stroke:var(--luzmo-color-loupe-outer-border-color, white);stroke-width:calc(var(--luzmo-color-loupe-outer-border-width, 2px) + 2px);transform:translate(calc((var(--luzmo-color-loupe-outer-border-width, 2px) + 2px) / 2))}.luzmo-color-loupe-checkerboard-pattern{fill:var(--luzmo-color-loupe-checkerboard-dark-color, rgb(230, 230, 230))}.luzmo-color-loupe-checkerboard-background{fill:var(--luzmo-color-loupe-checkerboard-light-color, rgb(255, 255, 255))}.luzmo-color-loupe-checkerboard-fill{fill:var(--luzmo-color-loupe-checkerboard-fill, url(#checkerboard-primary))}@media (forced-colors: active){:host{--highcontrast-colorloupe-outer-border-color: CanvasText}}svg{width:inherit;height:inherit}.loupe-clipped{clip-path:path("M23 61.575C19.0044 57.435 15.2591 53.0606 11.784 48.475C8.68949 44.4532 5.96348 40.1608 3.639 35.65C1.224 30.8 0 26.549 0 23C0.00319993 17.6937 1.84059 12.5516 5.20091 8.44488C8.56122 4.33815 13.2378 1.51928 18.4385 0.465803C23.6392 -0.587678 29.0442 0.189006 33.7378 2.66428C38.4314 5.13955 42.125 9.16122 44.193 14.048C45.3915 16.88 46.0061 19.9248 46 23C46 26.551 44.774 30.811 42.355 35.661C40.0274 40.1747 37.298 44.4698 34.2 48.494C30.7297 53.0728 26.9898 57.4409 23 61.575ZZ")}.opacity-checkerboard{position:absolute;top:2px;left:2px;block-size:100%;inline-size:100%}.opacity-checkerboard{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)}';var h=Object.defineProperty,s=(t,a,c,m)=>{for(var o=void 0,e=t.length-1,i;e>=0;e--)(i=t[e])&&(o=i(a,c,o)||o);return o&&h(a,c,o),o};const l=class l extends n.LuzmoElement{constructor(){super(...arguments),this.open=!1,this.color="rgba(255, 0, 0, 0.5)"}render(){return p.html`
19
+ <div class="opacity-checkerboard loupe-clipped"></div>
20
+ <div class="luzmo-color-loupe-inner-border loupe-clipped"></div>
21
+ <div class="luzmo-color-loupe-outer-border loupe-clipped"></div>
22
+ <svg
23
+ aria-hidden="true"
24
+ class="luzmo-color-loupe is-open"
25
+ overflow="visible"
26
+ style="--luzmo-picked-color: ${this.color}; position: absolute;"
27
+ >
28
+ <defs>
29
+ <path
30
+ id="loupe-path"
31
+ d="M23 61.575C19.0044 57.435 15.2591 53.0606 11.784 48.475C8.68949 44.4532 5.96348 40.1608 3.639 35.65C1.224 30.8 0 26.549 0 23C0.00319993 17.6937 1.84059 12.5516 5.20091 8.44488C8.56122 4.33815 13.2378 1.51928 18.4385 0.465803C23.6392 -0.587678 29.0442 0.189006 33.7378 2.66428C38.4314 5.13955 42.125 9.16122 44.193 14.048C45.3915 16.88 46.0061 19.9248 46 23C46 26.551 44.774 30.811 42.355 35.661C40.0274 40.1747 37.298 44.4698 34.2 48.494C30.7297 53.0728 26.9898 57.4409 23 61.575ZZ"
32
+ transform="translate(2, 2)"
33
+ />
34
+ <mask id="loupe-mask">
35
+ <rect x="0" y="0" height="100" width="100" fill="white" />
36
+ <use xlink:href="#path" fill="black" />
37
+ </mask>
38
+ </defs>
39
+
40
+ <g class="luzmo-color-loupe-loupe">
41
+ <g>
42
+ <use
43
+ xlink:href="#loupe-path"
44
+ mask="url(#loupe-mask)"
45
+ transform="translate(2, 2)"
46
+ class="luzmo-color-loupe-inner-border"
47
+ />
48
+ <use
49
+ xlink:href="#loupe-path"
50
+ mask="url(#loupe-mask)"
51
+ class="luzmo-color-loupe-outer-border"
52
+ />
53
+ </g>
54
+ </g>
55
+ </svg>
56
+ `}};l.styles=p.unsafeCSS(d);let r=l;s([u.property({type:Boolean,reflect:!0})],r.prototype,"open");s([u.property({type:String})],r.prototype,"color");exports.LuzmoColorLoupe=r;
@@ -15,19 +15,21 @@
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 s, r as d, x as n, n as p } from "./base-WsynuqaS.js";
18
+ import { unsafeCSS as s, html as d } from "lit";
19
+ import { property as p } from "lit/decorators.js";
20
+ import { a as n } from "./base-CdYjmV_8.js";
19
21
  const h = ':host{inline-size:var(--luzmo-color-loupe-width, 48px);block-size:var(--luzmo-color-loupe-height, 64px);transform:translateY(var(--luzmo-color-loupe-animation-distance, 8px));opacity:0;transform-origin:bottom;pointer-events:none;filter:drop-shadow(var(--luzmo-color-loupe-drop-shadow-x, 0) var(--luzmo-color-loupe-drop-shadow-y, 2px) var(--luzmo-color-loupe-drop-shadow-blur, 8px) var(--luzmo-color-loupe-drop-shadow-color, rgba(0, 0, 0, .25)));transition:transform .1s ease-in-out,opacity .125s ease-in-out;position:absolute;inset-block-end:calc(var(--luzmo-color-handle-size, 16px) - var(--luzmo-color-handle-outer-border-width, 1px) + var(--luzmo-color-loupe-offset, 12px));inset-inline-end:calc(50% - var(--luzmo-color-loupe-width, 48px) / 2)}:host:dir(rtl),:host([dir=rtl]){inset-inline-end:calc(50% - var(--luzmo-color-loupe-width, 48px) / 2 - 1px)}:host([open]){opacity:1;transform:translate(0)}.luzmo-color-loupe-inner-border{fill:var(--luzmo-picked-color);stroke:var(--luzmo-color-loupe-inner-border-color, rgba(0, 0, 0, .1));stroke-width:var(--luzmo-color-loupe-inner-border-width, 1px)}.luzmo-color-loupe-outer-border{fill:none;stroke:var(--luzmo-color-loupe-outer-border-color, white);stroke-width:calc(var(--luzmo-color-loupe-outer-border-width, 2px) + 2px);transform:translate(calc((var(--luzmo-color-loupe-outer-border-width, 2px) + 2px) / 2))}.luzmo-color-loupe-checkerboard-pattern{fill:var(--luzmo-color-loupe-checkerboard-dark-color, rgb(230, 230, 230))}.luzmo-color-loupe-checkerboard-background{fill:var(--luzmo-color-loupe-checkerboard-light-color, rgb(255, 255, 255))}.luzmo-color-loupe-checkerboard-fill{fill:var(--luzmo-color-loupe-checkerboard-fill, url(#checkerboard-primary))}@media (forced-colors: active){:host{--highcontrast-colorloupe-outer-border-color: CanvasText}}svg{width:inherit;height:inherit}.loupe-clipped{clip-path:path("M23 61.575C19.0044 57.435 15.2591 53.0606 11.784 48.475C8.68949 44.4532 5.96348 40.1608 3.639 35.65C1.224 30.8 0 26.549 0 23C0.00319993 17.6937 1.84059 12.5516 5.20091 8.44488C8.56122 4.33815 13.2378 1.51928 18.4385 0.465803C23.6392 -0.587678 29.0442 0.189006 33.7378 2.66428C38.4314 5.13955 42.125 9.16122 44.193 14.048C45.3915 16.88 46.0061 19.9248 46 23C46 26.551 44.774 30.811 42.355 35.661C40.0274 40.1747 37.298 44.4698 34.2 48.494C30.7297 53.0728 26.9898 57.4409 23 61.575ZZ")}.opacity-checkerboard{position:absolute;top:2px;left:2px;block-size:100%;inline-size:100%}.opacity-checkerboard{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)}';
20
22
  var m = Object.defineProperty, u = (a, t, c, b) => {
21
23
  for (var o = void 0, l = a.length - 1, i; l >= 0; l--)
22
24
  (i = a[l]) && (o = i(t, c, o) || o);
23
25
  return o && m(t, c, o), o;
24
26
  };
25
- const e = class e extends s {
27
+ const e = class e extends n {
26
28
  constructor() {
27
29
  super(...arguments), this.open = !1, this.color = "rgba(255, 0, 0, 0.5)";
28
30
  }
29
31
  render() {
30
- return n`
32
+ return d`
31
33
  <div class="opacity-checkerboard loupe-clipped"></div>
32
34
  <div class="luzmo-color-loupe-inner-border loupe-clipped"></div>
33
35
  <div class="luzmo-color-loupe-outer-border loupe-clipped"></div>
@@ -68,7 +70,7 @@ const e = class e extends s {
68
70
  `;
69
71
  }
70
72
  };
71
- e.styles = d(h);
73
+ e.styles = s(h);
72
74
  let r = e;
73
75
  u([
74
76
  p({ type: Boolean, reflect: !0 })
@@ -15,14 +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
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../luzmo-icons-DletXGWU.cjs"),i=require("../base-CBCg3yyw.cjs"),d=require("../state-D8JEtYqe.cjs"),n=require("../query-BL-TJj7K.cjs"),g=require("../focusable-EbipgXRh.cjs"),f=require("../sized-mixin-CPxE5C96.cjs");require("../color-area/index.cjs");require("../color-field/index.cjs");require("../color-handle/index.cjs");const a=require("../index-BwxgAdzi.cjs");require("../divider/index.cjs");require("../popover/index.cjs");require("../swatch/index.cjs");const v='@charset "UTF-8";:host{width:var(--luzmo-color-menu-width, var(--color-menu-width))}.hue-opacity-text-swatches-container{display:flex;gap:var(--luzmo-color-menu-color-controls-vertical-gap, var(--color-menu-color-controls-vertical-gap));flex-direction:column;padding:var(--luzmo-color-menu-hue-opacity-text-swatches-vertical-padding, var(--color-menu-hue-opacity-text-swatches-vertical-padding)) var(--luzmo-color-menu-hue-opacity-text-swatches-horizontal-padding, var(--color-menu-hue-opacity-text-swatches-horizontal-padding))}.swatch-sliders-container{display:flex;gap:var(--luzmo-color-menu-swatch-to-sliders-space, var(--color-menu-swatch-to-sliders-space))}.swatch-example-container{display:flex;align-items:center}.field-container{display:flex;align-items:center;gap:var(--luzmo-color-menu-format-field-to-format-space, var(--color-menu-format-field-to-format-space))}.format-container{text-transform:uppercase;position:relative;background:none;border:none;outline:none;height:var(--luzmo-color-menu-format-height, var(--color-menu-format-height));cursor:pointer;font-size:var(--luzmo-color-menu-format-font-size, var(--color-menu-format-font-size));display:flex;align-items:center;color:var(--luzmo-color-menu-format-font-color, var(--color-menu-format-font-color));gap:var(--luzmo-color-menu-format-name-to-icon, var(--color-menu-format-name-to-icon-space));padding:0 var(--luzmo-color-menu-format-horizontal-padding, var(--color-menu-format-horizontal-padding))}.format-container:hover{color:var(--luzmo-color-menu-format-font-color-hover, var(--color-menu-format-font-color-hover))}.format-container:focus-visible{outline:none}.format-container:focus-visible:after{content:"";width:100%;height:100%;position:absolute;box-sizing:border-box;left:0;top:0;border:var(--luzmo-color-menu-format-indicator-width, var(--luzmo-indicator-width)) solid var(--luzmo-color-menu-format-indicator-color, var(--luzmo-indicator-color));border-radius:var(--luzmo-color-menu-format-label-indicator-border-radius, var(--luzmo-border-radius-s))}.format-container:focus-visible,.format-container:active{color:var(--luzmo-color-menu-format-font-color-down, var(--color-menu-format-font-color-down))}.format-container .format-label{-webkit-user-select:none;user-select:none}.format-container .angle-icon{display:flex;align-items:center;height:calc(var(--color-menu-format-font-size) / 1.5)}.slider-container{display:flex;flex-direction:column;justify-content:center;gap:var(--luzmo-color-menu-slider-gap, var(--color-menu-slider-gap))}luzmo-color-area{width:100%;height:var(--luzmo-color-menu-height, var(--color-menu-height))}luzmo-color-slider{width:100%}luzmo-divider{margin:var(--luzmo-spacing-5) à}.swatches-container{display:grid;grid-template-columns:repeat(6,1fr);gap:var(--luzmo-color-menu-swatches-gap, var(--color-menu-swatches-gap))}.swatches-container luzmo-swatch{cursor:pointer}.swatches-container .swatch-choice{display:flex;align-items:center;justify-content:center}:host{--luzmo-text-field-icon-size-valid: 0px;--luzmo-text-field-icon-spacing-inline-end-valid: 1px;--luzmo-text-field-text-align: center}:host{--color-menu-width: 290px;--luzmo-text-field-width: 220px;--luzmo-color-slider-control-track-width: 8px;--color-menu-height: 140px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-5 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-5);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-5);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height);--color-menu-format-font-size: var(--luzmo-font-size-s);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-2);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-3);--color-menu-format-font-color: var(--luzmo-font-color);--color-menu-format-font-color-hover: var(--luzmo-font-color-hover);--color-menu-format-font-color-down: var(--luzmo-font-color-down);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host .swatches-container{--luzmo-swatch-size: 22px}:host([size=s]){--color-menu-width: 260px;--luzmo-text-field-width: 200px;--luzmo-color-slider-control-track-width: 8px;--color-menu-hue-opacity-text-swatches-horizontal-padding: var( --luzmo-spacing-5 );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-4 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-4);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-4);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height-s);--color-menu-format-font-size: var(--luzmo-font-size-xs);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-2);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-2);--color-menu-swatches-gap: var(--luzmo-spacing-3)}:host([size=s]) .swatches-container{--luzmo-swatch-size: 20px}:host([size=l]){--color-menu-width: 350px;--luzmo-text-field-width: 240px;--luzmo-color-slider-control-track-width: 16px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-5 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-5);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-5);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-format-height: var(--luzmo-component-height-l);--color-menu-format-font-size: var(--luzmo-font-size);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-3);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-4);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host([size=l]) .swatches-container{--luzmo-swatch-size: 24px}:host([size=l]) .swatch-example-container{--luzmo-swatch-size: 56px}:host([size=xl]){--color-menu-width: 380px;--luzmo-text-field-width: 280px;--luzmo-color-slider-control-track-width: 16px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-hue-opacity-text-swatches-vertical-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-color-controls-vertical-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-swatch-to-sliders-space: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height-xl);--color-menu-format-font-size: var(--luzmo-font-size-l);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-3);--color-menu-format-field-to-format-space: var(--luzmo-spacing-3);--color-menu-format-horizontal-padding: var(--luzmo-spacing-4);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host([size=xl]) .swatches-container{--luzmo-swatch-size: 26px}:host([size=xl]) .swatch-example-container{--luzmo-swatch-size: 64px}';var z=Object.defineProperty,l=(u,o,t,e)=>{for(var s=void 0,h=u.length-1,p;h>=0;h--)(p=u[h])&&(s=p(o,t,s)||s);return s&&z(o,t,s),s};const m=class m extends f.SizedMixin(g.Focusable){constructor(){super(...arguments),this.color="rgb(255, 0, 0)",this.noAlphaChannel=!1,this._alpha=1,this._rgbColor="rgb(255, 0, 0)",this._rgbaColor="rgb(255, 0, 0, 1)",this._previousColor="rgb(255, 0, 0)"}setColor(o){var e;const t=new a.TinyColor((e=o==null?void 0:o.target)==null?void 0:e.color);this._format=t.format==="name"?"rgb":t.format,this._rgbaColor=t.toRgbString(),this._alpha=this.noAlphaChannel?1:t.getAlpha(),this._rgbColor=t.setAlpha(1).toRgbString(),this.hueSliderElement.color=this._rgbColor,this.areaElement.color=this._rgbColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.swatchElement.color=this._rgbaColor,this.colorFieldElement.value=this.formatTextField(t),this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}handleAreaChange(o){o.stopPropagation(),o.preventDefault(),this._rgbColor=this.areaElement.color;const t=new a.TinyColor(this._rgbColor);this._rgbaColor=t.setAlpha(this._alpha).toRgbString(),this.colorFieldElement.value=this._rgbaColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.colorFieldElement.value=this.formatTextField(t),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}get focusElement(){return this.areaElement||this.colorFieldElement||this}handleHueSliderChange(o){o.stopPropagation(),o.preventDefault();const t=new a.TinyColor(this._rgbColor).toHsl();t.h=this.hueSliderElement.value;const e=new a.TinyColor(t);this._rgbColor=e.toRgbString(),this._rgbaColor=e.setAlpha(this._alpha).toRgbString(),this.areaElement.color=this._rgbColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.colorFieldElement.value=this.formatTextField(e),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}handleOpacitySliderChange(o){o.stopPropagation(),o.preventDefault(),this._alpha=this.opacitySliderElement.sliderHandlePosition/100;const t=new a.TinyColor(this._rgbColor).setAlpha(this._alpha);this._rgbaColor=t.toRgbString(),this.colorFieldElement.value=this.formatTextField(t),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}handleFieldChange(o){if(o.stopPropagation(),o.preventDefault(),this.colorFieldElement.checkValidity()){const t=new a.TinyColor(this.colorFieldElement.value);this._format=t.format,this._rgbaColor=t.toRgbString(),this._alpha=t.getAlpha(),this._rgbColor=t.setAlpha(1).toRgbString(),this.noAlphaChannel&&(this._rgbaColor=this._rgbColor,this._alpha=1),this.hueSliderElement.color=this._rgbColor,this.areaElement.color=this._rgbColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}}formatTextField(o){return this._format==="hsl"?o.toHslString():this._format==="hex"?this.noAlphaChannel?o.toHexString():o.toHex8String():(this._format==="name"&&(this._format="rgb"),o.toRgbString())}cycleFormat(){const o=["rgb","hsl","hex"];this._format=o[(o.indexOf(this._format)+1)%o.length];const t=new a.TinyColor(this.color),e=this.formatTextField(t);this.colorFieldElement.value=e}updated(o){if(o.has("color")&&this.color!==this._previousColor){this._previousColor=this.color;const t=new a.TinyColor(this.color);this._alpha=t.getAlpha(),this._rgbColor=t.setAlpha(1).toRgbString(),this._rgbaColor=t.setAlpha(this._alpha).toRgbString(),this.areaElement.color=this._rgbColor,this.hueSliderElement.color=this._rgbColor,this.colorFieldElement.value=this._rgbaColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.swatchElement.color=this._rgbaColor,this._format="rgb"}o.has("noAlphaChannel")&&!this.noAlphaChannel&&(this.opacitySliderElement.color=this._rgbaColor)}renderOpacitySlider(){return i.x`
18
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@ctrl/tinycolor"),c=require("@luzmo/icons"),n=require("lit"),l=require("lit/decorators.js"),d=require("../focusable-CbVKgGfS.cjs"),g=require("../sized-mixin-DcvJLFeo.cjs");require("../color-area/index.cjs");require("../color-field/index.cjs");require("../color-handle/index.cjs");require("../color-slider/index.cjs");require("../divider/index.cjs");require("../popover/index.cjs");require("../swatch/index.cjs");const f='@charset "UTF-8";:host{width:var(--luzmo-color-menu-width, var(--color-menu-width))}.hue-opacity-text-swatches-container{display:flex;gap:var(--luzmo-color-menu-color-controls-vertical-gap, var(--color-menu-color-controls-vertical-gap));flex-direction:column;padding:var(--luzmo-color-menu-hue-opacity-text-swatches-vertical-padding, var(--color-menu-hue-opacity-text-swatches-vertical-padding)) var(--luzmo-color-menu-hue-opacity-text-swatches-horizontal-padding, var(--color-menu-hue-opacity-text-swatches-horizontal-padding))}.swatch-sliders-container{display:flex;gap:var(--luzmo-color-menu-swatch-to-sliders-space, var(--color-menu-swatch-to-sliders-space))}.swatch-example-container{display:flex;align-items:center}.field-container{display:flex;align-items:center;gap:var(--luzmo-color-menu-format-field-to-format-space, var(--color-menu-format-field-to-format-space))}.format-container{text-transform:uppercase;position:relative;background:none;border:none;outline:none;height:var(--luzmo-color-menu-format-height, var(--color-menu-format-height));cursor:pointer;font-size:var(--luzmo-color-menu-format-font-size, var(--color-menu-format-font-size));display:flex;align-items:center;color:var(--luzmo-color-menu-format-font-color, var(--color-menu-format-font-color));gap:var(--luzmo-color-menu-format-name-to-icon, var(--color-menu-format-name-to-icon-space));padding:0 var(--luzmo-color-menu-format-horizontal-padding, var(--color-menu-format-horizontal-padding))}.format-container:hover{color:var(--luzmo-color-menu-format-font-color-hover, var(--color-menu-format-font-color-hover))}.format-container:focus-visible{outline:none}.format-container:focus-visible:after{content:"";width:100%;height:100%;position:absolute;box-sizing:border-box;left:0;top:0;border:var(--luzmo-color-menu-format-indicator-width, var(--luzmo-indicator-width)) solid var(--luzmo-color-menu-format-indicator-color, var(--luzmo-indicator-color));border-radius:var(--luzmo-color-menu-format-label-indicator-border-radius, var(--luzmo-border-radius-s))}.format-container:focus-visible,.format-container:active{color:var(--luzmo-color-menu-format-font-color-down, var(--color-menu-format-font-color-down))}.format-container .format-label{-webkit-user-select:none;user-select:none}.format-container .angle-icon{display:flex;align-items:center;height:calc(var(--color-menu-format-font-size) / 1.5)}.slider-container{display:flex;flex-direction:column;justify-content:center;gap:var(--luzmo-color-menu-slider-gap, var(--color-menu-slider-gap))}luzmo-color-area{width:100%;height:var(--luzmo-color-menu-height, var(--color-menu-height))}luzmo-color-slider{width:100%}luzmo-divider{margin:var(--luzmo-spacing-5) à}.swatches-container{display:grid;grid-template-columns:repeat(6,1fr);gap:var(--luzmo-color-menu-swatches-gap, var(--color-menu-swatches-gap))}.swatches-container luzmo-swatch{cursor:pointer}.swatches-container .swatch-choice{display:flex;align-items:center;justify-content:center}:host{--luzmo-text-field-icon-size-valid: 0px;--luzmo-text-field-icon-spacing-inline-end-valid: 1px;--luzmo-text-field-text-align: center}:host{--color-menu-width: 290px;--luzmo-text-field-width: 220px;--luzmo-color-slider-control-track-width: 8px;--color-menu-height: 140px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-5 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-5);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-5);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height);--color-menu-format-font-size: var(--luzmo-font-size-s);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-2);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-3);--color-menu-format-font-color: var(--luzmo-font-color);--color-menu-format-font-color-hover: var(--luzmo-font-color-hover);--color-menu-format-font-color-down: var(--luzmo-font-color-down);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host .swatches-container{--luzmo-swatch-size: 22px}:host([size=s]){--color-menu-width: 260px;--luzmo-text-field-width: 200px;--luzmo-color-slider-control-track-width: 8px;--color-menu-hue-opacity-text-swatches-horizontal-padding: var( --luzmo-spacing-5 );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-4 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-4);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-4);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height-s);--color-menu-format-font-size: var(--luzmo-font-size-xs);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-2);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-2);--color-menu-swatches-gap: var(--luzmo-spacing-3)}:host([size=s]) .swatches-container{--luzmo-swatch-size: 20px}:host([size=l]){--color-menu-width: 350px;--luzmo-text-field-width: 240px;--luzmo-color-slider-control-track-width: 16px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-5 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-5);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-5);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-format-height: var(--luzmo-component-height-l);--color-menu-format-font-size: var(--luzmo-font-size);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-3);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-4);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host([size=l]) .swatches-container{--luzmo-swatch-size: 24px}:host([size=l]) .swatch-example-container{--luzmo-swatch-size: 56px}:host([size=xl]){--color-menu-width: 380px;--luzmo-text-field-width: 280px;--luzmo-color-slider-control-track-width: 16px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-hue-opacity-text-swatches-vertical-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-color-controls-vertical-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-swatch-to-sliders-space: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height-xl);--color-menu-format-font-size: var(--luzmo-font-size-l);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-3);--color-menu-format-field-to-format-space: var(--luzmo-spacing-3);--color-menu-format-horizontal-padding: var(--luzmo-spacing-4);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host([size=xl]) .swatches-container{--luzmo-swatch-size: 26px}:host([size=xl]) .swatch-example-container{--luzmo-swatch-size: 64px}';var v=Object.defineProperty,a=(u,t,o,e)=>{for(var s=void 0,h=u.length-1,p;h>=0;h--)(p=u[h])&&(s=p(t,o,s)||s);return s&&v(t,o,s),s};const m=class m extends g.SizedMixin(d.Focusable){constructor(){super(...arguments),this.color="rgb(255, 0, 0)",this.noAlphaChannel=!1,this._alpha=1,this._rgbColor="rgb(255, 0, 0)",this._rgbaColor="rgb(255, 0, 0, 1)",this._previousColor="rgb(255, 0, 0)"}setColor(t){var e;const o=new i.TinyColor((e=t==null?void 0:t.target)==null?void 0:e.color);this._format=o.format==="name"?"rgb":o.format,this._rgbaColor=o.toRgbString(),this._alpha=this.noAlphaChannel?1:o.getAlpha(),this._rgbColor=o.setAlpha(1).toRgbString(),this.hueSliderElement.color=this._rgbColor,this.areaElement.color=this._rgbColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.swatchElement.color=this._rgbaColor,this.colorFieldElement.value=this.formatTextField(o),this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}handleAreaChange(t){t.stopPropagation(),t.preventDefault(),this._rgbColor=this.areaElement.color;const o=new i.TinyColor(this._rgbColor);this._rgbaColor=o.setAlpha(this._alpha).toRgbString(),this.colorFieldElement.value=this._rgbaColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.colorFieldElement.value=this.formatTextField(o),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}get focusElement(){return this.areaElement||this.colorFieldElement||this}handleHueSliderChange(t){t.stopPropagation(),t.preventDefault();const o=new i.TinyColor(this._rgbColor).toHsl();o.h=this.hueSliderElement.value;const e=new i.TinyColor(o);this._rgbColor=e.toRgbString(),this._rgbaColor=e.setAlpha(this._alpha).toRgbString(),this.areaElement.color=`hsla(${o.h}, ${o.s*100}%, ${o.l*100}%, ${o.a})`,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.colorFieldElement.value=this.formatTextField(e),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}handleOpacitySliderChange(t){t.stopPropagation(),t.preventDefault(),this._alpha=this.opacitySliderElement.sliderHandlePosition/100;const o=new i.TinyColor(this._rgbColor).setAlpha(this._alpha);this._rgbaColor=o.toRgbString(),this.colorFieldElement.value=this.formatTextField(o),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}handleFieldChange(t){if(t.stopPropagation(),t.preventDefault(),this.colorFieldElement.checkValidity()){const o=new i.TinyColor(this.colorFieldElement.value);this._format=o.format,this._rgbaColor=o.toRgbString(),this._alpha=o.getAlpha(),this._rgbColor=o.setAlpha(1).toRgbString(),this.noAlphaChannel&&(this._rgbaColor=this._rgbColor,this._alpha=1),this.hueSliderElement.color=this._rgbColor,this.areaElement.color=this._rgbColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}}formatTextField(t){return this._format==="hsl"?t.toHslString():this._format==="hex"?this.noAlphaChannel?t.toHexString():t.toHex8String():(this._format==="name"&&(this._format="rgb"),t.toRgbString())}cycleFormat(){const t=["rgb","hsl","hex"];this._format=t[(t.indexOf(this._format)+1)%t.length];const o=new i.TinyColor(this.color),e=this.formatTextField(o);this.colorFieldElement.value=e}updated(t){if(t.has("color")&&this.color!==this._previousColor){this._previousColor=this.color;const o=new i.TinyColor(this.color);this._alpha=o.getAlpha(),this._rgbColor=o.setAlpha(1).toRgbString(),this._rgbaColor=o.setAlpha(this._alpha).toRgbString(),this.areaElement.color=this._rgbColor,this.hueSliderElement.color=this._rgbColor,this.colorFieldElement.value=this._rgbaColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.swatchElement.color=this._rgbaColor,this._format="rgb"}t.has("noAlphaChannel")&&!this.noAlphaChannel&&(this.opacitySliderElement.color=this._rgbaColor)}renderOpacitySlider(){return n.html`
19
19
  <luzmo-color-slider
20
20
  id="luzmo-opacity-slider"
21
21
  mode="opacity"
22
22
  @input=${this.handleOpacitySliderChange}
23
23
  >
24
24
  </luzmo-color-slider>
25
- `}render(){var o;return i.x`
25
+ `}render(){var t;return n.html`
26
26
  <div id="color-menu" tabindex="0">
27
27
  <luzmo-color-area
28
28
  .size=${this.size}
@@ -60,19 +60,19 @@
60
60
  >
61
61
  <div class="format-label">${this._format}</div>
62
62
  <div class="change-format-icon">
63
- <div class="angle-icon">${c.O2(c.b)}</div>
64
- <div class="angle-icon">${c.O2(c.T)}</div>
63
+ <div class="angle-icon">${c.luzmoIcon(c.luzmoAngleUp)}</div>
64
+ <div class="angle-icon">${c.luzmoIcon(c.luzmoAngleDown)}</div>
65
65
  </div>
66
66
  </button>
67
67
  </div>
68
- ${((o=this.swatches)==null?void 0:o.length)>0?i.x`
68
+ ${((t=this.swatches)==null?void 0:t.length)>0?n.html`
69
69
  <luzmo-divider></luzmo-divider>
70
70
  <div class="swatches-container">
71
- ${this.swatches.map(t=>i.x`
71
+ ${this.swatches.map(o=>n.html`
72
72
  <div class="swatch-choice">
73
73
  <luzmo-swatch
74
74
  @click=${this.setColor}
75
- .color=${t}
75
+ .color=${o}
76
76
  .size=${this.size}
77
77
  readonly
78
78
  >
@@ -83,4 +83,4 @@
83
83
  `:""}
84
84
  </div>
85
85
  </div>
86
- `}};m.styles=i.r(v);let r=m;l([i.n({type:String,reflect:!0})],r.prototype,"color");l([i.n({type:Boolean,reflect:!0,attribute:"no-alpha-channel"})],r.prototype,"noAlphaChannel");l([i.n({type:Array,reflect:!0})],r.prototype,"swatches");l([n.e("luzmo-color-area")],r.prototype,"areaElement");l([n.e("#luzmo-hue-slider")],r.prototype,"hueSliderElement");l([n.e("#luzmo-opacity-slider")],r.prototype,"opacitySliderElement");l([n.e("luzmo-color-field")],r.prototype,"colorFieldElement");l([n.e("luzmo-swatch")],r.prototype,"swatchElement");l([d.r()],r.prototype,"_format");customElements.get("luzmo-color-menu")||customElements.define("luzmo-color-menu",r);exports.LuzmoColorMenu=r;
86
+ `}};m.styles=n.unsafeCSS(f);let r=m;a([l.property({type:String,reflect:!0})],r.prototype,"color");a([l.property({type:Boolean,reflect:!0,attribute:"no-alpha-channel"})],r.prototype,"noAlphaChannel");a([l.property({type:Array,reflect:!0})],r.prototype,"swatches");a([l.query("luzmo-color-area")],r.prototype,"areaElement");a([l.query("#luzmo-hue-slider")],r.prototype,"hueSliderElement");a([l.query("#luzmo-opacity-slider")],r.prototype,"opacitySliderElement");a([l.query("luzmo-color-field")],r.prototype,"colorFieldElement");a([l.query("luzmo-swatch")],r.prototype,"swatchElement");a([l.state()],r.prototype,"_format");customElements.get("luzmo-color-menu")||customElements.define("luzmo-color-menu",r);exports.LuzmoColorMenu=r;
@@ -15,16 +15,16 @@
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 { O as p, b as z, T as f } from "../luzmo-icons-DbwDQtuO.js";
19
- import { r as v, x as s, n as h } from "../base-WsynuqaS.js";
20
- import { r as b } from "../state-Deh-vKYE.js";
21
- import { e as n } from "../query-D_KR_GUc.js";
22
- import { F as x } from "../focusable-BxtpnzWp.js";
23
- import { S as w } from "../sized-mixin-D4ACoVUr.js";
18
+ import { TinyColor as a } from "@ctrl/tinycolor";
19
+ import { luzmoIcon as p, luzmoAngleUp as z, luzmoAngleDown as f } from "@luzmo/icons";
20
+ import { unsafeCSS as v, html as s } from "lit";
21
+ import { property as h, query as n, state as b } from "lit/decorators.js";
22
+ import { F as x } from "../focusable-BjvsvVam.js";
23
+ import { S as w } from "../sized-mixin-cJbo3PKR.js";
24
24
  import "../color-area/index.js";
25
25
  import "../color-field/index.js";
26
26
  import "../color-handle/index.js";
27
- import { T as a } from "../index-HjQa8tew.js";
27
+ import "../color-slider/index.js";
28
28
  import "../divider/index.js";
29
29
  import "../popover/index.js";
30
30
  import "../swatch/index.js";
@@ -36,62 +36,62 @@ const g = () => {
36
36
  };
37
37
  g();
38
38
  const C = '@charset "UTF-8";:host{width:var(--luzmo-color-menu-width, var(--color-menu-width))}.hue-opacity-text-swatches-container{display:flex;gap:var(--luzmo-color-menu-color-controls-vertical-gap, var(--color-menu-color-controls-vertical-gap));flex-direction:column;padding:var(--luzmo-color-menu-hue-opacity-text-swatches-vertical-padding, var(--color-menu-hue-opacity-text-swatches-vertical-padding)) var(--luzmo-color-menu-hue-opacity-text-swatches-horizontal-padding, var(--color-menu-hue-opacity-text-swatches-horizontal-padding))}.swatch-sliders-container{display:flex;gap:var(--luzmo-color-menu-swatch-to-sliders-space, var(--color-menu-swatch-to-sliders-space))}.swatch-example-container{display:flex;align-items:center}.field-container{display:flex;align-items:center;gap:var(--luzmo-color-menu-format-field-to-format-space, var(--color-menu-format-field-to-format-space))}.format-container{text-transform:uppercase;position:relative;background:none;border:none;outline:none;height:var(--luzmo-color-menu-format-height, var(--color-menu-format-height));cursor:pointer;font-size:var(--luzmo-color-menu-format-font-size, var(--color-menu-format-font-size));display:flex;align-items:center;color:var(--luzmo-color-menu-format-font-color, var(--color-menu-format-font-color));gap:var(--luzmo-color-menu-format-name-to-icon, var(--color-menu-format-name-to-icon-space));padding:0 var(--luzmo-color-menu-format-horizontal-padding, var(--color-menu-format-horizontal-padding))}.format-container:hover{color:var(--luzmo-color-menu-format-font-color-hover, var(--color-menu-format-font-color-hover))}.format-container:focus-visible{outline:none}.format-container:focus-visible:after{content:"";width:100%;height:100%;position:absolute;box-sizing:border-box;left:0;top:0;border:var(--luzmo-color-menu-format-indicator-width, var(--luzmo-indicator-width)) solid var(--luzmo-color-menu-format-indicator-color, var(--luzmo-indicator-color));border-radius:var(--luzmo-color-menu-format-label-indicator-border-radius, var(--luzmo-border-radius-s))}.format-container:focus-visible,.format-container:active{color:var(--luzmo-color-menu-format-font-color-down, var(--color-menu-format-font-color-down))}.format-container .format-label{-webkit-user-select:none;user-select:none}.format-container .angle-icon{display:flex;align-items:center;height:calc(var(--color-menu-format-font-size) / 1.5)}.slider-container{display:flex;flex-direction:column;justify-content:center;gap:var(--luzmo-color-menu-slider-gap, var(--color-menu-slider-gap))}luzmo-color-area{width:100%;height:var(--luzmo-color-menu-height, var(--color-menu-height))}luzmo-color-slider{width:100%}luzmo-divider{margin:var(--luzmo-spacing-5) à}.swatches-container{display:grid;grid-template-columns:repeat(6,1fr);gap:var(--luzmo-color-menu-swatches-gap, var(--color-menu-swatches-gap))}.swatches-container luzmo-swatch{cursor:pointer}.swatches-container .swatch-choice{display:flex;align-items:center;justify-content:center}:host{--luzmo-text-field-icon-size-valid: 0px;--luzmo-text-field-icon-spacing-inline-end-valid: 1px;--luzmo-text-field-text-align: center}:host{--color-menu-width: 290px;--luzmo-text-field-width: 220px;--luzmo-color-slider-control-track-width: 8px;--color-menu-height: 140px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-5 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-5);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-5);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height);--color-menu-format-font-size: var(--luzmo-font-size-s);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-2);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-3);--color-menu-format-font-color: var(--luzmo-font-color);--color-menu-format-font-color-hover: var(--luzmo-font-color-hover);--color-menu-format-font-color-down: var(--luzmo-font-color-down);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host .swatches-container{--luzmo-swatch-size: 22px}:host([size=s]){--color-menu-width: 260px;--luzmo-text-field-width: 200px;--luzmo-color-slider-control-track-width: 8px;--color-menu-hue-opacity-text-swatches-horizontal-padding: var( --luzmo-spacing-5 );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-4 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-4);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-4);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height-s);--color-menu-format-font-size: var(--luzmo-font-size-xs);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-2);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-2);--color-menu-swatches-gap: var(--luzmo-spacing-3)}:host([size=s]) .swatches-container{--luzmo-swatch-size: 20px}:host([size=l]){--color-menu-width: 350px;--luzmo-text-field-width: 240px;--luzmo-color-slider-control-track-width: 16px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-5 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-5);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-5);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-format-height: var(--luzmo-component-height-l);--color-menu-format-font-size: var(--luzmo-font-size);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-3);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-4);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host([size=l]) .swatches-container{--luzmo-swatch-size: 24px}:host([size=l]) .swatch-example-container{--luzmo-swatch-size: 56px}:host([size=xl]){--color-menu-width: 380px;--luzmo-text-field-width: 280px;--luzmo-color-slider-control-track-width: 16px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-hue-opacity-text-swatches-vertical-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-color-controls-vertical-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-swatch-to-sliders-space: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height-xl);--color-menu-format-font-size: var(--luzmo-font-size-l);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-3);--color-menu-format-field-to-format-space: var(--luzmo-spacing-3);--color-menu-format-horizontal-padding: var(--luzmo-spacing-4);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host([size=xl]) .swatches-container{--luzmo-swatch-size: 26px}:host([size=xl]) .swatch-example-container{--luzmo-swatch-size: 64px}';
39
- var y = Object.defineProperty, t = (i, o, r, e) => {
39
+ var y = Object.defineProperty, t = (i, r, o, e) => {
40
40
  for (var c = void 0, m = i.length - 1, d; m >= 0; m--)
41
- (d = i[m]) && (c = d(o, r, c) || c);
42
- return c && y(o, r, c), c;
41
+ (d = i[m]) && (c = d(r, o, c) || c);
42
+ return c && y(r, o, c), c;
43
43
  };
44
44
  const u = class u extends w(x) {
45
45
  constructor() {
46
46
  super(...arguments), this.color = "rgb(255, 0, 0)", this.noAlphaChannel = !1, this._alpha = 1, this._rgbColor = "rgb(255, 0, 0)", this._rgbaColor = "rgb(255, 0, 0, 1)", this._previousColor = "rgb(255, 0, 0)";
47
47
  }
48
- setColor(o) {
48
+ setColor(r) {
49
49
  var e;
50
- const r = new a((e = o == null ? void 0 : o.target) == null ? void 0 : e.color);
51
- this._format = r.format === "name" ? "rgb" : r.format, this._rgbaColor = r.toRgbString(), this._alpha = this.noAlphaChannel ? 1 : r.getAlpha(), this._rgbColor = r.setAlpha(1).toRgbString(), this.hueSliderElement.color = this._rgbColor, this.areaElement.color = this._rgbColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.swatchElement.color = this._rgbaColor, this.colorFieldElement.value = this.formatTextField(r), this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
50
+ const o = new a((e = r == null ? void 0 : r.target) == null ? void 0 : e.color);
51
+ this._format = o.format === "name" ? "rgb" : o.format, this._rgbaColor = o.toRgbString(), this._alpha = this.noAlphaChannel ? 1 : o.getAlpha(), this._rgbColor = o.setAlpha(1).toRgbString(), this.hueSliderElement.color = this._rgbColor, this.areaElement.color = this._rgbColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.swatchElement.color = this._rgbaColor, this.colorFieldElement.value = this.formatTextField(o), this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
52
52
  }
53
- handleAreaChange(o) {
54
- o.stopPropagation(), o.preventDefault(), this._rgbColor = this.areaElement.color;
55
- const r = new a(this._rgbColor);
56
- this._rgbaColor = r.setAlpha(this._alpha).toRgbString(), this.colorFieldElement.value = this._rgbaColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.colorFieldElement.value = this.formatTextField(r), this.swatchElement.color = this._rgbaColor, this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
53
+ handleAreaChange(r) {
54
+ r.stopPropagation(), r.preventDefault(), this._rgbColor = this.areaElement.color;
55
+ const o = new a(this._rgbColor);
56
+ this._rgbaColor = o.setAlpha(this._alpha).toRgbString(), this.colorFieldElement.value = this._rgbaColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.colorFieldElement.value = this.formatTextField(o), this.swatchElement.color = this._rgbaColor, this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
57
57
  }
58
58
  get focusElement() {
59
59
  return this.areaElement || this.colorFieldElement || this;
60
60
  }
61
- handleHueSliderChange(o) {
62
- o.stopPropagation(), o.preventDefault();
63
- const r = new a(this._rgbColor).toHsl();
64
- r.h = this.hueSliderElement.value;
65
- const e = new a(r);
66
- this._rgbColor = e.toRgbString(), this._rgbaColor = e.setAlpha(this._alpha).toRgbString(), this.areaElement.color = this._rgbColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.colorFieldElement.value = this.formatTextField(e), this.swatchElement.color = this._rgbaColor, this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
61
+ handleHueSliderChange(r) {
62
+ r.stopPropagation(), r.preventDefault();
63
+ const o = new a(this._rgbColor).toHsl();
64
+ o.h = this.hueSliderElement.value;
65
+ const e = new a(o);
66
+ this._rgbColor = e.toRgbString(), this._rgbaColor = e.setAlpha(this._alpha).toRgbString(), this.areaElement.color = `hsla(${o.h}, ${o.s * 100}%, ${o.l * 100}%, ${o.a})`, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.colorFieldElement.value = this.formatTextField(e), this.swatchElement.color = this._rgbaColor, this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
67
67
  }
68
- handleOpacitySliderChange(o) {
69
- o.stopPropagation(), o.preventDefault(), this._alpha = this.opacitySliderElement.sliderHandlePosition / 100;
70
- const r = new a(this._rgbColor).setAlpha(this._alpha);
71
- this._rgbaColor = r.toRgbString(), this.colorFieldElement.value = this.formatTextField(r), this.swatchElement.color = this._rgbaColor, this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
68
+ handleOpacitySliderChange(r) {
69
+ r.stopPropagation(), r.preventDefault(), this._alpha = this.opacitySliderElement.sliderHandlePosition / 100;
70
+ const o = new a(this._rgbColor).setAlpha(this._alpha);
71
+ this._rgbaColor = o.toRgbString(), this.colorFieldElement.value = this.formatTextField(o), this.swatchElement.color = this._rgbaColor, this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
72
72
  }
73
- handleFieldChange(o) {
74
- if (o.stopPropagation(), o.preventDefault(), this.colorFieldElement.checkValidity()) {
75
- const r = new a(this.colorFieldElement.value);
76
- this._format = r.format, this._rgbaColor = r.toRgbString(), this._alpha = r.getAlpha(), this._rgbColor = r.setAlpha(1).toRgbString(), this.noAlphaChannel && (this._rgbaColor = this._rgbColor, this._alpha = 1), this.hueSliderElement.color = this._rgbColor, this.areaElement.color = this._rgbColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.swatchElement.color = this._rgbaColor, this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
73
+ handleFieldChange(r) {
74
+ if (r.stopPropagation(), r.preventDefault(), this.colorFieldElement.checkValidity()) {
75
+ const o = new a(this.colorFieldElement.value);
76
+ this._format = o.format, this._rgbaColor = o.toRgbString(), this._alpha = o.getAlpha(), this._rgbColor = o.setAlpha(1).toRgbString(), this.noAlphaChannel && (this._rgbaColor = this._rgbColor, this._alpha = 1), this.hueSliderElement.color = this._rgbColor, this.areaElement.color = this._rgbColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.swatchElement.color = this._rgbaColor, this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
77
77
  }
78
78
  }
79
- formatTextField(o) {
80
- return this._format === "hsl" ? o.toHslString() : this._format === "hex" ? this.noAlphaChannel ? o.toHexString() : o.toHex8String() : (this._format === "name" && (this._format = "rgb"), o.toRgbString());
79
+ formatTextField(r) {
80
+ return this._format === "hsl" ? r.toHslString() : this._format === "hex" ? this.noAlphaChannel ? r.toHexString() : r.toHex8String() : (this._format === "name" && (this._format = "rgb"), r.toRgbString());
81
81
  }
82
82
  cycleFormat() {
83
- const o = ["rgb", "hsl", "hex"];
84
- this._format = o[(o.indexOf(this._format) + 1) % o.length];
85
- const r = new a(this.color), e = this.formatTextField(r);
83
+ const r = ["rgb", "hsl", "hex"];
84
+ this._format = r[(r.indexOf(this._format) + 1) % r.length];
85
+ const o = new a(this.color), e = this.formatTextField(o);
86
86
  this.colorFieldElement.value = e;
87
87
  }
88
- updated(o) {
89
- if (o.has("color") && this.color !== this._previousColor) {
88
+ updated(r) {
89
+ if (r.has("color") && this.color !== this._previousColor) {
90
90
  this._previousColor = this.color;
91
- const r = new a(this.color);
92
- this._alpha = r.getAlpha(), this._rgbColor = r.setAlpha(1).toRgbString(), this._rgbaColor = r.setAlpha(this._alpha).toRgbString(), this.areaElement.color = this._rgbColor, this.hueSliderElement.color = this._rgbColor, this.colorFieldElement.value = this._rgbaColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.swatchElement.color = this._rgbaColor, this._format = "rgb";
91
+ const o = new a(this.color);
92
+ this._alpha = o.getAlpha(), this._rgbColor = o.setAlpha(1).toRgbString(), this._rgbaColor = o.setAlpha(this._alpha).toRgbString(), this.areaElement.color = this._rgbColor, this.hueSliderElement.color = this._rgbColor, this.colorFieldElement.value = this._rgbaColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.swatchElement.color = this._rgbaColor, this._format = "rgb";
93
93
  }
94
- o.has("noAlphaChannel") && !this.noAlphaChannel && (this.opacitySliderElement.color = this._rgbaColor);
94
+ r.has("noAlphaChannel") && !this.noAlphaChannel && (this.opacitySliderElement.color = this._rgbaColor);
95
95
  }
96
96
  renderOpacitySlider() {
97
97
  return s`
@@ -104,7 +104,7 @@ const u = class u extends w(x) {
104
104
  `;
105
105
  }
106
106
  render() {
107
- var o;
107
+ var r;
108
108
  return s`
109
109
  <div id="color-menu" tabindex="0">
110
110
  <luzmo-color-area
@@ -148,15 +148,15 @@ const u = class u extends w(x) {
148
148
  </div>
149
149
  </button>
150
150
  </div>
151
- ${((o = this.swatches) == null ? void 0 : o.length) > 0 ? s`
151
+ ${((r = this.swatches) == null ? void 0 : r.length) > 0 ? s`
152
152
  <luzmo-divider></luzmo-divider>
153
153
  <div class="swatches-container">
154
154
  ${this.swatches.map(
155
- (r) => s`
155
+ (o) => s`
156
156
  <div class="swatch-choice">
157
157
  <luzmo-swatch
158
158
  @click=${this.setColor}
159
- .color=${r}
159
+ .color=${o}
160
160
  .size=${this.size}
161
161
  readonly
162
162
  >
@@ -1,18 +1,53 @@
1
+ import { PropertyValues } from 'lit';
1
2
  import { Focusable } from '../../utils/focusable';
2
3
  declare const LuzmoColorPalette_base: typeof Focusable & {
3
4
  new (...args: any[]): import("../..").SizedElementInterface;
4
5
  prototype: import("../..").SizedElementInterface;
5
6
  };
6
7
  export declare class LuzmoColorPalette extends LuzmoColorPalette_base {
8
+ /**
9
+ * The styles of the color palette
10
+ * @internal
11
+ */
7
12
  static styles: import("lit").CSSResult;
13
+ /**
14
+ * Set the color palette to a disabled state
15
+ */
8
16
  disabled: boolean;
17
+ /**
18
+ * Set the color palette to a focused state
19
+ */
9
20
  focused: boolean;
21
+ /**
22
+ * Set the color palette to a selected state
23
+ */
24
+ selected: boolean;
25
+ /**
26
+ * Set the color palette to an active state
27
+ */
10
28
  active: boolean;
11
- colors: string[];
29
+ /**
30
+ * Identifies this color palette within its color palette group
31
+ */
32
+ value?: string;
33
+ /**
34
+ * Set the colors to be displayed in the color palette
35
+ */
36
+ colors?: string[];
37
+ /**
38
+ * Set the color palette to a reverse state
39
+ */
40
+ reverse: boolean;
41
+ /**
42
+ * Set the color palette to a horizontal state
43
+ */
44
+ horizontal: boolean;
45
+ /**
46
+ * @internal
47
+ */
12
48
  get focusElement(): HTMLElement;
13
- private handlePointerdown;
14
- private handlePointerup;
15
49
  protected render(): import("lit-html").TemplateResult<1>;
16
50
  protected firstUpdated(changedProperties: Map<string, any>): void;
51
+ protected updated(changes: PropertyValues): void;
17
52
  }
18
53
  export {};
@@ -15,4 +15,4 @@
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("../base-CBCg3yyw.cjs"),p=require("../focusable-EbipgXRh.cjs"),u=require("../sized-mixin-CPxE5C96.cjs"),n=":host{box-sizing:border-box}:host([focused]),:host(:focus-visible){outline:none}:host([focused]) #palette,:host(:focus-visible) #palette{border:var(--luzmo-color-palette-focus-indicator-width, var(--color-palette-focus-indicator-width)) solid var(--luzmo-color-palette-focus-indicator-color, var(--color-palette-focus-indicator-color))!important}:host([disabled]){pointer-events:none;cursor:not-allowed;border-color:var(--highcontrast-color-palette-border-color-disabled, var(--luzmo-color-palette-border-color-disabled, var(--luzmo-font-color-disabled)));background:var(--highcontrast-color-palette-fill-color-disabled, var(--luzmo-color-palette-fill-color-disabled, var(--luzmo-font-color-disabled)))}:host([disabled]) #palette{opacity:var(--luzmo-color-palette-disabled-opacity, .3);border-color:transparent!important;background-color:var(--luzmo-color-palette-disabled-background-color, var(--color-palette-disabled-background-color))!important}:host:active #palette,:host([active]) #palette{border-color:var(--luzmo-color-palette-active-border-color, var(--color-palette-active-border-color));background-color:var(--luzmo-color-palette-active-background-color, var(--color-palette-active-background-color))}:host:hover #palette{border-color:var(--luzmo-color-palette-hover-border-color, var(--color-palette-hover-border-color))}#palette{box-sizing:border-box;height:100%;width:fit-content;padding:var(--luzmo-color-palette-padding, var(--color-palette-padding));border:var(--luzmo-color-palette-border-width, var(--color-palette-border-width)) solid transparent;cursor:pointer;border-radius:var(--luzmo-color-palette-border-radius, var(--color-palette-border-radius));display:flex}#palette>div{box-sizing:border-box;border:var(--luzmo-color-palette-color-border-width, var(--color-palette-color-border-width)) solid var(--luzmo-color-palette-color-border-color, var(--color-palette-color-border-color));height:var(--luzmo-color-palette-color-height, var(--color-palette-color-height));width:var(--luzmo-color-palette-color-width, var(--color-palette-color-width))}#palette:hover{background-color:var(--luzmo-color-palette-hover-background-color, var(--color-palette-hover-background-color))}#palette.active{background-color:var(--luzmo-color-palette-active-background-color, var(--color-palette-active-background-color))}#palette:focus-visible{outline:none}:host(:not([reverse]):not([horizontal])) #palette{flex-direction:column}:host(:not([reverse]):not([horizontal])) #palette>div{border-top:0}:host(:not([reverse]):not([horizontal])) #palette>div:first-child{border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host(:not([reverse]):not([horizontal])) #palette>div:last-child{border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([reverse]:not([horizontal])) #palette{flex-direction:column-reverse}:host([reverse]:not([horizontal])) #palette>div{border-bottom:0}:host([reverse]:not([horizontal])) #palette>div:first-child{border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([reverse]:not([horizontal])) #palette>div:last-child{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal]:not([reverse])) #palette{flex-direction:row}:host([horizontal]:not([reverse])) #palette>div{border-left:0}:host([horizontal]:not([reverse])) #palette>div:first-child{border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal]:not([reverse])) #palette>div:last-child{border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal][reverse]) #palette{flex-direction:row-reverse}:host([horizontal][reverse]) #palette>div{border-right:0}:host([horizontal][reverse]) #palette>div:first-child{border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal][reverse]) #palette>div:last-child{border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host{--color-palette-padding: var(--luzmo-spacing-1);--color-palette-background-color: transparent;--color-palette-hover-background-color: var( --luzmo-background-color-highlight );--color-palette-active-background-color: var( --luzmo-background-color-highlight-hover );--color-palette-disabled-background-color: transparent;--color-palette-border-width: var(--luzmo-border-width);--color-palette-hover-border-color: var(--luzmo-border-color);--color-palette-active-border-color: var(--luzmo-border-color);--color-palette-focus-indicator-width: var(--luzmo-indicator-width);--color-palette-focus-indicator-color: var(--luzmo-indicator-color);--color-palette-color-width: var(--luzmo-spacing-5);--color-palette-color-height: 1.25rem;--color-palette-color-border-radius: var(--luzmo-border-radius);--color-palette-color-border-width: var(--luzmo-border-width);--color-palette-color-border-color: var(--luzmo-border-color);--color-palette-border-radius: calc( var(--color-palette-color-border-radius) + var(--color-palette-padding) )}:host([horizontal]){--color-palette-color-height: var(--luzmo-spacing-5);--color-palette-color-width: 1.25rem}:host([size=s]){--color-palette-color-width: .75rem;--color-palette-color-height: var(--luzmo-spacing-5);--color-palette-padding: var(--luzmo-spacing-1);--color-palette-color-border-radius: var(--luzmo-border-radius-s)}:host([size=s][horizontal]){--color-palette-color-height: .75rem;--color-palette-color-width: var(--luzmo-spacing-5)}:host([size=l]){--color-palette-color-width: 1.25rem;--color-palette-color-height: 1.5rem;--color-palette-padding: var(--luzmo-spacing-2);--color-palette-color-border-radius: var(--luzmo-border-radius-l)}:host([size=l][horizontal]){--color-palette-color-height: 1.25rem;--color-palette-color-width: 1.5rem}:host([size=xl]){--color-palette-color-width: 1.5rem;--color-palette-color-height: 1.75rem;--color-palette-padding: var(--luzmo-spacing-2);--color-palette-color-border-radius: var(--luzmo-border-radius-xl)}:host([size=xl][horizontal]){--color-palette-color-height: 1.5rem;--color-palette-color-width: 1.75rem}";var v=Object.defineProperty,a=(i,o,l,h)=>{for(var t=void 0,c=i.length-1,s;c>=0;c--)(s=i[c])&&(t=s(o,l,t)||t);return t&&v(o,l,t),t};const d=class d extends u.SizedMixin(p.Focusable,{validSizes:["s","m","l","xl"],noDefaultSize:!0}){constructor(){super(...arguments),this.disabled=!1,this.focused=!1,this.active=!1,this.colors=["#000000","#FFFFFF"]}get focusElement(){return this.renderRoot.querySelector("#palette")}handlePointerdown(o){o.pointerType==="touch"&&(this.active=!0),this.setPointerCapture(o.pointerId)}handlePointerup(o){this.active=!1,this.releasePointerCapture(o.pointerId)}render(){const o=this.colors.map(l=>e.x`<div class="color" style="background-color: ${l}"></div>`);return e.x` <div id="palette">${o}</div> `}firstUpdated(o){super.firstUpdated(o),this.addEventListener("pointerdown",this.handlePointerdown),this.addEventListener("pointerup",this.handlePointerup),this.addEventListener("pointercancel",this.handlePointerup)}};d.styles=e.r(n);let r=d;a([e.n({type:Boolean,reflect:!0})],r.prototype,"disabled");a([e.n({type:Boolean,reflect:!0})],r.prototype,"focused");a([e.n({type:Boolean,reflect:!0})],r.prototype,"active");a([e.n({type:Array,reflect:!0})],r.prototype,"colors");customElements.get("luzmo-color-palette")||customElements.define("luzmo-color-palette",r);exports.LuzmoColorPalette=r;
18
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("lit"),e=require("lit/decorators.js"),h=require("../focusable-CbVKgGfS.cjs"),b=require("../sized-mixin-DcvJLFeo.cjs"),n=":host{box-sizing:border-box}:host([focused]),:host(:focus-visible){outline:none}:host([focused]) #palette,:host(:focus-visible) #palette{border:var(--luzmo-color-palette-focus-indicator-width, var(--color-palette-focus-indicator-width)) solid var(--luzmo-color-palette-focus-indicator-color, var(--color-palette-focus-indicator-color))!important}:host([disabled]){pointer-events:none;cursor:not-allowed}:host([disabled]) #palette{opacity:var(--luzmo-color-palette-disabled-opacity, .3);border-color:transparent!important;background-color:var(--luzmo-color-palette-disabled-background-color, var(--color-palette-disabled-background-color))!important}:host([selected]) #palette{border-color:var(--luzmo-color-palette-selected-border-color, var(--color-palette-selected-border-color));background-color:var(--luzmo-color-palette-selected-background-color, var(--color-palette-selected-background-color))}:host:hover #palette{border-color:var(--luzmo-color-palette-hover-border-color, var(--color-palette-hover-border-color))}#palette{box-sizing:border-box;height:100%;width:fit-content;padding:var(--luzmo-color-palette-padding, var(--color-palette-padding));border:var(--luzmo-color-palette-border-width, var(--color-palette-border-width)) solid transparent;cursor:pointer;border-radius:var(--luzmo-color-palette-border-radius, var(--color-palette-border-radius));display:flex}#palette>div{box-sizing:border-box;border:var(--luzmo-color-palette-color-border-width, var(--color-palette-color-border-width)) solid var(--luzmo-color-palette-color-border-color, var(--color-palette-color-border-color));height:var(--luzmo-color-palette-color-height, var(--color-palette-color-height));width:var(--luzmo-color-palette-color-width, var(--color-palette-color-width))}#palette:hover{background-color:var(--luzmo-color-palette-hover-background-color, var(--color-palette-hover-background-color))}#palette:focus-visible{outline:none}:host(:not([reverse]):not([horizontal])) #palette{flex-direction:column}:host(:not([reverse]):not([horizontal])) #palette>div:not(:first-child){border-top:0}:host(:not([reverse]):not([horizontal])) #palette>div:first-child{border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host(:not([reverse]):not([horizontal])) #palette>div:last-child{border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([reverse]:not([horizontal])) #palette{flex-direction:column-reverse}:host([reverse]:not([horizontal])) #palette>div:not(:first-child){border-bottom:0}:host([reverse]:not([horizontal])) #palette>div:first-child{border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([reverse]:not([horizontal])) #palette>div:last-child{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal]:not([reverse])) #palette{flex-direction:row}:host([horizontal]:not([reverse])) #palette>div:not(:first-child){border-left:0}:host([horizontal]:not([reverse])) #palette>div:first-child{border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal]:not([reverse])) #palette>div:last-child{border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal][reverse]) #palette{flex-direction:row-reverse}:host([horizontal][reverse]) #palette>div:not(:first-child){border-right:0}:host([horizontal][reverse]) #palette>div:first-child{border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal][reverse]) #palette>div:last-child{border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host{--color-palette-padding: var(--luzmo-spacing-1);--color-palette-background-color: transparent;--color-palette-hover-background-color: var( --luzmo-background-color-highlight );--color-palette-selected-border-color: var(--luzmo-border-color-down);--color-palette-selected-background-color: var( --luzmo-background-color-highlight-hover );--color-palette-disabled-background-color: transparent;--color-palette-border-width: var(--luzmo-border-width);--color-palette-hover-border-color: var(--luzmo-border-color);--color-palette-focus-indicator-width: var(--luzmo-indicator-width);--color-palette-focus-indicator-color: var(--luzmo-indicator-color);--color-palette-color-width: var(--luzmo-spacing-5);--color-palette-color-height: 1.25rem;--color-palette-color-border-radius: var(--luzmo-border-radius);--color-palette-color-border-width: var(--luzmo-border-width);--color-palette-color-border-color: var(--luzmo-border-color);--color-palette-border-radius: calc( var(--color-palette-color-border-radius) + var(--color-palette-padding) )}:host([horizontal]){--color-palette-color-height: var(--luzmo-spacing-5);--color-palette-color-width: 1.25rem}:host([size=s]){--color-palette-color-width: .75rem;--color-palette-color-height: var(--luzmo-spacing-5);--color-palette-padding: var(--luzmo-spacing-1);--color-palette-color-border-radius: var(--luzmo-border-radius-s)}:host([size=s][horizontal]){--color-palette-color-height: .75rem;--color-palette-color-width: var(--luzmo-spacing-5)}:host([size=l]){--color-palette-color-width: 1.25rem;--color-palette-color-height: 1.5rem;--color-palette-padding: var(--luzmo-spacing-2);--color-palette-color-border-radius: var(--luzmo-border-radius-l)}:host([size=l][horizontal]){--color-palette-color-height: 1.25rem;--color-palette-color-width: 1.5rem}:host([size=xl]){--color-palette-color-width: 1.5rem;--color-palette-color-height: 1.75rem;--color-palette-padding: var(--luzmo-spacing-2);--color-palette-color-border-radius: var(--luzmo-border-radius-xl)}:host([size=xl][horizontal]){--color-palette-color-height: 1.5rem;--color-palette-color-width: 1.75rem}";var v=Object.defineProperty,t=(s,r,a,p)=>{for(var l=void 0,d=s.length-1,u;d>=0;d--)(u=s[d])&&(l=u(r,a,l)||l);return l&&v(r,a,l),l};const i=class i extends b.SizedMixin(h.Focusable,{validSizes:["s","m","l","xl"],noDefaultSize:!0}){constructor(){super(...arguments),this.disabled=!1,this.focused=!1,this.selected=!1,this.active=!1,this.reverse=!1,this.horizontal=!1}get focusElement(){return this}render(){var a;const r=(a=this.colors)==null?void 0:a.map(p=>c.html`<div class="color" style="background-color: ${p}"></div>`);return c.html` <div id="palette">${r}</div> `}firstUpdated(r){super.firstUpdated(r)}updated(r){super.updated(r),r.has("selected")&&this.setAttribute("tabindex",this.selected?"0":"-1"),r.has("disabled")&&(this.disabled?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled"))}};i.styles=c.unsafeCSS(n);let o=i;t([e.property({type:Boolean,reflect:!0})],o.prototype,"disabled");t([e.property({type:Boolean,reflect:!0})],o.prototype,"focused");t([e.property({type:Boolean,reflect:!0})],o.prototype,"selected");t([e.property({type:Boolean,reflect:!0})],o.prototype,"active");t([e.property({type:String,reflect:!0})],o.prototype,"value");t([e.property({type:Array,reflect:!0})],o.prototype,"colors");t([e.property({type:Boolean,reflect:!0})],o.prototype,"reverse");t([e.property({type:Boolean,reflect:!0})],o.prototype,"horizontal");customElements.get("luzmo-color-palette")||customElements.define("luzmo-color-palette",o);exports.LuzmoColorPalette=o;