@luzmo/lucero 0.0.4 → 0.0.8
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/components/action-group-Uimj-MJP.cjs +20 -0
- package/{lib/action-group-BoIH8s8R.js → components/action-group-enfc-YnW.js} +11 -12
- 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-DWRUSKKF.js} +1 -1
- package/{lib/async-directive-CV2MII86.cjs → components/async-directive-D_Ter1F8.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-B7Pfl2if.cjs +40 -0
- package/components/base-CawdqE7p.js +666 -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-B7v4eeRh.js} +13 -12
- package/components/button-base-DmjYs2s9.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-BFGTmw17.js} +15 -16
- package/{lib/checkbox-mixin-H0Hm-VLk.cjs → components/checkbox-mixin-DUhXwD46.cjs} +3 -3
- package/{lib/clear-button-Ap5H3UyH.js → components/clear-button-DgZmX5RX.js} +9 -10
- package/components/clear-button-KdrF2jaV.cjs +18 -0
- package/{lib/close-button-CGISEF33.js → components/close-button-CFHQnbsK.js} +7 -8
- package/components/close-button-DVGUppyd.cjs +18 -0
- 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 +11 -11
- 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/{lib/color-loupe-DBEApMDT.js → components/color-loupe-DxcqXoJ6.js} +3 -4
- package/components/color-loupe-SskbNeMp.cjs +56 -0
- 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 +6 -6
- package/{lib/directive-helpers-C2vOfhFx.cjs → components/directive-helpers-TkFq2eZF.cjs} +1 -1
- package/{lib/directive-helpers-BLDZnGQv.js → components/directive-helpers-nlQRAaQt.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 +6 -7
- 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-DAhrTCfl.js} +2 -3
- package/components/field-group-DSY2HUoj.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 +2 -2
- package/{lib/field-label-BK_tk8vP.js → components/field-label-CAFfGxEL.js} +15 -16
- package/components/field-label-CjsQ3ujK.cjs +25 -0
- package/{lib/focusable-Dv_6CFaY.cjs → components/focusable-DGWL1v1p.cjs} +1 -1
- package/{lib/focusable-DbUg-3Vp.js → components/focusable-cj2QhwDT.js} +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-B56xGmAg.cjs} +2 -2
- package/{lib/if-defined-CYpcjGCb.js → components/if-defined-BSAr_4u4.js} +1 -1
- package/{lib/index-ovT-qVzf.js → components/index-CMvLpPKD.js} +8 -9
- package/{lib/index-yNcLzjhM.cjs → components/index-DnWavOZD.cjs} +15 -15
- package/components/index.cjs +18 -0
- package/{lib → components}/index.js +131 -90
- 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/language-resolution-8yZa5r_P.js +53 -0
- package/components/language-resolution-DJzmyzZq.cjs +18 -0
- package/{lib/like-anchor-K8W0QYwC.cjs → components/like-anchor-Bmabl9ra.cjs} +4 -4
- package/{lib/like-anchor-cDeGGeHh.js → components/like-anchor-QBlvwFfT.js} +8 -9
- package/{lib/manage-help-text-2mSEy-AD.js → components/manage-help-text-Cozl9Sgn.js} +8 -8
- package/{lib/manage-help-text-iOk-zmy8.cjs → components/manage-help-text-OHXDgxyj.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 +24 -24
- package/components/number-field/number-field.d.ts +113 -0
- package/{lib/observe-slot-text-BmsCNJig.cjs → components/observe-slot-text-CrYB2Pj-.cjs} +1 -1
- package/{lib/observe-slot-text-BoFRF-VI.js → components/observe-slot-text-ggb4kKgY.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 +55 -38
- 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-CJ9by37f.js} +94 -84
- package/components/overlay-Deh6Ki6I.cjs +47 -0
- package/{lib/pending-state-Dbc2HIM2.cjs → components/pending-state-Do522lTd.cjs} +2 -2
- package/{lib/pending-state-D5KTK4_1.js → components/pending-state-TJj1x9xn.js} +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-833Apxe4.js +655 -0
- package/components/picker-DDx8ii73.cjs +127 -0
- package/{lib/platform-DQYMG7JI.js → components/platform-BM-uMWpX.js} +34 -19
- package/components/platform-BiXhwqk3.cjs +18 -0
- package/{lib → components}/popover/index.cjs +1 -1
- package/components/popover/index.d.ts +7 -0
- package/{lib → components}/popover/index.js +2 -2
- package/components/popover/popover.d.ts +29 -0
- package/components/popover-BGOgXaka.cjs +30 -0
- package/{lib/popover-ZRVxogyp.js → components/popover-DlkzrLpl.js} +8 -9
- 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/{lib/progress-circle-DpXiqW6a.js → components/progress-circle-Be24kv6B.js} +5 -6
- package/components/progress-circle-NNbCMK2i.cjs +33 -0
- 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-Dl0KoEcV.js → components/sized-mixin-BxMraZLS.js} +1 -1
- package/{lib/sized-mixin-BSYHt8nT.cjs → components/sized-mixin-D9LkrMjb.cjs} +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-DReJ3hB6.cjs → components/state-C5I1gP3G.cjs} +1 -1
- package/{lib/state-BAO-13Bs.js → components/state-CYxk12SV.js} +1 -1
- package/{lib/streaming-listener-DLo0wkMc.js → components/streaming-listener-CCalHg57.js} +18 -52
- package/components/streaming-listener-KVex1WWB.cjs +18 -0
- package/{lib/style-map-BqvQDFJt.js → components/style-map-Ct2LiEds.js} +1 -1
- package/{lib/style-map-BjBGQ_u3.cjs → components/style-map-uMq-yDJ3.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-C6Aa7XOb.cjs → components/text-field-5_ev9way.cjs} +15 -15
- package/{lib/text-field-DPk332j9.js → components/text-field-CvKSS59x.js} +28 -30
- 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 +13 -12
- 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/components/utils.cjs +18 -0
- package/components/utils.js +42 -0
- package/custom-elements.json +1 -0
- package/index.d.ts +40 -0
- package/package.json +141 -103
- 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/index.d.ts +6 -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/infield-button/index.cjs +0 -22
- package/lib/label/index.cjs +0 -18
- package/lib/legend-position/index.cjs +0 -27
- package/lib/legend-position/index.js +0 -85
- 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/platform-CQzYNWKq.cjs +0 -18
- 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}/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,20 @@
|
|
|
1
|
+
import { CSSResultArray, TemplateResult } from 'lit';
|
|
2
|
+
import { LuzmoTextFieldBase } from './../text-field/text-field';
|
|
3
|
+
/**
|
|
4
|
+
* @element luzmo-color-field
|
|
5
|
+
* @fires input - The value of the color-field has changed.
|
|
6
|
+
* @fires change - An alteration to the value of the color-field has been committed by the user.
|
|
7
|
+
*/
|
|
8
|
+
export declare class LuzmoColorField extends LuzmoTextFieldBase {
|
|
9
|
+
static get styles(): CSSResultArray;
|
|
10
|
+
viewColor: boolean;
|
|
11
|
+
set value(value: string);
|
|
12
|
+
get value(): string;
|
|
13
|
+
protected _value: string;
|
|
14
|
+
private cachedColor;
|
|
15
|
+
getColorValue(): string;
|
|
16
|
+
private renderColorHandle;
|
|
17
|
+
protected render(): TemplateResult;
|
|
18
|
+
private cachedTinyColor;
|
|
19
|
+
checkValidity(): boolean;
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 i=require("../base-B7Pfl2if.cjs"),a=require("../text-field-5_ev9way.cjs"),u=require("../index-DCKCHDTt.cjs");var h=Object.defineProperty,c=(l,e,t,d)=>{for(var o=void 0,r=l.length-1,n;r>=0;r--)(n=l[r])&&(o=n(e,t,o)||o);return o&&h(e,t,o),o};class s extends a.LuzmoTextFieldBase{constructor(){super(...arguments),this.viewColor=!1,this._value="",this.cachedColor=null,this.cachedTinyColor=null}static get styles(){return[...super.styles]}set value(e){if(e===this.value)return;const t=this._value;this._value=e,this.requestUpdate("value",t)}get value(){return this._value}getColorValue(){if(!this.value)return"";if(!this.cachedColor||this.cachedColor!==this.value){const e=new u.TinyColor(this.value);this.cachedColor=e.isValid?e.toRgbString():""}return this.cachedColor}renderColorHandle(){return this.viewColor?i.x`
|
|
19
|
+
<luzmo-color-handle
|
|
20
|
+
size="m"
|
|
21
|
+
color=${this.getColorValue()}
|
|
22
|
+
></luzmo-color-handle>
|
|
23
|
+
`:i.x``}render(){return this.viewColor&&Promise.resolve().then(()=>require("../color-handle/index.cjs")),i.x` ${super.render()} ${this.renderColorHandle()} `}checkValidity(){let e=super.checkValidity();return this.value&&((!this.cachedTinyColor||this.cachedTinyColor.originalInput!==this.value)&&(this.cachedTinyColor=new u.TinyColor(this.value)),this.valid=e=this.cachedTinyColor.isValid,this.invalid=!e),e}}c([i.n({type:Boolean,attribute:"view-color"})],s.prototype,"viewColor");customElements.get("luzmo-color-field")||customElements.define("luzmo-color-field",s);exports.LuzmoColorField=s;
|
|
@@ -15,9 +15,8 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { L as s } from "../text-field-DPk332j9.js";
|
|
18
|
+
import { x as i, n as a } from "../base-CawdqE7p.js";
|
|
19
|
+
import { a as s } from "../text-field-CvKSS59x.js";
|
|
21
20
|
import { T as c } from "../index-C1chwzNp.js";
|
|
22
21
|
const n = () => {
|
|
23
22
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import './../color-loupe/color-loupe';
|
|
2
|
+
import { LuzmoElement } from '../../utils/base';
|
|
3
|
+
export declare class LuzmoColorHandle extends LuzmoElement {
|
|
4
|
+
static styles: import("lit").CSSResult;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
focused: boolean;
|
|
7
|
+
open: boolean;
|
|
8
|
+
color: string;
|
|
9
|
+
private handlePointerdown;
|
|
10
|
+
private handlePointerup;
|
|
11
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
12
|
+
protected firstUpdated(changedProperties: Map<string, any>): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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"});require("../color-loupe-SskbNeMp.cjs");const r=require("../base-B7Pfl2if.cjs"),c=':host{touch-action:none;transition:inline-size var(--luzmo-color-handle-animation-duration, .13s) var(--luzmo-color-handle-animation-easing, ease-in-out),block-size var(--luzmo-color-handle-animation-duration, .13s) var(--luzmo-color-handle-animation-easing, ease-in-out),border-width var(--luzmo-color-handle-animation-duration, .13s) var(--luzmo-color-handle-animation-easing, ease-in-out),margin-inline var(--luzmo-color-handle-animation-duration, .13s) var(--luzmo-color-handle-animation-easing, ease-in-out),margin-block var(--luzmo-color-handle-animation-duration, .13s) var(--luzmo-color-handle-animation-easing, ease-in-out)}:host{background:repeating-conic-gradient(var(--luzmo-color-loupe-checkerboard-light, rgb(255, 255, 255)) 0 25%,var(--luzmo-color-loupe-checkerboard-dark, rgb(230, 230, 230)) 0 50%) var(--luzmo-color-loupe-checkerboard-position, left top)/calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2) calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2);background-position:50%}:host(:focus){outline:none}:host{z-index:1;box-sizing:border-box;inline-size:var(--luzmo-color-handle-size, 16px);block-size:var(--luzmo-color-handle-size, 16px);margin-inline:calc(var(--luzmo-color-handle-size, 16px) / 2 * -1);margin-block:calc(var(--luzmo-color-handle-size, 16px) / 2 * -1);border-width:var(--luzmo-color-handle-border-width, 2px);border-color:var(--luzmo-color-handle-border-color, rgb(255, 255, 255));box-shadow:0 0 0 var(--luzmo-color-handle-outer-border-width, 1px) var(--luzmo-color-handle-outer-border-color, rgba(0, 0, 0, .42));transition:all var(--luzmo-color-handle-animation-duration, 0) var(--luzmo-color-handle-animation-easing, ease-in-out);border-style:solid}:host,:host:after{border-radius:100%;display:block;position:absolute}:host:after{content:"";inset-inline:calc(50% - var(--luzmo-color-handle-hitarea-size, 24px) / 2);inset-block:calc(50% - var(--luzmo-color-handle-hitarea-size, 24px) / 2);inline-size:var(--luzmo-color-handle-hitarea-size, 24px);block-size:var(--luzmo-color-handle-hitarea-size, 24px);border-radius:var(--luzmo-color-handle-hitarea-border-radius, 100%)}:host([focused]),:host(:focus-visible){inline-size:var(--luzmo-color-handle-focused-size, 32px);block-size:var(--luzmo-color-handle-focused-size, 32px);margin-inline:calc(var(--luzmo-color-handle-size, 16px) * -1);margin-block:calc(var(--luzmo-color-handle-size, 16px) * -1);outline:none}:host([disabled]){pointer-events:none;border-color:var(--highcontrast-color-handle-border-color-disabled, var(--luzmo-color-handle-border-color-disabled, var(--luzmo-font-color-disabled)));background:var(--highcontrast-color-handle-fill-color-disabled, var(--luzmo-color-handle-fill-color-disabled, var(--luzmo-font-color-disabled)));box-shadow:none}:host([disabled]) .inner{display:none}.inner{inline-size:100%;block-size:100%;box-shadow:inset 0 0 0 var(--luzmo-color-handle-inner-border-width, var(--luzmo-border-width)) var(--luzmo-color-handle-inner-border-color, rgba(0, 0, 0, .42));background-color:var(--luzmo-picked-color);border-radius:100%}@media (forced-colors: active){:host{forced-color-adjust:none}:host([disabled]){--highcontrast-color-handle-border-color-disabled: GrayText;--highcontrast-color-handle-fill-color-disabled: Canvas}}';var u=Object.defineProperty,a=(t,o,d,h)=>{for(var l=void 0,n=t.length-1,s;n>=0;n--)(s=t[n])&&(l=s(o,d,l)||l);return l&&u(o,d,l),l};const i=class i extends r.LuzmoElement{constructor(){super(...arguments),this.disabled=!1,this.focused=!1,this.open=!1,this.color="rgba(255, 0, 0, 0.5)"}handlePointerdown(o){o.pointerType==="touch"&&(this.open=!0),this.setPointerCapture(o.pointerId)}handlePointerup(o){this.open=!1,this.releasePointerCapture(o.pointerId)}render(){return r.x`
|
|
19
|
+
<div class="inner" style="background-color: ${this.color}"></div>
|
|
20
|
+
<luzmo-color-loupe
|
|
21
|
+
color=${this.color}
|
|
22
|
+
?open=${this.open&&!this.disabled}
|
|
23
|
+
></luzmo-color-loupe>
|
|
24
|
+
`}firstUpdated(o){super.firstUpdated(o),this.addEventListener("pointerdown",this.handlePointerdown),this.addEventListener("pointerup",this.handlePointerup),this.addEventListener("pointercancel",this.handlePointerup)}};i.styles=r.r(c);let e=i;a([r.n({type:Boolean,reflect:!0})],e.prototype,"disabled");a([r.n({type:Boolean,reflect:!0})],e.prototype,"focused");a([r.n({type:Boolean,reflect:!0})],e.prototype,"open");a([r.n({type:String})],e.prototype,"color");customElements.get("luzmo-color-handle")||customElements.define("luzmo-color-handle",e);exports.LuzmoColorHandle=e;
|
|
@@ -15,9 +15,8 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import "../color-loupe-
|
|
19
|
-
import {
|
|
20
|
-
import { unsafeCSS as m, html as z } from "lit";
|
|
18
|
+
import "../color-loupe-DxcqXoJ6.js";
|
|
19
|
+
import { a as s, r as m, x as z, n as a } from "../base-CawdqE7p.js";
|
|
21
20
|
const u = () => {
|
|
22
21
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
23
22
|
const l = document.createElement("style");
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../color-loupe-
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../color-loupe-SskbNeMp.cjs");customElements.get("luzmo-color-loupe")||customElements.define("luzmo-color-loupe",o.LuzmoColorLoupe);exports.LuzmoColorLoupe=o.LuzmoColorLoupe;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { L as r } from "../color-loupe-
|
|
18
|
+
import { L as r } from "../color-loupe-DxcqXoJ6.js";
|
|
19
19
|
const l = () => {
|
|
20
20
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
21
21
|
const o = document.createElement("style");
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import {
|
|
19
|
-
import { unsafeCSS as n, html as d } from "lit";
|
|
18
|
+
import { a as s, r as d, x as n, n as p } from "./base-CawdqE7p.js";
|
|
20
19
|
const h = ':host{inline-size:var(--luzmo-color-loupe-width, 48px);block-size:var(--luzmo-color-loupe-height, 64px);transform:translateY(var(--luzmo-color-loupe-animation-distance, 8px));opacity:0;transform-origin:bottom;pointer-events:none;filter:drop-shadow(var(--luzmo-color-loupe-drop-shadow-x, 0) var(--luzmo-color-loupe-drop-shadow-y, 2px) var(--luzmo-color-loupe-drop-shadow-blur, 8px) var(--luzmo-color-loupe-drop-shadow-color, rgba(0, 0, 0, .25)));transition:transform .1s ease-in-out,opacity .125s ease-in-out;position:absolute;inset-block-end:calc(var(--luzmo-color-handle-size, 16px) - var(--luzmo-color-handle-outer-border-width, 1px) + var(--luzmo-color-loupe-offset, 12px));inset-inline-end:calc(50% - var(--luzmo-color-loupe-width, 48px) / 2)}:host:dir(rtl),:host([dir=rtl]){inset-inline-end:calc(50% - var(--luzmo-color-loupe-width, 48px) / 2 - 1px)}:host([open]){opacity:1;transform:translate(0)}.luzmo-color-loupe-inner-border{fill:var(--luzmo-picked-color);stroke:var(--luzmo-color-loupe-inner-border-color, rgba(0, 0, 0, .1));stroke-width:var(--luzmo-color-loupe-inner-border-width, 1px)}.luzmo-color-loupe-outer-border{fill:none;stroke:var(--luzmo-color-loupe-outer-border-color, white);stroke-width:calc(var(--luzmo-color-loupe-outer-border-width, 2px) + 2px);transform:translate(calc((var(--luzmo-color-loupe-outer-border-width, 2px) + 2px) / 2))}.luzmo-color-loupe-checkerboard-pattern{fill:var(--luzmo-color-loupe-checkerboard-dark-color, rgb(230, 230, 230))}.luzmo-color-loupe-checkerboard-background{fill:var(--luzmo-color-loupe-checkerboard-light-color, rgb(255, 255, 255))}.luzmo-color-loupe-checkerboard-fill{fill:var(--luzmo-color-loupe-checkerboard-fill, url(#checkerboard-primary))}@media (forced-colors: active){:host{--highcontrast-colorloupe-outer-border-color: CanvasText}}svg{width:inherit;height:inherit}.loupe-clipped{clip-path:path("M23 61.575C19.0044 57.435 15.2591 53.0606 11.784 48.475C8.68949 44.4532 5.96348 40.1608 3.639 35.65C1.224 30.8 0 26.549 0 23C0.00319993 17.6937 1.84059 12.5516 5.20091 8.44488C8.56122 4.33815 13.2378 1.51928 18.4385 0.465803C23.6392 -0.587678 29.0442 0.189006 33.7378 2.66428C38.4314 5.13955 42.125 9.16122 44.193 14.048C45.3915 16.88 46.0061 19.9248 46 23C46 26.551 44.774 30.811 42.355 35.661C40.0274 40.1747 37.298 44.4698 34.2 48.494C30.7297 53.0728 26.9898 57.4409 23 61.575ZZ")}.opacity-checkerboard{position:absolute;top:2px;left:2px;block-size:100%;inline-size:100%}.opacity-checkerboard{background:repeating-conic-gradient(var(--luzmo-color-loupe-checkerboard-light, rgb(255, 255, 255)) 0 25%,var(--luzmo-color-loupe-checkerboard-dark, rgb(230, 230, 230)) 0 50%) var(--luzmo-color-loupe-checkerboard-position, left top)/calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2) calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2)}';
|
|
21
20
|
var m = Object.defineProperty, u = (a, t, c, b) => {
|
|
22
21
|
for (var o = void 0, l = a.length - 1, i; l >= 0; l--)
|
|
@@ -28,7 +27,7 @@ const e = class e extends s {
|
|
|
28
27
|
super(...arguments), this.open = !1, this.color = "rgba(255, 0, 0, 0.5)";
|
|
29
28
|
}
|
|
30
29
|
render() {
|
|
31
|
-
return
|
|
30
|
+
return n`
|
|
32
31
|
<div class="opacity-checkerboard loupe-clipped"></div>
|
|
33
32
|
<div class="luzmo-color-loupe-inner-border loupe-clipped"></div>
|
|
34
33
|
<div class="luzmo-color-loupe-outer-border loupe-clipped"></div>
|
|
@@ -69,7 +68,7 @@ const e = class e extends s {
|
|
|
69
68
|
`;
|
|
70
69
|
}
|
|
71
70
|
};
|
|
72
|
-
e.styles =
|
|
71
|
+
e.styles = d(h);
|
|
73
72
|
let r = e;
|
|
74
73
|
u([
|
|
75
74
|
p({ type: Boolean, reflect: !0 })
|
|
@@ -0,0 +1,56 @@
|
|
|
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 r=require("./base-B7Pfl2if.cjs"),s=':host{inline-size:var(--luzmo-color-loupe-width, 48px);block-size:var(--luzmo-color-loupe-height, 64px);transform:translateY(var(--luzmo-color-loupe-animation-distance, 8px));opacity:0;transform-origin:bottom;pointer-events:none;filter:drop-shadow(var(--luzmo-color-loupe-drop-shadow-x, 0) var(--luzmo-color-loupe-drop-shadow-y, 2px) var(--luzmo-color-loupe-drop-shadow-blur, 8px) var(--luzmo-color-loupe-drop-shadow-color, rgba(0, 0, 0, .25)));transition:transform .1s ease-in-out,opacity .125s ease-in-out;position:absolute;inset-block-end:calc(var(--luzmo-color-handle-size, 16px) - var(--luzmo-color-handle-outer-border-width, 1px) + var(--luzmo-color-loupe-offset, 12px));inset-inline-end:calc(50% - var(--luzmo-color-loupe-width, 48px) / 2)}:host:dir(rtl),:host([dir=rtl]){inset-inline-end:calc(50% - var(--luzmo-color-loupe-width, 48px) / 2 - 1px)}:host([open]){opacity:1;transform:translate(0)}.luzmo-color-loupe-inner-border{fill:var(--luzmo-picked-color);stroke:var(--luzmo-color-loupe-inner-border-color, rgba(0, 0, 0, .1));stroke-width:var(--luzmo-color-loupe-inner-border-width, 1px)}.luzmo-color-loupe-outer-border{fill:none;stroke:var(--luzmo-color-loupe-outer-border-color, white);stroke-width:calc(var(--luzmo-color-loupe-outer-border-width, 2px) + 2px);transform:translate(calc((var(--luzmo-color-loupe-outer-border-width, 2px) + 2px) / 2))}.luzmo-color-loupe-checkerboard-pattern{fill:var(--luzmo-color-loupe-checkerboard-dark-color, rgb(230, 230, 230))}.luzmo-color-loupe-checkerboard-background{fill:var(--luzmo-color-loupe-checkerboard-light-color, rgb(255, 255, 255))}.luzmo-color-loupe-checkerboard-fill{fill:var(--luzmo-color-loupe-checkerboard-fill, url(#checkerboard-primary))}@media (forced-colors: active){:host{--highcontrast-colorloupe-outer-border-color: CanvasText}}svg{width:inherit;height:inherit}.loupe-clipped{clip-path:path("M23 61.575C19.0044 57.435 15.2591 53.0606 11.784 48.475C8.68949 44.4532 5.96348 40.1608 3.639 35.65C1.224 30.8 0 26.549 0 23C0.00319993 17.6937 1.84059 12.5516 5.20091 8.44488C8.56122 4.33815 13.2378 1.51928 18.4385 0.465803C23.6392 -0.587678 29.0442 0.189006 33.7378 2.66428C38.4314 5.13955 42.125 9.16122 44.193 14.048C45.3915 16.88 46.0061 19.9248 46 23C46 26.551 44.774 30.811 42.355 35.661C40.0274 40.1747 37.298 44.4698 34.2 48.494C30.7297 53.0728 26.9898 57.4409 23 61.575ZZ")}.opacity-checkerboard{position:absolute;top:2px;left:2px;block-size:100%;inline-size:100%}.opacity-checkerboard{background:repeating-conic-gradient(var(--luzmo-color-loupe-checkerboard-light, rgb(255, 255, 255)) 0 25%,var(--luzmo-color-loupe-checkerboard-dark, rgb(230, 230, 230)) 0 50%) var(--luzmo-color-loupe-checkerboard-position, left top)/calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2) calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2)}';var n=Object.defineProperty,u=(t,c,i,d)=>{for(var o=void 0,l=t.length-1,p;l>=0;l--)(p=t[l])&&(o=p(c,i,o)||o);return o&&n(c,i,o),o};const a=class a extends r.LuzmoElement{constructor(){super(...arguments),this.open=!1,this.color="rgba(255, 0, 0, 0.5)"}render(){return r.x`
|
|
19
|
+
<div class="opacity-checkerboard loupe-clipped"></div>
|
|
20
|
+
<div class="luzmo-color-loupe-inner-border loupe-clipped"></div>
|
|
21
|
+
<div class="luzmo-color-loupe-outer-border loupe-clipped"></div>
|
|
22
|
+
<svg
|
|
23
|
+
aria-hidden="true"
|
|
24
|
+
class="luzmo-color-loupe is-open"
|
|
25
|
+
overflow="visible"
|
|
26
|
+
style="--luzmo-picked-color: ${this.color}; position: absolute;"
|
|
27
|
+
>
|
|
28
|
+
<defs>
|
|
29
|
+
<path
|
|
30
|
+
id="loupe-path"
|
|
31
|
+
d="M23 61.575C19.0044 57.435 15.2591 53.0606 11.784 48.475C8.68949 44.4532 5.96348 40.1608 3.639 35.65C1.224 30.8 0 26.549 0 23C0.00319993 17.6937 1.84059 12.5516 5.20091 8.44488C8.56122 4.33815 13.2378 1.51928 18.4385 0.465803C23.6392 -0.587678 29.0442 0.189006 33.7378 2.66428C38.4314 5.13955 42.125 9.16122 44.193 14.048C45.3915 16.88 46.0061 19.9248 46 23C46 26.551 44.774 30.811 42.355 35.661C40.0274 40.1747 37.298 44.4698 34.2 48.494C30.7297 53.0728 26.9898 57.4409 23 61.575ZZ"
|
|
32
|
+
transform="translate(2, 2)"
|
|
33
|
+
/>
|
|
34
|
+
<mask id="loupe-mask">
|
|
35
|
+
<rect x="0" y="0" height="100" width="100" fill="white" />
|
|
36
|
+
<use xlink:href="#path" fill="black" />
|
|
37
|
+
</mask>
|
|
38
|
+
</defs>
|
|
39
|
+
|
|
40
|
+
<g class="luzmo-color-loupe-loupe">
|
|
41
|
+
<g>
|
|
42
|
+
<use
|
|
43
|
+
xlink:href="#loupe-path"
|
|
44
|
+
mask="url(#loupe-mask)"
|
|
45
|
+
transform="translate(2, 2)"
|
|
46
|
+
class="luzmo-color-loupe-inner-border"
|
|
47
|
+
/>
|
|
48
|
+
<use
|
|
49
|
+
xlink:href="#loupe-path"
|
|
50
|
+
mask="url(#loupe-mask)"
|
|
51
|
+
class="luzmo-color-loupe-outer-border"
|
|
52
|
+
/>
|
|
53
|
+
</g>
|
|
54
|
+
</g>
|
|
55
|
+
</svg>
|
|
56
|
+
`}};a.styles=r.r(s);let e=a;u([r.n({type:Boolean,reflect:!0})],e.prototype,"open");u([r.n({type:String})],e.prototype,"color");exports.LuzmoColorLoupe=e;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { TemplateResult } from 'lit';
|
|
2
|
+
import { LuzmoElement } from '../../utils/base';
|
|
3
|
+
import { ColorValue } from '../../utils/reactive-controllers/color';
|
|
4
|
+
import '../color-area';
|
|
5
|
+
import '../color-field';
|
|
6
|
+
import '../color-handle';
|
|
7
|
+
import '../color-slider';
|
|
8
|
+
import '../divider';
|
|
9
|
+
import '../popover';
|
|
10
|
+
import '../swatch';
|
|
11
|
+
declare const LuzmoColorMenu_base: typeof LuzmoElement & {
|
|
12
|
+
new (...args: any[]): import("../..").SizedElementInterface;
|
|
13
|
+
prototype: import("../..").SizedElementInterface;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* @element luzmo-color-menu
|
|
17
|
+
* @fires change - An alteration to the value of the Color Menu has been committed by the user.
|
|
18
|
+
*/
|
|
19
|
+
export declare class LuzmoColorMenu extends LuzmoColorMenu_base {
|
|
20
|
+
static styles: import("lit").CSSResult;
|
|
21
|
+
/**
|
|
22
|
+
* The color value of the Color Menu
|
|
23
|
+
*/
|
|
24
|
+
color: ColorValue;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the alpha channel is available
|
|
27
|
+
*/
|
|
28
|
+
noAlphaChannel: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The swatches available in the color menu
|
|
31
|
+
*/
|
|
32
|
+
swatches: string[];
|
|
33
|
+
private _alpha;
|
|
34
|
+
private _rgbColor;
|
|
35
|
+
private _rgbaColor;
|
|
36
|
+
private _previousColor;
|
|
37
|
+
private areaElement;
|
|
38
|
+
private hueSliderElement;
|
|
39
|
+
private opacitySliderElement;
|
|
40
|
+
private colorFieldElement;
|
|
41
|
+
private swatchElement;
|
|
42
|
+
private _format;
|
|
43
|
+
setColor(event: CustomEvent): void;
|
|
44
|
+
private handleAreaChange;
|
|
45
|
+
private handleHueSliderChange;
|
|
46
|
+
private handleOpacitySliderChange;
|
|
47
|
+
private handleFieldChange;
|
|
48
|
+
private formatTextField;
|
|
49
|
+
private cycleFormat;
|
|
50
|
+
updated(changedProperties: Map<string, any>): void;
|
|
51
|
+
protected renderOpacitySlider(): TemplateResult;
|
|
52
|
+
protected render(): TemplateResult;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
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 c=require("@luzmo/icons"),l=require("../base-B7Pfl2if.cjs"),d=require("../state-C5I1gP3G.cjs"),s=require("../query-BL-TJj7K.cjs"),g=require("../sized-mixin-D9LkrMjb.cjs");require("../color-area/index.cjs");require("../color-field/index.cjs");require("../color-handle/index.cjs");require("../color-slider/index.cjs");require("../divider/index.cjs");require("../popover/index.cjs");require("../swatch/index.cjs");const i=require("../index-DCKCHDTt.cjs"),z='@charset "UTF-8";:host{width:var(--luzmo-color-menu-width, var(--color-menu-width))}.hue-opacity-text-swatches-container{display:flex;gap:var(--luzmo-color-menu-color-controls-vertical-gap, var(--color-menu-color-controls-vertical-gap));flex-direction:column;padding:var(--luzmo-color-menu-hue-opacity-text-swatches-vertical-padding, var(--color-menu-hue-opacity-text-swatches-vertical-padding)) var(--luzmo-color-menu-hue-opacity-text-swatches-horizontal-padding, var(--color-menu-hue-opacity-text-swatches-horizontal-padding))}.swatch-sliders-container{display:flex;gap:var(--luzmo-color-menu-swatch-to-sliders-space, var(--color-menu-swatch-to-sliders-space))}.swatch-example-container{display:flex;align-items:center}.field-container{display:flex;align-items:center;gap:var(--luzmo-color-menu-format-field-to-format-space, var(--color-menu-format-field-to-format-space))}.format-container{text-transform:uppercase;position:relative;background:none;border:none;outline:none;height:var(--luzmo-color-menu-format-height, var(--color-menu-format-height));cursor:pointer;font-size:var(--luzmo-color-menu-format-font-size, var(--color-menu-format-font-size));display:flex;align-items:center;color:var(--luzmo-color-menu-format-font-color, var(--color-menu-format-font-color));gap:var(--luzmo-color-menu-format-name-to-icon, var(--color-menu-format-name-to-icon-space));padding:0 var(--luzmo-color-menu-format-horizontal-padding, var(--color-menu-format-horizontal-padding))}.format-container:hover{color:var(--luzmo-color-menu-format-font-color-hover, var(--color-menu-format-font-color-hover))}.format-container:focus-visible{outline:none}.format-container:focus-visible:after{content:"";width:100%;height:100%;position:absolute;box-sizing:border-box;left:0;top:0;border:var(--luzmo-color-menu-format-indicator-width, var(--luzmo-indicator-width)) solid var(--luzmo-color-menu-format-indicator-color, var(--luzmo-indicator-color));border-radius:var(--luzmo-color-menu-format-label-indicator-border-radius, var(--luzmo-border-radius-s))}.format-container:focus-visible,.format-container:active{color:var(--luzmo-color-menu-format-font-color-down, var(--color-menu-format-font-color-down))}.format-container .format-label{-webkit-user-select:none;user-select:none}.format-container .angle-icon{display:flex;align-items:center;height:calc(var(--color-menu-format-font-size) / 1.5)}.slider-container{display:flex;flex-direction:column;justify-content:center;gap:var(--luzmo-color-menu-slider-gap, var(--color-menu-slider-gap))}luzmo-color-area{width:100%;height:var(--luzmo-color-menu-height, var(--color-menu-height))}luzmo-color-slider{width:100%}luzmo-divider{margin:var(--luzmo-spacing-5) à}.swatches-container{display:grid;grid-template-columns:repeat(6,1fr);gap:var(--luzmo-color-menu-swatches-gap, var(--color-menu-swatches-gap))}.swatches-container luzmo-swatch{cursor:pointer}.swatches-container .swatch-choice{display:flex;align-items:center;justify-content:center}:host{--luzmo-text-field-icon-size-valid: 0px;--luzmo-text-field-icon-spacing-inline-end-valid: 1px;--luzmo-text-field-text-align: center}:host{--color-menu-width: 290px;--luzmo-text-field-width: 220px;--luzmo-color-slider-control-track-width: 8px;--color-menu-height: 140px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-5 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-5);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-5);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height);--color-menu-format-font-size: var(--luzmo-font-size-s);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-2);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-3);--color-menu-format-font-color: var(--luzmo-font-color);--color-menu-format-font-color-hover: var(--luzmo-font-color-hover);--color-menu-format-font-color-down: var(--luzmo-font-color-down);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host .swatches-container{--luzmo-swatch-size: 22px}:host([size=s]){--color-menu-width: 260px;--luzmo-text-field-width: 200px;--luzmo-color-slider-control-track-width: 8px;--color-menu-hue-opacity-text-swatches-horizontal-padding: var( --luzmo-spacing-5 );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-4 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-4);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-4);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height-s);--color-menu-format-font-size: var(--luzmo-font-size-xs);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-2);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-2);--color-menu-swatches-gap: var(--luzmo-spacing-3)}:host([size=s]) .swatches-container{--luzmo-swatch-size: 20px}:host([size=l]){--color-menu-width: 350px;--luzmo-text-field-width: 240px;--luzmo-color-slider-control-track-width: 16px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-5 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-5);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-5);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-format-height: var(--luzmo-component-height-l);--color-menu-format-font-size: var(--luzmo-font-size);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-3);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-4);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host([size=l]) .swatches-container{--luzmo-swatch-size: 24px}:host([size=l]) .swatch-example-container{--luzmo-swatch-size: 56px}:host([size=xl]){--color-menu-width: 380px;--luzmo-text-field-width: 280px;--luzmo-color-slider-control-track-width: 16px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-hue-opacity-text-swatches-vertical-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-color-controls-vertical-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-swatch-to-sliders-space: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height-xl);--color-menu-format-font-size: var(--luzmo-font-size-l);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-3);--color-menu-format-field-to-format-space: var(--luzmo-spacing-3);--color-menu-format-horizontal-padding: var(--luzmo-spacing-4);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host([size=xl]) .swatches-container{--luzmo-swatch-size: 26px}:host([size=xl]) .swatch-example-container{--luzmo-swatch-size: 64px}';var v=Object.defineProperty,a=(u,o,t,e)=>{for(var n=void 0,h=u.length-1,p;h>=0;h--)(p=u[h])&&(n=p(o,t,n)||n);return n&&v(o,t,n),n};const m=class m extends g.SizedMixin(l.LuzmoElement){constructor(){super(...arguments),this.color="rgb(255, 0, 0)",this.noAlphaChannel=!1,this._alpha=1,this._rgbColor="rgb(255, 0, 0)",this._rgbaColor="rgb(255, 0, 0, 1)",this._previousColor="rgb(255, 0, 0)"}setColor(o){var e;const t=new i.TinyColor((e=o==null?void 0:o.target)==null?void 0:e.color);this._format=t.format==="name"?"rgb":t.format,this._rgbaColor=t.toRgbString(),this._alpha=this.noAlphaChannel?1:t.getAlpha(),this._rgbColor=t.setAlpha(1).toRgbString(),this.hueSliderElement.color=this._rgbColor,this.areaElement.color=this._rgbColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.swatchElement.color=this._rgbaColor,this.colorFieldElement.value=this.formatTextField(t),this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}handleAreaChange(o){o.stopPropagation(),o.preventDefault(),this._rgbColor=this.areaElement.color;const t=new i.TinyColor(this._rgbColor);this._rgbaColor=t.setAlpha(this._alpha).toRgbString(),this.colorFieldElement.value=this._rgbaColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.colorFieldElement.value=this.formatTextField(t),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}handleHueSliderChange(o){o.stopPropagation(),o.preventDefault();const t=new i.TinyColor(this._rgbColor).toHsl();t.h=this.hueSliderElement.value;const e=new i.TinyColor(t);this._rgbColor=e.toRgbString(),this._rgbaColor=e.setAlpha(this._alpha).toRgbString(),this.areaElement.color=this._rgbColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.colorFieldElement.value=this.formatTextField(e),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}handleOpacitySliderChange(o){o.stopPropagation(),o.preventDefault(),this._alpha=this.opacitySliderElement.sliderHandlePosition/100;const t=new i.TinyColor(this._rgbColor).setAlpha(this._alpha);this._rgbaColor=t.toRgbString(),this.colorFieldElement.value=this.formatTextField(t),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}handleFieldChange(o){if(o.stopPropagation(),o.preventDefault(),this.colorFieldElement.checkValidity()){const t=new i.TinyColor(this.colorFieldElement.value);this._format=t.format,this._rgbaColor=t.toRgbString(),this._alpha=t.getAlpha(),this._rgbColor=t.setAlpha(1).toRgbString(),this.noAlphaChannel&&(this._rgbaColor=this._rgbColor,this._alpha=1),this.hueSliderElement.color=this._rgbColor,this.areaElement.color=this._rgbColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}}formatTextField(o){return this._format==="hsl"?o.toHslString():this._format==="hex"?this.noAlphaChannel?o.toHexString():o.toHex8String():(this._format==="name"&&(this._format="rgb"),o.toRgbString())}cycleFormat(){const o=["rgb","hsl","hex"];this._format=o[(o.indexOf(this._format)+1)%o.length];const t=new i.TinyColor(this.color),e=this.formatTextField(t);this.colorFieldElement.value=e}updated(o){if(o.has("color")&&this.color!==this._previousColor){this._previousColor=this.color;const t=new i.TinyColor(this.color);this._alpha=t.getAlpha(),this._rgbColor=t.setAlpha(1).toRgbString(),this._rgbaColor=t.setAlpha(this._alpha).toRgbString(),this.areaElement.color=this._rgbColor,this.hueSliderElement.color=this._rgbColor,this.colorFieldElement.value=this._rgbaColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.swatchElement.color=this._rgbaColor,this._format="rgb"}o.has("noAlphaChannel")&&!this.noAlphaChannel&&(this.opacitySliderElement.color=this._rgbaColor)}renderOpacitySlider(){return l.x`
|
|
19
|
+
<luzmo-color-slider
|
|
20
|
+
id="luzmo-opacity-slider"
|
|
21
|
+
mode="opacity"
|
|
22
|
+
@input=${this.handleOpacitySliderChange}
|
|
23
|
+
>
|
|
24
|
+
</luzmo-color-slider>
|
|
25
|
+
`}render(){var o;return l.x`
|
|
26
|
+
<div>
|
|
27
|
+
<luzmo-color-area
|
|
28
|
+
.size=${this.size}
|
|
29
|
+
@input=${this.handleAreaChange}
|
|
30
|
+
></luzmo-color-area>
|
|
31
|
+
<div class="hue-opacity-text-swatches-container">
|
|
32
|
+
<div class="swatch-sliders-container">
|
|
33
|
+
<div class="swatch-example-container">
|
|
34
|
+
<luzmo-swatch
|
|
35
|
+
rounding="full"
|
|
36
|
+
.size=${this.noAlphaChannel&&["s","m"].includes(this.size)?"s":"l"}
|
|
37
|
+
readonly
|
|
38
|
+
></luzmo-swatch>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="slider-container" style="flex-grow: 1;">
|
|
41
|
+
<luzmo-color-slider
|
|
42
|
+
id="luzmo-hue-slider"
|
|
43
|
+
@input=${this.handleHueSliderChange}
|
|
44
|
+
>
|
|
45
|
+
</luzmo-color-slider>
|
|
46
|
+
${this.noAlphaChannel?"":this.renderOpacitySlider()}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="field-container">
|
|
50
|
+
<luzmo-color-field
|
|
51
|
+
.size=${this.size}
|
|
52
|
+
@input=${this.handleFieldChange}
|
|
53
|
+
>
|
|
54
|
+
</luzmo-color-field>
|
|
55
|
+
<button
|
|
56
|
+
class="format-container"
|
|
57
|
+
aria-label="Color format"
|
|
58
|
+
@click=${this.cycleFormat}
|
|
59
|
+
tabindex="0"
|
|
60
|
+
>
|
|
61
|
+
<div class="format-label">${this._format}</div>
|
|
62
|
+
<div class="change-format-icon">
|
|
63
|
+
<div class="angle-icon">${c.luzmoIcon(c.luzmoAngleUp)}</div>
|
|
64
|
+
<div class="angle-icon">${c.luzmoIcon(c.luzmoAngleDown)}</div>
|
|
65
|
+
</div>
|
|
66
|
+
</button>
|
|
67
|
+
</div>
|
|
68
|
+
${((o=this.swatches)==null?void 0:o.length)>0?l.x`
|
|
69
|
+
<luzmo-divider></luzmo-divider>
|
|
70
|
+
<div class="swatches-container">
|
|
71
|
+
${this.swatches.map(t=>l.x`
|
|
72
|
+
<div class="swatch-choice">
|
|
73
|
+
<luzmo-swatch
|
|
74
|
+
@click=${this.setColor}
|
|
75
|
+
.color=${t}
|
|
76
|
+
.size=${this.size}
|
|
77
|
+
readonly
|
|
78
|
+
>
|
|
79
|
+
</luzmo-swatch>
|
|
80
|
+
</div>
|
|
81
|
+
`)}
|
|
82
|
+
</div>
|
|
83
|
+
`:""}
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
`}};m.styles=l.r(z);let r=m;a([l.n({type:String,reflect:!0})],r.prototype,"color");a([l.n({type:Boolean,reflect:!0,attribute:"no-alpha-channel"})],r.prototype,"noAlphaChannel");a([l.n({type:Array,reflect:!0})],r.prototype,"swatches");a([s.e("luzmo-color-area")],r.prototype,"areaElement");a([s.e("#luzmo-hue-slider")],r.prototype,"hueSliderElement");a([s.e("#luzmo-opacity-slider")],r.prototype,"opacitySliderElement");a([s.e("luzmo-color-field")],r.prototype,"colorFieldElement");a([s.e("luzmo-swatch")],r.prototype,"swatchElement");a([d.r()],r.prototype,"_format");customElements.get("luzmo-color-menu")||customElements.define("luzmo-color-menu",r);exports.LuzmoColorMenu=r;
|
|
@@ -16,18 +16,17 @@
|
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
18
|
import { luzmoIcon as p, luzmoAngleUp as z, luzmoAngleDown as f } from "@luzmo/icons";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { unsafeCSS as x, html as s } from "lit";
|
|
22
|
-
import { r as w } from "../state-BAO-13Bs.js";
|
|
19
|
+
import { a as v, r as b, x as s, n as h } from "../base-CawdqE7p.js";
|
|
20
|
+
import { r as x } from "../state-CYxk12SV.js";
|
|
23
21
|
import { e as n } from "../query-D_KR_GUc.js";
|
|
24
|
-
import "../
|
|
25
|
-
import "../popover/index.js";
|
|
26
|
-
import "../swatch/index.js";
|
|
22
|
+
import { S as w } from "../sized-mixin-BxMraZLS.js";
|
|
27
23
|
import "../color-area/index.js";
|
|
28
24
|
import "../color-field/index.js";
|
|
29
25
|
import "../color-handle/index.js";
|
|
30
26
|
import "../color-slider/index.js";
|
|
27
|
+
import "../divider/index.js";
|
|
28
|
+
import "../popover/index.js";
|
|
29
|
+
import "../swatch/index.js";
|
|
31
30
|
import { T as a } from "../index-C1chwzNp.js";
|
|
32
31
|
const g = () => {
|
|
33
32
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
@@ -42,7 +41,7 @@ var y = Object.defineProperty, t = (i, o, r, e) => {
|
|
|
42
41
|
(d = i[m]) && (c = d(o, r, c) || c);
|
|
43
42
|
return c && y(o, r, c), c;
|
|
44
43
|
};
|
|
45
|
-
const u = class u extends
|
|
44
|
+
const u = class u extends w(v) {
|
|
46
45
|
constructor() {
|
|
47
46
|
super(...arguments), this.color = "rgb(255, 0, 0)", this.noAlphaChannel = !1, this._alpha = 1, this._rgbColor = "rgb(255, 0, 0)", this._rgbaColor = "rgb(255, 0, 0, 1)", this._previousColor = "rgb(255, 0, 0)";
|
|
48
47
|
}
|
|
@@ -169,7 +168,7 @@ const u = class u extends b(v) {
|
|
|
169
168
|
`;
|
|
170
169
|
}
|
|
171
170
|
};
|
|
172
|
-
u.styles =
|
|
171
|
+
u.styles = b(C);
|
|
173
172
|
let l = u;
|
|
174
173
|
t([
|
|
175
174
|
h({ type: String, reflect: !0 })
|
|
@@ -196,7 +195,7 @@ t([
|
|
|
196
195
|
n("luzmo-swatch")
|
|
197
196
|
], l.prototype, "swatchElement");
|
|
198
197
|
t([
|
|
199
|
-
|
|
198
|
+
x()
|
|
200
199
|
], l.prototype, "_format");
|
|
201
200
|
customElements.get("luzmo-color-menu") || customElements.define("luzmo-color-menu", l);
|
|
202
201
|
export {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { PropertyValues, TemplateResult } from 'lit';
|
|
2
|
+
import { LuzmoElement } from '../../utils/base';
|
|
3
|
+
import { ColorValue } from '../../utils/reactive-controllers/color';
|
|
4
|
+
import '../color-menu';
|
|
5
|
+
import '../overlay';
|
|
6
|
+
import '../popover';
|
|
7
|
+
import '../swatch';
|
|
8
|
+
import { SwatchRounding, SwatchShape } from './../swatch/swatch';
|
|
9
|
+
declare const LuzmoColorPicker_base: typeof LuzmoElement & {
|
|
10
|
+
new (...args: any[]): import("../..").SizedElementInterface;
|
|
11
|
+
prototype: import("../..").SizedElementInterface;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @element luzmo-color-slider
|
|
15
|
+
* @fires input - The value of the Color Slider has changed.
|
|
16
|
+
* @fires change - An alteration to the value of the Color Slider has been committed by the user.
|
|
17
|
+
*/
|
|
18
|
+
export declare class LuzmoColorPicker extends LuzmoColorPicker_base {
|
|
19
|
+
static styles: import("lit").CSSResult;
|
|
20
|
+
color?: ColorValue;
|
|
21
|
+
open: boolean;
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
placement: string;
|
|
24
|
+
rounding?: SwatchRounding;
|
|
25
|
+
shape: SwatchShape;
|
|
26
|
+
swatches: string[];
|
|
27
|
+
noAlphaChannel: boolean;
|
|
28
|
+
private menuElement;
|
|
29
|
+
private overlayElement;
|
|
30
|
+
private _renderMenu;
|
|
31
|
+
private overlayCloseEvent;
|
|
32
|
+
private overlayOpenEvent;
|
|
33
|
+
private handleColorChange;
|
|
34
|
+
protected firstUpdated(): void;
|
|
35
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
36
|
+
private renderColorMenu;
|
|
37
|
+
protected render(): TemplateResult;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
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-B7Pfl2if.cjs"),c=require("../state-C5I1gP3G.cjs"),u=require("../query-BL-TJj7K.cjs"),h=require("../sized-mixin-D9LkrMjb.cjs");require("../color-menu/index.cjs");require("../overlay/index.cjs");const d=require("../slottable-request-event-BfUUt1Mh.cjs");require("../popover/index.cjs");require("../swatch/index.cjs");const m="luzmo-popover{margin-left:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap));margin-right:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap))}luzmo-swatch{cursor:pointer}:host{--luzmo-popover-content-area-spacing-vertical: 0;--color-picker-popover-horizontal-gap: var(--luzmo-spacing-4)}:host([size=s]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-3)}:host([size=l]),:host([size=xl]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-5)}";var v=Object.defineProperty,o=(i,r,a,g)=>{for(var l=void 0,n=i.length-1,p;n>=0;n--)(p=i[n])&&(l=p(r,a,l)||l);return l&&v(r,a,l),l};const s=class s extends h.SizedMixin(t.LuzmoElement){constructor(){super(...arguments),this.color="rgb(255, 0, 0)",this.open=!1,this.disabled=!1,this.placement="left-start",this.rounding="full",this.swatches=[],this.noAlphaChannel=!1,this._renderMenu=!1}overlayCloseEvent(){this.open=!1}overlayOpenEvent(){this.open=!0}handleColorChange(){this.color=this.menuElement.color,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}firstUpdated(){this.overlayElement.addEventListener("slottable-request",r=>{this._renderMenu=r.data!==d.removeSlottableRequest})}updated(r){r.has("open")&&this.open===!0&&(this._renderMenu=!0)}renderColorMenu(){return t.x`
|
|
19
|
+
<luzmo-color-menu
|
|
20
|
+
.size=${this.size}
|
|
21
|
+
.color=${this.color}
|
|
22
|
+
.noAlphaChannel=${this.noAlphaChannel}
|
|
23
|
+
.swatches=${this.swatches}
|
|
24
|
+
@change=${this.handleColorChange}
|
|
25
|
+
></luzmo-color-menu>
|
|
26
|
+
`}render(){return t.x`
|
|
27
|
+
<luzmo-swatch
|
|
28
|
+
id="trigger"
|
|
29
|
+
.shape=${this.shape}
|
|
30
|
+
.rounding=${this.rounding}
|
|
31
|
+
.size=${this.size}
|
|
32
|
+
.color=${this.color}
|
|
33
|
+
.selected=${this.open&&!this.disabled}
|
|
34
|
+
?disabled=${this.disabled}
|
|
35
|
+
@luzmo-closed=${this.overlayCloseEvent}
|
|
36
|
+
@luzmo-opened=${this.overlayOpenEvent}
|
|
37
|
+
></luzmo-swatch>
|
|
38
|
+
<luzmo-overlay
|
|
39
|
+
trigger=${this.disabled?"":"trigger@click"}
|
|
40
|
+
type="auto"
|
|
41
|
+
.placement=${this.placement}
|
|
42
|
+
type="page"
|
|
43
|
+
>
|
|
44
|
+
<luzmo-popover style="position:relative">
|
|
45
|
+
${this._renderMenu?this.renderColorMenu():t.x``}
|
|
46
|
+
</luzmo-popover>
|
|
47
|
+
</luzmo-overlay>
|
|
48
|
+
`}};s.styles=t.r(m);let e=s;o([t.n({type:String,reflect:!0})],e.prototype,"color");o([t.n({type:Boolean,reflect:!0})],e.prototype,"open");o([t.n({type:Boolean,reflect:!0})],e.prototype,"disabled");o([t.n({type:String,reflect:!0})],e.prototype,"placement");o([t.n({type:String,reflect:!0})],e.prototype,"rounding");o([t.n({type:String,reflect:!0})],e.prototype,"shape");o([t.n({type:Array,reflect:!0})],e.prototype,"swatches");o([t.n({type:Boolean,reflect:!0,attribute:"no-alpha-channel"})],e.prototype,"noAlphaChannel");o([u.e("luzmo-color-menu")],e.prototype,"menuElement");o([u.e("luzmo-overlay")],e.prototype,"overlayElement");o([c.r()],e.prototype,"_renderMenu");customElements.get("luzmo-color-picker")||customElements.define("luzmo-color-picker",e);exports.LuzmoColorPicker=e;
|