geekin-devtoys 0.5.3 → 0.6.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.
Files changed (58) hide show
  1. package/lib/GBranched/style.css +5 -0
  2. package/lib/GButton/style.css +5 -0
  3. package/lib/GCard/style.css +5 -0
  4. package/lib/GColorPicker/index.js +1 -0
  5. package/lib/GColorPicker/index.mjs +572 -0
  6. package/lib/GColorPicker/style.css +98 -0
  7. package/lib/GColorPicker.d.ts +4 -0
  8. package/lib/GDialog/index.js +1 -1
  9. package/lib/GDialog/index.mjs +27 -27
  10. package/lib/GDialog/style.css +6 -1
  11. package/lib/GDropdown/style.css +5 -0
  12. package/lib/GInput/style.css +5 -0
  13. package/lib/GPicker/style.css +5 -0
  14. package/lib/GPie3D/style.css +5 -0
  15. package/lib/GPopover/index.js +1 -0
  16. package/lib/GPopover/index.mjs +179 -0
  17. package/lib/GPopover/style.css +98 -0
  18. package/lib/GPopover.d.ts +4 -0
  19. package/lib/GProgress/style.css +5 -0
  20. package/lib/GRing/style.css +5 -0
  21. package/lib/GScroller/style.css +5 -0
  22. package/lib/GSegment/style.css +5 -0
  23. package/lib/GSlider/index.js +1 -1
  24. package/lib/GSlider/index.mjs +200 -112
  25. package/lib/GSlider/style.css +6 -1
  26. package/lib/GSpin/index.js +1 -0
  27. package/lib/GSpin/index.mjs +163 -0
  28. package/lib/GSpin/style.css +98 -0
  29. package/lib/GSpin.d.ts +4 -0
  30. package/lib/GSteps/style.css +5 -0
  31. package/lib/GSwitch/style.css +5 -0
  32. package/lib/GTable/style.css +5 -0
  33. package/lib/GTag/style.css +5 -0
  34. package/lib/GToast/style.css +5 -0
  35. package/lib/GTree/style.css +5 -0
  36. package/lib/GVideo/style.css +5 -0
  37. package/lib/components/GColorPicker/__tests__/index.test.d.ts +1 -0
  38. package/lib/components/GColorPicker/color.d.ts +59 -0
  39. package/lib/components/GColorPicker/index.d.ts +30 -0
  40. package/lib/components/GColorPicker/types.d.ts +89 -0
  41. package/lib/components/GDialog/index.d.ts +2 -2
  42. package/lib/components/GDropdown/index.d.ts +3 -3
  43. package/lib/components/GInput/index.d.ts +2 -2
  44. package/lib/components/GPicker/index.d.ts +2 -2
  45. package/lib/components/GPopover/__tests__/index.test.d.ts +1 -0
  46. package/lib/components/GPopover/index.d.ts +48 -0
  47. package/lib/components/GPopover/types.d.ts +72 -0
  48. package/lib/components/GSegment/index.d.ts +1 -1
  49. package/lib/components/GSlider/index.d.ts +3 -1
  50. package/lib/components/GSlider/types.d.ts +27 -4
  51. package/lib/components/GSpin/__tests__/index.test.d.ts +1 -0
  52. package/lib/components/GSpin/index.d.ts +30 -0
  53. package/lib/components/GSpin/types.d.ts +174 -0
  54. package/lib/index/index.js +1 -1
  55. package/lib/index/index.mjs +61 -52
  56. package/lib/index/style.css +13 -2
  57. package/lib/index.d.ts +8 -2
  58. package/package.json +25 -1
