@luzmo/lucero 1.0.1-alpha.20 → 1.0.1-alpha.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.cjs +6 -6
- package/components/accordion/index.js +8 -7
- package/components/action-bar/index.cjs +4 -4
- package/components/action-bar/index.js +10 -8
- package/components/action-button/index.cjs +3 -3
- package/components/action-button/index.js +5 -4
- package/components/action-group/index.cjs +1 -1
- package/components/action-group/index.js +1 -1
- package/components/action-group-D6rV7sfq.cjs +20 -0
- package/components/{action-group-C9dsPJg-.js → action-group-DS7x8jfJ.js} +10 -9
- package/components/action-menu/index.cjs +9 -9
- package/components/action-menu/index.js +9 -9
- package/components/{async-directive-BwIAw5tB.js → async-directive-CDQoI4mS.js} +18 -19
- package/components/async-directive-CddlkYlZ.cjs +22 -0
- package/components/avatar/index.cjs +3 -3
- package/components/avatar/index.js +6 -6
- package/components/base-5nDSSNeT.cjs +18 -0
- package/components/base-CdYjmV_8.js +96 -0
- package/components/button/button-base.d.ts +16 -0
- package/components/button/button.d.ts +37 -1
- package/components/button/index.cjs +2 -2
- package/components/button/index.js +15 -11
- package/components/{button-base-B8bWcklV.js → button-base-BGAqeDTT.js} +21 -6
- package/components/button-base-CShsEDFM.cjs +25 -0
- package/components/button-group/index.cjs +1 -1
- package/components/button-group/index.js +10 -8
- package/components/calendar/index.cjs +96 -1
- package/components/calendar/index.js +538 -6
- package/components/checkbox/index.cjs +4 -4
- package/components/checkbox/index.js +6 -4
- package/components/{checkbox-mixin-BOTvuPEu.js → checkbox-mixin-DUbGDm7f.js} +9 -9
- package/components/{checkbox-mixin-BVPpXtsq.cjs → checkbox-mixin-DhN8CIXY.cjs} +3 -3
- package/components/clear-button-BWJrTbkk.cjs +18 -0
- package/components/{clear-button-DzZ5ulBW.js → clear-button-CMhq1QsA.js} +14 -13
- package/components/{close-button-CuQdsez5.js → close-button-BiJwFZyW.js} +13 -12
- package/components/close-button-DrMdfzPW.cjs +18 -0
- package/components/color-area/index.cjs +5 -5
- package/components/color-area/index.js +10 -9
- package/components/color-controller-7sNUf7SP.js +386 -0
- package/components/color-controller-ChN-A9Ft.cjs +18 -0
- package/components/color-field/index.cjs +2 -2
- package/components/color-field/index.js +4 -3
- package/components/color-handle/index.cjs +2 -2
- package/components/color-handle/index.js +7 -5
- package/components/color-loupe/index.cjs +1 -1
- package/components/color-loupe/index.js +1 -1
- package/components/color-loupe-CIEFp7ln.cjs +56 -0
- package/components/{color-loupe-DmQe3SpP.js → color-loupe-CLPX6xVb.js} +6 -4
- package/components/color-menu/index.cjs +7 -7
- package/components/color-menu/index.js +7 -7
- package/components/color-palette/index.cjs +1 -1
- package/components/color-palette/index.js +4 -3
- package/components/color-palette-group/index.cjs +3 -3
- package/components/color-palette-group/index.js +33 -32
- package/components/color-picker/index.cjs +4 -4
- package/components/color-picker/index.js +11 -11
- package/components/color-slider/index.cjs +40 -1
- package/components/color-slider/index.js +452 -6
- package/components/date-time-picker/index.cjs +16 -16
- package/components/date-time-picker/index.js +103 -104
- package/components/directive-DrvvqO47.cjs +32 -0
- package/components/directive-OK_Jd_xx.js +314 -0
- package/components/divider/index.cjs +1 -1
- package/components/divider/index.js +10 -8
- package/components/field-group/index.cjs +1 -1
- package/components/field-group/index.js +1 -1
- package/components/field-group-BYHNJmv0.cjs +23 -0
- package/components/{field-group-D4B0IOdA.js → field-group-CHmw159R.js} +7 -5
- package/components/field-label/index.cjs +1 -1
- package/components/field-label/index.js +1 -1
- package/components/{field-label-DxmPiC5p.js → field-label-Cy3xMWZ-.js} +9 -8
- package/components/field-label-DZoeqJJX.cjs +25 -0
- package/components/{focusable-C5JjRZmT.js → focusable-BjvsvVam.js} +2 -1
- package/components/focusable-CbVKgGfS.cjs +18 -0
- package/components/icon/index.cjs +1 -1
- package/components/icon/index.js +20 -18
- package/components/index.cjs +1 -1
- package/components/index.js +18 -18
- package/components/infield-button/index.cjs +2 -2
- package/components/infield-button/index.js +4 -3
- package/components/label/index.cjs +1 -1
- package/components/label/index.js +6 -4
- package/components/like-anchor-B2EqJPdw.cjs +32 -0
- package/components/{like-anchor-DCFJN0LV.js → like-anchor-CgqCU210.js} +23 -22
- package/components/{manage-help-text-DNqdEkTA.cjs → manage-help-text-Bat9yGvF.cjs} +3 -3
- package/components/{manage-help-text-CHfMLzSa.js → manage-help-text-C9sCHK3R.js} +8 -8
- package/components/menu/index.cjs +16 -16
- package/components/menu/index.js +15 -16
- package/components/multi-language-field/index.cjs +2 -2
- package/components/multi-language-field/index.js +8 -6
- package/components/number-field/index.cjs +6 -6
- package/components/number-field/index.js +34 -35
- package/components/observe-slot-text-ByPG1Lqw.cjs +18 -0
- package/components/{observe-slot-text-C3moTjwy.js → observe-slot-text-CugmOzNZ.js} +20 -21
- package/components/options/index.cjs +27 -55
- package/components/options/index.js +210 -800
- package/components/overlay/index.cjs +6 -6
- package/components/overlay/index.js +9 -9
- package/components/overlay-DpWon1Rp.js +1736 -0
- package/components/overlay-nUwFClQq.cjs +47 -0
- package/components/{pending-state-bJr-nEJl.cjs → pending-state-DQctFHI8.cjs} +2 -2
- package/components/{pending-state-B2wWssTo.js → pending-state-Dx1u3EXA.js} +2 -2
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +2 -2
- package/components/{picker-BsQJBF9j.js → picker-Cm6_didQ.js} +19 -20
- package/components/picker-DxYgh4LR.cjs +123 -0
- package/components/picker-button/index.cjs +4 -4
- package/components/picker-button/index.js +6 -5
- package/components/{platform-BiXhwqk3.cjs → platform-BJnOJJag.cjs} +1 -1
- package/components/{platform-BM-uMWpX.js → platform-CqwNrovd.js} +12 -12
- package/components/popover/index.cjs +1 -1
- package/components/popover/index.js +1 -1
- package/components/popover-lcZnODPK.cjs +30 -0
- package/components/{popover-iD8f5Jkp.js → popover-ucIgjbQs.js} +8 -7
- package/components/progress-circle/index.cjs +1 -1
- package/components/progress-circle/index.js +1 -1
- package/components/{progress-circle-USIIU1up.js → progress-circle-D5J0ZwY0.js} +8 -7
- package/components/progress-circle-DgMbqrzG.cjs +33 -0
- package/components/radio/index.cjs +2 -2
- package/components/radio/index.js +10 -9
- package/components/search/index.cjs +6 -6
- package/components/search/index.js +5 -5
- package/components/select/index.cjs +43 -43
- package/components/select/index.js +33 -33
- package/components/{directive-C7oCP5Bh.cjs → sized-mixin-DcvJLFeo.cjs} +1 -5
- package/components/{sized-mixin-CJbBHWRQ.js → sized-mixin-cJbo3PKR.js} +5 -5
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +48 -1101
- package/components/{streaming-listener-BQ68fKMa.js → streaming-listener-BgU36S1Z.js} +3 -3
- package/components/streaming-listener-CfUtuELp.cjs +18 -0
- package/components/swatch/index.cjs +5 -5
- package/components/swatch/index.js +11 -10
- package/components/switch/index.cjs +2 -2
- package/components/switch/index.js +5 -4
- package/components/tabs/index.cjs +31 -23
- package/components/tabs/index.js +497 -230
- package/components/tags/index.cjs +4 -4
- package/components/tags/index.js +13 -12
- package/components/text-field/index.cjs +3 -3
- package/components/text-field/index.js +12 -10
- package/components/{text-field-C2n3rzCK.js → text-field-BTEpwGFu.js} +73 -99
- package/components/text-field-JMrsh-zo.cjs +81 -0
- package/components/toast/index.cjs +11 -11
- package/components/toast/index.js +9 -7
- package/components/tooltip/index.cjs +4 -4
- package/components/tooltip/index.js +8 -7
- package/components/unit-input/index.cjs +6 -6
- package/components/unit-input/index.js +27 -26
- package/components/utils.cjs +1 -1
- package/components/utils.js +5 -5
- package/custom-elements.json +1 -1
- package/package.json +62 -1
- package/components/NumberFormatter-DewVDY5w.cjs +0 -18
- package/components/NumberFormatter-DgOUVrge.js +0 -136
- package/components/NumberParser-Dik4a0h-.cjs +0 -18
- package/components/NumberParser-ci9J5EKv.js +0 -173
- package/components/action-group-C54IxNZk.cjs +0 -20
- package/components/async-directive-DLz6JB0v.cjs +0 -22
- package/components/base-BjTwmyRF.cjs +0 -22
- package/components/base-CFWO09N1.js +0 -684
- package/components/base-Cy0MQrPT.cjs +0 -40
- package/components/base-D76d76ww.js +0 -26
- package/components/button-base-tf95Lyl4.cjs +0 -25
- package/components/class-map-CGfNk3Ee.js +0 -51
- package/components/class-map-D-Y-hsN5.cjs +0 -22
- package/components/clear-button-CuPbWwZY.cjs +0 -18
- package/components/close-button-BTo4yrFR.cjs +0 -18
- package/components/color-controller-B0uX6Zso.js +0 -3230
- package/components/color-controller-CoUL5f9K.cjs +0 -18
- package/components/color-loupe-CrM2DVY3.cjs +0 -56
- package/components/directive-helpers-D4KMv2dC.js +0 -62
- package/components/directive-helpers-t-TVum7J.cjs +0 -22
- package/components/directive-oAbCiebi.js +0 -44
- package/components/field-group-5WQMBOk4.cjs +0 -23
- package/components/field-label-Dz9kisdW.cjs +0 -25
- package/components/flow-D-0MTYCm.js +0 -527
- package/components/flow-DM3dNAKs.cjs +0 -30
- package/components/focusable-B_KwfEec.cjs +0 -18
- package/components/if-defined-DULpqYwi.js +0 -27
- package/components/if-defined-DaXWqfzc.cjs +0 -22
- package/components/index-CNK8wHXu.cjs +0 -57
- package/components/index-Cf6G4q52.js +0 -1490
- package/components/index-D3ICqC7S.js +0 -1174
- package/components/index-hqVbNKYy.cjs +0 -113
- package/components/like-anchor-Bu3pXbjT.cjs +0 -32
- package/components/luzmo-icons-CiSek5iM.js +0 -229
- package/components/luzmo-icons-CtA-TJPd.cjs +0 -29
- package/components/observe-slot-text-D2VAEFSd.cjs +0 -18
- package/components/overlay-B3ajDLLq.cjs +0 -47
- package/components/overlay-CUKs69yr.js +0 -2745
- package/components/picker-X96xmLAw.cjs +0 -123
- package/components/popover-fwJeZHMQ.cjs +0 -30
- package/components/progress-circle-DZxaMe8L.cjs +0 -33
- package/components/query-BL-TJj7K.cjs +0 -22
- package/components/query-D_KR_GUc.js +0 -51
- package/components/query-assigned-elements-DjfhL1cl.js +0 -36
- package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
- package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
- package/components/query-assigned-nodes-C76XVPWY.js +0 -36
- package/components/sized-mixin-WPHH0a_D.cjs +0 -18
- package/components/state-DwIwYPvt.js +0 -29
- package/components/state-vf0PJN3_.cjs +0 -22
- package/components/streaming-listener-DeGQYM-9.cjs +0 -18
- package/components/style-map-Bnhf_mVZ.js +0 -53
- package/components/style-map-DuMd5xlY.cjs +0 -22
- package/components/text-field-BkFPYo7S.cjs +0 -85
|
@@ -15,14 +15,14 @@
|
|
|
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 c=require("../luzmo-icons-CtA-TJPd.cjs"),i=require("../base-Cy0MQrPT.cjs"),d=require("../state-vf0PJN3_.cjs"),n=require("../query-BL-TJj7K.cjs"),g=require("../focusable-B_KwfEec.cjs"),f=require("../sized-mixin-WPHH0a_D.cjs");require("../color-area/index.cjs");require("../color-field/index.cjs");require("../color-handle/index.cjs");const a=require("../index-CNK8wHXu.cjs");require("../divider/index.cjs");require("../popover/index.cjs");require("../swatch/index.cjs");const v='@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 z=Object.defineProperty,l=(u,t,o,e)=>{for(var s=void 0,h=u.length-1,p;h>=0;h--)(p=u[h])&&(s=p(t,o,s)||s);return s&&z(t,o,s),s};const m=class m extends f.SizedMixin(g.Focusable){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(t){var e;const o=new a.TinyColor((e=t==null?void 0:t.target)==null?void 0:e.color);this._format=o.format==="name"?"rgb":o.format,this._rgbaColor=o.toRgbString(),this._alpha=this.noAlphaChannel?1:o.getAlpha(),this._rgbColor=o.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(o),this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}handleAreaChange(t){t.stopPropagation(),t.preventDefault(),this._rgbColor=this.areaElement.color;const o=new a.TinyColor(this._rgbColor);this._rgbaColor=o.setAlpha(this._alpha).toRgbString(),this.colorFieldElement.value=this._rgbaColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.colorFieldElement.value=this.formatTextField(o),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}get focusElement(){return this.areaElement||this.colorFieldElement||this}handleHueSliderChange(t){t.stopPropagation(),t.preventDefault();const o=new a.TinyColor(this._rgbColor).toHsl();o.h=this.hueSliderElement.value;const e=new a.TinyColor(o);this._rgbColor=e.toRgbString(),this._rgbaColor=e.setAlpha(this._alpha).toRgbString(),this.areaElement.color=`hsla(${o.h}, ${o.s*100}%, ${o.l*100}%, ${o.a})`,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(t){t.stopPropagation(),t.preventDefault(),this._alpha=this.opacitySliderElement.sliderHandlePosition/100;const o=new a.TinyColor(this._rgbColor).setAlpha(this._alpha);this._rgbaColor=o.toRgbString(),this.colorFieldElement.value=this.formatTextField(o),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}handleFieldChange(t){if(t.stopPropagation(),t.preventDefault(),this.colorFieldElement.checkValidity()){const o=new a.TinyColor(this.colorFieldElement.value);this._format=o.format,this._rgbaColor=o.toRgbString(),this._alpha=o.getAlpha(),this._rgbColor=o.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(t){return this._format==="hsl"?t.toHslString():this._format==="hex"?this.noAlphaChannel?t.toHexString():t.toHex8String():(this._format==="name"&&(this._format="rgb"),t.toRgbString())}cycleFormat(){const t=["rgb","hsl","hex"];this._format=t[(t.indexOf(this._format)+1)%t.length];const o=new a.TinyColor(this.color),e=this.formatTextField(o);this.colorFieldElement.value=e}updated(t){if(t.has("color")&&this.color!==this._previousColor){this._previousColor=this.color;const o=new a.TinyColor(this.color);this._alpha=o.getAlpha(),this._rgbColor=o.setAlpha(1).toRgbString(),this._rgbaColor=o.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"}t.has("noAlphaChannel")&&!this.noAlphaChannel&&(this.opacitySliderElement.color=this._rgbaColor)}renderOpacitySlider(){return i.x`
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@ctrl/tinycolor"),c=require("@luzmo/icons"),n=require("lit"),l=require("lit/decorators.js"),d=require("../focusable-CbVKgGfS.cjs"),g=require("../sized-mixin-DcvJLFeo.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 f='@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,t,o,e)=>{for(var s=void 0,h=u.length-1,p;h>=0;h--)(p=u[h])&&(s=p(t,o,s)||s);return s&&v(t,o,s),s};const m=class m extends g.SizedMixin(d.Focusable){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(t){var e;const o=new i.TinyColor((e=t==null?void 0:t.target)==null?void 0:e.color);this._format=o.format==="name"?"rgb":o.format,this._rgbaColor=o.toRgbString(),this._alpha=this.noAlphaChannel?1:o.getAlpha(),this._rgbColor=o.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(o),this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}handleAreaChange(t){t.stopPropagation(),t.preventDefault(),this._rgbColor=this.areaElement.color;const o=new i.TinyColor(this._rgbColor);this._rgbaColor=o.setAlpha(this._alpha).toRgbString(),this.colorFieldElement.value=this._rgbaColor,this.noAlphaChannel||(this.opacitySliderElement.color=this._rgbaColor),this.colorFieldElement.value=this.formatTextField(o),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}get focusElement(){return this.areaElement||this.colorFieldElement||this}handleHueSliderChange(t){t.stopPropagation(),t.preventDefault();const o=new i.TinyColor(this._rgbColor).toHsl();o.h=this.hueSliderElement.value;const e=new i.TinyColor(o);this._rgbColor=e.toRgbString(),this._rgbaColor=e.setAlpha(this._alpha).toRgbString(),this.areaElement.color=`hsla(${o.h}, ${o.s*100}%, ${o.l*100}%, ${o.a})`,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(t){t.stopPropagation(),t.preventDefault(),this._alpha=this.opacitySliderElement.sliderHandlePosition/100;const o=new i.TinyColor(this._rgbColor).setAlpha(this._alpha);this._rgbaColor=o.toRgbString(),this.colorFieldElement.value=this.formatTextField(o),this.swatchElement.color=this._rgbaColor,this._previousColor=this._rgbaColor,this.color=this._rgbaColor,this.dispatchEvent(new CustomEvent("change",{detail:this.color}))}handleFieldChange(t){if(t.stopPropagation(),t.preventDefault(),this.colorFieldElement.checkValidity()){const o=new i.TinyColor(this.colorFieldElement.value);this._format=o.format,this._rgbaColor=o.toRgbString(),this._alpha=o.getAlpha(),this._rgbColor=o.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(t){return this._format==="hsl"?t.toHslString():this._format==="hex"?this.noAlphaChannel?t.toHexString():t.toHex8String():(this._format==="name"&&(this._format="rgb"),t.toRgbString())}cycleFormat(){const t=["rgb","hsl","hex"];this._format=t[(t.indexOf(this._format)+1)%t.length];const o=new i.TinyColor(this.color),e=this.formatTextField(o);this.colorFieldElement.value=e}updated(t){if(t.has("color")&&this.color!==this._previousColor){this._previousColor=this.color;const o=new i.TinyColor(this.color);this._alpha=o.getAlpha(),this._rgbColor=o.setAlpha(1).toRgbString(),this._rgbaColor=o.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"}t.has("noAlphaChannel")&&!this.noAlphaChannel&&(this.opacitySliderElement.color=this._rgbaColor)}renderOpacitySlider(){return n.html`
|
|
19
19
|
<luzmo-color-slider
|
|
20
20
|
id="luzmo-opacity-slider"
|
|
21
21
|
mode="opacity"
|
|
22
22
|
@input=${this.handleOpacitySliderChange}
|
|
23
23
|
>
|
|
24
24
|
</luzmo-color-slider>
|
|
25
|
-
`}render(){var t;return
|
|
25
|
+
`}render(){var t;return n.html`
|
|
26
26
|
<div id="color-menu" tabindex="0">
|
|
27
27
|
<luzmo-color-area
|
|
28
28
|
.size=${this.size}
|
|
@@ -60,15 +60,15 @@
|
|
|
60
60
|
>
|
|
61
61
|
<div class="format-label">${this._format}</div>
|
|
62
62
|
<div class="change-format-icon">
|
|
63
|
-
<div class="angle-icon">${c.
|
|
64
|
-
<div class="angle-icon">${c.
|
|
63
|
+
<div class="angle-icon">${c.luzmoIcon(c.luzmoAngleUp)}</div>
|
|
64
|
+
<div class="angle-icon">${c.luzmoIcon(c.luzmoAngleDown)}</div>
|
|
65
65
|
</div>
|
|
66
66
|
</button>
|
|
67
67
|
</div>
|
|
68
|
-
${((t=this.swatches)==null?void 0:t.length)>0?
|
|
68
|
+
${((t=this.swatches)==null?void 0:t.length)>0?n.html`
|
|
69
69
|
<luzmo-divider></luzmo-divider>
|
|
70
70
|
<div class="swatches-container">
|
|
71
|
-
${this.swatches.map(o=>
|
|
71
|
+
${this.swatches.map(o=>n.html`
|
|
72
72
|
<div class="swatch-choice">
|
|
73
73
|
<luzmo-swatch
|
|
74
74
|
@click=${this.setColor}
|
|
@@ -83,4 +83,4 @@
|
|
|
83
83
|
`:""}
|
|
84
84
|
</div>
|
|
85
85
|
</div>
|
|
86
|
-
`}};m.styles=
|
|
86
|
+
`}};m.styles=n.unsafeCSS(f);let r=m;a([l.property({type:String,reflect:!0})],r.prototype,"color");a([l.property({type:Boolean,reflect:!0,attribute:"no-alpha-channel"})],r.prototype,"noAlphaChannel");a([l.property({type:Array,reflect:!0})],r.prototype,"swatches");a([l.query("luzmo-color-area")],r.prototype,"areaElement");a([l.query("#luzmo-hue-slider")],r.prototype,"hueSliderElement");a([l.query("#luzmo-opacity-slider")],r.prototype,"opacitySliderElement");a([l.query("luzmo-color-field")],r.prototype,"colorFieldElement");a([l.query("luzmo-swatch")],r.prototype,"swatchElement");a([l.state()],r.prototype,"_format");customElements.get("luzmo-color-menu")||customElements.define("luzmo-color-menu",r);exports.LuzmoColorMenu=r;
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { F as x } from "../focusable-
|
|
23
|
-
import { S as w } from "../sized-mixin-
|
|
18
|
+
import { TinyColor as a } from "@ctrl/tinycolor";
|
|
19
|
+
import { luzmoIcon as p, luzmoAngleUp as z, luzmoAngleDown as f } from "@luzmo/icons";
|
|
20
|
+
import { unsafeCSS as v, html as s } from "lit";
|
|
21
|
+
import { property as h, query as n, state as b } from "lit/decorators.js";
|
|
22
|
+
import { F as x } from "../focusable-BjvsvVam.js";
|
|
23
|
+
import { S as w } from "../sized-mixin-cJbo3PKR.js";
|
|
24
24
|
import "../color-area/index.js";
|
|
25
25
|
import "../color-field/index.js";
|
|
26
26
|
import "../color-handle/index.js";
|
|
27
|
-
import
|
|
27
|
+
import "../color-slider/index.js";
|
|
28
28
|
import "../divider/index.js";
|
|
29
29
|
import "../popover/index.js";
|
|
30
30
|
import "../swatch/index.js";
|
|
@@ -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
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("lit"),e=require("lit/decorators.js"),h=require("../focusable-CbVKgGfS.cjs"),b=require("../sized-mixin-DcvJLFeo.cjs"),n=":host{box-sizing:border-box}:host([focused]),:host(:focus-visible){outline:none}:host([focused]) #palette,:host(:focus-visible) #palette{border:var(--luzmo-color-palette-focus-indicator-width, var(--color-palette-focus-indicator-width)) solid var(--luzmo-color-palette-focus-indicator-color, var(--color-palette-focus-indicator-color))!important}:host([disabled]){pointer-events:none;cursor:not-allowed}:host([disabled]) #palette{opacity:var(--luzmo-color-palette-disabled-opacity, .3);border-color:transparent!important;background-color:var(--luzmo-color-palette-disabled-background-color, var(--color-palette-disabled-background-color))!important}:host([selected]) #palette{border-color:var(--luzmo-color-palette-selected-border-color, var(--color-palette-selected-border-color));background-color:var(--luzmo-color-palette-selected-background-color, var(--color-palette-selected-background-color))}:host:hover #palette{border-color:var(--luzmo-color-palette-hover-border-color, var(--color-palette-hover-border-color))}#palette{box-sizing:border-box;height:100%;width:fit-content;padding:var(--luzmo-color-palette-padding, var(--color-palette-padding));border:var(--luzmo-color-palette-border-width, var(--color-palette-border-width)) solid transparent;cursor:pointer;border-radius:var(--luzmo-color-palette-border-radius, var(--color-palette-border-radius));display:flex}#palette>div{box-sizing:border-box;border:var(--luzmo-color-palette-color-border-width, var(--color-palette-color-border-width)) solid var(--luzmo-color-palette-color-border-color, var(--color-palette-color-border-color));height:var(--luzmo-color-palette-color-height, var(--color-palette-color-height));width:var(--luzmo-color-palette-color-width, var(--color-palette-color-width))}#palette:hover{background-color:var(--luzmo-color-palette-hover-background-color, var(--color-palette-hover-background-color))}#palette:focus-visible{outline:none}:host(:not([reverse]):not([horizontal])) #palette{flex-direction:column}:host(:not([reverse]):not([horizontal])) #palette>div:not(:first-child){border-top:0}:host(:not([reverse]):not([horizontal])) #palette>div:first-child{border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host(:not([reverse]):not([horizontal])) #palette>div:last-child{border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([reverse]:not([horizontal])) #palette{flex-direction:column-reverse}:host([reverse]:not([horizontal])) #palette>div:not(:first-child){border-bottom:0}:host([reverse]:not([horizontal])) #palette>div:first-child{border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([reverse]:not([horizontal])) #palette>div:last-child{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal]:not([reverse])) #palette{flex-direction:row}:host([horizontal]:not([reverse])) #palette>div:not(:first-child){border-left:0}:host([horizontal]:not([reverse])) #palette>div:first-child{border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal]:not([reverse])) #palette>div:last-child{border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal][reverse]) #palette{flex-direction:row-reverse}:host([horizontal][reverse]) #palette>div:not(:first-child){border-right:0}:host([horizontal][reverse]) #palette>div:first-child{border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal][reverse]) #palette>div:last-child{border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host{--color-palette-padding: var(--luzmo-spacing-1);--color-palette-background-color: transparent;--color-palette-hover-background-color: var( --luzmo-background-color-highlight );--color-palette-selected-border-color: var(--luzmo-border-color-down);--color-palette-selected-background-color: var( --luzmo-background-color-highlight-hover );--color-palette-disabled-background-color: transparent;--color-palette-border-width: var(--luzmo-border-width);--color-palette-hover-border-color: var(--luzmo-border-color);--color-palette-focus-indicator-width: var(--luzmo-indicator-width);--color-palette-focus-indicator-color: var(--luzmo-indicator-color);--color-palette-color-width: var(--luzmo-spacing-5);--color-palette-color-height: 1.25rem;--color-palette-color-border-radius: var(--luzmo-border-radius);--color-palette-color-border-width: var(--luzmo-border-width);--color-palette-color-border-color: var(--luzmo-border-color);--color-palette-border-radius: calc( var(--color-palette-color-border-radius) + var(--color-palette-padding) )}:host([horizontal]){--color-palette-color-height: var(--luzmo-spacing-5);--color-palette-color-width: 1.25rem}:host([size=s]){--color-palette-color-width: .75rem;--color-palette-color-height: var(--luzmo-spacing-5);--color-palette-padding: var(--luzmo-spacing-1);--color-palette-color-border-radius: var(--luzmo-border-radius-s)}:host([size=s][horizontal]){--color-palette-color-height: .75rem;--color-palette-color-width: var(--luzmo-spacing-5)}:host([size=l]){--color-palette-color-width: 1.25rem;--color-palette-color-height: 1.5rem;--color-palette-padding: var(--luzmo-spacing-2);--color-palette-color-border-radius: var(--luzmo-border-radius-l)}:host([size=l][horizontal]){--color-palette-color-height: 1.25rem;--color-palette-color-width: 1.5rem}:host([size=xl]){--color-palette-color-width: 1.5rem;--color-palette-color-height: 1.75rem;--color-palette-padding: var(--luzmo-spacing-2);--color-palette-color-border-radius: var(--luzmo-border-radius-xl)}:host([size=xl][horizontal]){--color-palette-color-height: 1.5rem;--color-palette-color-width: 1.75rem}";var v=Object.defineProperty,t=(s,r,a,p)=>{for(var l=void 0,d=s.length-1,u;d>=0;d--)(u=s[d])&&(l=u(r,a,l)||l);return l&&v(r,a,l),l};const i=class i extends b.SizedMixin(h.Focusable,{validSizes:["s","m","l","xl"],noDefaultSize:!0}){constructor(){super(...arguments),this.disabled=!1,this.focused=!1,this.selected=!1,this.active=!1,this.reverse=!1,this.horizontal=!1}get focusElement(){return this}render(){var a;const r=(a=this.colors)==null?void 0:a.map(p=>c.html`<div class="color" style="background-color: ${p}"></div>`);return c.html` <div id="palette">${r}</div> `}firstUpdated(r){super.firstUpdated(r)}updated(r){super.updated(r),r.has("selected")&&this.setAttribute("tabindex",this.selected?"0":"-1"),r.has("disabled")&&(this.disabled?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled"))}};i.styles=c.unsafeCSS(n);let o=i;t([e.property({type:Boolean,reflect:!0})],o.prototype,"disabled");t([e.property({type:Boolean,reflect:!0})],o.prototype,"focused");t([e.property({type:Boolean,reflect:!0})],o.prototype,"selected");t([e.property({type:Boolean,reflect:!0})],o.prototype,"active");t([e.property({type:String,reflect:!0})],o.prototype,"value");t([e.property({type:Array,reflect:!0})],o.prototype,"colors");t([e.property({type:Boolean,reflect:!0})],o.prototype,"reverse");t([e.property({type:Boolean,reflect:!0})],o.prototype,"horizontal");customElements.get("luzmo-color-palette")||customElements.define("luzmo-color-palette",o);exports.LuzmoColorPalette=o;
|
|
@@ -15,9 +15,10 @@
|
|
|
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 {
|
|
18
|
+
import { unsafeCSS as m, html as p } from "lit";
|
|
19
|
+
import { property as e } from "lit/decorators.js";
|
|
20
|
+
import { F as b } from "../focusable-BjvsvVam.js";
|
|
21
|
+
import { S as z } from "../sized-mixin-cJbo3PKR.js";
|
|
21
22
|
const n = () => {
|
|
22
23
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
23
24
|
const t = document.createElement("style");
|
|
@@ -15,14 +15,14 @@
|
|
|
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
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("lit"),d=require("../mutation-controller-DkOMCW-c.cjs"),o=require("lit/decorators.js"),p=require("lit/directives/if-defined.js"),h=require("../base-5nDSSNeT.cjs"),g=require("../roving-tabindex-By_fCy_e.cjs"),m=require("../sized-mixin-DcvJLFeo.cjs"),f=".color-palette-group{column-gap:var(--luzmo-color-palette-group-column-gap, var(--color-palette-group-column-gap));row-gap:var(--luzmo-color-palette-group-row-gap, var(--color-palette-group-row-gap));flex-wrap:wrap;display:flex}::slotted(*){flex-shrink:0}::slotted(:focus-visible){z-index:1}:host{--color-palette-group-column-gap: var(--luzmo-spacing-3);--color-palette-group-row-gap: var(--luzmo-spacing-3)}:host([size=s]){--color-palette-group-column-gap: var(--luzmo-spacing-2);--color-palette-group-row-gap: var(--luzmo-spacing-2)}:host,:host([size=l]),:host([size=xl]){--color-palette-group-column-gap: var(--luzmo-spacing-3);--color-palette-group-row-gap: var(--luzmo-spacing-3)}";var b=Object.defineProperty,v=Object.getOwnPropertyDescriptor,i=(n,e,t,s)=>{for(var r=s>1?void 0:s?v(e,t):e,l=n.length-1,c;l>=0;l--)(c=n[l])&&(r=(s?c(e,t,r):c(r))||r);return s&&r&&b(e,t,r),r};class a extends m.SizedMixin(h.LuzmoElement,{validSizes:["s","m","l","xl"],noDefaultSize:!0}){constructor(){super(),this.disabled=!1,this.horizontal=!1,this._palettes=[],this.rovingTabindexController=new g.RovingTabindexController(this,{focusInIndex:e=>e.findIndex(t=>this.selected?!t.disabled&&t.value===this.selected:!t.disabled),elements:()=>this.palettes,isFocusableElement:e=>!e.disabled}),this.label="",this._onKeyDown=e=>{if(e.code==="Enter"||e.code==="Space"){e.preventDefault();const t=e.target;if(t.value===void 0)return;this.deselectSelectedPalettes(),t.selected=!0,t.tabIndex=0,t.setAttribute("aria-checked","true"),this.setSelected(t.value,!0)}},this.manageColorPalettes=()=>{if(!this.slotElement)return;const t=this.slotElement.assignedElements({flatten:!0}).reduce((s,r)=>{if(r.matches("luzmo-color-palette"))s.push(r);else{const l=[...r.querySelectorAll(":scope > luzmo-color-palette")];s.push(...l)}return s},[]);this.palettes=t,this.manageChildren(),this.manageSelects()},new d.s(this,{config:{childList:!0,subtree:!0},callback:()=>{this.manageColorPalettes()},skipInitial:!0})}static get styles(){return[u.unsafeCSS(f)]}set palettes(e){e!==this.palettes&&(this._palettes=e,this.rovingTabindexController.clearElementCache())}get palettes(){return this._palettes}get selected(){return this._selected}set selected(e){this.requestUpdate("selected",this._selected),this._selected=e,this.updateComplete.then(()=>{this.applySelects(),this.manageChildren()})}dispatchChange(e){this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0,cancelable:!0}))||(this.setSelected(e),this.palettes.map(s=>{s.selected=!!(s.value&&this.selected===s.value)}))}setSelected(e,t){if(e===this.selected)return;const s=this.selected;this.requestUpdate("selected",s),this._selected=e,t&&this.dispatchChange(s)}focus(e){this.rovingTabindexController.focus(e)}deselectSelectedPalettes(){this.palettes.forEach(e=>{e.selected&&(e.selected=!1,e.tabIndex=-1,e.setAttribute("aria-checked","false"))})}_handleClick(e){const t=e.target;t.value!==void 0&&(this.deselectSelectedPalettes(),t.selected=!0,t.tabIndex=0,t.setAttribute("aria-checked","true"),this.setSelected(t.value,!0))}async applySelects(){await this.manageSelects()}async manageSelects(){if(this.palettes.length===0)return;const e=this.palettes;this.setAttribute("role","radiogroup");const t=[],s=e.map(async l=>{await l.updateComplete,l.setAttribute("role","radio"),l.setAttribute("aria-checked",l.selected?"true":"false"),l.selected&&t.push(l)});await Promise.all(s);const r=t.map(l=>l.value).find(Boolean);this.setSelected(r)}render(){return u.html`
|
|
19
19
|
<div
|
|
20
20
|
class="color-palette-group"
|
|
21
|
-
aria-label=${p.
|
|
21
|
+
aria-label=${p.ifDefined(this.label??void 0)}
|
|
22
22
|
role="radiogroup"
|
|
23
23
|
@keydown=${this._onKeyDown}
|
|
24
24
|
@slotchange=${this.manageColorPalettes}
|
|
25
25
|
>
|
|
26
26
|
<slot role="presentation"></slot>
|
|
27
27
|
</div>
|
|
28
|
-
`}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",this._handleClick)}updated(e){super.updated(e),e.has("horizontal")&&this.palettes.forEach(s=>{s.horizontal=this.horizontal}),this.manageSelects(),this.manageChildren(),e.has("size")&&this.manageChildren(e),e.has("label")&&(this.label||e.get("label")!==void 0)&&(this.label.length>0?this.setAttribute("aria-label",this.label):this.removeAttribute("aria-label"))}manageChildren(e){this.palettes.forEach(t=>{t.setAttribute("aria-label",`color palette: ${t.value}`),t.selected=!!(t.value&&this.selected===t.value),this.size&&(this.size!=="m"||(e==null?void 0:e.get("size"))!==void 0)&&(t.size=this.size),this.disabled&&(t.disabled=!0),t.horizontal=this.horizontal})}}
|
|
28
|
+
`}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",this._handleClick)}updated(e){super.updated(e),e.has("horizontal")&&this.palettes.forEach(s=>{s.horizontal=this.horizontal}),this.manageSelects(),this.manageChildren(),e.has("size")&&this.manageChildren(e),e.has("label")&&(this.label||e.get("label")!==void 0)&&(this.label.length>0?this.setAttribute("aria-label",this.label):this.removeAttribute("aria-label"))}manageChildren(e){this.palettes.forEach(t=>{t.setAttribute("aria-label",`color palette: ${t.value}`),t.selected=!!(t.value&&this.selected===t.value),this.size&&(this.size!=="m"||(e==null?void 0:e.get("size"))!==void 0)&&(t.size=this.size),this.disabled&&(t.disabled=!0),t.horizontal=this.horizontal})}}i([o.property({type:Boolean,reflect:!0})],a.prototype,"disabled",2);i([o.property({type:Boolean,reflect:!0})],a.prototype,"horizontal",2);i([o.property({type:String})],a.prototype,"label",2);i([o.property({type:String})],a.prototype,"selected",1);i([o.query("slot")],a.prototype,"slotElement",2);customElements.get("luzmo-color-palette-group")||customElements.define("luzmo-color-palette-group",a);exports.LuzmoColorPaletteGroup=a;
|
|
@@ -15,12 +15,13 @@
|
|
|
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 { s as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
18
|
+
import { unsafeCSS as d, html as m } from "lit";
|
|
19
|
+
import { s as p } from "../mutation-controller-DH7YOCyj.js";
|
|
20
|
+
import { property as u, query as h } from "lit/decorators.js";
|
|
21
|
+
import { ifDefined as z } from "lit/directives/if-defined.js";
|
|
22
|
+
import { a as f } from "../base-CdYjmV_8.js";
|
|
23
|
+
import { R as g } from "../roving-tabindex-DOg4z6ZU.js";
|
|
24
|
+
import { S as b } from "../sized-mixin-cJbo3PKR.js";
|
|
24
25
|
const n = () => {
|
|
25
26
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
26
27
|
const s = document.createElement("style");
|
|
@@ -29,17 +30,17 @@ const n = () => {
|
|
|
29
30
|
};
|
|
30
31
|
n();
|
|
31
32
|
const v = ".color-palette-group{column-gap:var(--luzmo-color-palette-group-column-gap, var(--color-palette-group-column-gap));row-gap:var(--luzmo-color-palette-group-row-gap, var(--color-palette-group-row-gap));flex-wrap:wrap;display:flex}::slotted(*){flex-shrink:0}::slotted(:focus-visible){z-index:1}:host{--color-palette-group-column-gap: var(--luzmo-spacing-3);--color-palette-group-row-gap: var(--luzmo-spacing-3)}:host([size=s]){--color-palette-group-column-gap: var(--luzmo-spacing-2);--color-palette-group-row-gap: var(--luzmo-spacing-2)}:host,:host([size=l]),:host([size=xl]){--color-palette-group-column-gap: var(--luzmo-spacing-3);--color-palette-group-row-gap: var(--luzmo-spacing-3)}";
|
|
32
|
-
var x = Object.defineProperty, y = Object.getOwnPropertyDescriptor, i = (s, e, o,
|
|
33
|
-
for (var r =
|
|
34
|
-
(c = s[
|
|
35
|
-
return
|
|
33
|
+
var x = Object.defineProperty, y = Object.getOwnPropertyDescriptor, i = (s, e, o, t) => {
|
|
34
|
+
for (var r = t > 1 ? void 0 : t ? y(e, o) : e, l = s.length - 1, c; l >= 0; l--)
|
|
35
|
+
(c = s[l]) && (r = (t ? c(e, o, r) : c(r)) || r);
|
|
36
|
+
return t && r && x(e, o, r), r;
|
|
36
37
|
};
|
|
37
|
-
class a extends b(
|
|
38
|
+
class a extends b(f, {
|
|
38
39
|
validSizes: ["s", "m", "l", "xl"],
|
|
39
40
|
noDefaultSize: !0
|
|
40
41
|
}) {
|
|
41
42
|
constructor() {
|
|
42
|
-
super(), this.disabled = !1, this.horizontal = !1, this._palettes = [], this.rovingTabindexController = new
|
|
43
|
+
super(), this.disabled = !1, this.horizontal = !1, this._palettes = [], this.rovingTabindexController = new g(
|
|
43
44
|
this,
|
|
44
45
|
{
|
|
45
46
|
focusInIndex: (e) => e.findIndex(
|
|
@@ -61,19 +62,19 @@ class a extends b(d, {
|
|
|
61
62
|
return;
|
|
62
63
|
const o = this.slotElement.assignedElements({
|
|
63
64
|
flatten: !0
|
|
64
|
-
}).reduce((
|
|
65
|
+
}).reduce((t, r) => {
|
|
65
66
|
if (r.matches("luzmo-color-palette"))
|
|
66
|
-
|
|
67
|
+
t.push(r);
|
|
67
68
|
else {
|
|
68
|
-
const
|
|
69
|
+
const l = [
|
|
69
70
|
...r.querySelectorAll(":scope > luzmo-color-palette")
|
|
70
71
|
];
|
|
71
|
-
|
|
72
|
+
t.push(...l);
|
|
72
73
|
}
|
|
73
|
-
return
|
|
74
|
+
return t;
|
|
74
75
|
}, []);
|
|
75
76
|
this.palettes = o, this.manageChildren(), this.manageSelects();
|
|
76
|
-
}, new
|
|
77
|
+
}, new p(this, {
|
|
77
78
|
config: {
|
|
78
79
|
childList: !0,
|
|
79
80
|
subtree: !0
|
|
@@ -89,7 +90,7 @@ class a extends b(d, {
|
|
|
89
90
|
* @internal
|
|
90
91
|
*/
|
|
91
92
|
static get styles() {
|
|
92
|
-
return [
|
|
93
|
+
return [d(v)];
|
|
93
94
|
}
|
|
94
95
|
/**
|
|
95
96
|
* The color palette elements in the group
|
|
@@ -120,15 +121,15 @@ class a extends b(d, {
|
|
|
120
121
|
composed: !0,
|
|
121
122
|
cancelable: !0
|
|
122
123
|
})
|
|
123
|
-
) || (this.setSelected(e), this.palettes.map((
|
|
124
|
-
|
|
124
|
+
) || (this.setSelected(e), this.palettes.map((t) => {
|
|
125
|
+
t.selected = !!(t.value && this.selected === t.value);
|
|
125
126
|
}));
|
|
126
127
|
}
|
|
127
128
|
setSelected(e, o) {
|
|
128
129
|
if (e === this.selected)
|
|
129
130
|
return;
|
|
130
|
-
const
|
|
131
|
-
this.requestUpdate("selected",
|
|
131
|
+
const t = this.selected;
|
|
132
|
+
this.requestUpdate("selected", t), this._selected = e, o && this.dispatchChange(t);
|
|
132
133
|
}
|
|
133
134
|
focus(e) {
|
|
134
135
|
this.rovingTabindexController.focus(e);
|
|
@@ -150,18 +151,18 @@ class a extends b(d, {
|
|
|
150
151
|
return;
|
|
151
152
|
const e = this.palettes;
|
|
152
153
|
this.setAttribute("role", "radiogroup");
|
|
153
|
-
const o = [],
|
|
154
|
-
await
|
|
154
|
+
const o = [], t = e.map(async (l) => {
|
|
155
|
+
await l.updateComplete, l.setAttribute("role", "radio"), l.setAttribute("aria-checked", l.selected ? "true" : "false"), l.selected && o.push(l);
|
|
155
156
|
});
|
|
156
|
-
await Promise.all(
|
|
157
|
-
const r = o.map((
|
|
157
|
+
await Promise.all(t);
|
|
158
|
+
const r = o.map((l) => l.value).find(Boolean);
|
|
158
159
|
this.setSelected(r);
|
|
159
160
|
}
|
|
160
161
|
render() {
|
|
161
|
-
return
|
|
162
|
+
return m`
|
|
162
163
|
<div
|
|
163
164
|
class="color-palette-group"
|
|
164
|
-
aria-label=${
|
|
165
|
+
aria-label=${z(this.label ?? void 0)}
|
|
165
166
|
role="radiogroup"
|
|
166
167
|
@keydown=${this._onKeyDown}
|
|
167
168
|
@slotchange=${this.manageColorPalettes}
|
|
@@ -174,8 +175,8 @@ class a extends b(d, {
|
|
|
174
175
|
super.firstUpdated(e), this.addEventListener("click", this._handleClick);
|
|
175
176
|
}
|
|
176
177
|
updated(e) {
|
|
177
|
-
super.updated(e), e.has("horizontal") && this.palettes.forEach((
|
|
178
|
-
|
|
178
|
+
super.updated(e), e.has("horizontal") && this.palettes.forEach((t) => {
|
|
179
|
+
t.horizontal = this.horizontal;
|
|
179
180
|
}), this.manageSelects(), this.manageChildren(), e.has("size") && this.manageChildren(e), e.has("label") && (this.label || e.get("label") !== void 0) && (this.label.length > 0 ? this.setAttribute("aria-label", this.label) : this.removeAttribute("aria-label"));
|
|
180
181
|
}
|
|
181
182
|
manageChildren(e) {
|
|
@@ -197,7 +198,7 @@ i([
|
|
|
197
198
|
u({ type: String })
|
|
198
199
|
], a.prototype, "selected", 1);
|
|
199
200
|
i([
|
|
200
|
-
|
|
201
|
+
h("slot")
|
|
201
202
|
], a.prototype, "slotElement", 2);
|
|
202
203
|
customElements.get("luzmo-color-palette-group") || customElements.define("luzmo-color-palette-group", a);
|
|
203
204
|
export {
|
|
@@ -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
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("lit"),t=require("lit/decorators.js"),h=require("../base-5nDSSNeT.cjs"),c=require("../sized-mixin-DcvJLFeo.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 y="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([read-only]) luzmo-swatch{cursor:default;pointer-events:none}: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 m=Object.defineProperty,r=(i,o,a,v)=>{for(var l=void 0,s=i.length-1,u;s>=0;s--)(u=i[s])&&(l=u(o,a,l)||l);return l&&m(o,a,l),l};const p=class p extends c.SizedMixin(h.LuzmoElement){constructor(){super(...arguments),this.color="rgb(255, 0, 0)",this.open=!1,this.disabled=!1,this.readOnly=!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(){const o=this.menuElement.color;this.color=typeof o=="string"?o:String(o),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}firstUpdated(){this.overlayElement.addEventListener("slottable-request",o=>{this._renderMenu=o.data!==d.removeSlottableRequest})}updated(o){o.has("open")&&this.open===!0&&(this._renderMenu=!0)}renderColorMenu(){return n.html`
|
|
19
19
|
<luzmo-color-menu
|
|
20
20
|
.size=${this.size}
|
|
21
21
|
.color=${this.color}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
.swatches=${this.swatches}
|
|
24
24
|
@change=${this.handleColorChange}
|
|
25
25
|
></luzmo-color-menu>
|
|
26
|
-
`}render(){return
|
|
26
|
+
`}render(){return n.html`
|
|
27
27
|
<luzmo-swatch
|
|
28
28
|
id="trigger"
|
|
29
29
|
.shape=${this.shape}
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
type="auto"
|
|
43
43
|
>
|
|
44
44
|
<luzmo-popover style="position:relative">
|
|
45
|
-
${this._renderMenu?this.renderColorMenu():
|
|
45
|
+
${this._renderMenu?this.renderColorMenu():n.html``}
|
|
46
46
|
</luzmo-popover>
|
|
47
47
|
</luzmo-overlay>
|
|
48
|
-
`}};
|
|
48
|
+
`}};p.styles=n.unsafeCSS(y);let e=p;r([t.property({type:String,reflect:!0})],e.prototype,"color");r([t.property({type:Boolean,reflect:!0})],e.prototype,"open");r([t.property({type:Boolean,reflect:!0})],e.prototype,"disabled");r([t.property({type:Boolean,reflect:!0,attribute:"read-only"})],e.prototype,"readOnly");r([t.property({type:String,reflect:!0})],e.prototype,"placement");r([t.property({type:String,reflect:!0})],e.prototype,"rounding");r([t.property({type:String,reflect:!0})],e.prototype,"shape");r([t.property({type:Array,reflect:!0})],e.prototype,"swatches");r([t.property({type:Boolean,reflect:!0,attribute:"no-alpha-channel"})],e.prototype,"noAlphaChannel");r([t.query("luzmo-color-menu")],e.prototype,"menuElement");r([t.query("luzmo-overlay")],e.prototype,"overlayElement");r([t.state()],e.prototype,"_renderMenu");customElements.get("luzmo-color-picker")||customElements.define("luzmo-color-picker",e);exports.LuzmoColorPicker=e;
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { S as g } from "../sized-mixin-
|
|
18
|
+
import { unsafeCSS as z, html as u } from "lit";
|
|
19
|
+
import { property as l, query as c, state as d } from "lit/decorators.js";
|
|
20
|
+
import { a as h } from "../base-CdYjmV_8.js";
|
|
21
|
+
import { S as g } from "../sized-mixin-cJbo3PKR.js";
|
|
22
22
|
import "../color-menu/index.js";
|
|
23
23
|
import "../overlay/index.js";
|
|
24
24
|
import { r as f } from "../slottable-request-event-DggLA4Rx.js";
|
|
@@ -33,11 +33,11 @@ const p = () => {
|
|
|
33
33
|
p();
|
|
34
34
|
const b = "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([read-only]) luzmo-swatch{cursor:default;pointer-events:none}: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)}";
|
|
35
35
|
var v = Object.defineProperty, e = (t, r, s, y) => {
|
|
36
|
-
for (var n = void 0, i = t.length - 1,
|
|
37
|
-
(
|
|
36
|
+
for (var n = void 0, i = t.length - 1, m; i >= 0; i--)
|
|
37
|
+
(m = t[i]) && (n = m(r, s, n) || n);
|
|
38
38
|
return n && v(r, s, n), n;
|
|
39
39
|
};
|
|
40
|
-
const a = class a extends g(
|
|
40
|
+
const a = class a extends g(h) {
|
|
41
41
|
constructor() {
|
|
42
42
|
super(...arguments), this.color = "rgb(255, 0, 0)", this.open = !1, this.disabled = !1, this.readOnly = !1, this.placement = "left-start", this.rounding = "full", this.swatches = [], this.noAlphaChannel = !1, this._renderMenu = !1;
|
|
43
43
|
}
|
|
@@ -101,7 +101,7 @@ const a = class a extends g(z) {
|
|
|
101
101
|
`;
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
|
-
a.styles =
|
|
104
|
+
a.styles = z(b);
|
|
105
105
|
let o = a;
|
|
106
106
|
e([
|
|
107
107
|
l({ type: String, reflect: !0 })
|
|
@@ -131,13 +131,13 @@ e([
|
|
|
131
131
|
l({ type: Boolean, reflect: !0, attribute: "no-alpha-channel" })
|
|
132
132
|
], o.prototype, "noAlphaChannel");
|
|
133
133
|
e([
|
|
134
|
-
|
|
134
|
+
c("luzmo-color-menu")
|
|
135
135
|
], o.prototype, "menuElement");
|
|
136
136
|
e([
|
|
137
|
-
|
|
137
|
+
c("luzmo-overlay")
|
|
138
138
|
], o.prototype, "overlayElement");
|
|
139
139
|
e([
|
|
140
|
-
|
|
140
|
+
d()
|
|
141
141
|
], o.prototype, "_renderMenu");
|
|
142
142
|
customElements.get("luzmo-color-picker") || customElements.define("luzmo-color-picker", o);
|
|
143
143
|
export {
|
|
@@ -15,4 +15,43 @@
|
|
|
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 e=require("../index-CNK8wHXu.cjs");exports.LuzmoColorSlider=e.LuzmoColorSlider;
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@ctrl/tinycolor"),y=require("lit"),n=require("lit/decorators.js"),f=require("lit/directives/if-defined.js"),_=require("lit/directives/style-map.js");require("../color-handle/index.cjs");const x=require("../focusable-CbVKgGfS.cjs"),P=require("../language-resolution-EUER43cg.cjs"),H=require("../streaming-listener-CfUtuELp.cjs"),C=/^hs[v|l]a?\s?\((\d{1,3}\.?\d*?),?\s?(\d{1,3})/,z=/(^hs[v|l]a?\s?\()\d{1,3}\.?\d*?(,?\s?)\d{1,3}/,S=/(^hs[v|l]a?\()\d{1,3}/,v=(p,t)=>t?p.toHexString():p.toHex();class k{constructor(t,{applyColorToState:e,extractColorFromState:r,maintains:s}){this.maintains="hue",this._hue=0,this._opacity=1,this.getColorProcesses={rgb:(o,i)=>i?o.toRgbString():o.toRgb(),prgb:(o,i)=>i?o.toPercentageRgbString():o.toPercentageRgb(),hex8:(o,i)=>i?o.toHex8String():o.toHex8(),name:o=>o.toName()||o.toRgbString(),hsl:(o,i)=>{if(this.maintains==="hue"){if(i)return o.toHslString().replace(S,`$1${this.hue}`);const{s:c,l:m,a:b}=o.toHsl();return{h:this.hue,s:c,l:m,a:b}}if(i)return o.toHslString().replace(z,`$1${this.hue}$2${this.saturation}`);const{s:h,l:d,a:g}=o.toHsl();return{h:this.hue,s:h,l:d,a:g}},hsv:(o,i)=>{if(this.maintains==="hue"){if(i)return o.toHsvString().replace(S,`$1${this.hue}`);const{s:c,v:m,a:b}=o.toHsv();return{h:this.hue,s:c,v:m,a:b}}if(i)return o.toHsvString().replace(z,`$1${this.hue}$2${this.saturation}`);const{s:h,v:d,a:g}=o.toHsv();return{h:this.hue,s:h,v:d,a:g}},hex:v,hex3:v,hex4:v,hex6:v},this._color=new u.TinyColor({h:0,s:1,v:1}),this._previousColor=new u.TinyColor({h:0,s:1,v:1}),this._format={format:"",isString:!1},this.host=t,this.applyColorToState=e,this.extractColorFromState=r,this.maintains=s||this.maintains}setColorProcess(t,e,r,s){this.maintains==="hue"?this.setColorMaintainHue(t,e,r,s):this.maintains==="saturation"&&this.setColorMaintainSaturation(t,e,r,s)}setColorMaintainHue(t,e,r,s){const{h:o,s:i,v:h,a:d}=this._color.toHsv();let g;if(s&&r.startsWith("hs")){const c=C.exec(e);if(c!==null){const[,m]=c;g=Number(m)}}else if(!s&&r.startsWith("hs")){const c=t.originalInput;g=Object.values(c)[0]}this.hue=g||o,this.opacity=d??1,this.applyColorToState({h:o,s:i,v:h,a:d})}setColorMaintainSaturation(t,e,r,s){const{a:o}=this._color.toHsv();if(s&&r.startsWith("hs")){const i=C.exec(e);if(i!==null){const[,h,d]=i;this.hue=Number(h),this.saturation=Number(d)}}else if(!s&&r.startsWith("hs")){const i=t.originalInput,h=Object.values(i);this.hue=h[0],this.saturation=h[1]}else{const{h:i}=t.toHsv();this.hue=i}this.opacity=o??1,this.applyColorToState(t.toHsv())}applyColorFromState(){this._color=new u.TinyColor(this.extractColorFromState(this))}get hue(){return this._hue}set hue(t){const e=Math.min(360,Math.max(0,t));if(e===this.hue)return;const r=this.hue,{s,v:o,a:i}=this._color.toHsv();this._color=new u.TinyColor({h:e,s,v:o,a:i}),this._hue=e,this.host.requestUpdate("hue",r)}get opacity(){return this._opacity}set opacity(t){const e=Math.min(1,Math.max(0,t));if(e===this.opacity)return;const r=this.opacity,{h:s,s:o,v:i}=this._color.toHsv();this._color=new u.TinyColor({h:s,s:o,v:i,a:e}),this._opacity=e,this.host.requestUpdate("opacity",r)}get value(){return this.color}get color(){return this.getColorProcesses[this._format.format||"hex"](this._color,this._format.isString)}set color(t){if(t===this.color)return;const e=this._color;this._color=new u.TinyColor(t);const r=this._color.format;let s=typeof t=="string"||t instanceof String;r.startsWith("hex")&&(s=t.startsWith("#")),this._format={format:r,isString:s},this.setColorProcess(this._color,t,r,s),this.host.requestUpdate("color",e)}getColor(t){const e={hsl:"toHsl"};return this._color[e[t]]()}setColor(t){this._color=t;const e=typeof this._color.originalInput=="string"||this._color.originalInput instanceof String;this.setColorProcess(this._color,t,this._color.format,e)}getHslString(){return this._color.toHslString()}savePreviousColor(){this._previousColor=this._color.clone()}restorePreviousColor(){this.setColor(this._previousColor)}}const $='.opacity-checkerboard{position:absolute;block-size:100%;inline-size:100%;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)}:host{--luzmo-color-slider-gradient-fallback: rgb(255 0 0) 0%, rgb(255 255 0) 17%, rgb(0 255 0) 33%, rgb(0 255 255) 50%, rgb(0 0 255) 67%, rgb(255 0 255) 83%, rgb(255 0 0) 100%;touch-action:none}:host([vertical]) .handle{inset-block-start:unset;inset-block-end:0}:host([vertical]) .slider{-webkit-appearance:slider-vertical;-moz-appearance:slider-vertical;appearance:slider-vertical}:host(:focus){outline:none}.gradient{overflow:hidden}::slotted(*){width:100%;height:100%}@media (forced-colors: active){:host{--highcontrast-color-slider-border-color: CanvasText;--highcontrast-color-slider-border-color-disabled: GrayText;--highcontrast-color-slider-background-color-disabled: Canvas;forced-color-adjust:none}}:host{--luzmo-color-handle-hitarea-border-radius: var( --luzmo-color-slider-handle-hitarea-border-radius, 0px );min-inline-size:var(--luzmo-color-slider-minimum-length, 80px);inline-size:var(--luzmo-color-slider-length, 192px);block-size:var(--luzmo-color-slider-control-track-width, 24px);-webkit-user-select:none;user-select:none;cursor:default;display:block;position:relative}:host([focused]){z-index:2}:host([disabled]){pointer-events:none}:host([disabled]) .gradient{display:none}:host([vertical]){min-block-size:var(--luzmo-color-slider-vertical-minimum-height, var(--luzmo-color-slider-minimum-length, 80px));block-size:var(--luzmo-color-slider-vertical-height, var(--luzmo-color-slider-length, 192px));min-inline-size:0;inline-size:var(--luzmo-color-slider-vertical-control-track-width, var(--luzmo-color-slider-control-track-height, 24px));display:inline-block}:host([vertical]) .handle{inset-inline-start:50%}.handle{inset-block-start:50%;inset-inline-start:0}.checkerboard{--luzmo-color-slider-border-color-local: var( --highcontrast-color-slider-border-color, var(--luzmo-color-slider-border-color, var(--luzmo-border-color)) )}.checkerboard:before{content:"";z-index:1;box-shadow:inset 0 0 0 var(--luzmo-color-slider-border-width, var(--luzmo-border-width)) var(--luzmo-color-slider-border-color-local);border-radius:var(--luzmo-color-slider-border-rounding, var(--luzmo-border-radius-s));position:absolute;top:0;right:0;bottom:0;left:0}:host([disabled]) .checkerboard{--luzmo-color-slider-border-color-local: var( --highcontrast-color-slider-border-color-disabled, var(--luzmo-color-slider-border-color-disabled, var(--luzmo-dimmed-color)) );background:var(--highcontrast-color-slider-background-color-disabled, var(--luzmo-color-slider-background-color-disabled, var(--luzmo-dimmed-color)))}.checkerboard,.gradient{inline-size:100%;block-size:100%;border-radius:var(--luzmo-color-slider-border-rounding, var(--luzmo-border-radius-s))}.gradient:dir(rtl),:host([dir=rtl]) .gradient{transform:scaleX(-1)}.slider{opacity:0;inline-size:100%;block-size:100%;z-index:0;pointer-events:none;margin:0;position:absolute;inset-block-start:0;inset-inline-start:0}';var R=Object.defineProperty,T=Object.getOwnPropertyDescriptor,a=(p,t,e,r)=>{for(var s=r>1?void 0:r?T(t,e):t,o=p.length-1,i;o>=0;o--)(i=p[o])&&(s=(r?i(t,e,s):i(s))||s);return r&&s&&R(t,e,s),s};class l extends x.Focusable{constructor(){super(...arguments),this.disabled=!1,this.focused=!1,this.label="hue",this.vertical=!1,this.languageResolver=new P.LanguageResolutionController(this),this.colorController=new k(this,{applyColorToState:()=>{if(this.mode==="opacity"){const t=new u.TinyColor(this.colorController.color);this.sliderHandlePosition=100*t.getAlpha()}else this.sliderHandlePosition=100*(this.colorController.hue/360)},extractColorFromState:t=>this.mode==="opacity"?{...t.getColor("hsl"),a:this.value}:{...t.getColor("hsl"),h:this.value},maintains:"saturation"}),this.sliderHandlePosition=0,this.step=1,this.isLTR=!0,this._altered=0,this._pointerDown=!1}static get styles(){return[y.unsafeCSS($)]}get value(){return this.mode==="opacity"?this.colorController.opacity:this.colorController.hue}set value(t){this.mode==="opacity"?this.colorController.opacity=t:this.colorController.hue=t}get color(){return this.colorController.color}set color(t){this.colorController.color=t}get altered(){return this._altered}set altered(t){this._altered=t,this.step=Math.max(1,this.altered*10)}get focusElement(){return this.input}handleKeydown(t){const{key:e}=t;this.focused=!0,this.altered=[t.shiftKey,t.ctrlKey,t.altKey].filter(i=>!!i).length;let r=0;switch(e){case"ArrowUp":{r=this.step;break}case"ArrowDown":{r=-this.step;break}case"ArrowLeft":{r=this.step*(this.isLTR?-1:1);break}case"ArrowRight":{r=this.step*(this.isLTR?1:-1);break}default:return}t.preventDefault();const o=100/(this.mode==="opacity"?100:360);this.sliderHandlePosition=Math.min(100,Math.max(0,this.sliderHandlePosition+r*o)),this.value=this.mode==="opacity"?Math.min(1,Math.max(0,this.value+r/100)):Math.min(360,Math.max(0,this.value+r)),this.colorController.applyColorFromState(),r!==0&&(this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}handleInput(t){const{valueAsNumber:e}=t.target;this.value=e,this.sliderHandlePosition=100*(this.mode==="opacity"?this.value:this.value/360),this.colorController.applyColorFromState()}handleChange(t){this.handleInput(t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}focus(t={}){super.focus(t),this.forwardFocus()}forwardFocus(){this.input.focus()}handleFocus(){this.focused=!0}handleBlur(){this._pointerDown||(this.altered=0,this.focused=!1)}handlePointerdown(t){if(t.button!==0){t.preventDefault();return}this._pointerDown=!0,this.colorController.savePreviousColor(),this.boundingClientRect=this.getBoundingClientRect(),t.target.setPointerCapture(t.pointerId),t.pointerType==="mouse"&&(this.focused=!0)}handlePointermove(t){this.sliderHandlePosition=this.calculateHandlePosition(t),this.value=(this.mode==="opacity"?1:360)*(this.sliderHandlePosition/100),this.colorController.applyColorFromState(),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0,cancelable:!0}))}handlePointerup(t){this._pointerDown=!1,t.target.releasePointerCapture(t.pointerId),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0,cancelable:!0}))||this.colorController.restorePreviousColor(),this.focus(),t.pointerType==="mouse"&&(this.focused=!1)}calculateHandlePosition(t){if(!this.boundingClientRect)return this.sliderHandlePosition;const e=this.boundingClientRect,r=this.vertical?e.top:e.left,s=this.vertical?t.clientY:t.clientX,o=this.vertical?e.height:e.width,i=Math.max(0,Math.min(1,(s-r)/o));return this.vertical||!this.isLTR?100-100*i:100*i}handleGradientPointerdown(t){t.button===0&&(t.stopPropagation(),t.preventDefault(),this.handle.dispatchEvent(new PointerEvent("pointerdown",t)),this.handlePointermove(t))}get handlePositionStyles(){return`${this.vertical?"inset-block-end":"inset-inline-start"}: ${this.sliderHandlePosition}%`}get getColorSliderStyle(){const t=this.vertical?"top":"right";if(this.mode==="opacity"){const e=new u.TinyColor(this.colorController.color).setAlpha(1).toRgbString();return{background:`linear-gradient(to ${t}, transparent, ${e})`}}return{background:`linear-gradient(to ${t}, var(--luzmo-color-slider-gradient, var(--luzmo-color-slider-gradient-fallback)))`}}render(){return y.html`
|
|
19
|
+
<div
|
|
20
|
+
class="opacity-checkerboard checkerboard"
|
|
21
|
+
role="presentation"
|
|
22
|
+
@pointerdown=${this.handleGradientPointerdown}
|
|
23
|
+
>
|
|
24
|
+
<div
|
|
25
|
+
class="gradient"
|
|
26
|
+
role="presentation"
|
|
27
|
+
style=${_.styleMap(this.getColorSliderStyle)}
|
|
28
|
+
>
|
|
29
|
+
<slot name="gradient"></slot>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<luzmo-color-handle
|
|
33
|
+
tabindex=${f.ifDefined(this.focused?void 0:"0")}
|
|
34
|
+
@focus=${this.forwardFocus}
|
|
35
|
+
?focused=${this.focused}
|
|
36
|
+
class="handle"
|
|
37
|
+
color=${this.mode==="opacity"?this.color:"hsl("+this.value+", 100%, 50%)"}
|
|
38
|
+
?disabled=${this.disabled}
|
|
39
|
+
style=${this.handlePositionStyles}
|
|
40
|
+
${H.streamingListener({start:["pointerdown",this.handlePointerdown],streamInside:["pointermove",this.handlePointermove],end:[["pointerup","pointercancel","pointerleave"],this.handlePointerup]})}
|
|
41
|
+
></luzmo-color-handle>
|
|
42
|
+
<input
|
|
43
|
+
type="range"
|
|
44
|
+
class="slider"
|
|
45
|
+
min="0"
|
|
46
|
+
max=${this.mode==="opacity"?"100":"360"}
|
|
47
|
+
aria-orientation=${f.ifDefined(this.vertical?"vertical":void 0)}
|
|
48
|
+
orient=${f.ifDefined(this.vertical?"vertical":void 0)}
|
|
49
|
+
step=${this.step}
|
|
50
|
+
aria-label=${this.label}
|
|
51
|
+
.value=${String(this.mode==="opacity"?this.value*100:this.value)}
|
|
52
|
+
aria-valuetext=${`${new Intl.NumberFormat(this.languageResolver.language,{maximumFractionDigits:0,minimumIntegerDigits:1,style:"unit",unit:this.mode==="opacity"?"percent":"degree",unitDisplay:"narrow"}).format(this.mode==="opacity"?this.value*100:this.value)}`}
|
|
53
|
+
@input=${this.handleInput}
|
|
54
|
+
@change=${this.handleChange}
|
|
55
|
+
@keydown=${this.handleKeydown}
|
|
56
|
+
/>
|
|
57
|
+
`}firstUpdated(t){super.firstUpdated(t),this.boundingClientRect=this.getBoundingClientRect(),this.addEventListener("focus",this.handleFocus),this.addEventListener("blur",this.handleBlur)}updated(t){t.has("mode")&&(this.handle.style.insetInlineStart="",this.handle.style.insetBlockEnd="",this.mode==="opacity"&&(this.colorController.color=new u.TinyColor(this.colorController.color).toRgbString(),this.handle.style.insetInlineStart=100*this.colorController.opacity+"%"))}}a([n.property({type:String,reflect:!0})],l.prototype,"dir",2);a([n.property({type:String,reflect:!0})],l.prototype,"mode",2);a([n.property({type:Boolean,reflect:!0})],l.prototype,"disabled",2);a([n.property({type:Boolean,reflect:!0})],l.prototype,"focused",2);a([n.query(".handle")],l.prototype,"handle",2);a([n.property({type:String})],l.prototype,"label",2);a([n.property({type:Boolean,reflect:!0})],l.prototype,"vertical",2);a([n.property({type:Number})],l.prototype,"value",1);a([n.property({type:Number,reflect:!0})],l.prototype,"sliderHandlePosition",2);a([n.property({type:String})],l.prototype,"color",1);a([n.property({type:Number})],l.prototype,"step",2);a([n.property({type:Boolean,attribute:"is-ltr"})],l.prototype,"isLTR",2);a([n.query("input")],l.prototype,"input",2);customElements.get("luzmo-color-slider")||customElements.define("luzmo-color-slider",l);exports.LuzmoColorSlider=l;
|