@luzmo/lucero 0.0.3 → 0.0.6

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 (323) hide show
  1. package/components/accordion/accordion-item.d.ts +24 -0
  2. package/components/accordion/accordion.d.ts +42 -0
  3. package/components/accordion/index.cjs +43 -0
  4. package/components/accordion/index.d.ts +10 -0
  5. package/components/accordion/index.js +181 -0
  6. package/components/action-bar/action-bar.d.ts +42 -0
  7. package/components/action-bar/index.cjs +39 -0
  8. package/components/action-bar/index.d.ts +7 -0
  9. package/components/action-bar/index.js +107 -0
  10. package/components/action-button/action-button.d.ts +81 -0
  11. package/components/action-button/index.cjs +24 -0
  12. package/components/action-button/index.d.ts +7 -0
  13. package/components/action-button/index.js +161 -0
  14. package/components/action-group/action-group.d.ts +50 -0
  15. package/components/action-group/index.cjs +18 -0
  16. package/components/action-group/index.d.ts +7 -0
  17. package/components/action-group/index.js +29 -0
  18. package/components/action-group-B7oQXv30.js +258 -0
  19. package/components/action-group-C8YUQzt8.cjs +20 -0
  20. package/components/action-menu/action-menu.d.ts +40 -0
  21. package/components/action-menu/index.cjs +56 -0
  22. package/components/action-menu/index.d.ts +7 -0
  23. package/components/action-menu/index.js +126 -0
  24. package/components/async-directive-BhRGSTWB.js +82 -0
  25. package/components/async-directive-_65ULPLK.cjs +22 -0
  26. package/components/avatar/avatar.d.ts +31 -0
  27. package/components/avatar/index.cjs +24 -0
  28. package/components/avatar/index.d.ts +7 -0
  29. package/components/avatar/index.js +81 -0
  30. package/components/base-BjTwmyRF.cjs +22 -0
  31. package/components/base-CxUap9HL.js +665 -0
  32. package/components/base-D76d76ww.js +26 -0
  33. package/components/base-rtxi7uaR.cjs +40 -0
  34. package/components/button/button-base.d.ts +44 -0
  35. package/components/button/button.d.ts +59 -0
  36. package/components/button/clear-button.d.ts +22 -0
  37. package/components/button/close-button.d.ts +24 -0
  38. package/components/button/index.cjs +20 -0
  39. package/components/button/index.d.ts +13 -0
  40. package/components/button/index.js +127 -0
  41. package/components/button-base-CgrTYVgq.js +142 -0
  42. package/components/button-base-DjqSZyn2.cjs +25 -0
  43. package/components/button-group/button-group.d.ts +19 -0
  44. package/components/button-group/index.cjs +18 -0
  45. package/components/button-group/index.d.ts +7 -0
  46. package/components/button-group/index.js +59 -0
  47. package/components/checkbox/checkbox-base.d.ts +9 -0
  48. package/components/checkbox/checkbox-mixin.d.ts +14 -0
  49. package/components/checkbox/checkbox.d.ts +54 -0
  50. package/components/checkbox/index.cjs +25 -0
  51. package/components/checkbox/index.d.ts +7 -0
  52. package/components/checkbox/index.js +96 -0
  53. package/components/checkbox-mixin-BRluTF9s.js +70 -0
  54. package/components/checkbox-mixin-iB-0ivgo.cjs +27 -0
  55. package/components/clear-button-CyLF5dx_.js +53 -0
  56. package/components/clear-button-DFXE6MLx.cjs +18 -0
  57. package/components/close-button-CcD-aVqh.cjs +18 -0
  58. package/components/close-button-CzpdWCWI.js +51 -0
  59. package/components/color-Bg3tYsAQ.js +178 -0
  60. package/components/color-DphK4hwx.cjs +18 -0
  61. package/components/color-area/color-area.d.ts +67 -0
  62. package/components/color-area/index.cjs +80 -0
  63. package/components/color-area/index.d.ts +7 -0
  64. package/components/color-area/index.js +372 -0
  65. package/components/color-field/color-field.d.ts +20 -0
  66. package/components/color-field/index.cjs +23 -0
  67. package/components/color-field/index.d.ts +7 -0
  68. package/components/color-field/index.js +80 -0
  69. package/components/color-handle/color-handle.d.ts +13 -0
  70. package/components/color-handle/index.cjs +24 -0
  71. package/components/color-handle/index.d.ts +7 -0
  72. package/components/color-handle/index.js +73 -0
  73. package/components/color-loupe/color-loupe.d.ts +7 -0
  74. package/components/color-loupe/index.cjs +18 -0
  75. package/components/color-loupe/index.d.ts +7 -0
  76. package/components/color-loupe/index.js +29 -0
  77. package/components/color-loupe-BN3k1ACF.cjs +56 -0
  78. package/components/color-loupe-CD-dhmB1.js +81 -0
  79. package/components/color-menu/color-menu.d.ts +54 -0
  80. package/components/color-menu/index.cjs +86 -0
  81. package/components/color-menu/index.d.ts +7 -0
  82. package/components/color-menu/index.js +203 -0
  83. package/components/color-picker/color-picker.d.ts +39 -0
  84. package/components/color-picker/index.cjs +48 -0
  85. package/components/color-picker/index.d.ts +7 -0
  86. package/components/color-picker/index.js +141 -0
  87. package/components/color-slider/color-slider.d.ts +57 -0
  88. package/components/color-slider/index.cjs +57 -0
  89. package/components/color-slider/index.d.ts +7 -0
  90. package/components/color-slider/index.js +317 -0
  91. package/components/condition-attribute-with-id-DrQYZzFS.cjs +18 -0
  92. package/components/condition-attribute-with-id-Dv4lSRbe.js +31 -0
  93. package/components/dependency-manger-C5HCkMMB.cjs +18 -0
  94. package/components/dependency-manger-CEXvGQUV.js +54 -0
  95. package/components/directive-C7oCP5Bh.cjs +22 -0
  96. package/components/directive-helpers-C3pAxRR3.cjs +22 -0
  97. package/components/directive-helpers-D0vm0gvF.js +28 -0
  98. package/components/directive-oAbCiebi.js +44 -0
  99. package/components/divider/divider.d.ts +24 -0
  100. package/components/divider/index.cjs +18 -0
  101. package/components/divider/index.d.ts +7 -0
  102. package/components/divider/index.js +61 -0
  103. package/components/divider.module-CXMNveQc.cjs +18 -0
  104. package/components/divider.module-DwOuLGU3.js +21 -0
  105. package/components/element-resolution-BvRLGqIU.cjs +18 -0
  106. package/components/element-resolution-FCUT-wql.js +91 -0
  107. package/components/field-group/field-group.d.ts +24 -0
  108. package/components/field-group/index.cjs +18 -0
  109. package/components/field-group/index.d.ts +7 -0
  110. package/components/field-group/index.js +29 -0
  111. package/components/field-group-DAImvhSF.js +66 -0
  112. package/components/field-group-d5Hkb8UW.cjs +23 -0
  113. package/components/field-label/field-label.d.ts +50 -0
  114. package/components/field-label/index.cjs +18 -0
  115. package/components/field-label/index.d.ts +7 -0
  116. package/components/field-label/index.js +29 -0
  117. package/components/field-label-D1zKXSG6.cjs +25 -0
  118. package/components/field-label-DY9iRmRI.js +106 -0
  119. package/components/focus-group-DHeTq18L.js +218 -0
  120. package/components/focus-group-DnxZUBhQ.cjs +18 -0
  121. package/components/focus-visible-B0P9aY_G.cjs +18 -0
  122. package/components/focus-visible-DBlJGoEW.js +74 -0
  123. package/components/focusable-Bze9xE25.js +153 -0
  124. package/components/focusable-DyyBr-J-.cjs +18 -0
  125. package/components/focusable-selectors-B4YgbghQ.js +31 -0
  126. package/components/focusable-selectors-BgFlyFcY.cjs +18 -0
  127. package/components/icon/icon-base.d.ts +11 -0
  128. package/components/icon/icon.d.ts +12 -0
  129. package/components/icon/index.cjs +18 -0
  130. package/components/icon/index.d.ts +7 -0
  131. package/components/icon/index.js +88 -0
  132. package/components/if-defined-C-8FyBSN.cjs +22 -0
  133. package/components/if-defined-XzWkhMhg.js +27 -0
  134. package/components/index-C1chwzNp.js +727 -0
  135. package/components/index-CNtoBntg.cjs +77 -0
  136. package/components/index-Ci6Jnhu4.js +927 -0
  137. package/components/index-DCKCHDTt.cjs +18 -0
  138. package/components/index.cjs +27 -0
  139. package/components/index.js +207 -0
  140. package/components/infield-button/index.cjs +22 -0
  141. package/components/infield-button/index.d.ts +7 -0
  142. package/components/infield-button/index.js +64 -0
  143. package/components/infield-button/infield-button.d.ts +25 -0
  144. package/components/label/index.cjs +18 -0
  145. package/components/label/index.d.ts +7 -0
  146. package/components/label/index.js +51 -0
  147. package/components/label/label.d.ts +7 -0
  148. package/components/legend-position/index.d.ts +7 -0
  149. package/components/legend-position/legend-position.d.ts +10 -0
  150. package/components/like-anchor-DKuw8fJA.cjs +32 -0
  151. package/components/like-anchor-DnsAwo_O.js +69 -0
  152. package/components/manage-help-text-B-FXFXgT.js +92 -0
  153. package/components/manage-help-text-I5aYDAKT.cjs +30 -0
  154. package/components/menu/index.cjs +18 -0
  155. package/components/menu/index.d.ts +16 -0
  156. package/components/menu/index.js +32 -0
  157. package/components/menu/menu-divider.d.ts +14 -0
  158. package/components/menu/menu-group.d.ts +17 -0
  159. package/components/menu/menu-item.d.ts +125 -0
  160. package/components/menu/menu.d.ts +119 -0
  161. package/components/multi-language-field/index.cjs +39 -0
  162. package/components/multi-language-field/index.d.ts +7 -0
  163. package/components/multi-language-field/index.js +148 -0
  164. package/components/multi-language-field/multi-language-field.d.ts +41 -0
  165. package/components/mutation-controller-DH7YOCyj.js +52 -0
  166. package/components/mutation-controller-DkOMCW-c.cjs +22 -0
  167. package/components/number-field/index.cjs +57 -0
  168. package/components/number-field/index.d.ts +7 -0
  169. package/components/number-field/index.js +735 -0
  170. package/components/number-field/number-field.d.ts +113 -0
  171. package/components/observe-slot-text-DeSKIzvP.cjs +18 -0
  172. package/components/observe-slot-text-DrM71me1.js +87 -0
  173. package/components/overlay/abstract-overlay.d.ts +72 -0
  174. package/components/overlay/click-controller.d.ts +14 -0
  175. package/components/overlay/events.d.ts +23 -0
  176. package/components/overlay/full-size-plugin.d.ts +12 -0
  177. package/components/overlay/hover-controller.d.ts +20 -0
  178. package/components/overlay/index.cjs +73 -0
  179. package/components/overlay/index.d.ts +22 -0
  180. package/components/overlay/index.js +342 -0
  181. package/components/overlay/interaction-controller.d.ts +38 -0
  182. package/components/overlay/loader.d.ts +4 -0
  183. package/components/overlay/longpress-controller.d.ts +21 -0
  184. package/components/overlay/overlay-dialog.d.ts +4 -0
  185. package/components/overlay/overlay-events.d.ts +11 -0
  186. package/components/overlay/overlay-no-popover.d.ts +4 -0
  187. package/components/overlay/overlay-popover.d.ts +4 -0
  188. package/components/overlay/overlay-stack.d.ts +44 -0
  189. package/components/overlay/overlay-timer.d.ts +21 -0
  190. package/components/overlay/overlay-trigger-directive.d.ts +26 -0
  191. package/components/overlay/overlay-trigger.d.ts +53 -0
  192. package/components/overlay/overlay-types.d.ts +50 -0
  193. package/components/overlay/overlay.d.ts +464 -0
  194. package/components/overlay/placement-controller.d.ts +157 -0
  195. package/components/overlay/slottable-request-directive.d.ts +17 -0
  196. package/components/overlay/slottable-request-event.d.ts +12 -0
  197. package/components/overlay/strategies.d.ts +8 -0
  198. package/components/overlay/virtual-trigger.d.ts +7 -0
  199. package/components/overlay-C2Cck0Az.js +2712 -0
  200. package/components/overlay-dn6Xe_vz.cjs +47 -0
  201. package/components/pending-state--XOfTjzE.js +61 -0
  202. package/components/pending-state-BeJ7iP-O.cjs +26 -0
  203. package/components/picker/desktop-controller.d.ts +7 -0
  204. package/components/picker/index.cjs +18 -0
  205. package/components/picker/index.d.ts +7 -0
  206. package/components/picker/index.js +32 -0
  207. package/components/picker/interaction-controller.d.ts +43 -0
  208. package/components/picker/mobile-controller.d.ts +9 -0
  209. package/components/picker/picker.d.ts +154 -0
  210. package/components/picker/strategies.d.ts +6 -0
  211. package/components/picker-8cOc-jjh.cjs +127 -0
  212. package/components/picker-BZAWrSDk.js +655 -0
  213. package/components/platform-CQzYNWKq.cjs +18 -0
  214. package/components/platform-DQYMG7JI.js +54 -0
  215. package/components/popover/index.cjs +18 -0
  216. package/components/popover/index.d.ts +7 -0
  217. package/components/popover/index.js +29 -0
  218. package/components/popover/popover.d.ts +29 -0
  219. package/components/popover-CCzs4VH8.cjs +30 -0
  220. package/components/popover-D0EliN0L.js +67 -0
  221. package/components/progress-circle/index.cjs +18 -0
  222. package/components/progress-circle/index.d.ts +7 -0
  223. package/components/progress-circle/index.js +29 -0
  224. package/components/progress-circle/progress-circle.d.ts +35 -0
  225. package/components/progress-circle-DYSSkjlY.cjs +33 -0
  226. package/components/progress-circle-_-9sAlMM.js +97 -0
  227. package/components/query-BL-TJj7K.cjs +22 -0
  228. package/components/query-D_KR_GUc.js +51 -0
  229. package/components/query-assigned-elements-DjfhL1cl.js +36 -0
  230. package/components/query-assigned-elements-DsKsfk7G.cjs +22 -0
  231. package/components/query-assigned-nodes-BcKWmGzy.cjs +22 -0
  232. package/components/query-assigned-nodes-C76XVPWY.js +36 -0
  233. package/components/radio/index.cjs +22 -0
  234. package/components/radio/index.d.ts +10 -0
  235. package/components/radio/index.js +191 -0
  236. package/components/radio/radio-group.d.ts +27 -0
  237. package/components/radio/radio.d.ts +39 -0
  238. package/components/random-id-ByCz1xaq.js +26 -0
  239. package/components/random-id-CqvckpWe.cjs +18 -0
  240. package/components/roving-tabindex-By_fCy_e.cjs +18 -0
  241. package/components/roving-tabindex-DOg4z6ZU.js +66 -0
  242. package/components/search/index.cjs +45 -0
  243. package/components/search/index.d.ts +7 -0
  244. package/components/search/index.js +131 -0
  245. package/components/search/search.d.ts +27 -0
  246. package/components/sized-mixin-BAI6NiE2.cjs +18 -0
  247. package/components/sized-mixin-DcJTTohI.js +63 -0
  248. package/components/slider/index.cjs +18 -0
  249. package/components/slider/index.d.ts +7 -0
  250. package/components/slider/index.js +1158 -0
  251. package/components/slider/slider.d.ts +24 -0
  252. package/components/slottable-request-event-BfUUt1Mh.cjs +18 -0
  253. package/components/slottable-request-event-DggLA4Rx.js +31 -0
  254. package/components/state-D8vot9IB.js +29 -0
  255. package/components/state-WWHLNMRG.cjs +22 -0
  256. package/components/streaming-listener-BbmNyKWO.js +125 -0
  257. package/components/streaming-listener-C2A7ZJZP.cjs +18 -0
  258. package/components/style-map-CoBJRbvu.js +53 -0
  259. package/components/style-map-DH0jkl7s.cjs +22 -0
  260. package/components/swatch/index.cjs +49 -0
  261. package/components/swatch/index.d.ts +10 -0
  262. package/components/swatch/index.js +342 -0
  263. package/components/swatch/swatch-group.d.ts +41 -0
  264. package/components/swatch/swatch.d.ts +40 -0
  265. package/components/switch/index.cjs +22 -0
  266. package/components/switch/index.d.ts +7 -0
  267. package/components/switch/index.js +73 -0
  268. package/components/switch/switch.d.ts +27 -0
  269. package/components/tags/index.cjs +32 -0
  270. package/components/tags/index.d.ts +10 -0
  271. package/components/tags/index.js +173 -0
  272. package/components/tags/tag.d.ts +29 -0
  273. package/components/tags/tags.d.ts +28 -0
  274. package/components/text-field/help-text-manager.d.ts +19 -0
  275. package/components/text-field/help-text.d.ts +20 -0
  276. package/components/text-field/index.cjs +21 -0
  277. package/components/text-field/index.d.ts +14 -0
  278. package/components/text-field/index.js +62 -0
  279. package/components/text-field/manage-help-text.d.ts +13 -0
  280. package/components/text-field/text-field.d.ts +142 -0
  281. package/components/text-field-05QNK_Lj.js +313 -0
  282. package/components/text-field-BU7yxiOR.cjs +85 -0
  283. package/components/toast/index.cjs +51 -0
  284. package/components/toast/index.d.ts +7 -0
  285. package/components/toast/index.js +153 -0
  286. package/components/toast/toast.d.ts +77 -0
  287. package/components/tooltip/index.cjs +45 -0
  288. package/components/tooltip/index.d.ts +8 -0
  289. package/components/tooltip/index.js +220 -0
  290. package/components/tooltip/tooltip-directive.d.ts +5 -0
  291. package/components/tooltip/tooltip.d.ts +55 -0
  292. package/components/unit-input/index.cjs +43 -0
  293. package/components/unit-input/index.d.ts +7 -0
  294. package/components/unit-input/index.js +183 -0
  295. package/components/unit-input/unit-input.d.ts +33 -0
  296. package/components/when-CDK1Tt5Y.js +28 -0
  297. package/components/when-CDZyJPvd.cjs +22 -0
  298. package/index.d.ts +39 -0
  299. package/package.json +139 -101
  300. package/utils/base.d.ts +16 -0
  301. package/utils/condition-attribute-with-id.d.ts +2 -0
  302. package/utils/first-focusable-in.d.ts +3 -0
  303. package/utils/focus-visible.d.ts +29 -0
  304. package/utils/focusable-selectors.d.ts +2 -0
  305. package/utils/focusable.d.ts +58 -0
  306. package/utils/get-css-variable.d.ts +1 -0
  307. package/utils/get-label-from-slot.d.ts +1 -0
  308. package/utils/like-anchor.d.ts +23 -0
  309. package/utils/observe-slot-presence.d.ts +12 -0
  310. package/utils/observe-slot-text.d.ts +11 -0
  311. package/utils/platform.d.ts +10 -0
  312. package/utils/random-id.d.ts +1 -0
  313. package/utils/reactive-controllers/color.d.ts +54 -0
  314. package/utils/reactive-controllers/dependency-manger.d.ts +26 -0
  315. package/utils/reactive-controllers/element-resolution.d.ts +23 -0
  316. package/utils/reactive-controllers/focus-group.d.ts +62 -0
  317. package/utils/reactive-controllers/language-resolution.d.ts +11 -0
  318. package/utils/reactive-controllers/match-media.d.ts +13 -0
  319. package/utils/reactive-controllers/pending-state.d.ts +41 -0
  320. package/utils/reactive-controllers/roving-tabindex.d.ts +19 -0
  321. package/utils/reparent-child.d.ts +4 -0
  322. package/utils/sized-mixin.d.ts +17 -0
  323. package/utils/streaming-listener.d.ts +48 -0
