@luzmo/lucero 1.0.1-alpha.14 → 1.0.1-alpha.16

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/accordion/index.cjs +183 -6
  2. package/components/accordion/index.js +136 -88
  3. package/components/action-bar/index.cjs +85 -4
  4. package/components/action-bar/index.js +72 -50
  5. package/components/action-button/index.cjs +205 -3
  6. package/components/action-button/index.js +167 -93
  7. package/components/action-group/index.cjs +7 -1
  8. package/components/action-group/index.js +12 -8
  9. package/components/action-group-DHp8RHDf.js +392 -0
  10. package/components/action-group-MPf19RPV.cjs +391 -0
  11. package/components/action-menu/index.cjs +91 -11
  12. package/components/action-menu/index.js +66 -47
  13. package/components/avatar/index.cjs +63 -3
  14. package/components/avatar/index.js +54 -42
  15. package/components/base-COw9n7UR.cjs +119 -0
  16. package/components/base-DmeVy0cq.js +120 -0
  17. package/components/button/index.cjs +134 -2
  18. package/components/button/index.js +106 -72
  19. package/components/button-base-7Ak55xFd.cjs +206 -0
  20. package/components/button-base-C3kf6BTK.js +207 -0
  21. package/components/button-group/index.cjs +45 -1
  22. package/components/button-group/index.js +37 -25
  23. package/components/calendar/index.cjs +632 -1
  24. package/components/calendar/index.js +637 -7
  25. package/components/checkbox/index.cjs +111 -4
  26. package/components/checkbox/index.js +98 -53
  27. package/components/checkbox-mixin-8cL-vfDy.js +84 -0
  28. package/components/checkbox-mixin-CE7dJj3J.cjs +83 -0
  29. package/components/clear-button-Co6oKSgl.js +59 -0
  30. package/components/clear-button-X_HDY2eH.cjs +58 -0
  31. package/components/close-button-DPBK6Kpu.cjs +59 -0
  32. package/components/close-button-Miw9ZjoJ.js +60 -0
  33. package/components/color-area/index.cjs +440 -13
  34. package/components/color-area/index.js +322 -187
  35. package/components/color-controller-BjDZaxhX.js +491 -0
  36. package/components/color-controller-C3c_vb2P.cjs +490 -0
  37. package/components/color-field/index.cjs +95 -2
  38. package/components/color-field/index.js +77 -41
  39. package/components/color-handle/index.cjs +64 -3
  40. package/components/color-handle/index.js +58 -37
  41. package/components/color-loupe/index.cjs +7 -1
  42. package/components/color-loupe/index.js +12 -8
  43. package/components/color-loupe-BQqNR8YD.cjs +88 -0
  44. package/components/color-loupe-B_DDFv8l.js +89 -0
  45. package/components/color-menu/index.cjs +217 -12
  46. package/components/color-menu/index.js +187 -93
  47. package/components/color-palette/index.cjs +89 -1
  48. package/components/color-palette/index.js +78 -51
  49. package/components/color-palette-group/index.cjs +259 -3
  50. package/components/color-palette-group/index.js +193 -105
  51. package/components/color-picker/index.cjs +114 -6
  52. package/components/color-picker/index.js +92 -72
  53. package/components/color-slider/index.cjs +585 -1
  54. package/components/color-slider/index.js +590 -7
  55. package/components/{directive-oAbCiebi.js → condition-attribute-with-id-Cn815e9W.js} +22 -22
  56. package/components/condition-attribute-with-id-DEc2Yjne.cjs +43 -0
  57. package/components/date-time-picker/index.cjs +1357 -31
  58. package/components/date-time-picker/index.js +951 -637
  59. package/components/dependency-manger-CcIE1uvQ.cjs +63 -0
  60. package/components/{dependency-manger-CEXvGQUV.js → dependency-manger-XHpQjFgK.js} +24 -14
  61. package/components/divider/index.cjs +54 -1
  62. package/components/divider/index.js +49 -30
  63. package/components/divider.module-Cm5LcDRV.cjs +20 -0
  64. package/components/divider.module-DauH6k2_.js +21 -0
  65. package/components/element-resolution-DCsrhGZO.cjs +112 -0
  66. package/components/element-resolution-nMlmW4Jy.js +113 -0
  67. package/components/field-group/index.cjs +7 -1
  68. package/components/field-group/index.js +12 -8
  69. package/components/field-group-DNmY8W9v.cjs +86 -0
  70. package/components/field-group-DVdAWCQF.js +87 -0
  71. package/components/field-label/index.cjs +7 -1
  72. package/components/field-label/index.js +12 -8
  73. package/components/field-label-CKH9EXpR.cjs +156 -0
  74. package/components/field-label-Dpsecoc6.js +157 -0
  75. package/components/focus-group-BqDAk9Is.js +337 -0
  76. package/components/focus-group-DFzOlalL.cjs +336 -0
  77. package/components/focus-visible-B-B8-P9R.cjs +104 -0
  78. package/components/focus-visible-BUPRWlsh.js +105 -0
  79. package/components/focusable-BPrTcZPd.cjs +262 -0
  80. package/components/focusable-ChCLg1k4.js +263 -0
  81. package/components/{directive-C7oCP5Bh.cjs → focusable-selectors-D0t_5P7C.cjs} +16 -5
  82. package/components/{focusable-selectors-B4YgbghQ.js → focusable-selectors-IltOAOd9.js} +7 -4
  83. package/components/icon/index.cjs +90 -1
  84. package/components/icon/index.js +74 -46
  85. package/components/index.cjs +174 -1
  86. package/components/index.js +174 -172
  87. package/components/infield-button/index.cjs +46 -2
  88. package/components/infield-button/index.js +41 -30
  89. package/components/label/index.cjs +37 -1
  90. package/components/label/index.js +36 -24
  91. package/components/{language-resolution-8yZa5r_P.js → language-resolution-BSGJAWiQ.js} +21 -16
  92. package/components/language-resolution-iN9EImbb.cjs +57 -0
  93. package/components/like-anchor-D62faRNG.cjs +79 -0
  94. package/components/like-anchor-v3cJ9RWM.js +80 -0
  95. package/components/manage-help-text-BYx84zZR.cjs +125 -0
  96. package/components/manage-help-text-DOuMTGht.js +126 -0
  97. package/components/menu/index.cjs +1297 -29
  98. package/components/menu/index.js +954 -499
  99. package/components/multi-language-field/index.cjs +132 -2
  100. package/components/multi-language-field/index.js +118 -88
  101. package/components/number-field/index.cjs +613 -10
  102. package/components/number-field/index.js +442 -243
  103. package/components/observe-slot-presence-9AwLGUQ_.cjs +78 -0
  104. package/components/observe-slot-presence-DcMdoumP.js +79 -0
  105. package/components/observe-slot-text-CSofZeeF.cjs +104 -0
  106. package/components/observe-slot-text-CjnkkBPn.js +105 -0
  107. package/components/options/index.cjs +693 -60
  108. package/components/options/index.js +519 -953
  109. package/components/overlay/index.cjs +367 -21
  110. package/components/overlay/index.js +273 -189
  111. package/components/overlay-CN8ISP1F.js +2485 -0
  112. package/components/overlay-LViy9VWM.cjs +2484 -0
  113. package/components/{pending-state-DTX7ggyF.js → pending-state-CXbe-Xul.js} +28 -13
  114. package/components/pending-state-e4RbXe9u.cjs +75 -0
  115. package/components/picker/index.cjs +9 -1
  116. package/components/picker/index.js +15 -11
  117. package/components/picker-DNde3awt.cjs +672 -0
  118. package/components/picker-PfUAF05y.js +673 -0
  119. package/components/picker-button/index.cjs +56 -4
  120. package/components/picker-button/index.js +45 -34
  121. package/components/platform-CxDar3Dn.cjs +68 -0
  122. package/components/platform-Cxn0WbyT.js +69 -0
  123. package/components/popover/index.cjs +7 -1
  124. package/components/popover/index.js +12 -8
  125. package/components/popover-BkbYhl3i.js +74 -0
  126. package/components/popover-BkgUf0kL.cjs +74 -0
  127. package/components/progress-circle/index.cjs +7 -1
  128. package/components/progress-circle/index.js +12 -8
  129. package/components/progress-circle-Hu_ivPHf.js +133 -0
  130. package/components/progress-circle-_Etqsj9f.cjs +132 -0
  131. package/components/radio/index.cjs +244 -2
  132. package/components/radio/index.js +192 -110
  133. package/components/{when-CDK1Tt5Y.js → random-id-BE6HA503.cjs} +7 -10
  134. package/components/{random-id-ByCz1xaq.js → random-id-BEc6QIUL.js} +3 -3
  135. package/components/roving-tabindex-AsmAh2In.cjs +95 -0
  136. package/components/roving-tabindex-DPF9NmrH.js +96 -0
  137. package/components/search/index.cjs +115 -8
  138. package/components/search/index.js +96 -66
  139. package/components/select/index.cjs +720 -51
  140. package/components/select/index.js +563 -347
  141. package/components/sized-mixin-DmkrNdWB.js +80 -0
  142. package/components/sized-mixin-UaTVa-AE.cjs +79 -0
  143. package/components/slider/index.cjs +119 -1
  144. package/components/slider/index.js +100 -1113
  145. package/components/{condition-attribute-with-id-Dv4lSRbe.js → slottable-request-event-CANixJnR.cjs} +15 -13
  146. package/components/{slottable-request-event-DggLA4Rx.js → slottable-request-event-D9WzrdWv.js} +12 -9
  147. package/components/strategies-DlMlaSJR.cjs +317 -0
  148. package/components/strategies-DlPQoTFE.js +318 -0
  149. package/components/streaming-listener-D4sHaMub.cjs +145 -0
  150. package/components/streaming-listener-cAz5zJyk.js +146 -0
  151. package/components/swatch/index.cjs +436 -7
  152. package/components/swatch/index.js +350 -205
  153. package/components/switch/index.cjs +61 -2
  154. package/components/switch/index.js +51 -34
  155. package/components/tabs/index.cjs +693 -26
  156. package/components/tabs/index.js +521 -388
  157. package/components/tags/index.cjs +201 -4
  158. package/components/tags/index.js +152 -87
  159. package/components/text-field/index.cjs +49 -3
  160. package/components/text-field/index.js +44 -30
  161. package/components/text-field-11tcnftU.cjs +338 -0
  162. package/components/text-field-Chi9J2Cz.js +339 -0
  163. package/components/text-field.module-CMBS0jSL.js +21 -0
  164. package/components/text-field.module-DIJdV_sA.cjs +20 -0
  165. package/components/toast/index.cjs +177 -12
  166. package/components/toast/index.js +145 -73
  167. package/components/tooltip/index.cjs +221 -6
  168. package/components/tooltip/index.js +156 -109
  169. package/components/unit-input/index.cjs +232 -8
  170. package/components/unit-input/index.js +201 -108
  171. package/components/utils.cjs +25 -1
  172. package/components/utils.js +22 -22
  173. package/package.json +1 -1
  174. package/components/NumberFormatter-DewVDY5w.cjs +0 -18
  175. package/components/NumberFormatter-DgOUVrge.js +0 -136
  176. package/components/NumberParser-Dik4a0h-.cjs +0 -18
  177. package/components/NumberParser-ci9J5EKv.js +0 -173
  178. package/components/action-group-DBImibFn.js +0 -258
  179. package/components/action-group-DJGMcRHb.cjs +0 -20
  180. package/components/async-directive-BX1T1e1_.cjs +0 -22
  181. package/components/async-directive-BfcqVjDp.js +0 -82
  182. package/components/base-BjTwmyRF.cjs +0 -22
  183. package/components/base-CBCg3yyw.cjs +0 -40
  184. package/components/base-D76d76ww.js +0 -26
  185. package/components/base-WsynuqaS.js +0 -677
  186. package/components/button-base-DbkDzb71.js +0 -144
  187. package/components/button-base-XgPLmwP-.cjs +0 -25
  188. package/components/checkbox-mixin-BDN0dBtS.cjs +0 -27
  189. package/components/checkbox-mixin-Do7EgtpQ.js +0 -70
  190. package/components/class-map-Di1D_rCm.cjs +0 -22
  191. package/components/class-map-NbVXqBU0.js +0 -51
  192. package/components/clear-button-DQcRdcUa.js +0 -53
  193. package/components/clear-button-OFUFFe7G.cjs +0 -18
  194. package/components/close-button-Cbnb7XXj.cjs +0 -18
  195. package/components/close-button-CqHYZhum.js +0 -51
  196. package/components/color-controller-B0uX6Zso.js +0 -3230
  197. package/components/color-controller-CoUL5f9K.cjs +0 -18
  198. package/components/color-loupe-CaA_Lfkk.cjs +0 -56
  199. package/components/color-loupe-CmMsXbjT.js +0 -81
  200. package/components/condition-attribute-with-id-DrQYZzFS.cjs +0 -18
  201. package/components/dependency-manger-C5HCkMMB.cjs +0 -18
  202. package/components/directive-helpers-Cm6gitnu.js +0 -62
  203. package/components/directive-helpers-DyIRTWwA.cjs +0 -22
  204. package/components/divider.module-DDvBo9zo.cjs +0 -18
  205. package/components/divider.module-DoQWQEIJ.js +0 -21
  206. package/components/element-resolution-BvRLGqIU.cjs +0 -18
  207. package/components/element-resolution-FCUT-wql.js +0 -91
  208. package/components/field-group-DXfBWrkO.js +0 -66
  209. package/components/field-group-DkGst3r5.cjs +0 -23
  210. package/components/field-label-CZ2zzChK.js +0 -106
  211. package/components/field-label-mO1AkUgR.cjs +0 -25
  212. package/components/flow-D-0MTYCm.js +0 -527
  213. package/components/flow-DM3dNAKs.cjs +0 -30
  214. package/components/focus-group-DHeTq18L.js +0 -218
  215. package/components/focus-group-DnxZUBhQ.cjs +0 -18
  216. package/components/focus-visible-B0P9aY_G.cjs +0 -18
  217. package/components/focus-visible-DBlJGoEW.js +0 -74
  218. package/components/focusable-BxtpnzWp.js +0 -153
  219. package/components/focusable-EbipgXRh.cjs +0 -18
  220. package/components/focusable-selectors-BgFlyFcY.cjs +0 -18
  221. package/components/if-defined-C9YGdo33.cjs +0 -22
  222. package/components/if-defined-DOaE2coe.js +0 -27
  223. package/components/index-BwxgAdzi.cjs +0 -57
  224. package/components/index-Cl54m8Yh.js +0 -1490
  225. package/components/index-HjQa8tew.js +0 -1174
  226. package/components/index-Wq3qZJGh.cjs +0 -113
  227. package/components/language-resolution-DJzmyzZq.cjs +0 -18
  228. package/components/like-anchor-Bvn_vLQ8.js +0 -69
  229. package/components/like-anchor-sod1C1fR.cjs +0 -32
  230. package/components/luzmo-icons-4nDFv1Lq.js +0 -229
  231. package/components/luzmo-icons-D4IvHgVd.cjs +0 -29
  232. package/components/manage-help-text-DhgARkZX.cjs +0 -30
  233. package/components/manage-help-text-syYnjKGL.js +0 -92
  234. package/components/mutation-controller-DH7YOCyj.js +0 -52
  235. package/components/mutation-controller-DkOMCW-c.cjs +0 -22
  236. package/components/observe-slot-presence-CmVi0zTc.js +0 -68
  237. package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
  238. package/components/observe-slot-text-BPfIQQtz.js +0 -87
  239. package/components/observe-slot-text-Ceb7SvYT.cjs +0 -18
  240. package/components/overlay-Cig9r6uU.js +0 -2747
  241. package/components/overlay-KSKMzzkh.cjs +0 -47
  242. package/components/pending-state-CaH1si5b.cjs +0 -26
  243. package/components/picker-BfBP7XJN.js +0 -461
  244. package/components/picker-xIphqE6d.cjs +0 -123
  245. package/components/platform-BM-uMWpX.js +0 -69
  246. package/components/platform-BiXhwqk3.cjs +0 -18
  247. package/components/popover-DjX0aAnY.js +0 -67
  248. package/components/popover-KFfO0IYL.cjs +0 -30
  249. package/components/progress-circle-BvRJNuNo.cjs +0 -33
  250. package/components/progress-circle-DXH9z8-6.js +0 -97
  251. package/components/query-BL-TJj7K.cjs +0 -22
  252. package/components/query-D_KR_GUc.js +0 -51
  253. package/components/query-assigned-elements-DjfhL1cl.js +0 -36
  254. package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
  255. package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
  256. package/components/query-assigned-nodes-C76XVPWY.js +0 -36
  257. package/components/random-id-CqvckpWe.cjs +0 -18
  258. package/components/roving-tabindex-By_fCy_e.cjs +0 -18
  259. package/components/roving-tabindex-DOg4z6ZU.js +0 -66
  260. package/components/sized-mixin-CPxE5C96.cjs +0 -18
  261. package/components/sized-mixin-D4ACoVUr.js +0 -63
  262. package/components/slottable-request-event-BfUUt1Mh.cjs +0 -18
  263. package/components/state-D8JEtYqe.cjs +0 -22
  264. package/components/state-Deh-vKYE.js +0 -29
  265. package/components/strategies-9indNIEb.js +0 -195
  266. package/components/strategies-BACP6MhR.cjs +0 -18
  267. package/components/streaming-listener-B00MvALi.cjs +0 -18
  268. package/components/streaming-listener-CP-JE6Fa.js +0 -91
  269. package/components/style-map-CeilmSgs.cjs +0 -22
  270. package/components/style-map-IgqIKvlE.js +0 -53
  271. package/components/text-field-CeG75PPO.cjs +0 -85
  272. package/components/text-field-DCl-AFM-.js +0 -314
  273. package/components/text-field.module-C2KVUJcX.js +0 -21
  274. package/components/text-field.module-DXhFA9G-.cjs +0 -18
  275. package/components/when-CDZyJPvd.cjs +0 -22
