@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,484 @@
|
|
|
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 "./divider.module-C65RfSUa.js";
|
|
26
|
+
import "./progress-circle/index.js";
|
|
27
|
+
import { html as l, nothing as u, unsafeCSS as d } from "lit";
|
|
28
|
+
import { property as f, query as p, queryAll as m, state as h } from "lit/decorators.js";
|
|
29
|
+
import { luzmoAngleRight as g, luzmoCheck as _, luzmoCheckbox as v, luzmoCheckboxChecked as y, luzmoIcon as b } from "@luzmo/icons";
|
|
30
|
+
import { MutationController as x } from "@lit-labs/observers/mutation-controller.js";
|
|
31
|
+
import { LitVirtualizer as S } from "@lit-labs/virtualizer/LitVirtualizer.js";
|
|
32
|
+
import { repeat as C } from "lit/directives/repeat.js";
|
|
33
|
+
//#region src/components/options/option.module.scss?inline
|
|
34
|
+
var w = "#icon{height:var(--luzmo-option-icon-container-height,var(--option-icon-container-height));min-height:var(--luzmo-option-icon-size,var(--option-icon-height));color:var(--highcontrast-option-color-default,var(--luzmo-option-label-icon-color-default,var(--option-label-icon-color-default)));grid-area:iconArea;justify-content:center;align-self:start;align-items:center;display:flex}::slotted([slot=icon]){fill:var(--highcontrast-option-color-default,var(--luzmo-option-label-icon-color-default,var(--option-label-icon-color-default)));block-size:var(--luzmo-option-icon-size,var(--option-icon-height));inline-size:var(--luzmo-option-icon-width,var(--option-icon-width));font-size:var(--luzmo-option-icon-size,var(--option-icon-height));border-radius:var(--luzmo-option-icon-border-radius,0);border-width:var(--luzmo-option-icon-border-width,0);border-style:var(--luzmo-option-icon-border-style,solid);border-color:var(--luzmo-option-icon-border-color,transparent);text-align:center;--luzmo-icon-vertical-align:0;--luzmo-icon-img-object-fit:var(--luzmo-option-icon-object-fit,var(--option-icon-object-fit,fill));--luzmo-icon-img-object-position:var(--luzmo-option-icon-object-position,var(--option-icon-object-position,50% 50%));justify-content:center;align-items:center;margin-inline-end:max(var(--luzmo-option-label-text-to-visual,var(--option-label-text-to-visual)), var(--luzmo-option-icon-size,var(--option-icon-height)) * .35);display:flex;overflow:hidden}::slotted([slot=icon][data-option-thumbnail]){border-radius:var(--luzmo-option-thumbnail-border-radius,var(--luzmo-option-icon-border-radius,var(--luzmo-border-radius-s,4px)));border-width:var(--luzmo-option-thumbnail-border-width,1px);border-style:var(--luzmo-option-thumbnail-border-style,solid);border-color:var(--luzmo-option-thumbnail-border-color,var(--luzmo-option-icon-border-color,var(--luzmo-border-color-full,var(--luzmo-border-color,#0000001f))))}:host{cursor:pointer;box-sizing:border-box;background-color:var(--highcontrast-option-background-color-default,var(--luzmo-option-background-color-default,var(--option-background-color-default)));line-height:var(--luzmo-option-label-line-height,var(--option-label-line-height));min-block-size:max(var(--luzmo-option-min-height,var(--option-min-height)), var(--luzmo-option-icon-size,var(--option-icon-height)) + var(--luzmo-option-top-edge-to-text,var(--option-top-edge-to-text)) + var(--luzmo-option-bottom-edge-to-text,var(--option-bottom-edge-to-text)));padding-block-start:var(--luzmo-option-top-edge-to-text,var(--option-top-edge-to-text));padding-block-end:var(--luzmo-option-bottom-edge-to-text,var(--option-bottom-edge-to-text));padding-inline:var(--luzmo-option-label-inline-edge-to-content,var(--option-label-inline-edge-to-content));outline:none;flex-shrink:0;grid-template:\". .headingIconArea sectionHeadingArea. .\"\"selectedArea checkArea iconArea labelArea valueArea actionsArea\"1fr\". . .descriptionArea. .\"\". . . . . .\"/auto auto auto 1fr auto auto;justify-content:start;align-items:center;margin:0;-webkit-text-decoration:none;text-decoration:none;display:grid;position:relative}:host:focus-visible{outline:none}#label{grid-area:submenuItemLabelArea}.checkmark,.checkbox{opacity:1;grid-area:checkArea;align-self:start;display:block}.checkmark{font-size:var(--luzmo-option-checkmark-size,var(--option-checkmark-size));fill:var(--highcontrast-options-checkmark-icon-color-default,var(--luzmo-options-checkmark-icon-color-default,var(--options-checkmark-icon-color-default)));color:var(--highcontrast-options-checkmark-icon-color-default,var(--luzmo-options-checkmark-icon-color-default,var(--options-checkmark-icon-color-default)));margin-block-start:calc(var(--luzmo-option-top-to-checkmark,var(--option-top-to-checkmark)) - var(--luzmo-option-top-edge-to-text,var(--option-top-edge-to-text)));margin-inline-end:var(--luzmo-option-text-to-control,var(--option-label-text-to-control))}.checkbox{font-size:var(--luzmo-option-checkbox-size,var(--option-checkbox-size));fill:var(--highcontrast-options-checkbox-icon-color-default,var(--luzmo-options-checkbox-icon-color-default,var(--options-checkbox-icon-color-default)));color:var(--highcontrast-options-checkbox-icon-color-default,var(--luzmo-options-checkbox-icon-color-default,var(--options-checkbox-icon-color-default)));margin-block-start:calc(var(--luzmo-option-top-to-checkbox,var(--option-top-to-checkbox)) - var(--luzmo-option-top-edge-to-text,var(--option-top-edge-to-text)));margin-inline-end:var(--luzmo-option-text-to-control,var(--option-label-text-to-control))}::slotted([slot=value]){grid-area:submenuItemValueArea}:host([focused]){background-color:var(--highcontrast-option-background-color-focus,var(--luzmo-option-background-color-key-focus,var(--option-background-color-key-focus)));outline:none}:host([focused])>#label,:host(:focus)>#label{color:var(--highcontrast-option-color-focus,var(--luzmo-option-label-content-color-focus,var(--option-label-content-color-focus)))}:host([focused])>[name=description]::slotted(*),:host(:focus)>[name=description]::slotted(*){color:var(--highcontrast-option-color-focus,var(--luzmo-option-description-color-focus,var(--option-description-color-focus)))}:host([focused])>::slotted([slot=value]),:host(:focus)>::slotted([slot=value]){color:var(--highcontrast-option-color-focus,var(--luzmo-option-value-color-focus,var(--option-value-color-focus)))}:host([focused])>.icon:not(.checkmark,.checkbox),:host(:focus)>.icon:not(.checkmark,.checkbox){fill:var(--highcontrast-option-color-focus,var(--luzmo-option-label-icon-color-focus,var(--option-label-icon-color-focus)));color:var(--highcontrast-option-color-focus,var(--luzmo-option-label-icon-color-focus,var(--option-label-icon-color-focus)))}:host([focused])>.checkmark,:host(:focus)>.checkmark{fill:var(--highcontrast-option-color-focus,var(--luzmo-options-checkmark-icon-color-focus,var(--options-checkmark-icon-color-focus)));color:var(--highcontrast-option-color-focus,var(--luzmo-options-checkmark-icon-color-focus,var(--options-checkmark-icon-color-focus)))}:host([focused])>.checkbox,:host(:focus)>.checkbox{fill:var(--highcontrast-option-color-focus,var(--luzmo-options-checkbox-icon-color-focus,var(--options-checkbox-icon-color-focus)));color:var(--highcontrast-option-color-focus,var(--luzmo-options-checkbox-icon-color-focus,var(--options-checkbox-icon-color-focus)))}: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])){--option-focus-indicator-direction-scalar:-1}:host(:is(:active,[active])){background-color:var(--highcontrast-option-background-color-focus,var(--luzmo-option-background-color-down,var(--option-background-color-down)))}:host(:is(:active,[active]))>#label{color:var(--highcontrast-option-color-focus,var(--luzmo-option-label-content-color-down,var(--option-label-content-color-down)))}:host(:is(:active,[active]))>[name=description]::slotted(*){color:var(--highcontrast-option-color-focus,var(--luzmo-option-description-color-down,var(--option-description-color-down)))}:host(:is(:active,[active]))>::slotted([slot=value]){color:var(--highcontrast-option-color-focus,var(--luzmo-option-value-color-down,var(--option-value-color-down)))}:host(:is(:active,[active]))>.icon:not(.checkmark,.checkbox){fill:var(--highcontrast-option-color-focus,var(--luzmo-option-label-icon-color-down,var(--option-label-icon-color-down)));color:var(--highcontrast-option-color-focus,var(--luzmo-option-label-icon-color-down,var(--option-label-icon-color-down)))}:host(:is(:active,[active]))>.checkmark{fill:var(--highcontrast-option-color-focus,var(--luzmo-options-checkmark-icon-color-down,var(--options-checkmark-icon-color-down)));color:var(--highcontrast-option-color-focus,var(--luzmo-options-checkmark-icon-color-down,var(--options-checkmark-icon-color-down)))}:host(:is(:active,[active]))>.checkbox{fill:var(--highcontrast-option-color-focus,var(--luzmo-options-checkbox-icon-color-down,var(--options-checkbox-icon-color-down)));color:var(--highcontrast-option-color-focus,var(--luzmo-options-checkbox-icon-color-down,var(--options-checkbox-icon-color-down)))}:host([disabled]),:host([aria-disabled=true]){background-color:initial}:host([disabled]) #label,:host([disabled]) ::slotted([slot=value]),:host([aria-disabled=true]) #label,:host([aria-disabled=true]) ::slotted([slot=value]){color:var(--highcontrast-option-color-disabled,var(--luzmo-option-label-content-color-disabled,var(--option-label-content-color-disabled)))}:host([disabled]) [name=description]::slotted(*),:host([aria-disabled=true]) [name=description]::slotted(*){color:var(--highcontrast-option-color-disabled,var(--luzmo-option-description-color-disabled,var(--option-description-color-disabled)))}:host([disabled]) ::slotted([slot=icon]),:host([aria-disabled=true]) ::slotted([slot=icon]){color:var(--highcontrast-option-color-disabled,var(--luzmo-option-label-icon-color-disabled,var(--option-label-icon-color-disabled)));fill:var(--highcontrast-option-color-disabled,var(--luzmo-option-label-icon-color-disabled,var(--option-label-icon-color-disabled)))}:host([focused]){box-shadow:inset calc(var(--luzmo-option-focus-indicator-width,var(--option-focus-indicator-width)) * 1) 0 0 0 var(--highcontrast-option-focus-indicator-color,var(--luzmo-option-focus-indicator-color,var(--option-focus-indicator-color)));box-shadow:inset calc(var(--luzmo-option-focus-indicator-width,var(--option-focus-indicator-width)) * var(--option-focus-indicator-direction-scalar,1)) 0 0 0 var(--highcontrast-option-focus-indicator-color,var(--luzmo-option-focus-indicator-color,var(--option-focus-indicator-color)))}#label{font-size:var(--luzmo-option-label-font-size,var(--option-label-font-size));color:var(--highcontrast-option-color-default,var(--luzmo-option-label-content-color-default,var(--option-label-content-color-default)));-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;grid-area:labelArea}:host([variant=highlight][selected]){background-color:var(--luzmo-option-highlight-selected-label-background-color,var(--option-highlight-selected-label-background-color))}:host([variant=highlight][selected]) #label{color:var(--luzmo-option-highlight-selected-label-content-color,var(--option-highlight-selected-label-content-color))}:host([variant=highlight][selected]) [name=description]::slotted(*){color:var(--luzmo-option-highlight-selected-description-color,var(--option-highlight-selected-label-content-color))}:host([variant=highlight][selected]):hover #label{color:var(--luzmo-option-highlight-selected-label-content-color-hover,var(--option-highlight-selected-label-content-color-hover))}:host([variant=highlight][selected]):hover [name=description]::slotted(*){color:var(--luzmo-option-highlight-selected-description-color-hover,var(--option-highlight-selected-label-content-color-hover))}:host([variant=highlight][selected]):active #label{color:var(--luzmo-option-highlight-selected-label-content-color-down,var(--option-highlight-selected-label-content-color-down))}:host([variant=highlight][selected]):active [name=description]::slotted(*){color:var(--luzmo-option-highlight-selected-description-color-down,var(--option-highlight-selected-label-content-color-down))}:host([variant=highlight][selected]):focus #label{color:var(--luzmo-option-highlight-selected-label-content-color-focus,var(--option-highlight-selected-label-content-color-focus))}:host([variant=highlight][selected]):focus [name=description]::slotted(*){color:var(--luzmo-option-highlight-selected-description-color-focus,var(--option-highlight-selected-label-content-color-focus))}:host([variant=highlight][selected]) ::slotted([slot=icon]){color:var(--highcontrast-option-color-disabled,var(--luzmo-option-highlight-selected-label-content-color,var(--option-highlight-selected-label-content-color)));fill:var(--highcontrast-option-color-disabled,var(--luzmo-option-highlight-selected-label-content-color,var(--option-highlight-selected-label-content-color)))}::slotted([slot=value]){color:var(--highcontrast-option-color-default,var(--luzmo-option-value-color-default,var(--option-value-color-default)));font-size:var(--luzmo-option-label-font-size,var(--option-label-font-size));grid-area:valueArea;justify-self:end}[name=description]::slotted(*){color:var(--highcontrast-option-color-default,var(--luzmo-option-description-color-default,var(--option-description-color-default)));font-size:var(--luzmo-option-description-font-size,var(--option-description-font-size));-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;line-height:var(--luzmo-option-description-line-height,var(--option-description-line-height));grid-area:descriptionArea;margin-block-start:var(--luzmo-option-label-to-description-spacing,var(--option-label-to-description-spacing))}:host([no-wrap]) #label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host([expandable]){cursor:pointer}:host([expandable][has-selected-child][variant=highlight]:not([expanded])){background-color:color-mix(in srgb, var(--luzmo-option-highlight-selected-label-background-color,var(--option-highlight-selected-label-background-color)) 12%, transparent)}:host([expandable])>.checkmark{color:color-mix(in srgb, var(--highcontrast-options-checkmark-icon-color-default,var(--luzmo-options-checkmark-icon-color-default,var(--options-checkmark-icon-color-default))) 50%, transparent);fill:color-mix(in srgb, var(--highcontrast-options-checkmark-icon-color-default,var(--luzmo-options-checkmark-icon-color-default,var(--options-checkmark-icon-color-default))) 50%, transparent)}:host([expandable])>.checkbox{color:color-mix(in srgb, var(--highcontrast-options-checkbox-icon-color-default,var(--luzmo-options-checkbox-icon-color-default,var(--options-checkbox-icon-color-default))) 50%, transparent);fill:color-mix(in srgb, var(--highcontrast-options-checkbox-icon-color-default,var(--luzmo-options-checkbox-icon-color-default,var(--options-checkbox-icon-color-default))) 50%, transparent)}:host([expandable][has-selected-child])>.checkmark{color:color-mix(in srgb, var(--highcontrast-options-checkmark-icon-color-default,var(--luzmo-options-checkmark-icon-color-default,var(--options-checkmark-icon-color-default))) 50%, transparent);fill:color-mix(in srgb, var(--highcontrast-options-checkmark-icon-color-default,var(--luzmo-options-checkmark-icon-color-default,var(--options-checkmark-icon-color-default))) 50%, transparent)}:host([expandable][has-selected-child])>.checkbox{color:color-mix(in srgb, var(--highcontrast-options-checkbox-icon-color-default,var(--luzmo-options-checkbox-icon-color-default,var(--options-checkbox-icon-color-default))) 50%, transparent);fill:color-mix(in srgb, var(--highcontrast-options-checkbox-icon-color-default,var(--luzmo-options-checkbox-icon-color-default,var(--options-checkbox-icon-color-default))) 50%, transparent)}:host([child-option]){padding-inline-start:calc(var(--luzmo-option-label-inline-edge-to-content,var(--option-label-inline-edge-to-content)) + 24px)}@media (hover:hover){:host(:hover){background-color:var(--highcontrast-option-background-color-focus,var(--luzmo-option-background-color-hover,var(--option-background-color-hover)))}:host(:hover)>#label{color:var(--highcontrast-option-color-focus,var(--luzmo-option-label-content-color-hover,var(--option-label-content-color-hover)))}:host([variant=highlight][selected]:hover)>#label{color:var(--luzmo-option-highlight-selected-label-content-color-hover,var(--option-highlight-selected-label-content-color-hover))}:host([variant=highlight][selected]:hover)>[name=description]::slotted(*){color:var(--luzmo-option-highlight-selected-description-color-hover,var(--option-highlight-selected-label-content-color-hover))}:host(:hover)>[name=description]::slotted(*){color:var(--highcontrast-option-color-focus,var(--luzmo-option-description-color-hover,var(--option-description-color-hover)))}:host(:hover)>::slotted([slot=value]){color:var(--highcontrast-option-color-focus,var(--luzmo-option-value-color-hover,var(--option-value-color-hover)))}:host(:hover)>.icon:not(.checkmark,.checkbox){fill:var(--highcontrast-option-color-focus,var(--luzmo-option-label-icon-color-hover,var(--option-label-icon-color-hover)));color:var(--highcontrast-option-color-focus,var(--luzmo-option-label-icon-color-hover,var(--option-label-icon-color-hover)))}:host([variant=highlight][selected]:hover)>.icon:not(.checkmark,.checkbox){fill:var(--luzmo-option-highlight-selected-label-icon-color-hover,var(--option-highlight-selected-label-icon-color-hover))}:host(:hover)>.checkmark{fill:var(--highcontrast-option-color-focus,var(--luzmo-options-checkmark-icon-color-hover,var(--options-checkmark-icon-color-hover)));color:var(--highcontrast-option-color-focus,var(--luzmo-options-checkmark-icon-color-hover,var(--options-checkmark-icon-color-hover)))}:host(:hover)>.checkbox{fill:var(--highcontrast-option-color-focus,var(--luzmo-options-checkbox-icon-color-hover,var(--options-checkbox-icon-color-hover)));color:var(--highcontrast-option-color-focus,var(--luzmo-options-checkbox-icon-color-hover,var(--options-checkbox-icon-color-hover)))}:host([disabled]:hover),:host([aria-disabled=true]:hover){cursor:default;background-color:initial}:host([disabled]:hover) #label,:host([disabled]:hover) ::slotted([slot=value]),:host([aria-disabled=true]:hover) #label,:host([aria-disabled=true]:hover) ::slotted([slot=value]){color:var(--highcontrast-option-color-disabled,var(--luzmo-option-label-content-color-disabled,var(--option-label-content-color-disabled)))}:host([disabled]:hover) [name=description]::slotted(*),:host([aria-disabled=true]:hover) [name=description]::slotted(*){color:var(--highcontrast-option-color-disabled,var(--luzmo-option-description-color-disabled,var(--option-description-color-disabled)))}:host([disabled]:hover) ::slotted([slot=icon]),:host([aria-disabled=true]:hover) ::slotted([slot=icon]){color:var(--highcontrast-option-color-disabled,var(--luzmo-option-label-icon-color-disabled,var(--option-label-icon-color-disabled)));fill:var(--highcontrast-option-color-disabled,var(--luzmo-option-label-icon-color-disabled,var(--option-label-icon-color-disabled)))}}:host([emphasized]){--options-checkmark-icon-color-default:var(--luzmo-primary);--options-checkmark-icon-color-hover:var(--luzmo-primary-hover);--options-checkmark-icon-color-down:var(--luzmo-primary-down);--options-checkmark-icon-color-focus:var(--luzmo-primary-focus);--options-checkbox-icon-color-default:var(--luzmo-primary);--options-checkbox-icon-color-hover:var(--luzmo-primary-hover);--options-checkbox-icon-color-down:var(--luzmo-primary-down);--options-checkbox-icon-color-focus:var(--luzmo-primary-focus)}:host{text-align:initial;font-family:var(--luzmo-option-font-family,var(--luzmo-font-family))}:host([hidden]){display:none}:host([disabled]){pointer-events:none}:host([disabled]) [name=value]::slotted(*){color:var(--luzmo-option-label-icon-color-disabled,var(--luzmo-disabled-color))}#button{position:absolute;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}}:host([no-wrap]) #label{display:block}", T = (e) => l`
|
|
35
|
+
<span class="icon-container icon checkmark ${e.join(" ")}">
|
|
36
|
+
${b(_)}
|
|
37
|
+
</span>
|
|
38
|
+
`, E = (e) => l`
|
|
39
|
+
<span class="icon-container icon checkbox ${e.join(" ")}">
|
|
40
|
+
${b(v)}
|
|
41
|
+
</span>
|
|
42
|
+
`, D = (e) => l`
|
|
43
|
+
<span class="icon-container icon checkbox ${e.join(" ")}">
|
|
44
|
+
${b(y)}
|
|
45
|
+
</span>
|
|
46
|
+
`, O = class extends i(a(s(r, "[slot=\"icon\"]"))) {
|
|
47
|
+
static get styles() {
|
|
48
|
+
return [d(w)];
|
|
49
|
+
}
|
|
50
|
+
get value() {
|
|
51
|
+
return this._value || this.itemText;
|
|
52
|
+
}
|
|
53
|
+
set value(e) {
|
|
54
|
+
e !== this._value && (this._value = e || "", this._value ? this.setAttribute("value", this._value) : this.removeAttribute("value"));
|
|
55
|
+
}
|
|
56
|
+
get itemText() {
|
|
57
|
+
return this.itemChildren.content.reduce((e, t) => e + (t.textContent || "").trim(), "");
|
|
58
|
+
}
|
|
59
|
+
get focusElement() {
|
|
60
|
+
return this;
|
|
61
|
+
}
|
|
62
|
+
get hasIcon() {
|
|
63
|
+
return this.slotContentIsPresent;
|
|
64
|
+
}
|
|
65
|
+
get itemChildren() {
|
|
66
|
+
if (!this.iconSlot || !this.contentSlot) return {
|
|
67
|
+
icon: [],
|
|
68
|
+
content: []
|
|
69
|
+
};
|
|
70
|
+
if (this._itemChildren) return this._itemChildren;
|
|
71
|
+
let e = this.iconSlot.assignedElements().map((e) => {
|
|
72
|
+
let t = e.cloneNode(!0);
|
|
73
|
+
return t.removeAttribute("slot"), t.classList.toggle("icon"), t;
|
|
74
|
+
}), t = this.contentSlot.assignedNodes().map((e) => e.cloneNode(!0));
|
|
75
|
+
return this._itemChildren = {
|
|
76
|
+
icon: e,
|
|
77
|
+
content: t
|
|
78
|
+
}, this._itemChildren;
|
|
79
|
+
}
|
|
80
|
+
constructor() {
|
|
81
|
+
super(), this.active = !1, this.focused = !1, this.selected = !1, this.emphasized = !1, this.expandable = !1, this.expanded = !1, this.childOption = !1, this.hasSelectedChild = !1, this.variant = "checkmarks", this._value = "", this.noWrap = !1, this.renderCheckIcon = (e, t) => {
|
|
82
|
+
let n = t ? ["check-icon--with-adjacent-icon"] : [];
|
|
83
|
+
return this.variant === "checkboxes" ? e ? D(n) : E(n) : e && this.variant !== "highlight" ? T(n) : l``;
|
|
84
|
+
}, this.proxyFocus = () => {
|
|
85
|
+
this.focus();
|
|
86
|
+
}, this.willDispatchUpdate = !1, this.addEventListener("click", this.handleClickCapture, { capture: !0 }), new x(this, {
|
|
87
|
+
config: {
|
|
88
|
+
characterData: !0,
|
|
89
|
+
childList: !0,
|
|
90
|
+
subtree: !0
|
|
91
|
+
},
|
|
92
|
+
callback: () => {
|
|
93
|
+
this.breakItemChildrenCache();
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
click() {
|
|
98
|
+
this.disabled || this.shouldProxyClick() || super.click();
|
|
99
|
+
}
|
|
100
|
+
handleClickCapture(e) {
|
|
101
|
+
if (this.disabled) return e.preventDefault(), e.stopImmediatePropagation(), e.stopPropagation(), !1;
|
|
102
|
+
}
|
|
103
|
+
shouldProxyClick() {
|
|
104
|
+
let e = !1;
|
|
105
|
+
return this.anchorElement && (this.anchorElement.click(), e = !0), e;
|
|
106
|
+
}
|
|
107
|
+
breakItemChildrenCache() {
|
|
108
|
+
this._itemChildren = void 0, this.triggerUpdate();
|
|
109
|
+
}
|
|
110
|
+
render() {
|
|
111
|
+
return l`
|
|
112
|
+
${this.renderCheckIcon(this.selected || this.hasSelectedChild, this.hasIcon)}
|
|
113
|
+
<div id="icon">
|
|
114
|
+
<slot name="icon"></slot>
|
|
115
|
+
</div>
|
|
116
|
+
<div id="label">
|
|
117
|
+
<slot id="slot"></slot>
|
|
118
|
+
</div>
|
|
119
|
+
<slot name="description"></slot>
|
|
120
|
+
<slot name="value"></slot>
|
|
121
|
+
${this.href && this.href.length > 0 ? super.renderAnchor({
|
|
122
|
+
id: "button",
|
|
123
|
+
ariaHidden: !0,
|
|
124
|
+
className: "button anchor hidden"
|
|
125
|
+
}) : u}
|
|
126
|
+
`;
|
|
127
|
+
}
|
|
128
|
+
handlePointerdown() {}
|
|
129
|
+
firstUpdated(e) {
|
|
130
|
+
super.firstUpdated(e), this.setAttribute("tabindex", "-1"), this.addEventListener("pointerdown", this.handlePointerdown), this.hasAttribute("id") || (this.id = `luzmo-option-${o()}`);
|
|
131
|
+
}
|
|
132
|
+
updateAriaSelected() {
|
|
133
|
+
let e = this.getAttribute("role");
|
|
134
|
+
e === "option" ? this.setAttribute("aria-selected", this.selected ? "true" : "false") : e === "optioncheckbox" && this.setAttribute("aria-checked", this.selected ? "true" : "false");
|
|
135
|
+
}
|
|
136
|
+
setRole(e) {
|
|
137
|
+
this.setAttribute("role", e), this.updateAriaSelected();
|
|
138
|
+
}
|
|
139
|
+
updated(e) {
|
|
140
|
+
super.updated(e), e.has("label") && (this.label || e.get("label") !== void 0) && this.setAttribute("aria-label", this.label || ""), this.anchorElement && (this.anchorElement.addEventListener("focus", this.proxyFocus), this.anchorElement.tabIndex = -1), e.has("selected") && this.updateAriaSelected();
|
|
141
|
+
}
|
|
142
|
+
connectedCallback() {
|
|
143
|
+
super.connectedCallback(), this.triggerUpdate();
|
|
144
|
+
}
|
|
145
|
+
async triggerUpdate() {
|
|
146
|
+
this.willDispatchUpdate || (this.willDispatchUpdate = !0, await new Promise((e) => requestAnimationFrame(e)), this.dispatchUpdate());
|
|
147
|
+
}
|
|
148
|
+
dispatchUpdate() {
|
|
149
|
+
this.isConnected && (this.willDispatchUpdate = !1);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
t([f({
|
|
153
|
+
type: Boolean,
|
|
154
|
+
reflect: !0
|
|
155
|
+
})], O.prototype, "active", void 0), t([f({
|
|
156
|
+
type: Boolean,
|
|
157
|
+
reflect: !0
|
|
158
|
+
})], O.prototype, "focused", void 0), t([f({
|
|
159
|
+
type: Boolean,
|
|
160
|
+
reflect: !0
|
|
161
|
+
})], O.prototype, "selected", void 0), t([f({
|
|
162
|
+
type: Boolean,
|
|
163
|
+
reflect: !0
|
|
164
|
+
})], O.prototype, "emphasized", void 0), t([f({
|
|
165
|
+
type: Boolean,
|
|
166
|
+
reflect: !0
|
|
167
|
+
})], O.prototype, "expandable", void 0), t([f({
|
|
168
|
+
type: Boolean,
|
|
169
|
+
reflect: !0
|
|
170
|
+
})], O.prototype, "expanded", void 0), t([f({
|
|
171
|
+
type: Boolean,
|
|
172
|
+
reflect: !0,
|
|
173
|
+
attribute: "child-option"
|
|
174
|
+
})], O.prototype, "childOption", void 0), t([f({
|
|
175
|
+
type: Boolean,
|
|
176
|
+
reflect: !0,
|
|
177
|
+
attribute: "has-selected-child"
|
|
178
|
+
})], O.prototype, "hasSelectedChild", void 0), t([f({
|
|
179
|
+
type: String,
|
|
180
|
+
reflect: !0
|
|
181
|
+
})], O.prototype, "variant", void 0), t([f({ type: String })], O.prototype, "value", null), t([p("slot:not([name])")], O.prototype, "contentSlot", void 0), t([p("slot[name=\"icon\"]")], O.prototype, "iconSlot", void 0), t([f({
|
|
182
|
+
type: Boolean,
|
|
183
|
+
reflect: !0,
|
|
184
|
+
attribute: "no-wrap",
|
|
185
|
+
hasChanged() {
|
|
186
|
+
return !1;
|
|
187
|
+
}
|
|
188
|
+
})], O.prototype, "noWrap", void 0), t([p(".anchor")], O.prototype, "anchorElement", void 0);
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region src/components/options/options-divider.module.scss?inline
|
|
191
|
+
var k = ":host{--options-divider-thickness:var(--divider-thickness-medium,var(--luzmo-border-width));inline-size:auto;margin-block:var(--luzmo-options-section-divider-margin-block,max(0px, (var(--option-section-divider-height) - var(--options-divider-thickness)) / 2));margin-inline:var(--luzmo-option-label-inline-edge-to-content,var(--option-label-inline-edge-to-content));flex-shrink:0;display:block;overflow:visible}", A = class extends n(e, { validSizes: [
|
|
192
|
+
"s",
|
|
193
|
+
"m",
|
|
194
|
+
"l"
|
|
195
|
+
] }) {
|
|
196
|
+
static get styles() {
|
|
197
|
+
return [d(c), d(k)];
|
|
198
|
+
}
|
|
199
|
+
firstUpdated(e) {
|
|
200
|
+
super.firstUpdated(e), this.hasAttribute("role") || this.setAttribute("role", "separator");
|
|
201
|
+
}
|
|
202
|
+
}, j = ":host{--option-top-to-action:var(--luzmo-spacing-1);--option-top-to-checkbox:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--option-label-line-height:var(--luzmo-line-height);--option-label-line-height-cjk:1.5;--option-label-to-description-spacing:1px;--option-focus-indicator-width:var(--luzmo-indicator-width);--option-focus-indicator-color:var(--luzmo-indicator-color);--option-label-to-value-area-min-spacing:var(--luzmo-spacing-3);--option-label-content-color-default:var(--luzmo-font-color);--option-label-content-color-hover:var(--luzmo-font-color-hover);--option-label-content-color-down:var(--luzmo-font-color-down);--option-label-content-color-focus:var(--luzmo-font-color-focus);--option-label-icon-color-default:var(--luzmo-font-color);--option-label-icon-color-hover:var(--luzmo-font-color-hover);--option-label-icon-color-down:var(--luzmo-font-color-down);--option-label-icon-color-focus:var(--luzmo-font-color-focus);--option-highlight-selected-label-background-color:var(--luzmo-primary);--option-highlight-selected-label-content-color:var(--luzmo-primary-inverse-color);--option-highlight-selected-label-content-color-hover:var(--luzmo-primary-inverse-color);--option-highlight-selected-label-content-color-down:var(--luzmo-primary-inverse-color);--option-highlight-selected-label-content-color-focus:var(--luzmo-primary-inverse-color);--option-label-content-color-disabled:var(--luzmo-font-color-disabled);--option-label-icon-color-disabled:var(--luzmo-font-color-disabled);--option-description-line-height:var(--luzmo-line-height);--option-description-line-height-cjk:1.5;--option-description-color-default:var(--luzmo-font-color);--option-description-color-hover:var(--luzmo-font-color-hover);--option-description-color-down:var(--luzmo-font-color-down);--option-description-color-focus:var(--luzmo-font-color-focus);--option-description-color-disabled:var(--luzmo-disabled-color);--options-section-header-line-height:var(--luzmo-line-height);--options-section-header-line-height-cjk:1.5;--options-section-header-font-weight:bold;--options-section-header-color:var(--luzmo-font-color-down);--options-collapsible-icon-color:var(--luzmo-font-color-down);--options-checkmark-icon-color-default:var(--luzmo-font-color);--options-checkmark-icon-color-hover:var(--luzmo-font-color-hover);--options-checkmark-icon-color-down:var(--luzmo-font-color-down);--options-checkmark-icon-color-focus:var(--luzmo-font-color-focus);--options-checkbox-icon-color-default:var(--luzmo-font-color);--options-checkbox-icon-color-hover:var(--luzmo-font-color-hover);--options-checkbox-icon-color-down:var(--luzmo-font-color-down);--options-checkbox-icon-color-focus:var(--luzmo-font-color-focus);--options-drillin-icon-color-default:var(--luzmo-font-color);--options-drillin-icon-color-hover:var(--luzmo-font-color-hover);--options-drillin-icon-color-down:var(--luzmo-font-color-down);--options-drillin-icon-color-focus:var(--luzmo-font-color-focus);--option-value-color-default:var(--luzmo-font-color);--option-value-color-hover:var(--luzmo-font-color-hover);--option-value-color-down:var(--luzmo-font-color-down);--option-value-color-focus:var(--luzmo-font-color-focus);--option-collapsible-no-icon-suboption-padding-x-start:28px;--option-background-color-selected:var(--luzmo-background-color);--option-background-color-default:var(--luzmo-background-color);--option-background-color-hover:var(--luzmo-background-color-hover);--option-background-color-down:var(--luzmo-background-color-down);--option-background-color-key-focus:var(--luzmo-background-color-focus);--options-scrollbar-width:var(--luzmo-scrollbar-size);--options-scrollbar-track-background:var(--luzmo-scrollbar-track-background);--options-scrollbar-track-border-radius:var(--luzmo-scrollbar-track-border-radius);--options-scrollbar-thumb-background:var(--luzmo-scrollbar-thumb-background);--options-scrollbar-thumb-border-radius:var(--luzmo-scrollbar-thumb-border-radius);--options-scrollbar-thumb-hover-background:var(--luzmo-scrollbar-thumb-hover-background);--luzmo-option-thumbnail-border-radius:var(--luzmo-border-radius-s,4px);--luzmo-option-thumbnail-border-width:1px;--luzmo-option-thumbnail-border-style:solid;--luzmo-option-thumbnail-border-color:var(--luzmo-border-color-full,var(--luzmo-border-color,#0000001f));--option-min-height:var(--luzmo-component-height);--options-max-height:calc(8 * var(--option-min-height));--option-icon-container-height:18px;--options-pending-height:var(--option-min-height);--progress-circle-size:calc(var(--options-pending-height) - var(--option-top-edge-to-text) - var(--option-bottom-edge-to-text));--option-icon-height:var(--luzmo-font-size);--option-icon-width:var(--luzmo-font-size);--option-label-font-size:var(--luzmo-font-size);--option-label-text-to-visual:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--option-label-text-to-control:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--option-label-inline-edge-to-content:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--pending-inline-edge-to-content:var(--option-label-inline-edge-to-content);--option-top-edge-to-text:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--option-bottom-edge-to-text:var(--luzmo-spacing-3);--option-description-font-size:var(--luzmo-font-size-xs);--options-section-header-font-size:var(--luzmo-font-size);--options-section-header-min-width:var(--luzmo-component-height);--option-selectable-edge-to-text-not-selected:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--option-checkmark-size:var(--luzmo-font-size-xs);--option-checkbox-size:var(--luzmo-font-size-xs);--option-top-to-checkmark:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1))}:host([size=s]){--option-min-height:var(--luzmo-component-height-s);--option-icon-container-height:17px;--option-icon-height:var(--luzmo-font-size-s);--option-icon-width:var(--luzmo-font-size-s);--option-label-font-size:var(--luzmo-font-size-s);--option-label-text-to-visual:var(--luzmo-spacing-3);--option-label-text-to-control:var(--luzmo-spacing-3);--option-label-inline-edge-to-content:var(--luzmo-spacing-3);--option-top-edge-to-text:calc(var(--luzmo-spacing-1) + var(--luzmo-spacing-2));--option-bottom-edge-to-text:var(--luzmo-spacing-2);--option-description-font-size:var(--luzmo-font-size-xs);--options-section-header-font-size:var(--luzmo-font-size-s);--options-section-header-min-width:var(--luzmo-component-height-s);--option-selectable-edge-to-text-not-selected:var(--luzmo-spacing-3);--option-checkmark-size:var(--luzmo-font-size-xs);--option-checkbox-size:var(--luzmo-font-size-xs);--option-top-to-checkmark:var(--luzmo-spacing-3);--option-top-to-checkbox:var(--luzmo-spacing-3)}:host([size=l]){--option-min-height:var(--luzmo-component-height-l);--option-icon-container-height:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--option-icon-height:var(--luzmo-font-size-l);--option-icon-width:var(--luzmo-font-size-l);--option-label-font-size:var(--luzmo-font-size-l);--option-label-text-to-visual:var(--luzmo-spacing-4);--option-label-text-to-control:var(--luzmo-spacing-4);--option-label-inline-edge-to-content:var(--luzmo-spacing-4);--option-top-edge-to-text:var(--luzmo-spacing-4);--option-bottom-edge-to-text:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--option-description-font-size:var(--luzmo-font-size-s);--options-section-header-font-size:var(--luzmo-font-size-l);--options-section-header-min-width:var(--luzmo-component-height-l);--option-selectable-edge-to-text-not-selected:var(--luzmo-spacing-4);--option-checkmark-size:var(--luzmo-font-size-s);--option-checkbox-size:var(--luzmo-font-size-s);--option-top-to-checkmark:var(--luzmo-spacing-4);--option-top-to-checkbox:var(--luzmo-spacing-4)}:host([size=xl]){--option-min-height:var(--luzmo-component-height-xl);--option-icon-container-height:26px;--option-icon-height:var(--luzmo-font-size-xl);--option-icon-width:var(--luzmo-font-size-xl);--option-label-font-size:var(--luzmo-font-size-xl);--option-label-text-to-visual:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--option-label-text-to-control:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--option-label-inline-edge-to-content:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--option-top-edge-to-text:var(--luzmo-spacing-4);--option-bottom-edge-to-text:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--option-description-font-size:var(--luzmo-font-size);--options-section-header-font-size:var(--luzmo-font-size-xl);--options-section-header-min-width:var(--luzmo-component-height-xl);--option-selectable-edge-to-text-not-selected:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--option-checkmark-size:var(--luzmo-font-size);--option-checkbox-size:var(--luzmo-font-size);--option-top-to-checkmark:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--option-top-to-checkbox:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1))}@media (forced-colors:active){:host{--highcontrast-option-background-color-default:ButtonFace;--highcontrast-option-color-default:ButtonText;--highcontrast-option-background-color-focus:Highlight;--highcontrast-option-color-focus:HighlightText;--highcontrast-options-checkmark-icon-color-default:Highlight;--highcontrast-options-checkbox-icon-color-default:Highlight;--highcontrast-option-color-disabled:GrayText;--highcontrast-option-focus-indicator-color:Highlight;--highcontrast-option-selected-background-color:Highlight;--highcontrast-option-selected-color:HighlightText}@supports (color:SelectedItem){:host{--highcontrast-option-selected-background-color:SelectedItem;--highcontrast-option-selected-color:SelectedItemText}}}:host{inline-size:auto;inline-size:var(--luzmo-options-inline-size,auto);box-sizing:border-box;max-height:var(--luzmo-options-max-height,var(--options-max-height));margin:0;padding:0;list-style-type:none;display:inline-block;overflow:auto}:host::-webkit-scrollbar{width:var(--luzmo-options-scrollbar-width,var(--options-scrollbar-width))}:host::-webkit-scrollbar-track{background:var(--luzmo-options-scrollbar-track-background,var(--options-scrollbar-track-background));border-radius:var(--luzmo-options-scrollbar-track-border-radius,var(--options-scrollbar-track-border-radius))}:host::-webkit-scrollbar-thumb{background:var(--luzmo-options-scrollbar-thumb-background,var(--options-scrollbar-thumb-background));border-radius:var(--luzmo-options-scrollbar-thumb-border-radius,var(--options-scrollbar-thumb-border-radius))}:host::-webkit-scrollbar-thumb:hover{background:var(--luzmo-options-scrollbar-thumb-hover-background,var(--options-scrollbar-thumb-hover-background))}:host{scrollbar-width:var(--luzmo-scrollbar-width,thin);scrollbar-color:var(--luzmo-options-scrollbar-thumb-background,var(--options-scrollbar-thumb-background)) var(--luzmo-options-scrollbar-track-background,var(--options-scrollbar-track-background))}:host:lang(ja),:host:lang(ko),:host:lang(zh){--option-label-line-height:var(--luzmo-option-label-line-height-cjk,var(--option-label-line-height-cjk));--option-description-line-height:var(--luzmo-option-description-line-height-cjk,var(--option-description-line-height-cjk));--options-section-header-line-height:var(--luzmo-options-section-header-line-height-cjk,var(--options-section-header-line-height-cjk))}luzmo-option{width:100%}#pending{height:var(--options-pending-height);padding-inline:var(--pending-inline-edge-to-content);flex-shrink:0;align-items:center;display:flex}:host{flex-direction:column;width:100%;display:inline-flex}:host(:focus){outline:none}::slotted(*){flex-shrink:0}";
|
|
203
|
+
//#endregion
|
|
204
|
+
//#region src/components/options/options.ts
|
|
205
|
+
customElements.get("lit-virtualizer") || customElements.define("lit-virtualizer", S);
|
|
206
|
+
var M = (e) => l`
|
|
207
|
+
<luzmo-icon
|
|
208
|
+
block
|
|
209
|
+
.icon=${g}
|
|
210
|
+
style="transition: transform var(--luzmo-animation-duration, 130ms) ease; transform: rotate(${e ? "90deg" : "0deg"})"
|
|
211
|
+
></luzmo-icon>
|
|
212
|
+
`, N = 25;
|
|
213
|
+
function P(e, t) {
|
|
214
|
+
return !!t && (e === t || e.contains(t));
|
|
215
|
+
}
|
|
216
|
+
var F = class extends n(e, { noDefaultSize: !0 }) {
|
|
217
|
+
static get styles() {
|
|
218
|
+
return [d(j)];
|
|
219
|
+
}
|
|
220
|
+
get _flattenedOptions() {
|
|
221
|
+
let e = [];
|
|
222
|
+
for (let t of this.options) if (e.push(t), t.children?.length && t.value !== void 0 && this._expandedValues.has(t.value)) for (let n of t.children) e.push({
|
|
223
|
+
...n,
|
|
224
|
+
_isChild: !0,
|
|
225
|
+
_parentValue: t.value
|
|
226
|
+
});
|
|
227
|
+
return e;
|
|
228
|
+
}
|
|
229
|
+
get _flatVirtualizeActive() {
|
|
230
|
+
let e = this.options.length;
|
|
231
|
+
for (let t of this.options) t.children?.length && (e += t.children.length);
|
|
232
|
+
return e > 25;
|
|
233
|
+
}
|
|
234
|
+
toggleExpand(e) {
|
|
235
|
+
let t = e.value;
|
|
236
|
+
if (t === void 0) return;
|
|
237
|
+
let n = new Set(this._expandedValues);
|
|
238
|
+
n.has(t) ? n.delete(t) : n.add(t), this._expandedValues = n;
|
|
239
|
+
}
|
|
240
|
+
constructor() {
|
|
241
|
+
super(), this.label = "", this.variant = "highlight", this.selects = "single", this.emphasized = !1, this.pending = !1, this.options = [], this.value = [], this.focusedOptionIndex = 0, this._selectedOptions = [], this._firstVisibleIndex = 0, this._expandedValues = /* @__PURE__ */ new Set(), this.addEventListener("focusin", this.handleFocusin), this.addEventListener("blur", this.handleBlur);
|
|
242
|
+
}
|
|
243
|
+
firstUpdated(e) {
|
|
244
|
+
super.firstUpdated(e), this.hasAttribute("tabindex") || (this.tabIndex = 0);
|
|
245
|
+
let t = [new Promise((e) => requestAnimationFrame(() => e(!0)))];
|
|
246
|
+
[...this.children].forEach((e) => {
|
|
247
|
+
e.localName === "luzmo-option" && t.push(e.updateComplete);
|
|
248
|
+
}), this.optionElementsUpdated = Promise.all(t);
|
|
249
|
+
}
|
|
250
|
+
willUpdate(e) {
|
|
251
|
+
e.has("selects") && this.selects === "single" && this.value?.length > 1 && (this.value = this.value.slice(0, 1));
|
|
252
|
+
}
|
|
253
|
+
updated(e) {
|
|
254
|
+
super.updated(e), e.has("label") && (this.label || e.get("label") !== void 0) && (this.label ? this.setAttribute("aria-label", this.label) : this.removeAttribute("aria-label")), e.has("pending") && (this.pending ? this.setAttribute("aria-busy", "true") : this.removeAttribute("aria-busy"));
|
|
255
|
+
}
|
|
256
|
+
async getUpdateComplete() {
|
|
257
|
+
let e = await super.getUpdateComplete();
|
|
258
|
+
return await this.optionElementsUpdated, e;
|
|
259
|
+
}
|
|
260
|
+
focus({ preventScroll: e } = {}) {
|
|
261
|
+
super.focus({ preventScroll: e }), this.focusOptionByOffset(0);
|
|
262
|
+
}
|
|
263
|
+
_removeFocusedPropertyOnOptions() {
|
|
264
|
+
requestAnimationFrame(() => {
|
|
265
|
+
this.visibleOptionElements.forEach((e) => {
|
|
266
|
+
e.focused = !1;
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
scrollToTop() {
|
|
271
|
+
this.scrollTop = 0;
|
|
272
|
+
}
|
|
273
|
+
handleFocusin() {
|
|
274
|
+
this.startListeningToKeyboard();
|
|
275
|
+
}
|
|
276
|
+
handleBlur(e) {
|
|
277
|
+
P(this, e.relatedTarget) || (this.stopListeningToKeyboard(), this._removeFocusedPropertyOnOptions(), this.removeAttribute("aria-activedescendant"));
|
|
278
|
+
}
|
|
279
|
+
startListeningToKeyboard() {
|
|
280
|
+
this.addEventListener("keydown", this.handleKeydown);
|
|
281
|
+
}
|
|
282
|
+
stopListeningToKeyboard() {
|
|
283
|
+
this.removeEventListener("keydown", this.handleKeydown);
|
|
284
|
+
}
|
|
285
|
+
handleKeydown(e) {
|
|
286
|
+
if (e.defaultPrevented) return;
|
|
287
|
+
let t = this._flattenedOptions, n = this.focusedOptionIndex, r = [...this.visibleOptionElements].find((e) => e.value?.toString() === t?.[n]?.value?.toString()), { key: i } = e;
|
|
288
|
+
if (i === "Tab") {
|
|
289
|
+
this.prepareToCleanUp();
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
if (i === " " || i === "Enter") {
|
|
293
|
+
e.preventDefault();
|
|
294
|
+
let i = t?.[n];
|
|
295
|
+
r && i && (i.children?.length ? this.toggleExpand(i) : this.toggleOption(e, i));
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
if (i === "ArrowDown" || i === "ArrowUp") {
|
|
299
|
+
e.preventDefault(), this.navigateWithinOptions(e, r);
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
navigateWithinOptions(e, t) {
|
|
304
|
+
let { key: n } = e, r = n === "ArrowDown" ? 1 : -1;
|
|
305
|
+
e.preventDefault(), e.stopPropagation();
|
|
306
|
+
let i = this.focusOptionByOffset(r, t, !0);
|
|
307
|
+
i !== t && (this._flatVirtualizeActive || i?.scrollIntoView({ block: "nearest" }));
|
|
308
|
+
}
|
|
309
|
+
focusOptionByOffset(e, t, n) {
|
|
310
|
+
let r = this._flattenedOptions, i = e || 1;
|
|
311
|
+
t && (t.focused = !1);
|
|
312
|
+
let a = this.focusedOptionIndex;
|
|
313
|
+
this.focusedOptionIndex = r.length > 0 ? (r.length + this.focusedOptionIndex + e) % r.length : 0;
|
|
314
|
+
let o = r[this.focusedOptionIndex], s = r.length;
|
|
315
|
+
for (; (o?.disabled || o?.divider) && s;) --s, this.focusedOptionIndex = (r.length + this.focusedOptionIndex + i) % r.length, o = r[this.focusedOptionIndex];
|
|
316
|
+
let c = a < this.focusedOptionIndex && e === -1, l = a > this.focusedOptionIndex && e === 1;
|
|
317
|
+
(c || l) && (this.focusedOptionIndex = a, this.dispatchEvent(new Event(`luzmo-exceeded-${c ? "top" : "bottom"}`, {
|
|
318
|
+
bubbles: !0,
|
|
319
|
+
composed: !0,
|
|
320
|
+
cancelable: !0
|
|
321
|
+
})));
|
|
322
|
+
let u;
|
|
323
|
+
return n && this._flatVirtualizeActive && (u = [...this.visibleOptionElements].find((e) => e.value?.toString() === r[this.focusedOptionIndex]?.value?.toString()), u || (this.focusedOptionIndex = this._firstVisibleIndex)), this._flatVirtualizeActive && n && this.virtualizer.element(this.focusedOptionIndex)?.scrollIntoView({
|
|
324
|
+
behavior: "smooth",
|
|
325
|
+
block: "nearest"
|
|
326
|
+
}), u ??= [...this.visibleOptionElements].find((e) => (e.value === null ? null : e.value?.toString()) === (r[this.focusedOptionIndex]?.value === null ? r[this.focusedOptionIndex]?.value : r[this.focusedOptionIndex]?.value?.toString())), o?.disabled || this.setFocusedAndActiveDescendant(u), u;
|
|
327
|
+
}
|
|
328
|
+
updateSelectedItemIndex() {
|
|
329
|
+
this.focusedOptionIndex = this._flatVirtualizeActive ? this._firstVisibleIndex : 0;
|
|
330
|
+
}
|
|
331
|
+
setSelectedOptionsFromValue() {
|
|
332
|
+
this._selectedOptions = this.options.filter((e) => Array.isArray(this.value) && this.value?.includes(e?.value ?? null));
|
|
333
|
+
}
|
|
334
|
+
visibilityChanged(e) {
|
|
335
|
+
this._firstVisibleIndex = e?.first ?? 0;
|
|
336
|
+
}
|
|
337
|
+
rangeChange(e) {
|
|
338
|
+
e.stopPropagation(), e.preventDefault(), e?.first !== -1 && e?.last !== -1 && this.dispatchEvent(new CustomEvent("luzmo-scrolled", {
|
|
339
|
+
bubbles: !0,
|
|
340
|
+
composed: !0,
|
|
341
|
+
cancelable: !0,
|
|
342
|
+
detail: {
|
|
343
|
+
first: e.first,
|
|
344
|
+
last: e.last
|
|
345
|
+
}
|
|
346
|
+
}));
|
|
347
|
+
}
|
|
348
|
+
async toggleOption(e, t) {
|
|
349
|
+
let n = e instanceof KeyboardEvent, r = this._flattenedOptions.findIndex((e) => e?.value === t?.value);
|
|
350
|
+
this.focusedOptionIndex = r, this.visibleOptionElements.forEach((e) => {
|
|
351
|
+
if (n) {
|
|
352
|
+
let n = (e?.value === null ? null : e.value?.toString()) === (t?.value === null ? null : t?.value?.toString());
|
|
353
|
+
e.focused = n, n && this.setFocusedAndActiveDescendant(e);
|
|
354
|
+
} else e.focused = !1;
|
|
355
|
+
});
|
|
356
|
+
let i = Array.isArray(this.value) && this.value?.includes(t?.value ?? null);
|
|
357
|
+
this.selects === "single" ? (this.value = [t?.value], this._selectedOptions = [t]) : (this.value = i ? this.value.filter((e) => e !== t?.value) : [...this.value ?? [], t?.value], this._selectedOptions = i ? this._selectedOptions.filter((e) => e.value !== t.value) : [...this._selectedOptions, t]), await this.updateComplete, this.dispatchEvent(new CustomEvent("change", {
|
|
358
|
+
bubbles: !0,
|
|
359
|
+
cancelable: !0,
|
|
360
|
+
composed: !0,
|
|
361
|
+
detail: { value: this.value ?? [] }
|
|
362
|
+
})), this.prepareToCleanUp();
|
|
363
|
+
}
|
|
364
|
+
handleOptionClick(e, t) {
|
|
365
|
+
this.toggleOption(t, e);
|
|
366
|
+
}
|
|
367
|
+
handleExpandClick(e) {
|
|
368
|
+
this.toggleExpand(e);
|
|
369
|
+
}
|
|
370
|
+
render() {
|
|
371
|
+
let e = (e) => l`<luzmo-icon
|
|
372
|
+
slot="icon"
|
|
373
|
+
.icon=${e}
|
|
374
|
+
.size=${this.size}
|
|
375
|
+
></luzmo-icon>`, t = (e) => l`<span slot="description">${e}</span>`, n = (e) => l`<luzmo-icon
|
|
376
|
+
slot="icon"
|
|
377
|
+
data-option-thumbnail
|
|
378
|
+
.src=${e}
|
|
379
|
+
.size=${this.size}
|
|
380
|
+
></luzmo-icon>`, r = (r) => {
|
|
381
|
+
let i = r?.value, a = r?.label, o = r?.description, s = r?.icon, c = r?.imgSrc, d = r?.divider, f = typeof r == "string" ? void 0 : r?.disabled, p = !!(r.children && r.children.length > 0), m = !!r._isChild, h = p && i !== void 0 && this._expandedValues.has(i);
|
|
382
|
+
if (d) return l`<luzmo-options-divider
|
|
383
|
+
role="presentation"
|
|
384
|
+
></luzmo-options-divider>`;
|
|
385
|
+
let g = this.optionIconRenderer?.(r, { size: this.size ?? "m" }) ?? (s ? e(s) : c ? n(c) : u);
|
|
386
|
+
if (p) {
|
|
387
|
+
let e = Array.isArray(this.value) && r.children.some((e) => this.value.includes(e.value));
|
|
388
|
+
return l`<luzmo-option
|
|
389
|
+
.value=${i}
|
|
390
|
+
.size=${this.size}
|
|
391
|
+
.variant=${this.variant}
|
|
392
|
+
?emphasized=${this.emphasized}
|
|
393
|
+
?no-wrap=${this.noWrap}
|
|
394
|
+
?disabled=${f}
|
|
395
|
+
expandable
|
|
396
|
+
?expanded=${h}
|
|
397
|
+
?has-selected-child=${e}
|
|
398
|
+
.selected=${!1}
|
|
399
|
+
role="option"
|
|
400
|
+
aria-expanded=${h ? "true" : "false"}
|
|
401
|
+
@click=${(e) => {
|
|
402
|
+
e.stopPropagation(), this.handleExpandClick(r);
|
|
403
|
+
}}
|
|
404
|
+
>
|
|
405
|
+
${g} ${a}
|
|
406
|
+
${o ? t(o) : u}
|
|
407
|
+
<span slot="value">${M(h)}</span>
|
|
408
|
+
</luzmo-option>`;
|
|
409
|
+
}
|
|
410
|
+
return l`<luzmo-option
|
|
411
|
+
.value=${i}
|
|
412
|
+
.size=${this.size}
|
|
413
|
+
.variant=${this.variant}
|
|
414
|
+
?emphasized=${this.emphasized}
|
|
415
|
+
?no-wrap=${this.noWrap}
|
|
416
|
+
?disabled=${f}
|
|
417
|
+
?child-option=${m}
|
|
418
|
+
.selected=${Array.isArray(this.value) ? this.value?.includes(i) : !1}
|
|
419
|
+
.role=${this.selects === "single" ? "option" : "optioncheckbox"}
|
|
420
|
+
@click=${this.handleOptionClick.bind(this, r)}
|
|
421
|
+
>
|
|
422
|
+
${g} ${a}
|
|
423
|
+
${o ? t(o) : u}
|
|
424
|
+
</luzmo-option>`;
|
|
425
|
+
}, i = this._flattenedOptions;
|
|
426
|
+
return l`${this._flatVirtualizeActive ? l`<lit-virtualizer
|
|
427
|
+
role="presentation"
|
|
428
|
+
.items=${i}
|
|
429
|
+
.renderItem=${r}
|
|
430
|
+
@rangeChanged=${this.rangeChange}
|
|
431
|
+
@visibilityChanged=${this.visibilityChanged}
|
|
432
|
+
></lit-virtualizer>` : C(i, r)} ${this.pending ? l`<div id="pending" aria-hidden="true">
|
|
433
|
+
<luzmo-progress-circle
|
|
434
|
+
indeterminate
|
|
435
|
+
label="Loading"
|
|
436
|
+
></luzmo-progress-circle>
|
|
437
|
+
</div>` : u}`;
|
|
438
|
+
}
|
|
439
|
+
connectedCallback() {
|
|
440
|
+
super.connectedCallback(), this.setAttribute("role", "listbox"), this.updateComplete.then(() => this.updateItemFocus());
|
|
441
|
+
}
|
|
442
|
+
disconnectedCallback() {
|
|
443
|
+
super.disconnectedCallback();
|
|
444
|
+
}
|
|
445
|
+
prepareToCleanUp() {
|
|
446
|
+
document.addEventListener("focusout", () => {
|
|
447
|
+
requestAnimationFrame(() => {
|
|
448
|
+
this.updateSelectedItemIndex();
|
|
449
|
+
});
|
|
450
|
+
}, { once: !0 });
|
|
451
|
+
}
|
|
452
|
+
updateItemFocus() {
|
|
453
|
+
if (this.visibleOptionElements.length === 0) return;
|
|
454
|
+
let e = this._flattenedOptions, t = this.focusedOptionIndex, n = [...this.visibleOptionElements].find((n) => (n.value === null ? null : n.value?.toString()) === (e?.[t]?.value === null ? null : e?.[t]?.value?.toString()));
|
|
455
|
+
this.setFocusedAndActiveDescendant(n);
|
|
456
|
+
}
|
|
457
|
+
setFocusedAndActiveDescendant(e) {
|
|
458
|
+
if (!e) return;
|
|
459
|
+
let t = this.hasVisibleFocusInTree() || !!(this.visibleOptionElements?.some && this.visibleOptionElements?.some((e) => e.hasVisibleFocusInTree()));
|
|
460
|
+
e.focused = t, t && this.setAttribute("aria-activedescendant", e.id);
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
t([f({
|
|
464
|
+
type: String,
|
|
465
|
+
reflect: !0
|
|
466
|
+
})], F.prototype, "label", void 0), t([f({
|
|
467
|
+
type: String,
|
|
468
|
+
reflect: !0
|
|
469
|
+
})], F.prototype, "variant", void 0), t([f({
|
|
470
|
+
type: String,
|
|
471
|
+
reflect: !0
|
|
472
|
+
})], F.prototype, "selects", void 0), t([f({
|
|
473
|
+
type: Boolean,
|
|
474
|
+
reflect: !0
|
|
475
|
+
})], F.prototype, "emphasized", void 0), t([f({
|
|
476
|
+
type: Boolean,
|
|
477
|
+
reflect: !0
|
|
478
|
+
})], F.prototype, "pending", void 0), t([f({ type: Array })], F.prototype, "options", void 0), t([f({
|
|
479
|
+
type: Boolean,
|
|
480
|
+
reflect: !0,
|
|
481
|
+
attribute: "no-wrap"
|
|
482
|
+
})], F.prototype, "noWrap", void 0), t([f({ type: Array })], F.prototype, "value", void 0), t([f({ attribute: !1 })], F.prototype, "optionIconRenderer", void 0), t([p("lit-virtualizer")], F.prototype, "virtualizer", void 0), t([m("luzmo-option")], F.prototype, "visibleOptionElements", void 0), t([h()], F.prototype, "_expandedValues", void 0), customElements.get("luzmo-options") || customElements.define("luzmo-options", F), customElements.get("luzmo-options-divider") || customElements.define("luzmo-options-divider", A), customElements.get("luzmo-option") || customElements.define("luzmo-option", O);
|
|
483
|
+
//#endregion
|
|
484
|
+
export { O as i, N as n, A as r, F as t };
|
|
@@ -15,59 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
|
|
19
|
-
<slot name=${e} @slotchange=${this.handleSlotContent}></slot>
|
|
20
|
-
`}renderClickOverlay(){var t;const e=this.renderSlot("click-content"),r=n.x`
|
|
21
|
-
<luzmo-overlay
|
|
22
|
-
id="click-overlay"
|
|
23
|
-
?disabled=${this.disabled||this.clickContent.length===0}
|
|
24
|
-
?open=${this.open==="click"&&this.clickContent.length>0}
|
|
25
|
-
.offset=${this.offset}
|
|
26
|
-
.placement=${this.clickPlacement||this.placement}
|
|
27
|
-
.triggerElement=${this.targetContent[0]}
|
|
28
|
-
.triggerInteraction=${"click"}
|
|
29
|
-
.type=${this.type==="modal"?"modal":"auto"}
|
|
30
|
-
@beforetoggle=${this.handleBeforetoggle}
|
|
31
|
-
.receivesFocus=${this.receivesFocus}
|
|
32
|
-
>
|
|
33
|
-
${e}
|
|
34
|
-
</luzmo-overlay>
|
|
35
|
-
`;return(t=this.triggeredBy)!=null&&t.includes("click")?r:this.clickContent.length===0?e:r}renderHoverOverlay(){var t;const e=this.renderSlot("hover-content"),r=n.x`
|
|
36
|
-
<luzmo-overlay
|
|
37
|
-
id="hover-overlay"
|
|
38
|
-
?open=${this.open==="hover"&&this.hoverContent.length>0}
|
|
39
|
-
?disabled=${this.disabled||this.hoverContent.length===0||!!this.open&&this.open!=="hover"}
|
|
40
|
-
.offset=${this.offset}
|
|
41
|
-
.placement=${this.hoverPlacement||this.placement}
|
|
42
|
-
.triggerElement=${this.targetContent[0]}
|
|
43
|
-
.triggerInteraction=${"hover"}
|
|
44
|
-
.type=${"hint"}
|
|
45
|
-
@beforetoggle=${this.handleBeforetoggle}
|
|
46
|
-
.receivesFocus=${this.receivesFocus}
|
|
47
|
-
>
|
|
48
|
-
${e}
|
|
49
|
-
</luzmo-overlay>
|
|
50
|
-
`;return(t=this.triggeredBy)!=null&&t.includes("hover")?r:this.hoverContent.length===0?e:r}renderLongpressOverlay(){var t;const e=this.renderSlot("longpress-content"),r=n.x`
|
|
51
|
-
<luzmo-overlay
|
|
52
|
-
id="longpress-overlay"
|
|
53
|
-
?disabled=${this.disabled||this.longpressContent.length===0}
|
|
54
|
-
?open=${this.open==="longpress"&&this.longpressContent.length>0}
|
|
55
|
-
.offset=${this.offset}
|
|
56
|
-
.placement=${this.longpressPlacement||this.placement}
|
|
57
|
-
.triggerElement=${this.targetContent[0]}
|
|
58
|
-
.triggerInteraction=${"longpress"}
|
|
59
|
-
.type=${"auto"}
|
|
60
|
-
@beforetoggle=${this.handleBeforetoggle}
|
|
61
|
-
.receivesFocus=${this.receivesFocus}
|
|
62
|
-
>
|
|
63
|
-
${e}
|
|
64
|
-
</luzmo-overlay>
|
|
65
|
-
<slot name="longpress-describedby-descriptor"></slot>
|
|
66
|
-
`;return(t=this.triggeredBy)!=null&&t.includes("longpress")?r:this.longpressContent.length===0?e:r}render(){return n.x`
|
|
67
|
-
<slot
|
|
68
|
-
id="trigger"
|
|
69
|
-
name="trigger"
|
|
70
|
-
@slotchange=${this.handleTriggerContent}
|
|
71
|
-
></slot>
|
|
72
|
-
${[this.renderClickOverlay(),this.renderHoverOverlay(),this.renderLongpressOverlay()]}
|
|
73
|
-
`}updated(e){if(super.updated(e),this.disabled&&e.has("disabled")){this.open=void 0;return}}async getUpdateComplete(){return await super.getUpdateComplete()}}l([n.n()],o.prototype,"content");l([n.n({attribute:"triggered-by"})],o.prototype,"triggeredBy");l([n.n({reflect:!0})],o.prototype,"placement");l([n.n()],o.prototype,"type");l([n.n({type:Number})],o.prototype,"offset");l([n.n({reflect:!0})],o.prototype,"open");l([n.n({type:Boolean,reflect:!0})],o.prototype,"disabled");l([n.n({attribute:"receives-focus"})],o.prototype,"receivesFocus");l([p.r()],o.prototype,"clickContent");l([p.r()],o.prototype,"longpressContent");l([p.r()],o.prototype,"hoverContent");l([p.r()],o.prototype,"targetContent");l([d.e("#click-overlay",!0)],o.prototype,"clickOverlayElement");l([d.e("#longpress-overlay",!0)],o.prototype,"longpressOverlayElement");l([d.e("#hover-overlay",!0)],o.prototype,"hoverOverlayElement");function k(h,e,r,t){return s.LuzmoOverlay.open(h,e,r,t)}class v extends O.f{render(e){return n.E}update(e,[r]){this.template=r,this.target!==e.element&&(this.target=e.element,this.renderBefore=this.target.children[0]),this.listenerHost=this.target,this.init()}handleSlottableRequest(e){if(e.target!==e.currentTarget)return;const r=e.data===u.removeSlottableRequest;n.B(r?void 0:this.template(),this.target,{renderBefore:this.renderBefore})}init(){var r;(r=this.listeners)==null||r.abort(),this.listeners=new AbortController;const{signal:e}=this.listeners;this.listenerHost.addEventListener("slottable-request",t=>this.handleSlottableRequest(t),{signal:e})}disconnected(){var e;(e=this.listeners)==null||e.abort()}reconnected(){this.init()}}const E=f.e(v);class b extends v{constructor(){super(...arguments),this.defaultOptions={triggerInteraction:"click",overlayOptions:{type:"auto",offset:0}},this.options={...this.defaultOptions.overlayOptions}}render(e,r){return n.E}update(e,[r,t]){var g,y,m;this.options={...this.defaultOptions.overlayOptions,...t==null?void 0:t.overlayOptions},this.insertionOptions=t==null?void 0:t.insertionOptions,this.template=r,this.host=(g=e.options)==null?void 0:g.host;let i=!1;const a=(t==null?void 0:t.triggerInteraction)||this.defaultOptions.triggerInteraction,c=s.InteractionTypes[(y=this.strategy)==null?void 0:y.type]!==a;this.target!==e.element&&(this.target=e.element,i=!0),(i||c)&&((m=this.strategy)==null||m.abort(),this.strategy=new s.strategies[a](this.target,{isPersistent:!0,handleOverlayReady:C=>{this.listenerHost=this.overlay=C,this.init()}})),this.strategy.open=(t==null?void 0:t.open)??!1}handleSlottableRequest(e){var i,a;if(e.target!==e.currentTarget)return;const r=e.data===u.removeSlottableRequest,t={};if(this.host&&(t.host=this.host),n.B(r?void 0:this.template(),this.overlay,t),r)this.overlay.remove();else{s.LuzmoAbstractOverlay.applyOptions(this.overlay,{...this.options,trigger:this.target});const c=typeof((i=this.insertionOptions)==null?void 0:i.el)=="function"?this.insertionOptions.el():((a=this.insertionOptions)==null?void 0:a.el)||this.target,{where:g="afterend"}=this.insertionOptions||{};c.insertAdjacentElement(g,this.overlay)}}}const T=f.e(b);customElements.get("luzmo-overlay")||customElements.define("luzmo-overlay",s.LuzmoOverlay);customElements.get("luzmo-overlay-trigger")||customElements.define("luzmo-overlay-trigger",o);exports.ClickController=s.ClickController;exports.HoverController=s.HoverController;exports.InteractionController=s.InteractionController;exports.InteractionTypes=s.InteractionTypes;exports.LONGPRESS_INSTRUCTIONS=s.LONGPRESS_INSTRUCTIONS;exports.LongpressController=s.LongpressController;exports.LuzmoAbstractOverlay=s.LuzmoAbstractOverlay;exports.LuzmoOverlay=s.LuzmoOverlay;exports.PlacementController=s.PlacementController;exports.SAFARI_FOCUS_RING_CLASS=s.SAFARI_FOCUS_RING_CLASS;exports.VirtualTrigger=s.VirtualTrigger;exports.guaranteedAllTransitionend=s.guaranteedAllTransitionend;exports.lastInteractionType=s.lastInteractionType;exports.nextFrame=s.nextFrame;exports.noop=s.noop;exports.overlayTimer=s.overlayTimer;exports.placementUpdatedSymbol=s.placementUpdatedSymbol;exports.SlottableRequestEvent=u.SlottableRequestEvent;exports.removeSlottableRequest=u.removeSlottableRequest;exports.LuzmoOverlayTrigger=o;exports.OverlayTriggerDirective=b;exports.SlottableRequestDirective=v;exports.openOverlay=k;exports.slottableRequest=E;exports.trigger=T;
|
|
18
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../slottable-request-event-gAcEQan2.cjs`),t=require(`../overlay-DdrfkOry.cjs`),n=require(`../overlay-CMd2Dnpv.cjs`);exports.ClickController=t.s,exports.HoverController=t.o,exports.InteractionController=t.c,exports.InteractionTypes=t.l,exports.LONGPRESS_INSTRUCTIONS=t.i,exports.LongpressController=t.a,exports.LuzmoAbstractOverlay=t.h,exports.LuzmoOverlay=t.t,exports.LuzmoOverlayTrigger=n.o,exports.OverlayTriggerDirective=n.t,exports.PlacementController=t.f,exports.SAFARI_FOCUS_RING_CLASS=t.u,exports.SlottableRequestDirective=n.r,exports.SlottableRequestEvent=e.t,exports.VirtualTrigger=t.m,exports.guaranteedAllTransitionend=t.g,exports.lastInteractionType=t.d,exports.nextFrame=t._,exports.noop=t.v,exports.openOverlay=n.a,exports.overlayTimer=t.y,exports.placementUpdatedSymbol=t.p,exports.removeSlottableRequest=e.n,exports.slottableRequest=n.i,exports.trigger=n.n;
|