@vonage/vivid 5.3.0 → 5.5.0
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/accordion-item/definition.js +1 -1
- package/alert/definition.cjs +1 -1
- package/alert/definition.js +2 -2
- package/badge/definition.js +1 -1
- package/banner/definition.js +1 -1
- package/bundled/base-color-picker.cjs +18 -13
- package/bundled/base-color-picker.js +98 -81
- package/bundled/calendar-picker.template.cjs +7 -7
- package/bundled/calendar-picker.template.js +102 -102
- package/bundled/char-count.cjs +1 -1
- package/bundled/char-count.js +1 -1
- package/bundled/definition10.cjs +1 -1
- package/bundled/definition10.js +2 -2
- package/bundled/definition11.cjs +12 -19
- package/bundled/definition11.js +87 -66
- package/bundled/definition12.cjs +19 -10
- package/bundled/definition12.js +217 -36
- package/bundled/definition13.cjs +10 -1
- package/bundled/definition13.js +38 -14
- package/bundled/definition14.cjs +1 -5
- package/bundled/definition14.js +15 -24
- package/bundled/definition15.cjs +5 -30
- package/bundled/definition15.js +22 -73
- package/bundled/definition16.cjs +30 -19
- package/bundled/definition16.js +74 -97
- package/bundled/definition17.cjs +19 -13
- package/bundled/definition17.js +83 -117
- package/bundled/definition18.cjs +13 -12
- package/bundled/definition18.js +114 -71
- package/bundled/definition19.cjs +26 -27
- package/bundled/definition19.js +171 -180
- package/bundled/definition2.cjs +9 -9
- package/bundled/definition2.js +84 -129
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -1
- package/bundled/definition6.cjs +3 -3
- package/bundled/definition6.js +19 -19
- package/bundled/definition9.cjs +5 -5
- package/bundled/definition9.js +394 -392
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +82 -102
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +48 -31
- package/bundled/mixins.cjs +1 -1
- package/bundled/mixins.js +1 -1
- package/bundled/picker-field.template.cjs +14 -14
- package/bundled/picker-field.template.js +35 -56
- package/bundled/time-selection-picker.template.cjs +12 -12
- package/bundled/time-selection-picker.template.js +13 -12
- package/bundled/trapped-focus.cjs +1 -0
- package/bundled/trapped-focus.js +26 -0
- package/bundled/vivid-element.cjs +5 -1
- package/bundled/vivid-element.js +401 -358
- package/calendar/index.cjs +13 -13
- package/calendar/index.js +171 -143
- package/card/definition.cjs +1 -1
- package/card/definition.js +1 -1
- package/color-picker/definition.cjs +209 -113
- package/color-picker/definition.js +209 -113
- package/color-picker/index.cjs +104 -75
- package/color-picker/index.js +412 -326
- package/combobox/definition.cjs +7 -27
- package/combobox/definition.js +8 -28
- package/combobox/index.cjs +6 -6
- package/combobox/index.js +57 -71
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +1 -1
- package/custom-elements.json +354 -2
- package/data-grid/index.cjs +1 -1
- package/data-grid/index.js +1 -1
- package/date-picker/definition.cjs +1 -1
- package/date-picker/definition.js +1 -1
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +2 -2
- package/date-range-picker/definition.cjs +1 -1
- package/date-range-picker/definition.js +1 -1
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +2 -2
- package/date-time-picker/definition.cjs +1 -1
- package/date-time-picker/definition.js +1 -1
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +2 -2
- package/dial-pad/definition.cjs +139 -0
- package/dial-pad/definition.js +139 -0
- package/dial-pad/index.cjs +27 -20
- package/dial-pad/index.js +177 -100
- package/dialog/definition.cjs +2 -2
- package/dialog/definition.js +2 -2
- package/dialog/index.cjs +7 -7
- package/dialog/index.js +6 -6
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/elevation/definition.cjs +1 -1
- package/elevation/definition.js +1 -1
- package/fab/definition.js +1 -1
- package/header/definition.cjs +1 -1
- package/header/definition.js +1 -1
- package/icon/definition.cjs +56 -22
- package/icon/definition.js +56 -22
- package/index.cjs +3 -4
- package/index.js +2 -3
- package/lib/accordion/accordion.d.ts +1 -1
- package/lib/accordion/definition.d.ts +1 -1
- package/lib/audio-player/audio-player.d.ts +1 -1
- package/lib/color-picker/color-picker.d.ts +390 -12
- package/lib/color-picker/locale.d.ts +4 -0
- package/lib/combobox/combobox.d.ts +1 -0
- package/lib/combobox/combobox.options.d.ts +1 -1
- package/lib/date-picker/date-picker.d.ts +38 -38
- package/lib/date-range-picker/date-range-picker.d.ts +20 -20
- package/lib/date-time-picker/date-time-picker.d.ts +40 -40
- package/lib/dial-pad/dial-pad.d.ts +1 -0
- package/lib/divider/divider.d.ts +1 -1
- package/lib/icon/icon.d.ts +1 -0
- package/lib/menu-item/menu-item-role.d.ts +1 -1
- package/lib/popup/popup.d.ts +1 -1
- package/lib/searchable-select/locale.d.ts +4 -0
- package/lib/searchable-select/searchable-select.d.ts +3 -0
- package/lib/select/select.d.ts +3 -1
- package/lib/simple-color-picker/simple-color-picker.d.ts +2 -1
- package/lib/slider/slider.d.ts +1 -1
- package/lib/tabs/tabs.d.ts +2 -2
- package/lib/text-area/text-area.d.ts +1 -1
- package/lib/text-field/text-field.d.ts +1 -1
- package/lib/time-picker/time-picker.d.ts +20 -20
- package/locales/de-DE.cjs +20 -3
- package/locales/de-DE.js +20 -3
- package/locales/en-GB.cjs +21 -4
- package/locales/en-GB.js +21 -4
- package/locales/en-US.cjs +21 -4
- package/locales/en-US.js +21 -4
- package/locales/ja-JP.cjs +20 -3
- package/locales/ja-JP.js +20 -3
- package/locales/zh-CN.cjs +19 -2
- package/locales/zh-CN.js +19 -2
- package/menu/definition.cjs +4 -4
- package/menu/definition.js +4 -4
- package/nav-disclosure/definition.js +1 -1
- package/nav-item/definition.js +1 -1
- package/note/definition.js +1 -1
- package/number-field/definition.js +1 -1
- package/number-field/index.cjs +1 -1
- package/number-field/index.js +3 -3
- package/option/definition.cjs +6 -77
- package/option/definition.js +3 -78
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +31 -5
- package/popup/definition.cjs +2 -2
- package/popup/definition.js +2 -2
- package/progress-ring/index.cjs +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.cjs +1 -1
- package/radio-group/index.js +1 -1
- package/range-slider/definition.cjs +1 -1
- package/range-slider/definition.js +1 -1
- package/rich-text-editor/definition.cjs +2 -3
- package/rich-text-editor/definition.js +1 -2
- package/rich-text-editor/index.cjs +27 -27
- package/rich-text-editor/index.js +1209 -1199
- package/searchable-select/definition.cjs +103 -11
- package/searchable-select/definition.js +103 -11
- package/searchable-select/index.cjs +81 -69
- package/searchable-select/index.js +359 -273
- package/select/definition.cjs +30 -44
- package/select/definition.js +30 -44
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +1 -1
- package/selectable-box/index.cjs +1 -1
- package/selectable-box/index.js +2 -2
- package/shared/aria/aria-mixin.d.ts +1 -1
- package/shared/color-picker/base-color-picker.d.ts +2 -1
- package/shared/foundation/listbox/listbox.d.ts +4 -0
- package/shared/picker-field/mixins/calendar-picker.d.ts +10 -10
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +10 -10
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +20 -20
- package/shared/picker-field/mixins/single-date-picker.d.ts +28 -28
- package/shared/picker-field/mixins/single-value-picker.d.ts +8 -8
- package/shared/picker-field/mixins/time-selection-picker.d.ts +20 -20
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +20 -20
- package/simple-color-picker/definition.cjs +9 -7
- package/simple-color-picker/definition.js +9 -7
- package/simple-color-picker/index.cjs +6 -6
- package/simple-color-picker/index.js +41 -39
- package/slider/definition.cjs +1 -1
- package/slider/definition.js +1 -1
- package/split-button/definition.js +1 -1
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/tab/definition.js +1 -1
- package/tag/definition.cjs +34 -14
- package/tag/definition.js +35 -15
- package/tag/index.cjs +25 -12
- package/tag/index.js +64 -47
- package/tag-group/definition.cjs +1 -2
- package/tag-group/definition.js +1 -2
- package/tag-group/index.cjs +1 -1
- package/tag-group/index.js +11 -12
- package/text-area/index.cjs +1 -1
- package/text-area/index.js +2 -2
- package/text-field/definition.js +1 -1
- package/time-picker/definition.cjs +1 -1
- package/time-picker/definition.js +1 -1
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +1 -1
- package/toggletip/definition.cjs +1 -1
- package/toggletip/definition.js +1 -1
- package/toggletip/index.cjs +1 -1
- package/toggletip/index.js +1 -1
- package/tooltip/definition.cjs +3 -3
- package/tooltip/definition.js +3 -3
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/tree-item/definition.cjs +1 -1
- package/tree-item/definition.js +1 -1
- package/tree-view/definition.cjs +1 -1
- package/tree-view/definition.js +1 -1
- package/unbundled/affix.js +1 -1
- package/unbundled/base-color-picker.cjs +36 -18
- package/unbundled/base-color-picker.js +36 -18
- package/unbundled/calendar-picker.template.cjs +2 -2
- package/unbundled/calendar-picker.template.js +2 -2
- package/unbundled/definition.js +1 -1
- package/unbundled/definition2.js +1 -1
- package/unbundled/definition3.cjs +222 -141
- package/unbundled/definition3.js +220 -139
- package/unbundled/definition4.cjs +145 -235
- package/unbundled/definition4.js +143 -233
- package/unbundled/definition5.cjs +269 -27
- package/unbundled/definition5.js +267 -26
- package/unbundled/definition6.cjs +56 -0
- package/unbundled/definition6.js +52 -0
- package/unbundled/listbox.cjs +41 -63
- package/unbundled/listbox.js +39 -61
- package/unbundled/picker-field.template.cjs +3 -36
- package/unbundled/picker-field.template.js +3 -35
- package/unbundled/slider.template.cjs +1 -1
- package/unbundled/slider.template.js +1 -1
- package/unbundled/time-selection-picker.template.cjs +2 -1
- package/unbundled/time-selection-picker.template.js +2 -1
- package/unbundled/trapped-focus.cjs +37 -0
- package/unbundled/trapped-focus.js +34 -0
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/definition.cjs +56 -16
- package/video-player/definition.js +56 -16
- package/video-player/index.cjs +36 -36
- package/video-player/index.js +2461 -2445
- package/visually-hidden/index.cjs +1 -1
- package/visually-hidden/index.js +1 -1
- package/vivid.api.json +285 -38
- package/bundled/_has.cjs +0 -1
- package/bundled/_has.js +0 -34
- package/bundled/option.cjs +0 -1
- package/bundled/option.js +0 -158
- package/unbundled/option.cjs +0 -217
- package/unbundled/option.js +0 -214
package/color-picker/index.js
CHANGED
|
@@ -1,133 +1,136 @@
|
|
|
1
|
-
import { V as ee, a as
|
|
2
|
-
import { P as
|
|
1
|
+
import { V as ee, a as y, o as L, n as te, h as n, c as oe, d as re } from "../bundled/vivid-element.js";
|
|
2
|
+
import { P as se, p as ae } from "../bundled/definition9.js";
|
|
3
3
|
import { I as ie, i as le } from "../bundled/definition2.js";
|
|
4
4
|
import { W as ne, f as ce } from "../bundled/mixins.js";
|
|
5
5
|
import { D as de, d as pe } from "../bundled/delegates-aria.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { W as ve } from "../bundled/with-
|
|
9
|
-
import { W as fe } from "../bundled/with-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { r as
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
6
|
+
import { h as he } from "../bundled/index.js";
|
|
7
|
+
import { B as ue, i as b } from "../bundled/base-color-picker.js";
|
|
8
|
+
import { W as ve } from "../bundled/with-contextual-help.js";
|
|
9
|
+
import { W as fe } from "../bundled/with-error-text.js";
|
|
10
|
+
import { W as be } from "../bundled/with-success-text.js";
|
|
11
|
+
import { T as me } from "../bundled/trapped-focus.js";
|
|
12
|
+
import { T as ge, t as xe } from "../bundled/definition10.js";
|
|
13
|
+
import { B as ye, b as Ce } from "../bundled/definition3.js";
|
|
14
|
+
import { T as $e, t as ke } from "../bundled/definition11.js";
|
|
15
|
+
import { r as v } from "../bundled/ref.js";
|
|
16
|
+
import { w as E } from "../bundled/when.js";
|
|
17
|
+
import { s as F } from "../bundled/slotted.js";
|
|
18
|
+
import { r as we } from "../bundled/repeat.js";
|
|
19
|
+
import { c as N } from "../bundled/class-names.js";
|
|
20
|
+
const _e = ".palette{display:grid;grid-template-columns:repeat(var(--swatches-per-row, 7),var(--_color-swatch-size, 24px))}.swatch{position:relative;padding:0;border-radius:4px;background-color:var(--swatch-color);block-size:var(--_color-swatch-size, 24px);color:var(--vvd-color-canvas);cursor:pointer;inline-size:var(--_color-swatch-size, 24px)}.swatch:not(.contrast){border:none}.swatch.contrast{border:1px solid var(--vvd-color-neutral-400);color:var(--vvd-color-canvas-text)}.swatch:focus-visible{outline:none;box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px));--focus-stroke-gap-color: transparent;--focus-inset: -3px}:host{display:inline-block;--_low-ink-color: var(--vvd-color-neutral-600)}.base{display:inline-block;min-inline-size:var(--_color-picker-min-inline-size, 280px)}.control{inline-size:100%}.button{display:inline-flex;box-sizing:border-box;align-items:center;border:0 none;border-radius:4px;margin:0;background-color:var(--button-color, var(--vvd-color-canvas-text));block-size:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2)));color:var(--vvd-color-canvas);inline-size:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2)));padding-inline:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2))/4);text-decoration:none;vertical-align:middle}.button.contrast{color:var(--vvd-color-canvas-text)}.button:not(.disabled){cursor:pointer}.button.disabled{background-color:var(--vvd-color-neutral-300);color:var(--vvd-color-neutral-500);cursor:not-allowed}.button:focus-visible{--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}.button [data-vvd-component=icon]{font-size:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2))/2);line-height:1}.dialog{display:flex;flex-direction:column;min-inline-size:var(--_color-picker-popup-min-inline-size, 264px)}.dialog .header{display:inline-flex;align-items:center;justify-content:space-between;padding-block:8px;padding-inline:16px}.dialog .header-title{font:var(--vvd-typography-base-extended-bold);margin-block:0}.dialog .body{display:flex;flex-direction:column;gap:16px;margin-block-end:16px;padding-inline:16px}.dialog .hex-input-wrapper{display:flex;align-items:stretch;gap:8px}.dialog .hex-input-wrapper [data-vvd-component=button]{flex:0 0 auto}.dialog .footer{padding:16px;border-top:1px solid var(--vvd-color-neutral-200)}.dialog .footer-header{margin-block-end:8px}.dialog .swatches-count{color:var(--_low-ink-color);font:var(--vvd-typography-base)}.dialog .palette{gap:var(--_color-swatches-gap, 8px)}vvd-hex-input{min-width:0;flex:1 1 auto}vvd-hex-input::part(input),vvd-hex-input>input{width:100%;height:100%;box-sizing:border-box;border:0 none;border-radius:8px;background-color:var(--vvd-color-canvas);box-shadow:inset 0 0 0 1px var(--vvd-color-neutral-500);font:var(--vvd-typography-base);outline:transparent;padding-inline:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))*.4)}vvd-hex-input::part(input):focus-visible,vvd-hex-input>input:focus-visible{box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px));--focus-stroke-gap-color: transparent}vvd-hex-picker{width:auto;height:auto;gap:16px;inline-size:100%}vvd-hex-picker::part(saturation){border-radius:8px;block-size:120px}vvd-hex-picker::part(hue){flex:0 0 8px;border-radius:8px}vvd-hex-picker::part(hue-pointer){width:10px;height:10px}vvd-hex-picker::part(saturation-pointer){width:18px;height:18px}::part(popup-base){inline-size:max-content;min-block-size:var(--_color-picker-popup-min-inline-size, 264px);min-inline-size:var(--_color-picker-popup-min-inline-size, 264px)}.visually-hidden{position:absolute;overflow:hidden;width:1px;height:1px;padding:0;border:0;margin:-1px;clip:rect(0 0 0 0)}", f = (r, e = 0, o = 1) => r > o ? o : r < e ? e : r, l = (r, e = 0, o = Math.pow(10, e)) => Math.round(o * r) / o, Se = (r) => Ie(P(r)), P = (r) => (r[0] === "#" && (r = r.substring(1)), r.length < 6 ? {
|
|
21
|
+
r: parseInt(r[0] + r[0], 16),
|
|
22
|
+
g: parseInt(r[1] + r[1], 16),
|
|
23
|
+
b: parseInt(r[2] + r[2], 16),
|
|
24
|
+
a: r.length === 4 ? l(parseInt(r[3] + r[3], 16) / 255, 2) : 1
|
|
22
25
|
} : {
|
|
23
|
-
r: parseInt(
|
|
24
|
-
g: parseInt(
|
|
25
|
-
b: parseInt(
|
|
26
|
-
a:
|
|
27
|
-
}),
|
|
28
|
-
const
|
|
26
|
+
r: parseInt(r.substring(0, 2), 16),
|
|
27
|
+
g: parseInt(r.substring(2, 4), 16),
|
|
28
|
+
b: parseInt(r.substring(4, 6), 16),
|
|
29
|
+
a: r.length === 8 ? l(parseInt(r.substring(6, 8), 16) / 255, 2) : 1
|
|
30
|
+
}), Ee = (r) => He(Te(r)), Pe = ({ h: r, s: e, v: o, a: t }) => {
|
|
31
|
+
const s = (200 - e) * o / 100;
|
|
29
32
|
return {
|
|
30
|
-
h: l(
|
|
31
|
-
s: l(
|
|
32
|
-
l: l(
|
|
33
|
-
a: l(
|
|
33
|
+
h: l(r),
|
|
34
|
+
s: l(s > 0 && s < 200 ? e * o / 100 / (s <= 100 ? s : 200 - s) * 100 : 0),
|
|
35
|
+
l: l(s / 2),
|
|
36
|
+
a: l(t, 2)
|
|
34
37
|
};
|
|
35
|
-
},
|
|
36
|
-
const { h: e, s:
|
|
37
|
-
return `hsl(${e}, ${
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
const
|
|
38
|
+
}, T = (r) => {
|
|
39
|
+
const { h: e, s: o, l: t } = Pe(r);
|
|
40
|
+
return `hsl(${e}, ${o}%, ${t}%)`;
|
|
41
|
+
}, Te = ({ h: r, s: e, v: o, a: t }) => {
|
|
42
|
+
r = r / 360 * 6, e = e / 100, o = o / 100;
|
|
43
|
+
const s = Math.floor(r), i = o * (1 - e), a = o * (1 - (r - s) * e), d = o * (1 - (1 - r + s) * e), C = s % 6;
|
|
41
44
|
return {
|
|
42
|
-
r: l([
|
|
43
|
-
g: l([
|
|
44
|
-
b: l([
|
|
45
|
-
a: l(
|
|
45
|
+
r: l([o, a, i, i, d, o][C] * 255),
|
|
46
|
+
g: l([d, o, o, a, i, i][C] * 255),
|
|
47
|
+
b: l([i, i, d, o, o, a][C] * 255),
|
|
48
|
+
a: l(t, 2)
|
|
46
49
|
};
|
|
47
|
-
},
|
|
48
|
-
const e =
|
|
50
|
+
}, m = (r) => {
|
|
51
|
+
const e = r.toString(16);
|
|
49
52
|
return e.length < 2 ? "0" + e : e;
|
|
50
|
-
},
|
|
51
|
-
const
|
|
52
|
-
return "#" +
|
|
53
|
-
},
|
|
54
|
-
const
|
|
53
|
+
}, He = ({ r, g: e, b: o, a: t }) => {
|
|
54
|
+
const s = t < 1 ? m(l(t * 255)) : "";
|
|
55
|
+
return "#" + m(r) + m(e) + m(o) + s;
|
|
56
|
+
}, Ie = ({ r, g: e, b: o, a: t }) => {
|
|
57
|
+
const s = Math.max(r, e, o), i = s - Math.min(r, e, o), a = i ? s === r ? (e - o) / i : s === e ? 2 + (o - r) / i : 4 + (r - e) / i : 0;
|
|
55
58
|
return {
|
|
56
|
-
h: l(60 * (
|
|
57
|
-
s: l(
|
|
58
|
-
v: l(
|
|
59
|
-
a:
|
|
59
|
+
h: l(60 * (a < 0 ? a + 6 : a)),
|
|
60
|
+
s: l(s ? i / s * 100 : 0),
|
|
61
|
+
v: l(s / 255 * 100),
|
|
62
|
+
a: t
|
|
60
63
|
};
|
|
61
|
-
}, U = (
|
|
62
|
-
if (
|
|
64
|
+
}, U = (r, e) => {
|
|
65
|
+
if (r === e)
|
|
63
66
|
return !0;
|
|
64
|
-
for (const
|
|
65
|
-
if (o
|
|
67
|
+
for (const o in r)
|
|
68
|
+
if (r[o] !== e[o])
|
|
66
69
|
return !1;
|
|
67
70
|
return !0;
|
|
68
|
-
},
|
|
69
|
-
let e =
|
|
70
|
-
return e || (e = document.createElement("template"), e.innerHTML =
|
|
71
|
-
},
|
|
72
|
-
|
|
71
|
+
}, ze = (r, e) => r.toLowerCase() === e.toLowerCase() ? !0 : U(P(r), P(e)), D = {}, A = (r) => {
|
|
72
|
+
let e = D[r];
|
|
73
|
+
return e || (e = document.createElement("template"), e.innerHTML = r, D[r] = e), e;
|
|
74
|
+
}, M = (r, e, o) => {
|
|
75
|
+
r.dispatchEvent(new CustomEvent(e, {
|
|
73
76
|
bubbles: !0,
|
|
74
|
-
detail:
|
|
77
|
+
detail: o
|
|
75
78
|
}));
|
|
76
79
|
};
|
|
77
|
-
let
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
x:
|
|
82
|
-
y:
|
|
80
|
+
let h = !1;
|
|
81
|
+
const H = (r) => "touches" in r, Le = (r) => h && !H(r) ? !1 : (h || (h = H(r)), !0), B = (r, e) => {
|
|
82
|
+
const o = H(e) ? e.touches[0] : e, t = r.el.getBoundingClientRect();
|
|
83
|
+
M(r.el, "move", r.getMove({
|
|
84
|
+
x: f((o.pageX - (t.left + window.pageXOffset)) / t.width),
|
|
85
|
+
y: f((o.pageY - (t.top + window.pageYOffset)) / t.height)
|
|
83
86
|
}));
|
|
84
|
-
},
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
x:
|
|
88
|
-
y:
|
|
87
|
+
}, Ae = (r, e) => {
|
|
88
|
+
const o = e.keyCode;
|
|
89
|
+
o > 40 || r.xy && o < 37 || o < 33 || (e.preventDefault(), M(r.el, "move", r.getMove({
|
|
90
|
+
x: o === 39 ? 0.01 : o === 37 ? -0.01 : o === 34 ? 0.05 : o === 33 ? -0.05 : o === 35 ? 1 : o === 36 ? -1 : 0,
|
|
91
|
+
y: o === 40 ? 0.01 : o === 38 ? -0.01 : 0
|
|
89
92
|
}, !0)));
|
|
90
93
|
};
|
|
91
94
|
class Y {
|
|
92
|
-
constructor(e, t, s
|
|
93
|
-
const
|
|
94
|
-
e.appendChild(
|
|
95
|
-
const
|
|
96
|
-
|
|
95
|
+
constructor(e, o, t, s) {
|
|
96
|
+
const i = A(`<div role="slider" tabindex="0" part="${o}" ${t}><div part="${o}-pointer"></div></div>`);
|
|
97
|
+
e.appendChild(i.content.cloneNode(!0));
|
|
98
|
+
const a = e.querySelector(`[part=${o}]`);
|
|
99
|
+
a.addEventListener("mousedown", this), a.addEventListener("touchstart", this), a.addEventListener("keydown", this), this.el = a, this.xy = s, this.nodes = [a.firstChild, a];
|
|
97
100
|
}
|
|
98
101
|
set dragging(e) {
|
|
99
|
-
const
|
|
100
|
-
|
|
102
|
+
const o = e ? document.addEventListener : document.removeEventListener;
|
|
103
|
+
o(h ? "touchmove" : "mousemove", this), o(h ? "touchend" : "mouseup", this);
|
|
101
104
|
}
|
|
102
105
|
handleEvent(e) {
|
|
103
106
|
switch (e.type) {
|
|
104
107
|
case "mousedown":
|
|
105
108
|
case "touchstart":
|
|
106
|
-
if (e.preventDefault(), !
|
|
109
|
+
if (e.preventDefault(), !Le(e) || !h && e.button != 0)
|
|
107
110
|
return;
|
|
108
|
-
this.el.focus(),
|
|
111
|
+
this.el.focus(), B(this, e), this.dragging = !0;
|
|
109
112
|
break;
|
|
110
113
|
case "mousemove":
|
|
111
114
|
case "touchmove":
|
|
112
|
-
e.preventDefault(),
|
|
115
|
+
e.preventDefault(), B(this, e);
|
|
113
116
|
break;
|
|
114
117
|
case "mouseup":
|
|
115
118
|
case "touchend":
|
|
116
119
|
this.dragging = !1;
|
|
117
120
|
break;
|
|
118
121
|
case "keydown":
|
|
119
|
-
|
|
122
|
+
Ae(this, e);
|
|
120
123
|
break;
|
|
121
124
|
}
|
|
122
125
|
}
|
|
123
126
|
style(e) {
|
|
124
|
-
e.forEach((
|
|
125
|
-
for (const
|
|
126
|
-
this.nodes[
|
|
127
|
+
e.forEach((o, t) => {
|
|
128
|
+
for (const s in o)
|
|
129
|
+
this.nodes[t].style.setProperty(s, o[s]);
|
|
127
130
|
});
|
|
128
131
|
}
|
|
129
132
|
}
|
|
130
|
-
class
|
|
133
|
+
class Me extends Y {
|
|
131
134
|
constructor(e) {
|
|
132
135
|
super(e, "hue", 'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"', !1);
|
|
133
136
|
}
|
|
@@ -135,15 +138,15 @@ class ze extends Y {
|
|
|
135
138
|
this.h = e, this.style([
|
|
136
139
|
{
|
|
137
140
|
left: `${e / 360 * 100}%`,
|
|
138
|
-
color:
|
|
141
|
+
color: T({ h: e, s: 100, v: 100, a: 1 })
|
|
139
142
|
}
|
|
140
143
|
]), this.el.setAttribute("aria-valuenow", `${l(e)}`);
|
|
141
144
|
}
|
|
142
|
-
getMove(e,
|
|
143
|
-
return { h:
|
|
145
|
+
getMove(e, o) {
|
|
146
|
+
return { h: o ? f(this.h + e.x * 360, 0, 360) : 360 * e.x };
|
|
144
147
|
}
|
|
145
148
|
}
|
|
146
|
-
class
|
|
149
|
+
class Fe extends Y {
|
|
147
150
|
constructor(e) {
|
|
148
151
|
super(e, "saturation", 'aria-label="Color"', !0);
|
|
149
152
|
}
|
|
@@ -152,44 +155,44 @@ class Ie extends Y {
|
|
|
152
155
|
{
|
|
153
156
|
top: `${100 - e.v}%`,
|
|
154
157
|
left: `${e.s}%`,
|
|
155
|
-
color:
|
|
158
|
+
color: T(e)
|
|
156
159
|
},
|
|
157
160
|
{
|
|
158
|
-
"background-color":
|
|
161
|
+
"background-color": T({ h: e.h, s: 100, v: 100, a: 1 })
|
|
159
162
|
}
|
|
160
163
|
]), this.el.setAttribute("aria-valuetext", `Saturation ${l(e.s)}%, Brightness ${l(e.v)}%`);
|
|
161
164
|
}
|
|
162
|
-
getMove(e,
|
|
165
|
+
getMove(e, o) {
|
|
163
166
|
return {
|
|
164
|
-
s:
|
|
165
|
-
v:
|
|
167
|
+
s: o ? f(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
|
|
168
|
+
v: o ? f(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
|
|
166
169
|
};
|
|
167
170
|
}
|
|
168
171
|
}
|
|
169
|
-
const
|
|
170
|
-
let
|
|
172
|
+
const Ne = ':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}', De = "[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}", Be = "[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}", g = Symbol("same"), $ = Symbol("color"), O = Symbol("hsva"), k = Symbol("update"), R = Symbol("parts"), K = Symbol("css"), V = Symbol("sliders");
|
|
173
|
+
let Oe = class extends HTMLElement {
|
|
171
174
|
static get observedAttributes() {
|
|
172
175
|
return ["color"];
|
|
173
176
|
}
|
|
174
|
-
get [
|
|
175
|
-
return [
|
|
177
|
+
get [K]() {
|
|
178
|
+
return [Ne, De, Be];
|
|
176
179
|
}
|
|
177
180
|
get [V]() {
|
|
178
|
-
return [
|
|
181
|
+
return [Fe, Me];
|
|
179
182
|
}
|
|
180
183
|
get color() {
|
|
181
184
|
return this[$];
|
|
182
185
|
}
|
|
183
186
|
set color(e) {
|
|
184
|
-
if (!this[
|
|
185
|
-
const
|
|
186
|
-
this[k](
|
|
187
|
+
if (!this[g](e)) {
|
|
188
|
+
const o = this.colorModel.toHsva(e);
|
|
189
|
+
this[k](o), this[$] = e;
|
|
187
190
|
}
|
|
188
191
|
}
|
|
189
192
|
constructor() {
|
|
190
193
|
super();
|
|
191
|
-
const e =
|
|
192
|
-
|
|
194
|
+
const e = A(`<style>${this[K].join("")}</style>`), o = this.attachShadow({ mode: "open" });
|
|
195
|
+
o.appendChild(e.content.cloneNode(!0)), o.addEventListener("move", this), this[R] = this[V].map((t) => new t(o));
|
|
193
196
|
}
|
|
194
197
|
connectedCallback() {
|
|
195
198
|
if (this.hasOwnProperty("color")) {
|
|
@@ -197,73 +200,73 @@ let Ne = class extends HTMLElement {
|
|
|
197
200
|
delete this.color, this.color = e;
|
|
198
201
|
} else this.color || (this.color = this.colorModel.defaultColor);
|
|
199
202
|
}
|
|
200
|
-
attributeChangedCallback(e,
|
|
201
|
-
const
|
|
202
|
-
this[
|
|
203
|
+
attributeChangedCallback(e, o, t) {
|
|
204
|
+
const s = this.colorModel.fromAttr(t);
|
|
205
|
+
this[g](s) || (this.color = s);
|
|
203
206
|
}
|
|
204
207
|
handleEvent(e) {
|
|
205
|
-
const
|
|
206
|
-
this[k](
|
|
207
|
-
let
|
|
208
|
-
!U(
|
|
208
|
+
const o = this[O], t = { ...o, ...e.detail };
|
|
209
|
+
this[k](t);
|
|
210
|
+
let s;
|
|
211
|
+
!U(t, o) && !this[g](s = this.colorModel.fromHsva(t)) && (this[$] = s, M(this, "color-changed", { value: s }));
|
|
209
212
|
}
|
|
210
|
-
[
|
|
213
|
+
[g](e) {
|
|
211
214
|
return this.color && this.colorModel.equal(e, this.color);
|
|
212
215
|
}
|
|
213
216
|
[k](e) {
|
|
214
|
-
this[O] = e, this[
|
|
217
|
+
this[O] = e, this[R].forEach((o) => o.update(e));
|
|
215
218
|
}
|
|
216
219
|
};
|
|
217
|
-
const
|
|
220
|
+
const Re = {
|
|
218
221
|
defaultColor: "#000",
|
|
219
|
-
toHsva:
|
|
220
|
-
fromHsva: ({ h:
|
|
221
|
-
equal:
|
|
222
|
-
fromAttr: (
|
|
222
|
+
toHsva: Se,
|
|
223
|
+
fromHsva: ({ h: r, s: e, v: o }) => Ee({ h: r, s: e, v: o, a: 1 }),
|
|
224
|
+
equal: ze,
|
|
225
|
+
fromAttr: (r) => r
|
|
223
226
|
};
|
|
224
|
-
class
|
|
227
|
+
class Ke extends Oe {
|
|
225
228
|
get colorModel() {
|
|
226
|
-
return
|
|
229
|
+
return Re;
|
|
227
230
|
}
|
|
228
231
|
}
|
|
229
|
-
class Q extends
|
|
232
|
+
class Q extends Ke {
|
|
230
233
|
}
|
|
231
234
|
customElements.define("hex-color-picker", Q);
|
|
232
|
-
const
|
|
233
|
-
const
|
|
234
|
-
return
|
|
235
|
-
|
|
236
|
-
!!e &&
|
|
237
|
-
!!e &&
|
|
238
|
-
},
|
|
239
|
-
class
|
|
235
|
+
const Ve = /^#?([0-9A-F]{3,8})$/i, w = (r, e) => {
|
|
236
|
+
const o = Ve.exec(r), t = o ? o[1].length : 0;
|
|
237
|
+
return t === 3 || // '#rgb' format
|
|
238
|
+
t === 6 || // '#rrggbb' format
|
|
239
|
+
!!e && t === 4 || // '#rgba' format
|
|
240
|
+
!!e && t === 8;
|
|
241
|
+
}, qe = A('<slot><input part="input" spellcheck="false"></slot>'), q = (r, e) => r.replace(/([^0-9A-F]+)/gi, "").substring(0, e ? 8 : 6), W = Symbol("alpha"), x = Symbol("color"), X = Symbol("saved"), _ = Symbol("input"), S = Symbol("init"), j = Symbol("prefix"), u = Symbol("update");
|
|
242
|
+
class We extends HTMLElement {
|
|
240
243
|
static get observedAttributes() {
|
|
241
244
|
return ["alpha", "color", "prefixed"];
|
|
242
245
|
}
|
|
243
246
|
get color() {
|
|
244
|
-
return this[
|
|
247
|
+
return this[x];
|
|
245
248
|
}
|
|
246
249
|
set color(e) {
|
|
247
|
-
this[
|
|
250
|
+
this[x] = e, this[u](e);
|
|
248
251
|
}
|
|
249
252
|
get alpha() {
|
|
250
|
-
return this[
|
|
253
|
+
return this[W];
|
|
251
254
|
}
|
|
252
255
|
set alpha(e) {
|
|
253
|
-
this[
|
|
254
|
-
const
|
|
255
|
-
|
|
256
|
+
this[W] = e, this.toggleAttribute("alpha", e);
|
|
257
|
+
const o = this.color;
|
|
258
|
+
o && !w(o, e) && (this.color = o.startsWith("#") ? o.substring(0, o.length === 5 ? 4 : 7) : o.substring(0, o.length === 4 ? 3 : 6));
|
|
256
259
|
}
|
|
257
260
|
get prefixed() {
|
|
258
|
-
return this[
|
|
261
|
+
return this[j];
|
|
259
262
|
}
|
|
260
263
|
set prefixed(e) {
|
|
261
|
-
this[
|
|
264
|
+
this[j] = e, this.toggleAttribute("prefixed", e), this[u](this.color);
|
|
262
265
|
}
|
|
263
266
|
constructor() {
|
|
264
267
|
super();
|
|
265
268
|
const e = this.attachShadow({ mode: "open" });
|
|
266
|
-
e.appendChild(
|
|
269
|
+
e.appendChild(qe.content.cloneNode(!0)), e.firstElementChild.addEventListener("slotchange", () => this[S](e));
|
|
267
270
|
}
|
|
268
271
|
connectedCallback() {
|
|
269
272
|
if (this[S](this.shadowRoot), this.hasOwnProperty("alpha")) {
|
|
@@ -279,80 +282,82 @@ class Ve extends HTMLElement {
|
|
|
279
282
|
if (this.hasOwnProperty("color")) {
|
|
280
283
|
const e = this.color;
|
|
281
284
|
delete this.color, this.color = e;
|
|
282
|
-
} else this.color == null ? this.color = this.getAttribute("color") || "" : this[
|
|
285
|
+
} else this.color == null ? this.color = this.getAttribute("color") || "" : this[x] && this[u](this[x]);
|
|
283
286
|
}
|
|
284
287
|
handleEvent(e) {
|
|
285
|
-
const
|
|
288
|
+
const o = e.target, { value: t } = o;
|
|
286
289
|
switch (e.type) {
|
|
287
290
|
case "input":
|
|
288
|
-
const
|
|
289
|
-
this[
|
|
291
|
+
const s = q(t, this.alpha);
|
|
292
|
+
this[X] = this.color, (w(s, this.alpha) || t === "") && (this.color = s, this.dispatchEvent(new CustomEvent("color-changed", {
|
|
290
293
|
bubbles: !0,
|
|
291
|
-
detail: { value:
|
|
294
|
+
detail: { value: s ? "#" + s : "" }
|
|
292
295
|
})));
|
|
293
296
|
break;
|
|
294
297
|
case "blur":
|
|
295
|
-
|
|
298
|
+
t && !w(t, this.alpha) && (this.color = this[X]);
|
|
296
299
|
}
|
|
297
300
|
}
|
|
298
|
-
attributeChangedCallback(e,
|
|
299
|
-
e === "color" && this.color !==
|
|
300
|
-
const
|
|
301
|
-
e === "alpha" && this.alpha !==
|
|
301
|
+
attributeChangedCallback(e, o, t) {
|
|
302
|
+
e === "color" && this.color !== t && (this.color = t);
|
|
303
|
+
const s = t != null;
|
|
304
|
+
e === "alpha" && this.alpha !== s && (this.alpha = s), e === "prefixed" && this.prefixed !== s && (this.prefixed = s);
|
|
302
305
|
}
|
|
303
306
|
[S](e) {
|
|
304
|
-
let
|
|
305
|
-
if (!
|
|
306
|
-
let
|
|
307
|
-
for (;
|
|
308
|
-
|
|
309
|
-
|
|
307
|
+
let o = this.querySelector("input");
|
|
308
|
+
if (!o) {
|
|
309
|
+
let t;
|
|
310
|
+
for (; t = this.firstChild; )
|
|
311
|
+
t.remove();
|
|
312
|
+
o = e.querySelector("input");
|
|
310
313
|
}
|
|
311
|
-
|
|
314
|
+
o.addEventListener("input", this), o.addEventListener("blur", this), this[_] = o, this[u](this.color);
|
|
312
315
|
}
|
|
313
|
-
[
|
|
316
|
+
[u](e) {
|
|
314
317
|
this[_] && (this[_].value = e == null || e == "" ? "" : (this.prefixed ? "#" : "") + q(e, this.alpha));
|
|
315
318
|
}
|
|
316
319
|
}
|
|
317
|
-
class Z extends
|
|
320
|
+
class Z extends We {
|
|
318
321
|
}
|
|
319
322
|
customElements.define("hex-input", Z);
|
|
320
|
-
var
|
|
321
|
-
for (var
|
|
322
|
-
(
|
|
323
|
-
return
|
|
323
|
+
var Xe = Object.defineProperty, p = (r, e, o, t) => {
|
|
324
|
+
for (var s = void 0, i = r.length - 1, a; i >= 0; i--)
|
|
325
|
+
(a = r[i]) && (s = a(e, o, s) || s);
|
|
326
|
+
return s && Xe(e, o, s), s;
|
|
324
327
|
};
|
|
325
|
-
const
|
|
326
|
-
class
|
|
328
|
+
const I = "vvd-hex-picker", z = "vvd-hex-input";
|
|
329
|
+
class je extends Q {
|
|
327
330
|
static {
|
|
328
331
|
this.displayName = "VvdHexPicker";
|
|
329
332
|
}
|
|
330
333
|
}
|
|
331
|
-
class
|
|
334
|
+
class Ge extends Z {
|
|
332
335
|
static {
|
|
333
336
|
this.displayName = "VvdHexInput";
|
|
334
337
|
}
|
|
335
338
|
}
|
|
336
|
-
customElements.get(
|
|
337
|
-
customElements.get(z) || customElements.define(z,
|
|
338
|
-
const
|
|
339
|
-
class c extends
|
|
339
|
+
customElements.get(I) || customElements.define(I, je);
|
|
340
|
+
customElements.get(z) || customElements.define(z, Ge);
|
|
341
|
+
const G = I, J = z;
|
|
342
|
+
class c extends ve(
|
|
340
343
|
ne(
|
|
341
|
-
|
|
344
|
+
fe(
|
|
345
|
+
be(
|
|
346
|
+
de(me(ue(ee)))
|
|
347
|
+
)
|
|
348
|
+
)
|
|
342
349
|
)
|
|
343
350
|
) {
|
|
344
351
|
constructor() {
|
|
345
|
-
super(...arguments), this.disableSavedColors = !1, this.savedColors = [], this.maxSwatches = 6, this
|
|
352
|
+
super(...arguments), this.disableSavedColors = !1, this.savedColors = [], this.maxSwatches = 6, this.#t = (e) => {
|
|
353
|
+
this._isInPath(e, this._buttonEl) || this._isInPath(e, this._popupEl) || (this.open = !1);
|
|
354
|
+
}, this.copyIconName = "copy-2-line", this.#e = null, this._copyValueToClipboard = async (e) => {
|
|
346
355
|
try {
|
|
347
|
-
await navigator.clipboard.writeText(e), this._setTemporaryCopyIcon("check-circle-line");
|
|
356
|
+
await navigator.clipboard.writeText(e), this._setTemporaryCopyIcon("check-circle-line"), this._ariaLiveDescription = this.locale.colorPicker.copySuccessMessage(e);
|
|
348
357
|
} catch {
|
|
349
|
-
alert(this.locale
|
|
358
|
+
alert(this.locale.colorPicker.copyErrorText), this._setTemporaryCopyIcon("error-line"), this._ariaLiveDescription = this.locale.colorPicker.copyErrorText;
|
|
350
359
|
}
|
|
351
|
-
}, this
|
|
352
|
-
this._isInPath(e, this._buttonEl) || this._isInPath(e, this._popupEl) || (this.open = !1);
|
|
353
|
-
}, this.#o = (e) => {
|
|
354
|
-
e.key === "Escape" && (this.open = !1);
|
|
355
|
-
};
|
|
360
|
+
}, this._ariaLiveDescription = "";
|
|
356
361
|
}
|
|
357
362
|
static {
|
|
358
363
|
this.HEX_COLOR_PATTERN = /^#(([0-9a-fA-F]{2}){3}|([0-9a-fA-F]){3})$/;
|
|
@@ -371,6 +376,14 @@ class c extends ue(
|
|
|
371
376
|
handleChange() {
|
|
372
377
|
this.$emit("change");
|
|
373
378
|
}
|
|
379
|
+
/**
|
|
380
|
+
* @internal
|
|
381
|
+
*/
|
|
382
|
+
openChanged(e, o) {
|
|
383
|
+
o && this.isConnected && requestAnimationFrame(() => {
|
|
384
|
+
this._refreshCanvasColor();
|
|
385
|
+
});
|
|
386
|
+
}
|
|
374
387
|
/**
|
|
375
388
|
* @internal
|
|
376
389
|
*/
|
|
@@ -389,6 +402,55 @@ class c extends ue(
|
|
|
389
402
|
_handleColorSaving() {
|
|
390
403
|
this._saveCurrentColor();
|
|
391
404
|
}
|
|
405
|
+
/**
|
|
406
|
+
* @internal
|
|
407
|
+
*/
|
|
408
|
+
_saveCurrentColor() {
|
|
409
|
+
const e = this.value;
|
|
410
|
+
if (typeof e != "string" || !b(e)) return;
|
|
411
|
+
const o = Array.isArray(this.savedColors) ? [...this.savedColors] : [], t = o.findIndex((s) => s?.value === e);
|
|
412
|
+
t !== -1 && o.splice(t, 1), o.unshift({ value: e }), this.savedColors = o.slice(0, this._maxSwatchesNormalized), this._setSavedColors(this.savedColors);
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* @internal
|
|
416
|
+
*/
|
|
417
|
+
_loadSavedColors() {
|
|
418
|
+
try {
|
|
419
|
+
const e = localStorage.getItem(this._savedColorsStorageKey);
|
|
420
|
+
if (!e) return [];
|
|
421
|
+
const o = JSON.parse(e);
|
|
422
|
+
return Array.isArray(o) ? o.filter(
|
|
423
|
+
(t) => t && typeof t.value == "string" && b(t.value)
|
|
424
|
+
).map((t) => ({
|
|
425
|
+
value: t.value,
|
|
426
|
+
label: typeof t.label == "string" ? t.label : void 0
|
|
427
|
+
})) : [];
|
|
428
|
+
} catch {
|
|
429
|
+
return [];
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* @internal
|
|
434
|
+
*/
|
|
435
|
+
_setSavedColors(e) {
|
|
436
|
+
try {
|
|
437
|
+
localStorage.setItem(
|
|
438
|
+
this._savedColorsStorageKey,
|
|
439
|
+
JSON.stringify(e)
|
|
440
|
+
);
|
|
441
|
+
} catch {
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Get all color swatches combined, both from swatches property and saved colors
|
|
446
|
+
* @internal
|
|
447
|
+
*/
|
|
448
|
+
get allSwatches() {
|
|
449
|
+
const e = Array.isArray(this.swatches) ? this.swatches : [], o = Array.isArray(this.savedColors) ? this.savedColors : [], t = /* @__PURE__ */ new Set(), s = [], i = (a) => {
|
|
450
|
+
!a || typeof a.value != "string" || !b(a.value) || t.has(a.value) || (t.add(a.value), s.push(a));
|
|
451
|
+
};
|
|
452
|
+
return this.disableSavedColors || o.forEach(i), e.forEach(i), s.slice(0, this._maxSwatchesNormalized);
|
|
453
|
+
}
|
|
392
454
|
/**
|
|
393
455
|
* @internal
|
|
394
456
|
*/
|
|
@@ -411,21 +473,21 @@ class c extends ue(
|
|
|
411
473
|
/**
|
|
412
474
|
* @internal
|
|
413
475
|
*/
|
|
414
|
-
valueChanged(e,
|
|
415
|
-
this._vcHexPickerEl && typeof
|
|
476
|
+
valueChanged(e, o) {
|
|
477
|
+
this._vcHexPickerEl && typeof o == "string" && (this._vcHexPickerEl.color = o), this._vcHexInputEl && typeof o == "string" && (this._vcHexInputEl.color = o);
|
|
416
478
|
}
|
|
417
479
|
/**
|
|
418
480
|
* @internal
|
|
419
481
|
*/
|
|
420
482
|
_onTextFieldInput(e) {
|
|
421
|
-
const
|
|
422
|
-
this.value =
|
|
483
|
+
const o = e.currentTarget;
|
|
484
|
+
this.value = o.value;
|
|
423
485
|
}
|
|
424
486
|
/**
|
|
425
487
|
* @internal
|
|
426
488
|
*/
|
|
427
489
|
get _buttonColor() {
|
|
428
|
-
return this._canvasColor || this._refreshCanvasColor(), this.value &&
|
|
490
|
+
return this._canvasColor || this._refreshCanvasColor(), this.value && b(this.value) ? this.value : "var(--vvd-color-canvas-text)";
|
|
429
491
|
}
|
|
430
492
|
/**
|
|
431
493
|
* @internal
|
|
@@ -442,207 +504,210 @@ class c extends ue(
|
|
|
442
504
|
/**
|
|
443
505
|
* @internal
|
|
444
506
|
*/
|
|
445
|
-
_isInPath(e,
|
|
446
|
-
if (!
|
|
447
|
-
const
|
|
448
|
-
return !!(
|
|
449
|
-
}
|
|
450
|
-
#e;
|
|
451
|
-
/**
|
|
452
|
-
* @internal
|
|
453
|
-
*/
|
|
454
|
-
_setTemporaryCopyIcon(e, t = 2e3) {
|
|
455
|
-
this.copyIconName = e, this.#e && clearTimeout(this.#e), this.#e = setTimeout(() => {
|
|
456
|
-
this.copyIconName = "copy-2-line", this.#e = null;
|
|
457
|
-
}, t);
|
|
507
|
+
_isInPath(e, o) {
|
|
508
|
+
if (!o) return !1;
|
|
509
|
+
const t = e.composedPath?.();
|
|
510
|
+
return !!(t && t.includes(o));
|
|
458
511
|
}
|
|
512
|
+
#t;
|
|
459
513
|
connectedCallback() {
|
|
460
|
-
super.connectedCallback(), this.
|
|
514
|
+
super.connectedCallback(), this.savedColors = this._loadSavedColors(), document.addEventListener("mousedown", this.#t, !0);
|
|
461
515
|
}
|
|
462
516
|
disconnectedCallback() {
|
|
463
517
|
super.disconnectedCallback(), document.removeEventListener(
|
|
464
518
|
"mousedown",
|
|
465
519
|
this.#t,
|
|
466
520
|
!0
|
|
467
|
-
)
|
|
521
|
+
);
|
|
468
522
|
}
|
|
469
|
-
#
|
|
470
|
-
#o;
|
|
523
|
+
#e;
|
|
471
524
|
/**
|
|
472
525
|
* @internal
|
|
473
526
|
*/
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
s !== -1 && t.splice(s, 1), t.unshift({ value: e }), this.savedColors = t.slice(0, this._maxSwatchesNormalized), this._setSavedColors(this.savedColors);
|
|
527
|
+
_setTemporaryCopyIcon(e, o = 2e3) {
|
|
528
|
+
this.copyIconName = e, this.#e && clearTimeout(this.#e), this.#e = setTimeout(() => {
|
|
529
|
+
this.copyIconName = "copy-2-line", this.#e = null;
|
|
530
|
+
}, o);
|
|
479
531
|
}
|
|
532
|
+
// --- Trapped focus ---
|
|
480
533
|
/**
|
|
481
534
|
* @internal
|
|
482
535
|
*/
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
const e = localStorage.getItem(this._savedColorsStorageKey);
|
|
486
|
-
if (!e) return [];
|
|
487
|
-
const t = JSON.parse(e);
|
|
488
|
-
return Array.isArray(t) ? t.filter(
|
|
489
|
-
(s) => s && typeof s.value == "string" && f(s.value)
|
|
490
|
-
).map((s) => ({
|
|
491
|
-
value: s.value,
|
|
492
|
-
label: typeof s.label == "string" ? s.label : void 0
|
|
493
|
-
})) : [];
|
|
494
|
-
} catch {
|
|
495
|
-
return [];
|
|
496
|
-
}
|
|
536
|
+
_onBaseKeydown(e) {
|
|
537
|
+
return this.open && he(e) ? (this.open = !1, !1) : !this._trappedFocus(e, () => this._focusableElsWithinDialog());
|
|
497
538
|
}
|
|
498
539
|
/**
|
|
499
540
|
* @internal
|
|
500
541
|
*/
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
542
|
+
_focusableElsWithinDialog() {
|
|
543
|
+
return this._popupEl.querySelectorAll(
|
|
544
|
+
'button:not([role="gridcell"]), [data-vvd-component="button"], vwc-button:not([role="gridcell"])'
|
|
545
|
+
);
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* @internal
|
|
549
|
+
*/
|
|
550
|
+
_handleCellKeydown(e, o, t, s) {
|
|
551
|
+
if (e.key === "Tab") {
|
|
552
|
+
e.preventDefault();
|
|
553
|
+
const i = this._focusableElsWithinDialog(), a = Array.prototype.indexOf.call(
|
|
554
|
+
i,
|
|
555
|
+
e.currentTarget
|
|
556
|
+
), d = e.shiftKey ? (a - 1 + i.length) % i.length : (a + 1) % i.length;
|
|
557
|
+
return i[d]?.focus(), !1;
|
|
508
558
|
}
|
|
559
|
+
return super._handleCellKeydown(e, o, t, s);
|
|
509
560
|
}
|
|
510
561
|
/**
|
|
511
|
-
* Get all color swatches combined, both from swatches property and saved colors
|
|
512
562
|
* @internal
|
|
513
563
|
*/
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
!i || typeof i.value != "string" || !f(i.value) || s.has(i.value) || (s.add(i.value), r.push(i));
|
|
517
|
-
};
|
|
518
|
-
return this.disableSavedColors || t.forEach(a), e.forEach(a), r.slice(0, this._maxSwatchesNormalized);
|
|
564
|
+
_handleSwatchSelection(e) {
|
|
565
|
+
this.value !== e && (this._ariaLiveDescription = this.locale.colorPicker.selectionSuccessMessage(e)), super._handleSwatchSelection(e);
|
|
519
566
|
}
|
|
520
567
|
}
|
|
521
568
|
p([
|
|
522
|
-
|
|
569
|
+
y
|
|
523
570
|
], c.prototype, "placeholder");
|
|
524
571
|
p([
|
|
525
|
-
|
|
572
|
+
y({ attribute: "saved-colors-key" })
|
|
526
573
|
], c.prototype, "savedColorsKey");
|
|
527
574
|
p([
|
|
528
|
-
|
|
575
|
+
y({
|
|
529
576
|
mode: "boolean",
|
|
530
577
|
attribute: "disable-saved-colors"
|
|
531
578
|
})
|
|
532
579
|
], c.prototype, "disableSavedColors");
|
|
533
580
|
p([
|
|
534
|
-
|
|
581
|
+
L
|
|
535
582
|
], c.prototype, "savedColors");
|
|
536
583
|
p([
|
|
537
|
-
|
|
584
|
+
y({
|
|
538
585
|
attribute: "max-swatches",
|
|
539
586
|
mode: "fromView",
|
|
540
587
|
converter: te
|
|
541
588
|
})
|
|
542
589
|
], c.prototype, "maxSwatches");
|
|
543
590
|
p([
|
|
544
|
-
|
|
591
|
+
L
|
|
545
592
|
], c.prototype, "copyIconName");
|
|
546
|
-
|
|
593
|
+
p([
|
|
594
|
+
L
|
|
595
|
+
], c.prototype, "_ariaLiveDescription");
|
|
596
|
+
function Je(r, e) {
|
|
547
597
|
return n`
|
|
548
|
-
<${
|
|
598
|
+
<${r}
|
|
549
599
|
id="text-field"
|
|
550
|
-
class="${(
|
|
600
|
+
class="${(t) => N("control")}"
|
|
551
601
|
pattern="${c.HEX_COLOR_PATTERN.source}"
|
|
552
602
|
maxlength="7"
|
|
553
|
-
label="${(
|
|
554
|
-
:value="${(
|
|
555
|
-
placeholder="${(
|
|
556
|
-
helper-text="${(
|
|
557
|
-
error-text="${(
|
|
558
|
-
success-text="${(
|
|
559
|
-
?disabled="${(
|
|
560
|
-
?required="${(
|
|
561
|
-
@input='${(
|
|
562
|
-
@change="${(
|
|
563
|
-
@blur="${(
|
|
564
|
-
|
|
603
|
+
label="${(t) => t.label}"
|
|
604
|
+
:value="${(t) => t.value}"
|
|
605
|
+
placeholder="${(t) => t.placeholder}"
|
|
606
|
+
helper-text="${(t) => t.helperText}"
|
|
607
|
+
error-text="${(t) => t.errorValidationMessage}"
|
|
608
|
+
success-text="${(t) => t.successText}"
|
|
609
|
+
?disabled="${(t) => t.disabled}"
|
|
610
|
+
?required="${(t) => t.required}"
|
|
611
|
+
@input='${(t, s) => t._onTextFieldInput(s.event)}'
|
|
612
|
+
@change="${(t) => t.handleChange()}"
|
|
613
|
+
@blur="${(t) => {
|
|
614
|
+
t.$emit("blur", void 0, { bubbles: !1 });
|
|
565
615
|
}}"
|
|
566
|
-
@focus="${(
|
|
567
|
-
|
|
616
|
+
@focus="${(t) => {
|
|
617
|
+
t.$emit("focus", void 0, { bubbles: !1 });
|
|
568
618
|
}}"
|
|
569
619
|
${pe()}
|
|
570
|
-
${
|
|
620
|
+
${v("_textFieldEl")}
|
|
571
621
|
>
|
|
572
622
|
<button
|
|
573
|
-
aria-label="${(
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
623
|
+
aria-label="${(t) => t.locale.colorPicker.pickerButtonLabel}"
|
|
624
|
+
aria-expanded="${(t) => t.open}"
|
|
625
|
+
aria-haspopup="dialog"
|
|
626
|
+
class="button ${(t) => N(
|
|
627
|
+
t._applyContrastClass(t._buttonColor) ? "contrast" : "",
|
|
628
|
+
t.disabled ? "disabled" : ""
|
|
577
629
|
)}"
|
|
578
|
-
style="--button-color: ${(
|
|
579
|
-
?disabled="${(
|
|
580
|
-
@click="${(
|
|
630
|
+
style="--button-color: ${(t) => t._buttonColor};"
|
|
631
|
+
?disabled="${(t) => t.disabled}"
|
|
632
|
+
@click="${(t) => t._onButtonClick()}"
|
|
581
633
|
slot="action-items"
|
|
582
|
-
${
|
|
634
|
+
${v("_buttonEl")}>
|
|
583
635
|
<${e} name="edit-line"></${e}>
|
|
584
636
|
</button>
|
|
585
637
|
<slot
|
|
586
|
-
slot="${(
|
|
638
|
+
slot="${(t) => t._helperTextSlottedContent?.length ? "helper-text" : void 0}"
|
|
587
639
|
name="helper-text"
|
|
588
|
-
${
|
|
640
|
+
${F("_helperTextSlottedContent")}
|
|
589
641
|
></slot>
|
|
590
642
|
<slot
|
|
591
|
-
slot='${(
|
|
643
|
+
slot='${(t) => t._contextualHelpSlottedContent?.length ? "contextual-help" : void 0}'
|
|
592
644
|
name='contextual-help'
|
|
593
|
-
${
|
|
645
|
+
${F("_contextualHelpSlottedContent")}
|
|
594
646
|
></slot>
|
|
595
|
-
</${
|
|
647
|
+
</${r}>
|
|
596
648
|
`;
|
|
597
649
|
}
|
|
598
|
-
function
|
|
650
|
+
function Ue(r, e) {
|
|
599
651
|
return n`
|
|
600
652
|
<div class="header">
|
|
601
|
-
<
|
|
602
|
-
<slot name="popup-text">${(
|
|
603
|
-
</
|
|
604
|
-
<${
|
|
605
|
-
aria-label="${(
|
|
606
|
-
@click="${(
|
|
653
|
+
<h2 class="header-title" id="color-picker-title">
|
|
654
|
+
<slot name="popup-text">${(o) => o.locale.colorPicker.popupLabel}</slot>
|
|
655
|
+
</h2>
|
|
656
|
+
<${r} size="condensed"
|
|
657
|
+
aria-label="${(o) => o.locale.colorPicker.closeButtonLabel}"
|
|
658
|
+
@click="${(o) => o._handleCloseRequest()}">
|
|
607
659
|
<${e} slot="icon" name="close-line"></${e}>
|
|
608
|
-
</${
|
|
660
|
+
</${r}>
|
|
609
661
|
</div>
|
|
610
662
|
`;
|
|
611
663
|
}
|
|
612
|
-
function
|
|
664
|
+
function Ye(r, e, o) {
|
|
613
665
|
return n`
|
|
614
666
|
<div class="body">
|
|
615
|
-
<${n.partial(
|
|
667
|
+
<${n.partial(G)}
|
|
616
668
|
part="hex-picker"
|
|
617
669
|
color="${(t) => t.value}"
|
|
618
670
|
@color-changed="${(t, s) => t._onPickerColorChanged(s.event)}"
|
|
619
|
-
${
|
|
620
|
-
></${n.partial(
|
|
671
|
+
${v("_vcHexPickerEl")}
|
|
672
|
+
></${n.partial(G)}>
|
|
621
673
|
<div class="hex-input-wrapper">
|
|
622
|
-
<${n.partial(
|
|
674
|
+
<${n.partial(J)}
|
|
623
675
|
part="hex-input"
|
|
624
676
|
prefixed
|
|
625
677
|
color="${(t) => t.value}"
|
|
626
678
|
@color-changed="${(t, s) => t._onPickerColorChanged(s.event)}"
|
|
627
|
-
${
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
679
|
+
${v("_vcHexInputEl")}
|
|
680
|
+
>
|
|
681
|
+
<input name="hex-code-input" aria-label="${(t) => t.locale.colorPicker.hexInputLabel}"
|
|
682
|
+
placeholder="${(t) => t.placeholder}"
|
|
683
|
+
@blur="${(t, s) => s.event.stopImmediatePropagation()}"
|
|
684
|
+
part="input">
|
|
685
|
+
</${n.partial(J)}>
|
|
686
|
+
<${o} placement="top"
|
|
687
|
+
text="${(t) => t.locale.colorPicker.copyButtonLabel}"
|
|
688
|
+
exportparts="vvd-theme-alternate">
|
|
689
|
+
<${r}
|
|
690
|
+
slot="anchor" size="normal"
|
|
691
|
+
aria-label="${(t) => t.locale.colorPicker.copyButtonLabel}"
|
|
692
|
+
@click="${(t) => t._copyValueToClipboard(t.value)}">
|
|
693
|
+
<${e} slot="icon" name="${(t) => t.copyIconName}"></${e}>
|
|
694
|
+
</${r}>
|
|
633
695
|
</${o}>
|
|
634
696
|
</div>
|
|
635
697
|
</div>
|
|
636
698
|
`;
|
|
637
699
|
}
|
|
638
|
-
function
|
|
700
|
+
function Qe(r, e, o) {
|
|
639
701
|
return n`
|
|
640
702
|
<div class="footer">
|
|
641
|
-
<
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
703
|
+
<div class="footer-header">
|
|
704
|
+
<span class="footer-title" id="color-picker-footer-title"
|
|
705
|
+
><slot name="swatches-text"
|
|
706
|
+
>${(t) => t.locale.colorPicker.swatchesLabel}</slot
|
|
707
|
+
></span
|
|
708
|
+
>
|
|
709
|
+
${E((t) => !t.disableSavedColors, Ze())}
|
|
710
|
+
</div>
|
|
646
711
|
<div
|
|
647
712
|
class="palette"
|
|
648
713
|
role="grid"
|
|
@@ -651,76 +716,97 @@ function Ge(o, e) {
|
|
|
651
716
|
style="--swatches-per-row: ${(t) => t._getRowLength()};"
|
|
652
717
|
aria-labelledby="color-picker-footer-title"
|
|
653
718
|
>
|
|
654
|
-
${
|
|
719
|
+
${we(
|
|
655
720
|
(t) => t.allSwatches,
|
|
656
|
-
(t) => t._renderColorSwatch(e),
|
|
721
|
+
(t) => t._renderColorSwatch(e, o),
|
|
657
722
|
{ positioning: !0 }
|
|
658
723
|
)}
|
|
659
|
-
${
|
|
724
|
+
${E(
|
|
660
725
|
(t) => !t.disableSavedColors,
|
|
661
726
|
n`
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
727
|
+
<${o} placement="top"
|
|
728
|
+
text="${(t) => t.locale.colorPicker.saveButtonLabel}"
|
|
729
|
+
exportparts="vvd-theme-alternate">
|
|
730
|
+
<${r}
|
|
731
|
+
slot="anchor"
|
|
732
|
+
appearance="outlined"
|
|
733
|
+
size="super-condensed"
|
|
734
|
+
role="gridcell"
|
|
735
|
+
tabindex="${(t) => t.allSwatches.length ? "-1" : "0"}"
|
|
736
|
+
aria-label="${(t) => t.locale.colorPicker.saveButtonLabel}"
|
|
737
|
+
@click="${(t) => t._saveCurrentColor()}"
|
|
738
|
+
@keydown="${(t, s) => t._handleCellKeydown(
|
|
670
739
|
s.event,
|
|
671
740
|
t.value,
|
|
672
741
|
t.allSwatches.length,
|
|
673
742
|
!0
|
|
674
743
|
)}">
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
744
|
+
<${e} slot="icon" name="plus-line"></${e}>
|
|
745
|
+
</${r}>
|
|
746
|
+
</${o}>
|
|
747
|
+
`
|
|
679
748
|
)}
|
|
680
749
|
</div>
|
|
681
750
|
</div>
|
|
682
751
|
`;
|
|
683
752
|
}
|
|
684
|
-
|
|
685
|
-
const e = o.tagFor(be), t = o.tagFor(ie), s = o.tagFor(re), r = o.tagFor(ge);
|
|
753
|
+
function Ze() {
|
|
686
754
|
return n`
|
|
687
|
-
<
|
|
688
|
-
|
|
689
|
-
|
|
755
|
+
<span
|
|
756
|
+
id="swatches-count"
|
|
757
|
+
class="swatches-count"
|
|
758
|
+
aria-label="${(r) => r.locale.colorPicker.maxSwatchesMessage(
|
|
759
|
+
r.allSwatches.length,
|
|
760
|
+
r.maxSwatches
|
|
761
|
+
)}"
|
|
762
|
+
>${(r) => `${r.allSwatches.length}/${r.maxSwatches}`}</span
|
|
763
|
+
>
|
|
764
|
+
`;
|
|
765
|
+
}
|
|
766
|
+
const et = (r) => {
|
|
767
|
+
const e = r.tagFor(ge), o = r.tagFor(ie), t = r.tagFor(se), s = r.tagFor(ye), i = r.tagFor($e);
|
|
768
|
+
return n`
|
|
769
|
+
<div class="base" @keydown="${(a, { event: d }) => a._onBaseKeydown(d)}">
|
|
770
|
+
<span aria-live="assertive" aria-relevant="text" class="visually-hidden">
|
|
771
|
+
${(a) => a._ariaLiveDescription}
|
|
772
|
+
</span>
|
|
773
|
+
${Je(e, o)}
|
|
774
|
+
<${t}
|
|
690
775
|
:open="${(a) => a.open}"
|
|
691
776
|
:anchor="${(a) => a._buttonEl}"
|
|
692
777
|
placement="top"
|
|
693
778
|
offset="10"
|
|
694
|
-
${
|
|
779
|
+
${v("_popupEl")}>
|
|
695
780
|
<div class="dialog"
|
|
696
781
|
role="dialog"
|
|
697
782
|
aria-modal="true"
|
|
698
783
|
aria-labelledby="color-picker-title">
|
|
699
|
-
${
|
|
700
|
-
${
|
|
701
|
-
${
|
|
784
|
+
${Ue(s, o)}
|
|
785
|
+
${Ye(s, o, i)}
|
|
786
|
+
${E(
|
|
702
787
|
(a) => !a.disableSavedColors || a.allSwatches.length > 0,
|
|
703
|
-
|
|
788
|
+
Qe(s, o, i)
|
|
704
789
|
)}
|
|
705
790
|
</div>
|
|
706
|
-
</${
|
|
791
|
+
</${t}>
|
|
707
792
|
</div>
|
|
708
793
|
`;
|
|
709
|
-
},
|
|
794
|
+
}, tt = re(
|
|
710
795
|
"color-picker",
|
|
711
796
|
c,
|
|
712
|
-
|
|
797
|
+
et,
|
|
713
798
|
[
|
|
714
799
|
ae,
|
|
715
800
|
le,
|
|
716
|
-
me,
|
|
717
801
|
xe,
|
|
802
|
+
Ce,
|
|
803
|
+
ke,
|
|
718
804
|
ce
|
|
719
805
|
],
|
|
720
806
|
{
|
|
721
|
-
styles:
|
|
807
|
+
styles: _e
|
|
722
808
|
}
|
|
723
|
-
),
|
|
724
|
-
|
|
809
|
+
), ot = oe(
|
|
810
|
+
tt
|
|
725
811
|
);
|
|
726
|
-
|
|
812
|
+
ot();
|