@orchidui/dashboard 1.8.1-133 → 1.8.1-135

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 (2) hide show
  1. package/dist/index.js +102 -102
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  var pt = Object.defineProperty;
2
2
  var gt = (n, V, r) => V in n ? pt(n, V, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[V] = r;
3
3
  var ze = (n, V, r) => gt(n, typeof V != "symbol" ? V + "" : V, r);
4
- import { ref as v, computed as he, createBlock as q, openBlock as m, unref as w, normalizeClass as Q, withCtx as Y, createVNode as T, createElementBlock as E, createSlots as vt, renderSlot as Ke, normalizeStyle as ee, createCommentVNode as D, onMounted as _e, watch as ye, createElementVNode as h, Fragment as pe, createTextVNode as ge, toDisplayString as Ne, renderList as Ze, withKeys as it, inject as Be, reactive as et, provide as Te, nextTick as mt, withDirectives as ft, vShow as bt, defineComponent as ht, defineAsyncComponent as st } from "vue";
4
+ import { ref as v, computed as he, createBlock as F, openBlock as m, unref as w, normalizeClass as Q, withCtx as Y, createVNode as T, createElementBlock as E, createSlots as vt, renderSlot as Ke, normalizeStyle as ee, createCommentVNode as D, onMounted as _e, watch as ye, createElementVNode as h, Fragment as pe, createTextVNode as ge, toDisplayString as Pe, renderList as Ze, withKeys as it, inject as Be, reactive as et, provide as Te, nextTick as mt, withDirectives as ft, vShow as bt, defineComponent as ht, defineAsyncComponent as st } from "vue";
5
5
  import { Q as G, a as yt } from "./QuillEditor-DRwC0sgJ.js";
6
- import { BaseInput as rt, Dropdown as ut, Input as $e, Icon as A, Modal as xt, Select as Je, Slider as Fe } from "@orchidui/core";
6
+ import { BaseInput as rt, Dropdown as ut, Input as $e, Icon as A, Modal as xt, Select as Je, Slider as Ne } from "@orchidui/core";
7
7
  import { rgbToHsl as tt, rgb2Hex as lt, rgbaToHex8 as kt, hsl2Hex as at, hexToRgb as je, rgbToHue as Ae, hslToRgb as nt, hex8ToRgba as $t, parseRgba as wt, parseRgb as St } from "./Dashboard/ColorPicker/components/converters.js";
8
8
  import { PieChart as Ct } from "./Dashboard/Charts/PieChart/OcPieChart.js";
9
9
  import { LineChart as Ol } from "./Dashboard/Charts/LineChart/OcLineChart.js";
10
10
  import { BarChart as Al } from "./Dashboard/Charts/BarChart/OcBarChart.js";
11
- import { BarRaceChart as Nl } from "./Dashboard/Charts/BarRaceChart/OcBarRaceChart.js";
12
- import { _ as Xl } from "./OcCard-D3be6IMj.js";
11
+ import { BarRaceChart as Pl } from "./Dashboard/Charts/BarRaceChart/OcBarRaceChart.js";
12
+ import { _ as ql } from "./OcCard-D3be6IMj.js";
13
13
  const It = { key: 1 }, Vt = {
14
14
  __name: "OcColorPicker",
15
15
  props: {
@@ -45,7 +45,7 @@ const It = { key: 1 }, Vt = {
45
45
  color: f.value
46
46
  }
47
47
  }), a = v(), H = v([]), j = () => {
48
- H.value.length > 8 && (H.value = H.value.filter((M, F) => F < 8)), localStorage.setItem("ck-cp-local-color-list", JSON.stringify(H.value));
48
+ H.value.length > 8 && (H.value = H.value.filter((M, N) => N < 8)), localStorage.setItem("ck-cp-local-color-list", JSON.stringify(H.value));
49
49
  };
50
50
  let O = localStorage.getItem("ck-cp-local-color-list");
51
51
  O && (H.value = [...new Set(JSON.parse(O))], j());
@@ -64,9 +64,9 @@ const It = { key: 1 }, Vt = {
64
64
  }, B = v(!1), W = (M) => {
65
65
  f.value = M, y("update:model-value", M), u.value = !1;
66
66
  };
67
- return (M, F) => (m(), q(w(rt), {
67
+ return (M, N) => (m(), F(w(rt), {
68
68
  class: Q(n.hideInputColor ? "w-[40px]" : ""),
69
- onClick: F[1] || (F[1] = () => {
69
+ onClick: N[1] || (N[1] = () => {
70
70
  var U;
71
71
  return (U = a.value) == null ? void 0 : U.toggleDropdown();
72
72
  })
@@ -77,7 +77,7 @@ const It = { key: 1 }, Vt = {
77
77
  ref: a,
78
78
  modelValue: u.value,
79
79
  "onUpdate:modelValue": [
80
- F[0] || (F[0] = (U) => u.value = U),
80
+ N[0] || (N[0] = (U) => u.value = U),
81
81
  L
82
82
  ],
83
83
  "max-menu-height": 800,
@@ -87,7 +87,7 @@ const It = { key: 1 }, Vt = {
87
87
  }
88
88
  }, {
89
89
  menu: Y(() => [
90
- B.value ? D("", !0) : (m(), q(w(xl), {
90
+ B.value ? D("", !0) : (m(), F(w(xl), {
91
91
  key: 0,
92
92
  variant: n.variant,
93
93
  "show-alpha": !n.hideOpacity,
@@ -108,12 +108,12 @@ const It = { key: 1 }, Vt = {
108
108
  name: "drop"
109
109
  }, null, 8, ["style"])
110
110
  ])
111
- ])) : (m(), q(w($e), {
111
+ ])) : (m(), F(w($e), {
112
112
  key: 0,
113
113
  "model-value": f.value,
114
114
  icon: "drop",
115
115
  "icon-props": p.value,
116
- placeholder: "#FFFFFF",
116
+ placeholder: "",
117
117
  "onUpdate:modelValue": C
118
118
  }, vt({ _: 2 }, [
119
119
  M.$slots.leading ? {
@@ -134,7 +134,7 @@ const It = { key: 1 }, Vt = {
134
134
  }, Lt = ["id"], Tt = { class: "flex items-center gap-x-3 px-5" }, Bt = { class: "flex items-center gap-x-5 cursor-pointer" }, Rt = { class: "flex flex-col py-2 overflow-hidden" }, Et = ["onClick"], Mt = { class: "flex gap-x-3 items-center px-5" }, Ut = { class: "flex items-center gap-x-3 px-5" }, Dt = { class: "flex gap-x-3 items-center px-5" }, Ht = { class: "flex gap-x-3 items-center px-5" }, Ot = { class: "flex items-center" }, Qt = { class: "grid cursor-pointer px-5" }, At = {
135
135
  key: 5,
136
136
  class: "flex gap-x-3 items-center px-5"
137
- }, Ft = { class: "flex" }, Nt = { class: "mt-1 mx-2 cursor-pointer" }, Rl = {
137
+ }, Nt = { class: "flex" }, Pt = { class: "mt-1 mx-2 cursor-pointer" }, Rl = {
138
138
  __name: "OcTextEditor",
139
139
  props: {
140
140
  /**
@@ -218,7 +218,7 @@ const It = { key: 1 }, Vt = {
218
218
  ze(B, "blotName", "divider"), ze(B, "tagName", "hr"), G.register(B);
219
219
  const W = v(
220
220
  Math.random().toString(36).replace(/[^a-zA-Z]+/g, "")
221
- ), M = v(!1), F = v(!1), U = v(!1), te = v(!1), K = v(!1), z = v(!1), R = v(!1), X = v(""), le = v(""), _ = v(""), x = v(), we = v(!1), ue = v(r.image), ve = he(() => {
221
+ ), M = v(!1), N = v(!1), U = v(!1), te = v(!1), K = v(!1), z = v(!1), R = v(!1), q = v(""), le = v(""), _ = v(""), x = v(), we = v(!1), ue = v(r.image), ve = he(() => {
222
222
  const c = [
223
223
  "background",
224
224
  "bold",
@@ -244,7 +244,7 @@ const It = { key: 1 }, Vt = {
244
244
  formats: c
245
245
  };
246
246
  }), Se = (c) => {
247
- M.value = x.value.getQuill().history.stack.undo.length > 0, F.value = x.value.getQuill().history.stack.redo.length > 0, U.value = x.value.getQuill().getFormat().bold, te.value = x.value.getQuill().getFormat().italic, K.value = x.value.getQuill().getFormat().underline, R.value = x.value.getQuill().getFormat().blockquote, le.value = x.value.getQuill().getFormat().list, _.value = x.value.getQuill().getFormat().align;
247
+ M.value = x.value.getQuill().history.stack.undo.length > 0, N.value = x.value.getQuill().history.stack.redo.length > 0, U.value = x.value.getQuill().getFormat().bold, te.value = x.value.getQuill().getFormat().italic, K.value = x.value.getQuill().getFormat().underline, R.value = x.value.getQuill().getFormat().blockquote, le.value = x.value.getQuill().getFormat().list, _.value = x.value.getQuill().getFormat().align;
248
248
  let o = document.createElement("div");
249
249
  o.innerHTML = c, we.value && (o.innerText ? y("update:modelValue", c || "") : y("update:modelValue", ""), o.remove());
250
250
  }, Re = () => {
@@ -263,12 +263,12 @@ const It = { key: 1 }, Vt = {
263
263
  }, Ie = () => {
264
264
  var c;
265
265
  x.value.getQuill().format("italic", !te.value), (c = x.value.getQuill().getSelection()) != null && c.length || (te.value = !te.value);
266
- }, Pe = () => {
266
+ }, Xe = () => {
267
267
  var c;
268
268
  x.value.getQuill().format("underline", !K.value), (c = x.value.getQuill().getSelection()) != null && c.length || (K.value = !K.value);
269
269
  }, de = (c) => {
270
- x.value.getQuill().format("size", c), X.value = c, z.value = !1;
271
- }, Xe = () => {
270
+ x.value.getQuill().format("size", c), q.value = c, z.value = !1;
271
+ }, qe = () => {
272
272
  const c = x.value.getQuill().getSelection();
273
273
  c && c.length > 0 && x.value.getQuill().theme.tooltip.edit();
274
274
  }, ne = () => {
@@ -276,14 +276,14 @@ const It = { key: 1 }, Vt = {
276
276
  }, Me = (c) => {
277
277
  const o = x.value.getQuill().getSelection();
278
278
  o && (x.value.getQuill().clipboard.dangerouslyPasteHTML(o.index, `<img src="${c}" />`), ue.value = c, y("update:image", ue.value));
279
- }, qe = () => {
279
+ }, Fe = () => {
280
280
  x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1);
281
281
  const c = document.createElement("input");
282
282
  c.type = "file", c.accept = "jpg,.jpeg,.png,.webp,.gif", c.onchange = () => {
283
283
  const o = c.files[0], b = new FileReader();
284
284
  b.onload = () => Me(b.result), b.readAsDataURL(o);
285
285
  }, c.click();
286
- }, N = (c) => /^data:image\/(png|jpg|jpeg|gif);base64,/.test(c), Z = (c) => {
286
+ }, P = (c) => /^data:image\/(png|jpg|jpeg|gif);base64,/.test(c), Z = (c) => {
287
287
  setTimeout(() => {
288
288
  var b;
289
289
  if (c) {
@@ -293,13 +293,13 @@ const It = { key: 1 }, Vt = {
293
293
  if (se && se.length > 0)
294
294
  for (let be = 0; be < se.length; be++) {
295
295
  const Qe = (b = se[be]) == null ? void 0 : b.getAttribute("src");
296
- N(Qe) && y("update:image", Qe);
296
+ P(Qe) && y("update:image", Qe);
297
297
  }
298
298
  }
299
299
  }, 100);
300
300
  const { items: o } = c.clipboardData;
301
301
  o.length && o[0].getAsString((b) => {
302
- N(b) && (x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1));
302
+ P(b) && (x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1));
303
303
  });
304
304
  }, Ue = () => {
305
305
  x.value.getQuill().theme.tooltip.edit("video");
@@ -329,7 +329,7 @@ const It = { key: 1 }, Vt = {
329
329
  var o;
330
330
  const c = (o = window.getSelection()) == null ? void 0 : o.focusNode;
331
331
  xe.value = c.innerHTML && c.innerHTML.includes("<img");
332
- }, P = v(!1), Ve = v(3), Le = v(3), Ge = he(() => {
332
+ }, X = v(!1), Ve = v(3), Le = v(3), Ge = he(() => {
333
333
  let c = [];
334
334
  for (let o = 1; o < 30; o++)
335
335
  c.push({
@@ -346,14 +346,14 @@ const It = { key: 1 }, Vt = {
346
346
  });
347
347
  return c;
348
348
  }), We = () => {
349
- x.value.getQuill().getModule("better-table").insertTable(parseInt(Ve.value), parseInt(Le.value)), P.value = !1;
349
+ x.value.getQuill().getModule("better-table").insertTable(parseInt(Ve.value), parseInt(Le.value)), X.value = !1;
350
350
  };
351
351
  return ye(
352
352
  () => r.modelValue,
353
353
  (c) => {
354
354
  c || x.value.getQuill().setContents([], "silent");
355
355
  }
356
- ), (c, o) => (m(), q(w(rt), {
356
+ ), (c, o) => (m(), F(w(rt), {
357
357
  label: n.label,
358
358
  hint: n.hint,
359
359
  "error-message": n.errorMessage,
@@ -365,8 +365,8 @@ const It = { key: 1 }, Vt = {
365
365
  default: Y(() => [
366
366
  T(w(xt), {
367
367
  title: "Insert table",
368
- modelValue: P.value,
369
- "onUpdate:modelValue": o[2] || (o[2] = (b) => P.value = b),
368
+ modelValue: X.value,
369
+ "onUpdate:modelValue": o[2] || (o[2] = (b) => X.value = b),
370
370
  class: "!w-full !h-full",
371
371
  confirmButtonProps: {
372
372
  label: "Save",
@@ -394,7 +394,7 @@ const It = { key: 1 }, Vt = {
394
394
  class: Q(["grid", { "has-error": n.errorMessage }]),
395
395
  onClick: oe
396
396
  }, [
397
- W.value ? (m(), q(w(yt), {
397
+ W.value ? (m(), F(w(yt), {
398
398
  key: 0,
399
399
  id: `#${W.value}`,
400
400
  ref_key: "quill",
@@ -426,7 +426,7 @@ const It = { key: 1 }, Vt = {
426
426
  onClick: Ee
427
427
  }, null, 8, ["class"]),
428
428
  T(w(A), {
429
- class: Q(F.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
429
+ class: Q(N.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
430
430
  width: "20",
431
431
  height: "20",
432
432
  name: "text-editor/redo",
@@ -445,16 +445,16 @@ const It = { key: 1 }, Vt = {
445
445
  h("div", Rt, [
446
446
  (m(!0), E(pe, null, Ze(n.fontSizes, (b) => (m(), E("div", {
447
447
  key: b.value,
448
- class: Q(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50", X.value === b.value ? "font-medium" : ""]),
448
+ class: Q(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50", q.value === b.value ? "font-medium" : ""]),
449
449
  onClick: (J) => de(b.value)
450
- }, Ne(b.label), 11, Et))), 128))
450
+ }, Pe(b.label), 11, Et))), 128))
451
451
  ])
452
452
  ]),
453
453
  default: Y(() => {
454
454
  var b;
455
455
  return [
456
456
  h("div", Bt, [
457
- ge(Ne((b = n.fontSizes.find((J) => J.value === X.value)) == null ? void 0 : b.label) + " ", 1),
457
+ ge(Pe((b = n.fontSizes.find((J) => J.value === q.value)) == null ? void 0 : b.label) + " ", 1),
458
458
  T(w(A), {
459
459
  width: "20",
460
460
  height: "20",
@@ -489,29 +489,29 @@ const It = { key: 1 }, Vt = {
489
489
  width: "20",
490
490
  height: "20",
491
491
  name: "text-editor/underline",
492
- onClick: Pe
492
+ onClick: Xe
493
493
  }, null, 8, ["class"])
494
494
  ]),
495
495
  o[18] || (o[18] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
496
496
  ], 64)) : D("", !0),
497
497
  h("div", Ut, [
498
- f.value.includes("link") ? (m(), q(w(A), {
498
+ f.value.includes("link") ? (m(), F(w(A), {
499
499
  key: 0,
500
500
  class: "cursor-pointer",
501
501
  width: "20",
502
502
  height: "20",
503
503
  name: "text-editor/link",
504
- onClick: Xe
504
+ onClick: qe
505
505
  })) : D("", !0),
506
- f.value.includes("image") ? (m(), q(w(A), {
506
+ f.value.includes("image") ? (m(), F(w(A), {
507
507
  key: 1,
508
508
  class: "cursor-pointer",
509
509
  width: "20",
510
510
  height: "20",
511
511
  name: "text-editor/image",
512
- onClick: qe
512
+ onClick: Fe
513
513
  })) : D("", !0),
514
- f.value.includes("quote") ? (m(), q(w(A), {
514
+ f.value.includes("quote") ? (m(), F(w(A), {
515
515
  key: 2,
516
516
  class: Q(["cursor-pointer", R.value ? "text-oc-text" : "text-oc-text-300"]),
517
517
  width: "20",
@@ -519,7 +519,7 @@ const It = { key: 1 }, Vt = {
519
519
  name: "text-editor/quote",
520
520
  onClick: ne
521
521
  }, null, 8, ["class"])) : D("", !0),
522
- f.value.includes("media") ? (m(), q(w(A), {
522
+ f.value.includes("media") ? (m(), F(w(A), {
523
523
  key: 3,
524
524
  class: "cursor-pointer",
525
525
  width: "20",
@@ -532,7 +532,7 @@ const It = { key: 1 }, Vt = {
532
532
  width: "20",
533
533
  height: "20",
534
534
  name: "table",
535
- onClick: o[4] || (o[4] = (b) => P.value = !P.value)
535
+ onClick: o[4] || (o[4] = (b) => X.value = !X.value)
536
536
  })
537
537
  ]),
538
538
  f.value.includes("list") ? (m(), E(pe, { key: 3 }, [
@@ -613,7 +613,7 @@ const It = { key: 1 }, Vt = {
613
613
  ]),
614
614
  o[23] || (o[23] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
615
615
  xe.value ? (m(), E("div", At, [
616
- T(w(Fe), {
616
+ T(w(Ne), {
617
617
  label: "Image width",
618
618
  class: "w-[120px]",
619
619
  "model-value": ie.value,
@@ -621,7 +621,7 @@ const It = { key: 1 }, Vt = {
621
621
  "max-limit": 100,
622
622
  "onUpdate:modelValue": Oe
623
623
  }, null, 8, ["model-value"]),
624
- h("div", Ft, [
624
+ h("div", Nt, [
625
625
  T(w(A), {
626
626
  class: "cursor-pointer",
627
627
  width: "20",
@@ -645,7 +645,7 @@ const It = { key: 1 }, Vt = {
645
645
  })
646
646
  ])
647
647
  ])) : D("", !0),
648
- h("div", Nt, [
648
+ h("div", Pt, [
649
649
  (m(), E("svg", {
650
650
  width: "20",
651
651
  height: "20",
@@ -671,7 +671,7 @@ const It = { key: 1 }, Vt = {
671
671
  _: 1
672
672
  }, 8, ["label", "hint", "error-message", "is-required", "label-icon", "tooltip-text", "tooltip-options"]));
673
673
  }
674
- }, Pt = {
674
+ }, Xt = {
675
675
  __name: "InputHex",
676
676
  props: {
677
677
  modelValue: {
@@ -718,7 +718,7 @@ const It = { key: 1 }, Vt = {
718
718
  p !== a && (u.value = p);
719
719
  },
720
720
  { immediate: !0 }
721
- ), (p, a) => (m(), q(w($e), {
721
+ ), (p, a) => (m(), F(w($e), {
722
722
  class: "w-[158px]",
723
723
  placeholder: "#FFFFFF",
724
724
  "model-value": u.value,
@@ -727,7 +727,7 @@ const It = { key: 1 }, Vt = {
727
727
  onKeyup: it(C, ["enter"])
728
728
  }, null, 8, ["model-value"]));
729
729
  }
730
- }, Xt = { class: "grid grid-cols-3 gap-3" }, ot = {
730
+ }, qt = { class: "grid grid-cols-3 gap-3" }, ot = {
731
731
  __name: "InputRgbHsl",
732
732
  props: {
733
733
  inputType: {
@@ -751,7 +751,7 @@ const It = { key: 1 }, Vt = {
751
751
  g: 0,
752
752
  b: 0
753
753
  }), f = v(), C = v(), p = v(), a = (O, L) => {
754
- var W, M, F;
754
+ var W, M, N;
755
755
  let B = 255;
756
756
  if (r.inputType == "HSL" && (B = 100, O == "r" && (B = 360)), !isNaN(parseInt(L))) {
757
757
  if (O == "r") {
@@ -762,7 +762,7 @@ const It = { key: 1 }, Vt = {
762
762
  U <= B && (u.value.g = U, r.inputType == "RGB" ? H("g") : j()), (M = C.value) == null || M.focus();
763
763
  } else if (O == "b") {
764
764
  let U = parseInt(L);
765
- U <= B && (u.value.b = U, r.inputType == "RGB" ? H("b") : j()), (F = p.value) == null || F.focus();
765
+ U <= B && (u.value.b = U, r.inputType == "RGB" ? H("b") : j()), (N = p.value) == null || N.focus();
766
766
  }
767
767
  }
768
768
  }, H = (O) => {
@@ -797,7 +797,7 @@ const It = { key: 1 }, Vt = {
797
797
  };
798
798
  },
799
799
  { immediate: !0, deep: !0 }
800
- ), (O, L) => (m(), E("div", Xt, [
800
+ ), (O, L) => (m(), E("div", qt, [
801
801
  T(w($e), {
802
802
  ref_key: "rInputEl",
803
803
  ref: f,
@@ -821,7 +821,7 @@ const It = { key: 1 }, Vt = {
821
821
  }, null, 8, ["model-value"])
822
822
  ]));
823
823
  }
824
- }, qt = {
824
+ }, Ft = {
825
825
  __name: "InputOpacity",
826
826
  props: {
827
827
  modelValue: {
@@ -844,7 +844,7 @@ const It = { key: 1 }, Vt = {
844
844
  p !== a && (u.value = p);
845
845
  },
846
846
  { immediate: !0 }
847
- ), (p, a) => (m(), q(w($e), {
847
+ ), (p, a) => (m(), F(w($e), {
848
848
  class: "w-[75px]",
849
849
  placeholder: "100",
850
850
  "model-value": u.value,
@@ -868,7 +868,7 @@ const It = { key: 1 }, Vt = {
868
868
  const y = v(n.modelValue), u = V, f = (C) => {
869
869
  y.value = C, u("update:model-value", C);
870
870
  };
871
- return (C, p) => (m(), q(w(Je), {
871
+ return (C, p) => (m(), F(w(Je), {
872
872
  class: "!w-[80px]",
873
873
  "model-value": y.value,
874
874
  options: [
@@ -1027,7 +1027,7 @@ const It = { key: 1 }, Vt = {
1027
1027
  }
1028
1028
  };
1029
1029
  return (C, p) => (m(), E("div", el, [
1030
- n.gradientType == "linear" && r.value ? (m(), q(w(Fe), {
1030
+ n.gradientType == "linear" && r.value ? (m(), F(w(Ne), {
1031
1031
  key: 0,
1032
1032
  label: "Angle",
1033
1033
  "model-value": n.angle,
@@ -1045,7 +1045,7 @@ const It = { key: 1 }, Vt = {
1045
1045
  _: 1
1046
1046
  }, 8, ["model-value"])) : D("", !0),
1047
1047
  n.gradientType == "radial" && y.value ? (m(), E("div", tl, [
1048
- T(w(Fe), {
1048
+ T(w(Ne), {
1049
1049
  label: "Position X",
1050
1050
  "model-value": n.percentageX,
1051
1051
  "min-limit": 0,
@@ -1060,7 +1060,7 @@ const It = { key: 1 }, Vt = {
1060
1060
  ])),
1061
1061
  _: 1
1062
1062
  }, 8, ["model-value"]),
1063
- T(w(Fe), {
1063
+ T(w(Ne), {
1064
1064
  label: "Position Y",
1065
1065
  "model-value": n.percentageY,
1066
1066
  "min-limit": 0,
@@ -1236,7 +1236,7 @@ const It = { key: 1 }, Vt = {
1236
1236
  emits: ["update:modelValue", "last-used-pick"],
1237
1237
  setup(n, { emit: V }) {
1238
1238
  const r = n, y = v(r.variant == "gradient" ? "gradient" : "solid"), u = v(null), f = V, C = v(r.modelValue), p = (t) => {
1239
- C.value = t, F.value && f("update:modelValue", t);
1239
+ C.value = t, N.value && f("update:modelValue", t);
1240
1240
  }, a = v([
1241
1241
  { id: 1, r: 68, g: 71, b: 119, a: 100, percent: 0, hue: 0, select: !0 },
1242
1242
  { id: 2, r: 0, g: 0, b: 255, a: 100, percent: 100, hue: 0, select: !1 }
@@ -1254,7 +1254,7 @@ const It = { key: 1 }, Vt = {
1254
1254
  angle: 90,
1255
1255
  percentageX: 50,
1256
1256
  percentageY: 50
1257
- }), W = v(""), M = v(r.inputType), F = v(!1), U = v(), te = v(), K = v(), z = v(), R = v(), X = et({
1257
+ }), W = v(""), M = v(r.inputType), N = v(!1), U = v(), te = v(), K = v(), z = v(), R = v(), q = et({
1258
1258
  h: 0,
1259
1259
  s: 0,
1260
1260
  l: 0
@@ -1271,14 +1271,14 @@ const It = { key: 1 }, Vt = {
1271
1271
  window.removeEventListener("mousemove", Re), window.removeEventListener("mouseup", Ee);
1272
1272
  }, Ce = (t) => {
1273
1273
  if (!t) {
1274
- let e = Pe();
1274
+ let e = Xe();
1275
1275
  const l = nt(ae.value, e.s, e.l);
1276
1276
  if (l) {
1277
- if (F.value) {
1277
+ if (N.value) {
1278
1278
  let i = a.value.find((s) => s.select == !0);
1279
1279
  i && (i.r = l.r, i.g = l.g, i.b = l.b);
1280
1280
  }
1281
- oe(), P();
1281
+ oe(), X();
1282
1282
  }
1283
1283
  }
1284
1284
  }, ae = v(0), Ie = async (t) => {
@@ -1286,7 +1286,7 @@ const It = { key: 1 }, Vt = {
1286
1286
  ke(e), setTimeout(() => {
1287
1287
  Ce(t), b();
1288
1288
  }, 0);
1289
- }, Pe = () => {
1289
+ }, Xe = () => {
1290
1290
  let t = { s: 0, l: 0 }, e = z.value.offsetWidth - R.value.offsetWidth, l = z.value.offsetHeight - R.value.offsetHeight, i = parseInt(R.value.style.left), d = 1 - parseInt(R.value.style.top) / l, k = i / e;
1291
1291
  return t.l = d / 2 * (2 - k), t.s = d * k / (1 - Math.abs(2 * t.l - 1)), Number.isNaN(t.s) && (t.s = t.l), t.l = t.l > 1 ? 1 : t.l, t.s = t.s > 1 ? 1 : t.s, t;
1292
1292
  }, de = () => {
@@ -1306,20 +1306,20 @@ const It = { key: 1 }, Vt = {
1306
1306
  return d.x = $, d.y = g, d;
1307
1307
  } else
1308
1308
  return null;
1309
- }, Xe = () => {
1309
+ }, qe = () => {
1310
1310
  const t = a.value.find((e) => e.select == !0);
1311
1311
  t && (t.hue = ae.value);
1312
1312
  }, ne = v(100), Me = (t) => {
1313
1313
  if (r.showAlpha) {
1314
1314
  const e = a.value.find((l) => l.select == !0);
1315
- e && (e.a = parseInt(t), P());
1315
+ e && (e.a = parseInt(t), X());
1316
1316
  }
1317
- }, qe = (t) => {
1317
+ }, Fe = (t) => {
1318
1318
  var l, i, s, d;
1319
1319
  const e = (i = (l = u.value) == null ? void 0 : l.querySelector(".gradient-handle-content")) == null ? void 0 : i.getBoundingClientRect();
1320
1320
  return t === 0 ? "0px" : t === 100 && e ? `${(((s = te.value) == null ? void 0 : s.offsetWidth) || 0) - (e.width || 0)}px` : `${(((d = te.value) == null ? void 0 : d.offsetWidth) || 0) * (t / 100) - ((e == null ? void 0 : e.width) || 0) / 2}px`;
1321
1321
  };
1322
- let N = null, Z = null;
1322
+ let P = null, Z = null;
1323
1323
  const Ue = (t) => {
1324
1324
  var i, s;
1325
1325
  const l = t.target.offsetParent;
@@ -1346,18 +1346,18 @@ const It = { key: 1 }, Vt = {
1346
1346
  }, me = (t) => {
1347
1347
  var d, k;
1348
1348
  t.preventDefault();
1349
- const e = (k = (d = u.value) == null ? void 0 : d.querySelector(".gradient-handle-content")) == null ? void 0 : k.getBoundingClientRect(), l = N == null ? void 0 : N.getBoundingClientRect(), i = l.width - (e == null ? void 0 : e.width);
1349
+ const e = (k = (d = u.value) == null ? void 0 : d.querySelector(".gradient-handle-content")) == null ? void 0 : k.getBoundingClientRect(), l = P == null ? void 0 : P.getBoundingClientRect(), i = l.width - (e == null ? void 0 : e.width);
1350
1350
  let s = t.clientX - (l.left || 0) - ((e == null ? void 0 : e.width) || 0) / 2;
1351
1351
  if (s < 0 ? s = 0 : s > i && (s = i), Z) {
1352
1352
  Z.style.left = `${s}px`;
1353
1353
  const I = parseFloat((s / ((l == null ? void 0 : l.width) - (e == null ? void 0 : e.width)) * 100).toFixed(0)), $ = a.value.find(
1354
1354
  (g) => g.id == (Z == null ? void 0 : Z.id.replace("clr-gb-", ""))
1355
1355
  );
1356
- $ && ($.percent = I), P();
1356
+ $ && ($.percent = I), X();
1357
1357
  }
1358
1358
  }, fe = (t) => {
1359
1359
  var I, $;
1360
- const e = N == null ? void 0 : N.getBoundingClientRect(), l = Math.round((t.clientX - ((e == null ? void 0 : e.left) || 0)) / ((e == null ? void 0 : e.width) || 1) * 100), i = a.value.findIndex((g) => g.select == !0), s = a.value[i], d = {
1360
+ const e = P == null ? void 0 : P.getBoundingClientRect(), l = Math.round((t.clientX - ((e == null ? void 0 : e.left) || 0)) / ((e == null ? void 0 : e.width) || 1) * 100), i = a.value.findIndex((g) => g.select == !0), s = a.value[i], d = {
1361
1361
  id: Date.now(),
1362
1362
  r: s.r,
1363
1363
  g: s.g,
@@ -1369,7 +1369,7 @@ const It = { key: 1 }, Vt = {
1369
1369
  };
1370
1370
  a.value[i].select = !1;
1371
1371
  const k = (I = u.value) == null ? void 0 : I.querySelector(".gradient-handle.select");
1372
- k == null || k.classList.remove("select"), a.value = [...a.value, d], Oe(d), Z = ($ = u.value) == null ? void 0 : $.querySelector(`#clr-gb-${d.id}`), P();
1372
+ k == null || k.classList.remove("select"), a.value = [...a.value, d], Oe(d), Z = ($ = u.value) == null ? void 0 : $.querySelector(`#clr-gb-${d.id}`), X();
1373
1373
  }, He = (t) => {
1374
1374
  if (t.r == 0 && t.g == 0 && t.b == 0)
1375
1375
  return !0;
@@ -1400,13 +1400,13 @@ const It = { key: 1 }, Vt = {
1400
1400
  const t = a.value[0];
1401
1401
  ae.value = t.hue, Ie(!0);
1402
1402
  let e = de();
1403
- e && (R.value.style.left = `${e.x}px`, R.value.style.top = `${e.y}px`), oe(), P();
1403
+ e && (R.value.style.left = `${e.x}px`, R.value.style.top = `${e.y}px`), oe(), X();
1404
1404
  }, Oe = (t) => {
1405
1405
  if (y.value == "gradient") {
1406
1406
  let e = document.createElement("div");
1407
- e.id = `clr-gb-${t.id}`, e.classList.add("gradient-handle"), e.style.left = qe(t.percent);
1407
+ e.id = `clr-gb-${t.id}`, e.classList.add("gradient-handle"), e.style.left = Fe(t.percent);
1408
1408
  let l = document.createElement("div");
1409
- l.classList.add("gradient-handle-content"), t.select == !0 && e.classList.add("select"), e.appendChild(l), N && N.appendChild(e);
1409
+ l.classList.add("gradient-handle-content"), t.select == !0 && e.classList.add("select"), e.appendChild(l), P && P.appendChild(e);
1410
1410
  }
1411
1411
  }, ke = (t) => {
1412
1412
  const e = K.value.getContext("2d", { willReadFrequently: !0 }), l = K.value.width, i = K.value.height;
@@ -1420,7 +1420,7 @@ const It = { key: 1 }, Vt = {
1420
1420
  let t = a.value.find((e) => e.select == !0);
1421
1421
  t && (U.value.style.background = ` linear-gradient(90deg,rgba(255, 255, 255, 0) 0%, rgba(${t.r}, ${t.g}, ${t.b}, 100) 97%)`);
1422
1422
  }
1423
- }, P = () => {
1423
+ }, X = () => {
1424
1424
  var t;
1425
1425
  if (y.value == "gradient") {
1426
1426
  a.value.sort((s, d) => s.percent - d.percent);
@@ -1440,7 +1440,7 @@ const It = { key: 1 }, Vt = {
1440
1440
  }
1441
1441
  te.value.style.backgroundImage = e;
1442
1442
  let i = (t = u.value) == null ? void 0 : t.querySelector("#ck-cp-target-background");
1443
- i && (i.style.backgroundImage = l, F.value && p(i.style.backgroundImage));
1443
+ i && (i.style.backgroundImage = l, N.value && p(i.style.backgroundImage));
1444
1444
  } else {
1445
1445
  const { r: e, g: l, b: i, a: s } = a.value[0];
1446
1446
  let d = "";
@@ -1465,7 +1465,7 @@ const It = { key: 1 }, Vt = {
1465
1465
  t.hue = Ae(t.r, t.g, t.b);
1466
1466
  });
1467
1467
  }, Le = (t) => {
1468
- L.value = t, P();
1468
+ L.value = t, X();
1469
1469
  }, Ge = () => {
1470
1470
  var t, e;
1471
1471
  if (a.value.length > 2) {
@@ -1476,7 +1476,7 @@ const It = { key: 1 }, Vt = {
1476
1476
  const s = (t = u.value) == null ? void 0 : t.querySelector(`#clr-gb-${i}`);
1477
1477
  s == null || s.remove();
1478
1478
  const d = a.value[0];
1479
- d && (d.select = !0, Z = (e = u.value) == null ? void 0 : e.querySelector(`#clr-gb-${d.id}`), Z == null || Z.classList.add("select"), ie(d.r, d.g, d.b, d.hue, !1), b(), P());
1479
+ d && (d.select = !0, Z = (e = u.value) == null ? void 0 : e.querySelector(`#clr-gb-${d.id}`), Z == null || Z.classList.add("select"), ie(d.r, d.g, d.b, d.hue, !1), b(), X());
1480
1480
  }
1481
1481
  }
1482
1482
  }, Ye = () => {
@@ -1496,7 +1496,7 @@ const It = { key: 1 }, Vt = {
1496
1496
  const g = de();
1497
1497
  g && (R.value.style.left = `${g.x}px`, R.value.style.top = `${g.y}px`);
1498
1498
  }
1499
- b(), oe(), P(), t == null || t.classList.remove("active");
1499
+ b(), oe(), X(), t == null || t.classList.remove("active");
1500
1500
  }
1501
1501
  }).catch(() => {
1502
1502
  t == null || t.classList.remove("active");
@@ -1508,23 +1508,23 @@ const It = { key: 1 }, Vt = {
1508
1508
  if (i) {
1509
1509
  i.r = parseInt(e.r), i.g = parseInt(e.g), i.b = parseInt(e.b);
1510
1510
  const s = Ae(i.r, i.g, i.b);
1511
- i.hue = s, ie(i.r, i.g, i.b, i.hue, !0), P(), oe();
1511
+ i.hue = s, ie(i.r, i.g, i.b, i.hue, !0), X(), oe();
1512
1512
  }
1513
1513
  } else
1514
- ne.value = e, P(), oe();
1514
+ ne.value = e, X(), oe();
1515
1515
  }, c = (t) => {
1516
- X.h = t.h, X.s = t.s, X.l = t.l;
1516
+ q.h = t.h, q.s = t.s, q.l = t.l;
1517
1517
  const e = a.value.find((l) => l.select == !0);
1518
- if (e && !Number.isNaN(X.h) && !Number.isNaN(X.s) && !Number.isNaN(X.l)) {
1519
- const { r: l, g: i, b: s } = nt(X.h, X.s / 100, X.l / 100);
1520
- e.hue = X.h, e.r = l, e.g = i, e.b = s, ie(e.r, e.g, e.b, e.hue, !0), P(), oe();
1518
+ if (e && !Number.isNaN(q.h) && !Number.isNaN(q.s) && !Number.isNaN(q.l)) {
1519
+ const { r: l, g: i, b: s } = nt(q.h, q.s / 100, q.l / 100);
1520
+ e.hue = q.h, e.r = l, e.g = i, e.b = s, ie(e.r, e.g, e.b, e.hue, !0), X(), oe();
1521
1521
  }
1522
1522
  }, o = () => {
1523
1523
  if (W.value) {
1524
1524
  const t = je(W.value);
1525
1525
  if (t) {
1526
1526
  const e = Ae(t.r, t.g, t.b), l = a.value.find((i) => i.select == !0);
1527
- l && (l.r = t.r, l.g = t.g, l.b = t.b, l.hue = e, ie(t.r, t.g, t.b, l.hue, !0), P(), oe(), se(M.value));
1527
+ l && (l.r = t.r, l.g = t.g, l.b = t.b, l.hue = e, ie(t.r, t.g, t.b, l.hue, !0), X(), oe(), se(M.value));
1528
1528
  }
1529
1529
  }
1530
1530
  }, b = () => {
@@ -1625,7 +1625,7 @@ const It = { key: 1 }, Vt = {
1625
1625
  break;
1626
1626
  case "HSL": {
1627
1627
  const { h: l, s: i, l: s } = tt(e.r, e.g, e.b);
1628
- X.h = Math.round(l), X.s = Math.round(i * 100), X.l = Math.round(s * 100);
1628
+ q.h = Math.round(l), q.s = Math.round(i * 100), q.l = Math.round(s * 100);
1629
1629
  break;
1630
1630
  }
1631
1631
  }
@@ -1638,26 +1638,26 @@ const It = { key: 1 }, Vt = {
1638
1638
  () => r.modelValue,
1639
1639
  (t, e) => {
1640
1640
  t !== e && t !== C.value && (a.value.forEach((l) => {
1641
- const i = N == null ? void 0 : N.querySelector(`#clr-gb-${l.id}`);
1641
+ const i = P == null ? void 0 : P.querySelector(`#clr-gb-${l.id}`);
1642
1642
  i == null || i.remove();
1643
1643
  }), be(t));
1644
1644
  }
1645
1645
  );
1646
1646
  const Qe = (t) => {
1647
1647
  a.value.forEach((e) => {
1648
- const l = N == null ? void 0 : N.querySelector(`#clr-gb-${e.id}`);
1648
+ const l = P == null ? void 0 : P.querySelector(`#clr-gb-${e.id}`);
1649
1649
  l == null || l.remove();
1650
1650
  }), t !== "solid" ? (y.value = "gradient", setTimeout(() => {
1651
1651
  var e;
1652
- N = (e = u.value) == null ? void 0 : e.querySelector(".gradient-bar"), Le(t), xe();
1652
+ P = (e = u.value) == null ? void 0 : e.querySelector(".gradient-bar"), Le(t), xe();
1653
1653
  }, 200)) : t === "solid" && (y.value = "solid", a.value = a.value.map((e) => (e.select = !1, e)), a.value[0].select = !0, setTimeout(() => {
1654
1654
  be(r.modelValue);
1655
1655
  }, 200));
1656
1656
  };
1657
1657
  return _e(() => {
1658
1658
  var t;
1659
- y.value = r.modelValue.includes("linear") || r.modelValue.includes("radial") ? "gradient" : "solid", y.value == "gradient" && (N = (t = u.value) == null ? void 0 : t.querySelector(".gradient-bar")), be(r.modelValue), se(M.value), mt(() => {
1660
- F.value = !0;
1659
+ y.value = r.modelValue.includes("linear") || r.modelValue.includes("radial") ? "gradient" : "solid", y.value == "gradient" && (P = (t = u.value) == null ? void 0 : t.querySelector(".gradient-bar")), be(r.modelValue), se(M.value), mt(() => {
1660
+ N.value = !0;
1661
1661
  });
1662
1662
  }), (t, e) => (m(), E("div", {
1663
1663
  ref_key: "pickerTemplateRef",
@@ -1693,7 +1693,7 @@ const It = { key: 1 }, Vt = {
1693
1693
  inputType: M.value,
1694
1694
  mode: y.value,
1695
1695
  gradientType: L.value,
1696
- onOnInput: P
1696
+ onOnInput: X
1697
1697
  }, null, 8, ["percentageY", "angle", "percentageX", "inputType", "mode", "gradientType"])
1698
1698
  ])) : (m(), E("div", dl, [
1699
1699
  n.presetColors ? (m(), E("div", cl, [
@@ -1715,7 +1715,7 @@ const It = { key: 1 }, Vt = {
1715
1715
  modelValue: ae.value,
1716
1716
  "onUpdate:modelValue": e[3] || (e[3] = (l) => ae.value = l),
1717
1717
  onOnInput: e[4] || (e[4] = (l) => Ie(!1)),
1718
- onOnChange: Xe
1718
+ onOnChange: qe
1719
1719
  }, null, 8, ["class", "modelValue"]),
1720
1720
  O.value ? (m(), E("button", {
1721
1721
  key: 0,
@@ -1736,7 +1736,7 @@ const It = { key: 1 }, Vt = {
1736
1736
  ], -1)
1737
1737
  ]))) : D("", !0)
1738
1738
  ]),
1739
- n.showAlpha ? (m(), q(jt, {
1739
+ n.showAlpha ? (m(), F(jt, {
1740
1740
  key: 3,
1741
1741
  modelValue: ne.value,
1742
1742
  "onUpdate:modelValue": e[5] || (e[5] = (l) => ne.value = l),
@@ -1750,8 +1750,8 @@ const It = { key: 1 }, Vt = {
1750
1750
  "model-value": M.value,
1751
1751
  "onUpdate:modelValue": se
1752
1752
  }, null, 8, ["model-value"]),
1753
- F.value && n.showInputSet ? (m(), E("div", bl, [
1754
- M.value == "HEX" ? (m(), q(Pt, {
1753
+ N.value && n.showInputSet ? (m(), E("div", bl, [
1754
+ M.value == "HEX" ? (m(), F(Xt, {
1755
1755
  key: 0,
1756
1756
  modelValue: W.value,
1757
1757
  "onUpdate:modelValue": [
@@ -1759,18 +1759,18 @@ const It = { key: 1 }, Vt = {
1759
1759
  o
1760
1760
  ]
1761
1761
  }, null, 8, ["modelValue"])) : D("", !0),
1762
- M.value == "RGB" ? (m(), q(ot, {
1762
+ M.value == "RGB" ? (m(), F(ot, {
1763
1763
  key: 1,
1764
1764
  "rgb-value": a.value.find((l) => l.select == !0),
1765
1765
  onUpdateRgbValue: We
1766
1766
  }, null, 8, ["rgb-value"])) : D("", !0),
1767
- M.value == "HSL" ? (m(), q(ot, {
1767
+ M.value == "HSL" ? (m(), F(ot, {
1768
1768
  key: 2,
1769
1769
  "input-type": "HSL",
1770
- "hsl-value": X,
1770
+ "hsl-value": q,
1771
1771
  onUpdateHslValue: c
1772
1772
  }, null, 8, ["hsl-value"])) : D("", !0),
1773
- n.showAlpha ? (m(), q(qt, {
1773
+ n.showAlpha ? (m(), F(Ft, {
1774
1774
  key: 3,
1775
1775
  modelValue: ne.value,
1776
1776
  "onUpdate:modelValue": [
@@ -1854,9 +1854,9 @@ const It = { key: 1 }, Vt = {
1854
1854
  "tooltip-value-formatter": () => null
1855
1855
  }, null, 8, ["additional-options"]),
1856
1856
  h("div", $l, [
1857
- n.title ? (m(), E("span", wl, Ne(n.title), 1)) : D("", !0),
1857
+ n.title ? (m(), E("span", wl, Pe(n.title), 1)) : D("", !0),
1858
1858
  Ke(y.$slots, "description", {}, () => [
1859
- n.description ? (m(), E("span", Sl, Ne(n.description), 1)) : D("", !0)
1859
+ n.description ? (m(), E("span", Sl, Pe(n.description), 1)) : D("", !0)
1860
1860
  ])
1861
1861
  ])
1862
1862
  ]));
@@ -1868,8 +1868,8 @@ const It = { key: 1 }, Vt = {
1868
1868
  );
1869
1869
  export {
1870
1870
  Al as BarChart,
1871
- Nl as BarRaceChart,
1872
- Xl as Card,
1871
+ Pl as BarRaceChart,
1872
+ ql as Card,
1873
1873
  Ml as CodeBlock,
1874
1874
  Vt as ColorPicker,
1875
1875
  xl as ColorPickerPopup,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchidui/dashboard",
3
3
  "description": "Orchid Dashboard UI , Dashboard Ui Library Vue 3 tailwind css",
4
- "version": "1.8.1-133",
4
+ "version": "1.8.1-135",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "vite build"