@luzmo/lucero 1.0.1-alpha.15 → 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 (277) 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 +155 -131
  169. package/components/tooltip/tooltip.d.ts +1 -12
  170. package/components/unit-input/index.cjs +232 -8
  171. package/components/unit-input/index.js +201 -108
  172. package/components/utils.cjs +25 -1
  173. package/components/utils.js +22 -22
  174. package/custom-elements.json +1 -1
  175. package/package.json +1 -1
  176. package/components/NumberFormatter-DewVDY5w.cjs +0 -18
  177. package/components/NumberFormatter-DgOUVrge.js +0 -136
  178. package/components/NumberParser-Dik4a0h-.cjs +0 -18
  179. package/components/NumberParser-ci9J5EKv.js +0 -173
  180. package/components/action-group-DBImibFn.js +0 -258
  181. package/components/action-group-DJGMcRHb.cjs +0 -20
  182. package/components/async-directive-BX1T1e1_.cjs +0 -22
  183. package/components/async-directive-BfcqVjDp.js +0 -82
  184. package/components/base-BjTwmyRF.cjs +0 -22
  185. package/components/base-CBCg3yyw.cjs +0 -40
  186. package/components/base-D76d76ww.js +0 -26
  187. package/components/base-WsynuqaS.js +0 -677
  188. package/components/button-base-DbkDzb71.js +0 -144
  189. package/components/button-base-XgPLmwP-.cjs +0 -25
  190. package/components/checkbox-mixin-BDN0dBtS.cjs +0 -27
  191. package/components/checkbox-mixin-Do7EgtpQ.js +0 -70
  192. package/components/class-map-Di1D_rCm.cjs +0 -22
  193. package/components/class-map-NbVXqBU0.js +0 -51
  194. package/components/clear-button-BbVqNU-g.js +0 -53
  195. package/components/clear-button-DYdeFsS8.cjs +0 -18
  196. package/components/close-button-CpfKibqg.cjs +0 -18
  197. package/components/close-button-DzOZZmkY.js +0 -51
  198. package/components/color-controller-B0uX6Zso.js +0 -3230
  199. package/components/color-controller-CoUL5f9K.cjs +0 -18
  200. package/components/color-loupe-CaA_Lfkk.cjs +0 -56
  201. package/components/color-loupe-CmMsXbjT.js +0 -81
  202. package/components/condition-attribute-with-id-DrQYZzFS.cjs +0 -18
  203. package/components/dependency-manger-C5HCkMMB.cjs +0 -18
  204. package/components/directive-helpers-Cm6gitnu.js +0 -62
  205. package/components/directive-helpers-DyIRTWwA.cjs +0 -22
  206. package/components/divider.module-DDvBo9zo.cjs +0 -18
  207. package/components/divider.module-DoQWQEIJ.js +0 -21
  208. package/components/element-resolution-BvRLGqIU.cjs +0 -18
  209. package/components/element-resolution-FCUT-wql.js +0 -91
  210. package/components/field-group-DXfBWrkO.js +0 -66
  211. package/components/field-group-DkGst3r5.cjs +0 -23
  212. package/components/field-label-CZ2zzChK.js +0 -106
  213. package/components/field-label-mO1AkUgR.cjs +0 -25
  214. package/components/flow-D-0MTYCm.js +0 -527
  215. package/components/flow-DM3dNAKs.cjs +0 -30
  216. package/components/focus-group-DHeTq18L.js +0 -218
  217. package/components/focus-group-DnxZUBhQ.cjs +0 -18
  218. package/components/focus-visible-B0P9aY_G.cjs +0 -18
  219. package/components/focus-visible-DBlJGoEW.js +0 -74
  220. package/components/focusable-BxtpnzWp.js +0 -153
  221. package/components/focusable-EbipgXRh.cjs +0 -18
  222. package/components/focusable-selectors-BgFlyFcY.cjs +0 -18
  223. package/components/if-defined-C9YGdo33.cjs +0 -22
  224. package/components/if-defined-DOaE2coe.js +0 -27
  225. package/components/index-BQoI8AD3.cjs +0 -113
  226. package/components/index-BwxgAdzi.cjs +0 -57
  227. package/components/index-Cb9zsiz6.js +0 -1490
  228. package/components/index-HjQa8tew.js +0 -1174
  229. package/components/language-resolution-DJzmyzZq.cjs +0 -18
  230. package/components/like-anchor-Bvn_vLQ8.js +0 -69
  231. package/components/like-anchor-sod1C1fR.cjs +0 -32
  232. package/components/luzmo-icons-D47EGj-3.cjs +0 -29
  233. package/components/luzmo-icons-NEyaMpEM.js +0 -229
  234. package/components/manage-help-text-DhgARkZX.cjs +0 -30
  235. package/components/manage-help-text-syYnjKGL.js +0 -92
  236. package/components/mutation-controller-DH7YOCyj.js +0 -52
  237. package/components/mutation-controller-DkOMCW-c.cjs +0 -22
  238. package/components/observe-slot-presence-CmVi0zTc.js +0 -68
  239. package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
  240. package/components/observe-slot-text-BPfIQQtz.js +0 -87
  241. package/components/observe-slot-text-Ceb7SvYT.cjs +0 -18
  242. package/components/overlay-Cig9r6uU.js +0 -2747
  243. package/components/overlay-KSKMzzkh.cjs +0 -47
  244. package/components/pending-state-CaH1si5b.cjs +0 -26
  245. package/components/picker-CAYj4hBD.js +0 -461
  246. package/components/picker-apS0Zrly.cjs +0 -123
  247. package/components/platform-BM-uMWpX.js +0 -69
  248. package/components/platform-BiXhwqk3.cjs +0 -18
  249. package/components/popover-DjX0aAnY.js +0 -67
  250. package/components/popover-KFfO0IYL.cjs +0 -30
  251. package/components/progress-circle-BvRJNuNo.cjs +0 -33
  252. package/components/progress-circle-DXH9z8-6.js +0 -97
  253. package/components/query-BL-TJj7K.cjs +0 -22
  254. package/components/query-D_KR_GUc.js +0 -51
  255. package/components/query-assigned-elements-DjfhL1cl.js +0 -36
  256. package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
  257. package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
  258. package/components/query-assigned-nodes-C76XVPWY.js +0 -36
  259. package/components/random-id-CqvckpWe.cjs +0 -18
  260. package/components/roving-tabindex-By_fCy_e.cjs +0 -18
  261. package/components/roving-tabindex-DOg4z6ZU.js +0 -66
  262. package/components/sized-mixin-CPxE5C96.cjs +0 -18
  263. package/components/sized-mixin-D4ACoVUr.js +0 -63
  264. package/components/slottable-request-event-BfUUt1Mh.cjs +0 -18
  265. package/components/state-D8JEtYqe.cjs +0 -22
  266. package/components/state-Deh-vKYE.js +0 -29
  267. package/components/strategies-9indNIEb.js +0 -195
  268. package/components/strategies-BACP6MhR.cjs +0 -18
  269. package/components/streaming-listener-B00MvALi.cjs +0 -18
  270. package/components/streaming-listener-CP-JE6Fa.js +0 -91
  271. package/components/style-map-CeilmSgs.cjs +0 -22
  272. package/components/style-map-IgqIKvlE.js +0 -53
  273. package/components/text-field-BYF2RHY8.cjs +0 -85
  274. package/components/text-field-PYafEYeO.js +0 -314
  275. package/components/text-field.module-C2KVUJcX.js +0 -21
  276. package/components/text-field.module-DXhFA9G-.cjs +0 -18
  277. package/components/when-CDZyJPvd.cjs +0 -22
@@ -15,78 +15,118 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- import { a as w, r as f, x as u, n as a, E as b } from "../base-WsynuqaS.js";
19
- import { e as p } from "../query-D_KR_GUc.js";
20
- import { S as I } from "../sized-mixin-D4ACoVUr.js";
21
- import { d as M } from "../divider.module-DoQWQEIJ.js";
22
- import { r as A } from "../state-Deh-vKYE.js";
23
- import { n as C } from "../query-assigned-nodes-C76XVPWY.js";
24
- import { r as y } from "../random-id-ByCz1xaq.js";
25
- import { s as D } from "../mutation-controller-DH7YOCyj.js";
26
- import { F as O } from "../focusable-BxtpnzWp.js";
27
- import { L as R } from "../like-anchor-Bvn_vLQ8.js";
28
- import { O as P } from "../observe-slot-presence-CmVi0zTc.js";
29
- import { O as L } from "../observe-slot-text-BPfIQQtz.js";
30
- import { D as U } from "../dependency-manger-CEXvGQUV.js";
31
- import { p as z, S as $, F as T, c as _ } from "../luzmo-icons-NEyaMpEM.js";
32
- import { S as B } from "../slottable-request-event-DggLA4Rx.js";
33
- const E = () => {
34
- if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
35
- const r = document.createElement("style");
36
- r.setAttribute("data-luzmo-vars", ""), r.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(r);
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);
37
24
  }
38
25
  };