@@ -0,0 +1,572 @@
1
+ import { defineComponent as He, ref as w, computed as b, watch as I, onUnmounted as Pe, createElementBlock as k, openBlock as y, normalizeClass as O, createCommentVNode as E, createElementVNode as d, normalizeStyle as $, unref as L, Fragment as U, renderList as X, toDisplayString as W } from "vue";
2
+ import { _ as Fe } from "../GBranched-vnLlYOl9.mjs";
3
+ const H = (o) => Math.round(Math.min(255, Math.max(0, o))), Te = [
4
+ "#ffffff",
5
+ "#bfbfbf",
6
+ "#8c8c8c",
7
+ "#595959",
8
+ "#262626",
9
+ "#000000",
10
+ "#f5222d",
11
+ "#fa541c",
12
+ "#fa8c16",
13
+ "#fadb14",
14
+ "#a0d911",
15
+ "#52c41a",
16
+ "#13c2c2",
17
+ "#1677ff",
18
+ "#2f54eb",
19
+ "#722ed1",
20
+ "#eb2f96",
21
+ "#f759ab"
22
+ ], h = (o) => Math.min(1, Math.max(0, o)), q = (o) => (o % 360 + 360) % 360;
23
+ function fe(o) {
24
+ const s = /^#([0-9a-f]+)$/i.exec(o.trim());
25
+ if (!s) return null;
26
+ const u = s[1];
27
+ if (u.length !== 3 && u.length !== 4 && u.length !== 6 && u.length !== 8) return null;
28
+ const r = u.length <= 4 ? u.split("").map((a) => a + a).join("") : u;
29
+ return {
30
+ r: parseInt(r.slice(0, 2), 16),
31
+ g: parseInt(r.slice(2, 4), 16),
32
+ b: parseInt(r.slice(4, 6), 16),
33
+ a: r.length === 8 ? parseInt(r.slice(6, 8), 16) / 255 : 1
34
+ };
35
+ }
36
+ function j(o, s, u) {
37
+ const r = o / 255, a = s / 255, i = u / 255, e = Math.max(r, a, i), c = Math.min(r, a, i), p = e - c;
38
+ let v = 0;
39
+ return p !== 0 && (e === r ? v = ((a - i) / p + 6) % 6 * 60 : e === a ? v = ((i - r) / p + 2) * 60 : v = ((r - a) / p + 4) * 60), { h: v, s: e === 0 ? 0 : p / e, v: e };
40
+ }
41
+ function he(o, s, u) {
42
+ const r = u * s, a = q(o) / 60, i = r * (1 - Math.abs(a % 2 - 1));
43
+ let e;
44
+ a < 1 ? e = [r, i, 0] : a < 2 ? e = [i, r, 0] : a < 3 ? e = [0, r, i] : a < 4 ? e = [0, i, r] : a < 5 ? e = [i, 0, r] : e = [r, 0, i];
45
+ const c = u - r;
46
+ return {
47
+ r: Math.round((e[0] + c) * 255),
48
+ g: Math.round((e[1] + c) * 255),
49
+ b: Math.round((e[2] + c) * 255)
50
+ };
51
+ }
52
+ function ge(o, s, u) {
53
+ const r = o / 255, a = s / 255, i = u / 255, e = Math.max(r, a, i), c = Math.min(r, a, i), p = e - c, v = (e + c) / 2;
54
+ let g = 0, M = 0;
55
+ return p !== 0 && (M = p / (1 - Math.abs(2 * v - 1)), e === r ? g = ((a - i) / p + 6) % 6 * 60 : e === a ? g = ((i - r) / p + 2) * 60 : g = ((r - a) / p + 4) * 60), { h: g, s: M, l: v };
56
+ }
57
+ function me(o, s, u) {
58
+ const r = (1 - Math.abs(2 * u - 1)) * s, a = q(o) / 60, i = r * (1 - Math.abs(a % 2 - 1));
59
+ let e;
60
+ a < 1 ? e = [r, i, 0] : a < 2 ? e = [i, r, 0] : a < 3 ? e = [0, r, i] : a < 4 ? e = [0, i, r] : a < 5 ? e = [i, 0, r] : e = [r, 0, i];
61
+ const c = u - r / 2;
62
+ return {
63
+ r: Math.round((e[0] + c) * 255),
64
+ g: Math.round((e[1] + c) * 255),
65
+ b: Math.round((e[2] + c) * 255)
66
+ };
67
+ }
68
+ const z = (o) => ({ ...j(o.r, o.g, o.b), a: h(o.a) }), Ke = {
69
+ black: "#000000",
70
+ white: "#ffffff",
71
+ red: "#ff0000",
72
+ green: "#008000",
73
+ blue: "#0000ff",
74
+ yellow: "#ffff00",
75
+ orange: "#ffa500",
76
+ purple: "#800080",
77
+ pink: "#ffc0cb",
78
+ brown: "#a52a2a",
79
+ gray: "#808080",
80
+ grey: "#808080",
81
+ silver: "#c0c0c0",
82
+ gold: "#ffd700",
83
+ cyan: "#00ffff",
84
+ magenta: "#ff00ff",
85
+ lime: "#00ff00",
86
+ teal: "#008080",
87
+ navy: "#000080",
88
+ maroon: "#800000",
89
+ olive: "#808000",
90
+ coral: "#ff7f50",
91
+ crimson: "#dc143c",
92
+ violet: "#ee82ee"
93
+ }, be = (o) => o.includes(",") ? o.split(",").map((s) => s.trim()) : o.split("/").flatMap((s) => s.trim().split(/\s+/)).filter(Boolean), P = (o, s) => {
94
+ if (o.endsWith("%")) {
95
+ const r = Number(o.slice(0, -1));
96
+ return Number.isNaN(r) ? null : r / 100 * s;
97
+ }
98
+ const u = Number(o);
99
+ return Number.isNaN(u) ? null : u;
100
+ }, Ge = (o) => {
101
+ const s = be(o);
102
+ if (s.length !== 3 && s.length !== 4) return null;
103
+ const u = s.slice(0, 3).map((a) => P(a, 255));
104
+ if (u.some((a) => a == null)) return null;
105
+ let r = 1;
106
+ if (s.length === 4) {
107
+ const a = P(s[3], 1);
108
+ if (a == null || Number.isNaN(a)) return null;
109
+ r = h(a);
110
+ }
111
+ return {
112
+ r: H(u[0]),
113
+ g: H(u[1]),
114
+ b: H(u[2]),
115
+ a: r
116
+ };
117
+ }, Ie = (o) => {
118
+ const s = be(o);
119
+ if (s.length !== 3 && s.length !== 4) return null;
120
+ const u = s[0].replace(/deg$/i, ""), r = P(u, 1), a = (v) => {
121
+ const g = v.endsWith("%") ? Number(v.slice(0, -1)) : Number(v);
122
+ return Number.isNaN(g) ? null : g / 100;
123
+ }, i = a(s[1]), e = a(s[2]);
124
+ if (r == null || i == null || e == null) return null;
125
+ let c = 1;
126
+ if (s.length === 4) {
127
+ const v = P(s[3], 1);
128
+ if (v == null || Number.isNaN(v)) return null;
129
+ c = h(v);
130
+ }
131
+ return { ...me(q(r), h(i), h(e)), a: c };
132
+ };
133
+ function A(o) {
134
+ const s = o.trim().toLowerCase();
135
+ if (!s) return null;
136
+ if (s === "transparent") return { h: 0, s: 0, v: 0, a: 0 };
137
+ const u = Ke[s], r = fe(s) ?? (u ? fe(u) : null);
138
+ if (r) return z(r);
139
+ const a = /^rgba?\(([^)]+)\)$/.exec(s);
140
+ if (a) {
141
+ const e = Ge(a[1]);
142
+ return e ? z(e) : null;
143
+ }
144
+ const i = /^hsla?\(([^)]+)\)$/.exec(s);
145
+ if (i) {
146
+ const e = Ie(i[1]);
147
+ return e ? z(e) : null;
148
+ }
149
+ return null;
150
+ }
151
+ const S = (o) => H(o).toString(16).padStart(2, "0"), ve = (o) => Number(h(o).toFixed(2));
152
+ function D(o, s, u) {
153
+ const r = u ? h(o.a) : 1, { r: a, g: i, b: e } = he(o.h, o.s, o.v), c = u && r < 1;
154
+ if (s === "hex") {
155
+ let _ = `#${S(a)}${S(i)}${S(e)}`;
156
+ return c && (_ += S(Math.round(r * 255))), _;
157
+ }
158
+ if (s === "rgb")
159
+ return c ? `rgba(${a}, ${i}, ${e}, ${ve(r)})` : `rgb(${a}, ${i}, ${e})`;
160
+ const { h: p, s: v, l: g } = ge(a, i, e), M = `${Math.round(p)}, ${Math.round(v * 100)}%, ${Math.round(g * 100)}%`;
161
+ return c ? `hsla(${M}, ${ve(r)})` : `hsl(${M})`;
162
+ }
163
+ const Oe = ["aria-label", "aria-expanded", "disabled"], Ue = {
164
+ key: 1,
165
+ class: "g-colorpicker-trigger__empty",
166
+ "aria-hidden": "true"
167
+ }, Xe = ["aria-valuenow"], We = ["aria-valuenow"], ze = { class: "g-colorpicker-tools" }, Ye = {
168
+ class: "g-colorpicker-formats",
169
+ role: "radiogroup",
170
+ "aria-label": "颜色格式"
171
+ }, je = ["aria-checked", "data-active", "onClick"], qe = { class: "g-colorpicker-fields" }, Je = ["data-wide"], Qe = {
172
+ class: "g-colorpicker-field-tag",
173
+ "aria-hidden": "true"
174
+ }, Ze = ["type", "min", "max", "value", "aria-label", "onChange"], et = {
175
+ key: 1,
176
+ class: "g-colorpicker-swatches"
177
+ }, tt = ["aria-label", "onClick"], nt = {
178
+ key: 2,
179
+ class: "g-colorpicker-footer"
180
+ }, at = {
181
+ class: "g-colorpicker-footer__preview",
182
+ "aria-hidden": "true"
183
+ }, lt = { class: "g-colorpicker-footer__text" }, pe = 6, rt = /* @__PURE__ */ He({
184
+ name: "GColorPicker",
185
+ __name: "index",
186
+ props: {
187
+ modelValue: { default: void 0 },
188
+ defaultValue: { default: "#1677ff" },
189
+ defaultFormat: { default: "hex" },
190
+ showAlpha: { type: Boolean, default: !0 },
191
+ predefined: { default: () => Te },
192
+ showPredefined: { type: Boolean, default: !0 },
193
+ confirmable: { type: Boolean, default: !0 },
194
+ clearable: { type: Boolean, default: !0 },
195
+ disabled: { type: Boolean, default: !1 },
196
+ inline: { type: Boolean, default: !1 },
197
+ placement: { default: "bottom" },
198
+ ariaLabel: { default: "Color picker" },
199
+ className: { default: "" }
200
+ },
201
+ emits: ["update:modelValue", "change"],
202
+ setup(o, { emit: s }) {
203
+ const u = [
204
+ { value: "hex", label: "HEX" },
205
+ { value: "rgb", label: "RGB" },
206
+ { value: "hsl", label: "HSL" }
207
+ ], r = {
208
+ ArrowLeft: { x: -1, y: 0 },
209
+ ArrowRight: { x: 1, y: 0 },
210
+ ArrowUp: { x: 0, y: 1 },
211
+ ArrowDown: { x: 0, y: -1 }
212
+ }, a = o, i = s, e = w(
213
+ A(a.modelValue ?? a.defaultValue) ?? { h: 210, s: 0.9, v: 0.96, a: 1 }
214
+ ), c = w(a.defaultFormat), p = b(() => a.modelValue !== void 0), v = w(a.defaultValue ?? ""), g = b(() => p.value ? a.modelValue : v.value), M = b(() => g.value === ""), _ = b(() => D(e.value, "hex", !0)), J = b(() => D(e.value, "rgb", !0)), N = b(() => {
215
+ const t = he(e.value.h, e.value.s, e.value.v);
216
+ return { r: t.r, g: t.g, b: t.b };
217
+ }), R = b(() => {
218
+ const { r: t, g: n, b: l } = N.value, { h: f, s: m, l: B } = ge(t, n, l);
219
+ return { h: Math.round(f), s: Math.round(m * 100), l: Math.round(B * 100) };
220
+ }), Q = () => {
221
+ if (e.value.a === 0) {
222
+ g.value !== "" && (p.value || (v.value = ""), i("update:modelValue", ""), i("change", ""));
223
+ return;
224
+ }
225
+ const t = D(e.value, c.value, a.showAlpha);
226
+ t !== g.value && (p.value || (v.value = t), i("update:modelValue", t), i("change", t));
227
+ }, x = () => {
228
+ a.confirmable || Q();
229
+ }, ke = () => {
230
+ e.value = { ...e.value, a: 0 }, !a.confirmable && (M.value || (p.value || (v.value = ""), i("update:modelValue", ""), i("change", "")));
231
+ }, ye = (t) => {
232
+ const n = A(t);
233
+ n && (e.value = n, x());
234
+ }, we = (t) => {
235
+ if (M.value) return !1;
236
+ const n = A(t);
237
+ return !!n && D(n, "hex", !0) === _.value;
238
+ };
239
+ I(
240
+ () => a.modelValue,
241
+ (t) => {
242
+ if (t === void 0) return;
243
+ if (t === "") {
244
+ e.value = { ...e.value, a: 0 };
245
+ return;
246
+ }
247
+ const n = A(t);
248
+ n && D(n, "hex", !0) !== _.value && (e.value = n);
249
+ }
250
+ );
251
+ const Z = w(null), ee = w(null), te = w(null), F = (t) => (n) => {
252
+ if (a.disabled) return;
253
+ n.preventDefault(), t(n);
254
+ const l = (m) => t(m), f = () => {
255
+ window.removeEventListener("pointermove", l), window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f);
256
+ };
257
+ window.addEventListener("pointermove", l), window.addEventListener("pointerup", f), window.addEventListener("pointercancel", f);
258
+ }, ne = F((t) => {
259
+ const n = Z.value;
260
+ if (!n) return;
261
+ const l = n.getBoundingClientRect();
262
+ if (!l.width || !l.height) return;
263
+ const f = h((t.clientX - l.left) / l.width), m = h(1 - (t.clientY - l.top) / l.height);
264
+ e.value = { ...e.value, s: f, v: m, a: e.value.a === 0 ? 1 : e.value.a }, x();
265
+ }), ae = F((t) => {
266
+ const n = ee.value;
267
+ if (!n) return;
268
+ const l = n.getBoundingClientRect();
269
+ if (!l.width) return;
270
+ const f = h((t.clientX - l.left) / l.width) * 360;
271
+ e.value = { ...e.value, h: f, a: e.value.a === 0 ? 1 : e.value.a }, x();
272
+ }), le = F((t) => {
273
+ const n = te.value;
274
+ if (!n) return;
275
+ const l = n.getBoundingClientRect();
276
+ l.width && (e.value = { ...e.value, a: h((t.clientX - l.left) / l.width) }, x());
277
+ }), xe = (t) => {
278
+ const n = r[t.key];
279
+ n && (t.preventDefault(), e.value = {
280
+ ...e.value,
281
+ s: h(e.value.s + n.x * 0.02),
282
+ v: h(e.value.v + n.y * 0.02),
283
+ a: e.value.a === 0 ? 1 : e.value.a
284
+ }, x());
285
+ }, Me = (t) => {
286
+ const n = r[t.key];
287
+ n && (t.preventDefault(), e.value = { ...e.value, h: (e.value.h + n.x * 3 + 360) % 360 }, x());
288
+ }, _e = (t) => {
289
+ const n = r[t.key];
290
+ n && (t.preventDefault(), e.value = { ...e.value, a: h(e.value.a + n.x * 0.05) }, x());
291
+ }, Ne = b(() => {
292
+ if (c.value === "hex")
293
+ return [{ key: "hex", tag: "#", label: "十六进制颜色值", type: "text" }];
294
+ if (c.value === "rgb") {
295
+ const n = [
296
+ { key: "r", tag: "R", label: "红 R(0-255)", type: "number", min: 0, max: 255 },
297
+ { key: "g", tag: "G", label: "绿 G(0-255)", type: "number", min: 0, max: 255 },
298
+ { key: "b", tag: "B", label: "蓝 B(0-255)", type: "number", min: 0, max: 255 }
299
+ ];
300
+ return a.showAlpha ? [
301
+ ...n,
302
+ { key: "a", tag: "A", label: "透明度 A(0-100)", type: "number", min: 0, max: 100 }
303
+ ] : n;
304
+ }
305
+ const t = [
306
+ { key: "h", tag: "H", label: "色相 H(0-360)", type: "number", min: 0, max: 360 },
307
+ { key: "s", tag: "S", label: "饱和度 S(0-100)", type: "number", min: 0, max: 100 },
308
+ { key: "l", tag: "L", label: "明度 L(0-100)", type: "number", min: 0, max: 100 }
309
+ ];
310
+ return a.showAlpha ? [
311
+ ...t,
312
+ { key: "a", tag: "A", label: "透明度 A(0-100)", type: "number", min: 0, max: 100 }
313
+ ] : t;
314
+ }), re = (t) => t === "hex" ? _.value : t === "a" ? Math.round(e.value.a * 100) : t === "r" ? N.value.r : t === "g" ? N.value.g : t === "b" ? N.value.b : t === "h" ? R.value.h : t === "s" ? R.value.s : R.value.l, $e = (t, n) => {
315
+ if (t === "r" || t === "g" || t === "b") {
316
+ const G = {
317
+ r: t === "r" ? Math.min(255, Math.max(0, Math.round(n))) : N.value.r,
318
+ g: t === "g" ? Math.min(255, Math.max(0, Math.round(n))) : N.value.g,
319
+ b: t === "b" ? Math.min(255, Math.max(0, Math.round(n))) : N.value.b
320
+ };
321
+ e.value = { ...j(G.r, G.g, G.b), a: e.value.a }, x();
322
+ return;
323
+ }
324
+ if (t === "a") {
325
+ e.value = { ...e.value, a: h(n / 100) }, x();
326
+ return;
327
+ }
328
+ const l = t === "h" ? Math.min(360, Math.max(0, n)) : R.value.h, f = t === "s" ? Math.min(100, Math.max(0, n)) : R.value.s, m = t === "l" ? Math.min(100, Math.max(0, n)) : R.value.l, B = me(l, h(f / 100), h(m / 100));
329
+ e.value = { ...j(B.r, B.g, B.b), a: e.value.a }, x();
330
+ }, Ce = (t, n) => {
331
+ const l = n.target;
332
+ if (t === "hex") {
333
+ const m = A(l.value);
334
+ m && (e.value = m), x(), l.value = _.value;
335
+ return;
336
+ }
337
+ const f = Number(l.value);
338
+ Number.isNaN(f) || $e(t, f), l.value = String(re(t));
339
+ }, oe = w(null), se = w(null), ie = w(null), C = w(!1), ue = w(a.placement === "top"), ce = w(!1), de = b(() => a.inline || C.value), Re = () => {
340
+ const t = A(g.value);
341
+ e.value = t ?? { ...e.value, a: 0 };
342
+ }, V = () => {
343
+ a.confirmable && Re(), C.value = !1;
344
+ }, Ee = () => {
345
+ Q(), C.value = !1;
346
+ }, Le = () => {
347
+ a.disabled || (C.value ? V() : C.value = !0);
348
+ };
349
+ I(C, (t) => {
350
+ if (!t) return;
351
+ const n = se.value?.getBoundingClientRect(), l = ie.value?.getBoundingClientRect();
352
+ if (!n || !l) return;
353
+ const f = n.bottom + pe + l.height <= window.innerHeight, m = n.top - pe - l.height >= 0;
354
+ ue.value = a.placement === "top" ? !m && f : !f && m, ce.value = n.left + l.width > window.innerWidth && n.right - l.width > 0;
355
+ });
356
+ const T = (t) => {
357
+ const n = t.target;
358
+ n && oe.value?.contains(n) || V();
359
+ }, K = (t) => {
360
+ t.key === "Escape" && V();
361
+ };
362
+ I(de, (t) => {
363
+ a.inline || (t ? (document.addEventListener("pointerdown", T, !0), document.addEventListener("keydown", K, !0)) : (document.removeEventListener("pointerdown", T, !0), document.removeEventListener("keydown", K, !0)));
364
+ }), Pe(() => {
365
+ document.removeEventListener("pointerdown", T, !0), document.removeEventListener("keydown", K, !0);
366
+ });
367
+ const Ae = b(() => `hsl(${Math.round(e.value.h)}, 100%, 50%)`), Be = b(() => ({
368
+ left: `${e.value.s * 100}%`,
369
+ top: `${(1 - e.value.v) * 100}%`
370
+ })), De = b(() => {
371
+ const { r: t, g: n, b: l } = N.value;
372
+ return `linear-gradient(to right, rgba(${t}, ${n}, ${l}, 0), rgb(${t}, ${n}, ${l}))`;
373
+ }), Ve = b(() => Math.round(e.value.h)), Se = b(() => Math.round(e.value.a * 100));
374
+ return (t, n) => (y(), k("div", {
375
+ ref_key: "rootRef",
376
+ ref: oe,
377
+ class: O(["g-colorpicker", [t.className, { "is-disabled": t.disabled, "is-inline": t.inline }]])
378
+ }, [
379
+ t.inline ? E("", !0) : (y(), k("button", {
380
+ key: 0,
381
+ ref_key: "triggerRef",
382
+ ref: se,
383
+ type: "button",
384
+ class: "g-colorpicker-trigger",
385
+ "aria-label": t.ariaLabel,
386
+ "aria-expanded": C.value,
387
+ disabled: t.disabled,
388
+ onClick: Le
389
+ }, [
390
+ n[3] || (n[3] = d("span", {
391
+ class: "g-colorpicker-checker g-colorpicker-trigger__board",
392
+ "aria-hidden": "true"
393
+ }, null, -1)),
394
+ M.value ? (y(), k("span", Ue)) : (y(), k("span", {
395
+ key: 0,
396
+ class: "g-colorpicker-trigger__swatch",
397
+ style: $({ background: J.value }),
398
+ "aria-hidden": "true"
399
+ }, null, 4))
400
+ ], 8, Oe)),
401
+ de.value ? (y(), k("div", {
402
+ key: 1,
403
+ ref_key: "panelRef",
404
+ ref: ie,
405
+ class: O(["g-colorpicker-panel", { "is-up": ue.value, "is-right": ce.value }]),
406
+ role: "dialog",
407
+ "aria-label": "颜色选择面板"
408
+ }, [
409
+ d("div", {
410
+ ref_key: "svRef",
411
+ ref: Z,
412
+ class: "g-colorpicker-sv",
413
+ tabindex: "0",
414
+ "aria-label": "颜色区域,方向键微调饱和度与明度",
415
+ style: $({ background: Ae.value }),
416
+ onPointerdown: n[0] || (n[0] = //@ts-ignore
417
+ (...l) => L(ne) && L(ne)(...l)),
418
+ onKeydown: xe
419
+ }, [
420
+ n[4] || (n[4] = d("span", {
421
+ class: "g-colorpicker-sv__white",
422
+ "aria-hidden": "true"
423
+ }, null, -1)),
424
+ n[5] || (n[5] = d("span", {
425
+ class: "g-colorpicker-sv__black",
426
+ "aria-hidden": "true"
427
+ }, null, -1)),
428
+ d("span", {
429
+ class: "g-colorpicker-thumb",
430
+ style: $(Be.value),
431
+ "aria-hidden": "true"
432
+ }, null, 4)
433
+ ], 36),
434
+ d("div", {
435
+ ref_key: "hueRef",
436
+ ref: ee,
437
+ class: "g-colorpicker-slider g-colorpicker-slider--hue",
438
+ role: "slider",
439
+ tabindex: "0",
440
+ "aria-label": "色相",
441
+ "aria-valuemin": "0",
442
+ "aria-valuemax": "360",
443
+ "aria-valuenow": Ve.value,
444
+ onPointerdown: n[1] || (n[1] = //@ts-ignore
445
+ (...l) => L(ae) && L(ae)(...l)),
446
+ onKeydown: Me
447
+ }, [
448
+ d("span", {
449
+ class: "g-colorpicker-thumb",
450
+ style: $({ left: `${e.value.h / 360 * 100}%` }),
451
+ "aria-hidden": "true"
452
+ }, null, 4)
453
+ ], 40, Xe),
454
+ t.showAlpha ? (y(), k("div", {
455
+ key: 0,
456
+ ref_key: "alphaRef",
457
+ ref: te,
458
+ class: "g-colorpicker-slider g-colorpicker-slider--alpha",
459
+ role: "slider",
460
+ tabindex: "0",
461
+ "aria-label": "透明度",
462
+ "aria-valuemin": "0",
463
+ "aria-valuemax": "100",
464
+ "aria-valuenow": Se.value,
465
+ onPointerdown: n[2] || (n[2] = //@ts-ignore
466
+ (...l) => L(le) && L(le)(...l)),
467
+ onKeydown: _e
468
+ }, [
469
+ n[6] || (n[6] = d("span", {
470
+ class: "g-colorpicker-checker g-colorpicker-alpha__board",
471
+ "aria-hidden": "true"
472
+ }, null, -1)),
473
+ d("span", {
474
+ class: "g-colorpicker-alpha__track",
475
+ style: $({ background: De.value }),
476
+ "aria-hidden": "true"
477
+ }, null, 4),
478
+ d("span", {
479
+ class: "g-colorpicker-thumb",
480
+ style: $({ left: `${e.value.a * 100}%` }),
481
+ "aria-hidden": "true"
482
+ }, null, 4)
483
+ ], 40, We)) : E("", !0),
484
+ d("div", ze, [
485
+ d("div", Ye, [
486
+ (y(), k(U, null, X(u, (l) => d("button", {
487
+ key: l.value,
488
+ type: "button",
489
+ class: "g-colorpicker-format",
490
+ role: "radio",
491
+ "aria-checked": c.value === l.value,
492
+ "data-active": c.value === l.value ? "" : void 0,
493
+ onClick: (f) => c.value = l.value
494
+ }, W(l.label), 9, je)), 64))
495
+ ]),
496
+ t.clearable ? (y(), k("button", {
497
+ key: 0,
498
+ type: "button",
499
+ class: "g-colorpicker-clear",
500
+ "aria-label": "清除颜色(设为透明)",
501
+ onClick: ke
502
+ }, n[7] || (n[7] = [
503
+ d("span", {
504
+ class: "g-colorpicker-checker g-colorpicker-clear__board",
505
+ "aria-hidden": "true"
506
+ }, null, -1),
507
+ d("span", {
508
+ class: "g-colorpicker-clear__line",
509
+ "aria-hidden": "true"
510
+ }, null, -1)
511
+ ]))) : E("", !0)
512
+ ]),
513
+ d("div", qe, [
514
+ (y(!0), k(U, null, X(Ne.value, (l) => (y(), k("label", {
515
+ key: l.key,
516
+ class: "g-colorpicker-field-wrap",
517
+ "data-wide": l.key === "hex" ? "" : void 0
518
+ }, [
519
+ d("span", Qe, W(l.tag), 1),
520
+ d("input", {
521
+ class: "g-colorpicker-field",
522
+ type: l.type,
523
+ min: l.min,
524
+ max: l.max,
525
+ value: re(l.key),
526
+ "aria-label": l.label,
527
+ spellcheck: "false",
528
+ onChange: (f) => Ce(l.key, f)
529
+ }, null, 40, Ze)
530
+ ], 8, Je))), 128))
531
+ ]),
532
+ t.showPredefined && t.predefined && t.predefined.length ? (y(), k("div", et, [
533
+ (y(!0), k(U, null, X(t.predefined, (l, f) => (y(), k("button", {
534
+ key: f,
535
+ type: "button",
536
+ class: O(["g-colorpicker-swatch", { "is-active": we(l) }]),
537
+ style: $({ background: l }),
538
+ "aria-label": `选择颜色 ${l}`,
539
+ onClick: (m) => ye(l)
540
+ }, null, 14, tt))), 128))
541
+ ])) : E("", !0),
542
+ t.confirmable ? (y(), k("div", nt, [
543
+ d("button", {
544
+ type: "button",
545
+ class: "g-colorpicker-btn",
546
+ onClick: V
547
+ }, "取消"),
548
+ d("button", {
549
+ type: "button",
550
+ class: "g-colorpicker-btn g-colorpicker-btn--primary",
551
+ onClick: Ee
552
+ }, " 确定 "),
553
+ d("span", at, [
554
+ n[8] || (n[8] = d("span", { class: "g-colorpicker-checker" }, null, -1)),
555
+ d("span", {
556
+ class: "g-colorpicker-footer__color",
557
+ style: $({ background: J.value })
558
+ }, null, 4)
559
+ ]),
560
+ d("span", lt, W(_.value), 1)
561
+ ])) : E("", !0)
562
+ ], 2)) : E("", !0)
563
+ ], 2));
564
+ }
565
+ }), Y = /* @__PURE__ */ Fe(rt, [["__scopeId", "data-v-f5f4cc43"]]);
566
+ Y.install = (o) => {
567
+ o.component(Y.name, Y);
568
+ };
569
+ export {
570
+ Y as GColorPicker,
571
+ Y as default
572
+ };
@@ -0,0 +1,98 @@
1
+ @charset "UTF-8";
2
+ /*
3
+ * 组件库公共样式:全局 CSS 变量,供各组件消费
4
+ * 按模块拆分文件管理(颜色 → color.css,尺寸 → size.css),在此聚合引入
5
+ * 此文件额外承载非颜色非尺寸类变量,颜色变量一律放 color.css、尺寸变量一律放 size.css
6
+ */
7
+ /*
8
+ * 颜色变量模块:所有颜色类 CSS 变量集中于此管理
9
+ * 变量统一携带 --g- 库名称空间前缀,避免污染宿主项目的命名空间
10
+ * 同一颜色全库共用一个变量(如 --g-primary-color),不再按组件拆分
11
+ * 派生色(primary-light 等)用 color-mix() 从基础色实时混出,
12
+ * 业务侧覆盖基础色换肤时派生色自动跟随,无需逐个同步
13
+ * 业务侧可在任意祖先节点(:root / body / 容器)覆盖同名变量实现换肤
14
+ */
15
+ :root {
16
+ /* ===== 公共语义色(primary / success / warning / danger 全库共用) ===== */
17
+ --g-primary-color: #039be5; /* 主色,覆盖它即可换主题色,派生色自动联动 */
18
+ --g-primary-light-color: color-mix(in srgb, var(--g-primary-color) 10%, var(--g-bg-color)); /* 主色浅底,hover / 选中背景 */
19
+ --g-success-color: #50c189; /* 成功色 */
20
+ --g-warning-color: #f78716; /* 警告色 */
21
+ --g-danger-color: #e1594d; /* 危险色 */
22
+ --g-emphasis-color: #000000; /* 强调色(浅色模式黑,深色模式反白为白) */
23
+ --g-emphasis-text-color: #ffffff; /* 强调色上的文字色 */
24
+
25
+ /* ===== 公共中性色(随深色模式切换) ===== */
26
+ --g-text-color: rgba(0, 0, 0, 0.88); /* 主要文字色 */
27
+ --g-text-secondary-color: rgba(0, 0, 0, 0.45); /* 次要文字色 */
28
+ --g-text-placeholder-color: rgba(0, 0, 0, 0.35); /* 占位文字色 */
29
+ --g-bg-color: #ffffff; /* 组件背景色 */
30
+ --g-overlay-bg-color: #ffffff; /* 浮层(dropdown / 弹层)背景色 */
31
+ --g-overlay-mask-color: rgba(15, 23, 42, 0.32); /* 全屏遮罩底色(GDialog overlay / GSpin fullscreen 遮罩共用) */
32
+ --g-border-color: #dcdfe3; /* 边框色 */
33
+ --g-border-light-color: #e4e7ea; /* 更浅边框色(行分隔线等) */
34
+ --g-border-strong-color: #cdd0d4; /* 更深边框色(容器外框等) */
35
+ --g-fill-color: #f0f2f5; /* 填充色(表头渐变深端) */
36
+ --g-fill-light-color: #f5f7fa; /* 浅填充色(表头渐变浅端 / 底座背景) */
37
+ --g-fill-lighter-color: #fafafa; /* 更浅填充色(斑马纹) */
38
+
39
+ /* ===== 组件特有变量 ===== */
40
+ --g-button-default-color: #e8e8eb; /* default 按钮底色 */
41
+ --g-input-group-bg-color: #e8e8eb; /* input 的 prepend / append 拼接块底色 */
42
+ --g-scrubber-chip-color: #e8e8eb; /* GScrubber 数值刮擦器芯片底色 */
43
+ --g-scrubber-accent-color: var(--g-primary-color); /* GScrubber 主题色(填充 / 描边 / 增量气泡底),联动主色换肤 */
44
+ --g-scrubber-ghost-ink-color: #ffffff; /* GScrubber 增量气泡文字色(主色底上反白) */
45
+ }
46
+
47
+ /* 深色模式:跟随 vueuse useDark 的 html.dark 约定自动切换
48
+ 仅覆盖随模式变化的值;--g-primary-light-color 混入的 --g-bg-color 在此处已是深色底,自动联动无需覆盖 */
49
+ html.dark {
50
+ --g-emphasis-color: #ffffff; /* 深色底上反白为白,避免融进背景 */
51
+ --g-emphasis-text-color: #000000; /* 反白后文字为黑 */
52
+
53
+ --g-text-color: #e5eaf3; /* 主要文字色 */
54
+ --g-text-secondary-color: rgba(255, 255, 255, 0.45);
55
+ --g-text-placeholder-color: rgba(255, 255, 255, 0.35);
56
+ --g-bg-color: #2b2b2f;
57
+ --g-overlay-bg-color: #1d1e1f; /* 浮层比页面底更深一档 */
58
+ --g-overlay-mask-color: rgba(0, 0, 0, 0.55); /* 深色底上遮罩加深 */
59
+ --g-border-color: #4c4d4f;
60
+ --g-border-light-color: #414243;
61
+ --g-border-strong-color: #636466;
62
+ --g-fill-color: #303030;
63
+ --g-fill-light-color: #262727;
64
+ --g-fill-lighter-color: #1d1e1f;
65
+
66
+ --g-button-default-color: #333336; /* 深色底上的 default 按钮底色 */
67
+ --g-input-group-bg-color: #333336; /* 深色拼接块底色 */
68
+ --g-scrubber-chip-color: #333336; /* 深色底上的刮擦器芯片底色 */
69
+ }
70
+
71
+ /*
72
+ * 组件尺寸体系:大 / 中(默认)/ 小,全库统一(GButton / GInput / GTag / GSwitch 共用)
73
+ * 高度基准与 GButton 一致:large 40 / middle 32 / small 24,字号 16 / 14 / 12
74
+ * 组件以回退形式消费:var(--g-size-xxx, 组件内默认值),在任意祖先节点覆盖变量即可全库联动
75
+ * 圆角 / 内边距等派生尺寸由各组件按自身规则推导,不放这里
76
+ */
77
+ :root {
78
+ /* 高度 */
79
+ --g-size-large-height: 40px;
80
+ --g-size-middle-height: 32px;
81
+ --g-size-small-height: 24px;
82
+ /* 字号 */
83
+ --g-size-large-font-size: 16px;
84
+ --g-size-middle-font-size: 14px;
85
+ --g-size-small-font-size: 12px;
86
+ }
87
+
88
+
89
+ :root {
90
+ /* ===== 公共浮层遮罩(GDialog overlay / GSpin fullscreen 遮罩共用) ===== */
91
+ --g-overlay-mask-backdrop: blur(4px) saturate(1.05); /* 遮罩背景毛玻璃效果,与底色变量 --g-overlay-mask-color 配套 */
92
+
93
+ /* ===== GButton ===== */
94
+ --g-button-bg-color: var(--g-button-default-color); /* 按钮背景色 @default 跟随 --g-button-default-color(深色模式自动切换) */
95
+ --g-button-font-size: var(--g-size-middle-font-size, 14px); /* 按钮字号 @default 跟随统一尺寸体系的 middle 档字号 */
96
+ --g-button-radius: 6px; /* 按钮圆角 @default 6px(large 尺寸 8px / small 尺寸 4px 由组件推导) */
97
+ }
98
+ .g-colorpicker[data-v-f5f4cc43]{position:relative;display:inline-block}.g-colorpicker.is-disabled[data-v-f5f4cc43]{opacity:.45;cursor:not-allowed}.g-colorpicker-trigger[data-v-f5f4cc43]{position:relative;width:26px;height:26px;padding:0;border:1px solid var(--g-border-strong-color, #cdd0d4);border-radius:6px;background:var(--g-bg-color, #fff);cursor:pointer;transition:box-shadow .16s ease}.g-colorpicker-trigger[data-v-f5f4cc43]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--g-primary-color, #039be5)}.g-colorpicker.is-disabled .g-colorpicker-trigger[data-v-f5f4cc43]{cursor:not-allowed}.g-colorpicker-trigger__board[data-v-f5f4cc43],.g-colorpicker-trigger__swatch[data-v-f5f4cc43]{position:absolute;inset:2px;border-radius:4px}.g-colorpicker-trigger__empty[data-v-f5f4cc43]{position:absolute;inset:2px;border-radius:4px;background:linear-gradient(to top right,transparent calc(50% - 1px),var(--g-danger-color, #e1594d) calc(50% - 1px),var(--g-danger-color, #e1594d) calc(50% + 1px),transparent calc(50% + 1px))}.g-colorpicker-checker[data-v-f5f4cc43]{background-image:linear-gradient(45deg,rgba(0,0,0,.14) 25%,transparent 25%,transparent 75%,rgba(0,0,0,.14) 75%),linear-gradient(45deg,rgba(0,0,0,.14) 25%,transparent 25%,transparent 75%,rgba(0,0,0,.14) 75%);background-size:8px 8px;background-position:0 0,4px 4px;background-color:#fff}.g-colorpicker-panel[data-v-f5f4cc43]{position:absolute;top:calc(100% + 6px);left:0;width:252px;padding:12px;background:var(--g-overlay-bg-color, #fff);border:1px solid var(--g-border-color, #dcdfe3);border-radius:10px;box-shadow:0 6px 18px #00000024;z-index:2000;transform-origin:top left;animation:g-colorpicker-pop-f5f4cc43 .16s cubic-bezier(.23,1,.32,1)}.g-colorpicker-panel.is-up[data-v-f5f4cc43]{top:auto;bottom:calc(100% + 6px);transform-origin:bottom left}.g-colorpicker-panel.is-right[data-v-f5f4cc43]{left:auto;right:0;transform-origin:top right}.g-colorpicker-panel.is-up.is-right[data-v-f5f4cc43]{transform-origin:bottom right}@keyframes g-colorpicker-pop-f5f4cc43{0%{opacity:0;transform:scale(.92)}to{opacity:1;transform:none}}.g-colorpicker-sv[data-v-f5f4cc43]{position:relative;height:148px;border-radius:8px;cursor:crosshair;touch-action:none;box-shadow:inset 0 0 0 1px #00000014}.g-colorpicker-sv__white[data-v-f5f4cc43],.g-colorpicker-sv__black[data-v-f5f4cc43]{position:absolute;inset:0;border-radius:inherit;pointer-events:none}.g-colorpicker-sv__white[data-v-f5f4cc43]{background:linear-gradient(to right,#fff,#fff0)}.g-colorpicker-sv__black[data-v-f5f4cc43]{background:linear-gradient(to top,#000,#0000)}.g-colorpicker-thumb[data-v-f5f4cc43]{position:absolute;top:50%;left:50%;width:14px;height:14px;border-radius:50%;background:transparent;border:2px solid #fff;box-shadow:0 0 3px #0006;transform:translate(-50%,-50%);pointer-events:none;box-sizing:border-box}.g-colorpicker-sv .g-colorpicker-thumb[data-v-f5f4cc43]{top:auto;left:auto}.g-colorpicker-slider[data-v-f5f4cc43]{position:relative;height:12px;margin-top:10px;border-radius:6px;cursor:pointer;touch-action:none;box-shadow:inset 0 0 0 1px #00000014}.g-colorpicker-slider[data-v-f5f4cc43]:focus-visible{outline:none;box-shadow:inset 0 0 0 1px #00000014,0 0 0 2px var(--g-primary-color, #039be5)}.g-colorpicker-slider--hue[data-v-f5f4cc43]{background:linear-gradient(to right,red,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red)}.g-colorpicker-slider--alpha .g-colorpicker-alpha__board[data-v-f5f4cc43],.g-colorpicker-alpha__track[data-v-f5f4cc43]{position:absolute;inset:0;border-radius:inherit}.g-colorpicker-tools[data-v-f5f4cc43]{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px}.g-colorpicker-formats[data-v-f5f4cc43]{display:flex;gap:2px;padding:2px;background:var(--g-fill-color, #f0f2f5);border-radius:6px}.g-colorpicker-format[data-v-f5f4cc43]{padding:3px 8px;font-size:11px;line-height:1;color:var(--g-text-secondary-color, rgba(0, 0, 0, .45));background:transparent;border:none;border-radius:4px;cursor:pointer;transition:background-color .16s ease,color .16s ease}.g-colorpicker-format[data-v-f5f4cc43]:hover{color:var(--g-text-color, rgba(0, 0, 0, .88))}.g-colorpicker-format[data-active][data-v-f5f4cc43]{background:var(--g-overlay-bg-color, #fff);color:var(--g-text-color, rgba(0, 0, 0, .88));box-shadow:0 1px 3px #0000001f}.g-colorpicker-clear[data-v-f5f4cc43]{position:relative;flex-shrink:0;width:24px;height:24px;padding:0;border:1px solid var(--g-border-color, #dcdfe3);border-radius:6px;cursor:pointer;overflow:hidden}.g-colorpicker-clear__board[data-v-f5f4cc43]{position:absolute;inset:0}.g-colorpicker-clear__line[data-v-f5f4cc43]{position:absolute;inset:0;background:linear-gradient(to top right,transparent calc(50% - 1px),var(--g-danger-color, #e1594d) calc(50% - 1px),var(--g-danger-color, #e1594d) calc(50% + 1px),transparent calc(50% + 1px))}.g-colorpicker-fields[data-v-f5f4cc43]{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:10px}.g-colorpicker-field-wrap[data-v-f5f4cc43]{display:flex;flex-direction:column;gap:2px}.g-colorpicker-field-wrap[data-wide][data-v-f5f4cc43]{grid-column:1 / -1}.g-colorpicker-field-tag[data-v-f5f4cc43]{font-size:10px;line-height:1;color:var(--g-text-secondary-color, rgba(0, 0, 0, .45))}.g-colorpicker-field[data-v-f5f4cc43]{width:100%;height:26px;padding:0 6px;font-size:12px;color:var(--g-text-color, rgba(0, 0, 0, .88));background:var(--g-fill-lighter-color, #fafafa);border:1px solid var(--g-border-color, #dcdfe3);border-radius:6px;box-sizing:border-box;font-family:inherit}.g-colorpicker-field[data-v-f5f4cc43]:focus{outline:none;border-color:var(--g-primary-color, #039be5)}.g-colorpicker-field-wrap[data-wide] .g-colorpicker-field[data-v-f5f4cc43]{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.g-colorpicker-field[data-v-f5f4cc43]::-webkit-outer-spin-button,.g-colorpicker-field[data-v-f5f4cc43]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.g-colorpicker-field[type=number][data-v-f5f4cc43]{-moz-appearance:textfield;appearance:textfield}.g-colorpicker-swatches[data-v-f5f4cc43]{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin-top:12px}.g-colorpicker-swatch[data-v-f5f4cc43]{aspect-ratio:1;padding:0;border:1px solid rgba(0,0,0,.08);border-radius:4px;cursor:pointer;transition:box-shadow .16s ease}.g-colorpicker-swatch[data-v-f5f4cc43]:hover{box-shadow:0 0 0 1px #0000003d}.g-colorpicker-swatch.is-active[data-v-f5f4cc43]{box-shadow:0 0 0 2px var(--g-primary-color, #039be5)}.g-colorpicker-footer[data-v-f5f4cc43]{display:flex;align-items:center;gap:8px;margin-top:12px}.g-colorpicker-btn[data-v-f5f4cc43]{height:28px;padding:0 14px;font-size:12px;border-radius:6px;border:1px solid var(--g-border-color, #dcdfe3);background:var(--g-fill-light-color, #f5f7fa);color:var(--g-text-color, rgba(0, 0, 0, .88));cursor:pointer;transition:background-color .16s ease}.g-colorpicker-btn[data-v-f5f4cc43]:hover{background:var(--g-fill-color, #f0f2f5)}.g-colorpicker-btn--primary[data-v-f5f4cc43]{background:var(--g-primary-color, #039be5);border-color:var(--g-primary-color, #039be5);color:var(--g-emphasis-text-color, #fff)}.g-colorpicker-btn--primary[data-v-f5f4cc43]:hover{background:var(--g-primary-color, #039be5);filter:brightness(1.05)}.g-colorpicker-footer__preview[data-v-f5f4cc43]{position:relative;flex-shrink:0;width:22px;height:22px;border:1px solid var(--g-border-color, #dcdfe3);border-radius:4px;overflow:hidden}.g-colorpicker-footer__preview .g-colorpicker-checker[data-v-f5f4cc43],.g-colorpicker-footer__color[data-v-f5f4cc43]{position:absolute;inset:0}.g-colorpicker-footer__text[data-v-f5f4cc43]{flex:1;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;color:var(--g-text-secondary-color, rgba(0, 0, 0, .45));text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.g-colorpicker.is-inline .g-colorpicker-panel[data-v-f5f4cc43]{position:static;width:252px;animation:none}@media(prefers-reduced-motion:reduce){.g-colorpicker-panel[data-v-f5f4cc43]{animation:none}}