@shtabapp/ui-kit 1.34.0 → 1.36.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/CHANGELOG.md +12 -0
- package/dist/{SAvatar-C2gekygl.cjs → SAvatar-D5SreJLe.cjs} +1 -1
- package/dist/{SAvatar-DAfDAqrP.js → SAvatar-q1HSZPqy.js} +1 -1
- package/dist/{SAvatarGroup-HvIlI5y0.js → SAvatarGroup-By-5Ub6i.js} +1 -1
- package/dist/{SAvatarGroup-76j-sHCe.cjs → SAvatarGroup-CdVjv8sb.cjs} +1 -1
- package/dist/SColorPalette-CqfVzhda.cjs +1 -0
- package/dist/SColorPalette-D2WCADDX.js +146 -0
- package/dist/SColorPicker-BcRHiLjI.cjs +1 -0
- package/dist/{SColorPicker-Cs0QmYWm.js → SColorPicker-BnfGvKy4.js} +215 -208
- package/dist/SInput-C07kFnj_.cjs +1 -0
- package/dist/{SInput-iNlzBX5m.js → SInput-CkanJfLx.js} +45 -44
- package/dist/{SList-C_S9ej45.js → SList-B40rJ-PZ.js} +1 -1
- package/dist/{SList-CU2Sy9Md.cjs → SList-Txr46zQ5.cjs} +1 -1
- package/dist/SListItem-BKP5Wk1F.cjs +1 -0
- package/dist/{SListItem-BD7wvCNe.js → SListItem-DKrpL2SS.js} +56 -56
- package/dist/SPhotoEdit-VW9-n1yU.cjs +1 -0
- package/dist/SPhotoEdit-bXKHcP3x.js +123 -0
- package/dist/SSelect-BPYtkzaw.cjs +1 -0
- package/dist/{SSelect-AcH04gtk.js → SSelect-XSZjYLBA.js} +221 -219
- package/dist/STab-BbzowB-Y.cjs +1 -0
- package/dist/STab-DY1TGadw.js +218 -0
- package/dist/{STabs-Ce7tHq8T.js → STabs-CTM8Nji_.js} +1 -1
- package/dist/{STabs-C6QQnCZd.cjs → STabs-DeHqnjNJ.cjs} +1 -1
- package/dist/{STag-COwzellL.js → STag-CluIVRKi.js} +42 -39
- package/dist/STag-D1mmp1kd.cjs +1 -0
- package/dist/{STagGroup-CKxDA9Y0.cjs → STagGroup-BMIwBk-O.cjs} +1 -1
- package/dist/{STagGroup-Cbe0AENj.js → STagGroup-wSpc3guU.js} +1 -1
- package/dist/{colorValue-DXJiNKGE.js → colorValue-CSh0chxp.js} +1 -1
- package/dist/{colorValue-DClAEDHr.cjs → colorValue-Dda7fKd3.cjs} +1 -1
- package/dist/components/SAvatar/utils/getAvatarInitialsTextColor.d.ts +1 -1
- package/dist/components/SAvatar/utils/getAvatarInitialsTextColor.d.ts.map +1 -1
- package/dist/components/SColorPalette/SColorPalette.vue.d.ts.map +1 -1
- package/dist/components/SColorPicker/SColorPicker.vue.d.ts.map +1 -1
- package/dist/components/SColorPicker/parts/SColorArea.vue.d.ts.map +1 -1
- package/dist/components/SColorPicker/parts/SColorValues.vue.d.ts.map +1 -1
- package/dist/components/SInput/SInput.vue.d.ts.map +1 -1
- package/dist/components/SListItem/SListItem.vue.d.ts.map +1 -1
- package/dist/components/SPhotoEdit/SPhotoEdit.types.d.ts +27 -0
- package/dist/components/SPhotoEdit/SPhotoEdit.types.d.ts.map +1 -0
- package/dist/components/SPhotoEdit/SPhotoEdit.vue.d.ts +18 -0
- package/dist/components/SPhotoEdit/SPhotoEdit.vue.d.ts.map +1 -0
- package/dist/components/SPhotoEdit/index.d.ts +4 -0
- package/dist/components/SPhotoEdit/index.d.ts.map +1 -0
- package/dist/components/SSelect/SSelect.types.d.ts +13 -1
- package/dist/components/SSelect/SSelect.types.d.ts.map +1 -1
- package/dist/components/SSelect/SSelect.vue.d.ts.map +1 -1
- package/dist/components/SSelect/index.d.ts +1 -1
- package/dist/components/SSelect/index.d.ts.map +1 -1
- package/dist/components/STab/STab.vue.d.ts.map +1 -1
- package/dist/components/STag/STag.vue.d.ts.map +1 -1
- package/dist/contrastSurfaceTextColor-BDlLSSXC.js +33 -0
- package/dist/contrastSurfaceTextColor-BRjRzXyZ.cjs +1 -0
- package/dist/entries/avatar-group.cjs +1 -1
- package/dist/entries/avatar-group.js +1 -1
- package/dist/entries/avatar.cjs +1 -1
- package/dist/entries/avatar.js +1 -1
- package/dist/entries/color-palette.cjs +1 -1
- package/dist/entries/color-palette.js +2 -2
- package/dist/entries/color-picker.cjs +1 -1
- package/dist/entries/color-picker.js +3 -3
- package/dist/entries/input.cjs +1 -1
- package/dist/entries/input.js +1 -1
- package/dist/entries/list-item.cjs +1 -1
- package/dist/entries/list-item.js +1 -1
- package/dist/entries/list.cjs +1 -1
- package/dist/entries/list.js +1 -1
- package/dist/entries/photo-edit.cjs +1 -0
- package/dist/entries/photo-edit.d.ts +4 -0
- package/dist/entries/photo-edit.d.ts.map +1 -0
- package/dist/entries/photo-edit.js +2 -0
- package/dist/entries/select.cjs +1 -1
- package/dist/entries/select.d.ts +1 -1
- package/dist/entries/select.d.ts.map +1 -1
- package/dist/entries/select.js +1 -1
- package/dist/entries/tab.cjs +1 -1
- package/dist/entries/tab.js +1 -1
- package/dist/entries/tabs.cjs +1 -1
- package/dist/entries/tabs.js +2 -2
- package/dist/entries/tag-group.cjs +1 -1
- package/dist/entries/tag-group.js +2 -2
- package/dist/entries/tag.cjs +1 -1
- package/dist/entries/tag.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -21
- package/dist/uikit-components.css +1 -1
- package/dist/utils/color/contrastSurfaceTextColor.d.ts +1 -1
- package/dist/utils/color/contrastSurfaceTextColor.d.ts.map +1 -1
- package/package.json +11 -3
- package/dist/SColorPalette-B9WrqgRz.js +0 -146
- package/dist/SColorPalette-CYGnmIWP.cjs +0 -1
- package/dist/SColorPicker-D7QwVS2t.cjs +0 -1
- package/dist/SInput-DYS84eMS.cjs +0 -1
- package/dist/SListItem-BDkldLVt.cjs +0 -1
- package/dist/SSelect-CT3AMH-u.cjs +0 -1
- package/dist/STab-C8RXx0lW.cjs +0 -1
- package/dist/STab-DXGKWtFI.js +0 -218
- package/dist/STag-HgFvU1Iy.cjs +0 -1
- package/dist/contrastSurfaceTextColor-Dl641cZ_.js +0 -33
- package/dist/contrastSurfaceTextColor-Ybh-FZof.cjs +0 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { n as e } from "./contrastSurfaceTextColor-
|
|
2
|
-
import { n as t, o as n, r, t as i } from "./SColorPalette-
|
|
3
|
-
import { a, n as o } from "./colorValue-
|
|
1
|
+
import { n as e } from "./contrastSurfaceTextColor-BDlLSSXC.js";
|
|
2
|
+
import { n as t, o as n, r, t as i } from "./SColorPalette-D2WCADDX.js";
|
|
3
|
+
import { a, n as o } from "./colorValue-CSh0chxp.js";
|
|
4
4
|
import { n as s, r as c, t as l } from "./SButton.types-CpdHQtyx.js";
|
|
5
5
|
import { t as u } from "./SButton-DnU_XZ1C.js";
|
|
6
6
|
import { i as d } from "./useFloatingOverlay-QcumEYEq.js";
|
|
7
7
|
import { t as f } from "./SDropdown-CTQ5Qlez.js";
|
|
8
|
-
import { r as p, t as m } from "./SSelect-
|
|
9
|
-
import { Fragment as h, computed as g, createBlock as _, createElementBlock as v, createElementVNode as y, createTextVNode as b, createVNode as x, defineComponent as S, mergeModels as C, mergeProps as w, nextTick as T, normalizeClass as E, normalizeStyle as D, onMounted as O, openBlock as k, ref as A, shallowRef as j,
|
|
10
|
-
import { ESColorSwatchSize as
|
|
11
|
-
import { useEventListener as
|
|
8
|
+
import { r as p, t as m } from "./SSelect-XSZjYLBA.js";
|
|
9
|
+
import { Fragment as h, computed as g, createBlock as _, createElementBlock as v, createElementVNode as y, createTextVNode as b, createVNode as x, defineComponent as S, mergeModels as C, mergeProps as w, nextTick as T, normalizeClass as E, normalizeStyle as D, onMounted as O, openBlock as k, ref as A, shallowRef as j, toDisplayString as M, toRef as N, unref as P, useModel as F, useTemplateRef as I, vModelText as L, watch as R, withCtx as z, withDirectives as B } from "vue";
|
|
10
|
+
import { ESColorSwatchSize as V, SColorSwatch as ee, useUiKitI18n as H } from "@shtabapp/ui-kit-primitives";
|
|
11
|
+
import { useEventListener as U } from "@vueuse/core";
|
|
12
12
|
//#region src/utils/color/colorFormatChannels.ts
|
|
13
|
-
var
|
|
13
|
+
var W = (e) => Math.max(0, Math.min(255, Math.round(e))), te = (e) => {
|
|
14
14
|
let t = e % 360;
|
|
15
15
|
return t < 0 ? t + 360 : t;
|
|
16
|
-
},
|
|
16
|
+
}, G = (e) => Math.max(0, Math.min(100, Math.round(e))), ne = (e) => {
|
|
17
17
|
let t = e.slice(1);
|
|
18
18
|
if (t.length === 3) {
|
|
19
19
|
let e = t[0], n = t[1], r = t[2];
|
|
20
20
|
return !e || !n || !r ? void 0 : `${e}${e}${n}${n}${r}${r}`;
|
|
21
21
|
}
|
|
22
22
|
if (t.length === 6 || t.length === 8) return t.slice(0, 6);
|
|
23
|
-
},
|
|
24
|
-
let t =
|
|
23
|
+
}, K = (e) => {
|
|
24
|
+
let t = ne(e);
|
|
25
25
|
if (!t) return;
|
|
26
26
|
let n = Number.parseInt(t.slice(0, 2), 16), r = Number.parseInt(t.slice(2, 4), 16), i = Number.parseInt(t.slice(4, 6), 16);
|
|
27
27
|
if (!(Number.isNaN(n) || Number.isNaN(r) || Number.isNaN(i))) return {
|
|
@@ -29,11 +29,11 @@ var U = (e) => Math.max(0, Math.min(255, Math.round(e))), ee = (e) => {
|
|
|
29
29
|
second: r,
|
|
30
30
|
third: i
|
|
31
31
|
};
|
|
32
|
-
}, K = (e) => {
|
|
33
|
-
let t = U(e.first), n = U(e.second), r = U(e.third);
|
|
34
|
-
return `#${t.toString(16).padStart(2, "0").toUpperCase()}${n.toString(16).padStart(2, "0").toUpperCase()}${r.toString(16).padStart(2, "0").toUpperCase()}`;
|
|
35
32
|
}, q = (e) => {
|
|
36
|
-
let t =
|
|
33
|
+
let t = W(e.first), n = W(e.second), r = W(e.third);
|
|
34
|
+
return `#${t.toString(16).padStart(2, "0").toUpperCase()}${n.toString(16).padStart(2, "0").toUpperCase()}${r.toString(16).padStart(2, "0").toUpperCase()}`;
|
|
35
|
+
}, J = (e) => {
|
|
36
|
+
let t = K(e);
|
|
37
37
|
if (!t) return;
|
|
38
38
|
let n = t.first / 255, r = t.second / 255, i = t.third / 255, a = Math.max(n, r, i), o = Math.min(n, r, i), s = a - o, c = 0, l = (a + o) / 2;
|
|
39
39
|
s !== 0 && (c = a === n ? ((r - i) / s + (r < i ? 6 : 0)) * 60 : a === r ? ((i - n) / s + 2) * 60 : ((n - r) / s + 4) * 60);
|
|
@@ -43,26 +43,26 @@ var U = (e) => Math.max(0, Math.min(255, Math.round(e))), ee = (e) => {
|
|
|
43
43
|
second: Math.round(u * 100),
|
|
44
44
|
third: Math.round(l * 100)
|
|
45
45
|
};
|
|
46
|
-
},
|
|
47
|
-
let t =
|
|
46
|
+
}, re = (e) => {
|
|
47
|
+
let t = te(e.first), n = G(e.second) / 100, r = G(e.third) / 100, i = (e) => {
|
|
48
48
|
let i = (t + e) / 30;
|
|
49
|
-
return
|
|
49
|
+
return W((r - n * Math.min(r, 1 - r) * Math.max(-1, Math.min(i % 2 - 1, 1))) * 255);
|
|
50
50
|
};
|
|
51
|
-
return
|
|
51
|
+
return q({
|
|
52
52
|
first: i(0),
|
|
53
53
|
second: i(8),
|
|
54
54
|
third: i(4)
|
|
55
55
|
});
|
|
56
|
-
},
|
|
56
|
+
}, ie = (t) => {
|
|
57
57
|
let n = t.toUpperCase(), r = n.startsWith("#") ? n.slice(1) : n;
|
|
58
58
|
if (!/^[0-9A-F]{3}$/.test(r) && !/^[0-9A-F]{6}$/.test(r)) return;
|
|
59
59
|
let i = `#${r}`;
|
|
60
|
-
if (e(i)) return K(
|
|
60
|
+
if (e(i)) return q(K(i) ?? {
|
|
61
61
|
first: 0,
|
|
62
62
|
second: 0,
|
|
63
63
|
third: 0
|
|
64
64
|
});
|
|
65
|
-
},
|
|
65
|
+
}, ae = (e) => e.slice(1).toUpperCase(), oe = (e) => {
|
|
66
66
|
let t = e.first / 255, n = e.second / 255, r = e.third / 255, i = Math.max(t, n, r), a = i - Math.min(t, n, r), o = 0;
|
|
67
67
|
a !== 0 && (o = i === t ? (n - r) / a % 6 : i === n ? (r - t) / a + 2 : (t - n) / a + 4, o = Math.round(o * 60), o < 0 && (o += 360));
|
|
68
68
|
let s = i === 0 ? 0 : a / i;
|
|
@@ -71,70 +71,70 @@ var U = (e) => Math.max(0, Math.min(255, Math.round(e))), ee = (e) => {
|
|
|
71
71
|
saturation: s,
|
|
72
72
|
value: i
|
|
73
73
|
};
|
|
74
|
-
},
|
|
74
|
+
}, se = (e) => {
|
|
75
75
|
let t = e.value * e.saturation, n = e.hue / 60, r = t * (1 - Math.abs(n % 2 - 1)), i = e.value - t, a = 0, o = 0, s = 0;
|
|
76
76
|
return n >= 0 && n < 1 ? (a = t, o = r) : n >= 1 && n < 2 ? (a = r, o = t) : n >= 2 && n < 3 ? (o = t, s = r) : n >= 3 && n < 4 ? (o = r, s = t) : n >= 4 && n < 5 ? (a = r, s = t) : (a = t, s = r), {
|
|
77
|
-
first:
|
|
78
|
-
second:
|
|
79
|
-
third:
|
|
77
|
+
first: W((a + i) * 255),
|
|
78
|
+
second: W((o + i) * 255),
|
|
79
|
+
third: W((s + i) * 255)
|
|
80
80
|
};
|
|
81
|
-
},
|
|
82
|
-
let t =
|
|
83
|
-
if (t) return
|
|
84
|
-
},
|
|
81
|
+
}, Y = (e) => {
|
|
82
|
+
let t = K(e);
|
|
83
|
+
if (t) return oe(t);
|
|
84
|
+
}, X = (e) => q(se(e)), Z = [
|
|
85
85
|
n.HEX,
|
|
86
86
|
n.RGB,
|
|
87
87
|
n.HSL
|
|
88
|
-
],
|
|
88
|
+
], ce = {
|
|
89
89
|
[n.HEX]: "Hex",
|
|
90
90
|
[n.RGB]: "RGB",
|
|
91
91
|
[n.HSL]: "HSL"
|
|
92
|
-
},
|
|
92
|
+
}, le = (e) => {
|
|
93
93
|
let t = getComputedStyle(e).backgroundColor.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)/);
|
|
94
94
|
if (!t) return;
|
|
95
95
|
let n = Number.parseInt(t[1] ?? "0", 10), r = Number.parseInt(t[2] ?? "0", 10), i = Number.parseInt(t[3] ?? "0", 10);
|
|
96
96
|
return `#${n.toString(16).padStart(2, "0").toUpperCase()}${r.toString(16).padStart(2, "0").toUpperCase()}${i.toString(16).padStart(2, "0").toUpperCase()}`;
|
|
97
|
-
},
|
|
97
|
+
}, ue = (t, n) => {
|
|
98
98
|
if (o(t) && e(t)) return t;
|
|
99
|
-
if (n) return
|
|
100
|
-
},
|
|
99
|
+
if (n) return le(n);
|
|
100
|
+
}, de = (e, t) => t === n.HEX ? ae(e) : t === n.RGB ? K(e) ?? {
|
|
101
101
|
first: 0,
|
|
102
102
|
second: 0,
|
|
103
103
|
third: 0
|
|
104
|
-
} :
|
|
104
|
+
} : J(e) ?? {
|
|
105
105
|
first: 0,
|
|
106
106
|
second: 0,
|
|
107
107
|
third: 0
|
|
108
108
|
}, Q = (e) => {
|
|
109
109
|
let t = Number.parseInt(e, 10);
|
|
110
110
|
if (!Number.isNaN(t)) return t;
|
|
111
|
-
},
|
|
112
|
-
if (e === n.HEX) return typeof t == "string" ?
|
|
111
|
+
}, fe = (e, t) => {
|
|
112
|
+
if (e === n.HEX) return typeof t == "string" ? ie(t) : void 0;
|
|
113
113
|
if (typeof t == "string") return;
|
|
114
114
|
if (e === n.RGB) {
|
|
115
|
-
let e =
|
|
115
|
+
let e = q({
|
|
116
116
|
first: Q(String(t.first)) ?? 0,
|
|
117
117
|
second: Q(String(t.second)) ?? 0,
|
|
118
118
|
third: Q(String(t.third)) ?? 0
|
|
119
119
|
});
|
|
120
|
-
return
|
|
120
|
+
return K(e) ? e : void 0;
|
|
121
121
|
}
|
|
122
|
-
let r =
|
|
122
|
+
let r = re({
|
|
123
123
|
first: Q(String(t.first)) ?? 0,
|
|
124
124
|
second: Q(String(t.second)) ?? 0,
|
|
125
125
|
third: Q(String(t.third)) ?? 0
|
|
126
126
|
});
|
|
127
|
-
if (r &&
|
|
128
|
-
},
|
|
129
|
-
let o =
|
|
127
|
+
if (r && J(r)) return r;
|
|
128
|
+
}, pe = 17, me = "#000000", he = (e) => e ?? me, ge = ({ modelValue: e, getEditableHex: t, saturationAreaRef: n, hueSliderRef: r, disabled: i, readonly: a }) => {
|
|
129
|
+
let o = Y(he(t())) ?? {
|
|
130
130
|
hue: 0,
|
|
131
131
|
saturation: 0,
|
|
132
132
|
value: 0
|
|
133
|
-
}, s = A(o.hue), c = A(o.saturation), l = A(o.value), u = A(!1), d = A(!1), f = A(!1), p = j(null), m = j(null), h = g(() =>
|
|
133
|
+
}, s = A(o.hue), c = A(o.saturation), l = A(o.value), u = A(!1), d = A(!1), f = A(!1), p = j(null), m = j(null), h = g(() => X({
|
|
134
134
|
hue: s.value,
|
|
135
135
|
saturation: c.value,
|
|
136
136
|
value: l.value
|
|
137
|
-
})), _ = g(() =>
|
|
137
|
+
})), _ = g(() => X({
|
|
138
138
|
hue: s.value,
|
|
139
139
|
saturation: 1,
|
|
140
140
|
value: 1
|
|
@@ -143,7 +143,7 @@ var U = (e) => Math.max(0, Math.min(255, Math.round(e))), ee = (e) => {
|
|
|
143
143
|
}, y = (e, t) => {
|
|
144
144
|
c.value = Math.max(0, Math.min(1, e)), l.value = Math.max(0, Math.min(1, t));
|
|
145
145
|
}, b = (e) => {
|
|
146
|
-
let t =
|
|
146
|
+
let t = Y(he(e));
|
|
147
147
|
t && (u.value = !0, t.saturation > 0 && (s.value = t.hue), c.value = t.saturation, l.value = t.value, u.value = !1);
|
|
148
148
|
}, x = () => {
|
|
149
149
|
let e = t();
|
|
@@ -152,13 +152,13 @@ var U = (e) => Math.max(0, Math.min(255, Math.round(e))), ee = (e) => {
|
|
|
152
152
|
let n = h.value;
|
|
153
153
|
t()?.toUpperCase() !== n.toUpperCase() && (u.value = !0, e.value = n, u.value = !1);
|
|
154
154
|
};
|
|
155
|
-
|
|
155
|
+
R([
|
|
156
156
|
s,
|
|
157
157
|
c,
|
|
158
158
|
l
|
|
159
159
|
], () => {
|
|
160
160
|
u.value || S();
|
|
161
|
-
}),
|
|
161
|
+
}), R(e, () => {
|
|
162
162
|
u.value || x();
|
|
163
163
|
}), O(() => {
|
|
164
164
|
T(() => {
|
|
@@ -189,14 +189,14 @@ var U = (e) => Math.max(0, Math.min(255, Math.round(e))), ee = (e) => {
|
|
|
189
189
|
k() && (w(), f.value = !0, N(e), e.currentTarget instanceof HTMLElement && e.currentTarget.setPointerCapture(e.pointerId));
|
|
190
190
|
}, I = () => {
|
|
191
191
|
d.value = !1;
|
|
192
|
-
},
|
|
192
|
+
}, L = () => {
|
|
193
193
|
f.value = !1;
|
|
194
194
|
};
|
|
195
|
-
return
|
|
195
|
+
return U(n, "pointermove", (e) => {
|
|
196
196
|
d.value && M(e);
|
|
197
|
-
}),
|
|
197
|
+
}), U(n, "pointerup", I), U(n, "pointercancel", I), U(n, "lostpointercapture", I), U(r, "pointermove", (e) => {
|
|
198
198
|
f.value && N(e);
|
|
199
|
-
}),
|
|
199
|
+
}), U(r, "pointerup", L), U(r, "pointercancel", L), U(r, "lostpointercapture", L), {
|
|
200
200
|
hexColor: h,
|
|
201
201
|
hueBackground: _,
|
|
202
202
|
saturationPointerStyle: E,
|
|
@@ -205,13 +205,13 @@ var U = (e) => Math.max(0, Math.min(255, Math.round(e))), ee = (e) => {
|
|
|
205
205
|
handleHuePointerDown: F,
|
|
206
206
|
syncFromModelValue: x
|
|
207
207
|
};
|
|
208
|
-
},
|
|
208
|
+
}, _e = (e) => {
|
|
209
209
|
if (!e) return null;
|
|
210
210
|
let t = e.$el;
|
|
211
211
|
if (!(t instanceof HTMLElement)) return null;
|
|
212
212
|
let n = t.querySelector(".s-ui-color-swatch__fill");
|
|
213
213
|
return n instanceof HTMLElement ? n : null;
|
|
214
|
-
},
|
|
214
|
+
}, ve = { class: "s-ui-color-area__canvas-row" }, ye = ["aria-label"], be = ["aria-label", "aria-disabled"], xe = /* @__PURE__ */ S({
|
|
215
215
|
__name: "SColorArea",
|
|
216
216
|
props: /*@__PURE__*/ C({
|
|
217
217
|
disabled: {
|
|
@@ -228,73 +228,77 @@ var U = (e) => Math.max(0, Math.min(255, Math.round(e))), ee = (e) => {
|
|
|
228
228
|
}),
|
|
229
229
|
emits: ["update:modelValue"],
|
|
230
230
|
setup(e) {
|
|
231
|
-
let t =
|
|
231
|
+
let t = F(e, "modelValue"), { t: n } = H(), r = I("colorResolutionSwatchRef"), i = I("saturationAreaRef"), o = I("hueSliderRef"), s = () => ue(t.value, _e(r.value)), c = g(() => a(t.value)), { hexColor: l, hueBackground: u, saturationPointerStyle: d, huePointerStyle: f, handleSaturationPointerDown: p, handleHuePointerDown: m } = ge({
|
|
232
232
|
modelValue: t,
|
|
233
|
-
getEditableHex:
|
|
234
|
-
saturationAreaRef:
|
|
235
|
-
hueSliderRef:
|
|
236
|
-
disabled:
|
|
237
|
-
readonly:
|
|
233
|
+
getEditableHex: s,
|
|
234
|
+
saturationAreaRef: i,
|
|
235
|
+
hueSliderRef: o,
|
|
236
|
+
disabled: N(() => e.disabled),
|
|
237
|
+
readonly: N(() => e.readonly)
|
|
238
238
|
});
|
|
239
239
|
return (t, a) => (k(), v("div", w({ class: ["s-ui-color-area", {
|
|
240
240
|
"s-ui-color-area--disabled": e.disabled,
|
|
241
241
|
"s-ui-color-area--readonly": e.readonly
|
|
242
|
-
}] }, t.$attrs), [x(
|
|
242
|
+
}] }, t.$attrs), [x(P(ee), {
|
|
243
243
|
ref_key: "colorResolutionSwatchRef",
|
|
244
|
-
ref:
|
|
244
|
+
ref: r,
|
|
245
245
|
class: "s-ui-color-area__color-resolution",
|
|
246
|
-
color:
|
|
247
|
-
size:
|
|
246
|
+
color: c.value,
|
|
247
|
+
size: P(V).SIZE_24,
|
|
248
248
|
tabindex: "-1",
|
|
249
249
|
"aria-hidden": "true"
|
|
250
|
-
}, null, 8, ["color", "size"]), y("div",
|
|
250
|
+
}, null, 8, ["color", "size"]), y("div", ve, [y("div", {
|
|
251
251
|
ref_key: "saturationAreaRef",
|
|
252
|
-
ref:
|
|
252
|
+
ref: i,
|
|
253
253
|
class: "s-ui-color-area__canvas",
|
|
254
254
|
role: "img",
|
|
255
|
-
"aria-label": "
|
|
256
|
-
style: D({ "--s-ui-color-area-hue":
|
|
257
|
-
onPointerdown: a[0] ||= (...e) =>
|
|
255
|
+
"aria-label": P(n)("colorArea.saturationBrightness"),
|
|
256
|
+
style: D({ "--s-ui-color-area-hue": P(u) }),
|
|
257
|
+
onPointerdown: a[0] ||= (...e) => P(p) && P(p)(...e)
|
|
258
258
|
}, [y("div", {
|
|
259
259
|
class: "s-ui-color-area__canvas-pointer",
|
|
260
260
|
style: D({
|
|
261
|
-
...
|
|
262
|
-
backgroundColor:
|
|
261
|
+
...P(d),
|
|
262
|
+
backgroundColor: P(l)
|
|
263
263
|
})
|
|
264
|
-
}, null, 4)],
|
|
264
|
+
}, null, 4)], 44, ye), y("div", {
|
|
265
265
|
ref_key: "hueSliderRef",
|
|
266
|
-
ref:
|
|
266
|
+
ref: o,
|
|
267
267
|
class: "s-ui-color-area__hue",
|
|
268
268
|
role: "slider",
|
|
269
|
-
"aria-label": "
|
|
269
|
+
"aria-label": P(n)("colorArea.hue"),
|
|
270
270
|
"aria-valuemin": "0",
|
|
271
271
|
"aria-valuemax": "360",
|
|
272
272
|
"aria-disabled": e.disabled || e.readonly,
|
|
273
|
-
onPointerdown: a[1] ||= (...e) =>
|
|
273
|
+
onPointerdown: a[1] ||= (...e) => P(m) && P(m)(...e)
|
|
274
274
|
}, [y("div", {
|
|
275
275
|
class: "s-ui-color-area__hue-pointer",
|
|
276
276
|
style: D({
|
|
277
|
-
...
|
|
278
|
-
backgroundColor:
|
|
277
|
+
...P(f),
|
|
278
|
+
backgroundColor: P(u)
|
|
279
279
|
})
|
|
280
|
-
}, null, 4)], 40,
|
|
280
|
+
}, null, 4)], 40, be)])], 16));
|
|
281
281
|
}
|
|
282
|
-
}),
|
|
282
|
+
}), Se = { class: "s-ui-color-values__left" }, Ce = { class: "s-ui-color-values__format" }, we = { class: "s-ui-color-values__value-group" }, Te = { class: "s-ui-color-values__inputs" }, Ee = {
|
|
283
283
|
key: 0,
|
|
284
284
|
class: "s-ui-color-values__input-wrap"
|
|
285
|
-
},
|
|
285
|
+
}, De = [
|
|
286
286
|
"disabled",
|
|
287
287
|
"readonly",
|
|
288
288
|
"aria-label"
|
|
289
|
-
],
|
|
289
|
+
], Oe = { class: "s-ui-color-values__input-wrap" }, ke = [
|
|
290
290
|
"disabled",
|
|
291
291
|
"readonly",
|
|
292
292
|
"aria-label"
|
|
293
|
-
],
|
|
293
|
+
], Ae = { class: "s-ui-color-values__input-wrap" }, je = [
|
|
294
294
|
"disabled",
|
|
295
295
|
"readonly",
|
|
296
296
|
"aria-label"
|
|
297
|
-
],
|
|
297
|
+
], Me = { class: "s-ui-color-values__input-wrap" }, Ne = [
|
|
298
|
+
"disabled",
|
|
299
|
+
"readonly",
|
|
300
|
+
"aria-label"
|
|
301
|
+
], $ = /* @__PURE__ */ S({
|
|
298
302
|
__name: "SColorValues",
|
|
299
303
|
props: /*@__PURE__*/ C({
|
|
300
304
|
disabled: {
|
|
@@ -305,7 +309,7 @@ var U = (e) => Math.max(0, Math.min(255, Math.round(e))), ee = (e) => {
|
|
|
305
309
|
type: Boolean,
|
|
306
310
|
default: !1
|
|
307
311
|
},
|
|
308
|
-
formats: { default: () =>
|
|
312
|
+
formats: { default: () => Z }
|
|
309
313
|
}, {
|
|
310
314
|
modelValue: { required: !0 },
|
|
311
315
|
modelModifiers: {},
|
|
@@ -314,55 +318,55 @@ var U = (e) => Math.max(0, Math.min(255, Math.round(e))), ee = (e) => {
|
|
|
314
318
|
}),
|
|
315
319
|
emits: /*@__PURE__*/ C(["formatDropdownOpen", "formatDropdownClose"], ["update:modelValue", "update:format"]),
|
|
316
320
|
setup(e, { emit: t }) {
|
|
317
|
-
let r =
|
|
321
|
+
let { t: r } = H(), i = F(e, "modelValue"), o = F(e, "format"), d = t, f = I("previewSwatchRef"), p = A(""), _ = A("0"), b = A("0"), S = A("0"), C = g(() => (e.formats.length > 0 ? e.formats : Z).map((e) => ({
|
|
318
322
|
value: e,
|
|
319
|
-
label:
|
|
320
|
-
}))),
|
|
321
|
-
let e =
|
|
323
|
+
label: ce[e]
|
|
324
|
+
}))), E = g(() => a(i.value)), D = g(() => ue(i.value, _e(f.value))), j = g(() => o.value === n.RGB ? r("colorValues.redChannel") : r("colorValues.hueChannel")), M = g(() => o.value === n.RGB ? r("colorValues.greenChannel") : r("colorValues.saturationChannel")), N = g(() => o.value === n.RGB ? r("colorValues.blueChannel") : r("colorValues.lightnessChannel")), z = () => {
|
|
325
|
+
let e = D.value;
|
|
322
326
|
if (!e) return;
|
|
323
|
-
let t =
|
|
324
|
-
if (
|
|
325
|
-
|
|
327
|
+
let t = de(e, o.value);
|
|
328
|
+
if (o.value === n.HEX && typeof t == "string") {
|
|
329
|
+
p.value = t;
|
|
326
330
|
return;
|
|
327
331
|
}
|
|
328
|
-
typeof t == "object" && (
|
|
332
|
+
typeof t == "object" && (_.value = String(t.first), b.value = String(t.second), S.value = String(t.third));
|
|
329
333
|
};
|
|
330
|
-
|
|
331
|
-
r,
|
|
334
|
+
R([
|
|
332
335
|
i,
|
|
333
|
-
|
|
336
|
+
o,
|
|
337
|
+
D
|
|
334
338
|
], () => {
|
|
335
|
-
|
|
339
|
+
z();
|
|
336
340
|
}), O(() => {
|
|
337
341
|
T(() => {
|
|
338
|
-
|
|
342
|
+
z();
|
|
339
343
|
});
|
|
340
344
|
});
|
|
341
|
-
let
|
|
345
|
+
let U = () => {
|
|
342
346
|
if (e.disabled || e.readonly) return;
|
|
343
|
-
if (
|
|
344
|
-
let e =
|
|
345
|
-
e && (
|
|
347
|
+
if (o.value === n.HEX) {
|
|
348
|
+
let e = fe(n.HEX, p.value);
|
|
349
|
+
e && (i.value = e), z();
|
|
346
350
|
return;
|
|
347
351
|
}
|
|
348
|
-
let t =
|
|
349
|
-
first: Number.parseInt(
|
|
350
|
-
second: Number.parseInt(
|
|
351
|
-
third: Number.parseInt(
|
|
352
|
+
let t = fe(o.value, {
|
|
353
|
+
first: Number.parseInt(_.value, 10),
|
|
354
|
+
second: Number.parseInt(b.value, 10),
|
|
355
|
+
third: Number.parseInt(S.value, 10)
|
|
352
356
|
});
|
|
353
|
-
t && (
|
|
354
|
-
},
|
|
355
|
-
e.key === "Enter" && (e.preventDefault(),
|
|
357
|
+
t && (i.value = t), z();
|
|
358
|
+
}, W = (e) => {
|
|
359
|
+
e.key === "Enter" && (e.preventDefault(), U());
|
|
356
360
|
};
|
|
357
|
-
return (t,
|
|
361
|
+
return (t, i) => (k(), v("div", w({ class: ["s-ui-color-values", {
|
|
358
362
|
"s-ui-color-values--disabled": e.disabled,
|
|
359
363
|
"s-ui-color-values--readonly": e.readonly
|
|
360
|
-
}] }, t.$attrs), [y("div",
|
|
364
|
+
}] }, t.$attrs), [y("div", Se, [x(P(ee), {
|
|
361
365
|
ref_key: "previewSwatchRef",
|
|
362
|
-
ref:
|
|
366
|
+
ref: f,
|
|
363
367
|
class: "s-ui-color-values__preview",
|
|
364
|
-
color:
|
|
365
|
-
size:
|
|
368
|
+
color: E.value,
|
|
369
|
+
size: P(V).SIZE_32,
|
|
366
370
|
disabled: e.disabled,
|
|
367
371
|
tabindex: "-1",
|
|
368
372
|
"aria-hidden": "true"
|
|
@@ -370,33 +374,34 @@ var U = (e) => Math.max(0, Math.min(255, Math.round(e))), ee = (e) => {
|
|
|
370
374
|
"color",
|
|
371
375
|
"size",
|
|
372
376
|
"disabled"
|
|
373
|
-
]), y("div",
|
|
374
|
-
modelValue:
|
|
375
|
-
"onUpdate:modelValue":
|
|
377
|
+
]), y("div", Ce, [x(P(m), {
|
|
378
|
+
modelValue: o.value,
|
|
379
|
+
"onUpdate:modelValue": i[0] ||= (e) => o.value = e,
|
|
376
380
|
class: "s-ui-color-values__format-select",
|
|
377
|
-
options:
|
|
381
|
+
options: C.value,
|
|
378
382
|
disabled: e.disabled,
|
|
379
383
|
readonly: e.readonly,
|
|
380
384
|
bordered: !0,
|
|
381
385
|
clearable: !1,
|
|
382
386
|
"close-on-select": !0,
|
|
383
387
|
"fit-viewport": !1,
|
|
384
|
-
"aria-label": "
|
|
385
|
-
onOpen:
|
|
386
|
-
onClose:
|
|
388
|
+
"aria-label": P(r)("colorValues.format"),
|
|
389
|
+
onOpen: i[1] ||= (e) => d("formatDropdownOpen"),
|
|
390
|
+
onClose: i[2] ||= (e) => d("formatDropdownClose")
|
|
387
391
|
}, null, 8, [
|
|
388
392
|
"modelValue",
|
|
389
393
|
"options",
|
|
390
394
|
"disabled",
|
|
391
|
-
"readonly"
|
|
392
|
-
|
|
393
|
-
|
|
395
|
+
"readonly",
|
|
396
|
+
"aria-label"
|
|
397
|
+
])])]), y("div", we, [
|
|
398
|
+
x(P(u), {
|
|
394
399
|
class: "s-ui-color-values__pipette",
|
|
395
|
-
appearance:
|
|
396
|
-
variant:
|
|
397
|
-
size:
|
|
400
|
+
appearance: P(l).BARE,
|
|
401
|
+
variant: P(c).NEUTRAL,
|
|
402
|
+
size: P(s).SMALL,
|
|
398
403
|
icon: "pipette",
|
|
399
|
-
"aria-label": "
|
|
404
|
+
"aria-label": P(r)("colorValues.pickColor"),
|
|
400
405
|
"aria-disabled": "true",
|
|
401
406
|
disabled: e.disabled,
|
|
402
407
|
tabindex: "-1"
|
|
@@ -404,72 +409,73 @@ var U = (e) => Math.max(0, Math.min(255, Math.round(e))), ee = (e) => {
|
|
|
404
409
|
"appearance",
|
|
405
410
|
"variant",
|
|
406
411
|
"size",
|
|
412
|
+
"aria-label",
|
|
407
413
|
"disabled"
|
|
408
414
|
]),
|
|
409
|
-
|
|
415
|
+
i[9] ||= y("span", {
|
|
410
416
|
class: "s-ui-color-values__separator",
|
|
411
417
|
"aria-hidden": "true"
|
|
412
418
|
}, null, -1),
|
|
413
|
-
y("div",
|
|
414
|
-
"onUpdate:modelValue":
|
|
419
|
+
y("div", Te, [o.value === P(n).HEX ? (k(), v("div", Ee, [B(y("input", {
|
|
420
|
+
"onUpdate:modelValue": i[3] ||= (e) => p.value = e,
|
|
415
421
|
class: "s-ui-color-values__input s-ui-typography-body-14-regular",
|
|
416
422
|
type: "text",
|
|
417
423
|
inputmode: "text",
|
|
418
424
|
spellcheck: "false",
|
|
419
425
|
disabled: e.disabled,
|
|
420
426
|
readonly: e.readonly,
|
|
421
|
-
"aria-label": "
|
|
422
|
-
onBlur:
|
|
423
|
-
onKeydown:
|
|
424
|
-
}, null, 40,
|
|
425
|
-
y("div",
|
|
426
|
-
"onUpdate:modelValue":
|
|
427
|
+
"aria-label": P(r)("colorValues.hexValue"),
|
|
428
|
+
onBlur: U,
|
|
429
|
+
onKeydown: W
|
|
430
|
+
}, null, 40, De), [[L, p.value]])])) : (k(), v(h, { key: 1 }, [
|
|
431
|
+
y("div", Oe, [B(y("input", {
|
|
432
|
+
"onUpdate:modelValue": i[4] ||= (e) => _.value = e,
|
|
427
433
|
class: "s-ui-color-values__input s-ui-typography-body-14-regular",
|
|
428
434
|
type: "text",
|
|
429
435
|
inputmode: "numeric",
|
|
430
436
|
spellcheck: "false",
|
|
431
437
|
disabled: e.disabled,
|
|
432
438
|
readonly: e.readonly,
|
|
433
|
-
"aria-label":
|
|
434
|
-
onBlur:
|
|
435
|
-
onKeydown:
|
|
436
|
-
}, null, 40,
|
|
437
|
-
|
|
439
|
+
"aria-label": j.value,
|
|
440
|
+
onBlur: U,
|
|
441
|
+
onKeydown: W
|
|
442
|
+
}, null, 40, ke), [[L, _.value]])]),
|
|
443
|
+
i[7] ||= y("span", {
|
|
438
444
|
class: "s-ui-color-values__separator",
|
|
439
445
|
"aria-hidden": "true"
|
|
440
446
|
}, null, -1),
|
|
441
|
-
y("div",
|
|
442
|
-
"onUpdate:modelValue":
|
|
447
|
+
y("div", Ae, [B(y("input", {
|
|
448
|
+
"onUpdate:modelValue": i[5] ||= (e) => b.value = e,
|
|
443
449
|
class: "s-ui-color-values__input s-ui-typography-body-14-regular",
|
|
444
450
|
type: "text",
|
|
445
451
|
inputmode: "numeric",
|
|
446
452
|
spellcheck: "false",
|
|
447
453
|
disabled: e.disabled,
|
|
448
454
|
readonly: e.readonly,
|
|
449
|
-
"aria-label":
|
|
450
|
-
onBlur:
|
|
451
|
-
onKeydown:
|
|
452
|
-
}, null, 40,
|
|
453
|
-
|
|
455
|
+
"aria-label": M.value,
|
|
456
|
+
onBlur: U,
|
|
457
|
+
onKeydown: W
|
|
458
|
+
}, null, 40, je), [[L, b.value]])]),
|
|
459
|
+
i[8] ||= y("span", {
|
|
454
460
|
class: "s-ui-color-values__separator",
|
|
455
461
|
"aria-hidden": "true"
|
|
456
462
|
}, null, -1),
|
|
457
|
-
y("div",
|
|
458
|
-
"onUpdate:modelValue":
|
|
463
|
+
y("div", Me, [B(y("input", {
|
|
464
|
+
"onUpdate:modelValue": i[6] ||= (e) => S.value = e,
|
|
459
465
|
class: "s-ui-color-values__input s-ui-typography-body-14-regular",
|
|
460
466
|
type: "text",
|
|
461
467
|
inputmode: "numeric",
|
|
462
468
|
spellcheck: "false",
|
|
463
469
|
disabled: e.disabled,
|
|
464
470
|
readonly: e.readonly,
|
|
465
|
-
"aria-label":
|
|
466
|
-
onBlur:
|
|
467
|
-
onKeydown:
|
|
468
|
-
}, null, 40,
|
|
471
|
+
"aria-label": N.value,
|
|
472
|
+
onBlur: U,
|
|
473
|
+
onKeydown: W
|
|
474
|
+
}, null, 40, Ne), [[L, S.value]])])
|
|
469
475
|
], 64))])
|
|
470
476
|
])], 16));
|
|
471
477
|
}
|
|
472
|
-
}),
|
|
478
|
+
}), Pe = { class: "s-ui-color-picker__section" }, Fe = { class: "s-ui-color-picker__label" }, Ie = { class: "s-ui-color-picker__section" }, Le = { class: "s-ui-color-picker__label" }, Re = { class: "s-ui-color-picker__custom-editor" }, ze = { class: "s-ui-color-picker__custom-actions" }, Be = /* @__PURE__ */ S({
|
|
473
479
|
__name: "SColorPicker",
|
|
474
480
|
props: /*@__PURE__*/ C({
|
|
475
481
|
disabled: {
|
|
@@ -490,55 +496,55 @@ var U = (e) => Math.max(0, Math.min(255, Math.round(e))), ee = (e) => {
|
|
|
490
496
|
"formatDropdownClose"
|
|
491
497
|
], ["update:modelValue"]),
|
|
492
498
|
setup(e, { emit: a }) {
|
|
493
|
-
let o =
|
|
499
|
+
let o = F(e, "modelValue"), m = a, { t: h } = H(), v = A(!1), S = A("#526DE3"), C = A(n.HEX), T = g(() => e.recommendedColors && e.recommendedColors.length > 0 ? e.recommendedColors : r), D = g(() => e.recentColors.length <= 17 ? e.recentColors : e.recentColors.slice(0, 17)), O = () => {
|
|
494
500
|
if (o.value) {
|
|
495
|
-
|
|
501
|
+
S.value = o.value;
|
|
496
502
|
return;
|
|
497
503
|
}
|
|
498
|
-
|
|
499
|
-
},
|
|
504
|
+
S.value = "#526DE3";
|
|
505
|
+
}, j = (e) => {
|
|
500
506
|
m("select", e);
|
|
501
|
-
},
|
|
502
|
-
o.value =
|
|
503
|
-
},
|
|
504
|
-
|
|
507
|
+
}, N = () => {
|
|
508
|
+
o.value = S.value, m("select", S.value), v.value = !1;
|
|
509
|
+
}, I = () => {
|
|
510
|
+
v.value = !1;
|
|
505
511
|
};
|
|
506
|
-
return
|
|
512
|
+
return R(v, (e, t) => {
|
|
507
513
|
if (e && !t) {
|
|
508
|
-
|
|
514
|
+
O(), m("customEditorOpen");
|
|
509
515
|
return;
|
|
510
516
|
}
|
|
511
517
|
!e && t && m("customEditorClose");
|
|
512
|
-
}), (n, r) => (k(), _(
|
|
513
|
-
default:
|
|
518
|
+
}), (n, r) => (k(), _(P(p), w({ width: 336 }, n.$attrs), {
|
|
519
|
+
default: z(() => [y("div", { class: E(["s-ui-color-picker", { "s-ui-color-picker--disabled": e.disabled }]) }, [y("section", Pe, [y("span", Fe, M(P(h)("colorPicker.recommendedColors")), 1), x(P(i), {
|
|
514
520
|
modelValue: o.value,
|
|
515
521
|
"onUpdate:modelValue": r[0] ||= (e) => o.value = e,
|
|
516
522
|
class: "s-ui-color-picker__palette",
|
|
517
|
-
layout:
|
|
518
|
-
colors:
|
|
519
|
-
size:
|
|
523
|
+
layout: P(t).GRID,
|
|
524
|
+
colors: T.value,
|
|
525
|
+
size: P(V).SIZE_32,
|
|
520
526
|
disabled: e.disabled,
|
|
521
|
-
onSelect:
|
|
527
|
+
onSelect: j
|
|
522
528
|
}, null, 8, [
|
|
523
529
|
"modelValue",
|
|
524
530
|
"layout",
|
|
525
531
|
"colors",
|
|
526
532
|
"size",
|
|
527
533
|
"disabled"
|
|
528
|
-
])]), y("section",
|
|
534
|
+
])]), y("section", Ie, [y("span", Le, M(P(h)("colorPicker.recentColors")), 1), x(P(i), {
|
|
529
535
|
modelValue: o.value,
|
|
530
536
|
"onUpdate:modelValue": r[7] ||= (e) => o.value = e,
|
|
531
537
|
class: "s-ui-color-picker__palette",
|
|
532
|
-
layout:
|
|
533
|
-
colors:
|
|
534
|
-
size:
|
|
538
|
+
layout: P(t).ROW,
|
|
539
|
+
colors: D.value,
|
|
540
|
+
size: P(V).SIZE_32,
|
|
535
541
|
disabled: e.disabled,
|
|
536
|
-
onSelect:
|
|
542
|
+
onSelect: j
|
|
537
543
|
}, {
|
|
538
|
-
append:
|
|
539
|
-
modelValue:
|
|
540
|
-
"onUpdate:modelValue": r[6] ||= (e) =>
|
|
541
|
-
placement:
|
|
544
|
+
append: z(() => [x(P(f), {
|
|
545
|
+
modelValue: v.value,
|
|
546
|
+
"onUpdate:modelValue": r[6] ||= (e) => v.value = e,
|
|
547
|
+
placement: P(d).RIGHT_START,
|
|
542
548
|
offset: 8,
|
|
543
549
|
shift: !0,
|
|
544
550
|
flip: !0,
|
|
@@ -546,47 +552,48 @@ var U = (e) => Math.max(0, Math.min(255, Math.round(e))), ee = (e) => {
|
|
|
546
552
|
"dismiss-on-click-outside": !0,
|
|
547
553
|
"dismiss-on-escape": !0
|
|
548
554
|
}, {
|
|
549
|
-
trigger:
|
|
555
|
+
trigger: z(({ toggle: t, triggerProps: n }) => [x(P(u), w(n, {
|
|
550
556
|
class: "s-ui-color-picker__add-button",
|
|
551
|
-
appearance:
|
|
552
|
-
variant:
|
|
553
|
-
size:
|
|
557
|
+
appearance: P(l).OUTLINED,
|
|
558
|
+
variant: P(c).NEUTRAL,
|
|
559
|
+
size: P(s).SMALL,
|
|
554
560
|
icon: "plus",
|
|
555
|
-
"aria-label": "
|
|
561
|
+
"aria-label": P(h)("colorPicker.addCustomColor"),
|
|
556
562
|
disabled: e.disabled,
|
|
557
563
|
onClick: t
|
|
558
564
|
}), null, 16, [
|
|
559
565
|
"appearance",
|
|
560
566
|
"variant",
|
|
561
567
|
"size",
|
|
568
|
+
"aria-label",
|
|
562
569
|
"disabled",
|
|
563
570
|
"onClick"
|
|
564
571
|
])]),
|
|
565
|
-
content:
|
|
566
|
-
footer:
|
|
572
|
+
content: z(() => [x(P(p), { width: 320 }, {
|
|
573
|
+
footer: z(() => [y("div", ze, [x(P(u), {
|
|
567
574
|
class: "s-ui-color-picker__save-button",
|
|
568
|
-
appearance:
|
|
569
|
-
variant:
|
|
570
|
-
size:
|
|
575
|
+
appearance: P(l).MAJOR,
|
|
576
|
+
variant: P(c).MAIN,
|
|
577
|
+
size: P(s).SMALL,
|
|
571
578
|
disabled: e.disabled,
|
|
572
|
-
onClick:
|
|
579
|
+
onClick: N
|
|
573
580
|
}, {
|
|
574
|
-
default:
|
|
581
|
+
default: z(() => [b(M(P(h)("colorPicker.save")), 1)]),
|
|
575
582
|
_: 1
|
|
576
583
|
}, 8, [
|
|
577
584
|
"appearance",
|
|
578
585
|
"variant",
|
|
579
586
|
"size",
|
|
580
587
|
"disabled"
|
|
581
|
-
]), x(
|
|
588
|
+
]), x(P(u), {
|
|
582
589
|
class: "s-ui-color-picker__cancel-button",
|
|
583
|
-
appearance:
|
|
584
|
-
variant:
|
|
585
|
-
size:
|
|
590
|
+
appearance: P(l).MINOR,
|
|
591
|
+
variant: P(c).NEUTRAL,
|
|
592
|
+
size: P(s).SMALL,
|
|
586
593
|
disabled: e.disabled,
|
|
587
|
-
onClick:
|
|
594
|
+
onClick: I
|
|
588
595
|
}, {
|
|
589
|
-
default:
|
|
596
|
+
default: z(() => [b(M(P(h)("colorPicker.cancel")), 1)]),
|
|
590
597
|
_: 1
|
|
591
598
|
}, 8, [
|
|
592
599
|
"appearance",
|
|
@@ -594,15 +601,15 @@ var U = (e) => Math.max(0, Math.min(255, Math.round(e))), ee = (e) => {
|
|
|
594
601
|
"size",
|
|
595
602
|
"disabled"
|
|
596
603
|
])])]),
|
|
597
|
-
default:
|
|
598
|
-
modelValue:
|
|
599
|
-
"onUpdate:modelValue": r[1] ||= (e) =>
|
|
604
|
+
default: z(() => [y("div", Re, [x(xe, {
|
|
605
|
+
modelValue: S.value,
|
|
606
|
+
"onUpdate:modelValue": r[1] ||= (e) => S.value = e,
|
|
600
607
|
disabled: e.disabled
|
|
601
|
-
}, null, 8, ["modelValue", "disabled"]), x(
|
|
602
|
-
modelValue:
|
|
603
|
-
"onUpdate:modelValue": r[2] ||= (e) =>
|
|
604
|
-
format:
|
|
605
|
-
"onUpdate:format": r[3] ||= (e) =>
|
|
608
|
+
}, null, 8, ["modelValue", "disabled"]), x($, {
|
|
609
|
+
modelValue: S.value,
|
|
610
|
+
"onUpdate:modelValue": r[2] ||= (e) => S.value = e,
|
|
611
|
+
format: C.value,
|
|
612
|
+
"onUpdate:format": r[3] ||= (e) => C.value = e,
|
|
606
613
|
disabled: e.disabled,
|
|
607
614
|
onFormatDropdownOpen: r[4] ||= (e) => m("formatDropdownOpen"),
|
|
608
615
|
onFormatDropdownClose: r[5] ||= (e) => m("formatDropdownClose")
|
|
@@ -632,4 +639,4 @@ var U = (e) => Math.max(0, Math.min(255, Math.round(e))), ee = (e) => {
|
|
|
632
639
|
}
|
|
633
640
|
});
|
|
634
641
|
//#endregion
|
|
635
|
-
export {
|
|
642
|
+
export { pe as i, $ as n, xe as r, Be as t };
|