@orchidui/dashboard 1.9.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +236 -231
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
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 We = (n, V, r) => gt(n, typeof V != "symbol" ? V + "" : V, r);
4
- import { ref as v, computed as ke, openBlock as m, createBlock as X, unref as w, normalizeClass as A, withCtx as W, createVNode as T, createCommentVNode as D, createSlots as vt, renderSlot as ze, createElementBlock as E, normalizeStyle as te, onMounted as Je, createElementVNode as h, Fragment as ge, renderList as Ke, toDisplayString as Fe, createTextVNode as ve, watch as we, withKeys as ot, inject as Re, reactive as _e, provide as Be, nextTick as mt, withDirectives as ft, vShow as ht, defineComponent as bt, defineAsyncComponent as it } from "vue";
4
+ import { ref as v, computed as $e, openBlock as m, createBlock as X, unref as w, normalizeClass as Q, withCtx as W, createVNode as T, createCommentVNode as D, createSlots as vt, renderSlot as ze, createElementBlock as E, normalizeStyle as te, onMounted as Je, watch as fe, createElementVNode as h, Fragment as ge, renderList as Ke, toDisplayString as Fe, createTextVNode as ve, withKeys as ot, inject as Re, reactive as _e, provide as Be, nextTick as mt, withDirectives as ft, vShow as ht, defineComponent as bt, defineAsyncComponent as it } from "vue";
5
5
  import { Q as Y, a as yt } from "./QuillEditor-BHWfmp5D.js";
