@luzmo/lucero 1.0.3-alpha.8 → 2.0.0
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/components/accordion/index.cjs +1 -1
- package/components/accordion/index.js +2 -2
- package/components/{accordion-DC7cjb1c.js → accordion-BDchhAjE.js} +4 -4
- package/components/accordion-DpsYMoeb.cjs +43 -0
- package/components/action-bar/index.cjs +1 -1
- package/components/action-bar/index.js +2 -2
- package/components/{action-bar-Dn4IDXEF.js → action-bar-BhYEHEfo.js} +7 -7
- package/components/action-bar-VhZT8kQM.cjs +39 -0
- package/components/action-button/action-button.d.ts +12 -1
- package/components/action-button/index.cjs +1 -1
- package/components/action-button/index.d.ts +1 -1
- package/components/action-button/index.js +2 -2
- package/components/action-button-CWAg-5tz.cjs +22 -0
- package/components/{action-button-DC-ZFZTm.js → action-button-cULkUUi6.js} +8 -6
- package/components/action-group/index.cjs +1 -1
- package/components/action-group/index.js +2 -2
- package/components/{action-group-DYKpp-mz.js → action-group-BQ-fyPYS.js} +3 -3
- package/components/action-group-D1G30Iir.cjs +20 -0
- package/components/action-menu/index.cjs +1 -1
- package/components/action-menu/index.js +2 -2
- package/components/{action-menu-BlR6cLpi.js → action-menu-CkU-u55D.js} +21 -21
- package/components/{action-menu-C1C1Gx39.cjs → action-menu-DREgNCXt.cjs} +15 -15
- package/components/avatar/avatar.d.ts +17 -1
- package/components/avatar/index.cjs +1 -1
- package/components/avatar/index.js +2 -2
- package/components/avatar-Cu9c0sCS.cjs +34 -0
- package/components/avatar-Nb0368Wi.js +98 -0
- package/components/badge/badge.d.ts +1 -1
- package/components/badge/index.cjs +1 -1
- package/components/badge/index.js +2 -2
- package/components/badge-BzQfqgq6.cjs +23 -0
- package/components/badge-Dnkh-mfN.js +94 -0
- package/components/button/button-base.d.ts +1 -0
- package/components/button/button.d.ts +0 -1
- package/components/button/index.cjs +1 -1
- package/components/button/index.js +3 -3
- package/components/button-BJ0Y6wlM.cjs +20 -0
- package/components/{button-D1a4B85S.js → button-BtWr5Lag.js} +6 -6
- package/components/{button-base-CzTYjZND.js → button-base-DsUg0bJB.js} +26 -12
- package/components/{button-base-Dj2qQqwO.cjs → button-base-aTiE83bl.cjs} +3 -3
- package/components/button-group/index.cjs +1 -1
- package/components/button-group/index.js +2 -2
- package/components/button-group-6M8M-TUI.cjs +18 -0
- package/components/{button-group-BiQxYcQ2.js → button-group-DaANSInm.js} +2 -2
- package/components/calendar/index.cjs +1 -1
- package/components/calendar/index.js +2 -2
- package/components/{calendar-BNRjXf9B.js → calendar-CXjdC7jm.js} +5 -9
- package/components/calendar-DSlKZZCR.cjs +138 -0
- package/components/chat-message/chat-message.d.ts +0 -1
- package/components/chat-message/index.cjs +1 -1
- package/components/chat-message/index.js +2 -2
- package/components/chat-message-7cx2Bpo8.cjs +148 -0
- package/components/{chat-message-DJgocVNj.js → chat-message-CJ7Xk7tz.js} +757 -545
- package/components/chat-message-group/index.cjs +1 -1
- package/components/chat-message-group/index.js +2 -2
- package/components/chat-message-group-CzCwyW7F.cjs +24 -0
- package/components/{chat-message-group-B4U2MzHx.js → chat-message-group-D7vdn2gG.js} +2 -2
- package/components/checkbox/checkbox.d.ts +8 -1
- package/components/checkbox/index.cjs +1 -1
- package/components/checkbox/index.js +2 -2
- package/components/{checkbox-CPS-tR_i.js → checkbox-6YzkdHR4.js} +9 -5
- package/components/checkbox-DdatW4xE.cjs +25 -0
- package/components/{checkbox-mixin-C5sLMo5L.js → checkbox-mixin-jqmrh48O.js} +2 -2
- package/components/{checkbox-mixin-D4HeLrMj.cjs → checkbox-mixin-rFRXqyrK.cjs} +3 -3
- package/components/{close-button-MgaJT7yO.js → close-button-WomHVbgz.js} +4 -4
- package/components/close-button-hicleVjQ.cjs +18 -0
- package/components/color-area/index.cjs +1 -1
- package/components/color-area/index.js +2 -2
- package/components/{color-area-mWOctRNt.js → color-area-BRrtUbvH.js} +6 -6
- package/components/color-area-ayGmH8dj.cjs +80 -0
- package/components/color-controller-DbyPc33Y.cjs +18 -0
- package/components/color-field/index.cjs +1 -1
- package/components/color-field/index.js +2 -2
- package/components/{color-field-D7_7z2A2.cjs → color-field-BNGnBRSO.cjs} +2 -2
- package/components/{color-field-CxdIoSq6.js → color-field-CUdHxonc.js} +3 -3
- package/components/color-handle/index.cjs +1 -1
- package/components/color-handle/index.js +2 -2
- package/components/color-handle-DIoVrLRF.cjs +24 -0
- package/components/{color-handle-BOusOFFx.js → color-handle-TKbLs1ax.js} +2 -2
- package/components/color-loupe/index.cjs +1 -1
- package/components/color-loupe/index.js +2 -2
- package/components/{color-loupe-bEzi2P0y.js → color-loupe-DAxrNPJz.js} +2 -2
- package/components/color-loupe-sY1wOisV.cjs +56 -0
- package/components/color-menu/index.cjs +1 -1
- package/components/color-menu/index.js +2 -2
- package/components/color-menu-DOq9PAWG.cjs +89 -0
- package/components/{color-menu-Cryp_5Gh.js → color-menu-iKU6Vw8a.js} +24 -24
- package/components/color-palette/index.cjs +1 -1
- package/components/color-palette/index.js +2 -2
- package/components/color-palette-CidHsmE0.cjs +18 -0
- package/components/{color-palette-BAdaNySC.js → color-palette-FQyIMSwP.js} +3 -3
- package/components/color-palette-group/index.cjs +1 -1
- package/components/color-palette-group/index.js +2 -2
- package/components/color-palette-group-B4r4tPfY.cjs +28 -0
- package/components/{color-palette-group-D8Mavsd2.js → color-palette-group-o6bnF-Ir.js} +3 -3
- package/components/color-picker/index.cjs +1 -1
- package/components/color-picker/index.js +2 -2
- package/components/{color-picker-DgjqWiVd.js → color-picker-Bw5UKyME.js} +6 -6
- package/components/{color-picker-DL7rqWnW.cjs → color-picker-D3WFls0M.cjs} +2 -2
- package/components/color-slider/index.cjs +1 -1
- package/components/color-slider/index.js +2 -2
- package/components/color-slider-BiVpn9_U.cjs +57 -0
- package/components/{color-slider-ihAIFt5p.js → color-slider-BtPNTmQu.js} +6 -5
- package/components/{condition-attribute-with-id-DauPaLSS.cjs → condition-attribute-with-id-Cw92IbcP.cjs} +1 -1
- package/components/date-range-picker/index.cjs +1 -1
- package/components/date-range-picker/index.js +2 -2
- package/components/date-range-picker-DMq8EaiB.cjs +180 -0
- package/components/{date-range-picker-DocjwZKA.js → date-range-picker-DaHFLwQL.js} +13 -13
- package/components/date-time-picker/index.cjs +1 -1
- package/components/date-time-picker/index.js +2 -2
- package/components/date-time-picker-DdtcziBG.cjs +105 -0
- package/components/{date-time-picker-CPbIj4TN.js → date-time-picker-hjeFVUz9.js} +12 -12
- package/components/{decorate-aGxJUVxg.js → decorate-CkCg3wfh.js} +1 -1
- package/components/decorate-Dq34MBGe.cjs +18 -0
- package/components/{dependency-manger-CHy9t__e.cjs → dependency-manger-BSaHw9ju.cjs} +1 -1
- package/components/divider/index.cjs +1 -1
- package/components/divider/index.js +2 -2
- package/components/{divider-cU0lVwOp.js → divider-CGbT-CL8.js} +3 -3
- package/components/divider-wana0uPI.cjs +18 -0
- package/components/{divider.module-CL60P_z8.cjs → divider.module-BV6tmpOY.cjs} +1 -1
- package/components/{element-resolution-C0aiOB0Y.cjs → element-resolution-BjaAlqwX.cjs} +1 -1
- package/components/field-group/index.cjs +1 -1
- package/components/field-group/index.js +2 -2
- package/components/{field-group-C7ROsWq3.js → field-group-C_kRq7pJ.js} +2 -2
- package/components/{field-group-OcI5Lgu7.cjs → field-group-Dd5xYczm.cjs} +2 -2
- package/components/field-label/index.cjs +1 -1
- package/components/field-label/index.js +2 -2
- package/components/{field-label-CtGCEmdp.js → field-label-B9S41b7c.js} +5 -5
- package/components/field-label-C5vdJ1ys.cjs +25 -0
- package/components/focus-group-C8lOjbi9.cjs +18 -0
- package/components/{focus-group-BshI1RpM.js → focus-group-DVPa1zxz.js} +1 -1
- package/components/{focus-visible-CrooVCUu.js → focus-visible-Bt2uDmuM.js} +2 -2
- package/components/focus-visible-DNHNlrty.cjs +18 -0
- package/components/focusable-B6h03pAe.cjs +18 -0
- package/components/{focusable-BmS8IzhH.js → focusable-DuP0-Kuy.js} +2 -2
- package/components/{focusable-selectors-5n5liBn0.cjs → focusable-selectors-DJqGLTJo.cjs} +1 -1
- package/components/{get-label-from-slot-LO_DZP60.cjs → get-label-from-slot-TV4APBYs.cjs} +1 -1
- package/components/icon/index.cjs +1 -1
- package/components/icon/index.js +2 -2
- package/components/icon-CSqR-OOO.cjs +18 -0
- package/components/{icon-CwBAE1eU.js → icon-DB1DRieA.js} +5 -2
- package/components/index.cjs +1 -1
- package/components/index.js +71 -69
- package/components/infield-button/index.cjs +1 -1
- package/components/infield-button/index.js +2 -2
- package/components/{infield-button-BvKsbtKr.js → infield-button-BmGfFDDA.js} +3 -3
- package/components/infield-button-Cdee_UPX.cjs +22 -0
- package/components/label/index.cjs +1 -1
- package/components/label/index.js +2 -2
- package/components/{label-ClJE2esm.js → label-B1HYQ4Pp.js} +1 -1
- package/components/label-DPG13Ib0.cjs +18 -0
- package/components/{language-resolution-BYemISJC.cjs → language-resolution-BUeKpSce.cjs} +1 -1
- package/components/{like-anchor-BZJXts_H.cjs → like-anchor-BX4PSB3d.cjs} +2 -2
- package/components/{like-anchor-DeOXX-MX.js → like-anchor-DXCaEv7O.js} +1 -1
- package/components/{manage-help-text-CF0xBh0F.js → manage-help-text-ByLb0QYX.js} +13 -10
- package/components/{manage-help-text-D9VbYRf_.cjs → manage-help-text-DtFJsl0k.cjs} +3 -3
- package/components/menu/index.cjs +1 -1
- package/components/menu/index.js +2 -2
- package/components/menu/menu-item.d.ts +1 -1
- package/components/menu/menu.d.ts +12 -1
- package/components/{menu-Cdz2FEB7.js → menu-C9ogB7Bq.js} +82 -65
- package/components/menu-DXONqtwu.cjs +108 -0
- package/components/multi-language-field/index.cjs +1 -1
- package/components/multi-language-field/index.js +2 -2
- package/components/{multi-language-field-DmoMyCBH.cjs → multi-language-field-Cfy3M_ZS.cjs} +2 -2
- package/components/{multi-language-field-BzY75rOY.js → multi-language-field-DhQ98r2D.js} +4 -4
- package/components/notice/index.cjs +18 -0
- package/components/notice/index.d.ts +8 -0
- package/components/notice/index.js +25 -0
- package/components/notice/notice.d.ts +121 -0
- package/components/notice-BeL9oE94.js +218 -0
- package/components/notice-COZLmk94.cjs +60 -0
- package/components/number-field/index.cjs +1 -1
- package/components/number-field/index.js +2 -2
- package/components/number-field-D19qjVbk.cjs +57 -0
- package/components/{number-field-DrJURvoW.js → number-field-DjvWkjL8.js} +42 -42
- package/components/observe-slot-presence-CS8pMePk.cjs +18 -0
- package/components/observe-slot-text-CvL-2ey3.cjs +18 -0
- package/components/{observe-slot-text-Ddf1OC6F.js → observe-slot-text-Db8Kx3P-.js} +7 -7
- package/components/options/index.cjs +1 -1
- package/components/options/index.d.ts +5 -3
- package/components/options/index.js +2 -2
- package/components/options/option.d.ts +0 -1
- package/components/{options-BGwKMvng.js → options-C1MoEq26.js} +9 -9
- package/components/{options-CKi3VkNR.cjs → options-yWbz0D6O.cjs} +3 -3
- package/components/overlay/index.cjs +1 -1
- package/components/overlay/index.d.ts +3 -2
- package/components/overlay/index.js +4 -4
- package/components/overlay/overlay-trigger.d.ts +1 -1
- package/components/overlay-B-gaxspw.cjs +47 -0
- package/components/{overlay-BGI4wOGe.cjs → overlay-CPZvL0Ic.cjs} +2 -2
- package/components/{overlay-BbQuYBxp.js → overlay-CyBsHuOL.js} +20 -15
- package/components/{overlay-mdk7-NOt.js → overlay-DdIs4w5M.js} +3 -3
- package/components/{pending-state-DFcNf5rd.js → pending-state-BeG7qBDP.js} +1 -1
- package/components/{pending-state-DIeF18qg.cjs → pending-state-a527YMWV.cjs} +2 -2
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +2 -2
- package/components/picker/picker.d.ts +1 -0
- package/components/{picker-DOiM_cUu.js → picker-Bufw-biD.js} +64 -66
- package/components/picker-D6ZM08K8.cjs +124 -0
- package/components/picker-button/index.cjs +1 -1
- package/components/picker-button/index.js +2 -2
- package/components/{picker-button-VAxzuhhg.js → picker-button-CF6yD_1d.js} +5 -5
- package/components/picker-button-Dh2gGZ8R.cjs +37 -0
- package/components/platform-BAjeJp2W.cjs +18 -0
- package/components/{platform-D4V_cOJF.js → platform-Ce9pNsR9.js} +2 -2
- package/components/popover/index.cjs +1 -1
- package/components/popover/index.js +2 -2
- package/components/{popover-DyC9xGhX.js → popover-DTsrgH-f.js} +4 -4
- package/components/popover-DWWYpY-k.cjs +30 -0
- package/components/progress-bar/index.cjs +1 -1
- package/components/progress-bar/index.js +2 -2
- package/components/{progress-bar-DHgFRml1.js → progress-bar-BJO8j1aX.js} +9 -6
- package/components/progress-bar-C7wJ5bxS.cjs +34 -0
- package/components/progress-circle/index.cjs +1 -1
- package/components/progress-circle/index.js +2 -2
- package/components/{progress-circle-Cg_ua9Ff.js → progress-circle-BVToDWX8.js} +3 -3
- package/components/progress-circle-DyApSKdm.cjs +33 -0
- package/components/progress-steps/index.cjs +1 -1
- package/components/progress-steps/index.js +2 -2
- package/components/progress-steps-Ba4VbAKR.cjs +96 -0
- package/components/{progress-steps-Da8aZWx3.js → progress-steps-nJ8Xw-nG.js} +10 -10
- package/components/prompt-box/controllers/attachments-controller.d.ts +1 -0
- package/components/prompt-box/index.cjs +1 -1
- package/components/prompt-box/index.d.ts +2 -1
- package/components/prompt-box/index.js +3 -3
- package/components/prompt-box/prompt-box-templates.d.ts +4 -0
- package/components/prompt-box/prompt-box.d.ts +33 -4
- package/components/prompt-box/types.d.ts +8 -0
- package/components/prompt-box-D358CWoY.cjs +314 -0
- package/components/{prompt-box-Bj0qIPOy.js → prompt-box-y7qWHF3P.js} +242 -186
- package/components/question-box/index.cjs +18 -0
- package/components/question-box/index.d.ts +11 -0
- package/components/question-box/index.js +25 -0
- package/components/question-box/question-box-elicitation.d.ts +58 -0
- package/components/question-box/question-box-model.d.ts +25 -0
- package/components/question-box/question-box-templates.d.ts +65 -0
- package/components/question-box/question-box.d.ts +182 -0
- package/components/question-box/types.d.ts +124 -0
- package/components/question-box-9F6Ppakl.js +1171 -0
- package/components/question-box-DaAgC3_D.cjs +401 -0
- package/components/radio/index.cjs +1 -1
- package/components/radio/index.js +2 -2
- package/components/radio/radio-group.d.ts +5 -1
- package/components/radio/radio.d.ts +7 -1
- package/components/{radio-BzEPGUmQ.js → radio-DRI4on-W.js} +30 -26
- package/components/radio-O3a1rmCe.cjs +22 -0
- package/components/{random-id-B51lUxUB.cjs → random-id-BcUJAxUZ.cjs} +1 -1
- package/components/{random-id-Dd4boCPV.js → random-id-CiMDyX7v.js} +1 -1
- package/components/{roving-tabindex-B7x5ePUB.cjs → roving-tabindex-BoPao4td.cjs} +1 -1
- package/components/{roving-tabindex-BP6mQbXf.js → roving-tabindex-pomAn3z-.js} +1 -1
- package/components/{scaled-indicator-DF45Sc3W.cjs → scaled-indicator-DLJIztx0.cjs} +2 -2
- package/components/search/index.cjs +1 -1
- package/components/search/index.js +2 -2
- package/components/search-B2DQb14U.js +100 -0
- package/components/search-CsNvKd8x.cjs +47 -0
- package/components/segments-factory-DtPyN5sh.cjs +18 -0
- package/components/select/index.cjs +1 -1
- package/components/select/index.js +2 -2
- package/components/select-B_E-w1a2.cjs +158 -0
- package/components/{select-C2gh8zRr.js → select-CE6pIRX3.js} +12 -12
- package/components/{chunk-D-qHiVGv.cjs → sized-mixin-BT7cv-fT.cjs} +1 -1
- package/components/{sized-mixin-DaBoZkVS.js → sized-mixin-DzQTebN-.js} +1 -1
- package/components/skeleton-loader/index.cjs +1 -1
- package/components/skeleton-loader/index.js +2 -2
- package/components/{skeleton-loader-C1XG3m_u.js → skeleton-loader-C0LH3prK.js} +1 -1
- package/components/skeleton-loader-Cm50Ztzk.cjs +18 -0
- package/components/slider/controllers/slider-handle-controller.d.ts +79 -0
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.d.ts +5 -1
- package/components/slider/index.js +3 -3
- package/components/slider/slider-control-templates.d.ts +36 -0
- package/components/slider/slider-handle.d.ts +62 -0
- package/components/slider/slider-model.d.ts +16 -0
- package/components/slider/slider-templates.d.ts +6 -0
- package/components/slider/slider.d.ts +197 -19
- package/components/slider/types.d.ts +57 -0
- package/components/slider-CDrXecqO.cjs +135 -0
- package/components/slider-CfgH3NK8.js +921 -0
- package/components/{slottable-request-event-gAcEQan2.cjs → slottable-request-event-C6eb7Ch3.cjs} +1 -1
- package/components/status-light/index.cjs +1 -1
- package/components/status-light/index.js +2 -2
- package/components/{status-light-Bf8jGu4G.js → status-light-BlfBJpqa.js} +2 -2
- package/components/status-light-Bu0G8-lH.cjs +21 -0
- package/components/strategies-BwNbUXYS.cjs +18 -0
- package/components/{strategies-DhxJGIZT.js → strategies-Cl59wdNZ.js} +21 -19
- package/components/streaming-listener-Bfyk6Fsx.cjs +18 -0
- package/components/swatch/index.cjs +1 -1
- package/components/swatch/index.js +2 -2
- package/components/{swatch-BLuV-hlF.js → swatch-C2ty27bJ.js} +4 -4
- package/components/{swatch-G70JUe6I.cjs → swatch-DUmBmg4S.cjs} +2 -2
- package/components/switch/index.cjs +1 -1
- package/components/switch/index.js +2 -2
- package/components/switch-B-gu-War.cjs +22 -0
- package/components/{switch-C5g5t5x2.js → switch-DOuXlFwI.js} +5 -5
- package/components/tabs/index.cjs +1 -1
- package/components/tabs/index.js +2 -2
- package/components/tabs/tabs.d.ts +1 -2
- package/components/{tabs-CTKkW-L8.cjs → tabs-CcnIX4jQ.cjs} +2 -2
- package/components/{tabs-DYpbsO58.js → tabs-D1puCPrL.js} +11 -11
- package/components/tags/index.cjs +1 -1
- package/components/tags/index.js +2 -2
- package/components/tags/tag.d.ts +4 -3
- package/components/{tags-CBL5oFEo.js → tags-Bw-y2Wfl.js} +26 -26
- package/components/tags-Cr8ObbWn.cjs +47 -0
- package/components/text-field/help-text-manager.d.ts +3 -1
- package/components/text-field/help-text.d.ts +4 -0
- package/components/text-field/index.cjs +1 -1
- package/components/text-field/index.js +3 -3
- package/components/text-field/manage-help-text.d.ts +2 -1
- package/components/text-field/text-field.d.ts +9 -0
- package/components/{text-field-FJr8ZUhI.cjs → text-field-3fDtTQkR.cjs} +2 -2
- package/components/{text-field-BoGAvXvh.js → text-field-C2MHZbTp.js} +3 -3
- package/components/{text-field-Cs8HYRYL.js → text-field-CmSym2QK.js} +5 -5
- package/components/text-field-wJK2bzMT.cjs +21 -0
- package/components/{text-field.module-Btsve-VN.js → text-field.module-BHhBReKL.js} +1 -1
- package/components/{text-field.module-D5oDP7MB.cjs → text-field.module-l8CaTCwE.cjs} +1 -1
- package/components/toast/index.cjs +1 -1
- package/components/toast/index.js +2 -2
- package/components/toast-BPhdMJTx.cjs +51 -0
- package/components/{toast-Bd0fleYT.js → toast-D90C9Cim.js} +4 -4
- package/components/tooltip/index.cjs +1 -1
- package/components/tooltip/index.js +2 -2
- package/components/{tooltip-CVSSKlDP.js → tooltip-Byl1h4nN.js} +4 -4
- package/components/tooltip-Sm0pruxL.cjs +45 -0
- package/components/top-nav/index.cjs +1 -1
- package/components/top-nav/index.js +2 -2
- package/components/{top-nav-CMVB3G_v.js → top-nav-B9YKdtFB.js} +7 -11
- package/components/top-nav-BcZLCBP_.cjs +41 -0
- package/components/utils.cjs +1 -1
- package/components/utils.js +7 -7
- package/components/{voice-recorder-BUtmSvPO.cjs → voice-recorder-B1tBrGTV.cjs} +1 -1
- package/custom-elements.json +1 -1
- package/index.d.ts +2 -0
- package/package.json +15 -4
- package/utils/button-interaction-controllers/interaction-controller.d.ts +4 -2
- package/utils/reactive-controllers/match-media.d.ts +1 -0
- package/components/accordion-BHBIfsLU.cjs +0 -43
- package/components/action-bar-BSMX042X.cjs +0 -39
- package/components/action-button-Cr_QN4On.cjs +0 -22
- package/components/action-group-CH8FTW0i.cjs +0 -20
- package/components/avatar-CyY_ZSD0.js +0 -65
- package/components/avatar-PulwjkMI.cjs +0 -24
- package/components/badge-D1Ry32wi.cjs +0 -23
- package/components/badge-D6p2hPj8.js +0 -94
- package/components/button-C5hcfigl.cjs +0 -20
- package/components/button-group-DIz5TZvc.cjs +0 -18
- package/components/calendar-BWArK3rh.cjs +0 -142
- package/components/chat-message-CNE-mGuP.cjs +0 -149
- package/components/chat-message-group-COmhCN-R.cjs +0 -24
- package/components/checkbox-DFwDrIdY.cjs +0 -25
- package/components/close-button-_EXjp6_m.cjs +0 -18
- package/components/color-area-C3Y2d5cu.cjs +0 -80
- package/components/color-controller-DueaXfnX.cjs +0 -18
- package/components/color-handle-Cka48yPY.cjs +0 -24
- package/components/color-loupe-DMk8uWZW.cjs +0 -56
- package/components/color-menu-BAKmi_EI.cjs +0 -89
- package/components/color-palette-349EkPMg.cjs +0 -18
- package/components/color-palette-group-BvP09zmT.cjs +0 -28
- package/components/color-slider-DxjJ72ue.cjs +0 -57
- package/components/date-range-picker-DdY9hGsU.cjs +0 -180
- package/components/date-time-picker-DdujhIkd.cjs +0 -105
- package/components/decorate-B2wePfNm.cjs +0 -18
- package/components/divider-Dn8XqbB6.cjs +0 -18
- package/components/field-label-BCl6R1uO.cjs +0 -25
- package/components/focus-group-SF8Kj7iB.cjs +0 -18
- package/components/focus-visible-B0NNezGc.cjs +0 -18
- package/components/focusable-CupEoHmn.cjs +0 -18
- package/components/icon-B7hKwn_q.cjs +0 -18
- package/components/infield-button-D5cuBWE5.cjs +0 -22
- package/components/label-CqolZbJo.cjs +0 -18
- package/components/menu-DFKS4sRU.cjs +0 -108
- package/components/number-field-BmWODnnR.cjs +0 -57
- package/components/observe-slot-presence-Dx8hzNzK.cjs +0 -18
- package/components/observe-slot-text-BhTcGuHY.cjs +0 -18
- package/components/overlay-DU_p8MNs.cjs +0 -47
- package/components/picker-CssPvvau.cjs +0 -123
- package/components/picker-button-adl1JO5u.cjs +0 -37
- package/components/platform-B7Sk7Qon.cjs +0 -18
- package/components/popover-dgL04x6P.cjs +0 -30
- package/components/progress-bar-BR28tISC.cjs +0 -31
- package/components/progress-circle-DuzwUiGN.cjs +0 -33
- package/components/progress-steps-WriXaZpE.cjs +0 -96
- package/components/prompt-box-6Z5LIjCF.cjs +0 -299
- package/components/radio-d-2GUbYE.cjs +0 -22
- package/components/search-CCvT87FX.cjs +0 -47
- package/components/search-Dtff2EzC.js +0 -100
- package/components/segments-factory-CHo9oQw7.cjs +0 -18
- package/components/select-qAKOLhmQ.cjs +0 -158
- package/components/sized-mixin-StFA4y0J.cjs +0 -18
- package/components/skeleton-loader-B8NgELvX.cjs +0 -18
- package/components/slider-3QBnq0S8.js +0 -96
- package/components/slider-uXRKcOz5.cjs +0 -18
- package/components/status-light-CBaAFRUc.cjs +0 -21
- package/components/strategies-kuvLVIKO.cjs +0 -18
- package/components/streaming-listener-BnDW38lt.cjs +0 -18
- package/components/switch-COhz9ka9.cjs +0 -22
- package/components/tags-CndS4S2k.cjs +0 -47
- package/components/text-field-A4Obzs4l.cjs +0 -21
- package/components/toast-NZ0Z1lz9.cjs +0 -51
- package/components/tooltip-6y-g7e9V.cjs +0 -45
- package/components/top-nav-bekRXHUk.cjs +0 -45
- /package/components/{color-controller-G2_v2xSl.js → color-controller-Rg_Zl0sT.js} +0 -0
- /package/components/{condition-attribute-with-id-Duo51HZ7.js → condition-attribute-with-id-BdnTdWKz.js} +0 -0
- /package/components/{dependency-manger-DMrulWcJ.js → dependency-manger-wHEXoU92.js} +0 -0
- /package/components/{divider.module-C65RfSUa.js → divider.module-CPEKsaqR.js} +0 -0
- /package/components/{element-resolution-Bs1x89vU.js → element-resolution-gap51AVo.js} +0 -0
- /package/components/{focusable-selectors-Bg60_Kra.js → focusable-selectors-BWpiuXz5.js} +0 -0
- /package/components/{get-label-from-slot-5vVnfSgN.js → get-label-from-slot-Bo9mqYCZ.js} +0 -0
- /package/components/{language-resolution-BpfGTC29.js → language-resolution-DR30FsWE.js} +0 -0
- /package/components/{observe-slot-presence-BCqd3VSd.js → observe-slot-presence-BKY6n06-.js} +0 -0
- /package/components/{rolldown-runtime-CAFD8bLK.js → rolldown-runtime-Dy4uBu1J.js} +0 -0
- /package/components/{scaled-indicator-BoLeYSgL.js → scaled-indicator-C-TupV4L.js} +0 -0
- /package/components/{segments-factory-D0IveW-q.js → segments-factory-BCRi1NKb.js} +0 -0
- /package/components/{slottable-request-event-DZ2Z_BLk.js → slottable-request-event-MRSZbgTu.js} +0 -0
- /package/components/{streaming-listener-2NcP7ys7.js → streaming-listener-CtcMpYfS.js} +0 -0
- /package/components/{voice-recorder-477xPHRU.js → voice-recorder-CTg3kRxx.js} +0 -0
|
@@ -0,0 +1,921 @@
|
|
|
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-CkCg3wfh.js";
|
|
19
|
+
import { n } from "./sized-mixin-DzQTebN-.js";
|
|
20
|
+
import { t as r } from "./focusable-DuP0-Kuy.js";
|
|
21
|
+
import { n as i, t as a } from "./language-resolution-DR30FsWE.js";
|
|
22
|
+
import { t as o } from "./manage-help-text-ByLb0QYX.js";
|
|
23
|
+
import "./number-field-DjvWkjL8.js";
|
|
24
|
+
import { html as s, nothing as c, unsafeCSS as l } from "lit";
|
|
25
|
+
import { property as u, queryAll as d, state as f } from "lit/decorators.js";
|
|
26
|
+
import { ifDefined as p } from "lit/directives/if-defined.js";
|
|
27
|
+
import { classMap as m } from "lit/directives/class-map.js";
|
|
28
|
+
import { styleMap as h } from "lit/directives/style-map.js";
|
|
29
|
+
import { NumberFormatter as g } from "@internationalized/number";
|
|
30
|
+
import { repeat as _ } from "lit/directives/repeat.js";
|
|
31
|
+
var v = {
|
|
32
|
+
toNormalized(e, t, n) {
|
|
33
|
+
return n === t ? 0 : (e - t) / (n - t);
|
|
34
|
+
},
|
|
35
|
+
fromNormalized(e, t, n) {
|
|
36
|
+
return e * (n - t) + t;
|
|
37
|
+
}
|
|
38
|
+
}, y = (e, t) => {
|
|
39
|
+
let n = e;
|
|
40
|
+
for (let [e, r] of Object.entries(t)) n = n.replaceAll(`{${e}}`, r);
|
|
41
|
+
return n;
|
|
42
|
+
}, b = (e) => {
|
|
43
|
+
if (!Number.isFinite(e)) return 0;
|
|
44
|
+
let t = Math.abs(e).toString(), n = t.match(/^\d+(?:\.(?<fraction>\d+))?e(?<exponent>[+-]\d+)$/);
|
|
45
|
+
if (n?.groups) {
|
|
46
|
+
let { fraction: e = "", exponent: t } = n.groups;
|
|
47
|
+
return Math.min(Math.max(e.length - Number(t), 0), 20);
|
|
48
|
+
}
|
|
49
|
+
let [, r = ""] = t.split(".");
|
|
50
|
+
return Math.min(r.length, 20);
|
|
51
|
+
}, x = (e, t) => {
|
|
52
|
+
let n;
|
|
53
|
+
try {
|
|
54
|
+
n = e();
|
|
55
|
+
} catch {
|
|
56
|
+
n = void 0;
|
|
57
|
+
}
|
|
58
|
+
if (typeof n == "number" && !Number.isNaN(n)) return n;
|
|
59
|
+
let r = t();
|
|
60
|
+
return Number.isNaN(r) ? 0 : r;
|
|
61
|
+
}, S = (e, t) => Number.isFinite(e) ? e : t, C = (e, t, n) => Math.min(Math.max(e, Math.min(t, n)), Math.max(t, n)), w = (e, t, n, r) => {
|
|
62
|
+
let i = S(t, 0), a = S(n, i), o = Number.isFinite(r) && r > 0 ? r : 1, s = Number.isNaN(e) ? i : e, c = Math.max(b(o), b(i), b(a)), l = i + Math.round((C(s, i, a) - i) / o) * o;
|
|
63
|
+
return C(Number(l.toFixed(c)), i, a);
|
|
64
|
+
}, T = (e, t, n, r = v) => C(x(() => r.toNormalized(e, t, n), () => v.toNormalized(e, t, n)), 0, 1), E = (e, t, n, r, i = v) => {
|
|
65
|
+
let a = C(e, 0, 1);
|
|
66
|
+
return w(x(() => i.fromNormalized(a, t, n), () => v.fromNormalized(a, t, n)), t, n, r);
|
|
67
|
+
}, D = (e, t, n) => {
|
|
68
|
+
if (!Number.isFinite(e) || !Number.isFinite(t) || !Number.isFinite(n) || n <= 0 || t <= e) return [];
|
|
69
|
+
let r = Math.floor((t - e) / n) + 1;
|
|
70
|
+
if (r > 250) return [];
|
|
71
|
+
let i = Math.max(b(e), b(n));
|
|
72
|
+
return Array.from({ length: r }, (t, r) => Number((e + r * n).toFixed(i)));
|
|
73
|
+
}, O = (e, t, n, r, i = v) => {
|
|
74
|
+
let a = t + (n - t) / 2, o = r === !0 ? a : r === void 0 ? t : r, s = T(Number.isNaN(o) ? t : o, t, n, i), c = T(e, t, n, i);
|
|
75
|
+
return [Math.min(s, c), Math.max(s, c)];
|
|
76
|
+
}, k = (e, t) => e + (t - e) / 2, A = class {
|
|
77
|
+
constructor(e, t, n, r) {
|
|
78
|
+
this._applySingleValue = t, this._formatHandleValue = n, this._formatHandleLabel = r, this._attachedHandles = /* @__PURE__ */ new Set(), this._inputMap = /* @__PURE__ */ new WeakMap(), this.activeIndex = 0, this.draggingIndex = -1, this._host = e, this._host.addController(this);
|
|
79
|
+
}
|
|
80
|
+
hostConnected() {
|
|
81
|
+
this.invalidate(), this._syncAttachments();
|
|
82
|
+
}
|
|
83
|
+
hostDisconnected() {
|
|
84
|
+
this.draggingIndex = -1, this._detachHandles(), this._inputMap = /* @__PURE__ */ new WeakMap(), this._cachedModels = void 0;
|
|
85
|
+
}
|
|
86
|
+
hostUpdate() {
|
|
87
|
+
this._syncAttachments(), this._cachedModels = this._resolveModels();
|
|
88
|
+
}
|
|
89
|
+
hostUpdated() {
|
|
90
|
+
this._syncInputReferences(), this._commitClampedValues();
|
|
91
|
+
}
|
|
92
|
+
get handles() {
|
|
93
|
+
let e = this._host.shadowRoot?.querySelector("slot[name=\"handle\"]");
|
|
94
|
+
return (e ? e.assignedElements() : [...this._host.children]).filter((e) => e.localName === "luzmo-slider-handle" && e.slot === "handle");
|
|
95
|
+
}
|
|
96
|
+
get models() {
|
|
97
|
+
return this._cachedModels ?? this._resolveModels();
|
|
98
|
+
}
|
|
99
|
+
get values() {
|
|
100
|
+
return Object.fromEntries(this.models.map(({ name: e, value: t }) => [e, t]));
|
|
101
|
+
}
|
|
102
|
+
invalidate() {
|
|
103
|
+
this._cachedModels = void 0;
|
|
104
|
+
}
|
|
105
|
+
requestHostUpdate() {
|
|
106
|
+
this.invalidate(), this._host.requestUpdate();
|
|
107
|
+
}
|
|
108
|
+
inputForHandle(e) {
|
|
109
|
+
return this._inputMap.get(e);
|
|
110
|
+
}
|
|
111
|
+
setValue(e, t) {
|
|
112
|
+
let n = this.models[e];
|
|
113
|
+
if (!n) return !1;
|
|
114
|
+
this.activeIndex = e;
|
|
115
|
+
let r = w(t, n.effectiveMin, n.effectiveMax, n.step);
|
|
116
|
+
return r === n.value ? !1 : (n.handle ? n.handle.value = r : this._applySingleValue(r), this._cachedModels = this._resolveModels(), !0);
|
|
117
|
+
}
|
|
118
|
+
setNormalizedValue(e, t) {
|
|
119
|
+
let n = this.models[e];
|
|
120
|
+
return n ? this.setValue(e, E(t, n.min, n.max, n.step, n.normalization)) : !1;
|
|
121
|
+
}
|
|
122
|
+
nearestIndex(e) {
|
|
123
|
+
let t = this.models;
|
|
124
|
+
return t.reduce((n, r, i) => Math.abs(r.normalizedValue - e) < Math.abs(t[n].normalizedValue - e) ? i : n, Math.min(Math.max(this.activeIndex, 0), t.length - 1));
|
|
125
|
+
}
|
|
126
|
+
reset(e) {
|
|
127
|
+
let t = this.models[e];
|
|
128
|
+
return !t || t.defaultValue === void 0 || !this.setValue(e, t.defaultValue) ? !1 : (this.dispatchInput(e), this.dispatchChange(e), !0);
|
|
129
|
+
}
|
|
130
|
+
dispatchInput(e) {
|
|
131
|
+
this._eventTarget(e).dispatchEvent(new Event("input", {
|
|
132
|
+
bubbles: !0,
|
|
133
|
+
composed: !0
|
|
134
|
+
}));
|
|
135
|
+
}
|
|
136
|
+
dispatchChange(e) {
|
|
137
|
+
this._eventTarget(e).dispatchEvent(new Event("change", {
|
|
138
|
+
bubbles: !0,
|
|
139
|
+
composed: !0
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
formatValue(e) {
|
|
143
|
+
let t = this.models[e];
|
|
144
|
+
return t ? this._formatHandleValue(t) : "";
|
|
145
|
+
}
|
|
146
|
+
_eventTarget(e) {
|
|
147
|
+
return this.models[e]?.handle ?? this._host;
|
|
148
|
+
}
|
|
149
|
+
_syncInputReferences() {
|
|
150
|
+
this._inputMap = /* @__PURE__ */ new WeakMap();
|
|
151
|
+
let e = this._host.shadowRoot?.querySelectorAll("input[type=\"range\"]") ?? [];
|
|
152
|
+
this.models.forEach((t, n) => {
|
|
153
|
+
t.handle && e[n] && this._inputMap.set(t.handle, e[n]);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
_commitClampedValues() {
|
|
157
|
+
for (let e of this.models) e.handle && e.handle.value !== e.value && (e.handle.value = e.value);
|
|
158
|
+
}
|
|
159
|
+
_syncAttachments() {
|
|
160
|
+
let e = new Set(this._host.isConnected ? this.handles : []);
|
|
161
|
+
for (let t of this._attachedHandles) e.has(t) || t.detachController(this);
|
|
162
|
+
for (let t of e) t.attachController(this);
|
|
163
|
+
this._attachedHandles = e;
|
|
164
|
+
}
|
|
165
|
+
_detachHandles() {
|
|
166
|
+
for (let e of this._attachedHandles) e.detachController(this);
|
|
167
|
+
this._attachedHandles.clear();
|
|
168
|
+
}
|
|
169
|
+
_resolveModels() {
|
|
170
|
+
let e = this.handles;
|
|
171
|
+
if (e.length === 0) return [this._resolveSingleModel()];
|
|
172
|
+
let t = e.map((e) => {
|
|
173
|
+
let t = typeof e.min == "number" && Number.isFinite(e.min) ? e.min : this._host.min, n = typeof e.max == "number" && Number.isFinite(e.max) ? e.max : this._host.max;
|
|
174
|
+
return {
|
|
175
|
+
min: t,
|
|
176
|
+
max: Math.max(t, n)
|
|
177
|
+
};
|
|
178
|
+
}), n = e.map((e, n) => {
|
|
179
|
+
let { min: r, max: i } = t[n], a = this._resolveStep(e.step);
|
|
180
|
+
return w(Number.isFinite(e.value) ? e.value : k(r, i), r, i, a);
|
|
181
|
+
}), r = /* @__PURE__ */ new Set();
|
|
182
|
+
return e.map((i, a) => {
|
|
183
|
+
let { min: o, max: s } = t[a], c = this._resolveStep(i.step), l = i.min === "previous" && a > 0 ? Math.max(o, n[a - 1]) : o, u = Math.max(l, i.max === "next" && a < e.length - 1 ? Math.min(s, n[a + 1]) : s), d = w(n[a], l, u, c), f = i.normalization;
|
|
184
|
+
return {
|
|
185
|
+
handle: i,
|
|
186
|
+
name: this._uniqueName(i.name, a, r),
|
|
187
|
+
label: this._formatHandleLabel(i, a),
|
|
188
|
+
value: d,
|
|
189
|
+
min: o,
|
|
190
|
+
max: s,
|
|
191
|
+
effectiveMin: l,
|
|
192
|
+
effectiveMax: u,
|
|
193
|
+
step: c,
|
|
194
|
+
defaultValue: i.defaultValue,
|
|
195
|
+
normalizedValue: T(d, o, s, f),
|
|
196
|
+
normalization: f
|
|
197
|
+
};
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
_resolveSingleModel() {
|
|
201
|
+
let { min: e, max: t, step: n, normalization: r } = this._host, i = w(this._host.value, e, t, n);
|
|
202
|
+
return {
|
|
203
|
+
name: "value",
|
|
204
|
+
label: this._host.label,
|
|
205
|
+
value: i,
|
|
206
|
+
min: e,
|
|
207
|
+
max: t,
|
|
208
|
+
effectiveMin: e,
|
|
209
|
+
effectiveMax: t,
|
|
210
|
+
step: n,
|
|
211
|
+
defaultValue: this._host.defaultValue,
|
|
212
|
+
normalizedValue: T(i, e, t, r),
|
|
213
|
+
normalization: r
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
_resolveStep(e) {
|
|
217
|
+
return e !== void 0 && Number.isFinite(e) && e > 0 ? e : this._host.step;
|
|
218
|
+
}
|
|
219
|
+
_uniqueName(e, t, n) {
|
|
220
|
+
let r = e || `handle${t + 1}`;
|
|
221
|
+
if (!n.has(r)) return n.add(r), r;
|
|
222
|
+
let i = t + 1;
|
|
223
|
+
for (; n.has(`${r}${i}`);) i += 1;
|
|
224
|
+
let a = `${r}${i}`;
|
|
225
|
+
return n.add(a), a;
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
//#endregion
|
|
229
|
+
//#region src/components/slider/slider-control-templates.ts
|
|
230
|
+
function j({ model: e, index: t, total: n, grouped: r, label: i, appliedLabel: a, helpTextId: o, labelVisibility: l, formattedValue: u, activeIndex: d, draggingIndex: f, focusedIndex: g, invalid: _, readonly: v, disabled: y }) {
|
|
231
|
+
let b = n > 1 ? e.label : i || a || e.label;
|
|
232
|
+
return s`
|
|
233
|
+
<span
|
|
234
|
+
class=${m({
|
|
235
|
+
handle: !0,
|
|
236
|
+
"tooltip-open": f === t || g === t
|
|
237
|
+
})}
|
|
238
|
+
data-handle-index=${t}
|
|
239
|
+
style=${h({
|
|
240
|
+
"inset-inline-start": `${e.normalizedValue * 100}%`,
|
|
241
|
+
"--slider-handle-color": e.handle?.color || void 0,
|
|
242
|
+
"z-index": String(d === t ? 3 : t + 2)
|
|
243
|
+
})}
|
|
244
|
+
>
|
|
245
|
+
${l === "none" ? s`<span class="value-tooltip" aria-hidden="true"
|
|
246
|
+
>${u}</span
|
|
247
|
+
>` : c}
|
|
248
|
+
<input
|
|
249
|
+
data-handle-index=${t}
|
|
250
|
+
type="range"
|
|
251
|
+
min=${e.effectiveMin}
|
|
252
|
+
max=${e.effectiveMax}
|
|
253
|
+
step=${e.step}
|
|
254
|
+
.value=${String(e.value)}
|
|
255
|
+
aria-label=${p(b || void 0)}
|
|
256
|
+
aria-valuetext=${u}
|
|
257
|
+
aria-describedby=${p(r ? void 0 : o)}
|
|
258
|
+
aria-invalid=${p(_ || void 0)}
|
|
259
|
+
aria-readonly=${p(v || void 0)}
|
|
260
|
+
?disabled=${y}
|
|
261
|
+
/>
|
|
262
|
+
</span>
|
|
263
|
+
`;
|
|
264
|
+
}
|
|
265
|
+
function M({ model: e, label: t, formatOptions: n, size: r, disabled: i, invalid: a, readonly: o, hideStepper: c, quiet: l, indeterminate: u, onInput: d, onChange: f }) {
|
|
266
|
+
return s`
|
|
267
|
+
<luzmo-number-field
|
|
268
|
+
id="number-field"
|
|
269
|
+
label=${t}
|
|
270
|
+
.value=${e.value}
|
|
271
|
+
.min=${e.effectiveMin}
|
|
272
|
+
.max=${e.effectiveMax}
|
|
273
|
+
.step=${e.step}
|
|
274
|
+
.formatOptions=${e.handle?.formatOptions ?? n}
|
|
275
|
+
size=${r}
|
|
276
|
+
?disabled=${i}
|
|
277
|
+
?invalid=${a}
|
|
278
|
+
?readonly=${o}
|
|
279
|
+
?hide-stepper=${c}
|
|
280
|
+
?quiet=${l}
|
|
281
|
+
?indeterminate=${u}
|
|
282
|
+
@input=${d}
|
|
283
|
+
@change=${f}
|
|
284
|
+
></luzmo-number-field>
|
|
285
|
+
`;
|
|
286
|
+
}
|
|
287
|
+
//#endregion
|
|
288
|
+
//#region src/components/slider/slider-templates.ts
|
|
289
|
+
function N(e, t, n, r, i) {
|
|
290
|
+
return e.length === 0 ? c : s`
|
|
291
|
+
<div class="ticks" aria-hidden="true">
|
|
292
|
+
${_(e, (e) => e, (e) => {
|
|
293
|
+
let a = `${T(e, t, n) * 100}%`;
|
|
294
|
+
return s`
|
|
295
|
+
<span
|
|
296
|
+
class="tick"
|
|
297
|
+
style=${h({ "inset-inline-start": a })}
|
|
298
|
+
></span>
|
|
299
|
+
${i ? s`<span
|
|
300
|
+
class="tick-label"
|
|
301
|
+
style=${h({ "inset-inline-start": a })}
|
|
302
|
+
>${r.format(e)}</span
|
|
303
|
+
>` : c}
|
|
304
|
+
`;
|
|
305
|
+
})}
|
|
306
|
+
</div>
|
|
307
|
+
`;
|
|
308
|
+
}
|
|
309
|
+
function P(e, t) {
|
|
310
|
+
if (e.length === 0) return;
|
|
311
|
+
if (e.length > 1) {
|
|
312
|
+
let t = e.map(({ normalizedValue: e }) => e).sort((e, t) => e - t);
|
|
313
|
+
return [t[0], t.at(-1)];
|
|
314
|
+
}
|
|
315
|
+
let n = e[0];
|
|
316
|
+
return O(n.value, n.min, n.max, t, n.normalization);
|
|
317
|
+
}
|
|
318
|
+
function F(e, t) {
|
|
319
|
+
let n = P(e, t);
|
|
320
|
+
if (!n) return c;
|
|
321
|
+
let [r, i] = n;
|
|
322
|
+
return s`
|
|
323
|
+
<span
|
|
324
|
+
class="fill"
|
|
325
|
+
style=${h({
|
|
326
|
+
"--slider-fill-start": `${r * 100}%`,
|
|
327
|
+
"--slider-fill-end": `${i * 100}%`
|
|
328
|
+
})}
|
|
329
|
+
></span>
|
|
330
|
+
`;
|
|
331
|
+
}
|
|
332
|
+
function I(e, t, n) {
|
|
333
|
+
let [r, i] = P(e, t) ?? [0, 0];
|
|
334
|
+
return s`
|
|
335
|
+
<span class="ramp" aria-hidden="true">
|
|
336
|
+
<svg viewBox="0 0 240 16" preserveAspectRatio="none" focusable="false">
|
|
337
|
+
<path
|
|
338
|
+
class="ramp-track"
|
|
339
|
+
d="M240,4v8c0,2.3-1.9,4.1-4.2,4L1,9C0.4,9,0,8.5,0,8c0-0.5,0.4-1,1-1l234.8-7C238.1-0.1,240,1.7,240,4z"
|
|
340
|
+
></path>
|
|
341
|
+
</svg>
|
|
342
|
+
${n ? s`
|
|
343
|
+
<span
|
|
344
|
+
class="ramp-fill"
|
|
345
|
+
style=${h({
|
|
346
|
+
"--slider-ramp-fill-start": `${r * 100}%`,
|
|
347
|
+
"--slider-ramp-fill-end": `${(1 - i) * 100}%`
|
|
348
|
+
})}
|
|
349
|
+
></span>
|
|
350
|
+
` : c}
|
|
351
|
+
</span>
|
|
352
|
+
`;
|
|
353
|
+
}
|
|
354
|
+
//#endregion
|
|
355
|
+
//#region src/components/slider/slider.module.scss?inline
|
|
356
|
+
var L = ":host{min-inline-size:var(--luzmo-slider-min-inline-size,var(--slider-min-inline-size));min-block-size:var(--luzmo-slider-item-height,var(--slider-item-height));color:var(--slider-label-color);font-family:var(--luzmo-slider-font-family,var(--slider-font-family));flex-grow:1;display:block}:host([disabled]){cursor:not-allowed}.handle-slot{display:none}.control-row{align-items:center;gap:var(--slider-label-gap);inline-size:100%;display:flex}.track{min-inline-size:0;block-size:var(--luzmo-slider-item-height,var(--slider-item-height));cursor:pointer;touch-action:none;-webkit-user-select:none;user-select:none;flex:1;position:relative}.rail,.fill,.ramp{display:block;position:absolute;inset-block-start:calc(50% + var(--luzmo-slider-top-to-track,var(--slider-top-to-track)));transform:translateY(-50%)}.rail{block-size:var(--luzmo-slider-track-height,var(--slider-track-height));background:var(--highcontrast-slider-track-color,var(--slider-track-color));border-radius:var(--slider-track-radius);inset-inline:0}.fill{z-index:1;block-size:var(--luzmo-slider-track-height,var(--slider-track-height));background:var(--highcontrast-slider-fill-color,var(--luzmo-slider-fill-background,var(--slider-fill-background)));border-radius:var(--slider-track-radius);-webkit-mask-image:linear-gradient(to right, transparent 0, transparent var(--slider-fill-start), currentColor var(--slider-fill-start), currentColor var(--slider-fill-end), transparent var(--slider-fill-end), transparent 100%);mask-image:linear-gradient(to right, transparent 0, transparent var(--slider-fill-start), currentColor var(--slider-fill-start), currentColor var(--slider-fill-end), transparent var(--slider-fill-end), transparent 100%);inset-inline:0}.ramp{block-size:var(--slider-ramp-height);inset-inline:0}:host([ramp]) .rail{display:none}.ramp svg,.ramp-fill{block-size:100%;inline-size:100%;display:block;position:absolute;inset:0}.ramp-track{fill:var(--highcontrast-slider-track-color,var(--slider-track-color))}.ramp-fill{z-index:1;background:var(--highcontrast-slider-fill-color,var(--luzmo-slider-fill-background,var(--slider-fill-background)));clip-path:polygon(0 44%,100% 0,100% 100%,0 56%);-webkit-mask-image:linear-gradient(to right, transparent 0, transparent var(--slider-ramp-fill-start), currentColor var(--slider-ramp-fill-start), currentColor calc(100% - var(--slider-ramp-fill-end)), transparent calc(100% - var(--slider-ramp-fill-end)), transparent 100%);mask-image:linear-gradient(to right, transparent 0, transparent var(--slider-ramp-fill-start), currentColor var(--slider-ramp-fill-start), currentColor calc(100% - var(--slider-ramp-fill-end)), transparent calc(100% - var(--slider-ramp-fill-end)), transparent 100%)}:host(:dir(rtl)) .ramp svg{transform:scaleX(-1)}:host(:dir(rtl)) .fill{-webkit-mask-image:linear-gradient(to left, transparent 0, transparent var(--slider-fill-start), currentColor var(--slider-fill-start), currentColor var(--slider-fill-end), transparent var(--slider-fill-end), transparent 100%);mask-image:linear-gradient(to left, transparent 0, transparent var(--slider-fill-start), currentColor var(--slider-fill-start), currentColor var(--slider-fill-end), transparent var(--slider-fill-end), transparent 100%)}:host(:dir(rtl)) .ramp-fill{clip-path:polygon(0 0,100% 44%,100% 56%,0 100%);-webkit-mask-image:linear-gradient(to left, transparent 0, transparent var(--slider-ramp-fill-start), currentColor var(--slider-ramp-fill-start), currentColor calc(100% - var(--slider-ramp-fill-end)), transparent calc(100% - var(--slider-ramp-fill-end)), transparent 100%);mask-image:linear-gradient(to left, transparent 0, transparent var(--slider-ramp-fill-start), currentColor var(--slider-ramp-fill-start), currentColor calc(100% - var(--slider-ramp-fill-end)), transparent calc(100% - var(--slider-ramp-fill-end)), transparent 100%)}.handle{box-sizing:border-box;inline-size:var(--slider-hit-size);block-size:var(--slider-hit-size);cursor:grab;place-items:center;margin-inline-start:var(--luzmo-slider-edge-to-handle,var(--slider-edge-to-handle));display:grid;position:absolute;inset-block-start:calc(50% + var(--luzmo-slider-top-to-handle,var(--slider-top-to-handle)));transform:translate(-50%,-50%)}:host(:dir(rtl)) .handle{transform:translate(50%,-50%)}.handle:before{box-sizing:border-box;inline-size:var(--slider-handle-visual-size);block-size:var(--slider-handle-visual-size);background:var(--highcontrast-slider-handle-background,var(--slider-handle-color,var(--slider-handle-background)));border:var(--slider-handle-border-width) solid var(--highcontrast-slider-handle-border-color,var(--slider-handle-color,var(--slider-handle-border-color)));box-shadow:var(--slider-handle-shadow);content:\"\";transition:background-color var(--luzmo-animation-duration), border-color var(--luzmo-animation-duration);border-radius:50%}:host([ramp]) .handle:before,:host([variant=unfilled]) .handle:before{border-color:var(--highcontrast-slider-handle-border-color,var(--slider-handle-color,var(--slider-handle-border-color-unfilled)))}.handle:hover:before,:host([dragging]) .handle:before{background:var(--highcontrast-slider-handle-background,var(--slider-handle-color,var(--luzmo-slider-background-color-hover,var(--slider-handle-background-hover))))}:host([dragging]) .handle:before{border-color:var(--highcontrast-slider-focus-color,var(--slider-handle-color,var(--slider-handle-border-color-active)))}:host([dragging]) .handle{cursor:grabbing}.handle:has(input:focus-visible):before{border-color:var(--highcontrast-slider-focus-color,var(--slider-focus-color));outline:var(--slider-focus-width) solid var(--highcontrast-slider-focus-color,var(--slider-focus-color));outline-offset:var(--slider-focus-offset)}.handle input{block-size:100%;inline-size:100%;cursor:inherit;opacity:0;pointer-events:none;margin:0;position:absolute;inset:0}.ticks{z-index:1;pointer-events:none;position:absolute;inset:0}.tick{inline-size:var(--slider-tick-width);block-size:var(--slider-tick-height);background:var(--highcontrast-slider-tick-color,var(--slider-tick-color));position:absolute;inset-block-start:calc(50% + var(--luzmo-slider-top-to-track,var(--slider-top-to-track)) + var(--slider-tick-offset));transform:translate(-50%)}:host(:dir(rtl)) .tick{transform:translate(50%)}.tick-label{color:var(--slider-label-color);font-size:var(--slider-tick-label-font-size);white-space:nowrap;position:absolute;inset-block-start:calc(50% + var(--luzmo-slider-top-to-handle,var(--slider-top-to-handle)) + var(--slider-handle-visual-size) / 2 + var(--slider-tick-label-gap));transform:translate(-50%)}:host(:dir(rtl)) .tick-label{transform:translate(50%)}.value-label{min-inline-size:max-content;color:var(--slider-label-color);font-size:var(--slider-label-font-size);flex:none}.value-tooltip{z-index:1;box-sizing:border-box;padding:var(--slider-tooltip-padding);color:var(--highcontrast-slider-tooltip-color,var(--slider-tooltip-color));background:var(--highcontrast-slider-tooltip-background,var(--slider-tooltip-background));border:var(--slider-tooltip-border-width) solid var(--highcontrast-slider-tooltip-border-color,var(--slider-tooltip-border-color));border-radius:var(--slider-tooltip-border-radius);font-size:var(--luzmo-slider-tooltip-font-size,var(--slider-tooltip-font-size));white-space:nowrap;visibility:hidden;opacity:0;transition:opacity var(--luzmo-animation-duration), visibility 0s linear var(--luzmo-animation-duration);pointer-events:none;line-height:1;position:absolute;inset-block-end:calc(50% + var(--slider-handle-visual-size) / 2 + var(--slider-tooltip-gap));inset-inline-start:50%;transform:translate(-50%)}:host(:dir(rtl)) .value-tooltip{transform:translate(50%)}.handle:hover .value-tooltip,.handle.tooltip-open .value-tooltip{visibility:visible;opacity:1;transition-delay:0s}:host([disabled]) .value-tooltip{visibility:hidden;opacity:0}luzmo-number-field{inline-size:var(--slider-editable-width);flex:none}.visually-hidden{inline-size:calc(var(--luzmo-spacing-1) / 2);block-size:calc(var(--luzmo-spacing-1) / 2);clip-path:inset(50%);white-space:nowrap;position:absolute;overflow:hidden}:host([readonly]:not([disabled])) .track,:host([readonly]:not([disabled])) .handle{cursor:default}:host([disabled]) .track,:host([disabled]) .handle{cursor:not-allowed}:host([disabled]) .rail{background:var(--highcontrast-slider-track-color,var(--luzmo-slider-background-color-disabled,var(--slider-track-color-disabled)))}:host([disabled]) .ramp-track{fill:var(--highcontrast-slider-track-color,var(--luzmo-slider-background-color-disabled,var(--slider-track-color-disabled)))}:host([disabled]) .ramp-fill,:host([disabled]) .fill{background:var(--highcontrast-slider-fill-color,var(--slider-fill-color-disabled))}:host([disabled]) .handle:before,:host([disabled]) .handle:hover:before{background:var(--highcontrast-slider-handle-background,var(--luzmo-slider-background-color-disabled-hover,var(--slider-handle-background-disabled)));border-color:var(--highcontrast-slider-handle-border-color,var(--slider-handle-border-color-disabled));box-shadow:none}@media (forced-colors:active){.rail{--highcontrast-slider-track-color:ButtonFace;--highcontrast-slider-track-border-color:ButtonText;border:var(--slider-handle-border-width) solid var(--highcontrast-slider-track-border-color);forced-color-adjust:none}.ramp{--highcontrast-slider-track-color:ButtonText;--highcontrast-slider-fill-color:Highlight;forced-color-adjust:none}.fill{--highcontrast-slider-fill-color:Highlight;forced-color-adjust:none}.tick{--highcontrast-slider-tick-color:ButtonText;forced-color-adjust:none}.handle:before{--highcontrast-slider-handle-background:Canvas;--highcontrast-slider-handle-border-color:ButtonText;forced-color-adjust:none}:host([dragging]) .handle:before{--highcontrast-slider-focus-color:Highlight}.handle:has(input:focus-visible):before{--highcontrast-slider-focus-color:Highlight}.value-tooltip{--highcontrast-slider-tooltip-background:Canvas;--highcontrast-slider-tooltip-border-color:CanvasText;--highcontrast-slider-tooltip-color:CanvasText;forced-color-adjust:none}:host([disabled]) .rail,:host([disabled]) .ramp-track,:host([disabled]) .ramp-fill,:host([disabled]) .tick,:host([disabled]) .fill,:host([disabled]) .handle:before{--highcontrast-slider-disabled-color:GrayText;--highcontrast-slider-track-color:var(--highcontrast-slider-disabled-color);--highcontrast-slider-track-border-color:var(--highcontrast-slider-disabled-color);--highcontrast-slider-fill-color:var(--highcontrast-slider-disabled-color);--highcontrast-slider-tick-color:var(--highcontrast-slider-disabled-color);--highcontrast-slider-handle-background:Canvas;--highcontrast-slider-handle-border-color:var(--highcontrast-slider-disabled-color)}}@media (prefers-reduced-motion:reduce){.handle:before,.value-tooltip{transition:none}}:host{--slider-font-family:var(--luzmo-font-family);--slider-min-inline-size:calc(3 * var(--luzmo-component-height-l));--slider-item-height:var(--luzmo-component-height);--slider-track-height:var(--luzmo-spacing-2);--slider-handle-base-size:calc(var(--luzmo-component-height) + var(--luzmo-spacing-2));--slider-hit-size:var(--luzmo-component-height);--slider-top-to-track:0px;--slider-top-to-handle:0px;--slider-edge-to-handle:0px;--slider-handle-scale:.5;--slider-handle-visual-size:calc(var(--luzmo-slider-handle-size,var(--slider-handle-base-size)) * var(--luzmo-slider-handle-scale,var(--slider-handle-scale)));--slider-track-radius:var(--luzmo-border-radius-full);--slider-track-color:var(--luzmo-border-color);--slider-track-color-disabled:var(--luzmo-background-color-disabled);--slider-fill-color:var(--luzmo-primary);--slider-fill-background:var(--slider-fill-color);--slider-fill-color-disabled:var(--luzmo-disabled-color);--slider-handle-background:var(--luzmo-background-color);--slider-handle-background-hover:var(--luzmo-background-color-hover);--slider-handle-background-disabled:var(--luzmo-background-color);--slider-handle-border-color:var(--luzmo-border-color);--slider-handle-border-color-unfilled:var(--luzmo-primary);--slider-handle-border-color-active:var(--luzmo-primary);--slider-handle-border-color-disabled:var(--luzmo-border-color-disabled);--slider-handle-border-width:var(--luzmo-border-width);--slider-handle-shadow:0 var(--luzmo-spacing-1) var(--luzmo-spacing-2) var(--luzmo-shadow-color);--slider-focus-color:var(--luzmo-primary);--slider-focus-width:var(--luzmo-border-width);--slider-focus-offset:var(--luzmo-border-width);--slider-label-color:var(--luzmo-font-color);--slider-label-font-size:var(--luzmo-font-size-s);--slider-label-gap:var(--luzmo-spacing-3);--slider-ramp-height:var(--luzmo-spacing-4);--slider-tick-color:var(--luzmo-border-color-full);--slider-tick-width:var(--luzmo-border-width);--slider-tick-height:var(--luzmo-spacing-3);--slider-tick-offset:calc(-1 * var(--slider-tick-height) / 2);--slider-tick-label-gap:var(--luzmo-spacing-2);--slider-tick-label-font-size:var(--luzmo-font-size-xs);--slider-tooltip-padding:var(--luzmo-spacing-2);--slider-tooltip-border-radius:calc(var(--luzmo-spacing-2) - var(--luzmo-border-width));--slider-tooltip-background:var(--luzmo-background-color);--slider-tooltip-border-color:var(--luzmo-border-color);--slider-tooltip-border-width:var(--luzmo-border-width);--slider-tooltip-color:var(--luzmo-font-color);--slider-tooltip-font-size:var(--slider-label-font-size);--slider-tooltip-gap:var(--luzmo-spacing-2);--slider-editable-width:calc(3 * var(--luzmo-component-height))}:host([ramp]){--slider-tick-height:calc(var(--slider-ramp-height) + 2 * var(--luzmo-spacing-1))}:host([size=s]){--slider-item-height:var(--luzmo-component-height-s);--slider-track-height:calc(var(--luzmo-spacing-2) - var(--luzmo-border-width));--slider-handle-base-size:var(--luzmo-component-height-s);--slider-hit-size:var(--luzmo-component-height-s);--slider-label-font-size:var(--luzmo-font-size-xs);--slider-ramp-height:var(--luzmo-spacing-3)}:host([size=l]){--slider-item-height:var(--luzmo-component-height-l);--slider-track-height:calc(var(--luzmo-spacing-3) - var(--luzmo-spacing-1));--slider-handle-base-size:var(--luzmo-component-height-l);--slider-hit-size:var(--luzmo-component-height-l);--slider-label-font-size:var(--luzmo-font-size-m);--slider-ramp-height:var(--luzmo-spacing-5)}:host([size=xl]){--slider-item-height:var(--luzmo-component-height-xl);--slider-track-height:calc(var(--luzmo-spacing-3) - var(--luzmo-border-width));--slider-handle-base-size:calc(var(--luzmo-component-height-l) + var(--luzmo-spacing-2));--slider-hit-size:var(--luzmo-component-height-xl);--slider-label-font-size:var(--luzmo-font-size-m);--slider-ramp-height:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-2))}", R = { handleName: "{label} {position}" }, z = 16, B = /* @__PURE__ */ new Set(["filled", "unfilled"]), V = /* @__PURE__ */ new Set(["none", "value"]), H = {
|
|
357
|
+
fromAttribute(e) {
|
|
358
|
+
if (e === null) return;
|
|
359
|
+
if (e === "" || e === "true") return !0;
|
|
360
|
+
let t = Number(e);
|
|
361
|
+
return Number.isFinite(t) ? t : void 0;
|
|
362
|
+
},
|
|
363
|
+
toAttribute(e) {
|
|
364
|
+
return e === void 0 ? null : e === !0 ? "" : String(e);
|
|
365
|
+
}
|
|
366
|
+
}, U = class extends o(n(r), {
|
|
367
|
+
mode: "internal",
|
|
368
|
+
live: "polite"
|
|
369
|
+
}) {
|
|
370
|
+
constructor(...e) {
|
|
371
|
+
super(...e), this.label = "", this.labels = {}, this._appliedLabel = "", this.applyFocusElementLabel = (e) => {
|
|
372
|
+
this._appliedLabel = e;
|
|
373
|
+
}, this.ramp = !1, this.ticks = !1, this.tickLabels = !1, this.editable = !1, this.hideStepper = !1, this.quiet = !1, this.indeterminate = !1, this.invalid = !1, this.readonly = !1, this.formatOptions = {}, this._languageResolver = new a(this), this._handleController = new A(this, (e) => this._applySingleValue(e), (e) => this._formatHandleValue(e), (e, t) => this._formatHandleLabel(e, t)), this._rawValue = NaN, this._rawMin = 0, this._rawMax = 100, this._rawStep = 1, this._rawTickStep = 0, this._rawVariant = "filled", this._rawLabelVisibility = "none", this._focusedIndex = -1, this._formatterCache = /* @__PURE__ */ new Map(), this._pendingCommits = /* @__PURE__ */ new Set(), this._defaultAriaHandleText = (e, t) => t.format(e), this._defaultAriaValueText = (e) => this._formatValueList([...e.values()]);
|
|
374
|
+
}
|
|
375
|
+
static get styles() {
|
|
376
|
+
let e = super.styles;
|
|
377
|
+
return [...Array.isArray(e) ? e : e ? [e] : [], l(L)];
|
|
378
|
+
}
|
|
379
|
+
set value(e) {
|
|
380
|
+
let t = Number.isFinite(e) ? e : NaN;
|
|
381
|
+
if (Object.is(t, this._rawValue)) return;
|
|
382
|
+
let n = this.value;
|
|
383
|
+
this._rawValue = t, this.requestUpdate("value", n);
|
|
384
|
+
}
|
|
385
|
+
get value() {
|
|
386
|
+
return Number.isFinite(this._rawValue) ? this._rawValue : this.min + (this.max - this.min) / 2;
|
|
387
|
+
}
|
|
388
|
+
set min(e) {
|
|
389
|
+
let t = Number.isFinite(e) ? e : 0;
|
|
390
|
+
if (t === this._rawMin) return;
|
|
391
|
+
let n = this._rawMin;
|
|
392
|
+
this._rawMin = t, this.requestUpdate("min", n);
|
|
393
|
+
}
|
|
394
|
+
get min() {
|
|
395
|
+
return this._rawMin;
|
|
396
|
+
}
|
|
397
|
+
set max(e) {
|
|
398
|
+
let t = Number.isFinite(e) ? e : NaN;
|
|
399
|
+
if (Object.is(t, this._rawMax)) return;
|
|
400
|
+
let n = this.max;
|
|
401
|
+
this._rawMax = t, this.requestUpdate("max", n);
|
|
402
|
+
}
|
|
403
|
+
get max() {
|
|
404
|
+
return this._rawMax > this._rawMin ? this._rawMax : this._rawMin + 100;
|
|
405
|
+
}
|
|
406
|
+
set step(e) {
|
|
407
|
+
let t = Number.isFinite(e) && e > 0 ? e : 1;
|
|
408
|
+
if (t === this._rawStep) return;
|
|
409
|
+
let n = this._rawStep;
|
|
410
|
+
this._rawStep = t, this.requestUpdate("step", n);
|
|
411
|
+
}
|
|
412
|
+
get step() {
|
|
413
|
+
return this._rawStep;
|
|
414
|
+
}
|
|
415
|
+
set variant(e) {
|
|
416
|
+
let t = B.has(e) ? e : "filled";
|
|
417
|
+
if (t === this._rawVariant) return;
|
|
418
|
+
let n = this._rawVariant;
|
|
419
|
+
this._rawVariant = t, this.requestUpdate("variant", n);
|
|
420
|
+
}
|
|
421
|
+
get variant() {
|
|
422
|
+
return this._rawVariant;
|
|
423
|
+
}
|
|
424
|
+
set labelVisibility(e) {
|
|
425
|
+
let t = V.has(e) ? e : "none";
|
|
426
|
+
if (t === this._rawLabelVisibility) return;
|
|
427
|
+
let n = this._rawLabelVisibility;
|
|
428
|
+
this._rawLabelVisibility = t, this.requestUpdate("labelVisibility", n);
|
|
429
|
+
}
|
|
430
|
+
get labelVisibility() {
|
|
431
|
+
return this._rawLabelVisibility;
|
|
432
|
+
}
|
|
433
|
+
set tickStep(e) {
|
|
434
|
+
let t = Number.isFinite(e) && e > 0 ? e : 0;
|
|
435
|
+
if (t === this._rawTickStep) return;
|
|
436
|
+
let n = this._rawTickStep;
|
|
437
|
+
this._rawTickStep = t, this.requestUpdate("tickStep", n);
|
|
438
|
+
}
|
|
439
|
+
get tickStep() {
|
|
440
|
+
return this._rawTickStep;
|
|
441
|
+
}
|
|
442
|
+
set normalization(e) {
|
|
443
|
+
let t = this.normalization;
|
|
444
|
+
this._normalization = e, this.requestUpdate("normalization", t);
|
|
445
|
+
}
|
|
446
|
+
get normalization() {
|
|
447
|
+
return this._normalization ?? v;
|
|
448
|
+
}
|
|
449
|
+
set getAriaHandleText(e) {
|
|
450
|
+
let t = this.getAriaHandleText;
|
|
451
|
+
this._getAriaHandleText = e, this.requestUpdate("getAriaHandleText", t);
|
|
452
|
+
}
|
|
453
|
+
get getAriaHandleText() {
|
|
454
|
+
return this._getAriaHandleText ?? this._defaultAriaHandleText;
|
|
455
|
+
}
|
|
456
|
+
set getAriaValueText(e) {
|
|
457
|
+
let t = this.getAriaValueText;
|
|
458
|
+
this._getAriaValueText = e, this.requestUpdate("getAriaValueText", t);
|
|
459
|
+
}
|
|
460
|
+
get getAriaValueText() {
|
|
461
|
+
return this._getAriaValueText ?? this._defaultAriaValueText;
|
|
462
|
+
}
|
|
463
|
+
get values() {
|
|
464
|
+
return this._handleController.values;
|
|
465
|
+
}
|
|
466
|
+
get focusElement() {
|
|
467
|
+
return this.rangeInputs?.[Math.min(Math.max(this._handleController.activeIndex, 0), this.rangeInputs.length - 1)] ?? this;
|
|
468
|
+
}
|
|
469
|
+
_applySingleValue(e) {
|
|
470
|
+
this.value = e;
|
|
471
|
+
}
|
|
472
|
+
_normalizeRawValue() {
|
|
473
|
+
if (!Number.isFinite(this._rawValue)) return;
|
|
474
|
+
let e = this._rawValue, t = w(this._rawValue, this.min, this.max, this.step);
|
|
475
|
+
Object.is(t, this._rawValue) || (this._rawValue = t, this.requestUpdate("value", e));
|
|
476
|
+
}
|
|
477
|
+
_formatHandleValue(e) {
|
|
478
|
+
let t = e.handle?.formatOptions ?? this.formatOptions;
|
|
479
|
+
return (e.handle?.getAriaHandleText ?? this.getAriaHandleText)(e.value, this._numberFormatter(this._withDefaultPrecision(t, e.step, e.min, e.max)));
|
|
480
|
+
}
|
|
481
|
+
_formatHandleLabel(e, t) {
|
|
482
|
+
if (e.label) return e.label;
|
|
483
|
+
if (e.name) return e.name;
|
|
484
|
+
let n = this.label || this._appliedLabel, r = this._numberFormatter({ useGrouping: !1 }).format(t + 1);
|
|
485
|
+
return n ? y(this.labels.handleName ?? R.handleName, {
|
|
486
|
+
label: n,
|
|
487
|
+
position: r
|
|
488
|
+
}) : r;
|
|
489
|
+
}
|
|
490
|
+
disconnectedCallback() {
|
|
491
|
+
this._endDrag(), this._focusedIndex = -1, this._pendingCommits.clear(), super.disconnectedCallback();
|
|
492
|
+
}
|
|
493
|
+
_numberFormatter(e = this.formatOptions) {
|
|
494
|
+
let t = this._languageResolver.language;
|
|
495
|
+
this._formatterCacheLanguage !== t && (this._formatterCache.clear(), this._formatterCacheLanguage = t);
|
|
496
|
+
let n = JSON.stringify(e ?? {}), r = this._formatterCache.get(n);
|
|
497
|
+
if (r) return r;
|
|
498
|
+
let i = this._createNumberFormatter(t, e ?? {});
|
|
499
|
+
return this._formatterCache.size >= z && this._formatterCache.clear(), this._formatterCache.set(n, i), i;
|
|
500
|
+
}
|
|
501
|
+
_withDefaultPrecision(e, ...t) {
|
|
502
|
+
return e.style !== void 0 || e.minimumFractionDigits !== void 0 || e.maximumFractionDigits !== void 0 || e.minimumSignificantDigits !== void 0 || e.maximumSignificantDigits !== void 0 ? e : {
|
|
503
|
+
...e,
|
|
504
|
+
maximumFractionDigits: Math.min(20, Math.max(...t.map((e) => b(e))))
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
_createNumberFormatter(e, t) {
|
|
508
|
+
try {
|
|
509
|
+
let n = new g(e, t);
|
|
510
|
+
return n.format(1), n;
|
|
511
|
+
} catch {
|
|
512
|
+
let { style: n, unit: r, ...i } = t;
|
|
513
|
+
return new g(e, i);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
_clearNumberFormatterCache() {
|
|
517
|
+
this._formatterCache.clear(), this._formatterCacheLanguage = void 0;
|
|
518
|
+
}
|
|
519
|
+
_formatValueList(e) {
|
|
520
|
+
if (e.length < 2) return e[0] ?? "";
|
|
521
|
+
try {
|
|
522
|
+
return new Intl.ListFormat(this._languageResolver.language, {
|
|
523
|
+
style: "short",
|
|
524
|
+
type: "unit"
|
|
525
|
+
}).format(e);
|
|
526
|
+
} catch {
|
|
527
|
+
return e.join(", ");
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
get _formattedValues() {
|
|
531
|
+
return new Map(this._handleController.models.map((e, t) => [e.name, this._handleController.formatValue(t)]));
|
|
532
|
+
}
|
|
533
|
+
get _combinedValueText() {
|
|
534
|
+
return this.getAriaValueText(this._formattedValues);
|
|
535
|
+
}
|
|
536
|
+
handleSlotChange() {
|
|
537
|
+
this._handleController.draggingIndex >= 0 && this._endDrag(), this._handleController.activeIndex = 0, this._focusedIndex = -1, this._handleController.invalidate(), this.requestUpdate();
|
|
538
|
+
}
|
|
539
|
+
_normalizedPointerValue(e) {
|
|
540
|
+
let t = e.currentTarget.getBoundingClientRect(), n = t.width ? (e.clientX - t.left) / t.width : 0, r = this.isLTR ? n : 1 - n;
|
|
541
|
+
return Math.min(1, Math.max(0, r));
|
|
542
|
+
}
|
|
543
|
+
_capturePointer(e, t) {
|
|
544
|
+
try {
|
|
545
|
+
e.setPointerCapture(t), this._capturedPointer = {
|
|
546
|
+
target: e,
|
|
547
|
+
pointerId: t
|
|
548
|
+
};
|
|
549
|
+
} catch {
|
|
550
|
+
this._capturedPointer = void 0;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
_releaseCapturedPointer() {
|
|
554
|
+
let e = this._capturedPointer;
|
|
555
|
+
this._capturedPointer = void 0, e && e.target.hasPointerCapture(e.pointerId) && e.target.releasePointerCapture(e.pointerId);
|
|
556
|
+
}
|
|
557
|
+
_endDrag() {
|
|
558
|
+
let e = this._handleController.draggingIndex;
|
|
559
|
+
return this._releaseCapturedPointer(), this._handleController.draggingIndex = -1, this._dragStartValue = void 0, this.toggleAttribute("dragging", !1), e;
|
|
560
|
+
}
|
|
561
|
+
handlePointerDown(e) {
|
|
562
|
+
if (this.disabled || this.readonly || e.button !== 0) return;
|
|
563
|
+
let t = e.currentTarget, n = e.target.closest("[data-handle-index]"), r = this._normalizedPointerValue(e), i = n ? Number(n.dataset.handleIndex) : this._handleController.nearestIndex(r);
|
|
564
|
+
this._handleController.activeIndex = i, this._handleController.draggingIndex = i, this._dragStartValue = this._handleController.models[i]?.value, this.toggleAttribute("dragging", !0), this._capturePointer(t, e.pointerId), this.indeterminate = !1, this._handleController.setNormalizedValue(i, r) && this._handleController.dispatchInput(i), this.requestUpdate();
|
|
565
|
+
}
|
|
566
|
+
handlePointerMove(e) {
|
|
567
|
+
let t = this._handleController.draggingIndex;
|
|
568
|
+
t < 0 || this.disabled || this.readonly || this._handleController.setNormalizedValue(t, this._normalizedPointerValue(e)) && (this._handleController.dispatchInput(t), this.requestUpdate());
|
|
569
|
+
}
|
|
570
|
+
handlePointerUp() {
|
|
571
|
+
if (this._handleController.draggingIndex < 0) return;
|
|
572
|
+
let e = this._dragStartValue, t = this._endDrag();
|
|
573
|
+
!this.disabled && !this.readonly && (this._handleController.models[t]?.value !== e && this._handleController.dispatchChange(t), this.rangeInputs[t]?.focus({ preventScroll: !0 })), this.requestUpdate();
|
|
574
|
+
}
|
|
575
|
+
handleLostPointerCapture() {
|
|
576
|
+
this.handlePointerCancel();
|
|
577
|
+
}
|
|
578
|
+
handlePointerCancel() {
|
|
579
|
+
if (this._handleController.draggingIndex < 0) return;
|
|
580
|
+
let e = this._dragStartValue, t = this._endDrag();
|
|
581
|
+
e !== void 0 && this._handleController.setValue(t, e) && this._handleController.dispatchInput(t), this.requestUpdate();
|
|
582
|
+
}
|
|
583
|
+
_applyInputValue(e, t) {
|
|
584
|
+
Number.isFinite(t) && (this.indeterminate = !1, this._handleController.setValue(e, t) && (this._pendingCommits.add(e), this._handleController.dispatchInput(e)));
|
|
585
|
+
}
|
|
586
|
+
_commitValue(e, t) {
|
|
587
|
+
let n = Number.isFinite(t) && this._handleController.setValue(e, t), r = this._pendingCommits.delete(e);
|
|
588
|
+
(n || r) && (this.indeterminate = !1, this._handleController.dispatchChange(e));
|
|
589
|
+
}
|
|
590
|
+
handleNativeInput(e, t) {
|
|
591
|
+
e.stopPropagation();
|
|
592
|
+
let n = e.target;
|
|
593
|
+
if (this.readonly) {
|
|
594
|
+
n.value = String(this._handleController.models[t]?.value);
|
|
595
|
+
return;
|
|
596
|
+
}
|
|
597
|
+
this._applyInputValue(t, n.valueAsNumber);
|
|
598
|
+
}
|
|
599
|
+
handleNativeChange(e, t) {
|
|
600
|
+
e.stopPropagation();
|
|
601
|
+
let n = e.target;
|
|
602
|
+
if (this.readonly) {
|
|
603
|
+
n.value = String(this._handleController.models[t]?.value);
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
606
|
+
this._commitValue(t, n.valueAsNumber);
|
|
607
|
+
}
|
|
608
|
+
handleKeyDown(e, t) {
|
|
609
|
+
let n = this._handleController.models[t];
|
|
610
|
+
if (!n || this.disabled) return;
|
|
611
|
+
if (this.readonly) {
|
|
612
|
+
[
|
|
613
|
+
"ArrowUp",
|
|
614
|
+
"ArrowDown",
|
|
615
|
+
"ArrowRight",
|
|
616
|
+
"ArrowLeft",
|
|
617
|
+
"Home",
|
|
618
|
+
"End",
|
|
619
|
+
"PageUp",
|
|
620
|
+
"PageDown"
|
|
621
|
+
].includes(e.key) && e.preventDefault();
|
|
622
|
+
return;
|
|
623
|
+
}
|
|
624
|
+
if (e.key === "Escape") {
|
|
625
|
+
this._handleController.reset(t) && (e.preventDefault(), e.stopPropagation(), this.requestUpdate());
|
|
626
|
+
return;
|
|
627
|
+
}
|
|
628
|
+
let r = (e) => n.value + n.step * e, i = this.isLTR ? 1 : -1, a;
|
|
629
|
+
switch (e.key) {
|
|
630
|
+
case "ArrowUp":
|
|
631
|
+
a = r(1);
|
|
632
|
+
break;
|
|
633
|
+
case "ArrowDown":
|
|
634
|
+
a = r(-1);
|
|
635
|
+
break;
|
|
636
|
+
case "ArrowRight":
|
|
637
|
+
a = r(i);
|
|
638
|
+
break;
|
|
639
|
+
case "ArrowLeft":
|
|
640
|
+
a = r(-i);
|
|
641
|
+
break;
|
|
642
|
+
case "Home":
|
|
643
|
+
a = n.effectiveMin;
|
|
644
|
+
break;
|
|
645
|
+
case "End":
|
|
646
|
+
a = n.effectiveMax;
|
|
647
|
+
break;
|
|
648
|
+
case "PageUp":
|
|
649
|
+
a = r(5);
|
|
650
|
+
break;
|
|
651
|
+
case "PageDown":
|
|
652
|
+
a = r(-5);
|
|
653
|
+
break;
|
|
654
|
+
default: return;
|
|
655
|
+
}
|
|
656
|
+
e.preventDefault(), e.stopPropagation(), this.indeterminate = !1, this._handleController.setValue(t, a) && (this._handleController.dispatchInput(t), this._handleController.dispatchChange(t), this.requestUpdate());
|
|
657
|
+
}
|
|
658
|
+
handleTrackInput(e) {
|
|
659
|
+
let t = e.target;
|
|
660
|
+
this.handleNativeInput(e, Number(t.dataset.handleIndex));
|
|
661
|
+
}
|
|
662
|
+
handleTrackChange(e) {
|
|
663
|
+
let t = e.target;
|
|
664
|
+
this.handleNativeChange(e, Number(t.dataset.handleIndex));
|
|
665
|
+
}
|
|
666
|
+
handleTrackKeyDown(e) {
|
|
667
|
+
let t = e.target;
|
|
668
|
+
this.handleKeyDown(e, Number(t.dataset.handleIndex));
|
|
669
|
+
}
|
|
670
|
+
handleTrackFocusIn(e) {
|
|
671
|
+
let t = e.target, n = Number(t.dataset.handleIndex);
|
|
672
|
+
this._handleController.activeIndex = n, this._focusedIndex = n;
|
|
673
|
+
}
|
|
674
|
+
handleTrackFocusOut(e) {
|
|
675
|
+
let t = e.target;
|
|
676
|
+
this._focusedIndex === Number(t.dataset.handleIndex) && (this._focusedIndex = -1);
|
|
677
|
+
}
|
|
678
|
+
handleTrackDoubleClick(e) {
|
|
679
|
+
let t = e.target.closest("[data-handle-index]");
|
|
680
|
+
!t || this.disabled || this.readonly || (e.preventDefault(), this._handleController.reset(Number(t.dataset.handleIndex)));
|
|
681
|
+
}
|
|
682
|
+
handleNumberInput(e) {
|
|
683
|
+
if (e.stopPropagation(), this.readonly) return;
|
|
684
|
+
let t = e.currentTarget;
|
|
685
|
+
this._applyInputValue(0, t.value);
|
|
686
|
+
}
|
|
687
|
+
handleNumberChange(e) {
|
|
688
|
+
if (e.stopPropagation(), this.readonly) return;
|
|
689
|
+
let t = e.currentTarget;
|
|
690
|
+
this._commitValue(0, t.value);
|
|
691
|
+
}
|
|
692
|
+
get _hasFill() {
|
|
693
|
+
return this.variant !== "unfilled";
|
|
694
|
+
}
|
|
695
|
+
_renderTicks() {
|
|
696
|
+
if (!this.ticks) return c;
|
|
697
|
+
let e = this.tickStep || this.step, t = D(this.min, this.max, e), n = this._numberFormatter(this._withDefaultPrecision(this.formatOptions, e, this.min, this.max));
|
|
698
|
+
return N(t, this.min, this.max, n, this.tickLabels);
|
|
699
|
+
}
|
|
700
|
+
_renderFill(e) {
|
|
701
|
+
return !this._hasFill || this.ramp ? c : F(e, this.fillStart);
|
|
702
|
+
}
|
|
703
|
+
render() {
|
|
704
|
+
let e = this._handleController.models, t = this.labelVisibility === "value", n = this.editable && e.length === 1 ? e[0] : void 0, r = e.length > 1 || n !== void 0, i = _(e, ({ name: e }) => e, (t, n) => j({
|
|
705
|
+
model: t,
|
|
706
|
+
index: n,
|
|
707
|
+
total: e.length,
|
|
708
|
+
grouped: r,
|
|
709
|
+
label: this.label,
|
|
710
|
+
appliedLabel: this._appliedLabel,
|
|
711
|
+
helpTextId: this.helpTextId,
|
|
712
|
+
labelVisibility: this.labelVisibility,
|
|
713
|
+
formattedValue: this._handleController.formatValue(n),
|
|
714
|
+
activeIndex: this._handleController.activeIndex,
|
|
715
|
+
draggingIndex: this._handleController.draggingIndex,
|
|
716
|
+
focusedIndex: this._focusedIndex,
|
|
717
|
+
invalid: this.invalid,
|
|
718
|
+
readonly: this.readonly,
|
|
719
|
+
disabled: this.disabled
|
|
720
|
+
}));
|
|
721
|
+
return s`
|
|
722
|
+
<slot
|
|
723
|
+
name="handle"
|
|
724
|
+
class="handle-slot"
|
|
725
|
+
@slotchange=${this.handleSlotChange}
|
|
726
|
+
></slot>
|
|
727
|
+
${r ? s`<span id="slider-label" class="visually-hidden"
|
|
728
|
+
>${this.label || this._appliedLabel}</span
|
|
729
|
+
>` : c}
|
|
730
|
+
<div
|
|
731
|
+
class="control-row"
|
|
732
|
+
role=${p(r ? "group" : void 0)}
|
|
733
|
+
aria-labelledby=${p(r ? "slider-label" : void 0)}
|
|
734
|
+
aria-describedby=${p(r ? this.helpTextId : void 0)}
|
|
735
|
+
>
|
|
736
|
+
<div
|
|
737
|
+
id="track"
|
|
738
|
+
class="track"
|
|
739
|
+
@pointerdown=${this.handlePointerDown}
|
|
740
|
+
@pointermove=${this.handlePointerMove}
|
|
741
|
+
@pointerup=${this.handlePointerUp}
|
|
742
|
+
@pointercancel=${this.handlePointerCancel}
|
|
743
|
+
@lostpointercapture=${this.handleLostPointerCapture}
|
|
744
|
+
@input=${this.handleTrackInput}
|
|
745
|
+
@change=${this.handleTrackChange}
|
|
746
|
+
@keydown=${this.handleTrackKeyDown}
|
|
747
|
+
@focusin=${this.handleTrackFocusIn}
|
|
748
|
+
@focusout=${this.handleTrackFocusOut}
|
|
749
|
+
@dblclick=${this.handleTrackDoubleClick}
|
|
750
|
+
>
|
|
751
|
+
<span class="rail"></span>
|
|
752
|
+
${this.ramp ? I(e, this.fillStart, this._hasFill) : c}
|
|
753
|
+
${this._renderFill(e)} ${this._renderTicks()} ${i}
|
|
754
|
+
</div>
|
|
755
|
+
${t ? s`<output class="value-label"
|
|
756
|
+
>${this._combinedValueText}</output
|
|
757
|
+
>` : c}
|
|
758
|
+
${n ? M({
|
|
759
|
+
model: n,
|
|
760
|
+
label: this.label || this._appliedLabel,
|
|
761
|
+
formatOptions: this.formatOptions,
|
|
762
|
+
size: this.size,
|
|
763
|
+
disabled: this.disabled,
|
|
764
|
+
invalid: this.invalid,
|
|
765
|
+
readonly: this.readonly,
|
|
766
|
+
hideStepper: this.hideStepper,
|
|
767
|
+
quiet: this.quiet,
|
|
768
|
+
indeterminate: this.indeterminate,
|
|
769
|
+
onInput: this.handleNumberInput,
|
|
770
|
+
onChange: this.handleNumberChange
|
|
771
|
+
}) : c}
|
|
772
|
+
</div>
|
|
773
|
+
${this.renderHelpText(this.invalid)}
|
|
774
|
+
`;
|
|
775
|
+
}
|
|
776
|
+
willUpdate(e) {
|
|
777
|
+
super.willUpdate(e), (e.has("value") || e.has("min") || e.has("max") || e.has("step")) && this._normalizeRawValue(), (e.has(i) || e.has("formatOptions")) && this._clearNumberFormatterCache();
|
|
778
|
+
}
|
|
779
|
+
updated(e) {
|
|
780
|
+
super.updated(e), (e.has("disabled") && this.disabled || e.has("readonly") && this.readonly) && (this._endDrag(), this._pendingCommits.clear());
|
|
781
|
+
}
|
|
782
|
+
};
|
|
783
|
+
t([u({ type: String })], U.prototype, "label", void 0), t([u({ attribute: !1 })], U.prototype, "labels", void 0), t([f()], U.prototype, "_appliedLabel", void 0), t([u({
|
|
784
|
+
type: Number,
|
|
785
|
+
reflect: !0
|
|
786
|
+
})], U.prototype, "value", null), t([u({
|
|
787
|
+
type: Number,
|
|
788
|
+
reflect: !0
|
|
789
|
+
})], U.prototype, "min", null), t([u({
|
|
790
|
+
type: Number,
|
|
791
|
+
reflect: !0
|
|
792
|
+
})], U.prototype, "max", null), t([u({
|
|
793
|
+
type: Number,
|
|
794
|
+
reflect: !0
|
|
795
|
+
})], U.prototype, "step", null), t([u({
|
|
796
|
+
type: Number,
|
|
797
|
+
reflect: !0,
|
|
798
|
+
attribute: "default-value"
|
|
799
|
+
})], U.prototype, "defaultValue", void 0), t([u({
|
|
800
|
+
type: String,
|
|
801
|
+
reflect: !0
|
|
802
|
+
})], U.prototype, "variant", null), t([u({
|
|
803
|
+
type: Boolean,
|
|
804
|
+
reflect: !0
|
|
805
|
+
})], U.prototype, "ramp", void 0), t([u({
|
|
806
|
+
type: Boolean,
|
|
807
|
+
reflect: !0
|
|
808
|
+
})], U.prototype, "ticks", void 0), t([u({
|
|
809
|
+
type: String,
|
|
810
|
+
reflect: !0,
|
|
811
|
+
attribute: "label-visibility"
|
|
812
|
+
})], U.prototype, "labelVisibility", null), t([u({
|
|
813
|
+
reflect: !0,
|
|
814
|
+
attribute: "fill-start",
|
|
815
|
+
converter: H
|
|
816
|
+
})], U.prototype, "fillStart", void 0), t([u({
|
|
817
|
+
type: Number,
|
|
818
|
+
reflect: !0,
|
|
819
|
+
attribute: "tick-step"
|
|
820
|
+
})], U.prototype, "tickStep", null), t([u({
|
|
821
|
+
type: Boolean,
|
|
822
|
+
reflect: !0,
|
|
823
|
+
attribute: "tick-labels"
|
|
824
|
+
})], U.prototype, "tickLabels", void 0), t([u({
|
|
825
|
+
type: Boolean,
|
|
826
|
+
reflect: !0
|
|
827
|
+
})], U.prototype, "editable", void 0), t([u({
|
|
828
|
+
type: Boolean,
|
|
829
|
+
reflect: !0,
|
|
830
|
+
attribute: "hide-stepper"
|
|
831
|
+
})], U.prototype, "hideStepper", void 0), t([u({
|
|
832
|
+
type: Boolean,
|
|
833
|
+
reflect: !0
|
|
834
|
+
})], U.prototype, "quiet", void 0), t([u({
|
|
835
|
+
type: Boolean,
|
|
836
|
+
reflect: !0
|
|
837
|
+
})], U.prototype, "indeterminate", void 0), t([u({
|
|
838
|
+
type: Boolean,
|
|
839
|
+
reflect: !0
|
|
840
|
+
})], U.prototype, "invalid", void 0), t([u({
|
|
841
|
+
type: Boolean,
|
|
842
|
+
reflect: !0
|
|
843
|
+
})], U.prototype, "readonly", void 0), t([u({ attribute: !1 })], U.prototype, "formatOptions", void 0), t([u({ attribute: !1 })], U.prototype, "normalization", null), t([u({ attribute: !1 })], U.prototype, "getAriaHandleText", null), t([u({ attribute: !1 })], U.prototype, "getAriaValueText", null), t([d("input[type=\"range\"]")], U.prototype, "rangeInputs", void 0), t([f()], U.prototype, "_focusedIndex", void 0);
|
|
844
|
+
//#endregion
|
|
845
|
+
//#region src/components/slider/slider-handle.ts
|
|
846
|
+
var W = {
|
|
847
|
+
fromAttribute(e) {
|
|
848
|
+
if (e === null) return;
|
|
849
|
+
if (e === "previous") return e;
|
|
850
|
+
let t = Number(e);
|
|
851
|
+
return Number.isFinite(t) ? t : void 0;
|
|
852
|
+
},
|
|
853
|
+
toAttribute(e) {
|
|
854
|
+
return e === void 0 ? null : String(e);
|
|
855
|
+
}
|
|
856
|
+
}, G = {
|
|
857
|
+
fromAttribute(e) {
|
|
858
|
+
if (e === null) return;
|
|
859
|
+
if (e === "next") return e;
|
|
860
|
+
let t = Number(e);
|
|
861
|
+
return Number.isFinite(t) ? t : void 0;
|
|
862
|
+
},
|
|
863
|
+
toAttribute(e) {
|
|
864
|
+
return e === void 0 ? null : String(e);
|
|
865
|
+
}
|
|
866
|
+
}, K = class extends e {
|
|
867
|
+
constructor(...e) {
|
|
868
|
+
super(...e), this.name = "", this.label = "", this.value = NaN, this.color = "";
|
|
869
|
+
}
|
|
870
|
+
set normalization(e) {
|
|
871
|
+
let t = this.normalization;
|
|
872
|
+
this._normalization = e, this.requestUpdate("normalization", t);
|
|
873
|
+
}
|
|
874
|
+
get normalization() {
|
|
875
|
+
return this._normalization ?? v;
|
|
876
|
+
}
|
|
877
|
+
#e;
|
|
878
|
+
attachController(e) {
|
|
879
|
+
this.#e = e;
|
|
880
|
+
}
|
|
881
|
+
detachController(e) {
|
|
882
|
+
this.#e === e && (this.#e = void 0);
|
|
883
|
+
}
|
|
884
|
+
get hasController() {
|
|
885
|
+
return this.#e !== void 0;
|
|
886
|
+
}
|
|
887
|
+
focus(e) {
|
|
888
|
+
this.#e?.inputForHandle(this)?.focus(e);
|
|
889
|
+
}
|
|
890
|
+
render() {
|
|
891
|
+
return c;
|
|
892
|
+
}
|
|
893
|
+
updated(e) {
|
|
894
|
+
super.updated(e), (e.has("value") || e.has("min") || e.has("max") || e.has("step") || e.has("color") || e.has("name") || e.has("label") || e.has("defaultValue") || e.has("formatOptions") || e.has("normalization") || e.has("getAriaHandleText")) && this.#e?.requestHostUpdate();
|
|
895
|
+
}
|
|
896
|
+
};
|
|
897
|
+
t([u({
|
|
898
|
+
type: String,
|
|
899
|
+
reflect: !0
|
|
900
|
+
})], K.prototype, "name", void 0), t([u({ type: String })], K.prototype, "label", void 0), t([u({
|
|
901
|
+
type: Number,
|
|
902
|
+
reflect: !0
|
|
903
|
+
})], K.prototype, "value", void 0), t([u({
|
|
904
|
+
type: Number,
|
|
905
|
+
reflect: !0,
|
|
906
|
+
attribute: "default-value"
|
|
907
|
+
})], K.prototype, "defaultValue", void 0), t([u({
|
|
908
|
+
reflect: !0,
|
|
909
|
+
converter: W
|
|
910
|
+
})], K.prototype, "min", void 0), t([u({
|
|
911
|
+
reflect: !0,
|
|
912
|
+
converter: G
|
|
913
|
+
})], K.prototype, "max", void 0), t([u({
|
|
914
|
+
type: Number,
|
|
915
|
+
reflect: !0
|
|
916
|
+
})], K.prototype, "step", void 0), t([u({
|
|
917
|
+
type: String,
|
|
918
|
+
reflect: !0
|
|
919
|
+
})], K.prototype, "color", void 0), t([u({ attribute: !1 })], K.prototype, "formatOptions", void 0), t([u({ attribute: !1 })], K.prototype, "normalization", null), t([u({ attribute: !1 })], K.prototype, "getAriaHandleText", void 0), typeof customElements < "u" && !customElements.get("luzmo-slider-handle") && customElements.define("luzmo-slider-handle", K), typeof customElements < "u" && !customElements.get("luzmo-slider") && customElements.define("luzmo-slider", U);
|
|
920
|
+
//#endregion
|
|
921
|
+
export { U as n, R as r, K as t };
|