@luzmo/lucero 1.0.1-alpha.18 → 1.0.1-alpha.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/components/NumberFormatter-DewVDY5w.cjs +18 -0
  2. package/components/NumberFormatter-DgOUVrge.js +136 -0
  3. package/components/NumberParser-Dik4a0h-.cjs +18 -0
  4. package/components/NumberParser-ci9J5EKv.js +173 -0
  5. package/components/accordion/index.cjs +6 -183
  6. package/components/accordion/index.js +88 -136
  7. package/components/action-bar/index.cjs +4 -85
  8. package/components/action-bar/index.js +50 -72
  9. package/components/action-button/index.cjs +3 -205
  10. package/components/action-button/index.js +93 -167
  11. package/components/action-group/index.cjs +1 -7
  12. package/components/action-group/index.js +8 -12
  13. package/components/action-group-C54IxNZk.cjs +20 -0
  14. package/components/action-group-C9dsPJg-.js +258 -0
  15. package/components/action-menu/index.cjs +11 -91
  16. package/components/action-menu/index.js +47 -66
  17. package/components/async-directive-BwIAw5tB.js +82 -0
  18. package/components/async-directive-DLz6JB0v.cjs +22 -0
  19. package/components/avatar/index.cjs +3 -63
  20. package/components/avatar/index.js +42 -54
  21. package/components/{focusable-selectors-D0t_5P7C.cjs → base-BjTwmyRF.cjs} +5 -16
  22. package/components/base-CFWO09N1.js +684 -0
  23. package/components/base-Cy0MQrPT.cjs +40 -0
  24. package/components/base-D76d76ww.js +26 -0
  25. package/components/button/index.cjs +2 -134
  26. package/components/button/index.js +72 -106
  27. package/components/button-base-B8bWcklV.js +144 -0
  28. package/components/button-base-tf95Lyl4.cjs +25 -0
  29. package/components/button-group/index.cjs +1 -45
  30. package/components/button-group/index.js +25 -37
  31. package/components/calendar/index.cjs +1 -632
  32. package/components/calendar/index.js +7 -637
  33. package/components/checkbox/index.cjs +4 -111
  34. package/components/checkbox/index.js +53 -98
  35. package/components/checkbox-mixin-BOTvuPEu.js +70 -0
  36. package/components/checkbox-mixin-BVPpXtsq.cjs +27 -0
  37. package/components/class-map-CGfNk3Ee.js +51 -0
  38. package/components/class-map-D-Y-hsN5.cjs +22 -0
  39. package/components/clear-button-CuPbWwZY.cjs +18 -0
  40. package/components/clear-button-DzZ5ulBW.js +53 -0
  41. package/components/close-button-BTo4yrFR.cjs +18 -0
  42. package/components/close-button-CuQdsez5.js +51 -0
  43. package/components/color-area/index.cjs +13 -440
  44. package/components/color-area/index.js +187 -322
  45. package/components/color-controller-B0uX6Zso.js +3230 -0
  46. package/components/color-controller-CoUL5f9K.cjs +18 -0
  47. package/components/color-field/index.cjs +2 -95
  48. package/components/color-field/index.js +41 -77
  49. package/components/color-handle/index.cjs +3 -64
  50. package/components/color-handle/index.js +37 -58
  51. package/components/color-loupe/index.cjs +1 -7
  52. package/components/color-loupe/index.js +8 -12
  53. package/components/color-loupe-CrM2DVY3.cjs +56 -0
  54. package/components/color-loupe-DmQe3SpP.js +81 -0
  55. package/components/color-menu/index.cjs +12 -217
  56. package/components/color-menu/index.js +93 -187
  57. package/components/color-palette/index.cjs +1 -89
  58. package/components/color-palette/index.js +51 -78
  59. package/components/color-palette-group/index.cjs +3 -259
  60. package/components/color-palette-group/index.js +105 -193
  61. package/components/color-picker/index.cjs +6 -114
  62. package/components/color-picker/index.js +72 -92
  63. package/components/color-slider/index.cjs +1 -585
  64. package/components/color-slider/index.js +7 -590
  65. package/components/condition-attribute-with-id-DrQYZzFS.cjs +18 -0
  66. package/components/condition-attribute-with-id-Dv4lSRbe.js +31 -0
  67. package/components/date-time-picker/index.cjs +31 -1357
  68. package/components/date-time-picker/index.js +637 -951
  69. package/components/{dependency-manger-XHpQjFgK.js → dependency-manger-CO-VPlqq.js} +14 -24
  70. package/components/dependency-manger-uthev62E.cjs +18 -0
  71. package/components/directive-C7oCP5Bh.cjs +22 -0
  72. package/components/directive-helpers-D4KMv2dC.js +62 -0
  73. package/components/directive-helpers-t-TVum7J.cjs +22 -0
  74. package/components/{slottable-request-event-CANixJnR.cjs → directive-oAbCiebi.js} +25 -14
  75. package/components/divider/index.cjs +1 -54
  76. package/components/divider/index.js +30 -49
  77. package/components/divider.module-DDvBo9zo.cjs +18 -0
  78. package/components/divider.module-DoQWQEIJ.js +21 -0
  79. package/components/element-resolution-BvRLGqIU.cjs +18 -0
  80. package/components/element-resolution-FCUT-wql.js +91 -0
  81. package/components/field-group/index.cjs +1 -7
  82. package/components/field-group/index.js +8 -12
  83. package/components/field-group-5WQMBOk4.cjs +23 -0
  84. package/components/field-group-D4B0IOdA.js +66 -0
  85. package/components/field-label/index.cjs +1 -7
  86. package/components/field-label/index.js +8 -12
  87. package/components/field-label-DxmPiC5p.js +106 -0
  88. package/components/field-label-Dz9kisdW.cjs +25 -0
  89. package/components/flow-D-0MTYCm.js +527 -0
  90. package/components/flow-DM3dNAKs.cjs +30 -0
  91. package/components/focus-group-DHeTq18L.js +218 -0
  92. package/components/focus-group-DnxZUBhQ.cjs +18 -0
  93. package/components/focus-visible-BvScGDCE.js +74 -0
  94. package/components/focus-visible-D4BXb5RB.cjs +18 -0
  95. package/components/focusable-B_KwfEec.cjs +18 -0
  96. package/components/focusable-C5JjRZmT.js +153 -0
  97. package/components/{focusable-selectors-IltOAOd9.js → focusable-selectors-B4YgbghQ.js} +4 -7
  98. package/components/focusable-selectors-BgFlyFcY.cjs +18 -0
  99. package/components/icon/index.cjs +1 -90
  100. package/components/icon/index.js +46 -74
  101. package/components/if-defined-DULpqYwi.js +27 -0
  102. package/components/if-defined-DaXWqfzc.cjs +22 -0
  103. package/components/index-CNK8wHXu.cjs +57 -0
  104. package/components/index-Cf6G4q52.js +1490 -0
  105. package/components/index-D3ICqC7S.js +1174 -0
  106. package/components/index-hqVbNKYy.cjs +113 -0
  107. package/components/index.cjs +1 -174
  108. package/components/index.js +172 -174
  109. package/components/infield-button/index.cjs +2 -46
  110. package/components/infield-button/index.js +30 -41
  111. package/components/label/index.cjs +1 -37
  112. package/components/label/index.js +24 -36
  113. package/components/{language-resolution-BSGJAWiQ.js → language-resolution-B-wjV5bb.js} +17 -21
  114. package/components/language-resolution-EUER43cg.cjs +18 -0
  115. package/components/like-anchor-Bu3pXbjT.cjs +32 -0
  116. package/components/like-anchor-DCFJN0LV.js +69 -0
  117. package/components/luzmo-icons-CiSek5iM.js +229 -0
  118. package/components/luzmo-icons-CtA-TJPd.cjs +29 -0
  119. package/components/manage-help-text-CHfMLzSa.js +92 -0
  120. package/components/manage-help-text-DNqdEkTA.cjs +30 -0
  121. package/components/menu/index.cjs +29 -1297
  122. package/components/menu/index.js +499 -954
  123. package/components/multi-language-field/index.cjs +2 -132
  124. package/components/multi-language-field/index.js +88 -118
  125. package/components/mutation-controller-DH7YOCyj.js +52 -0
  126. package/components/mutation-controller-DkOMCW-c.cjs +22 -0
  127. package/components/number-field/index.cjs +10 -613
  128. package/components/number-field/index.js +243 -442
  129. package/components/observe-slot-presence-CmVi0zTc.js +68 -0
  130. package/components/observe-slot-presence-bc9chhsi.cjs +18 -0
  131. package/components/observe-slot-text-C3moTjwy.js +87 -0
  132. package/components/observe-slot-text-D2VAEFSd.cjs +18 -0
  133. package/components/options/index.cjs +60 -693
  134. package/components/options/index.js +953 -519
  135. package/components/overlay/index.cjs +21 -367
  136. package/components/overlay/index.js +189 -273
  137. package/components/overlay-B3ajDLLq.cjs +47 -0
  138. package/components/overlay-CUKs69yr.js +2745 -0
  139. package/components/{pending-state-CXbe-Xul.js → pending-state-B2wWssTo.js} +13 -28
  140. package/components/pending-state-bJr-nEJl.cjs +26 -0
  141. package/components/picker/index.cjs +1 -9
  142. package/components/picker/index.js +11 -15
  143. package/components/picker-C0LvseZe.cjs +123 -0
  144. package/components/picker-W1qNmtsh.js +461 -0
  145. package/components/picker-button/index.cjs +4 -56
  146. package/components/picker-button/index.js +34 -45
  147. package/components/{condition-attribute-with-id-Cn815e9W.js → platform-BM-uMWpX.js} +49 -24
  148. package/components/platform-BiXhwqk3.cjs +18 -0
  149. package/components/popover/index.cjs +1 -7
  150. package/components/popover/index.js +8 -12
  151. package/components/popover-fwJeZHMQ.cjs +30 -0
  152. package/components/popover-iD8f5Jkp.js +67 -0
  153. package/components/progress-circle/index.cjs +1 -7
  154. package/components/progress-circle/index.js +8 -12
  155. package/components/progress-circle-DZxaMe8L.cjs +33 -0
  156. package/components/progress-circle-USIIU1up.js +97 -0
  157. package/components/query-BL-TJj7K.cjs +22 -0
  158. package/components/query-D_KR_GUc.js +51 -0
  159. package/components/query-assigned-elements-DjfhL1cl.js +36 -0
  160. package/components/query-assigned-elements-DsKsfk7G.cjs +22 -0
  161. package/components/query-assigned-nodes-BcKWmGzy.cjs +22 -0
  162. package/components/query-assigned-nodes-C76XVPWY.js +36 -0
  163. package/components/radio/index.cjs +2 -244
  164. package/components/radio/index.js +110 -192
  165. package/components/{random-id-BEc6QIUL.js → random-id-ByCz1xaq.js} +3 -3
  166. package/components/random-id-CqvckpWe.cjs +18 -0
  167. package/components/roving-tabindex-By_fCy_e.cjs +18 -0
  168. package/components/roving-tabindex-DOg4z6ZU.js +66 -0
  169. package/components/search/index.cjs +8 -115
  170. package/components/search/index.js +66 -96
  171. package/components/select/index.cjs +51 -720
  172. package/components/select/index.js +347 -563
  173. package/components/sized-mixin-CJbBHWRQ.js +63 -0
  174. package/components/sized-mixin-WPHH0a_D.cjs +18 -0
  175. package/components/slider/index.cjs +1 -119
  176. package/components/slider/index.js +1113 -100
  177. package/components/slottable-request-event-BfUUt1Mh.cjs +18 -0
  178. package/components/{slottable-request-event-D9WzrdWv.js → slottable-request-event-DggLA4Rx.js} +9 -12
  179. package/components/state-DwIwYPvt.js +29 -0
  180. package/components/state-vf0PJN3_.cjs +22 -0
  181. package/components/strategies-C6HsQpU2.cjs +18 -0
  182. package/components/strategies-CUMLHtQI.js +195 -0
  183. package/components/streaming-listener-BQ68fKMa.js +91 -0
  184. package/components/streaming-listener-DeGQYM-9.cjs +18 -0
  185. package/components/style-map-Bnhf_mVZ.js +53 -0
  186. package/components/style-map-DuMd5xlY.cjs +22 -0
  187. package/components/swatch/index.cjs +7 -436
  188. package/components/swatch/index.js +205 -350
  189. package/components/switch/index.cjs +2 -61
  190. package/components/switch/index.js +34 -51
  191. package/components/tabs/index.cjs +26 -693
  192. package/components/tabs/index.js +388 -521
  193. package/components/tags/index.cjs +4 -201
  194. package/components/tags/index.js +87 -152
  195. package/components/text-field/index.cjs +3 -49
  196. package/components/text-field/index.js +30 -44
  197. package/components/text-field-BkFPYo7S.cjs +85 -0
  198. package/components/text-field-C2n3rzCK.js +314 -0
  199. package/components/text-field.module-C2KVUJcX.js +21 -0
  200. package/components/text-field.module-DXhFA9G-.cjs +18 -0
  201. package/components/toast/index.cjs +12 -177
  202. package/components/toast/index.js +73 -145
  203. package/components/tooltip/index.cjs +6 -250
  204. package/components/tooltip/index.js +124 -177
  205. package/components/unit-input/index.cjs +8 -232
  206. package/components/unit-input/index.js +108 -201
  207. package/components/utils.cjs +1 -25
  208. package/components/utils.js +22 -22
  209. package/components/{random-id-BE6HA503.cjs → when-CDK1Tt5Y.js} +10 -7
  210. package/components/when-CDZyJPvd.cjs +22 -0
  211. package/package.json +1 -1
  212. package/components/action-group-DHp8RHDf.js +0 -392
  213. package/components/action-group-MPf19RPV.cjs +0 -391
  214. package/components/base-COw9n7UR.cjs +0 -119
  215. package/components/base-DmeVy0cq.js +0 -120
  216. package/components/button-base-7Ak55xFd.cjs +0 -206
  217. package/components/button-base-C3kf6BTK.js +0 -207
  218. package/components/checkbox-mixin-8cL-vfDy.js +0 -84
  219. package/components/checkbox-mixin-CE7dJj3J.cjs +0 -83
  220. package/components/clear-button-Co6oKSgl.js +0 -59
  221. package/components/clear-button-X_HDY2eH.cjs +0 -58
  222. package/components/close-button-DPBK6Kpu.cjs +0 -59
  223. package/components/close-button-Miw9ZjoJ.js +0 -60
  224. package/components/color-controller-BjDZaxhX.js +0 -491
  225. package/components/color-controller-C3c_vb2P.cjs +0 -490
  226. package/components/color-loupe-BQqNR8YD.cjs +0 -88
  227. package/components/color-loupe-B_DDFv8l.js +0 -89
  228. package/components/condition-attribute-with-id-DEc2Yjne.cjs +0 -43
  229. package/components/dependency-manger-CcIE1uvQ.cjs +0 -63
  230. package/components/divider.module-Cm5LcDRV.cjs +0 -20
  231. package/components/divider.module-DauH6k2_.js +0 -21
  232. package/components/element-resolution-DCsrhGZO.cjs +0 -112
  233. package/components/element-resolution-nMlmW4Jy.js +0 -113
  234. package/components/field-group-DNmY8W9v.cjs +0 -86
  235. package/components/field-group-DVdAWCQF.js +0 -87
  236. package/components/field-label-CKH9EXpR.cjs +0 -156
  237. package/components/field-label-Dpsecoc6.js +0 -157
  238. package/components/focus-group-BqDAk9Is.js +0 -337
  239. package/components/focus-group-DFzOlalL.cjs +0 -336
  240. package/components/focus-visible-B-B8-P9R.cjs +0 -104
  241. package/components/focus-visible-BUPRWlsh.js +0 -105
  242. package/components/focusable-BPrTcZPd.cjs +0 -262
  243. package/components/focusable-ChCLg1k4.js +0 -263
  244. package/components/language-resolution-iN9EImbb.cjs +0 -57
  245. package/components/like-anchor-D62faRNG.cjs +0 -79
  246. package/components/like-anchor-v3cJ9RWM.js +0 -80
  247. package/components/manage-help-text-BYx84zZR.cjs +0 -125
  248. package/components/manage-help-text-DOuMTGht.js +0 -126
  249. package/components/observe-slot-presence-9AwLGUQ_.cjs +0 -78
  250. package/components/observe-slot-presence-DcMdoumP.js +0 -79
  251. package/components/observe-slot-text-CSofZeeF.cjs +0 -104
  252. package/components/observe-slot-text-CjnkkBPn.js +0 -105
  253. package/components/overlay-CN8ISP1F.js +0 -2485
  254. package/components/overlay-LViy9VWM.cjs +0 -2484
  255. package/components/pending-state-e4RbXe9u.cjs +0 -75
  256. package/components/picker-DNde3awt.cjs +0 -672
  257. package/components/picker-PfUAF05y.js +0 -673
  258. package/components/platform-CxDar3Dn.cjs +0 -68
  259. package/components/platform-Cxn0WbyT.js +0 -69
  260. package/components/popover-BkbYhl3i.js +0 -74
  261. package/components/popover-BkgUf0kL.cjs +0 -74
  262. package/components/progress-circle-Hu_ivPHf.js +0 -133
  263. package/components/progress-circle-_Etqsj9f.cjs +0 -132
  264. package/components/roving-tabindex-AsmAh2In.cjs +0 -95
  265. package/components/roving-tabindex-DPF9NmrH.js +0 -96
  266. package/components/sized-mixin-DmkrNdWB.js +0 -80
  267. package/components/sized-mixin-UaTVa-AE.cjs +0 -79
  268. package/components/strategies-DlMlaSJR.cjs +0 -317
  269. package/components/strategies-DlPQoTFE.js +0 -318
  270. package/components/streaming-listener-D4sHaMub.cjs +0 -145
  271. package/components/streaming-listener-cAz5zJyk.js +0 -146
  272. package/components/text-field-11tcnftU.cjs +0 -338
  273. package/components/text-field-Chi9J2Cz.js +0 -339
  274. package/components/text-field.module-CMBS0jSL.js +0 -21
  275. package/components/text-field.module-DIJdV_sA.cjs +0 -20
