@vuelor/picker 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
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";
1
+ import { ref as O, watch as te, computed as f, toRaw as j, defineComponent as V, createElementBlock as P, openBlock as C, normalizeClass as c, unref as l, renderSlot as T, onMounted as re, onUnmounted as ne, 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
2
  import { twMerge as ve } from "tailwind-merge";
3
3
  import { createContext as pe, Primitive as ae, SliderRoot as L, SliderTrack as G, SliderThumb as N } from "reka-ui";
4
4
  function _(a, e = 0, t = 1) {
@@ -6,33 +6,33 @@ function _(a, e = 0, t = 1) {
6
6
  }
7
7
  function le(a, e = 1) {
8
8
  const t = [];
9
- let s = 0;
10
- for (; s < a.length; )
11
- t.push(a.substring(s, s + e)), s += e;
9
+ let o = 0;
10
+ for (; o < a.length; )
11
+ t.push(a.substring(o, o + e)), o += e;
12
12
  return t;
13
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;
14
+ function oe(a) {
15
+ const { h: e, s: t, l: o } = a, u = o + t * Math.min(o, 1 - o), i = u === 0 ? 0 : 2 - 2 * o / u;
16
16
  return { h: e, s: i, v: u };
17
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);
18
+ function se(a) {
19
+ const { h: e, s: t, v: o } = a, u = o - o * t / 2, i = u === 1 || u === 0 ? 0 : (o - u) / Math.min(u, 1 - u);
20
20
  return { h: e, s: i, l: u };
21
21
  }
22
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));
23
+ const { h: e, s: t, v: o } = a, u = (s) => {
24
+ const n = (s + e / 60) % 6;
25
+ return o - o * t * Math.max(Math.min(n, 4 - n, 1), 0);
26
+ }, i = [u(5), u(3), u(1)].map((s) => Math.round(s * 255));
27
27
  return { r: i[0], g: i[1], b: i[2] };
28
28
  }
29
29
  function he(a) {
30
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] };
31
+ const e = a.r / 255, t = a.g / 255, o = a.b / 255, u = Math.max(e, t, o), i = Math.min(e, t, o);
32
+ let s = 0;
33
+ u !== i && (u === e ? s = 60 * (0 + (t - o) / (u - i)) : u === t ? s = 60 * (2 + (o - e) / (u - i)) : u === o && (s = 60 * (4 + (e - t) / (u - i)))), s < 0 && (s = s + 360);
34
+ const n = u === 0 ? 0 : (u - i) / u, r = [s, n, u];
35
+ return { h: r[0], s: r[1], v: r[2] };
36
36
  }
37
37
  const R = (a) => {
38
38
  const e = Math.round(a).toString(16);
@@ -61,7 +61,7 @@ function J(a) {
61
61
  b: e[2]
62
62
  };
63
63
  }