@@ -0,0 +1,203 @@
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 { luzmoIcon as p, luzmoAngleUp as z, luzmoAngleDown as f } from "@luzmo/icons";
19
+ import { L as v, r as b, x as s, n as h } from "../base-CxUap9HL.js";
20
+ import { r as x } from "../state-D8vot9IB.js";
21
+ import { e as n } from "../query-D_KR_GUc.js";
22
+ import { S as w } from "../sized-mixin-DcJTTohI.js";
23
+ import "../color-area/index.js";
24
+ import "../color-field/index.js";
25
+ import "../color-handle/index.js";
26
+ import "../color-slider/index.js";
27
+ import "../divider/index.js";
28
+ import "../popover/index.js";
29
+ import "../swatch/index.js";
30
+ import { T as a } from "../index-C1chwzNp.js";
31
+ const g = () => {
32
+ if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
33
+ const i = document.createElement("style");
34
+ i.setAttribute("data-luzmo-vars", ""), i.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-color-disabled);--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-color-negative: #ca221c;--luzmo-color-negative-hover: #b3241f;--luzmo-color-negative-down: #9f231f;--luzmo-color-negative-focus: #b3241f;--luzmo-color-negative-rgb: 202, 34, 28;--luzmo-color-positive: rgb(20, 150, 101);--luzmo-color-positive-hover: rgb(17, 128, 86);--luzmo-color-positive-down: rgb(16, 105, 71);--luzmo-color-positive-focus: rgb(17, 128, 86);--luzmo-color-positive-rgb: 20, 150, 101;--luzmo-color-selected: rgb(110, 110, 110);--luzmo-color-selected-hover: rgb(70, 70, 70);--luzmo-color-selected-down: rgb(40, 40, 40);--luzmo-color-selected-focus: rgb(70, 70, 70);--luzmo-color-selected-hard: #1e1e1e;--luzmo-color-selected-hard-hover: rgb(0, 0, 0);--luzmo-color-selected-hard-down: rgb(0, 0, 0);--luzmo-color-selected-hard-focus: rgb(0, 0, 0);--luzmo-color-informative: #1a77e9;--luzmo-color-informative-rgb: 26, 119, 233;--luzmo-color-disabled: #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(i);
35
+ }
36
+ };
37
+ g();
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) => {
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;
43
+ };
44
+ const u = class u extends w(v) {
45
+ constructor() {
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
+ }
48
+ setColor(o) {
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 }));
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 }));
57
+ }
58
+ handleHueSliderChange(o) {
59
+ o.stopPropagation(), o.preventDefault();
60
+ const r = new a(this._rgbColor).toHsl();
61
+ r.h = this.hueSliderElement.value;
62
+ const e = new a(r);
63
+ 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 }));
64
+ }
65
+ handleOpacitySliderChange(o) {
66
+ o.stopPropagation(), o.preventDefault(), this._alpha = this.opacitySliderElement.sliderHandlePosition / 100;
67
+ const r = new a(this._rgbColor).setAlpha(this._alpha);
68
+ 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 }));
69
+ }
70
+ handleFieldChange(o) {
71
+ if (o.stopPropagation(), o.preventDefault(), this.colorFieldElement.checkValidity()) {
72
+ const r = new a(this.colorFieldElement.value);
73
+ 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 }));
74
+ }
75
+ }
76
+ formatTextField(o) {
77
+ return this._format === "hsl" ? o.toHslString() : this._format === "hex" ? this.noAlphaChannel ? o.toHexString() : o.toHex8String() : (this._format === "name" && (this._format = "rgb"), o.toRgbString());
78
+ }
79
+ cycleFormat() {
80
+ const o = ["rgb", "hsl", "hex"];
81
+ this._format = o[(o.indexOf(this._format) + 1) % o.length];
82
+ const r = new a(this.color), e = this.formatTextField(r);
83
+ this.colorFieldElement.value = e;
84
+ }
85
+ updated(o) {
86
+ if (o.has("color") && this.color !== this._previousColor) {
87
+ this._previousColor = this.color;
88
+ const r = new a(this.color);
89
+ 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";
90
+ }
91
+ o.has("noAlphaChannel") && !this.noAlphaChannel && (this.opacitySliderElement.color = this._rgbaColor);
92
+ }
93
+ renderOpacitySlider() {
94
+ return s`
95
+ <luzmo-color-slider
96
+ id="luzmo-opacity-slider"
97
+ mode="opacity"
98
+ @input=${this.handleOpacitySliderChange}
99
+ >
100
+ </luzmo-color-slider>
101
+ `;
102
+ }
103
+ render() {
104
+ var o;
105
+ return s`
106
+ <div>
107
+ <luzmo-color-area
108
+ .size=${this.size}
109
+ @input=${this.handleAreaChange}
110
+ ></luzmo-color-area>
111
+ <div class="hue-opacity-text-swatches-container">
112
+ <div class="swatch-sliders-container">
113
+ <div class="swatch-example-container">
114
+ <luzmo-swatch
115
+ rounding="full"
116
+ .size=${this.noAlphaChannel && ["s", "m"].includes(this.size) ? "s" : "l"}
117
+ readonly
118
+ ></luzmo-swatch>
119
+ </div>
120
+ <div class="slider-container" style="flex-grow: 1;">
121
+ <luzmo-color-slider
122
+ id="luzmo-hue-slider"
123
+ @input=${this.handleHueSliderChange}
124
+ >
125
+ </luzmo-color-slider>
126
+ ${this.noAlphaChannel ? "" : this.renderOpacitySlider()}
127
+ </div>
128
+ </div>
129
+ <div class="field-container">
130
+ <luzmo-color-field
131
+ .size=${this.size}
132
+ @input=${this.handleFieldChange}
133
+ >
134
+ </luzmo-color-field>
135
+ <button
136
+ class="format-container"
137
+ aria-label="Color format"
138
+ @click=${this.cycleFormat}
139
+ tabindex="0"
140
+ >
141
+ <div class="format-label">${this._format}</div>
142
+ <div class="change-format-icon">
143
+ <div class="angle-icon">${p(z)}</div>
144
+ <div class="angle-icon">${p(f)}</div>
145
+ </div>
146
+ </button>
147
+ </div>
148
+ ${((o = this.swatches) == null ? void 0 : o.length) > 0 ? s`
149
+ <luzmo-divider></luzmo-divider>
150
+ <div class="swatches-container">
151
+ ${this.swatches.map(
152
+ (r) => s`
153
+ <div class="swatch-choice">
154
+ <luzmo-swatch
155
+ @click=${this.setColor}
156
+ .color=${r}
157
+ .size=${this.size}
158
+ readonly
159
+ >
160
+ </luzmo-swatch>
161
+ </div>
162
+ `
163
+ )}
164
+ </div>
165
+ ` : ""}
166
+ </div>
167
+ </div>
168
+ `;
169
+ }
170
+ };
171
+ u.styles = b(C);
172
+ let l = u;
173
+ t([
174
+ h({ type: String, reflect: !0 })
175
+ ], l.prototype, "color");
176
+ t([
177
+ h({ type: Boolean, reflect: !0, attribute: "no-alpha-channel" })
178
+ ], l.prototype, "noAlphaChannel");
179
+ t([
180
+ h({ type: Array, reflect: !0 })
181
+ ], l.prototype, "swatches");
182
+ t([
183
+ n("luzmo-color-area")
184
+ ], l.prototype, "areaElement");
185
+ t([
186
+ n("#luzmo-hue-slider")
187
+ ], l.prototype, "hueSliderElement");
188
+ t([
189
+ n("#luzmo-opacity-slider")
190
+ ], l.prototype, "opacitySliderElement");
191
+ t([
192
+ n("luzmo-color-field")
193
+ ], l.prototype, "colorFieldElement");
194
+ t([
195
+ n("luzmo-swatch")
196
+ ], l.prototype, "swatchElement");
197
+ t([
198
+ x()
199
+ ], l.prototype, "_format");
200
+ customElements.get("luzmo-color-menu") || customElements.define("luzmo-color-menu", l);
201
+ export {
202
+ l as LuzmoColorMenu
203
+ };
@@ -0,0 +1,39 @@
1
+ import { PropertyValues, TemplateResult } from 'lit';
2
+ import { LuzmoElement } from '../../utils/base';
3
+ import { ColorValue } from '../../utils/reactive-controllers/color';
4
+ import '../color-menu';
5
+ import '../overlay';
6
+ import '../popover';
7
+ import '../swatch';
8
+ import { SwatchRounding, SwatchShape } from './../swatch/swatch';
9
+ declare const LuzmoColorPicker_base: typeof LuzmoElement & {
10
+ new (...args: any[]): import("../../utils/sized-mixin").SizedElementInterface;
11
+ prototype: import("../../utils/sized-mixin").SizedElementInterface;
12
+ };
13
+ /**
14
+ * @element luzmo-color-slider
15
+ * @fires input - The value of the Color Slider has changed.
16
+ * @fires change - An alteration to the value of the Color Slider has been committed by the user.
17
+ */
18
+ export declare class LuzmoColorPicker extends LuzmoColorPicker_base {
19
+ static styles: import("lit").CSSResult;
20
+ color?: ColorValue;
21
+ open: boolean;
22
+ disabled: boolean;
23
+ placement: string;
24
+ rounding?: SwatchRounding;
25
+ shape: SwatchShape;
26
+ swatches: string[];
27
+ noAlphaChannel: boolean;
28
+ private menuElement;
29
+ private overlayElement;
30
+ private _renderMenu;
31
+ private overlayCloseEvent;
32
+ private overlayOpenEvent;
33
+ private handleColorChange;
34
+ protected firstUpdated(): void;
35
+ protected updated(changedProperties: PropertyValues): void;
36
+ private renderColorMenu;
37
+ protected render(): TemplateResult;
38
+ }
39
+ export {};
@@ -0,0 +1,48 @@
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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../base-rtxi7uaR.cjs"),c=require("../state-WWHLNMRG.cjs"),u=require("../query-BL-TJj7K.cjs"),h=require("../sized-mixin-BAI6NiE2.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(){this.color=this.menuElement.color,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`
19
+ <luzmo-color-menu
20
+ .size=${this.size}
21
+ .color=${this.color}
22
+ .noAlphaChannel=${this.noAlphaChannel}
23
+ .swatches=${this.swatches}
24
+ @change=${this.handleColorChange}
25
+ ></luzmo-color-menu>
26
+ `}render(){return t.x`
27
+ <luzmo-swatch
28
+ id="trigger"
29
+ .shape=${this.shape}
30
+ .rounding=${this.rounding}
31
+ .size=${this.size}
32
+ .color=${this.color}
33
+ .selected=${this.open&&!this.disabled}
34
+ ?disabled=${this.disabled}
35
+ @luzmo-closed=${this.overlayCloseEvent}
36
+ @luzmo-opened=${this.overlayOpenEvent}
37
+ ></luzmo-swatch>
38
+ <luzmo-overlay
39
+ trigger=${this.disabled?"":"trigger@click"}
40
+ type="auto"
41
+ .placement=${this.placement}
42
+ type="page"
43
+ >
44
+ <luzmo-popover style="position:relative">
45
+ ${this._renderMenu?this.renderColorMenu():t.x``}
46
+ </luzmo-popover>
47
+ </luzmo-overlay>
48
+ `}};s.styles=t.r(m);let e=s;o([t.n({type:String,reflect:!0})],e.prototype,"color");o([t.n({type:Boolean,reflect:!0})],e.prototype,"open");o([t.n({type:Boolean,reflect:!0})],e.prototype,"disabled");o([t.n({type: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;
@@ -0,0 +1,7 @@
1
+ import { LuzmoColorPicker } from './color-picker';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'luzmo-color-picker': LuzmoColorPicker;
5
+ }
6
+ }
7
+ export { LuzmoColorPicker } from './color-picker';
@@ -0,0 +1,141 @@
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 { L as z, r as d, x as u, n as r } from "../base-CxUap9HL.js";
19
+ import { r as h } from "../state-D8vot9IB.js";
20
+ import { e as c } from "../query-D_KR_GUc.js";
21
+ import { S as g } from "../sized-mixin-DcJTTohI.js";
22
+ import "../color-menu/index.js";
23
+ import "../overlay/index.js";
24
+ import { r as f } from "../slottable-request-event-DggLA4Rx.js";
25
+ import "../popover/index.js";
26
+ import "../swatch/index.js";
27
+ const p = () => {
28
+ if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
29
+ const l = document.createElement("style");
30
+ l.setAttribute("data-luzmo-vars", ""), l.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-color-disabled);--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-color-negative: #ca221c;--luzmo-color-negative-hover: #b3241f;--luzmo-color-negative-down: #9f231f;--luzmo-color-negative-focus: #b3241f;--luzmo-color-negative-rgb: 202, 34, 28;--luzmo-color-positive: rgb(20, 150, 101);--luzmo-color-positive-hover: rgb(17, 128, 86);--luzmo-color-positive-down: rgb(16, 105, 71);--luzmo-color-positive-focus: rgb(17, 128, 86);--luzmo-color-positive-rgb: 20, 150, 101;--luzmo-color-selected: rgb(110, 110, 110);--luzmo-color-selected-hover: rgb(70, 70, 70);--luzmo-color-selected-down: rgb(40, 40, 40);--luzmo-color-selected-focus: rgb(70, 70, 70);--luzmo-color-selected-hard: #1e1e1e;--luzmo-color-selected-hard-hover: rgb(0, 0, 0);--luzmo-color-selected-hard-down: rgb(0, 0, 0);--luzmo-color-selected-hard-focus: rgb(0, 0, 0);--luzmo-color-informative: #1a77e9;--luzmo-color-informative-rgb: 26, 119, 233;--luzmo-color-disabled: #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(l);
31
+ }
32
+ };
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 = (l, t, s, x) => {
36
+ for (var n = void 0, i = l.length - 1, m; i >= 0; i--)
37
+ (m = l[i]) && (n = m(t, s, n) || n);
38
+ return n && v(t, s, n), n;
39
+ };
40
+ const a = class a extends g(z) {
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;
43
+ }
44
+ overlayCloseEvent() {
45
+ this.open = !1;
46
+ }
47
+ overlayOpenEvent() {
48
+ this.open = !0;
49
+ }
50
+ handleColorChange() {
51
+ this.color = this.menuElement.color, this.dispatchEvent(
52
+ new Event("change", {
53
+ bubbles: !0,
54
+ composed: !0
55
+ })
56
+ );
57
+ }
58
+ firstUpdated() {
59
+ this.overlayElement.addEventListener("slottable-request", (t) => {
60
+ this._renderMenu = t.data !== f;
61
+ });
62
+ }
63
+ updated(t) {
64
+ t.has("open") && this.open === !0 && (this._renderMenu = !0);
65
+ }
66
+ renderColorMenu() {
67
+ return u`
68
+ <luzmo-color-menu
69
+ .size=${this.size}
70
+ .color=${this.color}
71
+ .noAlphaChannel=${this.noAlphaChannel}
72
+ .swatches=${this.swatches}
73
+ @change=${this.handleColorChange}
74
+ ></luzmo-color-menu>
75
+ `;
76
+ }
77
+ render() {
78
+ return u`
79
+ <luzmo-swatch
80
+ id="trigger"
81
+ .shape=${this.shape}
82
+ .rounding=${this.rounding}
83
+ .size=${this.size}
84
+ .color=${this.color}
85
+ .selected=${this.open && !this.disabled}
86
+ ?disabled=${this.disabled}
87
+ @luzmo-closed=${this.overlayCloseEvent}
88
+ @luzmo-opened=${this.overlayOpenEvent}
89
+ ></luzmo-swatch>
90
+ <luzmo-overlay
91
+ trigger=${this.disabled ? "" : "trigger@click"}
92
+ type="auto"
93
+ .placement=${this.placement}
94
+ type="page"
95
+ >
96
+ <luzmo-popover style="position:relative">
97
+ ${this._renderMenu ? this.renderColorMenu() : u``}
98
+ </luzmo-popover>
99
+ </luzmo-overlay>
100
+ `;
101
+ }
102
+ };
103
+ a.styles = d(b);
104
+ let o = a;
105
+ e([
106
+ r({ type: String, reflect: !0 })
107
+ ], o.prototype, "color");
108
+ e([
109
+ r({ type: Boolean, reflect: !0 })
110
+ ], o.prototype, "open");
111
+ e([
112
+ r({ type: Boolean, reflect: !0 })
113
+ ], o.prototype, "disabled");
114
+ e([
115
+ r({ type: String, reflect: !0 })
116
+ ], o.prototype, "placement");
117
+ e([
118
+ r({ type: String, reflect: !0 })
119
+ ], o.prototype, "rounding");
120
+ e([
121
+ r({ type: String, reflect: !0 })
122
+ ], o.prototype, "shape");
123
+ e([
124
+ r({ type: Array, reflect: !0 })
125
+ ], o.prototype, "swatches");
126
+ e([
127
+ r({ type: Boolean, reflect: !0, attribute: "no-alpha-channel" })
128
+ ], o.prototype, "noAlphaChannel");
129
+ e([
130
+ c("luzmo-color-menu")
131
+ ], o.prototype, "menuElement");
132
+ e([
133
+ c("luzmo-overlay")
134
+ ], o.prototype, "overlayElement");
135
+ e([
136
+ h()
137
+ ], o.prototype, "_renderMenu");
138
+ customElements.get("luzmo-color-picker") || customElements.define("luzmo-color-picker", o);
139
+ export {
140
+ o as LuzmoColorPicker
141
+ };
@@ -0,0 +1,57 @@
1
+ import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
2
+ import './../color-handle';
3
+ import { Focusable } from '../../utils/focusable';
4
+ import { ColorValue } from '../../utils/reactive-controllers/color';
5
+ /**
6
+ * @element luzmo-color-slider
7
+ * @fires input - The value of the Color Slider has changed.
8
+ * @fires change - An alteration to the value of the Color Slider has been committed by the user.
9
+ */
10
+ export declare class LuzmoColorSlider extends Focusable {
11
+ static get styles(): CSSResultArray;
12
+ dir: 'ltr' | 'rtl';
13
+ mode: 'hue' | 'opacity';
14
+ disabled: boolean;
15
+ focused: boolean;
16
+ private handle;
17
+ label: string;
18
+ vertical: boolean;
19
+ private languageResolver;
20
+ private colorController;
21
+ get value(): number;
22
+ set value(value: number);
23
+ sliderHandlePosition: number;
24
+ get color(): ColorValue;
25
+ set color(color: ColorValue);
26
+ step: number;
27
+ isLTR: boolean;
28
+ private get altered();
29
+ private set altered(value);
30
+ private _altered;
31
+ input: HTMLInputElement;
32
+ get focusElement(): HTMLInputElement;
33
+ private handleKeydown;
34
+ private handleInput;
35
+ private handleChange;
36
+ focus(focusOptions?: FocusOptions): void;
37
+ private forwardFocus;
38
+ private handleFocus;
39
+ private handleBlur;
40
+ private boundingClientRect;
41
+ private _pointerDown;
42
+ private handlePointerdown;
43
+ private handlePointermove;
44
+ private handlePointerup;
45
+ /**
46
+ * Returns the value under the cursor
47
+ * @param: PointerEvent on slider
48
+ * @return: Slider value that correlates to the position under the pointer
49
+ */
50
+ private calculateHandlePosition;
51
+ private handleGradientPointerdown;
52
+ private get handlePositionStyles();
53
+ private get getColorSliderStyle();
54
+ protected render(): TemplateResult;
55
+ protected firstUpdated(changed: PropertyValues): void;
56
+ protected updated(changedProperties: PropertyValues): void;
57
+ }
@@ -0,0 +1,57 @@
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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../base-rtxi7uaR.cjs"),p=require("../query-BL-TJj7K.cjs"),d=require("../if-defined-C-8FyBSN.cjs"),b=require("../style-map-DH0jkl7s.cjs");require("../color-handle/index.cjs");const m=require("../focusable-DyyBr-J-.cjs"),g=require("../color-DphK4hwx.cjs"),u=require("../streaming-listener-C2A7ZJZP.cjs"),h=require("../index-DCKCHDTt.cjs"),v='.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 f=Object.defineProperty,y=Object.getOwnPropertyDescriptor,l=(c,e,t,o)=>{for(var s=o>1?void 0:o?y(e,t):e,a=c.length-1,n;a>=0;a--)(n=c[a])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&f(e,t,s),s};class r extends m.Focusable{constructor(){super(...arguments),this.disabled=!1,this.focused=!1,this.label="hue",this.vertical=!1,this.languageResolver=new u.LanguageResolutionController(this),this.colorController=new g.ColorController(this,{applyColorToState:()=>{if(this.mode==="opacity"){const e=new h.TinyColor(this.colorController.color);this.sliderHandlePosition=100*e.getAlpha()}else this.sliderHandlePosition=100*(this.colorController.hue/360)},extractColorFromState:e=>this.mode==="opacity"?{...e.getColor("hsl"),a:this.value}:{...e.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[i.r(v)]}get value(){return this.mode==="opacity"?this.colorController.opacity:this.colorController.hue}set value(e){this.mode==="opacity"?this.colorController.opacity=e:this.colorController.hue=e}get color(){return this.colorController.color}set color(e){this.colorController.color=e}get altered(){return this._altered}set altered(e){this._altered=e,this.step=Math.max(1,this.altered*10)}get focusElement(){return this.input}handleKeydown(e){const{key:t}=e;this.focused=!0,this.altered=[e.shiftKey,e.ctrlKey,e.altKey].filter(n=>!!n).length;let o=0;switch(t){case"ArrowUp":{o=this.step;break}case"ArrowDown":{o=-this.step;break}case"ArrowLeft":{o=this.step*(this.isLTR?-1:1);break}case"ArrowRight":{o=this.step*(this.isLTR?1:-1);break}default:return}e.preventDefault();const a=100/(this.mode==="opacity"?100:360);this.sliderHandlePosition=Math.min(100,Math.max(0,this.sliderHandlePosition+o*a)),this.value=this.mode==="opacity"?Math.min(1,Math.max(0,this.value+o/100)):Math.min(360,Math.max(0,this.value+o)),this.colorController.applyColorFromState(),o!==0&&(this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}handleInput(e){const{valueAsNumber:t}=e.target;this.value=t,this.sliderHandlePosition=100*(this.mode==="opacity"?this.value:this.value/360),this.colorController.applyColorFromState()}handleChange(e){this.handleInput(e),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}focus(e={}){super.focus(e),this.forwardFocus()}forwardFocus(){this.input.focus()}handleFocus(){this.focused=!0}handleBlur(){this._pointerDown||(this.altered=0,this.focused=!1)}handlePointerdown(e){if(e.button!==0){e.preventDefault();return}this._pointerDown=!0,this.colorController.savePreviousColor(),this.boundingClientRect=this.getBoundingClientRect(),e.target.setPointerCapture(e.pointerId),e.pointerType==="mouse"&&(this.focused=!0)}handlePointermove(e){this.sliderHandlePosition=this.calculateHandlePosition(e),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(e){this._pointerDown=!1,e.target.releasePointerCapture(e.pointerId),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0,cancelable:!0}))||this.colorController.restorePreviousColor(),this.focus(),e.pointerType==="mouse"&&(this.focused=!1)}calculateHandlePosition(e){if(!this.boundingClientRect)return this.sliderHandlePosition;const t=this.boundingClientRect,o=this.vertical?t.top:t.left,s=this.vertical?e.clientY:e.clientX,a=this.vertical?t.height:t.width,n=Math.max(0,Math.min(1,(s-o)/a));return this.vertical||!this.isLTR?100-100*n:100*n}handleGradientPointerdown(e){e.button===0&&(e.stopPropagation(),e.preventDefault(),this.handle.dispatchEvent(new PointerEvent("pointerdown",e)),this.handlePointermove(e))}get handlePositionStyles(){return`${this.vertical?"inset-block-end":"inset-inline-start"}: ${this.sliderHandlePosition}%`}get getColorSliderStyle(){const e=this.vertical?"top":"right";if(this.mode==="opacity"){const t=new h.TinyColor(this.colorController.color).setAlpha(1).toRgbString();return{background:`linear-gradient(to ${e}, transparent, ${t})`}}return{background:`linear-gradient(to ${e}, var(--luzmo-color-slider-gradient, var(--luzmo-color-slider-gradient-fallback)))`}}render(){return i.x`
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=${b.o(this.getColorSliderStyle)}
28
+ >
29
+ <slot name="gradient"></slot>
30
+ </div>
31
+ </div>
32
+ <luzmo-color-handle
33
+ tabindex=${d.o(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
+ ${u.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=${d.o(this.vertical?"vertical":void 0)}
48
+ orient=${d.o(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(e){super.firstUpdated(e),this.boundingClientRect=this.getBoundingClientRect(),this.addEventListener("focus",this.handleFocus),this.addEventListener("blur",this.handleBlur)}updated(e){e.has("mode")&&(this.handle.style.insetInlineStart="",this.handle.style.insetBlockEnd="",this.mode==="opacity"&&(this.colorController.color=new h.TinyColor(this.colorController.color).toRgbString(),this.handle.style.insetInlineStart=100*this.colorController.opacity+"%"))}}l([i.n({type:String,reflect:!0})],r.prototype,"dir",2);l([i.n({type:String,reflect:!0})],r.prototype,"mode",2);l([i.n({type:Boolean,reflect:!0})],r.prototype,"disabled",2);l([i.n({type:Boolean,reflect:!0})],r.prototype,"focused",2);l([p.e(".handle")],r.prototype,"handle",2);l([i.n({type:String})],r.prototype,"label",2);l([i.n({type:Boolean,reflect:!0})],r.prototype,"vertical",2);l([i.n({type:Number})],r.prototype,"value",1);l([i.n({type:Number,reflect:!0})],r.prototype,"sliderHandlePosition",2);l([i.n({type:String})],r.prototype,"color",1);l([i.n({type:Number})],r.prototype,"step",2);l([i.n({type:Boolean,attribute:"is-ltr"})],r.prototype,"isLTR",2);l([p.e("input")],r.prototype,"input",2);customElements.get("luzmo-color-slider")||customElements.define("luzmo-color-slider",r);exports.LuzmoColorSlider=r;
@@ -0,0 +1,7 @@
1
+ import { LuzmoColorSlider } from './color-slider';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'luzmo-color-slider': LuzmoColorSlider;
5
+ }
6
+ }
7
+ export { LuzmoColorSlider } from './color-slider';