@@ -15,42 +15,53 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- import { K as z } from "../luzmo-icons-4nDFv1Lq.js";
19
- import { r as b, x as r, n as c } from "../base-WsynuqaS.js";
20
- import { r as h } from "../state-Deh-vKYE.js";
21
- import { o as a } from "../if-defined-DOaE2coe.js";
22
- import { O as p } from "../observe-slot-presence-CmVi0zTc.js";
23
- import { O as f } from "../observe-slot-text-BPfIQQtz.js";
24
- import { S as g } from "../slottable-request-event-DggLA4Rx.js";
25
- import { L as x, D as v } from "../picker-BfBP7XJN.js";
18
+ const initializeGlobalLuzmoCSSVariables = () => {
19
+ if (typeof document !== "undefined" && !document.querySelector("style[data-luzmo-vars]")) {
20
+ const styleElement = document.createElement("style");
21
+ styleElement.setAttribute("data-luzmo-vars", "");
22
+ styleElement.textContent = `html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}`;
23
+ document.head.appendChild(styleElement);
24
+ }
25
+ };
26
+ initializeGlobalLuzmoCSSVariables();
27
+ import { luzmoEllipsisHorizontal } from "@luzmo/icons";
28
+ import { unsafeCSS, html } from "lit";
29
+ import { property, state } from "lit/decorators.js";
30
+ import { ifDefined } from "lit/directives/if-defined.js";
31
+ import { O as ObserveSlotPresence } from "../observe-slot-presence-DcMdoumP.js";
32
+ import { O as ObserveSlotText } from "../observe-slot-text-CjnkkBPn.js";
33
+ import { S as SlottableRequestEvent } from "../slottable-request-event-D9WzrdWv.js";
34
+ import { L as LuzmoPickerBase, D as DESCRIPTION_ID } from "../picker-PfUAF05y.js";
26
35
  import "../action-button/index.js";
