@luzmo/lucero 1.0.1-alpha.9 → 1.0.2
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.
- package/README.md +74 -9
- package/components/accordion/index.cjs +1 -26
- package/components/accordion/index.js +8 -164
- package/components/accordion-BHBIfsLU.cjs +43 -0
- package/components/accordion-DC7cjb1c.js +152 -0
- package/components/action-bar/index.cjs +1 -22
- package/components/action-bar/index.js +8 -90
- package/components/action-bar-BMHZ4e_p.cjs +39 -0
- package/components/action-bar-CmLjsljR.js +92 -0
- package/components/action-button/index.cjs +1 -7
- package/components/action-button/index.js +8 -144
- package/components/action-button-B4_UEJle.js +121 -0
- package/components/action-button-G0PWSrZo.cjs +24 -0
- package/components/action-group/index.cjs +1 -1
- package/components/action-group/index.js +11 -12
- package/components/action-group-CH8FTW0i.cjs +20 -0
- package/components/action-group-DYKpp-mz.js +211 -0
- package/components/action-menu/index.cjs +1 -39
- package/components/action-menu/index.js +8 -109
- package/components/action-menu-CJyB0mmO.cjs +56 -0
- package/components/action-menu-FiS1vhW7.js +105 -0
- package/components/avatar/avatar.d.ts +5 -0
- package/components/avatar/index.cjs +1 -7
- package/components/avatar/index.js +8 -64
- package/components/avatar-CyY_ZSD0.js +65 -0
- package/components/avatar-PulwjkMI.cjs +24 -0
- package/components/badge/badge.d.ts +35 -0
- package/components/{random-id-CqvckpWe.cjs → badge/index.cjs} +1 -1
- package/components/badge/index.d.ts +8 -0
- package/components/badge/index.js +25 -0
- package/components/badge-D1Ry32wi.cjs +23 -0
- package/components/badge-D6p2hPj8.js +94 -0
- package/components/button/button-base.d.ts +16 -0
- package/components/button/button.d.ts +38 -2
- package/components/button/index.cjs +1 -3
- package/components/button/index.js +9 -110
- package/components/button-CRNRP8P0.js +115 -0
- package/components/button-D3ZTogni.cjs +20 -0
- package/components/button-base-BYV3Lp3P.cjs +25 -0
- package/components/button-base-SHgEJgk2.js +123 -0
- package/components/button-group/index.cjs +1 -1
- package/components/button-group/index.js +8 -42
- package/components/button-group-CJVpgiLq.js +46 -0
- package/components/button-group-rEK_YaF3.cjs +18 -0
- package/components/calendar/calendar.d.ts +67 -0
- package/components/calendar/index.cjs +1 -1
- package/components/calendar/index.d.ts +1 -0
- package/components/calendar/index.js +8 -11
- package/components/calendar-CKr5T_zV.js +619 -0
- package/components/calendar-WRhzTEyZ.cjs +142 -0
- package/components/chat-message/chat-message.d.ts +139 -0
- package/components/{random-id-ByCz1xaq.js → chat-message/index.cjs} +1 -9
- package/components/chat-message/index.d.ts +8 -0
- package/components/chat-message/index.js +25 -0
- package/components/chat-message-CNE-mGuP.cjs +149 -0
- package/components/chat-message-DJgocVNj.js +2295 -0
- package/components/chat-message-group/chat-message-group.d.ts +50 -0
- package/components/{when-CDZyJPvd.cjs → chat-message-group/index.cjs} +1 -5
- package/components/chat-message-group/index.d.ts +7 -0
- package/components/chat-message-group/index.js +25 -0
- package/components/chat-message-group-B4U2MzHx.js +100 -0
- package/components/chat-message-group-COmhCN-R.cjs +24 -0
- package/components/checkbox/checkbox.d.ts +7 -0
- package/components/checkbox/index.cjs +1 -8
- package/components/checkbox/index.js +8 -79
- package/components/checkbox-CPS-tR_i.js +89 -0
- package/components/checkbox-DFwDrIdY.cjs +25 -0
- package/components/checkbox-mixin-C5sLMo5L.js +67 -0
- package/components/{checkbox-mixin-BDN0dBtS.cjs → checkbox-mixin-D4HeLrMj.cjs} +3 -3
- package/components/chunk-D-qHiVGv.cjs +18 -0
- package/components/close-button-BeXYep8K.js +42 -0
- package/components/close-button-BzapEpcF.cjs +18 -0
- package/components/color-area/index.cjs +1 -63
- package/components/color-area/index.js +8 -364
- package/components/color-area-DA3ps2-c.cjs +80 -0
- package/components/color-area-DViRjuKo.js +300 -0
- package/components/color-controller-DueaXfnX.cjs +18 -0
- package/components/color-controller-G2_v2xSl.js +247 -0
- package/components/color-field/color-field.d.ts +1 -0
- package/components/color-field/index.cjs +1 -6
- package/components/color-field/index.js +8 -68
- package/components/color-field-CxdIoSq6.js +75 -0
- package/components/color-field-D7_7z2A2.cjs +23 -0
- package/components/color-handle/index.cjs +1 -7
- package/components/color-handle/index.js +8 -56
- package/components/color-handle-BOusOFFx.js +62 -0
- package/components/color-handle-Cka48yPY.cjs +24 -0
- package/components/color-loupe/index.cjs +1 -1
- package/components/color-loupe/index.js +11 -12
- package/components/color-loupe-DMk8uWZW.cjs +56 -0
- package/components/color-loupe-bEzi2P0y.js +76 -0
- package/components/color-menu/index.cjs +1 -69
- package/components/color-menu/index.js +8 -189
- package/components/color-menu-DwbTxeqv.cjs +89 -0
- package/components/color-menu-Lxc9PTzl.js +183 -0
- package/components/color-palette/index.cjs +1 -1
- package/components/color-palette/index.js +8 -71
- package/components/color-palette-349EkPMg.cjs +18 -0
- package/components/color-palette-BAdaNySC.js +80 -0
- package/components/color-palette-group/index.cjs +1 -11
- package/components/color-palette-group/index.js +8 -188
- package/components/color-palette-group-BvP09zmT.cjs +28 -0
- package/components/color-palette-group-D8Mavsd2.js +163 -0
- package/components/color-picker/color-picker.d.ts +3 -3
- package/components/color-picker/index.cjs +1 -31
- package/components/color-picker/index.js +8 -128
- package/components/color-picker-CSWiU-X5.cjs +48 -0
- package/components/color-picker-DqjfTvYf.js +126 -0
- package/components/color-slider/index.cjs +1 -1
- package/components/color-slider/index.js +8 -11
- package/components/color-slider-DxjJ72ue.cjs +57 -0
- package/components/color-slider-ihAIFt5p.js +421 -0
- package/components/{condition-attribute-with-id-Dv4lSRbe.js → condition-attribute-with-id-DauPaLSS.cjs} +1 -14
- package/components/{query-assigned-nodes-C76XVPWY.js → condition-attribute-with-id-Duo51HZ7.js} +10 -18
- package/components/date-range-picker/date-range-picker.d.ts +184 -0
- package/components/{if-defined-C9YGdo33.cjs → date-range-picker/index.cjs} +1 -5
- package/components/date-range-picker/index.d.ts +8 -0
- package/components/date-range-picker/index.js +25 -0
- package/components/date-range-picker/types.d.ts +16 -0
- package/components/date-range-picker-BdRQep--.js +626 -0
- package/components/date-range-picker-CgitOe0i.cjs +187 -0
- package/components/date-time-picker/date-time-picker.d.ts +3 -3
- package/components/date-time-picker/index.cjs +1 -88
- package/components/date-time-picker/index.d.ts +1 -0
- package/components/date-time-picker/index.js +8 -1109
- package/components/date-time-picker/{types.d.ts → shared/types.d.ts} +1 -1
- package/components/date-time-picker-Bz8XwSOR.cjs +105 -0
- package/components/date-time-picker-Ct_ln8Ot.js +470 -0
- package/components/decorate-B2wePfNm.cjs +18 -0
- package/components/decorate-aGxJUVxg.js +91 -0
- package/components/{condition-attribute-with-id-DrQYZzFS.cjs → dependency-manger-CHy9t__e.cjs} +1 -1
- package/components/dependency-manger-DMrulWcJ.js +40 -0
- package/components/divider/index.cjs +1 -1
- package/components/divider/index.js +8 -44
- package/components/divider-Dn8XqbB6.cjs +18 -0
- package/components/divider-cU0lVwOp.js +59 -0
- package/components/divider.module-C65RfSUa.js +21 -0
- package/components/divider.module-CL60P_z8.cjs +18 -0
- package/components/element-resolution-Bs1x89vU.js +80 -0
- package/components/element-resolution-C0aiOB0Y.cjs +18 -0
- package/components/field-group/index.cjs +1 -1
- package/components/field-group/index.js +11 -12
- package/components/field-group-C7ROsWq3.js +57 -0
- package/components/field-group-OcI5Lgu7.cjs +23 -0
- package/components/field-label/index.cjs +1 -1
- package/components/field-label/index.js +11 -12
- package/components/field-label-BCl6R1uO.cjs +25 -0
- package/components/field-label-CtGCEmdp.js +87 -0
- package/components/focus-group-BshI1RpM.js +164 -0
- package/components/focus-group-SF8Kj7iB.cjs +18 -0
- package/components/focus-visible-B0NNezGc.cjs +18 -0
- package/components/focus-visible-CrooVCUu.js +58 -0
- package/components/focusable-BmS8IzhH.js +117 -0
- package/components/focusable-CupEoHmn.cjs +18 -0
- package/components/{base-BjTwmyRF.cjs → focusable-selectors-5n5liBn0.cjs} +1 -5
- package/components/{focusable-selectors-BgFlyFcY.cjs → focusable-selectors-Bg60_Kra.js} +13 -1
- package/components/{state-Deh-vKYE.js → get-label-from-slot-5vVnfSgN.js} +7 -11
- package/components/get-label-from-slot-LO_DZP60.cjs +18 -0
- package/components/icon/index.cjs +1 -1
- package/components/icon/index.js +8 -71
- package/components/icon-B7hKwn_q.cjs +18 -0
- package/components/icon-CwBAE1eU.js +59 -0
- package/components/index.cjs +1 -1
- package/components/index.js +78 -176
- package/components/infield-button/index.cjs +1 -5
- package/components/infield-button/index.js +8 -47
- package/components/infield-button-B2z0dLzq.js +54 -0
- package/components/infield-button-BVKotWqr.cjs +22 -0
- package/components/label/index.cjs +1 -1
- package/components/label/index.js +8 -34
- package/components/label-ClJE2esm.js +41 -0
- package/components/label-CqolZbJo.cjs +18 -0
- package/components/language-resolution-BYemISJC.cjs +18 -0
- package/components/language-resolution-BpfGTC29.js +43 -0
- package/components/like-anchor-BZJXts_H.cjs +32 -0
- package/components/like-anchor-DeOXX-MX.js +46 -0
- package/components/manage-help-text-CF0xBh0F.js +81 -0
- package/components/manage-help-text-D9VbYRf_.cjs +30 -0
- package/components/menu/index.cjs +1 -66
- package/components/menu/index.js +8 -879
- package/components/menu/menu-item.d.ts +8 -1
- package/components/menu/menu.d.ts +1 -0
- package/components/menu--ukVtSq7.js +749 -0
- package/components/menu-DAA51y45.cjs +108 -0
- package/components/multi-language-field/index.cjs +1 -22
- package/components/multi-language-field/index.js +8 -131
- package/components/multi-language-field/multi-language-field.d.ts +1 -0
- package/components/multi-language-field-BzY75rOY.js +122 -0
- package/components/multi-language-field-DmoMyCBH.cjs +40 -0
- package/components/number-field/index.cjs +1 -40
- package/components/number-field/index.js +8 -453
- package/components/number-field/number-field.d.ts +145 -0
- package/components/number-field-B4RSFeTR.cjs +57 -0
- package/components/number-field-C66dTUMM.js +402 -0
- package/components/observe-slot-presence-BCqd3VSd.js +55 -0
- package/components/observe-slot-presence-Dx8hzNzK.cjs +18 -0
- package/components/observe-slot-text-BhTcGuHY.cjs +18 -0
- package/components/observe-slot-text-Ddf1OC6F.js +71 -0
- package/components/options/index.cjs +1 -84
- package/components/options/index.js +8 -1160
- package/components/options/option.d.ts +16 -0
- package/components/options/options.d.ts +44 -4
- package/components/options-BPNAm4MW.cjs +101 -0
- package/components/options-Dz-ejkxF.js +484 -0
- package/components/overlay/index.cjs +1 -56
- package/components/overlay/index.js +10 -329
- package/components/overlay/overlay.d.ts +12 -1
- package/components/overlay/virtual-trigger.d.ts +3 -2
- package/components/overlay-8tN0KPbR.js +1115 -0
- package/components/overlay-CMd2Dnpv.cjs +73 -0
- package/components/overlay-CwR_36OV.js +227 -0
- package/components/overlay-DdrfkOry.cjs +47 -0
- package/components/pending-state-DFcNf5rd.js +50 -0
- package/components/{pending-state-CaH1si5b.cjs → pending-state-DIeF18qg.cjs} +4 -3
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +11 -15
- package/components/picker/picker.d.ts +1 -0
- package/components/picker-C4RVOxLq.cjs +123 -0
- package/components/picker-agQW7YNo.js +394 -0
- package/components/picker-button/index.cjs +1 -20
- package/components/picker-button/index.js +8 -70
- package/components/picker-button-BLbeT3Yu.js +72 -0
- package/components/picker-button-D34YXyXp.cjs +37 -0
- package/components/platform-B7Sk7Qon.cjs +18 -0
- package/components/{platform-BM-uMWpX.js → platform-D4V_cOJF.js} +29 -38
- package/components/popover/index.cjs +1 -1
- package/components/popover/index.js +11 -12
- package/components/popover-DyC9xGhX.js +58 -0
- package/components/popover-dgL04x6P.cjs +30 -0
- package/components/progress-bar/index.cjs +18 -0
- package/components/progress-bar/index.d.ts +7 -0
- package/components/progress-bar/index.js +25 -0
- package/components/progress-bar/progress-bar.d.ts +34 -0
- package/components/progress-bar-BR28tISC.cjs +31 -0
- package/components/progress-bar-DHgFRml1.js +119 -0
- package/components/progress-circle/index.cjs +1 -1
- package/components/progress-circle/index.js +11 -12
- package/components/progress-circle-Cg_ua9Ff.js +78 -0
- package/components/progress-circle-DuzwUiGN.cjs +33 -0
- package/components/progress-steps/index.cjs +18 -0
- package/components/progress-steps/index.d.ts +8 -0
- package/components/progress-steps/index.js +25 -0
- package/components/progress-steps/progress-steps.d.ts +148 -0
- package/components/progress-steps/types.d.ts +32 -0
- package/components/progress-steps-Da8aZWx3.js +262 -0
- package/components/progress-steps-WriXaZpE.cjs +96 -0
- package/components/prompt-box/controllers/attachments-controller.d.ts +35 -0
- package/components/prompt-box/controllers/recording-controller.d.ts +23 -0
- package/components/prompt-box/controllers/rich-input-controller.d.ts +89 -0
- package/components/prompt-box/controllers/trigger-menu-controller.d.ts +107 -0
- package/components/prompt-box/index.cjs +18 -0
- package/components/prompt-box/index.d.ts +9 -0
- package/components/prompt-box/index.js +25 -0
- package/components/prompt-box/keyboard-focus-tracker.d.ts +3 -0
- package/components/prompt-box/prompt-box-templates.d.ts +10 -0
- package/components/prompt-box/prompt-box.d.ts +194 -0
- package/components/prompt-box/range-from-point.d.ts +21 -0
- package/components/prompt-box/selection-utils.d.ts +39 -0
- package/components/prompt-box/slot-state-sync.d.ts +10 -0
- package/components/prompt-box/types.d.ts +112 -0
- package/components/prompt-box-BEloQP-R.js +1506 -0
- package/components/prompt-box-DV8Smf3Q.cjs +282 -0
- package/components/radio/index.cjs +1 -5
- package/components/radio/index.js +8 -174
- package/components/radio-BzEPGUmQ.js +141 -0
- package/components/radio-d-2GUbYE.cjs +22 -0
- package/components/{if-defined-DOaE2coe.js → random-id-B51lUxUB.cjs} +1 -10
- package/components/{when-CDK1Tt5Y.js → random-id-Dd4boCPV.js} +5 -10
- package/components/{focusable-selectors-B4YgbghQ.js → rolldown-runtime-CAFD8bLK.js} +10 -13
- package/components/roving-tabindex-B7x5ePUB.cjs +18 -0
- package/components/roving-tabindex-BP6mQbXf.js +62 -0
- package/components/{directive-oAbCiebi.js → scaled-indicator-BcO2BOsf.js} +24 -26
- package/components/scaled-indicator-p8-3k2cJ.cjs +26 -0
- package/components/search/index.cjs +1 -28
- package/components/search/index.js +8 -114
- package/components/search-CmLfd2dF.js +94 -0
- package/components/search-DRTD4xsE.cjs +45 -0
- package/components/segments-factory-CHo9oQw7.cjs +18 -0
- package/components/segments-factory-D0IveW-q.js +417 -0
- package/components/select/index.cjs +1 -140
- package/components/select/index.js +8 -602
- package/components/select/select.d.ts +26 -17
- package/components/select--vrG59GQ.cjs +158 -0
- package/components/select-DPeI0jP9.js +518 -0
- package/components/{language-resolution-8yZa5r_P.js → sized-mixin-DaBoZkVS.js} +38 -35
- package/components/sized-mixin-StFA4y0J.cjs +18 -0
- package/components/skeleton-loader/index.cjs +18 -0
- package/components/skeleton-loader/index.d.ts +7 -0
- package/components/skeleton-loader/index.js +25 -0
- package/components/skeleton-loader/skeleton-loader.d.ts +22 -0
- package/components/skeleton-loader-B8NgELvX.cjs +18 -0
- package/components/skeleton-loader-C1XG3m_u.js +46 -0
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +8 -1141
- package/components/slider/slider.d.ts +2 -0
- package/components/slider-3QBnq0S8.js +96 -0
- package/components/slider-uXRKcOz5.cjs +18 -0
- package/components/slottable-request-event-DZ2Z_BLk.js +29 -0
- package/components/{base-D76d76ww.js → slottable-request-event-gAcEQan2.cjs} +1 -9
- package/components/status-light/index.cjs +18 -0
- package/components/status-light/index.d.ts +8 -0
- package/components/status-light/index.js +25 -0
- package/components/status-light/status-light.d.ts +26 -0
- package/components/status-light-Bf8jGu4G.js +85 -0
- package/components/status-light-CBaAFRUc.cjs +21 -0
- package/components/strategies-DhxJGIZT.js +137 -0
- package/components/strategies-kuvLVIKO.cjs +18 -0
- package/components/streaming-listener-2NcP7ys7.js +77 -0
- package/components/streaming-listener-BnDW38lt.cjs +18 -0
- package/components/suggestion/index.cjs +18 -0
- package/components/suggestion/index.d.ts +8 -0
- package/components/suggestion/index.js +25 -0
- package/components/suggestion/suggestion.d.ts +45 -0
- package/components/suggestion-CEJiW_7y.cjs +23 -0
- package/components/suggestion-DK5gxxDI.js +76 -0
- package/components/swatch/index.cjs +1 -32
- package/components/swatch/index.js +8 -325
- package/components/swatch-BLuV-hlF.js +271 -0
- package/components/swatch-G70JUe6I.cjs +49 -0
- package/components/switch/index.cjs +1 -5
- package/components/switch/index.js +8 -56
- package/components/switch-BdE-hI69.js +60 -0
- package/components/switch-KzkrF-ob.cjs +22 -0
- package/components/tabs/index.cjs +1 -76
- package/components/tabs/index.js +8 -619
- package/components/tabs/tabs.d.ts +3 -9
- package/components/tabs-BfTgzdid.cjs +76 -0
- package/components/tabs-BthdwrmW.js +434 -0
- package/components/tags/index.cjs +1 -15
- package/components/tags/index.d.ts +1 -0
- package/components/tags/index.js +8 -156
- package/components/tags/tag.d.ts +28 -0
- package/components/tags/tags.d.ts +3 -1
- package/components/tags-B89eYzsB.js +203 -0
- package/components/tags-OBPAvjdV.cjs +47 -0
- package/components/text-field/index.cjs +1 -4
- package/components/text-field/index.js +9 -45
- package/components/text-field/text-field.d.ts +27 -0
- package/components/text-field-A4Obzs4l.cjs +21 -0
- package/components/text-field-BoGAvXvh.js +44 -0
- package/components/text-field-Cs8HYRYL.js +256 -0
- package/components/text-field-FJr8ZUhI.cjs +81 -0
- package/components/text-field.module-Btsve-VN.js +21 -0
- package/components/text-field.module-D5oDP7MB.cjs +18 -0
- package/components/toast/index.cjs +1 -34
- package/components/toast/index.js +8 -136
- package/components/toast-CJSQUzoW.cjs +51 -0
- package/components/toast-DKwphMrp.js +133 -0
- package/components/tooltip/index.cjs +1 -28
- package/components/tooltip/index.js +8 -205
- package/components/tooltip/tooltip.d.ts +12 -1
- package/components/tooltip-C3O4AQ1l.js +192 -0
- package/components/tooltip-DY1trLtg.cjs +45 -0
- package/components/top-nav/index.cjs +18 -0
- package/components/top-nav/index.d.ts +10 -0
- package/components/top-nav/index.js +25 -0
- package/components/top-nav/top-nav-item.d.ts +26 -0
- package/components/top-nav/top-nav.d.ts +45 -0
- package/components/top-nav-DVQ5ASMa.js +203 -0
- package/components/top-nav-DlTojz8S.cjs +45 -0
- package/components/utils.cjs +1 -1
- package/components/utils.js +8 -25
- package/components/voice-recorder-477xPHRU.js +134 -0
- package/components/voice-recorder-BUtmSvPO.cjs +18 -0
- package/custom-elements.json +1 -1
- package/index.d.ts +11 -1
- package/package.json +134 -5
- package/utils/button-interaction-controllers/interaction-controller.d.ts +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/scaled-indicator.d.ts +8 -0
- package/utils/voice-recorder.d.ts +121 -0
- package/components/NumberFormatter-DewVDY5w.cjs +0 -18
- package/components/NumberFormatter-DgOUVrge.js +0 -136
- package/components/NumberParser-Dik4a0h-.cjs +0 -18
- package/components/NumberParser-ci9J5EKv.js +0 -173
- package/components/action-group-DBImibFn.js +0 -258
- package/components/action-group-DJGMcRHb.cjs +0 -20
- package/components/async-directive-BX1T1e1_.cjs +0 -22
- package/components/async-directive-BfcqVjDp.js +0 -82
- package/components/base-CBCg3yyw.cjs +0 -40
- package/components/base-WsynuqaS.js +0 -677
- package/components/button-base-DbkDzb71.js +0 -144
- package/components/button-base-XgPLmwP-.cjs +0 -25
- package/components/checkbox-mixin-Do7EgtpQ.js +0 -70
- package/components/class-map-Di1D_rCm.cjs +0 -22
- package/components/class-map-NbVXqBU0.js +0 -51
- package/components/clear-button-DQcRdcUa.js +0 -53
- package/components/clear-button-OFUFFe7G.cjs +0 -18
- package/components/close-button-Cbnb7XXj.cjs +0 -18
- package/components/close-button-CqHYZhum.js +0 -51
- package/components/color-controller-DTp1juRz.js +0 -3198
- package/components/color-controller-_ZwyhvaU.cjs +0 -18
- package/components/color-loupe-CaA_Lfkk.cjs +0 -56
- package/components/color-loupe-CmMsXbjT.js +0 -81
- package/components/dependency-manger-C5HCkMMB.cjs +0 -18
- package/components/dependency-manger-CEXvGQUV.js +0 -54
- package/components/directive-C7oCP5Bh.cjs +0 -22
- package/components/directive-helpers-Cm6gitnu.js +0 -62
- package/components/directive-helpers-DyIRTWwA.cjs +0 -22
- package/components/divider.module-DDvBo9zo.cjs +0 -18
- package/components/divider.module-DoQWQEIJ.js +0 -21
- package/components/element-resolution-BvRLGqIU.cjs +0 -18
- package/components/element-resolution-FCUT-wql.js +0 -91
- package/components/field-group-DXfBWrkO.js +0 -66
- package/components/field-group-DkGst3r5.cjs +0 -23
- package/components/field-label-CZ2zzChK.js +0 -106
- package/components/field-label-mO1AkUgR.cjs +0 -25
- package/components/flow-D-0MTYCm.js +0 -527
- package/components/flow-DM3dNAKs.cjs +0 -30
- package/components/focus-group-DHeTq18L.js +0 -218
- package/components/focus-group-DnxZUBhQ.cjs +0 -18
- package/components/focus-visible-B0P9aY_G.cjs +0 -18
- package/components/focus-visible-DBlJGoEW.js +0 -74
- package/components/focusable-BxtpnzWp.js +0 -153
- package/components/focusable-EbipgXRh.cjs +0 -18
- package/components/index-BwxgAdzi.cjs +0 -57
- package/components/index-Cl54m8Yh.js +0 -1490
- package/components/index-HjQa8tew.js +0 -1174
- package/components/index-Wq3qZJGh.cjs +0 -113
- package/components/language-resolution-DJzmyzZq.cjs +0 -18
- package/components/like-anchor-Bvn_vLQ8.js +0 -69
- package/components/like-anchor-sod1C1fR.cjs +0 -32
- package/components/luzmo-icons-4nDFv1Lq.js +0 -229
- package/components/luzmo-icons-D4IvHgVd.cjs +0 -29
- package/components/manage-help-text-DhgARkZX.cjs +0 -30
- package/components/manage-help-text-syYnjKGL.js +0 -92
- package/components/mutation-controller-DH7YOCyj.js +0 -52
- package/components/mutation-controller-DkOMCW-c.cjs +0 -22
- package/components/observe-slot-presence-CmVi0zTc.js +0 -68
- package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
- package/components/observe-slot-text-BPfIQQtz.js +0 -87
- package/components/observe-slot-text-Ceb7SvYT.cjs +0 -18
- package/components/overlay-Cig9r6uU.js +0 -2747
- package/components/overlay-KSKMzzkh.cjs +0 -47
- package/components/pending-state-DTX7ggyF.js +0 -61
- package/components/picker-BfBP7XJN.js +0 -461
- package/components/picker-xIphqE6d.cjs +0 -123
- package/components/platform-BiXhwqk3.cjs +0 -18
- package/components/popover-DjX0aAnY.js +0 -67
- package/components/popover-KFfO0IYL.cjs +0 -30
- package/components/progress-circle-BvRJNuNo.cjs +0 -33
- package/components/progress-circle-DXH9z8-6.js +0 -97
- package/components/query-BL-TJj7K.cjs +0 -22
- package/components/query-D_KR_GUc.js +0 -51
- package/components/query-assigned-elements-DjfhL1cl.js +0 -36
- package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
- package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
- package/components/roving-tabindex-By_fCy_e.cjs +0 -18
- package/components/roving-tabindex-DOg4z6ZU.js +0 -66
- package/components/sized-mixin-CPxE5C96.cjs +0 -18
- package/components/sized-mixin-D4ACoVUr.js +0 -63
- package/components/slottable-request-event-BfUUt1Mh.cjs +0 -18
- package/components/slottable-request-event-DggLA4Rx.js +0 -31
- package/components/state-D8JEtYqe.cjs +0 -22
- package/components/strategies-9indNIEb.js +0 -195
- package/components/strategies-BACP6MhR.cjs +0 -18
- package/components/streaming-listener-B00MvALi.cjs +0 -18
- package/components/streaming-listener-CP-JE6Fa.js +0 -91
- package/components/style-map-CeilmSgs.cjs +0 -22
- package/components/style-map-IgqIKvlE.js +0 -53
- package/components/text-field-BTkr42k4.cjs +0 -85
- package/components/text-field-ol9Ed5lQ.js +0 -314
- package/components/text-field.module-ColtFhf_.js +0 -21
- package/components/text-field.module-p_VF2tC_.cjs +0 -18
- package/components/unit-input/index.cjs +0 -43
- package/components/unit-input/index.d.ts +0 -7
- package/components/unit-input/index.js +0 -183
- package/components/unit-input/unit-input.d.ts +0 -33
- /package/components/date-time-picker/{helpers.d.ts → shared/helpers.d.ts} +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/date/day-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/date/month-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/date/year-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/date-time-segments.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/editable-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/literal-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/modifiers/clear-modifier.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/modifiers/decrement-modifier.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/modifiers/increment-modifier.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/modifiers/input-modifier.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/modifiers/segments-modifier.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/segments-factory.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/segments-formatter.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/time/day-period-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/time/hour-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/time/millisecond-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/time/minute-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/time/second-segment.d.ts +0 -0
|
@@ -0,0 +1,749 @@
|
|
|
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 { n as e, t } from "./decorate-aGxJUVxg.js";
|
|
19
|
+
import { n } from "./sized-mixin-DaBoZkVS.js";
|
|
20
|
+
import { t as r } from "./focusable-BmS8IzhH.js";
|
|
21
|
+
import { t as i } from "./like-anchor-DeOXX-MX.js";
|
|
22
|
+
import { t as a } from "./observe-slot-text-Ddf1OC6F.js";
|
|
23
|
+
import { t as o } from "./random-id-Dd4boCPV.js";
|
|
24
|
+
import { t as s } from "./observe-slot-presence-BCqd3VSd.js";
|
|
25
|
+
import { t as c } from "./slottable-request-event-DZ2Z_BLk.js";
|
|
26
|
+
import { t as l } from "./dependency-manger-DMrulWcJ.js";
|
|
27
|
+
import { t as u } from "./divider.module-C65RfSUa.js";
|
|
28
|
+
import { html as d, nothing as f, unsafeCSS as p } from "lit";
|
|
29
|
+
import { property as m, query as h, queryAssignedNodes as g, state as _ } from "lit/decorators.js";
|
|
30
|
+
import { luzmoAngleRight as v, luzmoCheck as y, luzmoIcon as b, luzmoInfoCircleOutline as x } from "@luzmo/icons";
|
|
31
|
+
import { MutationController as S } from "@lit-labs/observers/mutation-controller.js";
|
|
32
|
+
//#region src/components/menu/menu.module.scss?inline
|
|
33
|
+
var C = ":host{--menu-item-top-to-action:var(--luzmo-spacing-1);--menu-item-top-to-checkbox:var(--luzmo-spacing-1);--menu-item-label-line-height:var(--luzmo-line-height);--menu-item-label-line-height-cjk:1.5;--menu-item-label-to-description-spacing:1px;--menu-item-focus-indicator-width:var(--luzmo-indicator-width);--menu-item-focus-indicator-color:var(--luzmo-indicator-color);--menu-item-label-to-value-area-min-spacing:var(--luzmo-spacing-3);--menu-item-label-content-color-default:var(--luzmo-font-color);--menu-item-label-content-color-hover:var(--luzmo-font-color-hover);--menu-item-label-content-color-down:var(--luzmo-font-color-down);--menu-item-label-content-color-focus:var(--luzmo-font-color-focus);--menu-item-highlight-label-background-color:var(--luzmo-primary);--menu-item-highlight-label-content-color:var(--luzmo-font-color);--menu-item-highlight-label-content-color-hover:var(--luzmo-font-color-hover);--menu-item-highlight-label-content-color-down:var(--luzmo-font-color-down);--menu-item-highlight-label-content-color-focus:var(--luzmo-font-color-focus);--menu-item-label-icon-color-default:var(--luzmo-font-color);--menu-item-label-icon-color-hover:var(--luzmo-font-color-hover);--menu-item-label-icon-color-down:var(--luzmo-font-color-down);--menu-item-label-icon-color-focus:var(--luzmo-font-color-focus);--menu-item-label-content-color-disabled:var(--luzmo-font-color-disabled);--menu-item-label-icon-color-disabled:var(--luzmo-font-color-disabled);--menu-item-description-line-height:var(--luzmo-line-height);--menu-item-description-line-height-cjk:1.5;--menu-item-description-color-default:var(--luzmo-font-color);--menu-item-description-color-hover:var(--luzmo-font-color-hover);--menu-item-description-color-down:var(--luzmo-font-color-down);--menu-item-description-color-focus:var(--luzmo-font-color-focus);--menu-item-description-color-disabled:var(--luzmo-disabled-color);--menu-section-header-line-height:var(--luzmo-line-height);--menu-section-header-line-height-cjk:1.5;--menu-section-header-font-weight:bold;--menu-section-header-color:var(--luzmo-font-color-down);--menu-collapsible-icon-color:var(--luzmo-font-color-down);--menu-checkmark-icon-color-default:var(--luzmo-primary);--menu-checkmark-icon-color-hover:var(--luzmo-primary-hover);--menu-checkmark-icon-color-down:var(--luzmo-primary-down);--menu-checkmark-icon-color-focus:var(--luzmo-primary-focus);--menu-drillin-icon-color-default:var(--luzmo-font-color);--menu-drillin-icon-color-hover:var(--luzmo-font-color-hover);--menu-drillin-icon-color-down:var(--luzmo-font-color-down);--menu-drillin-icon-color-focus:var(--luzmo-font-color-focus);--menu-item-value-color-default:var(--luzmo-font-color);--menu-item-value-color-hover:var(--luzmo-font-color-hover);--menu-item-value-color-down:var(--luzmo-font-color-down);--menu-item-value-color-focus:var(--luzmo-font-color-focus);--menu-checkmark-display-hidden:none;--menu-checkmark-display-shown:block;--menu-checkmark-display:block;--menu-item-collapsible-no-icon-submenu-item-padding-x-start:28px;--menu-item-background-color-selected:var(--luzmo-background-color);--menu-item-background-color-default:var(--luzmo-background-color);--menu-item-background-color-hover:var(--luzmo-background-color-hover);--menu-item-background-color-down:var(--luzmo-background-color-down);--menu-item-background-color-key-focus:var(--luzmo-background-color-focus);--menu-item-min-height:var(--luzmo-component-height);--menu-max-height:calc(8 * var(--menu-item-min-height));--menu-item-icon-height:var(--luzmo-font-size);--menu-item-icon-width:var(--luzmo-font-size);--menu-item-label-font-size:var(--luzmo-font-size);--menu-item-label-text-to-visual:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--menu-item-label-inline-edge-to-content:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--menu-item-top-edge-to-text:var(--luzmo-spacing-1);--menu-item-bottom-edge-to-text:var(--luzmo-spacing-1);--menu-item-text-to-control:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--menu-item-description-font-size:var(--luzmo-font-size-xs);--menu-section-header-font-size:var(--luzmo-font-size);--menu-section-header-min-width:var(--luzmo-component-height);--menu-item-selectable-edge-to-text-not-selected:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--menu-item-checkmark-size:var(--luzmo-font-size-xs);--menu-item-angle-size:var(--luzmo-font-size);--menu-item-top-to-icon:calc(( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var(--menu-item-bottom-edge-to-text) - var(--menu-item-icon-height) ) / 2);--menu-item-top-to-checkmark:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--menu-back-icon-margin:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1))}:host([size=s]){--menu-item-min-height:var(--luzmo-component-height-s);--menu-item-icon-height:var(--luzmo-font-size-s);--menu-item-icon-width:var(--luzmo-font-size-s);--menu-item-label-font-size:var(--luzmo-font-size-s);--menu-item-label-text-to-visual:var(--luzmo-spacing-3);--menu-item-label-inline-edge-to-content:var(--luzmo-spacing-3);--menu-item-top-edge-to-text:var(--luzmo-spacing-1);--menu-item-bottom-edge-to-text:var(--luzmo-spacing-1);--menu-item-text-to-control:var(--luzmo-spacing-2);--menu-item-description-font-size:var(--luzmo-font-size-xs);--menu-section-header-font-size:var(--luzmo-font-size-s);--menu-section-header-min-width:var(--luzmo-component-height-s);--menu-item-selectable-edge-to-text-not-selected:var(--luzmo-spacing-3);--menu-item-checkmark-size:var(--luzmo-font-size-xs);--menu-item-angle-size:var(--luzmo-font-size-s);--menu-item-top-to-icon:calc(( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var(--menu-item-bottom-edge-to-text) - var(--menu-item-icon-height) ) / 2);--menu-item-top-to-checkmark:var(--luzmo-spacing-3);--menu-back-icon-margin:var(--luzmo-spacing-3)}:host([size=l]){--menu-item-min-height:var(--luzmo-component-height-l);--menu-item-icon-height:var(--luzmo-font-size-l);--menu-item-icon-width:var(--luzmo-font-size-l);--menu-item-label-font-size:var(--luzmo-font-size-l);--menu-item-label-text-to-visual:var(--luzmo-spacing-4);--menu-item-label-inline-edge-to-content:var(--luzmo-spacing-4);--menu-item-top-edge-to-text:var(--luzmo-spacing-2);--menu-item-bottom-edge-to-text:var(--luzmo-spacing-2);--menu-item-text-to-control:var(--luzmo-spacing-3);--menu-item-description-font-size:var(--luzmo-font-size-s);--menu-section-header-font-size:var(--luzmo-font-size-l);--menu-section-header-min-width:var(--luzmo-component-height-l);--menu-item-selectable-edge-to-text-not-selected:var(--luzmo-spacing-4);--menu-item-checkmark-size:var(--luzmo-font-size-s);--menu-item-angle-size:var(--luzmo-font-size-l);--menu-item-top-to-icon:calc(( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var(--menu-item-bottom-edge-to-text) - var(--menu-item-icon-height) ) / 2);--menu-item-top-to-checkmark:var(--luzmo-spacing-4);--menu-back-icon-margin:var(--luzmo-spacing-4)}:host([size=xl]){--menu-item-min-height:var(--luzmo-component-height-xl);--menu-item-icon-height:var(--luzmo-font-size-xl);--menu-item-icon-width:var(--luzmo-font-size-xl);--menu-item-label-font-size:var(--luzmo-font-size-xl);--menu-item-label-text-to-visual:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--menu-item-label-inline-edge-to-content:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--menu-item-top-edge-to-text:var(--luzmo-spacing-2);--menu-item-bottom-edge-to-text:var(--luzmo-spacing-2);--menu-item-text-to-control:var(--luzmo-spacing-4);--menu-item-description-font-size:var(--luzmo-font-size);--menu-section-header-font-size:var(--luzmo-font-size-xl);--menu-section-header-min-width:var(--luzmo-component-height-xl);--menu-item-selectable-edge-to-text-not-selected:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--menu-item-checkmark-size:var(--luzmo-font-size);--menu-item-angle-size:var(--luzmo-font-size-xl);--menu-item-top-to-icon:calc(( var(--menu-item-min-height) - var(--menu-item-top-edge-to-text) - var(--menu-item-bottom-edge-to-text) - var(--menu-item-icon-height) ) / 2);--menu-item-top-to-checkmark:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--menu-back-icon-margin:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1))}:host([variant=highlight]){--menu-item-highlight-label-content-color:var(--luzmo-primary-inverse-color);--menu-checkmark-display:var(--menu-checkmark-display-hidden);--menu-item-highlight-label-content-color-hover:var(--luzmo-primary-inverse-color);--menu-item-highlight-label-content-color-down:var(--luzmo-primary-inverse-color);--menu-item-highlight-label-content-color-focus:var(--luzmo-primary-inverse-color)}:host([variant=highlight]) ::slotted(luzmo-menu-item[selected]){background-color:var(--luzmo-menu-item-highlight-label-background-color,var(--menu-item-highlight-label-background-color,var(--luzmo-border-color)));padding-inline-start:var(--luzmo-menu-item-label-inline-edge-to-content,var(--menu-item-label-inline-edge-to-content))}@media (forced-colors:active){:host{--highcontrast-menu-item-background-color-default:ButtonFace;--highcontrast-menu-item-color-default:ButtonText;--highcontrast-menu-item-background-color-focus:Highlight;--highcontrast-menu-item-color-focus:HighlightText;--highcontrast-menu-checkmark-icon-color-default:Highlight;--highcontrast-menu-item-color-disabled:GrayText;--highcontrast-menu-item-focus-indicator-color:Highlight;--highcontrast-menu-item-selected-background-color:Highlight;--highcontrast-menu-item-selected-color:HighlightText}@supports (color:SelectedItem){:host{--highcontrast-menu-item-selected-background-color:SelectedItem;--highcontrast-menu-item-selected-color:SelectedItemText}}}:host{inline-size:auto;inline-size:var(--luzmo-menu-inline-size,auto);box-sizing:border-box;max-height:var(--luzmo-menu-max-height,var(--menu-max-height));margin:0;padding:0;list-style-type:none;display:inline-block;overflow:auto}:host:lang(ja),:host:lang(ko),:host:lang(zh){--menu-item-label-line-height:var(--luzmo-menu-item-label-line-height-cjk,var(--menu-item-label-line-height-cjk));--menu-item-description-line-height:var(--luzmo-menu-item-description-line-height-cjk,var(--menu-item-description-line-height-cjk));--menu-section-header-line-height:var(--luzmo-menu-section-header-line-height-cjk,var(--menu-section-header-line-height-cjk))}:host([selects]) ::slotted(luzmo-menu-item){--menu-checkmark-display:var(--menu-checkmark-display-hidden);padding-inline-start:var(--luzmo-menu-item-selectable-edge-to-text-not-selected,var(--menu-item-selectable-edge-to-text-not-selected))}:host([selects]) ::slotted(luzmo-menu-item[selected]){--menu-checkmark-display:var(--menu-checkmark-display-shown);padding-inline-start:var(--luzmo-menu-item-label-inline-edge-to-content,var(--menu-item-label-inline-edge-to-content))}.luzmo-Menu-backIcon{margin-block:var(--luzmo-menu-back-icon-margin-block,var(--menu-back-icon-margin));margin-inline:var(--luzmo-menu-back-icon-margin-inline,var(--menu-back-icon-margin));fill:var(--highcontrast-menu-item-color-default,var(--luzmo-menu-back-icon-color-default,var(--menu-section-header-color)));color:var(--highcontrast-menu-item-color-default,var(--luzmo-menu-back-icon-color-default,var(--menu-section-header-color)))}.luzmo-Menu-back:focus-visible{box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width,var(--menu-item-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color,var(--luzmo-menu-item-focus-indicator-color,var(--menu-item-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width,var(--menu-item-focus-indicator-width)) * var(--menu-item-focus-indicator-direction-scalar,1)) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color,var(--luzmo-menu-item-focus-indicator-color,var(--menu-item-focus-indicator-color)))}.luzmo-Menu-sectionHeading{color:var(--highcontrast-menu-item-color-default,var(--luzmo-menu-section-header-color,var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size,var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight,var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height,var(--menu-section-header-line-height));min-inline-size:var(--luzmo-menu-section-header-min-width,var(--menu-section-header-min-width));padding-block-start:var(--luzmo-menu-section-header-top-edge-to-text,var(--luzmo-menu-item-top-edge-to-text,var(--menu-item-top-edge-to-text)));padding-block-end:var(--luzmo-menu-section-header-bottom-edge-to-text,var(--luzmo-menu-item-bottom-edge-to-text,var(--menu-item-bottom-edge-to-text)));padding-inline:var(--luzmo-menu-item-label-inline-edge-to-content,var(--menu-item-label-inline-edge-to-content));grid-area:sectionHeadingArea/1/sectionHeadingArea/-1;display:block}.luzmo-Menu-back{padding-inline:0 var(--luzmo-menu-back-padding-inline-end,var(--menu-item-label-inline-edge-to-content));padding-inline:var(--luzmo-menu-back-padding-inline-start,0) var(--luzmo-menu-back-padding-inline-end,var(--menu-item-label-inline-edge-to-content));padding-block:0;padding-block:var(--luzmo-menu-back-padding-block-start,0) var(--luzmo-menu-back-padding-block-end,0);flex-flow:wrap;align-items:center;display:flex}.luzmo-Menu-back .luzmo-Menu-sectionHeading{padding:0}.luzmo-Menu-backButton{cursor:pointer;background:0 0;border:0;margin:0;padding:0;display:inline-flex}.luzmo-Menu-backButton:focus-visible{outline:var(--luzmo-indicator-width) solid var(--luzmo-indicator-color);outline-offset:calc((var(--luzmo-indicator-width) + 1px) * -1)}.luzmo-Menu-backHeading{color:var(--highcontrast-menu-item-color-default,var(--luzmo-menu-back-heading-color,var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size,var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight,var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height,var(--menu-section-header-line-height));display:block}:host{flex-direction:column;width:100%;display:inline-flex}:host(:focus){outline:none}::slotted(*){flex-shrink:0}";
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/components/menu/menu.ts
|
|
36
|
+
function w(e, t) {
|
|
37
|
+
return !!t && (e === t || e.contains(t));
|
|
38
|
+
}
|
|
39
|
+
var T = class extends n(e, { noDefaultSize: !0 }) {
|
|
40
|
+
static get styles() {
|
|
41
|
+
return [p(C)];
|
|
42
|
+
}
|
|
43
|
+
get isSubmenu() {
|
|
44
|
+
return this.slot === "submenu";
|
|
45
|
+
}
|
|
46
|
+
get selected() {
|
|
47
|
+
return this._selected;
|
|
48
|
+
}
|
|
49
|
+
set selected(e) {
|
|
50
|
+
if (e === this.selected) return;
|
|
51
|
+
let t = this.selected;
|
|
52
|
+
this._selected = e, this.selectedItems = [], this.selectedItemsMap.clear(), this.childItems.forEach((e) => {
|
|
53
|
+
this === e.menuData.selectionRoot && (e.selected = this.selected.includes(e.value), e.selected && (this.selectedItems.push(e), this.selectedItemsMap.set(e, !0)));
|
|
54
|
+
}), this.requestUpdate("selected", t);
|
|
55
|
+
}
|
|
56
|
+
get childItems() {
|
|
57
|
+
return this.cachedChildItems ||= this.updateCachedMenuItems(), this.cachedChildItems;
|
|
58
|
+
}
|
|
59
|
+
get childRole() {
|
|
60
|
+
if (this.resolvedRole === "listbox") return "option";
|
|
61
|
+
switch (this.resolvedSelects) {
|
|
62
|
+
case "single": return "menuitemradio";
|
|
63
|
+
case "multiple": return "menuitemcheckbox";
|
|
64
|
+
default: return "menuitem";
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
get ownRole() {
|
|
68
|
+
return "menu";
|
|
69
|
+
}
|
|
70
|
+
constructor() {
|
|
71
|
+
super(), this.label = "", this.ignore = !1, this.value = "", this.valueSeparator = ",", this.selectedItems = [], this.focusedItemIndex = 0, this.focusInItemIndex = 0, this._selected = [], this.cacheUpdated = Promise.resolve(), this.childItemSet = /* @__PURE__ */ new Set(), this.selectedItemsMap = /* @__PURE__ */ new Map(), this._hasUpdatedSelectedItemIndex = !1, this._willUpdateItems = !1, this.pointerUpTarget = null, this.descendentOverlays = /* @__PURE__ */ new Map(), this.handleSubmenuClosed = (e) => {
|
|
72
|
+
e.stopPropagation(), e.composedPath()[0].dispatchEvent(new Event("luzmo-menu-submenu-closed", {
|
|
73
|
+
bubbles: !0,
|
|
74
|
+
composed: !0
|
|
75
|
+
}));
|
|
76
|
+
}, this.handleSubmenuOpened = (e) => {
|
|
77
|
+
e.stopPropagation(), e.composedPath()[0].dispatchEvent(new Event("luzmo-menu-submenu-opened", {
|
|
78
|
+
bubbles: !0,
|
|
79
|
+
composed: !0
|
|
80
|
+
}));
|
|
81
|
+
let t = this.childItems[this.focusedItemIndex];
|
|
82
|
+
t && (t.focused = !1);
|
|
83
|
+
let n = e.composedPath().find((e) => this.childItemSet.has(e));
|
|
84
|
+
/* c8 ignore next 1 */
|
|
85
|
+
if (!n) return;
|
|
86
|
+
let r = this.childItems.indexOf(n);
|
|
87
|
+
this.focusedItemIndex = r, this.focusInItemIndex = r;
|
|
88
|
+
}, this.resolveCacheUpdated = () => {}, this.addEventListener("luzmo-menu-item-added-or-updated", this.onSelectableItemAddedOrUpdated), this.addEventListener("luzmo-menu-item-added-or-updated", this.onFocusableItemAddedOrUpdated, { capture: !0 }), this.addEventListener("click", this.handleClick), this.addEventListener("pointerup", this.handlePointerup), this.addEventListener("focusin", this.handleFocusin), this.addEventListener("blur", this.handleBlur), this.addEventListener("luzmo-opened", this.handleSubmenuOpened), this.addEventListener("luzmo-closed", this.handleSubmenuClosed);
|
|
89
|
+
}
|
|
90
|
+
focus({ preventScroll: e } = {}) {
|
|
91
|
+
if (this.childItems.every((e) => e.disabled)) return;
|
|
92
|
+
if (this.childItems.some((e) => e.menuData.focusRoot !== this)) {
|
|
93
|
+
super.focus({ preventScroll: e });
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
this.focusMenuItemByOffset(0), super.focus({ preventScroll: e });
|
|
97
|
+
let t = this.selectedItems[0];
|
|
98
|
+
t && !e && t.scrollIntoView({ block: "nearest" });
|
|
99
|
+
}
|
|
100
|
+
handleFocusin(e) {
|
|
101
|
+
if (this.childItems.some((e) => e.menuData.focusRoot !== this)) return;
|
|
102
|
+
let t = this.getRootNode().activeElement, n = this.childItems[this.focusedItemIndex]?.menuData.selectionRoot || this;
|
|
103
|
+
if ((t !== n || e.target !== this) && (n.focus({ preventScroll: !0 }), t && this.focusedItemIndex === 0)) {
|
|
104
|
+
let e = this.childItems.indexOf(t);
|
|
105
|
+
this.focusMenuItemByOffset(Math.max(e, 0));
|
|
106
|
+
}
|
|
107
|
+
this.startListeningToKeyboard();
|
|
108
|
+
}
|
|
109
|
+
startListeningToKeyboard() {
|
|
110
|
+
this.addEventListener("keydown", this.handleKeydown);
|
|
111
|
+
}
|
|
112
|
+
handleBlur(e) {
|
|
113
|
+
w(this, e.relatedTarget) || (this.stopListeningToKeyboard(), this.childItems.forEach((e) => e.focused = !1), this.removeAttribute("aria-activedescendant"));
|
|
114
|
+
}
|
|
115
|
+
stopListeningToKeyboard() {
|
|
116
|
+
this.removeEventListener("keydown", this.handleKeydown);
|
|
117
|
+
}
|
|
118
|
+
selectOrToggleItem(e) {
|
|
119
|
+
let t = this.resolvedSelects, n = new Map(this.selectedItemsMap), r = [...this.selected], i = [...this.selectedItems], a = this.value, o = this.childItems[this.focusedItemIndex];
|
|
120
|
+
if (o && (o.focused = !1, o.active = !1), this.focusedItemIndex = this.childItems.indexOf(e), this.forwardFocusVisibleToItem(e), t === "multiple") {
|
|
121
|
+
this.selectedItemsMap.has(e) ? this.selectedItemsMap.delete(e) : this.selectedItemsMap.set(e, !0);
|
|
122
|
+
let t = [], n = [];
|
|
123
|
+
this.childItemSet.forEach((e) => {
|
|
124
|
+
e.menuData.selectionRoot === this && this.selectedItemsMap.has(e) && (t.push(e.value), n.push(e));
|
|
125
|
+
}), this._selected = t, this.selectedItems = n, this.value = this.selected.join(this.valueSeparator);
|
|
126
|
+
} else this.selectedItemsMap.clear(), this.selectedItemsMap.set(e, !0), this.value = e.value, this._selected = [e.value], this.selectedItems = [e];
|
|
127
|
+
if (!this.dispatchEvent(new Event("change", {
|
|
128
|
+
cancelable: !0,
|
|
129
|
+
bubbles: !0,
|
|
130
|
+
composed: !0
|
|
131
|
+
}))) {
|
|
132
|
+
this._selected = r, this.selectedItems = i, this.selectedItemsMap = n, this.value = a;
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (t === "single") {
|
|
136
|
+
for (let t of n.keys()) t !== e && (t.selected = !1);
|
|
137
|
+
e.selected = !0;
|
|
138
|
+
} else t === "multiple" ? e.selected = !e.selected : !e.hasSubmenu && e?.menuData?.focusRoot === this && this.dispatchEvent(new Event("close", { bubbles: !0 }));
|
|
139
|
+
}
|
|
140
|
+
handleKeydown(e) {
|
|
141
|
+
if (e.defaultPrevented) return;
|
|
142
|
+
let t = this.childItems[this.focusedItemIndex];
|
|
143
|
+
t && (t.focused = !0);
|
|
144
|
+
let { key: n } = e;
|
|
145
|
+
if (e.shiftKey && e.target !== this && this.hasAttribute("tabindex")) {
|
|
146
|
+
this.removeAttribute("tabindex");
|
|
147
|
+
let e = (t) => {
|
|
148
|
+
!t.shiftKey && !this.hasAttribute("tabindex") && (this.tabIndex = 0, document.removeEventListener("keyup", e), this.removeEventListener("focusout", e));
|
|
149
|
+
};
|
|
150
|
+
document.addEventListener("keyup", e), this.addEventListener("focusout", e);
|
|
151
|
+
}
|
|
152
|
+
if (n === "Tab") {
|
|
153
|
+
this.prepareToCleanUp();
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
if (n === " " && t?.hasSubmenu) {
|
|
157
|
+
t.openOverlay();
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
if (n === " " || n === "Enter") {
|
|
161
|
+
let t = this.childItems[this.focusedItemIndex];
|
|
162
|
+
t && t.menuData.selectionRoot === e.target && (e.preventDefault(), t.click());
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
if (n === "ArrowDown" || n === "ArrowUp") {
|
|
166
|
+
let t = this.childItems[this.focusedItemIndex];
|
|
167
|
+
t && t.menuData.selectionRoot === e.target && this.navigateWithinMenu(e);
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (n === "Home" || n === "End") {
|
|
171
|
+
let t = this.childItems[this.focusedItemIndex];
|
|
172
|
+
if (t && t.menuData.selectionRoot === e.target) {
|
|
173
|
+
e.preventDefault(), e.stopPropagation();
|
|
174
|
+
let t = this.childItems[this.focusedItemIndex];
|
|
175
|
+
t && (t.focused = !1, t.active = t.open), this.focusedItemIndex = n === "Home" ? this.childItems.length - 1 : 0, this.focusMenuItemByOffset(n === "Home" ? 1 : -1).scrollIntoView({ block: "nearest" });
|
|
176
|
+
}
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
if (n.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
180
|
+
this.handleTypeahead(e);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
this.navigateBetweenRelatedMenus(e);
|
|
184
|
+
}
|
|
185
|
+
focusMenuItemByOffset(e) {
|
|
186
|
+
let t = e || 1, n = this.childItems[this.focusedItemIndex];
|
|
187
|
+
n && (n.focused = !1, n.active = n.open), this.focusedItemIndex = (this.childItems.length + this.focusedItemIndex + e) % this.childItems.length;
|
|
188
|
+
let r = this.childItems[this.focusedItemIndex], i = this.childItems.length;
|
|
189
|
+
for (; r?.disabled && i;) --i, this.focusedItemIndex = (this.childItems.length + this.focusedItemIndex + t) % this.childItems.length, r = this.childItems[this.focusedItemIndex];
|
|
190
|
+
return r?.disabled || this.forwardFocusVisibleToItem(r), r;
|
|
191
|
+
}
|
|
192
|
+
updateSelectedItemIndex() {
|
|
193
|
+
let e = 0, t = /* @__PURE__ */ new Map(), n = [], r = [], i = this.childItems.length;
|
|
194
|
+
for (; i;) {
|
|
195
|
+
--i;
|
|
196
|
+
let a = this.childItems[i];
|
|
197
|
+
a.menuData.selectionRoot === this && ((a.selected || !this._hasUpdatedSelectedItemIndex && this.selected.includes(a.value)) && (e = i, t.set(a, !0), n.unshift(a.value), r.unshift(a)), i !== e && (a.focused = !1));
|
|
198
|
+
}
|
|
199
|
+
r.map((e, t) => {
|
|
200
|
+
t > 0 && (e.focused = !1);
|
|
201
|
+
}), this.selectedItemsMap = t, this._selected = n, this.selectedItems = r, this.value = this.selected.join(this.valueSeparator), this.focusedItemIndex = e, this.focusInItemIndex = e;
|
|
202
|
+
}
|
|
203
|
+
closeDescendentOverlays() {
|
|
204
|
+
this.descendentOverlays.forEach((e) => {
|
|
205
|
+
e.open = !1;
|
|
206
|
+
}), this.descendentOverlays = /* @__PURE__ */ new Map();
|
|
207
|
+
}
|
|
208
|
+
render() {
|
|
209
|
+
return this.renderMenuItemSlot();
|
|
210
|
+
}
|
|
211
|
+
connectedCallback() {
|
|
212
|
+
super.connectedCallback(), !this.hasAttribute("role") && !this.ignore && this.setAttribute("role", this.ownRole), this.updateComplete.then(() => this.updateItemFocus());
|
|
213
|
+
}
|
|
214
|
+
disconnectedCallback() {
|
|
215
|
+
this.cachedChildItems = void 0, this.selectedItems = [], this.selectedItemsMap.clear(), this.childItemSet.clear(), this.descendentOverlays = /* @__PURE__ */ new Map(), super.disconnectedCallback();
|
|
216
|
+
}
|
|
217
|
+
handleDescendentOverlayOpened(e) {
|
|
218
|
+
let t = e.composedPath()[0];
|
|
219
|
+
t.overlayElement && this.descendentOverlays.set(t.overlayElement, t.overlayElement);
|
|
220
|
+
}
|
|
221
|
+
handleDescendentOverlayClosed(e) {
|
|
222
|
+
let t = e.composedPath()[0];
|
|
223
|
+
t.overlayElement && this.descendentOverlays.delete(t.overlayElement);
|
|
224
|
+
}
|
|
225
|
+
navigateWithinMenu(e) {
|
|
226
|
+
let { key: t } = e, n = this.childItems[this.focusedItemIndex], r = t === "ArrowDown" ? 1 : -1, i = this.focusMenuItemByOffset(r);
|
|
227
|
+
i !== n && (e.preventDefault(), e.stopPropagation(), i.scrollIntoView({ block: "nearest" }));
|
|
228
|
+
}
|
|
229
|
+
handleTypeahead(e) {
|
|
230
|
+
let { key: t } = e;
|
|
231
|
+
e.preventDefault(), e.stopPropagation();
|
|
232
|
+
let n = t.toLowerCase(), r = this.focusedItemIndex + 1, i = this.childItems;
|
|
233
|
+
for (let e = 0; e < i.length; e++) {
|
|
234
|
+
let t = (r + e) % i.length, a = i[t], o = (a.textContent || "").trim().toLowerCase();
|
|
235
|
+
if (!a.disabled && o.startsWith(n)) {
|
|
236
|
+
let e = this.childItems[this.focusedItemIndex];
|
|
237
|
+
e && (e.focused = !1, e.active = e.open), this.focusedItemIndex = i.length + t - 1, this.focusMenuItemByOffset(1).scrollIntoView({ block: "nearest" });
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
navigateBetweenRelatedMenus(e) {
|
|
243
|
+
let { key: t } = e, n = this.isLTR && t === "ArrowRight" || !this.isLTR && t === "ArrowLeft", r = this.isLTR && t === "ArrowLeft" || !this.isLTR && t === "ArrowRight" || t === "Escape";
|
|
244
|
+
if (n) {
|
|
245
|
+
let t = this.childItems[this.focusedItemIndex];
|
|
246
|
+
t?.hasSubmenu && (e.stopPropagation(), t.openOverlay());
|
|
247
|
+
} else r && this.isSubmenu && (e.stopPropagation(), this.dispatchEvent(new Event("close", { bubbles: !0 })), this.updateSelectedItemIndex());
|
|
248
|
+
}
|
|
249
|
+
renderMenuItemSlot() {
|
|
250
|
+
return d`
|
|
251
|
+
<slot
|
|
252
|
+
@luzmo-menu-submenu-opened=${this.handleDescendentOverlayOpened}
|
|
253
|
+
@luzmo-menu-submenu-closed=${this.handleDescendentOverlayClosed}
|
|
254
|
+
@slotchange=${this.handleSlotchange}
|
|
255
|
+
></slot>
|
|
256
|
+
`;
|
|
257
|
+
}
|
|
258
|
+
firstUpdated(e) {
|
|
259
|
+
if (super.firstUpdated(e), !this.hasAttribute("tabindex") && !this.ignore) {
|
|
260
|
+
let e = this.getAttribute("role");
|
|
261
|
+
this.tabIndex = e === "group" ? -1 : 0;
|
|
262
|
+
}
|
|
263
|
+
let t = [new Promise((e) => requestAnimationFrame(() => e(!0)))];
|
|
264
|
+
[...this.children].forEach((e) => {
|
|
265
|
+
e.localName === "luzmo-menu-item" && t.push(e.updateComplete);
|
|
266
|
+
}), this.childItemsUpdated = Promise.all(t);
|
|
267
|
+
}
|
|
268
|
+
updated(e) {
|
|
269
|
+
super.updated(e), e.has("selects") && this.hasUpdated && this.selectsChanged(), e.has("label") && (this.label || e.get("label") !== void 0) && (this.label ? this.setAttribute("aria-label", this.label) : this.removeAttribute("aria-label"));
|
|
270
|
+
}
|
|
271
|
+
selectsChanged() {
|
|
272
|
+
let e = [new Promise((e) => requestAnimationFrame(() => e(!0)))];
|
|
273
|
+
this.childItemSet.forEach((t) => {
|
|
274
|
+
e.push(t.triggerUpdate());
|
|
275
|
+
}), this.childItemsUpdated = Promise.all(e);
|
|
276
|
+
}
|
|
277
|
+
async getUpdateComplete() {
|
|
278
|
+
let e = await super.getUpdateComplete();
|
|
279
|
+
return await this.childItemsUpdated, await this.cacheUpdated, e;
|
|
280
|
+
}
|
|
281
|
+
updateCachedMenuItems() {
|
|
282
|
+
if (this.cachedChildItems = [], !this.menuSlot) return [];
|
|
283
|
+
let e = this.menuSlot.assignedElements({ flatten: !0 });
|
|
284
|
+
for (let [t, n] of e.entries()) {
|
|
285
|
+
if (this.childItemSet.has(n)) {
|
|
286
|
+
this.cachedChildItems.push(n);
|
|
287
|
+
continue;
|
|
288
|
+
}
|
|
289
|
+
let r = n.localName === "slot" ? n.assignedElements({ flatten: !0 }) : [...n.querySelectorAll(":scope > *")];
|
|
290
|
+
e.splice(t, 1, n, ...r);
|
|
291
|
+
}
|
|
292
|
+
return this.cachedChildItems;
|
|
293
|
+
}
|
|
294
|
+
onFocusableItemAddedOrUpdated(e) {
|
|
295
|
+
e.menuCascade.set(this, {
|
|
296
|
+
hadFocusRoot: !!e.item.menuData.focusRoot,
|
|
297
|
+
ancestorWithSelects: e.currentAncestorWithSelects
|
|
298
|
+
}), this.selects && (e.currentAncestorWithSelects = this), e.item.menuData.focusRoot = e.item.menuData.focusRoot || this;
|
|
299
|
+
}
|
|
300
|
+
onSelectableItemAddedOrUpdated(e) {
|
|
301
|
+
let t = e.menuCascade.get(this);
|
|
302
|
+
/* c8 ignore next 1 */
|
|
303
|
+
if (!t) return;
|
|
304
|
+
if (e.item.menuData.parentMenu = e.item.menuData.parentMenu || this, t.hadFocusRoot && !this.ignore && (this.tabIndex = -1), this.addChildItem(e.item), this.selects === "inherit") {
|
|
305
|
+
this.resolvedSelects = "inherit";
|
|
306
|
+
let t = e.currentAncestorWithSelects?.ignore;
|
|
307
|
+
this.resolvedRole = t ? "none" : e.currentAncestorWithSelects?.getAttribute("role") || this.getAttribute("role") || void 0;
|
|
308
|
+
} else this.selects ? (this.resolvedRole = this.ignore ? "none" : this.getAttribute("role") || void 0, this.resolvedSelects = this.selects) : (this.resolvedRole = this.ignore ? "none" : this.getAttribute("role") || void 0, this.resolvedSelects = this.resolvedRole === "none" ? "ignore" : "none");
|
|
309
|
+
let n = this.resolvedSelects === "single" || this.resolvedSelects === "multiple";
|
|
310
|
+
e.item.menuData.cleanupSteps.push((e) => this.removeChildItem(e)), (n || !this.selects && this.resolvedSelects !== "ignore") && !e.item.menuData.selectionRoot && (e.item.setRole(this.childRole), e.item.menuData.selectionRoot = e.item.menuData.selectionRoot || this, e.item.selected && (this.selectedItemsMap.set(e.item, !0), this.selectedItems = [...this.selectedItems, e.item], this._selected = [...this.selected, e.item.value], this.value = this.selected.join(this.valueSeparator)));
|
|
311
|
+
}
|
|
312
|
+
addChildItem(e) {
|
|
313
|
+
this.childItemSet.add(e), this.handleItemsChanged();
|
|
314
|
+
}
|
|
315
|
+
async removeChildItem(e) {
|
|
316
|
+
this.childItemSet.delete(e), this.cachedChildItems = void 0, e.focused && (this.handleItemsChanged(), await this.updateComplete, this.focus());
|
|
317
|
+
}
|
|
318
|
+
handleClick(e) {
|
|
319
|
+
if (this.pointerUpTarget === e.target) {
|
|
320
|
+
this.pointerUpTarget = null;
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
this.handlePointerBasedSelection(e);
|
|
324
|
+
}
|
|
325
|
+
handlePointerup(e) {
|
|
326
|
+
this.pointerUpTarget = e.target, this.handlePointerBasedSelection(e);
|
|
327
|
+
}
|
|
328
|
+
handlePointerBasedSelection(e) {
|
|
329
|
+
if (e instanceof MouseEvent && e.button !== 0) return;
|
|
330
|
+
let t = e.composedPath().find((e) => e instanceof Element ? e.getAttribute("role") === this.childRole : !1);
|
|
331
|
+
if (e.defaultPrevented) {
|
|
332
|
+
let e = this.childItems.indexOf(t);
|
|
333
|
+
t?.menuData?.focusRoot === this && e !== -1 && (this.focusedItemIndex = e);
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
if (t?.href && t.href.length > 0) {
|
|
337
|
+
this.dispatchEvent(new Event("change", {
|
|
338
|
+
bubbles: !0,
|
|
339
|
+
composed: !0
|
|
340
|
+
}));
|
|
341
|
+
return;
|
|
342
|
+
} else if (t?.menuData?.selectionRoot === this && this.childItems.length > 0) {
|
|
343
|
+
if (e.preventDefault(), t.hasSubmenu || t.open) return;
|
|
344
|
+
this.selectOrToggleItem(t);
|
|
345
|
+
} else return;
|
|
346
|
+
this.prepareToCleanUp();
|
|
347
|
+
}
|
|
348
|
+
prepareToCleanUp() {
|
|
349
|
+
document.addEventListener("focusout", () => {
|
|
350
|
+
requestAnimationFrame(() => {
|
|
351
|
+
let e = this.childItems[this.focusedItemIndex];
|
|
352
|
+
e && (e.focused = !1, this.updateSelectedItemIndex());
|
|
353
|
+
});
|
|
354
|
+
}, { once: !0 });
|
|
355
|
+
}
|
|
356
|
+
handleItemsChanged() {
|
|
357
|
+
this.cachedChildItems = void 0, this._willUpdateItems || (this._willUpdateItems = !0, this.cacheUpdated = this.updateCache());
|
|
358
|
+
}
|
|
359
|
+
async updateCache() {
|
|
360
|
+
await (this.hasUpdated ? new Promise((e) => requestAnimationFrame(() => e(!0))) : Promise.all([new Promise((e) => requestAnimationFrame(() => e(!0))), this.updateComplete])), this.cachedChildItems === void 0 && (this.updateSelectedItemIndex(), this.updateItemFocus()), this._willUpdateItems = !1;
|
|
361
|
+
}
|
|
362
|
+
updateItemFocus() {
|
|
363
|
+
if (this.childItems.length === 0) return;
|
|
364
|
+
let e = this.childItems[this.focusInItemIndex];
|
|
365
|
+
this.getRootNode().activeElement === e.menuData.focusRoot && this.forwardFocusVisibleToItem(e);
|
|
366
|
+
}
|
|
367
|
+
forwardFocusVisibleToItem(e) {
|
|
368
|
+
!e || e.menuData.focusRoot !== this || (this.closeDescendentOverlays(), e.focused = this.hasVisibleFocusInTree() || !!this.childItems.some((e) => e.hasVisibleFocusInTree()), this.setAttribute("aria-activedescendant", e.id), e.menuData.selectionRoot && e.menuData.selectionRoot !== this && e.menuData.selectionRoot.focus());
|
|
369
|
+
}
|
|
370
|
+
handleSlotchange({ target: e }) {
|
|
371
|
+
let t = e.assignedElements({ flatten: !0 });
|
|
372
|
+
this.childItems.length !== t.length && t.forEach((e) => {
|
|
373
|
+
e.triggerUpdate === void 0 ? e.childItems !== void 0 && e.childItems.forEach((e) => {
|
|
374
|
+
e.triggerUpdate();
|
|
375
|
+
}) : e.triggerUpdate();
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
t([m({
|
|
380
|
+
type: String,
|
|
381
|
+
reflect: !0
|
|
382
|
+
})], T.prototype, "label", void 0), t([m({
|
|
383
|
+
type: Boolean,
|
|
384
|
+
reflect: !0
|
|
385
|
+
})], T.prototype, "ignore", void 0), t([m({
|
|
386
|
+
type: String,
|
|
387
|
+
reflect: !0
|
|
388
|
+
})], T.prototype, "variant", void 0), t([m({
|
|
389
|
+
type: String,
|
|
390
|
+
reflect: !0
|
|
391
|
+
})], T.prototype, "selects", void 0), t([m({ type: String })], T.prototype, "value", void 0), t([m({
|
|
392
|
+
type: String,
|
|
393
|
+
attribute: "value-separator"
|
|
394
|
+
})], T.prototype, "valueSeparator", void 0), t([m({ attribute: !1 })], T.prototype, "selected", null), t([m({ attribute: !1 })], T.prototype, "selectedItems", void 0), t([h("slot:not([name])")], T.prototype, "menuSlot", void 0);
|
|
395
|
+
//#endregion
|
|
396
|
+
//#region src/components/menu/menu-divider.module.scss?inline
|
|
397
|
+
var E = ":host{--menu-divider-thickness:var(--divider-thickness-medium,var(--luzmo-border-width));inline-size:auto;margin-block:var(--luzmo-menu-section-divider-margin-block,max(0px, (var(--menu-item-section-divider-height) - var(--menu-divider-thickness)) / 2));margin-inline:var(--luzmo-menu-item-label-inline-edge-to-content,var(--menu-item-label-inline-edge-to-content));overflow:visible}.luzmo-Menu-back:focus-visible{box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width,var(--menu-item-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color,var(--luzmo-menu-item-focus-indicator-color,var(--menu-item-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width,var(--menu-item-focus-indicator-width)) * var(--menu-item-focus-indicator-direction-scalar,1)) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color,var(--luzmo-menu-item-focus-indicator-color,var(--menu-item-focus-indicator-color)))}.luzmo-Menu-back{padding-inline:0 var(--luzmo-menu-back-padding-inline-end,var(--menu-item-label-inline-edge-to-content));padding-inline:var(--luzmo-menu-back-padding-inline-start,0) var(--luzmo-menu-back-padding-inline-end,var(--menu-item-label-inline-edge-to-content));padding-block:0;padding-block:var(--luzmo-menu-back-padding-block-start,0) var(--luzmo-menu-back-padding-block-end,0);flex-flow:wrap;align-items:center;display:flex}.luzmo-Menu-backButton{cursor:pointer;background:0 0;border:0;margin:0;padding:0;display:inline-flex}.luzmo-Menu-backButton:focus-visible{outline:var(--focus-indicator-width) solid var(--focus-indicator-color);outline-offset:calc((var(--focus-indicator-width) + 1px) * -1)}.luzmo-Menu-backHeading{color:var(--highcontrast-menu-item-color-default,var(--luzmo-menu-back-heading-color,var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size,var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight,var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height,var(--menu-section-header-line-height));display:block}:host{flex-shrink:0;display:block}", D = class extends n(e, { validSizes: [
|
|
398
|
+
"s",
|
|
399
|
+
"m",
|
|
400
|
+
"l"
|
|
401
|
+
] }) {
|
|
402
|
+
static get styles() {
|
|
403
|
+
return [p(u), p(E)];
|
|
404
|
+
}
|
|
405
|
+
firstUpdated(e) {
|
|
406
|
+
super.firstUpdated(e), this.setAttribute("role", "separator");
|
|
407
|
+
}
|
|
408
|
+
}, O = ".luzmo-Menu-back:focus-visible{box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width,var(--menu-item-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color,var(--luzmo-menu-item-focus-indicator-color,var(--menu-item-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width,var(--menu-item-focus-indicator-width)) * var(--menu-item-focus-indicator-direction-scalar,1)) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color,var(--luzmo-menu-item-focus-indicator-color,var(--menu-item-focus-indicator-color)))}.header{color:var(--highcontrast-menu-item-color-default,var(--luzmo-menu-section-header-color,var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size,var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight,var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height,var(--menu-section-header-line-height));min-inline-size:var(--luzmo-menu-section-header-min-width,var(--menu-section-header-min-width));padding-block-start:var(--luzmo-menu-section-header-top-edge-to-text,var(--luzmo-menu-item-top-edge-to-text,var(--menu-item-top-edge-to-text)));padding-block-end:var(--luzmo-menu-section-header-bottom-edge-to-text,var(--luzmo-menu-item-bottom-edge-to-text,var(--menu-item-bottom-edge-to-text)));padding-inline:var(--luzmo-menu-item-label-inline-edge-to-content,var(--menu-item-label-inline-edge-to-content));grid-area:sectionHeadingArea/1/sectionHeadingArea/-1;display:block}.luzmo-Menu-back{padding-inline:0 var(--luzmo-menu-back-padding-inline-end,var(--menu-item-label-inline-edge-to-content));padding-inline:var(--luzmo-menu-back-padding-inline-start,0) var(--luzmo-menu-back-padding-inline-end,var(--menu-item-label-inline-edge-to-content));padding-block:0;padding-block:var(--luzmo-menu-back-padding-block-start,0) var(--luzmo-menu-back-padding-block-end,0);flex-flow:wrap;align-items:center;display:flex}.luzmo-Menu-back .header{padding:0}.luzmo-Menu-backButton{cursor:pointer;background:0 0;border:0;margin:0;padding:0;display:inline-flex}.luzmo-Menu-backButton:focus-visible{outline:var(--focus-indicator-width) solid var(--focus-indicator-color);outline-offset:calc((var(--focus-indicator-width) + 1px) * -1)}.luzmo-Menu-backHeading{color:var(--highcontrast-menu-item-color-default,var(--luzmo-menu-back-heading-color,var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size,var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight,var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height,var(--menu-section-header-line-height));display:block}:host{flex-direction:column;margin:0;display:inline-flex;overflow:visible}[hidden]{display:none!important}", k = class extends T {
|
|
409
|
+
constructor(...e) {
|
|
410
|
+
super(...e), this.headerId = "";
|
|
411
|
+
}
|
|
412
|
+
static get styles() {
|
|
413
|
+
return [...super.styles, p(O)];
|
|
414
|
+
}
|
|
415
|
+
render() {
|
|
416
|
+
return d`
|
|
417
|
+
<span class="header" ?hidden=${!this.headerElement}>
|
|
418
|
+
<slot name="header" @slotchange=${this.updateLabel}></slot>
|
|
419
|
+
</span>
|
|
420
|
+
<luzmo-menu
|
|
421
|
+
size=${this.size}
|
|
422
|
+
.variant=${this.variant}
|
|
423
|
+
.selects=${this.selects}
|
|
424
|
+
ignore
|
|
425
|
+
>${this.renderMenuItemSlot()}</luzmo-menu
|
|
426
|
+
>
|
|
427
|
+
`;
|
|
428
|
+
}
|
|
429
|
+
get ownRole() {
|
|
430
|
+
switch (this.selects) {
|
|
431
|
+
case "multiple":
|
|
432
|
+
case "single":
|
|
433
|
+
case "inherit": return "group";
|
|
434
|
+
default: return "menu";
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
updateLabel() {
|
|
438
|
+
let e = this.headerElements.length > 0 ? this.headerElements[0] : void 0;
|
|
439
|
+
if (e !== this.headerElement) if (this.headerElement && this.headerElement.id === this.headerId && this.headerElement.removeAttribute("id"), e) {
|
|
440
|
+
this.headerId = this.headerId || `luzmo-menu-group-label-${o()}`;
|
|
441
|
+
let t = e.id || this.headerId;
|
|
442
|
+
e.id ||= t, this.setAttribute("aria-labelledby", t);
|
|
443
|
+
} else this.removeAttribute("aria-labelledby");
|
|
444
|
+
this.headerElement = e;
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
t([g({
|
|
448
|
+
slot: "header",
|
|
449
|
+
flatten: !0
|
|
450
|
+
})], k.prototype, "headerElements", void 0), t([_()], k.prototype, "headerElement", void 0);
|
|
451
|
+
//#endregion
|
|
452
|
+
//#region src/components/menu/menu-item.module.scss?inline
|
|
453
|
+
var A = ".checkmark{display:var(--luzmo-menu-checkmark-display,var(--menu-checkmark-display));font-size:var(--luzmo-menu-item-checkmark-size,var(--menu-item-checkmark-size));fill:var(--highcontrast-menu-checkmark-icon-color-default,var(--luzmo-menu-checkmark-icon-color-default,var(--menu-checkmark-icon-color-default)));color:var(--highcontrast-menu-checkmark-icon-color-default,var(--luzmo-menu-checkmark-icon-color-default,var(--menu-checkmark-icon-color-default)));opacity:1;grid-area:checkmarkArea;align-self:start;margin-block-start:calc(var(--luzmo-menu-item-top-to-checkmark,var(--menu-item-top-to-checkmark)) - var(--luzmo-menu-item-top-edge-to-text,var(--menu-item-top-edge-to-text)));margin-inline-end:var(--luzmo-menu-item-text-to-control,var(--menu-item-text-to-control))}.angle{font-size:var(--menu-item-angle-size);grid-area:angleArea;align-self:center;margin-inline-end:var(--luzmo-menu-item-text-to-control,var(--menu-item-text-to-control))}.luzmo-Menu-back:focus-visible{box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width,var(--menu-item-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color,var(--luzmo-menu-item-focus-indicator-color,var(--menu-item-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width,var(--menu-item-focus-indicator-width)) * var(--menu-item-focus-indicator-direction-scalar,1)) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color,var(--luzmo-menu-item-focus-indicator-color,var(--menu-item-focus-indicator-color)))}.luzmo-Menu-backButton:focus-visible{outline:var(--focus-indicator-width) solid var(--focus-indicator-color);outline-offset:calc((var(--focus-indicator-width) + 1px) * -1)}::slotted([slot=icon]){fill:var(--highcontrast-menu-item-color-default,var(--luzmo-menu-item-label-icon-color-default,var(--menu-item-label-icon-color-default)));color:var(--highcontrast-menu-item-color-default,var(--luzmo-menu-item-label-icon-color-default,var(--menu-item-label-icon-color-default)));block-size:var(--luzmo-menu-item-icon-size,var(--menu-item-icon-height));inline-size:var(--luzmo-menu-item-icon-width,var(--menu-item-icon-height));font-size:var(--luzmo-menu-item-icon-size,var(--menu-item-icon-height));text-align:center;--luzmo-icon-vertical-align:0;grid-area:iconArea;align-self:start;margin-block-start:var(--luzmo-menu-item-top-to-icon,var(--menu-item-top-to-icon));margin-inline-end:var(--luzmo-menu-item-label-text-to-visual,var(--menu-item-label-text-to-visual))}:host{cursor:pointer;box-sizing:border-box;background-color:var(--highcontrast-menu-item-background-color-default,var(--luzmo-menu-item-background-color-default,var(--menu-item-background-color-default)));line-height:var(--luzmo-menu-item-label-line-height,var(--menu-item-label-line-height));min-block-size:var(--luzmo-menu-item-min-height,var(--menu-item-min-height));padding-block-start:var(--luzmo-menu-item-top-edge-to-text,var(--menu-item-top-edge-to-text));padding-block-end:var(--luzmo-menu-item-bottom-edge-to-text,var(--menu-item-bottom-edge-to-text));padding-inline:var(--luzmo-menu-item-label-inline-edge-to-content,var(--menu-item-label-inline-edge-to-content));grid-template:\".angleAreaCollapsible.headingIconArea sectionHeadingArea. . .\"\"selectedArea angleAreaCollapsible checkmarkArea iconArea labelArea valueArea actionsArea angleAreaDrillIn\"1fr\". . . .descriptionArea. . .\"\". . . .submenuArea. . .\"\". . . . . . . .\"/auto auto auto auto 1fr auto auto auto;justify-content:start;align-items:center;margin:0;-webkit-text-decoration:none;text-decoration:none;display:grid;position:relative}.luzmo-Menu-itemCheckbox{--luzmo-checkbox-top-to-text:0;--luzmo-checkbox-text-to-control:0;min-block-size:0}.luzmo-Menu-itemCheckbox .luzmo-Checkbox-box{margin-block-start:var(--luzmo-menu-item-top-to-checkbox,var(--menu-item-top-to-checkbox));margin-block-end:0;margin-inline-end:var(--luzmo-menu-item-text-to-control,var(--menu-item-text-to-control))}.luzmo-Menu-itemSwitch{min-block-size:0}.luzmo-Menu-itemSwitch .luzmo-Switch-switch{margin-block-start:var(--luzmo-menu-item-top-to-action,var(--menu-item-top-to-action));margin-block-end:0}#label{grid-area:submenuItemLabelArea}::slotted([slot=value]){grid-area:submenuItemValueArea}:host([focused]),:host(:focus){background-color:var(--highcontrast-menu-item-background-color-focus,var(--luzmo-menu-item-background-color-key-focus,var(--menu-item-background-color-key-focus)));outline:none}:host([focused])>#label,:host(:focus)>#label,:host([focused])>.menu-item-tooltip-icon,:host(:focus)>.menu-item-tooltip-icon{color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-label-content-color-focus,var(--menu-item-label-content-color-focus)))}:host([focused])>[name=description]::slotted(*),:host(:focus)>[name=description]::slotted(*){color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-description-color-focus,var(--menu-item-description-color-focus)))}:host([focused])>::slotted([slot=value]),:host(:focus)>::slotted([slot=value]){color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-value-color-focus,var(--menu-item-value-color-focus)))}:host([focused])>.icon:not(.angle,.checkmark),:host(:focus)>.icon:not(.angle,.checkmark){fill:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-label-icon-color-focus,var(--menu-item-label-icon-color-focus)));color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-label-icon-color-focus,var(--menu-item-label-icon-color-focus)))}:host([focused])>.angle,:host(:focus)>.angle{fill:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-collapsible-icon-color,var(--menu-collapsible-icon-color)));color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-collapsible-icon-color,var(--menu-collapsible-icon-color)))}:host([focused])>.checkmark,:host(:focus)>.checkmark{fill:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-checkmark-icon-color-focus,var(--menu-checkmark-icon-color-focus)));color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-checkmark-icon-color-focus,var(--menu-checkmark-icon-color-focus)))}:is(:host:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),:host([dir=rtl])){--menu-item-focus-indicator-direction-scalar:-1}:host(:is(:active,[active])){background-color:var(--highcontrast-menu-item-background-color-focus,var(--luzmo-menu-item-background-color-down,var(--menu-item-background-color-down)))}:host(:is(:active,[active]))>#label,:host(:is(:active,[active]))>.menu-item-tooltip-icon{color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-label-content-color-down,var(--menu-item-label-content-color-down)))}:host(:is(:active,[active]))>[name=description]::slotted(*){color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-description-color-down,var(--menu-item-description-color-down)))}:host(:is(:active,[active]))>::slotted([slot=value]){color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-value-color-down,var(--menu-item-value-color-down)))}:host(:is(:active,[active]))>.icon:not(.angle,.checkmark){fill:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-label-icon-color-down,var(--menu-item-label-icon-color-down)));color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-label-icon-color-down,var(--menu-item-label-icon-color-down)))}:host(:is(:active,[active]))>.angle{fill:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-collapsible-icon-color,var(--menu-collapsible-icon-color)));color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-collapsible-icon-color,var(--menu-collapsible-icon-color)))}:host(:is(:active,[active]))>.checkmark{fill:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-checkmark-icon-color-down,var(--menu-checkmark-icon-color-down)));color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-checkmark-icon-color-down,var(--menu-checkmark-icon-color-down)))}:host([disabled]),:host([aria-disabled=true]){background-color:initial}:host([disabled]) #label,:host([disabled]) .menu-item-tooltip-icon,:host([disabled]) ::slotted([slot=value]),:host([aria-disabled=true]) #label,:host([aria-disabled=true]) ::slotted([slot=value]){color:var(--highcontrast-menu-item-color-disabled,var(--luzmo-menu-item-label-content-color-disabled,var(--menu-item-label-content-color-disabled)))}:host([disabled]) [name=description]::slotted(*),:host([aria-disabled=true]) [name=description]::slotted(*){color:var(--highcontrast-menu-item-color-disabled,var(--luzmo-menu-item-description-color-disabled,var(--menu-item-description-color-disabled)))}:host([disabled]) ::slotted([slot=icon]),:host([aria-disabled=true]) ::slotted([slot=icon]){color:var(--highcontrast-menu-item-color-disabled,var(--luzmo-menu-item-label-icon-color-disabled,var(--menu-item-label-icon-color-disabled)));fill:var(--highcontrast-menu-item-color-disabled,var(--luzmo-menu-item-label-icon-color-disabled,var(--menu-item-label-icon-color-disabled)))}:host([focused]) .luzmo-Menu-back,:host([focused]){box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width,var(--menu-item-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color,var(--luzmo-menu-item-focus-indicator-color,var(--menu-item-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-menu-item-focus-indicator-width,var(--menu-item-focus-indicator-width)) * var(--menu-item-focus-indicator-direction-scalar,1)) 0 0 0 var(--highcontrast-menu-item-focus-indicator-color,var(--luzmo-menu-item-focus-indicator-color,var(--menu-item-focus-indicator-color)))}:host .is-selectableMultiple{align-items:start}.is-selectableMultiple .luzmo-Menu-itemCheckbox{grid-area:checkmarkArea}.luzmo-Menu-itemSelection{grid-area:selectedArea}#label{--luzmo-switch-control-label-spacing:0;--luzmo-switch-spacing-top-to-label:0;font-size:var(--luzmo-menu-item-label-font-size,var(--menu-item-label-font-size));color:var(--highcontrast-menu-item-color-default,var(--luzmo-menu-item-label-content-color-default,var(--menu-item-label-content-color-default)));-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;grid-area:labelArea}.menu-item-tooltip-icon{color:var(--highcontrast-menu-item-color-default,var(--luzmo-menu-item-label-icon-color-default,var(--menu-item-label-icon-color-default)))}:host([selected]) #label,:host([selected]) .menu-item-tooltip-icon{color:var(--menu-item-highlight-label-content-color)}::slotted([slot=value]){color:var(--highcontrast-menu-item-color-default,var(--luzmo-menu-item-value-color-default,var(--menu-item-value-color-default)));font-size:var(--luzmo-menu-item-label-font-size,var(--menu-item-label-font-size));grid-area:valueArea;justify-self:end}.luzmo-Menu-itemActions,::slotted([slot=value]){align-self:start;margin-inline-start:var(--luzmo-menu-item-label-to-value-area-min-spacing,var(--menu-item-label-to-value-area-min-spacing))}.luzmo-Menu-itemActions{grid-area:actionsArea}[name=description]::slotted(*){color:var(--highcontrast-menu-item-color-default,var(--luzmo-menu-item-description-color-default,var(--menu-item-description-color-default)));font-size:var(--luzmo-menu-item-description-font-size,var(--menu-item-description-font-size));-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;line-height:var(--luzmo-menu-item-description-line-height,var(--menu-item-description-line-height));grid-area:descriptionArea;margin-block-start:var(--luzmo-menu-item-label-to-description-spacing,var(--menu-item-label-to-description-spacing))}:host([no-wrap]) #label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.luzmo-Menu-item--collapsible.is-open{padding-block-end:0}.luzmo-Menu-item--collapsible.is-open .angle{transform:rotate(90deg)}:host([focused]) .luzmo-Menu-item--collapsible.is-open,:host(:is(:active,[active])) .luzmo-Menu-item--collapsible.is-open,.luzmo-Menu-item--collapsible.is-open:focus{background-color:var(--highcontrast-menu-item-background-color-default,var(--luzmo-menu-item-background-color-default,var(--menu-item-background-color-default)))}.luzmo-Menu-item--collapsible ::slotted([slot=icon]){grid-area:headingIconArea}.luzmo-Menu-item--collapsible>::slotted([slot=icon]){padding-block-start:var(--luzmo-menu-section-header-top-edge-to-text,var(--luzmo-menu-item-top-edge-to-text,var(--menu-item-top-edge-to-text)));padding-block-end:var(--luzmo-menu-section-header-bottom-edge-to-text,var(--luzmo-menu-item-bottom-edge-to-text,var(--menu-item-bottom-edge-to-text)))}.luzmo-Menu-item--collapsible .angle{grid-area:angleAreaCollapsible}:host([has-submenu]) .angle{fill:var(--highcontrast-menu-item-color-default,var(--luzmo-menu-drillin-icon-color-default,var(--menu-drillin-icon-color-default)));color:var(--highcontrast-menu-item-color-default,var(--luzmo-menu-drillin-icon-color-default,var(--menu-drillin-icon-color-default)));grid-area:angleAreaDrillIn;margin-inline-start:var(--luzmo-menu-item-label-to-value-area-min-spacing,var(--menu-item-label-to-value-area-min-spacing));margin-inline-end:0}:host([has-submenu]) .is-open{--menu-item-background-color-default:var(--highcontrast-menu-item-selected-background-color,var(--luzmo-menu-item-background-color-hover,var(--menu-item-background-color-hover)))}:host([has-submenu]) .is-open .icon:not(.angle,.checkmark){fill:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-label-icon-color-hover,var(--menu-item-label-icon-color-hover)));color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-label-icon-color-hover,var(--menu-item-label-icon-color-hover)))}:host([has-submenu]) .is-open .angle{fill:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-drillin-icon-color-hover,var(--menu-drillin-icon-color-hover)));color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-drillin-icon-color-hover,var(--menu-drillin-icon-color-hover)))}:host([has-submenu]) .is-open .checkmark{fill:var(--highcontrast-menu-checkmark-icon-color-default,var(--luzmo-menu-checkmark-icon-color-hover,var(--menu-checkmark-icon-color-hover)));color:var(--highcontrast-menu-checkmark-icon-color-default,var(--luzmo-menu-checkmark-icon-color-hover,var(--menu-checkmark-icon-color-hover)))}@media (hover:hover){:host(:hover){background-color:var(--highcontrast-menu-item-background-color-focus,var(--luzmo-menu-item-background-color-hover,var(--menu-item-background-color-hover)))}:host(:hover)>#label,:host(:hover)>.menu-item-tooltip-icon{color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-label-content-color-hover,var(--menu-item-label-content-color-hover)))}:host([selected]:hover)>#label,:host([selected]:hover)>.menu-item-tooltip-icon{color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-highlight-label-content-color,var(--menu-item-highlight-label-content-color)))}:host(:hover)>[name=description]::slotted(*){color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-description-color-hover,var(--menu-item-description-color-hover)))}:host(:hover)>::slotted([slot=value]){color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-value-color-hover,var(--menu-item-value-color-hover)))}:host(:hover)>.icon:not(.angle,.checkmark){fill:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-label-icon-color-hover,var(--menu-item-label-icon-color-hover)));color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-item-label-icon-color-hover,var(--menu-item-label-icon-color-hover)))}:host(:hover)>.angle{fill:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-collapsible-icon-color,var(--menu-collapsible-icon-color)));color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-collapsible-icon-color,var(--menu-collapsible-icon-color)))}:host(:hover)>.checkmark{fill:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-checkmark-icon-color-hover,var(--menu-checkmark-icon-color-hover)));color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-checkmark-icon-color-hover,var(--menu-checkmark-icon-color-hover)))}:host([disabled]:hover),:host([aria-disabled=true]:hover){cursor:default;background-color:initial}:host([disabled]:hover) #label,:host([disabled]:hover) .menu-item-tooltip-icon,:host([disabled]:hover) ::slotted([slot=value]),:host([aria-disabled=true]:hover) #label,:host([aria-disabled=true]:hover) ::slotted([slot=value]){color:var(--highcontrast-menu-item-color-disabled,var(--luzmo-menu-item-label-content-color-disabled,var(--menu-item-label-content-color-disabled)))}:host([disabled]:hover) [name=description]::slotted(*),:host([aria-disabled=true]:hover) [name=description]::slotted(*){color:var(--highcontrast-menu-item-color-disabled,var(--luzmo-menu-item-description-color-disabled,var(--menu-item-description-color-disabled)))}:host([disabled]:hover) ::slotted([slot=icon]),:host([aria-disabled=true]:hover) ::slotted([slot=icon]){color:var(--highcontrast-menu-item-color-disabled,var(--luzmo-menu-item-label-icon-color-disabled,var(--menu-item-label-icon-color-disabled)));fill:var(--highcontrast-menu-item-color-disabled,var(--luzmo-menu-item-label-icon-color-disabled,var(--menu-item-label-icon-color-disabled)))}.luzmo-Menu-item--collapsible.is-open:hover{background-color:var(--highcontrast-menu-item-background-color-default,var(--luzmo-menu-item-background-color-default,var(--menu-item-background-color-default)))}:host([has-submenu]:hover) .angle{fill:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-drillin-icon-color-hover,var(--menu-drillin-icon-color-hover)));color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-drillin-icon-color-hover,var(--menu-drillin-icon-color-hover)))}}:host([has-submenu][focused]) .angle,:host([has-submenu]:focus) .angle{fill:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-drillin-icon-color-focus,var(--menu-drillin-icon-color-focus)));color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-drillin-icon-color-focus,var(--menu-drillin-icon-color-focus)))}:host([has-submenu]:is(:active,[active])) .angle{fill:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-drillin-icon-color-down,var(--menu-drillin-icon-color-down)));color:var(--highcontrast-menu-item-color-focus,var(--luzmo-menu-drillin-icon-color-down,var(--menu-drillin-icon-color-down)))}.luzmo-Menu-back{padding-inline:0 var(--luzmo-menu-back-padding-inline-end,var(--menu-item-label-inline-edge-to-content));padding-inline:var(--luzmo-menu-back-padding-inline-start,0) var(--luzmo-menu-back-padding-inline-end,var(--menu-item-label-inline-edge-to-content));padding-block:0;padding-block:var(--luzmo-menu-back-padding-block-start,0) var(--luzmo-menu-back-padding-block-end,0);flex-flow:wrap;align-items:center;display:flex}.luzmo-Menu-backButton{cursor:pointer;background:0 0;border:0;margin:0;padding:0;display:inline-flex}:host([focused]) .luzmo-Menu-backButton{outline:var(--focus-indicator-width) solid var(--focus-indicator-color);outline-offset:calc((var(--focus-indicator-width) + 1px) * -1)}.luzmo-Menu-backHeading{color:var(--highcontrast-menu-item-color-default,var(--luzmo-menu-back-heading-color,var(--menu-section-header-color)));font-size:var(--luzmo-menu-section-header-font-size,var(--menu-section-header-font-size));font-weight:var(--luzmo-menu-section-header-font-weight,var(--menu-section-header-font-weight));line-height:var(--luzmo-menu-section-header-line-height,var(--menu-section-header-line-height));display:block}:host{text-align:initial;font-family:var(--luzmo-menu-item-font-family,var(--luzmo-font-family))}:host([hidden]){display:none}:host([disabled]){pointer-events:none}:host([disabled]) [name=value]::slotted(*),:host([has-submenu][disabled]) .angle{color:var(--luzmo-menu-item-label-icon-color-disabled,var(--luzmo-disabled-color))}#button{position:absolute;inset:0}.icon-container>svg{vertical-align:top}:host([dir=ltr]) [icon-only]::slotted(:last-of-type){margin-right:auto}:host([dir=rtl]) [icon-only]::slotted(:last-of-type){margin-left:auto}@media (forced-colors:active){:host{forced-color-adjust:none}}::slotted([slot=submenu]){width:max-content;max-width:100%}:host([no-wrap]) #label{display:block}.menu-item-tooltip-container{grid-area:actionsArea;justify-content:center;align-self:center;align-items:center;margin-inline-start:var(--luzmo-menu-item-label-to-value-area-min-spacing,var(--menu-item-label-to-value-area-min-spacing));display:flex}.menu-item-tooltip-container luzmo-tooltip{--tooltip-font-size:var(--luzmo-menu-item-tooltip-font-size,var(--tooltip-font-size))}.menu-item-tooltip-icon-trigger{cursor:default;justify-content:center;align-items:center;display:flex}.menu-item-tooltip-icon{width:.875rem;height:.875rem;font-size:.875rem}", j = 100, M = (e) => d`
|
|
454
|
+
<span class="icon-container icon checkmark ${e.join(" ")}">
|
|
455
|
+
${b(y)}
|
|
456
|
+
</span>
|
|
457
|
+
`, N = (e) => d`
|
|
458
|
+
<span class="icon-container icon angle ${e.join(" ")}">
|
|
459
|
+
${b(v, { className: "indicator" })}
|
|
460
|
+
</span>
|
|
461
|
+
`, P = (e) => d`
|
|
462
|
+
<span class="icon-container icon info ${e.join(" ")}">
|
|
463
|
+
${b(x)}
|
|
464
|
+
</span>
|
|
465
|
+
`, F = class extends Event {
|
|
466
|
+
get item() {
|
|
467
|
+
return this._item;
|
|
468
|
+
}
|
|
469
|
+
constructor(e) {
|
|
470
|
+
super("luzmo-menu-item-added-or-updated", {
|
|
471
|
+
bubbles: !0,
|
|
472
|
+
composed: !0
|
|
473
|
+
}), this.menuCascade = /* @__PURE__ */ new WeakMap(), this.clear(e);
|
|
474
|
+
}
|
|
475
|
+
clear(e) {
|
|
476
|
+
this._item = e, this.currentAncestorWithSelects = void 0, e.menuData = {
|
|
477
|
+
cleanupSteps: [],
|
|
478
|
+
focusRoot: void 0,
|
|
479
|
+
selectionRoot: void 0,
|
|
480
|
+
parentMenu: void 0
|
|
481
|
+
}, this.menuCascade = /* @__PURE__ */ new WeakMap();
|
|
482
|
+
}
|
|
483
|
+
}, I = class extends i(a(s(r, "[slot=\"icon\"]"))) {
|
|
484
|
+
static get styles() {
|
|
485
|
+
return [p(A)];
|
|
486
|
+
}
|
|
487
|
+
get value() {
|
|
488
|
+
return this._value || this.itemText;
|
|
489
|
+
}
|
|
490
|
+
set value(e) {
|
|
491
|
+
e !== this._value && (this._value = e || "", this._value ? this.setAttribute("value", this._value) : this.removeAttribute("value"));
|
|
492
|
+
}
|
|
493
|
+
get itemText() {
|
|
494
|
+
return this.itemChildren.content.reduce((e, t) => e + (t.textContent || "").trim(), "");
|
|
495
|
+
}
|
|
496
|
+
renderTooltip() {
|
|
497
|
+
return this.tooltip ? (this.dependencyManager.add("luzmo-tooltip"), this.dependencyManager.add("luzmo-overlay"), import("./tooltip/index.js"), import("./overlay/index.js"), d`
|
|
498
|
+
<div class="menu-item-tooltip-container">
|
|
499
|
+
<!-- The visible icon that acts as trigger -->
|
|
500
|
+
<div
|
|
501
|
+
class="menu-item-tooltip-icon-trigger"
|
|
502
|
+
id="tooltip-trigger-${this.id}"
|
|
503
|
+
>
|
|
504
|
+
${this.renderInfoIcon(["menu-item-tooltip-icon"])}
|
|
505
|
+
</div>
|
|
506
|
+
|
|
507
|
+
<!-- The overlay that shows the tooltip when hovering the icon -->
|
|
508
|
+
<luzmo-overlay
|
|
509
|
+
trigger="tooltip-trigger-${this.id}@hover"
|
|
510
|
+
placement=${this.tooltipPlacement}
|
|
511
|
+
type="hint"
|
|
512
|
+
?disabled=${!this.dependencyManager.loaded}
|
|
513
|
+
>
|
|
514
|
+
<luzmo-tooltip> ${this.tooltip} </luzmo-tooltip>
|
|
515
|
+
</luzmo-overlay>
|
|
516
|
+
</div>
|
|
517
|
+
`) : f;
|
|
518
|
+
}
|
|
519
|
+
get focusElement() {
|
|
520
|
+
return this;
|
|
521
|
+
}
|
|
522
|
+
get hasIcon() {
|
|
523
|
+
return this.slotContentIsPresent;
|
|
524
|
+
}
|
|
525
|
+
get itemChildren() {
|
|
526
|
+
if (!this.iconSlot || !this.contentSlot) return {
|
|
527
|
+
icon: [],
|
|
528
|
+
content: []
|
|
529
|
+
};
|
|
530
|
+
if (this._itemChildren) return this._itemChildren;
|
|
531
|
+
let e = this.iconSlot.assignedElements().map((e) => {
|
|
532
|
+
let t = e.cloneNode(!0);
|
|
533
|
+
return t.removeAttribute("slot"), t.classList.toggle("icon"), t;
|
|
534
|
+
}), t = this.contentSlot.assignedNodes().map((e) => e.cloneNode(!0));
|
|
535
|
+
return this._itemChildren = {
|
|
536
|
+
icon: e,
|
|
537
|
+
content: t
|
|
538
|
+
}, this._itemChildren;
|
|
539
|
+
}
|
|
540
|
+
constructor() {
|
|
541
|
+
super(), this.active = !1, this.dependencyManager = new l(this), this.focused = !1, this.selected = !1, this._value = "", this.hasSubmenu = !1, this.tooltipPlacement = "top", this.noWrap = !1, this.renderAngleIcon = (e = []) => N(e), this.renderCheckIcon = (e = []) => M(e), this.renderInfoIcon = (e = []) => P(e), this.open = !1, this.handleSlottableRequest = (e) => {
|
|
542
|
+
this.submenuElement?.dispatchEvent(new c(e.name, e.data));
|
|
543
|
+
}, this.proxyFocus = () => {
|
|
544
|
+
this.focus();
|
|
545
|
+
}, this.handleBeforetoggle = (e) => {
|
|
546
|
+
e.newState === "closed" && (this.open = !0, this.overlayElement.manuallyKeepOpen(), this.overlayElement.removeEventListener("beforetoggle", this.handleBeforetoggle));
|
|
547
|
+
}, this.recentlyLeftChild = !1, this.willDispatchUpdate = !1, this.menuData = {
|
|
548
|
+
focusRoot: void 0,
|
|
549
|
+
parentMenu: void 0,
|
|
550
|
+
selectionRoot: void 0,
|
|
551
|
+
cleanupSteps: []
|
|
552
|
+
}, this.addEventListener("click", this.handleClickCapture, { capture: !0 }), new S(this, {
|
|
553
|
+
config: {
|
|
554
|
+
characterData: !0,
|
|
555
|
+
childList: !0,
|
|
556
|
+
subtree: !0
|
|
557
|
+
},
|
|
558
|
+
callback: (e) => {
|
|
559
|
+
e.every((e) => e.target.slot === "submenu") || this.breakItemChildrenCache();
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
click() {
|
|
564
|
+
this.disabled || this.shouldProxyClick() || super.click();
|
|
565
|
+
}
|
|
566
|
+
handleClickCapture(e) {
|
|
567
|
+
if (this.disabled) return e.preventDefault(), e.stopImmediatePropagation(), e.stopPropagation(), !1;
|
|
568
|
+
}
|
|
569
|
+
shouldProxyClick() {
|
|
570
|
+
let e = !1;
|
|
571
|
+
return this.anchorElement && (this.anchorElement.click(), e = !0), e;
|
|
572
|
+
}
|
|
573
|
+
breakItemChildrenCache() {
|
|
574
|
+
this._itemChildren = void 0, this.triggerUpdate();
|
|
575
|
+
}
|
|
576
|
+
renderSubmenu() {
|
|
577
|
+
let e = d`
|
|
578
|
+
<slot
|
|
579
|
+
name="submenu"
|
|
580
|
+
@slotchange=${this.manageSubmenu}
|
|
581
|
+
@luzmo-menu-item-added-or-updated=${{
|
|
582
|
+
handleEvent: (e) => {
|
|
583
|
+
e.clear(e.item);
|
|
584
|
+
},
|
|
585
|
+
capture: !0
|
|
586
|
+
}}
|
|
587
|
+
@focusin=${(e) => e.stopPropagation()}
|
|
588
|
+
></slot>
|
|
589
|
+
`;
|
|
590
|
+
return this.hasSubmenu ? (this.dependencyManager.add("luzmo-overlay"), this.dependencyManager.add("luzmo-popover"), import("./overlay-8tN0KPbR.js").then((e) => e.n), import("./popover-DyC9xGhX.js").then((e) => e.n), d`
|
|
591
|
+
<luzmo-overlay
|
|
592
|
+
.triggerElement=${this}
|
|
593
|
+
?disabled=${!this.hasSubmenu}
|
|
594
|
+
?open=${this.hasSubmenu && this.open && this.dependencyManager.loaded}
|
|
595
|
+
.placement=${this.isLTR ? "right-start" : "left-start"}
|
|
596
|
+
.offset=${[-10, -5]}
|
|
597
|
+
.type=${"auto"}
|
|
598
|
+
@close=${(e) => e.stopPropagation()}
|
|
599
|
+
@slottable-request=${this.handleSlottableRequest}
|
|
600
|
+
>
|
|
601
|
+
<luzmo-popover
|
|
602
|
+
@change=${(e) => {
|
|
603
|
+
this.handleSubmenuChange(e), this.open = !1;
|
|
604
|
+
}}
|
|
605
|
+
@pointerenter=${this.handleSubmenuPointerenter}
|
|
606
|
+
@pointerleave=${this.handleSubmenuPointerleave}
|
|
607
|
+
@luzmo-menu-item-added-or-updated=${(e) => e.stopPropagation()}
|
|
608
|
+
>
|
|
609
|
+
${e}
|
|
610
|
+
</luzmo-popover>
|
|
611
|
+
</luzmo-overlay>
|
|
612
|
+
${this.renderAngleIcon()}
|
|
613
|
+
`) : e;
|
|
614
|
+
}
|
|
615
|
+
render() {
|
|
616
|
+
return d`
|
|
617
|
+
${this.selected ? d`
|
|
618
|
+
${this.renderCheckIcon(this.hasIcon ? ["checkmark--withAdjacentIcon"] : [])}
|
|
619
|
+
` : f}
|
|
620
|
+
<slot name="icon"></slot>
|
|
621
|
+
<div id="label">
|
|
622
|
+
<slot id="slot"></slot>
|
|
623
|
+
</div>
|
|
624
|
+
<slot name="description"></slot>
|
|
625
|
+
<slot name="value"></slot>
|
|
626
|
+
${this.renderTooltip()}
|
|
627
|
+
${this.href && this.href.length > 0 ? super.renderAnchor({
|
|
628
|
+
id: "button",
|
|
629
|
+
ariaHidden: !0,
|
|
630
|
+
className: "button anchor hidden"
|
|
631
|
+
}) : f}
|
|
632
|
+
${this.renderSubmenu()}
|
|
633
|
+
`;
|
|
634
|
+
}
|
|
635
|
+
manageSubmenu(e) {
|
|
636
|
+
this.submenuElement = e.target.assignedElements({ flatten: !0 })[0], this.hasSubmenu = !!this.submenuElement, this.hasSubmenu && this.setAttribute("aria-haspopup", "true");
|
|
637
|
+
}
|
|
638
|
+
handlePointerdown(e) {
|
|
639
|
+
e.target === this && this.hasSubmenu && this.open && (this.addEventListener("focus", this.handleSubmenuFocus, { once: !0 }), this.overlayElement.addEventListener("beforetoggle", this.handleBeforetoggle));
|
|
640
|
+
}
|
|
641
|
+
firstUpdated(e) {
|
|
642
|
+
super.firstUpdated(e), this.setAttribute("tabindex", "-1"), this.addEventListener("pointerdown", this.handlePointerdown), this.addEventListener("pointerenter", this.closeOverlaysForRoot), this.hasAttribute("id") || (this.id = `luzmo-menu-item-${o()}`);
|
|
643
|
+
}
|
|
644
|
+
closeOverlaysForRoot() {
|
|
645
|
+
this.open || this.menuData.parentMenu?.closeDescendentOverlays();
|
|
646
|
+
}
|
|
647
|
+
handleSubmenuClick(e) {
|
|
648
|
+
e.composedPath().includes(this.overlayElement) || this.openOverlay();
|
|
649
|
+
}
|
|
650
|
+
handleSubmenuFocus() {
|
|
651
|
+
requestAnimationFrame(() => {
|
|
652
|
+
this.overlayElement.open = this.open;
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
handlePointerenter() {
|
|
656
|
+
if (this.leaveTimeout) {
|
|
657
|
+
clearTimeout(this.leaveTimeout), delete this.leaveTimeout;
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
660
|
+
this.openOverlay();
|
|
661
|
+
}
|
|
662
|
+
handlePointerleave() {
|
|
663
|
+
this.open && !this.recentlyLeftChild && (this.leaveTimeout = setTimeout(() => {
|
|
664
|
+
delete this.leaveTimeout, this.open = !1;
|
|
665
|
+
}, j));
|
|
666
|
+
}
|
|
667
|
+
handleSubmenuChange(e) {
|
|
668
|
+
e.stopPropagation(), this.menuData.selectionRoot?.selectOrToggleItem(this);
|
|
669
|
+
}
|
|
670
|
+
handleSubmenuPointerenter() {
|
|
671
|
+
this.recentlyLeftChild = !0;
|
|
672
|
+
}
|
|
673
|
+
handleSubmenuPointerleave() {
|
|
674
|
+
requestAnimationFrame(() => {
|
|
675
|
+
this.recentlyLeftChild = !1;
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
handleSubmenuOpen(e) {
|
|
679
|
+
this.focused = !1;
|
|
680
|
+
let t = e.composedPath().find((e) => e !== this.overlayElement && e.localName === "luzmo-overlay");
|
|
681
|
+
this.overlayElement.parentOverlayToForceClose = t;
|
|
682
|
+
}
|
|
683
|
+
cleanup() {
|
|
684
|
+
this.open = !1, this.active = !1;
|
|
685
|
+
}
|
|
686
|
+
openOverlay() {
|
|
687
|
+
!this.hasSubmenu || this.open || this.disabled || (this.open = !0, this.active = !0, this.setAttribute("aria-expanded", "true"), this.addEventListener("luzmo-closed", this.cleanup, { once: !0 }));
|
|
688
|
+
}
|
|
689
|
+
updateAriaSelected() {
|
|
690
|
+
let e = this.getAttribute("role");
|
|
691
|
+
e === "option" ? this.setAttribute("aria-selected", this.selected ? "true" : "false") : (e === "menuitemcheckbox" || e === "menuitemradio") && this.setAttribute("aria-checked", this.selected ? "true" : "false");
|
|
692
|
+
}
|
|
693
|
+
setRole(e) {
|
|
694
|
+
this.setAttribute("role", e), this.updateAriaSelected();
|
|
695
|
+
}
|
|
696
|
+
updated(e) {
|
|
697
|
+
if (super.updated(e), e.has("label") && (this.label || e.get("label") !== void 0) && this.setAttribute("aria-label", this.label || ""), e.has("active") && (this.active || e.get("active") !== void 0) && this.active && this.menuData.selectionRoot?.closeDescendentOverlays(), this.anchorElement && (this.anchorElement.addEventListener("focus", this.proxyFocus), this.anchorElement.tabIndex = -1), e.has("selected") && this.updateAriaSelected(), e.has("hasSubmenu") && (this.hasSubmenu || e.get("hasSubmenu") !== void 0)) if (this.hasSubmenu) {
|
|
698
|
+
this.abortControllerSubmenu = new AbortController();
|
|
699
|
+
let e = { signal: this.abortControllerSubmenu.signal };
|
|
700
|
+
this.addEventListener("click", this.handleSubmenuClick, e), this.addEventListener("pointerenter", this.handlePointerenter, e), this.addEventListener("pointerleave", this.handlePointerleave, e), this.addEventListener("luzmo-opened", this.handleSubmenuOpen, e);
|
|
701
|
+
} else this.abortControllerSubmenu?.abort();
|
|
702
|
+
}
|
|
703
|
+
connectedCallback() {
|
|
704
|
+
super.connectedCallback(), this.triggerUpdate();
|
|
705
|
+
}
|
|
706
|
+
disconnectedCallback() {
|
|
707
|
+
this.menuData.cleanupSteps.forEach((e) => e(this)), this.menuData = {
|
|
708
|
+
focusRoot: void 0,
|
|
709
|
+
parentMenu: void 0,
|
|
710
|
+
selectionRoot: void 0,
|
|
711
|
+
cleanupSteps: []
|
|
712
|
+
}, super.disconnectedCallback();
|
|
713
|
+
}
|
|
714
|
+
async triggerUpdate() {
|
|
715
|
+
this.willDispatchUpdate || (this.willDispatchUpdate = !0, await new Promise((e) => requestAnimationFrame(e)), this.dispatchUpdate());
|
|
716
|
+
}
|
|
717
|
+
dispatchUpdate() {
|
|
718
|
+
this.isConnected && (this.dispatchEvent(new F(this)), this.willDispatchUpdate = !1);
|
|
719
|
+
}
|
|
720
|
+
};
|
|
721
|
+
t([m({
|
|
722
|
+
type: Boolean,
|
|
723
|
+
reflect: !0
|
|
724
|
+
})], I.prototype, "active", void 0), t([m({
|
|
725
|
+
type: Boolean,
|
|
726
|
+
reflect: !0
|
|
727
|
+
})], I.prototype, "focused", void 0), t([m({
|
|
728
|
+
type: Boolean,
|
|
729
|
+
reflect: !0
|
|
730
|
+
})], I.prototype, "selected", void 0), t([m({ type: String })], I.prototype, "value", null), t([m({
|
|
731
|
+
type: Boolean,
|
|
732
|
+
reflect: !0,
|
|
733
|
+
attribute: "has-submenu"
|
|
734
|
+
})], I.prototype, "hasSubmenu", void 0), t([m({ type: String })], I.prototype, "tooltip", void 0), t([m({
|
|
735
|
+
type: String,
|
|
736
|
+
attribute: "tooltip-placement"
|
|
737
|
+
})], I.prototype, "tooltipPlacement", void 0), t([h("slot:not([name])")], I.prototype, "contentSlot", void 0), t([h("slot[name=\"icon\"]")], I.prototype, "iconSlot", void 0), t([m({
|
|
738
|
+
type: Boolean,
|
|
739
|
+
reflect: !0,
|
|
740
|
+
attribute: "no-wrap",
|
|
741
|
+
hasChanged() {
|
|
742
|
+
return !1;
|
|
743
|
+
}
|
|
744
|
+
})], I.prototype, "noWrap", void 0), t([h(".anchor")], I.prototype, "anchorElement", void 0), t([h("luzmo-overlay")], I.prototype, "overlayElement", void 0), t([m({
|
|
745
|
+
type: Boolean,
|
|
746
|
+
reflect: !0
|
|
747
|
+
})], I.prototype, "open", void 0), customElements.get("luzmo-menu") || customElements.define("luzmo-menu", T), customElements.get("luzmo-menu-divider") || customElements.define("luzmo-menu-divider", D), customElements.get("luzmo-menu-group") || customElements.define("luzmo-menu-group", k), customElements.get("luzmo-menu-item") || customElements.define("luzmo-menu-item", I);
|
|
748
|
+
//#endregion
|
|
749
|
+
export { T as a, D as i, F as n, k as r, I as t };
|