@orchidui/dashboard 0.6.0 → 0.7.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/Dashboard/Card/OcCard.js +1 -1
- package/dist/Dashboard/Charts/PieChart/OcPieChart.js +1 -1
- package/dist/Dashboard/TextEditor/QuillEditor.js +1 -1
- package/dist/{OcCard-w0EuBfr4.js → OcCard-CfotNHx8.js} +1 -1
- package/dist/OcComplexCalendar-Boa7mNFU-BOc2Ou_B.js +5863 -0
- package/dist/OcComplexDatePicker-BydI4VSR-WtcGs_4g.js +92 -0
- package/dist/OcCropper-7E2i6ayU-D2MlvrOQ.js +1602 -0
- package/dist/OcDataTable-CsCGrRx7-BQ4BTMoM.js +580 -0
- package/dist/OcDraggable-CA_BCbpl-5qLRNtse.js +34 -0
- package/dist/OcDraggableList-BUu5SgoA-CFkaqmpK.js +157 -0
- package/dist/OcEmojiPicker-DYYK7OB3-bcz9JkU1.js +1170 -0
- package/dist/OcFilterForm-7ehuJUMp-D7aE0HSM.js +83 -0
- package/dist/OcFilterSearch-B4AZsLBn-C9rTBQa6.js +69 -0
- package/dist/OcFilterSearchFor-DfwJG-5N-BzJe6fhu.js +67 -0
- package/dist/OcModalCropper-Z4jlnFc5-CtKIW0ED.js +46 -0
- package/dist/{OcPieChart-Kn-CkXip.js → OcPieChart-B6eV6nlg.js} +1 -1
- package/dist/OcTimePicker-D9fPU8_m-DXvgZvEY.js +98 -0
- package/dist/OcTimePopup-CXGhaOev-Bh4cnZdX.js +130 -0
- package/dist/{QuillEditor-Bm3QXhLB.js → QuillEditor-CTgEQ0_O.js} +77 -80
- package/dist/SubPlanCard-DHj4RHJZ-BXLF6lxf.js +79 -0
- package/dist/ThumbnailSection-CJBS0QXp-CzVwtuYN.js +41 -0
- package/dist/ThumbnailTheme-hey6se0g-jbmLdCu-.js +118 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/index-DyVteXE3-BhWmKQss.js +7340 -0
- package/dist/index.js +71 -71
- package/dist/vue-draggable-next.esm-bundler-Ci24Fze9.js +1543 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var dt = Object.defineProperty;
|
|
2
2
|
var ct = (n, I, r) => I in n ? dt(n, I, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[I] = r;
|
|
3
3
|
var qe = (n, I, r) => ct(n, typeof I != "symbol" ? I + "" : I, r);
|
|
4
|
-
import { ref as m, computed as Fe, openBlock as v, createBlock as X, unref as C, normalizeClass as A, withCtx as G, createVNode as E, createCommentVNode as
|
|
5
|
-
import { Q as q, a as yt } from "./QuillEditor-
|
|
6
|
-
import {
|
|
4
|
+
import { ref as m, computed as Fe, openBlock as v, createBlock as X, unref as C, normalizeClass as A, withCtx as G, createVNode as E, createCommentVNode as D, createSlots as pt, renderSlot as Ye, createElementBlock as R, normalizeStyle as J, onMounted as je, createElementVNode as h, Fragment as ce, renderList as We, toDisplayString as Qe, createTextVNode as pe, watch as xe, withKeys as lt, inject as Le, reactive as Ke, provide as Ve, nextTick as gt, withDirectives as vt, vShow as mt, defineComponent as ft, defineAsyncComponent as ht } from "vue";
|
|
5
|
+
import { Q as q, a as yt } from "./QuillEditor-CTgEQ0_O.js";
|
|
6
|
+
import { a as at, b as nt, y as be, g as Q, o as Ae, i as bt } from "./index-DyVteXE3-BhWmKQss.js";
|
|
7
7
|
import { hslToRgb as Ze, hsl2Hex as Je, rgb2Hex as _e, rgbaToHex8 as xt, hexToRgb as Ge, rgbToHue as Me, rgbToHsl as et, hex8ToRgba as kt, parseRgba as $t, parseRgb as wt } from "./Dashboard/ColorPicker/components/converters.js";
|
|
8
8
|
import { PieChart as St } from "./Dashboard/Charts/PieChart/OcPieChart.js";
|
|
9
9
|
import { LineChart as Ul } from "./Dashboard/Charts/LineChart/OcLineChart.js";
|
|
10
10
|
import { BarChart as Ml } from "./Dashboard/Charts/BarChart/OcBarChart.js";
|
|
11
11
|
import { BarRaceChart as Ql } from "./Dashboard/Charts/BarRaceChart/OcBarRaceChart.js";
|
|
12
|
-
import { _ as Nl } from "./OcCard-
|
|
12
|
+
import { _ as Nl } from "./OcCard-CfotNHx8.js";
|
|
13
13
|
const Ct = { key: 1 }, It = {
|
|
14
14
|
__name: "OcColorPicker",
|
|
15
15
|
props: {
|
|
@@ -29,8 +29,8 @@ const Ct = { key: 1 }, It = {
|
|
|
29
29
|
},
|
|
30
30
|
emits: ["update:model-value"],
|
|
31
31
|
setup(n, { emit: I }) {
|
|
32
|
-
const r = n, y = I, u = m(!1), f = m(r.modelValue), w = (
|
|
33
|
-
|
|
32
|
+
const r = n, y = I, u = m(!1), f = m(r.modelValue), w = (H) => {
|
|
33
|
+
H && (f.value = H, y("update:model-value", H));
|
|
34
34
|
}, c = Fe(() => r.variant === "gradient" ? {
|
|
35
35
|
class: "w-[20px] h-[20px] hide-svg-icon",
|
|
36
36
|
style: {
|
|
@@ -41,12 +41,12 @@ const Ct = { key: 1 }, It = {
|
|
|
41
41
|
color: f.value
|
|
42
42
|
}
|
|
43
43
|
}), a = m(), U = m([]), W = () => {
|
|
44
|
-
U.value.length > 8 && (U.value = U.value.filter((
|
|
44
|
+
U.value.length > 8 && (U.value = U.value.filter((H, F) => F < 8)), localStorage.setItem("ck-cp-local-color-list", JSON.stringify(U.value));
|
|
45
45
|
};
|
|
46
46
|
let O = localStorage.getItem("ck-cp-local-color-list");
|
|
47
47
|
O && (U.value = [...new Set(JSON.parse(O))], W());
|
|
48
|
-
const L = (
|
|
49
|
-
if (!
|
|
48
|
+
const L = (H) => {
|
|
49
|
+
if (!H && f.value)
|
|
50
50
|
if (U.value.find((M) => M === f.value))
|
|
51
51
|
U.value = [
|
|
52
52
|
f.value,
|
|
@@ -57,10 +57,10 @@ const Ct = { key: 1 }, It = {
|
|
|
57
57
|
let M = f.value;
|
|
58
58
|
U.value.unshift(M), W();
|
|
59
59
|
}
|
|
60
|
-
}, B = m(!1), j = (
|
|
61
|
-
f.value =
|
|
60
|
+
}, B = m(!1), j = (H) => {
|
|
61
|
+
f.value = H, y("update:model-value", H), u.value = !1;
|
|
62
62
|
};
|
|
63
|
-
return (
|
|
63
|
+
return (H, F) => (v(), X(C(at), {
|
|
64
64
|
class: A(n.hideInputColor ? "w-[40px]" : ""),
|
|
65
65
|
onClick: F[1] || (F[1] = () => {
|
|
66
66
|
var M;
|
|
@@ -80,7 +80,7 @@ const Ct = { key: 1 }, It = {
|
|
|
80
80
|
placement: "auto"
|
|
81
81
|
}, {
|
|
82
82
|
menu: G(() => [
|
|
83
|
-
B.value ?
|
|
83
|
+
B.value ? D("", !0) : (v(), X(C(bl), {
|
|
84
84
|
key: 0,
|
|
85
85
|
variant: n.variant,
|
|
86
86
|
"show-alpha": !n.hideOpacity,
|
|
@@ -94,7 +94,7 @@ const Ct = { key: 1 }, It = {
|
|
|
94
94
|
]),
|
|
95
95
|
default: G(() => [
|
|
96
96
|
n.hideInputColor ? (v(), R("div", Ct, [
|
|
97
|
-
Ye(
|
|
97
|
+
Ye(H.$slots, "picker-icon", {}, () => [
|
|
98
98
|
E(C(Q), {
|
|
99
99
|
class: "cursor-pointer",
|
|
100
100
|
style: J(`color: ${f.value}`),
|
|
@@ -109,10 +109,10 @@ const Ct = { key: 1 }, It = {
|
|
|
109
109
|
placeholder: "#FFFFFF",
|
|
110
110
|
"onUpdate:modelValue": w
|
|
111
111
|
}, pt({ _: 2 }, [
|
|
112
|
-
|
|
112
|
+
H.$slots.leading ? {
|
|
113
113
|
name: "leading",
|
|
114
114
|
fn: G(() => [
|
|
115
|
-
Ye(
|
|
115
|
+
Ye(H.$slots, "leading")
|
|
116
116
|
]),
|
|
117
117
|
key: "0"
|
|
118
118
|
} : void 0
|
|
@@ -124,7 +124,7 @@ const Ct = { key: 1 }, It = {
|
|
|
124
124
|
_: 3
|
|
125
125
|
}, 8, ["class"]));
|
|
126
126
|
}
|
|
127
|
-
}, Vt = ["id"], Lt = { class: "flex items-center gap-x-3 px-5" }, Tt = { class: "flex items-center gap-x-5 cursor-pointer" }, Bt = { class: "flex flex-col py-2 overflow-hidden" }, Rt = ["onClick"], Et = { class: "flex gap-x-3 items-center px-5" },
|
|
127
|
+
}, Vt = ["id"], Lt = { class: "flex items-center gap-x-3 px-5" }, Tt = { class: "flex items-center gap-x-5 cursor-pointer" }, Bt = { class: "flex flex-col py-2 overflow-hidden" }, Rt = ["onClick"], Et = { class: "flex gap-x-3 items-center px-5" }, Ht = { class: "flex items-center gap-x-3 px-5" }, Dt = { class: "flex gap-x-3 items-center px-5" }, Ut = { class: "flex gap-x-3 items-center px-5" }, Ot = { class: "flex items-center" }, Mt = { class: "grid cursor-pointer px-5" }, At = {
|
|
128
128
|
key: 5,
|
|
129
129
|
class: "flex gap-x-3 items-center px-5"
|
|
130
130
|
}, Qt = { class: "flex" }, Ft = { class: "mt-1 mx-2 cursor-pointer" }, Bl = {
|
|
@@ -215,7 +215,7 @@ const Ct = { key: 1 }, It = {
|
|
|
215
215
|
k.value.getQuill().insertText(i.index, `
|
|
216
216
|
`, q.sources.USER), k.value.getQuill().insertEmbed(i.index + 1, "divider", !0, q.sources.USER), k.value.getQuill().setSelection(i.index + 2, q.sources.SILENT);
|
|
217
217
|
}
|
|
218
|
-
},
|
|
218
|
+
}, H = m(
|
|
219
219
|
Math.random().toString(36).replace(/[^a-zA-Z]+/g, "")
|
|
220
220
|
), F = m(!1), M = m(!1), _ = m(!1), z = m(!1), Y = m(!1), T = m(!1), N = m(!1), ae = m(""), ee = m(""), ne = m(""), k = m(), ie = m(!1), se = m(r.image), ke = (p) => {
|
|
221
221
|
F.value = k.value.getQuill().history.stack.undo.length > 0, M.value = k.value.getQuill().history.stack.redo.length > 0, _.value = k.value.getQuill().getFormat().bold, z.value = k.value.getQuill().getFormat().italic, Y.value = k.value.getQuill().getFormat().underline, N.value = k.value.getQuill().getFormat().blockquote, ee.value = k.value.getQuill().getFormat().list, ne.value = k.value.getQuill().getFormat().align;
|
|
@@ -251,7 +251,7 @@ const Ct = { key: 1 }, It = {
|
|
|
251
251
|
const i = p.files[0], V = new FileReader();
|
|
252
252
|
V.onload = () => le(V.result), V.readAsDataURL(i);
|
|
253
253
|
}, p.click();
|
|
254
|
-
},
|
|
254
|
+
}, He = (p) => /^data:image\/(png|jpg|jpeg|gif);base64,/.test(p), P = (p) => {
|
|
255
255
|
setTimeout(() => {
|
|
256
256
|
var V;
|
|
257
257
|
if (p) {
|
|
@@ -261,13 +261,13 @@ const Ct = { key: 1 }, It = {
|
|
|
261
261
|
if (he && he.length > 0)
|
|
262
262
|
for (let Ie = 0; Ie < he.length; Ie++) {
|
|
263
263
|
const Ue = (V = he[Ie]) == null ? void 0 : V.getAttribute("src");
|
|
264
|
-
|
|
264
|
+
He(Ue) && y("update:image", Ue);
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
}, 100);
|
|
268
268
|
const { items: i } = p.clipboardData;
|
|
269
269
|
i.length && i[0].getAsString((V) => {
|
|
270
|
-
|
|
270
|
+
He(V) && (k.value.getQuill().getSelection() || k.value.getQuill().setSelection(k.value.getQuill().getLength() - 1));
|
|
271
271
|
});
|
|
272
272
|
}, K = () => {
|
|
273
273
|
k.value.getQuill().theme.tooltip.edit("video");
|
|
@@ -293,7 +293,7 @@ const Ct = { key: 1 }, It = {
|
|
|
293
293
|
let de = "float:left";
|
|
294
294
|
p == "center" ? de = "" : p == "right" && (de = "float:right"), (Z = i == null ? void 0 : i.querySelector("img")) == null || Z.setAttribute("style", `margin:auto;display:block;${de}`);
|
|
295
295
|
}
|
|
296
|
-
},
|
|
296
|
+
}, De = () => {
|
|
297
297
|
var i;
|
|
298
298
|
const p = (i = window.getSelection()) == null ? void 0 : i.focusNode;
|
|
299
299
|
ue.value = p.innerHTML && p.innerHTML.includes("<img");
|
|
@@ -310,16 +310,16 @@ const Ct = { key: 1 }, It = {
|
|
|
310
310
|
default: G(() => [
|
|
311
311
|
h("div", {
|
|
312
312
|
class: A(["grid", { "has-error": n.errorMessage }]),
|
|
313
|
-
onClick:
|
|
313
|
+
onClick: De
|
|
314
314
|
}, [
|
|
315
|
-
|
|
315
|
+
H.value ? (v(), X(C(yt), {
|
|
316
316
|
key: 0,
|
|
317
|
-
id: `#${
|
|
317
|
+
id: `#${H.value}`,
|
|
318
318
|
ref_key: "quill",
|
|
319
319
|
ref: k,
|
|
320
320
|
content: n.modelValue,
|
|
321
321
|
options: {
|
|
322
|
-
bounds: `#${
|
|
322
|
+
bounds: `#${H.value}`
|
|
323
323
|
},
|
|
324
324
|
theme: "snow",
|
|
325
325
|
"content-type": "html",
|
|
@@ -330,7 +330,7 @@ const Ct = { key: 1 }, It = {
|
|
|
330
330
|
}, {
|
|
331
331
|
toolbar: G(() => [
|
|
332
332
|
h("div", {
|
|
333
|
-
id:
|
|
333
|
+
id: H.value,
|
|
334
334
|
class: "flex min-h-[36px] flex-wrap !py-2 !px-3 gap-y-2 rounded-t"
|
|
335
335
|
}, [
|
|
336
336
|
f.value.includes("changes") ? (v(), R(ce, { key: 0 }, [
|
|
@@ -351,7 +351,7 @@ const Ct = { key: 1 }, It = {
|
|
|
351
351
|
}, null, 8, ["class"])
|
|
352
352
|
]),
|
|
353
353
|
i[12] || (i[12] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
|
|
354
|
-
], 64)) :
|
|
354
|
+
], 64)) : D("", !0),
|
|
355
355
|
f.value.includes("font-size") ? (v(), R(ce, { key: 1 }, [
|
|
356
356
|
E(C(nt), {
|
|
357
357
|
modelValue: T.value,
|
|
@@ -384,7 +384,7 @@ const Ct = { key: 1 }, It = {
|
|
|
384
384
|
_: 1
|
|
385
385
|
}, 8, ["modelValue"]),
|
|
386
386
|
i[13] || (i[13] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
|
|
387
|
-
], 64)) :
|
|
387
|
+
], 64)) : D("", !0),
|
|
388
388
|
f.value.includes("font-style") ? (v(), R(ce, { key: 2 }, [
|
|
389
389
|
h("div", Et, [
|
|
390
390
|
E(C(Q), {
|
|
@@ -410,8 +410,8 @@ const Ct = { key: 1 }, It = {
|
|
|
410
410
|
}, null, 8, ["class"])
|
|
411
411
|
]),
|
|
412
412
|
i[14] || (i[14] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
|
|
413
|
-
], 64)) :
|
|
414
|
-
h("div",
|
|
413
|
+
], 64)) : D("", !0),
|
|
414
|
+
h("div", Ht, [
|
|
415
415
|
f.value.includes("link") ? (v(), X(C(Q), {
|
|
416
416
|
key: 0,
|
|
417
417
|
class: "cursor-pointer",
|
|
@@ -419,7 +419,7 @@ const Ct = { key: 1 }, It = {
|
|
|
419
419
|
height: "20",
|
|
420
420
|
name: "text-editor/link",
|
|
421
421
|
onClick: ge
|
|
422
|
-
})) :
|
|
422
|
+
})) : D("", !0),
|
|
423
423
|
f.value.includes("image") ? (v(), X(C(Q), {
|
|
424
424
|
key: 1,
|
|
425
425
|
class: "cursor-pointer",
|
|
@@ -427,7 +427,7 @@ const Ct = { key: 1 }, It = {
|
|
|
427
427
|
height: "20",
|
|
428
428
|
name: "text-editor/image",
|
|
429
429
|
onClick: Ee
|
|
430
|
-
})) :
|
|
430
|
+
})) : D("", !0),
|
|
431
431
|
f.value.includes("quote") ? (v(), X(C(Q), {
|
|
432
432
|
key: 2,
|
|
433
433
|
class: A(["cursor-pointer", N.value ? "text-oc-text" : "text-oc-text-300"]),
|
|
@@ -435,7 +435,7 @@ const Ct = { key: 1 }, It = {
|
|
|
435
435
|
height: "20",
|
|
436
436
|
name: "text-editor/quote",
|
|
437
437
|
onClick: Ne
|
|
438
|
-
}, null, 8, ["class"])) :
|
|
438
|
+
}, null, 8, ["class"])) : D("", !0),
|
|
439
439
|
f.value.includes("media") ? (v(), X(C(Q), {
|
|
440
440
|
key: 3,
|
|
441
441
|
class: "cursor-pointer",
|
|
@@ -443,11 +443,11 @@ const Ct = { key: 1 }, It = {
|
|
|
443
443
|
height: "20",
|
|
444
444
|
name: "text-editor/media",
|
|
445
445
|
onClick: K
|
|
446
|
-
})) :
|
|
446
|
+
})) : D("", !0)
|
|
447
447
|
]),
|
|
448
448
|
f.value.includes("list") ? (v(), R(ce, { key: 3 }, [
|
|
449
449
|
i[15] || (i[15] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
|
|
450
|
-
h("div",
|
|
450
|
+
h("div", Dt, [
|
|
451
451
|
E(C(Q), {
|
|
452
452
|
class: A(["cursor-pointer", ee.value === "bullet" ? "text-oc-text" : "text-oc-text-300"]),
|
|
453
453
|
width: "20",
|
|
@@ -463,7 +463,7 @@ const Ct = { key: 1 }, It = {
|
|
|
463
463
|
onClick: i[2] || (i[2] = (V) => Se("ordered"))
|
|
464
464
|
}, null, 8, ["class"])
|
|
465
465
|
])
|
|
466
|
-
], 64)) :
|
|
466
|
+
], 64)) : D("", !0),
|
|
467
467
|
f.value.includes("alignment") ? (v(), R(ce, { key: 4 }, [
|
|
468
468
|
i[16] || (i[16] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
|
|
469
469
|
h("div", Ut, [
|
|
@@ -496,7 +496,7 @@ const Ct = { key: 1 }, It = {
|
|
|
496
496
|
onClick: i[6] || (i[6] = (V) => ve("justify"))
|
|
497
497
|
}, null, 8, ["class"])
|
|
498
498
|
])
|
|
499
|
-
], 64)) :
|
|
499
|
+
], 64)) : D("", !0),
|
|
500
500
|
i[18] || (i[18] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
|
|
501
501
|
h("div", Ot, [
|
|
502
502
|
E(C(It), {
|
|
@@ -554,7 +554,7 @@ const Ct = { key: 1 }, It = {
|
|
|
554
554
|
onClick: i[10] || (i[10] = (V) => fe("right"))
|
|
555
555
|
})
|
|
556
556
|
])
|
|
557
|
-
])) :
|
|
557
|
+
])) : D("", !0),
|
|
558
558
|
h("div", Ft, [
|
|
559
559
|
(v(), R("svg", {
|
|
560
560
|
width: "20",
|
|
@@ -575,7 +575,7 @@ const Ct = { key: 1 }, It = {
|
|
|
575
575
|
], 8, Vt)
|
|
576
576
|
]),
|
|
577
577
|
_: 1
|
|
578
|
-
}, 8, ["id", "content", "options", "placeholder"])) :
|
|
578
|
+
}, 8, ["id", "content", "options", "placeholder"])) : D("", !0)
|
|
579
579
|
], 2)
|
|
580
580
|
]),
|
|
581
581
|
_: 1
|
|
@@ -661,7 +661,7 @@ const Ct = { key: 1 }, It = {
|
|
|
661
661
|
g: 0,
|
|
662
662
|
b: 0
|
|
663
663
|
}), f = m(), w = m(), c = m(), a = (O, L) => {
|
|
664
|
-
var j,
|
|
664
|
+
var j, H, F;
|
|
665
665
|
let B = 255;
|
|
666
666
|
if (r.inputType == "HSL" && (B = 100, O == "r" && (B = 360)), !isNaN(parseInt(L))) {
|
|
667
667
|
if (O == "r") {
|
|
@@ -669,7 +669,7 @@ const Ct = { key: 1 }, It = {
|
|
|
669
669
|
M <= B && (u.value.r = M, r.inputType == "RGB" ? U("r") : W()), (j = f.value) == null || j.focus();
|
|
670
670
|
} else if (O == "g") {
|
|
671
671
|
let M = parseInt(L);
|
|
672
|
-
M <= B && (u.value.g = M, r.inputType == "RGB" ? U("g") : W()), (
|
|
672
|
+
M <= B && (u.value.g = M, r.inputType == "RGB" ? U("g") : W()), (H = w.value) == null || H.focus();
|
|
673
673
|
} else if (O == "b") {
|
|
674
674
|
let M = parseInt(L);
|
|
675
675
|
M <= B && (u.value.b = M, r.inputType == "RGB" ? U("b") : W()), (F = c.value) == null || F.focus();
|
|
@@ -953,7 +953,7 @@ const Ct = { key: 1 }, It = {
|
|
|
953
953
|
h("span", null, "°", -1)
|
|
954
954
|
])),
|
|
955
955
|
_: 1
|
|
956
|
-
}, 8, ["model-value"])) :
|
|
956
|
+
}, 8, ["model-value"])) : D("", !0),
|
|
957
957
|
n.gradientType == "radial" && y.value ? (v(), R("div", el, [
|
|
958
958
|
E(C(Ae), {
|
|
959
959
|
label: "Position X",
|
|
@@ -985,7 +985,7 @@ const Ct = { key: 1 }, It = {
|
|
|
985
985
|
])),
|
|
986
986
|
_: 1
|
|
987
987
|
}, 8, ["model-value"])
|
|
988
|
-
])) :
|
|
988
|
+
])) : D("", !0)
|
|
989
989
|
]));
|
|
990
990
|
}
|
|
991
991
|
}, ll = {
|
|
@@ -1164,7 +1164,7 @@ const Ct = { key: 1 }, It = {
|
|
|
1164
1164
|
angle: 90,
|
|
1165
1165
|
percentageX: 50,
|
|
1166
1166
|
percentageY: 50
|
|
1167
|
-
}), j = m(""),
|
|
1167
|
+
}), j = m(""), H = m(r.inputType), F = m(!1), M = m(), _ = m(), z = m(), Y = m(), T = m(), N = Ke({
|
|
1168
1168
|
h: 0,
|
|
1169
1169
|
s: 0,
|
|
1170
1170
|
l: 0
|
|
@@ -1193,7 +1193,7 @@ const Ct = { key: 1 }, It = {
|
|
|
1193
1193
|
}
|
|
1194
1194
|
}, te = m(0), we = async (t) => {
|
|
1195
1195
|
const { rgb: e } = Je(te.value, 100, 50);
|
|
1196
|
-
|
|
1196
|
+
De(e), setTimeout(() => {
|
|
1197
1197
|
$e(t), ye();
|
|
1198
1198
|
}, 0);
|
|
1199
1199
|
}, Re = () => {
|
|
@@ -1224,7 +1224,7 @@ const Ct = { key: 1 }, It = {
|
|
|
1224
1224
|
const e = a.value.find((l) => l.select == !0);
|
|
1225
1225
|
e && (e.a = parseInt(t), i());
|
|
1226
1226
|
}
|
|
1227
|
-
},
|
|
1227
|
+
}, He = (t) => {
|
|
1228
1228
|
var l, o, s, d;
|
|
1229
1229
|
const e = (o = (l = u.value) == null ? void 0 : l.querySelector(".gradient-handle-content")) == null ? void 0 : o.getBoundingClientRect();
|
|
1230
1230
|
return t === 0 ? "0px" : t === 100 && e ? `${(((s = _.value) == null ? void 0 : s.offsetWidth) || 0) - (e.width || 0)}px` : `${(((d = _.value) == null ? void 0 : d.offsetWidth) || 0) * (t / 100) - ((e == null ? void 0 : e.width) || 0) / 2}px`;
|
|
@@ -1314,11 +1314,11 @@ const Ct = { key: 1 }, It = {
|
|
|
1314
1314
|
}, fe = (t) => {
|
|
1315
1315
|
if (y.value == "gradient") {
|
|
1316
1316
|
let e = document.createElement("div");
|
|
1317
|
-
e.id = `clr-gb-${t.id}`, e.classList.add("gradient-handle"), e.style.left =
|
|
1317
|
+
e.id = `clr-gb-${t.id}`, e.classList.add("gradient-handle"), e.style.left = He(t.percent);
|
|
1318
1318
|
let l = document.createElement("div");
|
|
1319
1319
|
l.classList.add("gradient-handle-content"), t.select == !0 && e.classList.add("select"), e.appendChild(l), P && P.appendChild(e);
|
|
1320
1320
|
}
|
|
1321
|
-
},
|
|
1321
|
+
}, De = (t) => {
|
|
1322
1322
|
const e = z.value.getContext("2d", { willReadFrequently: !0 }), l = z.value.width, o = z.value.height;
|
|
1323
1323
|
e.fillStyle = `rgb(${t[0]},${t[1]},${t[2]})`, e.fillRect(0, 0, l, o);
|
|
1324
1324
|
let s = e.createLinearGradient(0, 0, l - 12, 0);
|
|
@@ -1402,7 +1402,7 @@ const Ct = { key: 1 }, It = {
|
|
|
1402
1402
|
} else {
|
|
1403
1403
|
te.value = S;
|
|
1404
1404
|
const { rgb: x } = Je(S, 100, 50);
|
|
1405
|
-
|
|
1405
|
+
De(x);
|
|
1406
1406
|
const g = ge();
|
|
1407
1407
|
g && (T.value.style.left = `${g.x}px`, T.value.style.top = `${g.y}px`);
|
|
1408
1408
|
}
|
|
@@ -1434,12 +1434,12 @@ const Ct = { key: 1 }, It = {
|
|
|
1434
1434
|
const t = Ge(j.value);
|
|
1435
1435
|
if (t) {
|
|
1436
1436
|
const e = Me(t.r, t.g, t.b), l = a.value.find((o) => o.select == !0);
|
|
1437
|
-
l && (l.r = t.r, l.g = t.g, l.b = t.b, l.hue = e, ue(t.r, t.g, t.b, l.hue, !0), i(), p(), Oe(
|
|
1437
|
+
l && (l.r = t.r, l.g = t.g, l.b = t.b, l.hue = e, ue(t.r, t.g, t.b, l.hue, !0), i(), p(), Oe(H.value));
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
1440
|
}, ye = () => {
|
|
1441
1441
|
const t = a.value.find((e) => e.select == !0);
|
|
1442
|
-
t && (j.value = _e(t.r, t.g, t.b).toUpperCase()), Oe(
|
|
1442
|
+
t && (j.value = _e(t.r, t.g, t.b).toUpperCase()), Oe(H.value);
|
|
1443
1443
|
}, ze = (t) => {
|
|
1444
1444
|
f("last-used-pick", t);
|
|
1445
1445
|
};
|
|
@@ -1539,7 +1539,7 @@ const Ct = { key: 1 }, It = {
|
|
|
1539
1539
|
break;
|
|
1540
1540
|
}
|
|
1541
1541
|
}
|
|
1542
|
-
|
|
1542
|
+
H.value = t;
|
|
1543
1543
|
}
|
|
1544
1544
|
}, Xe = (t) => {
|
|
1545
1545
|
t && it(t), Ce();
|
|
@@ -1566,7 +1566,7 @@ const Ct = { key: 1 }, It = {
|
|
|
1566
1566
|
};
|
|
1567
1567
|
return je(() => {
|
|
1568
1568
|
var t;
|
|
1569
|
-
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")), Xe(r.modelValue), Oe(
|
|
1569
|
+
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")), Xe(r.modelValue), Oe(H.value), gt(() => {
|
|
1570
1570
|
F.value = !0;
|
|
1571
1571
|
});
|
|
1572
1572
|
}), (t, e) => (v(), R("div", {
|
|
@@ -1585,7 +1585,7 @@ const Ct = { key: 1 }, It = {
|
|
|
1585
1585
|
gradientType: L.value,
|
|
1586
1586
|
onOnChangeMode: st
|
|
1587
1587
|
}, null, 8, ["variant", "mode", "model-value", "iconClasses", "gradientType"])
|
|
1588
|
-
])) :
|
|
1588
|
+
])) : D("", !0),
|
|
1589
1589
|
y.value == "gradient" && n.variant == "gradient" ? (v(), R("div", rl, [
|
|
1590
1590
|
E(zt, {
|
|
1591
1591
|
gradientType: L.value,
|
|
@@ -1600,7 +1600,7 @@ const Ct = { key: 1 }, It = {
|
|
|
1600
1600
|
"onUpdate:angle": e[1] || (e[1] = (l) => B.angle = l),
|
|
1601
1601
|
percentageX: B.percentageX,
|
|
1602
1602
|
"onUpdate:percentageX": e[2] || (e[2] = (l) => B.percentageX = l),
|
|
1603
|
-
inputType:
|
|
1603
|
+
inputType: H.value,
|
|
1604
1604
|
mode: y.value,
|
|
1605
1605
|
gradientType: L.value,
|
|
1606
1606
|
onOnInput: i
|
|
@@ -1616,7 +1616,7 @@ const Ct = { key: 1 }, It = {
|
|
|
1616
1616
|
onClick: (o) => ze(l)
|
|
1617
1617
|
}, null, 12, pl))), 128))
|
|
1618
1618
|
])
|
|
1619
|
-
])) :
|
|
1619
|
+
])) : D("", !0)
|
|
1620
1620
|
])),
|
|
1621
1621
|
E(ll, { onOnMouseDown: ke }),
|
|
1622
1622
|
h("div", gl, [
|
|
@@ -1644,42 +1644,42 @@ const Ct = { key: 1 }, It = {
|
|
|
1644
1644
|
}, [
|
|
1645
1645
|
h("path", { d: "M21.35 1.825l-6.344 6.35-0.588-0.588c-0.781-0.781-2.050-0.781-2.831 0s-0.781 2.050 0 2.831l10 10c0.781 0.781 2.050 0.781 2.831 0s0.781-2.050 0-2.831l-0.587-0.587 6.344-6.35c2.438-2.438 2.438-6.388 0-8.819s-6.387-2.438-8.819 0zM3.462 20.206c-0.938 0.938-1.462 2.212-1.462 3.538v2.65l-1.663 2.494c-0.531 0.794-0.425 1.85 0.25 2.525s1.731 0.781 2.525 0.25l2.494-1.663h2.65c1.325 0 2.6-0.525 3.537-1.462l7.544-7.544-2.831-2.831-7.544 7.544c-0.188 0.188-0.444 0.294-0.706 0.294h-2.256v-2.256c0-0.262 0.106-0.519 0.294-0.706l7.544-7.544-2.831-2.831-7.544 7.544z" })
|
|
1646
1646
|
], -1)
|
|
1647
|
-
]))) :
|
|
1647
|
+
]))) : D("", !0)
|
|
1648
1648
|
]),
|
|
1649
1649
|
n.showAlpha ? (v(), X(jt, {
|
|
1650
1650
|
key: 3,
|
|
1651
1651
|
modelValue: le.value,
|
|
1652
1652
|
"onUpdate:modelValue": e[5] || (e[5] = (l) => le.value = l),
|
|
1653
1653
|
onOnInput: e[6] || (e[6] = (l) => Ee(l.target.value))
|
|
1654
|
-
}, null, 8, ["modelValue"])) :
|
|
1654
|
+
}, null, 8, ["modelValue"])) : D("", !0),
|
|
1655
1655
|
vt(h("div", vl, null, 512), [
|
|
1656
1656
|
[mt, !1]
|
|
1657
1657
|
]),
|
|
1658
1658
|
h("div", ml, [
|
|
1659
1659
|
E(qt, {
|
|
1660
|
-
"model-value":
|
|
1660
|
+
"model-value": H.value,
|
|
1661
1661
|
"onUpdate:modelValue": Oe
|
|
1662
1662
|
}, null, 8, ["model-value"]),
|
|
1663
1663
|
F.value && n.showInputSet ? (v(), R("div", fl, [
|
|
1664
|
-
|
|
1664
|
+
H.value == "HEX" ? (v(), X(Nt, {
|
|
1665
1665
|
key: 0,
|
|
1666
1666
|
modelValue: j.value,
|
|
1667
1667
|
"onUpdate:modelValue": [
|
|
1668
1668
|
e[7] || (e[7] = (l) => j.value = l),
|
|
1669
1669
|
ot
|
|
1670
1670
|
]
|
|
1671
|
-
}, null, 8, ["modelValue"])) :
|
|
1672
|
-
|
|
1671
|
+
}, null, 8, ["modelValue"])) : D("", !0),
|
|
1672
|
+
H.value == "RGB" ? (v(), X(tt, {
|
|
1673
1673
|
key: 1,
|
|
1674
1674
|
"rgb-value": a.value.find((l) => l.select == !0),
|
|
1675
1675
|
onUpdateRgbValue: Ie
|
|
1676
|
-
}, null, 8, ["rgb-value"])) :
|
|
1677
|
-
|
|
1676
|
+
}, null, 8, ["rgb-value"])) : D("", !0),
|
|
1677
|
+
H.value == "HSL" ? (v(), X(tt, {
|
|
1678
1678
|
key: 2,
|
|
1679
1679
|
"input-type": "HSL",
|
|
1680
1680
|
"hsl-value": N,
|
|
1681
1681
|
onUpdateHslValue: Ue
|
|
1682
|
-
}, null, 8, ["hsl-value"])) :
|
|
1682
|
+
}, null, 8, ["hsl-value"])) : D("", !0),
|
|
1683
1683
|
n.showAlpha ? (v(), X(Xt, {
|
|
1684
1684
|
key: 3,
|
|
1685
1685
|
modelValue: le.value,
|
|
@@ -1687,8 +1687,8 @@ const Ct = { key: 1 }, It = {
|
|
|
1687
1687
|
e[8] || (e[8] = (l) => le.value = l),
|
|
1688
1688
|
e[9] || (e[9] = (l) => Ee(l))
|
|
1689
1689
|
]
|
|
1690
|
-
}, null, 8, ["modelValue"])) :
|
|
1691
|
-
])) :
|
|
1690
|
+
}, null, 8, ["modelValue"])) : D("", !0)
|
|
1691
|
+
])) : D("", !0)
|
|
1692
1692
|
]),
|
|
1693
1693
|
e[12] || (e[12] = h("div", { class: "text-oc-text-400 text-sm my-3 font-medium font-inter" }, "Last used", -1)),
|
|
1694
1694
|
U.value.length > 0 && n.showColorList ? (v(), R("div", hl, [
|
|
@@ -1698,7 +1698,7 @@ const Ct = { key: 1 }, It = {
|
|
|
1698
1698
|
style: J(`background:${l}`),
|
|
1699
1699
|
onClick: (o) => ze(l)
|
|
1700
1700
|
}, null, 12, yl))), 128))
|
|
1701
|
-
])) :
|
|
1701
|
+
])) : D("", !0)
|
|
1702
1702
|
], 10, il));
|
|
1703
1703
|
}
|
|
1704
1704
|
}, xl = { class: "flex flex-col pt-10 px-7 gap-y-7 items-center" }, kl = { class: "flex flex-col gap-y-4 text-center items-center" }, $l = {
|
|
@@ -1764,9 +1764,9 @@ const Ct = { key: 1 }, It = {
|
|
|
1764
1764
|
"tooltip-value-formatter": () => null
|
|
1765
1765
|
}, null, 8, ["additional-options"]),
|
|
1766
1766
|
h("div", kl, [
|
|
1767
|
-
n.title ? (v(), R("span", $l, Qe(n.title), 1)) :
|
|
1767
|
+
n.title ? (v(), R("span", $l, Qe(n.title), 1)) : D("", !0),
|
|
1768
1768
|
Ye(y.$slots, "description", {}, () => [
|
|
1769
|
-
n.description ? (v(), R("span", wl, Qe(n.description), 1)) :
|
|
1769
|
+
n.description ? (v(), R("span", wl, Qe(n.description), 1)) : D("", !0)
|
|
1770
1770
|
])
|
|
1771
1771
|
])
|
|
1772
1772
|
]));
|