6
- import { BaseInput as st, Dropdown as rt, Input as $e, Icon as Q, Modal as xt, Select as Ze, Slider as Qe } from "@orchidui/core";
7
- import { hslToRgb as et, hsl2Hex as tt, rgb2Hex as lt, rgbaToHex8 as kt, hexToRgb as je, rgbToHue as Ae, rgbToHsl as at, hex8ToRgba as $t, parseRgba as wt, parseRgb as St } from "./Dashboard/ColorPicker/components/converters.js";
6
+ import { BaseInput as st, Dropdown as rt, Input as we, Icon as A, Modal as xt, Select as Ze, Slider as Ae } from "@orchidui/core";
7
+ import { hslToRgb as et, hsl2Hex as tt, rgb2Hex as lt, rgbaToHex8 as kt, hexToRgb as je, rgbToHue as Qe, rgbToHsl as at, 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
- import { BarChart as Ql } from "./Dashboard/Charts/BarChart/OcBarChart.js";
10
+ import { BarChart as Al } from "./Dashboard/Charts/BarChart/OcBarChart.js";
11
11
  import { BarRaceChart as Nl } from "./Dashboard/Charts/BarRaceChart/OcBarRaceChart.js";
12
12
  import { _ as Xl } from "./OcCard-w0EuBfr4.js";
13
13
  const It = { key: 1 }, Vt = {
@@ -35,7 +35,7 @@ const It = { key: 1 }, Vt = {
35
35
  setup(n, { emit: V }) {
36
36
  const r = n, b = V, u = v(!1), f = v(r.modelValue), C = (M) => {
37
37
  M && (f.value = M, b("update:model-value", M));
38
- }, c = ke(() => r.variant === "gradient" ? {
38
+ }, p = $e(() => r.variant === "gradient" ? {
39
39
  class: "w-[20px] h-[20px] hide-svg-icon",
40
40
  style: {
41
41
  background: f.value
@@ -65,7 +65,7 @@ const It = { key: 1 }, Vt = {
65
65
  f.value = M, b("update:model-value", M), u.value = !1;
66
66
  };
67
67
  return (M, F) => (m(), X(w(st), {
68
- class: A(n.hideInputColor ? "w-[40px]" : ""),
68
+ class: Q(n.hideInputColor ? "w-[40px]" : ""),
69
69
  onClick: F[1] || (F[1] = () => {
70
70
  var U;
71
71
  return (U = a.value) == null ? void 0 : U.toggleDropdown();
@@ -81,7 +81,10 @@ const It = { key: 1 }, Vt = {
81
81
  L
82
82
  ],
83
83
  "max-menu-height": 800,
84
- placement: n.placement
84
+ placement: n.placement,
85
+ "popper-options": {
86
+ strategy: "fixed"
87
+ }
85
88
  }, {
86
89
  menu: W(() => [
87
90
  B.value ? D("", !0) : (m(), X(w(xl), {
@@ -99,17 +102,17 @@ const It = { key: 1 }, Vt = {
99
102
  default: W(() => [
100
103
  n.hideInputColor ? (m(), E("div", It, [
101
104
  ze(M.$slots, "picker-icon", {}, () => [
102
- T(w(Q), {
105
+ T(w(A), {
103
106
  class: "cursor-pointer",
104
107
  style: te(`color: ${f.value}`),
105
108
  name: "drop"
106
109
  }, null, 8, ["style"])
107
110
  ])
108
- ])) : (m(), X(w($e), {
111
+ ])) : (m(), X(w(we), {
109
112
  key: 0,
110
113
  "model-value": f.value,
111
114
  icon: "drop",
112
- "icon-props": c.value,
115
+ "icon-props": p.value,
113
116
  placeholder: "#FFFFFF",
114
117
  "onUpdate:modelValue": C
115
118
  }, vt({ _: 2 }, [
@@ -128,7 +131,7 @@ const It = { key: 1 }, Vt = {
128
131
  _: 3
129
132
  }, 8, ["class"]));
130
133
  }
131
- }, 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" }, At = { class: "grid cursor-pointer px-5" }, Qt = {
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 = {
132
135
  key: 5,
133
136
  class: "flex gap-x-3 items-center px-5"
134
137
  }, Ft = { class: "flex" }, Nt = { class: "mt-1 mx-2 cursor-pointer" }, Rl = {
@@ -197,10 +200,10 @@ const It = { key: 1 }, Vt = {
197
200
  "alignment"
198
201
  ],
199
202
  "text-only": ["changes", "font-size", "font-style", "link", "quote", "list", "alignment"]
200
- }, f = ke(() => u[r.variant]), C = Y.import("attributors/style/size");
201
- C.whitelist = r.fontSizes.map((p) => p.value), Y.register(C, !0);
202
- const c = Y.import("attributors/style/align");
203
- Y.register(c, !0);
203
+ }, f = $e(() => u[r.variant]), C = Y.import("attributors/style/size");
204
+ C.whitelist = r.fontSizes.map((c) => c.value), Y.register(C, !0);
205
+ const p = Y.import("attributors/style/align");
206
+ Y.register(p, !0);
204
207
  const a = Y.import("attributors/style/background");
205
208
  Y.register(a, !0);
206
209
  const H = Y.import("attributors/style/color");
@@ -215,112 +218,114 @@ const It = { key: 1 }, Vt = {
215
218
  We(B, "blotName", "divider"), We(B, "tagName", "hr"), Y.register(B);
216
219
  const j = v(
217
220
  Math.random().toString(36).replace(/[^a-zA-Z]+/g, "")
218
- ), M = v(!1), F = v(!1), U = v(!1), le = v(!1), J = v(!1), z = v(!1), R = v(!1), N = v(""), ae = v(""), ee = v(""), x = v(), Se = v(!1), ue = v(r.image), ie = (p) => {
219
- 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, le.value = x.value.getQuill().getFormat().italic, J.value = x.value.getQuill().getFormat().underline, R.value = x.value.getQuill().getFormat().blockquote, ae.value = x.value.getQuill().getFormat().list, ee.value = x.value.getQuill().getFormat().align;
221
+ ), M = v(!1), F = v(!1), U = v(!1), le = v(!1), J = v(!1), z = v(!1), R = v(!1), N = v(""), ae = v(""), ee = v(""), y = v(), Se = v(!1), ue = v(r.image), ie = (c) => {
222
+ console.log(c, 123), M.value = y.value.getQuill().history.stack.undo.length > 0, F.value = y.value.getQuill().history.stack.redo.length > 0, U.value = y.value.getQuill().getFormat().bold, le.value = y.value.getQuill().getFormat().italic, J.value = y.value.getQuill().getFormat().underline, R.value = y.value.getQuill().getFormat().blockquote, ae.value = y.value.getQuill().getFormat().list, ee.value = y.value.getQuill().getFormat().align;
220
223
  let o = document.createElement("div");
221
- o.innerHTML = p, Se.value && (o.innerText ? b("update:modelValue", p || "") : b("update:modelValue", ""), o.remove());
224
+ o.innerHTML = c, Se.value && (o.innerText ? b("update:modelValue", c || "") : b("update:modelValue", ""), o.remove());
222
225
  }, Ne = () => {
223
- if (x.value.getQuill().getSelection(!0)) {
224
- const o = x.value.getQuill().getSelection(!0);
225
- x.value.getQuill().insertText(o.index, `
226
- `, Y.sources.USER), x.value.getQuill().insertEmbed(o.index + 1, "divider", !0, Y.sources.USER), x.value.getQuill().setSelection(o.index + 2, Y.sources.SILENT);
226
+ if (y.value.getQuill().getSelection(!0)) {
227
+ const o = y.value.getQuill().getSelection(!0);
228
+ y.value.getQuill().insertText(o.index, `
229
+ `, Y.sources.USER), y.value.getQuill().insertEmbed(o.index + 1, "divider", !0, Y.sources.USER), y.value.getQuill().setSelection(o.index + 2, Y.sources.SILENT);
227
230
  }
228
231
  }, Ee = () => {
229
- x.value.getQuill().history.undo(), ie(r.modelValue);
232
+ y.value.getQuill().history.undo(), ie(r.modelValue);
230
233
  }, Me = () => {
231
- x.value.getQuill().history.redo(), ie(r.modelValue);
234
+ y.value.getQuill().history.redo(), ie(r.modelValue);
232
235
  }, Ce = () => {
233
- var p;
234
- x.value.getQuill().format("bold", !U.value), (p = x.value.getQuill().getSelection()) != null && p.length || (U.value = !U.value);
236
+ var c;
237
+ y.value.getQuill().format("bold", !U.value), (c = y.value.getQuill().getSelection()) != null && c.length || (U.value = !U.value);
235
238
  }, ne = () => {
236
- var p;
237
- x.value.getQuill().format("italic", !le.value), (p = x.value.getQuill().getSelection()) != null && p.length || (le.value = !le.value);
239
+ var c;
240
+ y.value.getQuill().format("italic", !le.value), (c = y.value.getQuill().getSelection()) != null && c.length || (le.value = !le.value);
238
241
  }, Ie = () => {
239
- var p;
240
- x.value.getQuill().format("underline", !J.value), (p = x.value.getQuill().getSelection()) != null && p.length || (J.value = !J.value);
241
- }, Ue = (p) => {
242
- x.value.getQuill().format("size", p), N.value = p, z.value = !1;
242
+ var c;
243
+ y.value.getQuill().format("underline", !J.value), (c = y.value.getQuill().getSelection()) != null && c.length || (J.value = !J.value);
244
+ }, Ue = (c) => {
245
+ y.value.getQuill().format("size", c), N.value = c, z.value = !1;
243
246
  }, me = () => {
244
- const p = x.value.getQuill().getSelection();
245
- p && p.length > 0 && x.value.getQuill().theme.tooltip.edit();
247
+ const c = y.value.getQuill().getSelection();
248
+ c && c.length > 0 && y.value.getQuill().theme.tooltip.edit();
246
249
  }, Pe = () => {
247
- x.value.getQuill().format("blockquote", !R.value);
248
- }, oe = (p) => {
249
- const o = x.value.getQuill().getSelection();
250
- o && (x.value.getQuill().clipboard.dangerouslyPasteHTML(o.index, `<img src="${p}" />`), ue.value = p, b("update:image", ue.value));
250
+ y.value.getQuill().format("blockquote", !R.value);
251
+ }, oe = (c) => {
252
+ const o = y.value.getQuill().getSelection();
253
+ o && (y.value.getQuill().clipboard.dangerouslyPasteHTML(o.index, `<img src="${c}" />`), ue.value = c, b("update:image", ue.value));
251
254
  }, De = () => {
252
- x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1);
253
- const p = document.createElement("input");
254
- p.type = "file", p.accept = "jpg,.jpeg,.png,.webp,.gif", p.onchange = () => {
255
- const o = p.files[0], y = new FileReader();
256
- y.onload = () => oe(y.result), y.readAsDataURL(o);
257
- }, p.click();
258
- }, He = (p) => /^data:image\/(png|jpg|jpeg|gif);base64,/.test(p), P = (p) => {
255
+ y.value.getQuill().getSelection() || y.value.getQuill().setSelection(y.value.getQuill().getLength() - 1);
256
+ const c = document.createElement("input");
257
+ c.type = "file", c.accept = "jpg,.jpeg,.png,.webp,.gif", c.onchange = () => {
258
+ const o = c.files[0], x = new FileReader();
259
+ x.onload = () => oe(x.result), x.readAsDataURL(o);
260
+ }, c.click();
261
+ }, He = (c) => /^data:image\/(png|jpg|jpeg|gif);base64,/.test(c), P = (c) => {
259
262
  setTimeout(() => {
260
- var y;
261
- if (p) {
262
- const G = x.value.getHTML(), se = document.createElement("div");
263
+ var x;
264
+ if (c) {
265
+ const G = y.value.getHTML(), se = document.createElement("div");
263
266
  se.innerHTML = G;
264
- let ye = se.getElementsByTagName("img");
265
- if (ye && ye.length > 0)
266
- for (let pe = 0; pe < ye.length; pe++) {
267
- const xe = (y = ye[pe]) == null ? void 0 : y.getAttribute("src");
268
- He(xe) && b("update:image", xe);
267
+ let xe = se.getElementsByTagName("img");
268
+ if (xe && xe.length > 0)
269
+ for (let pe = 0; pe < xe.length; pe++) {
270
+ const ke = (x = xe[pe]) == null ? void 0 : x.getAttribute("src");
271
+ He(ke) && b("update:image", ke);
269
272
  }
270
273
  }
271
274
  }, 100);
272
- const { items: o } = p.clipboardData;
273
- o.length && o[0].getAsString((y) => {
274
- He(y) && (x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1));
275
+ const { items: o } = c.clipboardData;
276
+ o.length && o[0].getAsString((x) => {
277
+ He(x) && (y.value.getQuill().getSelection() || y.value.getQuill().setSelection(y.value.getQuill().getLength() - 1));
275
278
  });
276
279
  }, _ = () => {
277
- x.value.getQuill().theme.tooltip.edit("video");
278
- }, Ve = (p) => {
279
- x.value.getQuill().format("list", p), ae.value = p;
280
- }, fe = (p = void 0) => {
281
- x.value.getQuill().format("align", p), ee.value = p;
280
+ y.value.getQuill().theme.tooltip.edit("video");
281
+ }, Ve = (c) => {
282
+ y.value.getQuill().format("list", c), ae.value = c;
283
+ }, he = (c = void 0) => {
284
+ y.value.getQuill().format("align", c), ee.value = c;
282
285
  }, de = v(""), Xe = () => {
283
- x.value.getQuill().format("color", de.value);
286
+ y.value.getQuill().format("color", de.value);
284
287
  };
285
288
  Je(() => {
286
289
  Ue(r.initialFontSize || r.fontSizes[0].value), Se.value = !0;
287
290
  });
288
- const he = v(100), ce = v(!1), Le = (p) => {
289
- var y, G;
290
- he.value = p;
291
- const o = (y = window.getSelection()) == null ? void 0 : y.focusNode;
292
- o && o.nodeName !== "#text" && (x.value.getQuill().format("width", `${he.value}%`), (G = o == null ? void 0 : o.querySelector("img")) == null || G.setAttribute("style", "margin:auto;display:block;"));
293
- }, be = (p = "left") => {
294
- var y, G;
295
- const o = (y = window.getSelection()) == null ? void 0 : y.focusNode;
291
+ const be = v(100), ce = v(!1), Le = (c) => {
292
+ var x, G;
293
+ be.value = c;
294
+ const o = (x = window.getSelection()) == null ? void 0 : x.focusNode;
295
+ o && o.nodeName !== "#text" && (y.value.getQuill().format("width", `${be.value}%`), (G = o == null ? void 0 : o.querySelector("img")) == null || G.setAttribute("style", "margin:auto;display:block;"));
296
+ }, ye = (c = "left") => {
297
+ var x, G;
298
+ const o = (x = window.getSelection()) == null ? void 0 : x.focusNode;
296
299
  if (o && o.nodeName !== "#text") {
297
300
  let se = "float:left";
298
- p == "center" ? se = "" : p == "right" && (se = "float:right"), (G = o == null ? void 0 : o.querySelector("img")) == null || G.setAttribute("style", `margin:auto;display:block;${se}`);
301
+ c == "center" ? se = "" : c == "right" && (se = "float:right"), (G = o == null ? void 0 : o.querySelector("img")) == null || G.setAttribute("style", `margin:auto;display:block;${se}`);
299
302
  }
300
303
  }, Oe = () => {
301
304
  var o;
302
- const p = (o = window.getSelection()) == null ? void 0 : o.focusNode;
303
- ce.value = p.innerHTML && p.innerHTML.includes("<img");
304
- }, K = v(!1), q = v(3), Te = v(3), qe = ke(() => {
305
- let p = [];
305
+ const c = (o = window.getSelection()) == null ? void 0 : o.focusNode;
306
+ ce.value = c.innerHTML && c.innerHTML.includes("<img");
307
+ }, K = v(!1), q = v(3), Te = v(3), qe = $e(() => {
308
+ let c = [];
306
309
  for (let o = 1; o < 30; o++)
307
- p.push({
310
+ c.push({
308
311
  label: o.toString(),
309
312
  value: o.toString()
310
313
  });
311
- return p;
312
- }), Ge = ke(() => {
313
- let p = [];
314
+ return c;
315
+ }), Ge = $e(() => {
316
+ let c = [];
314
317
  for (let o = 1; o < 12; o++)
315
- p.push({
318
+ c.push({
316
319
  label: o.toString(),
317
320
  value: o.toString()
318
321
  });
319
- return p;
322
+ return c;
320
323
  }), Ye = () => {
321
- x.value.getQuill().getModule("better-table").insertTable(parseInt(q.value), parseInt(Te.value)), K.value = !1;
324
+ y.value.getQuill().getModule("better-table").insertTable(parseInt(q.value), parseInt(Te.value)), K.value = !1;
322
325
  };
323
- return (p, o) => (m(), X(w(st), {
326
+ return fe(() => r.modelValue, (c) => {
327
+ c || y.value.getQuill().setContents([], "silent");
328
+ }), (c, o) => (m(), X(w(st), {
324
329
  label: n.label,
325
330
  hint: n.hint,
326
331
  "error-message": n.errorMessage,
@@ -333,7 +338,7 @@ const It = { key: 1 }, Vt = {
333
338
  T(w(xt), {
334
339
  title: "Insert table",
335
340
  modelValue: K.value,
336
- "onUpdate:modelValue": o[2] || (o[2] = (y) => K.value = y),
341
+ "onUpdate:modelValue": o[2] || (o[2] = (x) => K.value = x),
337
342
  class: "!w-full !h-full",
338
343
  confirmButtonProps: {
339
344
  label: "Save",
@@ -343,14 +348,14 @@ const It = { key: 1 }, Vt = {
343
348
  default: W(() => [
344
349
  T(w(Ze), {
345
350
  modelValue: Te.value,
346
- "onUpdate:modelValue": o[0] || (o[0] = (y) => Te.value = y),
351
+ "onUpdate:modelValue": o[0] || (o[0] = (x) => Te.value = x),
347
352
  options: Ge.value,
348
353
  label: "Table cell",
349
354
  class: "mb-3"
350
355
  }, null, 8, ["modelValue", "options"]),
351
356
  T(w(Ze), {
352
357
  modelValue: q.value,
353
- "onUpdate:modelValue": o[1] || (o[1] = (y) => q.value = y),
358
+ "onUpdate:modelValue": o[1] || (o[1] = (x) => q.value = x),
354
359
  options: qe.value,
355
360
  label: "Table rows"
356
361
  }, null, 8, ["modelValue", "options"])
@@ -358,14 +363,14 @@ const It = { key: 1 }, Vt = {
358
363
  _: 1
359
364
  }, 8, ["modelValue", "confirmButtonProps"]),
360
365
  h("div", {
361
- class: A(["grid", { "has-error": n.errorMessage }]),
366
+ class: Q(["grid", { "has-error": n.errorMessage }]),
362
367
  onClick: Oe
363
368
  }, [
364
369
  j.value ? (m(), X(w(yt), {
365
370
  key: 0,
366
371
  id: `#${j.value}`,
367
372
  ref_key: "quill",
368
- ref: x,
373
+ ref: y,
369
374
  content: n.modelValue,
370
375
  options: {
371
376
  bounds: `#${j.value}`
@@ -384,15 +389,15 @@ const It = { key: 1 }, Vt = {
384
389
  }, [
385
390
  f.value.includes("changes") ? (m(), E(ge, { key: 0 }, [
386
391
  h("div", Tt, [
387
- T(w(Q), {
388
- class: A(M.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
392
+ T(w(A), {
393
+ class: Q(M.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
389
394
  width: "20",
390
395
  height: "20",
391
396
  name: "text-editor/undo",
392
397
  onClick: Ee
393
398
  }, null, 8, ["class"]),
394
- T(w(Q), {
395
- class: A(F.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
399
+ T(w(A), {
400
+ class: Q(F.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
396
401
  width: "20",
397
402
  height: "20",
398
403
  name: "text-editor/redo",
@@ -404,28 +409,28 @@ const It = { key: 1 }, Vt = {
404
409
  f.value.includes("font-size") ? (m(), E(ge, { key: 1 }, [
405
410
  T(w(rt), {
406
411
  modelValue: z.value,
407
- "onUpdate:modelValue": o[3] || (o[3] = (y) => z.value = y),
412
+ "onUpdate:modelValue": o[3] || (o[3] = (x) => z.value = x),
408
413
  class: "px-5"
409
414
  }, {
410
415
  menu: W(() => [
411
416
  h("div", Rt, [
412
- (m(!0), E(ge, null, Ke(n.fontSizes, (y) => (m(), E("div", {
413
- key: y.value,
414
- class: A(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50", N.value === y.value ? "font-medium" : ""]),
415
- onClick: (G) => Ue(y.value)
416
- }, Fe(y.label), 11, Et))), 128))
417
+ (m(!0), E(ge, null, Ke(n.fontSizes, (x) => (m(), E("div", {
418
+ key: x.value,
419
+ class: Q(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50", N.value === x.value ? "font-medium" : ""]),
420
+ onClick: (G) => Ue(x.value)
421
+ }, Fe(x.label), 11, Et))), 128))
417
422
  ])
418
423
  ]),
419
424
  default: W(() => {
420
- var y;
425
+ var x;
421
426
  return [
422
427
  h("div", Bt, [
423
- ve(Fe((y = n.fontSizes.find((G) => G.value === N.value)) == null ? void 0 : y.label) + " ", 1),
424
- T(w(Q), {
428
+ ve(Fe((x = n.fontSizes.find((G) => G.value === N.value)) == null ? void 0 : x.label) + " ", 1),
429
+ T(w(A), {
425
430
  width: "20",
426
431
  height: "20",
427
432
  name: "chevron-down",
428
- class: A(["transition-all", z.value ? "rotate-180" : ""])
433
+ class: Q(["transition-all", z.value ? "rotate-180" : ""])
429
434
  }, null, 8, ["class"])
430
435
  ])
431
436
  ];
@@ -436,22 +441,22 @@ const It = { key: 1 }, Vt = {
436
441
  ], 64)) : D("", !0),
437
442
  f.value.includes("font-style") ? (m(), E(ge, { key: 2 }, [
438
443
  h("div", Mt, [
439
- T(w(Q), {
440
- class: A(["cursor-pointer", U.value ? "text-oc-text" : "text-oc-text-300"]),
444
+ T(w(A), {
445
+ class: Q(["cursor-pointer", U.value ? "text-oc-text" : "text-oc-text-300"]),
441
446
  width: "20",
442
447
  height: "20",
443
448
  name: "text-editor/bold",
444
449
  onClick: Ce
445
450
  }, null, 8, ["class"]),
446
- T(w(Q), {
447
- class: A(["cursor-pointer", le.value ? "text-oc-text" : "text-oc-text-300"]),
451
+ T(w(A), {
452
+ class: Q(["cursor-pointer", le.value ? "text-oc-text" : "text-oc-text-300"]),
448
453
  width: "20",
449
454
  height: "20",
450
455
  name: "text-editor/italic",
451
456
  onClick: ne
452
457
  }, null, 8, ["class"]),
453
- T(w(Q), {
454
- class: A(["cursor-pointer", J.value ? "text-oc-text" : "text-oc-text-300"]),
458
+ T(w(A), {
459
+ class: Q(["cursor-pointer", J.value ? "text-oc-text" : "text-oc-text-300"]),
455
460
  width: "20",
456
461
  height: "20",
457
462
  name: "text-editor/underline",
@@ -461,7 +466,7 @@ const It = { key: 1 }, Vt = {
461
466
  o[18] || (o[18] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
462
467
  ], 64)) : D("", !0),
463
468
  h("div", Ut, [
464
- f.value.includes("link") ? (m(), X(w(Q), {
469
+ f.value.includes("link") ? (m(), X(w(A), {
465
470
  key: 0,
466
471
  class: "cursor-pointer",
467
472
  width: "20",
@@ -469,7 +474,7 @@ const It = { key: 1 }, Vt = {
469
474
  name: "text-editor/link",
470
475
  onClick: me
471
476
  })) : D("", !0),
472
- f.value.includes("image") ? (m(), X(w(Q), {
477
+ f.value.includes("image") ? (m(), X(w(A), {
473
478
  key: 1,
474
479
  class: "cursor-pointer",
475
480
  width: "20",
@@ -477,15 +482,15 @@ const It = { key: 1 }, Vt = {
477
482
  name: "text-editor/image",
478
483
  onClick: De
479
484
  })) : D("", !0),
480
- f.value.includes("quote") ? (m(), X(w(Q), {
485
+ f.value.includes("quote") ? (m(), X(w(A), {
481
486
  key: 2,
482
- class: A(["cursor-pointer", R.value ? "text-oc-text" : "text-oc-text-300"]),
487
+ class: Q(["cursor-pointer", R.value ? "text-oc-text" : "text-oc-text-300"]),
483
488
  width: "20",
484
489
  height: "20",
485
490
  name: "text-editor/quote",
486
491
  onClick: Pe
487
492
  }, null, 8, ["class"])) : D("", !0),
488
- f.value.includes("media") ? (m(), X(w(Q), {
493
+ f.value.includes("media") ? (m(), X(w(A), {
489
494
  key: 3,
490
495
  class: "cursor-pointer",
491
496
  width: "20",
@@ -493,63 +498,63 @@ const It = { key: 1 }, Vt = {
493
498
  name: "text-editor/media",
494
499
  onClick: _
495
500
  })) : D("", !0),
496
- T(w(Q), {
501
+ T(w(A), {
497
502
  class: "cursor-pointer",
498
503
  width: "20",
499
504
  height: "20",
500
505
  name: "table",
501
- onClick: o[4] || (o[4] = (y) => K.value = !K.value)
506
+ onClick: o[4] || (o[4] = (x) => K.value = !K.value)
502
507
  })
503
508
  ]),
504
509
  f.value.includes("list") ? (m(), E(ge, { key: 3 }, [
505
510
  o[19] || (o[19] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
506
511
  h("div", Dt, [
507
- T(w(Q), {
508
- class: A(["cursor-pointer", ae.value === "bullet" ? "text-oc-text" : "text-oc-text-300"]),
512
+ T(w(A), {
513
+ class: Q(["cursor-pointer", ae.value === "bullet" ? "text-oc-text" : "text-oc-text-300"]),
509
514
  width: "20",
510
515
  height: "20",
511
516
  name: "text-editor/bullet",
512
- onClick: o[5] || (o[5] = (y) => Ve("bullet"))
517
+ onClick: o[5] || (o[5] = (x) => Ve("bullet"))
513
518
  }, null, 8, ["class"]),
514
- T(w(Q), {
515
- class: A(["cursor-pointer", ae.value === "ordered" ? "text-oc-text" : "text-oc-text-300"]),
519
+ T(w(A), {
520
+ class: Q(["cursor-pointer", ae.value === "ordered" ? "text-oc-text" : "text-oc-text-300"]),
516
521
  width: "20",
517
522
  height: "20",
518
523
  name: "text-editor/number",
519
- onClick: o[6] || (o[6] = (y) => Ve("ordered"))
524
+ onClick: o[6] || (o[6] = (x) => Ve("ordered"))
520
525
  }, null, 8, ["class"])
521
526
  ])
522
527
  ], 64)) : D("", !0),
523
528
  f.value.includes("alignment") ? (m(), E(ge, { key: 4 }, [
524
529
  o[20] || (o[20] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
525
530
  h("div", Ht, [
526
- T(w(Q), {
527
- class: A(["cursor-pointer", ee.value ? "text-oc-text-300" : "text-oc-text"]),
531
+ T(w(A), {
532
+ class: Q(["cursor-pointer", ee.value ? "text-oc-text-300" : "text-oc-text"]),
528
533
  width: "20",
529
534
  height: "20",
530
535
  name: "text-editor/left",
531
- onClick: o[7] || (o[7] = (y) => fe())
536
+ onClick: o[7] || (o[7] = (x) => he())
532
537
  }, null, 8, ["class"]),
533
- T(w(Q), {
534
- class: A(["cursor-pointer", ee.value === "center" ? "text-oc-text" : "text-oc-text-300"]),
538
+ T(w(A), {
539
+ class: Q(["cursor-pointer", ee.value === "center" ? "text-oc-text" : "text-oc-text-300"]),
535
540
  width: "20",
536
541
  height: "20",
537
542
  name: "text-editor/center",
538
- onClick: o[8] || (o[8] = (y) => fe("center"))
543
+ onClick: o[8] || (o[8] = (x) => he("center"))
539
544
  }, null, 8, ["class"]),
540
- T(w(Q), {
541
- class: A(["cursor-pointer", ee.value === "right" ? "text-oc-text" : "text-oc-text-300"]),
545
+ T(w(A), {
546
+ class: Q(["cursor-pointer", ee.value === "right" ? "text-oc-text" : "text-oc-text-300"]),
542
547
  width: "20",
543
548
  height: "20",
544
549
  name: "text-editor/right",
545
- onClick: o[9] || (o[9] = (y) => fe("right"))
550
+ onClick: o[9] || (o[9] = (x) => he("right"))
546
551
  }, null, 8, ["class"]),
547
- T(w(Q), {
548
- class: A(["cursor-pointer", ee.value === "justify" ? "text-oc-text" : "text-oc-text-300"]),
552
+ T(w(A), {
553
+ class: Q(["cursor-pointer", ee.value === "justify" ? "text-oc-text" : "text-oc-text-300"]),
549
554
  width: "20",
550
555
  height: "20",
551
556
  name: "text-editor/justify",
552
- onClick: o[10] || (o[10] = (y) => fe("justify"))
557
+ onClick: o[10] || (o[10] = (x) => he("justify"))
553
558
  }, null, 8, ["class"])
554
559
  ])
555
560
  ], 64)) : D("", !0),
@@ -558,13 +563,13 @@ const It = { key: 1 }, Vt = {
558
563
  T(w(Vt), {
559
564
  modelValue: de.value,
560
565
  "onUpdate:modelValue": [
561
- o[11] || (o[11] = (y) => de.value = y),
566
+ o[11] || (o[11] = (x) => de.value = x),
562
567
  Xe
563
568
  ],
564
569
  "hide-input-color": ""
565
570
  }, {
566
571
  "picker-icon": W(() => [
567
- h("div", At, [
572
+ h("div", Qt, [
568
573
  h("div", {
569
574
  style: te(`color:${de.value}`)
570
575
  }, "A", 4),
@@ -578,36 +583,36 @@ const It = { key: 1 }, Vt = {
578
583
  }, 8, ["modelValue"])
579
584
  ]),
580
585
  o[23] || (o[23] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
581
- ce.value ? (m(), E("div", Qt, [
582
- T(w(Qe), {
586
+ ce.value ? (m(), E("div", At, [
587
+ T(w(Ae), {
583
588
  label: "Image width",
584
589
  class: "w-[120px]",
585
- "model-value": he.value,
590
+ "model-value": be.value,
586
591
  "min-limit": 0,
587
592
  "max-limit": 100,
588
593
  "onUpdate:modelValue": Le
589
594
  }, null, 8, ["model-value"]),
590
595
  h("div", Ft, [
591
- T(w(Q), {
596
+ T(w(A), {
592
597
  class: "cursor-pointer",
593
598
  width: "20",
594
599
  height: "20",
595
600
  name: "text-editor/left",
596
- onClick: o[12] || (o[12] = (y) => be())
601
+ onClick: o[12] || (o[12] = (x) => ye())
597
602
  }),
598
- T(w(Q), {
603
+ T(w(A), {
599
604
  class: "cursor-pointer",
600
605
  width: "20",
601
606
  height: "20",
602
607
  name: "text-editor/center",
603
- onClick: o[13] || (o[13] = (y) => be("center"))
608
+ onClick: o[13] || (o[13] = (x) => ye("center"))
604
609
  }),
605
- T(w(Q), {
610
+ T(w(A), {
606
611
  class: "cursor-pointer",
607
612
  width: "20",
608
613
  height: "20",
609
614
  name: "text-editor/right",
610
- onClick: o[14] || (o[14] = (y) => be("right"))
615
+ onClick: o[14] || (o[14] = (x) => ye("right"))
611
616
  })
612
617
  ])
613
618
  ])) : D("", !0),
@@ -618,7 +623,7 @@ const It = { key: 1 }, Vt = {
618
623
  viewBox: "0 0 15 15",
619
624
  fill: "none",
620
625
  xmlns: "http://www.w3.org/2000/svg",
621
- onClick: o[15] || (o[15] = (y) => Ne())
626
+ onClick: o[15] || (o[15] = (x) => Ne())
622
627
  }, o[21] || (o[21] = [
623
628
  h("path", {
624
629
  "fill-rule": "evenodd",
@@ -648,16 +653,16 @@ const It = { key: 1 }, Vt = {
648
653
  "update:modelValue": []
649
654
  },
650
655
  setup(n, { emit: V }) {
651
- const r = n, b = V, u = v(""), f = (c) => {
652
- u.value = c, u.value = `#${c.replace(/#/g, "")}`;
656
+ const r = n, b = V, u = v(""), f = (p) => {
657
+ u.value = p, u.value = `#${p.replace(/#/g, "")}`;
653
658
  }, C = () => {
654
- let c = u.value;
655
- if (c === r.modelValue) return;
656
- if (!/^#[0-9a-fA-F]+$/.test(c)) {
659
+ let p = u.value;
660
+ if (p === r.modelValue) return;
661
+ if (!/^#[0-9a-fA-F]+$/.test(p)) {
657
662
  u.value = r.modelValue;
658
663
  return;
659
664
  }
660
- let a = c.replace(/#/g, "");
665
+ let a = p.replace(/#/g, "");
661
666
  switch (a.length) {
662
667
  case 0:
663
668
  a = r.modelValue.replace("#", "");
@@ -678,13 +683,13 @@ const It = { key: 1 }, Vt = {
678
683
  }
679
684
  u.value = `#${a.toUpperCase()}`, b("update:modelValue", u.value);
680
685
  };
681
- return we(
686
+ return fe(
682
687
  () => r.modelValue,
683
- (c, a) => {
684
- c !== a && (u.value = c);
688
+ (p, a) => {
689
+ p !== a && (u.value = p);
685
690
  },
686
691
  { immediate: !0 }
687
- ), (c, a) => (m(), X(w($e), {
692
+ ), (p, a) => (m(), X(w(we), {
688
693
  class: "w-[158px]",
689
694
  placeholder: "#FFFFFF",
690
695
  "model-value": u.value,
@@ -716,7 +721,7 @@ const It = { key: 1 }, Vt = {
716
721
  r: 0,
717
722
  g: 0,
718
723
  b: 0
719
- }), f = v(), C = v(), c = v(), a = (O, L) => {
724
+ }), f = v(), C = v(), p = v(), a = (O, L) => {
720
725
  var j, M, F;
721
726
  let B = 255;
722
727
  if (r.inputType == "HSL" && (B = 100, O == "r" && (B = 360)), !isNaN(parseInt(L))) {
@@ -728,7 +733,7 @@ const It = { key: 1 }, Vt = {
728
733
  U <= B && (u.value.g = U, r.inputType == "RGB" ? H("g") : Z()), (M = C.value) == null || M.focus();
729
734
  } else if (O == "b") {
730
735
  let U = parseInt(L);
731
- U <= B && (u.value.b = U, r.inputType == "RGB" ? H("b") : Z()), (F = c.value) == null || F.focus();
736
+ U <= B && (u.value.b = U, r.inputType == "RGB" ? H("b") : Z()), (F = p.value) == null || F.focus();
732
737
  }
733
738
  }
734
739
  }, H = (O) => {
@@ -747,13 +752,13 @@ const It = { key: 1 }, Vt = {
747
752
  l: parseInt(u.value.b)
748
753
  });
749
754
  };
750
- return r.inputType === "RGB" ? we(
755
+ return r.inputType === "RGB" ? fe(
751
756
  () => r.rgbValue,
752
757
  (O, L) => {
753
758
  O !== L && (u.value = O);
754
759
  },
755
760
  { immediate: !0, deep: !0 }
756
- ) : we(
761
+ ) : fe(
757
762
  () => r.hslValue,
758
763
  (O) => {
759
764
  u.value = {
@@ -764,23 +769,23 @@ const It = { key: 1 }, Vt = {
764
769
  },
765
770
  { immediate: !0, deep: !0 }
766
771
  ), (O, L) => (m(), E("div", Xt, [
767
- T(w($e), {
772
+ T(w(we), {
768
773
  ref_key: "rInputEl",
769
774
  ref: f,
770
775
  "model-value": u.value.r,
771
776
  placeholder: "100",
772
777
  "onUpdate:modelValue": L[0] || (L[0] = (B) => a("r", B))
773
778
  }, null, 8, ["model-value"]),
774
- T(w($e), {
779
+ T(w(we), {
775
780
  ref_key: "gInputEl",
776
781
  ref: C,
777
782
  "model-value": u.value.g,
778
783
  placeholder: "100",
779
784
  "onUpdate:modelValue": L[1] || (L[1] = (B) => a("g", B))
780
785
  }, null, 8, ["model-value"]),
781
- T(w($e), {
786
+ T(w(we), {
782
787
  ref_key: "bInputEl",
783
- ref: c,
788
+ ref: p,
784
789
  "model-value": u.value.b,
785
790
  placeholder: "100",
786
791
  "onUpdate:modelValue": L[2] || (L[2] = (B) => a("b", B))
@@ -798,19 +803,19 @@ const It = { key: 1 }, Vt = {
798
803
  "update:modelValue": []
799
804
  },
800
805
  setup(n, { emit: V }) {
801
- const r = n, b = V, u = v(""), f = (c) => {
802
- u.value = c;
806
+ const r = n, b = V, u = v(""), f = (p) => {
807
+ u.value = p;
803
808
  }, C = () => {
804
- let c = parseInt(u.value);
805
- c && c <= 100 ? b("update:modelValue", c) : u.value = r.modelValue;
809
+ let p = parseInt(u.value);
810
+ p && p <= 100 ? b("update:modelValue", p) : u.value = r.modelValue;
806
811
  };
807
- return we(
812
+ return fe(
808
813
  () => r.modelValue,
809
- (c, a) => {
810
- c !== a && (u.value = c);
814
+ (p, a) => {
815
+ p !== a && (u.value = p);
811
816
  },
812
817
  { immediate: !0 }
813
- ), (c, a) => (m(), X(w($e), {
818
+ ), (p, a) => (m(), X(w(we), {
814
819
  class: "w-[75px]",
815
820
  placeholder: "100",
816
821
  "model-value": u.value,
@@ -834,7 +839,7 @@ const It = { key: 1 }, Vt = {
834
839
  const b = v(n.modelValue), u = V, f = (C) => {
835
840
  b.value = C, u("update:model-value", C);
836
841
  };
837
- return (C, c) => (m(), X(w(Ze), {
842
+ return (C, p) => (m(), X(w(Ze), {
838
843
  class: "!w-[80px]",
839
844
  "model-value": b.value,
840
845
  options: [
@@ -888,16 +893,16 @@ const It = { key: 1 }, Vt = {
888
893
  setup(n, { emit: V }) {
889
894
  const r = Re("gradientBar"), b = v(), u = V, f = (L) => {
890
895
  L.preventDefault();
891
- }, C = v("left:0"), c = v(!1), a = (L) => {
896
+ }, C = v("left:0"), p = v(!1), a = (L) => {
892
897
  u("onMouseDown", L);
893
898
  }, H = () => {
894
899
  let L = b.value.querySelector(".select");
895
900
  C.value = L == null ? void 0 : L.getAttribute("style");
896
901
  }, Z = () => {
897
902
  var B;
898
- H(), (((B = b.value.querySelectorAll(".gradient-handle")) == null ? void 0 : B.length) ?? 2) > 2 ? c.value = !0 : c.value = !1;
903
+ H(), (((B = b.value.querySelectorAll(".gradient-handle")) == null ? void 0 : B.length) ?? 2) > 2 ? p.value = !0 : p.value = !1;
899
904
  }, O = (L) => {
900
- c.value = !1, u("onAddColor", L);
905
+ p.value = !1, u("onAddColor", L);
901
906
  };
902
907
  return (L, B) => (m(), E("div", {
903
908
  ref_key: "gradientSlider",
@@ -907,18 +912,18 @@ const It = { key: 1 }, Vt = {
907
912
  }, [
908
913
  h("button", {
909
914
  type: "button",
910
- class: A(["absolute top-[-18px] text-oc-accent-3 rounded-[4px] border-2 border-oc-gray-200 p-2 bg-oc-bg-light", c.value ? "" : "!hidden"]),
915
+ class: Q(["absolute top-[-18px] text-oc-accent-3 rounded-[4px] border-2 border-oc-gray-200 p-2 bg-oc-bg-light", p.value ? "" : "!hidden"]),
911
916
  style: te(C.value),
912
917
  onClick: B[0] || (B[0] = (j) => L.$emit("onDeleteColor"))
913
918
  }, [
914
- T(w(Q), {
919
+ T(w(A), {
915
920
  name: "bin",
916
921
  width: "14",
917
922
  height: "14"
918
923
  })
919
924
  ], 6),
920
925
  h("div", {
921
- class: A(["gradient-bar", {
926
+ class: Q(["gradient-bar", {
922
927
  "mt-[20px]": n.gradientType === "linear",
923
928
  "mt-[12px]": n.gradientType === "radial"
924
929
  }]),
@@ -978,9 +983,9 @@ const It = { key: 1 }, Vt = {
978
983
  Je(() => {
979
984
  r.value = !0, b.value = !0;
980
985
  });
981
- const u = V, f = (C, c) => {
986
+ const u = V, f = (C, p) => {
982
987
  let a = parseInt(C);
983
- switch (c) {
988
+ switch (p) {
984
989
  case "angle":
985
990
  C > 360 ? a = 360 : C < 0 && (a = 0), u("update:angle", a), u("onInput");
986
991
  break;
@@ -992,51 +997,51 @@ const It = { key: 1 }, Vt = {
992
997
  break;
993
998
  }
994
999
  };
995
- return (C, c) => (m(), E("div", el, [
996
- n.gradientType == "linear" && r.value ? (m(), X(w(Qe), {
1000
+ return (C, p) => (m(), E("div", el, [
1001
+ n.gradientType == "linear" && r.value ? (m(), X(w(Ae), {
997
1002
  key: 0,
998
1003
  label: "Angle",
999
1004
  "model-value": n.angle,
1000
1005
  "min-limit": 0,
1001
1006
  "max-limit": 360,
1002
- "onUpdate:modelValue": c[0] || (c[0] = (a) => f(a, "angle"))
1007
+ "onUpdate:modelValue": p[0] || (p[0] = (a) => f(a, "angle"))
1003
1008
  }, {
1004
- "min-limit-label": W(() => c[3] || (c[3] = [
1009
+ "min-limit-label": W(() => p[3] || (p[3] = [
1005
1010
  ve("0 ")
1006
1011
  ])),
1007
- "max-limit-label": W(() => c[4] || (c[4] = [
1012
+ "max-limit-label": W(() => p[4] || (p[4] = [
1008
1013
  ve("360"),
1009
1014
  h("span", null, "°", -1)
1010
1015
  ])),
1011
1016
  _: 1
1012
1017
  }, 8, ["model-value"])) : D("", !0),
1013
1018
  n.gradientType == "radial" && b.value ? (m(), E("div", tl, [
1014
- T(w(Qe), {
1019
+ T(w(Ae), {
1015
1020
  label: "Position X",
1016
1021
  "model-value": n.percentageX,
1017
1022
  "min-limit": 0,
1018
1023
  "max-limit": 100,
1019
- "onUpdate:modelValue": c[1] || (c[1] = (a) => f(a, "percentageX"))
1024
+ "onUpdate:modelValue": p[1] || (p[1] = (a) => f(a, "percentageX"))
1020
1025
  }, {
1021
- "min-limit-label": W(() => c[5] || (c[5] = [
1026
+ "min-limit-label": W(() => p[5] || (p[5] = [
1022
1027
  ve("0")
1023
1028
  ])),
1024
- "max-limit-label": W(() => c[6] || (c[6] = [
1029
+ "max-limit-label": W(() => p[6] || (p[6] = [
1025
1030
  ve("100%")
1026
1031
  ])),
1027
1032
  _: 1
1028
1033
  }, 8, ["model-value"]),
1029
- T(w(Qe), {
1034
+ T(w(Ae), {
1030
1035
  label: "Position Y",
1031
1036
  "model-value": n.percentageY,
1032
1037
  "min-limit": 0,
1033
1038
  "max-limit": 100,
1034
- "onUpdate:modelValue": c[2] || (c[2] = (a) => f(a, "percentageY"))
1039
+ "onUpdate:modelValue": p[2] || (p[2] = (a) => f(a, "percentageY"))
1035
1040
  }, {
1036
- "min-limit-label": W(() => c[7] || (c[7] = [
1041
+ "min-limit-label": W(() => p[7] || (p[7] = [
1037
1042
  ve("0")
1038
1043
  ])),
1039
- "max-limit-label": W(() => c[8] || (c[8] = [
1044
+ "max-limit-label": W(() => p[8] || (p[8] = [
1040
1045
  ve("100%")
1041
1046
  ])),
1042
1047
  _: 1
@@ -1055,7 +1060,7 @@ const It = { key: 1 }, Vt = {
1055
1060
  ref_key: "pickerWrap",
1056
1061
  ref: r,
1057
1062
  class: "cp-picker-wrap",
1058
- onMousedown: C[0] || (C[0] = (c) => f.$emit("onMouseDown", c)),
1063
+ onMousedown: C[0] || (C[0] = (p) => f.$emit("onMouseDown", p)),
1059
1064
  onDragstart: u
1060
1065
  }, [
1061
1066
  h("canvas", {
@@ -1101,7 +1106,7 @@ const It = { key: 1 }, Vt = {
1101
1106
  return (V, r) => (m(), E("div", nl, [
1102
1107
  h("button", {
1103
1108
  type: "button",
1104
- class: A(n.mode == "solid" ? "active" : ""),
1109
+ class: Q(n.mode == "solid" ? "active" : ""),
1105
1110
  style: { padding: "7px" },
1106
1111
  onClick: r[0] || (r[0] = (b) => V.$emit("onChangeMode", "solid"))
1107
1112
  }, [
@@ -1120,7 +1125,7 @@ const It = { key: 1 }, Vt = {
1120
1125
  ], 2),
1121
1126
  h("button", {
1122
1127
  type: "button",
1123
- class: A(n.gradientType == "linear" && n.mode != "solid" ? "active" : ""),
1128
+ class: Q(n.gradientType == "linear" && n.mode != "solid" ? "active" : ""),
1124
1129
  style: te(`${n.iconClasses.linear ? "" : "padding: 7px;"}`),
1125
1130
  onClick: r[1] || (r[1] = (b) => V.$emit("onChangeMode", "linear"))
1126
1131
  }, [
@@ -1139,7 +1144,7 @@ const It = { key: 1 }, Vt = {
1139
1144
  ], 6),
1140
1145
  h("button", {
1141
1146
  type: "button",
1142
- class: A(n.gradientType == "radial" && n.mode != "solid" ? "active" : ""),
1147
+ class: Q(n.gradientType == "radial" && n.mode != "solid" ? "active" : ""),
1143
1148
  style: te(`${n.iconClasses.radial ? "" : "padding: 6px;"}`),
1144
1149
  onClick: r[2] || (r[2] = (b) => V.$emit("onChangeMode", "radial"))
1145
1150
  }, [
@@ -1201,13 +1206,13 @@ const It = { key: 1 }, Vt = {
1201
1206
  },
1202
1207
  emits: ["update:modelValue", "last-used-pick"],
1203
1208
  setup(n, { emit: V }) {
1204
- const r = n, b = v(r.variant == "gradient" ? "gradient" : "solid"), u = v(null), f = V, C = v(r.modelValue), c = (t) => {
1209
+ const r = n, b = v(r.variant == "gradient" ? "gradient" : "solid"), u = v(null), f = V, C = v(r.modelValue), p = (t) => {
1205
1210
  C.value = t, F.value && f("update:modelValue", t);
1206
1211
  }, a = v([
1207
1212
  { id: 1, r: 68, g: 71, b: 119, a: 100, percent: 0, hue: 0, select: !0 },
1208
1213
  { id: 2, r: 0, g: 0, b: 255, a: 100, percent: 100, hue: 0, select: !1 }
1209
1214
  ]), H = v(r.lastUsedColors);
1210
- we(
1215
+ fe(
1211
1216
  () => r.lastUsedColors,
1212
1217
  () => {
1213
1218
  H.value = r.lastUsedColors;
@@ -1216,7 +1221,7 @@ const It = { key: 1 }, Vt = {
1216
1221
  deep: !0
1217
1222
  }
1218
1223
  );
1219
- const Z = ke(() => r.variant !== "gradient" ? H.value.filter((t) => !t.includes("linear") && !t.includes("radial")) : H.value), O = v(!1), L = v("linear"), B = _e({
1224
+ const Z = $e(() => r.variant !== "gradient" ? H.value.filter((t) => !t.includes("linear") && !t.includes("radial")) : H.value), O = v(!1), L = v("linear"), B = _e({
1220
1225
  angle: 90,
1221
1226
  percentageX: 50,
1222
1227
  percentageY: 50
@@ -1226,9 +1231,9 @@ const It = { key: 1 }, Vt = {
1226
1231
  l: 0
1227
1232
  });
1228
1233
  Be("gradientBar", le), Be("canvas", J), Be("pickerWrap", z), Be("pickerPointer", R), Be("opacitySlider", U);
1229
- let ae = 0, ee = 0, x = 0, Se = 0, ue = 0, ie = 0;
1234
+ let ae = 0, ee = 0, y = 0, Se = 0, ue = 0, ie = 0;
1230
1235
  const Ne = (t) => {
1231
- !z.value || !R.value || (ue = z.value.offsetHeight - R.value.offsetHeight, ie = z.value.offsetWidth - R.value.offsetWidth, x = t.clientX - t.target.getBoundingClientRect().left, Se = t.clientY - t.target.getBoundingClientRect().top, ae = x - R.value.offsetWidth / 2, ee = Se - R.value.offsetHeight / 2, R.value.style.left = `${ae}px`, R.value.style.top = `${ee}px`, Ce(!1), G(), window.addEventListener("mousemove", Ee), window.addEventListener("mouseup", Me));
1236
+ !z.value || !R.value || (ue = z.value.offsetHeight - R.value.offsetHeight, ie = z.value.offsetWidth - R.value.offsetWidth, y = t.clientX - t.target.getBoundingClientRect().left, Se = t.clientY - t.target.getBoundingClientRect().top, ae = y - R.value.offsetWidth / 2, ee = Se - R.value.offsetHeight / 2, R.value.style.left = `${ae}px`, R.value.style.top = `${ee}px`, Ce(!1), G(), window.addEventListener("mousemove", Ee), window.addEventListener("mouseup", Me));
1232
1237
  }, Ee = (t) => {
1233
1238
  t.preventDefault();
1234
1239
  const e = z.value.getBoundingClientRect(), l = t.clientX - e.left - R.value.offsetWidth / 2, i = t.clientY - e.top - R.value.offsetHeight / 2;
@@ -1305,9 +1310,9 @@ const It = { key: 1 }, Vt = {
1305
1310
  }
1306
1311
  }
1307
1312
  }
1308
- window.addEventListener("mousemove", de), window.addEventListener("mouseup", fe);
1313
+ window.addEventListener("mousemove", de), window.addEventListener("mouseup", he);
1309
1314
  }
1310
- }, fe = () => {
1315
+ }, he = () => {
1311
1316
  window.removeEventListener("mousemove", de), window.removeEventListener("mouseup", Ve);
1312
1317
  }, de = (t) => {
1313
1318
  var d, k;
@@ -1335,8 +1340,8 @@ const It = { key: 1 }, Vt = {
1335
1340
  };
1336
1341
  a.value[i].select = !1;
1337
1342
  const k = (I = u.value) == null ? void 0 : I.querySelector(".gradient-handle.select");
1338
- k == null || k.classList.remove("select"), a.value = [...a.value, d], be(d), _ = ($ = u.value) == null ? void 0 : $.querySelector(`#clr-gb-${d.id}`), q();
1339
- }, he = (t) => {
1343
+ k == null || k.classList.remove("select"), a.value = [...a.value, d], ye(d), _ = ($ = u.value) == null ? void 0 : $.querySelector(`#clr-gb-${d.id}`), q();
1344
+ }, be = (t) => {
1340
1345
  if (t.r == 0 && t.g == 0 && t.b == 0)
1341
1346
  return !0;
1342
1347
  if (t.r == 255 && t.g == 255 && t.b == 255)
@@ -1353,7 +1358,7 @@ const It = { key: 1 }, Vt = {
1353
1358
  }
1354
1359
  }, ce = (t, e, l, i, s) => {
1355
1360
  setTimeout(() => {
1356
- if (he({ r: t, g: e, b: l })) {
1361
+ if (be({ r: t, g: e, b: l })) {
1357
1362
  let d = me();
1358
1363
  d && (R.value.style.left = `${d.x}px`, R.value.style.top = `${d.y}px`);
1359
1364
  } else {
@@ -1362,12 +1367,12 @@ const It = { key: 1 }, Vt = {
1362
1367
  }
1363
1368
  }, 0);
1364
1369
  }, Le = () => {
1365
- a.value.forEach((l) => be(l)), Te();
1370
+ a.value.forEach((l) => ye(l)), Te();
1366
1371
  const t = a.value[0];
1367
1372
  ne.value = t.hue, Ie(!0);
1368
1373
  let e = me();
1369
1374
  e && (R.value.style.left = `${e.x}px`, R.value.style.top = `${e.y}px`), K(), q();
1370
- }, be = (t) => {
1375
+ }, ye = (t) => {
1371
1376
  if (b.value == "gradient") {
1372
1377
  let e = document.createElement("div");
1373
1378
  e.id = `clr-gb-${t.id}`, e.classList.add("gradient-handle"), e.style.left = He(t.percent);
@@ -1406,7 +1411,7 @@ const It = { key: 1 }, Vt = {
1406
1411
  }
1407
1412
  le.value.style.backgroundImage = e;
1408
1413
  let i = (t = u.value) == null ? void 0 : t.querySelector("#ck-cp-target-background");
1409
- i && (i.style.backgroundImage = l, F.value && c(i.style.backgroundImage));
1414
+ i && (i.style.backgroundImage = l, F.value && p(i.style.backgroundImage));
1410
1415
  } else {
1411
1416
  const { r: e, g: l, b: i, a: s } = a.value[0];
1412
1417
  let d = "";
@@ -1424,11 +1429,11 @@ const It = { key: 1 }, Vt = {
1424
1429
  d = lt(e, l, i);
1425
1430
  break;
1426
1431
  }
1427
- c(d);
1432
+ p(d);
1428
1433
  }
1429
1434
  }, Te = () => {
1430
1435
  a.value.forEach((t) => {
1431
- t.hue = Ae(t.r, t.g, t.b);
1436
+ t.hue = Qe(t.r, t.g, t.b);
1432
1437
  });
1433
1438
  }, qe = (t) => {
1434
1439
  L.value = t, q();
@@ -1451,8 +1456,8 @@ const It = { key: 1 }, Vt = {
1451
1456
  t == null || t.classList.add("active"), new EyeDropper().open().then((i) => {
1452
1457
  const { sRGBHex: s } = i, d = a.value.find((I) => I.select == !0), k = je(s);
1453
1458
  if (k) {
1454
- const I = Ae(k.r, k.g, k.b);
1455
- if (d && (d.hue = I, d.r = k.r, d.g = k.g, d.b = k.b), he(k)) {
1459
+ const I = Qe(k.r, k.g, k.b);
1460
+ if (d && (d.hue = I, d.r = k.r, d.g = k.g, d.b = k.b), be(k)) {
1456
1461
  const $ = me();
1457
1462
  $ && (R.value.style.left = `${$.x}px`, R.value.style.top = `${$.y}px`);
1458
1463
  } else {
@@ -1467,13 +1472,13 @@ const It = { key: 1 }, Vt = {
1467
1472
  }).catch(() => {
1468
1473
  t == null || t.classList.remove("active");
1469
1474
  });
1470
- }, p = (t) => {
1475
+ }, c = (t) => {
1471
1476
  const { value: e, type: l } = t;
1472
1477
  if (l != "a") {
1473
1478
  const i = a.value.find((s) => s.select == !0);
1474
1479
  if (i) {
1475
1480
  i.r = parseInt(e.r), i.g = parseInt(e.g), i.b = parseInt(e.b);
1476
- const s = Ae(i.r, i.g, i.b);
1481
+ const s = Qe(i.r, i.g, i.b);
1477
1482
  i.hue = s, ce(i.r, i.g, i.b, i.hue, !0), q(), K();
1478
1483
  }
1479
1484
  } else
@@ -1485,11 +1490,11 @@ const It = { key: 1 }, Vt = {
1485
1490
  const { r: l, g: i, b: s } = et(N.h, N.s / 100, N.l / 100);
1486
1491
  e.hue = N.h, e.r = l, e.g = i, e.b = s, ce(e.r, e.g, e.b, e.hue, !0), q(), K();
1487
1492
  }
1488
- }, y = () => {
1493
+ }, x = () => {
1489
1494
  if (j.value) {
1490
1495
  const t = je(j.value);
1491
1496
  if (t) {
1492
- const e = Ae(t.r, t.g, t.b), l = a.value.find((i) => i.select == !0);
1497
+ const e = Qe(t.r, t.g, t.b), l = a.value.find((i) => i.select == !0);
1493
1498
  l && (l.r = t.r, l.g = t.g, l.b = t.b, l.hue = e, ce(t.r, t.g, t.b, l.hue, !0), q(), K(), pe(M.value));
1494
1499
  }
1495
1500
  }
@@ -1500,7 +1505,7 @@ const It = { key: 1 }, Vt = {
1500
1505
  f("last-used-pick", t);
1501
1506
  };
1502
1507
  window.EyeDropper && (O.value = !0);
1503
- const ye = (t = "") => {
1508
+ const xe = (t = "") => {
1504
1509
  if (b.value == "gradient") {
1505
1510
  let e = t.includes("linear") ? "linear" : "radial", l = [];
1506
1511
  if (L.value = e, e == "linear") {
@@ -1597,16 +1602,16 @@ const It = { key: 1 }, Vt = {
1597
1602
  }
1598
1603
  M.value = t;
1599
1604
  }
1600
- }, xe = (t) => {
1601
- t && ye(t), Le();
1605
+ }, ke = (t) => {
1606
+ t && xe(t), Le();
1602
1607
  };
1603
- we(
1608
+ fe(
1604
1609
  () => r.modelValue,
1605
1610
  (t, e) => {
1606
1611
  t !== e && t !== C.value && (a.value.forEach((l) => {
1607
1612
  const i = P == null ? void 0 : P.querySelector(`#clr-gb-${l.id}`);
1608
1613
  i == null || i.remove();
1609
- }), xe(t));
1614
+ }), ke(t));
1610
1615
  }
1611
1616
  );
1612
1617
  const ut = (t) => {
@@ -1617,18 +1622,18 @@ const It = { key: 1 }, Vt = {
1617
1622
  var e;
1618
1623
  P = (e = u.value) == null ? void 0 : e.querySelector(".gradient-bar"), qe(t), Le();
1619
1624
  }, 200)) : t === "solid" && (b.value = "solid", a.value = a.value.map((e) => (e.select = !1, e)), a.value[0].select = !0, setTimeout(() => {
1620
- xe(r.modelValue);
1625
+ ke(r.modelValue);
1621
1626
  }, 200));
1622
1627
  };
1623
1628
  return Je(() => {
1624
1629
  var t;
1625
- b.value = r.modelValue.includes("linear") || r.modelValue.includes("radial") ? "gradient" : "solid", b.value == "gradient" && (P = (t = u.value) == null ? void 0 : t.querySelector(".gradient-bar")), xe(r.modelValue), pe(M.value), mt(() => {
1630
+ b.value = r.modelValue.includes("linear") || r.modelValue.includes("radial") ? "gradient" : "solid", b.value == "gradient" && (P = (t = u.value) == null ? void 0 : t.querySelector(".gradient-bar")), ke(r.modelValue), pe(M.value), mt(() => {
1626
1631
  F.value = !0;
1627
1632
  });
1628
1633
  }), (t, e) => (m(), E("div", {
1629
1634
  ref_key: "pickerTemplateRef",
1630
1635
  ref: u,
1631
- class: A(["ck-cp-container", n.disabled ? "ck-cp-disabled " : ""]),
1636
+ class: Q(["ck-cp-container", n.disabled ? "ck-cp-disabled " : ""]),
1632
1637
  "cp-theme": n.theme
1633
1638
  }, [
1634
1639
  n.variant == "gradient" ? (m(), E("div", rl, [
@@ -1677,7 +1682,7 @@ const It = { key: 1 }, Vt = {
1677
1682
  T(al, { onOnMouseDown: Ne }),
1678
1683
  h("div", vl, [
1679
1684
  T(_t, {
1680
- class: A(O.value ? "max-w-[90%]" : ""),
1685
+ class: Q(O.value ? "max-w-[90%]" : ""),
1681
1686
  modelValue: ne.value,
1682
1687
  "onUpdate:modelValue": e[3] || (e[3] = (l) => ne.value = l),
1683
1688
  onOnInput: e[4] || (e[4] = (l) => Ie(!1)),
@@ -1722,13 +1727,13 @@ const It = { key: 1 }, Vt = {
1722
1727
  modelValue: j.value,
1723
1728
  "onUpdate:modelValue": [
1724
1729
  e[7] || (e[7] = (l) => j.value = l),
1725
- y
1730
+ x
1726
1731
  ]
1727
1732
  }, null, 8, ["modelValue"])) : D("", !0),
1728
1733
  M.value == "RGB" ? (m(), X(nt, {
1729
1734
  key: 1,
1730
1735
  "rgb-value": a.value.find((l) => l.select == !0),
1731
- onUpdateRgbValue: p
1736
+ onUpdateRgbValue: c
1732
1737
  }, null, 8, ["rgb-value"])) : D("", !0),
1733
1738
  M.value == "HSL" ? (m(), X(nt, {
1734
1739
  key: 2,
@@ -1784,7 +1789,7 @@ const It = { key: 1 }, Vt = {
1784
1789
  }
1785
1790
  },
1786
1791
  setup(n) {
1787
- const V = n, r = ke(() => ({
1792
+ const V = n, r = $e(() => ({
1788
1793
  grid: {
1789
1794
  containLabel: !1
1790
1795
  },
@@ -1833,7 +1838,7 @@ const It = { key: 1 }, Vt = {
1833
1838
  () => import("./OcLottieAnimation-EBkAB8-y.js")
1834
1839
  );
1835
1840
  export {
1836
- Ql as BarChart,
1841
+ Al as BarChart,
1837
1842
  Nl as BarRaceChart,
1838
1843
  Xl as Card,
1839
1844
  Ml as CodeBlock,
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.9.0",
4
+ "version": "1.12.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "vite build"