@luzmo/lucero 0.0.26 → 0.0.28

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 (184) hide show
  1. package/components/accordion/index.cjs +4 -4
  2. package/components/accordion/index.js +4 -4
  3. package/components/action-bar/index.cjs +1 -1
  4. package/components/action-bar/index.js +6 -6
  5. package/components/action-button/index.cjs +2 -2
  6. package/components/action-button/index.js +5 -5
  7. package/components/action-group/index.cjs +1 -1
  8. package/components/action-group/index.js +1 -1
  9. package/components/{action-group-DngGfcr_.js → action-group-DBImibFn.js} +2 -2
  10. package/components/{action-group-hy1HZxOi.cjs → action-group-DJGMcRHb.cjs} +1 -1
  11. package/components/action-menu/index.cjs +2 -2
  12. package/components/action-menu/index.js +6 -6
  13. package/components/{async-directive-B0s_zDWg.cjs → async-directive-BX1T1e1_.cjs} +1 -1
  14. package/components/{async-directive-C0KryStG.js → async-directive-BfcqVjDp.js} +1 -1
  15. package/components/avatar/index.cjs +3 -3
  16. package/components/avatar/index.js +10 -10
  17. package/components/base-CBCg3yyw.cjs +40 -0
  18. package/components/{base-DroC2Znx.js → base-WsynuqaS.js} +54 -51
  19. package/components/button/index.cjs +1 -1
  20. package/components/button/index.js +6 -6
  21. package/components/{button-base-BRZtaOk8.js → button-base-DbkDzb71.js} +4 -4
  22. package/components/{button-base-CJc7kjJK.cjs → button-base-XgPLmwP-.cjs} +1 -1
  23. package/components/button-group/index.cjs +1 -1
  24. package/components/button-group/index.js +2 -2
  25. package/components/calendar/index.cjs +1 -1
  26. package/components/calendar/index.js +1 -1
  27. package/components/checkbox/index.cjs +1 -1
  28. package/components/checkbox/index.js +4 -4
  29. package/components/{checkbox-mixin-CcPwhZst.cjs → checkbox-mixin-BDN0dBtS.cjs} +1 -1
  30. package/components/{checkbox-mixin-DbcpHFBw.js → checkbox-mixin-Do7EgtpQ.js} +2 -2
  31. package/components/{class-map-DuvNig0r.cjs → class-map-Di1D_rCm.cjs} +1 -1
  32. package/components/{class-map-CjcRhurN.js → class-map-NbVXqBU0.js} +1 -1
  33. package/components/{clear-button-Nwq4REOv.js → clear-button-DoeRUWQ3.js} +16 -16
  34. package/components/clear-button-Qi1pMA5S.cjs +18 -0
  35. package/components/close-button-BFMBEw3q.cjs +18 -0
  36. package/components/{close-button-9l1TxW7Y.cjs → close-button-BWXdHSx3.js} +34 -1
  37. package/components/color-area/index.cjs +1 -1
  38. package/components/color-area/index.js +3 -3
  39. package/components/color-field/index.cjs +1 -1
  40. package/components/color-field/index.js +2 -2
  41. package/components/color-handle/index.cjs +1 -1
  42. package/components/color-handle/index.js +2 -2
  43. package/components/color-loupe/index.cjs +1 -1
  44. package/components/color-loupe/index.js +1 -1
  45. package/components/{color-loupe-Ck2IRn4K.cjs → color-loupe-CaA_Lfkk.cjs} +1 -1
  46. package/components/{color-loupe-B0mH9Jyx.js → color-loupe-CmMsXbjT.js} +1 -1
  47. package/components/color-menu/index.cjs +4 -4
  48. package/components/color-menu/index.js +4 -4
  49. package/components/color-picker/index.cjs +1 -1
  50. package/components/color-picker/index.js +3 -3
  51. package/components/color-slider/index.cjs +1 -1
  52. package/components/color-slider/index.js +5 -5
  53. package/components/date-time-picker/index.cjs +3 -3
  54. package/components/date-time-picker/index.js +10 -10
  55. package/components/directive-helpers-Cm6gitnu.js +62 -0
  56. package/components/{directive-helpers-OG6wWKJt.js → directive-helpers-DyIRTWwA.cjs} +2 -8
  57. package/components/divider/index.cjs +1 -1
  58. package/components/divider/index.js +5 -5
  59. package/components/{divider.module-CXMNveQc.cjs → divider.module-DDvBo9zo.cjs} +1 -1
  60. package/components/{divider.module-DwOuLGU3.js → divider.module-DoQWQEIJ.js} +1 -1
  61. package/components/field-group/index.cjs +1 -1
  62. package/components/field-group/index.js +1 -1
  63. package/components/{field-group-ClxYbp6Z.js → field-group-DXfBWrkO.js} +2 -2
  64. package/components/{field-group-CIach2C_.cjs → field-group-DkGst3r5.cjs} +1 -1
  65. package/components/field-label/index.cjs +1 -1
  66. package/components/field-label/index.js +1 -1
  67. package/components/{field-label-BaOJ2i-l.js → field-label-CZ2zzChK.js} +2 -2
  68. package/components/{field-label-CkZCXvyb.cjs → field-label-mO1AkUgR.cjs} +1 -1
  69. package/components/flow-D-0MTYCm.js +527 -0
  70. package/components/flow-DM3dNAKs.cjs +30 -0
  71. package/components/{focusable-Dy9nRVST.js → focusable-BxtpnzWp.js} +1 -1
  72. package/components/{focusable-BW4I5ppi.cjs → focusable-EbipgXRh.cjs} +1 -1
  73. package/components/icon/index.cjs +1 -1
  74. package/components/icon/index.js +3 -3
  75. package/components/{if-defined-D7nbLM5n.cjs → if-defined-C9YGdo33.cjs} +1 -1
  76. package/components/{if-defined-CUCu7LSf.js → if-defined-DOaE2coe.js} +1 -1
  77. package/components/{index-C6wHQ74z.js → index-A-yOTB_d.js} +20 -20
  78. package/components/index-BLWuwZXx.cjs +113 -0
  79. package/components/index.cjs +1 -1
  80. package/components/index.js +132 -127
  81. package/components/infield-button/index.cjs +1 -1
  82. package/components/infield-button/index.js +3 -3
  83. package/components/label/index.cjs +1 -1
  84. package/components/label/index.js +1 -1
  85. package/components/{like-anchor-CkIPVvtI.js → like-anchor-Bvn_vLQ8.js} +2 -2
  86. package/components/{like-anchor-s-5FEzRQ.cjs → like-anchor-sod1C1fR.cjs} +1 -1
  87. package/components/luzmo-icons-DbwDQtuO.js +229 -0
  88. package/components/luzmo-icons-DletXGWU.cjs +29 -0
  89. package/components/{manage-help-text-DGwDhPtP.cjs → manage-help-text-DhgARkZX.cjs} +1 -1
  90. package/components/{manage-help-text-BzyCpgqN.js → manage-help-text-syYnjKGL.js} +2 -2
  91. package/components/menu/index.cjs +8 -8
  92. package/components/menu/index.js +19 -19
  93. package/components/multi-language-field/index.cjs +1 -1
  94. package/components/multi-language-field/index.js +3 -3
  95. package/components/number-field/index.cjs +3 -3
  96. package/components/number-field/index.js +10 -10
  97. package/components/{observe-slot-text-BMloiRX5.js → observe-slot-text-BPfIQQtz.js} +1 -1
  98. package/components/{observe-slot-text-BzdHQBH3.cjs → observe-slot-text-Ceb7SvYT.cjs} +1 -1
  99. package/components/options/index.cjs +104 -0
  100. package/components/options/index.d.ts +13 -0
  101. package/components/options/index.js +1172 -0
  102. package/components/options/option.d.ts +70 -0
  103. package/components/options/options-divider.d.ts +14 -0
  104. package/components/options/options.d.ts +85 -0
  105. package/components/overlay/index.cjs +4 -4
  106. package/components/overlay/index.js +8 -8
  107. package/components/{overlay-D4oZnKKd.js → overlay-BBNyvs8F.js} +4 -4
  108. package/components/{overlay-DAVu8dy8.cjs → overlay-o0tLxsk-.cjs} +1 -1
  109. package/components/{pending-state-xRhujC3J.js → pending-state-C5OtdXCm.js} +2 -2
  110. package/components/{pending-state-CkibRs0D.cjs → pending-state-gs6IxYtB.cjs} +1 -1
  111. package/components/picker/index.cjs +1 -1
  112. package/components/picker/index.js +2 -2
  113. package/components/picker/picker.d.ts +2 -2
  114. package/components/picker-CM3kN655.js +461 -0
  115. package/components/picker-C__p3kzA.cjs +123 -0
  116. package/components/picker-button/index.cjs +2 -2
  117. package/components/picker-button/index.js +6 -6
  118. package/components/popover/index.cjs +1 -1
  119. package/components/popover/index.js +1 -1
  120. package/components/{popover-Cx4MhaoE.js → popover-DjX0aAnY.js} +2 -2
  121. package/components/{popover-DBQ1YYW6.cjs → popover-KFfO0IYL.cjs} +1 -1
  122. package/components/progress-circle/index.cjs +1 -1
  123. package/components/progress-circle/index.js +1 -1
  124. package/components/{progress-circle-BGubjTvj.cjs → progress-circle-B12-2Gww.cjs} +1 -1
  125. package/components/{progress-circle-B25wyiBi.js → progress-circle-CWGsfHnp.js} +3 -3
  126. package/components/radio/index.cjs +1 -1
  127. package/components/radio/index.js +3 -3
  128. package/components/search/index.cjs +4 -4
  129. package/components/search/index.js +5 -5
  130. package/components/select/index.cjs +156 -0
  131. package/components/select/index.d.ts +7 -0
  132. package/components/select/index.js +572 -0
  133. package/components/{multi-picker/multi-picker.d.ts → select/select.d.ts} +83 -59
  134. package/components/{sized-mixin-CDhX3fJn.cjs → sized-mixin-CPxE5C96.cjs} +1 -1
  135. package/components/{sized-mixin-Y_QuYtjJ.js → sized-mixin-D4ACoVUr.js} +1 -1
  136. package/components/slider/index.cjs +1 -1
  137. package/components/slider/index.js +2 -2
  138. package/components/{state-Bq6oXknJ.cjs → state-D8JEtYqe.cjs} +1 -1
  139. package/components/{state-BF7jO1DT.js → state-Deh-vKYE.js} +1 -1
  140. package/components/strategies-Bc3hG-HA.js +195 -0
  141. package/components/strategies-DGwsR7Xf.cjs +18 -0
  142. package/components/{streaming-listener-Cm6s-WvF.cjs → streaming-listener-B00MvALi.cjs} +1 -1
  143. package/components/{streaming-listener-Dxbr_Jiv.js → streaming-listener-CP-JE6Fa.js} +2 -2
  144. package/components/{style-map-Cp3I-AN3.cjs → style-map-CeilmSgs.cjs} +1 -1
  145. package/components/{style-map-DqptyE0A.js → style-map-IgqIKvlE.js} +1 -1
  146. package/components/swatch/index.cjs +2 -2
  147. package/components/swatch/index.js +11 -11
  148. package/components/switch/index.cjs +1 -1
  149. package/components/switch/index.js +4 -4
  150. package/components/tabs/index.cjs +5 -5
  151. package/components/tabs/index.js +10 -10
  152. package/components/tags/index.cjs +1 -1
  153. package/components/tags/index.js +3 -3
  154. package/components/text-field/index.cjs +2 -2
  155. package/components/text-field/index.js +8 -8
  156. package/components/{text-field-DWC0tpq4.js → text-field-BIADXoLC.js} +11 -11
  157. package/components/{text-field-CThL0T_y.cjs → text-field-D5d_Gt0t.cjs} +5 -5
  158. package/components/toast/index.cjs +4 -4
  159. package/components/toast/index.js +5 -5
  160. package/components/tooltip/index.cjs +1 -1
  161. package/components/tooltip/index.js +3 -3
  162. package/components/unit-input/index.cjs +3 -3
  163. package/components/unit-input/index.js +4 -4
  164. package/components/utils.cjs +1 -1
  165. package/components/utils.js +4 -4
  166. package/custom-elements.json +1 -1
  167. package/index.d.ts +2 -1
  168. package/package.json +11 -6
  169. package/{components/picker → utils/button-interaction-controllers}/interaction-controller.d.ts +6 -5
  170. package/{components/picker → utils/button-interaction-controllers}/mobile-controller.d.ts +2 -2
  171. package/components/base-CTSOJw6c.cjs +0 -40
  172. package/components/clear-button-BkQsOIoW.cjs +0 -18
  173. package/components/close-button-7ut4xT4f.js +0 -51
  174. package/components/directive-helpers-BQRjDUVe.cjs +0 -22
  175. package/components/index-CbaDCtQl.cjs +0 -113
  176. package/components/multi-picker/index.cjs +0 -127
  177. package/components/multi-picker/index.d.ts +0 -7
  178. package/components/multi-picker/index.js +0 -502
  179. package/components/picker-D0wr8mRN.js +0 -460
  180. package/components/picker-PMfW3n8Z.cjs +0 -123
  181. package/components/strategies-CzfvQU_H.js +0 -192
  182. package/components/strategies-D_cIzAJE.cjs +0 -18
  183. /package/{components/picker → utils/button-interaction-controllers}/desktop-controller.d.ts +0 -0
  184. /package/{components/picker → utils/button-interaction-controllers}/strategies.d.ts +0 -0