27
36
  import "../icon/index.js";
28
37
  import "../overlay/index.js";
29
38
  import "../popover/index.js";
30
- const d = () => {
31
- if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
32
- const l = document.createElement("style");
33
- 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-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(l);
34
- }
39
+ const actionMenuStyles = ":host{display:inline-flex}:host([quiet]){min-width:0}:host>luzmo-menu{display:none}::slotted([slot=icon]){flex-shrink:0}.icon{flex-shrink:0}#popover{max-width:none}:host([dir=ltr]) ::slotted([slot=icon]),:host([dir=ltr]) .icon{margin-left:calc(-1 * (var(--luzmo-action-button-textonly-padding-left-adjusted) - var(--luzmo-action-button-padding-left-adjusted)))}:host([dir=rtl]) ::slotted([slot=icon]),:host([dir=rtl]) .icon{margin-right:calc(-1 * (var(--luzmo-action-button-textonly-padding-left-adjusted) - var(--luzmo-action-button-padding-left-adjusted)))}:host([dir]) slot[icon-only]::slotted([slot=icon]),:host([dir]) slot[icon-only] .icon{margin-inline:calc((var(--luzmo-action-button-edge-to-text, var(--action-button-edge-to-text)) - var(--luzmo-action-button-edge-to-visual-only, var(--action-button-edge-to-visual-only))) * -1)}luzmo-overlay:not(:defined){display:none}";
40
+ var __defProp = Object.defineProperty;
41
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
42
+ var __decorateClass = (decorators, target, key, kind) => {
43
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
44
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
45
+ if (decorator = decorators[i])
46
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
47
+ if (kind && result) __defProp(target, key, result);
48
+ return result;
35
49
  };
