@luzmo/lucero 1.0.1-alpha.15 → 1.0.1-alpha.17

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,24 +15,170 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("../mutation-controller-DkOMCW-c.cjs"),a=require("../base-CBCg3yyw.cjs"),L=require("../query-BL-TJj7K.cjs"),K=require("../focusable-EbipgXRh.cjs"),Z=require("../like-anchor-sod1C1fR.cjs"),G=require("../observe-slot-presence-bc9chhsi.cjs"),J=require("../observe-slot-text-Ceb7SvYT.cjs"),X=require("../random-id-CqvckpWe.cjs"),E=require("../luzmo-icons-D47EGj-3.cjs"),S=require("../directive-C7oCP5Bh.cjs"),Y=require("../async-directive-BX1T1e1_.cjs"),g=require("../directive-helpers-DyIRTWwA.cjs"),Q=require("../base-BjTwmyRF.cjs"),D=require("../sized-mixin-CPxE5C96.cjs");require("../progress-circle/index.cjs");const tt=require("../divider.module-DDvBo9zo.cjs");/**
19
- * @license
20
- * Copyright 2017 Google LLC
21
- * SPDX-License-Identifier: BSD-3-Clause
22
- */let ot;function et(r){return(t,o)=>Q.e(t,o,{get(){return(this.renderRoot??ot??(ot=document.createDocumentFragment())).querySelectorAll(r)}})}const it='#icon{grid-area:iconArea;align-self:start;height:var(--luzmo-option-icon-container-height, var(--option-icon-container-height));display:flex;align-items:center;justify-content:center;color:var(--highcontrast-option-color-default, var(--luzmo-option-label-icon-color-default, var(--option-label-icon-color-default)))}::slotted([slot=icon]){fill:var(--highcontrast-option-color-default, var(--luzmo-option-label-icon-color-default, var(--option-label-icon-color-default)));margin-inline-end:var(--luzmo-option-label-text-to-visual, var(--option-label-text-to-visual));block-size:var(--luzmo-option-icon-size, var(--option-icon-height));inline-size:var(--luzmo-option-icon-width, var(--option-icon-height));font-size:var(--luzmo-option-icon-size, var(--option-icon-height));text-align:center;--luzmo-icon-vertical-align: 0}:host{cursor:pointer;box-sizing:border-box;background-color:var(--highcontrast-option-background-color-default, var(--luzmo-option-background-color-default, var(--option-background-color-default)));line-height:var(--luzmo-option-label-line-height, var(--option-label-line-height));min-block-size:var(--luzmo-option-min-height, var(--option-min-height));padding-block-start:var(--luzmo-option-top-edge-to-text, var(--option-top-edge-to-text));padding-block-end:var(--luzmo-option-bottom-edge-to-text, var(--option-bottom-edge-to-text));padding-inline:var(--luzmo-option-label-inline-edge-to-content, var(--option-label-inline-edge-to-content));grid-template:". . headingIconArea sectionHeadingArea . ." "selectedArea checkArea iconArea labelArea valueArea actionsArea" 1fr ". . . descriptionArea . ." ". . . . . ."/auto auto auto 1fr auto auto;justify-content:start;margin:0;-webkit-text-decoration:none;text-decoration:none;display:grid;outline:none;align-items:center;position:relative;flex-shrink:0}:host:focus-visible{outline:none}#label{grid-area:submenuItemLabelArea}.checkmark,.checkbox{opacity:1;grid-area:checkArea;align-self:start;display:block}.checkmark{font-size:var(--luzmo-option-checkmark-size, var(--option-checkmark-size));fill:var(--highcontrast-options-checkmark-icon-color-default, var(--luzmo-options-checkmark-icon-color-default, var(--options-checkmark-icon-color-default)));color:var(--highcontrast-options-checkmark-icon-color-default, var(--luzmo-options-checkmark-icon-color-default, var(--options-checkmark-icon-color-default)));margin-block-start:calc(var(--luzmo-option-top-to-checkmark, var(--option-top-to-checkmark)) - var(--luzmo-option-top-edge-to-text, var(--option-top-edge-to-text)));margin-inline-end:var(--luzmo-option-text-to-control, var(--option-label-text-to-control))}.checkbox{font-size:var(--luzmo-option-checkbox-size, var(--option-checkbox-size));fill:var(--highcontrast-options-checkbox-icon-color-default, var(--luzmo-options-checkbox-icon-color-default, var(--options-checkbox-icon-color-default)));color:var(--highcontrast-options-checkbox-icon-color-default, var(--luzmo-options-checkbox-icon-color-default, var(--options-checkbox-icon-color-default)));margin-block-start:calc(var(--luzmo-option-top-to-checkbox, var(--option-top-to-checkbox)) - var(--luzmo-option-top-edge-to-text, var(--option-top-edge-to-text)));margin-inline-end:var(--luzmo-option-text-to-control, var(--option-label-text-to-control))}::slotted([slot=value]){grid-area:submenuItemValueArea}:host([focused]){background-color:var(--highcontrast-option-background-color-focus, var(--luzmo-option-background-color-key-focus, var(--option-background-color-key-focus)));outline:none}:host([focused])>#label,:host(:focus)>#label{color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-content-color-focus, var(--option-label-content-color-focus)))}:host([focused])>[name=description]::slotted(*),:host(:focus)>[name=description]::slotted(*){color:var(--highcontrast-option-color-focus, var(--luzmo-option-description-color-focus, var(--option-description-color-focus)))}:host([focused])>::slotted([slot=value]),:host(:focus)>::slotted([slot=value]){color:var(--highcontrast-option-color-focus, var(--luzmo-option-value-color-focus, var(--option-value-color-focus)))}:host([focused])>.icon:not(.checkmark,.checkbox),:host(:focus)>.icon:not(.checkmark,.checkbox){fill:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-focus, var(--option-label-icon-color-focus)));color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-focus, var(--option-label-icon-color-focus)))}:host([focused])>.checkmark,:host(:focus)>.checkmark{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-focus, var(--options-checkmark-icon-color-focus)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-focus, var(--options-checkmark-icon-color-focus)))}:host([focused])>.checkbox,:host(:focus)>.checkbox{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-focus, var(--options-checkbox-icon-color-focus)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-focus, var(--options-checkbox-icon-color-focus)))}:host:dir(rtl),:host([dir=rtl]){--option-focus-indicator-direction-scalar: -1}:host(:is(:active,[active])){background-color:var(--highcontrast-option-background-color-focus, var(--luzmo-option-background-color-down, var(--option-background-color-down)))}:host(:is(:active,[active]))>#label{color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-content-color-down, var(--option-label-content-color-down)))}:host(:is(:active,[active]))>[name=description]::slotted(*){color:var(--highcontrast-option-color-focus, var(--luzmo-option-description-color-down, var(--option-description-color-down)))}:host(:is(:active,[active]))>::slotted([slot=value]){color:var(--highcontrast-option-color-focus, var(--luzmo-option-value-color-down, var(--option-value-color-down)))}:host(:is(:active,[active]))>.icon:not(.checkmark,.checkbox){fill:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-down, var(--option-label-icon-color-down)));color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-down, var(--option-label-icon-color-down)))}:host(:is(:active,[active]))>.checkmark{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-down, var(--options-checkmark-icon-color-down)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-down, var(--options-checkmark-icon-color-down)))}:host(:is(:active,[active]))>.checkbox{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-down, var(--options-checkbox-icon-color-down)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-down, var(--options-checkbox-icon-color-down)))}:host([disabled]),:host([aria-disabled=true]){background-color:initial}:host([disabled]) #label,:host([disabled]) ::slotted([slot=value]),:host([aria-disabled=true]) #label,:host([aria-disabled=true]) ::slotted([slot=value]){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-content-color-disabled, var(--option-label-content-color-disabled)))}:host([disabled]) [name=description]::slotted(*),:host([aria-disabled=true]) [name=description]::slotted(*){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-description-color-disabled, var(--option-description-color-disabled)))}:host([disabled]) ::slotted([slot=icon]),:host([aria-disabled=true]) ::slotted([slot=icon]){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-icon-color-disabled, var(--option-label-icon-color-disabled)));fill:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-icon-color-disabled, var(--option-label-icon-color-disabled)))}:host([focused]){box-shadow:inset calc(var(--luzmo-option-focus-indicator-width, var(--option-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-option-focus-indicator-color, var(--luzmo-option-focus-indicator-color, var(--option-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-option-focus-indicator-width, var(--option-focus-indicator-width)) * var(--option-focus-indicator-direction-scalar, 1)) 0 0 0 var(--highcontrast-option-focus-indicator-color, var(--luzmo-option-focus-indicator-color, var(--option-focus-indicator-color)))}#label{font-size:var(--luzmo-option-label-font-size, var(--option-label-font-size));color:var(--highcontrast-option-color-default, var(--luzmo-option-label-content-color-default, var(--option-label-content-color-default)));-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;grid-area:labelArea}:host([variant=highlight][selected]){background-color:var(--luzmo-option-highlight-selected-label-background-color, var(--option-highlight-selected-label-background-color))}:host([variant=highlight][selected]) #label{color:var(--luzmo-option-highlight-selected-label-content-color, var(--option-highlight-selected-label-content-color))}:host([variant=highlight][selected]):hover #label{color:var(--luzmo-option-highlight-selected-label-content-color-hover, var(--option-highlight-selected-label-content-color-hover))}:host([variant=highlight][selected]):active #label{color:var(--luzmo-option-highlight-selected-label-content-color-down, var(--option-highlight-selected-label-content-color-down))}:host([variant=highlight][selected]):focus #label{color:var(--luzmo-option-highlight-selected-label-content-color-focus, var(--option-highlight-selected-label-content-color-focus))}:host([variant=highlight][selected]) ::slotted([slot=icon]){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-highlight-selected-label-content-color, var(--option-highlight-selected-label-content-color)));fill:var(--highcontrast-option-color-disabled, var(--luzmo-option-highlight-selected-label-content-color, var(--option-highlight-selected-label-content-color)))}::slotted([slot=value]){color:var(--highcontrast-option-color-default, var(--luzmo-option-value-color-default, var(--option-value-color-default)));font-size:var(--luzmo-option-label-font-size, var(--option-label-font-size));grid-area:valueArea;justify-self:end}[name=description]::slotted(*){color:var(--highcontrast-option-color-default, var(--luzmo-option-description-color-default, var(--option-description-color-default)));font-size:var(--luzmo-option-description-font-size, var(--option-description-font-size));-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;line-height:var(--luzmo-option-description-line-height, var(--option-description-line-height));grid-area:descriptionArea;margin-block-start:var(--luzmo-option-label-to-description-spacing, var(--option-label-to-description-spacing))}:host([no-wrap]) #label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}@media (hover: hover){:host(:hover){background-color:var(--highcontrast-option-background-color-focus, var(--luzmo-option-background-color-hover, var(--option-background-color-hover)))}:host(:hover)>#label{color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-content-color-hover, var(--option-label-content-color-hover)))}:host([variant=highlight][selected]:hover)>#label{color:var(--luzmo-option-highlight-selected-label-content-color-hover, var(--option-highlight-selected-label-content-color-hover))}:host(:hover)>[name=description]::slotted(*){color:var(--highcontrast-option-color-focus, var(--luzmo-option-description-color-hover, var(--option-description-color-hover)))}:host(:hover)>::slotted([slot=value]){color:var(--highcontrast-option-color-focus, var(--luzmo-option-value-color-hover, var(--option-value-color-hover)))}:host(:hover)>.icon:not(.checkmark,.checkbox){fill:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-hover, var(--option-label-icon-color-hover)));color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-hover, var(--option-label-icon-color-hover)))}:host([variant=highlight][selected]:hover)>.icon:not(.checkmark,.checkbox){fill:var(--luzmo-option-highlight-selected-label-icon-color-hover, var(--option-highlight-selected-label-icon-color-hover))}:host(:hover)>.checkmark{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-hover, var(--options-checkmark-icon-color-hover)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-hover, var(--options-checkmark-icon-color-hover)))}:host(:hover)>.checkbox{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-hover, var(--options-checkbox-icon-color-hover)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-hover, var(--options-checkbox-icon-color-hover)))}:host([disabled]:hover),:host([aria-disabled=true]:hover){cursor:default;background-color:initial}:host([disabled]:hover) #label,:host([disabled]:hover) ::slotted([slot=value]),:host([aria-disabled=true]:hover) #label,:host([aria-disabled=true]:hover) ::slotted([slot=value]){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-content-color-disabled, var(--option-label-content-color-disabled)))}:host([disabled]:hover) [name=description]::slotted(*),:host([aria-disabled=true]:hover) [name=description]::slotted(*){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-description-color-disabled, var(--option-description-color-disabled)))}:host([disabled]:hover) ::slotted([slot=icon]),:host([aria-disabled=true]:hover) ::slotted([slot=icon]){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-icon-color-disabled, var(--option-label-icon-color-disabled)));fill:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-icon-color-disabled, var(--option-label-icon-color-disabled)))}}:host([emphasized]){--options-checkmark-icon-color-default: var(--luzmo-primary);--options-checkmark-icon-color-hover: var(--luzmo-primary-hover);--options-checkmark-icon-color-down: var(--luzmo-primary-down);--options-checkmark-icon-color-focus: var(--luzmo-primary-focus);--options-checkbox-icon-color-default: var(--luzmo-primary);--options-checkbox-icon-color-hover: var(--luzmo-primary-hover);--options-checkbox-icon-color-down: var(--luzmo-primary-down);--options-checkbox-icon-color-focus: var(--luzmo-primary-focus)}:host{text-align:initial;font-family:var(--luzmo-option-font-family, var(--luzmo-font-family))}:host([hidden]){display:none}:host([disabled]){pointer-events:none}:host([disabled]) [name=value]::slotted(*){color:var(--luzmo-option-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}}:host([no-wrap]) #label{display:block}';var nt=Object.defineProperty,lt=Object.getOwnPropertyDescriptor,z=(r,t,o,e)=>{for(var i=e>1?void 0:e?lt(t,o):t,n=r.length-1,s;n>=0;n--)(s=r[n])&&(i=(e?s(t,o,i):s(i))||i);return e&&i&&nt(t,o,i),i};const rt=r=>a.x`
23
- <span class="icon-container icon checkmark ${r.join(" ")}">
24
- ${E.p3(E.F)}
18
+ "use strict";
19
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
20
+ const mutationController_js = require("@lit-labs/observers/mutation-controller.js");
21
+ const lit = require("lit");
22
+ const decorators_js = require("lit/decorators.js");
23
+ const focusable = require("../focusable-BPrTcZPd.cjs");
24
+ const likeAnchor = require("../like-anchor-D62faRNG.cjs");
25
+ const observeSlotPresence = require("../observe-slot-presence-9AwLGUQ_.cjs");
26
+ const observeSlotText = require("../observe-slot-text-CSofZeeF.cjs");
27
+ const randomId = require("../random-id-BE6HA503.cjs");
28
+ const icons = require("@luzmo/icons");
29
+ require("@lit-labs/virtualizer");
30
+ const repeat_js = require("lit/directives/repeat.js");
31
+ const base = require("../base-COw9n7UR.cjs");
32
+ const sizedMixin = require("../sized-mixin-UaTVa-AE.cjs");
33
+ require("../progress-circle/index.cjs");
34
+ const divider_module = require("../divider.module-Cm5LcDRV.cjs");
35
+ const menuItemStyles = '#icon{grid-area:iconArea;align-self:start;height:var(--luzmo-option-icon-container-height, var(--option-icon-container-height));display:flex;align-items:center;justify-content:center;color:var(--highcontrast-option-color-default, var(--luzmo-option-label-icon-color-default, var(--option-label-icon-color-default)))}::slotted([slot=icon]){fill:var(--highcontrast-option-color-default, var(--luzmo-option-label-icon-color-default, var(--option-label-icon-color-default)));margin-inline-end:var(--luzmo-option-label-text-to-visual, var(--option-label-text-to-visual));block-size:var(--luzmo-option-icon-size, var(--option-icon-height));inline-size:var(--luzmo-option-icon-width, var(--option-icon-height));font-size:var(--luzmo-option-icon-size, var(--option-icon-height));text-align:center;--luzmo-icon-vertical-align: 0}:host{cursor:pointer;box-sizing:border-box;background-color:var(--highcontrast-option-background-color-default, var(--luzmo-option-background-color-default, var(--option-background-color-default)));line-height:var(--luzmo-option-label-line-height, var(--option-label-line-height));min-block-size:var(--luzmo-option-min-height, var(--option-min-height));padding-block-start:var(--luzmo-option-top-edge-to-text, var(--option-top-edge-to-text));padding-block-end:var(--luzmo-option-bottom-edge-to-text, var(--option-bottom-edge-to-text));padding-inline:var(--luzmo-option-label-inline-edge-to-content, var(--option-label-inline-edge-to-content));grid-template:". . headingIconArea sectionHeadingArea . ." "selectedArea checkArea iconArea labelArea valueArea actionsArea" 1fr ". . . descriptionArea . ." ". . . . . ."/auto auto auto 1fr auto auto;justify-content:start;margin:0;-webkit-text-decoration:none;text-decoration:none;display:grid;outline:none;align-items:center;position:relative;flex-shrink:0}:host:focus-visible{outline:none}#label{grid-area:submenuItemLabelArea}.checkmark,.checkbox{opacity:1;grid-area:checkArea;align-self:start;display:block}.checkmark{font-size:var(--luzmo-option-checkmark-size, var(--option-checkmark-size));fill:var(--highcontrast-options-checkmark-icon-color-default, var(--luzmo-options-checkmark-icon-color-default, var(--options-checkmark-icon-color-default)));color:var(--highcontrast-options-checkmark-icon-color-default, var(--luzmo-options-checkmark-icon-color-default, var(--options-checkmark-icon-color-default)));margin-block-start:calc(var(--luzmo-option-top-to-checkmark, var(--option-top-to-checkmark)) - var(--luzmo-option-top-edge-to-text, var(--option-top-edge-to-text)));margin-inline-end:var(--luzmo-option-text-to-control, var(--option-label-text-to-control))}.checkbox{font-size:var(--luzmo-option-checkbox-size, var(--option-checkbox-size));fill:var(--highcontrast-options-checkbox-icon-color-default, var(--luzmo-options-checkbox-icon-color-default, var(--options-checkbox-icon-color-default)));color:var(--highcontrast-options-checkbox-icon-color-default, var(--luzmo-options-checkbox-icon-color-default, var(--options-checkbox-icon-color-default)));margin-block-start:calc(var(--luzmo-option-top-to-checkbox, var(--option-top-to-checkbox)) - var(--luzmo-option-top-edge-to-text, var(--option-top-edge-to-text)));margin-inline-end:var(--luzmo-option-text-to-control, var(--option-label-text-to-control))}::slotted([slot=value]){grid-area:submenuItemValueArea}:host([focused]){background-color:var(--highcontrast-option-background-color-focus, var(--luzmo-option-background-color-key-focus, var(--option-background-color-key-focus)));outline:none}:host([focused])>#label,:host(:focus)>#label{color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-content-color-focus, var(--option-label-content-color-focus)))}:host([focused])>[name=description]::slotted(*),:host(:focus)>[name=description]::slotted(*){color:var(--highcontrast-option-color-focus, var(--luzmo-option-description-color-focus, var(--option-description-color-focus)))}:host([focused])>::slotted([slot=value]),:host(:focus)>::slotted([slot=value]){color:var(--highcontrast-option-color-focus, var(--luzmo-option-value-color-focus, var(--option-value-color-focus)))}:host([focused])>.icon:not(.checkmark,.checkbox),:host(:focus)>.icon:not(.checkmark,.checkbox){fill:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-focus, var(--option-label-icon-color-focus)));color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-focus, var(--option-label-icon-color-focus)))}:host([focused])>.checkmark,:host(:focus)>.checkmark{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-focus, var(--options-checkmark-icon-color-focus)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-focus, var(--options-checkmark-icon-color-focus)))}:host([focused])>.checkbox,:host(:focus)>.checkbox{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-focus, var(--options-checkbox-icon-color-focus)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-focus, var(--options-checkbox-icon-color-focus)))}:host:dir(rtl),:host([dir=rtl]){--option-focus-indicator-direction-scalar: -1}:host(:is(:active,[active])){background-color:var(--highcontrast-option-background-color-focus, var(--luzmo-option-background-color-down, var(--option-background-color-down)))}:host(:is(:active,[active]))>#label{color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-content-color-down, var(--option-label-content-color-down)))}:host(:is(:active,[active]))>[name=description]::slotted(*){color:var(--highcontrast-option-color-focus, var(--luzmo-option-description-color-down, var(--option-description-color-down)))}:host(:is(:active,[active]))>::slotted([slot=value]){color:var(--highcontrast-option-color-focus, var(--luzmo-option-value-color-down, var(--option-value-color-down)))}:host(:is(:active,[active]))>.icon:not(.checkmark,.checkbox){fill:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-down, var(--option-label-icon-color-down)));color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-down, var(--option-label-icon-color-down)))}:host(:is(:active,[active]))>.checkmark{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-down, var(--options-checkmark-icon-color-down)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-down, var(--options-checkmark-icon-color-down)))}:host(:is(:active,[active]))>.checkbox{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-down, var(--options-checkbox-icon-color-down)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-down, var(--options-checkbox-icon-color-down)))}:host([disabled]),:host([aria-disabled=true]){background-color:initial}:host([disabled]) #label,:host([disabled]) ::slotted([slot=value]),:host([aria-disabled=true]) #label,:host([aria-disabled=true]) ::slotted([slot=value]){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-content-color-disabled, var(--option-label-content-color-disabled)))}:host([disabled]) [name=description]::slotted(*),:host([aria-disabled=true]) [name=description]::slotted(*){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-description-color-disabled, var(--option-description-color-disabled)))}:host([disabled]) ::slotted([slot=icon]),:host([aria-disabled=true]) ::slotted([slot=icon]){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-icon-color-disabled, var(--option-label-icon-color-disabled)));fill:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-icon-color-disabled, var(--option-label-icon-color-disabled)))}:host([focused]){box-shadow:inset calc(var(--luzmo-option-focus-indicator-width, var(--option-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-option-focus-indicator-color, var(--luzmo-option-focus-indicator-color, var(--option-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-option-focus-indicator-width, var(--option-focus-indicator-width)) * var(--option-focus-indicator-direction-scalar, 1)) 0 0 0 var(--highcontrast-option-focus-indicator-color, var(--luzmo-option-focus-indicator-color, var(--option-focus-indicator-color)))}#label{font-size:var(--luzmo-option-label-font-size, var(--option-label-font-size));color:var(--highcontrast-option-color-default, var(--luzmo-option-label-content-color-default, var(--option-label-content-color-default)));-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;grid-area:labelArea}:host([variant=highlight][selected]){background-color:var(--luzmo-option-highlight-selected-label-background-color, var(--option-highlight-selected-label-background-color))}:host([variant=highlight][selected]) #label{color:var(--luzmo-option-highlight-selected-label-content-color, var(--option-highlight-selected-label-content-color))}:host([variant=highlight][selected]):hover #label{color:var(--luzmo-option-highlight-selected-label-content-color-hover, var(--option-highlight-selected-label-content-color-hover))}:host([variant=highlight][selected]):active #label{color:var(--luzmo-option-highlight-selected-label-content-color-down, var(--option-highlight-selected-label-content-color-down))}:host([variant=highlight][selected]):focus #label{color:var(--luzmo-option-highlight-selected-label-content-color-focus, var(--option-highlight-selected-label-content-color-focus))}:host([variant=highlight][selected]) ::slotted([slot=icon]){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-highlight-selected-label-content-color, var(--option-highlight-selected-label-content-color)));fill:var(--highcontrast-option-color-disabled, var(--luzmo-option-highlight-selected-label-content-color, var(--option-highlight-selected-label-content-color)))}::slotted([slot=value]){color:var(--highcontrast-option-color-default, var(--luzmo-option-value-color-default, var(--option-value-color-default)));font-size:var(--luzmo-option-label-font-size, var(--option-label-font-size));grid-area:valueArea;justify-self:end}[name=description]::slotted(*){color:var(--highcontrast-option-color-default, var(--luzmo-option-description-color-default, var(--option-description-color-default)));font-size:var(--luzmo-option-description-font-size, var(--option-description-font-size));-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;line-height:var(--luzmo-option-description-line-height, var(--option-description-line-height));grid-area:descriptionArea;margin-block-start:var(--luzmo-option-label-to-description-spacing, var(--option-label-to-description-spacing))}:host([no-wrap]) #label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}@media (hover: hover){:host(:hover){background-color:var(--highcontrast-option-background-color-focus, var(--luzmo-option-background-color-hover, var(--option-background-color-hover)))}:host(:hover)>#label{color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-content-color-hover, var(--option-label-content-color-hover)))}:host([variant=highlight][selected]:hover)>#label{color:var(--luzmo-option-highlight-selected-label-content-color-hover, var(--option-highlight-selected-label-content-color-hover))}:host(:hover)>[name=description]::slotted(*){color:var(--highcontrast-option-color-focus, var(--luzmo-option-description-color-hover, var(--option-description-color-hover)))}:host(:hover)>::slotted([slot=value]){color:var(--highcontrast-option-color-focus, var(--luzmo-option-value-color-hover, var(--option-value-color-hover)))}:host(:hover)>.icon:not(.checkmark,.checkbox){fill:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-hover, var(--option-label-icon-color-hover)));color:var(--highcontrast-option-color-focus, var(--luzmo-option-label-icon-color-hover, var(--option-label-icon-color-hover)))}:host([variant=highlight][selected]:hover)>.icon:not(.checkmark,.checkbox){fill:var(--luzmo-option-highlight-selected-label-icon-color-hover, var(--option-highlight-selected-label-icon-color-hover))}:host(:hover)>.checkmark{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-hover, var(--options-checkmark-icon-color-hover)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkmark-icon-color-hover, var(--options-checkmark-icon-color-hover)))}:host(:hover)>.checkbox{fill:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-hover, var(--options-checkbox-icon-color-hover)));color:var(--highcontrast-option-color-focus, var(--luzmo-options-checkbox-icon-color-hover, var(--options-checkbox-icon-color-hover)))}:host([disabled]:hover),:host([aria-disabled=true]:hover){cursor:default;background-color:initial}:host([disabled]:hover) #label,:host([disabled]:hover) ::slotted([slot=value]),:host([aria-disabled=true]:hover) #label,:host([aria-disabled=true]:hover) ::slotted([slot=value]){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-content-color-disabled, var(--option-label-content-color-disabled)))}:host([disabled]:hover) [name=description]::slotted(*),:host([aria-disabled=true]:hover) [name=description]::slotted(*){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-description-color-disabled, var(--option-description-color-disabled)))}:host([disabled]:hover) ::slotted([slot=icon]),:host([aria-disabled=true]:hover) ::slotted([slot=icon]){color:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-icon-color-disabled, var(--option-label-icon-color-disabled)));fill:var(--highcontrast-option-color-disabled, var(--luzmo-option-label-icon-color-disabled, var(--option-label-icon-color-disabled)))}}:host([emphasized]){--options-checkmark-icon-color-default: var(--luzmo-primary);--options-checkmark-icon-color-hover: var(--luzmo-primary-hover);--options-checkmark-icon-color-down: var(--luzmo-primary-down);--options-checkmark-icon-color-focus: var(--luzmo-primary-focus);--options-checkbox-icon-color-default: var(--luzmo-primary);--options-checkbox-icon-color-hover: var(--luzmo-primary-hover);--options-checkbox-icon-color-down: var(--luzmo-primary-down);--options-checkbox-icon-color-focus: var(--luzmo-primary-focus)}:host{text-align:initial;font-family:var(--luzmo-option-font-family, var(--luzmo-font-family))}:host([hidden]){display:none}:host([disabled]){pointer-events:none}:host([disabled]) [name=value]::slotted(*){color:var(--luzmo-option-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}}:host([no-wrap]) #label{display:block}';
36
+ var __defProp$1 = Object.defineProperty;
37
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
38
+ var __decorateClass$1 = (decorators, target, key, kind) => {
39
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
40
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
41
+ if (decorator = decorators[i])
42
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
43
+ if (kind && result) __defProp$1(target, key, result);
44
+ return result;
45
+ };
46
+ const checkIcon = (classes) => lit.html`
47
+ <span class="icon-container icon checkmark ${classes.join(" ")}">
48
+ ${icons.luzmoIcon(icons.luzmoCheck)}
25
49
  </span>
