@luzmo/lucero 1.0.1-alpha.18 → 1.0.1-alpha.19
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/NumberFormatter-DewVDY5w.cjs +18 -0
- package/components/NumberFormatter-DgOUVrge.js +136 -0
- package/components/NumberParser-Dik4a0h-.cjs +18 -0
- package/components/NumberParser-ci9J5EKv.js +173 -0
- package/components/accordion/index.cjs +6 -183
- package/components/accordion/index.js +88 -136
- package/components/action-bar/index.cjs +4 -85
- package/components/action-bar/index.js +50 -72
- package/components/action-button/index.cjs +3 -205
- package/components/action-button/index.js +93 -167
- package/components/action-group/index.cjs +1 -7
- package/components/action-group/index.js +8 -12
- package/components/action-group-C54IxNZk.cjs +20 -0
- package/components/action-group-C9dsPJg-.js +258 -0
- package/components/action-menu/index.cjs +11 -91
- package/components/action-menu/index.js +47 -66
- package/components/async-directive-BwIAw5tB.js +82 -0
- package/components/async-directive-DLz6JB0v.cjs +22 -0
- package/components/avatar/index.cjs +3 -63
- package/components/avatar/index.js +42 -54
- package/components/{focusable-selectors-D0t_5P7C.cjs → base-BjTwmyRF.cjs} +5 -16
- package/components/base-CFWO09N1.js +684 -0
- package/components/base-Cy0MQrPT.cjs +40 -0
- package/components/base-D76d76ww.js +26 -0
- package/components/button/index.cjs +2 -134
- package/components/button/index.js +72 -106
- package/components/button-base-B8bWcklV.js +144 -0
- package/components/button-base-tf95Lyl4.cjs +25 -0
- package/components/button-group/index.cjs +1 -45
- package/components/button-group/index.js +25 -37
- package/components/calendar/index.cjs +1 -632
- package/components/calendar/index.js +7 -637
- package/components/checkbox/index.cjs +4 -111
- package/components/checkbox/index.js +53 -98
- package/components/checkbox-mixin-BOTvuPEu.js +70 -0
- package/components/checkbox-mixin-BVPpXtsq.cjs +27 -0
- package/components/class-map-CGfNk3Ee.js +51 -0
- package/components/class-map-D-Y-hsN5.cjs +22 -0
- package/components/clear-button-CuPbWwZY.cjs +18 -0
- package/components/clear-button-DzZ5ulBW.js +53 -0
- package/components/close-button-BTo4yrFR.cjs +18 -0
- package/components/close-button-CuQdsez5.js +51 -0
- package/components/color-area/index.cjs +13 -440
- package/components/color-area/index.js +187 -322
- package/components/color-controller-B0uX6Zso.js +3230 -0
- package/components/color-controller-CoUL5f9K.cjs +18 -0
- package/components/color-field/index.cjs +2 -95
- package/components/color-field/index.js +41 -77
- package/components/color-handle/index.cjs +3 -64
- package/components/color-handle/index.js +37 -58
- package/components/color-loupe/index.cjs +1 -7
- package/components/color-loupe/index.js +8 -12
- package/components/color-loupe-CrM2DVY3.cjs +56 -0
- package/components/color-loupe-DmQe3SpP.js +81 -0
- package/components/color-menu/index.cjs +12 -217
- package/components/color-menu/index.js +93 -187
- package/components/color-palette/index.cjs +1 -89
- package/components/color-palette/index.js +51 -78
- package/components/color-palette-group/index.cjs +3 -259
- package/components/color-palette-group/index.js +105 -193
- package/components/color-picker/index.cjs +6 -114
- package/components/color-picker/index.js +72 -92
- package/components/color-slider/index.cjs +1 -585
- package/components/color-slider/index.js +7 -590
- package/components/condition-attribute-with-id-DrQYZzFS.cjs +18 -0
- package/components/condition-attribute-with-id-Dv4lSRbe.js +31 -0
- package/components/date-time-picker/index.cjs +31 -1357
- package/components/date-time-picker/index.js +637 -951
- package/components/{dependency-manger-XHpQjFgK.js → dependency-manger-CO-VPlqq.js} +14 -24
- package/components/dependency-manger-uthev62E.cjs +18 -0
- package/components/directive-C7oCP5Bh.cjs +22 -0
- package/components/directive-helpers-D4KMv2dC.js +62 -0
- package/components/directive-helpers-t-TVum7J.cjs +22 -0
- package/components/{slottable-request-event-CANixJnR.cjs → directive-oAbCiebi.js} +25 -14
- package/components/divider/index.cjs +1 -54
- package/components/divider/index.js +30 -49
- package/components/divider.module-DDvBo9zo.cjs +18 -0
- package/components/divider.module-DoQWQEIJ.js +21 -0
- package/components/element-resolution-BvRLGqIU.cjs +18 -0
- package/components/element-resolution-FCUT-wql.js +91 -0
- package/components/field-group/index.cjs +1 -7
- package/components/field-group/index.js +8 -12
- package/components/field-group-5WQMBOk4.cjs +23 -0
- package/components/field-group-D4B0IOdA.js +66 -0
- package/components/field-label/index.cjs +1 -7
- package/components/field-label/index.js +8 -12
- package/components/field-label-DxmPiC5p.js +106 -0
- package/components/field-label-Dz9kisdW.cjs +25 -0
- package/components/flow-D-0MTYCm.js +527 -0
- package/components/flow-DM3dNAKs.cjs +30 -0
- package/components/focus-group-DHeTq18L.js +218 -0
- package/components/focus-group-DnxZUBhQ.cjs +18 -0
- package/components/focus-visible-BvScGDCE.js +74 -0
- package/components/focus-visible-D4BXb5RB.cjs +18 -0
- package/components/focusable-B_KwfEec.cjs +18 -0
- package/components/focusable-C5JjRZmT.js +153 -0
- package/components/{focusable-selectors-IltOAOd9.js → focusable-selectors-B4YgbghQ.js} +4 -7
- package/components/focusable-selectors-BgFlyFcY.cjs +18 -0
- package/components/icon/index.cjs +1 -90
- package/components/icon/index.js +46 -74
- package/components/if-defined-DULpqYwi.js +27 -0
- package/components/if-defined-DaXWqfzc.cjs +22 -0
- package/components/index-CNK8wHXu.cjs +57 -0
- package/components/index-Cf6G4q52.js +1490 -0
- package/components/index-D3ICqC7S.js +1174 -0
- package/components/index-hqVbNKYy.cjs +113 -0
- package/components/index.cjs +1 -174
- package/components/index.js +172 -174
- package/components/infield-button/index.cjs +2 -46
- package/components/infield-button/index.js +30 -41
- package/components/label/index.cjs +1 -37
- package/components/label/index.js +24 -36
- package/components/{language-resolution-BSGJAWiQ.js → language-resolution-B-wjV5bb.js} +17 -21
- package/components/language-resolution-EUER43cg.cjs +18 -0
- package/components/like-anchor-Bu3pXbjT.cjs +32 -0
- package/components/like-anchor-DCFJN0LV.js +69 -0
- package/components/luzmo-icons-CiSek5iM.js +229 -0
- package/components/luzmo-icons-CtA-TJPd.cjs +29 -0
- package/components/manage-help-text-CHfMLzSa.js +92 -0
- package/components/manage-help-text-DNqdEkTA.cjs +30 -0
- package/components/menu/index.cjs +29 -1297
- package/components/menu/index.js +499 -954
- package/components/multi-language-field/index.cjs +2 -132
- package/components/multi-language-field/index.js +88 -118
- package/components/mutation-controller-DH7YOCyj.js +52 -0
- package/components/mutation-controller-DkOMCW-c.cjs +22 -0
- package/components/number-field/index.cjs +10 -613
- package/components/number-field/index.js +243 -442
- package/components/observe-slot-presence-CmVi0zTc.js +68 -0
- package/components/observe-slot-presence-bc9chhsi.cjs +18 -0
- package/components/observe-slot-text-C3moTjwy.js +87 -0
- package/components/observe-slot-text-D2VAEFSd.cjs +18 -0
- package/components/options/index.cjs +60 -693
- package/components/options/index.js +953 -519
- package/components/overlay/index.cjs +21 -367
- package/components/overlay/index.js +189 -273
- package/components/overlay-B3ajDLLq.cjs +47 -0
- package/components/overlay-CUKs69yr.js +2745 -0
- package/components/{pending-state-CXbe-Xul.js → pending-state-B2wWssTo.js} +13 -28
- package/components/pending-state-bJr-nEJl.cjs +26 -0
- package/components/picker/index.cjs +1 -9
- package/components/picker/index.js +11 -15
- package/components/picker-C0LvseZe.cjs +123 -0
- package/components/picker-W1qNmtsh.js +461 -0
- package/components/picker-button/index.cjs +4 -56
- package/components/picker-button/index.js +34 -45
- package/components/{condition-attribute-with-id-Cn815e9W.js → platform-BM-uMWpX.js} +49 -24
- package/components/platform-BiXhwqk3.cjs +18 -0
- package/components/popover/index.cjs +1 -7
- package/components/popover/index.js +8 -12
- package/components/popover-fwJeZHMQ.cjs +30 -0
- package/components/popover-iD8f5Jkp.js +67 -0
- package/components/progress-circle/index.cjs +1 -7
- package/components/progress-circle/index.js +8 -12
- package/components/progress-circle-DZxaMe8L.cjs +33 -0
- package/components/progress-circle-USIIU1up.js +97 -0
- package/components/query-BL-TJj7K.cjs +22 -0
- package/components/query-D_KR_GUc.js +51 -0
- package/components/query-assigned-elements-DjfhL1cl.js +36 -0
- package/components/query-assigned-elements-DsKsfk7G.cjs +22 -0
- package/components/query-assigned-nodes-BcKWmGzy.cjs +22 -0
- package/components/query-assigned-nodes-C76XVPWY.js +36 -0
- package/components/radio/index.cjs +2 -244
- package/components/radio/index.js +110 -192
- package/components/{random-id-BEc6QIUL.js → random-id-ByCz1xaq.js} +3 -3
- package/components/random-id-CqvckpWe.cjs +18 -0
- package/components/roving-tabindex-By_fCy_e.cjs +18 -0
- package/components/roving-tabindex-DOg4z6ZU.js +66 -0
- package/components/search/index.cjs +8 -115
- package/components/search/index.js +66 -96
- package/components/select/index.cjs +51 -720
- package/components/select/index.js +347 -563
- package/components/sized-mixin-CJbBHWRQ.js +63 -0
- package/components/sized-mixin-WPHH0a_D.cjs +18 -0
- package/components/slider/index.cjs +1 -119
- package/components/slider/index.js +1113 -100
- package/components/slottable-request-event-BfUUt1Mh.cjs +18 -0
- package/components/{slottable-request-event-D9WzrdWv.js → slottable-request-event-DggLA4Rx.js} +9 -12
- package/components/state-DwIwYPvt.js +29 -0
- package/components/state-vf0PJN3_.cjs +22 -0
- package/components/strategies-C6HsQpU2.cjs +18 -0
- package/components/strategies-CUMLHtQI.js +195 -0
- package/components/streaming-listener-BQ68fKMa.js +91 -0
- package/components/streaming-listener-DeGQYM-9.cjs +18 -0
- package/components/style-map-Bnhf_mVZ.js +53 -0
- package/components/style-map-DuMd5xlY.cjs +22 -0
- package/components/swatch/index.cjs +7 -436
- package/components/swatch/index.js +205 -350
- package/components/switch/index.cjs +2 -61
- package/components/switch/index.js +34 -51
- package/components/tabs/index.cjs +26 -693
- package/components/tabs/index.js +388 -521
- package/components/tags/index.cjs +4 -201
- package/components/tags/index.js +87 -152
- package/components/text-field/index.cjs +3 -49
- package/components/text-field/index.js +30 -44
- package/components/text-field-BkFPYo7S.cjs +85 -0
- package/components/text-field-C2n3rzCK.js +314 -0
- package/components/text-field.module-C2KVUJcX.js +21 -0
- package/components/text-field.module-DXhFA9G-.cjs +18 -0
- package/components/toast/index.cjs +12 -177
- package/components/toast/index.js +73 -145
- package/components/tooltip/index.cjs +6 -250
- package/components/tooltip/index.js +124 -177
- package/components/unit-input/index.cjs +8 -232
- package/components/unit-input/index.js +108 -201
- package/components/utils.cjs +1 -25
- package/components/utils.js +22 -22
- package/components/{random-id-BE6HA503.cjs → when-CDK1Tt5Y.js} +10 -7
- package/components/when-CDZyJPvd.cjs +22 -0
- package/package.json +1 -1
- package/components/action-group-DHp8RHDf.js +0 -392
- package/components/action-group-MPf19RPV.cjs +0 -391
- package/components/base-COw9n7UR.cjs +0 -119
- package/components/base-DmeVy0cq.js +0 -120
- package/components/button-base-7Ak55xFd.cjs +0 -206
- package/components/button-base-C3kf6BTK.js +0 -207
- package/components/checkbox-mixin-8cL-vfDy.js +0 -84
- package/components/checkbox-mixin-CE7dJj3J.cjs +0 -83
- package/components/clear-button-Co6oKSgl.js +0 -59
- package/components/clear-button-X_HDY2eH.cjs +0 -58
- package/components/close-button-DPBK6Kpu.cjs +0 -59
- package/components/close-button-Miw9ZjoJ.js +0 -60
- package/components/color-controller-BjDZaxhX.js +0 -491
- package/components/color-controller-C3c_vb2P.cjs +0 -490
- package/components/color-loupe-BQqNR8YD.cjs +0 -88
- package/components/color-loupe-B_DDFv8l.js +0 -89
- package/components/condition-attribute-with-id-DEc2Yjne.cjs +0 -43
- package/components/dependency-manger-CcIE1uvQ.cjs +0 -63
- package/components/divider.module-Cm5LcDRV.cjs +0 -20
- package/components/divider.module-DauH6k2_.js +0 -21
- package/components/element-resolution-DCsrhGZO.cjs +0 -112
- package/components/element-resolution-nMlmW4Jy.js +0 -113
- package/components/field-group-DNmY8W9v.cjs +0 -86
- package/components/field-group-DVdAWCQF.js +0 -87
- package/components/field-label-CKH9EXpR.cjs +0 -156
- package/components/field-label-Dpsecoc6.js +0 -157
- package/components/focus-group-BqDAk9Is.js +0 -337
- package/components/focus-group-DFzOlalL.cjs +0 -336
- package/components/focus-visible-B-B8-P9R.cjs +0 -104
- package/components/focus-visible-BUPRWlsh.js +0 -105
- package/components/focusable-BPrTcZPd.cjs +0 -262
- package/components/focusable-ChCLg1k4.js +0 -263
- package/components/language-resolution-iN9EImbb.cjs +0 -57
- package/components/like-anchor-D62faRNG.cjs +0 -79
- package/components/like-anchor-v3cJ9RWM.js +0 -80
- package/components/manage-help-text-BYx84zZR.cjs +0 -125
- package/components/manage-help-text-DOuMTGht.js +0 -126
- package/components/observe-slot-presence-9AwLGUQ_.cjs +0 -78
- package/components/observe-slot-presence-DcMdoumP.js +0 -79
- package/components/observe-slot-text-CSofZeeF.cjs +0 -104
- package/components/observe-slot-text-CjnkkBPn.js +0 -105
- package/components/overlay-CN8ISP1F.js +0 -2485
- package/components/overlay-LViy9VWM.cjs +0 -2484
- package/components/pending-state-e4RbXe9u.cjs +0 -75
- package/components/picker-DNde3awt.cjs +0 -672
- package/components/picker-PfUAF05y.js +0 -673
- package/components/platform-CxDar3Dn.cjs +0 -68
- package/components/platform-Cxn0WbyT.js +0 -69
- package/components/popover-BkbYhl3i.js +0 -74
- package/components/popover-BkgUf0kL.cjs +0 -74
- package/components/progress-circle-Hu_ivPHf.js +0 -133
- package/components/progress-circle-_Etqsj9f.cjs +0 -132
- package/components/roving-tabindex-AsmAh2In.cjs +0 -95
- package/components/roving-tabindex-DPF9NmrH.js +0 -96
- package/components/sized-mixin-DmkrNdWB.js +0 -80
- package/components/sized-mixin-UaTVa-AE.cjs +0 -79
- package/components/strategies-DlMlaSJR.cjs +0 -317
- package/components/strategies-DlPQoTFE.js +0 -318
- package/components/streaming-listener-D4sHaMub.cjs +0 -145
- package/components/streaming-listener-cAz5zJyk.js +0 -146
- package/components/text-field-11tcnftU.cjs +0 -338
- package/components/text-field-Chi9J2Cz.js +0 -339
- package/components/text-field.module-CMBS0jSL.js +0 -21
- package/components/text-field.module-DIJdV_sA.cjs +0 -20
|
@@ -15,588 +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";
|
|
19
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
20
|
-
const tinycolor = require("@ctrl/tinycolor");
|
|
21
|
-
const lit = require("lit");
|
|
22
|
-
const decorators_js = require("lit/decorators.js");
|
|
23
|
-
const ifDefined_js = require("lit/directives/if-defined.js");
|
|
24
|
-
const styleMap_js = require("lit/directives/style-map.js");
|
|
25
|
-
require("../color-handle/index.cjs");
|
|
26
|
-
const focusable = require("../focusable-BPrTcZPd.cjs");
|
|
27
|
-
const languageResolution = require("../language-resolution-iN9EImbb.cjs");
|
|
28
|
-
const streamingListener = require("../streaming-listener-D4sHaMub.cjs");
|
|
29
|
-
const extractHueAndSaturationRegExp = /^hs[v|l]a?\s?\((\d{1,3}\.?\d*?),?\s?(\d{1,3})/;
|
|
30
|
-
const replaceHueAndSaturationRegExp = /(^hs[v|l]a?\s?\()\d{1,3}\.?\d*?(,?\s?)\d{1,3}/;
|
|
31
|
-
const replaceHueRegExp = /(^hs[v|l]a?\()\d{1,3}/;
|
|
32
|
-
const getHexValue = (color, isString) => isString ? color.toHexString() : color.toHex();
|
|
33
|
-
class ColorController {
|
|
34
|
-
constructor(host, {
|
|
35
|
-
applyColorToState,
|
|
36
|
-
extractColorFromState,
|
|
37
|
-
maintains
|
|
38
|
-
}) {
|
|
39
|
-
this.maintains = "hue";
|
|
40
|
-
this._hue = 0;
|
|
41
|
-
this._opacity = 1;
|
|
42
|
-
this.getColorProcesses = {
|
|
43
|
-
rgb: (color, isString) => isString ? color.toRgbString() : color.toRgb(),
|
|
44
|
-
prgb: (color, isString) => isString ? color.toPercentageRgbString() : color.toPercentageRgb(),
|
|
45
|
-
hex8: (color, isString) => isString ? color.toHex8String() : color.toHex8(),
|
|
46
|
-
name: (color) => color.toName() || color.toRgbString(),
|
|
47
|
-
hsl: (color, isString) => {
|
|
48
|
-
if (this.maintains === "hue") {
|
|
49
|
-
if (isString) {
|
|
50
|
-
const hslString = color.toHslString();
|
|
51
|
-
return hslString.replace(replaceHueRegExp, `$1${this.hue}`);
|
|
52
|
-
}
|
|
53
|
-
const { s: s2, l: l2, a: a2 } = color.toHsl();
|
|
54
|
-
return { h: this.hue, s: s2, l: l2, a: a2 };
|
|
55
|
-
}
|
|
56
|
-
if (isString) {
|
|
57
|
-
const hslString = color.toHslString();
|
|
58
|
-
return hslString.replace(
|
|
59
|
-
replaceHueAndSaturationRegExp,
|
|
60
|
-
`$1${this.hue}$2${this.saturation}`
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
const { s, l, a } = color.toHsl();
|
|
64
|
-
return { h: this.hue, s, l, a };
|
|
65
|
-
},
|
|
66
|
-
hsv: (color, isString) => {
|
|
67
|
-
if (this.maintains === "hue") {
|
|
68
|
-
if (isString) {
|
|
69
|
-
const hsvString = color.toHsvString();
|
|
70
|
-
return hsvString.replace(replaceHueRegExp, `$1${this.hue}`);
|
|
71
|
-
}
|
|
72
|
-
const { s: s2, v: v2, a: a2 } = color.toHsv();
|
|
73
|
-
return { h: this.hue, s: s2, v: v2, a: a2 };
|
|
74
|
-
}
|
|
75
|
-
if (isString) {
|
|
76
|
-
const hsvString = color.toHsvString();
|
|
77
|
-
return hsvString.replace(
|
|
78
|
-
replaceHueAndSaturationRegExp,
|
|
79
|
-
`$1${this.hue}$2${this.saturation}`
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
const { s, v, a } = color.toHsv();
|
|
83
|
-
return { h: this.hue, s, v, a };
|
|
84
|
-
},
|
|
85
|
-
hex: getHexValue,
|
|
86
|
-
hex3: getHexValue,
|
|
87
|
-
hex4: getHexValue,
|
|
88
|
-
hex6: getHexValue
|
|
89
|
-
};
|
|
90
|
-
this._color = new tinycolor.TinyColor({ h: 0, s: 1, v: 1 });
|
|
91
|
-
this._previousColor = new tinycolor.TinyColor({ h: 0, s: 1, v: 1 });
|
|
92
|
-
this._format = {
|
|
93
|
-
format: "",
|
|
94
|
-
isString: false
|
|
95
|
-
};
|
|
96
|
-
this.host = host;
|
|
97
|
-
this.applyColorToState = applyColorToState;
|
|
98
|
-
this.extractColorFromState = extractColorFromState;
|
|
99
|
-
this.maintains = maintains || this.maintains;
|
|
100
|
-
}
|
|
101
|
-
setColorProcess(currentColor, nextColor, format, isString) {
|
|
102
|
-
if (this.maintains === "hue") {
|
|
103
|
-
this.setColorMaintainHue(currentColor, nextColor, format, isString);
|
|
104
|
-
} else if (this.maintains === "saturation") {
|
|
105
|
-
this.setColorMaintainSaturation(
|
|
106
|
-
currentColor,
|
|
107
|
-
nextColor,
|
|
108
|
-
format,
|
|
109
|
-
isString
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
setColorMaintainHue(currentColor, nextColor, format, isString) {
|
|
114
|
-
const { h, s, v, a } = this._color.toHsv();
|
|
115
|
-
let originalHue;
|
|
116
|
-
if (isString && format.startsWith("hs")) {
|
|
117
|
-
const values = extractHueAndSaturationRegExp.exec(nextColor);
|
|
118
|
-
if (values !== null) {
|
|
119
|
-
const [, h2] = values;
|
|
120
|
-
originalHue = Number(h2);
|
|
121
|
-
}
|
|
122
|
-
} else if (!isString && format.startsWith("hs")) {
|
|
123
|
-
const colorInput = currentColor.originalInput;
|
|
124
|
-
const colorValues = Object.values(colorInput);
|
|
125
|
-
originalHue = colorValues[0];
|
|
126
|
-
}
|
|
127
|
-
this.hue = originalHue || h;
|
|
128
|
-
this.opacity = a ?? 1;
|
|
129
|
-
this.applyColorToState({ h, s, v, a });
|
|
130
|
-
}
|
|
131
|
-
setColorMaintainSaturation(currentColor, nextColor, format, isString) {
|
|
132
|
-
const { a } = this._color.toHsv();
|
|
133
|
-
if (isString && format.startsWith("hs")) {
|
|
134
|
-
const values = extractHueAndSaturationRegExp.exec(nextColor);
|
|
135
|
-
if (values !== null) {
|
|
136
|
-
const [, h, s] = values;
|
|
137
|
-
this.hue = Number(h);
|
|
138
|
-
this.saturation = Number(s);
|
|
139
|
-
}
|
|
140
|
-
} else if (!isString && format.startsWith("hs")) {
|
|
141
|
-
const colorInput = currentColor.originalInput;
|
|
142
|
-
const colorValues = Object.values(colorInput);
|
|
143
|
-
this.hue = colorValues[0];
|
|
144
|
-
this.saturation = colorValues[1];
|
|
145
|
-
} else {
|
|
146
|
-
const { h } = currentColor.toHsv();
|
|
147
|
-
this.hue = h;
|
|
148
|
-
}
|
|
149
|
-
this.opacity = a ?? 1;
|
|
150
|
-
this.applyColorToState(currentColor.toHsv());
|
|
151
|
-
}
|
|
152
|
-
applyColorFromState() {
|
|
153
|
-
this._color = new tinycolor.TinyColor(this.extractColorFromState(this));
|
|
154
|
-
}
|
|
155
|
-
get hue() {
|
|
156
|
-
return this._hue;
|
|
157
|
-
}
|
|
158
|
-
set hue(value) {
|
|
159
|
-
const hue = Math.min(360, Math.max(0, value));
|
|
160
|
-
if (hue === this.hue) {
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
const oldValue = this.hue;
|
|
164
|
-
const { s, v, a } = this._color.toHsv();
|
|
165
|
-
this._color = new tinycolor.TinyColor({ h: hue, s, v, a });
|
|
166
|
-
this._hue = hue;
|
|
167
|
-
this.host.requestUpdate("hue", oldValue);
|
|
168
|
-
}
|
|
169
|
-
get opacity() {
|
|
170
|
-
return this._opacity;
|
|
171
|
-
}
|
|
172
|
-
set opacity(value) {
|
|
173
|
-
const opacity = Math.min(1, Math.max(0, value));
|
|
174
|
-
if (opacity === this.opacity) {
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
const oldValue = this.opacity;
|
|
178
|
-
const { h, s, v } = this._color.toHsv();
|
|
179
|
-
this._color = new tinycolor.TinyColor({ h, s, v, a: opacity });
|
|
180
|
-
this._opacity = opacity;
|
|
181
|
-
this.host.requestUpdate("opacity", oldValue);
|
|
182
|
-
}
|
|
183
|
-
/* c8 ignore next 3 */
|
|
184
|
-
get value() {
|
|
185
|
-
return this.color;
|
|
186
|
-
}
|
|
187
|
-
get color() {
|
|
188
|
-
return this.getColorProcesses[this._format.format || "hex"](
|
|
189
|
-
this._color,
|
|
190
|
-
this._format.isString
|
|
191
|
-
);
|
|
192
|
-
}
|
|
193
|
-
set color(color) {
|
|
194
|
-
if (color === this.color) {
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
const oldValue = this._color;
|
|
198
|
-
this._color = new tinycolor.TinyColor(color);
|
|
199
|
-
const format = this._color.format;
|
|
200
|
-
let isString = typeof color === "string" || color instanceof String;
|
|
201
|
-
if (format.startsWith("hex")) {
|
|
202
|
-
isString = color.startsWith("#");
|
|
203
|
-
}
|
|
204
|
-
this._format = {
|
|
205
|
-
format,
|
|
206
|
-
isString
|
|
207
|
-
};
|
|
208
|
-
this.setColorProcess(this._color, color, format, isString);
|
|
209
|
-
this.host.requestUpdate("color", oldValue);
|
|
210
|
-
}
|
|
211
|
-
getColor(format) {
|
|
212
|
-
const formatOptions = {
|
|
213
|
-
hsl: "toHsl"
|
|
214
|
-
};
|
|
215
|
-
return this._color[formatOptions[format]]();
|
|
216
|
-
}
|
|
217
|
-
setColor(color) {
|
|
218
|
-
this._color = color;
|
|
219
|
-
const isString = typeof this._color.originalInput === "string" || this._color.originalInput instanceof String;
|
|
220
|
-
this.setColorProcess(this._color, color, this._color.format, isString);
|
|
221
|
-
}
|
|
222
|
-
getHslString() {
|
|
223
|
-
return this._color.toHslString();
|
|
224
|
-
}
|
|
225
|
-
savePreviousColor() {
|
|
226
|
-
this._previousColor = this._color.clone();
|
|
227
|
-
}
|
|
228
|
-
restorePreviousColor() {
|
|
229
|
-
this.setColor(this._previousColor);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
const styles = '.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}';
|
|
233
|
-
var __defProp = Object.defineProperty;
|
|
234
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
235
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
236
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
237
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
238
|
-
if (decorator = decorators[i])
|
|
239
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
240
|
-
if (kind && result) __defProp(target, key, result);
|
|
241
|
-
return result;
|
|
242
|
-
};
|
|
243
|
-
class LuzmoColorSlider extends focusable.Focusable {
|
|
244
|
-
constructor() {
|
|
245
|
-
super(...arguments);
|
|
246
|
-
this.disabled = false;
|
|
247
|
-
this.focused = false;
|
|
248
|
-
this.label = "hue";
|
|
249
|
-
this.vertical = false;
|
|
250
|
-
this.languageResolver = new languageResolution.LanguageResolutionController(this);
|
|
251
|
-
this.colorController = new ColorController(this, {
|
|
252
|
-
/* c8 ignore next 3 */
|
|
253
|
-
applyColorToState: () => {
|
|
254
|
-
if (this.mode === "opacity") {
|
|
255
|
-
const color = new tinycolor.TinyColor(this.colorController.color);
|
|
256
|
-
this.sliderHandlePosition = 100 * color.getAlpha();
|
|
257
|
-
} else {
|
|
258
|
-
this.sliderHandlePosition = 100 * (this.colorController.hue / 360);
|
|
259
|
-
}
|
|
260
|
-
},
|
|
261
|
-
extractColorFromState: (controller) => {
|
|
262
|
-
if (this.mode === "opacity") {
|
|
263
|
-
return {
|
|
264
|
-
...controller.getColor("hsl"),
|
|
265
|
-
a: this.value
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
return {
|
|
269
|
-
...controller.getColor("hsl"),
|
|
270
|
-
h: this.value
|
|
271
|
-
};
|
|
272
|
-
},
|
|
273
|
-
maintains: "saturation"
|
|
274
|
-
});
|
|
275
|
-
this.sliderHandlePosition = 0;
|
|
276
|
-
this.step = 1;
|
|
277
|
-
this.isLTR = true;
|
|
278
|
-
this._altered = 0;
|
|
279
|
-
this._pointerDown = false;
|
|
280
|
-
}
|
|
281
|
-
static get styles() {
|
|
282
|
-
return [lit.unsafeCSS(styles)];
|
|
283
|
-
}
|
|
284
|
-
get value() {
|
|
285
|
-
if (this.mode === "opacity") {
|
|
286
|
-
return this.colorController.opacity;
|
|
287
|
-
}
|
|
288
|
-
return this.colorController.hue;
|
|
289
|
-
}
|
|
290
|
-
set value(value) {
|
|
291
|
-
if (this.mode === "opacity") {
|
|
292
|
-
this.colorController.opacity = value;
|
|
293
|
-
} else {
|
|
294
|
-
this.colorController.hue = value;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
get color() {
|
|
298
|
-
return this.colorController.color;
|
|
299
|
-
}
|
|
300
|
-
set color(color) {
|
|
301
|
-
this.colorController.color = color;
|
|
302
|
-
}
|
|
303
|
-
get altered() {
|
|
304
|
-
return this._altered;
|
|
305
|
-
}
|
|
306
|
-
set altered(altered) {
|
|
307
|
-
this._altered = altered;
|
|
308
|
-
this.step = Math.max(1, this.altered * 10);
|
|
309
|
-
}
|
|
310
|
-
get focusElement() {
|
|
311
|
-
return this.input;
|
|
312
|
-
}
|
|
313
|
-
handleKeydown(event) {
|
|
314
|
-
const { key } = event;
|
|
315
|
-
this.focused = true;
|
|
316
|
-
this.altered = [event.shiftKey, event.ctrlKey, event.altKey].filter(
|
|
317
|
-
(_key) => !!_key
|
|
318
|
-
).length;
|
|
319
|
-
let delta = 0;
|
|
320
|
-
switch (key) {
|
|
321
|
-
case "ArrowUp": {
|
|
322
|
-
delta = this.step;
|
|
323
|
-
break;
|
|
324
|
-
}
|
|
325
|
-
case "ArrowDown": {
|
|
326
|
-
delta = -this.step;
|
|
327
|
-
break;
|
|
328
|
-
}
|
|
329
|
-
case "ArrowLeft": {
|
|
330
|
-
delta = this.step * (this.isLTR ? -1 : 1);
|
|
331
|
-
break;
|
|
332
|
-
}
|
|
333
|
-
case "ArrowRight": {
|
|
334
|
-
delta = this.step * (this.isLTR ? 1 : -1);
|
|
335
|
-
break;
|
|
336
|
-
}
|
|
337
|
-
default: {
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
event.preventDefault();
|
|
342
|
-
const range = this.mode === "opacity" ? 100 : 360;
|
|
343
|
-
const mult = 100 / range;
|
|
344
|
-
this.sliderHandlePosition = Math.min(
|
|
345
|
-
100,
|
|
346
|
-
Math.max(0, this.sliderHandlePosition + delta * mult)
|
|
347
|
-
);
|
|
348
|
-
this.value = this.mode === "opacity" ? Math.min(1, Math.max(0, this.value + delta / 100)) : Math.min(360, Math.max(0, this.value + delta));
|
|
349
|
-
this.colorController.applyColorFromState();
|
|
350
|
-
if (delta !== 0) {
|
|
351
|
-
this.dispatchEvent(
|
|
352
|
-
new Event("input", {
|
|
353
|
-
bubbles: true,
|
|
354
|
-
composed: true
|
|
355
|
-
})
|
|
356
|
-
);
|
|
357
|
-
this.dispatchEvent(
|
|
358
|
-
new Event("change", {
|
|
359
|
-
bubbles: true,
|
|
360
|
-
composed: true
|
|
361
|
-
})
|
|
362
|
-
);
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
handleInput(event) {
|
|
366
|
-
const { valueAsNumber } = event.target;
|
|
367
|
-
this.value = valueAsNumber;
|
|
368
|
-
this.sliderHandlePosition = 100 * (this.mode === "opacity" ? this.value : this.value / 360);
|
|
369
|
-
this.colorController.applyColorFromState();
|
|
370
|
-
}
|
|
371
|
-
handleChange(event) {
|
|
372
|
-
this.handleInput(event);
|
|
373
|
-
this.dispatchEvent(
|
|
374
|
-
new Event("change", {
|
|
375
|
-
bubbles: true,
|
|
376
|
-
composed: true
|
|
377
|
-
})
|
|
378
|
-
);
|
|
379
|
-
}
|
|
380
|
-
focus(focusOptions = {}) {
|
|
381
|
-
super.focus(focusOptions);
|
|
382
|
-
this.forwardFocus();
|
|
383
|
-
}
|
|
384
|
-
forwardFocus() {
|
|
385
|
-
this.input.focus();
|
|
386
|
-
}
|
|
387
|
-
handleFocus() {
|
|
388
|
-
this.focused = true;
|
|
389
|
-
}
|
|
390
|
-
handleBlur() {
|
|
391
|
-
if (this._pointerDown) {
|
|
392
|
-
return;
|
|
393
|
-
}
|
|
394
|
-
this.altered = 0;
|
|
395
|
-
this.focused = false;
|
|
396
|
-
}
|
|
397
|
-
handlePointerdown(event) {
|
|
398
|
-
if (event.button !== 0) {
|
|
399
|
-
event.preventDefault();
|
|
400
|
-
return;
|
|
401
|
-
}
|
|
402
|
-
this._pointerDown = true;
|
|
403
|
-
this.colorController.savePreviousColor();
|
|
404
|
-
this.boundingClientRect = this.getBoundingClientRect();
|
|
405
|
-
event.target.setPointerCapture(event.pointerId);
|
|
406
|
-
if (event.pointerType === "mouse") {
|
|
407
|
-
this.focused = true;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
handlePointermove(event) {
|
|
411
|
-
this.sliderHandlePosition = this.calculateHandlePosition(event);
|
|
412
|
-
this.value = (this.mode === "opacity" ? 1 : 360) * (this.sliderHandlePosition / 100);
|
|
413
|
-
this.colorController.applyColorFromState();
|
|
414
|
-
this.dispatchEvent(
|
|
415
|
-
new Event("input", {
|
|
416
|
-
bubbles: true,
|
|
417
|
-
composed: true,
|
|
418
|
-
cancelable: true
|
|
419
|
-
})
|
|
420
|
-
);
|
|
421
|
-
}
|
|
422
|
-
handlePointerup(event) {
|
|
423
|
-
this._pointerDown = false;
|
|
424
|
-
event.target.releasePointerCapture(event.pointerId);
|
|
425
|
-
const applyDefault = this.dispatchEvent(
|
|
426
|
-
new Event("change", {
|
|
427
|
-
bubbles: true,
|
|
428
|
-
composed: true,
|
|
429
|
-
cancelable: true
|
|
430
|
-
})
|
|
431
|
-
);
|
|
432
|
-
if (!applyDefault) {
|
|
433
|
-
this.colorController.restorePreviousColor();
|
|
434
|
-
}
|
|
435
|
-
this.focus();
|
|
436
|
-
if (event.pointerType === "mouse") {
|
|
437
|
-
this.focused = false;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
/**
|
|
441
|
-
* Returns the value under the cursor
|
|
442
|
-
* @param: PointerEvent on slider
|
|
443
|
-
* @return: Slider value that correlates to the position under the pointer
|
|
444
|
-
*/
|
|
445
|
-
calculateHandlePosition(event) {
|
|
446
|
-
if (!this.boundingClientRect) {
|
|
447
|
-
return this.sliderHandlePosition;
|
|
448
|
-
}
|
|
449
|
-
const rect = this.boundingClientRect;
|
|
450
|
-
const minOffset = this.vertical ? rect.top : rect.left;
|
|
451
|
-
const offset = this.vertical ? event.clientY : event.clientX;
|
|
452
|
-
const size = this.vertical ? rect.height : rect.width;
|
|
453
|
-
const percent = Math.max(0, Math.min(1, (offset - minOffset) / size));
|
|
454
|
-
const sliderHandlePosition = this.vertical || !this.isLTR ? 100 - 100 * percent : 100 * percent;
|
|
455
|
-
return sliderHandlePosition;
|
|
456
|
-
}
|
|
457
|
-
handleGradientPointerdown(event) {
|
|
458
|
-
if (event.button !== 0) {
|
|
459
|
-
return;
|
|
460
|
-
}
|
|
461
|
-
event.stopPropagation();
|
|
462
|
-
event.preventDefault();
|
|
463
|
-
this.handle.dispatchEvent(new PointerEvent("pointerdown", event));
|
|
464
|
-
this.handlePointermove(event);
|
|
465
|
-
}
|
|
466
|
-
get handlePositionStyles() {
|
|
467
|
-
return `${this.vertical ? "inset-block-end" : "inset-inline-start"}: ${this.sliderHandlePosition}%`;
|
|
468
|
-
}
|
|
469
|
-
get getColorSliderStyle() {
|
|
470
|
-
const orientation = this.vertical ? "top" : "right";
|
|
471
|
-
if (this.mode === "opacity") {
|
|
472
|
-
const color = new tinycolor.TinyColor(this.colorController.color).setAlpha(1).toRgbString();
|
|
473
|
-
return {
|
|
474
|
-
background: `linear-gradient(to ${orientation}, transparent, ${color})`
|
|
475
|
-
};
|
|
476
|
-
}
|
|
477
|
-
return {
|
|
478
|
-
background: `linear-gradient(to ${orientation}, var(--luzmo-color-slider-gradient, var(--luzmo-color-slider-gradient-fallback)))`
|
|
479
|
-
};
|
|
480
|
-
}
|
|
481
|
-
render() {
|
|
482
|
-
return lit.html`
|
|
483
|
-
<div
|
|
484
|
-
class="opacity-checkerboard checkerboard"
|
|
485
|
-
role="presentation"
|
|
486
|
-
@pointerdown=${this.handleGradientPointerdown}
|
|
487
|
-
>
|
|
488
|
-
<div
|
|
489
|
-
class="gradient"
|
|
490
|
-
role="presentation"
|
|
491
|
-
style=${styleMap_js.styleMap(this.getColorSliderStyle)}
|
|
492
|
-
>
|
|
493
|
-
<slot name="gradient"></slot>
|
|
494
|
-
</div>
|
|
495
|
-
</div>
|
|
496
|
-
<luzmo-color-handle
|
|
497
|
-
tabindex=${ifDefined_js.ifDefined(this.focused ? void 0 : "0")}
|
|
498
|
-
@focus=${this.forwardFocus}
|
|
499
|
-
?focused=${this.focused}
|
|
500
|
-
class="handle"
|
|
501
|
-
color=${this.mode === "opacity" ? this.color : "hsl(" + this.value + ", 100%, 50%)"}
|
|
502
|
-
?disabled=${this.disabled}
|
|
503
|
-
style=${this.handlePositionStyles}
|
|
504
|
-
${streamingListener.streamingListener({
|
|
505
|
-
start: ["pointerdown", this.handlePointerdown],
|
|
506
|
-
streamInside: ["pointermove", this.handlePointermove],
|
|
507
|
-
end: [
|
|
508
|
-
["pointerup", "pointercancel", "pointerleave"],
|
|
509
|
-
this.handlePointerup
|
|
510
|
-
]
|
|
511
|
-
})}
|
|
512
|
-
></luzmo-color-handle>
|
|
513
|
-
<input
|
|
514
|
-
type="range"
|
|
515
|
-
class="slider"
|
|
516
|
-
min="0"
|
|
517
|
-
max=${this.mode === "opacity" ? "100" : "360"}
|
|
518
|
-
aria-orientation=${ifDefined_js.ifDefined(this.vertical ? "vertical" : void 0)}
|
|
519
|
-
orient=${ifDefined_js.ifDefined(this.vertical ? "vertical" : void 0)}
|
|
520
|
-
step=${this.step}
|
|
521
|
-
aria-label=${this.label}
|
|
522
|
-
.value=${String(
|
|
523
|
-
this.mode === "opacity" ? this.value * 100 : this.value
|
|
524
|
-
)}
|
|
525
|
-
aria-valuetext=${`${new Intl.NumberFormat(
|
|
526
|
-
this.languageResolver.language,
|
|
527
|
-
{
|
|
528
|
-
maximumFractionDigits: 0,
|
|
529
|
-
minimumIntegerDigits: 1,
|
|
530
|
-
style: "unit",
|
|
531
|
-
unit: this.mode === "opacity" ? "percent" : "degree",
|
|
532
|
-
unitDisplay: "narrow"
|
|
533
|
-
}
|
|
534
|
-
).format(this.mode === "opacity" ? this.value * 100 : this.value)}`}
|
|
535
|
-
@input=${this.handleInput}
|
|
536
|
-
@change=${this.handleChange}
|
|
537
|
-
@keydown=${this.handleKeydown}
|
|
538
|
-
/>
|
|
539
|
-
`;
|
|
540
|
-
}
|
|
541
|
-
firstUpdated(changed) {
|
|
542
|
-
super.firstUpdated(changed);
|
|
543
|
-
this.boundingClientRect = this.getBoundingClientRect();
|
|
544
|
-
this.addEventListener("focus", this.handleFocus);
|
|
545
|
-
this.addEventListener("blur", this.handleBlur);
|
|
546
|
-
}
|
|
547
|
-
updated(changedProperties) {
|
|
548
|
-
if (changedProperties.has("mode")) {
|
|
549
|
-
this.handle.style.insetInlineStart = "";
|
|
550
|
-
this.handle.style.insetBlockEnd = "";
|
|
551
|
-
if (this.mode === "opacity") {
|
|
552
|
-
this.colorController.color = new tinycolor.TinyColor(
|
|
553
|
-
this.colorController.color
|
|
554
|
-
).toRgbString();
|
|
555
|
-
this.handle.style.insetInlineStart = 100 * this.colorController.opacity + "%";
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
__decorateClass([
|
|
561
|
-
decorators_js.property({ type: String, reflect: true })
|
|
562
|
-
], LuzmoColorSlider.prototype, "dir", 2);
|
|
563
|
-
__decorateClass([
|
|
564
|
-
decorators_js.property({ type: String, reflect: true })
|
|
565
|
-
], LuzmoColorSlider.prototype, "mode", 2);
|
|
566
|
-
__decorateClass([
|
|
567
|
-
decorators_js.property({ type: Boolean, reflect: true })
|
|
568
|
-
], LuzmoColorSlider.prototype, "disabled", 2);
|
|
569
|
-
__decorateClass([
|
|
570
|
-
decorators_js.property({ type: Boolean, reflect: true })
|
|
571
|
-
], LuzmoColorSlider.prototype, "focused", 2);
|
|
572
|
-
__decorateClass([
|
|
573
|
-
decorators_js.query(".handle")
|
|
574
|
-
], LuzmoColorSlider.prototype, "handle", 2);
|
|
575
|
-
__decorateClass([
|
|
576
|
-
decorators_js.property({ type: String })
|
|
577
|
-
], LuzmoColorSlider.prototype, "label", 2);
|
|
578
|
-
__decorateClass([
|
|
579
|
-
decorators_js.property({ type: Boolean, reflect: true })
|
|
580
|
-
], LuzmoColorSlider.prototype, "vertical", 2);
|
|
581
|
-
__decorateClass([
|
|
582
|
-
decorators_js.property({ type: Number })
|
|
583
|
-
], LuzmoColorSlider.prototype, "value", 1);
|
|
584
|
-
__decorateClass([
|
|
585
|
-
decorators_js.property({ type: Number, reflect: true })
|
|
586
|
-
], LuzmoColorSlider.prototype, "sliderHandlePosition", 2);
|
|
587
|
-
__decorateClass([
|
|
588
|
-
decorators_js.property({ type: String })
|
|
589
|
-
], LuzmoColorSlider.prototype, "color", 1);
|
|
590
|
-
__decorateClass([
|
|
591
|
-
decorators_js.property({ type: Number })
|
|
592
|
-
], LuzmoColorSlider.prototype, "step", 2);
|
|
593
|
-
__decorateClass([
|
|
594
|
-
decorators_js.property({ type: Boolean, attribute: "is-ltr" })
|
|
595
|
-
], LuzmoColorSlider.prototype, "isLTR", 2);
|
|
596
|
-
__decorateClass([
|
|
597
|
-
decorators_js.query("input")
|
|
598
|
-
], LuzmoColorSlider.prototype, "input", 2);
|
|
599
|
-
if (!customElements.get("luzmo-color-slider")) {
|
|
600
|
-
customElements.define("luzmo-color-slider", LuzmoColorSlider);
|
|
601
|
-
}
|
|
602
|
-
exports.LuzmoColorSlider = LuzmoColorSlider;
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-CNK8wHXu.cjs");exports.LuzmoColorSlider=e.LuzmoColorSlider;
|