@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,10 @@
|
|
|
1
|
+
import { LuzmoTopNav } from './top-nav';
|
|
2
|
+
import { LuzmoTopNavItem } from './top-nav-item';
|
|
3
|
+
declare global {
|
|
4
|
+
interface HTMLElementTagNameMap {
|
|
5
|
+
'luzmo-top-nav': LuzmoTopNav;
|
|
6
|
+
'luzmo-top-nav-item': LuzmoTopNavItem;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export { LuzmoTopNav } from './top-nav';
|
|
10
|
+
export { LuzmoTopNavItem } from './top-nav-item';
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
(() => {
|
|
19
|
+
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
20
|
+
let e = document.createElement("style");
|
|
21
|
+
e.setAttribute("data-luzmo-vars", ""), e.textContent = "html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: color-mix(in oklch, var(--luzmo-border-color-full), black 25%);--luzmo-border-color-full-down: color-mix(in oklch, var(--luzmo-border-color-full), black 45%);--luzmo-border-color-full-focus: color-mix(in oklch, var(--luzmo-border-color-full), black 25%);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: color-mix(in oklch, var(--luzmo-font-color), black 8%);--luzmo-font-color-down: color-mix(in oklch, var(--luzmo-font-color), black 20%);--luzmo-font-color-focus: color-mix(in oklch, var(--luzmo-font-color), black 8%);--luzmo-primary: #4434ff;--luzmo-primary-hover: color-mix(in oklch, var(--luzmo-primary), black 8%);--luzmo-primary-down: color-mix(in oklch, var(--luzmo-primary), black 20%);--luzmo-primary-focus: color-mix(in oklch, var(--luzmo-primary), black 8%);--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 5%), black 1.5%);--luzmo-background-color-down: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 7%), black 1%);--luzmo-background-color-focus: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 5%), black 1.5%);--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: color-mix(in oklch, var(--luzmo-background-color-highlight), black 25%);--luzmo-background-color-highlight-down: color-mix(in oklch, var(--luzmo-background-color-highlight), black 45%);--luzmo-background-color-highlight-focus: color-mix(in oklch, var(--luzmo-background-color-highlight), black 25%);--luzmo-secondary: #d000d0;--luzmo-secondary-hover: color-mix(in oklch, var(--luzmo-secondary), black 8%);--luzmo-secondary-down: color-mix(in oklch, var(--luzmo-secondary), black 20%);--luzmo-secondary-focus: color-mix(in oklch, var(--luzmo-secondary), black 8%);--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 208, 0, 208;--luzmo-scrollbar-size: 6px;--luzmo-scrollbar-thumb-background: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-scrollbar-thumb-border-radius: var(--luzmo-border-radius-s);--luzmo-scrollbar-thumb-hover-background: rgba( var(--luzmo-border-color-rgb), 0.4 );--luzmo-scrollbar-track-background: transparent;--luzmo-scrollbar-track-border-radius: var(--luzmo-border-radius-s);--luzmo-scrollbar-width: thin;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: color-mix(in oklch, var(--luzmo-negative-color), black 8%);--luzmo-negative-color-down: color-mix(in oklch, var(--luzmo-negative-color), black 20%);--luzmo-negative-color-focus: color-mix(in oklch, var(--luzmo-negative-color), black 8%);--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-negative-inverse-color: #ffffff;--luzmo-positive-color: rgb(18, 133, 90);--luzmo-positive-color-hover: color-mix(in oklch, var(--luzmo-positive-color), black 8%);--luzmo-positive-color-down: color-mix(in oklch, var(--luzmo-positive-color), black 20%);--luzmo-positive-color-focus: color-mix(in oklch, var(--luzmo-positive-color), black 8%);--luzmo-positive-color-rgb: 18, 133, 90;--luzmo-positive-inverse-color: #ffffff;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: color-mix(in oklch, var(--luzmo-selected-color), black 25%);--luzmo-selected-color-down: color-mix(in oklch, var(--luzmo-selected-color), black 45%);--luzmo-selected-color-focus: color-mix(in oklch, var(--luzmo-selected-color), black 25%);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: color-mix(in oklch, var(--luzmo-selected-color-hard), black 25%);--luzmo-selected-color-hard-down: color-mix(in oklch, var(--luzmo-selected-color-hard), black 45%);--luzmo-selected-color-hard-focus: color-mix(in oklch, var(--luzmo-selected-color-hard), black 25%);--luzmo-informative-color: #1670dd;--luzmo-informative-color-rgb: 22, 112, 221;--luzmo-notice-color: rgb(229, 127, 0);--luzmo-seafoam-color: rgb(0, 140, 140);--luzmo-indigo-color: rgb(68, 52, 255);--luzmo-purple-color: rgb(112, 48, 210);--luzmo-fuchsia-color: rgb(205, 30, 170);--luzmo-magenta-color: rgb(203, 36, 98);--luzmo-yellow-color: rgb(228, 208, 0);--luzmo-gray-color: rgb(110, 110, 110);--luzmo-red-color: rgb(202, 34, 28);--luzmo-orange-color: rgb(218, 123, 17);--luzmo-chartreuse-color: rgb(85, 135, 0);--luzmo-celery-color: rgb(48, 134, 22);--luzmo-green-color: rgb(18, 133, 90);--luzmo-cyan-color: rgb(0, 134, 180);--luzmo-blue-color: rgb(22, 112, 221);--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 10px;--luzmo-icon-size-xs: 12px;--luzmo-icon-size-s: 14px;--luzmo-icon-size-m: 16px;--luzmo-icon-size-l: 18px;--luzmo-icon-size-xl: 20px;--luzmo-icon-size-xxl: 32px}", document.head.appendChild(e);
|
|
22
|
+
}
|
|
23
|
+
})();
|
|
24
|
+
import { n as e, t } from "../top-nav-DVQ5ASMa.js";
|
|
25
|
+
export { e as LuzmoTopNav, t as LuzmoTopNavItem };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
|
|
2
|
+
import { LuzmoElement } from '../../utils/base.js';
|
|
3
|
+
declare const LuzmoTopNavItem_base: typeof LuzmoElement;
|
|
4
|
+
/**
|
|
5
|
+
* @element luzmo-top-nav-item
|
|
6
|
+
*
|
|
7
|
+
* @slot - text label of the navigation item
|
|
8
|
+
*/
|
|
9
|
+
export declare class LuzmoTopNavItem extends LuzmoTopNavItem_base {
|
|
10
|
+
static get styles(): CSSResultArray;
|
|
11
|
+
href: string;
|
|
12
|
+
target?: string;
|
|
13
|
+
download?: string;
|
|
14
|
+
rel?: string;
|
|
15
|
+
label?: string;
|
|
16
|
+
selected: boolean;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
value: string;
|
|
19
|
+
private anchorElement;
|
|
20
|
+
protected render(): TemplateResult;
|
|
21
|
+
protected firstUpdated(changes: PropertyValues): void;
|
|
22
|
+
protected updated(changes: PropertyValues): void;
|
|
23
|
+
click(): void;
|
|
24
|
+
get focusElement(): HTMLElement;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ResizeController } from '@lit-labs/observers/resize-controller.js';
|
|
2
|
+
import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
|
|
3
|
+
import { Focusable } from '../../utils/focusable.js';
|
|
4
|
+
import { RovingTabindexController } from '../../utils/reactive-controllers/roving-tabindex.js';
|
|
5
|
+
import { LuzmoTopNavItem } from './top-nav-item.js';
|
|
6
|
+
declare const LuzmoTopNav_base: typeof Focusable & {
|
|
7
|
+
new (...args: any[]): import("../../index.js").SizedElementInterface;
|
|
8
|
+
prototype: import("../../index.js").SizedElementInterface;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* @element luzmo-top-nav
|
|
12
|
+
*
|
|
13
|
+
* @slot - Navigation items to display in the top nav
|
|
14
|
+
*
|
|
15
|
+
* @fires change - The selected navigation item has changed.
|
|
16
|
+
*/
|
|
17
|
+
export declare class LuzmoTopNav extends LuzmoTopNav_base {
|
|
18
|
+
static get styles(): CSSResultArray;
|
|
19
|
+
label: string;
|
|
20
|
+
quiet: boolean;
|
|
21
|
+
selected: string;
|
|
22
|
+
selectionIndicatorStyle: string;
|
|
23
|
+
shouldAnimate: boolean;
|
|
24
|
+
private slotEl;
|
|
25
|
+
private listEl;
|
|
26
|
+
private set items(value);
|
|
27
|
+
private get items();
|
|
28
|
+
private _items;
|
|
29
|
+
constructor();
|
|
30
|
+
protected resizeController: ResizeController<void>;
|
|
31
|
+
rovingTabindexController: RovingTabindexController<LuzmoTopNavItem>;
|
|
32
|
+
get focusElement(): LuzmoTopNavItem | this;
|
|
33
|
+
protected render(): TemplateResult;
|
|
34
|
+
protected willUpdate(changes: PropertyValues): void;
|
|
35
|
+
protected firstUpdated(changes: PropertyValues): void;
|
|
36
|
+
private onClick;
|
|
37
|
+
private onKeyDown;
|
|
38
|
+
private selectTarget;
|
|
39
|
+
private onSlotChange;
|
|
40
|
+
private updateCheckedState;
|
|
41
|
+
private updateSelectionIndicator;
|
|
42
|
+
connectedCallback(): void;
|
|
43
|
+
disconnectedCallback(): void;
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/*! * Lucero - The design system for Luzmo.
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2025 Luzmo
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
|
6
|
+
* This license allows users with a current active Luzmo account to use Lucero.
|
|
7
|
+
* This license terminates automatically if a user no longer has an active Luzmo account.
|
|
8
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
9
|
+
*
|
|
10
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
+
* SOFTWARE.
|
|
17
|
+
* */
|
|
18
|
+
import { n as e, t } from "./decorate-aGxJUVxg.js";
|
|
19
|
+
import { n } from "./sized-mixin-DaBoZkVS.js";
|
|
20
|
+
import { t as r } from "./focus-visible-CrooVCUu.js";
|
|
21
|
+
import { t as i } from "./focusable-BmS8IzhH.js";
|
|
22
|
+
import { t as a } from "./roving-tabindex-BP6mQbXf.js";
|
|
23
|
+
import { t as o } from "./scaled-indicator-BcO2BOsf.js";
|
|
24
|
+
import { html as s, unsafeCSS as c } from "lit";
|
|
25
|
+
import { property as l, query as u } from "lit/decorators.js";
|
|
26
|
+
import { ifDefined as d } from "lit/directives/if-defined.js";
|
|
27
|
+
import { IntersectionController as f } from "@lit-labs/observers/intersection-controller.js";
|
|
28
|
+
import { ResizeController as p } from "@lit-labs/observers/resize-controller.js";
|
|
29
|
+
//#region src/components/top-nav/top-nav-sizes.module.scss?inline
|
|
30
|
+
var m = "#list{--top-nav-item-height:calc(var(--luzmo-component-height) + var(--luzmo-spacing-5));--top-nav-item-horizontal-spacing:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-3));--top-nav-top-to-text:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--top-nav-bottom-to-text:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--top-nav-focus-indicator-gap:var(--luzmo-spacing-3);--top-nav-font-size:var(--luzmo-font-size)}:host([size=s]) #list{--top-nav-item-height:calc(var(--luzmo-component-height-s) + var(--luzmo-spacing-4));--top-nav-item-horizontal-spacing:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-2));--top-nav-top-to-text:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--top-nav-bottom-to-text:var(--luzmo-spacing-4);--top-nav-focus-indicator-gap:var(--luzmo-spacing-3);--top-nav-font-size:var(--luzmo-font-size-s)}:host([size=l]) #list{--top-nav-item-height:calc(var(--luzmo-component-height-l) + var(--luzmo-spacing-5));--top-nav-item-horizontal-spacing:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-4));--top-nav-top-to-text:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--top-nav-bottom-to-text:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--top-nav-focus-indicator-gap:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--top-nav-font-size:var(--luzmo-font-size-l)}:host([size=xl]) #list{--top-nav-item-height:calc(var(--luzmo-component-height-xl) + var(--luzmo-spacing-5));--top-nav-item-horizontal-spacing:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-4));--top-nav-top-to-text:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--top-nav-bottom-to-text:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--top-nav-focus-indicator-gap:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--top-nav-font-size:var(--luzmo-font-size-xl)}", h = ":host{display:block}#list{--top-nav-color:var(--luzmo-font-color);--top-nav-color-selected:var(--luzmo-font-color-down);--top-nav-color-hover:var(--luzmo-font-color-hover);--top-nav-color-key-focus:var(--luzmo-font-color-focus);--top-nav-color-disabled:var(--luzmo-disabled-color);--top-nav-font-family:var(--luzmo-font-family);--top-nav-font-style:var(--luzmo-font-style);--top-nav-font-size:var(--luzmo-font-size);--top-nav-font-weight:var(--luzmo-font-weight);--top-nav-line-height:var(--luzmo-line-height);--top-nav-focus-indicator-width:var(--luzmo-indicator-width);--top-nav-focus-indicator-border-radius:var(--luzmo-border-radius);--top-nav-focus-indicator-color:var(--luzmo-indicator-color);--top-nav-selection-indicator-color:var(--luzmo-font-color-down);--top-nav-divider-size:2px;--top-nav-divider-border-radius:1px;--top-nav-animation-duration:var(--luzmo-animation-duration);--top-nav-animation-ease:ease-in-out;z-index:0;vertical-align:top;background:linear-gradient(to top, var(--highcontrast-top-nav-divider-background-color,var(--luzmo-top-nav-divider-background-color,var(--top-nav-divider-background-color,var(--luzmo-border-color)))) 0 var(--luzmo-top-nav-divider-size,var(--top-nav-divider-size)), transparent var(--luzmo-top-nav-divider-size,var(--top-nav-divider-size)));align-items:center;margin:0;padding-block:0;display:flex;position:relative}::slotted(:not(:first-child)){margin-inline-start:var(--luzmo-top-nav-item-horizontal-spacing,var(--top-nav-item-horizontal-spacing))}::slotted([selected]){color:var(--highcontrast-top-nav-color-selected,var(--luzmo-top-nav-color-selected,var(--top-nav-color-selected)))}::slotted([disabled]){cursor:default;color:var(--highcontrast-top-nav-color-disabled,var(--luzmo-top-nav-color-disabled,var(--top-nav-color-disabled)))}#selection-indicator{background-color:var(--highcontrast-top-nav-selection-indicator-color,var(--luzmo-top-nav-selection-indicator-color,var(--top-nav-selection-indicator-color)));z-index:0;transition:transform var(--luzmo-top-nav-animation-duration,var(--top-nav-animation-duration)) var(--luzmo-top-nav-animation-ease,var(--top-nav-animation-ease));transform-origin:0 0;border-radius:var(--luzmo-top-nav-divider-border-radius,var(--top-nav-divider-border-radius));block-size:var(--luzmo-top-nav-divider-size,var(--top-nav-divider-size));width:100px;position:absolute;inset-block-end:0;inset-inline-start:0}#selection-indicator.first-position{transition:none}:host([quiet]) #list{--top-nav-quiet-unselected-opacity:.7;--top-nav-quiet-unselected-opacity-hover:.85;background:0 0;border-color:#0000;display:inline-flex}:host([quiet]) ::slotted(:not([selected])){opacity:var(--luzmo-top-nav-quiet-unselected-opacity,var(--top-nav-quiet-unselected-opacity))}:host([quiet]) ::slotted(:not([selected]):hover){opacity:var(--luzmo-top-nav-quiet-unselected-opacity-hover,var(--top-nav-quiet-unselected-opacity-hover))}:host([quiet]) #selection-indicator{display:none}@media (forced-colors:active){#list{--highcontrast-top-nav-divider-background-color:var(--luzmo-border-color);--highcontrast-top-nav-selection-indicator-color:Highlight;--highcontrast-top-nav-focus-indicator-color:CanvasText;--highcontrast-top-nav-color:ButtonText;--highcontrast-top-nav-color-hover:ButtonText;--highcontrast-top-nav-color-selected:HighlightText;--highcontrast-top-nav-color-key-focus:ButtonText;--highcontrast-top-nav-color-disabled:GrayText;forced-color-adjust:none}}#list{--top-nav-font-weight:var(--luzmo-font-weight);--top-nav-divider-background-color:var(--luzmo-border-color)}", g = class extends n(i, { noDefaultSize: !0 }) {
|
|
31
|
+
static get styles() {
|
|
32
|
+
return [c(h), c(m)];
|
|
33
|
+
}
|
|
34
|
+
set items(e) {
|
|
35
|
+
e !== this.items && (this._items.forEach((e) => {
|
|
36
|
+
this.resizeController.unobserve(e);
|
|
37
|
+
}), e.forEach((e) => {
|
|
38
|
+
this.resizeController.observe(e);
|
|
39
|
+
}), this._items = e, this.rovingTabindexController.clearElementCache());
|
|
40
|
+
}
|
|
41
|
+
get items() {
|
|
42
|
+
return this._items;
|
|
43
|
+
}
|
|
44
|
+
constructor() {
|
|
45
|
+
super(), this.label = "", this.quiet = !1, this.selected = "", this.selectionIndicatorStyle = o.noSelectionStyle, this.shouldAnimate = !1, this._items = [], this.resizeController = new p(this, { callback: () => {
|
|
46
|
+
this.updateSelectionIndicator();
|
|
47
|
+
} }), this.rovingTabindexController = new a(this, {
|
|
48
|
+
focusInIndex: (e) => {
|
|
49
|
+
let t = 0;
|
|
50
|
+
return e.find((e, n) => {
|
|
51
|
+
let r = this.selected ? e.value === this.selected : !e.disabled;
|
|
52
|
+
return t = n, r;
|
|
53
|
+
}) ? t : -1;
|
|
54
|
+
},
|
|
55
|
+
direction: () => "horizontal",
|
|
56
|
+
elementEnterAction: (e) => {
|
|
57
|
+
this.shouldAnimate = !0, this.selectTarget(e);
|
|
58
|
+
},
|
|
59
|
+
elements: () => this.items,
|
|
60
|
+
isFocusableElement: (e) => !this.disabled && !e.disabled,
|
|
61
|
+
listenerScope: () => this.listEl
|
|
62
|
+
}), this.onClick = (e) => {
|
|
63
|
+
if (this.disabled) return;
|
|
64
|
+
let t = e.composedPath().find((e) => e.parentElement === this);
|
|
65
|
+
!t || t.disabled || (e.preventDefault(), this.shouldAnimate = !0, this.selectTarget(t));
|
|
66
|
+
}, this.onKeyDown = (e) => {
|
|
67
|
+
if (e.code === "Enter" || e.code === "Space") {
|
|
68
|
+
e.preventDefault();
|
|
69
|
+
let t = e.target;
|
|
70
|
+
t && this.selectTarget(t);
|
|
71
|
+
}
|
|
72
|
+
}, this.updateCheckedState = () => {
|
|
73
|
+
if (this.items.forEach((e) => {
|
|
74
|
+
e.removeAttribute("selected");
|
|
75
|
+
}), this.selected) {
|
|
76
|
+
let e = this.items.find((e) => e.value === this.selected);
|
|
77
|
+
e ? e.selected = !0 : this.selected = "";
|
|
78
|
+
} else {
|
|
79
|
+
let e = this.items[0];
|
|
80
|
+
e && e.setAttribute("tabindex", "0");
|
|
81
|
+
}
|
|
82
|
+
this.updateSelectionIndicator();
|
|
83
|
+
}, this.updateSelectionIndicator = async () => {
|
|
84
|
+
let e = this.items.find((e) => e.selected);
|
|
85
|
+
if (!e || this.quiet) {
|
|
86
|
+
this.selectionIndicatorStyle = o.noSelectionStyle;
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
await Promise.all([e.updateComplete, document.fonts ? document.fonts.ready : Promise.resolve()]);
|
|
90
|
+
let t = e.getBoundingClientRect(), n = this.listEl.getBoundingClientRect(), r = t.left - n.left;
|
|
91
|
+
this.selectionIndicatorStyle = o.transformX(r, t.width);
|
|
92
|
+
}, new f(this, {
|
|
93
|
+
config: {
|
|
94
|
+
root: null,
|
|
95
|
+
rootMargin: "0px",
|
|
96
|
+
threshold: [0, 1]
|
|
97
|
+
},
|
|
98
|
+
callback: () => {
|
|
99
|
+
this.updateSelectionIndicator();
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
get focusElement() {
|
|
104
|
+
return this.rovingTabindexController.focusInElement || this;
|
|
105
|
+
}
|
|
106
|
+
render() {
|
|
107
|
+
return s`
|
|
108
|
+
<div
|
|
109
|
+
@click=${this.onClick}
|
|
110
|
+
@keydown=${this.onKeyDown}
|
|
111
|
+
id="list"
|
|
112
|
+
>
|
|
113
|
+
<slot @slotchange=${this.onSlotChange}></slot>
|
|
114
|
+
<div
|
|
115
|
+
id="selection-indicator"
|
|
116
|
+
class=${d(this.shouldAnimate ? void 0 : "first-position")}
|
|
117
|
+
style=${this.selectionIndicatorStyle}
|
|
118
|
+
role="presentation"
|
|
119
|
+
></div>
|
|
120
|
+
</div>
|
|
121
|
+
`;
|
|
122
|
+
}
|
|
123
|
+
willUpdate(e) {
|
|
124
|
+
if (!this.hasUpdated) {
|
|
125
|
+
let e = this.querySelector(":scope > [selected]");
|
|
126
|
+
e && this.selectTarget(e);
|
|
127
|
+
}
|
|
128
|
+
super.willUpdate(e), e.has("selected") && this.items.length > 0 && this.updateCheckedState(), e.has("quiet") && this.updateSelectionIndicator(), e.has("label") && (this.label ? this.setAttribute("aria-label", this.label) : this.removeAttribute("aria-label")), e.has("disabled") && (this.disabled ? this.setAttribute("aria-disabled", "true") : this.removeAttribute("aria-disabled")), !this.shouldAnimate && e.get("shouldAnimate") !== void 0 && (this.shouldAnimate = !0);
|
|
129
|
+
}
|
|
130
|
+
firstUpdated(e) {
|
|
131
|
+
super.firstUpdated(e), this.hasAttribute("role") || this.setAttribute("role", "navigation"), this.label && this.setAttribute("aria-label", this.label);
|
|
132
|
+
}
|
|
133
|
+
selectTarget(e) {
|
|
134
|
+
let t = e.getAttribute("value");
|
|
135
|
+
if (t) {
|
|
136
|
+
let e = this.selected;
|
|
137
|
+
this.selected = t, this.dispatchEvent(new Event("change", { cancelable: !0 })) || (this.selected = e);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
onSlotChange() {
|
|
141
|
+
this.items = this.slotEl.assignedElements().filter((e) => e.tagName.toLowerCase() === "luzmo-top-nav-item"), this.updateCheckedState();
|
|
142
|
+
}
|
|
143
|
+
connectedCallback() {
|
|
144
|
+
super.connectedCallback(), window.addEventListener("resize", this.updateSelectionIndicator), "fonts" in document && document.fonts.addEventListener("loadingdone", this.updateSelectionIndicator);
|
|
145
|
+
}
|
|
146
|
+
disconnectedCallback() {
|
|
147
|
+
window.removeEventListener("resize", this.updateSelectionIndicator), "fonts" in document && document.fonts.removeEventListener("loadingdone", this.updateSelectionIndicator), super.disconnectedCallback();
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
t([l()], g.prototype, "label", void 0), t([l({
|
|
151
|
+
type: Boolean,
|
|
152
|
+
reflect: !0
|
|
153
|
+
})], g.prototype, "quiet", void 0), t([l({ reflect: !0 })], g.prototype, "selected", void 0), t([l({ attribute: !1 })], g.prototype, "selectionIndicatorStyle", void 0), t([l({ attribute: !1 })], g.prototype, "shouldAnimate", void 0), t([u("slot")], g.prototype, "slotEl", void 0), t([u("#list")], g.prototype, "listEl", void 0);
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region src/components/top-nav/top-nav-item.module.scss?inline
|
|
156
|
+
var _ = ":host{font-family:var(--luzmo-top-nav-font-family,var(--luzmo-font-family));box-sizing:border-box;block-size:calc(var(--luzmo-top-nav-item-height,var(--top-nav-item-height)) - var(--luzmo-top-nav-divider-size,var(--top-nav-divider-size)));z-index:1;white-space:nowrap;color:var(--highcontrast-top-nav-color,var(--luzmo-top-nav-color,var(--top-nav-color)));transition:color var(--luzmo-top-nav-animation-duration,var(--top-nav-animation-duration)) ease-out;cursor:pointer;outline:none;align-items:center;-webkit-text-decoration:none;text-decoration:none;display:inline-flex;position:relative}:host:before{content:\"\";box-sizing:border-box;block-size:calc(100% - var(--luzmo-top-nav-top-to-text,var(--top-nav-top-to-text)));inline-size:calc(100% + var(--luzmo-top-nav-focus-indicator-gap,var(--top-nav-focus-indicator-gap)) * 2);border-radius:var(--luzmo-top-nav-focus-indicator-border-radius,var(--top-nav-focus-indicator-border-radius));pointer-events:none;position:absolute;inset-block-start:calc(var(--luzmo-top-nav-top-to-text,var(--top-nav-top-to-text)) / 2);inset-inline-start:calc(var(--luzmo-top-nav-focus-indicator-gap,var(--top-nav-focus-indicator-gap)) * -1);inset-inline-end:calc(var(--luzmo-top-nav-focus-indicator-gap,var(--top-nav-focus-indicator-gap)) * -1);border:var(--luzmo-top-nav-focus-indicator-width,var(--top-nav-focus-indicator-width)) solid transparent!important}@media (hover:hover){:host(:hover){color:var(--highcontrast-top-nav-color-hover,var(--luzmo-top-nav-color-hover,var(--top-nav-color-hover)))}}:host([selected]){color:var(--highcontrast-top-nav-color-selected,var(--luzmo-top-nav-color-selected,var(--top-nav-color-selected)))}:host([disabled]){cursor:default;pointer-events:none;color:var(--highcontrast-top-nav-color-disabled,var(--luzmo-top-nav-color-disabled,var(--top-nav-color-disabled)))}:host(:focus-visible){color:var(--highcontrast-top-nav-color-key-focus,var(--luzmo-top-nav-color-key-focus,var(--top-nav-color-key-focus)))}:host(:focus-visible):before{border-color:var(--highcontrast-top-nav-focus-indicator-color,var(--luzmo-top-nav-focus-indicator-color,var(--top-nav-focus-indicator-color)))!important}#item-label{cursor:pointer;font-family:inherit;font-style:var(--luzmo-top-nav-font-style,var(--top-nav-font-style));font-size:var(--luzmo-top-nav-font-size,var(--top-nav-font-size));font-weight:var(--luzmo-top-nav-font-weight,var(--top-nav-font-weight));line-height:var(--luzmo-top-nav-line-height,var(--top-nav-line-height));color:inherit;outline:none;-webkit-text-decoration:none;text-decoration:none;display:inline-block}:host([disabled]) #item-label{cursor:default}", v = class extends r(e) {
|
|
157
|
+
constructor(...e) {
|
|
158
|
+
super(...e), this.href = "", this.selected = !1, this.disabled = !1, this.value = "";
|
|
159
|
+
}
|
|
160
|
+
static get styles() {
|
|
161
|
+
return [c(_)];
|
|
162
|
+
}
|
|
163
|
+
render() {
|
|
164
|
+
return s`
|
|
165
|
+
<a
|
|
166
|
+
id="item-label"
|
|
167
|
+
href=${d(this.href || void 0)}
|
|
168
|
+
target=${d(this.target)}
|
|
169
|
+
download=${d(this.download)}
|
|
170
|
+
rel=${d(this.rel)}
|
|
171
|
+
aria-label=${d(this.label)}
|
|
172
|
+
aria-current=${d(this.selected && this.href ? "page" : void 0)}
|
|
173
|
+
tabindex="-1"
|
|
174
|
+
>
|
|
175
|
+
<slot></slot>
|
|
176
|
+
</a>
|
|
177
|
+
`;
|
|
178
|
+
}
|
|
179
|
+
firstUpdated(e) {
|
|
180
|
+
super.firstUpdated(e);
|
|
181
|
+
}
|
|
182
|
+
updated(e) {
|
|
183
|
+
super.updated(e), this.anchorElement && this.anchorElement.href && !this.value && (this.value = this.anchorElement.href), e.has("disabled") && (this.disabled ? this.setAttribute("aria-disabled", "true") : this.removeAttribute("aria-disabled"));
|
|
184
|
+
}
|
|
185
|
+
click() {
|
|
186
|
+
this.anchorElement && this.anchorElement.click();
|
|
187
|
+
}
|
|
188
|
+
get focusElement() {
|
|
189
|
+
return this;
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
t([l({ reflect: !0 })], v.prototype, "href", void 0), t([l({ reflect: !0 })], v.prototype, "target", void 0), t([l({ reflect: !0 })], v.prototype, "download", void 0), t([l({ reflect: !0 })], v.prototype, "rel", void 0), t([l()], v.prototype, "label", void 0), t([l({
|
|
193
|
+
type: Boolean,
|
|
194
|
+
reflect: !0
|
|
195
|
+
})], v.prototype, "selected", void 0), t([l({
|
|
196
|
+
type: Boolean,
|
|
197
|
+
reflect: !0
|
|
198
|
+
})], v.prototype, "disabled", void 0), t([l({
|
|
199
|
+
type: String,
|
|
200
|
+
reflect: !0
|
|
201
|
+
})], v.prototype, "value", void 0), t([u("a")], v.prototype, "anchorElement", void 0), customElements.get("luzmo-top-nav") || customElements.define("luzmo-top-nav", g), customElements.get("luzmo-top-nav-item") || customElements.define("luzmo-top-nav-item", v);
|
|
202
|
+
//#endregion
|
|
203
|
+
export { g as n, v as t };
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./decorate-B2wePfNm.cjs`),t=require(`./sized-mixin-StFA4y0J.cjs`),n=require(`./focus-visible-B0NNezGc.cjs`),r=require(`./focusable-CupEoHmn.cjs`),i=require(`./roving-tabindex-B7x5ePUB.cjs`),a=require(`./scaled-indicator-p8-3k2cJ.cjs`);let o=require(`lit`),s=require(`lit/decorators.js`),c=require(`lit/directives/if-defined.js`),l=require(`@lit-labs/observers/intersection-controller.js`),u=require(`@lit-labs/observers/resize-controller.js`);var d=`#list{--top-nav-item-height:calc(var(--luzmo-component-height) + var(--luzmo-spacing-5));--top-nav-item-horizontal-spacing:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-3));--top-nav-top-to-text:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--top-nav-bottom-to-text:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--top-nav-focus-indicator-gap:var(--luzmo-spacing-3);--top-nav-font-size:var(--luzmo-font-size)}:host([size=s]) #list{--top-nav-item-height:calc(var(--luzmo-component-height-s) + var(--luzmo-spacing-4));--top-nav-item-horizontal-spacing:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-2));--top-nav-top-to-text:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--top-nav-bottom-to-text:var(--luzmo-spacing-4);--top-nav-focus-indicator-gap:var(--luzmo-spacing-3);--top-nav-font-size:var(--luzmo-font-size-s)}:host([size=l]) #list{--top-nav-item-height:calc(var(--luzmo-component-height-l) + var(--luzmo-spacing-5));--top-nav-item-horizontal-spacing:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-4));--top-nav-top-to-text:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--top-nav-bottom-to-text:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--top-nav-focus-indicator-gap:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--top-nav-font-size:var(--luzmo-font-size-l)}:host([size=xl]) #list{--top-nav-item-height:calc(var(--luzmo-component-height-xl) + var(--luzmo-spacing-5));--top-nav-item-horizontal-spacing:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-4));--top-nav-top-to-text:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--top-nav-bottom-to-text:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--top-nav-focus-indicator-gap:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--top-nav-font-size:var(--luzmo-font-size-xl)}`,f=`:host{display:block}#list{--top-nav-color:var(--luzmo-font-color);--top-nav-color-selected:var(--luzmo-font-color-down);--top-nav-color-hover:var(--luzmo-font-color-hover);--top-nav-color-key-focus:var(--luzmo-font-color-focus);--top-nav-color-disabled:var(--luzmo-disabled-color);--top-nav-font-family:var(--luzmo-font-family);--top-nav-font-style:var(--luzmo-font-style);--top-nav-font-size:var(--luzmo-font-size);--top-nav-font-weight:var(--luzmo-font-weight);--top-nav-line-height:var(--luzmo-line-height);--top-nav-focus-indicator-width:var(--luzmo-indicator-width);--top-nav-focus-indicator-border-radius:var(--luzmo-border-radius);--top-nav-focus-indicator-color:var(--luzmo-indicator-color);--top-nav-selection-indicator-color:var(--luzmo-font-color-down);--top-nav-divider-size:2px;--top-nav-divider-border-radius:1px;--top-nav-animation-duration:var(--luzmo-animation-duration);--top-nav-animation-ease:ease-in-out;z-index:0;vertical-align:top;background:linear-gradient(to top, var(--highcontrast-top-nav-divider-background-color,var(--luzmo-top-nav-divider-background-color,var(--top-nav-divider-background-color,var(--luzmo-border-color)))) 0 var(--luzmo-top-nav-divider-size,var(--top-nav-divider-size)), transparent var(--luzmo-top-nav-divider-size,var(--top-nav-divider-size)));align-items:center;margin:0;padding-block:0;display:flex;position:relative}::slotted(:not(:first-child)){margin-inline-start:var(--luzmo-top-nav-item-horizontal-spacing,var(--top-nav-item-horizontal-spacing))}::slotted([selected]){color:var(--highcontrast-top-nav-color-selected,var(--luzmo-top-nav-color-selected,var(--top-nav-color-selected)))}::slotted([disabled]){cursor:default;color:var(--highcontrast-top-nav-color-disabled,var(--luzmo-top-nav-color-disabled,var(--top-nav-color-disabled)))}#selection-indicator{background-color:var(--highcontrast-top-nav-selection-indicator-color,var(--luzmo-top-nav-selection-indicator-color,var(--top-nav-selection-indicator-color)));z-index:0;transition:transform var(--luzmo-top-nav-animation-duration,var(--top-nav-animation-duration)) var(--luzmo-top-nav-animation-ease,var(--top-nav-animation-ease));transform-origin:0 0;border-radius:var(--luzmo-top-nav-divider-border-radius,var(--top-nav-divider-border-radius));block-size:var(--luzmo-top-nav-divider-size,var(--top-nav-divider-size));width:100px;position:absolute;inset-block-end:0;inset-inline-start:0}#selection-indicator.first-position{transition:none}:host([quiet]) #list{--top-nav-quiet-unselected-opacity:.7;--top-nav-quiet-unselected-opacity-hover:.85;background:0 0;border-color:#0000;display:inline-flex}:host([quiet]) ::slotted(:not([selected])){opacity:var(--luzmo-top-nav-quiet-unselected-opacity,var(--top-nav-quiet-unselected-opacity))}:host([quiet]) ::slotted(:not([selected]):hover){opacity:var(--luzmo-top-nav-quiet-unselected-opacity-hover,var(--top-nav-quiet-unselected-opacity-hover))}:host([quiet]) #selection-indicator{display:none}@media (forced-colors:active){#list{--highcontrast-top-nav-divider-background-color:var(--luzmo-border-color);--highcontrast-top-nav-selection-indicator-color:Highlight;--highcontrast-top-nav-focus-indicator-color:CanvasText;--highcontrast-top-nav-color:ButtonText;--highcontrast-top-nav-color-hover:ButtonText;--highcontrast-top-nav-color-selected:HighlightText;--highcontrast-top-nav-color-key-focus:ButtonText;--highcontrast-top-nav-color-disabled:GrayText;forced-color-adjust:none}}#list{--top-nav-font-weight:var(--luzmo-font-weight);--top-nav-divider-background-color:var(--luzmo-border-color)}`,p=class extends t.n(r.t,{noDefaultSize:!0}){static get styles(){return[(0,o.unsafeCSS)(f),(0,o.unsafeCSS)(d)]}set items(e){e!==this.items&&(this._items.forEach(e=>{this.resizeController.unobserve(e)}),e.forEach(e=>{this.resizeController.observe(e)}),this._items=e,this.rovingTabindexController.clearElementCache())}get items(){return this._items}constructor(){super(),this.label=``,this.quiet=!1,this.selected=``,this.selectionIndicatorStyle=a.t.noSelectionStyle,this.shouldAnimate=!1,this._items=[],this.resizeController=new u.ResizeController(this,{callback:()=>{this.updateSelectionIndicator()}}),this.rovingTabindexController=new i.t(this,{focusInIndex:e=>{let t=0;return e.find((e,n)=>{let r=this.selected?e.value===this.selected:!e.disabled;return t=n,r})?t:-1},direction:()=>`horizontal`,elementEnterAction:e=>{this.shouldAnimate=!0,this.selectTarget(e)},elements:()=>this.items,isFocusableElement:e=>!this.disabled&&!e.disabled,listenerScope:()=>this.listEl}),this.onClick=e=>{if(this.disabled)return;let t=e.composedPath().find(e=>e.parentElement===this);!t||t.disabled||(e.preventDefault(),this.shouldAnimate=!0,this.selectTarget(t))},this.onKeyDown=e=>{if(e.code===`Enter`||e.code===`Space`){e.preventDefault();let t=e.target;t&&this.selectTarget(t)}},this.updateCheckedState=()=>{if(this.items.forEach(e=>{e.removeAttribute(`selected`)}),this.selected){let e=this.items.find(e=>e.value===this.selected);e?e.selected=!0:this.selected=``}else{let e=this.items[0];e&&e.setAttribute(`tabindex`,`0`)}this.updateSelectionIndicator()},this.updateSelectionIndicator=async()=>{let e=this.items.find(e=>e.selected);if(!e||this.quiet){this.selectionIndicatorStyle=a.t.noSelectionStyle;return}await Promise.all([e.updateComplete,document.fonts?document.fonts.ready:Promise.resolve()]);let t=e.getBoundingClientRect(),n=this.listEl.getBoundingClientRect(),r=t.left-n.left;this.selectionIndicatorStyle=a.t.transformX(r,t.width)},new l.IntersectionController(this,{config:{root:null,rootMargin:`0px`,threshold:[0,1]},callback:()=>{this.updateSelectionIndicator()}})}get focusElement(){return this.rovingTabindexController.focusInElement||this}render(){return o.html`
|
|
19
|
+
<div
|
|
20
|
+
@click=${this.onClick}
|
|
21
|
+
@keydown=${this.onKeyDown}
|
|
22
|
+
id="list"
|
|
23
|
+
>
|
|
24
|
+
<slot @slotchange=${this.onSlotChange}></slot>
|
|
25
|
+
<div
|
|
26
|
+
id="selection-indicator"
|
|
27
|
+
class=${(0,c.ifDefined)(this.shouldAnimate?void 0:`first-position`)}
|
|
28
|
+
style=${this.selectionIndicatorStyle}
|
|
29
|
+
role="presentation"
|
|
30
|
+
></div>
|
|
31
|
+
</div>
|
|
32
|
+
`}willUpdate(e){if(!this.hasUpdated){let e=this.querySelector(`:scope > [selected]`);e&&this.selectTarget(e)}super.willUpdate(e),e.has(`selected`)&&this.items.length>0&&this.updateCheckedState(),e.has(`quiet`)&&this.updateSelectionIndicator(),e.has(`label`)&&(this.label?this.setAttribute(`aria-label`,this.label):this.removeAttribute(`aria-label`)),e.has(`disabled`)&&(this.disabled?this.setAttribute(`aria-disabled`,`true`):this.removeAttribute(`aria-disabled`)),!this.shouldAnimate&&e.get(`shouldAnimate`)!==void 0&&(this.shouldAnimate=!0)}firstUpdated(e){super.firstUpdated(e),this.hasAttribute(`role`)||this.setAttribute(`role`,`navigation`),this.label&&this.setAttribute(`aria-label`,this.label)}selectTarget(e){let t=e.getAttribute(`value`);if(t){let e=this.selected;this.selected=t,this.dispatchEvent(new Event(`change`,{cancelable:!0}))||(this.selected=e)}}onSlotChange(){this.items=this.slotEl.assignedElements().filter(e=>e.tagName.toLowerCase()===`luzmo-top-nav-item`),this.updateCheckedState()}connectedCallback(){super.connectedCallback(),window.addEventListener(`resize`,this.updateSelectionIndicator),`fonts`in document&&document.fonts.addEventListener(`loadingdone`,this.updateSelectionIndicator)}disconnectedCallback(){window.removeEventListener(`resize`,this.updateSelectionIndicator),`fonts`in document&&document.fonts.removeEventListener(`loadingdone`,this.updateSelectionIndicator),super.disconnectedCallback()}};e.t([(0,s.property)()],p.prototype,`label`,void 0),e.t([(0,s.property)({type:Boolean,reflect:!0})],p.prototype,`quiet`,void 0),e.t([(0,s.property)({reflect:!0})],p.prototype,`selected`,void 0),e.t([(0,s.property)({attribute:!1})],p.prototype,`selectionIndicatorStyle`,void 0),e.t([(0,s.property)({attribute:!1})],p.prototype,`shouldAnimate`,void 0),e.t([(0,s.query)(`slot`)],p.prototype,`slotEl`,void 0),e.t([(0,s.query)(`#list`)],p.prototype,`listEl`,void 0);var m=`:host{font-family:var(--luzmo-top-nav-font-family,var(--luzmo-font-family));box-sizing:border-box;block-size:calc(var(--luzmo-top-nav-item-height,var(--top-nav-item-height)) - var(--luzmo-top-nav-divider-size,var(--top-nav-divider-size)));z-index:1;white-space:nowrap;color:var(--highcontrast-top-nav-color,var(--luzmo-top-nav-color,var(--top-nav-color)));transition:color var(--luzmo-top-nav-animation-duration,var(--top-nav-animation-duration)) ease-out;cursor:pointer;outline:none;align-items:center;-webkit-text-decoration:none;text-decoration:none;display:inline-flex;position:relative}:host:before{content:"";box-sizing:border-box;block-size:calc(100% - var(--luzmo-top-nav-top-to-text,var(--top-nav-top-to-text)));inline-size:calc(100% + var(--luzmo-top-nav-focus-indicator-gap,var(--top-nav-focus-indicator-gap)) * 2);border-radius:var(--luzmo-top-nav-focus-indicator-border-radius,var(--top-nav-focus-indicator-border-radius));pointer-events:none;position:absolute;inset-block-start:calc(var(--luzmo-top-nav-top-to-text,var(--top-nav-top-to-text)) / 2);inset-inline-start:calc(var(--luzmo-top-nav-focus-indicator-gap,var(--top-nav-focus-indicator-gap)) * -1);inset-inline-end:calc(var(--luzmo-top-nav-focus-indicator-gap,var(--top-nav-focus-indicator-gap)) * -1);border:var(--luzmo-top-nav-focus-indicator-width,var(--top-nav-focus-indicator-width)) solid transparent!important}@media (hover:hover){:host(:hover){color:var(--highcontrast-top-nav-color-hover,var(--luzmo-top-nav-color-hover,var(--top-nav-color-hover)))}}:host([selected]){color:var(--highcontrast-top-nav-color-selected,var(--luzmo-top-nav-color-selected,var(--top-nav-color-selected)))}:host([disabled]){cursor:default;pointer-events:none;color:var(--highcontrast-top-nav-color-disabled,var(--luzmo-top-nav-color-disabled,var(--top-nav-color-disabled)))}:host(:focus-visible){color:var(--highcontrast-top-nav-color-key-focus,var(--luzmo-top-nav-color-key-focus,var(--top-nav-color-key-focus)))}:host(:focus-visible):before{border-color:var(--highcontrast-top-nav-focus-indicator-color,var(--luzmo-top-nav-focus-indicator-color,var(--top-nav-focus-indicator-color)))!important}#item-label{cursor:pointer;font-family:inherit;font-style:var(--luzmo-top-nav-font-style,var(--top-nav-font-style));font-size:var(--luzmo-top-nav-font-size,var(--top-nav-font-size));font-weight:var(--luzmo-top-nav-font-weight,var(--top-nav-font-weight));line-height:var(--luzmo-top-nav-line-height,var(--top-nav-line-height));color:inherit;outline:none;-webkit-text-decoration:none;text-decoration:none;display:inline-block}:host([disabled]) #item-label{cursor:default}`,h=class extends n.t(e.n){constructor(...e){super(...e),this.href=``,this.selected=!1,this.disabled=!1,this.value=``}static get styles(){return[(0,o.unsafeCSS)(m)]}render(){return o.html`
|
|
33
|
+
<a
|
|
34
|
+
id="item-label"
|
|
35
|
+
href=${(0,c.ifDefined)(this.href||void 0)}
|
|
36
|
+
target=${(0,c.ifDefined)(this.target)}
|
|
37
|
+
download=${(0,c.ifDefined)(this.download)}
|
|
38
|
+
rel=${(0,c.ifDefined)(this.rel)}
|
|
39
|
+
aria-label=${(0,c.ifDefined)(this.label)}
|
|
40
|
+
aria-current=${(0,c.ifDefined)(this.selected&&this.href?`page`:void 0)}
|
|
41
|
+
tabindex="-1"
|
|
42
|
+
>
|
|
43
|
+
<slot></slot>
|
|
44
|
+
</a>
|
|
45
|
+
`}firstUpdated(e){super.firstUpdated(e)}updated(e){super.updated(e),this.anchorElement&&this.anchorElement.href&&!this.value&&(this.value=this.anchorElement.href),e.has(`disabled`)&&(this.disabled?this.setAttribute(`aria-disabled`,`true`):this.removeAttribute(`aria-disabled`))}click(){this.anchorElement&&this.anchorElement.click()}get focusElement(){return this}};e.t([(0,s.property)({reflect:!0})],h.prototype,`href`,void 0),e.t([(0,s.property)({reflect:!0})],h.prototype,`target`,void 0),e.t([(0,s.property)({reflect:!0})],h.prototype,`download`,void 0),e.t([(0,s.property)({reflect:!0})],h.prototype,`rel`,void 0),e.t([(0,s.property)()],h.prototype,`label`,void 0),e.t([(0,s.property)({type:Boolean,reflect:!0})],h.prototype,`selected`,void 0),e.t([(0,s.property)({type:Boolean,reflect:!0})],h.prototype,`disabled`,void 0),e.t([(0,s.property)({type:String,reflect:!0})],h.prototype,`value`,void 0),e.t([(0,s.query)(`a`)],h.prototype,`anchorElement`,void 0),customElements.get(`luzmo-top-nav`)||customElements.define(`luzmo-top-nav`,p),customElements.get(`luzmo-top-nav-item`)||customElements.define(`luzmo-top-nav-item`,h),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return h}});
|
package/components/utils.cjs
CHANGED
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
|
|
18
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./decorate-B2wePfNm.cjs`),t=require(`./sized-mixin-StFA4y0J.cjs`),n=require(`./focus-visible-B0NNezGc.cjs`),r=require(`./focusable-CupEoHmn.cjs`),i=require(`./platform-B7Sk7Qon.cjs`),a=require(`./streaming-listener-BnDW38lt.cjs`),o=require(`./voice-recorder-BUtmSvPO.cjs`);exports.ElementSizes=t.t,exports.FocusVisiblePolyfillMixin=n.t,exports.Focusable=r.t,exports.LuzmoElement=e.n,exports.LuzmoMixin=e.r,exports.SizedMixin=t.n,exports.VoiceRecorder=o.t,exports.isAndroid=i.t,exports.isAppleDevice=i.n,exports.isChrome=i.r,exports.isFirefox=i.i,exports.isIOS=i.a,exports.isIPad=i.o,exports.isIPhone=i.s,exports.isMac=i.c,exports.isSeamonkey=i.l,exports.isWebKit=i.u,exports.streamingListener=a.t;
|
package/components/utils.js
CHANGED
|
@@ -15,28 +15,11 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
r as FocusVisiblePolyfillMixin,
|
|
27
|
-
t as Focusable,
|
|
28
|
-
e as LuzmoElement,
|
|
29
|
-
a as LuzmoMixin,
|
|
30
|
-
M as SizedMixin,
|
|
31
|
-
x as isAndroid,
|
|
32
|
-
f as isAppleDevice,
|
|
33
|
-
l as isChrome,
|
|
34
|
-
p as isFirefox,
|
|
35
|
-
c as isIOS,
|
|
36
|
-
d as isIPad,
|
|
37
|
-
F as isIPhone,
|
|
38
|
-
S as isMac,
|
|
39
|
-
b as isSeamonkey,
|
|
40
|
-
u as isWebKit,
|
|
41
|
-
E as streamingListener
|
|
42
|
-
};
|
|
18
|
+
import { n as e, r as t } from "./decorate-aGxJUVxg.js";
|
|
19
|
+
import { n, t as r } from "./sized-mixin-DaBoZkVS.js";
|
|
20
|
+
import { t as i } from "./focus-visible-CrooVCUu.js";
|
|
21
|
+
import { t as a } from "./focusable-BmS8IzhH.js";
|
|
22
|
+
import { a as o, c as s, i as c, l, n as u, o as d, r as f, s as p, t as m, u as h } from "./platform-D4V_cOJF.js";
|
|
23
|
+
import { t as g } from "./streaming-listener-2NcP7ys7.js";
|
|
24
|
+
import { t as _ } from "./voice-recorder-477xPHRU.js";
|
|
25
|
+
export { r as ElementSizes, i as FocusVisiblePolyfillMixin, a as Focusable, e as LuzmoElement, t as LuzmoMixin, n as SizedMixin, _ as VoiceRecorder, m as isAndroid, u as isAppleDevice, f as isChrome, c as isFirefox, o as isIOS, d as isIPad, p as isIPhone, s as isMac, l as isSeamonkey, h as isWebKit, g as streamingListener };
|
|
@@ -0,0 +1,134 @@
|
|
|
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
|
+
//#region src/utils/voice-recorder.ts
|
|
19
|
+
var e = class {
|
|
20
|
+
constructor(e = {}) {
|
|
21
|
+
this.mediaRecorder = null, this.audioChunks = [], this.isRecording = !1, this.stream = null, this.recordingStartTime = 0, this.mimeType = "", this.audioContext = null, this.analyser = null, this.animationFrame = null, this.durationInterval = null, this.maxDuration = e.maxDuration ?? 3e5, this.audioBitsPerSecond = e.audioBitsPerSecond ?? 128e3;
|
|
22
|
+
}
|
|
23
|
+
static isSupported() {
|
|
24
|
+
return !!(typeof navigator < "u" && navigator.mediaDevices && typeof navigator.mediaDevices.getUserMedia == "function" && typeof MediaRecorder < "u");
|
|
25
|
+
}
|
|
26
|
+
getSupportedMimeType() {
|
|
27
|
+
for (let e of [
|
|
28
|
+
"audio/webm;codecs=opus",
|
|
29
|
+
"audio/webm",
|
|
30
|
+
"audio/mp4",
|
|
31
|
+
"audio/ogg;codecs=opus",
|
|
32
|
+
"audio/ogg",
|
|
33
|
+
"audio/wav"
|
|
34
|
+
]) if (MediaRecorder.isTypeSupported(e)) return e;
|
|
35
|
+
return "audio/webm";
|
|
36
|
+
}
|
|
37
|
+
async startRecording() {
|
|
38
|
+
if (this.isRecording) return !1;
|
|
39
|
+
try {
|
|
40
|
+
return this.stream = await navigator.mediaDevices.getUserMedia({ audio: {
|
|
41
|
+
echoCancellation: !0,
|
|
42
|
+
noiseSuppression: !0,
|
|
43
|
+
autoGainControl: !0
|
|
44
|
+
} }), this.mimeType = this.getSupportedMimeType(), this.mediaRecorder = new MediaRecorder(this.stream, {
|
|
45
|
+
mimeType: this.mimeType,
|
|
46
|
+
audioBitsPerSecond: this.audioBitsPerSecond
|
|
47
|
+
}), this.audioChunks = [], this.recordingStartTime = Date.now(), this.mediaRecorder.ondataavailable = (e) => {
|
|
48
|
+
e.data.size > 0 && this.audioChunks.push(e.data);
|
|
49
|
+
}, this.mediaRecorder.onstop = () => {
|
|
50
|
+
let e = Date.now() - this.recordingStartTime, t = new Blob(this.audioChunks, { type: this.mimeType });
|
|
51
|
+
this.onStopCallback?.({
|
|
52
|
+
audioBlob: t,
|
|
53
|
+
duration: e,
|
|
54
|
+
mimeType: this.mimeType
|
|
55
|
+
}), this.cleanup();
|
|
56
|
+
}, this.mediaRecorder.onerror = () => {
|
|
57
|
+
this.onErrorCallback?.("Recording failed"), this.cleanup();
|
|
58
|
+
}, this.mediaRecorder.start(1e3), this.isRecording = !0, await this.setupAudioAnalysis(), this.startDurationUpdates(), this.onStartCallback?.(), setTimeout(() => {
|
|
59
|
+
this.isRecording && this.stopRecording();
|
|
60
|
+
}, this.maxDuration), !0;
|
|
61
|
+
} catch (e) {
|
|
62
|
+
return console.error("Error starting recording:", e), this.onErrorCallback?.("Failed to access microphone"), !1;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
stopRecording() {
|
|
66
|
+
this.mediaRecorder && this.isRecording && (this.mediaRecorder.stop(), this.isRecording = !1, this.stopDurationUpdates());
|
|
67
|
+
}
|
|
68
|
+
cancelRecording() {
|
|
69
|
+
this.mediaRecorder && this.isRecording && (this.mediaRecorder.onstop = null, this.mediaRecorder.stop(), this.isRecording = !1, this.stopDurationUpdates(), this.audioChunks = [], this.cleanup());
|
|
70
|
+
}
|
|
71
|
+
isCurrentlyRecording() {
|
|
72
|
+
return this.isRecording;
|
|
73
|
+
}
|
|
74
|
+
getRecordingDuration() {
|
|
75
|
+
return this.isRecording ? Date.now() - this.recordingStartTime : 0;
|
|
76
|
+
}
|
|
77
|
+
async setupAudioAnalysis() {
|
|
78
|
+
if (this.stream) try {
|
|
79
|
+
let e = window.AudioContext || window.webkitAudioContext;
|
|
80
|
+
if (!e) return;
|
|
81
|
+
this.audioContext = new e(), this.audioContext.state === "suspended" && await this.audioContext.resume(), this.analyser = this.audioContext.createAnalyser(), this.analyser.fftSize = 256, this.analyser.smoothingTimeConstant = .8, this.audioContext.createMediaStreamSource(this.stream).connect(this.analyser), this.startAudioLevelMonitoring();
|
|
82
|
+
} catch (e) {
|
|
83
|
+
console.warn("Audio analysis setup failed:", e);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
startAudioLevelMonitoring() {
|
|
87
|
+
if (!this.analyser) return;
|
|
88
|
+
let e = () => {
|
|
89
|
+
if (!this.isRecording || !this.analyser) return;
|
|
90
|
+
let t = new Uint8Array(this.analyser.frequencyBinCount);
|
|
91
|
+
this.analyser.getByteFrequencyData(t);
|
|
92
|
+
let n = 0;
|
|
93
|
+
for (let e of t) n += e * e;
|
|
94
|
+
let r = Math.sqrt(n / t.length), i = Math.min(r / 255, 1), a = (i > .01 ? i : 0) ** .4;
|
|
95
|
+
this.onAudioLevelCallback?.(a), this.animationFrame = requestAnimationFrame(e);
|
|
96
|
+
};
|
|
97
|
+
e();
|
|
98
|
+
}
|
|
99
|
+
startDurationUpdates() {
|
|
100
|
+
this.durationInterval = window.setInterval(() => {
|
|
101
|
+
this.isRecording && this.onDurationUpdateCallback?.(this.getRecordingDuration());
|
|
102
|
+
}, 100);
|
|
103
|
+
}
|
|
104
|
+
stopDurationUpdates() {
|
|
105
|
+
this.durationInterval !== null && (clearInterval(this.durationInterval), this.durationInterval = null);
|
|
106
|
+
}
|
|
107
|
+
cleanup() {
|
|
108
|
+
this.isRecording = !1, this.stopDurationUpdates(), this.animationFrame !== null && (cancelAnimationFrame(this.animationFrame), this.animationFrame = null), this.audioContext &&= (this.audioContext.close(), null), this.analyser = null, this.stream &&= (this.stream.getTracks().forEach((e) => e.stop()), null), this.mediaRecorder = null;
|
|
109
|
+
}
|
|
110
|
+
destroy() {
|
|
111
|
+
this.stopRecording(), this.cleanup();
|
|
112
|
+
}
|
|
113
|
+
onStart(e) {
|
|
114
|
+
return this.onStartCallback = e, this;
|
|
115
|
+
}
|
|
116
|
+
onStop(e) {
|
|
117
|
+
return this.onStopCallback = e, this;
|
|
118
|
+
}
|
|
119
|
+
onError(e) {
|
|
120
|
+
return this.onErrorCallback = e, this;
|
|
121
|
+
}
|
|
122
|
+
onAudioLevel(e) {
|
|
123
|
+
return this.onAudioLevelCallback = e, this;
|
|
124
|
+
}
|
|
125
|
+
onDurationUpdate(e) {
|
|
126
|
+
return this.onDurationUpdateCallback = e, this;
|
|
127
|
+
}
|
|
128
|
+
static formatDuration(e) {
|
|
129
|
+
let t = Math.floor(e / 1e3);
|
|
130
|
+
return `${Math.floor(t / 60)}:${(t % 60).toString().padStart(2, "0")}`;
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
//#endregion
|
|
134
|
+
export { e as t };
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
var e=class{constructor(e={}){this.mediaRecorder=null,this.audioChunks=[],this.isRecording=!1,this.stream=null,this.recordingStartTime=0,this.mimeType=``,this.audioContext=null,this.analyser=null,this.animationFrame=null,this.durationInterval=null,this.maxDuration=e.maxDuration??3e5,this.audioBitsPerSecond=e.audioBitsPerSecond??128e3}static isSupported(){return!!(typeof navigator<`u`&&navigator.mediaDevices&&typeof navigator.mediaDevices.getUserMedia==`function`&&typeof MediaRecorder<`u`)}getSupportedMimeType(){for(let e of[`audio/webm;codecs=opus`,`audio/webm`,`audio/mp4`,`audio/ogg;codecs=opus`,`audio/ogg`,`audio/wav`])if(MediaRecorder.isTypeSupported(e))return e;return`audio/webm`}async startRecording(){if(this.isRecording)return!1;try{return this.stream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),this.mimeType=this.getSupportedMimeType(),this.mediaRecorder=new MediaRecorder(this.stream,{mimeType:this.mimeType,audioBitsPerSecond:this.audioBitsPerSecond}),this.audioChunks=[],this.recordingStartTime=Date.now(),this.mediaRecorder.ondataavailable=e=>{e.data.size>0&&this.audioChunks.push(e.data)},this.mediaRecorder.onstop=()=>{let e=Date.now()-this.recordingStartTime,t=new Blob(this.audioChunks,{type:this.mimeType});this.onStopCallback?.({audioBlob:t,duration:e,mimeType:this.mimeType}),this.cleanup()},this.mediaRecorder.onerror=()=>{this.onErrorCallback?.(`Recording failed`),this.cleanup()},this.mediaRecorder.start(1e3),this.isRecording=!0,await this.setupAudioAnalysis(),this.startDurationUpdates(),this.onStartCallback?.(),setTimeout(()=>{this.isRecording&&this.stopRecording()},this.maxDuration),!0}catch(e){return console.error(`Error starting recording:`,e),this.onErrorCallback?.(`Failed to access microphone`),!1}}stopRecording(){this.mediaRecorder&&this.isRecording&&(this.mediaRecorder.stop(),this.isRecording=!1,this.stopDurationUpdates())}cancelRecording(){this.mediaRecorder&&this.isRecording&&(this.mediaRecorder.onstop=null,this.mediaRecorder.stop(),this.isRecording=!1,this.stopDurationUpdates(),this.audioChunks=[],this.cleanup())}isCurrentlyRecording(){return this.isRecording}getRecordingDuration(){return this.isRecording?Date.now()-this.recordingStartTime:0}async setupAudioAnalysis(){if(this.stream)try{let e=window.AudioContext||window.webkitAudioContext;if(!e)return;this.audioContext=new e,this.audioContext.state===`suspended`&&await this.audioContext.resume(),this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=256,this.analyser.smoothingTimeConstant=.8,this.audioContext.createMediaStreamSource(this.stream).connect(this.analyser),this.startAudioLevelMonitoring()}catch(e){console.warn(`Audio analysis setup failed:`,e)}}startAudioLevelMonitoring(){if(!this.analyser)return;let e=()=>{if(!this.isRecording||!this.analyser)return;let t=new Uint8Array(this.analyser.frequencyBinCount);this.analyser.getByteFrequencyData(t);let n=0;for(let e of t)n+=e*e;let r=Math.sqrt(n/t.length),i=Math.min(r/255,1),a=(i>.01?i:0)**.4;this.onAudioLevelCallback?.(a),this.animationFrame=requestAnimationFrame(e)};e()}startDurationUpdates(){this.durationInterval=window.setInterval(()=>{this.isRecording&&this.onDurationUpdateCallback?.(this.getRecordingDuration())},100)}stopDurationUpdates(){this.durationInterval!==null&&(clearInterval(this.durationInterval),this.durationInterval=null)}cleanup(){this.isRecording=!1,this.stopDurationUpdates(),this.animationFrame!==null&&(cancelAnimationFrame(this.animationFrame),this.animationFrame=null),this.audioContext&&=(this.audioContext.close(),null),this.analyser=null,this.stream&&=(this.stream.getTracks().forEach(e=>e.stop()),null),this.mediaRecorder=null}destroy(){this.stopRecording(),this.cleanup()}onStart(e){return this.onStartCallback=e,this}onStop(e){return this.onStopCallback=e,this}onError(e){return this.onErrorCallback=e,this}onAudioLevel(e){return this.onAudioLevelCallback=e,this}onDurationUpdate(e){return this.onDurationUpdateCallback=e,this}static formatDuration(e){let t=Math.floor(e/1e3);return`${Math.floor(t/60)}:${(t%60).toString().padStart(2,`0`)}`}};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|