26
- `,st=r=>a.x`
27
- <span class="icon-container icon checkbox ${r.join(" ")}">
28
- ${E.p3(E.z0)}
50
+ `;
51
+ const checkboxIcon = (classes) => lit.html`
52
+ <span class="icon-container icon checkbox ${classes.join(" ")}">
53
+ ${icons.luzmoIcon(icons.luzmoCheckbox)}
29
54
  </span>
30
- `,at=r=>a.x`
31
- <span class="icon-container icon checkbox ${r.join(" ")}">
32
- ${E.p3(E.v0)}
55
+ `;
56
+ const checkboxCheckedIcon = (classes) => lit.html`
57
+ <span class="icon-container icon checkbox ${classes.join(" ")}">
58
+ ${icons.luzmoIcon(icons.luzmoCheckboxChecked)}
33
59
  </span>
34
- `;class b extends Z.LikeAnchor(J.ObserveSlotText(G.ObserveSlotPresence(K.Focusable,'[slot="icon"]'))){constructor(){super(),this.active=!1,this.focused=!1,this.selected=!1,this.emphasized=!1,this.variant="checkmarks",this._value="",this.noWrap=!1,this.renderCheckIcon=(t,o)=>{const e=o?["check-icon--with-adjacent-icon"]:[];return this.variant==="checkboxes"?t?at(e):st(e):t&&this.variant!=="highlight"?rt(e):a.x``},this.proxyFocus=()=>{this.focus()},this.willDispatchUpdate=!1,this.addEventListener("click",this.handleClickCapture,{capture:!0}),new W.s(this,{config:{characterData:!0,childList:!0,subtree:!0},callback:()=>{this.breakItemChildrenCache()}})}static get styles(){return[a.r(it)]}get value(){return this._value||this.itemText}set value(t){t!==this._value&&(this._value=t||"",this._value?this.setAttribute("value",this._value):this.removeAttribute("value"))}get itemText(){return this.itemChildren.content.reduce((t,o)=>t+(o.textContent||"").trim(),"")}get focusElement(){return this}get hasIcon(){return this.slotContentIsPresent}get itemChildren(){if(!this.iconSlot||!this.contentSlot)return{icon:[],content:[]};if(this._itemChildren)return this._itemChildren;const t=this.iconSlot.assignedElements().map(e=>{const i=e.cloneNode(!0);return i.removeAttribute("slot"),i.classList.toggle("icon"),i}),o=this.contentSlot.assignedNodes().map(e=>e.cloneNode(!0));return this._itemChildren={icon:t,content:o},this._itemChildren}click(){this.disabled||this.shouldProxyClick()||super.click()}handleClickCapture(t){if(this.disabled)return t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),!1}shouldProxyClick(){let t=!1;return this.anchorElement&&(this.anchorElement.click(),t=!0),t}breakItemChildrenCache(){this._itemChildren=void 0,this.triggerUpdate()}render(){return a.x`
35
- ${this.renderCheckIcon(this.selected,this.hasIcon)}
60
+ `;
61
+ class LuzmoOption extends likeAnchor.LikeAnchor(
62
+ observeSlotText.ObserveSlotText(observeSlotPresence.ObserveSlotPresence(focusable.Focusable, '[slot="icon"]'))
63
+ ) {
64
+ constructor() {
65
+ super();
66
+ this.active = false;
67
+ this.focused = false;
68
+ this.selected = false;
69
+ this.emphasized = false;
70
+ this.variant = "checkmarks";
71
+ this._value = "";
72
+ this.noWrap = false;
73
+ this.renderCheckIcon = (selected, hasIcon) => {
74
+ const classes = hasIcon ? ["check-icon--with-adjacent-icon"] : [];
75
+ if (this.variant === "checkboxes") {
76
+ return selected ? checkboxCheckedIcon(classes) : checkboxIcon(classes);
77
+ }
78
+ return selected && this.variant !== "highlight" ? checkIcon(classes) : lit.html``;
79
+ };
80
+ this.proxyFocus = () => {
81
+ this.focus();
82
+ };
83
+ this.willDispatchUpdate = false;
84
+ this.addEventListener("click", this.handleClickCapture, {
85
+ capture: true
86
+ });
87
+ new mutationController_js.MutationController(this, {
88
+ config: {
89
+ characterData: true,
90
+ childList: true,
91
+ subtree: true
92
+ },
93
+ callback: () => {
94
+ this.breakItemChildrenCache();
95
+ }
96
+ });
97
+ }
98
+ static get styles() {
99
+ return [lit.unsafeCSS(menuItemStyles)];
100
+ }
101
+ get value() {
102
+ return this._value || this.itemText;
103
+ }
104
+ set value(value) {
105
+ if (value === this._value) {
106
+ return;
107
+ }
108
+ this._value = value || "";
109
+ if (this._value) {
110
+ this.setAttribute("value", this._value);
111
+ } else {
112
+ this.removeAttribute("value");
113
+ }
114
+ }
115
+ /**
116
+ * @private
117
+ */
118
+ get itemText() {
119
+ return this.itemChildren.content.reduce(
120
+ (acc, node) => acc + (node.textContent || "").trim(),
121
+ ""
122
+ );
123
+ }
124
+ get focusElement() {
125
+ return this;
126
+ }
127
+ get hasIcon() {
128
+ return this.slotContentIsPresent;
129
+ }
130
+ get itemChildren() {
131
+ if (!this.iconSlot || !this.contentSlot) {
132
+ return {
133
+ icon: [],
134
+ content: []
135
+ };
136
+ }
137
+ if (this._itemChildren) {
138
+ return this._itemChildren;
139
+ }
140
+ const icon = this.iconSlot.assignedElements().map((element) => {
141
+ const newElement = element.cloneNode(true);
142
+ newElement.removeAttribute("slot");
143
+ newElement.classList.toggle("icon");
144
+ return newElement;
145
+ });
146
+ const content = this.contentSlot.assignedNodes().map((node) => node.cloneNode(true));
147
+ this._itemChildren = { icon, content };
148
+ return this._itemChildren;
149
+ }
150
+ click() {
151
+ if (this.disabled) {
152
+ return;
153
+ }
154
+ if (this.shouldProxyClick()) {
155
+ return;
156
+ }
157
+ super.click();
158
+ }
159
+ handleClickCapture(event) {
160
+ if (this.disabled) {
161
+ event.preventDefault();
162
+ event.stopImmediatePropagation();
163
+ event.stopPropagation();
164
+ return false;
165
+ }
166
+ }
167
+ shouldProxyClick() {
168
+ let handled = false;
169
+ if (this.anchorElement) {
170
+ this.anchorElement.click();
171
+ handled = true;
172
+ }
173
+ return handled;
174
+ }
175
+ breakItemChildrenCache() {
176
+ this._itemChildren = void 0;
177
+ this.triggerUpdate();
178
+ }
179
+ render() {
180
+ return lit.html`
181
+ ${this.renderCheckIcon(this.selected, this.hasIcon)}
36
182
  <div id="icon">
