@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,391 +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 mutationController_js = require("@lit-labs/observers/mutation-controller.js");
21
- const decorators_js = require("lit/decorators.js");
22
- const base = require("./base-COw9n7UR.cjs");
23
- const rovingTabindex = require("./roving-tabindex-AsmAh2In.cjs");
24
- const sizedMixin = require("./sized-mixin-UaTVa-AE.cjs");
25
- const styles = ":host{gap:var(--luzmo-action-group-horizontal-spacing-regular, var(--action-group-horizontal-spacing-regular));flex-wrap:wrap;display:flex}::slotted(*){flex-shrink:0}::slotted(:focus-visible){z-index:3}:host(:not([vertical]):not([compact])) ::slotted(*){flex-shrink:0}:host([vertical]){gap:var(--luzmo-action-group-vertical-spacing-regular, var(--action-group-vertical-spacing-regular));flex-direction:column;display:inline-flex}:host([compact]){gap:var(--luzmo-action-group-gap-size-compact, var(--action-group-gap-size-compact))}:host([compact]:not([quiet])){flex-wrap:nowrap}:host([compact]:not([quiet])) ::slotted(*){border-radius:var(--luzmo-action-group-border-radius-reset, var(--action-group-border-radius-reset));z-index:0;position:relative}:host([compact]:not([quiet])) ::slotted(:first-child){--luzmo-actionbutton-focus-indicator-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) 0px 0px var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-start-start-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-end-start-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));margin-inline-start:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset))}:host([compact]:not([quiet])) ::slotted(:not(:first-child)){--luzmo-actionbutton-focus-indicator-border-radius: 0px;margin-inline-start:var(--luzmo-action-group-horizontal-spacing-compact, var(--action-group-horizontal-spacing-compact));margin-inline-end:var(--luzmo-action-group-horizontal-spacing-compact, var(--action-group-horizontal-spacing-compact))}:host([compact]:not([quiet])) ::slotted(:last-child){--luzmo-actionbutton-focus-indicator-border-radius: 0px var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0px;border-start-end-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-end-end-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));margin-inline-start:var(--luzmo-action-group-horizontal-spacing-compact, var(--action-group-horizontal-spacing-compact));margin-inline-end:var(--luzmo-action-group-border-radius-reset, var(--action-group-border-radius-reset))}:host([compact]:not([quiet])) ::slotted([selected]){z-index:1}@media (hover: hover){:host([compact]:not([quiet])) ::slotted(:hover){z-index:2}}:host([compact]:not([quiet])) ::slotted(:focus-visible){z-index:3}:host([compact]:not([quiet])[vertical]){gap:var(--luzmo-action-group-gap-size-compact, var(--action-group-gap-size-compact))}:host([compact][vertical]:not([quiet])) ::slotted(*){border-radius:var(--luzmo-action-group-border-radius-reset, var(--action-group-border-radius-reset))}:host([compact][vertical]:not([quiet])) ::slotted(:first-child){--luzmo-actionbutton-focus-indicator-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0px 0px;border-start-start-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-start-end-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));margin-block-start:var(--luzmo-action-group-vertical-spacing-compact, var(--action-group-vertical-spacing-compact));margin-block-end:var(--luzmo-action-group-vertical-spacing-compact, var(--action-group-vertical-spacing-compact));margin-inline-end:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset))}:host([compact][vertical]:not([quiet])) ::slotted(:not(:first-child)){margin-block-start:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset));margin-block-end:var(--luzmo-action-group-vertical-spacing-compact, var(--action-group-vertical-spacing-compact));margin-inline-start:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset));margin-inline-end:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset))}:host([compact][vertical]:not([quiet])) ::slotted(:last-child){--luzmo-actionbutton-focus-indicator-border-radius: 0px 0px var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-end-end-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-end-start-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));margin-block-start:var(--luzmo-action-group-vertical-spacing-compact, var(--action-group-vertical-spacing-compact));margin-block-end:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset))}:host([justified]) ::slotted(*){flex:1}:host{--action-group-gap-size-compact: 0px;--action-group-horizontal-spacing-compact: -1px;--action-group-vertical-spacing-compact: -1px;--action-group-button-spacing-reset: 0px;--action-group-border-radius-reset: 0px;--action-group-border-radius: var(--luzmo-border-radius);--action-group-horizontal-spacing-regular: var(--luzmo-spacing-3);--action-group-vertical-spacing-regular: var(--luzmo-spacing-3)}:host([size=xs]),:host([size=s]){--action-group-horizontal-spacing-regular: var(--luzmo-spacing-2);--action-group-vertical-spacing-regular: var(--luzmo-spacing-2)}:host,:host([size=l]),:host([size=xl]){--action-group-horizontal-spacing-regular: var(--luzmo-spacing-3);--action-group-vertical-spacing-regular: var(--luzmo-spacing-3)}:host([dir][compact][vertical]) ::slotted(:nth-child(n)){margin-right:0;margin-left:0}:host([justified]) ::slotted(:not([role])),:host([vertical]) ::slotted(:not([role])){display:flex;flex-direction:column;align-items:stretch}:host([compact]:not([quiet])) ::slotted(:not([role])){--overriden-border-radius: 0;--luzmo-action-button-border-radius: var(--overriden-border-radius)}:host([compact][vertical]:not([quiet])) ::slotted(:not([role]):first-child){--overriden-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0 0}:host([compact][vertical]:not([quiet])) ::slotted(:not([role]):last-child){--overriden-border-radius: 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([dir=ltr][compact]:not([quiet],[vertical])) ::slotted(:not([role]):first-child){--overriden-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([dir=rtl][compact]:not([quiet],[vertical])) ::slotted(:not([role]):first-child){--overriden-border-radius: 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0}:host([dir=ltr][compact]:not([quiet],[vertical])) ::slotted(:not([role]):last-child){--overriden-border-radius: 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0}:host([dir=rtl][compact]:not([quiet],[vertical])) ::slotted(:not([role]):last-child){--overriden-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([compact]:not([quiet])) ::slotted(*){--luzmo-action-button-focus-ring-border-radius: 0}:host([compact][vertical]:not([quiet])) ::slotted(:first-child){--luzmo-action-button-focus-ring-border-radius: var(--luzmo-border-radius) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0 0}:host([compact][vertical]:not([quiet])) ::slotted(:last-child){--luzmo-action-button-focus-ring-border-radius: 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([dir=ltr][compact]:not([quiet],[vertical])) ::slotted(:first-child){--luzmo-action-button-focus-ring-border-radius: var(--luzmo-border-radius) 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([dir=rtl][compact]:not([quiet],[vertical])) ::slotted(:first-child){--luzmo-action-button-focus-ring-border-radius: 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0}:host([dir=ltr][compact]:not([quiet],[vertical])) ::slotted(:last-child){--luzmo-action-button-focus-ring-border-radius: 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0}:host([dir=rtl][compact]:not([quiet],[vertical])) ::slotted(:last-child){--luzmo-action-button-focus-ring-border-radius: var(--luzmo-border-radius) 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}";
26
- var __defProp = Object.defineProperty;
27
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
28
- var __decorateClass = (decorators, target, key, kind) => {
29
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
30
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
31
- if (decorator = decorators[i])
32
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
33
- if (kind && result) __defProp(target, key, result);
34
- return result;
35
- };
36
- const emptySelection = [];
37
- class LuzmoActionGroup extends sizedMixin.SizedMixin(base.LuzmoElement, {
38
- validSizes: ["xs", "s", "m", "l", "xl"],
39
- noDefaultSize: true
40
- }) {
41
- constructor() {
42
- super();
43
- this._buttons = [];
44
- this._buttonSelector = "luzmo-action-button, luzmo-action-menu";
45
- this.rovingTabindexController = new rovingTabindex.RovingTabindexController(
46
- this,
47
- {
48
- focusInIndex: (elements) => {
49
- let firstEnabledIndex = -1;
50
- const firstSelectedIndex = elements.findIndex((el, index) => {
51
- if (!elements[firstEnabledIndex] && !el.disabled) {
52
- firstEnabledIndex = index;
53
- }
54
- return el.selected && !el.disabled;
55
- });
56
- return elements[firstSelectedIndex] ? firstSelectedIndex : firstEnabledIndex;
57
- },
58
- elements: () => this.buttons,
59
- isFocusableElement: (el) => !el.disabled
60
- }
61
- );
62
- this.compact = false;
63
- this.emphasized = false;
64
- this.justified = false;
65
- this.label = "";
66
- this.quiet = false;
67
- this.vertical = false;
68
- this._selected = emptySelection;
69
- this.hasManaged = false;
70
- this.manageButtons = () => {
71
- if (!this.slotElement) {
72
- return;
73
- }
74
- const assignedElements = this.slotElement.assignedElements({
75
- flatten: true
76
- });
77
- const buttons = assignedElements.reduce((acc, el) => {
78
- if (el.matches(this._buttonSelector)) {
79
- acc.push(el);
80
- } else {
81
- const buttonDescendents = [
82
- ...el.querySelectorAll(`:scope > ${this._buttonSelector}`)
83
- ];
84
- acc.push(...buttonDescendents);
85
- }
86
- return acc;
87
- }, []);
88
- this.buttons = buttons;
89
- if (this.selects || !this.hasManaged) {
90
- const currentlySelectedButtons = [];
91
- this.buttons.forEach((button) => {
92
- if (button.selected) {
93
- currentlySelectedButtons.push(button.value);
94
- }
95
- });
96
- this.setSelected([...this.selected, ...currentlySelectedButtons]);
97
- }
98
- this.manageChildren();
99
- this.manageSelects();
100
- this.hasManaged = true;
101
- };
102
- new mutationController_js.MutationController(this, {
103
- config: {
104
- childList: true,
105
- subtree: true
106
- },
107
- callback: () => {
108
- this.manageButtons();
109
- },
110
- skipInitial: true
111
- });
112
- }
113
- static get styles() {
114
- return [lit.unsafeCSS(styles)];
115
- }
116
- set buttons(buttons) {
117
- if (buttons === this.buttons) {
118
- return;
119
- }
120
- this._buttons = buttons;
121
- this.rovingTabindexController.clearElementCache();
122
- }
123
- get buttons() {
124
- return this._buttons;
125
- }
126
- set selected(selected) {
127
- this.requestUpdate("selected", this._selected);
128
- this._selected = selected;
129
- this.updateComplete.then(() => {
130
- this.applySelects();
131
- this.manageChildren();
132
- });
133
- }
134
- get selected() {
135
- return this._selected;
136
- }
137
- dispatchChange(old) {
138
- const applyDefault = this.dispatchEvent(
139
- new Event("change", {
140
- bubbles: true,
141
- composed: true,
142
- cancelable: true
143
- })
144
- );
145
- if (!applyDefault) {
146
- this.setSelected(old);
147
- this.buttons.map((button) => {
148
- button.selected = this.selected.includes(button.value);
149
- });
150
- }
151
- }
152
- setSelected(selected, announce) {
153
- if (selected === this.selected) {
154
- return;
155
- }
156
- const old = this.selected;
157
- this.requestUpdate("selected", old);
158
- this._selected = selected;
159
- if (!announce) {
160
- return;
161
- }
162
- this.dispatchChange(old);
163
- }
164
- focus(options) {
165
- this.rovingTabindexController.focus(options);
166
- }
167
- deselectSelectedButtons() {
168
- this.buttons.forEach((button) => {
169
- if (!button.selected) {
170
- return;
171
- }
172
- button.selected = false;
173
- button.tabIndex = -1;
174
- button.setAttribute(
175
- this.selects ? "aria-checked" : (
176
- /* c8 ignore */
177
- "aria-pressed"
178
- ),
179
- "false"
180
- );
181
- });
182
- }
183
- handleActionButtonChange(event) {
184
- event.stopPropagation();
185
- event.preventDefault();
186
- }
187
- handleClick(event) {
188
- const target = event.target;
189
- if (target.value === void 0) {
190
- return;
191
- }
192
- switch (this.selects) {
193
- case "single": {
194
- this.deselectSelectedButtons();
195
- target.selected = true;
196
- target.tabIndex = 0;
197
- target.setAttribute("aria-checked", "true");
198
- this.setSelected([target.value], true);
199
- break;
200
- }
201
- case "multiple": {
202
- const selected = [...this.selected];
203
- target.selected = !target.selected;
204
- target.setAttribute("aria-checked", target.selected ? "true" : "false");
205
- if (target.selected) {
206
- selected.push(target.value);
207
- } else {
208
- selected.splice(this.selected.indexOf(target.value), 1);
209
- }
210
- this.setSelected(selected, true);
211
- this.buttons.forEach((button) => {
212
- button.tabIndex = -1;
213
- });
214
- target.tabIndex = 0;
215
- break;
216
- }
217
- }
218
- }
219
- async applySelects() {
220
- await this.manageSelects(true);
221
- }
222
- async manageSelects(applied) {
223
- if (this.buttons.length === 0) {
224
- return;
225
- }
226
- const options = this.buttons;
227
- switch (this.selects) {
228
- case "single": {
229
- this.setAttribute("role", "radiogroup");
230
- const selections = [];
231
- const updates = options.map(async (option) => {
232
- await option.updateComplete;
233
- option.setAttribute("role", "radio");
234
- option.setAttribute(
235
- "aria-checked",
236
- option.selected ? "true" : "false"
237
- );
238
- if (option.selected) {
239
- selections.push(option);
240
- }
241
- });
242
- if (applied) {
243
- break;
244
- }
245
- await Promise.all(updates);
246
- const selected = selections.map((button) => button.value);
247
- this.setSelected(selected || emptySelection);
248
- break;
249
- }
250
- case "multiple": {
251
- if (this.getAttribute("role") === "radiogroup") {
252
- this.removeAttribute("role");
253
- }
254
- const selection = [];
255
- const updates = options.map(async (option) => {
256
- await option.updateComplete;
257
- option.setAttribute("role", "checkbox");
258
- option.setAttribute(
259
- "aria-checked",
260
- option.selected ? "true" : "false"
261
- );
262
- if (option.selected) {
263
- selection.push(option.value);
264
- }
265
- });
266
- if (applied) {
267
- break;
268
- }
269
- await Promise.all(updates);
270
- const selected = selection.length > 0 ? selection : emptySelection;
271
- this.setSelected(selected);
272
- break;
273
- }
274
- default: {
275
- if (this.selected.length > 0) {
276
- const selections = [];
277
- const updates = options.map(async (option) => {
278
- await option.updateComplete;
279
- option.setAttribute("role", "button");
280
- if (option.selected) {
281
- option.setAttribute("aria-pressed", "true");
282
- selections.push(option);
283
- } else {
284
- option.removeAttribute("aria-pressed");
285
- }
286
- });
287
- if (applied) {
288
- break;
289
- }
290
- await Promise.all(updates);
291
- this.setSelected(selections.map((button) => button.value));
292
- } else {
293
- this.buttons.forEach((option) => {
294
- option.setAttribute("role", "button");
295
- });
296
- break;
297
- }
298
- }
299
- }
300
- if (!this.hasAttribute("role")) {
301
- this.setAttribute("role", "toolbar");
302
- }
303
- }
304
- render() {
305
- return lit.html`
306
- <slot role="presentation" @slotchange=${this.manageButtons}></slot>
307
- `;
308
- }
309
- firstUpdated(changes) {
310
- super.firstUpdated(changes);
311
- this.addEventListener("click", this.handleClick);
312
- }
313
- updated(changes) {
314
- super.updated(changes);
315
- if (changes.has("selects")) {
316
- this.manageSelects();
317
- this.manageChildren();
318
- if (this.selects) {
319
- this.renderRoot.addEventListener(
320
- "change",
321
- this.handleActionButtonChange
322
- );
323
- } else {
324
- this.renderRoot.removeEventListener(
325
- "change",
326
- this.handleActionButtonChange
327
- );
328
- }
329
- }
330
- if (changes.has("quiet") || changes.has("emphasized") || changes.has("size") || changes.has("staticColor")) {
331
- this.manageChildren(changes);
332
- }
333
- if (changes.has("label") && (this.label || changes.get("label") !== void 0)) {
334
- if (this.label.length > 0) {
335
- this.setAttribute("aria-label", this.label);
336
- } else {
337
- this.removeAttribute("aria-label");
338
- }
339
- }
340
- }
341
- manageChildren(changes) {
342
- this.buttons.forEach((button) => {
343
- if (this.quiet || (changes == null ? void 0 : changes.get("quiet"))) {
344
- button.quiet = this.quiet;
345
- }
346
- if (this.emphasized || (changes == null ? void 0 : changes.get("emphasized"))) {
347
- button.emphasized = this.emphasized;
348
- }
349
- if (this.staticColor || (changes == null ? void 0 : changes.get("staticColor"))) {
350
- button.staticColor = this.staticColor;
351
- }
352
- if (this.selects || !this.hasManaged) {
353
- button.selected = this.selected.includes(button.value);
354
- }
355
- if (this.size && (this.size !== "m" || (changes == null ? void 0 : changes.get("size")) !== void 0)) {
356
- button.size = this.size;
357
- }
358
- });
359
- }
360
- }
361
- __decorateClass([
362
- decorators_js.property({ type: Boolean, reflect: true })
363
- ], LuzmoActionGroup.prototype, "compact", 2);
364
- __decorateClass([
365
- decorators_js.property({ type: Boolean, reflect: true })
366
- ], LuzmoActionGroup.prototype, "emphasized", 2);
367
- __decorateClass([
368
- decorators_js.property({ type: Boolean, reflect: true })
369
- ], LuzmoActionGroup.prototype, "justified", 2);
370
- __decorateClass([
371
- decorators_js.property({ type: String })
372
- ], LuzmoActionGroup.prototype, "label", 2);
373
- __decorateClass([
374
- decorators_js.property({ type: Boolean, reflect: true })
375
- ], LuzmoActionGroup.prototype, "quiet", 2);
376
- __decorateClass([
377
- decorators_js.property({ type: String })
378
- ], LuzmoActionGroup.prototype, "selects", 2);
379
- __decorateClass([
380
- decorators_js.property({ reflect: true, attribute: "static-color" })
381
- ], LuzmoActionGroup.prototype, "staticColor", 2);
382
- __decorateClass([
383
- decorators_js.property({ type: Boolean, reflect: true })
384
- ], LuzmoActionGroup.prototype, "vertical", 2);
385
- __decorateClass([
386
- decorators_js.property({ type: Array })
387
- ], LuzmoActionGroup.prototype, "selected", 1);
388
- __decorateClass([
389
- decorators_js.query("slot")
390
- ], LuzmoActionGroup.prototype, "slotElement", 2);
391
- exports.LuzmoActionGroup = LuzmoActionGroup;
@@ -1,119 +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 observedForElements = /* @__PURE__ */ new Set();
21
- const updateRTL = () => {
22
- if (typeof document === "undefined") return;
23
- const dir = document.documentElement.dir === "rtl" ? document.documentElement.dir : "ltr";
24
- observedForElements.forEach((el) => {
25
- el.setAttribute("dir", dir);
26
- });
27
- };
28
- let rtlObserver = null;
29
- if (typeof document !== "undefined") {
30
- rtlObserver = new MutationObserver(updateRTL);
31
- rtlObserver.observe(document.documentElement, {
32
- attributes: true,
33
- attributeFilter: ["dir"]
34
- });
35
- }
36
- const canManageContentDirection = (el) => el.startManagingContentDirection !== void 0 || el.tagName === "LUZMO-THEME";
37
- function LuzmoMixin(constructor) {
38
- class LuzmoMixinElement extends constructor {
39
- /**
40
- * @private
41
- */
42
- get isLTR() {
43
- return this.dir === "ltr";
44
- }
45
- hasVisibleFocusInTree() {
46
- if (typeof document === "undefined") return false;
47
- const getAncestors = (root = document) => {
48
- var _a;
49
- let currentNode = root.activeElement;
50
- while ((currentNode == null ? void 0 : currentNode.shadowRoot) && currentNode.shadowRoot.activeElement) {
51
- currentNode = currentNode.shadowRoot.activeElement;
52
- }
53
- const ancestors = currentNode ? [currentNode] : [];
54
- while (currentNode) {
55
- const ancestor = currentNode.assignedSlot || currentNode.parentElement || ((_a = currentNode.getRootNode()) == null ? void 0 : _a.host);
56
- if (ancestor) {
57
- ancestors.push(ancestor);
58
- }
59
- currentNode = ancestor;
60
- }
61
- return ancestors;
62
- };
63
- const activeElement = getAncestors(this.getRootNode())[0];
64
- if (!activeElement) {
65
- return false;
66
- }
67
- try {
68
- return activeElement.matches(":focus-visible") || activeElement.matches(".focus-visible");
69
- } catch {
70
- return activeElement.matches(".focus-visible");
71
- }
72
- }
73
- connectedCallback() {
74
- if (typeof document === "undefined") {
75
- super.connectedCallback();
76
- return;
77
- }
78
- if (!this.hasAttribute("dir")) {
79
- let dirParent = this.assignedSlot || this.parentNode;
80
- while (dirParent !== (document == null ? void 0 : document.documentElement) && !canManageContentDirection(dirParent)) {
81
- dirParent = dirParent.assignedSlot || // step into the shadow DOM of the parent of a slotted node
82
- dirParent.parentNode || // DOM Element detected
83
- dirParent.host;
84
- }
85
- this.dir = dirParent.dir === "rtl" ? dirParent.dir : this.dir || "ltr";
86
- if (dirParent === (document == null ? void 0 : document.documentElement)) {
87
- observedForElements.add(this);
88
- } else {
89
- const { localName } = dirParent;
90
- if (localName.search("-") > -1 && typeof customElements !== "undefined" && !customElements.get(localName)) {
91
- customElements.whenDefined(localName).then(() => {
92
- dirParent.startManagingContentDirection(this);
93
- });
94
- } else {
95
- dirParent.startManagingContentDirection(this);
96
- }
97
- }
98
- this._dirParent = dirParent;
99
- }
100
- super.connectedCallback();
101
- }
102
- disconnectedCallback() {
103
- super.disconnectedCallback();
104
- if (this._dirParent) {
105
- if (this._dirParent === (document == null ? void 0 : document.documentElement)) {
106
- observedForElements.delete(this);
107
- } else {
108
- this._dirParent.stopManagingContentDirection(this);
109
- }
110
- this.removeAttribute("dir");
111
- }
112
- }
113
- }
114
- return LuzmoMixinElement;
115
- }
116
- class LuzmoElement extends LuzmoMixin(lit.LitElement) {
117
- }
118
- exports.LuzmoElement = LuzmoElement;
119
- exports.LuzmoMixin = LuzmoMixin;
@@ -1,120 +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 { LitElement } from "lit";
19
- const observedForElements = /* @__PURE__ */ new Set();
20
- const updateRTL = () => {
21
- if (typeof document === "undefined") return;
22
- const dir = document.documentElement.dir === "rtl" ? document.documentElement.dir : "ltr";
23
- observedForElements.forEach((el) => {
24
- el.setAttribute("dir", dir);
25
- });
26
- };
27
- let rtlObserver = null;
28
- if (typeof document !== "undefined") {
29
- rtlObserver = new MutationObserver(updateRTL);
30
- rtlObserver.observe(document.documentElement, {
31
- attributes: true,
32
- attributeFilter: ["dir"]
33
- });
34
- }
35
- const canManageContentDirection = (el) => el.startManagingContentDirection !== void 0 || el.tagName === "LUZMO-THEME";
36
- function LuzmoMixin(constructor) {
37
- class LuzmoMixinElement extends constructor {
38
- /**
39
- * @private
40
- */
41
- get isLTR() {
42
- return this.dir === "ltr";
43
- }
44
- hasVisibleFocusInTree() {
45
- if (typeof document === "undefined") return false;
46
- const getAncestors = (root = document) => {
47
- var _a;
48
- let currentNode = root.activeElement;
49
- while ((currentNode == null ? void 0 : currentNode.shadowRoot) && currentNode.shadowRoot.activeElement) {
50
- currentNode = currentNode.shadowRoot.activeElement;
51
- }
52
- const ancestors = currentNode ? [currentNode] : [];
53
- while (currentNode) {
54
- const ancestor = currentNode.assignedSlot || currentNode.parentElement || ((_a = currentNode.getRootNode()) == null ? void 0 : _a.host);
55
- if (ancestor) {
56
- ancestors.push(ancestor);
57
- }
58
- currentNode = ancestor;
59
- }
60
- return ancestors;
61
- };
62
- const activeElement = getAncestors(this.getRootNode())[0];
63
- if (!activeElement) {
64
- return false;
65
- }
66
- try {
67
- return activeElement.matches(":focus-visible") || activeElement.matches(".focus-visible");
68
- } catch {
69
- return activeElement.matches(".focus-visible");
70
- }
71
- }
72
- connectedCallback() {
73
- if (typeof document === "undefined") {
74
- super.connectedCallback();
75
- return;
76
- }
77
- if (!this.hasAttribute("dir")) {
78
- let dirParent = this.assignedSlot || this.parentNode;
79
- while (dirParent !== (document == null ? void 0 : document.documentElement) && !canManageContentDirection(dirParent)) {
80
- dirParent = dirParent.assignedSlot || // step into the shadow DOM of the parent of a slotted node
81
- dirParent.parentNode || // DOM Element detected
82
- dirParent.host;
83
- }
84
- this.dir = dirParent.dir === "rtl" ? dirParent.dir : this.dir || "ltr";
85
- if (dirParent === (document == null ? void 0 : document.documentElement)) {
86
- observedForElements.add(this);
87
- } else {
88
- const { localName } = dirParent;
89
- if (localName.search("-") > -1 && typeof customElements !== "undefined" && !customElements.get(localName)) {
90
- customElements.whenDefined(localName).then(() => {
91
- dirParent.startManagingContentDirection(this);
92
- });
93
- } else {
94
- dirParent.startManagingContentDirection(this);
95
- }
96
- }
97
- this._dirParent = dirParent;
98
- }
99
- super.connectedCallback();
100
- }
101
- disconnectedCallback() {
102
- super.disconnectedCallback();
103
- if (this._dirParent) {
104
- if (this._dirParent === (document == null ? void 0 : document.documentElement)) {
105
- observedForElements.delete(this);
106
- } else {
107
- this._dirParent.stopManagingContentDirection(this);
108
- }
109
- this.removeAttribute("dir");
110
- }
111
- }
112
- }
113
- return LuzmoMixinElement;
114
- }
115
- class LuzmoElement extends LuzmoMixin(LitElement) {
116
- }
117
- export {
118
- LuzmoMixin as L,
119
- LuzmoElement as a
120
- };