@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,626 @@
|
|
|
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 "./decorate-aGxJUVxg.js";
|
|
19
|
+
import { n as t, t as n } from "./sized-mixin-DaBoZkVS.js";
|
|
20
|
+
import { t as r } from "./focusable-BmS8IzhH.js";
|
|
21
|
+
import "./icon-CwBAE1eU.js";
|
|
22
|
+
import "./overlay-CwR_36OV.js";
|
|
23
|
+
import "./popover/index.js";
|
|
24
|
+
import "./calendar-CKr5T_zV.js";
|
|
25
|
+
import { t as i } from "./manage-help-text-CF0xBh0F.js";
|
|
26
|
+
import { t as a } from "./text-field.module-Btsve-VN.js";
|
|
27
|
+
import "./picker-button-BLbeT3Yu.js";
|
|
28
|
+
import { a as o, c as s, f as c, i as l, l as u, n as d, o as f, p, r as m, s as h, t as g, u as _ } from "./segments-factory-D0IveW-q.js";
|
|
29
|
+
import { html as v, nothing as y, unsafeCSS as b } from "lit";
|
|
30
|
+
import { property as x, query as S, state as C } from "lit/decorators.js";
|
|
31
|
+
import { luzmoAlert as w, luzmoCalendar as T } from "@luzmo/icons";
|
|
32
|
+
import { when as E } from "lit/directives/when.js";
|
|
33
|
+
import { ifDefined as D } from "lit/directives/if-defined.js";
|
|
34
|
+
import { classMap as O } from "lit/directives/class-map.js";
|
|
35
|
+
import { DateFormatter as k, getLocalTimeZone as A, isSameMonth as j, now as M, parseDate as N, parseDateTime as P, startOfMonth as F, toCalendarDate as I, today as L } from "@internationalized/date";
|
|
36
|
+
import { NumberParser as R } from "@internationalized/number";
|
|
37
|
+
//#region src/components/date-range-picker/date-range-picker.module.scss?inline
|
|
38
|
+
var z = ":host{font-family:var(--luzmo-font-family);--date-range-picker-border-radius:var(--luzmo-date-range-picker-border-radius,var(--luzmo-border-radius));--date-range-picker-border-width:var(--luzmo-border-width);--date-range-picker-button-border-color:var(--luzmo-date-range-picker-pickerbutton-border-color,var(--luzmo-border-color));--date-range-picker-button-border-color-focus:var(--luzmo-date-range-picker-pickerbutton-border-color-focus,var(--luzmo-primary));--date-range-picker-button-border-color-invalid:var(--luzmo-date-range-picker-pickerbutton-border-color-invalid,var(--luzmo-negative-color));--date-range-picker-dash-color:var(--luzmo-date-range-picker-dash-color,var(--luzmo-font-color));--date-range-picker-dash-font-size:var(--luzmo-date-range-picker-dash-font-size,var(--luzmo-font-size));--date-range-picker-focus-ring-color:var(--luzmo-date-range-picker-focus-ring-color,var(--luzmo-indicator-color));--date-range-picker-focus-ring-gap:var(--luzmo-date-range-picker-focus-ring-gap,0px);--date-range-picker-focus-ring-width:var(--luzmo-date-range-picker-focus-ring-width,var(--luzmo-border-width));--date-range-picker-focus-animation:var(--luzmo-date-range-picker-focus-animation,var(--luzmo-animation-duration));--date-range-picker-calendar-padding:var(--luzmo-date-range-picker-calendar-padding,var(--luzmo-spacing-4));border-radius:var(--date-range-picker-border-radius);flex-flow:row;display:inline-flex;position:relative}:host([disabled]) luzmo-picker-button{cursor:default}:host([disabled]){--luzmo-date-range-picker-dash-color:var(--luzmo-date-range-picker-dash-color-disabled,var(--luzmo-font-color-disabled))}:host([disabled]) .luzmo-DatePicker-rangeDash{background-color:var(--luzmo-text-field-background-color-disabled,var(--luzmo-background-color-disabled));border-block-color:#0000}:host([readonly]) .luzmo-DatePicker-rangeDash{background-color:initial;border-block-color:#0000}:host([invalid]:not([quiet])) .range-wrapper:after{border-color:var(--date-range-picker-button-border-color-invalid)}:host([invalid]:not([quiet])) .range-wrapper .input,:host([invalid]:not([quiet])) .range-wrapper .input:read-only{border-color:#0000}:host([invalid]:not([quiet])) .luzmo-DatePicker-rangeDash{background-color:#0000;border-block-color:#0000}:host(:not([quiet],[disabled])){--luzmo-picker-button-border-color:var(--date-range-picker-button-border-color)}:host([focused]),:host([focused]:not([quiet],[disabled])){--luzmo-picker-button-border-color:var(--date-range-picker-button-border-color-focus)}:host([invalid]:not([quiet],[disabled])){--luzmo-picker-button-border-color:var(--date-range-picker-button-border-color-invalid)}.range-wrapper{border-radius:var(--date-range-picker-border-radius);flex-flow:row;flex:1;align-items:stretch;display:inline-flex;position:relative}.range-wrapper:after{pointer-events:none;content:\"\";border:var(--date-range-picker-focus-ring-width) solid transparent;border-radius:var(--date-range-picker-border-radius);transition:border-color var(--date-range-picker-focus-animation) ease-in-out;position:absolute;inset:0}:host([focused]) .range-wrapper:not(.luzmo-DatePicker--quiet):after{border-color:var(--date-range-picker-focus-ring-color)}:host([focused]) .range-wrapper:not(.luzmo-DatePicker--quiet) #text-field:after{display:none}:host([focused]) .range-wrapper .input,:host([focused]) .range-wrapper .input:read-only,:host([focused]) .range-wrapper #text-field .input,:host([focused]) .range-wrapper #text-field:hover .input{border-color:var(--date-range-picker-focus-ring-color);outline:none}:host([focused]) .range-wrapper .luzmo-DatePicker-rangeDash{border-block-color:var(--date-range-picker-focus-ring-color)}:host .input:read-only{border-color:var(--luzmo-date-range-picker-border-color,var(--luzmo-border-color))}.input.luzmo-DatePicker-startField{border-inline-end:0;border-start-end-radius:0;border-end-end-radius:0}.input.luzmo-DatePicker-endField{border-inline-start:0;border-start-start-radius:0;border-end-start-radius:0}.luzmo-DatePicker-rangeDash{color:var(--date-range-picker-dash-color);font-size:var(--date-range-picker-dash-font-size);flex:initial;z-index:1;background-color:var(--luzmo-background-color,#fff);border-block:var(--date-range-picker-border-width) solid var(--luzmo-border-color,#ccc);transition:border-block-color var(--luzmo-text-field-animation-duration,var(--luzmo-animation-duration)) ease-in-out;align-items:center;display:flex}.luzmo-DatePicker-rangeDash:before{content:\"→\";margin-inline:var(--luzmo-spacing-2,4px);text-align:center;display:inline-block}luzmo-picker-button{cursor:pointer;z-index:2;position:absolute;inset-inline-end:0}:host([quiet]) .luzmo-DatePicker-rangeDash{background-color:#0000;border-block-start-width:0;border-inline-width:0;border-radius:0}:host([quiet]) .range-wrapper:after{display:none}:host([quiet][focused]) .range-wrapper:after{border-color:#0000;border-block-end-color:var(--date-range-picker-focus-ring-color);border-radius:0;display:block;inset-block-end:0}:host([quiet]) luzmo-picker-button{inline-size:auto}:host([quiet]) luzmo-picker-button:not(:disabled,.is-open){--luzmo-picker-button-background-color:transparent}@media (hover:hover){:host(:hover:not([focused],[disabled],[invalid],[readonly])){--luzmo-picker-button-border-color:var(--highcontrast-text-field-border-color-hover,var(--luzmo-text-field-border-color-hover,rgba(var(--luzmo-primary-rgb), .3)))}:host(:hover:not([focused],[disabled],[invalid],[readonly])) .range-wrapper #text-field .input{border-color:var(--highcontrast-text-field-border-color-hover,var(--luzmo-text-field-border-color-hover,rgba(var(--luzmo-primary-rgb), .3)))}:host(:hover:not([focused],[disabled],[invalid],[readonly])) .luzmo-DatePicker-rangeDash{border-block-color:var(--highcontrast-text-field-border-color-hover,var(--luzmo-text-field-border-color-hover,rgba(var(--luzmo-primary-rgb), .3)))}:host([focused]:hover:not([disabled],[invalid],[readonly])) .luzmo-DatePicker-rangeDash{border-block-color:var(--highcontrast-text-field-border-color-focus-hover,var(--luzmo-text-field-border-color-focus-hover,var(--luzmo-primary)))}}@media (forced-colors:active){:host{--date-range-picker-dash-color:CanvasText;--date-range-picker-focus-ring-color:Highlight}:host([disabled]){--date-range-picker-dash-color:GrayText}}:host{--date-range-picker-calendar-padding:var(--luzmo-spacing-4);--date-range-picker-icon-size:18px;--date-range-picker-dash-font-size:var(--luzmo-font-size);--text-field-focus-indicator-color:var(--luzmo-background-color-highlight)}:host([size=s]){--date-range-picker-calendar-padding:var(--luzmo-spacing-3);--date-range-picker-icon-size:16px;--date-range-picker-dash-font-size:var(--luzmo-font-size-s)}:host([size=m]){--date-range-picker-calendar-padding:var(--luzmo-spacing-4);--date-range-picker-icon-size:18px;--date-range-picker-dash-font-size:var(--luzmo-font-size-m)}:host([size=l]){--date-range-picker-calendar-padding:var(--luzmo-spacing-5);--date-range-picker-icon-size:20px;--date-range-picker-dash-font-size:var(--luzmo-font-size-l)}:host([size=xl]){--date-range-picker-calendar-padding:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--date-range-picker-icon-size:22px;--date-range-picker-dash-font-size:var(--luzmo-font-size-xl)}:host{--picker-button-size:var(--luzmo-text-field-height,var(--text-field-height));--input-spacing:var(--luzmo-text-field-spacing-inline,var(--text-field-spacing-inline));--input-border-width:var(--luzmo-text-field-border-width,var(--luzmo-border-width));--status-icon-size:var(--luzmo-text-field-icon-size-invalid,var(--text-field-icon-size-invalid));flex-wrap:wrap}:host #text-field{flex:1;display:inline-block}:host #text-field .input,:host([quiet]) #text-field .input,:host([invalid]) #text-field .input{inline-size:100%}:host #text-field:last-of-type .input{padding-inline-end:calc(var(--picker-button-size) + var(--input-spacing) - var(--input-border-width))}:host([invalid]) .input.luzmo-DatePicker-startField{padding-inline-end:calc(var(--input-spacing) - var(--input-border-width))}:host([invalid]) #text-field:last-of-type .input{padding-inline-end:calc(var(--picker-button-size) + var(--status-icon-size) + 2 * var(--luzmo-text-field-icon-spacing-inline-end-invalid,var(--text-field-icon-spacing-inline-end-invalid)))}:host([invalid]) .range-wrapper .icon{z-index:3;pointer-events:none;font-size:var(--luzmo-text-field-icon-size-invalid,var(--text-field-icon-size-invalid));color:var(--luzmo-negative-color);justify-content:center;align-items:center;display:flex;position:absolute;inset-block-start:var(--luzmo-text-field-icon-spacing-block-invalid,var(--text-field-icon-spacing-block-invalid));inset-block-end:var(--luzmo-text-field-icon-spacing-block-invalid,var(--text-field-icon-spacing-block-invalid));inset-inline-end:calc(var(--picker-button-size) + var(--luzmo-text-field-icon-spacing-inline-end-invalid,var(--text-field-icon-spacing-inline-end-invalid)))}luzmo-picker-button:focus-visible{outline:none}luzmo-popover{overflow-y:auto}luzmo-popover .popover-content{padding:var(--luzmo-date-range-picker-calendar-padding,var(--date-range-picker-calendar-padding))}.input-content{scrollbar-width:none;align-items:center;height:100%;line-height:normal;display:flex;overflow:auto hidden}.input-content::-webkit-scrollbar{width:0;height:0;display:none}.literal-segment,.editable-segment{color:var(--luzmo-date-range-picker-font-color-default,var(--luzmo-font-color));display:inline-block}.editable-segment{font-variant-numeric:tabular-nums;text-align:end;white-space:nowrap;caret-color:#0000;outline:none;padding:0 .15em}[dir=ltr] .editable-segment{text-align:start}.literal-segment{white-space:pre;-webkit-user-select:none;user-select:none}.is-placeholder,.is-placeholder+.literal-segment{color:var(--luzmo-font-color-disabled)}.editable-segment:focus-visible{color:var(--luzmo-date-range-picker-segment-text-color-focus,var(--luzmo-font-color));background-color:var(--highcontrast-text-field-focus-indicator-color,var(--luzmo-text-field-focus-indicator-color,var(--text-field-focus-indicator-color)))}.editable-segment::selection{background-color:#0000}.calendar-layout,.calendar-layout--dual .calendars-row{gap:var(--luzmo-spacing-4,16px);flex-direction:row;display:flex}.calendar-container{flex-shrink:0}.defined-ranges{gap:var(--luzmo-spacing-1,2px);border-inline-start:var(--luzmo-border-width,1px) solid var(--luzmo-border-color,#e0e0e0);flex-direction:column;min-inline-size:120px;padding-inline-start:var(--luzmo-spacing-4,16px);display:flex}.defined-range-item{inline-size:100%;padding:var(--luzmo-spacing-2,4px) var(--luzmo-spacing-3,8px);border-radius:var(--luzmo-border-radius,4px);color:var(--luzmo-font-color,inherit);font-family:var(--luzmo-font-family,inherit);font-size:var(--luzmo-font-size,inherit);text-align:start;cursor:pointer;transition:background-color var(--luzmo-animation-duration,.13s) ease;white-space:nowrap;background:0 0;border:none;display:block}.defined-range-item:hover{background-color:var(--luzmo-background-color-hover,#0000000d)}.defined-range-item:focus-visible{outline:var(--luzmo-indicator-width,2px) solid var(--luzmo-indicator-color,var(--luzmo-primary));outline-offset:var(--luzmo-indicator-gap,2px)}.defined-range-item[aria-selected=true]{background-color:var(--luzmo-background-color-highlight,#00000014);font-weight:var(--bold-font-weight,bold)}";
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/components/date-range-picker/date-range-picker.ts
|
|
41
|
+
function B() {
|
|
42
|
+
let e = /* @__PURE__ */ new Date();
|
|
43
|
+
e.setHours(0, 0, 0, 0);
|
|
44
|
+
let t = new Date(e);
|
|
45
|
+
t.setDate(t.getDate() - 1);
|
|
46
|
+
let n = new Date(e), r = n.getDay();
|
|
47
|
+
n.setDate(n.getDate() - r);
|
|
48
|
+
let i = new Date(n);
|
|
49
|
+
i.setDate(i.getDate() + 6);
|
|
50
|
+
let a = new Date(n);
|
|
51
|
+
a.setDate(a.getDate() - 7);
|
|
52
|
+
let o = new Date(n);
|
|
53
|
+
o.setDate(o.getDate() - 1);
|
|
54
|
+
let s = new Date(e.getFullYear(), e.getMonth(), 1), c = new Date(e.getFullYear(), e.getMonth() + 1, 0), l = new Date(e.getFullYear(), e.getMonth() - 1, 1), u = new Date(e.getFullYear(), e.getMonth(), 0);
|
|
55
|
+
return [
|
|
56
|
+
{
|
|
57
|
+
label: "Today",
|
|
58
|
+
startDate: e,
|
|
59
|
+
endDate: e
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: "Yesterday",
|
|
63
|
+
startDate: t,
|
|
64
|
+
endDate: t
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: "This Week",
|
|
68
|
+
startDate: n,
|
|
69
|
+
endDate: i
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: "Last Week",
|
|
73
|
+
startDate: a,
|
|
74
|
+
endDate: o
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: "This Month",
|
|
78
|
+
startDate: s,
|
|
79
|
+
endDate: c
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: "Last Month",
|
|
83
|
+
startDate: l,
|
|
84
|
+
endDate: u
|
|
85
|
+
}
|
|
86
|
+
];
|
|
87
|
+
}
|
|
88
|
+
function V(e) {
|
|
89
|
+
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
90
|
+
}
|
|
91
|
+
var H = class extends i(t(r, { validSizes: Object.values(n) })) {
|
|
92
|
+
static get styles() {
|
|
93
|
+
return [b(z), b(a)];
|
|
94
|
+
}
|
|
95
|
+
get _language() {
|
|
96
|
+
try {
|
|
97
|
+
return this.language ? new Intl.Locale(this.language).language : "en";
|
|
98
|
+
} catch {
|
|
99
|
+
return "en";
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
get focusElement() {
|
|
103
|
+
return this.firstEditableSegment;
|
|
104
|
+
}
|
|
105
|
+
clear() {
|
|
106
|
+
this._startDate = void 0, this._endDate = void 0, this.startDate = void 0, this.endDate = void 0, this.setStartSegments(), this.setEndSegments();
|
|
107
|
+
}
|
|
108
|
+
constructor() {
|
|
109
|
+
super(), this.precision = c.Day, this.calendars = 1, this.showDefinedRanges = !1, this.definedRanges = B(), this.invalid = !1, this.readonly = !1, this.quiet = !1, this.placement = "bottom", this.language = "en", this.labels = {
|
|
110
|
+
previous: "Previous",
|
|
111
|
+
next: "Next",
|
|
112
|
+
today: "Today",
|
|
113
|
+
selected: "Selected",
|
|
114
|
+
empty: "Empty",
|
|
115
|
+
calendar: "Calendar",
|
|
116
|
+
startDate: "Start date",
|
|
117
|
+
endDate: "End date"
|
|
118
|
+
}, this.focused = !1, this.startSegments = new f([]), this.endSegments = new f([]), this.isCalendarOpen = !1, this._timeZone = this.timeZone ?? A(), this._skipMonthSync = !1, this.handleFocusIn = () => {
|
|
119
|
+
this.focused = !this.readonly;
|
|
120
|
+
}, this.handleFocusOut = () => {
|
|
121
|
+
this.focused = !1;
|
|
122
|
+
}, this.setNumberParser(), this.setDateFormatter(), this.setAriaDateFormatter(), this.addEventListener("focusin", this.handleFocusIn), this.addEventListener("focusout", this.handleFocusOut);
|
|
123
|
+
}
|
|
124
|
+
willUpdate(e) {
|
|
125
|
+
let t = e.has("startDate"), n = e.has("endDate"), r = e.has("min"), i = e.has("max"), a = e.has("language"), o = e.has("dateFormat"), s = e.has("dateSeparator"), c = e.has("precision"), l = e.has("disabled");
|
|
126
|
+
e.has("timeZone") && (this._timeZone = this.timeZone ?? A()), a && this.setNumberParser(), (a || c) && (this.setDateFormatter(), this.setAriaDateFormatter()), (t || n || r || i) && this.parseAllDates(), (t || a || c || o || s) && this.setStartSegments(), (n || a || c || o || s) && this.setEndSegments(), l && this.isCalendarOpen && (this.isCalendarOpen = !1);
|
|
127
|
+
let u = e.has("isCalendarOpen") && this.isCalendarOpen;
|
|
128
|
+
(t || n) && (this._skipMonthSync || this.syncCalendarMonths(), this._skipMonthSync = !1), u && this.calendars === 2 && this.syncCalendarMonths(), this.updateAriaLabel();
|
|
129
|
+
}
|
|
130
|
+
initCalendarMonths() {
|
|
131
|
+
let e = this._startDate ?? I(L(this._timeZone)), t = F(e);
|
|
132
|
+
this._leftMonth = t.toString(), this._endDate && !j(e, this._endDate) ? this._rightMonth = F(this._endDate).toString() : this._rightMonth = t.add({ months: 1 }).toString();
|
|
133
|
+
}
|
|
134
|
+
syncCalendarMonths() {
|
|
135
|
+
if (this.calendars !== 2) return;
|
|
136
|
+
let e = this._startDate ?? I(L(this._timeZone)), t = F(e);
|
|
137
|
+
this._endDate && !j(e, this._endDate) ? (this._leftMonth = t.toString(), this._rightMonth = F(this._endDate).toString()) : (this._leftMonth = t.toString(), this._rightMonth = t.add({ months: 1 }).toString());
|
|
138
|
+
}
|
|
139
|
+
parseDateValue(e) {
|
|
140
|
+
return e ? e.includes("T") ? P(e).set({ era: "AD" }) : I(N(e)).set({ era: "AD" }) : void 0;
|
|
141
|
+
}
|
|
142
|
+
parseAllDates() {
|
|
143
|
+
this._startDate = this.parseDateValue(this.startDate), this._endDate = this.parseDateValue(this.endDate);
|
|
144
|
+
}
|
|
145
|
+
updateAriaLabel() {
|
|
146
|
+
if (this._startDate && this._endDate) {
|
|
147
|
+
let e = this.ariaDateFormatter.format(h(this._startDate)), t = this.ariaDateFormatter.format(h(this._endDate));
|
|
148
|
+
this.setAttribute("aria-label", `${this.labels.selected}: ${e} – ${t}`);
|
|
149
|
+
} else this.setAttribute("aria-label", this.labels.empty);
|
|
150
|
+
}
|
|
151
|
+
render() {
|
|
152
|
+
return v`
|
|
153
|
+
<div class="luzmo-DatePicker--range range-wrapper">
|
|
154
|
+
<div id="text-field">
|
|
155
|
+
${this.renderStartInput()}
|
|
156
|
+
</div>
|
|
157
|
+
<div class="luzmo-DatePicker-rangeDash"></div>
|
|
158
|
+
<div id="text-field">
|
|
159
|
+
${this.renderEndInput()}
|
|
160
|
+
</div>
|
|
161
|
+
${this.renderStateIcons()}
|
|
162
|
+
${this.renderPicker()}
|
|
163
|
+
</div>
|
|
164
|
+
${this.renderHelpText(this.invalid)}
|
|
165
|
+
`;
|
|
166
|
+
}
|
|
167
|
+
renderStateIcons() {
|
|
168
|
+
return this.invalid ? v`
|
|
169
|
+
<luzmo-icon
|
|
170
|
+
.icon=${w}
|
|
171
|
+
.size=${this.size}
|
|
172
|
+
id="invalid"
|
|
173
|
+
class="icon"
|
|
174
|
+
></luzmo-icon>
|
|
175
|
+
` : y;
|
|
176
|
+
}
|
|
177
|
+
renderPicker() {
|
|
178
|
+
return this.readonly ? y : v`
|
|
179
|
+
<luzmo-picker-button
|
|
180
|
+
?open=${this.isCalendarOpen}
|
|
181
|
+
?quiet=${this.quiet}
|
|
182
|
+
?invalid=${this.invalid}
|
|
183
|
+
?disabled=${this.disabled}
|
|
184
|
+
.size=${this.size}
|
|
185
|
+
@click=${() => this.isCalendarOpen = !0}
|
|
186
|
+
label=${this.labels.calendar}
|
|
187
|
+
>
|
|
188
|
+
<slot name="calendar-icon" slot="icon">
|
|
189
|
+
<luzmo-icon
|
|
190
|
+
.icon=${T}
|
|
191
|
+
.size=${this.size}
|
|
192
|
+
block
|
|
193
|
+
></luzmo-icon>
|
|
194
|
+
</slot>
|
|
195
|
+
</luzmo-picker-button>
|
|
196
|
+
|
|
197
|
+
<luzmo-overlay
|
|
198
|
+
.triggerElement=${this.rangeWrapper}
|
|
199
|
+
type="modal"
|
|
200
|
+
placement=${this.placement ?? "bottom"}
|
|
201
|
+
offset="0"
|
|
202
|
+
?open=${this.isCalendarOpen}
|
|
203
|
+
@luzmo-closed=${() => this.isCalendarOpen = !1}
|
|
204
|
+
>
|
|
205
|
+
<luzmo-popover>
|
|
206
|
+
<div class="popover-content">
|
|
207
|
+
${this.renderPopoverContent()}
|
|
208
|
+
</div>
|
|
209
|
+
</luzmo-popover>
|
|
210
|
+
</luzmo-overlay>
|
|
211
|
+
`;
|
|
212
|
+
}
|
|
213
|
+
renderPopoverContent() {
|
|
214
|
+
return this.calendars === 2 ? this.renderDualCalendar() : this.renderSingleCalendar();
|
|
215
|
+
}
|
|
216
|
+
renderSingleCalendar() {
|
|
217
|
+
return v`
|
|
218
|
+
<div class="calendar-layout">
|
|
219
|
+
<div class="calendar-container">
|
|
220
|
+
<luzmo-calendar
|
|
221
|
+
selection-mode="range"
|
|
222
|
+
.startDate=${this.startDate}
|
|
223
|
+
.endDate=${this.endDate}
|
|
224
|
+
.min=${this.min}
|
|
225
|
+
.max=${this.max}
|
|
226
|
+
.labels=${this.labels}
|
|
227
|
+
.size=${this.size}
|
|
228
|
+
.language=${this.language}
|
|
229
|
+
@range-select=${this.handleRangeSelect}
|
|
230
|
+
></luzmo-calendar>
|
|
231
|
+
</div>
|
|
232
|
+
${this.renderDefinedRanges()}
|
|
233
|
+
</div>
|
|
234
|
+
`;
|
|
235
|
+
}
|
|
236
|
+
renderDualCalendar() {
|
|
237
|
+
return (!this._leftMonth || !this._rightMonth) && this.initCalendarMonths(), v`
|
|
238
|
+
<div class="calendar-layout calendar-layout--dual">
|
|
239
|
+
<div class="calendars-row">
|
|
240
|
+
<div class="calendar-container">
|
|
241
|
+
<luzmo-calendar
|
|
242
|
+
selection-mode="range"
|
|
243
|
+
.startDate=${this.startDate}
|
|
244
|
+
.endDate=${this.endDate}
|
|
245
|
+
.value=${this._leftMonth}
|
|
246
|
+
.min=${this.min}
|
|
247
|
+
.max=${this.max}
|
|
248
|
+
.labels=${this.labels}
|
|
249
|
+
.size=${this.size}
|
|
250
|
+
.language=${this.language}
|
|
251
|
+
@range-select=${this.handleRangeSelect}
|
|
252
|
+
@hover-date=${this.handleHoverDateLeft}
|
|
253
|
+
@month-change=${this.handleLeftMonthChange}
|
|
254
|
+
></luzmo-calendar>
|
|
255
|
+
</div>
|
|
256
|
+
<div class="calendar-container">
|
|
257
|
+
<luzmo-calendar
|
|
258
|
+
selection-mode="range"
|
|
259
|
+
.startDate=${this.startDate}
|
|
260
|
+
.endDate=${this.endDate}
|
|
261
|
+
.value=${this._rightMonth}
|
|
262
|
+
.min=${this.min}
|
|
263
|
+
.max=${this.max}
|
|
264
|
+
.labels=${this.labels}
|
|
265
|
+
.size=${this.size}
|
|
266
|
+
.language=${this.language}
|
|
267
|
+
@range-select=${this.handleRangeSelect}
|
|
268
|
+
@hover-date=${this.handleHoverDateRight}
|
|
269
|
+
@month-change=${this.handleRightMonthChange}
|
|
270
|
+
></luzmo-calendar>
|
|
271
|
+
</div>
|
|
272
|
+
</div>
|
|
273
|
+
${this.renderDefinedRanges()}
|
|
274
|
+
</div>
|
|
275
|
+
`;
|
|
276
|
+
}
|
|
277
|
+
renderDefinedRanges() {
|
|
278
|
+
return !this.showDefinedRanges || !this.definedRanges || this.definedRanges.length === 0 ? y : v`
|
|
279
|
+
<div
|
|
280
|
+
class="defined-ranges"
|
|
281
|
+
role="listbox"
|
|
282
|
+
aria-label="Predefined date ranges"
|
|
283
|
+
>
|
|
284
|
+
${this.definedRanges.map((e) => v`
|
|
285
|
+
<button
|
|
286
|
+
class="defined-range-item"
|
|
287
|
+
role="option"
|
|
288
|
+
aria-selected=${this.isDefinedRangeSelected(e)}
|
|
289
|
+
@click=${() => this.selectDefinedRange(e)}
|
|
290
|
+
>
|
|
291
|
+
${e.label}
|
|
292
|
+
</button>
|
|
293
|
+
`)}
|
|
294
|
+
</div>
|
|
295
|
+
`;
|
|
296
|
+
}
|
|
297
|
+
isDefinedRangeSelected(e) {
|
|
298
|
+
return !this.startDate || !this.endDate ? !1 : this.startDate === V(e.startDate) && this.endDate === V(e.endDate);
|
|
299
|
+
}
|
|
300
|
+
selectDefinedRange(e) {
|
|
301
|
+
this.startDate = V(e.startDate), this.endDate = V(e.endDate), this.isCalendarOpen = !1, this.dispatchChange();
|
|
302
|
+
}
|
|
303
|
+
handleRangeSelect(e) {
|
|
304
|
+
e.stopPropagation();
|
|
305
|
+
let { startDate: t, endDate: n } = e.detail;
|
|
306
|
+
this._skipMonthSync = !0, this.startDate = t, this.endDate = n ?? void 0, t && n && (this.isCalendarOpen = !1, this.dispatchChange());
|
|
307
|
+
}
|
|
308
|
+
handleHoverDateLeft(e) {
|
|
309
|
+
let t = this.shadowRoot?.querySelectorAll("luzmo-calendar")[1];
|
|
310
|
+
t && (t.hoveredDate = N(e.detail.date));
|
|
311
|
+
}
|
|
312
|
+
handleHoverDateRight(e) {
|
|
313
|
+
let t = this.shadowRoot?.querySelectorAll("luzmo-calendar")[0];
|
|
314
|
+
t && (t.hoveredDate = N(e.detail.date));
|
|
315
|
+
}
|
|
316
|
+
renderStartInput() {
|
|
317
|
+
return v`
|
|
318
|
+
<div class="input luzmo-DatePicker-startField">
|
|
319
|
+
<span
|
|
320
|
+
class="input-content"
|
|
321
|
+
aria-label=${this.labels.startDate}
|
|
322
|
+
@keydown=${(e) => this.handleKeydown(e, "start")}
|
|
323
|
+
@input=${(e) => this.handleInput(e, "start")}
|
|
324
|
+
>
|
|
325
|
+
${this.renderSegmentsFor(this.startSegments)}
|
|
326
|
+
</span>
|
|
327
|
+
</div>
|
|
328
|
+
`;
|
|
329
|
+
}
|
|
330
|
+
renderEndInput() {
|
|
331
|
+
return v`
|
|
332
|
+
<div class="input luzmo-DatePicker-endField">
|
|
333
|
+
<span
|
|
334
|
+
class="input-content"
|
|
335
|
+
aria-label=${this.labels.endDate}
|
|
336
|
+
@keydown=${(e) => this.handleKeydown(e, "end")}
|
|
337
|
+
@input=${(e) => this.handleInput(e, "end")}
|
|
338
|
+
>
|
|
339
|
+
${this.renderSegmentsFor(this.endSegments)}
|
|
340
|
+
</span>
|
|
341
|
+
</div>
|
|
342
|
+
`;
|
|
343
|
+
}
|
|
344
|
+
renderSegmentsFor(e) {
|
|
345
|
+
return e.all.map((e) => E(e.type === p.Literal, () => this.renderLiteralSegment(e), () => this.renderEditableSegment(e)));
|
|
346
|
+
}
|
|
347
|
+
renderLiteralSegment(e) {
|
|
348
|
+
return v`
|
|
349
|
+
<span
|
|
350
|
+
class="literal-segment"
|
|
351
|
+
data-test-id=${e.type}
|
|
352
|
+
aria-hidden="true"
|
|
353
|
+
>${e.formatted}</span>
|
|
354
|
+
`;
|
|
355
|
+
}
|
|
356
|
+
renderEditableSegment(e) {
|
|
357
|
+
let t = !this.disabled && !this.readonly, n = {
|
|
358
|
+
"editable-segment": !0,
|
|
359
|
+
"is-placeholder": e.value === void 0
|
|
360
|
+
}, r = e.type !== p.Year && String(e.maxValue).length > 0;
|
|
361
|
+
return v`
|
|
362
|
+
<div
|
|
363
|
+
role="spinbutton"
|
|
364
|
+
aria-valuenow=${D(e.value)}
|
|
365
|
+
aria-valuemin=${e.minValue}
|
|
366
|
+
aria-valuemax=${e.maxValue}
|
|
367
|
+
aria-label=${e.label}
|
|
368
|
+
aria-valuetext=${D(e.value === void 0 ? this.labels.empty : e.formatted)}
|
|
369
|
+
contenteditable=${D(t ? !0 : void 0)}
|
|
370
|
+
inputmode=${D(t ? "numeric" : void 0)}
|
|
371
|
+
tabindex=${D(t ? "0" : void 0)}
|
|
372
|
+
class=${O(n)}
|
|
373
|
+
style=${r ? `min-width: ${r}ch` : ""}
|
|
374
|
+
data-type=${e.type}
|
|
375
|
+
.innerText=${e.value === void 0 ? e.placeholder ?? "" : e.formatted ?? ""}
|
|
376
|
+
></div>
|
|
377
|
+
`;
|
|
378
|
+
}
|
|
379
|
+
getSegments(e) {
|
|
380
|
+
return e === "start" ? this.startSegments : this.endSegments;
|
|
381
|
+
}
|
|
382
|
+
setSegmentsForField(e, t) {
|
|
383
|
+
e === "start" ? this.startSegments = t : this.endSegments = t;
|
|
384
|
+
}
|
|
385
|
+
getModifierParams(e) {
|
|
386
|
+
return {
|
|
387
|
+
dateFormatter: this.dateFormatter,
|
|
388
|
+
segments: this.getSegments(e),
|
|
389
|
+
currentDate: M(this._timeZone)
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
handleKeydown(e, t) {
|
|
393
|
+
let n = e.target, r = n.dataset.type;
|
|
394
|
+
if (r) switch (e.code) {
|
|
395
|
+
case "ArrowUp": {
|
|
396
|
+
let e = new m(this.getModifierParams(t));
|
|
397
|
+
this.setSegmentsForField(t, e.modify(r)), this.updateValueFromSegments(t), this.dispatchInputEvent();
|
|
398
|
+
break;
|
|
399
|
+
}
|
|
400
|
+
case "ArrowDown": {
|
|
401
|
+
let e = new l(this.getModifierParams(t));
|
|
402
|
+
this.setSegmentsForField(t, e.modify(r)), this.updateValueFromSegments(t), this.dispatchInputEvent();
|
|
403
|
+
break;
|
|
404
|
+
}
|
|
405
|
+
case "ArrowRight":
|
|
406
|
+
this.focusSegment(n, "next");
|
|
407
|
+
break;
|
|
408
|
+
case "ArrowLeft":
|
|
409
|
+
this.focusSegment(n, "previous");
|
|
410
|
+
break;
|
|
411
|
+
case "Enter":
|
|
412
|
+
case "Space":
|
|
413
|
+
this.commitValue();
|
|
414
|
+
break;
|
|
415
|
+
case "Backspace":
|
|
416
|
+
case "Delete":
|
|
417
|
+
if (e.preventDefault(), this.getSegments(t).getByType(r)?.value === void 0) this.focusSegment(n, "previous");
|
|
418
|
+
else {
|
|
419
|
+
let e = new o(this.getModifierParams(t));
|
|
420
|
+
this.setSegmentsForField(t, e.modify(r)), this.updateValueFromSegments(t), this.dispatchInputEvent();
|
|
421
|
+
}
|
|
422
|
+
break;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
handleInput(e, t) {
|
|
426
|
+
e.stopPropagation();
|
|
427
|
+
let n = e.target.dataset.type, r = this.getSegments(t).editableValues, i = new d({
|
|
428
|
+
...this.getModifierParams(t),
|
|
429
|
+
eventData: e.data,
|
|
430
|
+
numberParser: this.numberParser
|
|
431
|
+
}).modify(n);
|
|
432
|
+
this.setSegmentsForField(t, i);
|
|
433
|
+
let a = i.getByType(n), o = e.target;
|
|
434
|
+
o.textContent = a.value === void 0 ? a.placeholder : a.formatted, this.updateValueFromSegments(t);
|
|
435
|
+
let c = i.editableValues;
|
|
436
|
+
s(r, c) || this.dispatchInputEvent();
|
|
437
|
+
}
|
|
438
|
+
focusSegment(e, t) {
|
|
439
|
+
let n = e;
|
|
440
|
+
for (;;) {
|
|
441
|
+
let e = t === "previous" ? n.previousElementSibling : n.nextElementSibling;
|
|
442
|
+
if (!e) break;
|
|
443
|
+
if (e.getAttribute("contenteditable")) {
|
|
444
|
+
e.focus();
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
n = e;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
updateValueFromSegments(e) {
|
|
451
|
+
let t = this.getSegments(e).getFormattedDate(this.precision);
|
|
452
|
+
if (t && (u(t) || _(t))) {
|
|
453
|
+
let n = t.toString();
|
|
454
|
+
e === "start" ? (this._startDate = t, this.startDate = n) : (this._endDate = t, this.endDate = n);
|
|
455
|
+
} else e === "start" ? (this._startDate = void 0, this.startDate = void 0) : (this._endDate = void 0, this.endDate = void 0);
|
|
456
|
+
}
|
|
457
|
+
commitValue() {
|
|
458
|
+
if (this._startDate && this._endDate) {
|
|
459
|
+
if (this._startDate.compare(this._endDate) > 0) {
|
|
460
|
+
let e = this._startDate;
|
|
461
|
+
this._startDate = this._endDate, this._endDate = e, this.startDate = this._startDate.toString(), this.endDate = this._endDate.toString(), this.setStartSegments(), this.setEndSegments();
|
|
462
|
+
}
|
|
463
|
+
this.dispatchChange();
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
handleLeftMonthChange(e) {
|
|
467
|
+
let t = e.detail, n = N(t.date);
|
|
468
|
+
this._leftMonth = t.date, this._rightMonth && j(n, N(this._rightMonth)) && (this._rightMonth = F(n).add({ months: 1 }).toString());
|
|
469
|
+
}
|
|
470
|
+
handleRightMonthChange(e) {
|
|
471
|
+
let t = e.detail, n = N(t.date);
|
|
472
|
+
this._rightMonth = t.date, this._leftMonth && j(n, N(this._leftMonth)) && (this._leftMonth = F(n).subtract({ months: 1 }).toString());
|
|
473
|
+
}
|
|
474
|
+
dispatchChange() {
|
|
475
|
+
this.dispatchEvent(new CustomEvent("change", {
|
|
476
|
+
bubbles: !0,
|
|
477
|
+
composed: !0,
|
|
478
|
+
cancelable: !0,
|
|
479
|
+
detail: {
|
|
480
|
+
startDate: this.startDate ?? "",
|
|
481
|
+
endDate: this.endDate ?? ""
|
|
482
|
+
}
|
|
483
|
+
}));
|
|
484
|
+
}
|
|
485
|
+
dispatchInputEvent() {
|
|
486
|
+
this.dispatchEvent(new CustomEvent("input", {
|
|
487
|
+
bubbles: !0,
|
|
488
|
+
composed: !0,
|
|
489
|
+
cancelable: !0,
|
|
490
|
+
detail: {
|
|
491
|
+
startDate: this.startDate ?? "",
|
|
492
|
+
endDate: this.endDate ?? ""
|
|
493
|
+
}
|
|
494
|
+
}));
|
|
495
|
+
}
|
|
496
|
+
setStartSegments() {
|
|
497
|
+
this.startSegments = this.createSegmentsFromDate(this._startDate);
|
|
498
|
+
}
|
|
499
|
+
setEndSegments() {
|
|
500
|
+
this.endSegments = this.createSegmentsFromDate(this._endDate);
|
|
501
|
+
}
|
|
502
|
+
createSegmentsFromDate(e) {
|
|
503
|
+
let t = M(this._timeZone), n = e ? {
|
|
504
|
+
year: e.year,
|
|
505
|
+
month: e.month,
|
|
506
|
+
day: e.day
|
|
507
|
+
} : {};
|
|
508
|
+
e && _(e) && (n.hour = e.hour, n.minute = e.minute, n.second = e.second, n.millisecond = e.millisecond);
|
|
509
|
+
let r = e ? t.set(n) : t, i = new g(this.dateFormatter).createSegments(r, e !== void 0);
|
|
510
|
+
if (this.dateFormat) {
|
|
511
|
+
let e = i.all.findIndex((e) => e.type === p.Month), t = i.all.findIndex((e) => e.type === p.Day);
|
|
512
|
+
if (e !== -1 && t !== -1) {
|
|
513
|
+
if (this.dateFormat === "mmdd" && e > t) {
|
|
514
|
+
let n = i.all[e];
|
|
515
|
+
i.all[e] = i.all[t], i.all[t] = n;
|
|
516
|
+
} else if (this.dateFormat === "ddmm" && t > e) {
|
|
517
|
+
let n = i.all[t];
|
|
518
|
+
i.all[t] = i.all[e], i.all[e] = n;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
return typeof this.dateSeparator == "string" && this.dateSeparator && (i.all?.[1]?.type === p.Literal && (i.all[1].formatted = this.dateSeparator), i.all?.[3]?.type === p.Literal && (i.all[3].formatted = this.dateSeparator)), this.precision === c.Day ? new f(i.all.filter((e) => {
|
|
523
|
+
let t = e.type;
|
|
524
|
+
return t === p.Year || t === p.Month || t === p.Day || t === p.Literal;
|
|
525
|
+
})) : i;
|
|
526
|
+
}
|
|
527
|
+
setNumberParser() {
|
|
528
|
+
this.numberParser = new R(this._language, { maximumFractionDigits: 0 });
|
|
529
|
+
}
|
|
530
|
+
setDateFormatter() {
|
|
531
|
+
this.dateFormatter = new k(this._language, {
|
|
532
|
+
day: "2-digit",
|
|
533
|
+
month: "2-digit",
|
|
534
|
+
year: "numeric",
|
|
535
|
+
...this.getTimeOptions("2-digit")
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
setAriaDateFormatter() {
|
|
539
|
+
this.ariaDateFormatter = new k(this._language, {
|
|
540
|
+
day: "numeric",
|
|
541
|
+
month: "long",
|
|
542
|
+
year: "numeric",
|
|
543
|
+
...this.getTimeOptions("numeric")
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
getTimeOptions(e) {
|
|
547
|
+
switch (this.precision) {
|
|
548
|
+
case c.Millisecond: return {
|
|
549
|
+
hour: e,
|
|
550
|
+
minute: e,
|
|
551
|
+
second: e,
|
|
552
|
+
fractionalSecondDigits: 3
|
|
553
|
+
};
|
|
554
|
+
case c.Second: return {
|
|
555
|
+
hour: e,
|
|
556
|
+
minute: e,
|
|
557
|
+
second: e
|
|
558
|
+
};
|
|
559
|
+
case c.Minute: return {
|
|
560
|
+
hour: e,
|
|
561
|
+
minute: e
|
|
562
|
+
};
|
|
563
|
+
case c.Hour: return { hour: e };
|
|
564
|
+
default: return {};
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
//#endregion
|
|
569
|
+
//#region src/components/date-range-picker/index.ts
|
|
570
|
+
e([x({
|
|
571
|
+
type: String,
|
|
572
|
+
attribute: "start-date",
|
|
573
|
+
reflect: !0
|
|
574
|
+
})], H.prototype, "startDate", void 0), e([x({
|
|
575
|
+
type: String,
|
|
576
|
+
attribute: "end-date",
|
|
577
|
+
reflect: !0
|
|
578
|
+
})], H.prototype, "endDate", void 0), e([x({
|
|
579
|
+
type: String,
|
|
580
|
+
reflect: !0
|
|
581
|
+
})], H.prototype, "min", void 0), e([x({
|
|
582
|
+
type: String,
|
|
583
|
+
reflect: !0
|
|
584
|
+
})], H.prototype, "max", void 0), e([x({
|
|
585
|
+
type: String,
|
|
586
|
+
attribute: "date-format",
|
|
587
|
+
reflect: !0
|
|
588
|
+
})], H.prototype, "dateFormat", void 0), e([x({
|
|
589
|
+
type: String,
|
|
590
|
+
attribute: "date-separator",
|
|
591
|
+
reflect: !0
|
|
592
|
+
})], H.prototype, "dateSeparator", void 0), e([x({
|
|
593
|
+
type: String,
|
|
594
|
+
reflect: !0
|
|
595
|
+
})], H.prototype, "precision", void 0), e([x({
|
|
596
|
+
type: Number,
|
|
597
|
+
reflect: !0
|
|
598
|
+
})], H.prototype, "calendars", void 0), e([x({
|
|
599
|
+
type: Boolean,
|
|
600
|
+
attribute: "show-defined-ranges",
|
|
601
|
+
reflect: !0
|
|
602
|
+
})], H.prototype, "showDefinedRanges", void 0), e([x({ attribute: !1 })], H.prototype, "definedRanges", void 0), e([x({
|
|
603
|
+
type: Boolean,
|
|
604
|
+
reflect: !0
|
|
605
|
+
})], H.prototype, "invalid", void 0), e([x({
|
|
606
|
+
type: Boolean,
|
|
607
|
+
reflect: !0
|
|
608
|
+
})], H.prototype, "readonly", void 0), e([x({
|
|
609
|
+
type: Boolean,
|
|
610
|
+
reflect: !0
|
|
611
|
+
})], H.prototype, "quiet", void 0), e([x({
|
|
612
|
+
type: String,
|
|
613
|
+
reflect: !0
|
|
614
|
+
})], H.prototype, "placement", void 0), e([x({
|
|
615
|
+
type: String,
|
|
616
|
+
attribute: "time-zone",
|
|
617
|
+
reflect: !0
|
|
618
|
+
})], H.prototype, "timeZone", void 0), e([x({
|
|
619
|
+
type: String,
|
|
620
|
+
reflect: !0
|
|
621
|
+
})], H.prototype, "language", void 0), e([x({ attribute: !1 })], H.prototype, "labels", void 0), e([x({
|
|
622
|
+
type: Boolean,
|
|
623
|
+
reflect: !0
|
|
624
|
+
})], H.prototype, "focused", void 0), e([C()], H.prototype, "_startDate", void 0), e([C()], H.prototype, "_endDate", void 0), e([C()], H.prototype, "startSegments", void 0), e([C()], H.prototype, "endSegments", void 0), e([C()], H.prototype, "isCalendarOpen", void 0), e([C()], H.prototype, "_leftMonth", void 0), e([C()], H.prototype, "_rightMonth", void 0), e([S(".editable-segment")], H.prototype, "firstEditableSegment", void 0), e([S(".range-wrapper")], H.prototype, "rangeWrapper", void 0), customElements.get("luzmo-date-range-picker") || customElements.define("luzmo-date-range-picker", H);
|
|
625
|
+
//#endregion
|
|
626
|
+
export { H as t };
|