36
- d();
37
- const y = ":host{display:inline-flex}:host([quiet]){min-width:0}:host>luzmo-menu{display:none}::slotted([slot=icon]){flex-shrink:0}.icon{flex-shrink:0}#popover{max-width:none}:host([dir=ltr]) ::slotted([slot=icon]),:host([dir=ltr]) .icon{margin-left:calc(-1 * (var(--luzmo-action-button-textonly-padding-left-adjusted) - var(--luzmo-action-button-padding-left-adjusted)))}:host([dir=rtl]) ::slotted([slot=icon]),:host([dir=rtl]) .icon{margin-right:calc(-1 * (var(--luzmo-action-button-textonly-padding-left-adjusted) - var(--luzmo-action-button-padding-left-adjusted)))}:host([dir]) slot[icon-only]::slotted([slot=icon]),:host([dir]) slot[icon-only] .icon{margin-inline:calc((var(--luzmo-action-button-edge-to-text, var(--action-button-edge-to-text)) - var(--luzmo-action-button-edge-to-visual-only, var(--action-button-edge-to-visual-only))) * -1)}luzmo-overlay:not(:defined){display:none}";
38
- var w = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, m = (l, o, n, t) => {
39
- for (var e = t > 1 ? void 0 : t ? $(o, n) : o, u = l.length - 1, s; u >= 0; u--)
40
- (s = l[u]) && (e = (t ? s(o, n, e) : s(e)) || e);
41
- return t && e && w(o, n, e), e;
42
- };
43
- class i extends p(
44
- f(x, "label"),
50
+ class LuzmoActionMenu extends ObserveSlotPresence(
51
+ ObserveSlotText(LuzmoPickerBase, "label"),
45
52
  '[slot="label-only"]'
46
53
  ) {
47
54
  constructor() {
48
- super(...arguments), this.selects = void 0, this.listRole = "menu", this.itemRole = "menuitem", this.handleSlottableRequest = (o) => {
49
- this.dispatchEvent(new g(o.name, o.data));
55
+ super(...arguments);
56
+ this.selects = void 0;
57
+ this.listRole = "menu";
58
+ this.itemRole = "menuitem";
59
+ this.handleSlottableRequest = (event) => {
60
+ this.dispatchEvent(new SlottableRequestEvent(event.name, event.data));
50
61
  };
51
62
  }
52
63
  static get styles() {
53
- return [b(y)];
64
+ return [unsafeCSS(actionMenuStyles)];
54
65
  }
55
66
  get hasLabel() {
56
67
  return this.slotHasContent;
@@ -60,8 +71,8 @@ class i extends p(
60
71
  }
61
72
  get buttonContent() {
62
73
  return [
63
- r`
64
- ${this.labelOnly ? r`` : r`
74
+ html`
75
+ ${this.labelOnly ? html`` : html`
65
76
  <slot
66
77
  name="icon"
67
78
  slot="icon"
@@ -70,7 +81,7 @@ class i extends p(
70
81
  >
71
82
  <luzmo-icon
72
83
  class="icon"
73
- .icon=${z}
84
+ .icon=${luzmoEllipsisHorizontal}
74
85
  size=${this.size}
75
86
  ></luzmo-icon>
76
87
  </slot>
@@ -82,15 +93,18 @@ class i extends p(
82
93
  ];
83
94
  }
84
95
  render() {
85
- return this.tooltipEl && (this.tooltipEl.disabled = this.open), r`
96
+ if (this.tooltipEl) {
97
+ this.tooltipEl.disabled = this.open;
98
+ }
99
+ return html`
86
100
  <luzmo-action-button
87
- aria-describedby=${v}
101
+ aria-describedby=${DESCRIPTION_ID}
88
102
  ?quiet=${this.quiet}
89
- static-color=${a(this.staticColor)}
103
+ static-color=${ifDefined(this.staticColor)}
90
104
  aria-haspopup="true"
91
- aria-controls=${a(this.open ? "menu" : void 0)}
105
+ aria-controls=${ifDefined(this.open ? "menu" : void 0)}
92
106
  aria-expanded=${this.open ? "true" : "false"}
93
- aria-label=${a(this.label || void 0)}
107
+ aria-label=${ifDefined(this.label || void 0)}
94
108
  id="button"
95
109
  class="button"
96
110
  size=${this.size}
@@ -98,7 +112,7 @@ class i extends p(
98
112
  @focus=${this.handleButtonFocus}
99
113
  @keydown=${{
100
114
  handleEvent: this.handleEnterKeydown,
101
- capture: !0
115
+ capture: true
102
116
  }}
103
117
  ?disabled=${this.disabled}
104
118
  >
@@ -107,20 +121,25 @@ class i extends p(
107
121
  ${this.renderMenu} ${this.renderDescriptionSlot}
108
122
  `;
109
123
  }
110
- update(o) {
111
- o.has("invalid") && (this.invalid = !1), super.update(o);
124
+ update(changedProperties) {
125
+ if (changedProperties.has("invalid")) {
126
+ this.invalid = false;
127
+ }
128
+ super.update(changedProperties);
112
129
  }
113
130
  }
114
- m([
115
- c({ type: String })
116
- ], i.prototype, "selects", 2);
117
- m([
118
- c({ reflect: !0, attribute: "static-color" })
119
- ], i.prototype, "staticColor", 2);
120
- m([
121
- h()
122
- ], i.prototype, "labelOnly", 1);
123
- customElements.get("luzmo-action-menu") || customElements.define("luzmo-action-menu", i);
131
+ __decorateClass([
132
+ property({ type: String })
133
+ ], LuzmoActionMenu.prototype, "selects", 2);
134
+ __decorateClass([
135
+ property({ reflect: true, attribute: "static-color" })
136
+ ], LuzmoActionMenu.prototype, "staticColor", 2);
137
+ __decorateClass([
138
+ state()
139
+ ], LuzmoActionMenu.prototype, "labelOnly", 1);
140
+ if (!customElements.get("luzmo-action-menu")) {
141
+ customElements.define("luzmo-action-menu", LuzmoActionMenu);
142
+ }
124
143
  export {
125
- i as LuzmoActionMenu
144
+ LuzmoActionMenu
126
145
  };
@@ -15,10 +15,70 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../base-CBCg3yyw.cjs"),l=require("../query-BL-TJj7K.cjs"),d=require("../if-defined-C9YGdo33.cjs"),u=require("../focusable-EbipgXRh.cjs"),z=require("../like-anchor-sod1C1fR.cjs"),c=require("../sized-mixin-CPxE5C96.cjs"),h='@media (forced-colors: active){:host{--highcontrast-avatar-focus-indicator-color: CanvasText}}:host{--avatar-border-radius: var( --luzmo-avatar-border-radius, var(--luzmo-avatar-size, var(--avatar-size)) );inline-size:var(--luzmo-avatar-size, var(--avatar-size));block-size:var(--luzmo-avatar-size, var(--avatar-size));border-radius:var(--avatar-border-radius);-webkit-user-drag:none;-webkit-user-select:none;user-select:none;opacity:var(--luzmo-avatar-color-opacity, var(--avatar-color-opacity));border-width:0;outline:none;display:inline-block;position:relative;overflow:visible}:host([disabled]){opacity:var(--highcontrast-avatar-color-opacity-disabled, var(--luzmo-avatar-color-opacity-disabled, var(--avatar-color-opacity-disabled)))}:host(:not([disabled])) .is-focused:after,:host(:not([disabled])) .link:focus-visible:after{pointer-events:none;content:"";inline-size:calc(var(--luzmo-avatar-custom-size, var(--luzmo-avatar-size, var(--avatar-size))) + var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) * 2);block-size:calc(var(--luzmo-avatar-custom-size, var(--luzmo-avatar-size, var(--avatar-size))) + var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) * 2);border-style:solid;border-width:var(--luzmo-avatar-focus-indicator-width, var(--avatar-focus-indicator-width));border-color:var(--highcontrast-avatar-focus-indicator-color, var(--luzmo-avatar-focus-indicator-color, var(--avatar-focus-indicator-color)));border-radius:var(--avatar-border-radius);position:absolute;inset-block-start:calc((var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) + var(--luzmo-avatar-focus-indicator-width, var(--avatar-focus-indicator-width))) * -1);inset-inline-start:calc((var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) + var(--luzmo-avatar-focus-indicator-width, var(--avatar-focus-indicator-width))) * -1)}.link{outline:0}.image{inline-size:var(--luzmo-avatar-size, var(--avatar-size));block-size:var(--luzmo-avatar-size, var(--avatar-size));border-radius:var(--avatar-border-radius)}:host([rounding=none]){border-radius:0}:host([rounding=none]) img{border-radius:0}:host([rounding=full]){border-radius:100%}:host([rounding=full]) img{border-radius:100%}:host([border=light]){border:var(--luzmo-avatar-border-width, var(--avatar-border-width)) solid var(--luzmo-avatar-border-color, var(--avatar-border-color))}:host([border=none]){border:0}:host{--avatar-color-opacity: 1;--avatar-border-width: var(--luzmo-border-width);--avatar-border-color: var(--luzmo-border-color);--avatar-size: 32px;--avatar-focus-indicator-width: var(--luzmo-indicator-width);--avatar-focus-indicator-gap: var(--luzmo-indicator-gap);--avatar-focus-indicator-color: var(--luzmo-indicator-color);--avatar-color-opacity-disabled: .3}:host([size=xxs]){--avatar-size: var(--luzmo-component-height-xxs)}:host([size=xs]){--avatar-size: var(--luzmo-component-height-xs)}:host([size=s]){--avatar-size: var(--luzmo-component-height-s)}:host{--avatar-size: var(--luzmo-component-height)}:host([size=l]){--avatar-size: var(--luzmo-component-height-l)}:host([size=xl]){--avatar-size: var(--luzmo-component-height-xl)}:host([size=xxl]){--avatar-size: var(--luzmo-component-height-xxl)}img{vertical-align:top}';var m=Object.defineProperty,i=(e,o,v,b)=>{for(var a=void 0,s=e.length-1,n;s>=0;s--)(n=e[s])&&(a=n(o,v,a)||a);return a&&m(o,v,a),a};class r extends z.LikeAnchor(c.SizedMixin(u.Focusable,{validSizes:Object.values(c.ElementSizes)})){constructor(){super(...arguments),this.src=""}static get styles(){return[t.r(h)]}get focusElement(){return this.anchorElement||this}render(){const o=t.x`
18
+ "use strict";
19
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
20
+ const lit = require("lit");
21
+ const decorators_js = require("lit/decorators.js");
22
+ const ifDefined_js = require("lit/directives/if-defined.js");
23
+ const focusable = require("../focusable-BPrTcZPd.cjs");
24
+ const likeAnchor = require("../like-anchor-D62faRNG.cjs");
25
+ const sizedMixin = require("../sized-mixin-UaTVa-AE.cjs");
26
+ const avatarStyles = '@media (forced-colors: active){:host{--highcontrast-avatar-focus-indicator-color: CanvasText}}:host{--avatar-border-radius: var( --luzmo-avatar-border-radius, var(--luzmo-avatar-size, var(--avatar-size)) );inline-size:var(--luzmo-avatar-size, var(--avatar-size));block-size:var(--luzmo-avatar-size, var(--avatar-size));border-radius:var(--avatar-border-radius);-webkit-user-drag:none;-webkit-user-select:none;user-select:none;opacity:var(--luzmo-avatar-color-opacity, var(--avatar-color-opacity));border-width:0;outline:none;display:inline-block;position:relative;overflow:visible}:host([disabled]){opacity:var(--highcontrast-avatar-color-opacity-disabled, var(--luzmo-avatar-color-opacity-disabled, var(--avatar-color-opacity-disabled)))}:host(:not([disabled])) .is-focused:after,:host(:not([disabled])) .link:focus-visible:after{pointer-events:none;content:"";inline-size:calc(var(--luzmo-avatar-custom-size, var(--luzmo-avatar-size, var(--avatar-size))) + var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) * 2);block-size:calc(var(--luzmo-avatar-custom-size, var(--luzmo-avatar-size, var(--avatar-size))) + var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) * 2);border-style:solid;border-width:var(--luzmo-avatar-focus-indicator-width, var(--avatar-focus-indicator-width));border-color:var(--highcontrast-avatar-focus-indicator-color, var(--luzmo-avatar-focus-indicator-color, var(--avatar-focus-indicator-color)));border-radius:var(--avatar-border-radius);position:absolute;inset-block-start:calc((var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) + var(--luzmo-avatar-focus-indicator-width, var(--avatar-focus-indicator-width))) * -1);inset-inline-start:calc((var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) + var(--luzmo-avatar-focus-indicator-width, var(--avatar-focus-indicator-width))) * -1)}.link{outline:0}.image{inline-size:var(--luzmo-avatar-size, var(--avatar-size));block-size:var(--luzmo-avatar-size, var(--avatar-size));border-radius:var(--avatar-border-radius)}:host([rounding=none]){border-radius:0}:host([rounding=none]) img{border-radius:0}:host([rounding=full]){border-radius:100%}:host([rounding=full]) img{border-radius:100%}:host([border=light]){border:var(--luzmo-avatar-border-width, var(--avatar-border-width)) solid var(--luzmo-avatar-border-color, var(--avatar-border-color))}:host([border=none]){border:0}:host{--avatar-color-opacity: 1;--avatar-border-width: var(--luzmo-border-width);--avatar-border-color: var(--luzmo-border-color);--avatar-size: 32px;--avatar-focus-indicator-width: var(--luzmo-indicator-width);--avatar-focus-indicator-gap: var(--luzmo-indicator-gap);--avatar-focus-indicator-color: var(--luzmo-indicator-color);--avatar-color-opacity-disabled: .3}:host([size=xxs]){--avatar-size: var(--luzmo-component-height-xxs)}:host([size=xs]){--avatar-size: var(--luzmo-component-height-xs)}:host([size=s]){--avatar-size: var(--luzmo-component-height-s)}:host{--avatar-size: var(--luzmo-component-height)}:host([size=l]){--avatar-size: var(--luzmo-component-height-l)}:host([size=xl]){--avatar-size: var(--luzmo-component-height-xl)}:host([size=xxl]){--avatar-size: var(--luzmo-component-height-xxl)}img{vertical-align:top}';
27
+ var __defProp = Object.defineProperty;
28
+ var __decorateClass = (decorators, target, key, kind) => {
29
+ var result = void 0;
30
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
31
+ if (decorator = decorators[i])
32
+ result = decorator(target, key, result) || result;
33
+ if (result) __defProp(target, key, result);
34
+ return result;
35
+ };
36
+ class LuzmoAvatar extends likeAnchor.LikeAnchor(
37
+ sizedMixin.SizedMixin(focusable.Focusable, {
38
+ validSizes: Object.values(sizedMixin.ElementSizes)
39
+ })
40
+ ) {
41
+ constructor() {
42
+ super(...arguments);
43
+ this.src = "";
44
+ }
45
+ static get styles() {
46
+ return [lit.unsafeCSS(avatarStyles)];
47
+ }
48
+ get focusElement() {
49
+ return this.anchorElement || this;
50
+ }
51
+ render() {
52
+ const avatar = lit.html`
19
53
  <img
20
54
  class="image"
21
- alt=${d.o(this.label||void 0)}
55
+ alt=${ifDefined_js.ifDefined(this.label || void 0)}
22
56
  src=${this.src}
23
57
  />
24
- `;return this.href?this.renderAnchor({id:"link",className:"link",anchorContent:o}):o}}i([t.n({type:String,reflect:!0})],r.prototype,"border");i([t.n({type:String,reflect:!0})],r.prototype,"rounding");i([l.e("#link")],r.prototype,"anchorElement");i([t.n()],r.prototype,"src");customElements.get("luzmo-avatar")||customElements.define("luzmo-avatar",r);exports.LuzmoAvatar=r;
58
+ `;
59
+ if (this.href) {
60
+ return this.renderAnchor({
61
+ id: "link",
62
+ className: "link",
63
+ anchorContent: avatar
64
+ });
65
+ }
66
+ return avatar;
67
+ }
68
+ }
69
+ __decorateClass([
70
+ decorators_js.property({ type: String, reflect: true })
71
+ ], LuzmoAvatar.prototype, "border");
72
+ __decorateClass([
73
+ decorators_js.property({ type: String, reflect: true })
74
+ ], LuzmoAvatar.prototype, "rounding");
75
+ __decorateClass([
76
+ decorators_js.query("#link")
77
+ ], LuzmoAvatar.prototype, "anchorElement");
78
+ __decorateClass([
79
+ decorators_js.property()
80
+ ], LuzmoAvatar.prototype, "src");
81
+ if (!customElements.get("luzmo-avatar")) {
82
+ customElements.define("luzmo-avatar", LuzmoAvatar);
83
+ }
84
+ exports.LuzmoAvatar = LuzmoAvatar;
@@ -15,67 +15,79 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- import { r as n, x as m, n as i } from "../base-WsynuqaS.js";
19
- import { e as d } from "../query-D_KR_GUc.js";
20
- import { o as z } from "../if-defined-DOaE2coe.js";
21
- import { F as v } from "../focusable-BxtpnzWp.js";
22
- import { L as b } from "../like-anchor-Bvn_vLQ8.js";
23
- import { S as f, E as h } from "../sized-mixin-D4ACoVUr.js";
24
- const u = () => {
25
- if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
26
- const o = document.createElement("style");
27
- o.setAttribute("data-luzmo-vars", ""), o.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(o);
18
+ const initializeGlobalLuzmoCSSVariables = () => {
19
+ if (typeof document !== "undefined" && !document.querySelector("style[data-luzmo-vars]")) {
20
+ const styleElement = document.createElement("style");
21
+ styleElement.setAttribute("data-luzmo-vars", "");
22
+ styleElement.textContent = `html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}`;
23
+ document.head.appendChild(styleElement);
28
24
  }
29
25
  };
30
- u();
31
- const g = '@media (forced-colors: active){:host{--highcontrast-avatar-focus-indicator-color: CanvasText}}:host{--avatar-border-radius: var( --luzmo-avatar-border-radius, var(--luzmo-avatar-size, var(--avatar-size)) );inline-size:var(--luzmo-avatar-size, var(--avatar-size));block-size:var(--luzmo-avatar-size, var(--avatar-size));border-radius:var(--avatar-border-radius);-webkit-user-drag:none;-webkit-user-select:none;user-select:none;opacity:var(--luzmo-avatar-color-opacity, var(--avatar-color-opacity));border-width:0;outline:none;display:inline-block;position:relative;overflow:visible}:host([disabled]){opacity:var(--highcontrast-avatar-color-opacity-disabled, var(--luzmo-avatar-color-opacity-disabled, var(--avatar-color-opacity-disabled)))}:host(:not([disabled])) .is-focused:after,:host(:not([disabled])) .link:focus-visible:after{pointer-events:none;content:"";inline-size:calc(var(--luzmo-avatar-custom-size, var(--luzmo-avatar-size, var(--avatar-size))) + var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) * 2);block-size:calc(var(--luzmo-avatar-custom-size, var(--luzmo-avatar-size, var(--avatar-size))) + var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) * 2);border-style:solid;border-width:var(--luzmo-avatar-focus-indicator-width, var(--avatar-focus-indicator-width));border-color:var(--highcontrast-avatar-focus-indicator-color, var(--luzmo-avatar-focus-indicator-color, var(--avatar-focus-indicator-color)));border-radius:var(--avatar-border-radius);position:absolute;inset-block-start:calc((var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) + var(--luzmo-avatar-focus-indicator-width, var(--avatar-focus-indicator-width))) * -1);inset-inline-start:calc((var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) + var(--luzmo-avatar-focus-indicator-width, var(--avatar-focus-indicator-width))) * -1)}.link{outline:0}.image{inline-size:var(--luzmo-avatar-size, var(--avatar-size));block-size:var(--luzmo-avatar-size, var(--avatar-size));border-radius:var(--avatar-border-radius)}:host([rounding=none]){border-radius:0}:host([rounding=none]) img{border-radius:0}:host([rounding=full]){border-radius:100%}:host([rounding=full]) img{border-radius:100%}:host([border=light]){border:var(--luzmo-avatar-border-width, var(--avatar-border-width)) solid var(--luzmo-avatar-border-color, var(--avatar-border-color))}:host([border=none]){border:0}:host{--avatar-color-opacity: 1;--avatar-border-width: var(--luzmo-border-width);--avatar-border-color: var(--luzmo-border-color);--avatar-size: 32px;--avatar-focus-indicator-width: var(--luzmo-indicator-width);--avatar-focus-indicator-gap: var(--luzmo-indicator-gap);--avatar-focus-indicator-color: var(--luzmo-indicator-color);--avatar-color-opacity-disabled: .3}:host([size=xxs]){--avatar-size: var(--luzmo-component-height-xxs)}:host([size=xs]){--avatar-size: var(--luzmo-component-height-xs)}:host([size=s]){--avatar-size: var(--luzmo-component-height-s)}:host{--avatar-size: var(--luzmo-component-height)}:host([size=l]){--avatar-size: var(--luzmo-component-height-l)}:host([size=xl]){--avatar-size: var(--luzmo-component-height-xl)}:host([size=xxl]){--avatar-size: var(--luzmo-component-height-xxl)}img{vertical-align:top}';
32
- var p = Object.defineProperty, l = (o, a, c, x) => {
33
- for (var r = void 0, t = o.length - 1, s; t >= 0; t--)
34
- (s = o[t]) && (r = s(a, c, r) || r);
35
- return r && p(a, c, r), r;
26
+ initializeGlobalLuzmoCSSVariables();
27
+ import { unsafeCSS, html } from "lit";
28
+ import { property, query } from "lit/decorators.js";
29
+ import { ifDefined } from "lit/directives/if-defined.js";
30
+ import { F as Focusable } from "../focusable-ChCLg1k4.js";
31
+ import { L as LikeAnchor } from "../like-anchor-v3cJ9RWM.js";
32
+ import { S as SizedMixin, E as ElementSizes } from "../sized-mixin-DmkrNdWB.js";
33
+ const avatarStyles = '@media (forced-colors: active){:host{--highcontrast-avatar-focus-indicator-color: CanvasText}}:host{--avatar-border-radius: var( --luzmo-avatar-border-radius, var(--luzmo-avatar-size, var(--avatar-size)) );inline-size:var(--luzmo-avatar-size, var(--avatar-size));block-size:var(--luzmo-avatar-size, var(--avatar-size));border-radius:var(--avatar-border-radius);-webkit-user-drag:none;-webkit-user-select:none;user-select:none;opacity:var(--luzmo-avatar-color-opacity, var(--avatar-color-opacity));border-width:0;outline:none;display:inline-block;position:relative;overflow:visible}:host([disabled]){opacity:var(--highcontrast-avatar-color-opacity-disabled, var(--luzmo-avatar-color-opacity-disabled, var(--avatar-color-opacity-disabled)))}:host(:not([disabled])) .is-focused:after,:host(:not([disabled])) .link:focus-visible:after{pointer-events:none;content:"";inline-size:calc(var(--luzmo-avatar-custom-size, var(--luzmo-avatar-size, var(--avatar-size))) + var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) * 2);block-size:calc(var(--luzmo-avatar-custom-size, var(--luzmo-avatar-size, var(--avatar-size))) + var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) * 2);border-style:solid;border-width:var(--luzmo-avatar-focus-indicator-width, var(--avatar-focus-indicator-width));border-color:var(--highcontrast-avatar-focus-indicator-color, var(--luzmo-avatar-focus-indicator-color, var(--avatar-focus-indicator-color)));border-radius:var(--avatar-border-radius);position:absolute;inset-block-start:calc((var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) + var(--luzmo-avatar-focus-indicator-width, var(--avatar-focus-indicator-width))) * -1);inset-inline-start:calc((var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) + var(--luzmo-avatar-focus-indicator-width, var(--avatar-focus-indicator-width))) * -1)}.link{outline:0}.image{inline-size:var(--luzmo-avatar-size, var(--avatar-size));block-size:var(--luzmo-avatar-size, var(--avatar-size));border-radius:var(--avatar-border-radius)}:host([rounding=none]){border-radius:0}:host([rounding=none]) img{border-radius:0}:host([rounding=full]){border-radius:100%}:host([rounding=full]) img{border-radius:100%}:host([border=light]){border:var(--luzmo-avatar-border-width, var(--avatar-border-width)) solid var(--luzmo-avatar-border-color, var(--avatar-border-color))}:host([border=none]){border:0}:host{--avatar-color-opacity: 1;--avatar-border-width: var(--luzmo-border-width);--avatar-border-color: var(--luzmo-border-color);--avatar-size: 32px;--avatar-focus-indicator-width: var(--luzmo-indicator-width);--avatar-focus-indicator-gap: var(--luzmo-indicator-gap);--avatar-focus-indicator-color: var(--luzmo-indicator-color);--avatar-color-opacity-disabled: .3}:host([size=xxs]){--avatar-size: var(--luzmo-component-height-xxs)}:host([size=xs]){--avatar-size: var(--luzmo-component-height-xs)}:host([size=s]){--avatar-size: var(--luzmo-component-height-s)}:host{--avatar-size: var(--luzmo-component-height)}:host([size=l]){--avatar-size: var(--luzmo-component-height-l)}:host([size=xl]){--avatar-size: var(--luzmo-component-height-xl)}:host([size=xxl]){--avatar-size: var(--luzmo-component-height-xxl)}img{vertical-align:top}';
34
+ var __defProp = Object.defineProperty;
35
+ var __decorateClass = (decorators, target, key, kind) => {
36
+ var result = void 0;
37
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
38
+ if (decorator = decorators[i])
39
+ result = decorator(target, key, result) || result;
40
+ if (result) __defProp(target, key, result);
41
+ return result;
36
42
  };
37
- class e extends b(
38
- f(v, {
39
- validSizes: Object.values(h)
43
+ class LuzmoAvatar extends LikeAnchor(
44
+ SizedMixin(Focusable, {
45
+ validSizes: Object.values(ElementSizes)
40
46
  })
41
47
  ) {
42
48
  constructor() {
43
- super(...arguments), this.src = "";
49
+ super(...arguments);
50
+ this.src = "";
44
51
  }
45
52
  static get styles() {
46
- return [n(g)];
53
+ return [unsafeCSS(avatarStyles)];
47
54
  }
48
55
  get focusElement() {
49
56
  return this.anchorElement || this;
50
57
  }
51
58
  render() {
52
- const a = m`
59
+ const avatar = html`
53
60
  <img
54
61
  class="image"
55
- alt=${z(this.label || void 0)}
62
+ alt=${ifDefined(this.label || void 0)}
56
63
  src=${this.src}
57
64
  />
58
65
  `;
59
- return this.href ? this.renderAnchor({
60
- id: "link",
61
- className: "link",
62
- anchorContent: a
63
- }) : a;
66
+ if (this.href) {
67
+ return this.renderAnchor({
68
+ id: "link",
69
+ className: "link",
70
+ anchorContent: avatar
71
+ });
72
+ }
73
+ return avatar;
64
74
  }
65
75
  }
66
- l([
67
- i({ type: String, reflect: !0 })
68
- ], e.prototype, "border");
69
- l([
70
- i({ type: String, reflect: !0 })
71
- ], e.prototype, "rounding");
72
- l([
73
- d("#link")
74
- ], e.prototype, "anchorElement");
75
- l([
76
- i()
77
- ], e.prototype, "src");
78
- customElements.get("luzmo-avatar") || customElements.define("luzmo-avatar", e);
76
+ __decorateClass([
77
+ property({ type: String, reflect: true })
78
+ ], LuzmoAvatar.prototype, "border");
79
+ __decorateClass([
80
+ property({ type: String, reflect: true })
81
+ ], LuzmoAvatar.prototype, "rounding");
82
+ __decorateClass([
83
+ query("#link")
84
+ ], LuzmoAvatar.prototype, "anchorElement");
85
+ __decorateClass([
86
+ property()
87
+ ], LuzmoAvatar.prototype, "src");
88
+ if (!customElements.get("luzmo-avatar")) {
89
+ customElements.define("luzmo-avatar", LuzmoAvatar);
90
+ }
79
91
  export {
80
- e as LuzmoAvatar
92
+ LuzmoAvatar
81
93
  };
@@ -0,0 +1,119 @@
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;