@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,178 +15,86 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
initializeGlobalLuzmoCSSVariables();
|
|
27
|
-
import { TinyColor } from "@ctrl/tinycolor";
|
|
28
|
-
import { luzmoIcon, luzmoAngleUp, luzmoAngleDown } from "@luzmo/icons";
|
|
29
|
-
import { unsafeCSS, html } from "lit";
|
|
30
|
-
import { property, query, state } from "lit/decorators.js";
|
|
31
|
-
import { F as Focusable } from "../focusable-ChCLg1k4.js";
|
|
32
|
-
import { S as SizedMixin } from "../sized-mixin-DmkrNdWB.js";
|
|
18
|
+
import { T as p, d as z, c as f } from "../luzmo-icons-CiSek5iM.js";
|
|
19
|
+
import { r as v, x as s, n as h } from "../base-CFWO09N1.js";
|
|
20
|
+
import { r as b } from "../state-DwIwYPvt.js";
|
|
21
|
+
import { e as n } from "../query-D_KR_GUc.js";
|
|
22
|
+
import { F as x } from "../focusable-C5JjRZmT.js";
|
|
23
|
+
import { S as w } from "../sized-mixin-CJbBHWRQ.js";
|
|
33
24
|
import "../color-area/index.js";
|
|
34
25
|
import "../color-field/index.js";
|
|
35
26
|
import "../color-handle/index.js";
|
|
36
|
-
import "../
|
|
27
|
+
import { T as a } from "../index-D3ICqC7S.js";
|
|
37
28
|
import "../divider/index.js";
|
|
38
29
|
import "../popover/index.js";
|
|
39
30
|
import "../swatch/index.js";
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (decorator = decorators[i])
|
|
46
|
-
result = decorator(target, key, result) || result;
|
|
47
|
-
if (result) __defProp(target, key, result);
|
|
48
|
-
return result;
|
|
31
|
+
const g = () => {
|
|
32
|
+
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
33
|
+
const i = document.createElement("style");
|
|
34
|
+
i.setAttribute("data-luzmo-vars", ""), i.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(i);
|
|
35
|
+
}
|
|
49
36
|
};
|
|
50
|
-
|
|
37
|
+
g();
|
|
38
|
+
const C = '@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}';
|
|
39
|
+
var y = Object.defineProperty, t = (i, r, o, e) => {
|
|
40
|
+
for (var c = void 0, m = i.length - 1, d; m >= 0; m--)
|
|
41
|
+
(d = i[m]) && (c = d(r, o, c) || c);
|
|
42
|
+
return c && y(r, o, c), c;
|
|
43
|
+
};
|
|
44
|
+
const u = class u extends w(x) {
|
|
51
45
|
constructor() {
|
|
52
|
-
super(...arguments);
|
|
53
|
-
this.color = "rgb(255, 0, 0)";
|
|
54
|
-
this.noAlphaChannel = false;
|
|
55
|
-
this._alpha = 1;
|
|
56
|
-
this._rgbColor = "rgb(255, 0, 0)";
|
|
57
|
-
this._rgbaColor = "rgb(255, 0, 0, 1)";
|
|
58
|
-
this._previousColor = "rgb(255, 0, 0)";
|
|
46
|
+
super(...arguments), this.color = "rgb(255, 0, 0)", this.noAlphaChannel = !1, this._alpha = 1, this._rgbColor = "rgb(255, 0, 0)", this._rgbaColor = "rgb(255, 0, 0, 1)", this._previousColor = "rgb(255, 0, 0)";
|
|
59
47
|
}
|
|
60
|
-
setColor(
|
|
61
|
-
var
|
|
62
|
-
const
|
|
63
|
-
this._format =
|
|
64
|
-
this._rgbaColor = color.toRgbString();
|
|
65
|
-
this._alpha = this.noAlphaChannel ? 1 : color.getAlpha();
|
|
66
|
-
this._rgbColor = color.setAlpha(1).toRgbString();
|
|
67
|
-
this.hueSliderElement.color = this._rgbColor;
|
|
68
|
-
this.areaElement.color = this._rgbColor;
|
|
69
|
-
if (!this.noAlphaChannel) {
|
|
70
|
-
this.opacitySliderElement.color = this._rgbaColor;
|
|
71
|
-
}
|
|
72
|
-
this.swatchElement.color = this._rgbaColor;
|
|
73
|
-
this.colorFieldElement.value = this.formatTextField(color);
|
|
74
|
-
this._previousColor = this._rgbaColor;
|
|
75
|
-
this.color = this._rgbaColor;
|
|
76
|
-
this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
|
|
48
|
+
setColor(r) {
|
|
49
|
+
var e;
|
|
50
|
+
const o = new a((e = r == null ? void 0 : r.target) == null ? void 0 : e.color);
|
|
51
|
+
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 }));
|
|
77
52
|
}
|
|
78
|
-
handleAreaChange(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
this.
|
|
82
|
-
const newColor = new TinyColor(this._rgbColor);
|
|
83
|
-
this._rgbaColor = newColor.setAlpha(this._alpha).toRgbString();
|
|
84
|
-
this.colorFieldElement.value = this._rgbaColor;
|
|
85
|
-
if (!this.noAlphaChannel) {
|
|
86
|
-
this.opacitySliderElement.color = this._rgbaColor;
|
|
87
|
-
}
|
|
88
|
-
this.colorFieldElement.value = this.formatTextField(newColor);
|
|
89
|
-
this.swatchElement.color = this._rgbaColor;
|
|
90
|
-
this._previousColor = this._rgbaColor;
|
|
91
|
-
this.color = this._rgbaColor;
|
|
92
|
-
this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
|
|
53
|
+
handleAreaChange(r) {
|
|
54
|
+
r.stopPropagation(), r.preventDefault(), this._rgbColor = this.areaElement.color;
|
|
55
|
+
const o = new a(this._rgbColor);
|
|
56
|
+
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 }));
|
|
93
57
|
}
|
|
94
58
|
get focusElement() {
|
|
95
59
|
return this.areaElement || this.colorFieldElement || this;
|
|
96
60
|
}
|
|
97
|
-
handleHueSliderChange(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
this._rgbColor = newColor.toRgbString();
|
|
104
|
-
this._rgbaColor = newColor.setAlpha(this._alpha).toRgbString();
|
|
105
|
-
this.areaElement.color = `hsla(${color.h}, ${color.s * 100}%, ${color.l * 100}%, ${color.a})`;
|
|
106
|
-
if (!this.noAlphaChannel) {
|
|
107
|
-
this.opacitySliderElement.color = this._rgbaColor;
|
|
108
|
-
}
|
|
109
|
-
this.colorFieldElement.value = this.formatTextField(newColor);
|
|
110
|
-
this.swatchElement.color = this._rgbaColor;
|
|
111
|
-
this._previousColor = this._rgbaColor;
|
|
112
|
-
this.color = this._rgbaColor;
|
|
113
|
-
this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
|
|
61
|
+
handleHueSliderChange(r) {
|
|
62
|
+
r.stopPropagation(), r.preventDefault();
|
|
63
|
+
const o = new a(this._rgbColor).toHsl();
|
|
64
|
+
o.h = this.hueSliderElement.value;
|
|
65
|
+
const e = new a(o);
|
|
66
|
+
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 }));
|
|
114
67
|
}
|
|
115
|
-
handleOpacitySliderChange(
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
this.
|
|
119
|
-
const newColor = new TinyColor(this._rgbColor).setAlpha(this._alpha);
|
|
120
|
-
this._rgbaColor = newColor.toRgbString();
|
|
121
|
-
this.colorFieldElement.value = this.formatTextField(newColor);
|
|
122
|
-
this.swatchElement.color = this._rgbaColor;
|
|
123
|
-
this._previousColor = this._rgbaColor;
|
|
124
|
-
this.color = this._rgbaColor;
|
|
125
|
-
this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
|
|
68
|
+
handleOpacitySliderChange(r) {
|
|
69
|
+
r.stopPropagation(), r.preventDefault(), this._alpha = this.opacitySliderElement.sliderHandlePosition / 100;
|
|
70
|
+
const o = new a(this._rgbColor).setAlpha(this._alpha);
|
|
71
|
+
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 }));
|
|
126
72
|
}
|
|
127
|
-
handleFieldChange(
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
const color = new TinyColor(this.colorFieldElement.value);
|
|
132
|
-
this._format = color.format;
|
|
133
|
-
this._rgbaColor = color.toRgbString();
|
|
134
|
-
this._alpha = color.getAlpha();
|
|
135
|
-
this._rgbColor = color.setAlpha(1).toRgbString();
|
|
136
|
-
if (this.noAlphaChannel) {
|
|
137
|
-
this._rgbaColor = this._rgbColor;
|
|
138
|
-
this._alpha = 1;
|
|
139
|
-
}
|
|
140
|
-
this.hueSliderElement.color = this._rgbColor;
|
|
141
|
-
this.areaElement.color = this._rgbColor;
|
|
142
|
-
if (!this.noAlphaChannel) {
|
|
143
|
-
this.opacitySliderElement.color = this._rgbaColor;
|
|
144
|
-
}
|
|
145
|
-
this.swatchElement.color = this._rgbaColor;
|
|
146
|
-
this._previousColor = this._rgbaColor;
|
|
147
|
-
this.color = this._rgbaColor;
|
|
148
|
-
this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
|
|
73
|
+
handleFieldChange(r) {
|
|
74
|
+
if (r.stopPropagation(), r.preventDefault(), this.colorFieldElement.checkValidity()) {
|
|
75
|
+
const o = new a(this.colorFieldElement.value);
|
|
76
|
+
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 }));
|
|
149
77
|
}
|
|
150
78
|
}
|
|
151
|
-
formatTextField(
|
|
152
|
-
|
|
153
|
-
return tinyColor.toHslString();
|
|
154
|
-
} else if (this._format === "hex") {
|
|
155
|
-
return this.noAlphaChannel ? tinyColor.toHexString() : tinyColor.toHex8String();
|
|
156
|
-
} else if (this._format === "name") {
|
|
157
|
-
this._format = "rgb";
|
|
158
|
-
}
|
|
159
|
-
return tinyColor.toRgbString();
|
|
79
|
+
formatTextField(r) {
|
|
80
|
+
return this._format === "hsl" ? r.toHslString() : this._format === "hex" ? this.noAlphaChannel ? r.toHexString() : r.toHex8String() : (this._format === "name" && (this._format = "rgb"), r.toRgbString());
|
|
160
81
|
}
|
|
161
82
|
cycleFormat() {
|
|
162
|
-
const
|
|
163
|
-
this._format =
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
this.colorFieldElement.value = colorString;
|
|
83
|
+
const r = ["rgb", "hsl", "hex"];
|
|
84
|
+
this._format = r[(r.indexOf(this._format) + 1) % r.length];
|
|
85
|
+
const o = new a(this.color), e = this.formatTextField(o);
|
|
86
|
+
this.colorFieldElement.value = e;
|
|
167
87
|
}
|
|
168
|
-
updated(
|
|
169
|
-
if (
|
|
88
|
+
updated(r) {
|
|
89
|
+
if (r.has("color") && this.color !== this._previousColor) {
|
|
170
90
|
this._previousColor = this.color;
|
|
171
|
-
const
|
|
172
|
-
this._alpha =
|
|
173
|
-
this._rgbColor = color.setAlpha(1).toRgbString();
|
|
174
|
-
this._rgbaColor = color.setAlpha(this._alpha).toRgbString();
|
|
175
|
-
this.areaElement.color = this._rgbColor;
|
|
176
|
-
this.hueSliderElement.color = this._rgbColor;
|
|
177
|
-
this.colorFieldElement.value = this._rgbaColor;
|
|
178
|
-
if (!this.noAlphaChannel) {
|
|
179
|
-
this.opacitySliderElement.color = this._rgbaColor;
|
|
180
|
-
}
|
|
181
|
-
this.swatchElement.color = this._rgbaColor;
|
|
182
|
-
this._format = "rgb";
|
|
183
|
-
}
|
|
184
|
-
if (changedProperties.has("noAlphaChannel") && !this.noAlphaChannel) {
|
|
185
|
-
this.opacitySliderElement.color = this._rgbaColor;
|
|
91
|
+
const o = new a(this.color);
|
|
92
|
+
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";
|
|
186
93
|
}
|
|
94
|
+
r.has("noAlphaChannel") && !this.noAlphaChannel && (this.opacitySliderElement.color = this._rgbaColor);
|
|
187
95
|
}
|
|
188
96
|
renderOpacitySlider() {
|
|
189
|
-
return
|
|
97
|
+
return s`
|
|
190
98
|
<luzmo-color-slider
|
|
191
99
|
id="luzmo-opacity-slider"
|
|
192
100
|
mode="opacity"
|
|
@@ -196,8 +104,8 @@ const _LuzmoColorMenu = class _LuzmoColorMenu extends SizedMixin(Focusable) {
|
|
|
196
104
|
`;
|
|
197
105
|
}
|
|
198
106
|
render() {
|
|
199
|
-
var
|
|
200
|
-
return
|
|
107
|
+
var r;
|
|
108
|
+
return s`
|
|
201
109
|
<div id="color-menu" tabindex="0">
|
|
202
110
|
<luzmo-color-area
|
|
203
111
|
.size=${this.size}
|
|
@@ -235,20 +143,20 @@ const _LuzmoColorMenu = class _LuzmoColorMenu extends SizedMixin(Focusable) {
|
|
|
235
143
|
>
|
|
236
144
|
<div class="format-label">${this._format}</div>
|
|
237
145
|
<div class="change-format-icon">
|
|
238
|
-
<div class="angle-icon">${
|
|
239
|
-
<div class="angle-icon">${
|
|
146
|
+
<div class="angle-icon">${p(z)}</div>
|
|
147
|
+
<div class="angle-icon">${p(f)}</div>
|
|
240
148
|
</div>
|
|
241
149
|
</button>
|
|
242
150
|
</div>
|
|
243
|
-
${((
|
|
151
|
+
${((r = this.swatches) == null ? void 0 : r.length) > 0 ? s`
|
|
244
152
|
<luzmo-divider></luzmo-divider>
|
|
245
153
|
<div class="swatches-container">
|
|
246
154
|
${this.swatches.map(
|
|
247
|
-
(
|
|
155
|
+
(o) => s`
|
|
248
156
|
<div class="swatch-choice">
|
|
249
157
|
<luzmo-swatch
|
|
250
158
|
@click=${this.setColor}
|
|
251
|
-
.color=${
|
|
159
|
+
.color=${o}
|
|
252
160
|
.size=${this.size}
|
|
253
161
|
readonly
|
|
254
162
|
>
|
|
@@ -263,38 +171,36 @@ const _LuzmoColorMenu = class _LuzmoColorMenu extends SizedMixin(Focusable) {
|
|
|
263
171
|
`;
|
|
264
172
|
}
|
|
265
173
|
};
|
|
266
|
-
|
|
267
|
-
let
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
],
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
],
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
],
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
],
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
],
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
],
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
],
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
],
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
],
|
|
295
|
-
|
|
296
|
-
customElements.define("luzmo-color-menu", LuzmoColorMenu);
|
|
297
|
-
}
|
|
174
|
+
u.styles = v(C);
|
|
175
|
+
let l = u;
|
|
176
|
+
t([
|
|
177
|
+
h({ type: String, reflect: !0 })
|
|
178
|
+
], l.prototype, "color");
|
|
179
|
+
t([
|
|
180
|
+
h({ type: Boolean, reflect: !0, attribute: "no-alpha-channel" })
|
|
181
|
+
], l.prototype, "noAlphaChannel");
|
|
182
|
+
t([
|
|
183
|
+
h({ type: Array, reflect: !0 })
|
|
184
|
+
], l.prototype, "swatches");
|
|
185
|
+
t([
|
|
186
|
+
n("luzmo-color-area")
|
|
187
|
+
], l.prototype, "areaElement");
|
|
188
|
+
t([
|
|
189
|
+
n("#luzmo-hue-slider")
|
|
190
|
+
], l.prototype, "hueSliderElement");
|
|
191
|
+
t([
|
|
192
|
+
n("#luzmo-opacity-slider")
|
|
193
|
+
], l.prototype, "opacitySliderElement");
|
|
194
|
+
t([
|
|
195
|
+
n("luzmo-color-field")
|
|
196
|
+
], l.prototype, "colorFieldElement");
|
|
197
|
+
t([
|
|
198
|
+
n("luzmo-swatch")
|
|
199
|
+
], l.prototype, "swatchElement");
|
|
200
|
+
t([
|
|
201
|
+
b()
|
|
202
|
+
], l.prototype, "_format");
|
|
203
|
+
customElements.get("luzmo-color-menu") || customElements.define("luzmo-color-menu", l);
|
|
298
204
|
export {
|
|
299
|
-
LuzmoColorMenu
|
|
205
|
+
l as LuzmoColorMenu
|
|
300
206
|
};
|
|
@@ -15,92 +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 lit = require("lit");
|
|
21
|
-
const decorators_js = require("lit/decorators.js");
|
|
22
|
-
const focusable = require("../focusable-BPrTcZPd.cjs");
|
|
23
|
-
const sizedMixin = require("../sized-mixin-UaTVa-AE.cjs");
|
|
24
|
-
const styles = ":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}";
|
|
25
|
-
var __defProp = Object.defineProperty;
|
|
26
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
27
|
-
var result = void 0;
|
|
28
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
29
|
-
if (decorator = decorators[i])
|
|
30
|
-
result = decorator(target, key, result) || result;
|
|
31
|
-
if (result) __defProp(target, key, result);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
const _LuzmoColorPalette = class _LuzmoColorPalette extends sizedMixin.SizedMixin(focusable.Focusable, {
|
|
35
|
-
validSizes: ["s", "m", "l", "xl"],
|
|
36
|
-
noDefaultSize: true
|
|
37
|
-
}) {
|
|
38
|
-
constructor() {
|
|
39
|
-
super(...arguments);
|
|
40
|
-
this.disabled = false;
|
|
41
|
-
this.focused = false;
|
|
42
|
-
this.selected = false;
|
|
43
|
-
this.active = false;
|
|
44
|
-
this.reverse = false;
|
|
45
|
-
this.horizontal = false;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* @internal
|
|
49
|
-
*/
|
|
50
|
-
get focusElement() {
|
|
51
|
-
return this;
|
|
52
|
-
}
|
|
53
|
-
render() {
|
|
54
|
-
var _a;
|
|
55
|
-
const renderColors = (_a = this.colors) == null ? void 0 : _a.map((color) => {
|
|
56
|
-
return lit.html`<div class="color" style="background-color: ${color}"></div>`;
|
|
57
|
-
});
|
|
58
|
-
return lit.html` <div id="palette">${renderColors}</div> `;
|
|
59
|
-
}
|
|
60
|
-
firstUpdated(changedProperties) {
|
|
61
|
-
super.firstUpdated(changedProperties);
|
|
62
|
-
}
|
|
63
|
-
updated(changes) {
|
|
64
|
-
super.updated(changes);
|
|
65
|
-
if (changes.has("selected")) {
|
|
66
|
-
this.setAttribute("tabindex", this.selected ? "0" : "-1");
|
|
67
|
-
}
|
|
68
|
-
if (changes.has("disabled")) {
|
|
69
|
-
if (this.disabled) {
|
|
70
|
-
this.setAttribute("aria-disabled", "true");
|
|
71
|
-
} else {
|
|
72
|
-
this.removeAttribute("aria-disabled");
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
_LuzmoColorPalette.styles = lit.unsafeCSS(styles);
|
|
78
|
-
let LuzmoColorPalette = _LuzmoColorPalette;
|
|
79
|
-
__decorateClass([
|
|
80
|
-
decorators_js.property({ type: Boolean, reflect: true })
|
|
81
|
-
], LuzmoColorPalette.prototype, "disabled");
|
|
82
|
-
__decorateClass([
|
|
83
|
-
decorators_js.property({ type: Boolean, reflect: true })
|
|
84
|
-
], LuzmoColorPalette.prototype, "focused");
|
|
85
|
-
__decorateClass([
|
|
86
|
-
decorators_js.property({ type: Boolean, reflect: true })
|
|
87
|
-
], LuzmoColorPalette.prototype, "selected");
|
|
88
|
-
__decorateClass([
|
|
89
|
-
decorators_js.property({ type: Boolean, reflect: true })
|
|
90
|
-
], LuzmoColorPalette.prototype, "active");
|
|
91
|
-
__decorateClass([
|
|
92
|
-
decorators_js.property({ type: String, reflect: true })
|
|
93
|
-
], LuzmoColorPalette.prototype, "value");
|
|
94
|
-
__decorateClass([
|
|
95
|
-
decorators_js.property({ type: Array, reflect: true })
|
|
96
|
-
], LuzmoColorPalette.prototype, "colors");
|
|
97
|
-
__decorateClass([
|
|
98
|
-
decorators_js.property({ type: Boolean, reflect: true })
|
|
99
|
-
], LuzmoColorPalette.prototype, "reverse");
|
|
100
|
-
__decorateClass([
|
|
101
|
-
decorators_js.property({ type: Boolean, reflect: true })
|
|
102
|
-
], LuzmoColorPalette.prototype, "horizontal");
|
|
103
|
-
if (!customElements.get("luzmo-color-palette")) {
|
|
104
|
-
customElements.define("luzmo-color-palette", LuzmoColorPalette);
|
|
105
|
-
}
|
|
106
|
-
exports.LuzmoColorPalette = LuzmoColorPalette;
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../base-Cy0MQrPT.cjs"),u=require("../focusable-B_KwfEec.cjs"),n=require("../sized-mixin-WPHH0a_D.cjs"),h=":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 b=Object.defineProperty,t=(i,e,a,s)=>{for(var l=void 0,d=i.length-1,p;d>=0;d--)(p=i[d])&&(l=p(e,a,l)||l);return l&&b(e,a,l),l};const c=class c extends n.SizedMixin(u.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 e=(a=this.colors)==null?void 0:a.map(s=>r.x`<div class="color" style="background-color: ${s}"></div>`);return r.x` <div id="palette">${e}</div> `}firstUpdated(e){super.firstUpdated(e)}updated(e){super.updated(e),e.has("selected")&&this.setAttribute("tabindex",this.selected?"0":"-1"),e.has("disabled")&&(this.disabled?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled"))}};c.styles=r.r(h);let o=c;t([r.n({type:Boolean,reflect:!0})],o.prototype,"disabled");t([r.n({type:Boolean,reflect:!0})],o.prototype,"focused");t([r.n({type:Boolean,reflect:!0})],o.prototype,"selected");t([r.n({type:Boolean,reflect:!0})],o.prototype,"active");t([r.n({type:String,reflect:!0})],o.prototype,"value");t([r.n({type:Array,reflect:!0})],o.prototype,"colors");t([r.n({type:Boolean,reflect:!0})],o.prototype,"reverse");t([r.n({type:Boolean,reflect:!0})],o.prototype,"horizontal");customElements.get("luzmo-color-palette")||customElements.define("luzmo-color-palette",o);exports.LuzmoColorPalette=o;
|