39
- E();
40
- const F = ":host{--menu-item-top-to-action: var(--luzmo-spacing-1);--menu-item-top-to-checkbox: var(--luzmo-spacing-1);--menu-item-label-line-height: var(--luzmo-line-height);--menu-item-label-line-height-cjk: 1.5;--menu-item-label-to-description-spacing: 1px;--menu-item-focus-indicator-width: var(--luzmo-indicator-width);--menu-item-focus-indicator-color: var(--luzmo-indicator-color);--menu-item-label-to-value-area-min-spacing: var(--luzmo-spacing-3);--menu-item-label-content-color-default: var(--luzmo-font-color);--menu-item-label-content-color-hover: var(--luzmo-font-color-hover);--menu-item-label-content-color-down: var(--luzmo-font-color-down);--menu-item-label-content-color-focus: var(--luzmo-font-color-focus);--menu-item-highlight-label-background-color: var(--luzmo-primary);--menu-item-highlight-label-content-color: var(--luzmo-font-color);--menu-item-highlight-label-content-color-hover: var( --luzmo-font-color-hover );--menu-item-highlight-label-content-color-down: var(--luzmo-font-color-down);--menu-item-highlight-label-content-color-focus: var( --luzmo-font-color-focus );--menu-item-label-icon-color-default: var(--luzmo-font-color);--menu-item-label-icon-color-hover: var(--luzmo-font-color-hover);--menu-item-label-icon-color-down: var(--luzmo-font-color-down);--menu-item-label-icon-color-focus: var(--luzmo-font-color-focus);--menu-item-label-content-color-disabled: var(--luzmo-font-color-disabled);--menu-item-label-icon-color-disabled: var(--luzmo-font-color-disabled);--menu-item-description-line-height: var(--luzmo-line-height);--menu-item-description-line-height-cjk: 1.5;--menu-item-description-color-default: var(--luzmo-font-color);--menu-item-description-color-hover: var(--luzmo-font-color-hover);--menu-item-description-color-down: var(--luzmo-font-color-down);--menu-item-description-color-focus: var(--luzmo-font-color-focus);--menu-item-description-color-disabled: var(--luzmo-disabled-color);--menu-section-header-line-height: var(--luzmo-line-height);--menu-section-header-line-height-cjk: 1.5;--menu-section-header-font-weight: bold;--menu-section-header-color: var(--luzmo-font-color-hard);--menu-collapsible-icon-color: var(--luzmo-font-color-hard);--menu-checkmark-icon-color-default: var(--luzmo-primary);--menu-checkmark-icon-color-hover: var(--luzmo-primary-hover);--menu-checkmark-icon-color-down: var(--luzmo-primary-down);--menu-checkmark-icon-color-focus: var(--luzmo-primary-focus);--menu-drillin-icon-color-default: var(--luzmo-font-color);--menu-drillin-icon-color-hover: var(--luzmo-font-color-hover);--menu-drillin-icon-color-down: var(--luzmo-font-color-down);--menu-drillin-icon-color-focus: var(--luzmo-font-color-focus);--menu-item-value-color-default: var(--luzmo-font-color);--menu-item-value-color-hover: var(--luzmo-font-color-hover);--menu-item-value-color-down: var(--luzmo-font-color-down);--menu-item-value-color-focus: var(--luzmo-font-color-focus);--menu-checkmark-display-hidden: none;--menu-checkmark-display-shown: block;--menu-checkmark-display: block;--menu-item-collapsible-no-icon-submenu-item-padding-x-start: 28px;--menu-item-background-color-selected: var(--luzmo-background-color);--menu-item-background-color-default: var(--luzmo-background-color);--menu-item-background-color-hover: var(--luzmo-background-color-hover);--menu-item-background-color-down: var(--luzmo-background-color-down);--menu-item-background-color-key-focus: var(--luzmo-background-color-focus)}:host{--menu-item-min-height: var(--luzmo-component-height);--menu-item-icon-height: var(--luzmo-font-size);--menu-item-icon-width: var(--luzmo-font-size);--menu-item-label-font-size: var(--luzmo-font-size);--menu-item-label-text-to-visual: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-item-label-inline-edge-to-content: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-item-top-edge-to-text: var(--luzmo-spacing-1);--menu-item-bottom-edge-to-text: var(--luzmo-spacing-1);--menu-item-text-to-control: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-item-description-font-size: var(--luzmo-font-size-xs);--menu-section-header-font-size: var(--luzmo-font-size);--menu-section-header-min-width: var(--luzmo-component-height);--menu-item-selectable-edge-to-text-not-selected: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-item-checkmark-size: var(--luzmo-font-size-xs);--menu-item-angle-size: var(--luzmo-font-size);--menu-item-top-to-icon: calc( ( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var( --menu-item-bottom-edge-to-text ) - var(--menu-item-icon-height) ) / 2 );--menu-item-top-to-checkmark: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-back-icon-margin: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) )}:host([size=s]){--menu-item-min-height: var(--luzmo-component-height-s);--menu-item-icon-height: var(--luzmo-font-size-s);--menu-item-icon-width: var(--luzmo-font-size-s);--menu-item-label-font-size: var(--luzmo-font-size-s);--menu-item-label-text-to-visual: var(--luzmo-spacing-3);--menu-item-label-inline-edge-to-content: var(--luzmo-spacing-3);--menu-item-top-edge-to-text: var(--luzmo-spacing-1);--menu-item-bottom-edge-to-text: var(--luzmo-spacing-1);--menu-item-text-to-control: var(--luzmo-spacing-2);--menu-item-description-font-size: var(--luzmo-font-size-xs);--menu-section-header-font-size: var(--luzmo-font-size-s);--menu-section-header-min-width: var(--luzmo-component-height-s);--menu-item-selectable-edge-to-text-not-selected: var(--luzmo-spacing-3);--menu-item-checkmark-size: var(--luzmo-font-size-xs);--menu-item-angle-size: var(--luzmo-font-size-s);--menu-item-top-to-icon: calc( ( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var( --menu-item-bottom-edge-to-text ) - var(--menu-item-icon-height) ) / 2 );--menu-item-top-to-checkmark: var(--luzmo-spacing-3);--menu-back-icon-margin: var(--luzmo-spacing-3)}:host([size=l]){--menu-item-min-height: var(--luzmo-component-height-l);--menu-item-icon-height: var(--luzmo-font-size-l);--menu-item-icon-width: var(--luzmo-font-size-l);--menu-item-label-font-size: var(--luzmo-font-size-l);--menu-item-label-text-to-visual: var(--luzmo-spacing-4);--menu-item-label-inline-edge-to-content: var(--luzmo-spacing-4);--menu-item-top-edge-to-text: var(--luzmo-spacing-2);--menu-item-bottom-edge-to-text: var(--luzmo-spacing-2);--menu-item-text-to-control: var(--luzmo-spacing-3);--menu-item-description-font-size: var(--luzmo-font-size-s);--menu-section-header-font-size: var(--luzmo-font-size-l);--menu-section-header-min-width: var(--luzmo-component-height-l);--menu-item-selectable-edge-to-text-not-selected: var(--luzmo-spacing-4);--menu-item-checkmark-size: var(--luzmo-font-size-s);--menu-item-angle-size: var(--luzmo-font-size-l);--menu-item-top-to-icon: calc( ( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var( --menu-item-bottom-edge-to-text ) - var(--menu-item-icon-height) ) / 2 );--menu-item-top-to-checkmark: var(--luzmo-spacing-4);--menu-back-icon-margin: var(--luzmo-spacing-4)}:host([size=xl]){--menu-item-min-height: var(--luzmo-component-height-xl);--menu-item-icon-height: var(--luzmo-font-size-xl);--menu-item-icon-width: var(--luzmo-font-size-xl);--menu-item-label-font-size: var(--luzmo-font-size-xl);--menu-item-label-text-to-visual: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--menu-item-label-inline-edge-to-content: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--menu-item-top-edge-to-text: var(--luzmo-spacing-2);--menu-item-bottom-edge-to-text: var(--luzmo-spacing-2);--menu-item-text-to-control: var(--luzmo-spacing-4);--menu-item-description-font-size: var(--luzmo-font-size);--menu-section-header-font-size: var(--luzmo-font-size-xl);--menu-section-header-min-width: var(--luzmo-component-height-xl);--menu-item-selectable-edge-to-text-not-selected: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--menu-item-checkmark-size: var(--luzmo-font-size);--menu-item-angle-size: var(--luzmo-font-size-xl);--menu-item-top-to-icon: calc( ( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var( --menu-item-bottom-edge-to-text ) - var(--menu-item-icon-height) ) / 2 );--menu-item-top-to-checkmark: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--menu-back-icon-margin: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) )}:host([variant=highlight]){--menu-item-highlight-label-content-color: var(--luzmo-primary-inverse-color);--menu-checkmark-display: var(--menu-checkmark-display-hidden);--menu-item-highlight-label-content-color-hover: var( --luzmo-primary-inverse-color );--menu-item-highlight-label-content-color-down: var( --luzmo-primary-inverse-color );--menu-item-highlight-label-content-color-focus: var( --luzmo-primary-inverse-color )}:host([variant=highlight]) ::slotted(luzmo-menu-item[selected]){padding-inline-start:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content));background-color:var(--luzmo-menu-item-highlight-label-background-color, var(--menu-item-highlight-label-background-color, var(--luzmo-border-color)))}@media (forced-colors: active){:host{--highcontrast-menu-item-background-color-default: ButtonFace;--highcontrast-menu-item-color-default: ButtonText;--highcontrast-menu-item-background-color-focus: Highlight;--highcontrast-menu-item-color-focus: HighlightText;--highcontrast-menu-checkmark-icon-color-default: Highlight;--highcontrast-menu-item-color-disabled: GrayText;--highcontrast-menu-item-focus-indicator-color: Highlight;--highcontrast-menu-item-selected-background-color: Highlight;--highcontrast-menu-item-selected-color: HighlightText}@supports (color: SelectedItem){:host{--highcontrast-menu-item-selected-background-color: SelectedItem;--highcontrast-menu-item-selected-color: SelectedItemText}}}:host{inline-size:auto;inline-size:var(--luzmo-menu-inline-size, auto);box-sizing:border-box;margin:0;padding:0;list-style-type:none;display:inline-block;overflow:auto}:host:lang(ja),:host:lang(ko),:host:lang(zh){--menu-item-label-line-height: var( --luzmo-menu-item-label-line-height-cjk, var(--menu-item-label-line-height-cjk) );--menu-item-description-line-height: var( --luzmo-menu-item-description-line-height-cjk, var(--menu-item-description-line-height-cjk) );--menu-section-header-line-height: var( --luzmo-menu-section-header-line-height-cjk, var(--menu-section-header-line-height-cjk) )}:host([selects]) ::slotted(luzmo-menu-item){--menu-checkmark-display: var(--menu-checkmark-display-hidden);padding-inline-start:var(--luzmo-menu-item-selectable-edge-to-text-not-selected, var(--menu-item-selectable-edge-to-text-not-selected))}:host([selects]) ::slotted(luzmo-menu-item[selected]){--menu-checkmark-display: var(--menu-checkmark-display-shown);padding-inline-start:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content))}.luzmo-Menu-backIcon{margin-block:var(--luzmo-menu-back-icon-margin-block, var(--menu-back-icon-margin));margin-inline:var(--luzmo-menu-back-icon-margin-inline, var(--menu-back-icon-margin));fill:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-icon-color-default, var(--menu-section-header-color)));color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-icon-color-default, var(--menu-section-header-color)))}.luzmo-Menu-back:focus-visible{box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * var(--menu-item-focus-indicator-direction-scalar, 1)) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)))}.luzmo-Menu-sectionHeading{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-section-header-color, var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size, var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight, var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height, var(--menu-section-header-line-height));min-inline-size:var(--luzmo-menu-section-header-min-width, var(--menu-section-header-min-width));padding-block-start:var(--luzmo-menu-section-header-top-edge-to-text, var(--luzmo-menu-item-top-edge-to-text, var(--menu-item-top-edge-to-text)));padding-block-end:var(--luzmo-menu-section-header-bottom-edge-to-text, var(--luzmo-menu-item-bottom-edge-to-text, var(--menu-item-bottom-edge-to-text)));padding-inline:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content));grid-area:sectionHeadingArea/1/sectionHeadingArea/-1;display:block}.luzmo-Menu-back{padding-inline:0 var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-inline:var(--luzmo-menu-back-padding-inline-start, 0) var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-block:0;padding-block:var(--luzmo-menu-back-padding-block-start, 0) var(--luzmo-menu-back-padding-block-end, 0);flex-flow:wrap;align-items:center;display:flex}.luzmo-Menu-back .luzmo-Menu-sectionHeading{padding:0}.luzmo-Menu-backButton{cursor:pointer;background:none;border:0;margin:0;padding:0;display:inline-flex}.luzmo-Menu-backButton:focus-visible{outline:var(--luzmo-indicator-width) solid var(--luzmo-indicator-color);outline-offset:calc((var(--luzmo-indicator-width) + 1px) * -1)}.luzmo-Menu-backHeading{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-heading-color, var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size, var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight, var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height, var(--menu-section-header-line-height));display:block}:host{display:inline-flex;flex-direction:column;width:100%}:host(:focus){outline:none}::slotted(*){flex-shrink:0}";
41
- var j = Object.defineProperty, H = Object.getOwnPropertyDescriptor, d = (r, e, t, o) => {
42
- for (var i = o > 1 ? void 0 : o ? H(e, t) : e, n = r.length - 1, l; n >= 0; n--)
43
- (l = r[n]) && (i = (o ? l(e, t, i) : l(i)) || i);
44
- return o && i && j(e, t, i), i;
26
+ initializeGlobalLuzmoCSSVariables();
27
+ import { unsafeCSS, html, nothing } from "lit";
28
+ import { property, query, queryAssignedNodes, state } from "lit/decorators.js";
29
+ import { a as LuzmoElement } from "../base-DmeVy0cq.js";
30
+ import { S as SizedMixin } from "../sized-mixin-DmkrNdWB.js";
31
+ import { d as dividerStyles } from "../divider.module-DauH6k2_.js";
32
+ import { r as randomID } from "../random-id-BEc6QIUL.js";
33
+ import { MutationController } from "@lit-labs/observers/mutation-controller.js";
34
+ import { F as Focusable } from "../focusable-ChCLg1k4.js";
35
+ import { L as LikeAnchor } from "../like-anchor-v3cJ9RWM.js";
36
+ import { O as ObserveSlotPresence } from "../observe-slot-presence-DcMdoumP.js";
37
+ import { O as ObserveSlotText } from "../observe-slot-text-CjnkkBPn.js";
38
+ import { D as DependencyManagerController } from "../dependency-manger-XHpQjFgK.js";
39
+ import { luzmoIcon, luzmoAngleRight, luzmoCheck, luzmoInfoCircleOutline } from "@luzmo/icons";
40
+ import { S as SlottableRequestEvent } from "../slottable-request-event-D9WzrdWv.js";
41
+ const menuStyles = ":host{--menu-item-top-to-action: var(--luzmo-spacing-1);--menu-item-top-to-checkbox: var(--luzmo-spacing-1);--menu-item-label-line-height: var(--luzmo-line-height);--menu-item-label-line-height-cjk: 1.5;--menu-item-label-to-description-spacing: 1px;--menu-item-focus-indicator-width: var(--luzmo-indicator-width);--menu-item-focus-indicator-color: var(--luzmo-indicator-color);--menu-item-label-to-value-area-min-spacing: var(--luzmo-spacing-3);--menu-item-label-content-color-default: var(--luzmo-font-color);--menu-item-label-content-color-hover: var(--luzmo-font-color-hover);--menu-item-label-content-color-down: var(--luzmo-font-color-down);--menu-item-label-content-color-focus: var(--luzmo-font-color-focus);--menu-item-highlight-label-background-color: var(--luzmo-primary);--menu-item-highlight-label-content-color: var(--luzmo-font-color);--menu-item-highlight-label-content-color-hover: var( --luzmo-font-color-hover );--menu-item-highlight-label-content-color-down: var(--luzmo-font-color-down);--menu-item-highlight-label-content-color-focus: var( --luzmo-font-color-focus );--menu-item-label-icon-color-default: var(--luzmo-font-color);--menu-item-label-icon-color-hover: var(--luzmo-font-color-hover);--menu-item-label-icon-color-down: var(--luzmo-font-color-down);--menu-item-label-icon-color-focus: var(--luzmo-font-color-focus);--menu-item-label-content-color-disabled: var(--luzmo-font-color-disabled);--menu-item-label-icon-color-disabled: var(--luzmo-font-color-disabled);--menu-item-description-line-height: var(--luzmo-line-height);--menu-item-description-line-height-cjk: 1.5;--menu-item-description-color-default: var(--luzmo-font-color);--menu-item-description-color-hover: var(--luzmo-font-color-hover);--menu-item-description-color-down: var(--luzmo-font-color-down);--menu-item-description-color-focus: var(--luzmo-font-color-focus);--menu-item-description-color-disabled: var(--luzmo-disabled-color);--menu-section-header-line-height: var(--luzmo-line-height);--menu-section-header-line-height-cjk: 1.5;--menu-section-header-font-weight: bold;--menu-section-header-color: var(--luzmo-font-color-hard);--menu-collapsible-icon-color: var(--luzmo-font-color-hard);--menu-checkmark-icon-color-default: var(--luzmo-primary);--menu-checkmark-icon-color-hover: var(--luzmo-primary-hover);--menu-checkmark-icon-color-down: var(--luzmo-primary-down);--menu-checkmark-icon-color-focus: var(--luzmo-primary-focus);--menu-drillin-icon-color-default: var(--luzmo-font-color);--menu-drillin-icon-color-hover: var(--luzmo-font-color-hover);--menu-drillin-icon-color-down: var(--luzmo-font-color-down);--menu-drillin-icon-color-focus: var(--luzmo-font-color-focus);--menu-item-value-color-default: var(--luzmo-font-color);--menu-item-value-color-hover: var(--luzmo-font-color-hover);--menu-item-value-color-down: var(--luzmo-font-color-down);--menu-item-value-color-focus: var(--luzmo-font-color-focus);--menu-checkmark-display-hidden: none;--menu-checkmark-display-shown: block;--menu-checkmark-display: block;--menu-item-collapsible-no-icon-submenu-item-padding-x-start: 28px;--menu-item-background-color-selected: var(--luzmo-background-color);--menu-item-background-color-default: var(--luzmo-background-color);--menu-item-background-color-hover: var(--luzmo-background-color-hover);--menu-item-background-color-down: var(--luzmo-background-color-down);--menu-item-background-color-key-focus: var(--luzmo-background-color-focus)}:host{--menu-item-min-height: var(--luzmo-component-height);--menu-item-icon-height: var(--luzmo-font-size);--menu-item-icon-width: var(--luzmo-font-size);--menu-item-label-font-size: var(--luzmo-font-size);--menu-item-label-text-to-visual: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-item-label-inline-edge-to-content: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-item-top-edge-to-text: var(--luzmo-spacing-1);--menu-item-bottom-edge-to-text: var(--luzmo-spacing-1);--menu-item-text-to-control: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-item-description-font-size: var(--luzmo-font-size-xs);--menu-section-header-font-size: var(--luzmo-font-size);--menu-section-header-min-width: var(--luzmo-component-height);--menu-item-selectable-edge-to-text-not-selected: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-item-checkmark-size: var(--luzmo-font-size-xs);--menu-item-angle-size: var(--luzmo-font-size);--menu-item-top-to-icon: calc( ( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var( --menu-item-bottom-edge-to-text ) - var(--menu-item-icon-height) ) / 2 );--menu-item-top-to-checkmark: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--menu-back-icon-margin: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) )}:host([size=s]){--menu-item-min-height: var(--luzmo-component-height-s);--menu-item-icon-height: var(--luzmo-font-size-s);--menu-item-icon-width: var(--luzmo-font-size-s);--menu-item-label-font-size: var(--luzmo-font-size-s);--menu-item-label-text-to-visual: var(--luzmo-spacing-3);--menu-item-label-inline-edge-to-content: var(--luzmo-spacing-3);--menu-item-top-edge-to-text: var(--luzmo-spacing-1);--menu-item-bottom-edge-to-text: var(--luzmo-spacing-1);--menu-item-text-to-control: var(--luzmo-spacing-2);--menu-item-description-font-size: var(--luzmo-font-size-xs);--menu-section-header-font-size: var(--luzmo-font-size-s);--menu-section-header-min-width: var(--luzmo-component-height-s);--menu-item-selectable-edge-to-text-not-selected: var(--luzmo-spacing-3);--menu-item-checkmark-size: var(--luzmo-font-size-xs);--menu-item-angle-size: var(--luzmo-font-size-s);--menu-item-top-to-icon: calc( ( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var( --menu-item-bottom-edge-to-text ) - var(--menu-item-icon-height) ) / 2 );--menu-item-top-to-checkmark: var(--luzmo-spacing-3);--menu-back-icon-margin: var(--luzmo-spacing-3)}:host([size=l]){--menu-item-min-height: var(--luzmo-component-height-l);--menu-item-icon-height: var(--luzmo-font-size-l);--menu-item-icon-width: var(--luzmo-font-size-l);--menu-item-label-font-size: var(--luzmo-font-size-l);--menu-item-label-text-to-visual: var(--luzmo-spacing-4);--menu-item-label-inline-edge-to-content: var(--luzmo-spacing-4);--menu-item-top-edge-to-text: var(--luzmo-spacing-2);--menu-item-bottom-edge-to-text: var(--luzmo-spacing-2);--menu-item-text-to-control: var(--luzmo-spacing-3);--menu-item-description-font-size: var(--luzmo-font-size-s);--menu-section-header-font-size: var(--luzmo-font-size-l);--menu-section-header-min-width: var(--luzmo-component-height-l);--menu-item-selectable-edge-to-text-not-selected: var(--luzmo-spacing-4);--menu-item-checkmark-size: var(--luzmo-font-size-s);--menu-item-angle-size: var(--luzmo-font-size-l);--menu-item-top-to-icon: calc( ( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var( --menu-item-bottom-edge-to-text ) - var(--menu-item-icon-height) ) / 2 );--menu-item-top-to-checkmark: var(--luzmo-spacing-4);--menu-back-icon-margin: var(--luzmo-spacing-4)}:host([size=xl]){--menu-item-min-height: var(--luzmo-component-height-xl);--menu-item-icon-height: var(--luzmo-font-size-xl);--menu-item-icon-width: var(--luzmo-font-size-xl);--menu-item-label-font-size: var(--luzmo-font-size-xl);--menu-item-label-text-to-visual: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--menu-item-label-inline-edge-to-content: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--menu-item-top-edge-to-text: var(--luzmo-spacing-2);--menu-item-bottom-edge-to-text: var(--luzmo-spacing-2);--menu-item-text-to-control: var(--luzmo-spacing-4);--menu-item-description-font-size: var(--luzmo-font-size);--menu-section-header-font-size: var(--luzmo-font-size-xl);--menu-section-header-min-width: var(--luzmo-component-height-xl);--menu-item-selectable-edge-to-text-not-selected: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--menu-item-checkmark-size: var(--luzmo-font-size);--menu-item-angle-size: var(--luzmo-font-size-xl);--menu-item-top-to-icon: calc( ( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var( --menu-item-bottom-edge-to-text ) - var(--menu-item-icon-height) ) / 2 );--menu-item-top-to-checkmark: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--menu-back-icon-margin: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) )}:host([variant=highlight]){--menu-item-highlight-label-content-color: var(--luzmo-primary-inverse-color);--menu-checkmark-display: var(--menu-checkmark-display-hidden);--menu-item-highlight-label-content-color-hover: var( --luzmo-primary-inverse-color );--menu-item-highlight-label-content-color-down: var( --luzmo-primary-inverse-color );--menu-item-highlight-label-content-color-focus: var( --luzmo-primary-inverse-color )}:host([variant=highlight]) ::slotted(luzmo-menu-item[selected]){padding-inline-start:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content));background-color:var(--luzmo-menu-item-highlight-label-background-color, var(--menu-item-highlight-label-background-color, var(--luzmo-border-color)))}@media (forced-colors: active){:host{--highcontrast-menu-item-background-color-default: ButtonFace;--highcontrast-menu-item-color-default: ButtonText;--highcontrast-menu-item-background-color-focus: Highlight;--highcontrast-menu-item-color-focus: HighlightText;--highcontrast-menu-checkmark-icon-color-default: Highlight;--highcontrast-menu-item-color-disabled: GrayText;--highcontrast-menu-item-focus-indicator-color: Highlight;--highcontrast-menu-item-selected-background-color: Highlight;--highcontrast-menu-item-selected-color: HighlightText}@supports (color: SelectedItem){:host{--highcontrast-menu-item-selected-background-color: SelectedItem;--highcontrast-menu-item-selected-color: SelectedItemText}}}:host{inline-size:auto;inline-size:var(--luzmo-menu-inline-size, auto);box-sizing:border-box;margin:0;padding:0;list-style-type:none;display:inline-block;overflow:auto}:host:lang(ja),:host:lang(ko),:host:lang(zh){--menu-item-label-line-height: var( --luzmo-menu-item-label-line-height-cjk, var(--menu-item-label-line-height-cjk) );--menu-item-description-line-height: var( --luzmo-menu-item-description-line-height-cjk, var(--menu-item-description-line-height-cjk) );--menu-section-header-line-height: var( --luzmo-menu-section-header-line-height-cjk, var(--menu-section-header-line-height-cjk) )}:host([selects]) ::slotted(luzmo-menu-item){--menu-checkmark-display: var(--menu-checkmark-display-hidden);padding-inline-start:var(--luzmo-menu-item-selectable-edge-to-text-not-selected, var(--menu-item-selectable-edge-to-text-not-selected))}:host([selects]) ::slotted(luzmo-menu-item[selected]){--menu-checkmark-display: var(--menu-checkmark-display-shown);padding-inline-start:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content))}.luzmo-Menu-backIcon{margin-block:var(--luzmo-menu-back-icon-margin-block, var(--menu-back-icon-margin));margin-inline:var(--luzmo-menu-back-icon-margin-inline, var(--menu-back-icon-margin));fill:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-icon-color-default, var(--menu-section-header-color)));color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-icon-color-default, var(--menu-section-header-color)))}.luzmo-Menu-back:focus-visible{box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * var(--menu-item-focus-indicator-direction-scalar, 1)) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)))}.luzmo-Menu-sectionHeading{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-section-header-color, var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size, var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight, var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height, var(--menu-section-header-line-height));min-inline-size:var(--luzmo-menu-section-header-min-width, var(--menu-section-header-min-width));padding-block-start:var(--luzmo-menu-section-header-top-edge-to-text, var(--luzmo-menu-item-top-edge-to-text, var(--menu-item-top-edge-to-text)));padding-block-end:var(--luzmo-menu-section-header-bottom-edge-to-text, var(--luzmo-menu-item-bottom-edge-to-text, var(--menu-item-bottom-edge-to-text)));padding-inline:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content));grid-area:sectionHeadingArea/1/sectionHeadingArea/-1;display:block}.luzmo-Menu-back{padding-inline:0 var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-inline:var(--luzmo-menu-back-padding-inline-start, 0) var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-block:0;padding-block:var(--luzmo-menu-back-padding-block-start, 0) var(--luzmo-menu-back-padding-block-end, 0);flex-flow:wrap;align-items:center;display:flex}.luzmo-Menu-back .luzmo-Menu-sectionHeading{padding:0}.luzmo-Menu-backButton{cursor:pointer;background:none;border:0;margin:0;padding:0;display:inline-flex}.luzmo-Menu-backButton:focus-visible{outline:var(--luzmo-indicator-width) solid var(--luzmo-indicator-color);outline-offset:calc((var(--luzmo-indicator-width) + 1px) * -1)}.luzmo-Menu-backHeading{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-heading-color, var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size, var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight, var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height, var(--menu-section-header-line-height));display:block}:host{display:inline-flex;flex-direction:column;width:100%}:host(:focus){outline:none}::slotted(*){flex-shrink:0}";
42
+ var __defProp$2 = Object.defineProperty;
43
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
44
+ var __decorateClass$2 = (decorators, target, key, kind) => {
45
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
46
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
47
+ if (decorator = decorators[i])
48
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
49
+ if (kind && result) __defProp$2(target, key, result);
50
+ return result;
45
51
  };
46
- function q(r, e) {
47
- return !!e && (r === e || r.contains(e));
52
+ function elementIsOrContains(el, isOrContains) {
53
+ return !!isOrContains && (el === isOrContains || el.contains(isOrContains));
48
54
  }
49
- class m extends I(w, {
50
- noDefaultSize: !0
55
+ class LuzmoMenu extends SizedMixin(LuzmoElement, {
56
+ noDefaultSize: true
51
57
  }) {
52
58
  constructor() {
53
- super(), this.label = "", this.ignore = !1, this.value = "", this.valueSeparator = ",", this.selectedItems = [], this.focusedItemIndex = 0, this.focusInItemIndex = 0, this._selected = [], this.cacheUpdated = Promise.resolve(), this.childItemSet = /* @__PURE__ */ new Set(), this.selectedItemsMap = /* @__PURE__ */ new Map(), this._hasUpdatedSelectedItemIndex = !1, this._willUpdateItems = !1, this.pointerUpTarget = null, this.descendentOverlays = /* @__PURE__ */ new Map(), this.handleSubmenuClosed = (e) => {
54
- e.stopPropagation(), e.composedPath()[0].dispatchEvent(
59
+ super();
60
+ this.label = "";
61
+ this.ignore = false;
62
+ this.value = "";
63
+ this.valueSeparator = ",";
64
+ this.selectedItems = [];
65
+ this.focusedItemIndex = 0;
66
+ this.focusInItemIndex = 0;
67
+ this._selected = [];
68
+ this.cacheUpdated = Promise.resolve();
69
+ this.childItemSet = /* @__PURE__ */ new Set();
70
+ this.selectedItemsMap = /* @__PURE__ */ new Map();
71
+ this._hasUpdatedSelectedItemIndex = false;
72
+ this._willUpdateItems = false;
73
+ this.pointerUpTarget = null;
74
+ this.descendentOverlays = /* @__PURE__ */ new Map();
75
+ this.handleSubmenuClosed = (event) => {
76
+ event.stopPropagation();
77
+ const target = event.composedPath()[0];
78
+ target.dispatchEvent(
55
79
  new Event("luzmo-menu-submenu-closed", {
56
- bubbles: !0,
57
- composed: !0
80
+ bubbles: true,
81
+ composed: true
58
82
  })
59
83
  );
60
- }, this.handleSubmenuOpened = (e) => {
61
- e.stopPropagation(), e.composedPath()[0].dispatchEvent(
84
+ };
85
+ this.handleSubmenuOpened = (event) => {
86
+ event.stopPropagation();
87
+ const target = event.composedPath()[0];
88
+ target.dispatchEvent(
62
89
  new Event("luzmo-menu-submenu-opened", {
63
- bubbles: !0,
64
- composed: !0
90
+ bubbles: true,
91
+ composed: true
65
92
  })
66
93
  );
67
- const o = this.childItems[this.focusedItemIndex];
68
- o && (o.focused = !1);
69
- const i = e.composedPath().find((l) => this.childItemSet.has(l));
70
- if (!i)
94
+ const focusedItem = this.childItems[this.focusedItemIndex];
95
+ if (focusedItem) {
96
+ focusedItem.focused = false;
97
+ }
98
+ const openedItem = event.composedPath().find((el) => this.childItemSet.has(el));
99
+ if (!openedItem) {
71
100
  return;
72
- const n = this.childItems.indexOf(
73
- i
101
+ }
102
+ const openedItemIndex = this.childItems.indexOf(
103
+ openedItem
74
104
  );
75
- this.focusedItemIndex = n, this.focusInItemIndex = n;
76
- }, this.resolveCacheUpdated = () => {
77
- }, this.addEventListener(
105
+ this.focusedItemIndex = openedItemIndex;
106
+ this.focusInItemIndex = openedItemIndex;
107
+ };
108
+ this.resolveCacheUpdated = () => {
109
+ };
110
+ this.addEventListener(
78
111
  "luzmo-menu-item-added-or-updated",
79
112
  this.onSelectableItemAddedOrUpdated
80
- ), this.addEventListener(
113
+ );
114
+ this.addEventListener(
81
115
  "luzmo-menu-item-added-or-updated",
82
116
  this.onFocusableItemAddedOrUpdated,
83
117
  {
84
- capture: !0
118
+ capture: true
85
119
  }
86
- ), this.addEventListener("click", this.handleClick), this.addEventListener("pointerup", this.handlePointerup), this.addEventListener("focusin", this.handleFocusin), this.addEventListener("blur", this.handleBlur), this.addEventListener("luzmo-opened", this.handleSubmenuOpened), this.addEventListener("luzmo-closed", this.handleSubmenuClosed);
120
+ );
121
+ this.addEventListener("click", this.handleClick);
122
+ this.addEventListener("pointerup", this.handlePointerup);
123
+ this.addEventListener("focusin", this.handleFocusin);
124
+ this.addEventListener("blur", this.handleBlur);
125
+ this.addEventListener("luzmo-opened", this.handleSubmenuOpened);
126
+ this.addEventListener("luzmo-closed", this.handleSubmenuClosed);
87
127
  }
88
128
  static get styles() {
89
- return [f(F)];
129
+ return [unsafeCSS(menuStyles)];
90
130
  }
91
131
  get isSubmenu() {
92
132
  return this.slot === "submenu";
@@ -94,16 +134,31 @@ class m extends I(w, {
94
134
  get selected() {
95
135
  return this._selected;
96
136
  }
97
- set selected(e) {
98
- if (e === this.selected)
137
+ set selected(selected) {
138
+ if (selected === this.selected) {
99
139
  return;
100
- const t = this.selected;
101
- this._selected = e, this.selectedItems = [], this.selectedItemsMap.clear(), this.childItems.forEach((o) => {
102
- this === o.menuData.selectionRoot && (o.selected = this.selected.includes(o.value), o.selected && (this.selectedItems.push(o), this.selectedItemsMap.set(o, !0)));
103
- }), this.requestUpdate("selected", t);
140
+ }
141
+ const old = this.selected;
142
+ this._selected = selected;
143
+ this.selectedItems = [];
144
+ this.selectedItemsMap.clear();
145
+ this.childItems.forEach((item) => {
146
+ if (this !== item.menuData.selectionRoot) {
147
+ return;
148
+ }
149
+ item.selected = this.selected.includes(item.value);
150
+ if (item.selected) {
151
+ this.selectedItems.push(item);
152
+ this.selectedItemsMap.set(item, true);
153
+ }
154
+ });
155
+ this.requestUpdate("selected", old);
104
156
  }
105
157
  get childItems() {
106
- return this.cachedChildItems || (this.cachedChildItems = this.updateCachedMenuItems()), this.cachedChildItems;
158
+ if (!this.cachedChildItems) {
159
+ this.cachedChildItems = this.updateCachedMenuItems();
160
+ }
161
+ return this.cachedChildItems;
107
162
  }
108
163
  /**
109
164
  * Hide this getter from web-component-analyzer until
@@ -113,168 +168,300 @@ class m extends I(w, {
113
168
  * @private
114
169
  */
115
170
  get childRole() {
116
- if (this.resolvedRole === "listbox")
171
+ if (this.resolvedRole === "listbox") {
117
172
  return "option";
173
+ }
118
174
  switch (this.resolvedSelects) {
119
- case "single":
175
+ case "single": {
120
176
  return "menuitemradio";
121
- case "multiple":
177
+ }
178
+ case "multiple": {
122
179
  return "menuitemcheckbox";
123
- default:
180
+ }
181
+ default: {
124
182
  return "menuitem";
183
+ }
125
184
  }
126
185
  }
127
186
  get ownRole() {
128
187
  return "menu";
129
188
  }
130
- focus({ preventScroll: e } = {}) {
131
- if (this.childItems.every((o) => o.disabled))
189
+ focus({ preventScroll } = {}) {
190
+ if (this.childItems.every((childItem) => childItem.disabled)) {
132
191
  return;
133
- if (this.childItems.some((o) => o.menuData.focusRoot !== this)) {
134
- super.focus({ preventScroll: e });
192
+ }
193
+ if (this.childItems.some((childItem) => childItem.menuData.focusRoot !== this)) {
194
+ super.focus({ preventScroll });
135
195
  return;
136
196
  }
137
- this.focusMenuItemByOffset(0), super.focus({ preventScroll: e });
138
- const t = this.selectedItems[0];
139
- t && !e && t.scrollIntoView({ block: "nearest" });
197
+ this.focusMenuItemByOffset(0);
198
+ super.focus({ preventScroll });
199
+ const selectedItem = this.selectedItems[0];
200
+ if (selectedItem && !preventScroll) {
201
+ selectedItem.scrollIntoView({ block: "nearest" });
202
+ }
140
203
  }
141
- handleFocusin(e) {
142
- var i;
143
- if (this.childItems.some((n) => n.menuData.focusRoot !== this))
204
+ handleFocusin(event) {
205
+ var _a;
206
+ if (this.childItems.some((childItem) => childItem.menuData.focusRoot !== this)) {
144
207
  return;
145
- const t = this.getRootNode().activeElement, o = ((i = this.childItems[this.focusedItemIndex]) == null ? void 0 : i.menuData.selectionRoot) || this;
146
- if ((t !== o || e.target !== this) && (o.focus({ preventScroll: !0 }), t && this.focusedItemIndex === 0)) {
147
- const n = this.childItems.indexOf(t);
148
- this.focusMenuItemByOffset(Math.max(n, 0));
208
+ }
209
+ const activeElement = this.getRootNode().activeElement;
210
+ const selectionRoot = ((_a = this.childItems[this.focusedItemIndex]) == null ? void 0 : _a.menuData.selectionRoot) || this;
211
+ if (activeElement !== selectionRoot || event.target !== this) {
212
+ selectionRoot.focus({ preventScroll: true });
213
+ if (activeElement && this.focusedItemIndex === 0) {
214
+ const offset = this.childItems.indexOf(activeElement);
215
+ this.focusMenuItemByOffset(Math.max(offset, 0));
216
+ }
149
217
  }
150
218
  this.startListeningToKeyboard();
151
219
  }
152
220
  startListeningToKeyboard() {
153
221
  this.addEventListener("keydown", this.handleKeydown);
154
222
  }
155
- handleBlur(e) {
156
- q(this, e.relatedTarget) || (this.stopListeningToKeyboard(), this.childItems.forEach((t) => t.focused = !1), this.removeAttribute("aria-activedescendant"));
223
+ handleBlur(event) {
224
+ if (elementIsOrContains(this, event.relatedTarget)) {
225
+ return;
226
+ }
227
+ this.stopListeningToKeyboard();
228
+ this.childItems.forEach((child) => child.focused = false);
229
+ this.removeAttribute("aria-activedescendant");
157
230
  }
158
231
  stopListeningToKeyboard() {
159
232
  this.removeEventListener("keydown", this.handleKeydown);
160
233
  }
161
- selectOrToggleItem(e) {
162
- const t = this.resolvedSelects, o = new Map(this.selectedItemsMap), i = [...this.selected], n = [...this.selectedItems], l = this.value, h = this.childItems[this.focusedItemIndex];
163
- if (h && (h.focused = !1, h.active = !1), this.focusedItemIndex = this.childItems.indexOf(e), this.forwardFocusVisibleToItem(e), t === "multiple") {
164
- this.selectedItemsMap.has(e) ? this.selectedItemsMap.delete(e) : this.selectedItemsMap.set(e, !0);
165
- const v = [], x = [];
166
- this.childItemSet.forEach((g) => {
167
- g.menuData.selectionRoot === this && this.selectedItemsMap.has(g) && (v.push(g.value), x.push(g));
168
- }), this._selected = v, this.selectedItems = x, this.value = this.selected.join(this.valueSeparator);
169
- } else
170
- this.selectedItemsMap.clear(), this.selectedItemsMap.set(e, !0), this.value = e.value, this._selected = [e.value], this.selectedItems = [e];
171
- if (!this.dispatchEvent(
234
+ selectOrToggleItem(targetItem) {
235
+ const resolvedSelects = this.resolvedSelects;
236
+ const oldSelectedItemsMap = new Map(this.selectedItemsMap);
237
+ const oldSelected = [...this.selected];
238
+ const oldSelectedItems = [...this.selectedItems];
239
+ const oldValue = this.value;
240
+ const focusedChild = this.childItems[this.focusedItemIndex];
241
+ if (focusedChild) {
242
+ focusedChild.focused = false;
243
+ focusedChild.active = false;
244
+ }
245
+ this.focusedItemIndex = this.childItems.indexOf(targetItem);
246
+ this.forwardFocusVisibleToItem(targetItem);
247
+ if (resolvedSelects === "multiple") {
248
+ if (this.selectedItemsMap.has(targetItem)) {
249
+ this.selectedItemsMap.delete(targetItem);
250
+ } else {
251
+ this.selectedItemsMap.set(targetItem, true);
252
+ }
253
+ const selected = [];
254
+ const selectedItems = [];
255
+ this.childItemSet.forEach((childItem) => {
256
+ if (childItem.menuData.selectionRoot !== this) {
257
+ return;
258
+ }
259
+ if (this.selectedItemsMap.has(childItem)) {
260
+ selected.push(childItem.value);
261
+ selectedItems.push(childItem);
262
+ }
263
+ });
264
+ this._selected = selected;
265
+ this.selectedItems = selectedItems;
266
+ this.value = this.selected.join(this.valueSeparator);
267
+ } else {
268
+ this.selectedItemsMap.clear();
269
+ this.selectedItemsMap.set(targetItem, true);
270
+ this.value = targetItem.value;
271
+ this._selected = [targetItem.value];
272
+ this.selectedItems = [targetItem];
273
+ }
274
+ const applyDefault = this.dispatchEvent(
172
275
  new Event("change", {
173
- cancelable: !0,
174
- bubbles: !0,
175
- composed: !0
276
+ cancelable: true,
277
+ bubbles: true,
278
+ composed: true
176
279
  })
177
- )) {
178
- this._selected = i, this.selectedItems = n, this.selectedItemsMap = o, this.value = l;
280
+ );
281
+ if (!applyDefault) {
282
+ this._selected = oldSelected;
283
+ this.selectedItems = oldSelectedItems;
284
+ this.selectedItemsMap = oldSelectedItemsMap;
285
+ this.value = oldValue;
179
286
  return;
180
287
  }
181
- if (t === "single") {
182
- for (const v of o.keys())
183
- v !== e && (v.selected = !1);
184
- e.selected = !0;
185
- } else t === "multiple" && (e.selected = !e.selected);
288
+ if (resolvedSelects === "single") {
289
+ for (const oldItem of oldSelectedItemsMap.keys()) {
290
+ if (oldItem !== targetItem) {
291
+ oldItem.selected = false;
292
+ }
293
+ }
294
+ targetItem.selected = true;
295
+ } else if (resolvedSelects === "multiple") {
296
+ targetItem.selected = !targetItem.selected;
297
+ }
186
298
  }
187
- handleKeydown(e) {
188
- if (e.defaultPrevented)
299
+ handleKeydown(event) {
300
+ if (event.defaultPrevented) {
189
301
  return;
190
- const t = this.childItems[this.focusedItemIndex];
191
- t && (t.focused = !0);
192
- const { key: o } = e;
193
- if (e.shiftKey && e.target !== this && this.hasAttribute("tabindex")) {
302
+ }
303
+ const lastFocusedItem = this.childItems[this.focusedItemIndex];
304
+ if (lastFocusedItem) {
305
+ lastFocusedItem.focused = true;
306
+ }
307
+ const { key } = event;
308
+ if (event.shiftKey && event.target !== this && this.hasAttribute("tabindex")) {
194
309
  this.removeAttribute("tabindex");
195
- const i = (n) => {
196
- !n.shiftKey && !this.hasAttribute("tabindex") && (this.tabIndex = 0, document.removeEventListener("keyup", i), this.removeEventListener("focusout", i));
310
+ const replaceTabindex = (eventForTab) => {
311
+ if (!eventForTab.shiftKey && !this.hasAttribute("tabindex")) {
312
+ this.tabIndex = 0;
313
+ document.removeEventListener("keyup", replaceTabindex);
314
+ this.removeEventListener("focusout", replaceTabindex);
315
+ }
197
316
  };
198
- document.addEventListener("keyup", i), this.addEventListener("focusout", i);
317
+ document.addEventListener("keyup", replaceTabindex);
318
+ this.addEventListener("focusout", replaceTabindex);
199
319
  }
200
- if (o === "Tab") {
320
+ if (key === "Tab") {
201
321
  this.prepareToCleanUp();
202
322
  return;
203
323
  }
204
- if (o === " " && (t != null && t.hasSubmenu)) {
205
- t.openOverlay();
324
+ if (key === " " && (lastFocusedItem == null ? void 0 : lastFocusedItem.hasSubmenu)) {
325
+ lastFocusedItem.openOverlay();
206
326
  return;
207
327
  }
208
- if (o === " " || o === "Enter") {
209
- const i = this.childItems[this.focusedItemIndex];
210
- i && i.menuData.selectionRoot === e.target && (e.preventDefault(), i.click());
328
+ if (key === " " || key === "Enter") {
329
+ const childItem = this.childItems[this.focusedItemIndex];
330
+ if (childItem && childItem.menuData.selectionRoot === event.target) {
331
+ event.preventDefault();
332
+ childItem.click();
333
+ }
211
334
  return;
212
335
  }
213
- if (o === "ArrowDown" || o === "ArrowUp") {
214
- const i = this.childItems[this.focusedItemIndex];
215
- i && i.menuData.selectionRoot === e.target && this.navigateWithinMenu(e);
336
+ if (key === "ArrowDown" || key === "ArrowUp") {
337
+ const childItem = this.childItems[this.focusedItemIndex];
338
+ if (childItem && childItem.menuData.selectionRoot === event.target) {
339
+ this.navigateWithinMenu(event);
340
+ }
216
341
  return;
217
342
  }
218
- this.navigateBetweenRelatedMenus(e);
219
- }
220
- focusMenuItemByOffset(e) {
221
- const t = e || 1, o = this.childItems[this.focusedItemIndex];
222
- o && (o.focused = !1, o.active = o.open), this.focusedItemIndex = (this.childItems.length + this.focusedItemIndex + e) % this.childItems.length;
223
- let i = this.childItems[this.focusedItemIndex], n = this.childItems.length;
224
- for (; i != null && i.disabled && n; )
225
- n -= 1, this.focusedItemIndex = (this.childItems.length + this.focusedItemIndex + t) % this.childItems.length, i = this.childItems[this.focusedItemIndex];
226
- return i != null && i.disabled || this.forwardFocusVisibleToItem(i), i;
343
+ this.navigateBetweenRelatedMenus(event);
344
+ }
345
+ focusMenuItemByOffset(offset) {
346
+ const step = offset || 1;
347
+ const focusedItem = this.childItems[this.focusedItemIndex];
348
+ if (focusedItem) {
349
+ focusedItem.focused = false;
350
+ focusedItem.active = focusedItem.open;
351
+ }
352
+ this.focusedItemIndex = (this.childItems.length + this.focusedItemIndex + offset) % this.childItems.length;
353
+ let itemToFocus = this.childItems[this.focusedItemIndex];
354
+ let availableItems = this.childItems.length;
355
+ while ((itemToFocus == null ? void 0 : itemToFocus.disabled) && availableItems) {
356
+ availableItems -= 1;
357
+ this.focusedItemIndex = (this.childItems.length + this.focusedItemIndex + step) % this.childItems.length;
358
+ itemToFocus = this.childItems[this.focusedItemIndex];
359
+ }
360
+ if (!(itemToFocus == null ? void 0 : itemToFocus.disabled)) {
361
+ this.forwardFocusVisibleToItem(itemToFocus);
362
+ }
363
+ return itemToFocus;
227
364
  }
228
365
  updateSelectedItemIndex() {
229
- let e = 0;
230
- const t = /* @__PURE__ */ new Map(), o = [], i = [];
231
- let n = this.childItems.length;
232
- for (; n; ) {
233
- n -= 1;
234
- const l = this.childItems[n];
235
- l.menuData.selectionRoot === this && ((l.selected || !this._hasUpdatedSelectedItemIndex && this.selected.includes(l.value)) && (e = n, t.set(l, !0), o.unshift(l.value), i.unshift(l)), n !== e && (l.focused = !1));
236
- }
237
- i.map((l, h) => {
238
- h > 0 && (l.focused = !1);
239
- }), this.selectedItemsMap = t, this._selected = o, this.selectedItems = i, this.value = this.selected.join(this.valueSeparator), this.focusedItemIndex = e, this.focusInItemIndex = e;
366
+ let firstOrFirstSelectedIndex = 0;
367
+ const selectedItemsMap = /* @__PURE__ */ new Map();
368
+ const selected = [];
369
+ const selectedItems = [];
370
+ let itemIndex = this.childItems.length;
371
+ while (itemIndex) {
372
+ itemIndex -= 1;
373
+ const childItem = this.childItems[itemIndex];
374
+ if (childItem.menuData.selectionRoot === this) {
375
+ if (childItem.selected || !this._hasUpdatedSelectedItemIndex && this.selected.includes(childItem.value)) {
376
+ firstOrFirstSelectedIndex = itemIndex;
377
+ selectedItemsMap.set(childItem, true);
378
+ selected.unshift(childItem.value);
379
+ selectedItems.unshift(childItem);
380
+ }
381
+ if (itemIndex !== firstOrFirstSelectedIndex) {
382
+ childItem.focused = false;
383
+ }
384
+ }
385
+ }
386
+ selectedItems.map((item, i) => {
387
+ if (i > 0) {
388
+ item.focused = false;
389
+ }
390
+ });
391
+ this.selectedItemsMap = selectedItemsMap;
392
+ this._selected = selected;
393
+ this.selectedItems = selectedItems;
394
+ this.value = this.selected.join(this.valueSeparator);
395
+ this.focusedItemIndex = firstOrFirstSelectedIndex;
396
+ this.focusInItemIndex = firstOrFirstSelectedIndex;
240
397
  }
241
398
  closeDescendentOverlays() {
242
- this.descendentOverlays.forEach((e) => {
243
- e.open = !1;
244
- }), this.descendentOverlays = /* @__PURE__ */ new Map();
399
+ this.descendentOverlays.forEach((overlay) => {
400
+ overlay.open = false;
401
+ });
402
+ this.descendentOverlays = /* @__PURE__ */ new Map();
245
403
  }
246
404
  render() {
247
405
  return this.renderMenuItemSlot();
248
406
  }
249
407
  connectedCallback() {
250
- super.connectedCallback(), !this.hasAttribute("role") && !this.ignore && this.setAttribute("role", this.ownRole), this.updateComplete.then(() => this.updateItemFocus());
408
+ super.connectedCallback();
409
+ if (!this.hasAttribute("role") && !this.ignore) {
410
+ this.setAttribute("role", this.ownRole);
411
+ }
412
+ this.updateComplete.then(() => this.updateItemFocus());
251
413
  }
252
414
  disconnectedCallback() {
253
- this.cachedChildItems = void 0, this.selectedItems = [], this.selectedItemsMap.clear(), this.childItemSet.clear(), this.descendentOverlays = /* @__PURE__ */ new Map(), super.disconnectedCallback();
254
- }
255
- handleDescendentOverlayOpened(e) {
256
- const t = e.composedPath()[0];
257
- t.overlayElement && this.descendentOverlays.set(t.overlayElement, t.overlayElement);
258
- }
259
- handleDescendentOverlayClosed(e) {
260
- const t = e.composedPath()[0];
261
- t.overlayElement && this.descendentOverlays.delete(t.overlayElement);
262
- }
263
- navigateWithinMenu(e) {
264
- const { key: t } = e, o = this.childItems[this.focusedItemIndex], i = t === "ArrowDown" ? 1 : -1, n = this.focusMenuItemByOffset(i);
265
- n !== o && (e.preventDefault(), e.stopPropagation(), n.scrollIntoView({ block: "nearest" }));
415
+ this.cachedChildItems = void 0;
416
+ this.selectedItems = [];
417
+ this.selectedItemsMap.clear();
418
+ this.childItemSet.clear();
419
+ this.descendentOverlays = /* @__PURE__ */ new Map();
420
+ super.disconnectedCallback();
421
+ }
422
+ handleDescendentOverlayOpened(event) {
423
+ const target = event.composedPath()[0];
424
+ if (!target.overlayElement) {
425
+ return;
426
+ }
427
+ this.descendentOverlays.set(target.overlayElement, target.overlayElement);
266
428
  }
267
- navigateBetweenRelatedMenus(e) {
268
- const { key: t } = e;
269
- e.stopPropagation();
270
- const o = this.isLTR && t === "ArrowRight" || !this.isLTR && t === "ArrowLeft", i = this.isLTR && t === "ArrowLeft" || !this.isLTR && t === "ArrowRight";
271
- if (o) {
272
- const n = this.childItems[this.focusedItemIndex];
273
- n != null && n.hasSubmenu && n.openOverlay();
274
- } else i && this.isSubmenu && (this.dispatchEvent(new Event("close", { bubbles: !0 })), this.updateSelectedItemIndex());
429
+ handleDescendentOverlayClosed(event) {
430
+ const target = event.composedPath()[0];
431
+ if (!target.overlayElement) {
432
+ return;
433
+ }
434
+ this.descendentOverlays.delete(target.overlayElement);
435
+ }
436
+ navigateWithinMenu(event) {
437
+ const { key } = event;
438
+ const lastFocusedItem = this.childItems[this.focusedItemIndex];
439
+ const direction = key === "ArrowDown" ? 1 : -1;
440
+ const itemToFocus = this.focusMenuItemByOffset(direction);
441
+ if (itemToFocus === lastFocusedItem) {
442
+ return;
443
+ }
444
+ event.preventDefault();
445
+ event.stopPropagation();
446
+ itemToFocus.scrollIntoView({ block: "nearest" });
447
+ }
448
+ navigateBetweenRelatedMenus(event) {
449
+ const { key } = event;
450
+ event.stopPropagation();
451
+ const shouldOpenSubmenu = this.isLTR && key === "ArrowRight" || !this.isLTR && key === "ArrowLeft";
452
+ const shouldCloseSelfAsSubmenu = this.isLTR && key === "ArrowLeft" || !this.isLTR && key === "ArrowRight";
453
+ if (shouldOpenSubmenu) {
454
+ const lastFocusedItem = this.childItems[this.focusedItemIndex];
455
+ if (lastFocusedItem == null ? void 0 : lastFocusedItem.hasSubmenu) {
456
+ lastFocusedItem.openOverlay();
457
+ }
458
+ } else if (shouldCloseSelfAsSubmenu && this.isSubmenu) {
459
+ this.dispatchEvent(new Event("close", { bubbles: true }));
460
+ this.updateSelectedItemIndex();
461
+ }
275
462
  }
276
463
  renderMenuItemSlot() {
277
- return u`
464
+ return html`
278
465
  <slot
279
466
  @luzmo-menu-submenu-opened=${this.handleDescendentOverlayOpened}
280
467
  @luzmo-menu-submenu-closed=${this.handleDescendentOverlayClosed}
@@ -282,52 +469,72 @@ class m extends I(w, {
282
469
  ></slot>
283
470
  `;
284
471
  }
285
- firstUpdated(e) {
286
- if (super.firstUpdated(e), !this.hasAttribute("tabindex") && !this.ignore) {
287
- const o = this.getAttribute("role");
288
- this.tabIndex = o === "group" ? -1 : 0;
472
+ firstUpdated(changed) {
473
+ super.firstUpdated(changed);
474
+ if (!this.hasAttribute("tabindex") && !this.ignore) {
475
+ const role = this.getAttribute("role");
476
+ this.tabIndex = role === "group" ? -1 : 0;
289
477
  }
290
- const t = [
291
- new Promise((o) => requestAnimationFrame(() => o(!0)))
478
+ const updates = [
479
+ new Promise((res) => requestAnimationFrame(() => res(true)))
292
480
  ];
293
- [...this.children].forEach((o) => {
294
- o.localName === "luzmo-menu-item" && t.push(o.updateComplete);
295
- }), this.childItemsUpdated = Promise.all(t);
481
+ [...this.children].forEach((item) => {
482
+ if (item.localName === "luzmo-menu-item") {
483
+ updates.push(item.updateComplete);
484
+ }
485
+ });
486
+ this.childItemsUpdated = Promise.all(updates);
296
487
  }
297
- updated(e) {
298
- super.updated(e), e.has("selects") && this.hasUpdated && this.selectsChanged(), e.has("label") && (this.label || e.get("label") !== void 0) && (this.label ? this.setAttribute("aria-label", this.label) : this.removeAttribute("aria-label"));
488
+ updated(changes) {
489
+ super.updated(changes);
490
+ if (changes.has("selects") && this.hasUpdated) {
491
+ this.selectsChanged();
492
+ }
493
+ if (changes.has("label") && (this.label || changes.get("label") !== void 0)) {
494
+ if (this.label) {
495
+ this.setAttribute("aria-label", this.label);
496
+ } else {
497
+ this.removeAttribute("aria-label");
498
+ }
499
+ }
299
500
  }
300
501
  selectsChanged() {
301
- const e = [
302
- new Promise((t) => requestAnimationFrame(() => t(!0)))
502
+ const updates = [
503
+ new Promise((res) => requestAnimationFrame(() => res(true)))
303
504
  ];
304
- this.childItemSet.forEach((t) => {
305
- e.push(t.triggerUpdate());
306
- }), this.childItemsUpdated = Promise.all(e);
505
+ this.childItemSet.forEach((childItem) => {
506
+ updates.push(childItem.triggerUpdate());
507
+ });
508
+ this.childItemsUpdated = Promise.all(updates);
307
509
  }
308
510
  async getUpdateComplete() {
309
- const e = await super.getUpdateComplete();
310
- return await this.childItemsUpdated, await this.cacheUpdated, e;
511
+ const complete = await super.getUpdateComplete();
512
+ await this.childItemsUpdated;
513
+ await this.cacheUpdated;
514
+ return complete;
311
515
  }
312
516
  updateCachedMenuItems() {
313
- if (this.cachedChildItems = [], !this.menuSlot)
517
+ this.cachedChildItems = [];
518
+ if (!this.menuSlot) {
314
519
  return [];
315
- const e = this.menuSlot.assignedElements({
316
- flatten: !0
520
+ }
521
+ const slottedElements = this.menuSlot.assignedElements({
522
+ flatten: true
317
523
  });
318
- for (const [t, o] of e.entries()) {
319
- if (this.childItemSet.has(o)) {
320
- this.cachedChildItems.push(o);
524
+ for (const [i, slottedElement] of slottedElements.entries()) {
525
+ if (this.childItemSet.has(slottedElement)) {
526
+ this.cachedChildItems.push(slottedElement);
321
527
  continue;
322
528
  }
323
- const n = o.localName === "slot" ? o.assignedElements({
324
- flatten: !0
325
- }) : [...o.querySelectorAll(":scope > *")];
326
- e.splice(
327
- t,
529
+ const isHTMLSlotElement = slottedElement.localName === "slot";
530
+ const flattenedChildren = isHTMLSlotElement ? slottedElement.assignedElements({
531
+ flatten: true
532
+ }) : [...slottedElement.querySelectorAll(":scope > *")];
533
+ slottedElements.splice(
534
+ i,
328
535
  1,
329
- o,
330
- ...n
536
+ slottedElement,
537
+ ...flattenedChildren
331
538
  );
332
539
  }
333
540
  return this.cachedChildItems;
@@ -339,11 +546,15 @@ class m extends I(w, {
339
546
  * dispatching `<luzmo-menu-item>` element.
340
547
  * @param event
341
548
  */
342
- onFocusableItemAddedOrUpdated(e) {
343
- e.menuCascade.set(this, {
344
- hadFocusRoot: !!e.item.menuData.focusRoot,
345
- ancestorWithSelects: e.currentAncestorWithSelects
346
- }), this.selects && (e.currentAncestorWithSelects = this), e.item.menuData.focusRoot = e.item.menuData.focusRoot || this;
549
+ onFocusableItemAddedOrUpdated(event) {
550
+ event.menuCascade.set(this, {
551
+ hadFocusRoot: !!event.item.menuData.focusRoot,
552
+ ancestorWithSelects: event.currentAncestorWithSelects
553
+ });
554
+ if (this.selects) {
555
+ event.currentAncestorWithSelects = this;
556
+ }
557
+ event.item.menuData.focusRoot = event.item.menuData.focusRoot || this;
347
558
  }
348
559
  /**
349
560
  * When a descendant `<luzmo-menu-item>` element is added or updated it will dispatch
@@ -352,61 +563,103 @@ class m extends I(w, {
352
563
  * manage the selection state of the dispatching `<luzmo-menu-item>` element.
353
564
  * @param event
354
565
  */
355
- onSelectableItemAddedOrUpdated(e) {
356
- var i, n;
357
- const t = e.menuCascade.get(this);
358
- if (!t)
566
+ onSelectableItemAddedOrUpdated(event) {
567
+ var _a, _b;
568
+ const cascadeData = event.menuCascade.get(this);
569
+ if (!cascadeData) {
359
570
  return;
360
- if (e.item.menuData.parentMenu = e.item.menuData.parentMenu || this, t.hadFocusRoot && !this.ignore && (this.tabIndex = -1), this.addChildItem(e.item), this.selects === "inherit") {
571
+ }
572
+ event.item.menuData.parentMenu = event.item.menuData.parentMenu || this;
573
+ if (cascadeData.hadFocusRoot && !this.ignore) {
574
+ this.tabIndex = -1;
575
+ }
576
+ this.addChildItem(event.item);
577
+ if (this.selects === "inherit") {
361
578
  this.resolvedSelects = "inherit";
362
- const l = (i = e.currentAncestorWithSelects) == null ? void 0 : i.ignore;
363
- this.resolvedRole = l ? "none" : ((n = e.currentAncestorWithSelects) == null ? void 0 : n.getAttribute("role")) || this.getAttribute("role") || void 0;
364
- } else this.selects ? (this.resolvedRole = this.ignore ? "none" : this.getAttribute("role") || void 0, this.resolvedSelects = this.selects) : (this.resolvedRole = this.ignore ? "none" : this.getAttribute("role") || void 0, this.resolvedSelects = this.resolvedRole === "none" ? "ignore" : "none");
365
- const o = this.resolvedSelects === "single" || this.resolvedSelects === "multiple";
366
- e.item.menuData.cleanupSteps.push(
367
- (l) => this.removeChildItem(l)
368
- ), (o || !this.selects && this.resolvedSelects !== "ignore") && !e.item.menuData.selectionRoot && (e.item.setRole(this.childRole), e.item.menuData.selectionRoot = e.item.menuData.selectionRoot || this, e.item.selected && (this.selectedItemsMap.set(e.item, !0), this.selectedItems = [...this.selectedItems, e.item], this._selected = [...this.selected, e.item.value], this.value = this.selected.join(this.valueSeparator)));
369
- }
370
- addChildItem(e) {
371
- this.childItemSet.add(e), this.handleItemsChanged();
372
- }
373
- async removeChildItem(e) {
374
- this.childItemSet.delete(e), this.cachedChildItems = void 0, e.focused && (this.handleItemsChanged(), await this.updateComplete, this.focus());
375
- }
376
- handleClick(e) {
377
- if (this.pointerUpTarget === e.target) {
579
+ const ignoreMenu = (_a = event.currentAncestorWithSelects) == null ? void 0 : _a.ignore;
580
+ this.resolvedRole = ignoreMenu ? "none" : ((_b = event.currentAncestorWithSelects) == null ? void 0 : _b.getAttribute("role")) || this.getAttribute("role") || void 0;
581
+ } else if (this.selects) {
582
+ this.resolvedRole = this.ignore ? "none" : this.getAttribute("role") || void 0;
583
+ this.resolvedSelects = this.selects;
584
+ } else {
585
+ this.resolvedRole = this.ignore ? "none" : this.getAttribute("role") || void 0;
586
+ this.resolvedSelects = this.resolvedRole === "none" ? "ignore" : "none";
587
+ }
588
+ const selects = this.resolvedSelects === "single" || this.resolvedSelects === "multiple";
589
+ event.item.menuData.cleanupSteps.push(
590
+ (item) => this.removeChildItem(item)
591
+ );
592
+ if ((selects || !this.selects && this.resolvedSelects !== "ignore") && !event.item.menuData.selectionRoot) {
593
+ event.item.setRole(this.childRole);
594
+ event.item.menuData.selectionRoot = event.item.menuData.selectionRoot || this;
595
+ if (event.item.selected) {
596
+ this.selectedItemsMap.set(event.item, true);
597
+ this.selectedItems = [...this.selectedItems, event.item];
598
+ this._selected = [...this.selected, event.item.value];
599
+ this.value = this.selected.join(this.valueSeparator);
600
+ }
601
+ }
602
+ }
603
+ addChildItem(item) {
604
+ this.childItemSet.add(item);
605
+ this.handleItemsChanged();
606
+ }
607
+ async removeChildItem(item) {
608
+ this.childItemSet.delete(item);
609
+ this.cachedChildItems = void 0;
610
+ if (item.focused) {
611
+ this.handleItemsChanged();
612
+ await this.updateComplete;
613
+ this.focus();
614
+ }
615
+ }
616
+ handleClick(event) {
617
+ if (this.pointerUpTarget === event.target) {
378
618
  this.pointerUpTarget = null;
379
619
  return;
380
620
  }
381
- this.handlePointerBasedSelection(e);
621
+ this.handlePointerBasedSelection(event);
382
622
  }
383
- handlePointerup(e) {
384
- this.pointerUpTarget = e.target, this.handlePointerBasedSelection(e);
623
+ handlePointerup(event) {
624
+ this.pointerUpTarget = event.target;
625
+ this.handlePointerBasedSelection(event);
385
626
  }
386
- handlePointerBasedSelection(e) {
387
- var i, n;
388
- if (e instanceof MouseEvent && e.button !== 0)
627
+ handlePointerBasedSelection(event) {
628
+ var _a, _b;
629
+ if (event instanceof MouseEvent && event.button !== 0) {
389
630
  return;
390
- const o = e.composedPath().find((l) => l instanceof Element ? l.getAttribute("role") === this.childRole : !1);
391
- if (e.defaultPrevented) {
392
- const l = this.childItems.indexOf(o);
393
- ((i = o == null ? void 0 : o.menuData) == null ? void 0 : i.focusRoot) === this && l !== -1 && (this.focusedItemIndex = l);
631
+ }
632
+ const path = event.composedPath();
633
+ const target = path.find((el) => {
634
+ if (!(el instanceof Element)) {
635
+ return false;
636
+ }
637
+ return el.getAttribute("role") === this.childRole;
638
+ });
639
+ if (event.defaultPrevented) {
640
+ const index = this.childItems.indexOf(target);
641
+ if (((_a = target == null ? void 0 : target.menuData) == null ? void 0 : _a.focusRoot) === this && index !== -1) {
642
+ this.focusedItemIndex = index;
643
+ }
394
644
  return;
395
645
  }
396
- if (o != null && o.href && o.href.length > 0) {
646
+ if ((target == null ? void 0 : target.href) && target.href.length > 0) {
397
647
  this.dispatchEvent(
398
648
  new Event("change", {
399
- bubbles: !0,
400
- composed: !0
649
+ bubbles: true,
650
+ composed: true
401
651
  })
402
652
  );
403
653
  return;
404
- } else if (((n = o == null ? void 0 : o.menuData) == null ? void 0 : n.selectionRoot) === this && this.childItems.length > 0) {
405
- if (e.preventDefault(), o.hasSubmenu || o.open)
654
+ } else if (((_b = target == null ? void 0 : target.menuData) == null ? void 0 : _b.selectionRoot) === this && this.childItems.length > 0) {
655
+ event.preventDefault();
656
+ if (target.hasSubmenu || target.open) {
406
657
  return;
407
- this.selectOrToggleItem(o);
408
- } else
658
+ }
659
+ this.selectOrToggleItem(target);
660
+ } else {
409
661
  return;
662
+ }
410
663
  this.prepareToCleanUp();
411
664
  }
412
665
  prepareToCleanUp() {
@@ -414,101 +667,133 @@ class m extends I(w, {
414
667
  "focusout",
415
668
  () => {
416
669
  requestAnimationFrame(() => {
417
- const e = this.childItems[this.focusedItemIndex];
418
- e && (e.focused = !1, this.updateSelectedItemIndex());
670
+ const focusedItem = this.childItems[this.focusedItemIndex];
671
+ if (focusedItem) {
672
+ focusedItem.focused = false;
673
+ this.updateSelectedItemIndex();
674
+ }
419
675
  });
420
676
  },
421
- { once: !0 }
677
+ { once: true }
422
678
  );
423
679
  }
424
680
  handleItemsChanged() {
425
- this.cachedChildItems = void 0, this._willUpdateItems || (this._willUpdateItems = !0, this.cacheUpdated = this.updateCache());
681
+ this.cachedChildItems = void 0;
682
+ if (!this._willUpdateItems) {
683
+ this._willUpdateItems = true;
684
+ this.cacheUpdated = this.updateCache();
685
+ }
426
686
  }
427
687
  async updateCache() {
428
- await (this.hasUpdated ? new Promise((e) => requestAnimationFrame(() => e(!0))) : Promise.all([
429
- new Promise((e) => requestAnimationFrame(() => e(!0))),
688
+ await (this.hasUpdated ? new Promise((res) => requestAnimationFrame(() => res(true))) : Promise.all([
689
+ new Promise((res) => requestAnimationFrame(() => res(true))),
430
690
  this.updateComplete
431
- ])), this.cachedChildItems === void 0 && (this.updateSelectedItemIndex(), this.updateItemFocus()), this._willUpdateItems = !1;
691
+ ]));
692
+ if (this.cachedChildItems === void 0) {
693
+ this.updateSelectedItemIndex();
694
+ this.updateItemFocus();
695
+ }
696
+ this._willUpdateItems = false;
432
697
  }
433
698
  updateItemFocus() {
434
- if (this.childItems.length === 0)
699
+ if (this.childItems.length === 0) {
435
700
  return;
436
- const e = this.childItems[this.focusInItemIndex];
437
- this.getRootNode().activeElement === e.menuData.focusRoot && this.forwardFocusVisibleToItem(e);
701
+ }
702
+ const focusInItem = this.childItems[this.focusInItemIndex];
703
+ if (this.getRootNode().activeElement === focusInItem.menuData.focusRoot) {
704
+ this.forwardFocusVisibleToItem(focusInItem);
705
+ }
438
706
  }
439
- forwardFocusVisibleToItem(e) {
440
- if (!e || e.menuData.focusRoot !== this)
707
+ forwardFocusVisibleToItem(item) {
708
+ if (!item || item.menuData.focusRoot !== this) {
441
709
  return;
710
+ }
442
711
  this.closeDescendentOverlays();
443
- const t = this.hasVisibleFocusInTree() || !!this.childItems.some((o) => o.hasVisibleFocusInTree());
444
- e.focused = t, this.setAttribute("aria-activedescendant", e.id), e.menuData.selectionRoot && e.menuData.selectionRoot !== this && e.menuData.selectionRoot.focus();
712
+ const focused = this.hasVisibleFocusInTree() || !!this.childItems.some((child) => child.hasVisibleFocusInTree());
713
+ item.focused = focused;
714
+ this.setAttribute("aria-activedescendant", item.id);
715
+ if (item.menuData.selectionRoot && item.menuData.selectionRoot !== this) {
716
+ item.menuData.selectionRoot.focus();
717
+ }
445
718
  }
446
719
  handleSlotchange({
447
- target: e
720
+ target
448
721
  }) {
449
- const t = e.assignedElements({
450
- flatten: !0
722
+ const assignedElements = target.assignedElements({
723
+ flatten: true
451
724
  });
452
- this.childItems.length !== t.length && t.forEach((o) => {
453
- o.triggerUpdate !== void 0 ? o.triggerUpdate() : o.childItems !== void 0 && o.childItems.forEach((i) => {
454
- i.triggerUpdate();
725
+ if (this.childItems.length !== assignedElements.length) {
726
+ assignedElements.forEach((item) => {
727
+ if (item.triggerUpdate !== void 0) {
728
+ item.triggerUpdate();
729
+ } else if (item.childItems !== void 0) {
730
+ item.childItems.forEach((child) => {
731
+ child.triggerUpdate();
732
+ });
733
+ }
455
734
  });
456
- });
735
+ }
457
736
  }
458
737
  }
459
- d([
460
- a({ type: String, reflect: !0 })
461
- ], m.prototype, "label", 2);
462
- d([
463
- a({ type: Boolean, reflect: !0 })
464
- ], m.prototype, "ignore", 2);
465
- d([
466
- a({ type: String, reflect: !0 })
467
- ], m.prototype, "variant", 2);
468
- d([
469
- a({ type: String, reflect: !0 })
470
- ], m.prototype, "selects", 2);
471
- d([
472
- a({ type: String })
473
- ], m.prototype, "value", 2);
474
- d([
475
- a({ type: String, attribute: "value-separator" })
476
- ], m.prototype, "valueSeparator", 2);
477
- d([
478
- a({ attribute: !1 })
479
- ], m.prototype, "selected", 1);
480
- d([
481
- a({ attribute: !1 })
482
- ], m.prototype, "selectedItems", 2);
483
- d([
484
- p("slot:not([name])")
485
- ], m.prototype, "menuSlot", 2);
486
- const N = ":host{--menu-divider-thickness: var( --divider-thickness-medium, var(--luzmo-border-width) );inline-size:auto;margin-block:var(--luzmo-menu-section-divider-margin-block, max(0px, (var(--menu-item-section-divider-height) - var(--menu-divider-thickness)) / 2));margin-inline:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content));overflow:visible}.luzmo-Menu-back:focus-visible{box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * var(--menu-item-focus-indicator-direction-scalar, 1)) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)))}.luzmo-Menu-back{padding-inline:0 var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-inline:var(--luzmo-menu-back-padding-inline-start, 0) var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-block:0;padding-block:var(--luzmo-menu-back-padding-block-start, 0) var(--luzmo-menu-back-padding-block-end, 0);flex-flow:wrap;align-items:center;display:flex}.luzmo-Menu-backButton{cursor:pointer;background:none;border:0;margin:0;padding:0;display:inline-flex}.luzmo-Menu-backButton:focus-visible{outline:var(--focus-indicator-width) solid var(--focus-indicator-color);outline-offset:calc((var(--focus-indicator-width) + 1px) * -1)}.luzmo-Menu-backHeading{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-heading-color, var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size, var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight, var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height, var(--menu-section-header-line-height));display:block}:host{display:block;flex-shrink:0}";
487
- class V extends I(w, {
738
+ __decorateClass$2([
739
+ property({ type: String, reflect: true })
740
+ ], LuzmoMenu.prototype, "label", 2);
741
+ __decorateClass$2([
742
+ property({ type: Boolean, reflect: true })
743
+ ], LuzmoMenu.prototype, "ignore", 2);
744
+ __decorateClass$2([
745
+ property({ type: String, reflect: true })
746
+ ], LuzmoMenu.prototype, "variant", 2);
747
+ __decorateClass$2([
748
+ property({ type: String, reflect: true })
749
+ ], LuzmoMenu.prototype, "selects", 2);
750
+ __decorateClass$2([
751
+ property({ type: String })
752
+ ], LuzmoMenu.prototype, "value", 2);
753
+ __decorateClass$2([
754
+ property({ type: String, attribute: "value-separator" })
755
+ ], LuzmoMenu.prototype, "valueSeparator", 2);
756
+ __decorateClass$2([
757
+ property({ attribute: false })
758
+ ], LuzmoMenu.prototype, "selected", 1);
759
+ __decorateClass$2([
760
+ property({ attribute: false })
761
+ ], LuzmoMenu.prototype, "selectedItems", 2);
762
+ __decorateClass$2([
763
+ query("slot:not([name])")
764
+ ], LuzmoMenu.prototype, "menuSlot", 2);
765
+ const menuDividerStyles = ":host{--menu-divider-thickness: var( --divider-thickness-medium, var(--luzmo-border-width) );inline-size:auto;margin-block:var(--luzmo-menu-section-divider-margin-block, max(0px, (var(--menu-item-section-divider-height) - var(--menu-divider-thickness)) / 2));margin-inline:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content));overflow:visible}.luzmo-Menu-back:focus-visible{box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * var(--menu-item-focus-indicator-direction-scalar, 1)) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)))}.luzmo-Menu-back{padding-inline:0 var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-inline:var(--luzmo-menu-back-padding-inline-start, 0) var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-block:0;padding-block:var(--luzmo-menu-back-padding-block-start, 0) var(--luzmo-menu-back-padding-block-end, 0);flex-flow:wrap;align-items:center;display:flex}.luzmo-Menu-backButton{cursor:pointer;background:none;border:0;margin:0;padding:0;display:inline-flex}.luzmo-Menu-backButton:focus-visible{outline:var(--focus-indicator-width) solid var(--focus-indicator-color);outline-offset:calc((var(--focus-indicator-width) + 1px) * -1)}.luzmo-Menu-backHeading{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-heading-color, var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size, var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight, var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height, var(--menu-section-header-line-height));display:block}:host{display:block;flex-shrink:0}";
766
+ class LuzmoMenuDivider extends SizedMixin(LuzmoElement, {
488
767
  validSizes: ["s", "m", "l"]
489
768
  }) {
490
769
  static get styles() {
491
- return [f(M), f(N)];
770
+ return [unsafeCSS(dividerStyles), unsafeCSS(menuDividerStyles)];
492
771
  }
493
- firstUpdated(e) {
494
- super.firstUpdated(e), this.setAttribute("role", "separator");
772
+ firstUpdated(changed) {
773
+ super.firstUpdated(changed);
774
+ this.setAttribute("role", "separator");
495
775
  }
496
776
  }
497
- const W = ".luzmo-Menu-back:focus-visible{box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * var(--menu-item-focus-indicator-direction-scalar, 1)) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)))}.header{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-section-header-color, var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size, var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight, var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height, var(--menu-section-header-line-height));min-inline-size:var(--luzmo-menu-section-header-min-width, var(--menu-section-header-min-width));padding-block-start:var(--luzmo-menu-section-header-top-edge-to-text, var(--luzmo-menu-item-top-edge-to-text, var(--menu-item-top-edge-to-text)));padding-block-end:var(--luzmo-menu-section-header-bottom-edge-to-text, var(--luzmo-menu-item-bottom-edge-to-text, var(--menu-item-bottom-edge-to-text)));padding-inline:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content));grid-area:sectionHeadingArea/1/sectionHeadingArea/-1;display:block}.luzmo-Menu-back{padding-inline:0 var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-inline:var(--luzmo-menu-back-padding-inline-start, 0) var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-block:0;padding-block:var(--luzmo-menu-back-padding-block-start, 0) var(--luzmo-menu-back-padding-block-end, 0);flex-flow:wrap;align-items:center;display:flex}.luzmo-Menu-back .header{padding:0}.luzmo-Menu-backButton{cursor:pointer;background:none;border:0;margin:0;padding:0;display:inline-flex}.luzmo-Menu-backButton:focus-visible{outline:var(--focus-indicator-width) solid var(--focus-indicator-color);outline-offset:calc((var(--focus-indicator-width) + 1px) * -1)}.luzmo-Menu-backHeading{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-heading-color, var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size, var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight, var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height, var(--menu-section-header-line-height));display:block}:host{margin:0;display:inline-flex;overflow:visible;flex-direction:column}[hidden]{display:none!important}";
498
- var K = Object.defineProperty, S = (r, e, t, o) => {
499
- for (var i = void 0, n = r.length - 1, l; n >= 0; n--)
500
- (l = r[n]) && (i = l(e, t, i) || i);
501
- return i && K(e, t, i), i;
777
+ const menuGroupStyles = ".luzmo-Menu-back:focus-visible{box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * var(--menu-item-focus-indicator-direction-scalar, 1)) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)))}.header{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-section-header-color, var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size, var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight, var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height, var(--menu-section-header-line-height));min-inline-size:var(--luzmo-menu-section-header-min-width, var(--menu-section-header-min-width));padding-block-start:var(--luzmo-menu-section-header-top-edge-to-text, var(--luzmo-menu-item-top-edge-to-text, var(--menu-item-top-edge-to-text)));padding-block-end:var(--luzmo-menu-section-header-bottom-edge-to-text, var(--luzmo-menu-item-bottom-edge-to-text, var(--menu-item-bottom-edge-to-text)));padding-inline:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content));grid-area:sectionHeadingArea/1/sectionHeadingArea/-1;display:block}.luzmo-Menu-back{padding-inline:0 var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-inline:var(--luzmo-menu-back-padding-inline-start, 0) var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-block:0;padding-block:var(--luzmo-menu-back-padding-block-start, 0) var(--luzmo-menu-back-padding-block-end, 0);flex-flow:wrap;align-items:center;display:flex}.luzmo-Menu-back .header{padding:0}.luzmo-Menu-backButton{cursor:pointer;background:none;border:0;margin:0;padding:0;display:inline-flex}.luzmo-Menu-backButton:focus-visible{outline:var(--focus-indicator-width) solid var(--focus-indicator-color);outline-offset:calc((var(--focus-indicator-width) + 1px) * -1)}.luzmo-Menu-backHeading{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-heading-color, var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size, var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight, var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height, var(--menu-section-header-line-height));display:block}:host{margin:0;display:inline-flex;overflow:visible;flex-direction:column}[hidden]{display:none!important}";
778
+ var __defProp$1 = Object.defineProperty;
779
+ var __decorateClass$1 = (decorators, target, key, kind) => {
780
+ var result = void 0;
781
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
782
+ if (decorator = decorators[i])
783
+ result = decorator(target, key, result) || result;
784
+ if (result) __defProp$1(target, key, result);
785
+ return result;
502
786
  };
503
- class k extends m {
787
+ class LuzmoMenuGroup extends LuzmoMenu {
504
788
  constructor() {
505
- super(...arguments), this.headerId = "";
789
+ super(...arguments);
790
+ this.headerId = "";
506
791
  }
507
792
  static get styles() {
508
- return [...super.styles, f(W)];
793
+ return [...super.styles, unsafeCSS(menuGroupStyles)];
509
794
  }
510
795
  render() {
511
- return u`
796
+ return html`
512
797
  <span class="header" ?hidden=${!this.headerElement}>
513
798
  <slot name="header" @slotchange=${this.updateLabel}></slot>
514
799
  </span>
@@ -525,127 +810,193 @@ class k extends m {
525
810
  switch (this.selects) {
526
811
  case "multiple":
527
812
  case "single":
528
- case "inherit":
813
+ case "inherit": {
529
814
  return "group";
530
- default:
815
+ }
816
+ default: {
531
817
  return "menu";
818
+ }
532
819
  }
533
820
  }
534
821
  updateLabel() {
535
- const e = this.headerElements.length > 0 ? this.headerElements[0] : void 0;
536
- if (e !== this.headerElement)
537
- if (this.headerElement && this.headerElement.id === this.headerId && this.headerElement.removeAttribute("id"), e) {
538
- this.headerId = this.headerId || `luzmo-menu-group-label-${y()}`;
539
- const t = e.id || this.headerId;
540
- e.id || (e.id = t), this.setAttribute("aria-labelledby", t);
541
- } else
822
+ const headerElement = this.headerElements.length > 0 ? this.headerElements[0] : void 0;
823
+ if (headerElement !== this.headerElement) {
824
+ if (this.headerElement && this.headerElement.id === this.headerId) {
825
+ this.headerElement.removeAttribute("id");
826
+ }
827
+ if (headerElement) {
828
+ this.headerId = this.headerId || `luzmo-menu-group-label-${randomID()}`;
829
+ const headerId = headerElement.id || this.headerId;
830
+ if (!headerElement.id) {
831
+ headerElement.id = headerId;
832
+ }
833
+ this.setAttribute("aria-labelledby", headerId);
834
+ } else {
542
835
  this.removeAttribute("aria-labelledby");
543
- this.headerElement = e;
836
+ }
837
+ }
838
+ this.headerElement = headerElement;
544
839
  }
545
840
  }
546
- S([
547
- C({
841
+ __decorateClass$1([
842
+ queryAssignedNodes({
548
843
  slot: "header",
549
- flatten: !0
844
+ flatten: true
550
845
  })
551
- ], k.prototype, "headerElements");
552
- S([
553
- A()
554
- ], k.prototype, "headerElement");
555
- const G = '.checkmark{display:var(--luzmo-menu-checkmark-display, var(--menu-checkmark-display));font-size:var(--luzmo-menu-item-checkmark-size, var(--menu-item-checkmark-size));fill:var(--highcontrast-menu-checkmark-icon-color-default, var(--luzmo-menu-checkmark-icon-color-default, var(--menu-checkmark-icon-color-default)));color:var(--highcontrast-menu-checkmark-icon-color-default, var(--luzmo-menu-checkmark-icon-color-default, var(--menu-checkmark-icon-color-default)));opacity:1;grid-area:checkmarkArea;align-self:start;margin-block-start:calc(var(--luzmo-menu-item-top-to-checkmark, var(--menu-item-top-to-checkmark)) - var(--luzmo-menu-item-top-edge-to-text, var(--menu-item-top-edge-to-text)));margin-inline-end:var(--luzmo-menu-item-text-to-control, var(--menu-item-text-to-control))}.angle{font-size:var(--menu-item-angle-size);grid-area:angleArea;align-self:center;margin-inline-end:var(--luzmo-menu-item-text-to-control, var(--menu-item-text-to-control))}.luzmo-Menu-back:focus-visible{box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * var(--menu-item-focus-indicator-direction-scalar, 1)) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)))}.luzmo-Menu-backButton:focus-visible{outline:var(--focus-indicator-width) solid var(--focus-indicator-color);outline-offset:calc((var(--focus-indicator-width) + 1px) * -1)}::slotted([slot=icon]){fill:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-item-label-icon-color-default, var(--menu-item-label-icon-color-default)));color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-item-label-icon-color-default, var(--menu-item-label-icon-color-default)));grid-area:iconArea;align-self:start}::slotted([slot=icon]){margin-inline-end:var(--luzmo-menu-item-label-text-to-visual, var(--menu-item-label-text-to-visual));margin-block-start:var(--luzmo-menu-item-top-to-icon, var(--menu-item-top-to-icon));block-size:var(--luzmo-menu-item-icon-size, var(--menu-item-icon-height));inline-size:var(--luzmo-menu-item-icon-width, var(--menu-item-icon-height));font-size:var(--luzmo-menu-item-icon-size, var(--menu-item-icon-height));text-align:center;--luzmo-icon-vertical-align: 0}:host{cursor:pointer;box-sizing:border-box;background-color:var(--highcontrast-menu-item-background-color-default, var(--luzmo-menu-item-background-color-default, var(--menu-item-background-color-default)));line-height:var(--luzmo-menu-item-label-line-height, var(--menu-item-label-line-height));min-block-size:var(--luzmo-menu-item-min-height, var(--menu-item-min-height));padding-block-start:var(--luzmo-menu-item-top-edge-to-text, var(--menu-item-top-edge-to-text));padding-block-end:var(--luzmo-menu-item-bottom-edge-to-text, var(--menu-item-bottom-edge-to-text));padding-inline:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content));grid-template:". angleAreaCollapsible . headingIconArea sectionHeadingArea . . ." "selectedArea angleAreaCollapsible checkmarkArea iconArea labelArea valueArea actionsArea angleAreaDrillIn" 1fr ". . . . descriptionArea . . ." ". . . . submenuArea . . ." ". . . . . . . ."/auto auto auto auto 1fr auto auto auto;justify-content:start;margin:0;-webkit-text-decoration:none;text-decoration:none;display:grid;align-items:center;position:relative}.luzmo-Menu-itemCheckbox{--luzmo-checkbox-top-to-text: 0;--luzmo-checkbox-text-to-control: 0;min-block-size:0}.luzmo-Menu-itemCheckbox .luzmo-Checkbox-box{margin-block-start:var(--luzmo-menu-item-top-to-checkbox, var(--menu-item-top-to-checkbox));margin-block-end:0;margin-inline-end:var(--luzmo-menu-item-text-to-control, var(--menu-item-text-to-control))}.luzmo-Menu-itemSwitch{min-block-size:0}.luzmo-Menu-itemSwitch .luzmo-Switch-switch{margin-block-start:var(--luzmo-menu-item-top-to-action, var(--menu-item-top-to-action));margin-block-end:0}#label{grid-area:submenuItemLabelArea}::slotted([slot=value]){grid-area:submenuItemValueArea}:host([focused]),:host(:focus){background-color:var(--highcontrast-menu-item-background-color-focus, var(--luzmo-menu-item-background-color-key-focus, var(--menu-item-background-color-key-focus)));outline:none}:host([focused])>#label,:host(:focus)>#label,:host([focused])>.menu-item-tooltip-icon,:host(:focus)>.menu-item-tooltip-icon{color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-content-color-focus, var(--menu-item-label-content-color-focus)))}:host([focused])>[name=description]::slotted(*),:host(:focus)>[name=description]::slotted(*){color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-description-color-focus, var(--menu-item-description-color-focus)))}:host([focused])>::slotted([slot=value]),:host(:focus)>::slotted([slot=value]){color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-value-color-focus, var(--menu-item-value-color-focus)))}:host([focused])>.icon:not(.angle,.checkmark),:host(:focus)>.icon:not(.angle,.checkmark){fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-icon-color-focus, var(--menu-item-label-icon-color-focus)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-icon-color-focus, var(--menu-item-label-icon-color-focus)))}:host([focused])>.angle,:host(:focus)>.angle{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-collapsible-icon-color, var(--menu-collapsible-icon-color)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-collapsible-icon-color, var(--menu-collapsible-icon-color)))}:host([focused])>.checkmark,:host(:focus)>.checkmark{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-checkmark-icon-color-focus, var(--menu-checkmark-icon-color-focus)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-checkmark-icon-color-focus, var(--menu-checkmark-icon-color-focus)))}:host:dir(rtl),:host([dir=rtl]){--menu-item-focus-indicator-direction-scalar: -1}:host(:is(:active,[active])){background-color:var(--highcontrast-menu-item-background-color-focus, var(--luzmo-menu-item-background-color-down, var(--menu-item-background-color-down)))}:host(:is(:active,[active]))>#label,:host(:is(:active,[active]))>.menu-item-tooltip-icon{color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-content-color-down, var(--menu-item-label-content-color-down)))}:host(:is(:active,[active]))>[name=description]::slotted(*){color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-description-color-down, var(--menu-item-description-color-down)))}:host(:is(:active,[active]))>::slotted([slot=value]){color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-value-color-down, var(--menu-item-value-color-down)))}:host(:is(:active,[active]))>.icon:not(.angle,.checkmark){fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-icon-color-down, var(--menu-item-label-icon-color-down)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-icon-color-down, var(--menu-item-label-icon-color-down)))}:host(:is(:active,[active]))>.angle{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-collapsible-icon-color, var(--menu-collapsible-icon-color)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-collapsible-icon-color, var(--menu-collapsible-icon-color)))}:host(:is(:active,[active]))>.checkmark{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-checkmark-icon-color-down, var(--menu-checkmark-icon-color-down)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-checkmark-icon-color-down, var(--menu-checkmark-icon-color-down)))}:host([disabled]),:host([aria-disabled=true]){background-color:initial}:host([disabled]) #label,:host([disabled]) .menu-item-tooltip-icon,:host([disabled]) ::slotted([slot=value]),:host([aria-disabled=true]) #label,:host([aria-disabled=true]) ::slotted([slot=value]){color:var(--highcontrast-menu-item-color-disabled, var(--luzmo-menu-item-label-content-color-disabled, var(--menu-item-label-content-color-disabled)))}:host([disabled]) [name=description]::slotted(*),:host([aria-disabled=true]) [name=description]::slotted(*){color:var(--highcontrast-menu-item-color-disabled, var(--luzmo-menu-item-description-color-disabled, var(--menu-item-description-color-disabled)))}:host([disabled]) ::slotted([slot=icon]),:host([aria-disabled=true]) ::slotted([slot=icon]){color:var(--highcontrast-menu-item-color-disabled, var(--luzmo-menu-item-label-icon-color-disabled, var(--menu-item-label-icon-color-disabled)));fill:var(--highcontrast-menu-item-color-disabled, var(--luzmo-menu-item-label-icon-color-disabled, var(--menu-item-label-icon-color-disabled)))}:host([focused]) .luzmo-Menu-back,:host([focused]){box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * var(--menu-item-focus-indicator-direction-scalar, 1)) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)))}:host .is-selectableMultiple{align-items:start}.is-selectableMultiple .luzmo-Menu-itemCheckbox{grid-area:checkmarkArea}.luzmo-Menu-itemSelection{grid-area:selectedArea}#label{--luzmo-switch-control-label-spacing: 0;--luzmo-switch-spacing-top-to-label: 0;font-size:var(--luzmo-menu-item-label-font-size, var(--menu-item-label-font-size));color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-item-label-content-color-default, var(--menu-item-label-content-color-default)));-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;grid-area:labelArea}.menu-item-tooltip-icon{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-item-label-icon-color-default, var(--menu-item-label-icon-color-default)))}:host([selected]) #label{color:var(--menu-item-highlight-label-content-color)}:host([selected]) .menu-item-tooltip-icon{color:var(--menu-item-highlight-label-content-color)}::slotted([slot=value]){color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-item-value-color-default, var(--menu-item-value-color-default)));font-size:var(--luzmo-menu-item-label-font-size, var(--menu-item-label-font-size));grid-area:valueArea;justify-self:end}.luzmo-Menu-itemActions,::slotted([slot=value]){align-self:start;margin-inline-start:var(--luzmo-menu-item-label-to-value-area-min-spacing, var(--menu-item-label-to-value-area-min-spacing))}.luzmo-Menu-itemActions{grid-area:actionsArea}[name=description]::slotted(*){color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-item-description-color-default, var(--menu-item-description-color-default)));font-size:var(--luzmo-menu-item-description-font-size, var(--menu-item-description-font-size));-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;line-height:var(--luzmo-menu-item-description-line-height, var(--menu-item-description-line-height));grid-area:descriptionArea;margin-block-start:var(--luzmo-menu-item-label-to-description-spacing, var(--menu-item-label-to-description-spacing))}:host([no-wrap]) #label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.luzmo-Menu-item--collapsible.is-open{padding-block-end:0}.luzmo-Menu-item--collapsible.is-open .angle{transform:rotate(90deg)}:host([focused]) .luzmo-Menu-item--collapsible.is-open,:host(:is(:active,[active])) .luzmo-Menu-item--collapsible.is-open,.luzmo-Menu-item--collapsible.is-open:focus{background-color:var(--highcontrast-menu-item-background-color-default, var(--luzmo-menu-item-background-color-default, var(--menu-item-background-color-default)))}.luzmo-Menu-item--collapsible ::slotted([slot=icon]){grid-area:headingIconArea}.luzmo-Menu-item--collapsible>::slotted([slot=icon]){padding-block-start:var(--luzmo-menu-section-header-top-edge-to-text, var(--luzmo-menu-item-top-edge-to-text, var(--menu-item-top-edge-to-text)));padding-block-end:var(--luzmo-menu-section-header-bottom-edge-to-text, var(--luzmo-menu-item-bottom-edge-to-text, var(--menu-item-bottom-edge-to-text)))}.luzmo-Menu-item--collapsible .angle{grid-area:angleAreaCollapsible}:host([has-submenu]) .angle{fill:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-drillin-icon-color-default, var(--menu-drillin-icon-color-default)));color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-drillin-icon-color-default, var(--menu-drillin-icon-color-default)));grid-area:angleAreaDrillIn;margin-inline-start:var(--luzmo-menu-item-label-to-value-area-min-spacing, var(--menu-item-label-to-value-area-min-spacing));margin-inline-end:0}:host([has-submenu]) .is-open{--menu-item-background-color-default: var( --highcontrast-menu-item-selected-background-color, var( --luzmo-menu-item-background-color-hover, var(--menu-item-background-color-hover) ) )}:host([has-submenu]) .is-open .icon:not(.angle,.checkmark){fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-icon-color-hover, var(--menu-item-label-icon-color-hover)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-icon-color-hover, var(--menu-item-label-icon-color-hover)))}:host([has-submenu]) .is-open .angle{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-drillin-icon-color-hover, var(--menu-drillin-icon-color-hover)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-drillin-icon-color-hover, var(--menu-drillin-icon-color-hover)))}:host([has-submenu]) .is-open .checkmark{fill:var(--highcontrast-menu-checkmark-icon-color-default, var(--luzmo-menu-checkmark-icon-color-hover, var(--menu-checkmark-icon-color-hover)));color:var(--highcontrast-menu-checkmark-icon-color-default, var(--luzmo-menu-checkmark-icon-color-hover, var(--menu-checkmark-icon-color-hover)))}@media (hover: hover){:host(:hover){background-color:var(--highcontrast-menu-item-background-color-focus, var(--luzmo-menu-item-background-color-hover, var(--menu-item-background-color-hover)))}:host(:hover)>#label,:host(:hover)>.menu-item-tooltip-icon{color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-content-color-hover, var(--menu-item-label-content-color-hover)))}:host([selected]:hover)>#label,:host([selected]:hover)>.menu-item-tooltip-icon{color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-highlight-label-content-color, var(--menu-item-highlight-label-content-color)))}:host(:hover)>[name=description]::slotted(*){color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-description-color-hover, var(--menu-item-description-color-hover)))}:host(:hover)>::slotted([slot=value]){color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-value-color-hover, var(--menu-item-value-color-hover)))}:host(:hover)>.icon:not(.angle,.checkmark){fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-icon-color-hover, var(--menu-item-label-icon-color-hover)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-icon-color-hover, var(--menu-item-label-icon-color-hover)))}:host(:hover)>.angle{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-collapsible-icon-color, var(--menu-collapsible-icon-color)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-collapsible-icon-color, var(--menu-collapsible-icon-color)))}:host(:hover)>.checkmark{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-checkmark-icon-color-hover, var(--menu-checkmark-icon-color-hover)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-checkmark-icon-color-hover, var(--menu-checkmark-icon-color-hover)))}:host([disabled]:hover),:host([aria-disabled=true]:hover){cursor:default;background-color:initial}:host([disabled]:hover) #label,:host([disabled]:hover) .menu-item-tooltip-icon,:host([disabled]:hover) ::slotted([slot=value]),:host([aria-disabled=true]:hover) #label,:host([aria-disabled=true]:hover) ::slotted([slot=value]){color:var(--highcontrast-menu-item-color-disabled, var(--luzmo-menu-item-label-content-color-disabled, var(--menu-item-label-content-color-disabled)))}:host([disabled]:hover) [name=description]::slotted(*),:host([aria-disabled=true]:hover) [name=description]::slotted(*){color:var(--highcontrast-menu-item-color-disabled, var(--luzmo-menu-item-description-color-disabled, var(--menu-item-description-color-disabled)))}:host([disabled]:hover) ::slotted([slot=icon]),:host([aria-disabled=true]:hover) ::slotted([slot=icon]){color:var(--highcontrast-menu-item-color-disabled, var(--luzmo-menu-item-label-icon-color-disabled, var(--menu-item-label-icon-color-disabled)));fill:var(--highcontrast-menu-item-color-disabled, var(--luzmo-menu-item-label-icon-color-disabled, var(--menu-item-label-icon-color-disabled)))}.luzmo-Menu-item--collapsible.is-open:hover{background-color:var(--highcontrast-menu-item-background-color-default, var(--luzmo-menu-item-background-color-default, var(--menu-item-background-color-default)))}:host([has-submenu]:hover) .angle{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-drillin-icon-color-hover, var(--menu-drillin-icon-color-hover)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-drillin-icon-color-hover, var(--menu-drillin-icon-color-hover)))}}:host([has-submenu][focused]) .angle,:host([has-submenu]:focus) .angle{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-drillin-icon-color-focus, var(--menu-drillin-icon-color-focus)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-drillin-icon-color-focus, var(--menu-drillin-icon-color-focus)))}:host([has-submenu]:is(:active,[active])) .angle{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-drillin-icon-color-down, var(--menu-drillin-icon-color-down)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-drillin-icon-color-down, var(--menu-drillin-icon-color-down)))}.luzmo-Menu-back{padding-inline:0 var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-inline:var(--luzmo-menu-back-padding-inline-start, 0) var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-block:0;padding-block:var(--luzmo-menu-back-padding-block-start, 0) var(--luzmo-menu-back-padding-block-end, 0);flex-flow:wrap;align-items:center;display:flex}.luzmo-Menu-backButton{cursor:pointer;background:none;border:0;margin:0;padding:0;display:inline-flex}:host([focused]) .luzmo-Menu-backButton{outline:var(--focus-indicator-width) solid var(--focus-indicator-color);outline-offset:calc((var(--focus-indicator-width) + 1px) * -1)}.luzmo-Menu-backHeading{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-heading-color, var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size, var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight, var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height, var(--menu-section-header-line-height));display:block}:host{text-align:initial;font-family:var(--luzmo-menu-item-font-family, var(--luzmo-font-family))}:host([hidden]){display:none}:host([disabled]){pointer-events:none}:host([disabled]) [name=value]::slotted(*){color:var(--luzmo-menu-item-label-icon-color-disabled, var(--luzmo-disabled-color))}:host([has-submenu][disabled]) .angle{color:var(--luzmo-menu-item-label-icon-color-disabled, var(--luzmo-disabled-color))}#button{position:absolute;top:0;right:0;bottom:0;left:0}.icon-container>svg{vertical-align:top}:host([dir=ltr]) [icon-only]::slotted(:last-of-type){margin-right:auto}:host([dir=rtl]) [icon-only]::slotted(:last-of-type){margin-left:auto}@media (forced-colors: active){:host{forced-color-adjust:none}}::slotted([slot=submenu]){width:max-content;max-width:100%}:host([no-wrap]) #label{display:block}.menu-item-tooltip-container{grid-area:actionsArea;align-self:center;margin-inline-start:var(--luzmo-menu-item-label-to-value-area-min-spacing, var(--menu-item-label-to-value-area-min-spacing));display:flex;align-items:center;justify-content:center}.menu-item-tooltip-container luzmo-tooltip{--tooltip-font-size: var( --luzmo-menu-item-tooltip-font-size, var(--tooltip-font-size) )}.menu-item-tooltip-icon-trigger{cursor:default;display:flex;align-items:center;justify-content:center}.menu-item-tooltip-icon{font-size:.875rem;width:.875rem;height:.875rem}';
556
- var J = Object.defineProperty, Q = Object.getOwnPropertyDescriptor, c = (r, e, t, o) => {
557
- for (var i = o > 1 ? void 0 : o ? Q(e, t) : e, n = r.length - 1, l; n >= 0; n--)
558
- (l = r[n]) && (i = (o ? l(e, t, i) : l(i)) || i);
559
- return o && i && J(e, t, i), i;
846
+ ], LuzmoMenuGroup.prototype, "headerElements");
847
+ __decorateClass$1([
848
+ state()
849
+ ], LuzmoMenuGroup.prototype, "headerElement");
850
+ const menuItemStyles = '.checkmark{display:var(--luzmo-menu-checkmark-display, var(--menu-checkmark-display));font-size:var(--luzmo-menu-item-checkmark-size, var(--menu-item-checkmark-size));fill:var(--highcontrast-menu-checkmark-icon-color-default, var(--luzmo-menu-checkmark-icon-color-default, var(--menu-checkmark-icon-color-default)));color:var(--highcontrast-menu-checkmark-icon-color-default, var(--luzmo-menu-checkmark-icon-color-default, var(--menu-checkmark-icon-color-default)));opacity:1;grid-area:checkmarkArea;align-self:start;margin-block-start:calc(var(--luzmo-menu-item-top-to-checkmark, var(--menu-item-top-to-checkmark)) - var(--luzmo-menu-item-top-edge-to-text, var(--menu-item-top-edge-to-text)));margin-inline-end:var(--luzmo-menu-item-text-to-control, var(--menu-item-text-to-control))}.angle{font-size:var(--menu-item-angle-size);grid-area:angleArea;align-self:center;margin-inline-end:var(--luzmo-menu-item-text-to-control, var(--menu-item-text-to-control))}.luzmo-Menu-back:focus-visible{box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * var(--menu-item-focus-indicator-direction-scalar, 1)) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)))}.luzmo-Menu-backButton:focus-visible{outline:var(--focus-indicator-width) solid var(--focus-indicator-color);outline-offset:calc((var(--focus-indicator-width) + 1px) * -1)}::slotted([slot=icon]){fill:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-item-label-icon-color-default, var(--menu-item-label-icon-color-default)));color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-item-label-icon-color-default, var(--menu-item-label-icon-color-default)));grid-area:iconArea;align-self:start}::slotted([slot=icon]){margin-inline-end:var(--luzmo-menu-item-label-text-to-visual, var(--menu-item-label-text-to-visual));margin-block-start:var(--luzmo-menu-item-top-to-icon, var(--menu-item-top-to-icon));block-size:var(--luzmo-menu-item-icon-size, var(--menu-item-icon-height));inline-size:var(--luzmo-menu-item-icon-width, var(--menu-item-icon-height));font-size:var(--luzmo-menu-item-icon-size, var(--menu-item-icon-height));text-align:center;--luzmo-icon-vertical-align: 0}:host{cursor:pointer;box-sizing:border-box;background-color:var(--highcontrast-menu-item-background-color-default, var(--luzmo-menu-item-background-color-default, var(--menu-item-background-color-default)));line-height:var(--luzmo-menu-item-label-line-height, var(--menu-item-label-line-height));min-block-size:var(--luzmo-menu-item-min-height, var(--menu-item-min-height));padding-block-start:var(--luzmo-menu-item-top-edge-to-text, var(--menu-item-top-edge-to-text));padding-block-end:var(--luzmo-menu-item-bottom-edge-to-text, var(--menu-item-bottom-edge-to-text));padding-inline:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content));grid-template:". angleAreaCollapsible . headingIconArea sectionHeadingArea . . ." "selectedArea angleAreaCollapsible checkmarkArea iconArea labelArea valueArea actionsArea angleAreaDrillIn" 1fr ". . . . descriptionArea . . ." ". . . . submenuArea . . ." ". . . . . . . ."/auto auto auto auto 1fr auto auto auto;justify-content:start;margin:0;-webkit-text-decoration:none;text-decoration:none;display:grid;align-items:center;position:relative}.luzmo-Menu-itemCheckbox{--luzmo-checkbox-top-to-text: 0;--luzmo-checkbox-text-to-control: 0;min-block-size:0}.luzmo-Menu-itemCheckbox .luzmo-Checkbox-box{margin-block-start:var(--luzmo-menu-item-top-to-checkbox, var(--menu-item-top-to-checkbox));margin-block-end:0;margin-inline-end:var(--luzmo-menu-item-text-to-control, var(--menu-item-text-to-control))}.luzmo-Menu-itemSwitch{min-block-size:0}.luzmo-Menu-itemSwitch .luzmo-Switch-switch{margin-block-start:var(--luzmo-menu-item-top-to-action, var(--menu-item-top-to-action));margin-block-end:0}#label{grid-area:submenuItemLabelArea}::slotted([slot=value]){grid-area:submenuItemValueArea}:host([focused]),:host(:focus){background-color:var(--highcontrast-menu-item-background-color-focus, var(--luzmo-menu-item-background-color-key-focus, var(--menu-item-background-color-key-focus)));outline:none}:host([focused])>#label,:host(:focus)>#label,:host([focused])>.menu-item-tooltip-icon,:host(:focus)>.menu-item-tooltip-icon{color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-content-color-focus, var(--menu-item-label-content-color-focus)))}:host([focused])>[name=description]::slotted(*),:host(:focus)>[name=description]::slotted(*){color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-description-color-focus, var(--menu-item-description-color-focus)))}:host([focused])>::slotted([slot=value]),:host(:focus)>::slotted([slot=value]){color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-value-color-focus, var(--menu-item-value-color-focus)))}:host([focused])>.icon:not(.angle,.checkmark),:host(:focus)>.icon:not(.angle,.checkmark){fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-icon-color-focus, var(--menu-item-label-icon-color-focus)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-icon-color-focus, var(--menu-item-label-icon-color-focus)))}:host([focused])>.angle,:host(:focus)>.angle{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-collapsible-icon-color, var(--menu-collapsible-icon-color)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-collapsible-icon-color, var(--menu-collapsible-icon-color)))}:host([focused])>.checkmark,:host(:focus)>.checkmark{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-checkmark-icon-color-focus, var(--menu-checkmark-icon-color-focus)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-checkmark-icon-color-focus, var(--menu-checkmark-icon-color-focus)))}:host:dir(rtl),:host([dir=rtl]){--menu-item-focus-indicator-direction-scalar: -1}:host(:is(:active,[active])){background-color:var(--highcontrast-menu-item-background-color-focus, var(--luzmo-menu-item-background-color-down, var(--menu-item-background-color-down)))}:host(:is(:active,[active]))>#label,:host(:is(:active,[active]))>.menu-item-tooltip-icon{color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-content-color-down, var(--menu-item-label-content-color-down)))}:host(:is(:active,[active]))>[name=description]::slotted(*){color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-description-color-down, var(--menu-item-description-color-down)))}:host(:is(:active,[active]))>::slotted([slot=value]){color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-value-color-down, var(--menu-item-value-color-down)))}:host(:is(:active,[active]))>.icon:not(.angle,.checkmark){fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-icon-color-down, var(--menu-item-label-icon-color-down)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-icon-color-down, var(--menu-item-label-icon-color-down)))}:host(:is(:active,[active]))>.angle{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-collapsible-icon-color, var(--menu-collapsible-icon-color)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-collapsible-icon-color, var(--menu-collapsible-icon-color)))}:host(:is(:active,[active]))>.checkmark{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-checkmark-icon-color-down, var(--menu-checkmark-icon-color-down)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-checkmark-icon-color-down, var(--menu-checkmark-icon-color-down)))}:host([disabled]),:host([aria-disabled=true]){background-color:initial}:host([disabled]) #label,:host([disabled]) .menu-item-tooltip-icon,:host([disabled]) ::slotted([slot=value]),:host([aria-disabled=true]) #label,:host([aria-disabled=true]) ::slotted([slot=value]){color:var(--highcontrast-menu-item-color-disabled, var(--luzmo-menu-item-label-content-color-disabled, var(--menu-item-label-content-color-disabled)))}:host([disabled]) [name=description]::slotted(*),:host([aria-disabled=true]) [name=description]::slotted(*){color:var(--highcontrast-menu-item-color-disabled, var(--luzmo-menu-item-description-color-disabled, var(--menu-item-description-color-disabled)))}:host([disabled]) ::slotted([slot=icon]),:host([aria-disabled=true]) ::slotted([slot=icon]){color:var(--highcontrast-menu-item-color-disabled, var(--luzmo-menu-item-label-icon-color-disabled, var(--menu-item-label-icon-color-disabled)));fill:var(--highcontrast-menu-item-color-disabled, var(--luzmo-menu-item-label-icon-color-disabled, var(--menu-item-label-icon-color-disabled)))}:host([focused]) .luzmo-Menu-back,:host([focused]){box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width, var(--menu-item-focus-indicator-width)) * var(--menu-item-focus-indicator-direction-scalar, 1)) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color, var(--luzmo-menu-item-focus-indicator-color, var(--menu-item-focus-indicator-color)))}:host .is-selectableMultiple{align-items:start}.is-selectableMultiple .luzmo-Menu-itemCheckbox{grid-area:checkmarkArea}.luzmo-Menu-itemSelection{grid-area:selectedArea}#label{--luzmo-switch-control-label-spacing: 0;--luzmo-switch-spacing-top-to-label: 0;font-size:var(--luzmo-menu-item-label-font-size, var(--menu-item-label-font-size));color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-item-label-content-color-default, var(--menu-item-label-content-color-default)));-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;grid-area:labelArea}.menu-item-tooltip-icon{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-item-label-icon-color-default, var(--menu-item-label-icon-color-default)))}:host([selected]) #label{color:var(--menu-item-highlight-label-content-color)}:host([selected]) .menu-item-tooltip-icon{color:var(--menu-item-highlight-label-content-color)}::slotted([slot=value]){color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-item-value-color-default, var(--menu-item-value-color-default)));font-size:var(--luzmo-menu-item-label-font-size, var(--menu-item-label-font-size));grid-area:valueArea;justify-self:end}.luzmo-Menu-itemActions,::slotted([slot=value]){align-self:start;margin-inline-start:var(--luzmo-menu-item-label-to-value-area-min-spacing, var(--menu-item-label-to-value-area-min-spacing))}.luzmo-Menu-itemActions{grid-area:actionsArea}[name=description]::slotted(*){color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-item-description-color-default, var(--menu-item-description-color-default)));font-size:var(--luzmo-menu-item-description-font-size, var(--menu-item-description-font-size));-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;line-height:var(--luzmo-menu-item-description-line-height, var(--menu-item-description-line-height));grid-area:descriptionArea;margin-block-start:var(--luzmo-menu-item-label-to-description-spacing, var(--menu-item-label-to-description-spacing))}:host([no-wrap]) #label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.luzmo-Menu-item--collapsible.is-open{padding-block-end:0}.luzmo-Menu-item--collapsible.is-open .angle{transform:rotate(90deg)}:host([focused]) .luzmo-Menu-item--collapsible.is-open,:host(:is(:active,[active])) .luzmo-Menu-item--collapsible.is-open,.luzmo-Menu-item--collapsible.is-open:focus{background-color:var(--highcontrast-menu-item-background-color-default, var(--luzmo-menu-item-background-color-default, var(--menu-item-background-color-default)))}.luzmo-Menu-item--collapsible ::slotted([slot=icon]){grid-area:headingIconArea}.luzmo-Menu-item--collapsible>::slotted([slot=icon]){padding-block-start:var(--luzmo-menu-section-header-top-edge-to-text, var(--luzmo-menu-item-top-edge-to-text, var(--menu-item-top-edge-to-text)));padding-block-end:var(--luzmo-menu-section-header-bottom-edge-to-text, var(--luzmo-menu-item-bottom-edge-to-text, var(--menu-item-bottom-edge-to-text)))}.luzmo-Menu-item--collapsible .angle{grid-area:angleAreaCollapsible}:host([has-submenu]) .angle{fill:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-drillin-icon-color-default, var(--menu-drillin-icon-color-default)));color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-drillin-icon-color-default, var(--menu-drillin-icon-color-default)));grid-area:angleAreaDrillIn;margin-inline-start:var(--luzmo-menu-item-label-to-value-area-min-spacing, var(--menu-item-label-to-value-area-min-spacing));margin-inline-end:0}:host([has-submenu]) .is-open{--menu-item-background-color-default: var( --highcontrast-menu-item-selected-background-color, var( --luzmo-menu-item-background-color-hover, var(--menu-item-background-color-hover) ) )}:host([has-submenu]) .is-open .icon:not(.angle,.checkmark){fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-icon-color-hover, var(--menu-item-label-icon-color-hover)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-icon-color-hover, var(--menu-item-label-icon-color-hover)))}:host([has-submenu]) .is-open .angle{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-drillin-icon-color-hover, var(--menu-drillin-icon-color-hover)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-drillin-icon-color-hover, var(--menu-drillin-icon-color-hover)))}:host([has-submenu]) .is-open .checkmark{fill:var(--highcontrast-menu-checkmark-icon-color-default, var(--luzmo-menu-checkmark-icon-color-hover, var(--menu-checkmark-icon-color-hover)));color:var(--highcontrast-menu-checkmark-icon-color-default, var(--luzmo-menu-checkmark-icon-color-hover, var(--menu-checkmark-icon-color-hover)))}@media (hover: hover){:host(:hover){background-color:var(--highcontrast-menu-item-background-color-focus, var(--luzmo-menu-item-background-color-hover, var(--menu-item-background-color-hover)))}:host(:hover)>#label,:host(:hover)>.menu-item-tooltip-icon{color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-content-color-hover, var(--menu-item-label-content-color-hover)))}:host([selected]:hover)>#label,:host([selected]:hover)>.menu-item-tooltip-icon{color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-highlight-label-content-color, var(--menu-item-highlight-label-content-color)))}:host(:hover)>[name=description]::slotted(*){color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-description-color-hover, var(--menu-item-description-color-hover)))}:host(:hover)>::slotted([slot=value]){color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-value-color-hover, var(--menu-item-value-color-hover)))}:host(:hover)>.icon:not(.angle,.checkmark){fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-icon-color-hover, var(--menu-item-label-icon-color-hover)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-item-label-icon-color-hover, var(--menu-item-label-icon-color-hover)))}:host(:hover)>.angle{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-collapsible-icon-color, var(--menu-collapsible-icon-color)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-collapsible-icon-color, var(--menu-collapsible-icon-color)))}:host(:hover)>.checkmark{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-checkmark-icon-color-hover, var(--menu-checkmark-icon-color-hover)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-checkmark-icon-color-hover, var(--menu-checkmark-icon-color-hover)))}:host([disabled]:hover),:host([aria-disabled=true]:hover){cursor:default;background-color:initial}:host([disabled]:hover) #label,:host([disabled]:hover) .menu-item-tooltip-icon,:host([disabled]:hover) ::slotted([slot=value]),:host([aria-disabled=true]:hover) #label,:host([aria-disabled=true]:hover) ::slotted([slot=value]){color:var(--highcontrast-menu-item-color-disabled, var(--luzmo-menu-item-label-content-color-disabled, var(--menu-item-label-content-color-disabled)))}:host([disabled]:hover) [name=description]::slotted(*),:host([aria-disabled=true]:hover) [name=description]::slotted(*){color:var(--highcontrast-menu-item-color-disabled, var(--luzmo-menu-item-description-color-disabled, var(--menu-item-description-color-disabled)))}:host([disabled]:hover) ::slotted([slot=icon]),:host([aria-disabled=true]:hover) ::slotted([slot=icon]){color:var(--highcontrast-menu-item-color-disabled, var(--luzmo-menu-item-label-icon-color-disabled, var(--menu-item-label-icon-color-disabled)));fill:var(--highcontrast-menu-item-color-disabled, var(--luzmo-menu-item-label-icon-color-disabled, var(--menu-item-label-icon-color-disabled)))}.luzmo-Menu-item--collapsible.is-open:hover{background-color:var(--highcontrast-menu-item-background-color-default, var(--luzmo-menu-item-background-color-default, var(--menu-item-background-color-default)))}:host([has-submenu]:hover) .angle{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-drillin-icon-color-hover, var(--menu-drillin-icon-color-hover)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-drillin-icon-color-hover, var(--menu-drillin-icon-color-hover)))}}:host([has-submenu][focused]) .angle,:host([has-submenu]:focus) .angle{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-drillin-icon-color-focus, var(--menu-drillin-icon-color-focus)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-drillin-icon-color-focus, var(--menu-drillin-icon-color-focus)))}:host([has-submenu]:is(:active,[active])) .angle{fill:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-drillin-icon-color-down, var(--menu-drillin-icon-color-down)));color:var(--highcontrast-menu-item-color-focus, var(--luzmo-menu-drillin-icon-color-down, var(--menu-drillin-icon-color-down)))}.luzmo-Menu-back{padding-inline:0 var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-inline:var(--luzmo-menu-back-padding-inline-start, 0) var(--luzmo-menu-back-padding-inline-end, var(--menu-item-label-inline-edge-to-content));padding-block:0;padding-block:var(--luzmo-menu-back-padding-block-start, 0) var(--luzmo-menu-back-padding-block-end, 0);flex-flow:wrap;align-items:center;display:flex}.luzmo-Menu-backButton{cursor:pointer;background:none;border:0;margin:0;padding:0;display:inline-flex}:host([focused]) .luzmo-Menu-backButton{outline:var(--focus-indicator-width) solid var(--focus-indicator-color);outline-offset:calc((var(--focus-indicator-width) + 1px) * -1)}.luzmo-Menu-backHeading{color:var(--highcontrast-menu-item-color-default, var(--luzmo-menu-back-heading-color, var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size, var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight, var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height, var(--menu-section-header-line-height));display:block}:host{text-align:initial;font-family:var(--luzmo-menu-item-font-family, var(--luzmo-font-family))}:host([hidden]){display:none}:host([disabled]){pointer-events:none}:host([disabled]) [name=value]::slotted(*){color:var(--luzmo-menu-item-label-icon-color-disabled, var(--luzmo-disabled-color))}:host([has-submenu][disabled]) .angle{color:var(--luzmo-menu-item-label-icon-color-disabled, var(--luzmo-disabled-color))}#button{position:absolute;top:0;right:0;bottom:0;left:0}.icon-container>svg{vertical-align:top}:host([dir=ltr]) [icon-only]::slotted(:last-of-type){margin-right:auto}:host([dir=rtl]) [icon-only]::slotted(:last-of-type){margin-left:auto}@media (forced-colors: active){:host{forced-color-adjust:none}}::slotted([slot=submenu]){width:max-content;max-width:100%}:host([no-wrap]) #label{display:block}.menu-item-tooltip-container{grid-area:actionsArea;align-self:center;margin-inline-start:var(--luzmo-menu-item-label-to-value-area-min-spacing, var(--menu-item-label-to-value-area-min-spacing));display:flex;align-items:center;justify-content:center}.menu-item-tooltip-container luzmo-tooltip{--tooltip-font-size: var( --luzmo-menu-item-tooltip-font-size, var(--tooltip-font-size) )}.menu-item-tooltip-icon-trigger{cursor:default;display:flex;align-items:center;justify-content:center}.menu-item-tooltip-icon{font-size:.875rem;width:.875rem;height:.875rem}';
851
+ var __defProp = Object.defineProperty;
852
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
853
+ var __decorateClass = (decorators, target, key, kind) => {
854
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
855
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
856
+ if (decorator = decorators[i])
857
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
858
+ if (kind && result) __defProp(target, key, result);
859
+ return result;
560
860
  };
561
- const X = 100, Y = (r) => u`
562
- <span class="icon-container icon checkmark ${r.join(" ")}">
563
- ${z(T)}
861
+ const POINTERLEAVE_TIMEOUT = 100;
862
+ const checkIcon = (classes) => html`
863
+ <span class="icon-container icon checkmark ${classes.join(" ")}">
864
+ ${luzmoIcon(luzmoCheck)}
564
865
  </span>
565
- `, Z = (r) => u`
566
- <span class="icon-container icon angle ${r.join(" ")}">
567
- ${z($, { className: "indicator" })}
866
+ `;
867
+ const angleIcon = (classes) => html`
868
+ <span class="icon-container icon angle ${classes.join(" ")}">
869
+ ${luzmoIcon(luzmoAngleRight, { className: "indicator" })}
568
870
  </span>
569
- `, ee = (r) => u`
570
- <span class="icon-container icon info ${r.join(" ")}">
571
- ${z(_)}
871
+ `;
872
+ const infoIcon = (classes) => html`
873
+ <span class="icon-container icon info ${classes.join(" ")}">
874
+ ${luzmoIcon(luzmoInfoCircleOutline)}
572
875
  </span>
573
876
  `;
574
- class te extends Event {
575
- constructor(e) {
877
+ class MenuItemAddedOrUpdatedEvent extends Event {
878
+ constructor(item) {
576
879
  super("luzmo-menu-item-added-or-updated", {
577
- bubbles: !0,
578
- composed: !0
579
- }), this.menuCascade = /* @__PURE__ */ new WeakMap(), this.clear(e);
880
+ bubbles: true,
881
+ composed: true
882
+ });
883
+ this.menuCascade = /* @__PURE__ */ new WeakMap();
884
+ this.clear(item);
580
885
  }
581
886
  get item() {
582
887
  return this._item;
583
888
  }
584
- clear(e) {
585
- this._item = e, this.currentAncestorWithSelects = void 0, e.menuData = {
889
+ clear(item) {
890
+ this._item = item;
891
+ this.currentAncestorWithSelects = void 0;
892
+ item.menuData = {
586
893
  cleanupSteps: [],
587
894
  focusRoot: void 0,
588
895
  selectionRoot: void 0,
589
896
  parentMenu: void 0
590
- }, this.menuCascade = /* @__PURE__ */ new WeakMap();
897
+ };
898
+ this.menuCascade = /* @__PURE__ */ new WeakMap();
591
899
  }
592
900
  }
593
- class s extends R(
594
- L(P(O, '[slot="icon"]'))
901
+ class LuzmoMenuItem extends LikeAnchor(
902
+ ObserveSlotText(ObserveSlotPresence(Focusable, '[slot="icon"]'))
595
903
  ) {
596
904
  constructor() {
597
- super(), this.active = !1, this.dependencyManager = new U(this), this.focused = !1, this.selected = !1, this._value = "", this.hasSubmenu = !1, this.tooltipPlacement = "top", this.noWrap = !1, this.renderAngleIcon = (e = []) => Z(e), this.renderCheckIcon = (e = []) => Y(e), this.renderInfoIcon = (e = []) => ee(e), this.open = !1, this.handleSlottableRequest = (e) => {
598
- var t;
599
- (t = this.submenuElement) == null || t.dispatchEvent(
600
- new B(e.name, e.data)
905
+ super();
906
+ this.active = false;
907
+ this.dependencyManager = new DependencyManagerController(this);
908
+ this.focused = false;
909
+ this.selected = false;
910
+ this._value = "";
911
+ this.hasSubmenu = false;
912
+ this.tooltipPlacement = "top";
913
+ this.noWrap = false;
914
+ this.renderAngleIcon = (classes = []) => angleIcon(classes);
915
+ this.renderCheckIcon = (classes = []) => checkIcon(classes);
916
+ this.renderInfoIcon = (classes = []) => infoIcon(classes);
917
+ this.open = false;
918
+ this.handleSlottableRequest = (event) => {
919
+ var _a;
920
+ (_a = this.submenuElement) == null ? void 0 : _a.dispatchEvent(
921
+ new SlottableRequestEvent(event.name, event.data)
601
922
  );
602
- }, this.proxyFocus = () => {
923
+ };
924
+ this.proxyFocus = () => {
603
925
  this.focus();
604
- }, this.handleBeforetoggle = (e) => {
605
- e.newState === "closed" && (this.open = !0, this.overlayElement.manuallyKeepOpen(), this.overlayElement.removeEventListener(
606
- "beforetoggle",
607
- this.handleBeforetoggle
608
- ));
609
- }, this.recentlyLeftChild = !1, this.willDispatchUpdate = !1, this.menuData = {
926
+ };
927
+ this.handleBeforetoggle = (event) => {
928
+ if (event.newState === "closed") {
929
+ this.open = true;
930
+ this.overlayElement.manuallyKeepOpen();
931
+ this.overlayElement.removeEventListener(
932
+ "beforetoggle",
933
+ this.handleBeforetoggle
934
+ );
935
+ }
936
+ };
937
+ this.recentlyLeftChild = false;
938
+ this.willDispatchUpdate = false;
939
+ this.menuData = {
610
940
  focusRoot: void 0,
611
941
  parentMenu: void 0,
612
942
  selectionRoot: void 0,
613
943
  cleanupSteps: []
614
- }, this.addEventListener("click", this.handleClickCapture, {
615
- capture: !0
616
- }), new D(this, {
944
+ };
945
+ this.addEventListener("click", this.handleClickCapture, {
946
+ capture: true
947
+ });
948
+ new MutationController(this, {
617
949
  config: {
618
- characterData: !0,
619
- childList: !0,
620
- subtree: !0
950
+ characterData: true,
951
+ childList: true,
952
+ subtree: true
621
953
  },
622
- callback: (e) => {
623
- e.every(
624
- (o) => o.target.slot === "submenu"
625
- ) || this.breakItemChildrenCache();
954
+ callback: (mutations) => {
955
+ const isSubmenu = mutations.every(
956
+ (mutation) => mutation.target.slot === "submenu"
957
+ );
958
+ if (isSubmenu) {
959
+ return;
960
+ }
961
+ this.breakItemChildrenCache();
626
962
  }
627
963
  });
628
964
  }
629
965
  static get styles() {
630
- return [f(G)];
966
+ return [unsafeCSS(menuItemStyles)];
631
967
  }
632
968
  get value() {
633
969
  return this._value || this.itemText;
634
970
  }
635
- set value(e) {
636
- e !== this._value && (this._value = e || "", this._value ? this.setAttribute("value", this._value) : this.removeAttribute("value"));
971
+ set value(value) {
972
+ if (value === this._value) {
973
+ return;
974
+ }
975
+ this._value = value || "";
976
+ if (this._value) {
977
+ this.setAttribute("value", this._value);
978
+ } else {
979
+ this.removeAttribute("value");
980
+ }
637
981
  }
638
982
  /**
639
983
  * @private
640
984
  */
641
985
  get itemText() {
642
986
  return this.itemChildren.content.reduce(
643
- (e, t) => e + (t.textContent || "").trim(),
987
+ (acc, node) => acc + (node.textContent || "").trim(),
644
988
  ""
645
989
  );
646
990
  }
647
991
  renderTooltip() {
648
- return this.tooltip ? (this.dependencyManager.add("luzmo-tooltip"), this.dependencyManager.add("luzmo-overlay"), import("../tooltip/index.js"), import("../overlay/index.js"), u`
992
+ if (!this.tooltip) {
993
+ return nothing;
994
+ }
995
+ this.dependencyManager.add("luzmo-tooltip");
996
+ this.dependencyManager.add("luzmo-overlay");
997
+ import("../tooltip/index.js");
998
+ import("../overlay/index.js");
999
+ return html`
649
1000
  <div class="menu-item-tooltip-container">
650
1001
  <!-- The visible icon that acts as trigger -->
651
1002
  <div
@@ -665,7 +1016,7 @@ class s extends R(
665
1016
  <luzmo-tooltip> ${this.tooltip} </luzmo-tooltip>
666
1017
  </luzmo-overlay>
667
1018
  </div>
668
- `) : b;
1019
+ `;
669
1020
  }
670
1021
  get focusElement() {
671
1022
  return this;
@@ -674,48 +1025,76 @@ class s extends R(
674
1025
  return this.slotContentIsPresent;
675
1026
  }
676
1027
  get itemChildren() {
677
- if (!this.iconSlot || !this.contentSlot)
1028
+ if (!this.iconSlot || !this.contentSlot) {
678
1029
  return {
679
1030
  icon: [],
680
1031
  content: []
681
1032
  };
682
- if (this._itemChildren)
1033
+ }
1034
+ if (this._itemChildren) {
683
1035
  return this._itemChildren;
684
- const e = this.iconSlot.assignedElements().map((o) => {
685
- const i = o.cloneNode(!0);
686
- return i.removeAttribute("slot"), i.classList.toggle("icon"), i;
687
- }), t = this.contentSlot.assignedNodes().map((o) => o.cloneNode(!0));
688
- return this._itemChildren = { icon: e, content: t }, this._itemChildren;
1036
+ }
1037
+ const icon = this.iconSlot.assignedElements().map((element) => {
1038
+ const newElement = element.cloneNode(true);
1039
+ newElement.removeAttribute("slot");
1040
+ newElement.classList.toggle("icon");
1041
+ return newElement;
1042
+ });
1043
+ const content = this.contentSlot.assignedNodes().map((node) => node.cloneNode(true));
1044
+ this._itemChildren = { icon, content };
1045
+ return this._itemChildren;
689
1046
  }
690
1047
  click() {
691
- this.disabled || this.shouldProxyClick() || super.click();
692
- }
693
- handleClickCapture(e) {
694
- if (this.disabled)
695
- return e.preventDefault(), e.stopImmediatePropagation(), e.stopPropagation(), !1;
1048
+ if (this.disabled) {
1049
+ return;
1050
+ }
1051
+ if (this.shouldProxyClick()) {
1052
+ return;
1053
+ }
1054
+ super.click();
1055
+ }
1056
+ handleClickCapture(event) {
1057
+ if (this.disabled) {
1058
+ event.preventDefault();
1059
+ event.stopImmediatePropagation();
1060
+ event.stopPropagation();
1061
+ return false;
1062
+ }
696
1063
  }
697
1064
  shouldProxyClick() {
698
- let e = !1;
699
- return this.anchorElement && (this.anchorElement.click(), e = !0), e;
1065
+ let handled = false;
1066
+ if (this.anchorElement) {
1067
+ this.anchorElement.click();
1068
+ handled = true;
1069
+ }
1070
+ return handled;
700
1071
  }
701
1072
  breakItemChildrenCache() {
702
- this._itemChildren = void 0, this.triggerUpdate();
1073
+ this._itemChildren = void 0;
1074
+ this.triggerUpdate();
703
1075
  }
704
1076
  renderSubmenu() {
705
- const e = u`
1077
+ const slot = html`
706
1078
  <slot
707
1079
  name="submenu"
708
1080
  @slotchange=${this.manageSubmenu}
709
1081
  @luzmo-menu-item-added-or-updated=${{
710
- handleEvent: (t) => {
711
- t.clear(t.item);
1082
+ handleEvent: (event) => {
1083
+ event.clear(event.item);
712
1084
  },
713
- capture: !0
1085
+ capture: true
714
1086
  }}
715
- @focusin=${(t) => t.stopPropagation()}
1087
+ @focusin=${(event) => event.stopPropagation()}
716
1088
  ></slot>
717
1089
  `;
718
- return this.hasSubmenu ? (this.dependencyManager.add("luzmo-overlay"), this.dependencyManager.add("luzmo-popover"), import("../overlay-Cig9r6uU.js").then((t) => t.f), import("../popover-DjX0aAnY.js"), u`
1090
+ if (!this.hasSubmenu) {
1091
+ return slot;
1092
+ }
1093
+ this.dependencyManager.add("luzmo-overlay");
1094
+ this.dependencyManager.add("luzmo-popover");
1095
+ import("../overlay-CN8ISP1F.js").then((n) => n.f);
1096
+ import("../popover-BkbYhl3i.js");
1097
+ return html`
719
1098
  <luzmo-overlay
720
1099
  .triggerElement=${this}
721
1100
  ?disabled=${!this.hasSubmenu}
@@ -723,30 +1102,31 @@ class s extends R(
723
1102
  .placement=${this.isLTR ? "right-start" : "left-start"}
724
1103
  .offset=${[-10, -5]}
725
1104
  .type=${"auto"}
726
- @close=${(t) => t.stopPropagation()}
1105
+ @close=${(event) => event.stopPropagation()}
727
1106
  @slottable-request=${this.handleSlottableRequest}
728
1107
  >
729
1108
  <luzmo-popover
730
- @change=${(t) => {
731
- this.handleSubmenuChange(t), this.open = !1;
1109
+ @change=${(event) => {
1110
+ this.handleSubmenuChange(event);
1111
+ this.open = false;
732
1112
  }}
733
1113
  @pointerenter=${this.handleSubmenuPointerenter}
734
1114
  @pointerleave=${this.handleSubmenuPointerleave}
735
- @luzmo-menu-item-added-or-updated=${(t) => t.stopPropagation()}
1115
+ @luzmo-menu-item-added-or-updated=${(event) => event.stopPropagation()}
736
1116
  >
737
- ${e}
1117
+ ${slot}
738
1118
  </luzmo-popover>
739
1119
  </luzmo-overlay>
740
1120
  ${this.renderAngleIcon()}
741
- `) : e;
1121
+ `;
742
1122
  }
743
1123
  render() {
744
- return u`
745
- ${this.selected ? u`
1124
+ return html`
1125
+ ${this.selected ? html`
746
1126
  ${this.renderCheckIcon(
747
1127
  this.hasIcon ? ["checkmark--withAdjacentIcon"] : []
748
1128
  )}
749
- ` : b}
1129
+ ` : nothing}
750
1130
  <slot name="icon"></slot>
751
1131
  <div id="label">
752
1132
  <slot id="slot"></slot>
@@ -756,34 +1136,53 @@ class s extends R(
756
1136
  ${this.renderTooltip()}
757
1137
  ${this.href && this.href.length > 0 ? super.renderAnchor({
758
1138
  id: "button",
759
- ariaHidden: !0,
1139
+ ariaHidden: true,
760
1140
  className: "button anchor hidden"
761
- }) : b}
1141
+ }) : nothing}
762
1142
  ${this.renderSubmenu()}
763
1143
  `;
764
1144
  }
765
- manageSubmenu(e) {
766
- this.submenuElement = e.target.assignedElements({
767
- flatten: !0
768
- })[0], this.hasSubmenu = !!this.submenuElement, this.hasSubmenu && this.setAttribute("aria-haspopup", "true");
1145
+ manageSubmenu(event) {
1146
+ this.submenuElement = event.target.assignedElements({
1147
+ flatten: true
1148
+ })[0];
1149
+ this.hasSubmenu = !!this.submenuElement;
1150
+ if (this.hasSubmenu) {
1151
+ this.setAttribute("aria-haspopup", "true");
1152
+ }
769
1153
  }
770
- handlePointerdown(e) {
771
- e.target === this && this.hasSubmenu && this.open && (this.addEventListener("focus", this.handleSubmenuFocus, {
772
- once: !0
773
- }), this.overlayElement.addEventListener(
774
- "beforetoggle",
775
- this.handleBeforetoggle
776
- ));
1154
+ handlePointerdown(event) {
1155
+ if (event.target === this && this.hasSubmenu && this.open) {
1156
+ this.addEventListener("focus", this.handleSubmenuFocus, {
1157
+ once: true
1158
+ });
1159
+ this.overlayElement.addEventListener(
1160
+ "beforetoggle",
1161
+ this.handleBeforetoggle
1162
+ );
1163
+ }
777
1164
  }
778
- firstUpdated(e) {
779
- super.firstUpdated(e), this.setAttribute("tabindex", "-1"), this.addEventListener("pointerdown", this.handlePointerdown), this.addEventListener("pointerenter", this.closeOverlaysForRoot), this.hasAttribute("id") || (this.id = `luzmo-menu-item-${y()}`);
1165
+ firstUpdated(changes) {
1166
+ super.firstUpdated(changes);
1167
+ this.setAttribute("tabindex", "-1");
1168
+ this.addEventListener("pointerdown", this.handlePointerdown);
1169
+ this.addEventListener("pointerenter", this.closeOverlaysForRoot);
1170
+ if (!this.hasAttribute("id")) {
1171
+ this.id = `luzmo-menu-item-${randomID()}`;
1172
+ }
780
1173
  }
781
1174
  closeOverlaysForRoot() {
782
- var e;
783
- this.open || (e = this.menuData.parentMenu) == null || e.closeDescendentOverlays();
1175
+ var _a;
1176
+ if (this.open) {
1177
+ return;
1178
+ }
1179
+ (_a = this.menuData.parentMenu) == null ? void 0 : _a.closeDescendentOverlays();
784
1180
  }
785
- handleSubmenuClick(e) {
786
- e.composedPath().includes(this.overlayElement) || this.openOverlay();
1181
+ handleSubmenuClick(event) {
1182
+ if (event.composedPath().includes(this.overlayElement)) {
1183
+ return;
1184
+ }
1185
+ this.openOverlay();
787
1186
  }
788
1187
  handleSubmenuFocus() {
789
1188
  requestAnimationFrame(() => {
@@ -792,15 +1191,19 @@ class s extends R(
792
1191
  }
793
1192
  handlePointerenter() {
794
1193
  if (this.leaveTimeout) {
795
- clearTimeout(this.leaveTimeout), delete this.leaveTimeout;
1194
+ clearTimeout(this.leaveTimeout);
1195
+ delete this.leaveTimeout;
796
1196
  return;
797
1197
  }
798
1198
  this.openOverlay();
799
1199
  }
800
1200
  handlePointerleave() {
801
- this.open && !this.recentlyLeftChild && (this.leaveTimeout = setTimeout(() => {
802
- delete this.leaveTimeout, this.open = !1;
803
- }, X));
1201
+ if (this.open && !this.recentlyLeftChild) {
1202
+ this.leaveTimeout = setTimeout(() => {
1203
+ delete this.leaveTimeout;
1204
+ this.open = false;
1205
+ }, POINTERLEAVE_TIMEOUT);
1206
+ }
804
1207
  }
805
1208
  /**
806
1209
  * When there is a `change` event in the submenu for this item
@@ -809,122 +1212,174 @@ class s extends R(
809
1212
  * and the root of the tree to have their selection changes and
810
1213
  * be closed.
811
1214
  */
812
- handleSubmenuChange(e) {
813
- var t;
814
- e.stopPropagation(), (t = this.menuData.selectionRoot) == null || t.selectOrToggleItem(this);
1215
+ handleSubmenuChange(event) {
1216
+ var _a;
1217
+ event.stopPropagation();
1218
+ (_a = this.menuData.selectionRoot) == null ? void 0 : _a.selectOrToggleItem(this);
815
1219
  }
816
1220
  handleSubmenuPointerenter() {
817
- this.recentlyLeftChild = !0;
1221
+ this.recentlyLeftChild = true;
818
1222
  }
819
1223
  handleSubmenuPointerleave() {
820
1224
  requestAnimationFrame(() => {
821
- this.recentlyLeftChild = !1;
1225
+ this.recentlyLeftChild = false;
822
1226
  });
823
1227
  }
824
- handleSubmenuOpen(e) {
825
- this.focused = !1;
826
- const t = e.composedPath().find(
827
- (o) => o !== this.overlayElement && o.localName === "luzmo-overlay"
1228
+ handleSubmenuOpen(event) {
1229
+ this.focused = false;
1230
+ const parentOverlay = event.composedPath().find(
1231
+ (el) => el !== this.overlayElement && el.localName === "luzmo-overlay"
828
1232
  );
829
- this.overlayElement.parentOverlayToForceClose = t;
1233
+ this.overlayElement.parentOverlayToForceClose = parentOverlay;
830
1234
  }
831
1235
  cleanup() {
832
- this.open = !1, this.active = !1;
1236
+ this.open = false;
1237
+ this.active = false;
833
1238
  }
834
1239
  openOverlay() {
835
- !this.hasSubmenu || this.open || this.disabled || (this.open = !0, this.active = !0, this.setAttribute("aria-expanded", "true"), this.addEventListener("luzmo-closed", this.cleanup, {
836
- once: !0
837
- }));
1240
+ if (!this.hasSubmenu || this.open || this.disabled) {
1241
+ return;
1242
+ }
1243
+ this.open = true;
1244
+ this.active = true;
1245
+ this.setAttribute("aria-expanded", "true");
1246
+ this.addEventListener("luzmo-closed", this.cleanup, {
1247
+ once: true
1248
+ });
838
1249
  }
839
1250
  updateAriaSelected() {
840
- const e = this.getAttribute("role");
841
- e === "option" ? this.setAttribute("aria-selected", this.selected ? "true" : "false") : (e === "menuitemcheckbox" || e === "menuitemradio") && this.setAttribute("aria-checked", this.selected ? "true" : "false");
1251
+ const role = this.getAttribute("role");
1252
+ if (role === "option") {
1253
+ this.setAttribute("aria-selected", this.selected ? "true" : "false");
1254
+ } else if (role === "menuitemcheckbox" || role === "menuitemradio") {
1255
+ this.setAttribute("aria-checked", this.selected ? "true" : "false");
1256
+ }
842
1257
  }
843
- setRole(e) {
844
- this.setAttribute("role", e), this.updateAriaSelected();
1258
+ setRole(role) {
1259
+ this.setAttribute("role", role);
1260
+ this.updateAriaSelected();
845
1261
  }
846
- updated(e) {
847
- var t, o;
848
- if (super.updated(e), e.has("label") && (this.label || e.get("label") !== void 0) && this.setAttribute("aria-label", this.label || ""), e.has("active") && (this.active || e.get("active") !== void 0) && this.active && ((t = this.menuData.selectionRoot) == null || t.closeDescendentOverlays()), this.anchorElement && (this.anchorElement.addEventListener("focus", this.proxyFocus), this.anchorElement.tabIndex = -1), e.has("selected") && this.updateAriaSelected(), e.has("hasSubmenu") && (this.hasSubmenu || e.get("hasSubmenu") !== void 0))
1262
+ updated(changes) {
1263
+ var _a, _b;
1264
+ super.updated(changes);
1265
+ if (changes.has("label") && (this.label || changes.get("label") !== void 0)) {
1266
+ this.setAttribute("aria-label", this.label || "");
1267
+ }
1268
+ if (changes.has("active") && (this.active || changes.get("active") !== void 0) && this.active) {
1269
+ (_a = this.menuData.selectionRoot) == null ? void 0 : _a.closeDescendentOverlays();
1270
+ }
1271
+ if (this.anchorElement) {
1272
+ this.anchorElement.addEventListener("focus", this.proxyFocus);
1273
+ this.anchorElement.tabIndex = -1;
1274
+ }
1275
+ if (changes.has("selected")) {
1276
+ this.updateAriaSelected();
1277
+ }
1278
+ if (changes.has("hasSubmenu") && (this.hasSubmenu || changes.get("hasSubmenu") !== void 0)) {
849
1279
  if (this.hasSubmenu) {
850
1280
  this.abortControllerSubmenu = new AbortController();
851
- const i = { signal: this.abortControllerSubmenu.signal };
852
- this.addEventListener("click", this.handleSubmenuClick, i), this.addEventListener("pointerenter", this.handlePointerenter, i), this.addEventListener("pointerleave", this.handlePointerleave, i), this.addEventListener("luzmo-opened", this.handleSubmenuOpen, i);
853
- } else
854
- (o = this.abortControllerSubmenu) == null || o.abort();
1281
+ const options = { signal: this.abortControllerSubmenu.signal };
1282
+ this.addEventListener("click", this.handleSubmenuClick, options);
1283
+ this.addEventListener("pointerenter", this.handlePointerenter, options);
1284
+ this.addEventListener("pointerleave", this.handlePointerleave, options);
1285
+ this.addEventListener("luzmo-opened", this.handleSubmenuOpen, options);
1286
+ } else {
1287
+ (_b = this.abortControllerSubmenu) == null ? void 0 : _b.abort();
1288
+ }
1289
+ }
855
1290
  }
856
1291
  connectedCallback() {
857
- super.connectedCallback(), this.triggerUpdate();
1292
+ super.connectedCallback();
1293
+ this.triggerUpdate();
858
1294
  }
859
1295
  disconnectedCallback() {
860
- this.menuData.cleanupSteps.forEach((e) => e(this)), this.menuData = {
1296
+ this.menuData.cleanupSteps.forEach((removal) => removal(this));
1297
+ this.menuData = {
861
1298
  focusRoot: void 0,
862
1299
  parentMenu: void 0,
863
1300
  selectionRoot: void 0,
864
1301
  cleanupSteps: []
865
- }, super.disconnectedCallback();
1302
+ };
1303
+ super.disconnectedCallback();
866
1304
  }
867
1305
  async triggerUpdate() {
868
- this.willDispatchUpdate || (this.willDispatchUpdate = !0, await new Promise((e) => requestAnimationFrame(e)), this.dispatchUpdate());
1306
+ if (this.willDispatchUpdate) {
1307
+ return;
1308
+ }
1309
+ this.willDispatchUpdate = true;
1310
+ await new Promise((ready) => requestAnimationFrame(ready));
1311
+ this.dispatchUpdate();
869
1312
  }
870
1313
  dispatchUpdate() {
871
- this.isConnected && (this.dispatchEvent(new te(this)), this.willDispatchUpdate = !1);
1314
+ if (!this.isConnected) {
1315
+ return;
1316
+ }
1317
+ this.dispatchEvent(new MenuItemAddedOrUpdatedEvent(this));
1318
+ this.willDispatchUpdate = false;
872
1319
  }
873
1320
  }
874
- c([
875
- a({ type: Boolean, reflect: !0 })
876
- ], s.prototype, "active", 2);
877
- c([
878
- a({ type: Boolean, reflect: !0 })
879
- ], s.prototype, "focused", 2);
880
- c([
881
- a({ type: Boolean, reflect: !0 })
882
- ], s.prototype, "selected", 2);
883
- c([
884
- a({ type: String })
885
- ], s.prototype, "value", 1);
886
- c([
887
- a({ type: Boolean, reflect: !0, attribute: "has-submenu" })
888
- ], s.prototype, "hasSubmenu", 2);
889
- c([
890
- a({ type: String })
891
- ], s.prototype, "tooltip", 2);
892
- c([
893
- a({ type: String, attribute: "tooltip-placement" })
894
- ], s.prototype, "tooltipPlacement", 2);
895
- c([
896
- p("slot:not([name])")
897
- ], s.prototype, "contentSlot", 2);
898
- c([
899
- p('slot[name="icon"]')
900
- ], s.prototype, "iconSlot", 2);
901
- c([
902
- a({
1321
+ __decorateClass([
1322
+ property({ type: Boolean, reflect: true })
1323
+ ], LuzmoMenuItem.prototype, "active", 2);
1324
+ __decorateClass([
1325
+ property({ type: Boolean, reflect: true })
1326
+ ], LuzmoMenuItem.prototype, "focused", 2);
1327
+ __decorateClass([
1328
+ property({ type: Boolean, reflect: true })
1329
+ ], LuzmoMenuItem.prototype, "selected", 2);
1330
+ __decorateClass([
1331
+ property({ type: String })
1332
+ ], LuzmoMenuItem.prototype, "value", 1);
1333
+ __decorateClass([
1334
+ property({ type: Boolean, reflect: true, attribute: "has-submenu" })
1335
+ ], LuzmoMenuItem.prototype, "hasSubmenu", 2);
1336
+ __decorateClass([
1337
+ property({ type: String })
1338
+ ], LuzmoMenuItem.prototype, "tooltip", 2);
1339
+ __decorateClass([
1340
+ property({ type: String, attribute: "tooltip-placement" })
1341
+ ], LuzmoMenuItem.prototype, "tooltipPlacement", 2);
1342
+ __decorateClass([
1343
+ query("slot:not([name])")
1344
+ ], LuzmoMenuItem.prototype, "contentSlot", 2);
1345
+ __decorateClass([
1346
+ query('slot[name="icon"]')
1347
+ ], LuzmoMenuItem.prototype, "iconSlot", 2);
1348
+ __decorateClass([
1349
+ property({
903
1350
  type: Boolean,
904
- reflect: !0,
1351
+ reflect: true,
905
1352
  attribute: "no-wrap",
906
1353
  hasChanged() {
907
- return !1;
1354
+ return false;
908
1355
  }
909
1356
  })
910
- ], s.prototype, "noWrap", 2);
911
- c([
912
- p(".anchor")
913
- ], s.prototype, "anchorElement", 2);
914
- c([
915
- p("luzmo-overlay")
916
- ], s.prototype, "overlayElement", 2);
917
- c([
918
- a({ type: Boolean, reflect: !0 })
919
- ], s.prototype, "open", 2);
920
- customElements.get("luzmo-menu") || customElements.define("luzmo-menu", m);
921
- customElements.get("luzmo-menu-divider") || customElements.define("luzmo-menu-divider", V);
922
- customElements.get("luzmo-menu-group") || customElements.define("luzmo-menu-group", k);
923
- customElements.get("luzmo-menu-item") || customElements.define("luzmo-menu-item", s);
1357
+ ], LuzmoMenuItem.prototype, "noWrap", 2);
1358
+ __decorateClass([
1359
+ query(".anchor")
1360
+ ], LuzmoMenuItem.prototype, "anchorElement", 2);
1361
+ __decorateClass([
1362
+ query("luzmo-overlay")
1363
+ ], LuzmoMenuItem.prototype, "overlayElement", 2);
1364
+ __decorateClass([
1365
+ property({ type: Boolean, reflect: true })
1366
+ ], LuzmoMenuItem.prototype, "open", 2);
1367
+ if (!customElements.get("luzmo-menu")) {
1368
+ customElements.define("luzmo-menu", LuzmoMenu);
1369
+ }
1370
+ if (!customElements.get("luzmo-menu-divider")) {
1371
+ customElements.define("luzmo-menu-divider", LuzmoMenuDivider);
1372
+ }
1373
+ if (!customElements.get("luzmo-menu-group")) {
1374
+ customElements.define("luzmo-menu-group", LuzmoMenuGroup);
1375
+ }
1376
+ if (!customElements.get("luzmo-menu-item")) {
1377
+ customElements.define("luzmo-menu-item", LuzmoMenuItem);
1378
+ }
924
1379
  export {
925
- m as LuzmoMenu,
926
- V as LuzmoMenuDivider,
927
- k as LuzmoMenuGroup,
928
- s as LuzmoMenuItem,
929
- te as MenuItemAddedOrUpdatedEvent
1380
+ LuzmoMenu,
1381
+ LuzmoMenuDivider,
1382
+ LuzmoMenuGroup,
1383
+ LuzmoMenuItem,
1384
+ MenuItemAddedOrUpdatedEvent
930
1385
  };