@luzmo/lucero 0.0.4 → 0.0.6
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/accordion-item.d.ts +24 -0
- package/components/accordion/accordion.d.ts +42 -0
- package/components/accordion/index.cjs +43 -0
- package/components/accordion/index.d.ts +10 -0
- package/{lib → components}/accordion/index.js +10 -11
- package/components/action-bar/action-bar.d.ts +42 -0
- package/components/action-bar/index.cjs +39 -0
- package/components/action-bar/index.d.ts +7 -0
- package/{lib → components}/action-bar/index.js +9 -10
- package/components/action-button/action-button.d.ts +81 -0
- package/components/action-button/index.cjs +24 -0
- package/components/action-button/index.d.ts +7 -0
- package/{lib → components}/action-button/index.js +6 -7
- package/components/action-group/action-group.d.ts +50 -0
- package/{lib → components}/action-group/index.cjs +1 -1
- package/components/action-group/index.d.ts +7 -0
- package/{lib → components}/action-group/index.js +1 -1
- package/{lib/action-group-BoIH8s8R.js → components/action-group-B7oQXv30.js} +11 -12
- package/components/action-group-C8YUQzt8.cjs +20 -0
- package/components/action-menu/action-menu.d.ts +40 -0
- package/{lib → components}/action-menu/index.cjs +5 -5
- package/components/action-menu/index.d.ts +7 -0
- package/{lib → components}/action-menu/index.js +10 -11
- package/{lib/async-directive-FGzMycjH.js → components/async-directive-BhRGSTWB.js} +1 -1
- package/{lib/async-directive-CV2MII86.cjs → components/async-directive-_65ULPLK.cjs} +1 -1
- package/components/avatar/avatar.d.ts +31 -0
- package/components/avatar/index.cjs +24 -0
- package/components/avatar/index.d.ts +7 -0
- package/{lib → components}/avatar/index.js +13 -14
- package/components/base-CxUap9HL.js +665 -0
- package/components/base-rtxi7uaR.cjs +40 -0
- package/components/button/button-base.d.ts +44 -0
- package/components/button/button.d.ts +59 -0
- package/components/button/clear-button.d.ts +22 -0
- package/components/button/close-button.d.ts +24 -0
- package/components/button/index.cjs +20 -0
- package/components/button/index.d.ts +13 -0
- package/{lib → components}/button/index.js +11 -12
- package/{lib/button-base-DgtT6sU5.js → components/button-base-CgrTYVgq.js} +11 -12
- package/components/button-base-DjqSZyn2.cjs +25 -0
- package/components/button-group/button-group.d.ts +19 -0
- package/components/button-group/index.cjs +18 -0
- package/components/button-group/index.d.ts +7 -0
- package/{lib → components}/button-group/index.js +7 -8
- package/components/checkbox/checkbox-base.d.ts +9 -0
- package/components/checkbox/checkbox-mixin.d.ts +14 -0
- package/components/checkbox/checkbox.d.ts +54 -0
- package/components/checkbox/index.cjs +25 -0
- package/components/checkbox/index.d.ts +7 -0
- package/{lib → components}/checkbox/index.js +5 -6
- package/{lib/checkbox-mixin-DegQlk5C.js → components/checkbox-mixin-BRluTF9s.js} +15 -16
- package/{lib/checkbox-mixin-H0Hm-VLk.cjs → components/checkbox-mixin-iB-0ivgo.cjs} +3 -3
- package/{lib/clear-button-Ap5H3UyH.js → components/clear-button-CyLF5dx_.js} +6 -7
- package/components/clear-button-DFXE6MLx.cjs +18 -0
- package/components/close-button-CcD-aVqh.cjs +18 -0
- package/{lib/close-button-CGISEF33.js → components/close-button-CzpdWCWI.js} +8 -9
- package/components/color-area/color-area.d.ts +67 -0
- package/components/color-area/index.cjs +80 -0
- package/components/color-area/index.d.ts +7 -0
- package/{lib → components}/color-area/index.js +9 -10
- package/components/color-field/color-field.d.ts +20 -0
- package/components/color-field/index.cjs +23 -0
- package/components/color-field/index.d.ts +7 -0
- package/{lib → components}/color-field/index.js +2 -3
- package/components/color-handle/color-handle.d.ts +13 -0
- package/components/color-handle/index.cjs +24 -0
- package/components/color-handle/index.d.ts +7 -0
- package/{lib → components}/color-handle/index.js +2 -3
- package/components/color-loupe/color-loupe.d.ts +7 -0
- package/{lib → components}/color-loupe/index.cjs +1 -1
- package/components/color-loupe/index.d.ts +7 -0
- package/{lib → components}/color-loupe/index.js +1 -1
- package/components/color-loupe-BN3k1ACF.cjs +56 -0
- package/{lib/color-loupe-DBEApMDT.js → components/color-loupe-CD-dhmB1.js} +3 -4
- package/components/color-menu/color-menu.d.ts +54 -0
- package/components/color-menu/index.cjs +86 -0
- package/components/color-menu/index.d.ts +7 -0
- package/{lib → components}/color-menu/index.js +9 -10
- package/components/color-picker/color-picker.d.ts +39 -0
- package/components/color-picker/index.cjs +48 -0
- package/components/color-picker/index.d.ts +7 -0
- package/{lib → components}/color-picker/index.js +33 -34
- package/components/color-slider/color-slider.d.ts +57 -0
- package/components/color-slider/index.cjs +57 -0
- package/components/color-slider/index.d.ts +7 -0
- package/{lib → components}/color-slider/index.js +5 -6
- package/{lib/directive-helpers-C2vOfhFx.cjs → components/directive-helpers-C3pAxRR3.cjs} +1 -1
- package/{lib/directive-helpers-BLDZnGQv.js → components/directive-helpers-D0vm0gvF.js} +1 -1
- package/components/divider/divider.d.ts +24 -0
- package/components/divider/index.cjs +18 -0
- package/components/divider/index.d.ts +7 -0
- package/{lib → components}/divider/index.js +5 -6
- package/components/field-group/field-group.d.ts +24 -0
- package/{lib → components}/field-group/index.cjs +1 -1
- package/components/field-group/index.d.ts +7 -0
- package/{lib → components}/field-group/index.js +1 -1
- package/{lib/field-group-CBWafIUV.js → components/field-group-DAImvhSF.js} +2 -3
- package/components/field-group-d5Hkb8UW.cjs +23 -0
- package/components/field-label/field-label.d.ts +50 -0
- package/{lib → components}/field-label/index.cjs +1 -1
- package/components/field-label/index.d.ts +7 -0
- package/{lib → components}/field-label/index.js +1 -1
- package/components/field-label-D1zKXSG6.cjs +25 -0
- package/{lib/field-label-BK_tk8vP.js → components/field-label-DY9iRmRI.js} +14 -15
- package/{lib/focusable-DbUg-3Vp.js → components/focusable-Bze9xE25.js} +1 -1
- package/{lib/focusable-Dv_6CFaY.cjs → components/focusable-DyyBr-J-.cjs} +1 -1
- package/components/icon/icon-base.d.ts +11 -0
- package/components/icon/icon.d.ts +12 -0
- package/components/icon/index.cjs +18 -0
- package/components/icon/index.d.ts +7 -0
- package/{lib → components}/icon/index.js +4 -5
- package/{lib/if-defined-Cv6xanXh.cjs → components/if-defined-C-8FyBSN.cjs} +2 -2
- package/{lib/if-defined-CYpcjGCb.js → components/if-defined-XzWkhMhg.js} +1 -1
- package/{lib/index-yNcLzjhM.cjs → components/index-CNtoBntg.cjs} +15 -15
- package/{lib/index-ovT-qVzf.js → components/index-Ci6Jnhu4.js} +8 -9
- package/components/index.cjs +27 -0
- package/{lib/legend-position → components}/index.js +150 -28
- package/components/infield-button/index.cjs +22 -0
- package/components/infield-button/index.d.ts +7 -0
- package/{lib → components}/infield-button/index.js +3 -4
- package/components/infield-button/infield-button.d.ts +25 -0
- package/components/label/index.cjs +18 -0
- package/components/label/index.d.ts +7 -0
- package/{lib → components}/label/index.js +1 -2
- package/components/label/label.d.ts +7 -0
- package/components/legend-position/index.d.ts +7 -0
- package/components/legend-position/legend-position.d.ts +10 -0
- package/{lib/like-anchor-K8W0QYwC.cjs → components/like-anchor-DKuw8fJA.cjs} +4 -4
- package/{lib/like-anchor-cDeGGeHh.js → components/like-anchor-DnsAwo_O.js} +8 -9
- package/{lib/manage-help-text-2mSEy-AD.js → components/manage-help-text-B-FXFXgT.js} +8 -8
- package/{lib/manage-help-text-iOk-zmy8.cjs → components/manage-help-text-I5aYDAKT.cjs} +3 -3
- package/{lib → components}/menu/index.cjs +1 -1
- package/components/menu/index.d.ts +16 -0
- package/{lib → components}/menu/index.js +1 -1
- package/components/menu/menu-divider.d.ts +14 -0
- package/components/menu/menu-group.d.ts +17 -0
- package/components/menu/menu-item.d.ts +125 -0
- package/components/menu/menu.d.ts +119 -0
- package/components/multi-language-field/index.cjs +39 -0
- package/components/multi-language-field/index.d.ts +7 -0
- package/{lib → components}/multi-language-field/index.js +6 -7
- package/components/multi-language-field/multi-language-field.d.ts +41 -0
- package/components/number-field/index.cjs +57 -0
- package/components/number-field/index.d.ts +7 -0
- package/{lib → components}/number-field/index.js +23 -24
- package/components/number-field/number-field.d.ts +113 -0
- package/{lib/observe-slot-text-BmsCNJig.cjs → components/observe-slot-text-DeSKIzvP.cjs} +1 -1
- package/{lib/observe-slot-text-BoFRF-VI.js → components/observe-slot-text-DrM71me1.js} +1 -1
- package/components/overlay/abstract-overlay.d.ts +72 -0
- package/components/overlay/click-controller.d.ts +14 -0
- package/components/overlay/events.d.ts +23 -0
- package/components/overlay/full-size-plugin.d.ts +12 -0
- package/components/overlay/hover-controller.d.ts +20 -0
- package/components/overlay/index.cjs +73 -0
- package/components/overlay/index.d.ts +22 -0
- package/{lib → components}/overlay/index.js +53 -36
- package/components/overlay/interaction-controller.d.ts +38 -0
- package/components/overlay/loader.d.ts +4 -0
- package/components/overlay/longpress-controller.d.ts +21 -0
- package/components/overlay/overlay-dialog.d.ts +4 -0
- package/components/overlay/overlay-events.d.ts +11 -0
- package/components/overlay/overlay-no-popover.d.ts +4 -0
- package/components/overlay/overlay-popover.d.ts +4 -0
- package/components/overlay/overlay-stack.d.ts +44 -0
- package/components/overlay/overlay-timer.d.ts +21 -0
- package/components/overlay/overlay-trigger-directive.d.ts +26 -0
- package/components/overlay/overlay-trigger.d.ts +53 -0
- package/components/overlay/overlay-types.d.ts +50 -0
- package/components/overlay/overlay.d.ts +464 -0
- package/components/overlay/placement-controller.d.ts +157 -0
- package/components/overlay/slottable-request-directive.d.ts +17 -0
- package/components/overlay/slottable-request-event.d.ts +12 -0
- package/components/overlay/strategies.d.ts +8 -0
- package/components/overlay/virtual-trigger.d.ts +7 -0
- package/{lib/overlay-C7QKFqRc.js → components/overlay-C2Cck0Az.js} +53 -43
- package/components/overlay-dn6Xe_vz.cjs +47 -0
- package/{lib/pending-state-D5KTK4_1.js → components/pending-state--XOfTjzE.js} +2 -2
- package/{lib/pending-state-Dbc2HIM2.cjs → components/pending-state-BeJ7iP-O.cjs} +2 -2
- package/components/picker/desktop-controller.d.ts +7 -0
- package/{lib → components}/picker/index.cjs +1 -1
- package/components/picker/index.d.ts +7 -0
- package/{lib → components}/picker/index.js +2 -2
- package/components/picker/interaction-controller.d.ts +43 -0
- package/components/picker/mobile-controller.d.ts +9 -0
- package/components/picker/picker.d.ts +154 -0
- package/components/picker/strategies.d.ts +6 -0
- package/components/picker-8cOc-jjh.cjs +127 -0
- package/components/picker-BZAWrSDk.js +655 -0
- package/{lib → components}/popover/index.cjs +1 -1
- package/components/popover/index.d.ts +7 -0
- package/{lib → components}/popover/index.js +1 -1
- package/components/popover/popover.d.ts +29 -0
- package/components/popover-CCzs4VH8.cjs +30 -0
- package/{lib/popover-ZRVxogyp.js → components/popover-D0EliN0L.js} +7 -8
- package/{lib → components}/progress-circle/index.cjs +1 -1
- package/components/progress-circle/index.d.ts +7 -0
- package/{lib → components}/progress-circle/index.js +1 -1
- package/components/progress-circle/progress-circle.d.ts +35 -0
- package/components/progress-circle-DYSSkjlY.cjs +33 -0
- package/{lib/progress-circle-DpXiqW6a.js → components/progress-circle-_-9sAlMM.js} +5 -6
- package/components/radio/index.cjs +22 -0
- package/components/radio/index.d.ts +10 -0
- package/{lib → components}/radio/index.js +10 -11
- package/components/radio/radio-group.d.ts +27 -0
- package/components/radio/radio.d.ts +39 -0
- package/components/search/index.cjs +45 -0
- package/components/search/index.d.ts +7 -0
- package/{lib → components}/search/index.js +3 -4
- package/components/search/search.d.ts +27 -0
- package/{lib/sized-mixin-BSYHt8nT.cjs → components/sized-mixin-BAI6NiE2.cjs} +1 -1
- package/{lib/sized-mixin-Dl0KoEcV.js → components/sized-mixin-DcJTTohI.js} +1 -1
- package/components/slider/index.cjs +18 -0
- package/components/slider/index.d.ts +7 -0
- package/{lib → components}/slider/index.js +5 -6
- package/components/slider/slider.d.ts +24 -0
- package/{lib/state-BAO-13Bs.js → components/state-D8vot9IB.js} +1 -1
- package/{lib/state-DReJ3hB6.cjs → components/state-WWHLNMRG.cjs} +1 -1
- package/{lib/streaming-listener-DLo0wkMc.js → components/streaming-listener-BbmNyKWO.js} +2 -2
- package/components/streaming-listener-C2A7ZJZP.cjs +18 -0
- package/{lib/style-map-BqvQDFJt.js → components/style-map-CoBJRbvu.js} +1 -1
- package/{lib/style-map-BjBGQ_u3.cjs → components/style-map-DH0jkl7s.cjs} +2 -2
- package/components/swatch/index.cjs +49 -0
- package/components/swatch/index.d.ts +10 -0
- package/{lib → components}/swatch/index.js +9 -10
- package/components/swatch/swatch-group.d.ts +41 -0
- package/components/swatch/swatch.d.ts +40 -0
- package/components/switch/index.cjs +22 -0
- package/components/switch/index.d.ts +7 -0
- package/{lib → components}/switch/index.js +6 -7
- package/components/switch/switch.d.ts +27 -0
- package/components/tags/index.cjs +32 -0
- package/components/tags/index.d.ts +10 -0
- package/{lib → components}/tags/index.js +17 -18
- package/components/tags/tag.d.ts +29 -0
- package/components/tags/tags.d.ts +28 -0
- package/components/text-field/help-text-manager.d.ts +19 -0
- package/components/text-field/help-text.d.ts +20 -0
- package/components/text-field/index.cjs +21 -0
- package/components/text-field/index.d.ts +14 -0
- package/{lib → components}/text-field/index.js +9 -9
- package/components/text-field/manage-help-text.d.ts +13 -0
- package/components/text-field/text-field.d.ts +142 -0
- package/{lib/text-field-DPk332j9.js → components/text-field-05QNK_Lj.js} +28 -30
- package/{lib/text-field-C6Aa7XOb.cjs → components/text-field-BU7yxiOR.cjs} +15 -15
- package/components/toast/index.cjs +51 -0
- package/components/toast/index.d.ts +7 -0
- package/{lib → components}/toast/index.js +2 -3
- package/components/toast/toast.d.ts +77 -0
- package/components/tooltip/index.cjs +45 -0
- package/components/tooltip/index.d.ts +8 -0
- package/{lib → components}/tooltip/index.js +10 -11
- package/components/tooltip/tooltip-directive.d.ts +5 -0
- package/components/tooltip/tooltip.d.ts +55 -0
- package/components/unit-input/index.cjs +43 -0
- package/components/unit-input/index.d.ts +7 -0
- package/{lib → components}/unit-input/index.js +5 -6
- package/components/unit-input/unit-input.d.ts +33 -0
- package/index.d.ts +39 -0
- package/package.json +139 -101
- package/utils/base.d.ts +16 -0
- package/utils/condition-attribute-with-id.d.ts +2 -0
- package/utils/first-focusable-in.d.ts +3 -0
- package/utils/focus-visible.d.ts +29 -0
- package/utils/focusable-selectors.d.ts +2 -0
- package/utils/focusable.d.ts +58 -0
- package/utils/get-css-variable.d.ts +1 -0
- package/utils/get-label-from-slot.d.ts +1 -0
- package/utils/like-anchor.d.ts +23 -0
- package/utils/observe-slot-presence.d.ts +12 -0
- package/utils/observe-slot-text.d.ts +11 -0
- package/utils/platform.d.ts +10 -0
- package/utils/random-id.d.ts +1 -0
- package/utils/reactive-controllers/color.d.ts +54 -0
- package/utils/reactive-controllers/dependency-manger.d.ts +26 -0
- package/utils/reactive-controllers/element-resolution.d.ts +23 -0
- package/utils/reactive-controllers/focus-group.d.ts +62 -0
- package/utils/reactive-controllers/language-resolution.d.ts +11 -0
- package/utils/reactive-controllers/match-media.d.ts +13 -0
- package/utils/reactive-controllers/pending-state.d.ts +41 -0
- package/utils/reactive-controllers/roving-tabindex.d.ts +19 -0
- package/utils/reparent-child.d.ts +4 -0
- package/utils/sized-mixin.d.ts +17 -0
- package/utils/streaming-listener.d.ts +48 -0
- package/lib/accordion/index.cjs +0 -43
- package/lib/action-bar/index.cjs +0 -39
- package/lib/action-button/index.cjs +0 -24
- package/lib/action-group-D4MxBrq8.cjs +0 -20
- package/lib/avatar/index.cjs +0 -24
- package/lib/base-BCmA9Wxv.cjs +0 -30
- package/lib/base-nYalvNMy.js +0 -390
- package/lib/button/index.cjs +0 -20
- package/lib/button-base-B0iB_JTv.cjs +0 -25
- package/lib/button-group/index.cjs +0 -18
- package/lib/checkbox/index.cjs +0 -25
- package/lib/clear-button-D0djuaLb.cjs +0 -18
- package/lib/close-button-BrfeZvjk.cjs +0 -18
- package/lib/color-area/index.cjs +0 -80
- package/lib/color-field/index.cjs +0 -23
- package/lib/color-handle/index.cjs +0 -24
- package/lib/color-loupe-BICpNqFs.cjs +0 -56
- package/lib/color-menu/index.cjs +0 -86
- package/lib/color-picker/index.cjs +0 -48
- package/lib/color-slider/index.cjs +0 -57
- package/lib/divider/index.cjs +0 -18
- package/lib/field-group-TUFvhJkk.cjs +0 -23
- package/lib/field-label-BrJaeORz.cjs +0 -25
- package/lib/icon/index.cjs +0 -18
- package/lib/index.cjs +0 -18
- package/lib/index.js +0 -133
- package/lib/infield-button/index.cjs +0 -22
- package/lib/label/index.cjs +0 -18
- package/lib/legend-position/index.cjs +0 -27
- package/lib/lit-html-B3ugcwD9.js +0 -248
- package/lib/lit-html-p4Oxv2-5.cjs +0 -24
- package/lib/multi-language-field/index.cjs +0 -39
- package/lib/number-field/index.cjs +0 -57
- package/lib/overlay/index.cjs +0 -73
- package/lib/overlay-DScraBAi.cjs +0 -47
- package/lib/picker--2OCYWnV.js +0 -657
- package/lib/picker-B9W7Haf4.cjs +0 -127
- package/lib/popover-CVbjhSnx.cjs +0 -30
- package/lib/progress-circle-CiJoS8J7.cjs +0 -33
- package/lib/radio/index.cjs +0 -22
- package/lib/search/index.cjs +0 -45
- package/lib/slider/index.cjs +0 -18
- package/lib/streaming-listener-Bw4jE33f.cjs +0 -18
- package/lib/swatch/index.cjs +0 -49
- package/lib/switch/index.cjs +0 -22
- package/lib/tags/index.cjs +0 -32
- package/lib/text-field/index.cjs +0 -21
- package/lib/toast/index.cjs +0 -51
- package/lib/tooltip/index.cjs +0 -45
- package/lib/unit-input/index.cjs +0 -43
- /package/{lib → components}/base-BjTwmyRF.cjs +0 -0
- /package/{lib → components}/base-D76d76ww.js +0 -0
- /package/{lib → components}/color-Bg3tYsAQ.js +0 -0
- /package/{lib → components}/color-DphK4hwx.cjs +0 -0
- /package/{lib → components}/condition-attribute-with-id-DrQYZzFS.cjs +0 -0
- /package/{lib → components}/condition-attribute-with-id-Dv4lSRbe.js +0 -0
- /package/{lib → components}/dependency-manger-C5HCkMMB.cjs +0 -0
- /package/{lib → components}/dependency-manger-CEXvGQUV.js +0 -0
- /package/{lib → components}/directive-C7oCP5Bh.cjs +0 -0
- /package/{lib → components}/directive-oAbCiebi.js +0 -0
- /package/{lib → components}/divider.module-CXMNveQc.cjs +0 -0
- /package/{lib → components}/divider.module-DwOuLGU3.js +0 -0
- /package/{lib → components}/element-resolution-BvRLGqIU.cjs +0 -0
- /package/{lib → components}/element-resolution-FCUT-wql.js +0 -0
- /package/{lib → components}/focus-group-DHeTq18L.js +0 -0
- /package/{lib → components}/focus-group-DnxZUBhQ.cjs +0 -0
- /package/{lib → components}/focus-visible-B0P9aY_G.cjs +0 -0
- /package/{lib → components}/focus-visible-DBlJGoEW.js +0 -0
- /package/{lib → components}/focusable-selectors-B4YgbghQ.js +0 -0
- /package/{lib → components}/focusable-selectors-BgFlyFcY.cjs +0 -0
- /package/{lib → components}/index-C1chwzNp.js +0 -0
- /package/{lib → components}/index-DCKCHDTt.cjs +0 -0
- /package/{lib → components}/mutation-controller-DH7YOCyj.js +0 -0
- /package/{lib → components}/mutation-controller-DkOMCW-c.cjs +0 -0
- /package/{lib → components}/platform-CQzYNWKq.cjs +0 -0
- /package/{lib → components}/platform-DQYMG7JI.js +0 -0
- /package/{lib → components}/query-BL-TJj7K.cjs +0 -0
- /package/{lib → components}/query-D_KR_GUc.js +0 -0
- /package/{lib → components}/query-assigned-elements-DjfhL1cl.js +0 -0
- /package/{lib → components}/query-assigned-elements-DsKsfk7G.cjs +0 -0
- /package/{lib → components}/query-assigned-nodes-BcKWmGzy.cjs +0 -0
- /package/{lib → components}/query-assigned-nodes-C76XVPWY.js +0 -0
- /package/{lib → components}/random-id-ByCz1xaq.js +0 -0
- /package/{lib → components}/random-id-CqvckpWe.cjs +0 -0
- /package/{lib → components}/roving-tabindex-By_fCy_e.cjs +0 -0
- /package/{lib → components}/roving-tabindex-DOg4z6ZU.js +0 -0
- /package/{lib → components}/slottable-request-event-BfUUt1Mh.cjs +0 -0
- /package/{lib → components}/slottable-request-event-DggLA4Rx.js +0 -0
- /package/{lib → components}/when-CDK1Tt5Y.js +0 -0
- /package/{lib → components}/when-CDZyJPvd.cjs +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveElement } from 'lit';
|
|
2
|
+
type DirectionTypes = 'horizontal' | 'vertical' | 'both' | 'grid';
|
|
3
|
+
export type FocusGroupConfig<T> = {
|
|
4
|
+
focusInIndex?: (_elements: T[]) => number;
|
|
5
|
+
direction?: DirectionTypes | (() => DirectionTypes);
|
|
6
|
+
elementEnterAction?: (el: T) => void;
|
|
7
|
+
elements: () => T[];
|
|
8
|
+
isFocusableElement?: (el: T) => boolean;
|
|
9
|
+
listenerScope?: HTMLElement | (() => HTMLElement);
|
|
10
|
+
};
|
|
11
|
+
export declare class FocusGroupController<T extends HTMLElement> implements ReactiveController {
|
|
12
|
+
protected cachedElements?: T[];
|
|
13
|
+
private mutationObserver;
|
|
14
|
+
get currentIndex(): number;
|
|
15
|
+
set currentIndex(currentIndex: number);
|
|
16
|
+
private _currentIndex;
|
|
17
|
+
private prevIndex;
|
|
18
|
+
get direction(): DirectionTypes;
|
|
19
|
+
_direction: () => DirectionTypes;
|
|
20
|
+
directionLength: number;
|
|
21
|
+
elementEnterAction: (_el: T) => void;
|
|
22
|
+
get elements(): T[];
|
|
23
|
+
private _elements;
|
|
24
|
+
protected set focused(focused: boolean);
|
|
25
|
+
protected get focused(): boolean;
|
|
26
|
+
private _focused;
|
|
27
|
+
get focusInElement(): T;
|
|
28
|
+
get focusInIndex(): number;
|
|
29
|
+
_focusInIndex: (_elements: T[]) => number;
|
|
30
|
+
host: ReactiveElement;
|
|
31
|
+
isFocusableElement: (_el: T) => boolean;
|
|
32
|
+
isEventWithinListenerScope(event: Event): boolean;
|
|
33
|
+
_listenerScope: () => HTMLElement;
|
|
34
|
+
offset: number;
|
|
35
|
+
recentlyConnected: boolean;
|
|
36
|
+
constructor(host: ReactiveElement, { direction, elementEnterAction, elements, focusInIndex, isFocusableElement, listenerScope }?: FocusGroupConfig<T>);
|
|
37
|
+
handleItemMutation(): void;
|
|
38
|
+
update({ elements }?: FocusGroupConfig<T>): void;
|
|
39
|
+
focus(options?: FocusOptions): void;
|
|
40
|
+
clearElementCache(offset?: number): void;
|
|
41
|
+
setCurrentIndexCircularly(diff: number): void;
|
|
42
|
+
hostContainsFocus(): void;
|
|
43
|
+
hostNoLongerContainsFocus(): void;
|
|
44
|
+
isRelatedTargetOrContainAnElement(event: FocusEvent): boolean;
|
|
45
|
+
handleFocusin: (event: FocusEvent) => void;
|
|
46
|
+
/**
|
|
47
|
+
* handleClick - Finds the element that was clicked and sets the tabindex to 0
|
|
48
|
+
* @returns void
|
|
49
|
+
*/
|
|
50
|
+
handleClick: () => void;
|
|
51
|
+
handleFocusout: (event: FocusEvent) => void;
|
|
52
|
+
acceptsEventCode(code: string): boolean;
|
|
53
|
+
handleKeydown: (event: KeyboardEvent) => void;
|
|
54
|
+
manage(): void;
|
|
55
|
+
unmanage(): void;
|
|
56
|
+
addEventListeners(): void;
|
|
57
|
+
removeEventListeners(): void;
|
|
58
|
+
hostConnected(): void;
|
|
59
|
+
hostDisconnected(): void;
|
|
60
|
+
hostUpdated(): void;
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveElement } from 'lit';
|
|
2
|
+
export declare const languageResolverUpdatedSymbol: unique symbol;
|
|
3
|
+
export declare class LanguageResolutionController implements ReactiveController {
|
|
4
|
+
private host;
|
|
5
|
+
language: string;
|
|
6
|
+
private unsubscribe?;
|
|
7
|
+
constructor(host: ReactiveElement);
|
|
8
|
+
hostConnected(): void;
|
|
9
|
+
hostDisconnected(): void;
|
|
10
|
+
private resolveLanguage;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveElement } from 'lit';
|
|
2
|
+
export declare const DARK_MODE = "(prefers-color-scheme: dark)";
|
|
3
|
+
export declare const IS_MOBILE = "(max-width: 743px) and (hover: none) and (pointer: coarse)";
|
|
4
|
+
export declare class MatchMediaController implements ReactiveController {
|
|
5
|
+
key: symbol;
|
|
6
|
+
matches: boolean;
|
|
7
|
+
protected host: ReactiveElement;
|
|
8
|
+
protected media: MediaQueryList;
|
|
9
|
+
constructor(host: ReactiveElement, query: string);
|
|
10
|
+
hostConnected(): void;
|
|
11
|
+
hostDisconnected(): void;
|
|
12
|
+
protected onChange(event: MediaQueryListEvent): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ReactiveController, TemplateResult } from 'lit';
|
|
2
|
+
import '../../components/progress-circle/progress-circle';
|
|
3
|
+
import { LuzmoElement } from '../base';
|
|
4
|
+
/**
|
|
5
|
+
* Represents a host element with pending state.
|
|
6
|
+
*/
|
|
7
|
+
export interface HostWithPendingState extends LuzmoElement {
|
|
8
|
+
pendingLabel?: string;
|
|
9
|
+
pending: boolean;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
pendingStateController: PendingStateController<HostWithPendingState>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Represents a controller for managing the pending state of a reactive element.
|
|
15
|
+
*
|
|
16
|
+
* @template T - The type of the reactive element.
|
|
17
|
+
*/
|
|
18
|
+
export declare class PendingStateController<T extends HostWithPendingState> implements ReactiveController {
|
|
19
|
+
/**
|
|
20
|
+
* The host element that this controller is attached to.
|
|
21
|
+
*/
|
|
22
|
+
host: T;
|
|
23
|
+
/**
|
|
24
|
+
* Creates an instance of PendingStateController.
|
|
25
|
+
* @param host - The host element that this controller is attached to.
|
|
26
|
+
*/
|
|
27
|
+
constructor(host: T);
|
|
28
|
+
cachedAriaLabel: string | null;
|
|
29
|
+
/**
|
|
30
|
+
* Renders the pending state UI.
|
|
31
|
+
* @returns A TemplateResult representing the pending state UI.
|
|
32
|
+
*/
|
|
33
|
+
renderPendingState(): TemplateResult;
|
|
34
|
+
/**
|
|
35
|
+
* Updates the ARIA label of the host element based on the pending state.
|
|
36
|
+
* Manages Cached Aria Label
|
|
37
|
+
*/
|
|
38
|
+
private updateAriaLabel;
|
|
39
|
+
hostConnected(): void;
|
|
40
|
+
hostUpdated(): void;
|
|
41
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FocusGroupConfig, FocusGroupController } from './focus-group';
|
|
2
|
+
export type RovingTabindexConfig<T> = FocusGroupConfig<T>;
|
|
3
|
+
interface UpdateTabIndexes {
|
|
4
|
+
tabIndex: number;
|
|
5
|
+
removeTabIndex?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare class RovingTabindexController<T extends HTMLElement> extends FocusGroupController<T> {
|
|
8
|
+
protected set focused(focused: boolean);
|
|
9
|
+
protected get focused(): boolean;
|
|
10
|
+
private managed;
|
|
11
|
+
private manageIndexesAnimationFrame;
|
|
12
|
+
clearElementCache(offset?: number): void;
|
|
13
|
+
manageTabindexes(): void;
|
|
14
|
+
updateTabindexes(getTabIndex: (el: HTMLElement) => UpdateTabIndexes): void;
|
|
15
|
+
manage(): void;
|
|
16
|
+
unmanage(): void;
|
|
17
|
+
hostUpdated(): void;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactiveElement } from 'lit';
|
|
2
|
+
type Constructor<T = Record<string, unknown>> = {
|
|
3
|
+
new (...args: any[]): T;
|
|
4
|
+
prototype: T;
|
|
5
|
+
};
|
|
6
|
+
export type ElementSize = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
|
|
7
|
+
export declare const ElementSizes: Record<string, ElementSize>;
|
|
8
|
+
export type DefaultElementSize = Exclude<ElementSize, 'xxs' | 'xs' | 'xxl'>;
|
|
9
|
+
export interface SizedElementInterface {
|
|
10
|
+
size: ElementSize;
|
|
11
|
+
}
|
|
12
|
+
export declare function SizedMixin<T extends Constructor<ReactiveElement>>(constructor: T, { validSizes, noDefaultSize, defaultSize }?: {
|
|
13
|
+
validSizes?: ElementSize[];
|
|
14
|
+
noDefaultSize?: boolean;
|
|
15
|
+
defaultSize?: ElementSize;
|
|
16
|
+
}): T & Constructor<SizedElementInterface>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { nothing, Part } from 'lit';
|
|
2
|
+
import { AsyncDirective } from 'lit/async-directive.js';
|
|
3
|
+
import type { DirectiveResult } from 'lit/directive.js';
|
|
4
|
+
type ListenerConfig = [string | string[], (event?: any) => void];
|
|
5
|
+
type ListenerConfigGroup = {
|
|
6
|
+
start: ListenerConfig;
|
|
7
|
+
end: ListenerConfig;
|
|
8
|
+
streamInside?: ListenerConfig;
|
|
9
|
+
streamOutside?: ListenerConfig;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Performantly manage listening to event in a series, like:
|
|
13
|
+
* - `input[type="range"]`: input, input, etc. => change
|
|
14
|
+
* - `luzmo-color-area`: pointerdown => pointermove, pointermove, etc. => pointerup
|
|
15
|
+
* Lazily bind events to the specific part of the series while
|
|
16
|
+
* throttling streamed events to 1/frame.
|
|
17
|
+
*/
|
|
18
|
+
declare class StreamingListenerDirective extends AsyncDirective {
|
|
19
|
+
host: EventTarget | Record<string, unknown> | Element;
|
|
20
|
+
element: Element;
|
|
21
|
+
start: ListenerConfig;
|
|
22
|
+
streamInside: ListenerConfig;
|
|
23
|
+
end: ListenerConfig;
|
|
24
|
+
streamOutside: ListenerConfig;
|
|
25
|
+
state: 'off' | 'on';
|
|
26
|
+
stream?: number;
|
|
27
|
+
render(_configGroup: ListenerConfigGroup): typeof nothing;
|
|
28
|
+
update(part: Part, [{ start, end, streamInside, streamOutside }]: Parameters<this['render']>): void;
|
|
29
|
+
addListeners(state?: 'on' | 'off'): void;
|
|
30
|
+
callHandler(value: (event: Event) => void | EventListenerObject, event: Event): void;
|
|
31
|
+
handleStream(value: (event: Event) => void | EventListenerObject, event: Event): void;
|
|
32
|
+
clearStream(): void;
|
|
33
|
+
handleStart: (event: Event) => void;
|
|
34
|
+
handleInside: (event: Event) => void;
|
|
35
|
+
handleEnd: (event: Event) => void;
|
|
36
|
+
handleOutside: (event: Event) => void;
|
|
37
|
+
addListener(type: string | string[], fn: (event: Event) => void): void;
|
|
38
|
+
removeListener(type: string | string[], fn: (event: Event) => void): void;
|
|
39
|
+
removeListeners(): void;
|
|
40
|
+
disconnected(): void;
|
|
41
|
+
reconnected(): void;
|
|
42
|
+
}
|
|
43
|
+
export declare const streamingListener: (_configGroup: ListenerConfigGroup) => DirectiveResult<typeof StreamingListenerDirective>;
|
|
44
|
+
/**
|
|
45
|
+
* The type of the class that powers this directive. Necessary for naming the
|
|
46
|
+
* directive's return type.
|
|
47
|
+
*/
|
|
48
|
+
export type { StreamingListenerDirective };
|
package/lib/accordion/index.cjs
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
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
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("lit"),r=require("../base-BCmA9Wxv.cjs"),g=require("../query-assigned-nodes-BcKWmGzy.cjs"),v=require("../focus-group-DnxZUBhQ.cjs"),z=require("../sized-mixin-BSYHt8nT.cjs"),h=require("@luzmo/icons"),p=require("../focusable-Dv_6CFaY.cjs"),f=require("../when-CDZyJPvd.cjs"),b=":host{--accordion-item-header-line-height: 1.25;--accordion-item-header-bottom-margin: 0px;--accordion-item-header-text-case: initial;--accordion-item-min-block-size: max( var(--luzmo-accordion-item-height, var(--accordion-item-height)), calc( var( --luzmo-accordion-item-header-vertical-padding, var(--accordion-item-header-vertical-padding) ) * 2 + var( --luzmo-accordion-item-header-font-size, var(--accordion-item-header-font-size) ) * var( --luzmo-accordion-item-header-line-height, var(--accordion-item-header-line-height) ) ) );margin:0;padding:0;list-style:none;display:block}:host:lang(ja),:host:lang(ko),:host:lang(zh){--luzmo-accordion-item-header-line-height: var( --luzmo-accordion-item-header-line-height-cjk );--luzmo-accordion-item-content-line-height: var( --luzmo-accordion-item-content-line-height-cjk )}:host:dir(rtl),:host([dir=rtl]){--luzmo-logical-rotation: matrix(-1, 0, 0, 1, 0, 0)}:host([size=s]){--accordion-item-height: 32px;--accordion-disclosure-indicator-height: var(--luzmo-font-size-s);--accordion-edge-to-disclosure-indicator-space: var(--luzmo-spacing-2);--accordion-disclosure-indicator-to-text-space: var(--luzmo-spacing-2);--accordion-item-edge-to-text: var(--luzmo-spacing-3);--accordion-item-header-font-size: var(--luzmo-font-size);--accordion-item-content-font-size: var(--luzmo-font-size-s);--accordion-item-header-vertical-padding: var(--luzmo-spacing-2)}:host{--accordion-item-height: 40px;--accordion-disclosure-indicator-height: var(--luzmo-font-size);--accordion-edge-to-disclosure-indicator-space: var(--luzmo-spacing-2);--accordion-disclosure-indicator-to-text-space: var(--luzmo-spacing-2);--accordion-item-edge-to-text: var(--luzmo-spacing-3);--accordion-item-header-font-size: var(--luzmo-font-size-l);--accordion-item-content-font-size: var(--luzmo-font-size);--accordion-item-header-vertical-padding: var(--luzmo-spacing-3)}:host([size=l]){--accordion-item-height: 48px;--accordion-disclosure-indicator-height: var(--luzmo-font-size-l);--accordion-edge-to-disclosure-indicator-space: var(--luzmo-spacing-3);--accordion-disclosure-indicator-to-text-space: var(--luzmo-spacing-2);--accordion-item-edge-to-text: var(--luzmo-spacing-4);--accordion-item-header-font-size: var(--luzmo-font-size-xl);--accordion-item-content-font-size: var(--luzmo-font-size-l);--accordion-item-header-vertical-padding: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) )}:host([size=xl]){--accordion-item-height: 56px;--accordion-disclosure-indicator-height: var(--luzmo-font-size-xl);--accordion-edge-to-disclosure-indicator-space: var(--luzmo-spacing-3);--accordion-disclosure-indicator-to-text-space: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--accordion-item-edge-to-text: var(--luzmo-spacing-4);--accordion-item-header-font-size: var(--luzmo-font-size-xxl);--accordion-item-content-font-size: var(--luzmo-font-size-xl);--accordion-item-header-vertical-padding: var(--luzmo-spacing-4)}:host([density=compact][size=s]){--accordion-item-height: 24px;--accordion-item-header-vertical-padding: var(--luzmo-spacing-1)}:host([density=compact]){--accordion-item-height: 32px;--accordion-item-header-vertical-padding: var(--luzmo-spacing-2)}:host([density=compact][size=l]){--accordion-item-height: 40px;--accordion-item-header-vertical-padding: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) )}:host([density=compact][size=xl]){--accordion-item-height: 48px;--accordion-item-header-vertical-padding: var(--luzmo-spacing-3)}:host([density=spacious][size=s]){--accordion-item-header-vertical-padding: var(--luzmo-spacing-3)}:host([density=spacious]){--accordion-item-header-vertical-padding: var(--luzmo-spacing-4)}:host([density=spacious][size=l]){--accordion-item-header-vertical-padding: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) )}:host([density=spacious][size=xl]){--accordion-item-header-vertical-padding: var(--luzmo-spacing-4)}:host([header-case=uppercase]){--accordion-item-header-text-case: uppercase}:host([header-case=uppercase][size=s]){--accordion-item-header-font-size: var(--luzmo-font-size-xs)}:host([header-case=uppercase]){--accordion-item-header-font-size: var(--luzmo-font-size-s)}:host([header-case=uppercase][size=l]){--accordion-item-header-font-size: var(--luzmo-font-size)}:host([header-case=uppercase][size=xl]){--accordion-item-header-font-size: var(--luzmo-font-size-l)}:host([variant=highlight]){--accordion-item-header-background-color: var( --luzmo-background-color-highlight );--accordion-item-disabled-background-color: var( --luzmo-background-color-highlight-disabled );--accordion-item-accordion-divider-thickness: 0px;--accordion-item-accordion-header-border-radius: var(--luzmo-border-radius)}:host([variant=highlight][size=s]){--accordion-item-height: 28px;--accordion-disclosure-indicator-height: var(luzmo-font-size-xs);--accordion-edge-to-disclosure-indicator-space: var(--luzmo-spacing-3);--accordion-disclosure-indicator-to-text-space: var(--luzmo-spacing-2);--accordion-item-header-font-size: var(--luzmo-font-size-s);--accordion-item-content-font-size: var(--luzmo-font-size-s);--accordion-item-header-bottom-margin: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) )}:host([variant=highlight][size=s][header-case=uppercase]){--accordion-item-header-font-size: var(--luzmo-font-size-xs)}:host([variant=highlight]){--accordion-item-height: 32px;--accordion-disclosure-indicator-height: var(luzmo-font-size-s);--accordion-edge-to-disclosure-indicator-space: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--accordion-disclosure-indicator-to-text-space: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--accordion-item-header-font-size: var(--luzmo-font-size);--accordion-item-content-font-size: var(--luzmo-font-size);--accordion-item-header-bottom-margin: var(--luzmo-spacing-3)}:host([variant=highlight][header-case=uppercase]){--accordion-item-header-font-size: var(--luzmo-font-size-s)}:host([variant=highlight][size=l]){--accordion-item-height: 48px;--accordion-disclosure-indicator-height: var(luzmo-font-size);--accordion-edge-to-disclosure-indicator-space: var(--luzmo-spacing-4);--accordion-disclosure-indicator-to-text-space: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--accordion-item-header-font-size: var(--luzmo-font-size-l);--accordion-item-content-font-size: var(--luzmo-font-size-l);--accordion-item-header-bottom-margin: calc( var(--luzmo-spacing-1) + var(--luzmo-spacing-3) );--accordion-item-header-bottom-margin: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) )}:host([variant=highlight][size=l][header-case=uppercase]){--accordion-item-header-font-size: var(--luzmo-font-size)}:host([variant=highlight][size=xl]){--accordion-item-height: 56px;--accordion-disclosure-indicator-height: var(luzmo-font-size-l);--accordion-edge-to-disclosure-indicator-space: var(--luzmo-spacing-4);--accordion-disclosure-indicator-to-text-space: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--accordion-item-header-font-size: var(--luzmo-font-size-xl);--accordion-item-content-font-size: var(--luzmo-font-size-xl);--accordion-item-header-bottom-margin: var(--luzmo-spacing-4);--accordion-item-header-bottom-margin: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) )}:host([variant=highlight][size=xl][header-case=uppercase]){--accordion-item-header-font-size: var(--luzmo-font-size-l)}:host([variant=highlight-child]){--accordion-item-header-background-color: var(--luzmo-background-color);--accordion-item-disabled-background-color: transparent;--accordion-item-accordion-divider-thickness: 0px;--accordion-item-accordion-header-border-radius: var(--luzmo-border-radius);--accordion-item-header-font-weight: normal;--accordion-item-content-border-left-width: var(--luzmo-border-width);--accordion-item-content-border-left-color: var(--luzmo-border-color);--accordion-item-content-border-left-style: solid;--accordion-edge-to-disclosure-indicator-space: 0px}:host([variant=highlight-child][size=s]){--accordion-item-height: 28px;--accordion-disclosure-indicator-height: var(luzmo-font-size-xs);--accordion-edge-to-disclosure-indicator-space: 0px;--accordion-disclosure-indicator-to-text-space: var(--luzmo-spacing-2);--accordion-item-edge-to-text: var(--luzmo-spacing-3);--accordion-item-header-font-size: var(--luzmo-font-size-s);--accordion-item-content-font-size: var(--luzmo-font-size-s);--accordion-item-content-margin-left: var(--luzmo-spacing-2);--accordion-item-content-padding-left: var(--luzmo-spacing-4);--accordion-item-content-margin-bottom: var(--luzmo-spacing-2)}:host([variant=highlight-child][size=s][header-case=uppercase]){--accordion-item-header-font-size: var(--luzmo-font-size-xs)}:host([variant=highlight-child]){--accordion-item-height: 32px;--accordion-disclosure-indicator-height: var(luzmo-font-size-s);--accordion-edge-to-disclosure-indicator-space: 0px;--accordion-disclosure-indicator-to-text-space: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--accordion-item-edge-to-text: var(--luzmo-spacing-3);--accordion-item-header-font-size: var(--luzmo-font-size);--accordion-item-content-font-size: var(--luzmo-font-size);--accordion-item-header-bottom-margin: var(--luzmo-spacing-3);--accordion-item-content-margin-left: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--accordion-item-content-padding-left: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--accordion-item-content-margin-bottom: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) )}:host([variant=highlight-child][header-case=uppercase]){--accordion-item-header-font-size: var(--luzmo-font-size-s)}:host([variant=highlight-child][size=l]){--accordion-item-height: 48px;--accordion-disclosure-indicator-height: var(luzmo-font-size);--accordion-edge-to-disclosure-indicator-space: 0px;--accordion-disclosure-indicator-to-text-space: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--accordion-item-edge-to-text: var(--luzmo-spacing-4);--accordion-item-header-font-size: var(--luzmo-font-size-l);--accordion-item-content-font-size: var(--luzmo-font-size-l);--accordion-item-header-bottom-margin: calc( var(--luzmo-spacing-1) + var(--luzmo-spacing-3) );--accordion-item-content-margin-left: var(--luzmo-spacing-3);--accordion-item-content-padding-left: var(--luzmo-spacing-4);--accordion-item-content-margin-bottom: var(--luzmo-spacing-3)}:host([variant=highlight-child][size=l][header-case=uppercase]){--accordion-item-header-font-size: var(--luzmo-font-size)}:host([variant=highlight-child][size=xl]){--accordion-item-height: 56px;--accordion-disclosure-indicator-height: var(luzmo-font-size-l);--accordion-edge-to-disclosure-indicator-space: 0px;--accordion-disclosure-indicator-to-text-space: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--accordion-item-edge-to-text: var(--luzmo-spacing-4);--accordion-item-header-font-size: var(--luzmo-font-size-xl);--accordion-item-content-font-size: var(--luzmo-font-size-xl);--accordion-item-header-bottom-margin: var(--luzmo-spacing-4);--accordion-item-content-margin-left: var(--luzmo-spacing-3);--accordion-item-content-padding-left: var(--luzmo-spacing-5);--accordion-item-content-margin-bottom: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) )}:host([variant=highlight-child][size=xl][header-case=uppercase]){--accordion-item-header-font-size: var(--luzmo-font-size-l)}:host([no-content-padding]),:host([no-content-padding][size=s]),:host([no-content-padding][size=l]),:host([no-content-padding][size=xl]){--accordion-item-edge-to-text: 0px}";var x=Object.defineProperty,d=(t,o,i,n)=>{for(var e=void 0,c=t.length-1,l;c>=0;c--)(l=t[c])&&(e=l(o,i,e)||e);return e&&x(o,i,e),e};class a extends z.SizedMixin(r.LuzmoElement,{noDefaultSize:!0}){constructor(){super(...arguments),this.allowMultiple=!1,this.noContentPadding=!1,this.variant="default",this.focusGroupController=new v.FocusGroupController(this,{direction:"vertical",elements:()=>this.items,isFocusableElement:o=>!o.disabled})}static get styles(){return[s.unsafeCSS(b)]}get items(){return[...this.defaultNodes||[]].filter(o=>o.tagName!==void 0)}focus(){this.focusGroupController.focus()}onToggle(o){const i=o.target,n=[...this.items];if(n.includes(i)){if(this.allowMultiple||o.defaultPrevented||n&&n.length===0)return;n.forEach(e=>{e!==i&&(e.open=!1)})}}handleSlotchange(){this.focusGroupController.clearElementCache(),this.items.forEach(o=>{o.size=this.size})}updated(o){super.updated(o),o.has("size")&&(o.get("size")||this.size!=="m")&&this.items.forEach(i=>{i.size=this.size})}render(){return s.html`
|
|
19
|
-
<slot
|
|
20
|
-
@slotchange=${this.handleSlotchange}
|
|
21
|
-
@luzmo-accordion-item-toggle=${this.onToggle}
|
|
22
|
-
></slot>
|
|
23
|
-
`}}d([r.n({type:Boolean,reflect:!0,attribute:"allow-multiple"})],a.prototype,"allowMultiple");d([r.n({type:String,reflect:!0})],a.prototype,"density");d([r.n({type:String,reflect:!0,attribute:"header-case"})],a.prototype,"headerCase");d([r.n({type:Boolean,reflect:!0,attribute:"no-content-padding"})],a.prototype,"noContentPadding");d([r.n({type:String,reflect:!0})],a.prototype,"variant");d([g.n()],a.prototype,"defaultNodes");const y=':host{z-index:inherit;min-block-size:var(--luzmo-accordion-item-min-block-size, var(--accordion-item-min-block-size));min-inline-size:var(--luzmo-accordion-item-width, 200px);border-block-end:1px solid rgba(0,0,0,0);border-color:var(--luzmo-accordion-divider-color, var(--luzmo-border-color));border-width:var(--luzmo-accordion-divider-thickness, var(--accordion-item-accordion-divider-thickness, var(--luzmo-border-width)));margin:0;position:relative}:host(:first-child){border-block-start:1px solid rgba(0,0,0,0);border-color:var(--luzmo-accordion-divider-color, var(--luzmo-border-color));border-width:var(--luzmo-accordion-divider-thickness, var(--accordion-item-accordion-divider-thickness, var(--luzmo-border-width)))}#heading{box-sizing:border-box;min-height:var(--luzmo-accordion-item-height, var(--accordion-item-height));font-size:var(--luzmo-accordion-item-header-font-size, var(--accordion-item-header-font-size, 18px));margin:0;margin-block:0;position:relative;margin-bottom:var(--luzmo-accordion-item-header-bottom-margin, var(--accordion-item-header-bottom-margin, 0px))}.icon-container{z-index:1;pointer-events:none;inline-size:var(--luzmo-accordion-disclosure-indicator-height, var(--accordion-disclosure-indicator-height));font-size:var(--luzmo-accordion-disclosure-indicator-height, var(--accordion-disclosure-indicator-height));color:var(--luzmo-accordion-item-header-color-default, var(--luzmo-font-color-hard));justify-content:center;align-items:center;padding-inline-start:var(--luzmo-accordion-edge-to-disclosure-indicator-space, var(--accordion-edge-to-disclosure-indicator-space, 0px));display:flex;position:absolute;height:100%}.icon-container:dir(rtl),:host([dir=rtl]) .icon-container{transform:scaleX(-1)}#content{padding-block:var(--luzmo-accordion-item-content-area-top-to-content, 8px) var(--luzmo-accordion-item-content-area-bottom-to-content, 16px);padding-left:calc(var(--luzmo-accordion-item-edge-to-text, var(--accordion-item-edge-to-text, var(--luzmo-spacing-3))) + var(--luzmo-accordion-item-content-padding-left, var(--accordion-item-content-padding-left, 0px)));margin-bottom:var(--luzmo-accordion-item-content-margin-bottom, var(--accordion-item-content-margin-bottom, 0px));margin-left:var(--luzmo-accordion-item-content-margin-left, var(--accordion-item-content-margin-left, 0px));padding-right:var(--luzmo-accordion-item-edge-to-text, var(--accordion-item-edge-to-text, var(--luzmo-spacing-3)));border-left:var(--luzmo-accordion-item-content-border-left-width, var(--accordion-item-content-border-left-width, 0)) var(--luzmo-accordion-item-content-border-left-style, var(--accordion-item-content-border-left-style, solid)) var(--luzmo-accordion-item-content-border-left-color, var(--accordion-item-content-border-left-color, var(--luzmo-border-color)));color:var(--luzmo-accordion-item-content-color, var(--luzmo-font-color));font-weight:var(--luzmo-accordion-item-content-font-weight, var(--accordion-item-content-font-weight, var(--luzmo-font-weight)));font-style:var(--luzmo-accordion-item-content-font-style, var(--luzmo-font-style));font-size:var(--luzmo-accordion-item-content-font-size, var(--accordion-item-content-font-size, var(--luzmo-font-size)));font-family:var(--luzmo-accordion-item-content-font-family, var(--luzmo-font-family));line-height:var(--luzmo-accordion-item-content-line-height, 1.3);display:none}#header{box-sizing:border-box;min-height:var(--luzmo-accordion-item-min-block-size, var(--accordion-item-min-block-size));line-height:var(--luzmo-accordion-item-header-line-height, var(--accordion-item-header-line-height, 1.25));text-overflow:ellipsis;text-transform:var(--luzmo-accordion-item-header-text-case, var(--accordion-item-header-text-case));cursor:pointer;font-size:var(--luzmo-accordion-item-header-font-size, var(--accordion-item-header-font-size, 18px));font-weight:var(--luzmo-accordion-item-header-font-weight, var(--accordion-item-header-font-weight, 600));font-style:var(--luzmo-accordion-item-header-font-style, var(--luzmo-font-style));font-family:var(--luzmo-accordion-item-header-font-family, var(--luzmo-font-family));-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:start;width:100%;color:var(--luzmo-accordion-item-header-color-default, var(--luzmo-font-color));background-color:var(--luzmo-accordion-item-header-background-color, var(--accordion-item-header-background-color, var(--luzmo-background-color)));border:0;padding-top:var(--luzmo-accordion-item-header-vertical-padding, var(--accordion-item-header-vertical-padding, var(--luzmo-spacing-3)));padding-left:calc(var(--luzmo-accordion-disclosure-indicator-to-text-space, var(--accordion-disclosure-indicator-to-text-space, 0px)) + var(--luzmo-accordion-disclosure-indicator-height, var(--accordion-disclosure-indicator-height, 32px)) + var(--luzmo-accordion-edge-to-disclosure-indicator-space, var(--accordion-edge-to-disclosure-indicator-space, 32px)));padding-bottom:var(--luzmo-accordion-item-header-vertical-padding, var(--accordion-item-header-vertical-padding, var(--luzmo-spacing-3)));padding-right:var(--luzmo-accordion-item-edge-to-text, var(--accordion-item-edge-to-text, 0px));position:relative;border-radius:var(--luzmo-accordion-item-accordion-header-border-radius, var(--accordion-item-accordion-header-border-radius))}#header:focus{outline:none}#header:focus:after{content:"";position:absolute;inset-inline-start:0}#header:focus-visible{border-radius:var(--luzmo-accordion-corner-radius, var(--accordion-item-accordion-header-border-radius, var(--luzmo-border-radius-s)));outline:var(--luzmo-accordion-focus-indicator-width, var(--luzmo-border-width)) solid var(--luzmo-accordion-focus-indicator-color, var(--luzmo-primary));background-color:var(--luzmo-accordion-background-color-key-focus, var(--accordion-item-header-background-color, var(--luzmo-background-color-hover)));color:var(--luzmo-accordion-item-header-color-key-focus, var(--luzmo-font-color-hard));outline-offset:calc(var(--luzmo-accordion-focus-indicator-gap, 2px) * -1)}#header:active{background-color:var(--luzmo-accordion-background-color-down, var(--accordion-item-header-background-color, var(--luzmo-background-hover)));color:var(--luzmo-accordion-item-header-color-down, var(--luzmo-font-color-hard))}:host([disabled]) #header,:host([disabled]) #header:focus-visible{color:var(--luzmo-accordion-item-header-disabled-color, var(--luzmo-color-disabled));background-color:var(--luzmo-accordion-item-disabled-background-color, var(--accordion-item-disabled-background-color, initial))}@media (hover: hover){#header:hover{background-color:var(--luzmo-accordion-background-color-hover, var(--accordion-item-header-background-color, var(--luzmo-background-color-hover)))}:host([disabled]) #header:hover{background-color:var(--luzmo-accordion-item-disabled-background-color, var(--accordion-item-disabled-background-color, initial))}#header:hover,#header:hover+.icon-container{color:var(--luzmo-accordion-item-header-color-hover, var(--luzmo-font-color-hard))}:host([open]) #header:hover{background-color:var(--luzmo-accordion-background-color-hover, var(--accordion-item-header-background-color, var(--luzmo-background-color)))}:host([disabled]) #header:hover{color:var(--luzmo-accordion-item-header-disabled-color, var(--luzmo-color-disabled))}}:host([disabled]) #header+.icon-container{color:var(--luzmo-accordion-item-header-disabled-color, var(--luzmo-color-disabled))}:host([disabled]) #content{color:var(--luzmo-accordion-item-content-disabled-color, var(--luzmo-color-disabled))}:host([open])>#heading>.icon-container>.indicator,:host([open])>.icon-container>.indicator{transform:var(--luzmo-logical-rotation) rotate(90deg);transform:rotate(90deg)}:host([open])>#content{display:block}:host([disabled]) #header{cursor:default}@media (forced-colors: active){#header:after{forced-color-adjust:none;content:"";position:absolute;inset-inline-start:0}}:host{display:block}#heading{height:auto;position:relative}:host([disabled]) #heading .indicator{color:var(--luzmo-accordion-item-header-disabled-color, var(--luzmo-color-disabled))}';var k=Object.defineProperty,u=(t,o,i,n)=>{for(var e=void 0,c=t.length-1,l;c>=0;c--)(l=t[c])&&(e=l(o,i,e)||e);return e&&k(o,i,e),e};const w=()=>s.html`
|
|
24
|
-
<div class="icon-container">
|
|
25
|
-
${h.luzmoIcon(h.luzmoAngleRight,{className:"indicator"})}
|
|
26
|
-
</div>
|
|
27
|
-
`;class m extends z.SizedMixin(p.Focusable,{noDefaultSize:!0}){constructor(){super(...arguments),this.open=!1,this.label="",this.disabled=!1,this.renderAngleIcon=()=>w()}static get styles(){return[s.unsafeCSS(y)]}get focusElement(){return this.renderRoot.querySelector("#header")}onClick(){this.disabled||this.toggle()}toggle(){this.open=!this.open,this.dispatchEvent(new CustomEvent("luzmo-accordion-item-toggle",{bubbles:!0,composed:!0,cancelable:!0}))||(this.open=!this.open)}render(){return s.html`
|
|
28
|
-
<h3 id="heading">
|
|
29
|
-
${f.n(this.size,this.renderAngleIcon)}
|
|
30
|
-
<button
|
|
31
|
-
id="header"
|
|
32
|
-
@click=${this.onClick}
|
|
33
|
-
aria-expanded=${this.open}
|
|
34
|
-
aria-controls="content"
|
|
35
|
-
?disabled=${this.disabled}
|
|
36
|
-
>
|
|
37
|
-
${this.label}
|
|
38
|
-
</button>
|
|
39
|
-
</h3>
|
|
40
|
-
<div id="content" role="region" aria-labelledby="header">
|
|
41
|
-
<slot></slot>
|
|
42
|
-
</div>
|
|
43
|
-
`}updated(o){super.updated(o),o.has("disabled")&&(this.disabled?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled"))}}u([r.n({type:Boolean,reflect:!0})],m.prototype,"open");u([r.n({type:String,reflect:!0})],m.prototype,"label");u([r.n({type:Boolean,reflect:!0})],m.prototype,"disabled");customElements.get("luzmo-accordion-item")||customElements.define("luzmo-accordion-item",m);customElements.get("luzmo-accordion")||customElements.define("luzmo-accordion",a);exports.LuzmoAccordion=a;exports.LuzmoAccordionItem=m;
|
package/lib/action-bar/index.cjs
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
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
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../base-BCmA9Wxv.cjs"),p=require("../focus-visible-B0P9aY_G.cjs"),u=require("lit"),b=require("../if-defined-Cv6xanXh.cjs");require("../action-group-D4MxBrq8.cjs");require("../close-button-BrfeZvjk.cjs");require("../field-label-BrJaeORz.cjs");require("../popover-CVbjhSnx.cjs");const m="@media (forced-colors: active){:host,:host([emphasized]) #popover{--highcontrast-action-bar-popover-border-color: CanvasText}}:host{padding:0 var(--luzmo-action-bar-spacing-outer-edge, var(--action-bar-spacing-outer-edge));z-index:1;box-sizing:border-box;pointer-events:none;block-size:0;opacity:0;inset-block-end:0}:host([open]){block-size:calc(var(--luzmo-action-bar-spacing-outer-edge, var(--action-bar-spacing-outer-edge)) + var(--luzmo-action-bar-height, var(--action-bar-height)));opacity:1}#popover{block-size:var(--luzmo-action-bar-height, var(--action-bar-height));box-sizing:border-box;inline-size:100%;border-radius:var(--luzmo-action-bar-corner-radius, var(--action-bar-corner-radius));border-color:var(--highcontrast-action-bar-popover-border-color, var(--luzmo-action-bar-popover-border-color, var(--action-bar-popover-border-color)));background-color:var(--luzmo-action-bar-popover-background-color, var(--action-bar-popover-background-color));filter:drop-shadow(var(--luzmo-action-bar-shadow-horizontal, var(--action-bar-shadow-horizontal)) var(--luzmo-action-bar-shadow-vertical, var(--action-bar-shadow-vertical)) var(--luzmo-action-bar-shadow-blur, var(--action-bar-shadow-blur)) var(--luzmo-action-bar-shadow-color, var(--action-bar-shadow-color)));pointer-events:auto;flex-direction:row;margin:auto;padding-block:0;display:flex;position:relative}.close-button{flex-shrink:0;margin-block-start:var(--luzmo-action-bar-spacing-close-button-top, var(--action-bar-spacing-close-button-top));margin-inline-start:var(--luzmo-action-bar-spacing-close-button-start, var(--action-bar-spacing-close-button-start));margin-inline-end:var(--luzmo-action-bar-spacing-close-button-end, var(--action-bar-spacing-close-button-end))}.field-label{font-size:var(--luzmo-action-bar-item-counter-font-size, var(--action-bar-item-counter-font-size));color:var(--luzmo-action-bar-item-counter-color, var(--action-bar-item-counter-color));line-height:var(--luzmo-action-bar-item-counter-line-height, var(--action-bar-item-counter-line-height));margin-block-start:var(--luzmo-action-bar-spacing-item-counter-top, var(--action-bar-spacing-item-counter-top));margin-inline-end:var(--luzmo-action-bar-spacing-item-counter-end, var(--action-bar-spacing-item-counter-end));padding:0}.field-label:lang(ja),.field-label:lang(ko),.field-label:lang(zh){line-height:var(--luzmo-action-bar-item-counter-line-height-cjk, var(--action-bar-item-counter-line-height-cjk))}.action-group{margin-block-start:var(--luzmo-action-bar-spacing-action-group-top, var(--action-bar-spacing-action-group-top));margin-inline-start:auto;margin-inline-end:var(--luzmo-action-bar-spacing-action-group-end, var(--action-bar-spacing-action-group-end))}:host([emphasized]) #popover{filter:none;background-color:var(--luzmo-action-bar-emphasized-background-color, var(--action-bar-emphasized-background-color));border-color:#0000}:host([emphasized]) .field-label{color:var(--luzmo-action-bar-emphasized-item-counter-color, var(--action-bar-emphasized-item-counter-color))}:host([variant=sticky]){position:sticky;inset-inline:0}:host([variant=fixed]){position:fixed}:host([flexible]) #popover{inline-size:auto}:host{--action-bar-height: var(--luzmo-component-height-xl);--action-bar-corner-radius: var(--luzmo-border-radius);--action-bar-item-counter-font-size: var(--luzmo-font-size);--action-bar-item-counter-line-height: var(--luzmo-line-height);--action-bar-item-counter-color: var(--luzmo-font-color);--action-bar-item-counter-line-height-cjk: 1.5;--action-bar-popover-background-color: var(--luzmo-background-color);--action-bar-popover-border-color: var(--luzmo-border-color);--action-bar-emphasized-background-color: var(--luzmo-primary);--action-bar-emphasized-item-counter-color: var( --luzmo-primary-inverse-color );--action-bar-spacing-outer-edge: var(-luzmo-spacing-5);--action-bar-spacing-close-button-top: calc( var(--luzmo-spacing-3) - var(--luzmo-border-width) );--action-bar-spacing-close-button-start: calc( var(--luzmo-spacing-3) - var(--luzmo-border-width) );--action-bar-spacing-close-button-end: var(--luzmo-spacing-3);--action-bar-spacing-item-counter-top: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--action-bar-spacing-item-counter-end: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-3) );--action-bar-spacing-action-group-top: calc( var(--luzmo-spacing-3) - var(--luzmo-border-width) );--action-bar-spacing-action-group-end: calc( var(--luzmo-spacing-3) - var(--luzmo-border-width) );--action-bar-shadow-horizontal: 0;--action-bar-shadow-vertical: 1px;--action-bar-shadow-blur: 4px;--action-bar-shadow-color: var(--luzmo-border-color)}:host{display:block}:host([flexible]){display:inline-block}";var v=Object.defineProperty,d=Object.getOwnPropertyDescriptor,i=(n,o,c,e)=>{for(var a=e>1?void 0:e?d(o,c):o,l=n.length-1,s;l>=0;l--)(s=n[l])&&(a=(e?s(o,c,a):s(a))||a);return e&&a&&v(o,c,a),a};const h=["sticky","fixed"];class r extends p.FocusVisiblePolyfillMixin(t.LuzmoElement){constructor(){super(...arguments),this.emphasized=!1,this.flexible=!1,this.open=!1,this._variant=""}static get styles(){return[u.unsafeCSS(m)]}set variant(o){if(o!==this.variant){if(h.includes(o)){this.setAttribute("variant",o),this._variant=o;return}this.removeAttribute("variant"),this._variant=""}}get variant(){return this._variant}handleClick(){this.open=!1,this.dispatchEvent(new Event("close",{bubbles:!0,composed:!0,cancelable:!0}))||(this.open=!0)}render(){return u.html`
|
|
19
|
-
<luzmo-popover ?open=${this.open} id="popover">
|
|
20
|
-
<slot name="override">
|
|
21
|
-
<luzmo-close-button
|
|
22
|
-
static-color=${b.o(this.emphasized?"white":void 0)}
|
|
23
|
-
class="close-button"
|
|
24
|
-
label="Clear selection"
|
|
25
|
-
@click=${this.handleClick}
|
|
26
|
-
></luzmo-close-button>
|
|
27
|
-
<luzmo-field-label class="field-label">
|
|
28
|
-
<slot></slot>
|
|
29
|
-
</luzmo-field-label>
|
|
30
|
-
<luzmo-action-group
|
|
31
|
-
class="action-group"
|
|
32
|
-
quiet
|
|
33
|
-
static-color=${b.o(this.emphasized?"white":void 0)}
|
|
34
|
-
>
|
|
35
|
-
<slot name="buttons"></slot>
|
|
36
|
-
</luzmo-action-group>
|
|
37
|
-
</slot>
|
|
38
|
-
</luzmo-popover>
|
|
39
|
-
`}}i([t.n({type:Boolean,reflect:!0})],r.prototype,"emphasized",2);i([t.n({type:Boolean,reflect:!0})],r.prototype,"flexible",2);i([t.n({type:Boolean,reflect:!0})],r.prototype,"open",2);i([t.n({type:String})],r.prototype,"variant",1);customElements.get("luzmo-action-bar")||customElements.define("luzmo-action-bar",r);exports.LuzmoActionBar=r;
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("@luzmo/icons"),v=require("../sized-mixin-BSYHt8nT.cjs"),d=require("lit"),r=require("../base-BCmA9Wxv.cjs"),h=require("../button-base-B0iB_JTv.cjs"),g=':host{cursor:pointer;-webkit-user-select:none;user-select:none;box-sizing:border-box;font-family:var(--luzmo-button-font-family, var(--luzmo-sans-font-family-stack, var(--luzmo-font-family)));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:var(--luzmo-button-line-height, var(--luzmo-line-height-100, var(--line-height-100)));text-transform:none;vertical-align:top;-webkit-appearance:button;transition:background var(--luzmo-button-animation-duration, var(--luzmo-animation-duration-100, var(--animation-duration-100))) ease-out,border-color var(--luzmo-button-animation-duration, var(--luzmo-animation-duration-100, var(--animation-duration-100))) ease-out,color var(--luzmo-button-animation-duration, var(--luzmo-animation-duration-100, var(--animation-duration-100))) ease-out,box-shadow var(--luzmo-button-animation-duration, var(--luzmo-animation-duration-100, var(--animation-duration-100))) ease-out;border-style:solid;justify-content:center;align-items:center;margin:0;-webkit-text-decoration:none;text-decoration:none;display:inline-flex;overflow:visible}:host(:focus){outline:none}:host([disabled]){cursor:default}::slotted([slot=icon]){max-block-size:100%;flex-shrink:0}#label{text-align:center;place-self:center}#label:empty{display:none}@media (forced-colors: active){:host{--highcontrast-action-button-focus-indicator-color: ButtonText}:host:after{forced-color-adjust:none}:host([selected]){--highcontrast-action-button-background-color-default: Highlight;--highcontrast-action-button-background-color-hover: Highlight;--highcontrast-action-button-background-color-focus: Highlight;--highcontrast-action-button-background-color-down: Highlight;--highcontrast-action-button-background-color-disabled: ButtonFace;--highcontrast-action-button-border-color-default: HighlightText;--highcontrast-action-button-border-color-hover: HighlightText;--highcontrast-action-button-border-color-focus: HighlightText;--highcontrast-action-button-border-color-down: HighlightText;--highcontrast-action-button-border-color-disabled: GrayText;--highcontrast-action-button-content-color-default: HighlightText;--highcontrast-action-button-content-color-hover: HighlightText;--highcontrast-action-button-content-color-focus: HighlightText;--highcontrast-action-button-content-color-down: HighlightText;--highcontrast-action-button-content-color-disabled: GrayText}:host([selected]) .hold-affordance,:host([selected]) ::slotted([slot=icon]),:host([selected]) #label{forced-color-adjust:none}}:host{--action-button-focus-indicator-border-radius: calc( var(--action-button-border-radius) + var(--action-button-focus-indicator-gap) );--action-button-edge-to-visual: calc( var(--action-button-edge-to-visual-size) - var(--action-button-border-width) );--action-button-edge-to-text: calc( var(--action-button-edge-to-text-size) - var(--action-button-border-width) );--action-button-edge-to-visual-only: calc( var(--action-button-edge-to-visual-only-size) - var( --action-button-border-width ) );min-inline-size:var(--luzmo-action-button-min-width, var(--action-button-min-width));block-size:var(--luzmo-action-button-height, var(--action-button-height));border-radius:var(--luzmo-action-button-border-radius, var(--action-button-border-radius));border-width:var(--luzmo-action-button-border-width, var(--action-button-border-width));gap:calc(var(--luzmo-action-button-text-to-visual, var(--action-button-text-to-visual)) + var(--luzmo-action-button-edge-to-text, var(--action-button-edge-to-text)) - var(--luzmo-action-button-edge-to-visual-only, var(--action-button-edge-to-visual-only)));padding-inline:var(--luzmo-action-button-edge-to-text, var(--action-button-edge-to-text));background-color:var(--highcontrast-action-button-background-color-default, var(--luzmo-action-button-background-color-default, var(--action-button-background-color-default)));border-color:var(--highcontrast-action-button-border-color-default, var(--luzmo-action-button-border-color-default, var(--action-button-border-color-default)));color:var(--highcontrast-action-button-content-color-default, var(--luzmo-action-button-content-color-default, var(--action-button-content-color-default)));position:relative}:host:dir(rtl),:host([dir=rtl]){--logical-rotation: matrix(-1, 0, 0, 1, 0, 0)}@media (hover: hover){:host(:hover){background-color:var(--highcontrast-action-button-background-color-hover, var(--luzmo-action-button-background-color-hover, var(--action-button-background-color-hover)));border-color:var(--highcontrast-action-button-border-color-hover, var(--luzmo-action-button-border-color-hover, var(--action-button-border-color-hover)));color:var(--highcontrast-action-button-content-color-hover, var(--luzmo-action-button-content-color-hover, var(--action-button-content-color-hover)))}}:host(:focus-visible){background-color:var(--highcontrast-action-button-background-color-focus, var(--luzmo-action-button-background-color-focus, var(--action-button-background-color-focus)));border-color:var(--highcontrast-action-button-border-color-focus, var(--luzmo-action-button-border-color-focus, var(--action-button-border-color-focus)));color:var(--highcontrast-action-button-content-color-focus, var(--luzmo-action-button-content-color-focus, var(--action-button-content-color-focus)))}:host(:is(:active,[active])){background-color:var(--highcontrast-action-button-background-color-down, var(--luzmo-action-button-background-color-down, var(--action-button-background-color-down)));border-color:var(--highcontrast-action-button-border-color-down, var(--luzmo-action-button-border-color-down, var(--action-button-border-color-down)));color:var(--highcontrast-action-button-content-color-down, var(--luzmo-action-button-content-color-down, var(--action-button-content-color-down)))}:host([disabled]){background-color:var(--highcontrast-action-button-background-color-disabled, var(--luzmo-action-button-background-color-disabled, var(--action-button-background-color-disabled)));border-color:var(--highcontrast-action-button-border-color-disabled, var(--luzmo-action-button-border-color-disabled, var(--action-button-border-color-disabled)));color:var(--highcontrast-action-button-content-color-disabled, var(--luzmo-action-button-content-color-disabled, var(--action-button-content-color-disabled)))}:host([selected]){--luzmo-action-button-background-color-default: var( --luzmo-action-button-background-color-default-selected );--luzmo-action-button-background-color-hover: var( --luzmo-action-button-background-color-hover-selected );--luzmo-action-button-background-color-down: var( --luzmo-action-button-background-color-down-selected );--luzmo-action-button-background-color-focus: var( --luzmo-action-button-background-color-focus-selected );--luzmo-action-button-content-color-default: var( --luzmo-action-button-content-color-default-selected );--luzmo-action-button-content-color-hover: var( --luzmo-action-button-content-color-hover-selected );--luzmo-action-button-content-color-down: var( --luzmo-action-button-content-color-down-selected );--luzmo-action-button-content-color-focus: var( --luzmo-action-button-content-color-focus-selected )}:host([selected][emphasized]){--luzmo-action-button-background-color-default: var( --luzmo-action-button-background-color-default-selected-emphasized );--luzmo-action-button-background-color-hover: var( --luzmo-action-button-background-color-hover-selected-emphasized );--luzmo-action-button-background-color-down: var( --luzmo-action-button-background-color-down-selected-emphasized );--luzmo-action-button-background-color-focus: var( --luzmo-action-button-background-color-focus-selected-emphasized );--luzmo-action-button-content-color-default: var( --luzmo-action-button-content-color-default-selected-emphasized );--luzmo-action-button-content-color-hover: var( --luzmo-action-button-content-color-hover-selected-emphasized );--luzmo-action-button-content-color-down: var( --luzmo-action-button-content-color-down-selected-emphasized );--luzmo-action-button-content-color-focus: var( --luzmo-action-button-content-color-focus-selected-emphasized )}:host([selected][static-color=black]),:host([selected][static-color=white]){--luzmo-action-button-content-color-default: var( --luzmo-action-button-static-content-color );--luzmo-action-button-content-color-hover: var( --luzmo-action-button-static-content-color );--luzmo-action-button-content-color-down: var( --luzmo-action-button-static-content-color );--luzmo-action-button-content-color-focus: var( --luzmo-action-button-static-content-color )}::slotted([slot=icon]){inline-size:var(--luzmo-action-button-icon-size, var(--action-button-icon-size));color:inherit;margin-inline-start:calc(var(--luzmo-action-button-edge-to-visual, var(--action-button-edge-to-visual)) - var(--luzmo-action-button-edge-to-text, var(--action-button-edge-to-text)));margin-inline-end:calc(var(--luzmo-action-button-edge-to-visual, var(--action-button-edge-to-visual)) - var(--luzmo-action-button-edge-to-text, var(--action-button-edge-to-text)))}.hold-affordance+::slotted([slot=icon]){margin-inline-start:calc(var(--luzmo-action-button-edge-to-visual, var(--action-button-edge-to-visual)) - var(--luzmo-action-button-edge-to-text, var(--action-button-edge-to-text)));margin-inline-end:calc(var(--luzmo-action-button-edge-to-visual-only, var(--action-button-edge-to-visual-only)) - var(--luzmo-action-button-edge-to-text, var(--action-button-edge-to-text)))}.hold-affordance+[icon-only]::slotted([slot=icon]),[icon-only]::slotted([slot=icon]){margin-inline-start:calc(var(--luzmo-action-button-edge-to-visual-only, var(--action-button-edge-to-visual-only)) - var(--luzmo-action-button-edge-to-text, var(--action-button-edge-to-text)));margin-inline-end:calc(var(--luzmo-action-button-edge-to-visual-only, var(--action-button-edge-to-visual-only)) - var(--luzmo-action-button-edge-to-text, var(--action-button-edge-to-text)))}#label{pointer-events:none;font-size:var(--luzmo-action-button-font-size, var(--action-button-font-size));white-space:nowrap;color:inherit;color:var(--luzmo-action-button-label-color, inherit);text-overflow:ellipsis;overflow:hidden}.hold-affordance{color:inherit;transform:var(--logical-rotation);position:absolute;font-size:var(--action-button-corner-triangle-size);inset-block-end:calc(var(--luzmo-action-button-edge-to-hold-icon, var(--action-button-edge-to-hold-icon)) - var(--luzmo-action-button-border-width, var(--action-button-border-width)));inset-inline-end:calc(var(--luzmo-action-button-edge-to-hold-icon, var(--action-button-edge-to-hold-icon)) - var(--luzmo-action-button-border-width, var(--action-button-border-width)))}:host{transition:border-color var(--luzmo-action-button-animation-duration, var(--action-button-animation-duration)) ease-in-out}:host:after{margin:calc((var(--luzmo-action-button-focus-indicator-gap, var(--action-button-focus-indicator-gap)) + var(--luzmo-action-button-border-width, var(--action-button-border-width))) * -1);border-radius:var(--luzmo-action-button-focus-indicator-border-radius, var(--action-button-focus-indicator-border-radius));transition:box-shadow var(--luzmo-action-button-animation-duration, var(--action-button-animation-duration)) ease-in-out;pointer-events:none;content:"";position:absolute;top:0;right:0;bottom:0;left:0}:host(:focus-visible){box-shadow:none;outline:none}:host(:focus-visible):after{box-shadow:0 0 0 var(--luzmo-action-button-focus-indicator-thickness, var(--action-button-focus-indicator-thickness)) var(--highcontrast-action-button-focus-indicator-color, var(--luzmo-action-button-focus-indicator-color, var(--action-button-focus-indicator-color)))}:host{--action-button-animation-duration: var(--luzmo-animation-duration);--action-button-border-radius: var(--luzmo-border-radius);--action-button-border-width: var(--luzmo-border-width);--action-button-content-color-default: var(--luzmo-font-color);--action-button-content-color-hover: var(--luzmo-font-color-hover);--action-button-content-color-down: var(--luzmo-font-color-down);--action-button-content-color-focus: var(--luzmo-font-color-focus);--action-button-focus-indicator-gap: var(--luzmo-indicator-gap);--action-button-focus-indicator-thickness: var(--luzmo-indicator-width);--action-button-focus-indicator-color: var(--luzmo-indicator-color);--action-button-background-color-default: var(--luzmo-background-color);--action-button-background-color-hover: var(--luzmo-background-color-hover);--action-button-background-color-down: var(--luzmo-background-color-down);--action-button-background-color-focus: var(--luzmo-background-color-focus);--action-button-border-color-default: var(--luzmo-border-color);--action-button-border-color-hover: var(--luzmo-border-color-hover);--action-button-border-color-down: var(--luzmo-border-color-down);--action-button-border-color-focus: var(--luzmo-border-color-focus);--action-button-background-color-disabled: var(--luzmo-background-color);--action-button-border-color-disabled: var(--luzmo-border-color-disabled);--action-button-content-color-disabled: var(--luzmo-font-color-disabled)}:host([quiet]){--action-button-background-color-default: transparent;--action-button-background-color-hover: var(--luzmo-background-color-hover);--action-button-background-color-down: var(--luzmo-background-color-down);--action-button-background-color-focus: var(--luzmo-background-color-focus);--action-button-background-color-disabled: transparent;--action-button-border-color-default: transparent;--action-button-border-color-hover: transparent;--action-button-border-color-down: transparent;--action-button-border-color-focus: transparent;--action-button-border-color-disabled: transparent}:host([selected]){--action-button-background-color-default: var(--luzmo-font-color);--action-button-background-color-hover: var(--luzmo-font-color-hover);--action-button-background-color-down: var(--luzmo-font-color-down);--action-button-background-color-focus: var(--luzmo-font-color-focus);--action-button-content-color-default: var(--luzmo-background-color);--action-button-content-color-hover: var(--luzmo-background-color);--action-button-content-color-down: var(--luzmo-background-color);--action-button-content-color-focus: var(--luzmo-background-color);--action-button-border-color-default: transparent;--action-button-border-color-hover: transparent;--action-button-border-color-down: transparent;--action-button-border-color-focus: transparent;--action-button-border-color-disabled: transparent;--action-button-background-color-disabled: var( --luzmo-background-color-disabled )}:host([selected][emphasized]){--action-button-background-color-default: var(--luzmo-primary);--action-button-background-color-hover: var(--luzmo-primary-hover);--action-button-background-color-down: var(--luzmo-primary-down);--action-button-background-color-focus: var(--luzmo-primary-focus);--action-button-content-color-default: var(--luzmo-primary-inverse-color);--action-button-content-color-hover: var(--luzmo-primary-inverse-color);--action-button-content-color-down: var(--luzmo-primary-inverse-color);--action-button-content-color-focus: var(--luzmo-primary-inverse-color)}:host([static-color=black][quiet]),:host([static-color=white][quiet]){--action-button-border-color-default: transparent;--action-button-border-color-hover: transparent;--action-button-border-color-down: transparent;--action-button-border-color-focus: transparent;--action-button-border-color-disabled: transparent}:host([static-color=black]){--action-button-background-color-default: transparent;--action-button-background-color-hover: rgba(0, 0, 0, .25);--action-button-background-color-down: rgba(0, 0, 0, .4);--action-button-background-color-focus: rgba(0, 0, 0, .25);--action-button-background-color-disabled: transparent;--action-button-border-color-default: rgba(0, 0, 0, .4);--action-button-border-color-hover: rgba(0, 0, 0, .55);--action-button-border-color-down: rgba(0, 0, 0, .7);--action-button-border-color-focus: rgba(0, 0, 0, .25);--action-button-border-color-disabled: transparent;--action-button-content-color-default: rgb(0, 0, 0);--action-button-content-color-hover: rgb(0, 0, 0);--action-button-content-color-down: rgb(0, 0, 0);--action-button-content-color-focus: rgb(0, 0, 0);--action-button-content-color-disabled: rgba(0, 0, 0, .55);--action-button-focus-indicator-color: rgb(0, 0, 0)}:host([static-color=black][selected]){--action-button-background-color-default: rgba(0, 0, 0, .9);--action-button-background-color-hover: rgb(0, 0, 0);--action-button-background-color-down: rgb(0, 0, 0);--action-button-background-color-focus: rgb(0, 0, 0);--action-button-background-color-disabled: rgba(0, 0, 0, .1);--action-button-border-color-disabled: transparent;--action-button-content-color-default: rgb(255, 255, 255);--action-button-content-color-hover: rgb(255, 255, 255);--action-button-content-color-down: rgb(255, 255, 255);--action-button-content-color-focus: rgb(255, 255, 255)}:host([static-color=black][selected][emphasized]){--action-button-background-color-default: rgba(0, 0, 0, .9);--action-button-background-color-hover: rgb(0, 0, 0);--action-button-background-color-down: rgb(0, 0, 0);--action-button-background-color-focus: rgb(0, 0, 0);--action-button-content-color-default: rgb(255, 255, 255);--action-button-content-color-hover: rgb(255, 255, 255);--action-button-content-color-down: rgb(255, 255, 255);--action-button-content-color-focus: rgb(255, 255, 255)}:host([static-color=white]){--action-button-background-color-default: transparent;--action-button-background-color-hover: rgba(255, 255, 255, .25);--action-button-background-color-down: rgba(255, 255, 255, .4);--action-button-background-color-focus: rgba(255, 255, 255, .25);--action-button-background-color-disabled: transparent;--action-button-border-color-default: rgba(255, 255, 255, .4);--action-button-border-color-hover: rgba(255, 255, 255, .55);--action-button-border-color-down: rgba(255, 255, 255, .7);--action-button-border-color-focus: rgba(255, 255, 255, .55);--action-button-border-color-disabled: rgba(255, 255, 255, .25);--action-button-content-color-default: rgb(255, 255, 255);--action-button-content-color-hover: rgb(255, 255, 255);--action-button-content-color-down: rgb(255, 255, 255);--action-button-content-color-focus: rgb(255, 255, 255);--action-button-content-color-disabled: rgba(255, 255, 255, .55);--action-button-focus-indicator-color: rgb(255, 255, 255)}:host([static-color=white][selected]){--action-button-background-color-default: rgba(255, 255, 255, .9);--action-button-background-color-hover: rgb(255, 255, 255);--action-button-background-color-down: rgb(255, 255, 255);--action-button-background-color-focus: rgb(255, 255, 255);--action-button-background-color-disabled: rgba(255, 255, 255, .1);--action-button-border-color-disabled: transparent;--action-button-content-color-default: rgb(0, 0, 0);--action-button-content-color-hover: rgb(0, 0, 0);--action-button-content-color-down: rgb(0, 0, 0);--action-button-content-color-focus: rgb(0, 0, 0)}:host([static-color=white][selected][emphasized]){--action-button-background-color-default: rgba(255, 255, 255, .9);--action-button-background-color-hover: rgb(255, 255, 255);--action-button-background-color-down: rgb(255, 255, 255);--action-button-background-color-focus: rgb(255, 255, 255);--action-button-content-color-default: rgb(0, 0, 0)}:host{--action-button-min-width: var(--luzmo-component-height);--action-button-height: var(--luzmo-component-height);--action-button-icon-size: var(--luzmo-font-size-l);--action-button-font-size: var(--luzmo-font-size);--action-button-text-to-visual: var(--luzmo-spacing-2);--action-button-edge-to-hold-icon: var(--luzmo-spacing-2);--action-button-edge-to-visual-size: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--action-button-edge-to-visual-only-size: var(--luzmo-spacing-3);--action-button-edge-to-text-size: 12px;--action-button-corner-triangle-size: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) )}:host([size=xs]){--action-button-min-width: var(--luzmo-component-height-xs);--action-button-height: var(--luzmo-component-height-xs);--action-button-icon-size: var(--luzmo-font-size-s);--action-button-font-size: var(--luzmo-font-size-xs);--action-button-text-to-visual: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--action-button-edge-to-hold-icon: var(--luzmo-spacing-2);--action-button-edge-to-visual-size: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--action-button-edge-to-visual-only-size: var(--luzmo-spacing-2);--action-button-edge-to-text-size: var(--luzmo-spacing-2);--action-button-corner-triangle-size: var(--luzmo-spacing-2)}:host([size=s]){--action-button-min-width: var(--luzmo-component-height-s);--action-button-height: var(--luzmo-component-height-s);--action-button-icon-size: var(--luzmo-font-size);--action-button-font-size: var(--luzmo-font-size-s);--action-button-text-to-visual: var(--luzmo-spacing-3);--action-button-edge-to-hold-icon: var(--luzmo-spacing-2);--action-button-edge-to-visual-size: var(--luzmo-spacing-3);--action-button-edge-to-visual-only-size: var(--luzmo-spacing-2);--action-button-edge-to-text-size: var(--luzmo-spacing-3);--action-button-corner-triangle-size: var(--luzmo-spacing-2)}:host([size=l]){--action-button-min-width: var(--luzmo-component-height-l);--action-button-height: var(--luzmo-component-height-l);--action-button-icon-size: var(--luzmo-font-size-xl);--action-button-font-size: var(--luzmo-font-size-l);--action-button-text-to-visual: var(--luzmo-spacing-3);--action-button-edge-to-hold-icon: var(--luzmo-spacing-2);--action-button-edge-to-visual-size: var(--luzmo-spacing-4);--action-button-edge-to-visual-only-size: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--action-button-edge-to-text-size: var(--luzmo-spacing-5);--action-button-corner-triangle-size: var(--luzmo-spacing-3)}:host([size=xl]){--action-button-min-width: var(--luzmo-component-height-xl);--action-button-height: var(--luzmo-component-height-xl);--action-button-icon-size: var(--luzmo-font-size-xxl);--action-button-font-size: var(--luzmo-font-size-xl);--action-button-text-to-visual: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--action-button-edge-to-hold-icon: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--action-button-edge-to-visual-size: var(--luzmo-spacing-5);--action-button-edge-to-visual-only-size: var(--luzmo-spacing-4);--action-button-edge-to-text-size: var(--luzmo-spacing-5);--action-button-corner-triangle-size: var(--luzmo-spacing-3)}::slotted([slot=icon]){flex-shrink:0}#label{flex-grow:var(--action-button-label-flex-grow);text-align:var(--action-button-label-text-align);pointer-events:none!important}:host([size=xs]){min-width:var(--action-button-height, 0);--action-button-edge-to-visual-only: calc( var(--luzmo-spacing-2) - var(--action-button-border-width) )}:host([size=s]){--action-button-edge-to-visual-only: calc( var(--luzmo-spacing-2) - var(--action-button-border-width) )}:host([size=m]){--action-button-edge-to-visual-only: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) - var(--action-button-border-width) )}:host([size=l]){--action-button-edge-to-visual-only: calc( var(--luzmo-spacing-3) - var(--action-button-border-width) )}:host([size=xl]){--action-button-edge-to-visual-only: calc( var(--luzmo-spacing-4) - var(--action-button-border-width) )}@media (forced-colors: active){:host{--highcontrast-action-button-border-color-disabled: GrayText;--highcontrast-action-button-content-color-disabled: GrayText}}';var m=Object.defineProperty,z=Object.getOwnPropertyDescriptor,c=(i,o,t,n)=>{for(var e=n>1?void 0:n?z(o,t):o,u=i.length-1,l;u>=0;u--)(l=i[u])&&(e=(n?l(o,t,e):l(e))||e);return n&&e&&m(o,t,e),e};const f=300;let s;class a extends v.SizedMixin(h.ButtonBase,{validSizes:["xs","s","m","l","xl"],noDefaultSize:!0}){constructor(){super(),this.emphasized=!1,this.holdAffordance=!1,this.quiet=!1,this.role="button",this.selected=!1,this.toggles=!1,this._value="",this.onClick=()=>{if(!this.toggles)return;this.selected=!this.selected,this.dispatchEvent(new Event("change",{cancelable:!0,bubbles:!0,composed:!0}))||(this.selected=!this.selected)},this.addEventListener("click",this.onClick)}static get styles(){return[...super.styles,d.unsafeCSS(g)]}get value(){return this._value||this.itemText}set value(o){o!==this._value&&(this._value=o||"",this._value?this.setAttribute("value",this._value):this.removeAttribute("value"))}get itemText(){return(this.textContent||"").trim()}handlePointerdownHoldAffordance(o){o.button===0&&(this.addEventListener("pointerup",this.handlePointerupHoldAffordance),this.addEventListener("pointercancel",this.handlePointerupHoldAffordance),s=setTimeout(()=>{this.dispatchEvent(new CustomEvent("longpress",{bubbles:!0,composed:!0,detail:{source:"pointer"}}))},f))}handlePointerupHoldAffordance(){clearTimeout(s),this.removeEventListener("pointerup",this.handlePointerupHoldAffordance),this.removeEventListener("pointercancel",this.handlePointerupHoldAffordance)}handleKeydown(o){if(!this.holdAffordance)return super.handleKeydown(o);const{code:t,altKey:n}=o;(t==="Space"||n&&t==="ArrowDown")&&(o.preventDefault(),t==="ArrowDown"&&(o.stopPropagation(),o.stopImmediatePropagation()),this.addEventListener("keyup",this.handleKeyup),this.active=!0)}handleKeyup(o){if(!this.holdAffordance)return super.handleKeyup(o);const{code:t,altKey:n}=o;(t==="Space"||n&&t==="ArrowDown")&&(o.stopPropagation(),this.dispatchEvent(new CustomEvent("longpress",{bubbles:!0,composed:!0,detail:{source:"keyboard"}})),this.active=!1)}get buttonContent(){const o=super.buttonContent;return this.holdAffordance&&o.unshift(d.html`
|
|
19
|
-
<div
|
|
20
|
-
class="hold-affordance corner-triangle-${this.size}"
|
|
21
|
-
>
|
|
22
|
-
${b.luzmoIcon(b.luzmoCornerTriangle)}
|
|
23
|
-
</div>
|
|
24
|
-
`),o}updated(o){super.updated(o);const t=this.role==="button",n=t&&(this.selected||this.toggles)&&!(this.hasAttribute("aria-haspopup")&&this.hasAttribute("aria-expanded"));(o.has("selected")||o.has("role"))&&(n?this.setAttribute("aria-pressed",this.selected?"true":"false"):(this.removeAttribute("aria-pressed"),t&&this.toggles&&this.hasAttribute("aria-expanded")&&this.setAttribute("aria-expanded",this.selected?"true":"false"))),o.has("holdAffordance")&&(this.holdAffordance?this.addEventListener("pointerdown",this.handlePointerdownHoldAffordance):(this.removeEventListener("pointerdown",this.handlePointerdownHoldAffordance),this.handlePointerupHoldAffordance()))}}c([r.n({type:Boolean,reflect:!0})],a.prototype,"emphasized",2);c([r.n({type:Boolean,reflect:!0,attribute:"hold-affordance"})],a.prototype,"holdAffordance",2);c([r.n({type:Boolean,reflect:!0})],a.prototype,"quiet",2);c([r.n({reflect:!0})],a.prototype,"role",2);c([r.n({type:Boolean,reflect:!0})],a.prototype,"selected",2);c([r.n({type:Boolean,reflect:!0})],a.prototype,"toggles",2);c([r.n({reflect:!0,attribute:"static-color"})],a.prototype,"staticColor",2);c([r.n({type:String})],a.prototype,"value",1);customElements.get("luzmo-action-button")||customElements.define("luzmo-action-button",a);exports.LuzmoActionButton=a;
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
"use strict";const d=require("lit"),p=require("./mutation-controller-DkOMCW-c.cjs"),u=require("./base-BCmA9Wxv.cjs"),g=require("./roving-tabindex-By_fCy_e.cjs"),b=require("./sized-mixin-BSYHt8nT.cjs"),h=require("./query-BL-TJj7K.cjs"),m=":host{gap:var(--luzmo-action-group-horizontal-spacing-regular, var(--action-group-horizontal-spacing-regular));flex-wrap:wrap;display:flex}::slotted(*){flex-shrink:0}::slotted(:focus-visible){z-index:3}:host(:not([vertical]):not([compact])) ::slotted(*){flex-shrink:0}:host([vertical]){gap:var(--luzmo-action-group-vertical-spacing-regular, var(--action-group-vertical-spacing-regular));flex-direction:column;display:inline-flex}:host([compact]){gap:var(--luzmo-action-group-gap-size-compact, var(--action-group-gap-size-compact))}:host([compact]:not([quiet])){flex-wrap:nowrap}:host([compact]:not([quiet])) ::slotted(*){border-radius:var(--luzmo-action-group-border-radius-reset, var(--action-group-border-radius-reset));z-index:0;position:relative}:host([compact]:not([quiet])) ::slotted(:first-child){--luzmo-actionbutton-focus-indicator-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) 0px 0px var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-start-start-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-end-start-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));margin-inline-start:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset))}:host([compact]:not([quiet])) ::slotted(:not(:first-child)){--luzmo-actionbutton-focus-indicator-border-radius: 0px;margin-inline-start:var(--luzmo-action-group-horizontal-spacing-compact, var(--action-group-horizontal-spacing-compact));margin-inline-end:var(--luzmo-action-group-horizontal-spacing-compact, var(--action-group-horizontal-spacing-compact))}:host([compact]:not([quiet])) ::slotted(:last-child){--luzmo-actionbutton-focus-indicator-border-radius: 0px var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0px;border-start-end-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-end-end-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));margin-inline-start:var(--luzmo-action-group-horizontal-spacing-compact, var(--action-group-horizontal-spacing-compact));margin-inline-end:var(--luzmo-action-group-border-radius-reset, var(--action-group-border-radius-reset))}:host([compact]:not([quiet])) ::slotted([selected]){z-index:1}@media (hover: hover){:host([compact]:not([quiet])) ::slotted(:hover){z-index:2}}:host([compact]:not([quiet])) ::slotted(:focus-visible){z-index:3}:host([compact]:not([quiet])[vertical]){gap:var(--luzmo-action-group-gap-size-compact, var(--action-group-gap-size-compact))}:host([compact][vertical]:not([quiet])) ::slotted(*){border-radius:var(--luzmo-action-group-border-radius-reset, var(--action-group-border-radius-reset))}:host([compact][vertical]:not([quiet])) ::slotted(:first-child){--luzmo-actionbutton-focus-indicator-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0px 0px;border-start-start-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-start-end-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));margin-block-start:var(--luzmo-action-group-vertical-spacing-compact, var(--action-group-vertical-spacing-compact));margin-block-end:var(--luzmo-action-group-vertical-spacing-compact, var(--action-group-vertical-spacing-compact));margin-inline-end:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset))}:host([compact][vertical]:not([quiet])) ::slotted(:not(:first-child)){margin-block-start:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset));margin-block-end:var(--luzmo-action-group-vertical-spacing-compact, var(--action-group-vertical-spacing-compact));margin-inline-start:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset));margin-inline-end:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset))}:host([compact][vertical]:not([quiet])) ::slotted(:last-child){--luzmo-actionbutton-focus-indicator-border-radius: 0px 0px var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-end-end-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-end-start-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));margin-block-start:var(--luzmo-action-group-vertical-spacing-compact, var(--action-group-vertical-spacing-compact));margin-block-end:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset))}:host([justified]) ::slotted(*){flex:1}:host{--action-group-gap-size-compact: 0px;--action-group-horizontal-spacing-compact: -1px;--action-group-vertical-spacing-compact: -1px;--action-group-button-spacing-reset: 0px;--action-group-border-radius-reset: 0px;--action-group-border-radius: var(--luzmo-border-radius);--action-group-horizontal-spacing-regular: var(--luzmo-spacing-3);--action-group-vertical-spacing-regular: var(--luzmo-spacing-3)}:host([size=xs]),:host([size=s]){--action-group-horizontal-spacing-regular: var(--luzmo-spacing-2);--action-group-vertical-spacing-regular: var(--luzmo-spacing-2)}:host,:host([size=l]),:host([size=xl]){--action-group-horizontal-spacing-regular: var(--luzmo-spacing-3);--action-group-vertical-spacing-regular: var(--luzmo-spacing-3)}:host([dir][compact][vertical]) ::slotted(:nth-child(n)){margin-right:0;margin-left:0}:host([justified]) ::slotted(:not([role])),:host([vertical]) ::slotted(:not([role])){display:flex;flex-direction:column;align-items:stretch}:host([compact]:not([quiet])) ::slotted(:not([role])){--overriden-border-radius: 0;--luzmo-action-button-border-radius: var(--overriden-border-radius)}:host([compact][vertical]:not([quiet])) ::slotted(:not([role]):first-child){--overriden-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0 0}:host([compact][vertical]:not([quiet])) ::slotted(:not([role]):last-child){--overriden-border-radius: 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([dir=ltr][compact]:not([quiet],[vertical])) ::slotted(:not([role]):first-child){--overriden-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([dir=rtl][compact]:not([quiet],[vertical])) ::slotted(:not([role]):first-child){--overriden-border-radius: 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0}:host([dir=ltr][compact]:not([quiet],[vertical])) ::slotted(:not([role]):last-child){--overriden-border-radius: 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0}:host([dir=rtl][compact]:not([quiet],[vertical])) ::slotted(:not([role]):last-child){--overriden-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([compact]:not([quiet])) ::slotted(*){--luzmo-action-button-focus-ring-border-radius: 0}:host([compact][vertical]:not([quiet])) ::slotted(:first-child){--luzmo-action-button-focus-ring-border-radius: var(--luzmo-border-radius) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0 0}:host([compact][vertical]:not([quiet])) ::slotted(:last-child){--luzmo-action-button-focus-ring-border-radius: 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([dir=ltr][compact]:not([quiet],[vertical])) ::slotted(:first-child){--luzmo-action-button-focus-ring-border-radius: var(--luzmo-border-radius) 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([dir=rtl][compact]:not([quiet],[vertical])) ::slotted(:first-child){--luzmo-action-button-focus-ring-border-radius: 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0}:host([dir=ltr][compact]:not([quiet],[vertical])) ::slotted(:last-child){--luzmo-action-button-focus-ring-border-radius: 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0}:host([dir=rtl][compact]:not([quiet],[vertical])) ::slotted(:last-child){--luzmo-action-button-focus-ring-border-radius: var(--luzmo-border-radius) 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}";var v=Object.defineProperty,z=Object.getOwnPropertyDescriptor,c=(n,t,r,e)=>{for(var o=e>1?void 0:e?z(t,r):t,a=n.length-1,i;a>=0;a--)(i=n[a])&&(o=(e?i(t,r,o):i(o))||o);return e&&o&&v(t,r,o),o};const l=[];class s extends b.SizedMixin(u.LuzmoElement,{validSizes:["xs","s","m","l","xl"],noDefaultSize:!0}){constructor(){super(),this._buttons=[],this._buttonSelector="luzmo-action-button, luzmo-action-menu",this.rovingTabindexController=new g.RovingTabindexController(this,{focusInIndex:t=>{let r=-1;const e=t.findIndex((o,a)=>(!t[r]&&!o.disabled&&(r=a),o.selected&&!o.disabled));return t[e]?e:r},elements:()=>this.buttons,isFocusableElement:t=>!t.disabled}),this.compact=!1,this.emphasized=!1,this.justified=!1,this.label="",this.quiet=!1,this.vertical=!1,this._selected=l,this.hasManaged=!1,this.manageButtons=()=>{if(!this.slotElement)return;const r=this.slotElement.assignedElements({flatten:!0}).reduce((e,o)=>{if(o.matches(this._buttonSelector))e.push(o);else{const a=[...o.querySelectorAll(`:scope > ${this._buttonSelector}`)];e.push(...a)}return e},[]);if(this.buttons=r,this.selects||!this.hasManaged){const e=[];this.buttons.forEach(o=>{o.selected&&e.push(o.value)}),this.setSelected([...this.selected,...e])}this.manageChildren(),this.manageSelects(),this.hasManaged=!0},new p.s(this,{config:{childList:!0,subtree:!0},callback:()=>{this.manageButtons()},skipInitial:!0})}static get styles(){return[d.unsafeCSS(m)]}set buttons(t){t!==this.buttons&&(this._buttons=t,this.rovingTabindexController.clearElementCache())}get buttons(){return this._buttons}set selected(t){this.requestUpdate("selected",this._selected),this._selected=t,this.updateComplete.then(()=>{this.applySelects(),this.manageChildren()})}get selected(){return this._selected}dispatchChange(t){this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0,cancelable:!0}))||(this.setSelected(t),this.buttons.map(e=>{e.selected=this.selected.includes(e.value)}))}setSelected(t,r){if(t===this.selected)return;const e=this.selected;this.requestUpdate("selected",e),this._selected=t,r&&this.dispatchChange(e)}focus(t){this.rovingTabindexController.focus(t)}deselectSelectedButtons(){this.buttons.forEach(t=>{t.selected&&(t.selected=!1,t.tabIndex=-1,t.setAttribute(this.selects?"aria-checked":"aria-pressed","false"))})}handleActionButtonChange(t){t.stopPropagation(),t.preventDefault()}handleClick(t){const r=t.target;if(r.value!==void 0)switch(this.selects){case"single":{this.deselectSelectedButtons(),r.selected=!0,r.tabIndex=0,r.setAttribute("aria-checked","true"),this.setSelected([r.value],!0);break}case"multiple":{const e=[...this.selected];r.selected=!r.selected,r.setAttribute("aria-checked",r.selected?"true":"false"),r.selected?e.push(r.value):e.splice(this.selected.indexOf(r.value),1),this.setSelected(e,!0),this.buttons.forEach(o=>{o.tabIndex=-1}),r.tabIndex=0;break}}}async applySelects(){await this.manageSelects(!0)}async manageSelects(t){if(this.buttons.length===0)return;const r=this.buttons;switch(this.selects){case"single":{this.setAttribute("role","radiogroup");const e=[],o=r.map(async i=>{await i.updateComplete,i.setAttribute("role","radio"),i.setAttribute("aria-checked",i.selected?"true":"false"),i.selected&&e.push(i)});if(t)break;await Promise.all(o);const a=e.map(i=>i.value);this.setSelected(a||l);break}case"multiple":{this.getAttribute("role")==="radiogroup"&&this.removeAttribute("role");const e=[],o=r.map(async i=>{await i.updateComplete,i.setAttribute("role","checkbox"),i.setAttribute("aria-checked",i.selected?"true":"false"),i.selected&&e.push(i.value)});if(t)break;await Promise.all(o);const a=e.length>0?e:l;this.setSelected(a);break}default:if(this.selected.length>0){const e=[],o=r.map(async a=>{await a.updateComplete,a.setAttribute("role","button"),a.selected?(a.setAttribute("aria-pressed","true"),e.push(a)):a.removeAttribute("aria-pressed")});if(t)break;await Promise.all(o),this.setSelected(e.map(a=>a.value))}else{this.buttons.forEach(e=>{e.setAttribute("role","button")});break}}this.hasAttribute("role")||this.setAttribute("role","toolbar")}render(){return d.html`
|
|
19
|
-
<slot role="presentation" @slotchange=${this.manageButtons}></slot>
|
|
20
|
-
`}firstUpdated(t){super.firstUpdated(t),this.addEventListener("click",this.handleClick)}updated(t){super.updated(t),t.has("selects")&&(this.manageSelects(),this.manageChildren(),this.selects?this.renderRoot.addEventListener("change",this.handleActionButtonChange):this.renderRoot.removeEventListener("change",this.handleActionButtonChange)),(t.has("quiet")||t.has("emphasized")||t.has("size")||t.has("staticColor"))&&this.manageChildren(t),t.has("label")&&(this.label||t.get("label")!==void 0)&&(this.label.length>0?this.setAttribute("aria-label",this.label):this.removeAttribute("aria-label"))}manageChildren(t){this.buttons.forEach(r=>{(this.quiet||t!=null&&t.get("quiet"))&&(r.quiet=this.quiet),(this.emphasized||t!=null&&t.get("emphasized"))&&(r.emphasized=this.emphasized),(this.staticColor||t!=null&&t.get("staticColor"))&&(r.staticColor=this.staticColor),(this.selects||!this.hasManaged)&&(r.selected=this.selected.includes(r.value)),this.size&&(this.size!=="m"||(t==null?void 0:t.get("size"))!==void 0)&&(r.size=this.size)})}}c([u.n({type:Boolean,reflect:!0})],s.prototype,"compact",2);c([u.n({type:Boolean,reflect:!0})],s.prototype,"emphasized",2);c([u.n({type:Boolean,reflect:!0})],s.prototype,"justified",2);c([u.n({type:String})],s.prototype,"label",2);c([u.n({type:Boolean,reflect:!0})],s.prototype,"quiet",2);c([u.n({type:String})],s.prototype,"selects",2);c([u.n({reflect:!0,attribute:"static-color"})],s.prototype,"staticColor",2);c([u.n({type:Boolean,reflect:!0})],s.prototype,"vertical",2);c([u.n({type:Array})],s.prototype,"selected",1);c([h.e("slot")],s.prototype,"slotElement",2);exports.LuzmoActionGroup=s;
|
package/lib/avatar/index.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../focusable-Dv_6CFaY.cjs"),d=require("../like-anchor-K8W0QYwC.cjs"),v=require("../sized-mixin-BSYHt8nT.cjs"),l=require("lit"),s=require("../base-BCmA9Wxv.cjs"),z=require("../query-BL-TJj7K.cjs"),h=require("../if-defined-Cv6xanXh.cjs"),m='@media (forced-colors: active){:host{--highcontrast-avatar-focus-indicator-color: CanvasText}}:host{--avatar-border-radius: var( --luzmo-avatar-border-radius, var(--luzmo-avatar-size, var(--avatar-size)) );inline-size:var(--luzmo-avatar-size, var(--avatar-size));block-size:var(--luzmo-avatar-size, var(--avatar-size));border-radius:var(--avatar-border-radius);-webkit-user-drag:none;-webkit-user-select:none;user-select:none;opacity:var(--luzmo-avatar-color-opacity, var(--avatar-color-opacity));border-width:0;outline:none;display:inline-block;position:relative;overflow:visible}:host([disabled]){opacity:var(--highcontrast-avatar-color-opacity-disabled, var(--luzmo-avatar-color-opacity-disabled, var(--avatar-color-opacity-disabled)))}:host(:not([disabled])) .is-focused:after,:host(:not([disabled])) .link:focus-visible:after{pointer-events:none;content:"";inline-size:calc(var(--luzmo-avatar-custom-size, var(--luzmo-avatar-size, var(--avatar-size))) + var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) * 2);block-size:calc(var(--luzmo-avatar-custom-size, var(--luzmo-avatar-size, var(--avatar-size))) + var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) * 2);border-style:solid;border-width:var(--luzmo-avatar-focus-indicator-thickness, var(--avatar-focus-indicator-thickness));border-color:var(--highcontrast-avatar-focus-indicator-color, var(--luzmo-avatar-focus-indicator-color, var(--avatar-focus-indicator-color)));border-radius:var(--avatar-border-radius);position:absolute;inset-block-start:calc((var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) + var(--luzmo-avatar-focus-indicator-thickness, var(--avatar-focus-indicator-thickness))) * -1);inset-inline-start:calc((var(--luzmo-avatar-focus-indicator-gap, var(--avatar-focus-indicator-gap)) + var(--luzmo-avatar-focus-indicator-thickness, var(--avatar-focus-indicator-thickness))) * -1)}.link{outline:0}.image{inline-size:var(--luzmo-avatar-size, var(--avatar-size));block-size:var(--luzmo-avatar-size, var(--avatar-size));border-radius:var(--avatar-border-radius)}:host([rounding=none]){border-radius:0}:host([rounding=none]) img{border-radius:0}:host([rounding=full]){border-radius:100%}:host([rounding=full]) img{border-radius:100%}:host([border=light]){border:var(--luzmo-avatar-border-width, var(--avatar-border-width)) solid var(--luzmo-avatar-border-color, var(--avatar-border-color))}:host([border=none]){border:0}:host{--avatar-color-opacity: 1;--avatar-border-width: var(--luzmo-border-width);--avatar-border-color: var(--luzmo-border-color);--avatar-size: 32px;--avatar-focus-indicator-thickness: var(--luzmo-indicator-width);--avatar-focus-indicator-gap: var(--luzmo-indicator-gap);--avatar-focus-indicator-color: var(--luzmo-indicator-color);--avatar-color-opacity-disabled: .3}:host([size=xxs]){--avatar-size: var(--luzmo-component-height-xxs)}:host([size=xs]){--avatar-size: var(--luzmo-component-height-xs)}:host([size=s]){--avatar-size: var(--luzmo-component-height-s)}:host{--avatar-size: var(--luzmo-component-height)}:host([size=l]){--avatar-size: var(--luzmo-component-height-l)}:host([size=xl]){--avatar-size: var(--luzmo-component-height-xl)}:host([size=xxl]){--avatar-size: var(--luzmo-component-height-xxl)}img{vertical-align:top}';var b=Object.defineProperty,t=(e,o,n,f)=>{for(var a=void 0,i=e.length-1,c;i>=0;i--)(c=e[i])&&(a=c(o,n,a)||a);return a&&b(o,n,a),a};class r extends d.LikeAnchor(v.SizedMixin(u.Focusable,{validSizes:Object.values(v.ElementSizes)})){constructor(){super(...arguments),this.src=""}static get styles(){return[l.unsafeCSS(m)]}get focusElement(){return this.anchorElement||this}render(){const o=l.html`
|
|
19
|
-
<img
|
|
20
|
-
class="image"
|
|
21
|
-
alt=${h.o(this.label||void 0)}
|
|
22
|
-
src=${this.src}
|
|
23
|
-
/>
|
|
24
|
-
`;return this.href?this.renderAnchor({id:"link",className:"link",anchorContent:o}):o}}t([s.n({type:String,reflect:!0})],r.prototype,"border");t([s.n({type:String,reflect:!0})],r.prototype,"rounding");t([z.e("#link")],r.prototype,"anchorElement");t([s.n()],r.prototype,"src");customElements.get("luzmo-avatar")||customElements.define("luzmo-avatar",r);exports.LuzmoAvatar=r;
|
package/lib/base-BCmA9Wxv.cjs
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
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
|
-
"use strict";const w=require("lit");/**
|
|
19
|
-
* @license
|
|
20
|
-
* Copyright 2019 Google LLC
|
|
21
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/const u=globalThis,y=u.ShadowRoot&&(u.ShadyCSS===void 0||u.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,v=Symbol(),$=new WeakMap;let P=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==v)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(y&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=$.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&$.set(e,t))}return t}toString(){return this.cssText}};const U=r=>new P(typeof r=="string"?r:r+"",void 0,v),C=(r,t)=>{if(y)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=u.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},S=y?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return U(e)})(r):r;/**
|
|
23
|
-
* @license
|
|
24
|
-
* Copyright 2017 Google LLC
|
|
25
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
26
|
-
*/const{is:A,defineProperty:O,getOwnPropertyDescriptor:M,getOwnPropertyNames:R,getOwnPropertySymbols:T,getPrototypeOf:L}=Object,h=globalThis,_=h.trustedTypes,k=_?_.emptyScript:"",m=h.reactiveElementPolyfillSupport,d=(r,t)=>r,p={toAttribute(r,t){switch(t){case Boolean:r=r?k:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},g=(r,t)=>!A(r,t),b={attribute:!0,type:String,converter:p,reflect:!1,hasChanged:g};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),h.litPropertyMetadata??(h.litPropertyMetadata=new WeakMap);class l extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=b){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&O(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=M(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return i==null?void 0:i.call(this)},set(o){const a=i==null?void 0:i.call(this);n.call(this,o),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d("elementProperties")))return;const t=L(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d("properties"))){const e=this.properties,s=[...R(e),...T(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(S(i))}else t!==void 0&&e.push(S(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return C(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){var n;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const o=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:p).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){var n;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const o=s.getPropertyOptions(i),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)==null?void 0:n.fromAttribute)!==void 0?o.converter:p;this._$Em=i,this[i]=a.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??g)(this[t],e))return;this.P(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[n,o]of i)o.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(i=>{var n;return(n=i.hostUpdate)==null?void 0:n.call(i)}),this.update(e)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}l.elementStyles=[],l.shadowRootOptions={mode:"open"},l[d("elementProperties")]=new Map,l[d("finalized")]=new Map,m==null||m({ReactiveElement:l}),(h.reactiveElementVersions??(h.reactiveElementVersions=[])).push("2.0.4");/**
|
|
27
|
-
* @license
|
|
28
|
-
* Copyright 2017 Google LLC
|
|
29
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
30
|
-
*/const z={attribute:!0,type:String,converter:p,reflect:!1,hasChanged:g},D=(r=z,t,e)=>{const{kind:s,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),n.set(e.name,r),s==="accessor"){const{name:o}=e;return{set(a){const c=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,c,r)},init(a){return a!==void 0&&this.P(o,void 0,r),a}}}if(s==="setter"){const{name:o}=e;return function(a){const c=this[o];t.call(this,a),this.requestUpdate(o,c,r)}}throw Error("Unsupported decorator location: "+s)};function x(r){return(t,e)=>typeof e=="object"?D(r,t,e):((s,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,o?{...s,wrapped:!0}:s),o?Object.getOwnPropertyDescriptor(i,n):void 0})(r,t,e)}const E=new Set,N=()=>{const r=document.documentElement.dir==="rtl"?document.documentElement.dir:"ltr";E.forEach(t=>{t.setAttribute("dir",r)})},j=new MutationObserver(N);j.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const q=r=>r.startManagingContentDirection!==void 0||r.tagName==="LUZMO-THEME";function F(r){class t extends r{get isLTR(){return this.dir==="ltr"}hasVisibleFocusInTree(){const i=((n=document)=>{var c;let o=n.activeElement;for(;o!=null&&o.shadowRoot&&o.shadowRoot.activeElement;)o=o.shadowRoot.activeElement;const a=o?[o]:[];for(;o;){const f=o.assignedSlot||o.parentElement||((c=o.getRootNode())==null?void 0:c.host);f&&a.push(f),o=f}return a})(this.getRootNode())[0];if(!i)return!1;try{return i.matches(":focus-visible")||i.matches(".focus-visible")}catch{return i.matches(".focus-visible")}}connectedCallback(){if(!this.hasAttribute("dir")){let s=this.assignedSlot||this.parentNode;for(;s!==document.documentElement&&!q(s);)s=s.assignedSlot||s.parentNode||s.host;if(this.dir=s.dir==="rtl"?s.dir:this.dir||"ltr",s===document.documentElement)E.add(this);else{const{localName:i}=s;i.search("-")>-1&&!customElements.get(i)?customElements.whenDefined(i).then(()=>{s.startManagingContentDirection(this)}):s.startManagingContentDirection(this)}this._dirParent=s}super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._dirParent&&(this._dirParent===document.documentElement?E.delete(this):this._dirParent.stopManagingContentDirection(this),this.removeAttribute("dir"))}}return t}class B extends F(w.LitElement){}exports.LuzmoElement=B;exports.n=x;
|