@@ -1,206 +0,0 @@
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";
19
- const lit = require("lit");
20
- const decorators_js = require("lit/decorators.js");
21
- const focusable = require("./focusable-BPrTcZPd.cjs");
22
- const likeAnchor = require("./like-anchor-D62faRNG.cjs");
23
- const observeSlotText = require("./observe-slot-text-CSofZeeF.cjs");
24
- const styles = ":host{display:inline-flex;vertical-align:top;--parent-element-progress-circle-size: 18px;--icon-size: 18px}:host([dir]){-webkit-appearance:none}:host([disabled]){pointer-events:none;cursor:auto}#button{position:absolute;top:0;right:0;bottom:0;left:0}::slotted(luzmo-overlay),::slotted(luzmo-tooltip){position:absolute}:host:after{pointer-events:none}::slotted(*){pointer-events:none}::slotted([slot=icon]){--luzmo-icon-vertical-align: 0}slot[name=icon]::slotted(svg),slot[name=icon]::slotted(img){fill:currentcolor;stroke:currentcolor;block-size:var(--luzmo-button-icon-size, var(--icon-size));inline-size:var(--luzmo-button-icon-size, var(--icon-size))}[icon-only]+#label{display:contents}:host([size=s]){--parent-element-progress-circle-size: 16px;--icon-size: 16px}:host([size=l]){--parent-element-progress-circle-size: 20px;--icon-size: 20px}:host([size=xl]){--parent-element-progress-circle-size: 22px;--icon-size: 22px}";
25
- var __defProp = Object.defineProperty;
26
- var __decorateClass = (decorators, target, key, kind) => {
27
- var result = void 0;
28
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
29
- if (decorator = decorators[i])
30
- result = decorator(target, key, result) || result;
31
- if (result) __defProp(target, key, result);
32
- return result;
33
- };
34
- class LuzmoButtonBase extends observeSlotText.ObserveSlotText(
35
- likeAnchor.LikeAnchor(focusable.Focusable),
36
- "",
37
- ["luzmo-overlay,luzmo-tooltip"]
38
- ) {
39
- constructor() {
40
- super();
41
- this.active = false;
42
- this.type = "button";
43
- this.proxyFocus = this.proxyFocus.bind(this);
44
- this.addEventListener("click", this.handleClickCapture, {
45
- capture: true
46
- });
47
- }
48
- static get styles() {
49
- return [lit.unsafeCSS(styles)];
50
- }
51
- get focusElement() {
52
- return this;
53
- }
54
- get hasLabel() {
55
- return this.slotHasContent;
56
- }
57
- get buttonContent() {
58
- const content = [
59
- lit.html` <slot name="icon" ?icon-only=${!this.hasLabel}></slot> `,
60
- lit.html`
61
- <span id="label">
62
- <slot @slotchange=${this.manageTextObservedSlot}></slot>
63
- </span>
64
- `
65
- ];
66
- return content;
67
- }
68
- handleClickCapture(event) {
69
- if (this.disabled) {
70
- event.preventDefault();
71
- event.stopImmediatePropagation();
72
- event.stopPropagation();
73
- return false;
74
- }
75
- if (this.shouldProxyClick()) {
76
- return;
77
- }
78
- }
79
- proxyFocus() {
80
- this.focus();
81
- }
82
- shouldProxyClick() {
83
- let handled = false;
84
- if (this.anchorElement) {
85
- this.anchorElement.click();
86
- handled = true;
87
- } else if (this.type !== "button") {
88
- const proxy = typeof document !== "undefined" ? document.createElement("button") : null;
89
- if (proxy) {
90
- proxy.type = this.type;
91
- this.insertAdjacentElement("afterend", proxy);
92
- proxy.click();
93
- proxy.remove();
94
- }
95
- handled = true;
96
- }
97
- return handled;
98
- }
99
- renderAnchor() {
100
- return lit.html`
101
- ${this.buttonContent}
102
- ${super.renderAnchor({
103
- id: "button",
104
- ariaHidden: true,
105
- className: "button anchor hidden"
106
- })}
107
- `;
108
- }
109
- renderButton() {
110
- return lit.html` ${this.buttonContent} `;
111
- }
112
- render() {
113
- return this.href && this.href.length > 0 ? this.renderAnchor() : this.renderButton();
114
- }
115
- handleKeydown(event) {
116
- const { code } = event;
117
- switch (code) {
118
- case "Space": {
119
- event.preventDefault();
120
- if (this.href === void 0) {
121
- this.addEventListener("keyup", this.handleKeyup);
122
- this.active = true;
123
- }
124
- break;
125
- }
126
- }
127
- }
128
- handleKeypress(event) {
129
- const { code } = event;
130
- switch (code) {
131
- case "Enter":
132
- case "NumpadEnter": {
133
- this.click();
134
- break;
135
- }
136
- }
137
- }
138
- handleKeyup(event) {
139
- const { code } = event;
140
- switch (code) {
141
- case "Space": {
142
- this.removeEventListener("keyup", this.handleKeyup);
143
- this.active = false;
144
- this.click();
145
- break;
146
- }
147
- }
148
- }
149
- manageAnchor() {
150
- if (this.href && this.href.length > 0) {
151
- if (!this.hasAttribute("role") || this.getAttribute("role") === "button") {
152
- this.setAttribute("role", "link");
153
- }
154
- } else {
155
- if (!this.hasAttribute("role") || this.getAttribute("role") === "link") {
156
- this.setAttribute("role", "button");
157
- }
158
- }
159
- }
160
- firstUpdated(changed) {
161
- super.firstUpdated(changed);
162
- if (!this.hasAttribute("tabindex")) {
163
- this.setAttribute("tabindex", "0");
164
- }
165
- if (changed.has("label")) {
166
- if (this.label) {
167
- this.setAttribute("aria-label", this.label);
168
- } else {
169
- this.removeAttribute("aria-label");
170
- }
171
- }
172
- this.manageAnchor();
173
- this.addEventListener("keydown", this.handleKeydown);
174
- this.addEventListener("keypress", this.handleKeypress);
175
- }
176
- updated(changed) {
177
- super.updated(changed);
178
- if (changed.has("href")) {
179
- this.manageAnchor();
180
- }
181
- if (this.anchorElement) {
182
- this.anchorElement.addEventListener("focus", this.proxyFocus);
183
- this.anchorElement.tabIndex = -1;
184
- }
185
- }
186
- update(changes) {
187
- super.update(changes);
188
- if (changes.has("label")) {
189
- if (this.label) {
190
- this.setAttribute("aria-label", this.label);
191
- } else {
192
- this.removeAttribute("aria-label");
193
- }
194
- }
195
- }
196
- }
197
- __decorateClass([
198
- decorators_js.property({ type: Boolean, reflect: true })
199
- ], LuzmoButtonBase.prototype, "active");
200
- __decorateClass([
201
- decorators_js.property({ type: String })
202
- ], LuzmoButtonBase.prototype, "type");
203
- __decorateClass([
204
- decorators_js.query(".anchor")
205
- ], LuzmoButtonBase.prototype, "anchorElement");
206
- exports.LuzmoButtonBase = LuzmoButtonBase;
@@ -1,207 +0,0 @@
1
- /*! * Lucero - The design system for Luzmo.
2
- *
3
- * Copyright © 2025 Luzmo
4
- * All rights reserved.
5
- * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
- * This license allows users with a current active Luzmo account to use Lucero.
7
- * This license terminates automatically if a user no longer has an active Luzmo account.
8
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
- * SOFTWARE.
17
- * */
18
- import { unsafeCSS, html } from "lit";
19
- import { property, query } from "lit/decorators.js";
20
- import { F as Focusable } from "./focusable-ChCLg1k4.js";
21
- import { L as LikeAnchor } from "./like-anchor-v3cJ9RWM.js";
22
- import { O as ObserveSlotText } from "./observe-slot-text-CjnkkBPn.js";
23
- const styles = ":host{display:inline-flex;vertical-align:top;--parent-element-progress-circle-size: 18px;--icon-size: 18px}:host([dir]){-webkit-appearance:none}:host([disabled]){pointer-events:none;cursor:auto}#button{position:absolute;top:0;right:0;bottom:0;left:0}::slotted(luzmo-overlay),::slotted(luzmo-tooltip){position:absolute}:host:after{pointer-events:none}::slotted(*){pointer-events:none}::slotted([slot=icon]){--luzmo-icon-vertical-align: 0}slot[name=icon]::slotted(svg),slot[name=icon]::slotted(img){fill:currentcolor;stroke:currentcolor;block-size:var(--luzmo-button-icon-size, var(--icon-size));inline-size:var(--luzmo-button-icon-size, var(--icon-size))}[icon-only]+#label{display:contents}:host([size=s]){--parent-element-progress-circle-size: 16px;--icon-size: 16px}:host([size=l]){--parent-element-progress-circle-size: 20px;--icon-size: 20px}:host([size=xl]){--parent-element-progress-circle-size: 22px;--icon-size: 22px}";
24
- var __defProp = Object.defineProperty;
25
- var __decorateClass = (decorators, target, key, kind) => {
26
- var result = void 0;
27
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
28
- if (decorator = decorators[i])
29
- result = decorator(target, key, result) || result;
30
- if (result) __defProp(target, key, result);
31
- return result;
32
- };
33
- class LuzmoButtonBase extends ObserveSlotText(
34
- LikeAnchor(Focusable),
35
- "",
36
- ["luzmo-overlay,luzmo-tooltip"]
37
- ) {
38
- constructor() {
39
- super();
40
- this.active = false;
41
- this.type = "button";
42
- this.proxyFocus = this.proxyFocus.bind(this);
43
- this.addEventListener("click", this.handleClickCapture, {
44
- capture: true
45
- });
46
- }
47
- static get styles() {
48
- return [unsafeCSS(styles)];
49
- }
50
- get focusElement() {
51
- return this;
52
- }
53
- get hasLabel() {
54
- return this.slotHasContent;
55
- }
56
- get buttonContent() {
57
- const content = [
58
- html` <slot name="icon" ?icon-only=${!this.hasLabel}></slot> `,
59
- html`
60
- <span id="label">
61
- <slot @slotchange=${this.manageTextObservedSlot}></slot>
62
- </span>
63
- `
64
- ];
65
- return content;
66
- }
67
- handleClickCapture(event) {
68
- if (this.disabled) {
69
- event.preventDefault();
70
- event.stopImmediatePropagation();
71
- event.stopPropagation();
72
- return false;
73
- }
74
- if (this.shouldProxyClick()) {
75
- return;
76
- }
77
- }
78
- proxyFocus() {
79
- this.focus();
80
- }
81
- shouldProxyClick() {
82
- let handled = false;
83
- if (this.anchorElement) {
84
- this.anchorElement.click();
85
- handled = true;
86
- } else if (this.type !== "button") {
87
- const proxy = typeof document !== "undefined" ? document.createElement("button") : null;
88
- if (proxy) {
89
- proxy.type = this.type;
90
- this.insertAdjacentElement("afterend", proxy);
91
- proxy.click();
92
- proxy.remove();
93
- }
94
- handled = true;
95
- }
96
- return handled;
97
- }
98
- renderAnchor() {
99
- return html`
100
- ${this.buttonContent}
101
- ${super.renderAnchor({
102
- id: "button",
103
- ariaHidden: true,
104
- className: "button anchor hidden"
105
- })}
106
- `;
107
- }
108
- renderButton() {
109
- return html` ${this.buttonContent} `;
110
- }
111
- render() {
112
- return this.href && this.href.length > 0 ? this.renderAnchor() : this.renderButton();
113
- }
114
- handleKeydown(event) {
115
- const { code } = event;
116
- switch (code) {
117
- case "Space": {
118
- event.preventDefault();
119
- if (this.href === void 0) {
120
- this.addEventListener("keyup", this.handleKeyup);
121
- this.active = true;
122
- }
123
- break;
124
- }
125
- }
126
- }
127
- handleKeypress(event) {
128
- const { code } = event;
129
- switch (code) {
130
- case "Enter":
131
- case "NumpadEnter": {
132
- this.click();
133
- break;
134
- }
135
- }
136
- }
137
- handleKeyup(event) {
138
- const { code } = event;
139
- switch (code) {
140
- case "Space": {
141
- this.removeEventListener("keyup", this.handleKeyup);
142
- this.active = false;
143
- this.click();
144
- break;
145
- }
146
- }
147
- }
148
- manageAnchor() {
149
- if (this.href && this.href.length > 0) {
150
- if (!this.hasAttribute("role") || this.getAttribute("role") === "button") {
151
- this.setAttribute("role", "link");
152
- }
153
- } else {
154
- if (!this.hasAttribute("role") || this.getAttribute("role") === "link") {
155
- this.setAttribute("role", "button");
156
- }
157
- }
158
- }
159
- firstUpdated(changed) {
160
- super.firstUpdated(changed);
161
- if (!this.hasAttribute("tabindex")) {
162
- this.setAttribute("tabindex", "0");
163
- }
164
- if (changed.has("label")) {
165
- if (this.label) {
166
- this.setAttribute("aria-label", this.label);
167
- } else {
168
- this.removeAttribute("aria-label");
169
- }
170
- }
171
- this.manageAnchor();
172
- this.addEventListener("keydown", this.handleKeydown);
173
- this.addEventListener("keypress", this.handleKeypress);
174
- }
175
- updated(changed) {
176
- super.updated(changed);
177
- if (changed.has("href")) {
178
- this.manageAnchor();
179
- }
180
- if (this.anchorElement) {
181
- this.anchorElement.addEventListener("focus", this.proxyFocus);
182
- this.anchorElement.tabIndex = -1;
183
- }
184
- }
185
- update(changes) {
186
- super.update(changes);
187
- if (changes.has("label")) {
188
- if (this.label) {
189
- this.setAttribute("aria-label", this.label);
190
- } else {
191
- this.removeAttribute("aria-label");
192
- }
193
- }
194
- }
195
- }
196
- __decorateClass([
197
- property({ type: Boolean, reflect: true })
198
- ], LuzmoButtonBase.prototype, "active");
199
- __decorateClass([
200
- property({ type: String })
201
- ], LuzmoButtonBase.prototype, "type");
202
- __decorateClass([
203
- query(".anchor")
204
- ], LuzmoButtonBase.prototype, "anchorElement");
205
- export {
206
- LuzmoButtonBase as L
207
- };
@@ -1,84 +0,0 @@
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 { html } from "lit";
19
- import { property, query } from "lit/decorators.js";
20
- import { ifDefined } from "lit/directives/if-defined.js";
21
- var __defProp = Object.defineProperty;
22
- var __decorateClass = (decorators, target, key, kind) => {
23
- var result = void 0;
24
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
25
- if (decorator = decorators[i])
26
- result = decorator(target, key, result) || result;
27
- if (result) __defProp(target, key, result);
28
- return result;
29
- };
30
- function checkboxMixin(constructor) {
31
- class MixedElement extends constructor {
32
- constructor() {
33
- super(...arguments);
34
- this.checked = false;
35
- this.readonly = false;
36
- }
37
- handleChange() {
38
- if (this.readonly) {
39
- this.inputElement.checked = this.checked;
40
- return;
41
- }
42
- this.checked = this.inputElement.checked;
43
- const changeEvent = new CustomEvent("change", {
44
- bubbles: true,
45
- cancelable: true,
46
- composed: true,
47
- detail: this.checked
48
- });
49
- const applyDefault = this.dispatchEvent(changeEvent);
50
- if (!applyDefault) {
51
- this.checked = !this.inputElement.checked;
52
- this.inputElement.checked = this.checked;
53
- }
54
- }
55
- render() {
56
- return html`
57
- <input
58
- id="input"
59
- name=${ifDefined(this.name || void 0)}
60
- type="checkbox"
61
- .checked=${this.checked}
62
- ?disabled=${this.readonly}
63
- @change=${this.handleChange}
64
- />
65
- `;
66
- }
67
- }
68
- __decorateClass([
69
- property({ type: Boolean, reflect: true })
70
- ], MixedElement.prototype, "checked");
71
- __decorateClass([
72
- property({ type: String, reflect: true })
73
- ], MixedElement.prototype, "name");
74
- __decorateClass([
75
- property({ type: Boolean, reflect: true })
76
- ], MixedElement.prototype, "readonly");
77
- __decorateClass([
78
- query("#input")
79
- ], MixedElement.prototype, "inputElement");
80
- return MixedElement;
81
- }
82
- export {
83
- checkboxMixin as c
84
- };
@@ -1,83 +0,0 @@
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";
19
- const lit = require("lit");
20
- const decorators_js = require("lit/decorators.js");
21
- const ifDefined_js = require("lit/directives/if-defined.js");
22
- var __defProp = Object.defineProperty;
23
- var __decorateClass = (decorators, target, key, kind) => {
24
- var result = void 0;
25
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
26
- if (decorator = decorators[i])
27
- result = decorator(target, key, result) || result;
28
- if (result) __defProp(target, key, result);
29
- return result;
30
- };
31
- function checkboxMixin(constructor) {
32
- class MixedElement extends constructor {
33
- constructor() {
34
- super(...arguments);
35
- this.checked = false;
36
- this.readonly = false;
37
- }
38
- handleChange() {
39
- if (this.readonly) {
40
- this.inputElement.checked = this.checked;
41
- return;
42
- }
43
- this.checked = this.inputElement.checked;
44
- const changeEvent = new CustomEvent("change", {
45
- bubbles: true,
46
- cancelable: true,
47
- composed: true,
48
- detail: this.checked
49
- });
50
- const applyDefault = this.dispatchEvent(changeEvent);
51
- if (!applyDefault) {
52
- this.checked = !this.inputElement.checked;
53
- this.inputElement.checked = this.checked;
54
- }
55
- }
56
- render() {
57
- return lit.html`
58
- <input
59
- id="input"
60
- name=${ifDefined_js.ifDefined(this.name || void 0)}
61
- type="checkbox"
62
- .checked=${this.checked}
63
- ?disabled=${this.readonly}
64
- @change=${this.handleChange}
65
- />
66
- `;
67
- }
68
- }
69
- __decorateClass([
70
- decorators_js.property({ type: Boolean, reflect: true })
71
- ], MixedElement.prototype, "checked");
72
- __decorateClass([
73
- decorators_js.property({ type: String, reflect: true })
74
- ], MixedElement.prototype, "name");
75
- __decorateClass([
76
- decorators_js.property({ type: Boolean, reflect: true })
77
- ], MixedElement.prototype, "readonly");
78
- __decorateClass([
79
- decorators_js.query("#input")
80
- ], MixedElement.prototype, "inputElement");
81
- return MixedElement;
82
- }
83
- exports.checkboxMixin = checkboxMixin;
@@ -1,59 +0,0 @@
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, luzmoClear12, luzmoClear16, luzmoClear14 } from "@luzmo/icons";
19
- import { unsafeCSS, html } from "lit";
20
- import { property } from "lit/decorators.js";
21
- import { S as SizedMixin } from "./sized-mixin-DmkrNdWB.js";
22
- import { L as LuzmoButtonBase } from "./button-base-C3kf6BTK.js";
23
- const buttonStyles = ":host{font-size:var(--luzmo-clear-button-icon-size, var(--clear-button-icon-size));cursor:pointer;background-color:initial;background-color:var(--luzmo-clear-button-background-color, transparent);padding:var(--luzmo-clear-button-padding, var(--clear-button-padding));color:var(--luzmo-clear-button-icon-color, var(--clear-button-icon-color));border:none;border-radius:100%;margin:0}.icon{margin-block:0;margin-inline:auto}@media (hover: hover){:host(:hover){color:var(--highcontrast-clear-button-icon-color-hover, var(--luzmo-clear-button-icon-color-hover, var(--clear-button-icon-color-hover)))}:host(:hover) .fill{background-color:var(--luzmo-clear-button-background-color-hover, var(--clear-button-background-color-hover))}}:host(:is(:active,[active])){color:var(--luzmo-clear-button-icon-color-down, var(--clear-button-icon-color-down))}:host(:is(:active,[active])) .fill{background-color:var(--luzmo-clear-button-background-color-down, var(--clear-button-background-color-down))}:host([focus-within]) .js-focus-within,:host(:focus-visible),:host:focus-within{color:var(--luzmo-clear-button-icon-color-key-focus, var(--clear-button-icon-color-key-focus))}:host([focus-within]) .js-focus-within .fill,:host(:focus-visible) .fill,:host:focus-within .fill{background-color:var(--luzmo-clear-button-background-color-key-focus, var(--clear-button-background-color-key-focus))}:host([disabled]){--clear-button-icon-color: var( --luzmo-clear-button-icon-color-disabled, var(--disabled-content-color) );--clear-button-background-color: var( --luzmo-clear-button-background-color-disabled, transparent )}.fill{background-color:var(--luzmo-clear-button-background-color, var(--clear-button-background-color));inline-size:100%;block-size:100%;border-radius:100%;justify-content:center;align-items:center;display:flex}:host([variant=overBackground]:focus-visible){outline:none}@media (forced-colors: active){:host:not(:disabled){--highcontrast-clear-button-icon-color-hover: Highlight}}:host{--clear-button-background-color: transparent;--clear-button-background-color-hover: transparent;--clear-button-background-color-down: transparent;--clear-button-background-color-key-focus: transparent;--clear-button-icon-size: var(--luzmo-font-size);--clear-button-padding: 0px;--clear-button-icon-color: var(--luzmo-font-color);--clear-button-icon-color-hover: var(--luzmo-font-color-hover);--clear-button-icon-color-down: var(--luzmo-font-color-down);--clear-button-icon-color-key-focus: var(--luzmo-font-color-focus)}:host([size=s]){--clear-button-icon-size: var(--luzmo-font-size-s)}:host([size=l]){--clear-button-icon-size: var(--luzmo-font-size-l)}:host([size=xl]){--clear-button-icon-size: var(--luzmo-font-size-xl)}:host .luzmo-ClearButton--quiet{--clear-button-background-color: transparent;--clear-button-background-color-hover: transparent;--clear-button-background-color-down: transparent;--clear-button-background-color-key-focus: transparent}:host([variant=overBackground]){--clear-button-icon-color: rgb(255, 255, 255);--clear-button-icon-color-hover: rgb(255, 255, 255);--clear-button-icon-color-down: rgb(255, 255, 255);--clear-button-icon-color-key-focus: rgb(255, 255, 255);--clear-button-background-color: transparent;--clear-button-background-color-hover: rgba(255, 255, 255, .25);--clear-button-background-color-down: rgba(255, 255, 255, .4);--clear-button-background-color-key-focus: rgba(255, 255, 255, .25)}:host([disabled]){--clear-button-icon-color: var(--luzmo-disabled-color);--clear-button-icon-color-hover: var(--luzmo-disabled-color);--clear-button-icon-color-down: var(--luzmo-disabled-color);--clear-button-background-color: transparent}:host{box-sizing:border-box}";
24
- var __defProp = Object.defineProperty;
25
- var __decorateClass = (decorators, target, key, kind) => {
26
- var result = void 0;
27
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
28
- if (decorator = decorators[i])
29
- result = decorator(target, key, result) || result;
30
- if (result) __defProp(target, key, result);
31
- return result;
32
- };
33
- const crossIcon = (size) => {
34
- const icon = size === "s" ? luzmoClear12 : ["xl", "l"].includes(size) ? luzmoClear16 : luzmoClear14;
35
- return html` <div class="icon" slot="icon">${luzmoIcon(icon)}</div> `;
36
- };
37
- class LuzmoClearButton extends SizedMixin(LuzmoButtonBase, {
38
- noDefaultSize: true
39
- }) {
40
- constructor() {
41
- super(...arguments);
42
- this.variant = "";
43
- }
44
- static get styles() {
45
- return [...super.styles, unsafeCSS(buttonStyles)];
46
- }
47
- get buttonContent() {
48
- return [crossIcon(this.size)];
49
- }
50
- render() {
51
- return html` <div class="fill">${super.render()}</div> `;
52
- }
53
- }
54
- __decorateClass([
55
- property({ reflect: true })
56
- ], LuzmoClearButton.prototype, "variant");
57
- export {
58
- LuzmoClearButton as L
59
- };