@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,1115 @@
|
|
|
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 { t as e } from "./rolldown-runtime-CAFD8bLK.js";
|
|
19
|
+
import { n as t, t as n } from "./decorate-aGxJUVxg.js";
|
|
20
|
+
import { t as r } from "./condition-attribute-with-id-Duo51HZ7.js";
|
|
21
|
+
import { t as i } from "./random-id-Dd4boCPV.js";
|
|
22
|
+
import { n as a, t as o } from "./element-resolution-Bs1x89vU.js";
|
|
23
|
+
import { n as s, t as c } from "./slottable-request-event-DZ2Z_BLk.js";
|
|
24
|
+
import { n as l } from "./focusable-selectors-Bg60_Kra.js";
|
|
25
|
+
import { a as u, t as d, u as f } from "./platform-D4V_cOJF.js";
|
|
26
|
+
import { html as p, unsafeCSS as ee } from "lit";
|
|
27
|
+
import { property as m, query as h, queryAssignedElements as te, state as ne } from "lit/decorators.js";
|
|
28
|
+
import { ifDefined as g } from "lit/directives/if-defined.js";
|
|
29
|
+
import { styleMap as _ } from "lit/directives/style-map.js";
|
|
30
|
+
import { arrow as v, autoUpdate as y, computePosition as re, flip as b, offset as ie, shift as ae, size as oe } from "@floating-ui/dom";
|
|
31
|
+
//#region src/utils/reparent-child.ts
|
|
32
|
+
function x(e, t, n = []) {
|
|
33
|
+
for (let [r, i] of t.entries()) {
|
|
34
|
+
let t = e[r], a = t.parentElement || t.getRootNode();
|
|
35
|
+
n[r] && n[r](i), a && a !== t && t.replaceWith(i), delete e[r];
|
|
36
|
+
}
|
|
37
|
+
return t;
|
|
38
|
+
}
|
|
39
|
+
var se = (e, t, { position: n, prepareCallback: r } = { position: "beforeend" }) => {
|
|
40
|
+
let { length: i } = e;
|
|
41
|
+
if (i === 0) return () => e;
|
|
42
|
+
let a = 1, o = 0;
|
|
43
|
+
(n === "afterbegin" || n === "afterend") && (a = -1, o = i - 1);
|
|
44
|
+
let s = Array(i), c = Array(i), l = typeof document < "u" ? document.createComment("placeholder for reparented element") : null;
|
|
45
|
+
do {
|
|
46
|
+
let i = e[o];
|
|
47
|
+
r && (c[o] = r(i)), s[o] = l.cloneNode();
|
|
48
|
+
let u = i.parentElement || i.getRootNode();
|
|
49
|
+
u && u !== i && u.replaceChild(s[o], i), t.insertAdjacentElement(n, i), o += a;
|
|
50
|
+
} while (--i > 0);
|
|
51
|
+
return function() {
|
|
52
|
+
return x(s, e, c);
|
|
53
|
+
};
|
|
54
|
+
}, ce = 1e3, S = 1e3, C = new class {
|
|
55
|
+
constructor(e = {}) {
|
|
56
|
+
this.warmUpDelay = ce, this.coolDownDelay = S, this.isWarm = !1, this.timeout = 0, Object.assign(this, e);
|
|
57
|
+
}
|
|
58
|
+
openTimer(e) {
|
|
59
|
+
if (this.cancelCooldownTimer(), !this.component || e !== this.component) return this.component && (this.close(this.component), this.cancelCooldownTimer()), this.component = e, this.isWarm ? Promise.resolve(!1) : (this.promise = new Promise((e) => {
|
|
60
|
+
this.resolve = e, this.timeout = typeof window > "u" ? 0 : window.setTimeout(() => {
|
|
61
|
+
this.resolve && (this.resolve(!1), this.isWarm = !0);
|
|
62
|
+
}, this.warmUpDelay);
|
|
63
|
+
}), this.promise);
|
|
64
|
+
if (this.promise) return this.promise;
|
|
65
|
+
throw Error("Inconsistent state");
|
|
66
|
+
}
|
|
67
|
+
close(e) {
|
|
68
|
+
this.component && this.component === e && (this.resetCooldownTimer(), this.timeout > 0 && (clearTimeout(this.timeout), this.timeout = 0), this.resolve && (this.resolve(!0), delete this.resolve), delete this.promise, delete this.component);
|
|
69
|
+
}
|
|
70
|
+
resetCooldownTimer() {
|
|
71
|
+
this.isWarm && (this.cooldownTimeout && typeof window < "u" && window.clearTimeout(this.cooldownTimeout), this.cooldownTimeout = typeof window > "u" ? void 0 : window.setTimeout(() => {
|
|
72
|
+
this.isWarm = !1, delete this.cooldownTimeout;
|
|
73
|
+
}, this.coolDownDelay));
|
|
74
|
+
}
|
|
75
|
+
cancelCooldownTimer() {
|
|
76
|
+
this.cooldownTimeout && typeof window < "u" && window.clearTimeout(this.cooldownTimeout), delete this.cooldownTimeout;
|
|
77
|
+
}
|
|
78
|
+
}(), w = () => {}, T = (e, t, n) => {
|
|
79
|
+
let r = new AbortController(), i = /* @__PURE__ */ new Map(), a = () => {
|
|
80
|
+
r.abort(), n();
|
|
81
|
+
}, o, s, c = requestAnimationFrame(() => {
|
|
82
|
+
o = requestAnimationFrame(() => {
|
|
83
|
+
s = requestAnimationFrame(() => {
|
|
84
|
+
a();
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
}), l = (t) => {
|
|
88
|
+
t.target === e && (i.set(t.propertyName, i.get(t.propertyName) - 1), i.get(t.propertyName) || i.delete(t.propertyName), i.size === 0 && a());
|
|
89
|
+
};
|
|
90
|
+
e.addEventListener("transitionrun", (t) => {
|
|
91
|
+
t.target === e && (i.has(t.propertyName) || i.set(t.propertyName, 0), i.set(t.propertyName, i.get(t.propertyName) + 1), cancelAnimationFrame(c), cancelAnimationFrame(o), cancelAnimationFrame(s));
|
|
92
|
+
}, { signal: r.signal }), e.addEventListener("transitionend", l, { signal: r.signal }), e.addEventListener("transitioncancel", l, { signal: r.signal }), t();
|
|
93
|
+
};
|
|
94
|
+
function E() {
|
|
95
|
+
return new Promise((e) => requestAnimationFrame(() => e()));
|
|
96
|
+
}
|
|
97
|
+
var D = class e extends t {
|
|
98
|
+
constructor(...e) {
|
|
99
|
+
super(...e), this.dispose = w, this.offset = 0, this.willPreventClose = !1;
|
|
100
|
+
}
|
|
101
|
+
applyFocus(e, t) {}
|
|
102
|
+
/* c8 ignore next 6 */
|
|
103
|
+
get delayed() {
|
|
104
|
+
return !1;
|
|
105
|
+
}
|
|
106
|
+
set delayed(e) {}
|
|
107
|
+
/* c8 ignore next 6 */
|
|
108
|
+
get disabled() {
|
|
109
|
+
return !1;
|
|
110
|
+
}
|
|
111
|
+
set disabled(e) {}
|
|
112
|
+
get elementResolver() {
|
|
113
|
+
return this._elementResolver;
|
|
114
|
+
}
|
|
115
|
+
set elementResolver(e) {
|
|
116
|
+
this._elementResolver = e;
|
|
117
|
+
}
|
|
118
|
+
/* c8 ignore next 3 */
|
|
119
|
+
ensureOnDOM(e) {}
|
|
120
|
+
/* c8 ignore next 5 */
|
|
121
|
+
makeTransition(e) {
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
manageDelay(e) {}
|
|
125
|
+
/* c8 ignore next 3 */
|
|
126
|
+
manageDialogOpen() {}
|
|
127
|
+
/* c8 ignore next 3 */
|
|
128
|
+
managePopoverOpen() {}
|
|
129
|
+
/* c8 ignore next 3 */
|
|
130
|
+
managePosition() {}
|
|
131
|
+
/* c8 ignore next 6 */
|
|
132
|
+
get open() {
|
|
133
|
+
return !1;
|
|
134
|
+
}
|
|
135
|
+
set open(e) {}
|
|
136
|
+
get placementController() {
|
|
137
|
+
return this._placementController;
|
|
138
|
+
}
|
|
139
|
+
set placementController(e) {
|
|
140
|
+
this._placementController = e;
|
|
141
|
+
}
|
|
142
|
+
requestSlottable() {}
|
|
143
|
+
returnFocus() {}
|
|
144
|
+
/* c8 ignore next 6 */
|
|
145
|
+
get state() {
|
|
146
|
+
return "closed";
|
|
147
|
+
}
|
|
148
|
+
set state(e) {}
|
|
149
|
+
/* c8 ignore next 3 */
|
|
150
|
+
manuallyKeepOpen() {}
|
|
151
|
+
static update() {
|
|
152
|
+
let e = new CustomEvent("luzmo-update-overlays", {
|
|
153
|
+
bubbles: !0,
|
|
154
|
+
composed: !0,
|
|
155
|
+
cancelable: !0
|
|
156
|
+
});
|
|
157
|
+
document.dispatchEvent(e);
|
|
158
|
+
}
|
|
159
|
+
static async open(t, n, r, i) {
|
|
160
|
+
await Promise.resolve().then(() => Z);
|
|
161
|
+
let a = arguments.length === 2, o = r || t, s = new this(), c = !1, l = se([o], s, {
|
|
162
|
+
position: "beforeend",
|
|
163
|
+
prepareCallback: (e) => {
|
|
164
|
+
let t = e.slot;
|
|
165
|
+
return e.removeAttribute("slot"), () => {
|
|
166
|
+
e.slot = t;
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
if (s.dispose = () => {
|
|
171
|
+
s.addEventListener("luzmo-closed", () => {
|
|
172
|
+
c ||= (l(), !0), requestAnimationFrame(() => {
|
|
173
|
+
s.remove();
|
|
174
|
+
});
|
|
175
|
+
}), s.open = !1, s.dispose = w;
|
|
176
|
+
}, !a && o && i) {
|
|
177
|
+
let r = t, a = n, c = i;
|
|
178
|
+
return e.applyOptions(s, {
|
|
179
|
+
...c,
|
|
180
|
+
delayed: c.delayed || o.hasAttribute("delayed"),
|
|
181
|
+
trigger: c.virtualTrigger || r,
|
|
182
|
+
type: a === "modal" ? "modal" : a === "hover" ? "hint" : "auto"
|
|
183
|
+
}), r.after(s), await s.updateComplete, s.open = !0, s.dispose;
|
|
184
|
+
}
|
|
185
|
+
let u = n;
|
|
186
|
+
return s.append(o), e.applyOptions(s, {
|
|
187
|
+
...u,
|
|
188
|
+
delayed: u.delayed || o.hasAttribute("delayed")
|
|
189
|
+
}), s.updateComplete.then(() => {
|
|
190
|
+
s.open = !0;
|
|
191
|
+
}), s;
|
|
192
|
+
}
|
|
193
|
+
static applyOptions(e, t) {
|
|
194
|
+
e.delayed = !!t.delayed, e.receivesFocus = t.receivesFocus ?? "auto", e.triggerElement = t.trigger || null, e.type = t.type || "modal", e.offset = t.offset ?? 0, e.placement = t.placement, e.willPreventClose = !!t.notImmediatelyClosable;
|
|
195
|
+
}
|
|
196
|
+
}, O = (e) => e.querySelector(l), k = (e) => e.assignedElements().find((e) => e.matches(l)), A = class extends Event {
|
|
197
|
+
constructor() {
|
|
198
|
+
super("beforetoggle", {
|
|
199
|
+
bubbles: !1,
|
|
200
|
+
composed: !1
|
|
201
|
+
}), this.currentState = "open", this.newState = "closed";
|
|
202
|
+
}
|
|
203
|
+
}, j = class extends Event {
|
|
204
|
+
constructor() {
|
|
205
|
+
super("beforetoggle", {
|
|
206
|
+
bubbles: !1,
|
|
207
|
+
composed: !1
|
|
208
|
+
}), this.currentState = "closed", this.newState = "open";
|
|
209
|
+
}
|
|
210
|
+
}, M = class extends Event {
|
|
211
|
+
constructor(e, t, { publish: n, interaction: r, reason: i }) {
|
|
212
|
+
super(e, {
|
|
213
|
+
bubbles: n,
|
|
214
|
+
composed: n
|
|
215
|
+
}), this.overlay = t, this.detail = {
|
|
216
|
+
interaction: r,
|
|
217
|
+
reason: i
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
}, N = class {
|
|
221
|
+
constructor(e, t, n) {
|
|
222
|
+
this.x = 0, this.y = 0, this.x = e, this.y = t, this.rectTop = n;
|
|
223
|
+
}
|
|
224
|
+
updateBoundingClientRect(e, t, n) {
|
|
225
|
+
this.x = e, this.y = t, this.rectTop = n, D.update();
|
|
226
|
+
}
|
|
227
|
+
getBoundingClientRect() {
|
|
228
|
+
let e = this.rectTop ?? this.y;
|
|
229
|
+
return {
|
|
230
|
+
width: 0,
|
|
231
|
+
height: this.y - e,
|
|
232
|
+
top: e,
|
|
233
|
+
right: this.x,
|
|
234
|
+
y: e,
|
|
235
|
+
x: this.x,
|
|
236
|
+
bottom: this.y,
|
|
237
|
+
left: this.x,
|
|
238
|
+
toJSON() {}
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
//#endregion
|
|
243
|
+
//#region src/components/overlay/overlay-dialog.ts
|
|
244
|
+
function le(e) {
|
|
245
|
+
class t extends e {
|
|
246
|
+
async manageDialogOpen() {
|
|
247
|
+
let e = this.open;
|
|
248
|
+
if (await E(), await this.managePosition(), this.open !== e) return;
|
|
249
|
+
let t = await this.dialogMakeTransition(e);
|
|
250
|
+
this.open === e && await this.dialogApplyFocus(e, t);
|
|
251
|
+
}
|
|
252
|
+
dialogMakeTransition(e) {
|
|
253
|
+
let t = null, n = (n, r) => () => {
|
|
254
|
+
if (n.open = e, !e) {
|
|
255
|
+
let e = () => {
|
|
256
|
+
n.removeEventListener("close", e);
|
|
257
|
+
};
|
|
258
|
+
n.addEventListener("close", e);
|
|
259
|
+
}
|
|
260
|
+
if (r > 0) return;
|
|
261
|
+
let i = e ? j : A;
|
|
262
|
+
this.dispatchEvent(new i()), e && (n.matches(l) && (t = n), t ||= O(n), t || n.querySelectorAll("slot").forEach((e) => {
|
|
263
|
+
t ||= k(e);
|
|
264
|
+
}), !(!this.isConnected || this.dialogEl.open) && this.dialogEl.showModal());
|
|
265
|
+
}, r = (t, n) => () => {
|
|
266
|
+
if (this.open !== e) return;
|
|
267
|
+
let r = e ? "luzmo-opened" : "luzmo-closed";
|
|
268
|
+
if (n > 0) {
|
|
269
|
+
t.dispatchEvent(new M(r, this, {
|
|
270
|
+
interaction: this.type,
|
|
271
|
+
publish: !1
|
|
272
|
+
}));
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
if (!this.isConnected || e !== this.open) return;
|
|
276
|
+
let i = async () => {
|
|
277
|
+
let n = this.triggerElement instanceof N;
|
|
278
|
+
this.dispatchEvent(new M(r, this, {
|
|
279
|
+
interaction: this.type,
|
|
280
|
+
publish: n
|
|
281
|
+
})), t.dispatchEvent(new M(r, this, {
|
|
282
|
+
interaction: this.type,
|
|
283
|
+
publish: !1
|
|
284
|
+
})), this.triggerElement && !n && this.triggerElement.dispatchEvent(new M(r, this, {
|
|
285
|
+
interaction: this.type,
|
|
286
|
+
publish: !0
|
|
287
|
+
})), this.state = e ? "opened" : "closed", this.returnFocus(), await E(), await E(), e === this.open && e === !1 && this.requestSlottable();
|
|
288
|
+
};
|
|
289
|
+
!e && this.dialogEl.open ? (this.dialogEl.addEventListener("close", () => {
|
|
290
|
+
i();
|
|
291
|
+
}, { once: !0 }), this.dialogEl.close()) : i();
|
|
292
|
+
};
|
|
293
|
+
return this.elements.forEach((e, t) => {
|
|
294
|
+
T(e, n(e, t), r(e, t));
|
|
295
|
+
}), t;
|
|
296
|
+
}
|
|
297
|
+
dialogApplyFocus(e, t) {
|
|
298
|
+
this.applyFocus(e, t);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
return t;
|
|
302
|
+
}
|
|
303
|
+
//#endregion
|
|
304
|
+
//#region src/components/overlay/overlay-no-popover.ts
|
|
305
|
+
function ue(e) {
|
|
306
|
+
class t extends e {
|
|
307
|
+
async managePopoverOpen() {
|
|
308
|
+
await this.managePosition();
|
|
309
|
+
}
|
|
310
|
+
async manageDelay(e) {
|
|
311
|
+
if (e === !1 || e !== this.open) {
|
|
312
|
+
C.close(this);
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
this.delayed && await C.openTimer(this) && (this.open = !e);
|
|
316
|
+
}
|
|
317
|
+
ensureOnDOM(e) {
|
|
318
|
+
document.body.offsetHeight;
|
|
319
|
+
}
|
|
320
|
+
makeTransition(e) {
|
|
321
|
+
if (this.open !== e) return null;
|
|
322
|
+
let t = null, n = (n, r) => () => {
|
|
323
|
+
if (e === this.open) {
|
|
324
|
+
if (n.open = e, r === 0) {
|
|
325
|
+
let t = e ? j : A;
|
|
326
|
+
this.dispatchEvent(new t());
|
|
327
|
+
}
|
|
328
|
+
e === !0 && (n.matches(l) && (t = n), t ||= O(n), !t && n.querySelectorAll("slot").forEach((e) => {
|
|
329
|
+
t ||= k(e);
|
|
330
|
+
}));
|
|
331
|
+
}
|
|
332
|
+
}, r = (t, n) => async () => {
|
|
333
|
+
if (this.open !== e) return;
|
|
334
|
+
let r = e ? "luzmo-opened" : "luzmo-closed";
|
|
335
|
+
if (t.dispatchEvent(new M(r, this, { interaction: this.type })), n > 0) return;
|
|
336
|
+
let i = this.triggerElement instanceof N;
|
|
337
|
+
this.dispatchEvent(new M(r, this, {
|
|
338
|
+
interaction: this.type,
|
|
339
|
+
publish: i
|
|
340
|
+
})), this.triggerElement && !i && this.triggerElement.dispatchEvent(new M(r, this, {
|
|
341
|
+
interaction: this.type,
|
|
342
|
+
publish: !0
|
|
343
|
+
})), this.state = e ? "opened" : "closed", this.returnFocus(), await E(), await E(), e === this.open && e === !1 && this.requestSlottable();
|
|
344
|
+
};
|
|
345
|
+
return this.elements.forEach((e, t) => {
|
|
346
|
+
T(e, n(e, t), r(e, t));
|
|
347
|
+
}), t;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return t;
|
|
351
|
+
}
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region src/components/overlay/overlay-popover.ts
|
|
354
|
+
var de = typeof CSS < "u" && CSS.supports("(overlay: auto)");
|
|
355
|
+
function P(e) {
|
|
356
|
+
let t = !1;
|
|
357
|
+
try {
|
|
358
|
+
t = e.matches(":popover-open");
|
|
359
|
+
} catch {}
|
|
360
|
+
let n = !1;
|
|
361
|
+
try {
|
|
362
|
+
n = e.matches(":open");
|
|
363
|
+
} catch {}
|
|
364
|
+
return t || n;
|
|
365
|
+
}
|
|
366
|
+
function F(e) {
|
|
367
|
+
class t extends e {
|
|
368
|
+
async manageDelay(e) {
|
|
369
|
+
if (e === !1 || e !== this.open) {
|
|
370
|
+
C.close(this);
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
this.delayed && await C.openTimer(this) && (this.open = !e);
|
|
374
|
+
}
|
|
375
|
+
shouldHidePopover(e) {
|
|
376
|
+
if (e && this.open !== e) return;
|
|
377
|
+
let t = async ({ newState: e } = {}) => {
|
|
378
|
+
e !== "open" && await this.placementController.resetOverlayPosition();
|
|
379
|
+
};
|
|
380
|
+
if (!P(this.dialogEl)) {
|
|
381
|
+
t();
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
this.dialogEl.addEventListener("toggle", t, { once: !0 });
|
|
385
|
+
}
|
|
386
|
+
shouldShowPopover(e) {
|
|
387
|
+
let t = !1;
|
|
388
|
+
try {
|
|
389
|
+
t = this.dialogEl.matches(":popover-open");
|
|
390
|
+
} catch {}
|
|
391
|
+
let n = !1;
|
|
392
|
+
try {
|
|
393
|
+
n = this.dialogEl.matches(":open");
|
|
394
|
+
} catch {}
|
|
395
|
+
e && this.open === e && !t && !n && this.isConnected && (this.dialogEl.showPopover(), this.managePosition());
|
|
396
|
+
}
|
|
397
|
+
async ensureOnDOM(e) {
|
|
398
|
+
de || await this.shouldHidePopover(e), this.shouldShowPopover(e), await E();
|
|
399
|
+
}
|
|
400
|
+
makeTransition(e) {
|
|
401
|
+
if (this.open !== e) return null;
|
|
402
|
+
let t = null, n = (n, r) => () => {
|
|
403
|
+
if (n.open = e, r === 0) {
|
|
404
|
+
let t = e ? j : A;
|
|
405
|
+
this.dispatchEvent(new t());
|
|
406
|
+
}
|
|
407
|
+
e && (n.matches(l) && (t = n), t ||= O(n), !t && n.querySelectorAll("slot").forEach((e) => {
|
|
408
|
+
t ||= k(e);
|
|
409
|
+
}));
|
|
410
|
+
}, r = (t, n) => () => {
|
|
411
|
+
if (this.open !== e) return;
|
|
412
|
+
let r = e ? "luzmo-opened" : "luzmo-closed";
|
|
413
|
+
if (n > 0) {
|
|
414
|
+
t.dispatchEvent(new M(r, this, {
|
|
415
|
+
interaction: this.type,
|
|
416
|
+
publish: !1
|
|
417
|
+
}));
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
let i = async () => {
|
|
421
|
+
if (this.open !== e) return;
|
|
422
|
+
await E();
|
|
423
|
+
let n = this.triggerElement instanceof N;
|
|
424
|
+
this.dispatchEvent(new M(r, this, {
|
|
425
|
+
interaction: this.type,
|
|
426
|
+
publish: n
|
|
427
|
+
})), t.dispatchEvent(new M(r, this, {
|
|
428
|
+
interaction: this.type,
|
|
429
|
+
publish: !1
|
|
430
|
+
})), this.triggerElement && !n && this.triggerElement.dispatchEvent(new M(r, this, {
|
|
431
|
+
interaction: this.type,
|
|
432
|
+
publish: !0
|
|
433
|
+
})), this.state = e ? "opened" : "closed", this.returnFocus(), await E(), await E(), e === this.open && e === !1 && this.requestSlottable();
|
|
434
|
+
};
|
|
435
|
+
if (this.open !== e) return;
|
|
436
|
+
let a = P(this.dialogEl);
|
|
437
|
+
e !== !0 && a && this.isConnected ? (this.dialogEl.addEventListener("beforetoggle", () => {
|
|
438
|
+
i();
|
|
439
|
+
}, { once: !0 }), this.dialogEl.hidePopover()) : i();
|
|
440
|
+
};
|
|
441
|
+
return this.elements.forEach((e, t) => {
|
|
442
|
+
T(e, n(e, t), r(e, t));
|
|
443
|
+
}), t;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
return t;
|
|
447
|
+
}
|
|
448
|
+
//#endregion
|
|
449
|
+
//#region src/components/overlay/overlay-stack.ts
|
|
450
|
+
var fe = typeof document < "u" && "showPopover" in document.createElement("div"), I = new class {
|
|
451
|
+
get document() {
|
|
452
|
+
return this.root.ownerDocument || document;
|
|
453
|
+
}
|
|
454
|
+
constructor() {
|
|
455
|
+
this.root = typeof document > "u" ? null : document.body, this.stack = [], this.handleScroll = (e) => {
|
|
456
|
+
typeof document < "u" && e.target !== document && e.target !== document.documentElement && e.target !== document.body || this.stack.forEach((t) => {
|
|
457
|
+
t.open && (t.type === "auto" && t.triggerElement instanceof HTMLElement && t.triggerElement.closest("luzmo-picker, luzmo-select, luzmo-action-menu") && e.stopPropagation(), typeof document < "u" && document.dispatchEvent(new CustomEvent("luzmo-update-overlays", {
|
|
458
|
+
bubbles: !0,
|
|
459
|
+
composed: !0,
|
|
460
|
+
cancelable: !0
|
|
461
|
+
})));
|
|
462
|
+
});
|
|
463
|
+
}, this.handlePointerdown = (e) => {
|
|
464
|
+
this.pointerdownPath = e.composedPath(), this.lastOverlay = this.stack.at(-1);
|
|
465
|
+
}, this.handlePointerup = () => {
|
|
466
|
+
let e = this.pointerdownPath;
|
|
467
|
+
if (this.pointerdownPath = void 0, this.stack.length === 0 || !e?.length) return;
|
|
468
|
+
let t = this.lastOverlay;
|
|
469
|
+
this.lastOverlay = void 0;
|
|
470
|
+
let n = this.stack.length - 1, r = this.stack.filter((r, i) => !e.find((e) => e === r || e === r?.triggerElement && r?.type === "hint" || i === n && r !== t && r.triggerInteraction === "longpress") && !r.shouldPreventClose() && r.type !== "manual" && !(r.type === "modal" && t !== r));
|
|
471
|
+
r.reverse(), r.forEach((e) => {
|
|
472
|
+
this.closeOverlay(e);
|
|
473
|
+
let t = e.parentOverlayToForceClose;
|
|
474
|
+
for (; t;) this.closeOverlay(t), t = t.parentOverlayToForceClose;
|
|
475
|
+
});
|
|
476
|
+
}, this.handleBeforetoggle = (e) => {
|
|
477
|
+
let { target: t, newState: n } = e;
|
|
478
|
+
n !== "open" && this.closeOverlay(t);
|
|
479
|
+
}, this.handleKeydown = (e) => {
|
|
480
|
+
if (e.code !== "Escape" || this.stack.length === 0) return;
|
|
481
|
+
let t = this.stack.at(-1);
|
|
482
|
+
if (t?.type === "page") {
|
|
483
|
+
e.preventDefault();
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
if (t?.type === "manual") {
|
|
487
|
+
this.closeOverlay(t);
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
fe || t && this.closeOverlay(t);
|
|
491
|
+
}, typeof document < "u" && this.bindEvents();
|
|
492
|
+
}
|
|
493
|
+
bindEvents() {
|
|
494
|
+
typeof document < "u" && (this.document.addEventListener("pointerdown", this.handlePointerdown), this.document.addEventListener("pointerup", this.handlePointerup), this.document.addEventListener("keydown", this.handleKeydown), this.document.addEventListener("scroll", this.handleScroll, { capture: !0 }));
|
|
495
|
+
}
|
|
496
|
+
closeOverlay(e) {
|
|
497
|
+
let t = this.stack.indexOf(e);
|
|
498
|
+
t !== -1 && this.stack.splice(t, 1), e.open = !1;
|
|
499
|
+
}
|
|
500
|
+
overlaysByTriggerElement(e) {
|
|
501
|
+
return this.stack.filter((t) => t.triggerElement === e);
|
|
502
|
+
}
|
|
503
|
+
add(e) {
|
|
504
|
+
if (this.stack.includes(e)) {
|
|
505
|
+
let t = this.stack.indexOf(e);
|
|
506
|
+
t !== -1 && (this.stack.splice(t, 1), this.stack.push(e));
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
if (e.type === "auto" || e.type === "modal" || e.type === "page") {
|
|
510
|
+
let t = "luzmo-overlay-query-path", n = new Event(t, {
|
|
511
|
+
composed: !0,
|
|
512
|
+
bubbles: !0
|
|
513
|
+
});
|
|
514
|
+
e.addEventListener(t, (e) => {
|
|
515
|
+
let t = e.composedPath();
|
|
516
|
+
this.stack.forEach((e) => {
|
|
517
|
+
!t.find((t) => t === e) && e.type !== "manual" && e.type !== "modal" && this.closeOverlay(e);
|
|
518
|
+
});
|
|
519
|
+
}, { once: !0 }), e.dispatchEvent(n);
|
|
520
|
+
} else if (e.type === "hint") {
|
|
521
|
+
if (this.stack.some((t) => t.type !== "manual" && t.triggerElement && t.triggerElement === e.triggerElement)) {
|
|
522
|
+
e.open = !1;
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
this.stack.forEach((e) => {
|
|
526
|
+
e.type === "hint" && this.closeOverlay(e);
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
requestAnimationFrame(() => {
|
|
530
|
+
this.stack.push(e), e.addEventListener("beforetoggle", this.handleBeforetoggle, { once: !0 });
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
remove(e) {
|
|
534
|
+
this.closeOverlay(e);
|
|
535
|
+
}
|
|
536
|
+
}(), L = ":host{pointer-events:none;--luzmo-overlay-animation-distance:.5rem;display:contents}:host(:has(>luzmo-tooltip)){--luzmo-overlay-animation-distance:var(--luzmo-tooltip-animation-distance,4px)}.dialog{box-sizing:border-box;--luzmo-overlay-open:true;background:0 0;border:0;max-width:calc(100vw - 16px);height:auto;max-height:calc(100dvh - 16px);margin:0;padding:0;display:flex;position:fixed;inset:0 auto auto 0;overflow:visible;opacity:1!important}.dialog:not([is-visible]){display:none}.dialog:focus{outline:none}dialog:modal{--luzmo-popover-filter:drop-shadow(0px 2px 6px #00000026)}:host(:not([open])) .dialog{--luzmo-overlay-open:false}.dialog::backdrop{display:none}.dialog:before{content:\"\";position:absolute;inset:-999em;pointer-events:auto!important}.dialog:not(.not-immediately-closable):before{display:none}.dialog>div{width:100%}::slotted(*){pointer-events:auto;visibility:visible!important}::slotted(luzmo-popover){position:static}.dialog:not([actual-placement])[placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog:not([actual-placement])[placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}slot[name=longpress-describedby-descriptor]{display:none}@supports selector(:open){.dialog{opacity:0}.dialog:open{opacity:1;--luzmo-popover-filter:drop-shadow(0px 2px 6px #00000026)}}@supports selector(:popover-open){.dialog{opacity:0}.dialog:popover-open{opacity:1;--luzmo-popover-filter:drop-shadow(0px 2px 6px #00000026)}}@supports (overlay:auto){.dialog{transition:all var(--luzmo-overlay-animation-duration,.13s), translate 0s, display var(--luzmo-overlay-animation-duration,.13s);transition-behavior:allow-discrete;display:none}:is(.dialog:popover-open,.dialog:modal){display:flex}}@supports (not selector(:open)) and (not selector(:popover-open)){:host:not([open]) .dialog{pointer-events:none}.dialog[actual-placement]{z-index:calc(var(--luzmo-overlay-z-index-base,1000) + var(--luzmo-overlay-open-count))}}";
|
|
537
|
+
//#endregion
|
|
538
|
+
//#region src/components/overlay/placement-controller.ts
|
|
539
|
+
function R(e) {
|
|
540
|
+
if (e === void 0) return 0;
|
|
541
|
+
let t = window.devicePixelRatio || 1;
|
|
542
|
+
return Math.round(e * t) / t;
|
|
543
|
+
}
|
|
544
|
+
var z = 8, B = 100, pe = (e) => ({
|
|
545
|
+
left: [
|
|
546
|
+
"right",
|
|
547
|
+
"bottom",
|
|
548
|
+
"top"
|
|
549
|
+
],
|
|
550
|
+
"left-start": [
|
|
551
|
+
"right-start",
|
|
552
|
+
"bottom",
|
|
553
|
+
"top"
|
|
554
|
+
],
|
|
555
|
+
"left-end": [
|
|
556
|
+
"right-end",
|
|
557
|
+
"bottom",
|
|
558
|
+
"top"
|
|
559
|
+
],
|
|
560
|
+
right: [
|
|
561
|
+
"left",
|
|
562
|
+
"bottom",
|
|
563
|
+
"top"
|
|
564
|
+
],
|
|
565
|
+
"right-start": [
|
|
566
|
+
"left-start",
|
|
567
|
+
"bottom",
|
|
568
|
+
"top"
|
|
569
|
+
],
|
|
570
|
+
"right-end": [
|
|
571
|
+
"left-end",
|
|
572
|
+
"bottom",
|
|
573
|
+
"top"
|
|
574
|
+
],
|
|
575
|
+
top: [
|
|
576
|
+
"bottom",
|
|
577
|
+
"left",
|
|
578
|
+
"right"
|
|
579
|
+
],
|
|
580
|
+
"top-start": [
|
|
581
|
+
"bottom-start",
|
|
582
|
+
"left",
|
|
583
|
+
"right"
|
|
584
|
+
],
|
|
585
|
+
"top-end": [
|
|
586
|
+
"bottom-end",
|
|
587
|
+
"left",
|
|
588
|
+
"right"
|
|
589
|
+
],
|
|
590
|
+
bottom: [
|
|
591
|
+
"top",
|
|
592
|
+
"left",
|
|
593
|
+
"right"
|
|
594
|
+
],
|
|
595
|
+
"bottom-start": [
|
|
596
|
+
"top-start",
|
|
597
|
+
"left",
|
|
598
|
+
"right"
|
|
599
|
+
],
|
|
600
|
+
"bottom-end": [
|
|
601
|
+
"top-end",
|
|
602
|
+
"left",
|
|
603
|
+
"right"
|
|
604
|
+
]
|
|
605
|
+
})[e] ?? [e], me = Symbol("placement updated"), V = class {
|
|
606
|
+
constructor(e) {
|
|
607
|
+
this.originalPlacements = /* @__PURE__ */ new WeakMap(), this.allowPlacementUpdate = !1, this.closeForAncestorUpdate = () => {
|
|
608
|
+
!this.allowPlacementUpdate && this.options.type !== "modal" && this.cleanup && this.target.dispatchEvent(new Event("close", { bubbles: !0 })), this.allowPlacementUpdate = !1;
|
|
609
|
+
}, this.updatePlacement = () => {
|
|
610
|
+
this.computePlacement();
|
|
611
|
+
}, this.resetOverlayPosition = () => {
|
|
612
|
+
!this.target || !this.options || (this.clearOverlayPosition(), this.host.offsetHeight, this.computePlacement());
|
|
613
|
+
}, this.host = e, this.host.addController(this);
|
|
614
|
+
}
|
|
615
|
+
placeOverlay(e = this.target, t = this.options) {
|
|
616
|
+
if (this.target = e, this.options = t, !e || !t) return;
|
|
617
|
+
let n = y(t.trigger, e, this.closeForAncestorUpdate, {
|
|
618
|
+
ancestorResize: !1,
|
|
619
|
+
elementResize: !1,
|
|
620
|
+
layoutShift: !1
|
|
621
|
+
}), r = y(t.trigger, e, this.updatePlacement, { ancestorScroll: !1 });
|
|
622
|
+
this.cleanup = () => {
|
|
623
|
+
this.host.elements?.forEach((e) => {
|
|
624
|
+
e.addEventListener("luzmo-closed", () => {
|
|
625
|
+
let t = this.originalPlacements.get(e);
|
|
626
|
+
t && e.setAttribute("placement", t), this.originalPlacements.delete(e);
|
|
627
|
+
}, { once: !0 });
|
|
628
|
+
}), n(), r();
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
async computePlacement() {
|
|
632
|
+
let { options: e, target: t } = this;
|
|
633
|
+
await (document.fonts ? document.fonts.ready : Promise.resolve());
|
|
634
|
+
let n = e.trigger instanceof HTMLElement ? b() : b({
|
|
635
|
+
padding: z,
|
|
636
|
+
fallbackPlacements: pe(e.placement)
|
|
637
|
+
}), [r = 0, i = 0] = Array.isArray(e?.offset) ? e.offset : [e.offset, 0], a = this.host.elements.find((e) => e.tipElement)?.tipElement, o = [
|
|
638
|
+
ie({
|
|
639
|
+
mainAxis: r,
|
|
640
|
+
crossAxis: i
|
|
641
|
+
}),
|
|
642
|
+
ae({ padding: z }),
|
|
643
|
+
n,
|
|
644
|
+
oe({
|
|
645
|
+
padding: z,
|
|
646
|
+
apply: ({ availableWidth: e, availableHeight: n, rects: { floating: r } }) => {
|
|
647
|
+
let i = Math.max(B, Math.floor(n)), a = r.height;
|
|
648
|
+
this.initialHeight = this.isConstrained && this.initialHeight || a, this.isConstrained = a < this.initialHeight || i <= a;
|
|
649
|
+
let o = this.isConstrained ? `${i}px` : "";
|
|
650
|
+
Object.assign(t.style, {
|
|
651
|
+
maxWidth: `${Math.floor(e)}px`,
|
|
652
|
+
maxHeight: o
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
}),
|
|
656
|
+
...a ? [v({
|
|
657
|
+
element: a,
|
|
658
|
+
padding: e.tipPadding || z
|
|
659
|
+
})] : []
|
|
660
|
+
], { x: s, y: c, placement: l, middlewareData: u } = await re(e.trigger, t, {
|
|
661
|
+
placement: e.placement,
|
|
662
|
+
middleware: o,
|
|
663
|
+
strategy: "fixed"
|
|
664
|
+
});
|
|
665
|
+
if (Object.assign(t.style, {
|
|
666
|
+
top: "0px",
|
|
667
|
+
left: "0px",
|
|
668
|
+
translate: `${R(s)}px ${R(c)}px`
|
|
669
|
+
}), t.setAttribute("actual-placement", l), this.host.elements?.forEach((e) => {
|
|
670
|
+
this.originalPlacements.has(e) || this.originalPlacements.set(e, e.getAttribute("placement")), e.setAttribute("placement", l);
|
|
671
|
+
}), a && u.arrow) {
|
|
672
|
+
let { x: e, y: t } = u.arrow;
|
|
673
|
+
Object.assign(a.style, {
|
|
674
|
+
top: l.startsWith("right") || l.startsWith("left") ? "0px" : "",
|
|
675
|
+
left: l.startsWith("bottom") || l.startsWith("top") ? "0px" : "",
|
|
676
|
+
translate: `${R(e)}px ${R(t)}px`
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
clearOverlayPosition() {
|
|
681
|
+
this.target && (this.target.style.removeProperty("max-height"), this.target.style.removeProperty("max-width"), this.initialHeight = void 0, this.isConstrained = !1);
|
|
682
|
+
}
|
|
683
|
+
hostConnected() {
|
|
684
|
+
document.addEventListener("luzmo-update-overlays", this.resetOverlayPosition);
|
|
685
|
+
}
|
|
686
|
+
hostUpdated() {
|
|
687
|
+
this.host.open || (this.cleanup?.(), this.cleanup = void 0);
|
|
688
|
+
}
|
|
689
|
+
hostDisconnected() {
|
|
690
|
+
this.cleanup?.(), this.cleanup = void 0, document.removeEventListener("luzmo-update-overlays", this.resetOverlayPosition);
|
|
691
|
+
}
|
|
692
|
+
}, H = /* @__PURE__ */ function(e) {
|
|
693
|
+
return e.click = "click", e.hover = "hover", e.longpress = "longpress", e;
|
|
694
|
+
}({}), U = Symbol("lastInteractionType"), W = "remove-focus-ring-safari-hack", G = class {
|
|
695
|
+
get activelyOpening() {
|
|
696
|
+
return !1;
|
|
697
|
+
}
|
|
698
|
+
get open() {
|
|
699
|
+
return this.overlay?.open ?? this.isLazilyOpen;
|
|
700
|
+
}
|
|
701
|
+
set open(e) {
|
|
702
|
+
if (e !== this.open) {
|
|
703
|
+
if (this.isLazilyOpen = e, this.overlay) {
|
|
704
|
+
this.overlay.open = e, this.target[U] = this.type;
|
|
705
|
+
return;
|
|
706
|
+
}
|
|
707
|
+
e && import("./overlay/index.js").then(() => {
|
|
708
|
+
this.overlay = document.createElement("luzmo-overlay"), this.overlay.open = !0, this.target[U] = this.type;
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
get overlay() {
|
|
713
|
+
return this._overlay;
|
|
714
|
+
}
|
|
715
|
+
set overlay(e) {
|
|
716
|
+
e && this.overlay !== e && (this.overlay && this.overlay.removeController(this), this._overlay = e, this.overlay.addController(this), this.initOverlay(), this.prepareDescription(this.target), this.handleOverlayReady?.(this.overlay));
|
|
717
|
+
}
|
|
718
|
+
constructor(e, { overlay: t, isPersistent: n, handleOverlayReady: r }) {
|
|
719
|
+
this.target = e, this.isLazilyOpen = !1, this.isPersistent = !1, this.isPersistent = !!n, this.handleOverlayReady = r, this.isPersistent && this.init(), this.overlay = t;
|
|
720
|
+
}
|
|
721
|
+
prepareDescription(e) {}
|
|
722
|
+
releaseDescription() {}
|
|
723
|
+
shouldCompleteOpen() {}
|
|
724
|
+
/* c8 ignore next 3 */
|
|
725
|
+
init() {}
|
|
726
|
+
/* c8 ignore next 3 */
|
|
727
|
+
initOverlay() {}
|
|
728
|
+
abort() {
|
|
729
|
+
this.releaseDescription(), this.abortController?.abort();
|
|
730
|
+
}
|
|
731
|
+
hostConnected() {
|
|
732
|
+
this.init();
|
|
733
|
+
}
|
|
734
|
+
hostDisconnected() {
|
|
735
|
+
this.isPersistent || this.abort();
|
|
736
|
+
}
|
|
737
|
+
}, K = class extends G {
|
|
738
|
+
constructor(...e) {
|
|
739
|
+
super(...e), this.type = H.click, this.preventNextToggle = !1;
|
|
740
|
+
}
|
|
741
|
+
handleClick() {
|
|
742
|
+
this.preventNextToggle || (this.open = !this.open), this.preventNextToggle = !1;
|
|
743
|
+
}
|
|
744
|
+
handlePointerdown() {
|
|
745
|
+
this.preventNextToggle = this.open;
|
|
746
|
+
}
|
|
747
|
+
init() {
|
|
748
|
+
this.abortController?.abort(), this.abortController = new AbortController();
|
|
749
|
+
let { signal: e } = this.abortController;
|
|
750
|
+
this.target.addEventListener("click", () => this.handleClick(), { signal: e }), this.target.addEventListener("pointerdown", () => this.handlePointerdown(), { signal: e });
|
|
751
|
+
}
|
|
752
|
+
}, he = 300, q = class extends G {
|
|
753
|
+
constructor(...e) {
|
|
754
|
+
super(...e), this.type = H.hover, this.elementIds = [], this.focusedin = !1, this.pointerentered = !1;
|
|
755
|
+
}
|
|
756
|
+
handleKeyup(e) {
|
|
757
|
+
(e.code === "Tab" || e.code === "Escape") && (this.open = !0, this.removeSafariFocusRingClass());
|
|
758
|
+
}
|
|
759
|
+
handleTargetFocusin() {
|
|
760
|
+
if (this.target.matches(":focus-visible")) {
|
|
761
|
+
if (f() && this.target[U] === H.click) {
|
|
762
|
+
this.target.classList.add(W);
|
|
763
|
+
return;
|
|
764
|
+
}
|
|
765
|
+
this.open = !0, this.focusedin = !0, this.removeSafariFocusRingClass();
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
handleTargetFocusout() {
|
|
769
|
+
this.removeSafariFocusRingClass(), this.focusedin = !1, !this.pointerentered && (this.open = !1);
|
|
770
|
+
}
|
|
771
|
+
handleTargetPointerenter() {
|
|
772
|
+
this.hoverTimeout &&= (clearTimeout(this.hoverTimeout), void 0), !this.overlay?.disabled && (this.open = !0, this.pointerentered = !0);
|
|
773
|
+
}
|
|
774
|
+
handleTargetPointerleave() {
|
|
775
|
+
this.doPointerleave();
|
|
776
|
+
}
|
|
777
|
+
handleHostPointerenter() {
|
|
778
|
+
this.hoverTimeout &&= (clearTimeout(this.hoverTimeout), void 0);
|
|
779
|
+
}
|
|
780
|
+
handleHostPointerleave() {
|
|
781
|
+
this.doPointerleave();
|
|
782
|
+
}
|
|
783
|
+
prepareDescription() {
|
|
784
|
+
if (this.overlay.elements.length === 0) return;
|
|
785
|
+
let e = this.target.getRootNode(), t = this.overlay.elements[0].getRootNode();
|
|
786
|
+
e === this.overlay.getRootNode() ? this.prepareOverlayRelativeDescription() : e === t && this.prepareContentRelativeDescription();
|
|
787
|
+
}
|
|
788
|
+
prepareOverlayRelativeDescription() {
|
|
789
|
+
let e = r(this.target, "aria-describedby", [this.overlay.id]);
|
|
790
|
+
this.releaseDescription = () => {
|
|
791
|
+
e(), this.releaseDescription = w;
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
prepareContentRelativeDescription() {
|
|
795
|
+
let e = [], t = this.overlay.elements.map((t) => (e.push(t.id), t.id ||= `${this.overlay.tagName.toLowerCase()}-helper-${i()}`, t.id));
|
|
796
|
+
this.elementIds = e;
|
|
797
|
+
let n = r(this.target, "aria-describedby", t);
|
|
798
|
+
this.releaseDescription = () => {
|
|
799
|
+
n(), this.overlay.elements.map((e, t) => {
|
|
800
|
+
e.id = this.elementIds[t];
|
|
801
|
+
}), this.releaseDescription = w;
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
doPointerleave() {
|
|
805
|
+
this.pointerentered = !1;
|
|
806
|
+
let e = this.target;
|
|
807
|
+
this.focusedin && e.matches(":focus-visible") || (this.hoverTimeout = setTimeout(() => {
|
|
808
|
+
this.open = !1;
|
|
809
|
+
}, he));
|
|
810
|
+
}
|
|
811
|
+
init() {
|
|
812
|
+
this.abortController?.abort(), this.abortController = new AbortController();
|
|
813
|
+
let { signal: e } = this.abortController;
|
|
814
|
+
this.target.addEventListener("keyup", (e) => this.handleKeyup(e), { signal: e }), this.target.addEventListener("focusin", () => this.handleTargetFocusin(), { signal: e }), this.target.addEventListener("focusout", () => this.handleTargetFocusout(), { signal: e }), this.target.addEventListener("pointerenter", () => this.handleTargetPointerenter(), { signal: e }), this.target.addEventListener("pointerleave", () => this.handleTargetPointerleave(), { signal: e }), this.overlay && this.initOverlay();
|
|
815
|
+
}
|
|
816
|
+
initOverlay() {
|
|
817
|
+
if (!this.abortController) return;
|
|
818
|
+
let { signal: e } = this.abortController;
|
|
819
|
+
this.overlay.addEventListener("pointerenter", () => this.handleHostPointerenter(), { signal: e }), this.overlay.addEventListener("pointerleave", () => this.handleHostPointerleave(), { signal: e });
|
|
820
|
+
}
|
|
821
|
+
removeSafariFocusRingClass() {
|
|
822
|
+
f() && this.target.classList.contains("remove-focus-ring-safari-hack") && this.target.classList.remove(W);
|
|
823
|
+
}
|
|
824
|
+
}, ge = 300, J = {
|
|
825
|
+
touch: "Double tap and long press for additional options",
|
|
826
|
+
keyboard: "Press Space or Alt+Down Arrow for additional options",
|
|
827
|
+
mouse: "Click and hold for additional options"
|
|
828
|
+
}, Y = class extends G {
|
|
829
|
+
constructor(...e) {
|
|
830
|
+
super(...e), this.type = H.longpress, this.longpressState = null, this.releaseDescription = w, this.handlePointerup = () => {
|
|
831
|
+
clearTimeout(this.timeout), this.target && (this.longpressState = this.overlay?.state === "opening" ? "pressed" : null, document.removeEventListener("pointerup", this.handlePointerup), document.removeEventListener("pointercancel", this.handlePointerup));
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
get activelyOpening() {
|
|
835
|
+
return this.longpressState === "opening" || this.longpressState === "pressed";
|
|
836
|
+
}
|
|
837
|
+
handleLongpress() {
|
|
838
|
+
this.open = !0, this.longpressState = this.longpressState === "potential" ? "opening" : "pressed";
|
|
839
|
+
}
|
|
840
|
+
handlePointerdown(e) {
|
|
841
|
+
this.target && e.button === 0 && (this.longpressState = "potential", document.addEventListener("pointerup", this.handlePointerup), document.addEventListener("pointercancel", this.handlePointerup), !("holdAffordance" in this.target) && (this.timeout = setTimeout(() => {
|
|
842
|
+
this.target && this.target.dispatchEvent(new CustomEvent("longpress", {
|
|
843
|
+
bubbles: !0,
|
|
844
|
+
composed: !0,
|
|
845
|
+
detail: { source: "pointer" }
|
|
846
|
+
}));
|
|
847
|
+
}, ge)));
|
|
848
|
+
}
|
|
849
|
+
handleKeydown(e) {
|
|
850
|
+
let { code: t, altKey: n } = e;
|
|
851
|
+
n && t === "ArrowDown" && (e.stopPropagation(), e.stopImmediatePropagation());
|
|
852
|
+
}
|
|
853
|
+
handleKeyup(e) {
|
|
854
|
+
let { code: t, altKey: n } = e;
|
|
855
|
+
if (t === "Space" || n && t === "ArrowDown") {
|
|
856
|
+
if (!this.target) return;
|
|
857
|
+
e.stopPropagation(), this.target.dispatchEvent(new CustomEvent("longpress", {
|
|
858
|
+
bubbles: !0,
|
|
859
|
+
composed: !0,
|
|
860
|
+
detail: { source: "keyboard" }
|
|
861
|
+
})), setTimeout(() => {
|
|
862
|
+
this.longpressState = null;
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
prepareDescription(e) {
|
|
867
|
+
if (this.releaseDescription !== w || this.overlay.elements.length === 0) return;
|
|
868
|
+
let t = document.createElement("div");
|
|
869
|
+
t.id = `longpress-describedby-descriptor-${i()}`, t.textContent = J[u() || d() ? "touch" : "keyboard"], t.slot = "longpress-describedby-descriptor";
|
|
870
|
+
let n = e.getRootNode();
|
|
871
|
+
n === this.overlay.getRootNode() ? this.overlay.append(t) : (t.hidden = !("host" in n), e.after(t));
|
|
872
|
+
let a = r(e, "aria-describedby", [t.id]);
|
|
873
|
+
this.releaseDescription = () => {
|
|
874
|
+
a(), t.remove(), this.releaseDescription = w;
|
|
875
|
+
};
|
|
876
|
+
}
|
|
877
|
+
shouldCompleteOpen() {
|
|
878
|
+
this.longpressState = this.longpressState === "pressed" ? null : this.longpressState;
|
|
879
|
+
}
|
|
880
|
+
init() {
|
|
881
|
+
this.abortController?.abort(), this.abortController = new AbortController();
|
|
882
|
+
let { signal: e } = this.abortController;
|
|
883
|
+
this.target.addEventListener("longpress", () => this.handleLongpress(), { signal: e }), this.target.addEventListener("pointerdown", (e) => this.handlePointerdown(e), { signal: e }), this.prepareDescription(this.target), !this.target.holdAffordance && (this.target.addEventListener("keydown", (e) => this.handleKeydown(e), { signal: e }), this.target.addEventListener("keyup", (e) => this.handleKeyup(e), { signal: e }));
|
|
884
|
+
}
|
|
885
|
+
}, X = {
|
|
886
|
+
click: K,
|
|
887
|
+
longpress: Y,
|
|
888
|
+
hover: q
|
|
889
|
+
}, Z = /* @__PURE__ */ e({ LuzmoOverlay: () => $ }), _e = typeof document < "u" && "showPopover" in document.createElement("div"), Q = le(D);
|
|
890
|
+
Q = _e ? F(Q) : ue(Q);
|
|
891
|
+
var $ = class e extends Q {
|
|
892
|
+
constructor(...e) {
|
|
893
|
+
super(...e), this._delayed = !1, this._disabled = !1, this.offset = 0, this._open = !1, this.lastRequestSlottableState = !1, this.receivesFocus = "auto", this._state = "closed", this.triggerElement = null, this.type = "auto", this.wasOpen = !1, this.closeOnFocusOut = (e) => {
|
|
894
|
+
if (!e.relatedTarget) return;
|
|
895
|
+
let t = new Event("overlay-relation-query", {
|
|
896
|
+
bubbles: !0,
|
|
897
|
+
composed: !0
|
|
898
|
+
});
|
|
899
|
+
e.relatedTarget.addEventListener(t.type, (e) => {
|
|
900
|
+
e.composedPath().includes(this) || (this.open = !1);
|
|
901
|
+
}), e.relatedTarget.dispatchEvent(t);
|
|
902
|
+
};
|
|
903
|
+
}
|
|
904
|
+
static {
|
|
905
|
+
this.styles = [ee(L)];
|
|
906
|
+
}
|
|
907
|
+
get delayed() {
|
|
908
|
+
return this.elements.at(-1)?.hasAttribute("delayed") || this._delayed;
|
|
909
|
+
}
|
|
910
|
+
set delayed(e) {
|
|
911
|
+
this._delayed = e;
|
|
912
|
+
}
|
|
913
|
+
get disabled() {
|
|
914
|
+
return this._disabled;
|
|
915
|
+
}
|
|
916
|
+
set disabled(e) {
|
|
917
|
+
this._disabled = e, e ? (this.strategy?.abort(), this.wasOpen = this.open, this.open = !1) : (this.bindEvents(), this.open = this.open || this.wasOpen, this.wasOpen = !1);
|
|
918
|
+
}
|
|
919
|
+
get hasNonVirtualTrigger() {
|
|
920
|
+
return !!this.triggerElement && !(this.triggerElement instanceof N);
|
|
921
|
+
}
|
|
922
|
+
get placementController() {
|
|
923
|
+
return this._placementController ||= new V(this), this._placementController;
|
|
924
|
+
}
|
|
925
|
+
get open() {
|
|
926
|
+
return this._open;
|
|
927
|
+
}
|
|
928
|
+
set open(t) {
|
|
929
|
+
t && this.disabled || t !== this.open && (this.strategy?.activelyOpening && !t || (this._open = t, this.open && (e.openCount += 1), this.requestUpdate("open", !this.open), this.open && this.requestSlottable()));
|
|
930
|
+
}
|
|
931
|
+
static {
|
|
932
|
+
this.openCount = 1;
|
|
933
|
+
}
|
|
934
|
+
get state() {
|
|
935
|
+
return this._state;
|
|
936
|
+
}
|
|
937
|
+
set state(e) {
|
|
938
|
+
if (e === this.state) return;
|
|
939
|
+
let t = this.state;
|
|
940
|
+
this._state = e, (this.state === "opened" || this.state === "closed") && this.strategy?.shouldCompleteOpen(), this.requestUpdate("state", t);
|
|
941
|
+
}
|
|
942
|
+
get elementResolver() {
|
|
943
|
+
return this._elementResolver ||= new o(this), this._elementResolver;
|
|
944
|
+
}
|
|
945
|
+
get usesDialog() {
|
|
946
|
+
return this.type === "modal" || this.type === "page";
|
|
947
|
+
}
|
|
948
|
+
get popoverValue() {
|
|
949
|
+
if ("popover" in this) switch (this.type) {
|
|
950
|
+
case "modal":
|
|
951
|
+
case "page": return;
|
|
952
|
+
case "hint": return "manual";
|
|
953
|
+
default: return this.type;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
get requiresPositioning() {
|
|
957
|
+
return !(this.type === "page" || !this.open || !this.triggerElement || !this.placement && this.type !== "hint");
|
|
958
|
+
}
|
|
959
|
+
managePosition() {
|
|
960
|
+
if (!this.requiresPositioning || !this.open) return;
|
|
961
|
+
let e = this.offset || 0, t = this.triggerElement, n = this.placement || "right", r = this.tipPadding;
|
|
962
|
+
this.placementController.placeOverlay(this.dialogEl, {
|
|
963
|
+
offset: e,
|
|
964
|
+
placement: n,
|
|
965
|
+
tipPadding: r,
|
|
966
|
+
trigger: t,
|
|
967
|
+
type: this.type
|
|
968
|
+
});
|
|
969
|
+
}
|
|
970
|
+
async managePopoverOpen() {
|
|
971
|
+
super.managePopoverOpen();
|
|
972
|
+
let e = this.open;
|
|
973
|
+
if (this.open !== e || (await this.manageDelay(e), this.open !== e) || (this.triggerInteraction === "longpress" && await E(), await this.ensureOnDOM(e), this.open !== e)) return;
|
|
974
|
+
let t = await this.makeTransition(e);
|
|
975
|
+
this.open === e && await this.applyFocus(e, t);
|
|
976
|
+
}
|
|
977
|
+
async applyFocus(e, t) {
|
|
978
|
+
if (!(this.receivesFocus === "false" || this.type === "hint")) {
|
|
979
|
+
if (await E(), await E(), e === this.open && !this.open) {
|
|
980
|
+
this.hasNonVirtualTrigger && this.contains(this.getRootNode().activeElement) && this.triggerElement.focus();
|
|
981
|
+
return;
|
|
982
|
+
}
|
|
983
|
+
t?.focus();
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
returnFocus() {
|
|
987
|
+
this.open || this.type === "hint" || this.receivesFocus !== "false" && this.triggerElement?.focus && (this.contains(this.getRootNode().activeElement) || (() => {
|
|
988
|
+
let e = [], t = typeof document > "u" ? null : document.activeElement;
|
|
989
|
+
for (; t?.shadowRoot?.activeElement;) t = t.shadowRoot.activeElement;
|
|
990
|
+
for (; t;) {
|
|
991
|
+
let n = t.assignedSlot || t.parentElement || t.getRootNode()?.host;
|
|
992
|
+
n && e.push(n), t = n;
|
|
993
|
+
}
|
|
994
|
+
return e;
|
|
995
|
+
})().includes(this) || typeof document < "u" && document.activeElement === document.body) && this.triggerElement.focus();
|
|
996
|
+
}
|
|
997
|
+
async manageOpen(e) {
|
|
998
|
+
if (!(!this.isConnected && this.open) && (this.hasUpdated || await this.updateComplete, this.open ? (I.add(this), this.willPreventClose && (document.addEventListener("pointerup", () => {
|
|
999
|
+
this.dialogEl.classList.toggle("not-immediately-closable", !1), this.willPreventClose = !1;
|
|
1000
|
+
}, { once: !0 }), this.dialogEl.classList.toggle("not-immediately-closable", !0))) : (e && this.dispose(), I.remove(this)), this.open && this.state !== "opened" ? this.state = "opening" : !this.open && this.state !== "closed" && (this.state = "closing"), this.usesDialog ? this.manageDialogOpen() : this.managePopoverOpen(), this.type === "auto")) {
|
|
1001
|
+
let e = this.getRootNode();
|
|
1002
|
+
this.open ? e.addEventListener("focusout", this.closeOnFocusOut, { capture: !0 }) : e.removeEventListener("focusout", this.closeOnFocusOut, { capture: !0 });
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
bindEvents() {
|
|
1006
|
+
this.strategy?.abort(), this.strategy = void 0, this.hasNonVirtualTrigger && this.triggerInteraction && (this.strategy = new X[this.triggerInteraction](this.triggerElement, { overlay: this }));
|
|
1007
|
+
}
|
|
1008
|
+
handleBeforetoggle(e) {
|
|
1009
|
+
e.newState !== "open" && this.handleBrowserClose(e);
|
|
1010
|
+
}
|
|
1011
|
+
handleBrowserClose(e) {
|
|
1012
|
+
if (e.stopPropagation(), !this.strategy?.activelyOpening) {
|
|
1013
|
+
this.open = !1;
|
|
1014
|
+
return;
|
|
1015
|
+
}
|
|
1016
|
+
this.manuallyKeepOpen();
|
|
1017
|
+
}
|
|
1018
|
+
handleDialogCancel(e) {
|
|
1019
|
+
if (this.type === "page") {
|
|
1020
|
+
e.preventDefault();
|
|
1021
|
+
return;
|
|
1022
|
+
}
|
|
1023
|
+
this.handleBrowserClose(e);
|
|
1024
|
+
}
|
|
1025
|
+
manuallyKeepOpen() {
|
|
1026
|
+
this.open = !0, this.placementController.allowPlacementUpdate = !0, this.manageOpen(!1);
|
|
1027
|
+
}
|
|
1028
|
+
handleSlotchange() {
|
|
1029
|
+
this.elements.length === 0 ? this.strategy?.releaseDescription() : this.hasNonVirtualTrigger && this.strategy?.prepareDescription(this.triggerElement);
|
|
1030
|
+
}
|
|
1031
|
+
shouldPreventClose() {
|
|
1032
|
+
let e = this.willPreventClose;
|
|
1033
|
+
return this.willPreventClose = !1, e;
|
|
1034
|
+
}
|
|
1035
|
+
requestSlottable() {
|
|
1036
|
+
this.lastRequestSlottableState !== this.open && (this.open || document.body.offsetHeight, this.dispatchEvent(new c("overlay-content", this.open ? {} : s)), this.lastRequestSlottableState = this.open);
|
|
1037
|
+
}
|
|
1038
|
+
willUpdate(e) {
|
|
1039
|
+
if (this.hasAttribute("id") || this.setAttribute("id", `${this.tagName.toLowerCase()}-${i()}`), e.has("open") && (this.hasUpdated || this.open) && this.manageOpen(e.get("open")), e.has("trigger")) {
|
|
1040
|
+
let [e, t] = this.trigger?.split("@") || [];
|
|
1041
|
+
this.elementResolver.selector = e ? `#${e}` : "", this.triggerInteraction = t;
|
|
1042
|
+
}
|
|
1043
|
+
let t = !1;
|
|
1044
|
+
e.has(a) && (t = this.triggerElement, this.triggerElement = this.elementResolver.element), e.has("triggerElement") && (t = e.get("triggerElement")), t !== !1 && this.bindEvents();
|
|
1045
|
+
}
|
|
1046
|
+
updated(e) {
|
|
1047
|
+
super.updated(e), e.has("placement") && (this.placement ? this.dialogEl.setAttribute("actual-placement", this.placement) : this.dialogEl.removeAttribute("actual-placement"), this.open && e.get("placement") !== void 0 && this.placementController.resetOverlayPosition()), e.has("state") && this.state === "closed" && e.get("state") !== void 0 && this.placementController.clearOverlayPosition();
|
|
1048
|
+
}
|
|
1049
|
+
renderContent() {
|
|
1050
|
+
return p` <slot @slotchange=${this.handleSlotchange}></slot> `;
|
|
1051
|
+
}
|
|
1052
|
+
get dialogStyleMap() {
|
|
1053
|
+
return { "--luzmo-overlay-open-count": e.openCount.toString() };
|
|
1054
|
+
}
|
|
1055
|
+
renderDialog() {
|
|
1056
|
+
return p`
|
|
1057
|
+
<dialog
|
|
1058
|
+
class="dialog"
|
|
1059
|
+
part="dialog"
|
|
1060
|
+
placement=${g(this.requiresPositioning ? this.placement || "right" : void 0)}
|
|
1061
|
+
style=${_(this.dialogStyleMap)}
|
|
1062
|
+
@close=${this.handleBrowserClose}
|
|
1063
|
+
@cancel=${this.handleDialogCancel}
|
|
1064
|
+
@beforetoggle=${this.handleBeforetoggle}
|
|
1065
|
+
?is-visible=${this.state !== "closed"}
|
|
1066
|
+
>
|
|
1067
|
+
${this.renderContent()}
|
|
1068
|
+
</dialog>
|
|
1069
|
+
`;
|
|
1070
|
+
}
|
|
1071
|
+
renderPopover() {
|
|
1072
|
+
return p`
|
|
1073
|
+
<div
|
|
1074
|
+
class="dialog"
|
|
1075
|
+
part="dialog"
|
|
1076
|
+
placement=${g(this.requiresPositioning ? this.placement || "right" : void 0)}
|
|
1077
|
+
popover=${g(this.popoverValue)}
|
|
1078
|
+
style=${_(this.dialogStyleMap)}
|
|
1079
|
+
@beforetoggle=${this.handleBeforetoggle}
|
|
1080
|
+
@close=${this.handleBrowserClose}
|
|
1081
|
+
?is-visible=${this.state !== "closed"}
|
|
1082
|
+
>
|
|
1083
|
+
${this.renderContent()}
|
|
1084
|
+
</div>
|
|
1085
|
+
`;
|
|
1086
|
+
}
|
|
1087
|
+
render() {
|
|
1088
|
+
return p`
|
|
1089
|
+
${this.type === "modal" || this.type === "page" ? this.renderDialog() : this.renderPopover()}
|
|
1090
|
+
<slot name="longpress-describedby-descriptor"></slot>
|
|
1091
|
+
`;
|
|
1092
|
+
}
|
|
1093
|
+
connectedCallback() {
|
|
1094
|
+
super.connectedCallback(), this.addEventListener("close", () => {
|
|
1095
|
+
this.open = !1;
|
|
1096
|
+
}), this.addEventListener("luzmo-close", () => {
|
|
1097
|
+
this.open = !1;
|
|
1098
|
+
}), this.hasUpdated && this.bindEvents();
|
|
1099
|
+
}
|
|
1100
|
+
disconnectedCallback() {
|
|
1101
|
+
this.strategy?.releaseDescription(), this.open = !1, super.disconnectedCallback();
|
|
1102
|
+
}
|
|
1103
|
+
};
|
|
1104
|
+
n([m({ type: Boolean })], $.prototype, "delayed", null), n([h(".dialog")], $.prototype, "dialogEl", void 0), n([m({ type: Boolean })], $.prototype, "disabled", null), n([te({
|
|
1105
|
+
flatten: !0,
|
|
1106
|
+
selector: ":not([slot=\"longpress-describedby-descriptor\"], slot)"
|
|
1107
|
+
})], $.prototype, "elements", void 0), n([m({ type: Number })], $.prototype, "offset", void 0), n([m({
|
|
1108
|
+
type: Boolean,
|
|
1109
|
+
reflect: !0
|
|
1110
|
+
})], $.prototype, "open", null), n([m()], $.prototype, "placement", void 0), n([m({ attribute: "receives-focus" })], $.prototype, "receivesFocus", void 0), n([h("slot")], $.prototype, "slotEl", void 0), n([ne()], $.prototype, "state", null), n([m({
|
|
1111
|
+
type: Number,
|
|
1112
|
+
attribute: "tip-padding"
|
|
1113
|
+
})], $.prototype, "tipPadding", void 0), n([m()], $.prototype, "trigger", void 0), n([m({ attribute: !1 })], $.prototype, "triggerElement", void 0), n([m({ attribute: !1 })], $.prototype, "triggerInteraction", void 0), n([m()], $.prototype, "type", void 0);
|
|
1114
|
+
//#endregion
|
|
1115
|
+
export { E as _, Y as a, G as c, U as d, V as f, T as g, D as h, J as i, H as l, N as m, Z as n, q as o, me as p, X as r, K as s, $ as t, W as u, w as v, C as y };
|