@vuelor/picker 0.1.0-beta.1 → 0.2.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 (33) hide show
  1. package/README.md +7 -2
  2. package/dist/components/ColorPickerCanvas.vue.d.ts +20 -0
  3. package/dist/components/ColorPickerEyeDropper.vue.d.ts +20 -0
  4. package/dist/components/ColorPickerInputHSB.vue.d.ts +18 -0
  5. package/dist/components/ColorPickerInputHSL.vue.d.ts +18 -0
  6. package/dist/components/ColorPickerInputHex.vue.d.ts +23 -0
  7. package/dist/components/ColorPickerInputRGB.vue.d.ts +18 -0
  8. package/dist/components/ColorPickerRoot.vue.d.ts +111 -0
  9. package/dist/components/ColorPickerSliderAlpha.vue.d.ts +12 -0
  10. package/dist/components/ColorPickerSliderBlue.vue.d.ts +12 -0
  11. package/dist/components/ColorPickerSliderGreen.vue.d.ts +12 -0
  12. package/dist/components/ColorPickerSliderHue.vue.d.ts +13 -0
  13. package/dist/components/ColorPickerSliderLightness.vue.d.ts +12 -0
  14. package/dist/components/ColorPickerSliderRed.vue.d.ts +12 -0
  15. package/dist/components/ColorPickerSliderSaturation.vue.d.ts +12 -0
  16. package/dist/components/ColorPickerSwatch.vue.d.ts +14 -0
  17. package/dist/composables/useColor.d.ts +60 -0
  18. package/dist/composables/useThumb.d.ts +7 -0
  19. package/dist/composables/useVModel.d.ts +5 -0
  20. package/dist/index.d.ts +20 -0
  21. package/dist/index.js +723 -625
  22. package/dist/style.css +1 -1
  23. package/dist/theme/index.d.ts +70 -0
  24. package/dist/theme/tailwindcss.d.ts +30 -0
  25. package/dist/theme/vanillacss.d.ts +30 -0
  26. package/dist/utils/canvas.d.ts +2 -0
  27. package/dist/utils/color.d.ts +21 -0
  28. package/dist/utils/consts.d.ts +1 -0
  29. package/dist/utils/helpers.d.ts +2 -0
  30. package/dist/utils/parsers.d.ts +10 -0
  31. package/dist/utils/styles.d.ts +18 -0
  32. package/dist/utils/types.d.ts +37 -0
  33. package/package.json +13 -12
package/dist/index.js CHANGED
@@ -1,31 +1,122 @@
1
- import { ref as W, computed as g, toRaw as G, watch as ee, defineComponent as C, createElementBlock as H, openBlock as $, normalizeClass as c, unref as a, renderSlot as D, onMounted as oe, onUnmounted as se, useTemplateRef as ne, watchEffect as re, withModifiers as ie, normalizeStyle as y, createElementVNode as v, createCommentVNode as j, createBlock as F, withCtx as A, createVNode as S } from "vue";
2
- import { twMerge as ue } from "tailwind-merge";
3
- import { createContext as ce, SliderRoot as R, SliderTrack as L, SliderThumb as M } from "reka-ui";
4
- const de = {
1
+ import { ref as O, watch as te, computed as m, toRaw as j, defineComponent as V, createElementBlock as P, openBlock as y, normalizeClass as c, unref as l, renderSlot as T, onMounted as ne, onUnmounted as re, useTemplateRef as ue, watchEffect as ie, withModifiers as ce, normalizeStyle as x, createElementVNode as h, createBlock as A, createCommentVNode as W, withCtx as F, getCurrentInstance as de, createVNode as w } from "vue";
2
+ import { twMerge as ve } from "tailwind-merge";
3
+ import { createContext as pe, Primitive as ae, SliderRoot as L, SliderTrack as G, SliderThumb as N } from "reka-ui";
4
+ function _(a, e = 0, t = 1) {
5
+ return Math.max(e, Math.min(t, a));
6
+ }
7
+ function le(a, e = 1) {
8
+ const t = [];
9
+ let s = 0;
10
+ for (; s < a.length; )
11
+ t.push(a.substring(s, s + e)), s += e;
12
+ return t;
13
+ }
14
+ function se(a) {
15
+ const { h: e, s: t, l: s } = a, u = s + t * Math.min(s, 1 - s), i = u === 0 ? 0 : 2 - 2 * s / u;
16
+ return { h: e, s: i, v: u };
17
+ }
18
+ function oe(a) {
19
+ const { h: e, s: t, v: s } = a, u = s - s * t / 2, i = u === 1 || u === 0 ? 0 : (s - u) / Math.min(u, 1 - u);
20
+ return { h: e, s: i, l: u };
21
+ }
22
+ function X(a) {
23
+ const { h: e, s: t, v: s } = a, u = (o) => {
24
+ const r = (o + e / 60) % 6;
25
+ return s - s * t * Math.max(Math.min(r, 4 - r, 1), 0);
26
+ }, i = [u(5), u(3), u(1)].map((o) => Math.round(o * 255));
27
+ return { r: i[0], g: i[1], b: i[2] };
28
+ }
29
+ function he(a) {
30
+ if (!a) return { h: 0, s: 1, v: 1 };
31
+ const e = a.r / 255, t = a.g / 255, s = a.b / 255, u = Math.max(e, t, s), i = Math.min(e, t, s);
32
+ let o = 0;
33
+ u !== i && (u === e ? o = 60 * (0 + (t - s) / (u - i)) : u === t ? o = 60 * (2 + (s - e) / (u - i)) : u === s && (o = 60 * (4 + (e - t) / (u - i)))), o < 0 && (o = o + 360);
34
+ const r = u === 0 ? 0 : (u - i) / u, n = [o, r, u];
35
+ return { h: n[0], s: n[1], v: n[2] };
36
+ }
37
+ const R = (a) => {
38
+ const e = Math.round(a).toString(16);
39
+ return ("00".substring(0, 2 - e.length) + e).toUpperCase();
40
+ };
41
+ function q(a) {
42
+ return `#${[
43
+ R(a.r),
44
+ R(a.g),
45
+ R(a.b)
46
+ ].join("")}`;
47
+ }
48
+ function be(a) {
49
+ return `#${[
50
+ R(a.r),
51
+ R(a.g),
52
+ R(a.b),
53
+ R(a.a * 255)
54
+ ].join("")}`;
55
+ }
56
+ function J(a) {
57
+ const e = le(a.slice(1), 2).map((t) => parseInt(t, 16));
58
+ return {
59
+ r: e[0],
60
+ g: e[1],
61
+ b: e[2]
62
+ };
63
+ }
64
+ function ot(a) {
65
+ const e = le(a.slice(1), 2).map((t) => parseInt(t, 16));
66
+ return {
67
+ r: e[0],
68
+ g: e[1],
69
+ b: e[2],
70
+ a: e[3] / 255
71
+ };
72
+ }
73
+ function fe(a) {
74
+ return `rgba(${a.r}, ${a.g}, ${a.b}, ${a.a})`;
75
+ }
76
+ function me(a, e, t) {
77
+ const s = O(void 0);
78
+ return te(
79
+ () => a.modelValue,
80
+ (u) => {
81
+ u !== s.value && t(u);
82
+ },
83
+ { immediate: !0 }
84
+ ), m({
85
+ get: () => a.modelValue,
86
+ set: (u) => {
87
+ s.value = u, e("update:modelValue", u);
88
+ }
89
+ });
90
+ }
91
+ const ge = {
5
92
  picker: {
6
93
  root: "w-60 bg-white rounded-[13px] p-4 flex flex-col gap-2 shadow-vuelor-card"
7
94
  },
8
95
  dropper: {
9
- base: "hover:bg-[#0000000d] rounded-[5px] focus-within:outline-1 focus-within:outline-[#0d99ff] p-1"
96
+ base: "enabled:hover:bg-[#0000000d] disabled:opacity-50 rounded-[5px] focus-within:outline-1 focus-within:outline-[#0d99ff] p-1"
10
97
  },
11
98
  shared: {
12
99
  thumb: "block w-4 h-4 rounded-full border-4 border-white shadow-vuelor-thumb focus:outline-1 outline-[#0d99ff]"
13
100
  },
14
101
  canvas: {
15
- root: "relative touch-none data-disabled:pointer-events-none data-disabled:opacity-50",
102
+ root: "relative touch-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
16
103
  area: "rounded-[5px] outline-1 outline-solid -outline-offset-1 outline-[#0000001a]"
17
104
  },
18
105
  slider: {
19
- root: "relative h-4 w-full data-[orientation=vertical]:h-auto data-[orientation=vertical]:w-4 flex items-center data-[orientation=vertical]:flex-col select-none touch-none data-disabled:pointer-events-none data-disabled:opacity-50",
20
- track: "relative h-4 w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-4 grow rounded-full shadow-[inset_0_0_0_1px_#0000001a]"
106
+ root: "relative h-4 w-full flex items-center select-none touch-none data-[orientation=vertical]:h-auto data-[orientation=vertical]:w-4 data-[orientation=vertical]:flex-col data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
107
+ track: "relative h-4 w-full shadow-vuelor-inner grow rounded-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-4"
21
108
  },
22
109
  input: {
23
- group: "w-full flex gap-[1px] rounded-[5px] hover:outline-1 outline-[#e6e6e6] focus-within:outline-1 focus-within:outline-[#0d99ff] data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
24
- item: "flex flex-1 data-[alpha-input]:grow-0 items-center px-1.5 gap-1 bg-[#f5f5f5] first:rounded-l-[5px] last:rounded-r-[5px]",
25
- label: "select-none text-black text-[11px] opacity-40",
26
- field: "w-full h-6 min-w-5 text-[11px] focus:outline-none"
110
+ group: "w-full flex gap-[1px] rounded-[5px] enabled:hover:outline-1 outline-[#e6e6e6] focus-within:outline-1 focus-within:outline-[#0d99ff] data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
111
+ item: "flex flex-1 data-[before]:grow-0 data-[alpha-input]:grow-0 items-center px-1 gap-1 bg-[#f5f5f5] first:rounded-l-[5px] last:rounded-r-[5px]",
112
+ label: "select-none text-black text-[11px] opacity-40 data-[alpha-label]:block",
113
+ field: "w-full min-w-5 h-6 text-[11px] focus:outline-none"
114
+ },
115
+ swatch: {
116
+ base: "relative grow-0 h-4 w-4 rounded-[20%] overflow-hidden focus-within:outline-1 focus-within:outline-[#0d99ff] disabled:opacity-50",
117
+ alpha: "absolute top-0 right-0 h-full w-1/2"
27
118
  }
28
- }, pe = {
119
+ }, ke = {
29
120
  picker: {
30
121
  root: "vuelor-picker-root"
31
122
  },
@@ -48,23 +139,27 @@ const de = {
48
139
  item: "vuelor-picker-input-item",
49
140
  label: "vuelor-picker-input-label",
50
141
  field: "vuelor-picker-input-field"
142
+ },
143
+ swatch: {
144
+ base: "vuelor-picker-swatch-base",
145
+ alpha: "vuelor-picker-swatch-alpha"
51
146
  }
52
- }, ve = {
53
- tailwindcss: de,
54
- vanillacss: pe
147
+ }, $e = {
148
+ tailwindcss: ge,
149
+ vanillacss: ke
55
150
  };
56
- function he(l, e) {
151
+ function Ce(a, e) {
57
152
  return (...t) => {
58
153
  const s = {};
59
154
  for (const u of t) {
60
- const i = l[u];
155
+ const i = a[u];
61
156
  if (i)
62
157
  for (const [o, r] of Object.entries(i))
63
158
  s[o] = (...n) => {
64
- const h = e?.[u]?.[o];
65
- return ue(
159
+ const p = e?.[u]?.[o];
160
+ return ve(
66
161
  r,
67
- h,
162
+ p,
68
163
  ...n.filter(Boolean)
69
164
  );
70
165
  };
@@ -72,63 +167,8 @@ function he(l, e) {
72
167
  return s;
73
168
  };
74
169
  }
75
- function _(l, e = 0, t = 1) {
76
- return Math.max(e, Math.min(t, l));
77
- }
78
- function be(l, e = 1) {
79
- const t = [];
80
- let s = 0;
81
- for (; s < l.length; )
82
- t.push(l.substring(s, s + e)), s += e;
83
- return t;
84
- }
85
- function te(l) {
86
- const { h: e, s: t, l: s } = l, u = s + t * Math.min(s, 1 - s), i = u === 0 ? 0 : 2 - 2 * s / u;
87
- return { h: e, s: i, v: u };
88
- }
89
- function ae(l) {
90
- const { h: e, s: t, v: s } = l, u = s - s * t / 2, i = u === 1 || u === 0 ? 0 : (s - u) / Math.min(u, 1 - u);
91
- return { h: e, s: i, l: u };
92
- }
93
- function X(l) {
94
- const { h: e, s: t, v: s } = l, u = (o) => {
95
- const r = (o + e / 60) % 6;
96
- return s - s * t * Math.max(Math.min(r, 4 - r, 1), 0);
97
- }, i = [u(5), u(3), u(1)].map((o) => Math.round(o * 255));
98
- return { r: i[0], g: i[1], b: i[2] };
99
- }
100
- function fe(l) {
101
- if (!l) return { h: 0, s: 1, v: 1 };
102
- const e = l.r / 255, t = l.g / 255, s = l.b / 255, u = Math.max(e, t, s), i = Math.min(e, t, s);
103
- let o = 0;
104
- u !== i && (u === e ? o = 60 * (0 + (t - s) / (u - i)) : u === t ? o = 60 * (2 + (s - e) / (u - i)) : u === s && (o = 60 * (4 + (e - t) / (u - i)))), o < 0 && (o = o + 360);
105
- const r = u === 0 ? 0 : (u - i) / u, n = [o, r, u];
106
- return { h: n[0], s: n[1], v: n[2] };
107
- }
108
- const O = (l) => {
109
- const e = Math.round(l).toString(16);
110
- return ("00".substring(0, 2 - e.length) + e).toUpperCase();
111
- };
112
- function Z(l) {
113
- return `#${[
114
- O(l.r),
115
- O(l.g),
116
- O(l.b)
117
- ].join("")}`;
118
- }
119
- function q(l) {
120
- const e = be(l.slice(1), 2).map((t) => parseInt(t, 16));
121
- return {
122
- r: e[0],
123
- g: e[1],
124
- b: e[2]
125
- };
126
- }
127
- function ge(l) {
128
- return `rgba(${l.r}, ${l.g}, ${l.b}, ${l.a})`;
129
- }
130
- function Y(l) {
131
- const e = l.trim(), t = e.match(/^#?(?<r>[A-Fa-f0-9]{2})(?<g>[A-Fa-f0-9]{2})(?<b>[A-Fa-f0-9]{2})$/);
170
+ function Z(a) {
171
+ const e = a.trim(), t = e.match(/^#?(?<r>[A-Fa-f0-9]{2})(?<g>[A-Fa-f0-9]{2})(?<b>[A-Fa-f0-9]{2})$/);
132
172
  if (t?.groups) {
133
173
  const { r: o, g: r, b: n } = t.groups;
134
174
  return {
@@ -150,28 +190,36 @@ function Y(l) {
150
190
  }
151
191
  const u = e.match(/^#?(?<r>[A-Fa-f0-9])(?<g>[A-Fa-f0-9])(?<b>[A-Fa-f0-9])$/);
152
192
  if (u?.groups) {
153
- const { r: o, g: r, b: n } = u.groups, d = o + o, h = r + r, b = n + n;
193
+ const { r: o, g: r, b: n } = u.groups, d = o + o, p = r + r, b = n + n;
154
194
  return {
155
195
  r: parseInt(d, 16),
156
- g: parseInt(h, 16),
196
+ g: parseInt(p, 16),
157
197
  b: parseInt(b, 16),
158
198
  a: 1
159
199
  };
160
200
  }
161
201
  const i = e.match(/^#?(?<r>[A-Fa-f0-9])(?<g>[A-Fa-f0-9])(?<b>[A-Fa-f0-9])(?<a>[A-Fa-f0-9])$/);
162
202
  if (i?.groups) {
163
- const { r: o, g: r, b: n, a: d } = i.groups, h = o + o, b = r + r, f = n + n, B = d + d;
203
+ const { r: o, g: r, b: n, a: d } = i.groups, p = o + o, b = r + r, f = n + n, k = d + d;
164
204
  return {
165
- r: parseInt(h, 16),
205
+ r: parseInt(p, 16),
166
206
  g: parseInt(b, 16),
167
207
  b: parseInt(f, 16),
168
- a: parseInt(B, 16) / 255
208
+ a: parseInt(k, 16) / 255
169
209
  };
170
210
  }
171
- return { r: 255, g: 0, b: 0, a: 1 };
211
+ return null;
212
+ }
213
+ function ye(a) {
214
+ return a ? a.substring(0, 7).replace("#", "") : null;
172
215
  }
173
- function N(l) {
174
- const e = /^([a-zA-Z]{3,4})\(\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+)%?)\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+)%?)\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+)%?)(?:\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+)%?))?\s*\)$/i, t = l.match(e);
216
+ function xe(a) {
217
+ if (!a || a.length < 9) return 100;
218
+ const e = a.substring(7, 9).replace("#", "");
219
+ return Math.round(parseInt(e, 16) / 255 * 100);
220
+ }
221
+ function z(a) {
222
+ const e = /^([a-zA-Z]{3,4})\(\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+)%?)\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+)%?)\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+)%?)(?:\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+)%?))?\s*\)$/i, t = a.match(e);
175
223
  if (!t) return null;