64
- function ot(a) {
64
+ function st(a) {
65
65
  const e = le(a.slice(1), 2).map((t) => parseInt(t, 16));
66
66
  return {
67
67
  r: e[0],
@@ -70,50 +70,50 @@ function ot(a) {
70
70
  a: e[3] / 255
71
71
  };
72
72
  }
73
- function fe(a) {
73
+ function me(a) {
74
74
  return `rgba(${a.r}, ${a.g}, ${a.b}, ${a.a})`;
75
75
  }
76
- function me(a, e, t) {
77
- const s = O(void 0);
76
+ function fe(a, e, t) {
77
+ const o = O(void 0);
78
78
  return te(
79
79
  () => a.modelValue,
80
80
  (u) => {
81
- u !== s.value && t(u);
81
+ u !== o.value && t(u);
82
82
  },
83
83
  { immediate: !0 }
84
- ), m({
84
+ ), f({
85
85
  get: () => a.modelValue,
86
86
  set: (u) => {
87
- s.value = u, e("update:modelValue", u);
87
+ o.value = u, e("update:modelValue", u);
88
88
  }
89
89
  });
90
90
  }
91
91
  const ge = {
92
92
  picker: {
93
- root: "w-60 bg-white rounded-[13px] p-4 flex flex-col gap-2 shadow-vuelor-card"
93
+ root: "w-60 bg-vuelor-surface shadow-vuelor-card rounded-[13px] p-4 flex flex-col gap-2"
94
94
  },
95
95
  dropper: {
96
- base: "enabled:hover:bg-[#0000000d] disabled:opacity-50 rounded-[5px] focus-within:outline-1 focus-within:outline-[#0d99ff] p-1"
96
+ base: "enabled:hover:bg-black/5 disabled:opacity-50 rounded-[5px] focus-within:outline-1 focus-within:outline-vuelor-primary p-1"
97
97
  },
98
98
  shared: {
99
- thumb: "block w-4 h-4 rounded-full border-4 border-white shadow-vuelor-thumb focus:outline-1 outline-[#0d99ff]"
99
+ thumb: "block w-4 h-4 rounded-full border-4 border-white shadow-vuelor-thumb focus:outline-1 outline-vuelor-primary"
100
100
  },
101
101
  canvas: {
102
- root: "relative touch-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
103
- area: "rounded-[5px] outline-1 outline-solid -outline-offset-1 outline-[#0000001a]"
102
+ root: "touch-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
103
+ area: "rounded-[5px] outline-1 outline-solid -outline-offset-1 outline-black/10"
104
104
  },
105
105
  slider: {
106
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
107
  track: "relative h-4 w-full shadow-vuelor-inner grow rounded-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-4"
108
108
  },
109
109
  input: {
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]",
110
+ group: "w-full flex gap-[1px] rounded-[5px] hover:outline-1 outline-vuelor-border focus-within:outline-1 focus-within:outline-vuelor-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:outline-none",
111
+ item: "flex flex-1 data-[before]:grow-0 data-[alpha-input]:grow-0 items-center px-1 gap-1 bg-vuelor-input first:rounded-l-[5px] last:rounded-r-[5px]",
112
112
  label: "select-none text-black text-[11px] opacity-40 data-[alpha-label]:block",
113
113
  field: "w-full min-w-5 h-6 text-[11px] focus:outline-none"
114
114
  },
115
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",
116
+ base: "relative grow-0 h-4 w-4 rounded-[20%] overflow-hidden focus-within:outline-1 focus-within:outline-vuelor-primary disabled:opacity-50",
117
117
  alpha: "absolute top-0 right-0 h-full w-1/2"
118
118
  }
119
119
  }, ke = {
@@ -148,49 +148,49 @@ const ge = {
148
148
  tailwindcss: ge,
149
149
  vanillacss: ke
150
150
  };
151
- function Ce(a, e) {
151
+ function ye(a, e) {
152
152
  return (...t) => {
153
- const s = {};
153
+ const o = {};
154
154
  for (const u of t) {
155
155
  const i = a[u];
156
156
  if (i)
157
- for (const [o, r] of Object.entries(i))
158
- s[o] = (...n) => {
159
- const p = e?.[u]?.[o];
157
+ for (const [s, n] of Object.entries(i))
158
+ o[s] = (...r) => {
159
+ const p = e?.[u]?.[s];
160
160
  return ve(
161
- r,
161
+ n,
162
162
  p,
163
- ...n.filter(Boolean)
163
+ ...r.filter(Boolean)
164
164
  );
165
165
  };
166
166
  }
167
- return s;
167
+ return o;
168
168
  };
169
169
  }
170
170
  function Z(a) {
171
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})$/);
172
172
  if (t?.groups) {
173
- const { r: o, g: r, b: n } = t.groups;
173
+ const { r: s, g: n, b: r } = t.groups;
174
174
  return {
175
- r: parseInt(o, 16),
176
- g: parseInt(r, 16),
177
- b: parseInt(n, 16),
175
+ r: parseInt(s, 16),
176
+ g: parseInt(n, 16),
177
+ b: parseInt(r, 16),
178
178
  a: 1
179
179
  };
180
180
  }
181
- const s = e.match(/^#?(?<r>[A-Fa-f0-9]{2})(?<g>[A-Fa-f0-9]{2})(?<b>[A-Fa-f0-9]{2})(?<a>[A-Fa-f0-9]{2})$/);
182
- if (s?.groups) {
183
- const { r: o, g: r, b: n, a: d } = s.groups;
181
+ const o = e.match(/^#?(?<r>[A-Fa-f0-9]{2})(?<g>[A-Fa-f0-9]{2})(?<b>[A-Fa-f0-9]{2})(?<a>[A-Fa-f0-9]{2})$/);
182
+ if (o?.groups) {
183
+ const { r: s, g: n, b: r, a: d } = o.groups;
184
184
  return {
185
- r: parseInt(o, 16),
186
- g: parseInt(r, 16),
187
- b: parseInt(n, 16),
185
+ r: parseInt(s, 16),
186
+ g: parseInt(n, 16),
187
+ b: parseInt(r, 16),
188
188
  a: parseInt(d, 16) / 255
189
189
  };
190
190
  }
191
191
  const u = e.match(/^#?(?<r>[A-Fa-f0-9])(?<g>[A-Fa-f0-9])(?<b>[A-Fa-f0-9])$/);
192
192
  if (u?.groups) {
193
- const { r: o, g: r, b: n } = u.groups, d = o + o, p = r + r, b = n + n;
193
+ const { r: s, g: n, b: r } = u.groups, d = s + s, p = n + n, b = r + r;
194
194
  return {
195
195
  r: parseInt(d, 16),
196
196
  g: parseInt(p, 16),
@@ -200,17 +200,17 @@ function Z(a) {
200
200
  }
201
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])$/);
202
202
  if (i?.groups) {
203
- const { r: o, g: r, b: n, a: d } = i.groups, p = o + o, b = r + r, f = n + n, k = d + d;
203
+ const { r: s, g: n, b: r, a: d } = i.groups, p = s + s, b = n + n, m = r + r, k = d + d;
204
204
  return {
205
205
  r: parseInt(p, 16),
206
206
  g: parseInt(b, 16),
207
- b: parseInt(f, 16),
207
+ b: parseInt(m, 16),
208
208
  a: parseInt(k, 16) / 255
209
209
  };
210
210
  }
211
211
  return null;
212
212
  }
213
- function ye(a) {
213
+ function Ce(a) {
214
214
  return a ? a.substring(0, 7).replace("#", "") : null;
215
215
  }
216
216
  function xe(a) {
@@ -221,10 +221,10 @@ function xe(a) {
221
221
  function z(a) {
222
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);
223
223
  if (!t) return null;
224
- const [, s, u, i, o, r] = t;
224
+ const [, o, u, i, s, n] = t;
225
225
  return {
226
- type: s,
227
- values: [u, i, o, r].filter(Boolean)
226
+ type: o,
227
+ values: [u, i, s, n].filter(Boolean)
228
228
  };
229
229
  }
230
230
  function D(a) {
@@ -282,15 +282,15 @@ function Be(a) {
282
282
  } : { h: 0, s: 0, v: 0, a: 1 };
283
283
  }
284
284
  function K(a) {
285
- const e = he(a), t = oe(e);
285
+ const e = he(a), t = se(e);
286
286
  return { hsv: e, hsl: t, rgb: a };
287
287
  }
288
288
  function Q(a) {
289
- const e = se(a), t = X(e);
289
+ const e = oe(a), t = X(e);
290
290
  return { hsv: e, hsl: a, rgb: t };
291
291
  }
292
292
  function ee(a) {
293
- const e = oe(a), t = X(a);
293
+ const e = se(a), t = X(a);
294
294
  return { hsv: a, hsl: e, rgb: t };
295
295
  }
296
296
  function Ie() {
@@ -298,86 +298,86 @@ function Ie() {
298
298
  hsv: { h: 0, s: 0, v: 0 },
299
299
  hsl: { h: 0, s: 0, l: 0 },
300
300
  rgb: { r: 0, g: 0, b: 0 }
301
- }), e = O(100), t = m({
301
+ }), e = O(100), t = f({
302
302
  get: () => a.value.rgb,
303
303
  set: (v) => a.value = K(v)
304
- }), s = m({
304
+ }), o = f({
305
305
  get: () => ({ ...a.value.rgb, a: e.value / 100 }),
306
306
  set: (v) => {
307
307
  e.value = Math.round((v.a ?? 1) * 100), a.value = K({ r: v.r, g: v.g, b: v.b });
308
308
  }
309
- }), u = m({
309
+ }), u = f({
310
310
  get: () => a.value.hsl,
311
311
  set: (v) => a.value = Q(v)
312
- }), i = m({
312
+ }), i = f({
313
313
  get: () => ({ ...a.value.hsl, a: e.value / 100 }),
314
314
  set: (v) => {
315
315
  e.value = Math.round((v.a ?? 1) * 100), a.value = Q({ h: v.h, s: v.s, l: v.l });
316
316
  }
317
- }), o = m({
317
+ }), s = f({
318
318
  get: () => a.value.hsv,
319
319
  set: (v) => a.value = ee(v)
320
- }), r = m({
320
+ }), n = f({
321
321
  get: () => ({ ...a.value.hsv, a: e.value / 100 }),
322
322
  set: (v) => {
323
323
  e.value = Math.round((v.a ?? 1) * 100), a.value = ee({ h: v.h, s: v.s, v: v.v });
324
324
  }
325
- }), n = m({
325
+ }), r = f({
326
326
  get: () => q(a.value.rgb),
327
327
  set: (v) => {
328
- const C = J(v);
329
- a.value = K(C);
328
+ const y = J(v);
329
+ a.value = K(y);
330
330
  }
331
- }), d = m({
331
+ }), d = f({
332
332
  get: () => {
333
- const v = q(a.value.rgb), C = R(e.value / 100 * 255);
334
- return v + C;
333
+ const v = q(a.value.rgb), y = R(e.value / 100 * 255);
334
+ return v + y;
335
335
  },
336
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);
337
+ const y = J(v.slice(0, 7)), $ = v.slice(7, 9), I = $ ? parseInt($, 16) / 255 : 1;
338
+ e.value = Math.round(I * 100), a.value = K(y);
339
339
  }
340
340
  });
341
341
  function p() {
342
- const { r: v, g: C, b: $ } = a.value.rgb;
343
- return `rgb(${v}, ${C}, ${$})`;
342
+ const { r: v, g: y, b: $ } = a.value.rgb;
343
+ return `rgb(${v}, ${y}, ${$})`;
344
344
  }
345
345
  function b() {
346
- const { r: v, g: C, b: $ } = a.value.rgb, I = (e.value / 100).toFixed(2);
347
- return `rgba(${v}, ${C}, ${$}, ${I})`;
346
+ const { r: v, g: y, b: $ } = a.value.rgb, I = (e.value / 100).toFixed(2);
347
+ return `rgba(${v}, ${y}, ${$}, ${I})`;
348
348
  }
349
- function f() {
350
- const { h: v, s: C, l: $ } = a.value.hsl, I = (C * 100).toFixed(1), E = ($ * 100).toFixed(1);
349
+ function m() {
350
+ const { h: v, s: y, l: $ } = a.value.hsl, I = (y * 100).toFixed(1), E = ($ * 100).toFixed(1);
351
351
  return `hsl(${v}, ${I}%, ${E}%)`;
352
352
  }
353
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);
354
+ const { h: v, s: y, l: $ } = a.value.hsl, I = (y * 100).toFixed(1), E = ($ * 100).toFixed(1), Y = (e.value / 100).toFixed(2);
355
355
  return `hsla(${v}, ${I}%, ${E}%, ${Y})`;
356
356
  }
357
357
  function B() {
358
- const { h: v, s: C, v: $ } = a.value.hsv, I = (C * 100).toFixed(1), E = ($ * 100).toFixed(1);
358
+ const { h: v, s: y, v: $ } = a.value.hsv, I = (y * 100).toFixed(1), E = ($ * 100).toFixed(1);
359
359
  return `hsv(${v}, ${I}%, ${E}%)`;
360
360
  }
361
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);
362
+ const { h: v, s: y, v: $ } = a.value.hsv, I = (y * 100).toFixed(1), E = ($ * 100).toFixed(1), Y = (e.value / 100).toFixed(2);
363
363
  return `hsva(${v}, ${I}%, ${E}%, ${Y})`;
364
364
  }
365
365
  function g() {
366
366
  return {
367
367
  rgb: j(t.value),
368
- rgba: j(s.value),
368
+ rgba: j(o.value),
369
369
  hsl: j(u.value),
370
370
  hsla: j(i.value),
371
- hsv: j(o.value),
372
- hsva: j(r.value),
373
- hex: n.value,
371
+ hsv: j(s.value),
372
+ hsva: j(n.value),
373
+ hex: r.value,
374
374
  hexa: d.value
375
375
  };
376
376
  }
377
377
  function H(v) {
378
378
  switch (v) {
379
379
  case "hex":
380
- return n.value;
380
+ return r.value;
381
381
  case "hexa":
382
382
  return d.value;
383
383
  case "rgb":
@@ -385,7 +385,7 @@ function Ie() {
385
385
  case "rgba":
386
386
  return b();
387
387
  case "hsl":
388
- return f();
388
+ return m();
389
389
  case "hsla":
390
390
  return k();
391
391
  case "hsv":
@@ -395,19 +395,19 @@ function Ie() {
395
395
  case "object":
396
396
  return g();
397
397
  default:
398
- return n.value;
398
+ return r.value;
399
399
  }
400
400
  }
401
- function U(v, C) {
402
- switch (C) {
401
+ function U(v, y) {
402
+ switch (y) {
403
403
  case "hex": {
404
404
  const $ = Z(v);
405
- $ && (s.value = $);
405
+ $ && (o.value = $);
406
406
  break;
407
407
  }
408
408
  case "hexa": {
409
409
  const $ = Z(v);
410
- $ && (s.value = $);
410
+ $ && (o.value = $);
411
411
  break;
412
412
  }
413
413
  case "rgb": {
@@ -415,7 +415,7 @@ function Ie() {
415
415
  break;
416
416
  }
417
417
  case "rgba": {
418
- s.value = Se(v);
418
+ o.value = Se(v);
419
419
  break;
420
420
  }
421
421
  case "hsl": {
@@ -427,11 +427,11 @@ function Ie() {
427
427
  break;
428
428
  }
429
429
  case "hsv": {
430
- o.value = He(v);
430
+ s.value = He(v);
431
431
  break;
432
432
  }
433
433
  case "hsva": {
434
- r.value = Be(v);
434
+ n.value = Be(v);
435
435
  break;
436
436
  }
437
437
  case "object": {
@@ -448,16 +448,16 @@ function Ie() {
448
448
  state: a,
449
449
  alpha: e,
450
450
  rgb: t,
451
- rgba: s,
451
+ rgba: o,
452
452
  hsl: u,
453
453
  hsla: i,
454
- hsv: o,
455
- hsva: r,
456
- hex: n,
454
+ hsv: s,
455
+ hsva: n,
456
+ hex: r,
457
457
  hexa: d,
458
458
  toRGBString: p,
459
459
  toRGBAString: b,
460
- toHSLString: f,
460
+ toHSLString: m,
461
461
  toHSLAString: k,
462
462
  toHSVString: B,
463
463
  toHSVAString: M,
@@ -466,7 +466,7 @@ function Ie() {
466
466
  fromFormat: U
467
467
  };
468
468
  }
469
- const [S, Pe] = pe("ColorPickerRoot"), nt = /* @__PURE__ */ V({
469
+ const [S, Pe] = pe("ColorPickerRoot"), rt = /* @__PURE__ */ V({
470
470
  __name: "ColorPickerRoot",
471
471
  props: {
472
472
  ui: {},
@@ -479,115 +479,115 @@ const [S, Pe] = pe("ColorPickerRoot"), nt = /* @__PURE__ */ V({
479
479
  },
480
480
  emits: ["valueCommit", "update:modelValue"],
481
481
  setup(a, { expose: e, emit: t }) {
482
- const s = a, u = t, i = Ie(), o = me(s, u, (b) => {
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);
482
+ const o = a, u = t, i = Ie(), s = fe(o, u, (b) => {
483
+ b === null || o.format === "object" && typeof b != "object" || o.format !== "object" && typeof b == "object" ? i.hexa.value = o.defaultValue : i.fromFormat(b, o.format);
484
484
  });
485
485
  te(
486
486
  () => [i.hexa.value, i.hsv.value],
487
- () => o.value = i.toFormat(s.format)
487
+ () => s.value = i.toFormat(o.format)
488
488
  );
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");
489
+ const n = f(() => o.disabled), r = f(() => ["hexa", "rgba", "hsva", "object"].includes(o.format)), d = ye($e[o.styling], o.ui), p = d("picker");
490
490
  return Pe({
491
491
  ...i,
492
492
  uiSlots: d,
493
- disabled: r,
494
- isAlphaEnabled: n,
493
+ disabled: n,
494
+ isAlphaEnabled: r,
495
495
  commitValue: () => {
496
- s.disabled || u("valueCommit", i.toFormat(s.format));
496
+ o.disabled || u("valueCommit", i.toFormat(o.format));
497
497
  }
498
498
  }), e({
499
499
  color: i
500
- }), (b, f) => (y(), P("div", {
501
- class: c(l(p).root(s.class))
500
+ }), (b, m) => (C(), P("div", {
501
+ class: c(l(p).root(o.class))
502
502
  }, [
503
503
  T(b.$slots, "default")
504
504
  ], 2));
505
505
  }
506
506
  });
507
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);
508
+ const t = a.canvas.width, o = a.canvas.height, u = `hsl(${e},100%,50%)`;
509
+ a.rect(0, 0, t, o), a.fillStyle = u, a.fillRect(0, 0, t, o);
510
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);
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, o);
512
+ const s = a.createLinearGradient(0, 0, 0, o);
513
+ s.addColorStop(0, "rgba(0,0,0,0)"), s.addColorStop(1, "rgba(0,0,0,1)"), a.fillStyle = s, a.fillRect(0, 0, t, o);
514
514
  }
515
515
  function Fe(a, e) {
516
- const t = a.canvas.width, s = a.canvas.height;
517
- a.clearRect(0, 0, t, s);
516
+ const t = a.canvas.width, o = a.canvas.height;
517
+ a.clearRect(0, 0, t, o);
518
518
  const u = a.createLinearGradient(0, 0, t, 0), i = 12;
519
- for (let n = 0; n <= i; n++) {
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})`);
519
+ for (let r = 0; r <= i; r++) {
520
+ const d = r / i, { r: p, g: b, b: m } = X(oe({ h: e, s: d, l: 0.5 }));
521
+ u.addColorStop(d, `rgb(${p} ${b} ${m})`);
522
522
  }
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";
523
+ a.fillStyle = u, a.fillRect(0, 0, t, o), a.globalCompositeOperation = "screen";
524
+ let s = a.createLinearGradient(0, 0, 0, o);
525
+ s.addColorStop(0, "white"), s.addColorStop(0.5, "rgba(255,255,255,0)"), a.fillStyle = s, a.fillRect(0, 0, t, o), a.globalCompositeOperation = "multiply";
526
+ let n = a.createLinearGradient(0, 0, 0, o);
527
+ n.addColorStop(0.5, "rgba(0,0,0,0)"), n.addColorStop(1, "black"), a.fillStyle = n, a.fillRect(0, 0, t, o), a.globalCompositeOperation = "source-over";
528
528
  }
529
529
  function Me(a, e) {
530
- const t = S(), s = O({
530
+ const t = S(), o = O({
531
531
  top: 1,
532
532
  left: 1,
533
533
  width: 1,
534
534
  height: 1
535
- }), { hsl: u, hsv: i } = t, o = m({
535
+ }), { hsl: u, hsv: i } = t, s = f({
536
536
  get: () => e.value === "HSV" ? 1 - i.value.v : 1 - u.value.l,
537
537
  set: (g) => {
538
538
  e.value === "HSV" ? i.value = { ...i.value, v: _(1 - g, 0, 1) } : u.value = { ...u.value, l: _(1 - g, 0, 1) };
539
539
  }
540
- }), r = m({
540
+ }), n = f({
541
541
  get: () => e.value === "HSV" ? i.value.s : u.value.s,
542
542
  set: (g) => {
543
543
  e.value === "HSV" ? i.value = { ...i.value, s: _(g, 0, 1) } : u.value = { ...u.value, s: _(g, 0, 1) };
544
544
  }
545
- }), n = O(!1), d = m(() => {
546
- const g = r.value * s.value.width, H = o.value * s.value.height;
545
+ }), r = O(!1), d = f(() => {
546
+ const g = n.value * o.value.width, H = s.value * o.value.height;
547
547
  return {
548
548
  top: 0,
549
549
  left: 0,
550
550
  position: "absolute",
551
- display: n.value ? void 0 : "none",
552
- backgroundColor: fe({ ...t.rgba.value, a: 1 }),
551
+ display: r.value ? void 0 : "none",
552
+ backgroundColor: me({ ...t.rgba.value, a: 1 }),
553
553
  transform: `translate3d(calc(-50% + ${g}px), calc(-50% + ${H}px), 0px)`
554
554
  };
555
555
  });
556
- ne(() => {
557
- p(), n.value = !0, window.addEventListener("resize", p);
558
- }), re(() => {
556
+ re(() => {
557
+ p(), r.value = !0, window.addEventListener("resize", p);
558
+ }), ne(() => {
559
559
  window.removeEventListener("resize", p);
560
560
  });
561
561
  function p() {
562
562
  const g = a.value;
563
- g && (s.value = g.getBoundingClientRect());
563
+ g && (o.value = g.getBoundingClientRect());
564
564
  }
565
565
  function b(g) {
566
- t.disabled.value || (document.addEventListener("pointermove", f), document.addEventListener("pointerup", k), p(), f(g));
566
+ t.disabled.value || (document.addEventListener("pointermove", m), document.addEventListener("pointerup", k), p(), m(g));
567
567
  }
568
- function f(g) {
568
+ function m(g) {
569
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;
570
+ const H = g.clientY - o.value.top, U = g.clientX - o.value.left;
571
+ n.value = _(U, 0, o.value.width) / o.value.width, s.value = _(H, 0, o.value.height) / o.value.height;
572
572
  }
573
573
  function k() {
574
- document.removeEventListener("pointermove", f), document.removeEventListener("pointerup", k), t.commitValue();
574
+ document.removeEventListener("pointermove", m), document.removeEventListener("pointerup", k), t.commitValue();
575
575
  }
576
576
  function B(g) {
577
577
  if (t.disabled.value) return;
578
578
  const H = g.shiftKey ? 0.1 : 0.01;
579
579
  switch (g.key) {
580
580
  case "ArrowUp":
581
- g.preventDefault(), o.value -= H, t.commitValue();
581
+ g.preventDefault(), s.value -= H, t.commitValue();
582
582
  break;
583
583
  case "ArrowDown":
584
- g.preventDefault(), o.value += H, t.commitValue();
584
+ g.preventDefault(), s.value += H, t.commitValue();
585
585
  break;
586
586
  case "ArrowLeft":
587
- g.preventDefault(), r.value -= H, t.commitValue();
587
+ g.preventDefault(), n.value -= H, t.commitValue();
588
588
  break;
589
589
  case "ArrowRight":
590
- g.preventDefault(), r.value += H, t.commitValue();
590
+ g.preventDefault(), n.value += H, t.commitValue();
591
591
  break;
592
592
  }
593
593
  }
@@ -606,7 +606,7 @@ function Me(a, e) {
606
606
  handlePointerDown: b
607
607
  };
608
608
  }
609
- const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
609
+ const Re = ["data-disabled"], De = ["height", "width"], nt = /* @__PURE__ */ V({
610
610
  __name: "ColorPickerCanvas",
611
611
  props: {
612
612
  type: { default: "HSV" },
@@ -617,15 +617,15 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
617
617
  ui: {}
618
618
  },
619
619
  setup(a) {
620
- const e = S(), t = ue("canvasRef"), s = a, u = m(() => ({
620
+ const e = S(), t = ue("canvasRef"), o = a, u = f(() => ({
621
621
  position: "relative",
622
- height: `${s.height}px`,
623
- width: `${s.width}px`
622
+ height: `${o.height}px`,
623
+ width: `${o.width}px`
624
624
  }));
625
625
  ie(() => {
626
626
  const b = t.value?.getContext("2d");
627
627
  if (b)
628
- switch (s.type) {
628
+ switch (o.type) {
629
629
  case "HSL":
630
630
  Fe(b, e.hsv.value.h);
631
631
  break;
@@ -634,35 +634,35 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
634
634
  break;
635
635
  }
636
636
  });
637
- const i = m(() => s.type), {
638
- thumbStyles: o,
639
- handleWheel: r,
640
- handleKeyDown: n,
637
+ const i = f(() => o.type), {
638
+ thumbStyles: s,
639
+ handleWheel: n,
640
+ handleKeyDown: r,
641
641
  handlePointerDown: d
642
642
  } = Me(t, i), p = e.uiSlots("canvas", "shared");
643
- return (b, f) => (y(), P("div", {
643
+ return (b, m) => (C(), P("div", {
644
644
  style: x(u.value),
645
- class: c(l(p).root(s.ui?.root, s.class)),
645
+ class: c(l(p).root(o.ui?.root, o.class)),
646
646
  "data-disabled": l(e).disabled.value ? "" : null,
647
- onContextmenu: f[0] || (f[0] = ce(() => {
647
+ onContextmenu: m[0] || (m[0] = ce(() => {
648
648
  }, ["prevent"])),
649
- onKeydown: f[1] || (f[1] = //@ts-ignore
650
- (...k) => l(n) && l(n)(...k)),
651
- onPointerdown: f[2] || (f[2] = //@ts-ignore
649
+ onKeydown: m[1] || (m[1] = //@ts-ignore
650
+ (...k) => l(r) && l(r)(...k)),
651
+ onPointerdown: m[2] || (m[2] = //@ts-ignore
652
652
  (...k) => l(d) && l(d)(...k)),
653
- onWheel: f[3] || (f[3] = (k) => s.wheel && l(r)(k))
653
+ onWheel: m[3] || (m[3] = (k) => o.wheel && l(n)(k))
654
654
  }, [
655
655
  h("canvas", {
656
656
  ref_key: "canvasRef",
657
657
  ref: t,
658
- height: s.height,
659
- width: s.width,
660
- class: c(l(p).area(s.ui?.area))
658
+ height: o.height,
659
+ width: o.width,
660
+ class: c(l(p).area(o.ui?.area))
661
661
  }, null, 10, De),
662
662
  h("span", {
663
663
  tabindex: "0",
664
- style: x(l(o)),
665
- class: c(l(p).thumb(s.ui?.thumb))
664
+ style: x(l(s)),
665
+ class: c(l(p).thumb(o.ui?.thumb))
666
666
  }, null, 6)
667
667
  ], 46, Re));
668
668
  }
@@ -674,17 +674,17 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
674
674
  asChild: { type: Boolean }
675
675
  },
676
676
  setup(a) {
677
- const e = a, t = S(), s = m(() => typeof window < "u" && !!window.EyeDropper);
677
+ const e = a, t = S(), o = f(() => typeof window < "u" && !!window.EyeDropper);
678
678
  function u() {
679
- const o = window.EyeDropper;
680
- new o().open().then((n) => {
681
- t.hexa.value = n.sRGBHex;
682
- }).catch((n) => {
683
- console.error(n);
679
+ const s = window.EyeDropper;
680
+ new s().open().then((r) => {
681
+ t.hexa.value = r.sRGBHex;
682
+ }).catch((r) => {
683
+ console.error(r);
684
684
  });
685
685
  }
686
686
  const i = t.uiSlots("dropper");
687
- return (o, r) => s.value ? (y(), A(l(ae), {
687
+ return (s, n) => o.value ? (C(), A(l(ae), {
688
688
  key: 0,
689
689
  as: e.as,
690
690
  "as-child": e.asChild,
@@ -693,7 +693,7 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
693
693
  onClick: u
694
694
  }, {
695
695
  default: F(() => [
696
- T(o.$slots, "default")
696
+ T(s.$slots, "default")
697
697
  ]),
698
698
  _: 3
699
699
  }, 8, ["as", "as-child", "disabled", "class"])) : W("", !0);
@@ -707,58 +707,58 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
707
707
  },
708
708
  emits: ["update:modelValue"],
709
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;
710
+ const t = e, o = a, u = S(), i = de(), s = f(() => !!i?.vnode.props?.["onUpdate:modelValue"]), n = f(() => s.value ? Ce(o.modelValue) : u.hex.value.replace("#", "")), r = f(() => s.value ? xe(o.modelValue) : u.alpha.value);
711
+ function d(m) {
712
+ const k = m.target, B = k.value ? Z(k.value) : null;
713
713
  if (!B) {
714
- k.value = r.value;
714
+ k.value = n.value;
715
715
  return;
716
716
  }
717
- o.value ? t("update:modelValue", be(B)) : (u.rgba.value = B, u.commitValue());
717
+ s.value ? t("update:modelValue", be(B)) : (u.rgba.value = B, u.commitValue());
718
718
  }
719
- function p(f) {
720
- const k = f.target, B = parseInt(k.value, 10), M = isNaN(B) ? u.alpha.value : _(B, 0, 100);
719
+ function p(m) {
720
+ const k = m.target, B = parseInt(k.value, 10), M = isNaN(B) ? u.alpha.value : _(B, 0, 100);
721
721
  u.alpha.value !== M ? (u.alpha.value = M, u.commitValue()) : k.value = M.toString();
722
722
  }
723
723
  const b = u.uiSlots("input");
724
- return (f, k) => (y(), P("div", {
725
- class: c(l(b).group(s.ui?.group, s.class)),
724
+ return (m, k) => (C(), P("div", {
725
+ class: c(l(b).group(o.ui?.group, o.class)),
726
726
  "data-disabled": l(u).disabled.value ? "" : null
727
727
  }, [
728
728
  h("div", {
729
- class: c(l(b).item(s.ui?.item))
729
+ class: c(l(b).item(o.ui?.item))
730
730
  }, [
731
- T(f.$slots, "before"),
731
+ T(m.$slots, "before"),
732
732
  h("span", {
733
- class: c(l(b).label(s.ui?.label))
733
+ class: c(l(b).label(o.ui?.label))
734
734
  }, "#", 2),
735
735
  h("input", {
736
736
  type: "text",
737
737
  name: "hex",
738
738
  "aria-label": "Hex",
739
- value: r.value,
739
+ value: n.value,
740
740
  disabled: l(u).disabled.value,
741
- class: c(l(b).field(s.ui?.field)),
741
+ class: c(l(b).field(o.ui?.field)),
742
742
  onBlur: d
743
743
  }, null, 42, Le)
744
744
  ], 2),
745
- l(u).isAlphaEnabled.value ? (y(), P("div", {
745
+ l(u).isAlphaEnabled.value ? (C(), P("div", {
746
746
  key: 0,
747
747
  "data-alpha-input": "",
748
- class: c(l(b).item(s.ui?.item))
748
+ class: c(l(b).item(o.ui?.item))
749
749
  }, [
750
750
  h("input", {
751
751
  type: "text",
752
752
  name: "opacity",
753
753
  "aria-label": "Opacity",
754
- value: n.value,
754
+ value: r.value,
755
755
  disabled: l(u).disabled.value,
756
- class: c(l(b).field(s.ui?.field)),
756
+ class: c(l(b).field(o.ui?.field)),
757
757
  onBlur: p
758
758
  }, null, 42, Ge),
759
759
  h("span", {
760
760
  "data-alpha-label": "",
761
- class: c(l(b).label(s.ui?.label))
761
+ class: c(l(b).label(o.ui?.label))
762
762
  }, "%", 2)
763
763
  ], 2)) : W("", !0)
764
764
  ], 10, Ee));
@@ -771,75 +771,75 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
771
771
  },
772
772
  setup(a) {
773
773
  const e = a, t = S();
774
- function s(r, n) {
775
- const d = r.target, p = parseInt(d.value, 10), b = isNaN(p) ? t.rgb.value[n] : _(p, 0, 255);
776
- t.rgb.value[n] !== b ? (t.rgb.value = {
774
+ function o(n, r) {
775
+ const d = n.target, p = parseInt(d.value, 10), b = isNaN(p) ? t.rgb.value[r] : _(p, 0, 255);
776
+ t.rgb.value[r] !== b ? (t.rgb.value = {
777
777
  ...t.rgb.value,
778
- [n]: b
778
+ [r]: b
779
779
  }, t.commitValue()) : d.value = b.toString();
780
780
  }
781
- function u(r) {
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();
781
+ function u(n) {
782
+ const r = n.target, d = parseInt(r.value, 10), p = isNaN(d) ? t.alpha.value : _(d, 0, 100);
783
+ t.alpha.value !== p ? (t.alpha.value = p, t.commitValue()) : r.value = p.toString();
784
784
  }
785
- const i = (r) => Math.round(r), o = t.uiSlots("input");
786
- return (r, n) => (y(), P("div", {
787
- class: c(l(o).group(e.ui?.group, e.class)),
785
+ const i = (n) => Math.round(n), s = t.uiSlots("input");
786
+ return (n, r) => (C(), P("div", {
787
+ class: c(l(s).group(e.ui?.group, e.class)),
788
788
  "data-disabled": l(t).disabled.value ? "" : null
789
789
  }, [
790
790
  h("div", {
791
- class: c(l(o).item(e.ui?.item))
791
+ class: c(l(s).item(e.ui?.item))
792
792
  }, [
793
- T(r.$slots, "before"),
793
+ T(n.$slots, "before"),
794
794
  h("span", {
795
- class: c(l(o).label(e.ui?.label))
795
+ class: c(l(s).label(e.ui?.label))
796
796
  }, "R", 2),
797
797
  h("input", {
798
798
  type: "text",
799
799
  name: "red",
800
800
  "aria-label": "Red",
801
801
  disabled: l(t).disabled.value,
802
- class: c(l(o).field(e.ui?.field)),
802
+ class: c(l(s).field(e.ui?.field)),
803
803
  value: i(l(t).rgb.value.r),
804
- onBlur: n[0] || (n[0] = (d) => s(d, "r"))
804
+ onBlur: r[0] || (r[0] = (d) => o(d, "r"))
805
805
  }, null, 42, Ue)
806
806
  ], 2),
807
807
  h("div", {
808
- class: c(l(o).item(e.ui?.item))
808
+ class: c(l(s).item(e.ui?.item))
809
809
  }, [
810
810
  h("span", {
811
- class: c(l(o).label(e.ui?.label))
811
+ class: c(l(s).label(e.ui?.label))
812
812
  }, "G", 2),
813
813
  h("input", {
814
814
  type: "text",
815
815
  name: "green",
816
816
  "aria-label": "Green",
817
817
  disabled: l(t).disabled.value,
818
- class: c(l(o).field(e.ui?.field)),
818
+ class: c(l(s).field(e.ui?.field)),
819
819
  value: i(l(t).rgb.value.g),
820
- onBlur: n[1] || (n[1] = (d) => s(d, "g"))
820
+ onBlur: r[1] || (r[1] = (d) => o(d, "g"))
821
821
  }, null, 42, je)
822
822
  ], 2),
823
823
  h("div", {
824
- class: c(l(o).item(e.ui?.item))
824
+ class: c(l(s).item(e.ui?.item))
825
825
  }, [
826
826
  h("span", {
827
- class: c(l(o).label(e.ui?.label))
827
+ class: c(l(s).label(e.ui?.label))
828
828
  }, "B", 2),
829
829
  h("input", {
830
830
  type: "text",
831
831
  name: "blue",
832
832
  "aria-label": "Blue",
833
833
  disabled: l(t).disabled.value,
834
- class: c(l(o).field(e.ui?.field)),
834
+ class: c(l(s).field(e.ui?.field)),
835
835
  value: i(l(t).rgb.value.b),
836
- onBlur: n[2] || (n[2] = (d) => s(d, "b"))
836
+ onBlur: r[2] || (r[2] = (d) => o(d, "b"))
837
837
  }, null, 42, Te)
838
838
  ], 2),
839
- l(t).isAlphaEnabled.value ? (y(), P("div", {
839
+ l(t).isAlphaEnabled.value ? (C(), P("div", {
840
840
  key: 0,
841
841
  "data-alpha-input": "",
842
- class: c(l(o).item(e.ui?.item))
842
+ class: c(l(s).item(e.ui?.item))
843
843
  }, [
844
844
  h("input", {
845
845
  type: "text",
@@ -847,12 +847,12 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
847
847
  "aria-label": "Opacity",
848
848
  value: l(t).alpha.value,
849
849
  disabled: l(t).disabled.value,
850
- class: c(l(o).field(e.ui?.field)),
850
+ class: c(l(s).field(e.ui?.field)),
851
851
  onBlur: u
852
852
  }, null, 42, ze),
853
853
  h("span", {
854
854
  "data-alpha-label": "",
855
- class: c(l(o).label(e.ui?.label))
855
+ class: c(l(s).label(e.ui?.label))
856
856
  }, "%", 2)
857
857
  ], 2)) : W("", !0)
858
858
  ], 10, Ne));
@@ -865,75 +865,75 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
865
865
  },
866
866
  setup(a) {
867
867
  const e = a, t = S();
868
- function s(r, n, d) {
869
- const p = r.target, b = parseInt(p.value, 10), f = isNaN(b) ? t.hsl.value[n] : _(b, 0, d);
870
- t.hsl.value[n] !== f ? (t.hsl.value = {
868
+ function o(n, r, d) {
869
+ const p = n.target, b = parseInt(p.value, 10), m = isNaN(b) ? t.hsl.value[r] : _(b, 0, d);
870
+ t.hsl.value[r] !== m ? (t.hsl.value = {
871
871
  ...t.hsl.value,
872
- [n]: n === "h" ? f : f / 100
873
- }, t.commitValue()) : p.value = n !== "h" ? Math.round(f * 100).toString() : f.toString();
872
+ [r]: r === "h" ? m : m / 100
873
+ }, t.commitValue()) : p.value = r !== "h" ? Math.round(m * 100).toString() : m.toString();
874
874
  }
875
- function u(r) {
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();
875
+ function u(n) {
876
+ const r = n.target, d = parseInt(r.value, 10), p = isNaN(d) ? t.alpha.value : _(d, 0, 100);
877
+ t.alpha.value !== p ? (t.alpha.value = p, t.commitValue()) : r.value = p.toString();
878
878
  }
879
- const i = (r) => Math.round(r * 100), o = t.uiSlots("input");
880
- return (r, n) => (y(), P("div", {
881
- class: c(l(o).group(e.ui?.group, e.class)),
879
+ const i = (n) => Math.round(n * 100), s = t.uiSlots("input");
880
+ return (n, r) => (C(), P("div", {
881
+ class: c(l(s).group(e.ui?.group, e.class)),
882
882
  "data-disabled": l(t).disabled.value ? "" : null
883
883
  }, [
884
884
  h("div", {
885
- class: c(l(o).item(e.ui?.item))
885
+ class: c(l(s).item(e.ui?.item))
886
886
  }, [
887
- T(r.$slots, "before"),
887
+ T(n.$slots, "before"),
888
888
  h("span", {
889
- class: c(l(o).label(e.ui?.label))
889
+ class: c(l(s).label(e.ui?.label))
890
890
  }, "H", 2),
891
891
  h("input", {
892
892
  type: "text",
893
893
  name: "hue",
894
894
  "aria-label": "Hue",
895
895
  disabled: l(t).disabled.value,
896
- class: c(l(o).field(e.ui?.field)),
896
+ class: c(l(s).field(e.ui?.field)),
897
897
  value: Math.round(l(t).hsl.value.h),
898
- onBlur: n[0] || (n[0] = (d) => s(d, "h", 360))
898
+ onBlur: r[0] || (r[0] = (d) => o(d, "h", 360))
899
899
  }, null, 42, We)
900
900
  ], 2),
901
901
  h("div", {
902
- class: c(l(o).item(e.ui?.item))
902
+ class: c(l(s).item(e.ui?.item))
903
903
  }, [
904
904
  h("span", {
905
- class: c(l(o).label(e.ui?.label))
905
+ class: c(l(s).label(e.ui?.label))
906
906
  }, "S", 2),
907
907
  h("input", {
908
908
  type: "text",
909
909
  name: "saturation",
910
910
  "aria-label": "Saturation",
911
911
  disabled: l(t).disabled.value,
912
- class: c(l(o).field(e.ui?.field)),
912
+ class: c(l(s).field(e.ui?.field)),
913
913
  value: i(l(t).hsl.value.s),
914
- onBlur: n[1] || (n[1] = (d) => s(d, "s", 100))
914
+ onBlur: r[1] || (r[1] = (d) => o(d, "s", 100))
915
915
  }, null, 42, Ke)
916
916
  ], 2),
917
917
  h("div", {
918
- class: c(l(o).item(e.ui?.item))
918
+ class: c(l(s).item(e.ui?.item))
919
919
  }, [
920
920
  h("span", {
921
- class: c(l(o).label(e.ui?.label))
921
+ class: c(l(s).label(e.ui?.label))
922
922
  }, "L", 2),
923
923
  h("input", {
924
924
  type: "text",
925
925
  name: "lightness",
926
926
  "aria-label": "Lightness",
927
927
  disabled: l(t).disabled.value,
928
- class: c(l(o).field(e.ui?.field)),
928
+ class: c(l(s).field(e.ui?.field)),
929
929
  value: i(l(t).hsl.value.l),
930
- onBlur: n[2] || (n[2] = (d) => s(d, "l", 100))
930
+ onBlur: r[2] || (r[2] = (d) => o(d, "l", 100))
931
931
  }, null, 42, Ze)
932
932
  ], 2),
933
- l(t).isAlphaEnabled.value ? (y(), P("div", {
933
+ l(t).isAlphaEnabled.value ? (C(), P("div", {
934
934
  key: 0,
935
935
  "data-alpha-input": "",
936
- class: c(l(o).item(e.ui?.item))
936
+ class: c(l(s).item(e.ui?.item))
937
937
  }, [
938
938
  h("input", {
939
939
  type: "text",
@@ -941,12 +941,12 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
941
941
  "aria-label": "Opacity",
942
942
  value: l(t).alpha.value,
943
943
  disabled: l(t).disabled.value,
944
- class: c(l(o).field(e.ui?.field)),
944
+ class: c(l(s).field(e.ui?.field)),
945
945
  onBlur: u
946
946
  }, null, 42, Ye),
947
947
  h("span", {
948
948
  "data-alpha-label": "",
949
- class: c(l(o).label(e.ui?.label))
949
+ class: c(l(s).label(e.ui?.label))
950
950
  }, "%", 2)
951
951
  ], 2)) : W("", !0)
952
952
  ], 10, Oe));
@@ -959,75 +959,75 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
959
959
  },
960
960
  setup(a) {
961
961
  const e = a, t = S();
962
- function s(r, n, d) {
963
- const p = r.target, b = parseInt(p.value, 10), f = isNaN(b) ? t.hsv.value[n] : _(b, 0, d);
964
- t.hsv.value[n] !== f ? (t.hsv.value = {
962
+ function o(n, r, d) {
963
+ const p = n.target, b = parseInt(p.value, 10), m = isNaN(b) ? t.hsv.value[r] : _(b, 0, d);
964
+ t.hsv.value[r] !== m ? (t.hsv.value = {
965
965
  ...t.hsv.value,
966
- [n]: n === "h" ? f : f / 100
967
- }, t.commitValue()) : p.value = n !== "h" ? Math.round(f * 100).toString() : f.toString();
966
+ [r]: r === "h" ? m : m / 100
967
+ }, t.commitValue()) : p.value = r !== "h" ? Math.round(m * 100).toString() : m.toString();
968
968
  }
969
- function u(r) {
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();
969
+ function u(n) {
970
+ const r = n.target, d = parseInt(r.value, 10), p = isNaN(d) ? t.alpha.value : _(d, 0, 100);
971
+ t.alpha.value !== p ? (t.alpha.value = p, t.commitValue()) : r.value = p.toString();
972
972
  }
973
- const i = (r) => Math.round(r * 100), o = t.uiSlots("input");
974
- return (r, n) => (y(), P("div", {
975
- class: c(l(o).group(e.ui?.group, e.class)),
973
+ const i = (n) => Math.round(n * 100), s = t.uiSlots("input");
974
+ return (n, r) => (C(), P("div", {
975
+ class: c(l(s).group(e.ui?.group, e.class)),
976
976
  "data-disabled": l(t).disabled.value ? "" : null
977
977
  }, [
978
978
  h("div", {
979
- class: c(l(o).item(e.ui?.item))
979
+ class: c(l(s).item(e.ui?.item))
980
980
  }, [
981
- T(r.$slots, "before"),
981
+ T(n.$slots, "before"),
982
982
  h("span", {
983
- class: c(l(o).label(e.ui?.label))
983
+ class: c(l(s).label(e.ui?.label))
984
984
  }, "H", 2),
985
985
  h("input", {
986
986
  type: "text",
987
987
  name: "hue",
988
988
  "aria-label": "Hue",
989
989
  disabled: l(t).disabled.value,
990
- class: c(l(o).field(e.ui?.field)),
990
+ class: c(l(s).field(e.ui?.field)),
991
991
  value: Math.round(l(t).hsv.value.h),
992
- onBlur: n[0] || (n[0] = (d) => s(d, "h", 360))
992
+ onBlur: r[0] || (r[0] = (d) => o(d, "h", 360))
993
993
  }, null, 42, qe)
994
994
  ], 2),
995
995
  h("div", {
996
- class: c(l(o).item(e.ui?.item))
996
+ class: c(l(s).item(e.ui?.item))
997
997
  }, [
998
998
  h("span", {
999
- class: c(l(o).label(e.ui?.label))
999
+ class: c(l(s).label(e.ui?.label))
1000
1000
  }, "S", 2),
1001
1001
  h("input", {
1002
1002
  type: "text",
1003
1003
  name: "saturation",
1004
1004
  "aria-label": "Saturation",
1005
1005
  disabled: l(t).disabled.value,
1006
- class: c(l(o).field(e.ui?.field)),
1006
+ class: c(l(s).field(e.ui?.field)),
1007
1007
  value: i(l(t).hsv.value.s),
1008
- onBlur: n[1] || (n[1] = (d) => s(d, "s", 100))
1008
+ onBlur: r[1] || (r[1] = (d) => o(d, "s", 100))
1009
1009
  }, null, 42, Je)
1010
1010
  ], 2),
1011
1011
  h("div", {
1012
- class: c(l(o).item(e.ui?.item))
1012
+ class: c(l(s).item(e.ui?.item))
1013
1013
  }, [
1014
1014
  h("span", {
1015
- class: c(l(o).label(e.ui?.label))
1015
+ class: c(l(s).label(e.ui?.label))
1016
1016
  }, "B", 2),
1017
1017
  h("input", {
1018
1018
  type: "text",
1019
1019
  name: "brightness",
1020
1020
  "aria-label": "Brightness",
1021
1021
  disabled: l(t).disabled.value,
1022
- class: c(l(o).field(e.ui?.field)),
1022
+ class: c(l(s).field(e.ui?.field)),
1023
1023
  value: i(l(t).hsv.value.v),
1024
- onBlur: n[2] || (n[2] = (d) => s(d, "v", 100))
1024
+ onBlur: r[2] || (r[2] = (d) => o(d, "v", 100))
1025
1025
  }, null, 42, Qe)
1026
1026
  ], 2),
1027
- l(t).isAlphaEnabled.value ? (y(), P("div", {
1027
+ l(t).isAlphaEnabled.value ? (C(), P("div", {
1028
1028
  key: 0,
1029
1029
  "data-alpha-input": "",
1030
- class: c(l(o).item(e.ui?.item))
1030
+ class: c(l(s).item(e.ui?.item))
1031
1031
  }, [
1032
1032
  h("input", {
1033
1033
  type: "text",
@@ -1035,12 +1035,12 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
1035
1035
  "aria-label": "Opacity",
1036
1036
  value: l(t).alpha.value,
1037
1037
  disabled: l(t).disabled.value,
1038
- class: c(l(o).field(e.ui?.field)),
1038
+ class: c(l(s).field(e.ui?.field)),
1039
1039
  onBlur: u
1040
1040
  }, null, 42, et),
1041
1041
  h("span", {
1042
1042
  "data-alpha-label": "",
1043
- class: c(l(o).label(e.ui?.label))
1043
+ class: c(l(s).label(e.ui?.label))
1044
1044
  }, "%", 2)
1045
1045
  ], 2)) : W("", !0)
1046
1046
  ], 10, Xe));
@@ -1053,33 +1053,33 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
1053
1053
  ui: {}
1054
1054
  },
1055
1055
  setup(a) {
1056
- const e = S(), t = m({
1056
+ const e = S(), t = f({
1057
1057
  get: () => [e.alpha.value],
1058
- set: ([o]) => {
1059
- e.alpha.value = o;
1058
+ set: ([s]) => {
1059
+ e.alpha.value = s;
1060
1060
  }
1061
- }), s = a, u = m(() => ({
1061
+ }), o = a, u = f(() => ({
1062
1062
  background: [
1063
- `linear-gradient(${s.orientation === "vertical" ? "to top" : "to right"}, rgba(0, 0, 0, 0) 0%, ${e.hex.value} 100%)`,
1063
+ `linear-gradient(${o.orientation === "vertical" ? "to top" : "to right"}, rgba(0, 0, 0, 0) 0%, ${e.hex.value} 100%)`,
1064
1064
  "repeating-conic-gradient(#ddd 0% 25%, transparent 0% 50%) 50% / 8px 8px"
1065
1065
  ].join(",")
1066
1066
  })), i = e.uiSlots("slider", "shared");
1067
- return (o, r) => (y(), A(l(L), {
1067
+ return (s, n) => (C(), A(l(L), {
1068
1068
  modelValue: t.value,
1069
- "onUpdate:modelValue": r[0] || (r[0] = (n) => t.value = n),
1069
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
1070
1070
  disabled: l(e).disabled.value,
1071
- orientation: s.orientation,
1072
- class: c(l(i).root(s.ui?.root, s.class)),
1073
- onValueCommit: r[1] || (r[1] = (n) => l(e).commitValue())
1071
+ orientation: o.orientation,
1072
+ class: c(l(i).root(o.ui?.root, o.class)),
1073
+ onValueCommit: n[1] || (n[1] = (r) => l(e).commitValue())
1074
1074
  }, {
1075
1075
  default: F(() => [
1076
1076
  w(l(G), {
1077
1077
  style: x(u.value),
1078
- class: c(l(i).track(s.ui?.track))
1078
+ class: c(l(i).track(o.ui?.track))
1079
1079
  }, null, 8, ["style", "class"]),
1080
1080
  w(l(N), {
1081
1081
  style: x({ backgroundColor: l(e).hexa.value }),
1082
- class: c(l(i).thumb(s.ui?.thumb)),
1082
+ class: c(l(i).thumb(o.ui?.thumb)),
1083
1083
  "aria-label": "Opacity"
1084
1084
  }, null, 8, ["style", "class"])
1085
1085
  ]),
@@ -1095,24 +1095,24 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
1095
1095
  ui: {}
1096
1096
  },
1097
1097
  setup(a) {
1098
- const e = a, t = S(), s = m({
1098
+ const e = a, t = S(), o = f({
1099
1099
  get: () => [t.hsv.value.h],
1100
- set: ([o]) => {
1100
+ set: ([s]) => {
1101
1101
  t.hsv.value = {
1102
1102
  ...t.hsv.value,
1103
- h: o
1103
+ h: s
1104
1104
  };
1105
1105
  }
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), {
1108
- modelValue: s.value,
1109
- "onUpdate:modelValue": r[0] || (r[0] = (n) => s.value = n),
1106
+ }), u = f(() => `linear-gradient(${e.orientation === "vertical" ? "to top" : "to right"}, red, yellow, lime, cyan, blue, magenta, red)`), i = t.uiSlots("slider", "shared");
1107
+ return (s, n) => (C(), A(l(L), {
1108
+ modelValue: o.value,
1109
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => o.value = r),
1110
1110
  disabled: l(t).disabled.value,
1111
1111
  max: 360,
1112
1112
  inverted: e.inverted,
1113
1113
  orientation: e.orientation,
1114
1114
  class: c(l(i).root(e.ui?.root, e.class)),
1115
- onValueCommit: r[1] || (r[1] = (n) => l(t).commitValue())
1115
+ onValueCommit: n[1] || (n[1] = (r) => l(t).commitValue())
1116
1116
  }, {
1117
1117
  default: F(() => [
1118
1118
  w(l(G), {
@@ -1136,27 +1136,27 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
1136
1136
  ui: {}
1137
1137
  },
1138
1138
  setup(a) {
1139
- const e = a, t = S(), s = m({
1139
+ const e = a, t = S(), o = f({
1140
1140
  get: () => [t.hsl.value.s],
1141
- set: ([o]) => {
1141
+ set: ([s]) => {
1142
1142
  t.hsl.value = {
1143
1143
  ...t.hsl.value,
1144
- s: o
1144
+ s
1145
1145
  };
1146
1146
  }
1147
- }), u = m(() => {
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)}%)`;
1149
- return `linear-gradient(${o}, ${r}, ${n})`;
1147
+ }), u = f(() => {
1148
+ const s = e.orientation === "vertical" ? "to top" : "to right", n = `hsl(${Math.floor(t.hsl.value.h)}, 0%, ${Math.floor(t.hsl.value.l * 100)}%)`, r = `hsl(${Math.floor(t.hsl.value.h)}, 100%, ${Math.floor(t.hsl.value.l * 100)}%)`;
1149
+ return `linear-gradient(${s}, ${n}, ${r})`;
1150
1150
  }), i = t.uiSlots("slider", "shared");
1151
- return (o, r) => (y(), A(l(L), {
1152
- modelValue: s.value,
1153
- "onUpdate:modelValue": r[0] || (r[0] = (n) => s.value = n),
1151
+ return (s, n) => (C(), A(l(L), {
1152
+ modelValue: o.value,
1153
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => o.value = r),
1154
1154
  max: 1,
1155
1155
  step: 0.01,
1156
1156
  disabled: l(t).disabled.value,
1157
1157
  orientation: e.orientation,
1158
1158
  class: c(l(i).root(e.ui?.root, e.class)),
1159
- onValueCommit: r[1] || (r[1] = (n) => l(t).commitValue())
1159
+ onValueCommit: n[1] || (n[1] = (r) => l(t).commitValue())
1160
1160
  }, {
1161
1161
  default: F(() => [
1162
1162
  w(l(G), {
@@ -1172,7 +1172,7 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
1172
1172
  _: 1
1173
1173
  }, 8, ["modelValue", "disabled", "orientation", "class"]));
1174
1174
  }
1175
- }), ft = /* @__PURE__ */ V({
1175
+ }), mt = /* @__PURE__ */ V({
1176
1176
  __name: "ColorPickerSliderLightness",
1177
1177
  props: {
1178
1178
  class: {},
@@ -1180,27 +1180,27 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
1180
1180
  ui: {}
1181
1181
  },
1182
1182
  setup(a) {
1183
- const e = a, t = S(), s = m({
1183
+ const e = a, t = S(), o = f({
1184
1184
  get: () => [t.hsl.value.l],
1185
- set: ([o]) => {
1185
+ set: ([s]) => {
1186
1186
  t.hsl.value = {
1187
1187
  ...t.hsl.value,
1188
- l: o
1188
+ l: s
1189
1189
  };
1190
1190
  }
1191
- }), u = m(() => {
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%)`;
1193
- return `linear-gradient(${o}, hsl(0, 0%, 0%), ${r}, hsl(0, 0%, 100%))`;
1191
+ }), u = f(() => {
1192
+ const s = e.orientation === "vertical" ? "to top" : "to right", n = `hsl(${Math.floor(t.hsl.value.h)}, ${Math.floor(t.hsl.value.s * 100)}%, 50%)`;
1193
+ return `linear-gradient(${s}, hsl(0, 0%, 0%), ${n}, hsl(0, 0%, 100%))`;
1194
1194
  }), i = t.uiSlots("slider", "shared");
1195
- return (o, r) => (y(), A(l(L), {
1196
- modelValue: s.value,
1197
- "onUpdate:modelValue": r[0] || (r[0] = (n) => s.value = n),
1195
+ return (s, n) => (C(), A(l(L), {
1196
+ modelValue: o.value,
1197
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => o.value = r),
1198
1198
  max: 1,
1199
1199
  step: 0.01,
1200
1200
  disabled: l(t).disabled.value,
1201
1201
  orientation: e.orientation,
1202
1202
  class: c(l(i).root(e.ui?.root, e.class)),
1203
- onValueCommit: r[1] || (r[1] = (n) => l(t).commitValue())
1203
+ onValueCommit: n[1] || (n[1] = (r) => l(t).commitValue())
1204
1204
  }, {
1205
1205
  default: F(() => [
1206
1206
  w(l(G), {
@@ -1216,7 +1216,7 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
1216
1216
  _: 1
1217
1217
  }, 8, ["modelValue", "disabled", "orientation", "class"]));
1218
1218
  }
1219
- }), mt = /* @__PURE__ */ V({
1219
+ }), ft = /* @__PURE__ */ V({
1220
1220
  __name: "ColorPickerSliderRed",
1221
1221
  props: {
1222
1222
  class: {},
@@ -1224,26 +1224,26 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
1224
1224
  ui: {}
1225
1225
  },
1226
1226
  setup(a) {
1227
- const e = a, t = S(), s = m({
1227
+ const e = a, t = S(), o = f({
1228
1228
  get: () => [t.rgb.value.r],
1229
- set: ([o]) => {
1229
+ set: ([s]) => {
1230
1230
  t.rgb.value = {
1231
1231
  ...t.rgb.value,
1232
- r: o
1232
+ r: s
1233
1233
  };
1234
1234
  }
1235
- }), u = m(() => {
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})`;
1237
- return `linear-gradient(${o}, ${r}, ${n})`;
1235
+ }), u = f(() => {
1236
+ const s = e.orientation === "vertical" ? "to top" : "to right", n = `rgb(0, ${t.rgb.value.g}, ${t.rgb.value.b})`, r = `rgb(255, ${t.rgb.value.g}, ${t.rgb.value.b})`;
1237
+ return `linear-gradient(${s}, ${n}, ${r})`;
1238
1238
  }), i = t.uiSlots("slider", "shared");
1239
- return (o, r) => (y(), A(l(L), {
1240
- modelValue: s.value,
1241
- "onUpdate:modelValue": r[0] || (r[0] = (n) => s.value = n),
1239
+ return (s, n) => (C(), A(l(L), {
1240
+ modelValue: o.value,
1241
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => o.value = r),
1242
1242
  disabled: l(t).disabled.value,
1243
1243
  max: 255,
1244
1244
  orientation: e.orientation,
1245
1245
  class: c(l(i).root(e.ui?.root, e.class)),
1246
- onValueCommit: r[1] || (r[1] = (n) => l(t).commitValue())
1246
+ onValueCommit: n[1] || (n[1] = (r) => l(t).commitValue())
1247
1247
  }, {
1248
1248
  default: F(() => [
1249
1249
  w(l(G), {
@@ -1267,26 +1267,26 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
1267
1267
  ui: {}
1268
1268
  },
1269
1269
  setup(a) {
1270
- const e = a, t = S(), s = m({
1270
+ const e = a, t = S(), o = f({
1271
1271
  get: () => [t.rgb.value.g],
1272
- set: ([o]) => {
1272
+ set: ([s]) => {
1273
1273
  t.rgb.value = {
1274
1274
  ...t.rgb.value,
1275
- g: o
1275
+ g: s
1276
1276
  };
1277
1277
  }
1278
- }), u = m(() => {
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})`;
1280
- return `linear-gradient(${o}, ${r}, ${n})`;
1278
+ }), u = f(() => {
1279
+ const s = e.orientation === "vertical" ? "to top" : "to right", n = `rgb(${t.rgb.value.r}, 0, ${t.rgb.value.b})`, r = `rgb(${t.rgb.value.r}, 255, ${t.rgb.value.b})`;
1280
+ return `linear-gradient(${s}, ${n}, ${r})`;
1281
1281
  }), i = t.uiSlots("slider", "shared");
1282
- return (o, r) => (y(), A(l(L), {
1283
- modelValue: s.value,
1284
- "onUpdate:modelValue": r[0] || (r[0] = (n) => s.value = n),
1282
+ return (s, n) => (C(), A(l(L), {
1283
+ modelValue: o.value,
1284
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => o.value = r),
1285
1285
  disabled: l(t).disabled.value,
1286
1286
  max: 255,
1287
1287
  orientation: e.orientation,
1288
1288
  class: c(l(i).root(e.ui?.root, e.class)),
1289
- onValueCommit: r[1] || (r[1] = (n) => l(t).commitValue())
1289
+ onValueCommit: n[1] || (n[1] = (r) => l(t).commitValue())
1290
1290
  }, {
1291
1291
  default: F(() => [
1292
1292
  w(l(G), {
@@ -1310,26 +1310,26 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
1310
1310
  ui: {}
1311
1311
  },
1312
1312
  setup(a) {
1313
- const e = a, t = S(), s = m({
1313
+ const e = a, t = S(), o = f({
1314
1314
  get: () => [t.rgb.value.b],
1315
- set: ([o]) => {
1315
+ set: ([s]) => {
1316
1316
  t.rgb.value = {
1317
1317
  ...t.rgb.value,
1318
- b: o
1318
+ b: s
1319
1319
  };
1320
1320
  }
1321
- }), u = m(() => {
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)`;
1323
- return `linear-gradient(${o}, ${r}, ${n})`;
1321
+ }), u = f(() => {
1322
+ const s = e.orientation === "vertical" ? "to top" : "to right", n = `rgb(${t.rgb.value.r}, ${t.rgb.value.g}, 0)`, r = `rgb(${t.rgb.value.r}, ${t.rgb.value.g}, 255)`;
1323
+ return `linear-gradient(${s}, ${n}, ${r})`;
1324
1324
  }), i = t.uiSlots("slider", "shared");
1325
- return (o, r) => (y(), A(l(L), {
1326
- modelValue: s.value,
1327
- "onUpdate:modelValue": r[0] || (r[0] = (n) => s.value = n),
1325
+ return (s, n) => (C(), A(l(L), {
1326
+ modelValue: o.value,
1327
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => o.value = r),
1328
1328
  disabled: l(t).disabled.value,
1329
1329
  max: 255,
1330
1330
  orientation: e.orientation,
1331
1331
  class: c(l(i).root(e.ui?.root, e.class)),
1332
- onValueCommit: r[1] || (r[1] = (n) => l(t).commitValue())
1332
+ onValueCommit: n[1] || (n[1] = (r) => l(t).commitValue())
1333
1333
  }, {
1334
1334
  default: F(() => [
1335
1335
  w(l(G), {
@@ -1354,17 +1354,17 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
1354
1354
  ui: {}
1355
1355
  },
1356
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), {
1357
+ const e = S(), t = a, o = f(() => Z(t.value) || e.rgba.value), u = e.uiSlots("swatch");
1358
+ return (i, s) => (C(), A(l(ae), {
1359
1359
  as: t.as,
1360
1360
  disabled: l(e).disabled.value,
1361
- style: x({ backgroundColor: `rgb(${s.value.r}, ${s.value.g}, ${s.value.b})` }),
1361
+ style: x({ backgroundColor: `rgb(${o.value.r}, ${o.value.g}, ${o.value.b})` }),
1362
1362
  class: c(l(u).base(t.ui?.base, t.class))
1363
1363
  }, {
1364
1364
  default: F(() => [
1365
1365
  h("span", {
1366
1366
  style: x({
1367
- opacity: 1 - s.value.a,
1367
+ opacity: 1 - o.value.a,
1368
1368
  background: `url(${l(tt)})`
1369
1369
  }),
1370
1370
  class: c(l(u).alpha(t.ui?.alpha))
@@ -1375,31 +1375,31 @@ const Re = ["data-disabled"], De = ["height", "width"], rt = /* @__PURE__ */ V({
1375
1375
  }
1376
1376
  });
1377
1377
  export {
1378
- rt as ColorPickerCanvas,
1378
+ nt as ColorPickerCanvas,
1379
1379
  ut as ColorPickerEyeDropper,
1380
1380
  vt as ColorPickerInputHSB,
1381
1381
  dt as ColorPickerInputHSL,
1382
1382
  it as ColorPickerInputHex,
1383
1383
  ct as ColorPickerInputRGB,
1384
- nt as ColorPickerRoot,
1384
+ rt as ColorPickerRoot,
1385
1385
  pt as ColorPickerSliderAlpha,
1386
1386
  kt as ColorPickerSliderBlue,
1387
1387
  gt as ColorPickerSliderGreen,
1388
1388
  ht as ColorPickerSliderHue,
1389
- ft as ColorPickerSliderLightness,
1390
- mt as ColorPickerSliderRed,
1389
+ mt as ColorPickerSliderLightness,
1390
+ ft as ColorPickerSliderRed,
1391
1391
  bt as ColorPickerSliderSaturation,
1392
1392
  $t as ColorPickerSwatch,
1393
- se as HSLtoHSV,
1394
- oe as HSVtoHSL,
1393
+ oe as HSLtoHSV,
1394
+ se as HSVtoHSL,
1395
1395
  X as HSVtoRGB,
1396
1396
  J as HexToRGB,
1397
- ot as HexaToRGBA,
1398
- fe as RGBAtoCSS,
1397
+ st as HexaToRGBA,
1398
+ me as RGBAtoCSS,
1399
1399
  be as RGBAtoHexa,
1400
1400
  he as RGBtoHSV,
1401
1401
  q as RGBtoHex,
1402
1402
  S as injectColorPickerContext,
1403
1403
  R as toHex,
1404
- me as useVModel
1404
+ fe as useVModel
1405
1405
  };