@@ -0,0 +1,461 @@
1
+ /*! * Lucero - The design system for Luzmo.
2
+ *
3
+ * Copyright © 2025 Luzmo
4
+ * All rights reserved.
5
+ * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
+ * This license allows users with a current active Luzmo account to use Lucero.
7
+ * This license terminates automatically if a user no longer has an active Luzmo account.
8
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
+ * SOFTWARE.
17
+ * */
18
+ import { x as n, E as d, B as g, r as f, n as l } from "./base-WsynuqaS.js";
19
+ import { r as h } from "./state-Deh-vKYE.js";
20
+ import { e as v } from "./query-D_KR_GUc.js";
21
+ import { e as z } from "./class-map-NbVXqBU0.js";
22
+ import { o as u } from "./if-defined-DOaE2coe.js";
23
+ import { o as y } from "./style-map-IgqIKvlE.js";
24
+ import { F as w } from "./focusable-BxtpnzWp.js";
25
+ import { D as x } from "./dependency-manger-CEXvGQUV.js";
26
+ import { M as I, I as $, s as k } from "./strategies-Bc3hG-HA.js";
27
+ import { P as S } from "./pending-state-C5OtdXCm.js";
28
+ import { S as M } from "./sized-mixin-D4ACoVUr.js";
29
+ import { O as b, T as C, I as q } from "./luzmo-icons-DbwDQtuO.js";
30
+ import "./menu/index.js";
31
+ import "./overlay/index.js";
32
+ import "./progress-circle/index.js";
33
+ import "./tooltip/index.js";
34
+ const E = '#button{cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--luzmo-button-font-family, var(--luzmo-font-family));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:var(--luzmo-button-line-height, var(--luzmo-line-height, 1.3));text-transform:none;vertical-align:top;-webkit-appearance:button;transition:background var(--luzmo-button-animation-duration, var(--luzmo-animation-duration)) ease-out,border-color var(--luzmo-button-animation-duration, var(--luzmo-animation-duration)) ease-out,color var(--luzmo-button-animation-duration, var(--luzmo-animation-duration)) ease-out,box-shadow var(--luzmo-button-animation-duration, var(--luzmo-animation-duration)) ease-out;justify-content:center;align-items:center;margin:0;-webkit-text-decoration:none;text-decoration:none;display:inline-flex;position:relative;overflow:visible}#button::-moz-focus-inner{border-style:none;padding:0}#button:focus{outline:none}#icon{margin-inline-end:var(--luzmo-picker-spacing-text-to-icon, var(--picker-spacing-text-to-icon));font-size:var(--luzmo-picker-font-size, var(--picker-font-size))}@media (forced-colors: active){:host{--highcontrast-picker-focus-indicator-color: Highlight;--highcontrast-picker-border-color-default: ButtonBorder;--highcontrast-picker-border-color-hover: Highlight;--highcontrast-picker-border-color-disabled: GrayText;--highcontrast-picker-content-color-default: ButtonText;--highcontrast-picker-content-color-disabled: GrayText;--highcontrast-picker-background-color: ButtonFace}#button:focus-visible{--highcontrast-picker-border-color-hover: ButtonText}#button .label,#button:after{forced-color-adjust:none}}#button{box-sizing:border-box;max-inline-size:100%;min-inline-size:calc(var(--picker-minimum-width-multiplier) * var(--luzmo-picker-block-size, var(--picker-block-size)));block-size:var(--luzmo-picker-block-size, var(--picker-block-size));border-width:var(--luzmo-picker-border-width, var(--picker-border-width));border-radius:var(--luzmo-picker-border-radius, var(--picker-border-radius));box-shadow:var(--luzmo-picker-box-shadow, var(--picker-box-shadow));transition:background-color var(--luzmo-picker-animation-duration, var(--picker-animation-duration)),box-shadow var(--luzmo-picker-animation-duration, var(--picker-animation-duration)),border-color var(--luzmo-picker-animation-duration, var(--picker-animation-duration)) ease-in-out;color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-font-color-default, var(--picker-font-color-default)));background-color:var(--highcontrast-picker-background-color, var(--luzmo-picker-background-color-default, var(--picker-background-color-default)));border-style:solid;border-color:var(--highcontrast-picker-border-color-default, var(--luzmo-picker-border-color-default, var(--picker-border-color-default)));margin-block-start:var(--luzmo-picker-spacing-label-to-picker, var(--picker-spacing-label-to-picker));padding-block:0;padding-inline-start:var(--luzmo-picker-spacing-edge-to-text, var(--picker-spacing-edge-to-text));padding-inline-end:var(--luzmo-picker-spacing-edge-to-disclosure-icon, var(--picker-spacing-edge-to-disclosure-icon));display:flex}#button:after{pointer-events:none;content:"";block-size:calc(100% + var(--luzmo-picker-focus-indicator-gap, var(--picker-focus-indicator-gap)) * 2 + var(--luzmo-picker-border-width, var(--picker-border-width)) * 2);inline-size:calc(100% + var(--luzmo-picker-focus-indicator-gap, var(--picker-focus-indicator-gap)) * 2 + var(--luzmo-picker-border-width, var(--picker-border-width)) * 2);border-style:solid;border-width:var(--luzmo-picker-focus-indicator-width, var(--picker-focus-indicator-width));border-radius:calc(var(--luzmo-picker-border-radius, var(--picker-border-radius)) + var(--luzmo-picker-focus-indicator-gap, var(--picker-focus-indicator-gap)) + var(--luzmo-picker-border-width, var(--picker-border-width)));border-color:#0000;margin-block-start:calc((var(--luzmo-picker-focus-indicator-gap, var(--picker-focus-indicator-gap)) + var(--luzmo-picker-focus-indicator-width, var(--picker-focus-indicator-width)) + var(--luzmo-picker-border-width, var(--picker-border-width))) * -1);margin-inline-start:calc((var(--luzmo-picker-focus-indicator-gap, var(--picker-focus-indicator-gap)) + var(--luzmo-picker-focus-indicator-width, var(--picker-focus-indicator-width)) + var(--luzmo-picker-border-width, var(--picker-border-width))) * -1);position:absolute;inset-block:0;inset-inline:0}#button:active{background-color:var(--highcontrast-picker-background-color, var(--luzmo-picker-background-color-active, var(--picker-background-color-active)));border-color:var(--highcontrast-picker-border-color-default, var(--luzmo-picker-border-active, var(--picker-border-color-active)))}#button:active:after{border-color:#0000}#button.placeholder:active .label{color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-font-color-active, var(--picker-font-color-active)))}#button:focus-visible{background-color:var(--highcontrast-picker-background-color, var(--luzmo-picker-background-color-key-focus, var(--picker-background-color-key-focus)));border-color:var(--highcontrast-picker-border-color-default, var(--luzmo-picker-border-color-key-focus, var(--picker-border-color-key-focus)));color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-font-color-key-focus, var(--picker-font-color-key-focus)));outline:none}#button:focus-visible:after{border-color:var(--highcontrast-picker-focus-indicator-color, var(--luzmo-picker-focus-indicator-color, var(--picker-focus-indicator-color)))}#button.placeholder:focus-visible{color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-font-color-key-focus, var(--picker-font-color-key-focus)))}#button:focus-visible .disclosure-icon{color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-icon-color-key-focus, var(--picker-icon-color-key-focus)))}:host([open]) #button:not(:disabled,.is-disabled){color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-font-color-default-open, var(--picker-font-color-default-open)));background-color:var(--highcontrast-picker-background-color, var(--luzmo-picker-background-color-default-open, var(--picker-background-color-default-open)));border-color:var(--highcontrast-picker-border-color-default, var(--luzmo-picker-border-default-open, var(--picker-border-color-default-open)))}:host([open]) #button:not(:disabled,.is-disabled) .disclosure-icon{color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-icon-color-default-open, var(--picker-icon-color-default-open)))}:host([invalid]) #button:not(:disabled,.is-disabled){border-color:var(--highcontrast-picker-border-color-default, var(--luzmo-picker-border-color-error-default, var(--picker-border-color-error-default)))}:host([invalid]) #button:not(:disabled,.is-disabled) .validation-icon{color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-icon-color-error, var(--picker-icon-color-error)))}:host([invalid]) #button:not(:disabled,.is-disabled):active{border-color:var(--highcontrast-picker-border-color-default, var(--luzmo-picker-border-color-error-active, var(--picker-border-color-error-active)))}:host([invalid][open]) #button:not(:disabled,.is-disabled){border-color:var(--highcontrast-picker-border-color-default, var(--luzmo-picker-border-color-error-default-open, var(--picker-border-color-error-default-open)))}:host([invalid]) #button:not(:disabled,.is-disabled):focus-visible{border-color:var(--highcontrast-picker-border-color-default, var(--luzmo-picker-border-color-error-key-focus, var(--picker-border-color-error-key-focus)))}:host([pending]) #button .disclosure-icon{color:var(--highcontrast-picker-content-color-disabled, var(--luzmo-picker-icon-color-disabled, var(--picker-icon-color-disabled)))}.icon{flex-shrink:0}.label{white-space:nowrap;font-size:var(--luzmo-picker-font-size, var(--picker-font-size));line-height:var(--luzmo-picker-line-height, var(--picker-line-height));font-weight:var(--luzmo-picker-font-weight, var(--picker-font-weight));text-overflow:ellipsis;text-align:start;flex:auto;overflow:hidden}.label.placeholder{font-weight:var(--luzmo-picker-placeholder-font-weight, var(--picker-font-weight));font-style:var(--luzmo-picker-placeholder-font-style, var(--picker-placeholder-font-style));transition:color var(--luzmo-picker-animation-duration, var(--picker-animation-duration)) ease-in-out;color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-font-color-default, var(--picker-font-color-default)))}.label.placeholder:active{color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-font-color-active, var(--picker-font-color-active)))}.disclosure-icon{vertical-align:top;transition:color var(--luzmo-picker-animation-duration, var(--picker-animation-duration)) ease-out;margin-inline-start:var(--luzmo-picker-spacing-icon-to-disclosure-icon, var(--picker-spacing-icon-to-disclosure-icon));color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-icon-color-default, var(--picker-icon-color-default)));flex-shrink:0;display:inline-block;position:relative}.disclosure-icon:active{color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-icon-color-active, var(--picker-icon-color-active)))}luzmo-progress-circle,.validation-icon{margin-inline-start:var(--luzmo-picker-spacing-text-to-icon, var(--picker-spacing-text-to-icon))}.icon-container{display:flex;position:relative;height:100%;align-items:center;font-size:var(--luzmo-picker-disclosure-icon-size, var(--picker-disclosure-icon-size))}.icon-container.disclosure-icon{margin-inline-end:0}.label~.disclosure-icon{margin-inline-start:var(--luzmo-picker-spacing-text-to-icon, var(--picker-spacing-text-to-icon))}:host([quiet]) #button{inline-size:auto;min-inline-size:0;padding-inline:var(--luzmo-picker-spacing-edge-to-text-quiet, var(--picker-spacing-edge-to-text-quiet));color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-font-color-default, var(--picker-font-color-default)));background-color:initial;background-color:var(--highcontrast-picker-background-color, transparent);border:none;border-radius:0;box-shadow:none;margin-block-start:calc(var(--luzmo-picker-spacing-label-to-picker-quiet, var(--picker-spacing-label-to-picker-quiet)) + 1px)}:host([quiet]) #button.label-inline{margin-block-start:0}:host([quiet]) #button .disclosure-icon{margin-inline-end:var(--luzmo-picker-spacing-edge-to-disclosure-icon-quiet, var(--picker-spacing-edge-to-disclosure-icon-quiet))}:host([quiet]) #button:after{block-size:auto;inline-size:auto;border:none}@media (hover: hover){#button:hover{color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-font-color-hover, var(--picker-font-color-hover)));background-color:var(--highcontrast-picker-background-color, var(--luzmo-picker-background-color-hover, var(--picker-background-color-hover)));border-color:var(--highcontrast-picker-border-color-hover, var(--luzmo-picker-border-color-hover, var(--picker-border-color-hover)))}#button:hover .disclosure-icon{color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-icon-color-hover, var(--picker-icon-color-hover)))}:host([open]):not([quiet]) #button:not(:disabled,.is-disabled):hover{color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-font-color-hover-open, var(--picker-font-color-hover-open)));background-color:var(--highcontrast-picker-background-color, var(--luzmo-picker-background-color-hover-open, var(--picker-background-color-hover-open)));border-color:var(--highcontrast-picker-border-color-hover, var(--luzmo-picker-border-color-hover-open, var(--picker-border-color-hover-open)))}:host([open]) #button:not(:disabled,.is-disabled):hover .disclosure-icon{color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-icon-color-hover-open, var(--picker-icon-color-hover-open)))}:host([invalid]) #button:not(:disabled,.is-disabled):hover{border-color:var(--highcontrast-picker-border-color-hover, var(--luzmo-picker-border-color-error-hover, var(--picker-border-color-error-hover)))}:host([invalid][open]) #button:not(:disabled,.is-disabled):hover{border-color:var(--highcontrast-picker-border-color-hover, var(--luzmo-picker-border-color-error-hover-open, var(--picker-border-color-error-hover-open)))}.label.placeholder:hover{color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-font-color-hover, var(--picker-font-color-hover)))}:host([quiet]) #button:hover{background-color:initial;background-color:var(--highcontrast-picker-background-color, transparent)!important}}:host([quiet]) #button:focus-visible{background-color:initial;background-color:var(--highcontrast-picker-background-color, transparent)}:host([quiet]) #button:focus-visible:after{box-shadow:0 var(--luzmo-picker-focus-indicator-width, var(--picker-focus-indicator-width)) 0 0 var(--highcontrast-picker-focus-indicator-color, var(--luzmo-picker-focus-indicator-color, var(--picker-focus-indicator-color)));margin:calc((var(--luzmo-picker-focus-indicator-gap, var(--picker-focus-indicator-gap)) + var(--luzmo-picker-border-width, var(--picker-border-width))) * -1) 0;border:none;border-radius:0}:host([quiet][open]) #button,:host([quiet][disabled]) #button#button,:host([quiet]) #button#button:disabled,:host([quiet]) #button:active{background-color:initial;background-color:var(--highcontrast-picker-background-color, transparent)}.label-inline{vertical-align:top;display:inline-flex}:host([disabled]) #button,#button:disabled{cursor:default;background-color:var(--highcontrast-picker-background-color, var(--luzmo-picker-background-color-disabled, var(--picker-background-color-disabled)));border-color:#0000;border-color:var(--highcontrast-picker-border-color-disabled, transparent);color:var(--highcontrast-picker-content-color-disabled, var(--luzmo-picker-font-color-disabled, var(--picker-font-color-disabled)))}:host([disabled]) #button .icon,:host([disabled]) #button .disclosure-icon,:host([disabled]) #button .validation-icon,#button:disabled .icon,#button:disabled .disclosure-icon,#button:disabled .validation-icon{color:var(--highcontrast-picker-content-color-disabled, var(--luzmo-picker-icon-color-disabled, var(--picker-icon-color-disabled)))}:host([disabled]) #button .label.placeholder,#button:disabled .label.placeholder{color:var(--highcontrast-picker-content-color-disabled, var(--luzmo-picker-font-color-disabled, var(--picker-font-color-disabled)))}:host{--picker-box-shadow: 0px 1px 3px 0px rgba(var(--luzmo-border-color-rgb), .06);--picker-background-color-default: var(--luzmo-background-color);--picker-background-color-default-open: var(--luzmo-background-color-hover);--picker-background-color-active: var(--luzmo-background-color-down);--picker-background-color-hover: var(--luzmo-background-color-hover);--picker-background-color-hover-open: var(--luzmo-background-color-down);--picker-background-color-key-focus: var(--luzmo-background-color-down);--picker-border-color-default: var(--luzmo-border-color);--picker-border-color-default-open: var(--luzmo-border-color-hover);--picker-border-color-hover: var(--luzmo-border-color);--picker-border-color-hover-open: var(--luzmo-border-color-hover);--picker-border-color-active: var(--luzmo-border-color);--picker-border-color-key-focus: var(--luzmo-border-color);--picker-border-width: var(--luzmo-border-width);--picker-font-size: var(--luzmo-font-size);--picker-font-weight: var(--luzmo-font-weight);--picker-placeholder-font-style: var(--luzmo-font-style);--picker-line-height: var(--luzmo-line-height);--picker-block-size: 32px;--picker-border-radius: var(--luzmo-border-radius);--picker-spacing-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--picker-spacing-text-to-icon: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--picker-spacing-text-to-icon-inline-end: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--picker-spacing-icon-to-disclosure-icon: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--picker-spacing-edge-to-text-quiet: 0px;--picker-spacing-label-to-picker: 0px;--picker-spacing-label-to-picker-quiet: calc( -1 * var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--picker-spacing-edge-to-disclosure-icon: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--picker-spacing-edge-to-disclosure-icon-quiet: 0px;--picker-animation-duration: var(--luzmo-animation-duration);--picker-font-color-default: var(--luzmo-font-color);--picker-font-color-default-open: var(--luzmo-font-color-hover);--picker-font-color-hover: var(--luzmo-font-color-hover);--picker-font-color-hover-open: var(--luzmo-font-color-down);--picker-font-color-active: var(--luzmo-font-color-focus);--picker-font-color-key-focus: var(--luzmo-font-color-focus);--picker-icon-color-default: var(--luzmo-font-color);--picker-icon-color-default-open: var(--luzmo-font-color-hover);--picker-icon-color-hover: var(--luzmo-font-color-hover);--picker-icon-color-hover-open: var(--luzmo-font-color-hover);--picker-icon-color-active: var(--luzmo-font-color-focus);--picker-icon-color-key-focus: var(--luzmo-font-color-focus);--picker-border-color-error-default: var(--luzmo-negative-color);--picker-border-color-error-default-open: var(--luzmo-negative-color-down);--picker-border-color-error-hover: var(--luzmo-negative-color-hover);--picker-border-color-error-hover-open: var(--luzmo-negative-color-down);--picker-border-color-error-active: var(--luzmo-negative-color-down);--picker-border-color-error-key-focus: var(--luzmo-negative-color-focus);--picker-icon-color-error: var(--luzmo-negative-color);--picker-background-color-disabled: var(--luzmo-background-color-disabled);--picker-font-color-disabled: var(--luzmo-disabled-color);--picker-icon-color-disabled: var(--luzmo-disabled-color);--picker-focus-indicator-gap: var(--luzmo-indicator-gap);--picker-focus-indicator-width: var(--luzmo-indicator-width);--picker-focus-indicator-color: var(--luzmo-indicator-color);--picker-disclosure-icon-size: var(--luzmo-font-size-s)}:host([size=s]){--picker-block-size: 28px;--picker-font-size: var(--luzmo-font-size-s);--picker-border-radius: var(--luzmo-border-radius);--picker-spacing-edge-to-text: var(--luzmo-spacing-3);--picker-spacing-text-to-icon: var(--luzmo-spacing-3);--picker-spacing-text-to-icon-inline-end: var(--luzmo-spacing-3);--picker-spacing-icon-to-disclosure-icon: var(--luzmo-spacing-3);--picker-spacing-label-to-picker-quiet: calc(-1 * var(--luzmo-spacing-3));--picker-spacing-edge-to-disclosure-icon: var(--luzmo-spacing-3);--picker-disclosure-icon-size: var(--luzmo-font-size-s)}:host([size=l]){--picker-block-size: 40px;--picker-font-size: var(--luzmo-font-size-l);--picker-border-radius: var(--luzmo-border-radius);--picker-spacing-edge-to-text: var(--luzmo-spacing-4);--picker-spacing-text-to-icon: var(--luzmo-spacing-4);--picker-spacing-text-to-icon-inline-end: var(--luzmo-spacing-4);--picker-spacing-icon-to-disclosure-icon: var(--luzmo-spacing-4);--picker-spacing-label-to-picker-quiet: calc(-1 * var(--luzmo-spacing-4));--picker-spacing-edge-to-disclosure-icon: var(--luzmo-spacing-4);--picker-disclosure-icon-size: var(--luzmo-font-size)}:host([size=xl]){--picker-block-size: 48px;--picker-font-size: var(--luzmo-font-size-xl);--picker-border-radius: var(--luzmo-border-radius-l);--picker-spacing-edge-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--picker-spacing-text-to-icon: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--picker-spacing-text-to-icon-inline-end: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--picker-spacing-icon-to-disclosure-icon: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--picker-spacing-label-to-picker-quiet: calc( -1 * var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--picker-spacing-edge-to-disclosure-icon: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--picker-disclosure-icon-size: var(--luzmo-font-size-l)}:host([variant=highlight]) ::slotted(luzmo-menu-item[selected]){--menu-item-highlight-label-content-color: var(--luzmo-primary-inverse-color);--menu-item-label-icon-color-default: var(--luzmo-primary-inverse-color);--menu-checkmark-display: var(--menu-checkmark-display-hidden);padding-inline-start:var(--luzmo-menu-item-label-inline-edge-to-content, var(--menu-item-label-inline-edge-to-content));background-color:var(--luzmo-menu-item-highlight-label-background-color, var(--menu-item-highlight-label-background-color, var(--luzmo-border-color)))}:host{display:inline-flex;vertical-align:top;max-inline-size:100%;inline-size:var(--luzmo-picker-inline-size, var(--picker-inline-size));min-inline-size:calc(var(--picker-minimum-width-multiplier) * var(--luzmo-picker-block-size, var(--picker-block-size)))}:host([quiet]){width:auto;min-width:0}:host([disabled]){pointer-events:none}#button{width:100%;min-width:100%;max-width:100%}#icon:not([hidden]){display:inline-flex}:host([readonly]) #button{-webkit-user-select:inherit;user-select:inherit}.picker,.validation-icon{flex-shrink:0}luzmo-overlay{pointer-events:none}luzmo-menu{pointer-events:initial}:host>luzmo-menu{display:none}:host([focused]:not([quiet])) #button #label.placeholder{color:var(--picker-placeholder-text-color-key-focus, var(--alias-placeholder-text-color-hover))}#label.visually-hidden~.picker{margin-inline-start:auto}:host([focused]:not([quiet],[pending])) #button .picker{color:var(--picker-icon-color-key-focus, var(--alias-icon-color-focus))}.visually-hidden{border:0;clip:rect(0,0,0,0);clip-path:inset(50%);height:1px;margin:0 -1px -1px 0;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}luzmo-overlay:not(:defined){display:none}#button.remove-focus-ring-safari-hack:focus-visible{background-color:var(--highcontrast-picker-background-color, var(--luzmo-picker-background-color-default, var(--picker-background-color-default)));border-color:var(--highcontrast-picker-border-color-default, var(--luzmo-picker-border-color-default, var(--picker-border-color-default)));color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-font-color-default, var(--picker-font-color-default)))}#button.remove-focus-ring-safari-hack:after{border:none}#button.remove-focus-ring-safari-hack:focus-visible:after{box-shadow:none}#button.remove-focus-ring-safari-hack:active{background-color:var(--highcontrast-picker-background-color, var(--luzmo-picker-background-color-default, var(--picker-background-color-default)));border-color:var(--highcontrast-picker-border-color-default, var(--luzmo-picker-border-color-default, var(--picker-border-color-default)));color:var(--highcontrast-picker-content-color-default, var(--luzmo-picker-font-color-default, var(--picker-font-color-default)))}';
35
+ var B = Object.defineProperty, D = Object.getOwnPropertyDescriptor, i = (s, e, o, r) => {
36
+ for (var c = r > 1 ? void 0 : r ? D(e, o) : e, a = s.length - 1, p; a >= 0; a--)
37
+ (p = s[a]) && (c = (r ? p(e, o, c) : p(c)) || c);
38
+ return r && c && B(e, o, c), c;
39
+ };
40
+ const A = () => n`
41
+ <div class="disclosure-icon icon">
42
+ ${b(C, { className: "indicator" })}
43
+ </div>
44
+ `, F = () => n`
45
+ <div class="icon-container validation-icon icon">
46
+ ${b(q)}
47
+ </div>
48
+ `, m = "option-picker";
49
+ class t extends M(w, {
50
+ noDefaultSize: !0
51
+ }) {
52
+ /**
53
+ * Initializes the `PendingStateController` for the Picker component.
54
+ * The `PendingStateController` manages the pending state of the Picker.
55
+ */
56
+ constructor() {
57
+ super(), this.disabled = !1, this.focused = !1, this.invalid = !1, this.pending = !1, this.pendingLabel = "Pending", this.open = !1, this.readonly = !1, this.placement = "bottom-start", this.quiet = !1, this.value = "", this.selects = "single", this.dependencyManager = new x(this), this.isMobile = new I(this, $), this.listRole = "listbox", this.itemRole = "option", this.hasRenderedOverlay = !1, this._selfManageFocusElement = !1, this.deprecatedMenu = null, this.selectionPromise = Promise.resolve(), this.willManageSelection = !1, this.recentlyConnected = !1, this.enterKeydownOn = null, this.handleSlottableRequest = (e) => {
58
+ }, this.applyFocusElementLabel = (e, o) => {
59
+ this.appliedLabel = e, this.labelAlignment = o.sideAligned ? "inline" : void 0;
60
+ }, this.handleKeydown = (e) => {
61
+ this.focused = !0, !(e.code !== "ArrowDown" && e.code !== "ArrowUp") && (e.stopPropagation(), e.preventDefault(), this.toggle(!0));
62
+ }, this.renderAngleIcon = () => A(), this.renderAlertIcon = () => F(), this.handleEnterKeydown = (e) => {
63
+ if (e.code === "Enter") {
64
+ if (this.enterKeydownOn) {
65
+ e.preventDefault();
66
+ return;
67
+ }
68
+ this.enterKeydownOn = e.target, this.addEventListener(
69
+ "keyup",
70
+ (o) => {
71
+ o.code === "Enter" && (this.enterKeydownOn = null);
72
+ },
73
+ { once: !0 }
74
+ );
75
+ }
76
+ }, this.pendingStateController = new S(this);
77
+ }
78
+ get selectedItem() {
79
+ return this._selectedItem;
80
+ }
81
+ get selectedItemContent() {
82
+ return this._selectedItemContent || { icon: [], content: [] };
83
+ }
84
+ get selfManageFocusElement() {
85
+ return this._selfManageFocusElement;
86
+ }
87
+ get menuItems() {
88
+ return this.optionsMenu.childItems;
89
+ }
90
+ set selectedItem(e) {
91
+ const o = e == null ? void 0 : e.querySelector('[slot="icon"]');
92
+ if (this.selectedItemContent = e ? e.itemChildren : void 0, e === this.selectedItem)
93
+ return;
94
+ const r = this.selectedItem;
95
+ this._selectedItem = e, this._selectedItemIcon = (o == null ? void 0 : o.icon) ?? void 0, this.requestUpdate("selectedItem", r);
96
+ }
97
+ get focusElement() {
98
+ return this.open ? this.optionsMenu : this.button;
99
+ }
100
+ forceFocusVisible() {
101
+ this.disabled || (this.focused = !0);
102
+ }
103
+ click() {
104
+ this.disabled || this.toggle();
105
+ }
106
+ handleButtonBlur() {
107
+ this.focused = !1;
108
+ }
109
+ focus(e) {
110
+ super.focus(e), !this.disabled && this.focusElement && (this.focused = this.hasVisibleFocusInTree());
111
+ }
112
+ handleHelperFocus() {
113
+ this.focused = !0, this.button.focus();
114
+ }
115
+ handleChange(e) {
116
+ this.strategy && (this.strategy.preventNextToggle = "no");
117
+ const o = e.target, [r] = o.selectedItems;
118
+ e.stopPropagation(), e.cancelable ? this.setValueFromItem(r, e) : (this.open = !1, this.strategy && (this.strategy.open = !1));
119
+ }
120
+ handleButtonFocus(e) {
121
+ var o;
122
+ (o = this.strategy) == null || o.handleButtonFocus(e);
123
+ }
124
+ toggle(e) {
125
+ this.readonly || this.pending || (this.open = e === void 0 ? !this.open : e, this.strategy && (this.strategy.open = this.open), this._selfManageFocusElement = this.open);
126
+ }
127
+ close() {
128
+ this.readonly || this.strategy && (this.open = !1, this.strategy.open = !1);
129
+ }
130
+ bindEvents() {
131
+ var e;
132
+ (e = this.strategy) == null || e.abort(), this.strategy = this.isMobile.matches ? new k.mobile(this.button, this) : new k.desktop(this.button, this);
133
+ }
134
+ connectedCallback() {
135
+ super.connectedCallback(), this.recentlyConnected = this.hasUpdated;
136
+ }
137
+ disconnectedCallback() {
138
+ var e;
139
+ this.close(), (e = this.strategy) == null || e.releaseDescription(), super.disconnectedCallback();
140
+ }
141
+ async setValueFromItem(e, o) {
142
+ this.open = !1, this.strategy && (this.strategy.open = !1);
143
+ const r = this.selectedItem, c = this.value;
144
+ if (this.selectedItem = e, this.value = (e == null ? void 0 : e.value) ?? "", await this.updateComplete, !this.dispatchEvent(
145
+ new CustomEvent("change", {
146
+ bubbles: !0,
147
+ // Allow it to be prevented.
148
+ cancelable: !0,
149
+ composed: !0,
150
+ detail: this.value
151
+ })
152
+ ) && this.selects) {
153
+ o && o.preventDefault(), this.setMenuItemSelected(this.selectedItem, !1), r && this.setMenuItemSelected(r, !0), this.selectedItem = r, this.value = c, this.open = !0, this.strategy && (this.strategy.open = !0);
154
+ return;
155
+ } else if (!this.selects) {
156
+ this.selectedItem = r, this.value = c;
157
+ return;
158
+ }
159
+ r && this.setMenuItemSelected(r, !1), this.setMenuItemSelected(e, !!this.selects);
160
+ }
161
+ setMenuItemSelected(e, o) {
162
+ this.selects != null && (e.selected = o);
163
+ }
164
+ get containerStyles() {
165
+ return this.isMobile.matches ? {
166
+ "--swc-menu-width": "100%"
167
+ } : {};
168
+ }
169
+ set selectedItemContent(e) {
170
+ if (e === this.selectedItemContent)
171
+ return;
172
+ const o = this.selectedItemContent;
173
+ this._selectedItemContent = e, this.requestUpdate("selectedItemContent", o);
174
+ }
175
+ handleTooltipSlotchange(e) {
176
+ this.tooltipEl = e.target.assignedElements()[0];
177
+ }
178
+ renderLabelContent(e) {
179
+ return this.value && this.selectedItem ? e : n`
180
+ <slot name="label" id="label">
181
+ <span aria-hidden=${u(this.appliedLabel ? void 0 : "true")}>
182
+ ${this.label}
183
+ </span>
184
+ </slot>
185
+ `;
186
+ }
187
+ get buttonContent() {
188
+ const e = {
189
+ "visually-hidden": this.icons === "only" && !!this.value,
190
+ placeholder: !this.value,
191
+ label: !0
192
+ }, o = this.appliedLabel || this.label, r = n` <div id="icon" ?hidden=${this.icons === "none"}>
193
+ ${this._selectedItemIcon ? b(this._selectedItemIcon) : d}
194
+ </div>`;
195
+ return [
196
+ n`
197
+ ${this._selectedItemIcon ? r : d}
198
+ <div
199
+ id=${u(this.value && this.selectedItem ? "label" : void 0)}
200
+ class=${z(e)}
201
+ >
202
+ ${this.renderLabelContent(this.selectedItemContent.content)}
203
+ </div>
204
+ ${this.value && this.selectedItem ? n`
205
+ <div
206
+ aria-hidden="true"
207
+ class="visually-hidden"
208
+ id="applied-label"
209
+ >
210
+ ${o}
211
+ <slot name="label"></slot>
212
+ </div>
213
+ ` : n` <span hidden id="applied-label">${o}</span> `}
214
+ ${this.invalid && !this.pending ? n` ${this.renderAlertIcon()} ` : d}
215
+ ${this.pendingStateController.renderPendingState()}
216
+ ${this.readonly ? d : this.renderAngleIcon()}
217
+ <slot
218
+ aria-hidden="true"
219
+ name="tooltip"
220
+ id="tooltip"
221
+ @slotchange=${this.handleTooltipSlotchange}
222
+ ></slot>
223
+ `
224
+ ];
225
+ }
226
+ renderOverlay(e) {
227
+ var r, c, a;
228
+ if (((r = this.strategy) == null ? void 0 : r.overlay) === void 0)
229
+ return e;
230
+ const o = this.renderContainer(e);
231
+ return g(o, (c = this.strategy) == null ? void 0 : c.overlay, {
232
+ host: this
233
+ }), (a = this.strategy) == null ? void 0 : a.overlay;
234
+ }
235
+ get renderDescriptionSlot() {
236
+ return n`
237
+ <div id=${m}>
238
+ <slot name="description"></slot>
239
+ </div>
240
+ `;
241
+ }
242
+ // a helper to throw focus to the button is needed because Safari
243
+ // won't include buttons in the tab order even with tabindex="0"
244
+ render() {
245
+ return this.tooltipEl && (this.tooltipEl.disabled = this.open), n`
246
+ <span
247
+ id="focus-helper"
248
+ tabindex=${this.focused || this.open ? "-1" : "0"}
249
+ @focus=${this.handleHelperFocus}
250
+ aria-describedby=${m}
251
+ ></span>
252
+ <button
253
+ aria-controls=${u(this.open ? "menu" : void 0)}
254
+ aria-describedby="tooltip"
255
+ aria-expanded=${this.open ? "true" : "false"}
256
+ aria-haspopup="true"
257
+ aria-labelledby="loader icon label applied-label"
258
+ id="button"
259
+ class=${u(
260
+ this.labelAlignment ? `label-${this.labelAlignment}` : void 0
261
+ )}
262
+ @blur=${this.handleButtonBlur}
263
+ @keydown=${{
264
+ handleEvent: this.handleEnterKeydown,
265
+ capture: !0
266
+ }}
267
+ ?disabled=${this.disabled}
268
+ tabindex="-1"
269
+ >
270
+ ${this.buttonContent}
271
+ </button>
272
+ ${this.renderMenu} ${this.renderDescriptionSlot}
273
+ `;
274
+ }
275
+ update(e) {
276
+ var o, r;
277
+ this.selects && (this.selects = "single"), e.has("disabled") && this.disabled && this.strategy && (this.open = !1, this.strategy.open = !1), e.has("pending") && this.pending && this.strategy && (this.open = !1, this.strategy.open = !1), e.has("value") && this.shouldScheduleManageSelection(), this.hasUpdated || (this.deprecatedMenu = this.querySelector(":scope > luzmo-menu"), (o = this.deprecatedMenu) == null || o.toggleAttribute("ignore", !0), (r = this.deprecatedMenu) == null || r.setAttribute("selects", "inherit")), super.update(e);
278
+ }
279
+ bindButtonKeydownListener() {
280
+ this.button.addEventListener("keydown", this.handleKeydown);
281
+ }
282
+ updated(e) {
283
+ super.updated(e), e.has("open") && (this.strategy.open = this.open);
284
+ }
285
+ firstUpdated(e) {
286
+ super.firstUpdated(e), this.bindButtonKeydownListener(), this.bindEvents();
287
+ }
288
+ get dismissHelper() {
289
+ return n`
290
+ <div class="visually-hidden">
291
+ <button
292
+ tabindex="-1"
293
+ aria-label="Dismiss"
294
+ @click=${this.close}
295
+ ></button>
296
+ </div>
297
+ `;
298
+ }
299
+ renderContainer(e) {
300
+ const o = n`
301
+ ${this.dismissHelper} ${e} ${this.dismissHelper}
302
+ `;
303
+ return this.dependencyManager.add("luzmo-popover"), import("./popover/index.js"), n`
304
+ <luzmo-popover
305
+ id="popover"
306
+ size=${this.size}
307
+ role="presentation"
308
+ style=${y(this.containerStyles)}
309
+ placement=${this.placement}
310
+ >
311
+ ${o}
312
+ </luzmo-popover>
313
+ `;
314
+ }
315
+ get renderMenu() {
316
+ const e = n`
317
+ <luzmo-menu
318
+ aria-labelledby="applied-label"
319
+ @change=${this.handleChange}
320
+ id="menu"
321
+ @keydown=${{
322
+ handleEvent: this.handleEnterKeydown,
323
+ capture: !0
324
+ }}
325
+ @scroll=${this.onScroll}
326
+ role=${this.listRole}
327
+ .selects=${this.selects}
328
+ .selected=${this.value ? [this.value] : []}
329
+ size=${this.size}
330
+ @luzmo-menu-item-added-or-updated=${this.shouldManageSelection}
331
+ >
332
+ <slot @slotchange=${this.shouldScheduleManageSelection}></slot>
333
+ </luzmo-menu>
334
+ `;
335
+ return this.hasRenderedOverlay = this.hasRenderedOverlay || this.focused || this.open || !!this.deprecatedMenu, this.hasRenderedOverlay ? (this.dependencyManager.loaded && this.dependencyManager.add("luzmo-overlay"), this.renderOverlay(e)) : e;
336
+ }
337
+ shouldScheduleManageSelection(e) {
338
+ !this.willManageSelection && (!e || e.target.getRootNode().host === this) && (this.willManageSelection = !0, requestAnimationFrame(() => {
339
+ requestAnimationFrame(() => {
340
+ this.manageSelection();
341
+ });
342
+ }));
343
+ }
344
+ shouldManageSelection() {
345
+ this.willManageSelection || (this.willManageSelection = !0, this.manageSelection());
346
+ }
347
+ async manageSelection() {
348
+ if (this.selects == null)
349
+ return;
350
+ this.selectionPromise = new Promise(
351
+ (o) => this.selectionResolver = o
352
+ );
353
+ let e;
354
+ await this.optionsMenu.updateComplete, this.recentlyConnected && (await new Promise((o) => requestAnimationFrame(() => o(!0))), this.recentlyConnected = !1), this.menuItems.forEach((o) => {
355
+ this.value === o.value && !o.disabled ? e = o : o.selected = !1;
356
+ }), e ? (e.selected = !!this.selects, this.selectedItem = e) : (this.value = "", this.selectedItem = void 0), this.open && (await this.optionsMenu.updateComplete, this.optionsMenu.updateSelectedItemIndex()), this.selectionResolver(), this.willManageSelection = !1;
357
+ }
358
+ async getUpdateComplete() {
359
+ const e = await super.getUpdateComplete();
360
+ return await this.selectionPromise, e;
361
+ }
362
+ onScroll() {
363
+ this.dispatchEvent(
364
+ new Event("scroll", {
365
+ cancelable: !0,
366
+ composed: !0
367
+ })
368
+ );
369
+ }
370
+ }
371
+ i([
372
+ h()
373
+ ], t.prototype, "appliedLabel", 2);
374
+ i([
375
+ v("#button")
376
+ ], t.prototype, "button", 2);
377
+ i([
378
+ l({ type: Boolean, reflect: !0 })
379
+ ], t.prototype, "disabled", 2);
380
+ i([
381
+ l({ type: Boolean, reflect: !0 })
382
+ ], t.prototype, "focused", 2);
383
+ i([
384
+ l({ type: String, reflect: !0 })
385
+ ], t.prototype, "icons", 2);
386
+ i([
387
+ l({ type: String, reflect: !0 })
388
+ ], t.prototype, "variant", 2);
389
+ i([
390
+ l({ type: Boolean, reflect: !0 })
391
+ ], t.prototype, "invalid", 2);
392
+ i([
393
+ l({ type: Boolean, reflect: !0 })
394
+ ], t.prototype, "pending", 2);
395
+ i([
396
+ l({ type: String, attribute: "pending-label" })
397
+ ], t.prototype, "pendingLabel", 2);
398
+ i([
399
+ l()
400
+ ], t.prototype, "label", 2);
401
+ i([
402
+ l({ type: Boolean, reflect: !0 })
403
+ ], t.prototype, "open", 2);
404
+ i([
405
+ l({ type: Boolean, reflect: !0 })
406
+ ], t.prototype, "readonly", 2);
407
+ i([
408
+ h()
409
+ ], t.prototype, "labelAlignment", 2);
410
+ i([
411
+ v("luzmo-menu")
412
+ ], t.prototype, "optionsMenu", 2);
413
+ i([
414
+ v("luzmo-overlay")
415
+ ], t.prototype, "overlayElement", 2);
416
+ i([
417
+ l()
418
+ ], t.prototype, "placement", 2);
419
+ i([
420
+ l({ type: Boolean, reflect: !0 })
421
+ ], t.prototype, "quiet", 2);
422
+ i([
423
+ l({ type: String })
424
+ ], t.prototype, "value", 2);
425
+ i([
426
+ l({ attribute: !1 })
427
+ ], t.prototype, "selectedItem", 1);
428
+ i([
429
+ h()
430
+ ], t.prototype, "selectedItemContent", 1);
431
+ class X extends t {
432
+ constructor() {
433
+ super(...arguments), this.handleKeydown = (e) => {
434
+ const { code: o } = e;
435
+ if (this.focused = !0, !o.startsWith("Arrow") || this.readonly || this.pending)
436
+ return;
437
+ if (o === "ArrowUp" || o === "ArrowDown") {
438
+ this.toggle(!0), e.preventDefault();
439
+ return;
440
+ }
441
+ e.preventDefault();
442
+ const r = this.selectedItem ? this.menuItems.indexOf(this.selectedItem) : -1, c = r < 0 || o === "ArrowRight" ? 1 : -1;
443
+ let a = r + c;
444
+ for (; this.menuItems[a] && this.menuItems[a].disabled; )
445
+ a += c;
446
+ !this.menuItems[a] || this.menuItems[a].disabled || (!this.value || a !== r) && this.setValueFromItem(this.menuItems[a]);
447
+ };
448
+ }
449
+ static get styles() {
450
+ return [f(E)];
451
+ }
452
+ get containerStyles() {
453
+ const e = super.containerStyles;
454
+ return this.quiet || (e["min-width"] = `${this.offsetWidth}px`), e;
455
+ }
456
+ }
457
+ export {
458
+ m as D,
459
+ t as L,
460
+ X as a
461
+ };