37
183
  <slot name="icon"></slot>
38
184
  </div>
@@ -41,61 +187,548 @@
41
187
  </div>
42
188
  <slot name="description"></slot>
43
189
  <slot name="value"></slot>
44
- ${this.href&&this.href.length>0?super.renderAnchor({id:"button",ariaHidden:!0,className:"button anchor hidden"}):a.E}
45
- `}handlePointerdown(){}firstUpdated(t){super.firstUpdated(t),this.setAttribute("tabindex","-1"),this.addEventListener("pointerdown",this.handlePointerdown),this.hasAttribute("id")||(this.id=`luzmo-option-${X.randomID()}`)}updateAriaSelected(){const t=this.getAttribute("role");t==="option"?this.setAttribute("aria-selected",this.selected?"true":"false"):t==="optioncheckbox"&&this.setAttribute("aria-checked",this.selected?"true":"false")}setRole(t){this.setAttribute("role",t),this.updateAriaSelected()}updated(t){super.updated(t),t.has("label")&&(this.label||t.get("label")!==void 0)&&this.setAttribute("aria-label",this.label||""),this.anchorElement&&(this.anchorElement.addEventListener("focus",this.proxyFocus),this.anchorElement.tabIndex=-1),t.has("selected")&&this.updateAriaSelected()}connectedCallback(){super.connectedCallback(),this.triggerUpdate()}async triggerUpdate(){this.willDispatchUpdate||(this.willDispatchUpdate=!0,await new Promise(t=>requestAnimationFrame(t)),this.dispatchUpdate())}dispatchUpdate(){this.isConnected&&(this.willDispatchUpdate=!1)}}z([a.n({type:Boolean,reflect:!0})],b.prototype,"active",2);z([a.n({type:Boolean,reflect:!0})],b.prototype,"focused",2);z([a.n({type:Boolean,reflect:!0})],b.prototype,"selected",2);z([a.n({type:Boolean,reflect:!0})],b.prototype,"emphasized",2);z([a.n({type:String,reflect:!0})],b.prototype,"variant",2);z([a.n({type:String})],b.prototype,"value",1);z([L.e("slot:not([name])")],b.prototype,"contentSlot",2);z([L.e('slot[name="icon"]')],b.prototype,"iconSlot",2);z([a.n({type:Boolean,reflect:!0,attribute:"no-wrap",hasChanged(){return!1}})],b.prototype,"noWrap",2);z([L.e(".anchor")],b.prototype,"anchorElement",2);function O(r,t,o,e){var i=arguments.length,n=i<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,o):e,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,t,o,e);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(n=(i<3?s(n):i>3?s(t,o,n):s(t,o))||n);return i>3&&n&&Object.defineProperty(t,o,n),n}/**
46
- * @license
47
- * Copyright 2017 Google LLC
48
- * SPDX-License-Identifier: BSD-3-Clause
49
- */const F=(r,t,o)=>{const e=new Map;for(let i=t;i<=o;i++)e.set(r[i],i);return e},j=S.e(class extends S.i{constructor(r){if(super(r),r.type!==S.t.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,t,o){let e;o===void 0?o=t:t!==void 0&&(e=t);const i=[],n=[];let s=0;for(const l of r)i[s]=e?e(l,s):s,n[s]=o(l,s),s++;return{values:n,keys:i}}render(r,t,o){return this.dt(r,t,o).values}update(r,[t,o,e]){const i=g.p(r),{values:n,keys:s}=this.dt(t,o,e);if(!Array.isArray(i))return this.ut=s,n;const l=this.ut??(this.ut=[]),c=[];let h,m,d=0,p=i.length-1,u=0,v=n.length-1;for(;d<=p&&u<=v;)if(i[d]===null)d++;else if(i[p]===null)p--;else if(l[d]===s[u])c[u]=g.v(i[d],n[u]),d++,u++;else if(l[p]===s[v])c[v]=g.v(i[p],n[v]),p--,v--;else if(l[d]===s[v])c[v]=g.v(i[d],n[v]),g.r(r,c[v+1],i[d]),d++,v--;else if(l[p]===s[u])c[u]=g.v(i[p],n[u]),g.r(r,i[d],i[p]),p--,u++;else if(h===void 0&&(h=F(s,u,v),m=F(l,d,p)),h.has(l[d]))if(h.has(l[p])){const f=m.get(s[u]),y=f!==void 0?i[f]:null;if(y===null){const x=g.r(r,i[d]);g.v(x,n[u]),c[u]=x}else c[u]=g.v(y,n[u]),g.r(r,i[d],y),i[f]=null;u++}else g.M(i[p]),p--;else g.M(i[d]),d++;for(;u<=v;){const f=g.r(r,c[v+1]);g.v(f,n[u]),c[u++]=f}for(;d<=p;){const f=i[d++];f!==null&&g.M(f)}return this.ut=s,g.m(r,c),a.T}});/**
50
- * @license
51
- * Copyright 2021 Google LLC
52
- * SPDX-License-Identifier: BSD-3-Clause
53
- */class T extends Event{constructor(t){super(T.eventName,{bubbles:!1}),this.first=t.first,this.last=t.last}}T.eventName="rangeChanged";class V extends Event{constructor(t){super(V.eventName,{bubbles:!1}),this.first=t.first,this.last=t.last}}V.eventName="visibilityChanged";class M extends Event{constructor(){super(M.eventName,{bubbles:!1})}}M.eventName="unpinned";/**
54
- * @license
55
- * Copyright 2021 Google LLC
56
- * SPDX-License-Identifier: BSD-3-Clause
57
- */class ct{constructor(t){this._element=null;const o=t??window;this._node=o,t&&(this._element=t)}get element(){return this._element||document.scrollingElement||document.documentElement}get scrollTop(){return this.element.scrollTop||window.scrollY}get scrollLeft(){return this.element.scrollLeft||window.scrollX}get scrollHeight(){return this.element.scrollHeight}get scrollWidth(){return this.element.scrollWidth}get viewportHeight(){return this._element?this._element.getBoundingClientRect().height:window.innerHeight}get viewportWidth(){return this._element?this._element.getBoundingClientRect().width:window.innerWidth}get maxScrollTop(){return this.scrollHeight-this.viewportHeight}get maxScrollLeft(){return this.scrollWidth-this.viewportWidth}}class ht extends ct{constructor(t,o){super(o),this._clients=new Set,this._retarget=null,this._end=null,this.__destination=null,this.correctingScrollError=!1,this._checkForArrival=this._checkForArrival.bind(this),this._updateManagedScrollTo=this._updateManagedScrollTo.bind(this),this.scrollTo=this.scrollTo.bind(this),this.scrollBy=this.scrollBy.bind(this);const e=this._node;this._originalScrollTo=e.scrollTo,this._originalScrollBy=e.scrollBy,this._originalScroll=e.scroll,this._attach(t)}get _destination(){return this.__destination}get scrolling(){return this._destination!==null}scrollTo(t,o){const e=typeof t=="number"&&typeof o=="number"?{left:t,top:o}:t;this._scrollTo(e)}scrollBy(t,o){const e=typeof t=="number"&&typeof o=="number"?{left:t,top:o}:t;e.top!==void 0&&(e.top+=this.scrollTop),e.left!==void 0&&(e.left+=this.scrollLeft),this._scrollTo(e)}_nativeScrollTo(t){this._originalScrollTo.bind(this._element||window)(t)}_scrollTo(t,o=null,e=null){this._end!==null&&this._end(),t.behavior==="smooth"?(this._setDestination(t),this._retarget=o,this._end=e):this._resetScrollState(),this._nativeScrollTo(t)}_setDestination(t){let{top:o,left:e}=t;return o=o===void 0?void 0:Math.max(0,Math.min(o,this.maxScrollTop)),e=e===void 0?void 0:Math.max(0,Math.min(e,this.maxScrollLeft)),this._destination!==null&&e===this._destination.left&&o===this._destination.top?!1:(this.__destination={top:o,left:e,behavior:"smooth"},!0)}_resetScrollState(){this.__destination=null,this._retarget=null,this._end=null}_updateManagedScrollTo(t){this._destination&&this._setDestination(t)&&this._nativeScrollTo(this._destination)}managedScrollTo(t,o,e){return this._scrollTo(t,o,e),this._updateManagedScrollTo}correctScrollError(t){this.correctingScrollError=!0,requestAnimationFrame(()=>requestAnimationFrame(()=>this.correctingScrollError=!1)),this._nativeScrollTo(t),this._retarget&&this._setDestination(this._retarget()),this._destination&&this._nativeScrollTo(this._destination)}_checkForArrival(){if(this._destination!==null){const{scrollTop:t,scrollLeft:o}=this;let{top:e,left:i}=this._destination;e=Math.min(e||0,this.maxScrollTop),i=Math.min(i||0,this.maxScrollLeft);const n=Math.abs(e-t),s=Math.abs(i-o);n<1&&s<1&&(this._end&&this._end(),this._resetScrollState())}}detach(t){return this._clients.delete(t),this._clients.size===0&&(this._node.scrollTo=this._originalScrollTo,this._node.scrollBy=this._originalScrollBy,this._node.scroll=this._originalScroll,this._node.removeEventListener("scroll",this._checkForArrival)),null}_attach(t){this._clients.add(t),this._clients.size===1&&(this._node.scrollTo=this.scrollTo,this._node.scrollBy=this.scrollBy,this._node.scroll=this.scrollTo,this._node.addEventListener("scroll",this._checkForArrival))}}/**
58
- * @license
59
- * Copyright 2021 Google LLC
60
- * SPDX-License-Identifier: BSD-3-Clause
61
- */let $=typeof window<"u"?window.ResizeObserver:void 0;const R=Symbol("virtualizerRef"),I="virtualizer-sizer";let P;class ut{constructor(t){if(this._benchmarkStart=null,this._layout=null,this._clippingAncestors=[],this._scrollSize=null,this._scrollError=null,this._childrenPos=null,this._childMeasurements=null,this._toBeMeasured=new Map,this._rangeChanged=!0,this._itemsChanged=!0,this._visibilityChanged=!0,this._scrollerController=null,this._isScroller=!1,this._sizer=null,this._hostElementRO=null,this._childrenRO=null,this._mutationObserver=null,this._scrollEventListeners=[],this._scrollEventListenerOptions={passive:!0},this._loadListener=this._childLoaded.bind(this),this._scrollIntoViewTarget=null,this._updateScrollIntoViewCoordinates=null,this._items=[],this._first=-1,this._last=-1,this._firstVisible=-1,this._lastVisible=-1,this._scheduled=new WeakSet,this._measureCallback=null,this._measureChildOverride=null,this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null,this._layoutInitialized=null,this._connected=!1,!t)throw new Error("Virtualizer constructor requires a configuration object");if(t.hostElement)this._init(t);else throw new Error('Virtualizer configuration requires the "hostElement" property')}set items(t){Array.isArray(t)&&t!==this._items&&(this._itemsChanged=!0,this._items=t,this._schedule(this._updateLayout))}_init(t){this._isScroller=!!t.scroller,this._initHostElement(t);const o=t.layout||{};this._layoutInitialized=this._initLayout(o)}_initObservers(){this._mutationObserver=new MutationObserver(this._finishDOMUpdate.bind(this)),this._hostElementRO=new $(()=>this._hostElementSizeChanged()),this._childrenRO=new $(this._childrenSizeChanged.bind(this))}_initHostElement(t){const o=this._hostElement=t.hostElement;this._applyVirtualizerStyles(),o[R]=this}connected(){this._initObservers();const t=this._isScroller;this._clippingAncestors=vt(this._hostElement,t),this._scrollerController=new ht(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach(t=>{t.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(t),this._hostElementRO.observe(t)}),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach(t=>this._childrenRO.observe(t)),this._scrollEventListeners.forEach(t=>t.addEventListener("scroll",this,this._scrollEventListenerOptions))}disconnected(){var t,o,e,i;this._scrollEventListeners.forEach(n=>n.removeEventListener("scroll",this,this._scrollEventListenerOptions)),this._scrollEventListeners=[],this._clippingAncestors=[],(t=this._scrollerController)==null||t.detach(this),this._scrollerController=null,(o=this._mutationObserver)==null||o.disconnect(),this._mutationObserver=null,(e=this._hostElementRO)==null||e.disconnect(),this._hostElementRO=null,(i=this._childrenRO)==null||i.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){const o=this._hostElement.style;o.display=o.display||"block",o.position=o.position||"relative",o.contain=o.contain||"size layout",this._isScroller&&(o.overflow=o.overflow||"auto",o.minHeight=o.minHeight||"150px")}_getSizer(){const t=this._hostElement;if(!this._sizer){let o=t.querySelector(`[${I}]`);o||(o=document.createElement("div"),o.setAttribute(I,""),t.appendChild(o)),Object.assign(o.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),o.textContent="&nbsp;",o.setAttribute(I,""),this._sizer=o}return this._sizer}async updateLayoutConfig(t){await this._layoutInitialized;const o=t.type||P;if(typeof o=="function"&&this._layout instanceof o){const e={...t};return delete e.type,this._layout.config=e,!0}return!1}async _initLayout(t){let o,e;if(typeof t.type=="function"){e=t.type;const i={...t};delete i.type,o=i}else o=t;e===void 0&&(P=e=(await Promise.resolve().then(()=>require("../flow-DM3dNAKs.cjs"))).FlowLayout),this._layout=new e(i=>this._handleLayoutMessage(i),o),this._layout.measureChildren&&typeof this._layout.updateItemSizes=="function"&&(typeof this._layout.measureChildren=="function"&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){this._benchmarkStart===null&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(this._benchmarkStart!==null){const t=window.performance.now(),o=t-this._benchmarkStart,i=performance.getEntriesByName("uv-virtualizing","measure").filter(n=>n.startTime>=this._benchmarkStart&&n.startTime<t).reduce((n,s)=>n+s.duration,0);return this._benchmarkStart=null,{timeElapsed:o,virtualizationTime:i}}return null}_measureChildren(){const t={},o=this._children,e=this._measureChildOverride||this._measureChild;for(let i=0;i<o.length;i++){const n=o[i],s=this._first+i;(this._itemsChanged||this._toBeMeasured.has(n))&&(t[s]=e.call(this,n,this._items[s]))}this._childMeasurements=t,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(t){const{width:o,height:e}=t.getBoundingClientRect();return Object.assign({width:o,height:e},dt(t))}async _schedule(t){this._scheduled.has(t)||(this._scheduled.add(t),await Promise.resolve(),this._scheduled.delete(t),t.call(this))}async _updateDOM(t){this._scrollSize=t.scrollSize,this._adjustRange(t.range),this._childrenPos=t.childPositions,this._scrollError=t.scrollError||null;const{_rangeChanged:o,_itemsChanged:e}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(o||e)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach(t=>this._childrenRO.observe(t)),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),this._childMeasurements!==null&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){var t;if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(o){console.warn("Error measuring performance data: ",o)}window.performance.mark("uv-start")}this._scrollerController.correctingScrollError===!1&&((t=this._layout)==null||t.unpin()),this._schedule(this._updateLayout)}handleEvent(t){switch(t.type){case"scroll":(t.currentTarget===window||this._clippingAncestors.includes(t.currentTarget))&&this._handleScrollEvent();break;default:console.warn("event not handled",t)}}_handleLayoutMessage(t){t.type==="stateChanged"?this._updateDOM(t):t.type==="visibilityChanged"?(this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._notifyVisibility()):t.type==="unpinned"&&this._hostElement.dispatchEvent(new M)}get _children(){const t=[];let o=this._hostElement.firstElementChild;for(;o;)o.hasAttribute(I)||t.push(o),o=o.nextElementSibling;return t}_updateView(){var i;const t=this._hostElement,o=(i=this._scrollerController)==null?void 0:i.element,e=this._layout;if(t&&o&&e){let n,s,l,c;const h=t.getBoundingClientRect();n=0,s=0,l=window.innerHeight,c=window.innerWidth;const m=this._clippingAncestors.map(w=>w.getBoundingClientRect());m.unshift(h);for(const w of m)n=Math.max(n,w.top),s=Math.max(s,w.left),l=Math.min(l,w.bottom),c=Math.min(c,w.right);const d=o.getBoundingClientRect(),p={left:h.left-d.left,top:h.top-d.top},u={width:o.scrollWidth,height:o.scrollHeight},v=n-h.top+t.scrollTop,f=s-h.left+t.scrollLeft,y=Math.max(0,l-n),x=Math.max(0,c-s);e.viewportSize={width:x,height:y},e.viewportScroll={top:v,left:f},e.totalScrollSize=u,e.offsetWithinScroller=p}}_sizeHostElement(t){const e=t&&t.width!==null?Math.min(82e5,t.width):0,i=t&&t.height!==null?Math.min(82e5,t.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${e}px, ${i}px)`;else{const n=this._hostElement.style;n.minWidth=e?`${e}px`:"100%",n.minHeight=i?`${i}px`:"100%"}}_positionChildren(t){t&&t.forEach(({top:o,left:e,width:i,height:n,xOffset:s,yOffset:l},c)=>{const h=this._children[c-this._first];h&&(h.style.position="absolute",h.style.boxSizing="border-box",h.style.transform=`translate(${e}px, ${o}px)`,i!==void 0&&(h.style.width=i+"px"),n!==void 0&&(h.style.height=n+"px"),h.style.left=s===void 0?null:s+"px",h.style.top=l===void 0?null:l+"px")})}async _adjustRange(t){const{_first:o,_last:e,_firstVisible:i,_lastVisible:n}=this;this._first=t.first,this._last=t.last,this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==o||this._last!==e,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==i||this._lastVisible!==n}_correctScrollError(){if(this._scrollError){const{scrollTop:t,scrollLeft:o}=this._scrollerController,{top:e,left:i}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:t-e,left:o-i})}}element(t){var o;return t===1/0&&(t=this._items.length-1),((o=this._items)==null?void 0:o[t])===void 0?void 0:{scrollIntoView:(e={})=>this._scrollElementIntoView({...e,index:t})}}_scrollElementIntoView(t){if(t.index>=this._first&&t.index<=this._last)this._children[t.index-this._first].scrollIntoView(t);else if(t.index=Math.min(t.index,this._items.length-1),t.behavior==="smooth"){const o=this._layout.getScrollIntoViewCoordinates(t),{behavior:e}=t;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(o,{behavior:e}),()=>this._layout.getScrollIntoViewCoordinates(t),()=>this._scrollIntoViewTarget=null),this._scrollIntoViewTarget=t}else this._layout.pin=t}_checkScrollIntoViewTarget(t){const{index:o}=this._scrollIntoViewTarget||{};o&&(t!=null&&t.has(o))&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new T({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new V({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise((t,o)=>{this._layoutCompleteResolver=t,this._layoutCompleteRejecter=o})),this._layoutCompletePromise}_rejectLayoutCompletePromise(t){this._layoutCompleteRejecter!==null&&this._layoutCompleteRejecter(t),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&this._pendingLayoutComplete===null&&(this._pendingLayoutComplete=requestAnimationFrame(()=>requestAnimationFrame(()=>this._resolveLayoutCompletePromise())))}_resolveLayoutCompletePromise(){this._layoutCompleteResolver!==null&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(t){var o;if((o=this._layout)!=null&&o.measureChildren){for(const e of t)this._toBeMeasured.set(e.target,e.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}}function dt(r){const t=window.getComputedStyle(r);return{marginTop:A(t.marginTop),marginRight:A(t.marginRight),marginBottom:A(t.marginBottom),marginLeft:A(t.marginLeft)}}function A(r){const t=r?parseFloat(r):NaN;return Number.isNaN(t)?0:t}function B(r){if(r.assignedSlot!==null)return r.assignedSlot;if(r.parentElement!==null)return r.parentElement;const t=r.parentNode;return t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host||null}function pt(r,t=!1){const o=[];let e=t?r:B(r);for(;e!==null;)o.push(e),e=B(e);return o}function vt(r,t=!1){let o=!1;return pt(r,t).filter(e=>{if(o)return!1;const i=getComputedStyle(e);return o=i.position==="fixed",i.overflow!=="visible"})}/**
62
- * @license
63
- * Copyright 2021 Google LLC
64
- * SPDX-License-Identifier: BSD-3-Clause
65
- */const U=r=>r,q=(r,t)=>a.x`${t}: ${JSON.stringify(r,null,2)}`;class mt extends Y.f{constructor(t){if(super(t),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(o,e)=>q(o,e+this._first),this._keyFunction=(o,e)=>U(o,e+this._first),this._items=[],t.type!==S.t.CHILD)throw new Error("The virtualize directive can only be used in child expressions")}render(t){t&&this._setFunctions(t);const o=[];if(this._first>=0&&this._last>=this._first)for(let e=this._first;e<=this._last;e++)o.push(this._items[e]);return j(o,this._keyFunction,this._renderItem)}update(t,[o]){this._setFunctions(o);const e=this._items!==o.items;return this._items=o.items||[],this._virtualizer?this._updateVirtualizerConfig(t,o):this._initialize(t,o),e?a.T:this.render()}async _updateVirtualizerConfig(t,o){if(!await this._virtualizer.updateLayoutConfig(o.layout||{})){const i=t.parentNode;this._makeVirtualizer(i,o)}this._virtualizer.items=this._items}_setFunctions(t){const{renderItem:o,keyFunction:e}=t;o&&(this._renderItem=(i,n)=>o(i,n+this._first)),e&&(this._keyFunction=(i,n)=>e(i,n+this._first))}_makeVirtualizer(t,o){this._virtualizer&&this._virtualizer.disconnected();const{layout:e,scroller:i,items:n}=o;this._virtualizer=new ut({hostElement:t,layout:e,scroller:i}),this._virtualizer.items=n,this._virtualizer.connected()}_initialize(t,o){const e=t.parentNode;e&&e.nodeType===1&&(e.addEventListener("rangeChanged",i=>{this._first=i.first,this._last=i.last,this.setValue(this.render())}),this._makeVirtualizer(e,o))}disconnected(){var t;(t=this._virtualizer)==null||t.disconnected()}reconnected(){var t;(t=this._virtualizer)==null||t.connected()}}const ft=S.e(mt);/**
66
- * @license
67
- * Copyright 2021 Google LLC
68
- * SPDX-License-Identifier: BSD-3-Clause
69
- */class C extends a.r$1{constructor(){super(...arguments),this.items=[],this.renderItem=q,this.keyFunction=U,this.layout={},this.scroller=!1}createRenderRoot(){return this}render(){const{items:t,renderItem:o,keyFunction:e,layout:i,scroller:n}=this;return a.x`${ft({items:t,renderItem:o,keyFunction:e,layout:i,scroller:n})}`}element(t){var o;return(o=this[R])==null?void 0:o.element(t)}get layoutComplete(){var t;return(t=this[R])==null?void 0:t.layoutComplete}scrollToIndex(t,o="start"){var e;(e=this.element(t))==null||e.scrollIntoView({block:o})}}O([a.n({attribute:!1})],C.prototype,"items",void 0);O([a.n()],C.prototype,"renderItem",void 0);O([a.n()],C.prototype,"keyFunction",void 0);O([a.n({attribute:!1})],C.prototype,"layout",void 0);O([a.n({reflect:!0,type:Boolean})],C.prototype,"scroller",void 0);/**
70
- * @license
71
- * Copyright 2021 Google LLC
72
- * SPDX-License-Identifier: BSD-3-Clause
73
- */customElements.define("lit-virtualizer",C);const gt=":host{--options-divider-thickness: var( --divider-thickness-medium, var(--luzmo-border-width) );inline-size:auto;margin-block:var(--luzmo-options-section-divider-margin-block, max(0px, (var(--option-section-divider-height) - var(--options-divider-thickness)) / 2));margin-inline:var(--luzmo-option-label-inline-edge-to-content, var(--option-label-inline-edge-to-content));overflow:visible}:host{display:block;flex-shrink:0}";class N extends D.SizedMixin(a.LuzmoElement,{validSizes:["s","m","l"]}){static get styles(){return[a.r(tt.dividerStyles),a.r(gt)]}firstUpdated(t){super.firstUpdated(t),this.setAttribute("role","separator")}}const bt=":host{--option-top-to-action: var(--luzmo-spacing-1);--option-top-to-checkbox: var(--luzmo-spacing-1);--option-label-line-height: var(--luzmo-line-height);--option-label-line-height-cjk: 1.5;--option-label-to-description-spacing: 1px;--option-focus-indicator-width: var(--luzmo-indicator-width);--option-focus-indicator-color: var(--luzmo-indicator-color);--option-label-to-value-area-min-spacing: var(--luzmo-spacing-3);--option-label-content-color-default: var(--luzmo-font-color);--option-label-content-color-hover: var(--luzmo-font-color-hover);--option-label-content-color-down: var(--luzmo-font-color-down);--option-label-content-color-focus: var(--luzmo-font-color-focus);--option-label-icon-color-default: var(--luzmo-font-color);--option-label-icon-color-hover: var(--luzmo-font-color-hover);--option-label-icon-color-down: var(--luzmo-font-color-down);--option-label-icon-color-focus: var(--luzmo-font-color-focus);--option-highlight-selected-label-background-color: var(--luzmo-primary);--option-highlight-selected-label-content-color: var( --luzmo-primary-inverse-color );--option-highlight-selected-label-content-color-hover: var( --luzmo-primary-inverse-color );--option-highlight-selected-label-content-color-down: var( --luzmo-primary-inverse-color );--option-highlight-selected-label-content-color-focus: var( --luzmo-primary-inverse-color );--option-label-content-color-disabled: var(--luzmo-font-color-disabled);--option-label-icon-color-disabled: var(--luzmo-font-color-disabled);--option-description-line-height: var(--luzmo-line-height);--option-description-line-height-cjk: 1.5;--option-description-color-default: var(--luzmo-font-color);--option-description-color-hover: var(--luzmo-font-color-hover);--option-description-color-down: var(--luzmo-font-color-down);--option-description-color-focus: var(--luzmo-font-color-focus);--option-description-color-disabled: var(--luzmo-disabled-color);--options-section-header-line-height: var(--luzmo-line-height);--options-section-header-line-height-cjk: 1.5;--options-section-header-font-weight: bold;--options-section-header-color: var(--luzmo-font-color-hard);--options-collapsible-icon-color: var(--luzmo-font-color-hard);--options-checkmark-icon-color-default: var(--luzmo-font-color);--options-checkmark-icon-color-hover: var(--luzmo-font-color-hover);--options-checkmark-icon-color-down: var(--luzmo-font-color-down);--options-checkmark-icon-color-focus: var(--luzmo-font-color-focus);--options-checkbox-icon-color-default: var(--luzmo-font-color);--options-checkbox-icon-color-hover: var(--luzmo-font-color-hover);--options-checkbox-icon-color-down: var(--luzmo-font-color-down);--options-checkbox-icon-color-focus: var(--luzmo-font-color-focus);--options-drillin-icon-color-default: var(--luzmo-font-color);--options-drillin-icon-color-hover: var(--luzmo-font-color-hover);--options-drillin-icon-color-down: var(--luzmo-font-color-down);--options-drillin-icon-color-focus: var(--luzmo-font-color-focus);--option-value-color-default: var(--luzmo-font-color);--option-value-color-hover: var(--luzmo-font-color-hover);--option-value-color-down: var(--luzmo-font-color-down);--option-value-color-focus: var(--luzmo-font-color-focus);--option-collapsible-no-icon-suboption-padding-x-start: 28px;--option-background-color-selected: var(--luzmo-background-color);--option-background-color-default: var(--luzmo-background-color);--option-background-color-hover: var(--luzmo-background-color-hover);--option-background-color-down: var(--luzmo-background-color-down);--option-background-color-key-focus: var(--luzmo-background-color-focus)}:host{--option-min-height: var(--luzmo-component-height);--option-icon-container-height: 18px;--options-pending-height: var(--option-min-height);--progress-circle-size: calc( var(--options-pending-height) - var(--option-top-edge-to-text) - var( --option-bottom-edge-to-text ) );--option-icon-height: var(--luzmo-font-size-l);--option-icon-width: var(--luzmo-font-size-l);--option-label-font-size: var(--luzmo-font-size);--option-label-text-to-visual: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-label-text-to-control: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-label-inline-edge-to-content: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--pending-inline-edge-to-content: var(--option-label-inline-edge-to-content);--option-top-edge-to-text: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--option-bottom-edge-to-text: var(--luzmo-spacing-3);--option-description-font-size: var(--luzmo-font-size-xs);--options-section-header-font-size: var(--luzmo-font-size);--options-section-header-min-width: var(--luzmo-component-height);--option-selectable-edge-to-text-not-selected: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-checkmark-size: var(--luzmo-font-size-xs);--option-checkbox-size: var(--luzmo-font-size-xs);--option-top-to-checkmark: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-top-to-checkbox: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) )}:host([size=s]){--option-min-height: var(--luzmo-component-height-s);--option-icon-container-height: 17px;--option-icon-height: var(--luzmo-font-size);--option-icon-width: var(--luzmo-font-size);--option-label-font-size: var(--luzmo-font-size-s);--option-label-text-to-visual: var(--luzmo-spacing-3);--option-label-text-to-control: var(--luzmo-spacing-3);--option-label-inline-edge-to-content: var(--luzmo-spacing-3);--option-top-edge-to-text: calc( var(--luzmo-spacing-1) + var(--luzmo-spacing-2) );--option-bottom-edge-to-text: var(--luzmo-spacing-2);--option-description-font-size: var(--luzmo-font-size-xs);--options-section-header-font-size: var(--luzmo-font-size-s);--options-section-header-min-width: var(--luzmo-component-height-s);--option-selectable-edge-to-text-not-selected: var(--luzmo-spacing-3);--option-checkmark-size: var(--luzmo-font-size-xs);--option-checkbox-size: var(--luzmo-font-size-xs);--option-top-to-checkmark: var(--luzmo-spacing-3);--option-top-to-checkbox: var(--luzmo-spacing-3)}:host([size=l]){--option-min-height: var(--luzmo-component-height-l);--option-icon-container-height: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--option-icon-height: var(--luzmo-font-size-l);--option-icon-width: var(--luzmo-font-size-l);--option-label-font-size: var(--luzmo-font-size-l);--option-label-text-to-visual: var(--luzmo-spacing-4);--option-label-text-to-control: var(--luzmo-spacing-4);--option-label-inline-edge-to-content: var(--luzmo-spacing-4);--option-top-edge-to-text: var(--luzmo-spacing-4);--option-bottom-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-description-font-size: var(--luzmo-font-size-s);--options-section-header-font-size: var(--luzmo-font-size-l);--options-section-header-min-width: var(--luzmo-component-height-l);--option-selectable-edge-to-text-not-selected: var(--luzmo-spacing-4);--option-checkmark-size: var(--luzmo-font-size-s);--option-checkbox-size: var(--luzmo-font-size-s);--option-top-to-checkmark: var(--luzmo-spacing-4);--option-top-to-checkbox: var(--luzmo-spacing-4)}:host([size=xl]){--option-min-height: var(--luzmo-component-height-xl);--option-icon-container-height: 26px;--option-icon-height: var(--luzmo-font-size-xl);--option-icon-width: var(--luzmo-font-size-xl);--option-label-font-size: var(--luzmo-font-size-xl);--option-label-text-to-visual: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-label-text-to-control: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-label-inline-edge-to-content: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-top-edge-to-text: var(--luzmo-spacing-4);--option-bottom-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-description-font-size: var(--luzmo-font-size);--options-section-header-font-size: var(--luzmo-font-size-xl);--options-section-header-min-width: var(--luzmo-component-height-xl);--option-selectable-edge-to-text-not-selected: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-checkmark-size: var(--luzmo-font-size);--option-checkbox-size: var(--luzmo-font-size);--option-top-to-checkmark: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-top-to-checkbox: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) )}@media (forced-colors: active){:host{--highcontrast-option-background-color-default: ButtonFace;--highcontrast-option-color-default: ButtonText;--highcontrast-option-background-color-focus: Highlight;--highcontrast-option-color-focus: HighlightText;--highcontrast-options-checkmark-icon-color-default: Highlight;--highcontrast-options-checkbox-icon-color-default: Highlight;--highcontrast-option-color-disabled: GrayText;--highcontrast-option-focus-indicator-color: Highlight;--highcontrast-option-selected-background-color: Highlight;--highcontrast-option-selected-color: HighlightText}@supports (color: SelectedItem){:host{--highcontrast-option-selected-background-color: SelectedItem;--highcontrast-option-selected-color: SelectedItemText}}}:host{inline-size:auto;inline-size:var(--luzmo-options-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){--option-label-line-height: var( --luzmo-option-label-line-height-cjk, var(--option-label-line-height-cjk) );--option-description-line-height: var( --luzmo-option-description-line-height-cjk, var(--option-description-line-height-cjk) );--options-section-header-line-height: var( --luzmo-options-section-header-line-height-cjk, var(--options-section-header-line-height-cjk) )}luzmo-option{width:100%}#pending{display:flex;flex-shrink:0;align-items:center;height:var(--options-pending-height);padding-inline:var(--pending-inline-edge-to-content)}:host{display:inline-flex;flex-direction:column;width:100%}:host(:focus){outline:none}::slotted(*){flex-shrink:0}";var _t=Object.defineProperty,k=(r,t,o,e)=>{for(var i=void 0,n=r.length-1,s;n>=0;n--)(s=r[n])&&(i=s(t,o,i)||i);return i&&_t(t,o,i),i};const H=25;function zt(r,t){return!!t&&(r===t||r.contains(t))}class _ extends D.SizedMixin(a.LuzmoElement,{noDefaultSize:!0}){constructor(){super(),this.label="",this.variant="highlight",this.selects="single",this.emphasized=!1,this.pending=!1,this.options=[],this.value=[],this.focusedOptionIndex=0,this._selectedOptions=[],this._firstVisibleIndex=0,this.addEventListener("focusin",this.handleFocusin),this.addEventListener("blur",this.handleBlur)}static get styles(){return[a.r(bt)]}get _virtualizeActive(){return this.options.length>H}firstUpdated(t){super.firstUpdated(t),this.hasAttribute("tabindex")||(this.tabIndex=0);const o=[new Promise(e=>requestAnimationFrame(()=>e(!0)))];[...this.children].forEach(e=>{e.localName==="luzmo-option"&&o.push(e.updateComplete)}),this.optionElementsUpdated=Promise.all(o)}willUpdate(t){var e;t.has("selects")&&this.selects==="single"&&((e=this.value)==null?void 0:e.length)>1&&(this.value=this.value.slice(0,1))}updated(t){super.updated(t),t.has("label")&&(this.label||t.get("label")!==void 0)&&(this.label?this.setAttribute("aria-label",this.label):this.removeAttribute("aria-label"))}async getUpdateComplete(){const t=await super.getUpdateComplete();return await this.optionElementsUpdated,t}focus({preventScroll:t}={}){super.focus({preventScroll:t}),this.focusOptionByOffset(0)}_removeFocusedPropertyOnOptions(){requestAnimationFrame(()=>{this.visibleOptionElements.forEach(t=>{t.focused=!1})})}scrollToTop(){this.scrollTop=0}handleFocusin(){this.startListeningToKeyboard()}handleBlur(t){zt(this,t.relatedTarget)||(this.stopListeningToKeyboard(),this._removeFocusedPropertyOnOptions(),this.removeAttribute("aria-activedescendant"))}startListeningToKeyboard(){this.addEventListener("keydown",this.handleKeydown)}stopListeningToKeyboard(){this.removeEventListener("keydown",this.handleKeydown)}handleKeydown(t){var n;if(t.defaultPrevented)return;const o=this.focusedOptionIndex,e=[...this.visibleOptionElements].find(s=>{var l,c,h,m;return((l=s.value)==null?void 0:l.toString())===((m=(h=(c=this.options)==null?void 0:c[o])==null?void 0:h.value)==null?void 0:m.toString())}),{key:i}=t;if(i==="Tab"){this.prepareToCleanUp();return}if(i===" "||i==="Enter"){t.preventDefault(),e&&this.toggleOption(t,(n=this.options)==null?void 0:n[o]);return}if(i==="ArrowDown"||i==="ArrowUp"){t.preventDefault(),this.navigateWithinOptions(t,e);return}}navigateWithinOptions(t,o){const{key:e}=t,i=e==="ArrowDown"?1:-1;t.preventDefault(),t.stopPropagation();const n=this.focusOptionByOffset(i,o,!0);n!==o&&(this._virtualizeActive||n==null||n.scrollIntoView({block:"nearest"}))}focusOptionByOffset(t,o,e){var d;const i=t||1;o&&(o.focused=!1);const n=this.focusedOptionIndex;this.focusedOptionIndex=this.options.length>0?(this.options.length+this.focusedOptionIndex+t)%this.options.length:0;let s=this.options[this.focusedOptionIndex],l=this.options.length;for(;(s!=null&&s.disabled||s!=null&&s.divider)&&l;)l-=1,this.focusedOptionIndex=(this.options.length+this.focusedOptionIndex+i)%this.options.length,s=this.options[this.focusedOptionIndex];const c=n<this.focusedOptionIndex&&t===-1,h=n>this.focusedOptionIndex&&t===1;(c||h)&&(this.focusedOptionIndex=n,this.dispatchEvent(new Event(`luzmo-exceeded-${c?"top":"bottom"}`,{bubbles:!0,composed:!0,cancelable:!0})));let m;return e&&this._virtualizeActive&&(m=[...this.visibleOptionElements].find(p=>{var u,v,f;return((u=p.value)==null?void 0:u.toString())===((f=(v=this.options[this.focusedOptionIndex])==null?void 0:v.value)==null?void 0:f.toString())}),m||(this.focusedOptionIndex=this._firstVisibleIndex)),this._virtualizeActive&&e&&((d=this.virtualizer.element(this.focusedOptionIndex))==null||d.scrollIntoView({behavior:"smooth",block:"nearest"})),m=m??[...this.visibleOptionElements].find(p=>{var u,v,f,y,x;return(p.value===null?null:(u=p.value)==null?void 0:u.toString())===(((v=this.options[this.focusedOptionIndex])==null?void 0:v.value)===null?(f=this.options[this.focusedOptionIndex])==null?void 0:f.value:(x=(y=this.options[this.focusedOptionIndex])==null?void 0:y.value)==null?void 0:x.toString())}),s!=null&&s.disabled||this.setFocusedAndActiveDescendant(m),m}updateSelectedItemIndex(){this.focusedOptionIndex=this._virtualizeActive?this._firstVisibleIndex:0}setSelectedOptionsFromValue(){this._selectedOptions=this.options.filter(t=>{var o;return Array.isArray(this.value)&&((o=this.value)==null?void 0:o.includes((t==null?void 0:t.value)??null))})}visibilityChanged(t){this._firstVisibleIndex=(t==null?void 0:t.first)??0}rangeChange(t){t.stopPropagation(),t.preventDefault(),(t==null?void 0:t.first)!==-1&&(t==null?void 0:t.last)!==-1&&this.dispatchEvent(new CustomEvent("luzmo-scrolled",{bubbles:!0,composed:!0,cancelable:!0,detail:{first:t.first,last:t.last}}))}async toggleOption(t,o){var s;const e=t instanceof KeyboardEvent,i=this.options.findIndex(l=>(l==null?void 0:l.value)===(o==null?void 0:o.value));this.focusedOptionIndex=i,this.visibleOptionElements.forEach(l=>{var c,h;if(e){const m=((l==null?void 0:l.value)===null?null:(c=l.value)==null?void 0:c.toString())===((o==null?void 0:o.value)===null?null:(h=o==null?void 0:o.value)==null?void 0:h.toString());l.focused=m,m&&this.setFocusedAndActiveDescendant(l)}else l.focused=!1});const n=Array.isArray(this.value)&&((s=this.value)==null?void 0:s.includes((o==null?void 0:o.value)??null));this.selects==="single"?(this.value=[o==null?void 0:o.value],this._selectedOptions=[o]):(this.value=n?this.value.filter(l=>l!==(o==null?void 0:o.value)):[...this.value??[],o==null?void 0:o.value],this._selectedOptions=n?this._selectedOptions.filter(l=>l.value!==o.value):[...this._selectedOptions,o]),await this.updateComplete,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0,composed:!0,detail:{value:this.value??[]}})),this.prepareToCleanUp()}handleOptionClick(t,o){this.toggleOption(o,t)}render(){const t=l=>a.x`<luzmo-icon
190
+ ${this.href && this.href.length > 0 ? super.renderAnchor({
191
+ id: "button",
192
+ ariaHidden: true,
193
+ className: "button anchor hidden"
194
+ }) : lit.nothing}
195
+ `;
196
+ }
197
+ handlePointerdown() {
198
+ }
199
+ firstUpdated(changes) {
200
+ super.firstUpdated(changes);
201
+ this.setAttribute("tabindex", "-1");
202
+ this.addEventListener("pointerdown", this.handlePointerdown);
203
+ if (!this.hasAttribute("id")) {
204
+ this.id = `luzmo-option-${randomId.randomID()}`;
205
+ }
206
+ }
207
+ updateAriaSelected() {
208
+ const role = this.getAttribute("role");
209
+ if (role === "option") {
210
+ this.setAttribute("aria-selected", this.selected ? "true" : "false");
211
+ } else if (role === "optioncheckbox") {
212
+ this.setAttribute("aria-checked", this.selected ? "true" : "false");
213
+ }
214
+ }
215
+ setRole(role) {
216
+ this.setAttribute("role", role);
217
+ this.updateAriaSelected();
218
+ }
219
+ updated(changes) {
220
+ super.updated(changes);
221
+ if (changes.has("label") && (this.label || changes.get("label") !== void 0)) {
222
+ this.setAttribute("aria-label", this.label || "");
223
+ }
224
+ if (this.anchorElement) {
225
+ this.anchorElement.addEventListener("focus", this.proxyFocus);
226
+ this.anchorElement.tabIndex = -1;
227
+ }
228
+ if (changes.has("selected")) {
229
+ this.updateAriaSelected();
230
+ }
231
+ }
232
+ connectedCallback() {
233
+ super.connectedCallback();
234
+ this.triggerUpdate();
235
+ }
236
+ async triggerUpdate() {
237
+ if (this.willDispatchUpdate) {
238
+ return;
239
+ }
240
+ this.willDispatchUpdate = true;
241
+ await new Promise((ready) => requestAnimationFrame(ready));
242
+ this.dispatchUpdate();
243
+ }
244
+ dispatchUpdate() {
245
+ if (!this.isConnected) {
246
+ return;
247
+ }
248
+ this.willDispatchUpdate = false;
249
+ }
250
+ }
251
+ __decorateClass$1([
252
+ decorators_js.property({ type: Boolean, reflect: true })
253
+ ], LuzmoOption.prototype, "active", 2);
254
+ __decorateClass$1([
255
+ decorators_js.property({ type: Boolean, reflect: true })
256
+ ], LuzmoOption.prototype, "focused", 2);
257
+ __decorateClass$1([
258
+ decorators_js.property({ type: Boolean, reflect: true })
259
+ ], LuzmoOption.prototype, "selected", 2);
260
+ __decorateClass$1([
261
+ decorators_js.property({ type: Boolean, reflect: true })
262
+ ], LuzmoOption.prototype, "emphasized", 2);
263
+ __decorateClass$1([
264
+ decorators_js.property({ type: String, reflect: true })
265
+ ], LuzmoOption.prototype, "variant", 2);
266
+ __decorateClass$1([
267
+ decorators_js.property({ type: String })
268
+ ], LuzmoOption.prototype, "value", 1);
269
+ __decorateClass$1([
270
+ decorators_js.query("slot:not([name])")
271
+ ], LuzmoOption.prototype, "contentSlot", 2);
272
+ __decorateClass$1([
273
+ decorators_js.query('slot[name="icon"]')
274
+ ], LuzmoOption.prototype, "iconSlot", 2);
275
+ __decorateClass$1([
276
+ decorators_js.property({
277
+ type: Boolean,
278
+ reflect: true,
279
+ attribute: "no-wrap",
280
+ hasChanged() {
281
+ return false;
282
+ }
283
+ })
284
+ ], LuzmoOption.prototype, "noWrap", 2);
285
+ __decorateClass$1([
286
+ decorators_js.query(".anchor")
287
+ ], LuzmoOption.prototype, "anchorElement", 2);
288
+ const optionsDividerStyles = ":host{--options-divider-thickness: var( --divider-thickness-medium, var(--luzmo-border-width) );inline-size:auto;margin-block:var(--luzmo-options-section-divider-margin-block, max(0px, (var(--option-section-divider-height) - var(--options-divider-thickness)) / 2));margin-inline:var(--luzmo-option-label-inline-edge-to-content, var(--option-label-inline-edge-to-content));overflow:visible}:host{display:block;flex-shrink:0}";
289
+ class LuzmoOptionsDivider extends sizedMixin.SizedMixin(base.LuzmoElement, {
290
+ validSizes: ["s", "m", "l"]
291
+ }) {
292
+ static get styles() {
293
+ return [lit.unsafeCSS(divider_module.dividerStyles), lit.unsafeCSS(optionsDividerStyles)];
294
+ }
295
+ firstUpdated(changed) {
296
+ super.firstUpdated(changed);
297
+ this.setAttribute("role", "separator");
298
+ }
299
+ }
300
+ const optionsStyles = ":host{--option-top-to-action: var(--luzmo-spacing-1);--option-top-to-checkbox: var(--luzmo-spacing-1);--option-label-line-height: var(--luzmo-line-height);--option-label-line-height-cjk: 1.5;--option-label-to-description-spacing: 1px;--option-focus-indicator-width: var(--luzmo-indicator-width);--option-focus-indicator-color: var(--luzmo-indicator-color);--option-label-to-value-area-min-spacing: var(--luzmo-spacing-3);--option-label-content-color-default: var(--luzmo-font-color);--option-label-content-color-hover: var(--luzmo-font-color-hover);--option-label-content-color-down: var(--luzmo-font-color-down);--option-label-content-color-focus: var(--luzmo-font-color-focus);--option-label-icon-color-default: var(--luzmo-font-color);--option-label-icon-color-hover: var(--luzmo-font-color-hover);--option-label-icon-color-down: var(--luzmo-font-color-down);--option-label-icon-color-focus: var(--luzmo-font-color-focus);--option-highlight-selected-label-background-color: var(--luzmo-primary);--option-highlight-selected-label-content-color: var( --luzmo-primary-inverse-color );--option-highlight-selected-label-content-color-hover: var( --luzmo-primary-inverse-color );--option-highlight-selected-label-content-color-down: var( --luzmo-primary-inverse-color );--option-highlight-selected-label-content-color-focus: var( --luzmo-primary-inverse-color );--option-label-content-color-disabled: var(--luzmo-font-color-disabled);--option-label-icon-color-disabled: var(--luzmo-font-color-disabled);--option-description-line-height: var(--luzmo-line-height);--option-description-line-height-cjk: 1.5;--option-description-color-default: var(--luzmo-font-color);--option-description-color-hover: var(--luzmo-font-color-hover);--option-description-color-down: var(--luzmo-font-color-down);--option-description-color-focus: var(--luzmo-font-color-focus);--option-description-color-disabled: var(--luzmo-disabled-color);--options-section-header-line-height: var(--luzmo-line-height);--options-section-header-line-height-cjk: 1.5;--options-section-header-font-weight: bold;--options-section-header-color: var(--luzmo-font-color-hard);--options-collapsible-icon-color: var(--luzmo-font-color-hard);--options-checkmark-icon-color-default: var(--luzmo-font-color);--options-checkmark-icon-color-hover: var(--luzmo-font-color-hover);--options-checkmark-icon-color-down: var(--luzmo-font-color-down);--options-checkmark-icon-color-focus: var(--luzmo-font-color-focus);--options-checkbox-icon-color-default: var(--luzmo-font-color);--options-checkbox-icon-color-hover: var(--luzmo-font-color-hover);--options-checkbox-icon-color-down: var(--luzmo-font-color-down);--options-checkbox-icon-color-focus: var(--luzmo-font-color-focus);--options-drillin-icon-color-default: var(--luzmo-font-color);--options-drillin-icon-color-hover: var(--luzmo-font-color-hover);--options-drillin-icon-color-down: var(--luzmo-font-color-down);--options-drillin-icon-color-focus: var(--luzmo-font-color-focus);--option-value-color-default: var(--luzmo-font-color);--option-value-color-hover: var(--luzmo-font-color-hover);--option-value-color-down: var(--luzmo-font-color-down);--option-value-color-focus: var(--luzmo-font-color-focus);--option-collapsible-no-icon-suboption-padding-x-start: 28px;--option-background-color-selected: var(--luzmo-background-color);--option-background-color-default: var(--luzmo-background-color);--option-background-color-hover: var(--luzmo-background-color-hover);--option-background-color-down: var(--luzmo-background-color-down);--option-background-color-key-focus: var(--luzmo-background-color-focus)}:host{--option-min-height: var(--luzmo-component-height);--option-icon-container-height: 18px;--options-pending-height: var(--option-min-height);--progress-circle-size: calc( var(--options-pending-height) - var(--option-top-edge-to-text) - var( --option-bottom-edge-to-text ) );--option-icon-height: var(--luzmo-font-size-l);--option-icon-width: var(--luzmo-font-size-l);--option-label-font-size: var(--luzmo-font-size);--option-label-text-to-visual: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-label-text-to-control: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-label-inline-edge-to-content: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--pending-inline-edge-to-content: var(--option-label-inline-edge-to-content);--option-top-edge-to-text: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--option-bottom-edge-to-text: var(--luzmo-spacing-3);--option-description-font-size: var(--luzmo-font-size-xs);--options-section-header-font-size: var(--luzmo-font-size);--options-section-header-min-width: var(--luzmo-component-height);--option-selectable-edge-to-text-not-selected: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-checkmark-size: var(--luzmo-font-size-xs);--option-checkbox-size: var(--luzmo-font-size-xs);--option-top-to-checkmark: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-top-to-checkbox: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) )}:host([size=s]){--option-min-height: var(--luzmo-component-height-s);--option-icon-container-height: 17px;--option-icon-height: var(--luzmo-font-size);--option-icon-width: var(--luzmo-font-size);--option-label-font-size: var(--luzmo-font-size-s);--option-label-text-to-visual: var(--luzmo-spacing-3);--option-label-text-to-control: var(--luzmo-spacing-3);--option-label-inline-edge-to-content: var(--luzmo-spacing-3);--option-top-edge-to-text: calc( var(--luzmo-spacing-1) + var(--luzmo-spacing-2) );--option-bottom-edge-to-text: var(--luzmo-spacing-2);--option-description-font-size: var(--luzmo-font-size-xs);--options-section-header-font-size: var(--luzmo-font-size-s);--options-section-header-min-width: var(--luzmo-component-height-s);--option-selectable-edge-to-text-not-selected: var(--luzmo-spacing-3);--option-checkmark-size: var(--luzmo-font-size-xs);--option-checkbox-size: var(--luzmo-font-size-xs);--option-top-to-checkmark: var(--luzmo-spacing-3);--option-top-to-checkbox: var(--luzmo-spacing-3)}:host([size=l]){--option-min-height: var(--luzmo-component-height-l);--option-icon-container-height: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--option-icon-height: var(--luzmo-font-size-l);--option-icon-width: var(--luzmo-font-size-l);--option-label-font-size: var(--luzmo-font-size-l);--option-label-text-to-visual: var(--luzmo-spacing-4);--option-label-text-to-control: var(--luzmo-spacing-4);--option-label-inline-edge-to-content: var(--luzmo-spacing-4);--option-top-edge-to-text: var(--luzmo-spacing-4);--option-bottom-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-description-font-size: var(--luzmo-font-size-s);--options-section-header-font-size: var(--luzmo-font-size-l);--options-section-header-min-width: var(--luzmo-component-height-l);--option-selectable-edge-to-text-not-selected: var(--luzmo-spacing-4);--option-checkmark-size: var(--luzmo-font-size-s);--option-checkbox-size: var(--luzmo-font-size-s);--option-top-to-checkmark: var(--luzmo-spacing-4);--option-top-to-checkbox: var(--luzmo-spacing-4)}:host([size=xl]){--option-min-height: var(--luzmo-component-height-xl);--option-icon-container-height: 26px;--option-icon-height: var(--luzmo-font-size-xl);--option-icon-width: var(--luzmo-font-size-xl);--option-label-font-size: var(--luzmo-font-size-xl);--option-label-text-to-visual: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-label-text-to-control: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-label-inline-edge-to-content: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-top-edge-to-text: var(--luzmo-spacing-4);--option-bottom-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--option-description-font-size: var(--luzmo-font-size);--options-section-header-font-size: var(--luzmo-font-size-xl);--options-section-header-min-width: var(--luzmo-component-height-xl);--option-selectable-edge-to-text-not-selected: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-checkmark-size: var(--luzmo-font-size);--option-checkbox-size: var(--luzmo-font-size);--option-top-to-checkmark: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--option-top-to-checkbox: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) )}@media (forced-colors: active){:host{--highcontrast-option-background-color-default: ButtonFace;--highcontrast-option-color-default: ButtonText;--highcontrast-option-background-color-focus: Highlight;--highcontrast-option-color-focus: HighlightText;--highcontrast-options-checkmark-icon-color-default: Highlight;--highcontrast-options-checkbox-icon-color-default: Highlight;--highcontrast-option-color-disabled: GrayText;--highcontrast-option-focus-indicator-color: Highlight;--highcontrast-option-selected-background-color: Highlight;--highcontrast-option-selected-color: HighlightText}@supports (color: SelectedItem){:host{--highcontrast-option-selected-background-color: SelectedItem;--highcontrast-option-selected-color: SelectedItemText}}}:host{inline-size:auto;inline-size:var(--luzmo-options-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){--option-label-line-height: var( --luzmo-option-label-line-height-cjk, var(--option-label-line-height-cjk) );--option-description-line-height: var( --luzmo-option-description-line-height-cjk, var(--option-description-line-height-cjk) );--options-section-header-line-height: var( --luzmo-options-section-header-line-height-cjk, var(--options-section-header-line-height-cjk) )}luzmo-option{width:100%}#pending{display:flex;flex-shrink:0;align-items:center;height:var(--options-pending-height);padding-inline:var(--pending-inline-edge-to-content)}:host{display:inline-flex;flex-direction:column;width:100%}:host(:focus){outline:none}::slotted(*){flex-shrink:0}";
301
+ var __defProp = Object.defineProperty;
302
+ var __decorateClass = (decorators, target, key, kind) => {
303
+ var result = void 0;
304
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
305
+ if (decorator = decorators[i])
306
+ result = decorator(target, key, result) || result;
307
+ if (result) __defProp(target, key, result);
308
+ return result;
309
+ };
310
+ const VIRTUALIZE_AS_OF_NUM_ITEMS = 25;
311
+ function elementIsOrContains(el, isOrContains) {
312
+ return !!isOrContains && (el === isOrContains || el.contains(isOrContains));
313
+ }
314
+ class LuzmoOptions extends sizedMixin.SizedMixin(base.LuzmoElement, {
315
+ noDefaultSize: true
316
+ }) {
317
+ constructor() {
318
+ super();
319
+ this.label = "";
320
+ this.variant = "highlight";
321
+ this.selects = "single";
322
+ this.emphasized = false;
323
+ this.pending = false;
324
+ this.options = [];
325
+ this.value = [];
326
+ this.focusedOptionIndex = 0;
327
+ this._selectedOptions = [];
328
+ this._firstVisibleIndex = 0;
329
+ this.addEventListener("focusin", this.handleFocusin);
330
+ this.addEventListener("blur", this.handleBlur);
331
+ }
332
+ /**
333
+ * @internal
334
+ */
335
+ static get styles() {
336
+ return [lit.unsafeCSS(optionsStyles)];
337
+ }
338
+ /**
339
+ * @internal
340
+ */
341
+ get _virtualizeActive() {
342
+ return this.options.length > VIRTUALIZE_AS_OF_NUM_ITEMS;
343
+ }
344
+ firstUpdated(changed) {
345
+ super.firstUpdated(changed);
346
+ if (!this.hasAttribute("tabindex")) {
347
+ this.tabIndex = 0;
348
+ }
349
+ const updates = [
350
+ new Promise((res) => requestAnimationFrame(() => res(true)))
351
+ ];
352
+ [...this.children].forEach((item) => {
353
+ if (item.localName === "luzmo-option") {
354
+ updates.push(item.updateComplete);
355
+ }
356
+ });
357
+ this.optionElementsUpdated = Promise.all(updates);
358
+ }
359
+ willUpdate(changes) {
360
+ var _a;
361
+ const hasChangedSelects = changes.has("selects");
362
+ if (hasChangedSelects && this.selects === "single" && ((_a = this.value) == null ? void 0 : _a.length) > 1) {
363
+ this.value = this.value.slice(0, 1);
364
+ }
365
+ }
366
+ updated(changes) {
367
+ super.updated(changes);
368
+ const changedLabel = changes.has("label");
369
+ if (changedLabel && (this.label || changes.get("label") !== void 0)) {
370
+ if (this.label) {
371
+ this.setAttribute("aria-label", this.label);
372
+ } else {
373
+ this.removeAttribute("aria-label");
374
+ }
375
+ }
376
+ }
377
+ async getUpdateComplete() {
378
+ const complete = await super.getUpdateComplete();
379
+ await this.optionElementsUpdated;
380
+ return complete;
381
+ }
382
+ focus({ preventScroll } = {}) {
383
+ super.focus({ preventScroll });
384
+ this.focusOptionByOffset(0);
385
+ }
386
+ _removeFocusedPropertyOnOptions() {
387
+ requestAnimationFrame(() => {
388
+ this.visibleOptionElements.forEach((item) => {
389
+ item.focused = false;
390
+ });
391
+ });
392
+ }
393
+ scrollToTop() {
394
+ this.scrollTop = 0;
395
+ }
396
+ handleFocusin() {
397
+ this.startListeningToKeyboard();
398
+ }
399
+ // when the focus is lost in the options menu, we need to remove the focus from the item, stop listening to keyboard events and clean up the aria-activedescendant
400
+ handleBlur(event) {
401
+ if (elementIsOrContains(this, event.relatedTarget)) {
402
+ return;
403
+ }
404
+ this.stopListeningToKeyboard();
405
+ this._removeFocusedPropertyOnOptions();
406
+ this.removeAttribute("aria-activedescendant");
407
+ }
408
+ startListeningToKeyboard() {
409
+ this.addEventListener("keydown", this.handleKeydown);
410
+ }
411
+ stopListeningToKeyboard() {
412
+ this.removeEventListener("keydown", this.handleKeydown);
413
+ }
414
+ handleKeydown(event) {
415
+ var _a;
416
+ if (event.defaultPrevented) {
417
+ return;
418
+ }
419
+ const lastFocusedIndex = this.focusedOptionIndex;
420
+ const lastFocusedItem = [...this.visibleOptionElements].find(
421
+ (item) => {
422
+ var _a2, _b, _c, _d;
423
+ return ((_a2 = item.value) == null ? void 0 : _a2.toString()) === ((_d = (_c = (_b = this.options) == null ? void 0 : _b[lastFocusedIndex]) == null ? void 0 : _c.value) == null ? void 0 : _d.toString());
424
+ }
425
+ );
426
+ const { key } = event;
427
+ if (key === "Tab") {
428
+ this.prepareToCleanUp();
429
+ return;
430
+ }
431
+ if (key === " " || key === "Enter") {
432
+ event.preventDefault();
433
+ if (lastFocusedItem) {
434
+ this.toggleOption(event, (_a = this.options) == null ? void 0 : _a[lastFocusedIndex]);
435
+ }
436
+ return;
437
+ }
438
+ if (key === "ArrowDown" || key === "ArrowUp") {
439
+ event.preventDefault();
440
+ this.navigateWithinOptions(event, lastFocusedItem);
441
+ return;
442
+ }
443
+ }
444
+ navigateWithinOptions(event, optionElement) {
445
+ const { key } = event;
446
+ const direction = key === "ArrowDown" ? 1 : -1;
447
+ event.preventDefault();
448
+ event.stopPropagation();
449
+ const itemToFocus = this.focusOptionByOffset(
450
+ direction,
451
+ optionElement,
452
+ true
453
+ );
454
+ if (itemToFocus === optionElement) {
455
+ return;
456
+ }
457
+ if (!this._virtualizeActive) {
458
+ itemToFocus == null ? void 0 : itemToFocus.scrollIntoView({ block: "nearest" });
459
+ }
460
+ }
461
+ focusOptionByOffset(offset, optionElement, scrollIntoView) {
462
+ var _a;
463
+ const step = offset || 1;
464
+ if (optionElement) {
465
+ optionElement.focused = false;
466
+ }
467
+ const previousFocusedOptionIndex = this.focusedOptionIndex;
468
+ this.focusedOptionIndex = this.options.length > 0 ? (this.options.length + this.focusedOptionIndex + offset) % this.options.length : 0;
469
+ let optionToFocus = this.options[this.focusedOptionIndex];
470
+ let availableItems = this.options.length;
471
+ while (((optionToFocus == null ? void 0 : optionToFocus.disabled) || (optionToFocus == null ? void 0 : optionToFocus.divider)) && availableItems) {
472
+ availableItems -= 1;
473
+ this.focusedOptionIndex = (this.options.length + this.focusedOptionIndex + step) % this.options.length;
474
+ optionToFocus = this.options[this.focusedOptionIndex];
475
+ }
476
+ const reachedStart = previousFocusedOptionIndex < this.focusedOptionIndex && offset === -1;
477
+ const reachedEnd = previousFocusedOptionIndex > this.focusedOptionIndex && offset === 1;
478
+ if (reachedStart || reachedEnd) {
479
+ this.focusedOptionIndex = previousFocusedOptionIndex;
480
+ this.dispatchEvent(
481
+ new Event(`luzmo-exceeded-${reachedStart ? "top" : "bottom"}`, {
482
+ bubbles: true,
483
+ composed: true,
484
+ cancelable: true
485
+ })
486
+ );
487
+ }
488
+ let itemToFocus;
489
+ if (scrollIntoView && this._virtualizeActive) {
490
+ itemToFocus = [...this.visibleOptionElements].find(
491
+ (item) => {
492
+ var _a2, _b, _c;
493
+ return ((_a2 = item.value) == null ? void 0 : _a2.toString()) === ((_c = (_b = this.options[this.focusedOptionIndex]) == null ? void 0 : _b.value) == null ? void 0 : _c.toString());
494
+ }
495
+ );
496
+ if (!itemToFocus) {
497
+ this.focusedOptionIndex = this._firstVisibleIndex;
498
+ }
499
+ }
500
+ if (this._virtualizeActive && scrollIntoView) {
501
+ (_a = this.virtualizer.element(this.focusedOptionIndex)) == null ? void 0 : _a.scrollIntoView({
502
+ behavior: "smooth",
503
+ block: "nearest"
504
+ });
505
+ }
506
+ itemToFocus = itemToFocus ?? [...this.visibleOptionElements].find(
507
+ (item) => {
508
+ var _a2, _b, _c, _d, _e;
509
+ return (item.value === null ? null : (_a2 = item.value) == null ? void 0 : _a2.toString()) === (((_b = this.options[this.focusedOptionIndex]) == null ? void 0 : _b.value) === null ? (_c = this.options[this.focusedOptionIndex]) == null ? void 0 : _c.value : (_e = (_d = this.options[this.focusedOptionIndex]) == null ? void 0 : _d.value) == null ? void 0 : _e.toString());
510
+ }
511
+ );
512
+ if (!(optionToFocus == null ? void 0 : optionToFocus.disabled)) {
513
+ this.setFocusedAndActiveDescendant(itemToFocus);
514
+ }
515
+ return itemToFocus;
516
+ }
517
+ updateSelectedItemIndex() {
518
+ this.focusedOptionIndex = this._virtualizeActive ? this._firstVisibleIndex : 0;
519
+ }
520
+ setSelectedOptionsFromValue() {
521
+ this._selectedOptions = this.options.filter(
522
+ (option) => {
523
+ var _a;
524
+ return Array.isArray(this.value) && ((_a = this.value) == null ? void 0 : _a.includes((option == null ? void 0 : option.value) ?? null));
525
+ }
526
+ );
527
+ }
528
+ visibilityChanged(event) {
529
+ this._firstVisibleIndex = (event == null ? void 0 : event.first) ?? 0;
530
+ }
531
+ rangeChange(event) {
532
+ event.stopPropagation();
533
+ event.preventDefault();
534
+ if ((event == null ? void 0 : event.first) !== -1 && (event == null ? void 0 : event.last) !== -1) {
535
+ this.dispatchEvent(
536
+ new CustomEvent("luzmo-scrolled", {
537
+ bubbles: true,
538
+ composed: true,
539
+ cancelable: true,
540
+ detail: {
541
+ first: event.first,
542
+ last: event.last
543
+ }
544
+ })
545
+ );
546
+ }
547
+ }
548
+ async toggleOption(event, choice) {
549
+ var _a;
550
+ const keyboardEvent = event instanceof KeyboardEvent;
551
+ const index = this.options.findIndex(
552
+ (option) => (option == null ? void 0 : option.value) === (choice == null ? void 0 : choice.value)
553
+ );
554
+ this.focusedOptionIndex = index;
555
+ this.visibleOptionElements.forEach((item) => {
556
+ var _a2, _b;
557
+ if (keyboardEvent) {
558
+ const focused = ((item == null ? void 0 : item.value) === null ? null : (_a2 = item.value) == null ? void 0 : _a2.toString()) === ((choice == null ? void 0 : choice.value) === null ? null : (_b = choice == null ? void 0 : choice.value) == null ? void 0 : _b.toString());
559
+ item.focused = focused;
560
+ if (focused) {
561
+ this.setFocusedAndActiveDescendant(item);
562
+ }
563
+ } else {
564
+ item.focused = false;
565
+ }
566
+ });
567
+ const hasOption = Array.isArray(this.value) && ((_a = this.value) == null ? void 0 : _a.includes((choice == null ? void 0 : choice.value) ?? null));
568
+ if (this.selects === "single") {
569
+ this.value = [choice == null ? void 0 : choice.value];
570
+ this._selectedOptions = [choice];
571
+ } else {
572
+ this.value = hasOption ? this.value.filter((value) => value !== (choice == null ? void 0 : choice.value)) : [...this.value ?? [], choice == null ? void 0 : choice.value];
573
+ this._selectedOptions = hasOption ? this._selectedOptions.filter(
574
+ (option) => option.value !== choice.value
575
+ ) : [...this._selectedOptions, choice];
576
+ }
577
+ await this.updateComplete;
578
+ this.dispatchEvent(
579
+ new CustomEvent("change", {
580
+ bubbles: true,
581
+ cancelable: true,
582
+ composed: true,
583
+ detail: {
584
+ value: this.value ?? []
585
+ }
586
+ })
587
+ );
588
+ this.prepareToCleanUp();
589
+ }
590
+ handleOptionClick(option, event) {
591
+ this.toggleOption(event, option);
592
+ }
593
+ render() {
594
+ const renderIcon = (icon) => {
595
+ return lit.html`<luzmo-icon
74
596
  slot="icon"
75
- .icon=${l}
597
+ .icon=${icon}
76
598
  .size=${this.size}
77
- ></luzmo-icon>`,o=l=>a.x`<span slot="description">${l}</span>`,e=l=>a.x`<luzmo-icon
599
+ ></luzmo-icon>`;
600
+ };
601
+ const renderDescription = (description) => {
602
+ return lit.html`<span slot="description">${description}</span>`;
603
+ };
604
+ const renderImg = (imgSrc) => {
605
+ return lit.html`<luzmo-icon
78
606
  slot="icon"
79
- .src=${l}
607
+ .src=${imgSrc}
80
608
  .size=${this.size}
81
- ></luzmo-icon>`,i=l=>{var f;const c=l==null?void 0:l.value,h=l==null?void 0:l.label,m=l==null?void 0:l.description,d=l==null?void 0:l.icon,p=l==null?void 0:l.imgSrc,u=l==null?void 0:l.divider,v=typeof l=="string"||l==null?void 0:l.disabled;return u?a.x`<luzmo-options-divider></luzmo-options-divider>`:a.x`<luzmo-option
82
- .value=${c}
609
+ ></luzmo-icon>`;
610
+ };
611
+ const renderOption = (option) => {
612
+ var _a;
613
+ const value = option == null ? void 0 : option.value;
614
+ const label = option == null ? void 0 : option.label;
615
+ const description = option == null ? void 0 : option.description;
616
+ const icon = option == null ? void 0 : option.icon;
617
+ const imgSrc = option == null ? void 0 : option.imgSrc;
618
+ const divider = option == null ? void 0 : option.divider;
619
+ const disabled = typeof option === "string" ? void 0 : option == null ? void 0 : option.disabled;
620
+ return divider ? lit.html`<luzmo-options-divider></luzmo-options-divider>` : lit.html`<luzmo-option
621
+ .value=${value}
83
622
  .size=${this.size}
84
623
  .variant=${this.variant}
85
624
  ?emphasized=${this.emphasized}
86
625
  ?no-wrap=${this.noWrap}
87
- ?disabled=${v}
88
- .selected=${Array.isArray(this.value)?(f=this.value)==null?void 0:f.includes(c):!1}
89
- .role=${this.selects==="single"?"option":"optioncheckbox"}
90
- @click=${this.handleOptionClick.bind(this,l)}
626
+ ?disabled=${disabled}
627
+ .selected=${Array.isArray(this.value) ? (_a = this.value) == null ? void 0 : _a.includes(value) : false}
628
+ .role=${this.selects === "single" ? "option" : "optioncheckbox"}
629
+ @click=${this.handleOptionClick.bind(this, option)}
91
630
  >
92
- ${d?t(d):p?e(p):a.E}
93
- ${h} ${m?o(m):a.E}
94
- </luzmo-option>`},n=this._virtualizeActive?a.x`<lit-virtualizer
631
+ ${icon ? renderIcon(icon) : imgSrc ? renderImg(imgSrc) : lit.nothing}
632
+ ${label} ${description ? renderDescription(description) : lit.nothing}
633
+ </luzmo-option>`;
634
+ };
635
+ const renderedOptions = this._virtualizeActive ? lit.html`<lit-virtualizer
95
636
  .items=${this.options}
96
- .renderItem=${i}
637
+ .renderItem=${renderOption}
97
638
  @rangeChanged=${this.rangeChange}
98
639
  @visibilityChanged=${this.visibilityChanged}
99
- ></lit-virtualizer>`:j(this.options,i),s=this.pending?a.x`<div id="pending">
640
+ ></lit-virtualizer>` : repeat_js.repeat(this.options, renderOption);
641
+ const pendingOption = this.pending ? lit.html`<div id="pending">
100
642
  <luzmo-progress-circle indeterminate></luzmo-progress-circle>
101
- </div>`:a.E;return a.x`${n} ${s}`}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listbox"),this.updateComplete.then(()=>this.updateItemFocus())}disconnectedCallback(){super.disconnectedCallback()}prepareToCleanUp(){document.addEventListener("focusout",()=>{requestAnimationFrame(()=>{this.updateSelectedItemIndex()})},{once:!0})}updateItemFocus(){if(this.visibleOptionElements.length===0)return;const t=this.focusedOptionIndex,o=[...this.visibleOptionElements].find(e=>{var i,n,s,l,c,h;return(e.value===null?null:(i=e.value)==null?void 0:i.toString())===(((s=(n=this.options)==null?void 0:n[t])==null?void 0:s.value)===null?null:(h=(c=(l=this.options)==null?void 0:l[t])==null?void 0:c.value)==null?void 0:h.toString())});this.setFocusedAndActiveDescendant(o)}setFocusedAndActiveDescendant(t){var e,i;if(!t)return;const o=this.hasVisibleFocusInTree()||!!((e=this.visibleOptionElements)!=null&&e.some&&((i=this.visibleOptionElements)!=null&&i.some(n=>n.hasVisibleFocusInTree())));t.focused=o,o&&this.setAttribute("aria-activedescendant",t.id)}}k([a.n({type:String,reflect:!0})],_.prototype,"label");k([a.n({type:String,reflect:!0})],_.prototype,"variant");k([a.n({type:String,reflect:!0})],_.prototype,"selects");k([a.n({type:Boolean,reflect:!0})],_.prototype,"emphasized");k([a.n({type:Boolean,reflect:!0})],_.prototype,"pending");k([a.n({type:Array})],_.prototype,"options");k([a.n({type:Boolean,reflect:!0,attribute:"no-wrap"})],_.prototype,"noWrap");k([a.n({type:Array})],_.prototype,"value");k([L.e("lit-virtualizer")],_.prototype,"virtualizer");k([et("luzmo-option")],_.prototype,"visibleOptionElements");customElements.get("luzmo-options")||customElements.define("luzmo-options",_);customElements.get("luzmo-options-divider")||customElements.define("luzmo-options-divider",N);customElements.get("luzmo-option")||customElements.define("luzmo-option",b);exports.LuzmoOption=b;exports.LuzmoOptions=_;exports.LuzmoOptionsDivider=N;exports.VIRTUALIZE_AS_OF_NUM_ITEMS=H;
643
+ </div>` : lit.nothing;
644
+ return lit.html`${renderedOptions} ${pendingOption}`;
645
+ }
646
+ connectedCallback() {
647
+ super.connectedCallback();
648
+ this.setAttribute("role", "listbox");
649
+ this.updateComplete.then(() => this.updateItemFocus());
650
+ }
651
+ disconnectedCallback() {
652
+ super.disconnectedCallback();
653
+ }
654
+ prepareToCleanUp() {
655
+ document.addEventListener(
656
+ "focusout",
657
+ () => {
658
+ requestAnimationFrame(() => {
659
+ this.updateSelectedItemIndex();
660
+ });
661
+ },
662
+ { once: true }
663
+ );
664
+ }
665
+ updateItemFocus() {
666
+ if (this.visibleOptionElements.length === 0) {
667
+ return;
668
+ }
669
+ const lastFocusedIndex = this.focusedOptionIndex;
670
+ const lastFocusedItem = [...this.visibleOptionElements].find(
671
+ (item) => {
672
+ var _a, _b, _c, _d, _e, _f;
673
+ return (item.value === null ? null : (_a = item.value) == null ? void 0 : _a.toString()) === (((_c = (_b = this.options) == null ? void 0 : _b[lastFocusedIndex]) == null ? void 0 : _c.value) === null ? null : (_f = (_e = (_d = this.options) == null ? void 0 : _d[lastFocusedIndex]) == null ? void 0 : _e.value) == null ? void 0 : _f.toString());
674
+ }
675
+ );
676
+ this.setFocusedAndActiveDescendant(lastFocusedItem);
677
+ }
678
+ setFocusedAndActiveDescendant(item) {
679
+ var _a, _b;
680
+ if (!item) {
681
+ return;
682
+ }
683
+ const focused = this.hasVisibleFocusInTree() || !!(((_a = this.visibleOptionElements) == null ? void 0 : _a.some) && ((_b = this.visibleOptionElements) == null ? void 0 : _b.some(
684
+ (child) => child.hasVisibleFocusInTree()
685
+ )));
686
+ item.focused = focused;
687
+ if (focused) {
688
+ this.setAttribute("aria-activedescendant", item.id);
689
+ }
690
+ }
691
+ }
692
+ __decorateClass([
693
+ decorators_js.property({ type: String, reflect: true })
694
+ ], LuzmoOptions.prototype, "label");
695
+ __decorateClass([
696
+ decorators_js.property({ type: String, reflect: true })
697
+ ], LuzmoOptions.prototype, "variant");
698
+ __decorateClass([
699
+ decorators_js.property({ type: String, reflect: true })
700
+ ], LuzmoOptions.prototype, "selects");
701
+ __decorateClass([
702
+ decorators_js.property({ type: Boolean, reflect: true })
703
+ ], LuzmoOptions.prototype, "emphasized");
704
+ __decorateClass([
705
+ decorators_js.property({ type: Boolean, reflect: true })
706
+ ], LuzmoOptions.prototype, "pending");
707
+ __decorateClass([
708
+ decorators_js.property({ type: Array })
709
+ ], LuzmoOptions.prototype, "options");
710
+ __decorateClass([
711
+ decorators_js.property({ type: Boolean, reflect: true, attribute: "no-wrap" })
712
+ ], LuzmoOptions.prototype, "noWrap");
713
+ __decorateClass([
714
+ decorators_js.property({ type: Array })
715
+ ], LuzmoOptions.prototype, "value");
716
+ __decorateClass([
717
+ decorators_js.query("lit-virtualizer")
718
+ ], LuzmoOptions.prototype, "virtualizer");
719
+ __decorateClass([
720
+ decorators_js.queryAll("luzmo-option")
721
+ ], LuzmoOptions.prototype, "visibleOptionElements");
722
+ if (!customElements.get("luzmo-options")) {
723
+ customElements.define("luzmo-options", LuzmoOptions);
724
+ }
725
+ if (!customElements.get("luzmo-options-divider")) {
726
+ customElements.define("luzmo-options-divider", LuzmoOptionsDivider);
727
+ }
728
+ if (!customElements.get("luzmo-option")) {
729
+ customElements.define("luzmo-option", LuzmoOption);
730
+ }
731
+ exports.LuzmoOption = LuzmoOption;
732
+ exports.LuzmoOptions = LuzmoOptions;
733
+ exports.LuzmoOptionsDivider = LuzmoOptionsDivider;
734
+ exports.VIRTUALIZE_AS_OF_NUM_ITEMS = VIRTUALIZE_AS_OF_NUM_ITEMS;