176
224
  const [, s, u, i, o, r] = t;
177
225
  return {
@@ -179,19 +227,19 @@ function N(l) {
179
227
  values: [u, i, o, r].filter(Boolean)
180
228
  };
181
229
  }
182
- function I(l) {
183
- return l.endsWith("%") ? parseFloat(l) / 100 : parseFloat(l);
230
+ function D(a) {
231
+ return a.endsWith("%") ? parseFloat(a) / 100 : parseFloat(a);
184
232
  }
185
- function me(l) {
186
- const e = N(l);
233
+ function Ve(a) {
234
+ const e = z(a);
187
235
  return e && e.type?.toLowerCase() === "rgb" ? {
188
236
  r: parseInt(e.values[0], 10),
189
237
  g: parseInt(e.values[1], 10),
190
238
  b: parseInt(e.values[2], 10)
191
239
  } : { r: 255, g: 0, b: 0 };
192
240
  }
193
- function ke(l) {
194
- const e = N(l);
241
+ function Se(a) {
242
+ const e = z(a);
195
243
  return e && e.type?.toLowerCase() === "rgb" ? {
196
244
  r: parseInt(e.values[0], 10),
197
245
  g: parseInt(e.values[1], 10),
@@ -199,203 +247,205 @@ function ke(l) {
199
247
  a: e.values[3] ? parseFloat(e.values[3]) : 1
200
248
  } : { r: 255, g: 0, b: 0, a: 1 };
201
249
  }
202
- function $e(l) {
203
- const e = N(l);
250
+ function we(a) {
251
+ const e = z(a);
204
252
  return e && e.type?.toLowerCase() === "hsl" ? {
205
253
  h: parseFloat(e.values[0]),
206
- s: I(e.values[1]),
207
- l: I(e.values[2])
254
+ s: D(e.values[1]),
255
+ l: D(e.values[2])
208
256
  } : { h: 0, s: 0, l: 0 };
209
257
  }
210
- function ye(l) {
211
- const e = N(l);
258
+ function _e(a) {
259
+ const e = z(a);
212
260
  return e && e.type?.toLowerCase() === "hsla" ? {
213
261
  h: parseFloat(e.values[0]),
214
- s: I(e.values[1]),
215
- l: I(e.values[2]),
262
+ s: D(e.values[1]),
263
+ l: D(e.values[2]),
216
264
  a: e.values[3] ? parseFloat(e.values[3]) : 1
217
265
  } : { h: 0, s: 0, l: 0, a: 1 };
218
266
  }
219
- function xe(l) {
220
- const e = N(l);
267
+ function He(a) {
268
+ const e = z(a);
221
269
  return e && e.type?.toLowerCase() === "hsv" ? {
222
270
  h: parseFloat(e.values[0]),
223
- s: I(e.values[1]),
224
- v: I(e.values[2])
271
+ s: D(e.values[1]),
272
+ v: D(e.values[2])
225
273
  } : { h: 0, s: 0, v: 0 };
226
274
  }
227
- function Se(l) {
228
- const e = N(l);
275
+ function Be(a) {
276
+ const e = z(a);
229
277
  return e && e.type?.toLowerCase() === "hsva" ? {
230
278
  h: parseFloat(e.values[0]),
231
- s: I(e.values[1]),
232
- v: I(e.values[2]),
279
+ s: D(e.values[1]),
280
+ v: D(e.values[2]),
233
281
  a: e.values[3] ? parseFloat(e.values[3]) : 1
234
282
  } : { h: 0, s: 0, v: 0, a: 1 };
235
283
  }
236
- function z(l) {
237
- const e = fe(l), t = ae(e);
238
- return { hsv: e, hsl: t, rgb: l };
284
+ function K(a) {
285
+ const e = he(a), t = oe(e);
286
+ return { hsv: e, hsl: t, rgb: a };
239
287
  }
240
- function J(l) {
241
- const e = te(l), t = X(e);
242
- return { hsv: e, hsl: l, rgb: t };
288
+ function Q(a) {
289
+ const e = se(a), t = X(e);
290
+ return { hsv: e, hsl: a, rgb: t };
243
291
  }
244
- function Q(l) {
245
- const e = ae(l), t = X(l);
246
- return { hsv: l, hsl: e, rgb: t };
292
+ function ee(a) {
293
+ const e = oe(a), t = X(a);
294
+ return { hsv: a, hsl: e, rgb: t };
247
295
  }
248
- function Ce() {
249
- const l = W({
296
+ function Ie() {
297
+ const a = O({
250
298
  hsv: { h: 0, s: 0, v: 0 },
251
299
  hsl: { h: 0, s: 0, l: 0 },
252
300
  rgb: { r: 0, g: 0, b: 0 }
253
- }), e = W(100), t = g({
254
- get: () => l.value.rgb,
255
- set: (p) => l.value = z(p)
256
- }), s = g({
257
- get: () => ({ ...l.value.rgb, a: e.value / 100 }),
258
- set: (p) => {
259
- e.value = Math.round((p.a ?? 1) * 100), l.value = z({ r: p.r, g: p.g, b: p.b });
301
+ }), e = O(100), t = m({
302
+ get: () => a.value.rgb,
303
+ set: (v) => a.value = K(v)
304
+ }), s = m({
305
+ get: () => ({ ...a.value.rgb, a: e.value / 100 }),
306
+ set: (v) => {
307
+ e.value = Math.round((v.a ?? 1) * 100), a.value = K({ r: v.r, g: v.g, b: v.b });
260
308
  }
261
- }), u = g({
262
- get: () => l.value.hsl,
263
- set: (p) => l.value = J(p)
264
- }), i = g({
265
- get: () => ({ ...l.value.hsl, a: e.value / 100 }),
266
- set: (p) => {
267
- e.value = Math.round((p.a ?? 1) * 100), l.value = J({ h: p.h, s: p.s, l: p.l });
309
+ }), u = m({
310
+ get: () => a.value.hsl,
311
+ set: (v) => a.value = Q(v)
312
+ }), i = m({
313
+ get: () => ({ ...a.value.hsl, a: e.value / 100 }),
314
+ set: (v) => {
315
+ e.value = Math.round((v.a ?? 1) * 100), a.value = Q({ h: v.h, s: v.s, l: v.l });
268
316
  }
269
- }), o = g({
270
- get: () => l.value.hsv,
271
- set: (p) => l.value = Q(p)
272
- }), r = g({
273
- get: () => ({ ...l.value.hsv, a: e.value / 100 }),
274
- set: (p) => {
275
- e.value = Math.round((p.a ?? 1) * 100), l.value = Q({ h: p.h, s: p.s, v: p.v });
317
+ }), o = m({
318
+ get: () => a.value.hsv,
319
+ set: (v) => a.value = ee(v)
320
+ }), r = m({
321
+ get: () => ({ ...a.value.hsv, a: e.value / 100 }),
322
+ set: (v) => {
323
+ e.value = Math.round((v.a ?? 1) * 100), a.value = ee({ h: v.h, s: v.s, v: v.v });
276
324
  }
277
- }), n = g({
278
- get: () => Z(l.value.rgb),
279
- set: (p) => {
280
- const k = q(p);
281
- l.value = z(k);
325
+ }), n = m({
326
+ get: () => q(a.value.rgb),
327
+ set: (v) => {
328
+ const C = J(v);
329
+ a.value = K(C);
282
330
  }
283
- }), d = g({
331
+ }), d = m({
284
332
  get: () => {
285
- const p = Z(l.value.rgb), k = O(e.value / 100 * 255);
286
- return p + k;
333
+ const v = q(a.value.rgb), C = R(e.value / 100 * 255);
334
+ return v + C;
287
335
  },
288
- set: (p) => {
289
- const k = q(p.slice(0, 7)), x = p.slice(7, 9), P = x ? parseInt(x, 16) / 255 : 1;
290
- e.value = Math.round(P * 100), l.value = z(k);
336
+ set: (v) => {
337
+ const C = J(v.slice(0, 7)), $ = v.slice(7, 9), I = $ ? parseInt($, 16) / 255 : 1;
338
+ e.value = Math.round(I * 100), a.value = K(C);
291
339
  }
292
340
  });
293
- function h() {
294
- const { r: p, g: k, b: x } = l.value.rgb;
295
- return `rgb(${p}, ${k}, ${x})`;
341
+ function p() {
342
+ const { r: v, g: C, b: $ } = a.value.rgb;
343
+ return `rgb(${v}, ${C}, ${$})`;
296
344
  }
297
345
  function b() {
298
- const { r: p, g: k, b: x } = l.value.rgb, P = (e.value / 100).toFixed(2);
299
- return `rgba(${p}, ${k}, ${x}, ${P})`;
346
+ const { r: v, g: C, b: $ } = a.value.rgb, I = (e.value / 100).toFixed(2);
347
+ return `rgba(${v}, ${C}, ${$}, ${I})`;
300
348
  }
301
349
  function f() {
302
- const { h: p, s: k, l: x } = l.value.hsl, P = (k * 100).toFixed(1), E = (x * 100).toFixed(1);
303
- return `hsl(${p}, ${P}%, ${E}%)`;
350
+ const { h: v, s: C, l: $ } = a.value.hsl, I = (C * 100).toFixed(1), E = ($ * 100).toFixed(1);
351
+ return `hsl(${v}, ${I}%, ${E}%)`;
304
352
  }
305
- function B() {
306
- const { h: p, s: k, l: x } = l.value.hsl, P = (k * 100).toFixed(1), E = (x * 100).toFixed(1), K = (e.value / 100).toFixed(2);
307
- return `hsla(${p}, ${P}%, ${E}%, ${K})`;
353
+ function k() {
354
+ const { h: v, s: C, l: $ } = a.value.hsl, I = (C * 100).toFixed(1), E = ($ * 100).toFixed(1), Y = (e.value / 100).toFixed(2);
355
+ return `hsla(${v}, ${I}%, ${E}%, ${Y})`;
308
356
  }
309
- function T() {
310
- const { h: p, s: k, v: x } = l.value.hsv, P = (k * 100).toFixed(1), E = (x * 100).toFixed(1);
311
- return `hsv(${p}, ${P}%, ${E}%)`;
357
+ function B() {
358
+ const { h: v, s: C, v: $ } = a.value.hsv, I = (C * 100).toFixed(1), E = ($ * 100).toFixed(1);
359
+ return `hsv(${v}, ${I}%, ${E}%)`;
312
360
  }
313
- function m() {
314
- const { h: p, s: k, v: x } = l.value.hsv, P = (k * 100).toFixed(1), E = (x * 100).toFixed(1), K = (e.value / 100).toFixed(2);
315
- return `hsva(${p}, ${P}%, ${E}%, ${K})`;
361
+ function M() {
362
+ const { h: v, s: C, v: $ } = a.value.hsv, I = (C * 100).toFixed(1), E = ($ * 100).toFixed(1), Y = (e.value / 100).toFixed(2);
363
+ return `hsva(${v}, ${I}%, ${E}%, ${Y})`;
316
364
  }
317
- function V() {
365
+ function g() {
318
366
  return {
319
- rgb: G(t.value),
320
- rgba: G(s.value),
321
- hsl: G(u.value),
322
- hsla: G(i.value),
323
- hsv: G(o.value),
324
- hsva: G(r.value),
367
+ rgb: j(t.value),
368
+ rgba: j(s.value),
369
+ hsl: j(u.value),
370
+ hsla: j(i.value),
371
+ hsv: j(o.value),
372
+ hsva: j(r.value),
325
373
  hex: n.value,
326
374
  hexa: d.value
327
375
  };
328
376
  }
329
- function U(p) {
330
- switch (p) {
377
+ function H(v) {
378
+ switch (v) {
331
379
  case "hex":
332
380
  return n.value;
333
381
  case "hexa":
334
382
  return d.value;
335
383
  case "rgb":
336
- return h();
384
+ return p();
337
385
  case "rgba":
338
386
  return b();
339
387
  case "hsl":
340
388
  return f();
341
389
  case "hsla":
342
- return B();
390
+ return k();
343
391
  case "hsv":
344
- return T();
392
+ return B();
345
393
  case "hsva":
346
- return m();
394
+ return M();
347
395
  case "object":
348
- return V();
396
+ return g();
349
397
  default:
350
398
  return n.value;
351
399
  }
352
400
  }
353
- function le(p, k) {
354
- switch (k) {
401
+ function U(v, C) {
402
+ switch (C) {
355
403
  case "hex": {
356
- s.value = Y(p);
404
+ const $ = Z(v);
405
+ $ && (s.value = $);
357
406
  break;
358
407
  }
359
408
  case "hexa": {
360
- s.value = Y(p);
409
+ const $ = Z(v);
410
+ $ && (s.value = $);
361
411
  break;
362
412
  }
363
413
  case "rgb": {
364
- t.value = me(p);
414
+ t.value = Ve(v);
365
415
  break;
366
416
  }
367
417
  case "rgba": {
368
- s.value = ke(p);
418
+ s.value = Se(v);
369
419
  break;
370
420
  }
371
421
  case "hsl": {
372
- u.value = $e(p);
422
+ u.value = we(v);
373
423
  break;
374
424
  }
375
425
  case "hsla": {
376
- i.value = ye(p);
426
+ i.value = _e(v);
377
427
  break;
378
428
  }
379
429
  case "hsv": {
380
- o.value = xe(p);
430
+ o.value = He(v);
381
431
  break;
382
432
  }
383
433
  case "hsva": {
384
- r.value = Se(p);
434
+ r.value = Be(v);
385
435
  break;
386
436
  }
387
437
  case "object": {
388
- l.value = {
389
- hsv: p.hsv,
390
- hsl: p.hsl,
391
- rgb: p.rgb
392
- }, e.value = (p.hsva?.a ?? 1) * 100;
438
+ a.value = {
439
+ hsv: v.hsv,
440
+ hsl: v.hsl,
441
+ rgb: v.rgb
442
+ }, e.value = (v.hsva?.a ?? 1) * 100;
393
443
  break;
394
444
  }
395
445
  }
396
446
  }
397
447
  return {
398
- state: l,
448
+ state: a,
399
449
  alpha: e,
400
450
  rgb: t,
401
451
  rgba: s,
@@ -405,33 +455,18 @@ function Ce() {
405
455
  hsva: r,
406
456
  hex: n,
407
457
  hexa: d,
408
- toRGBString: h,
458
+ toRGBString: p,
409
459
  toRGBAString: b,
410
460
  toHSLString: f,
411
- toHSLAString: B,
412
- toHSVString: T,
413
- toHSVAString: m,
414
- toObject: V,
415
- toFormat: U,
416
- fromFormat: le
461
+ toHSLAString: k,
462
+ toHSVString: B,
463
+ toHSVAString: M,
464
+ toObject: g,
465
+ toFormat: H,
466
+ fromFormat: U
417
467
  };
418
468
  }
419
- function we(l, e, t) {
420
- const s = W(void 0);
421
- return ee(
422
- () => l.modelValue,
423
- (u) => {
424
- u !== s.value && t(u);
425
- },
426
- { immediate: !0 }
427
- ), g({
428
- get: () => l.modelValue,
429
- set: (u) => {
430
- s.value = u, e("update:modelValue", u);
431
- }
432
- });
433
- }
434
- const [w, Ve] = ce("ColorPickerRoot"), Ye = /* @__PURE__ */ C({
469
+ const [S, Pe] = pe("ColorPickerRoot"), nt = /* @__PURE__ */ V({
435
470
  __name: "ColorPickerRoot",
436
471
  props: {
437
472
  ui: {},
@@ -442,203 +477,205 @@ const [w, Ve] = ce("ColorPickerRoot"), Ye = /* @__PURE__ */ C({
442
477
  modelValue: {},
443
478
  format: { default: "hexa" }
444
479
  },
445
- emits: ["update:end", "update:modelValue"],
446
- setup(l, { expose: e, emit: t }) {
447
- const s = l, u = t, i = Ce(), o = we(s, u, (b) => {
480
+ emits: ["valueCommit", "update:modelValue"],
481
+ setup(a, { expose: e, emit: t }) {
482
+ const s = a, u = t, i = Ie(), o = me(s, u, (b) => {
448
483
  b === null || s.format === "object" && typeof b != "object" || s.format !== "object" && typeof b == "object" ? i.hexa.value = s.defaultValue : i.fromFormat(b, s.format);
449
484
  });
450
- ee(
485
+ te(
451
486
  () => [i.hexa.value, i.hsv.value],
452
487
  () => o.value = i.toFormat(s.format)
453
488
  );
454
- const r = g(() => s.disabled), n = g(() => ["hexa", "rgba", "hsva", "object"].includes(s.format)), d = he(ve[s.styling], s.ui), h = d("picker");
455
- return Ve({
489
+ const r = m(() => s.disabled), n = m(() => ["hexa", "rgba", "hsva", "object"].includes(s.format)), d = Ce($e[s.styling], s.ui), p = d("picker");
490
+ return Pe({
456
491
  ...i,
457
492
  uiSlots: d,
458
493
  disabled: r,
459
494
  isAlphaEnabled: n,
460
- emitUpdateEnd: () => {
461
- s.disabled || u("update:end", i.toFormat(s.format));
495
+ commitValue: () => {
496
+ s.disabled || u("valueCommit", i.toFormat(s.format));
462
497
  }
463
498
  }), e({
464
499
  color: i
465
- }), (b, f) => ($(), H("div", {
466
- class: c(a(h).root(s.class))
500
+ }), (b, f) => (y(), P("div", {
501
+ class: c(l(p).root(s.class))
467
502
  }, [
468
- D(b.$slots, "default")
503
+ T(b.$slots, "default")
469
504
  ], 2));
470
505
  }
471
506
  });
472
- function _e(l, e) {
473
- const t = l.canvas.width, s = l.canvas.height, u = `hsl(${e},100%,50%)`;
474
- l.rect(0, 0, t, s), l.fillStyle = u, l.fillRect(0, 0, t, s);
475
- const i = l.createLinearGradient(0, 0, t, 0);
476
- i.addColorStop(0, "rgba(255,255,255,1)"), i.addColorStop(1, "rgba(255,255,255,0)"), l.fillStyle = i, l.fillRect(0, 0, t, s);
477
- const o = l.createLinearGradient(0, 0, 0, s);
478
- o.addColorStop(0, "rgba(0,0,0,0)"), o.addColorStop(1, "rgba(0,0,0,1)"), l.fillStyle = o, l.fillRect(0, 0, t, s);
507
+ function Ae(a, e) {
508
+ const t = a.canvas.width, s = a.canvas.height, u = `hsl(${e},100%,50%)`;
509
+ a.rect(0, 0, t, s), a.fillStyle = u, a.fillRect(0, 0, t, s);
510
+ const i = a.createLinearGradient(0, 0, t, 0);
511
+ i.addColorStop(0, "rgba(255,255,255,1)"), i.addColorStop(1, "rgba(255,255,255,0)"), a.fillStyle = i, a.fillRect(0, 0, t, s);
512
+ const o = a.createLinearGradient(0, 0, 0, s);
513
+ o.addColorStop(0, "rgba(0,0,0,0)"), o.addColorStop(1, "rgba(0,0,0,1)"), a.fillStyle = o, a.fillRect(0, 0, t, s);
479
514
  }
480
- function Be(l, e) {
481
- const t = l.canvas.width, s = l.canvas.height;
482
- l.clearRect(0, 0, t, s);
483
- const u = l.createLinearGradient(0, 0, t, 0), i = 12;
515
+ function Fe(a, e) {
516
+ const t = a.canvas.width, s = a.canvas.height;
517
+ a.clearRect(0, 0, t, s);
518
+ const u = a.createLinearGradient(0, 0, t, 0), i = 12;
484
519
  for (let n = 0; n <= i; n++) {
485
- const d = n / i, { r: h, g: b, b: f } = X(te({ h: e, s: d, l: 0.5 }));
486
- u.addColorStop(d, `rgb(${h} ${b} ${f})`);
520
+ const d = n / i, { r: p, g: b, b: f } = X(se({ h: e, s: d, l: 0.5 }));
521
+ u.addColorStop(d, `rgb(${p} ${b} ${f})`);
487
522
  }
488
- l.fillStyle = u, l.fillRect(0, 0, t, s), l.globalCompositeOperation = "screen";
489
- let o = l.createLinearGradient(0, 0, 0, s);
490
- o.addColorStop(0, "white"), o.addColorStop(0.5, "rgba(255,255,255,0)"), l.fillStyle = o, l.fillRect(0, 0, t, s), l.globalCompositeOperation = "multiply";
491
- let r = l.createLinearGradient(0, 0, 0, s);
492
- r.addColorStop(0.5, "rgba(0,0,0,0)"), r.addColorStop(1, "black"), l.fillStyle = r, l.fillRect(0, 0, t, s), l.globalCompositeOperation = "source-over";
523
+ a.fillStyle = u, a.fillRect(0, 0, t, s), a.globalCompositeOperation = "screen";
524
+ let o = a.createLinearGradient(0, 0, 0, s);
525
+ o.addColorStop(0, "white"), o.addColorStop(0.5, "rgba(255,255,255,0)"), a.fillStyle = o, a.fillRect(0, 0, t, s), a.globalCompositeOperation = "multiply";
526
+ let r = a.createLinearGradient(0, 0, 0, s);
527
+ r.addColorStop(0.5, "rgba(0,0,0,0)"), r.addColorStop(1, "black"), a.fillStyle = r, a.fillRect(0, 0, t, s), a.globalCompositeOperation = "source-over";
493
528
  }
494
- function Pe(l, e) {
495
- const t = w(), s = W({
529
+ function Me(a, e) {
530
+ const t = S(), s = O({
496
531
  top: 1,
497
532
  left: 1,
498
533
  width: 1,
499
534
  height: 1
500
- }), { hsl: u, hsv: i } = t, o = g({
535
+ }), { hsl: u, hsv: i } = t, o = m({
501
536
  get: () => e.value === "HSV" ? 1 - i.value.v : 1 - u.value.l,
502
- set: (m) => {
503
- e.value === "HSV" ? i.value = { ...i.value, v: _(1 - m, 0, 1) } : u.value = { ...u.value, l: _(1 - m, 0, 1) };
537
+ set: (g) => {
538
+ e.value === "HSV" ? i.value = { ...i.value, v: _(1 - g, 0, 1) } : u.value = { ...u.value, l: _(1 - g, 0, 1) };
504
539
  }
505
- }), r = g({
540
+ }), r = m({
506
541
  get: () => e.value === "HSV" ? i.value.s : u.value.s,
507
- set: (m) => {
508
- e.value === "HSV" ? i.value = { ...i.value, s: _(m, 0, 1) } : u.value = { ...u.value, s: _(m, 0, 1) };
542
+ set: (g) => {
543
+ e.value === "HSV" ? i.value = { ...i.value, s: _(g, 0, 1) } : u.value = { ...u.value, s: _(g, 0, 1) };
509
544
  }
510
- }), n = g(() => {
511
- const m = r.value * s.value.width, V = o.value * s.value.height;
545
+ }), n = O(!1), d = m(() => {
546
+ const g = r.value * s.value.width, H = o.value * s.value.height;
512
547
  return {
513
548
  top: 0,
514
549
  left: 0,
515
550
  position: "absolute",
516
- backgroundColor: ge({ ...t.rgba.value, a: 1 }),
517
- transform: `translate3d(calc(-50% + ${m}px), calc(-50% + ${V}px), 0px)`
551
+ display: n.value ? void 0 : "none",
552
+ backgroundColor: fe({ ...t.rgba.value, a: 1 }),
553
+ transform: `translate3d(calc(-50% + ${g}px), calc(-50% + ${H}px), 0px)`
518
554
  };
519
555
  });
520
- oe(() => {
521
- d(), window.addEventListener("resize", d);
522
- }), se(() => {
523
- window.removeEventListener("resize", d);
556
+ ne(() => {
557
+ p(), n.value = !0, window.addEventListener("resize", p);
558
+ }), re(() => {
559
+ window.removeEventListener("resize", p);
524
560
  });
525
- function d() {
526
- const m = l.value;
527
- m && (s.value = m.getBoundingClientRect());
561
+ function p() {
562
+ const g = a.value;
563
+ g && (s.value = g.getBoundingClientRect());
528
564
  }
529
- function h(m) {
530
- document.addEventListener("pointermove", b), document.addEventListener("pointerup", f), d(), b(m);
565
+ function b(g) {
566
+ t.disabled.value || (document.addEventListener("pointermove", f), document.addEventListener("pointerup", k), p(), f(g));
531
567
  }
532
- function b(m) {
533
- m.preventDefault();
534
- const V = m.clientY - s.value.top, U = m.clientX - s.value.left;
535
- r.value = _(U, 0, s.value.width) / s.value.width, o.value = _(V, 0, s.value.height) / s.value.height;
568
+ function f(g) {
569
+ g.preventDefault();
570
+ const H = g.clientY - s.value.top, U = g.clientX - s.value.left;
571
+ r.value = _(U, 0, s.value.width) / s.value.width, o.value = _(H, 0, s.value.height) / s.value.height;
536
572
  }
537
- function f() {
538
- document.removeEventListener("pointermove", b), document.removeEventListener("pointerup", f), t.emitUpdateEnd();
573
+ function k() {
574
+ document.removeEventListener("pointermove", f), document.removeEventListener("pointerup", k), t.commitValue();
539
575
  }
540
- function B(m) {
541
- const V = m.shiftKey ? 0.1 : 0.01;
542
- switch (m.key) {
576
+ function B(g) {
577
+ if (t.disabled.value) return;
578
+ const H = g.shiftKey ? 0.1 : 0.01;
579
+ switch (g.key) {
543
580
  case "ArrowUp":
544
- m.preventDefault(), o.value -= V, t.emitUpdateEnd();
581
+ g.preventDefault(), o.value -= H, t.commitValue();
545
582
  break;
546
583
  case "ArrowDown":
547
- m.preventDefault(), o.value += V, t.emitUpdateEnd();
584
+ g.preventDefault(), o.value += H, t.commitValue();
548
585
  break;
549
586
  case "ArrowLeft":
550
- m.preventDefault(), r.value -= V, t.emitUpdateEnd();
587
+ g.preventDefault(), r.value -= H, t.commitValue();
551
588
  break;
552
589
  case "ArrowRight":
553
- m.preventDefault(), r.value += V, t.emitUpdateEnd();
590
+ g.preventDefault(), r.value += H, t.commitValue();
554
591
  break;
555
592
  }
556
593
  }
557
- function T(m) {
558
- const V = m.deltaY * 0.1, U = (t.hsv.value.h + V) % 360;
559
- m.preventDefault(), t.hsv.value = {
594
+ function M(g) {
595
+ if (t.disabled.value) return;
596
+ const H = g.deltaY * 0.1, U = (t.hsv.value.h + H) % 360;
597
+ g.preventDefault(), t.hsv.value = {
560
598
  ...t.hsv.value,
561
599
  h: U < 0 ? 360 : U
562
600
  };
563
601
  }
564
602
  return {
565
- thumbStyles: n,
566
- handleWheel: T,
603
+ thumbStyles: d,
604
+ handleWheel: M,
567
605
  handleKeyDown: B,
568
- handlePointerDown: h
606
+ handlePointerDown: b
569
607
  };
570
608
  }
571
- const He = ["height", "width"], Xe = /* @__PURE__ */ C({
609
+ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
572
610
  __name: "ColorPickerCanvas",
573
611
  props: {
574
612
  type: { default: "HSV" },
575
613
  height: { default: 208 },
576
614
  width: { default: 208 },
615
+ wheel: { type: Boolean, default: !0 },
577
616
  class: {},
578
617
  ui: {}
579
618
  },
580
- setup(l) {
581
- const e = w(), t = ne("canvasRef"), s = l, u = g(() => ({
619
+ setup(a) {
620
+ const e = S(), t = ue("canvasRef"), s = a, u = m(() => ({
582
621
  position: "relative",
583
622
  height: `${s.height}px`,
584
623
  width: `${s.width}px`
585
624
  }));
586
- re(() => {
625
+ ie(() => {
587
626
  const b = t.value?.getContext("2d");
588
627
  if (b)
589
628
  switch (s.type) {
590
629
  case "HSL":
591
- Be(b, e.hsv.value.h);
630
+ Fe(b, e.hsv.value.h);
592
631
  break;
593
632
  case "HSV":
594
- _e(b, e.hsv.value.h);
633
+ Ae(b, e.hsv.value.h);
595
634
  break;
596
635
  }
597
636
  });
598
- const i = g(() => s.type), {
637
+ const i = m(() => s.type), {
599
638
  thumbStyles: o,
600
639
  handleWheel: r,
601
640
  handleKeyDown: n,
602
641
  handlePointerDown: d
603
- } = Pe(t, i), h = e.uiSlots("canvas", "shared");
604
- return (b, f) => ($(), H("div", {
605
- style: y(u.value),
606
- class: c(a(h).root(s.ui?.root, s.class)),
607
- onContextmenu: f[0] || (f[0] = ie(() => {
642
+ } = Me(t, i), p = e.uiSlots("canvas", "shared");
643
+ return (b, f) => (y(), P("div", {
644
+ style: x(u.value),
645
+ class: c(l(p).root(s.ui?.root, s.class)),
646
+ "data-disabled": l(e).disabled.value ? "" : null,
647
+ onContextmenu: f[0] || (f[0] = ce(() => {
608
648
  }, ["prevent"])),
609
- onWheel: f[1] || (f[1] = //@ts-ignore
610
- (...B) => a(r) && a(r)(...B)),
611
- onKeydown: f[2] || (f[2] = //@ts-ignore
612
- (...B) => a(n) && a(n)(...B)),
613
- onPointerdown: f[3] || (f[3] = //@ts-ignore
614
- (...B) => a(d) && a(d)(...B))
649
+ onKeydown: f[1] || (f[1] = //@ts-ignore
650
+ (...k) => l(n) && l(n)(...k)),
651
+ onPointerdown: f[2] || (f[2] = //@ts-ignore
652
+ (...k) => l(d) && l(d)(...k)),
653
+ onWheel: f[3] || (f[3] = (k) => s.wheel && l(r)(k))
615
654
  }, [
616
- v("canvas", {
655
+ h("canvas", {
617
656
  ref_key: "canvasRef",
618
657
  ref: t,
619
658
  height: s.height,
620
659
  width: s.width,
621
- class: c(a(h).area(s.ui?.area))
622
- }, null, 10, He),
623
- v("span", {
660
+ class: c(l(p).area(s.ui?.area))
661
+ }, null, 10, De),
662
+ h("span", {
624
663
  tabindex: "0",
625
- style: y(a(o)),
626
- class: c(a(h).thumb(s.ui?.thumb))
664
+ style: x(l(o)),
665
+ class: c(l(p).thumb(s.ui?.thumb))
627
666
  }, null, 6)
628
- ], 38));
667
+ ], 46, Re));
629
668
  }
630
- }), Ze = /* @__PURE__ */ C({
669
+ }), ut = /* @__PURE__ */ V({
631
670
  __name: "ColorPickerEyeDropper",
632
671
  props: {
633
- class: {}
672
+ class: {},
673
+ as: { default: "button" },
674
+ asChild: { type: Boolean }
634
675
  },
635
- setup(l) {
636
- const e = l, t = w(), s = g(() => typeof window < "u" && !!window.EyeDropper);
676
+ setup(a) {
677
+ const e = a, t = S(), s = m(() => typeof window < "u" && !!window.EyeDropper);
637
678
  function u() {
638
- if (!s.value) {
639
- console.warn("EyeDropper API is not available in this environment.");
640
- return;
641
- }
642
679
  const o = window.EyeDropper;
643
680
  new o().open().then((n) => {
644
681
  t.hexa.value = n.sRGBHex;
@@ -647,389 +684,409 @@ const He = ["height", "width"], Xe = /* @__PURE__ */ C({
647
684
  });
648
685
  }
649
686
  const i = t.uiSlots("dropper");
650
- return (o, r) => s.value ? ($(), H("button", {
687
+ return (o, r) => s.value ? (y(), A(l(ae), {
651
688
  key: 0,
652
- class: c(a(i).base(e.class)),
689
+ as: e.as,
690
+ "as-child": e.asChild,
691
+ disabled: l(t).disabled.value,
692
+ class: c(l(i).base(e.class)),
653
693
  onClick: u
654
- }, [
655
- D(o.$slots, "default")
656
- ], 2)) : j("", !0);
694
+ }, {
695
+ default: F(() => [
696
+ T(o.$slots, "default")
697
+ ]),
698
+ _: 3
699
+ }, 8, ["as", "as-child", "disabled", "class"])) : W("", !0);
657
700
  }
658
- }), Ie = ["value", "disabled"], Ee = ["value", "disabled"], qe = /* @__PURE__ */ C({
701
+ }), Ee = ["data-disabled"], Le = ["value", "disabled"], Ge = ["value", "disabled"], it = /* @__PURE__ */ V({
659
702
  __name: "ColorPickerInputHex",
660
703
  props: {
704
+ modelValue: {},
661
705
  class: {},
662
706
  ui: {}
663
707
  },
664
- setup(l) {
665
- const e = l, t = w();
666
- function s(o) {
667
- const r = o.target, n = Y(r.value);
668
- n ? (t.rgba.value = n, t.emitUpdateEnd()) : r.value = t.hex.value;
708
+ emits: ["update:modelValue"],
709
+ setup(a, { emit: e }) {
710
+ const t = e, s = a, u = S(), i = de(), o = m(() => !!i?.vnode.props?.["onUpdate:modelValue"]), r = m(() => o.value ? ye(s.modelValue) : u.hex.value.replace("#", "")), n = m(() => o.value ? xe(s.modelValue) : u.alpha.value);
711
+ function d(f) {
712
+ const k = f.target, B = k.value ? Z(k.value) : null;
713
+ if (!B) {
714
+ k.value = r.value;
715
+ return;
716
+ }
717
+ o.value ? t("update:modelValue", be(B)) : (u.rgba.value = B, u.commitValue());
669
718
  }
670
- function u(o) {
671
- const r = o.target, n = parseInt(r.value, 10), d = isNaN(n) ? t.alpha.value : _(n, 0, 100);
672
- t.alpha.value !== d ? (t.alpha.value = d, t.emitUpdateEnd()) : r.value = d.toString();
719
+ function p(f) {
720
+ const k = f.target, B = parseInt(k.value, 10), M = isNaN(B) ? u.alpha.value : _(B, 0, 100);
721
+ u.alpha.value !== M ? (u.alpha.value = M, u.commitValue()) : k.value = M.toString();
673
722
  }
674
- const i = t.uiSlots("input");
675
- return (o, r) => ($(), H("div", {
676
- class: c(a(i).group(e.ui?.group, e.class))
723
+ const b = u.uiSlots("input");
724
+ return (f, k) => (y(), P("div", {
725
+ class: c(l(b).group(s.ui?.group, s.class)),
726
+ "data-disabled": l(u).disabled.value ? "" : null
677
727
  }, [
678
- D(o.$slots, "before"),
679
- v("div", {
680
- class: c(a(i).item(e.ui?.item))
728
+ h("div", {
729
+ class: c(l(b).item(s.ui?.item))
681
730
  }, [
682
- v("span", {
683
- class: c(a(i).label(e.ui?.label))
731
+ T(f.$slots, "before"),
732
+ h("span", {
733
+ class: c(l(b).label(s.ui?.label))
684
734
  }, "#", 2),
685
- v("input", {
735
+ h("input", {
686
736
  type: "text",
687
737
  name: "hex",
688
738
  "aria-label": "Hex",
689
- value: a(t).hex.value.replace("#", ""),
690
- disabled: a(t).disabled.value,
691
- class: c(a(i).field(e.ui?.field)),
692
- onBlur: s
693
- }, null, 42, Ie)
739
+ value: r.value,
740
+ disabled: l(u).disabled.value,
741
+ class: c(l(b).field(s.ui?.field)),
742
+ onBlur: d
743
+ }, null, 42, Le)
694
744
  ], 2),
695
- a(t).isAlphaEnabled.value ? ($(), H("div", {
745
+ l(u).isAlphaEnabled.value ? (y(), P("div", {
696
746
  key: 0,
697
747
  "data-alpha-input": "",
698
- class: c(a(i).item(e.ui?.item))
748
+ class: c(l(b).item(s.ui?.item))
699
749
  }, [
700
- v("input", {
750
+ h("input", {
701
751
  type: "text",
702
752
  name: "opacity",
703
753
  "aria-label": "Opacity",
704
- value: a(t).alpha.value,
705
- disabled: a(t).disabled.value,
706
- class: c(a(i).field(e.ui?.field)),
707
- onBlur: u
708
- }, null, 42, Ee),
709
- v("span", {
710
- class: c(a(i).label(e.ui?.label))
754
+ value: n.value,
755
+ disabled: l(u).disabled.value,
756
+ class: c(l(b).field(s.ui?.field)),
757
+ onBlur: p
758
+ }, null, 42, Ge),
759
+ h("span", {
760
+ "data-alpha-label": "",
761
+ class: c(l(b).label(s.ui?.label))
711
762
  }, "%", 2)
712
- ], 2)) : j("", !0)
713
- ], 2));
763
+ ], 2)) : W("", !0)
764
+ ], 10, Ee));
714
765
  }
715
- }), Fe = ["disabled", "value"], Ae = ["disabled", "value"], Re = ["disabled", "value"], Le = ["value", "disabled"], Je = /* @__PURE__ */ C({
766
+ }), Ne = ["data-disabled"], Ue = ["disabled", "value"], je = ["disabled", "value"], Te = ["disabled", "value"], ze = ["value", "disabled"], ct = /* @__PURE__ */ V({
716
767
  __name: "ColorPickerInputRGB",
717
768
  props: {
718
769
  class: {},
719
770
  ui: {}
720
771
  },
721
- setup(l) {
722
- const e = l, t = w();
772
+ setup(a) {
773
+ const e = a, t = S();
723
774
  function s(r, n) {
724
- const d = r.target, h = parseInt(d.value, 10), b = isNaN(h) ? t.rgb.value[n] : _(h, 0, 255);
775
+ const d = r.target, p = parseInt(d.value, 10), b = isNaN(p) ? t.rgb.value[n] : _(p, 0, 255);
725
776
  t.rgb.value[n] !== b ? (t.rgb.value = {
726
777
  ...t.rgb.value,
727
778
  [n]: b
728
- }, t.emitUpdateEnd()) : d.value = b.toString();
779
+ }, t.commitValue()) : d.value = b.toString();
729
780
  }
730
781
  function u(r) {
731
- const n = r.target, d = parseInt(n.value, 10), h = isNaN(d) ? t.alpha.value : _(d, 0, 100);
732
- t.alpha.value !== h ? (t.alpha.value = h, t.emitUpdateEnd()) : n.value = h.toString();
782
+ const n = r.target, d = parseInt(n.value, 10), p = isNaN(d) ? t.alpha.value : _(d, 0, 100);
783
+ t.alpha.value !== p ? (t.alpha.value = p, t.commitValue()) : n.value = p.toString();
733
784
  }
734
785
  const i = (r) => Math.round(r), o = t.uiSlots("input");
735
- return (r, n) => ($(), H("div", {
736
- class: c(a(o).group(e.ui?.group, e.class))
786
+ return (r, n) => (y(), P("div", {
787
+ class: c(l(o).group(e.ui?.group, e.class)),
788
+ "data-disabled": l(t).disabled.value ? "" : null
737
789
  }, [
738
- D(r.$slots, "before"),
739
- v("div", {
740
- class: c(a(o).item(e.ui?.item))
790
+ h("div", {
791
+ class: c(l(o).item(e.ui?.item))
741
792
  }, [
742
- v("span", {
743
- class: c(a(o).label(e.ui?.label))
793
+ T(r.$slots, "before"),
794
+ h("span", {
795
+ class: c(l(o).label(e.ui?.label))
744
796
  }, "R", 2),
745
- v("input", {
797
+ h("input", {
746
798
  type: "text",
747
799
  name: "red",
748
800
  "aria-label": "Red",
749
- disabled: a(t).disabled.value,
750
- class: c(a(o).field(e.ui?.field)),
751
- value: i(a(t).rgb.value.r),
801
+ disabled: l(t).disabled.value,
802
+ class: c(l(o).field(e.ui?.field)),
803
+ value: i(l(t).rgb.value.r),
752
804
  onBlur: n[0] || (n[0] = (d) => s(d, "r"))
753
- }, null, 42, Fe)
805
+ }, null, 42, Ue)
754
806
  ], 2),
755
- v("div", {
756
- class: c(a(o).item(e.ui?.item))
807
+ h("div", {
808
+ class: c(l(o).item(e.ui?.item))
757
809
  }, [
758
- v("span", {
759
- class: c(a(o).label(e.ui?.label))
810
+ h("span", {
811
+ class: c(l(o).label(e.ui?.label))
760
812
  }, "G", 2),
761
- v("input", {
813
+ h("input", {
762
814
  type: "text",
763
815
  name: "green",
764
816
  "aria-label": "Green",
765
- disabled: a(t).disabled.value,
766
- class: c(a(o).field(e.ui?.field)),
767
- value: i(a(t).rgb.value.g),
817
+ disabled: l(t).disabled.value,
818
+ class: c(l(o).field(e.ui?.field)),
819
+ value: i(l(t).rgb.value.g),
768
820
  onBlur: n[1] || (n[1] = (d) => s(d, "g"))
769
- }, null, 42, Ae)
821
+ }, null, 42, je)
770
822
  ], 2),
771
- v("div", {
772
- class: c(a(o).item(e.ui?.item))
823
+ h("div", {
824
+ class: c(l(o).item(e.ui?.item))
773
825
  }, [
774
- v("span", {
775
- class: c(a(o).label(e.ui?.label))
826
+ h("span", {
827
+ class: c(l(o).label(e.ui?.label))
776
828
  }, "B", 2),
777
- v("input", {
829
+ h("input", {
778
830
  type: "text",
779
831
  name: "blue",
780
832
  "aria-label": "Blue",
781
- disabled: a(t).disabled.value,
782
- class: c(a(o).field(e.ui?.field)),
783
- value: i(a(t).rgb.value.b),
833
+ disabled: l(t).disabled.value,
834
+ class: c(l(o).field(e.ui?.field)),
835
+ value: i(l(t).rgb.value.b),
784
836
  onBlur: n[2] || (n[2] = (d) => s(d, "b"))
785
- }, null, 42, Re)
837
+ }, null, 42, Te)
786
838
  ], 2),
787
- a(t).isAlphaEnabled.value ? ($(), H("div", {
839
+ l(t).isAlphaEnabled.value ? (y(), P("div", {
788
840
  key: 0,
789
841
  "data-alpha-input": "",
790
- class: c(a(o).item(e.ui?.item))
842
+ class: c(l(o).item(e.ui?.item))
791
843
  }, [
792
- v("input", {
844
+ h("input", {
793
845
  type: "text",
794
846
  name: "opacity",
795
847
  "aria-label": "Opacity",
796
- value: a(t).alpha.value,
797
- disabled: a(t).disabled.value,
798
- class: c(a(o).field(e.ui?.field)),
848
+ value: l(t).alpha.value,
849
+ disabled: l(t).disabled.value,
850
+ class: c(l(o).field(e.ui?.field)),
799
851
  onBlur: u
800
- }, null, 42, Le),
801
- v("span", {
802
- class: c(a(o).label(e.ui?.label))
852
+ }, null, 42, ze),
853
+ h("span", {
854
+ "data-alpha-label": "",
855
+ class: c(l(o).label(e.ui?.label))
803
856
  }, "%", 2)
804
- ], 2)) : j("", !0)
805
- ], 2));
857
+ ], 2)) : W("", !0)
858
+ ], 10, Ne));
806
859
  }
807
- }), Me = ["disabled", "value"], Ue = ["disabled", "value"], Ge = ["disabled", "value"], De = ["value", "disabled"], Qe = /* @__PURE__ */ C({
860
+ }), Oe = ["data-disabled"], We = ["disabled", "value"], Ke = ["disabled", "value"], Ze = ["disabled", "value"], Ye = ["value", "disabled"], dt = /* @__PURE__ */ V({
808
861
  __name: "ColorPickerInputHSL",
809
862
  props: {
810
863
  class: {},
811
864
  ui: {}
812
865
  },
813
- setup(l) {
814
- const e = l, t = w();
866
+ setup(a) {
867
+ const e = a, t = S();
815
868
  function s(r, n, d) {
816
- const h = r.target, b = parseInt(h.value, 10), f = isNaN(b) ? t.hsl.value[n] : _(b, 0, d);
869
+ const p = r.target, b = parseInt(p.value, 10), f = isNaN(b) ? t.hsl.value[n] : _(b, 0, d);
817
870
  t.hsl.value[n] !== f ? (t.hsl.value = {
818
871
  ...t.hsl.value,
819
872
  [n]: n === "h" ? f : f / 100
820
- }, t.emitUpdateEnd()) : h.value = n !== "h" ? Math.round(f * 100).toString() : f.toString();
873
+ }, t.commitValue()) : p.value = n !== "h" ? Math.round(f * 100).toString() : f.toString();
821
874
  }
822
875
  function u(r) {
823
- const n = r.target, d = parseInt(n.value, 10), h = isNaN(d) ? t.alpha.value : _(d, 0, 100);
824
- t.alpha.value !== h ? (t.alpha.value = h, t.emitUpdateEnd()) : n.value = h.toString();
876
+ const n = r.target, d = parseInt(n.value, 10), p = isNaN(d) ? t.alpha.value : _(d, 0, 100);
877
+ t.alpha.value !== p ? (t.alpha.value = p, t.commitValue()) : n.value = p.toString();
825
878
  }
826
879
  const i = (r) => Math.round(r * 100), o = t.uiSlots("input");
827
- return (r, n) => ($(), H("div", {
828
- class: c(a(o).group(e.ui?.group, e.class))
880
+ return (r, n) => (y(), P("div", {
881
+ class: c(l(o).group(e.ui?.group, e.class)),
882
+ "data-disabled": l(t).disabled.value ? "" : null
829
883
  }, [
830
- D(r.$slots, "before"),
831
- v("div", {
832
- class: c(a(o).item(e.ui?.item))
884
+ h("div", {
885
+ class: c(l(o).item(e.ui?.item))
833
886
  }, [
834
- v("span", {
835
- class: c(a(o).label(e.ui?.label))
887
+ T(r.$slots, "before"),
888
+ h("span", {
889
+ class: c(l(o).label(e.ui?.label))
836
890
  }, "H", 2),
837
- v("input", {
891
+ h("input", {
838
892
  type: "text",
839
893
  name: "hue",
840
894
  "aria-label": "Hue",
841
- disabled: a(t).disabled.value,
842
- class: c(a(o).field(e.ui?.field)),
843
- value: Math.round(a(t).hsl.value.h),
895
+ disabled: l(t).disabled.value,
896
+ class: c(l(o).field(e.ui?.field)),
897
+ value: Math.round(l(t).hsl.value.h),
844
898
  onBlur: n[0] || (n[0] = (d) => s(d, "h", 360))
845
- }, null, 42, Me)
899
+ }, null, 42, We)
846
900
  ], 2),
847
- v("div", {
848
- class: c(a(o).item(e.ui?.item))
901
+ h("div", {
902
+ class: c(l(o).item(e.ui?.item))
849
903
  }, [
850
- v("span", {
851
- class: c(a(o).label(e.ui?.label))
904
+ h("span", {
905
+ class: c(l(o).label(e.ui?.label))
852
906
  }, "S", 2),
853
- v("input", {
907
+ h("input", {
854
908
  type: "text",
855
909
  name: "saturation",
856
910
  "aria-label": "Saturation",
857
- disabled: a(t).disabled.value,
858
- class: c(a(o).field(e.ui?.field)),
859
- value: i(a(t).hsl.value.s),
911
+ disabled: l(t).disabled.value,
912
+ class: c(l(o).field(e.ui?.field)),
913
+ value: i(l(t).hsl.value.s),
860
914
  onBlur: n[1] || (n[1] = (d) => s(d, "s", 100))
861
- }, null, 42, Ue)
915
+ }, null, 42, Ke)
862
916
  ], 2),
863
- v("div", {
864
- class: c(a(o).item(e.ui?.item))
917
+ h("div", {
918
+ class: c(l(o).item(e.ui?.item))
865
919
  }, [
866
- v("span", {
867
- class: c(a(o).label(e.ui?.label))
920
+ h("span", {
921
+ class: c(l(o).label(e.ui?.label))
868
922
  }, "L", 2),
869
- v("input", {
923
+ h("input", {
870
924
  type: "text",
871
925
  name: "lightness",
872
926
  "aria-label": "Lightness",
873
- disabled: a(t).disabled.value,
874
- class: c(a(o).field(e.ui?.field)),
875
- value: i(a(t).hsl.value.l),
927
+ disabled: l(t).disabled.value,
928
+ class: c(l(o).field(e.ui?.field)),
929
+ value: i(l(t).hsl.value.l),
876
930
  onBlur: n[2] || (n[2] = (d) => s(d, "l", 100))
877
- }, null, 42, Ge)
931
+ }, null, 42, Ze)
878
932
  ], 2),
879
- a(t).isAlphaEnabled.value ? ($(), H("div", {
933
+ l(t).isAlphaEnabled.value ? (y(), P("div", {
880
934
  key: 0,
881
935
  "data-alpha-input": "",
882
- class: c(a(o).item(e.ui?.item))
936
+ class: c(l(o).item(e.ui?.item))
883
937
  }, [
884
- v("input", {
938
+ h("input", {
885
939
  type: "text",
886
940
  name: "opacity",
887
941
  "aria-label": "Opacity",
888
- value: a(t).alpha.value,
889
- disabled: a(t).disabled.value,
890
- class: c(a(o).field(e.ui?.field)),
942
+ value: l(t).alpha.value,
943
+ disabled: l(t).disabled.value,
944
+ class: c(l(o).field(e.ui?.field)),
891
945
  onBlur: u
892
- }, null, 42, De),
893
- v("span", {
894
- class: c(a(o).label(e.ui?.label))
946
+ }, null, 42, Ye),
947
+ h("span", {
948
+ "data-alpha-label": "",
949
+ class: c(l(o).label(e.ui?.label))
895
950
  }, "%", 2)
896
- ], 2)) : j("", !0)
897
- ], 2));
951
+ ], 2)) : W("", !0)
952
+ ], 10, Oe));
898
953
  }
899
- }), Ne = ["disabled", "value"], je = ["disabled", "value"], Te = ["disabled", "value"], ze = ["value", "disabled"], et = /* @__PURE__ */ C({
954
+ }), Xe = ["data-disabled"], qe = ["disabled", "value"], Je = ["disabled", "value"], Qe = ["disabled", "value"], et = ["value", "disabled"], vt = /* @__PURE__ */ V({
900
955
  __name: "ColorPickerInputHSB",
901
956
  props: {
902
957
  class: {},
903
958
  ui: {}
904
959
  },
905
- setup(l) {
906
- const e = l, t = w();
960
+ setup(a) {
961
+ const e = a, t = S();
907
962
  function s(r, n, d) {
908
- const h = r.target, b = parseInt(h.value, 10), f = isNaN(b) ? t.hsv.value[n] : _(b, 0, d);
963
+ const p = r.target, b = parseInt(p.value, 10), f = isNaN(b) ? t.hsv.value[n] : _(b, 0, d);
909
964
  t.hsv.value[n] !== f ? (t.hsv.value = {
910
965
  ...t.hsv.value,
911
966
  [n]: n === "h" ? f : f / 100
912
- }, t.emitUpdateEnd()) : h.value = n !== "h" ? Math.round(f * 100).toString() : f.toString();
967
+ }, t.commitValue()) : p.value = n !== "h" ? Math.round(f * 100).toString() : f.toString();
913
968
  }
914
969
  function u(r) {
915
- const n = r.target, d = parseInt(n.value, 10), h = isNaN(d) ? t.alpha.value : _(d, 0, 100);
916
- t.alpha.value !== h ? (t.alpha.value = h, t.emitUpdateEnd()) : n.value = h.toString();
970
+ const n = r.target, d = parseInt(n.value, 10), p = isNaN(d) ? t.alpha.value : _(d, 0, 100);
971
+ t.alpha.value !== p ? (t.alpha.value = p, t.commitValue()) : n.value = p.toString();
917
972
  }
918
973
  const i = (r) => Math.round(r * 100), o = t.uiSlots("input");
919
- return (r, n) => ($(), H("div", {
920
- class: c(a(o).group(e.ui?.group, e.class))
974
+ return (r, n) => (y(), P("div", {
975
+ class: c(l(o).group(e.ui?.group, e.class)),
976
+ "data-disabled": l(t).disabled.value ? "" : null
921
977
  }, [
922
- D(r.$slots, "before"),
923
- v("div", {
924
- class: c(a(o).item(e.ui?.item))
978
+ h("div", {
979
+ class: c(l(o).item(e.ui?.item))
925
980
  }, [
926
- v("span", {
927
- class: c(a(o).label(e.ui?.label))
981
+ T(r.$slots, "before"),
982
+ h("span", {
983
+ class: c(l(o).label(e.ui?.label))
928
984
  }, "H", 2),
929
- v("input", {
985
+ h("input", {
930
986
  type: "text",
931
987
  name: "hue",
932
988
  "aria-label": "Hue",
933
- disabled: a(t).disabled.value,
934
- class: c(a(o).field(e.ui?.field)),
935
- value: Math.round(a(t).hsv.value.h),
989
+ disabled: l(t).disabled.value,
990
+ class: c(l(o).field(e.ui?.field)),
991
+ value: Math.round(l(t).hsv.value.h),
936
992
  onBlur: n[0] || (n[0] = (d) => s(d, "h", 360))
937
- }, null, 42, Ne)
993
+ }, null, 42, qe)
938
994
  ], 2),
939
- v("div", {
940
- class: c(a(o).item(e.ui?.item))
995
+ h("div", {
996
+ class: c(l(o).item(e.ui?.item))
941
997
  }, [
942
- v("span", {
943
- class: c(a(o).label(e.ui?.label))
998
+ h("span", {
999
+ class: c(l(o).label(e.ui?.label))
944
1000
  }, "S", 2),
945
- v("input", {
1001
+ h("input", {
946
1002
  type: "text",
947
1003
  name: "saturation",
948
1004
  "aria-label": "Saturation",
949
- disabled: a(t).disabled.value,
950
- class: c(a(o).field(e.ui?.field)),
951
- value: i(a(t).hsv.value.s),
1005
+ disabled: l(t).disabled.value,
1006
+ class: c(l(o).field(e.ui?.field)),
1007
+ value: i(l(t).hsv.value.s),
952
1008
  onBlur: n[1] || (n[1] = (d) => s(d, "s", 100))
953
- }, null, 42, je)
1009
+ }, null, 42, Je)
954
1010
  ], 2),
955
- v("div", {
956
- class: c(a(o).item(e.ui?.item))
1011
+ h("div", {
1012
+ class: c(l(o).item(e.ui?.item))
957
1013
  }, [
958
- v("span", {
959
- class: c(a(o).label(e.ui?.label))
1014
+ h("span", {
1015
+ class: c(l(o).label(e.ui?.label))
960
1016
  }, "B", 2),
961
- v("input", {
1017
+ h("input", {
962
1018
  type: "text",
963
1019
  name: "brightness",
964
1020
  "aria-label": "Brightness",
965
- disabled: a(t).disabled.value,
966
- class: c(a(o).field(e.ui?.field)),
967
- value: i(a(t).hsv.value.v),
1021
+ disabled: l(t).disabled.value,
1022
+ class: c(l(o).field(e.ui?.field)),
1023
+ value: i(l(t).hsv.value.v),
968
1024
  onBlur: n[2] || (n[2] = (d) => s(d, "v", 100))
969
- }, null, 42, Te)
1025
+ }, null, 42, Qe)
970
1026
  ], 2),
971
- a(t).isAlphaEnabled.value ? ($(), H("div", {
1027
+ l(t).isAlphaEnabled.value ? (y(), P("div", {
972
1028
  key: 0,
973
1029
  "data-alpha-input": "",
974
- class: c(a(o).item(e.ui?.item))
1030
+ class: c(l(o).item(e.ui?.item))
975
1031
  }, [
976
- v("input", {
1032
+ h("input", {
977
1033
  type: "text",
978
1034
  name: "opacity",
979
1035
  "aria-label": "Opacity",
980
- value: a(t).alpha.value,
981
- disabled: a(t).disabled.value,
982
- class: c(a(o).field(e.ui?.field)),
1036
+ value: l(t).alpha.value,
1037
+ disabled: l(t).disabled.value,
1038
+ class: c(l(o).field(e.ui?.field)),
983
1039
  onBlur: u
984
- }, null, 42, ze),
985
- v("span", {
986
- class: c(a(o).label(e.ui?.label))
1040
+ }, null, 42, et),
1041
+ h("span", {
1042
+ "data-alpha-label": "",
1043
+ class: c(l(o).label(e.ui?.label))
987
1044
  }, "%", 2)
988
- ], 2)) : j("", !0)
989
- ], 2));
1045
+ ], 2)) : W("", !0)
1046
+ ], 10, Xe));
990
1047
  }
991
- }), tt = /* @__PURE__ */ C({
1048
+ }), pt = /* @__PURE__ */ V({
992
1049
  __name: "ColorPickerSliderAlpha",
993
1050
  props: {
994
1051
  class: {},
995
1052
  orientation: { default: "horizontal" },
996
1053
  ui: {}
997
1054
  },
998
- setup(l) {
999
- const e = w(), t = g({
1055
+ setup(a) {
1056
+ const e = S(), t = m({
1000
1057
  get: () => [e.alpha.value],
1001
1058
  set: ([o]) => {
1002
1059
  e.alpha.value = o;
1003
1060
  }
1004
- }), s = l, u = g(() => ({
1061
+ }), s = a, u = m(() => ({
1005
1062
  background: [
1006
1063
  `linear-gradient(${s.orientation === "vertical" ? "to top" : "to right"}, rgba(0, 0, 0, 0) 0%, ${e.hex.value} 100%)`,
1007
1064
  "repeating-conic-gradient(#ddd 0% 25%, transparent 0% 50%) 50% / 8px 8px"
1008
1065
  ].join(",")
1009
1066
  })), i = e.uiSlots("slider", "shared");
1010
- return (o, r) => ($(), F(a(R), {
1067
+ return (o, r) => (y(), A(l(L), {
1011
1068
  modelValue: t.value,
1012
1069
  "onUpdate:modelValue": r[0] || (r[0] = (n) => t.value = n),
1013
- disabled: a(e).disabled.value,
1070
+ disabled: l(e).disabled.value,
1014
1071
  orientation: s.orientation,
1015
- class: c(a(i).root(s.ui?.root, s.class)),
1016
- onPointerup: r[1] || (r[1] = (n) => a(e).emitUpdateEnd())
1072
+ class: c(l(i).root(s.ui?.root, s.class)),
1073
+ onValueCommit: r[1] || (r[1] = (n) => l(e).commitValue())
1017
1074
  }, {
1018
- default: A(() => [
1019
- S(a(L), {
1020
- style: y(u.value),
1021
- class: c(a(i).track(s.ui?.track))
1075
+ default: F(() => [
1076
+ w(l(G), {
1077
+ style: x(u.value),
1078
+ class: c(l(i).track(s.ui?.track))
1022
1079
  }, null, 8, ["style", "class"]),
1023
- S(a(M), {
1024
- style: y({ backgroundColor: a(e).hexa.value }),
1025
- class: c(a(i).thumb(s.ui?.thumb)),
1080
+ w(l(N), {
1081
+ style: x({ backgroundColor: l(e).hexa.value }),
1082
+ class: c(l(i).thumb(s.ui?.thumb)),
1026
1083
  "aria-label": "Opacity"
1027
1084
  }, null, 8, ["style", "class"])
1028
1085
  ]),
1029
1086
  _: 1
1030
1087
  }, 8, ["modelValue", "disabled", "orientation", "class"]));
1031
1088
  }
1032
- }), at = /* @__PURE__ */ C({
1089
+ }), ht = /* @__PURE__ */ V({
1033
1090
  __name: "ColorPickerSliderHue",
1034
1091
  props: {
1035
1092
  class: {},
@@ -1037,8 +1094,8 @@ const He = ["height", "width"], Xe = /* @__PURE__ */ C({
1037
1094
  orientation: { default: "horizontal" },
1038
1095
  ui: {}
1039
1096
  },
1040
- setup(l) {
1041
- const e = l, t = w(), s = g({
1097
+ setup(a) {
1098
+ const e = a, t = S(), s = m({
1042
1099
  get: () => [t.hsv.value.h],
1043
1100
  set: ([o]) => {
1044
1101
  t.hsv.value = {
@@ -1046,40 +1103,40 @@ const He = ["height", "width"], Xe = /* @__PURE__ */ C({
1046
1103
  h: o
1047
1104
  };
1048
1105
  }
1049
- }), u = g(() => `linear-gradient(${e.orientation === "vertical" ? "to top" : "to right"}, red, yellow, lime, cyan, blue, magenta, red)`), i = t.uiSlots("slider", "shared");
1050
- return (o, r) => ($(), F(a(R), {
1106
+ }), u = m(() => `linear-gradient(${e.orientation === "vertical" ? "to top" : "to right"}, red, yellow, lime, cyan, blue, magenta, red)`), i = t.uiSlots("slider", "shared");
1107
+ return (o, r) => (y(), A(l(L), {
1051
1108
  modelValue: s.value,
1052
1109
  "onUpdate:modelValue": r[0] || (r[0] = (n) => s.value = n),
1053
- disabled: a(t).disabled.value,
1110
+ disabled: l(t).disabled.value,
1054
1111
  max: 360,
1055
1112
  inverted: e.inverted,
1056
1113
  orientation: e.orientation,
1057
- class: c(a(i).root(e.ui?.root, e.class)),
1058
- onPointerup: r[1] || (r[1] = (n) => a(t).emitUpdateEnd())
1114
+ class: c(l(i).root(e.ui?.root, e.class)),
1115
+ onValueCommit: r[1] || (r[1] = (n) => l(t).commitValue())
1059
1116
  }, {
1060
- default: A(() => [
1061
- S(a(L), {
1062
- style: y({ background: u.value }),
1063
- class: c(a(i).track(e.ui?.track))
1117
+ default: F(() => [
1118
+ w(l(G), {
1119
+ style: x({ background: u.value }),
1120
+ class: c(l(i).track(e.ui?.track))
1064
1121
  }, null, 8, ["style", "class"]),
1065
- S(a(M), {
1122
+ w(l(N), {
1066
1123
  "aria-label": "Hue",
1067
- style: y({ background: `hsl(${a(t).hsv.value.h},100%,50%)` }),
1068
- class: c(a(i).thumb(e.ui?.thumb))
1124
+ style: x({ background: `hsl(${l(t).hsv.value.h},100%,50%)` }),
1125
+ class: c(l(i).thumb(e.ui?.thumb))
1069
1126
  }, null, 8, ["style", "class"])
1070
1127
  ]),
1071
1128
  _: 1
1072
1129
  }, 8, ["modelValue", "disabled", "inverted", "orientation", "class"]));
1073
1130
  }
1074
- }), lt = /* @__PURE__ */ C({
1131
+ }), bt = /* @__PURE__ */ V({
1075
1132
  __name: "ColorPickerSliderSaturation",
1076
1133
  props: {
1077
1134
  class: {},
1078
1135
  orientation: { default: "horizontal" },
1079
1136
  ui: {}
1080
1137
  },
1081
- setup(l) {
1082
- const e = l, t = w(), s = g({
1138
+ setup(a) {
1139
+ const e = a, t = S(), s = m({
1083
1140
  get: () => [t.hsl.value.s],
1084
1141
  set: ([o]) => {
1085
1142
  t.hsl.value = {
@@ -1087,43 +1144,43 @@ const He = ["height", "width"], Xe = /* @__PURE__ */ C({
1087
1144
  s: o
1088
1145
  };
1089
1146
  }
1090
- }), u = g(() => {
1147
+ }), u = m(() => {
1091
1148
  const o = e.orientation === "vertical" ? "to top" : "to right", r = `hsl(${Math.floor(t.hsl.value.h)}, 0%, ${Math.floor(t.hsl.value.l * 100)}%)`, n = `hsl(${Math.floor(t.hsl.value.h)}, 100%, ${Math.floor(t.hsl.value.l * 100)}%)`;
1092
1149
  return `linear-gradient(${o}, ${r}, ${n})`;
1093
1150
  }), i = t.uiSlots("slider", "shared");
1094
- return (o, r) => ($(), F(a(R), {
1151
+ return (o, r) => (y(), A(l(L), {
1095
1152
  modelValue: s.value,
1096
1153
  "onUpdate:modelValue": r[0] || (r[0] = (n) => s.value = n),
1097
1154
  max: 1,
1098
1155
  step: 0.01,
1099
- disabled: a(t).disabled.value,
1156
+ disabled: l(t).disabled.value,
1100
1157
  orientation: e.orientation,
1101
- class: c(a(i).root(e.ui?.root, e.class)),
1102
- onPointerup: r[1] || (r[1] = (n) => a(t).emitUpdateEnd())
1158
+ class: c(l(i).root(e.ui?.root, e.class)),
1159
+ onValueCommit: r[1] || (r[1] = (n) => l(t).commitValue())
1103
1160
  }, {
1104
- default: A(() => [
1105
- S(a(L), {
1106
- style: y({ background: u.value }),
1107
- class: c(a(i).track(e.ui?.track))
1161
+ default: F(() => [
1162
+ w(l(G), {
1163
+ style: x({ background: u.value }),
1164
+ class: c(l(i).track(e.ui?.track))
1108
1165
  }, null, 8, ["style", "class"]),
1109
- S(a(M), {
1166
+ w(l(N), {
1110
1167
  "aria-label": "Saturation",
1111
- style: y({ background: a(t).hex.value }),
1112
- class: c(a(i).thumb(e.ui?.thumb))
1168
+ style: x({ background: l(t).hex.value }),
1169
+ class: c(l(i).thumb(e.ui?.thumb))
1113
1170
  }, null, 8, ["style", "class"])
1114
1171
  ]),
1115
1172
  _: 1
1116
1173
  }, 8, ["modelValue", "disabled", "orientation", "class"]));
1117
1174
  }
1118
- }), ot = /* @__PURE__ */ C({
1175
+ }), ft = /* @__PURE__ */ V({
1119
1176
  __name: "ColorPickerSliderLightness",
1120
1177
  props: {
1121
1178
  class: {},
1122
1179
  orientation: { default: "horizontal" },
1123
1180
  ui: {}
1124
1181
  },
1125
- setup(l) {
1126
- const e = l, t = w(), s = g({
1182
+ setup(a) {
1183
+ const e = a, t = S(), s = m({
1127
1184
  get: () => [t.hsl.value.l],
1128
1185
  set: ([o]) => {
1129
1186
  t.hsl.value = {
@@ -1131,43 +1188,43 @@ const He = ["height", "width"], Xe = /* @__PURE__ */ C({
1131
1188
  l: o
1132
1189
  };
1133
1190
  }
1134
- }), u = g(() => {
1191
+ }), u = m(() => {
1135
1192
  const o = e.orientation === "vertical" ? "to top" : "to right", r = `hsl(${Math.floor(t.hsl.value.h)}, ${Math.floor(t.hsl.value.s * 100)}%, 50%)`;
1136
1193
  return `linear-gradient(${o}, hsl(0, 0%, 0%), ${r}, hsl(0, 0%, 100%))`;
1137
1194
  }), i = t.uiSlots("slider", "shared");
1138
- return (o, r) => ($(), F(a(R), {
1195
+ return (o, r) => (y(), A(l(L), {
1139
1196
  modelValue: s.value,
1140
1197
  "onUpdate:modelValue": r[0] || (r[0] = (n) => s.value = n),
1141
1198
  max: 1,
1142
1199
  step: 0.01,
1143
- disabled: a(t).disabled.value,
1200
+ disabled: l(t).disabled.value,
1144
1201
  orientation: e.orientation,
1145
- class: c(a(i).root(e.ui?.root, e.class)),
1146
- onPointerup: r[1] || (r[1] = (n) => a(t).emitUpdateEnd())
1202
+ class: c(l(i).root(e.ui?.root, e.class)),
1203
+ onValueCommit: r[1] || (r[1] = (n) => l(t).commitValue())
1147
1204
  }, {
1148
- default: A(() => [
1149
- S(a(L), {
1150
- style: y({ background: u.value }),
1151
- class: c(a(i).track(e.ui?.track))
1205
+ default: F(() => [
1206
+ w(l(G), {
1207
+ style: x({ background: u.value }),
1208
+ class: c(l(i).track(e.ui?.track))
1152
1209
  }, null, 8, ["style", "class"]),
1153
- S(a(M), {
1210
+ w(l(N), {
1154
1211
  "aria-label": "Lightness",
1155
- style: y({ background: a(t).hex.value }),
1156
- class: c(a(i).thumb(e.ui?.thumb))
1212
+ style: x({ background: l(t).hex.value }),
1213
+ class: c(l(i).thumb(e.ui?.thumb))
1157
1214
  }, null, 8, ["style", "class"])
1158
1215
  ]),
1159
1216
  _: 1
1160
1217
  }, 8, ["modelValue", "disabled", "orientation", "class"]));
1161
1218
  }
1162
- }), st = /* @__PURE__ */ C({
1219
+ }), mt = /* @__PURE__ */ V({
1163
1220
  __name: "ColorPickerSliderRed",
1164
1221
  props: {
1165
1222
  class: {},
1166
1223
  orientation: { default: "horizontal" },
1167
1224
  ui: {}
1168
1225
  },
1169
- setup(l) {
1170
- const e = l, t = w(), s = g({
1226
+ setup(a) {
1227
+ const e = a, t = S(), s = m({
1171
1228
  get: () => [t.rgb.value.r],
1172
1229
  set: ([o]) => {
1173
1230
  t.rgb.value = {
@@ -1175,42 +1232,42 @@ const He = ["height", "width"], Xe = /* @__PURE__ */ C({
1175
1232
  r: o
1176
1233
  };
1177
1234
  }
1178
- }), u = g(() => {
1235
+ }), u = m(() => {
1179
1236
  const o = e.orientation === "vertical" ? "to top" : "to right", r = `rgb(0, ${t.rgb.value.g}, ${t.rgb.value.b})`, n = `rgb(255, ${t.rgb.value.g}, ${t.rgb.value.b})`;
1180
1237
  return `linear-gradient(${o}, ${r}, ${n})`;
1181
1238
  }), i = t.uiSlots("slider", "shared");
1182
- return (o, r) => ($(), F(a(R), {
1239
+ return (o, r) => (y(), A(l(L), {
1183
1240
  modelValue: s.value,
1184
1241
  "onUpdate:modelValue": r[0] || (r[0] = (n) => s.value = n),
1185
- disabled: a(t).disabled.value,
1242
+ disabled: l(t).disabled.value,
1186
1243
  max: 255,
1187
1244
  orientation: e.orientation,
1188
- class: c(a(i).root(e.ui?.root, e.class)),
1189
- onPointerup: r[1] || (r[1] = (n) => a(t).emitUpdateEnd())
1245
+ class: c(l(i).root(e.ui?.root, e.class)),
1246
+ onValueCommit: r[1] || (r[1] = (n) => l(t).commitValue())
1190
1247
  }, {
1191
- default: A(() => [
1192
- S(a(L), {
1193
- style: y({ background: u.value }),
1194
- class: c(a(i).track(e.ui?.track))
1248
+ default: F(() => [
1249
+ w(l(G), {
1250
+ style: x({ background: u.value }),
1251
+ class: c(l(i).track(e.ui?.track))
1195
1252
  }, null, 8, ["style", "class"]),
1196
- S(a(M), {
1253
+ w(l(N), {
1197
1254
  "aria-label": "Red",
1198
- style: y({ background: a(t).hex.value }),
1199
- class: c(a(i).thumb(e.ui?.thumb))
1255
+ style: x({ background: l(t).hex.value }),
1256
+ class: c(l(i).thumb(e.ui?.thumb))
1200
1257
  }, null, 8, ["style", "class"])
1201
1258
  ]),
1202
1259
  _: 1
1203
1260
  }, 8, ["modelValue", "disabled", "orientation", "class"]));
1204
1261
  }
1205
- }), nt = /* @__PURE__ */ C({
1262
+ }), gt = /* @__PURE__ */ V({
1206
1263
  __name: "ColorPickerSliderGreen",
1207
1264
  props: {
1208
1265
  class: {},
1209
1266
  orientation: { default: "horizontal" },
1210
1267
  ui: {}
1211
1268
  },
1212
- setup(l) {
1213
- const e = l, t = w(), s = g({
1269
+ setup(a) {
1270
+ const e = a, t = S(), s = m({
1214
1271
  get: () => [t.rgb.value.g],
1215
1272
  set: ([o]) => {
1216
1273
  t.rgb.value = {
@@ -1218,42 +1275,42 @@ const He = ["height", "width"], Xe = /* @__PURE__ */ C({
1218
1275
  g: o
1219
1276
  };
1220
1277
  }
1221
- }), u = g(() => {
1278
+ }), u = m(() => {
1222
1279
  const o = e.orientation === "vertical" ? "to top" : "to right", r = `rgb(${t.rgb.value.r}, 0, ${t.rgb.value.b})`, n = `rgb(${t.rgb.value.r}, 255, ${t.rgb.value.b})`;
1223
1280
  return `linear-gradient(${o}, ${r}, ${n})`;
1224
1281
  }), i = t.uiSlots("slider", "shared");
1225
- return (o, r) => ($(), F(a(R), {
1282
+ return (o, r) => (y(), A(l(L), {
1226
1283
  modelValue: s.value,
1227
1284
  "onUpdate:modelValue": r[0] || (r[0] = (n) => s.value = n),
1228
- disabled: a(t).disabled.value,
1285
+ disabled: l(t).disabled.value,
1229
1286
  max: 255,
1230
1287
  orientation: e.orientation,
1231
- class: c(a(i).root(e.ui?.root, e.class)),
1232
- onPointerup: r[1] || (r[1] = (n) => a(t).emitUpdateEnd())
1288
+ class: c(l(i).root(e.ui?.root, e.class)),
1289
+ onValueCommit: r[1] || (r[1] = (n) => l(t).commitValue())
1233
1290
  }, {
1234
- default: A(() => [
1235
- S(a(L), {
1236
- style: y({ background: u.value }),
1237
- class: c(a(i).track(e.ui?.track))
1291
+ default: F(() => [
1292
+ w(l(G), {
1293
+ style: x({ background: u.value }),
1294
+ class: c(l(i).track(e.ui?.track))
1238
1295
  }, null, 8, ["style", "class"]),
1239
- S(a(M), {
1296
+ w(l(N), {
1240
1297
  "aria-label": "Green",
1241
- style: y({ background: a(t).hex.value }),
1242
- class: c(a(i).thumb(e.ui?.thumb))
1298
+ style: x({ background: l(t).hex.value }),
1299
+ class: c(l(i).thumb(e.ui?.thumb))
1243
1300
  }, null, 8, ["style", "class"])
1244
1301
  ]),
1245
1302
  _: 1
1246
1303
  }, 8, ["modelValue", "disabled", "orientation", "class"]));
1247
1304
  }
1248
- }), rt = /* @__PURE__ */ C({
1305
+ }), kt = /* @__PURE__ */ V({
1249
1306
  __name: "ColorPickerSliderBlue",
1250
1307
  props: {
1251
1308
  class: {},
1252
1309
  orientation: { default: "horizontal" },
1253
1310
  ui: {}
1254
1311
  },
1255
- setup(l) {
1256
- const e = l, t = w(), s = g({
1312
+ setup(a) {
1313
+ const e = a, t = S(), s = m({
1257
1314
  get: () => [t.rgb.value.b],
1258
1315
  set: ([o]) => {
1259
1316
  t.rgb.value = {
@@ -1261,47 +1318,88 @@ const He = ["height", "width"], Xe = /* @__PURE__ */ C({
1261
1318
  b: o
1262
1319
  };
1263
1320
  }
1264
- }), u = g(() => {
1321
+ }), u = m(() => {
1265
1322
  const o = e.orientation === "vertical" ? "to top" : "to right", r = `rgb(${t.rgb.value.r}, ${t.rgb.value.g}, 0)`, n = `rgb(${t.rgb.value.r}, ${t.rgb.value.g}, 255)`;
1266
1323
  return `linear-gradient(${o}, ${r}, ${n})`;
1267
1324
  }), i = t.uiSlots("slider", "shared");
1268
- return (o, r) => ($(), F(a(R), {
1325
+ return (o, r) => (y(), A(l(L), {
1269
1326
  modelValue: s.value,
1270
1327
  "onUpdate:modelValue": r[0] || (r[0] = (n) => s.value = n),
1271
- disabled: a(t).disabled.value,
1328
+ disabled: l(t).disabled.value,
1272
1329
  max: 255,
1273
1330
  orientation: e.orientation,
1274
- class: c(a(i).root(e.ui?.root, e.class)),
1275
- onPointerup: r[1] || (r[1] = (n) => a(t).emitUpdateEnd())
1331
+ class: c(l(i).root(e.ui?.root, e.class)),
1332
+ onValueCommit: r[1] || (r[1] = (n) => l(t).commitValue())
1276
1333
  }, {
1277
- default: A(() => [
1278
- S(a(L), {
1279
- style: y({ background: u.value }),
1280
- class: c(a(i).track(e.ui?.track))
1334
+ default: F(() => [
1335
+ w(l(G), {
1336
+ style: x({ background: u.value }),
1337
+ class: c(l(i).track(e.ui?.track))
1281
1338
  }, null, 8, ["style", "class"]),
1282
- S(a(M), {
1339
+ w(l(N), {
1283
1340
  "aria-label": "Blue",
1284
- style: y({ background: a(t).hex.value }),
1285
- class: c(a(i).thumb(e.ui?.thumb))
1341
+ style: x({ background: l(t).hex.value }),
1342
+ class: c(l(i).thumb(e.ui?.thumb))
1286
1343
  }, null, 8, ["style", "class"])
1287
1344
  ]),
1288
1345
  _: 1
1289
1346
  }, 8, ["modelValue", "disabled", "orientation", "class"]));
1290
1347
  }
1348
+ }), tt = "data:image/svg+xml;utf8,%3Csvg%20width%3D%226%22%20height%3D%226%22%20viewBox%3D%220%200%206%206%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M0%200H3V3H0V0Z%22%20fill%3D%22%23E1E1E1%22/%3E%3Cpath%20d%3D%22M3%200H6V3H3V0Z%22%20fill%3D%22white%22/%3E%3Cpath%20d%3D%22M3%203H6V6H3V3Z%22%20fill%3D%22%23E1E1E1%22/%3E%3Cpath%20d%3D%22M0%203H3V6H0V3Z%22%20fill%3D%22white%22/%3E%3C/svg%3E%0A", $t = /* @__PURE__ */ V({
1349
+ __name: "ColorPickerSwatch",
1350
+ props: {
1351
+ as: { default: "button" },
1352
+ value: {},
1353
+ class: {},
1354
+ ui: {}
1355
+ },
1356
+ setup(a) {
1357
+ const e = S(), t = a, s = m(() => Z(t.value) || e.rgba.value), u = e.uiSlots("swatch");
1358
+ return (i, o) => (y(), A(l(ae), {
1359
+ as: t.as,
1360
+ disabled: l(e).disabled.value,
1361
+ style: x({ backgroundColor: `rgb(${s.value.r}, ${s.value.g}, ${s.value.b})` }),
1362
+ class: c(l(u).base(t.ui?.base, t.class))
1363
+ }, {
1364
+ default: F(() => [
1365
+ h("span", {
1366
+ style: x({
1367
+ opacity: 1 - s.value.a,
1368
+ background: `url(${l(tt)})`
1369
+ }),
1370
+ class: c(l(u).alpha(t.ui?.alpha))
1371
+ }, null, 6)
1372
+ ]),
1373
+ _: 1
1374
+ }, 8, ["as", "disabled", "style", "class"]));
1375
+ }
1291
1376
  });
1292
1377
  export {
1293
- Xe as ColorPickerCanvas,
1294
- Ze as ColorPickerEyeDropper,
1295
- et as ColorPickerInputHSB,
1296
- Qe as ColorPickerInputHSL,
1297
- qe as ColorPickerInputHex,
1298
- Je as ColorPickerInputRGB,
1299
- Ye as ColorPickerRoot,
1300
- tt as ColorPickerSliderAlpha,
1301
- rt as ColorPickerSliderBlue,
1302
- nt as ColorPickerSliderGreen,
1303
- at as ColorPickerSliderHue,
1304
- ot as ColorPickerSliderLightness,
1305
- st as ColorPickerSliderRed,
1306
- lt as ColorPickerSliderSaturation
1378
+ rt as ColorPickerCanvas,
1379
+ ut as ColorPickerEyeDropper,
1380
+ vt as ColorPickerInputHSB,
1381
+ dt as ColorPickerInputHSL,
1382
+ it as ColorPickerInputHex,
1383
+ ct as ColorPickerInputRGB,
1384
+ nt as ColorPickerRoot,
1385
+ pt as ColorPickerSliderAlpha,
1386
+ kt as ColorPickerSliderBlue,
1387
+ gt as ColorPickerSliderGreen,
1388
+ ht as ColorPickerSliderHue,
1389
+ ft as ColorPickerSliderLightness,
1390
+ mt as ColorPickerSliderRed,
1391
+ bt as ColorPickerSliderSaturation,
1392
+ $t as ColorPickerSwatch,
1393
+ se as HSLtoHSV,
1394
+ oe as HSVtoHSL,
1395
+ X as HSVtoRGB,
1396
+ J as HexToRGB,
1397
+ ot as HexaToRGBA,
1398
+ fe as RGBAtoCSS,
1399
+ be as RGBAtoHexa,
1400
+ he as RGBtoHSV,
1401
+ q as RGBtoHex,
1402
+ S as injectColorPickerContext,
1403
+ R as toHex,
1404
+ me as useVModel
1307
1405
  };