@orchidui/dashboard 1.23.1-9 → 1.23.2
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/OverviewMonthlyBarChart/OcOverviewMonthlyBarChart.js +5 -0
- package/dist/Dashboard/Charts/OverviewPieChart/OcOverviewPieChart.js +5 -0
- package/dist/Dashboard/TextEditor/QuillEditor.js +1 -1
- package/dist/{OcCard-D3be6IMj.js → OcCard-D574SeK2.js} +10 -10
- package/dist/{OcCodeBlock-B_LpoG2V.js → OcCodeBlock-CMo9zvOn.js} +1 -1
- package/dist/{OcLottieAnimation-BjY3rCjS.js → OcLottieAnimation-DtD2oJib.js} +91 -91
- package/dist/OcOverviewMonthlyBarChart-Du2jaTOy.js +148 -0
- package/dist/OcOverviewPieChart-BIpg_ZOf.js +94 -0
- package/dist/{QuillEditor-DwCbpq2d.js → QuillEditor-caFVpQGG.js} +596 -619
- package/dist/_commonjsHelpers-B4e78b8K.js +28 -0
- package/dist/dayjs.min-CTPVfFeV.js +284 -0
- package/dist/index.js +249 -245
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
var pt = Object.defineProperty;
|
|
2
2
|
var gt = (o, V, r) => V in o ? pt(o, V, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[V] = r;
|
|
3
3
|
var We = (o, V, r) => gt(o, typeof V != "symbol" ? V + "" : V, r);
|
|
4
|
-
import { ref as v, computed as $e, createBlock as N, openBlock as m, unref as w, normalizeClass as Q, withCtx as W, createVNode as L, createElementBlock as E, createSlots as vt, renderSlot as je, normalizeStyle as te, createCommentVNode as
|
|
5
|
-
import { Q as Y, a as bt } from "./QuillEditor-
|
|
4
|
+
import { ref as v, computed as $e, createBlock as N, openBlock as m, unref as w, normalizeClass as Q, withCtx as W, createVNode as L, createElementBlock as E, createSlots as vt, renderSlot as je, normalizeStyle as te, createCommentVNode as D, onMounted as Je, watch as fe, createElementVNode as h, Teleport as mt, Fragment as ge, createTextVNode as ve, toDisplayString as Pe, renderList as Ke, withKeys as ot, inject as Re, reactive as _e, provide as Be, nextTick as ft, withDirectives as ht, vShow as yt, defineAsyncComponent as it } from "vue";
|
|
5
|
+
import { Q as Y, a as bt } from "./QuillEditor-caFVpQGG.js";
|
|
6
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
7
|
import { rgbToHsl as et, rgb2Hex as tt, rgbaToHex8 as kt, hsl2Hex as lt, hexToRgb as ze, rgbToHue as Qe, hslToRgb 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 Ml } from "./Dashboard/Charts/LineChart/OcLineChart.js";
|
|
10
10
|
import { BarChart as Al } from "./Dashboard/Charts/BarChart/OcBarChart.js";
|
|
11
11
|
import { BarRaceChart as Xl } from "./Dashboard/Charts/BarRaceChart/OcBarRaceChart.js";
|
|
12
|
-
import { _ as ql } from "./OcCard-
|
|
12
|
+
import { _ as ql } from "./OcCard-D574SeK2.js";
|
|
13
|
+
import { OcOverviewPieChart as Gl } from "./Dashboard/Charts/OverviewPieChart/OcOverviewPieChart.js";
|
|
14
|
+
import { OverviewMonthlyBarChart as Wl } from "./Dashboard/Charts/OverviewMonthlyBarChart/OcOverviewMonthlyBarChart.js";
|
|
13
15
|
const It = { key: 1 }, Vt = {
|
|
14
16
|
__name: "OcColorPicker",
|
|
15
17
|
props: {
|
|
@@ -33,8 +35,8 @@ const It = { key: 1 }, Vt = {
|
|
|
33
35
|
},
|
|
34
36
|
emits: ["update:model-value"],
|
|
35
37
|
setup(o, { emit: V }) {
|
|
36
|
-
const r = o,
|
|
37
|
-
|
|
38
|
+
const r = o, y = V, d = v(!1), f = v(r.modelValue), C = (O) => {
|
|
39
|
+
O && (f.value = O, y("update:model-value", O));
|
|
38
40
|
}, p = $e(() => r.variant === "gradient" ? {
|
|
39
41
|
class: "w-[20px] h-[20px] hide-svg-icon",
|
|
40
42
|
style: {
|
|
@@ -44,31 +46,31 @@ const It = { key: 1 }, Vt = {
|
|
|
44
46
|
style: {
|
|
45
47
|
color: f.value
|
|
46
48
|
}
|
|
47
|
-
}), a = v(),
|
|
48
|
-
|
|
49
|
+
}), a = v(), H = v([]), Z = () => {
|
|
50
|
+
H.value.length > 8 && (H.value = H.value.filter((O, X) => X < 8)), localStorage.setItem("ck-cp-local-color-list", JSON.stringify(H.value));
|
|
49
51
|
};
|
|
50
52
|
let M = localStorage.getItem("ck-cp-local-color-list");
|
|
51
|
-
M && (
|
|
52
|
-
const T = (
|
|
53
|
-
if (!
|
|
54
|
-
if (
|
|
55
|
-
|
|
53
|
+
M && (H.value = [...new Set(JSON.parse(M))], Z());
|
|
54
|
+
const T = (O) => {
|
|
55
|
+
if (!O && f.value)
|
|
56
|
+
if (H.value.find((U) => U === f.value))
|
|
57
|
+
H.value = [
|
|
56
58
|
f.value,
|
|
57
|
-
...
|
|
59
|
+
...H.value.filter((U) => U !== f.value)
|
|
58
60
|
], Z();
|
|
59
61
|
else {
|
|
60
|
-
|
|
61
|
-
let
|
|
62
|
-
|
|
62
|
+
H.value.length >= 9 && H.value.pop();
|
|
63
|
+
let U = f.value;
|
|
64
|
+
H.value.unshift(U), Z();
|
|
63
65
|
}
|
|
64
|
-
}, B = v(!1), z = (
|
|
65
|
-
f.value =
|
|
66
|
+
}, B = v(!1), z = (O) => {
|
|
67
|
+
f.value = O, y("update:model-value", O), d.value = !1;
|
|
66
68
|
};
|
|
67
|
-
return (
|
|
69
|
+
return (O, X) => (m(), N(w(st), {
|
|
68
70
|
class: Q(o.hideInputColor ? "w-[40px]" : ""),
|
|
69
71
|
onClick: X[1] || (X[1] = () => {
|
|
70
|
-
var
|
|
71
|
-
return (
|
|
72
|
+
var U;
|
|
73
|
+
return (U = a.value) == null ? void 0 : U.toggleDropdown();
|
|
72
74
|
})
|
|
73
75
|
}, {
|
|
74
76
|
default: W(() => [
|
|
@@ -77,7 +79,7 @@ const It = { key: 1 }, Vt = {
|
|
|
77
79
|
ref: a,
|
|
78
80
|
modelValue: d.value,
|
|
79
81
|
"onUpdate:modelValue": [
|
|
80
|
-
X[0] || (X[0] = (
|
|
82
|
+
X[0] || (X[0] = (U) => d.value = U),
|
|
81
83
|
T
|
|
82
84
|
],
|
|
83
85
|
"max-menu-height": 800,
|
|
@@ -87,13 +89,13 @@ const It = { key: 1 }, Vt = {
|
|
|
87
89
|
}
|
|
88
90
|
}, {
|
|
89
91
|
menu: W(() => [
|
|
90
|
-
B.value ?
|
|
92
|
+
B.value ? D("", !0) : (m(), N(w(xl), {
|
|
91
93
|
key: 0,
|
|
92
94
|
variant: o.variant,
|
|
93
95
|
"show-alpha": !o.hideOpacity,
|
|
94
96
|
type: o.hideOpacity ? "HEX" : "HEX8",
|
|
95
97
|
"model-value": o.modelValue,
|
|
96
|
-
"last-used-colors":
|
|
98
|
+
"last-used-colors": H.value,
|
|
97
99
|
"preset-colors": o.presetColors,
|
|
98
100
|
"onUpdate:modelValue": C,
|
|
99
101
|
onLastUsedPick: z
|
|
@@ -101,7 +103,7 @@ const It = { key: 1 }, Vt = {
|
|
|
101
103
|
]),
|
|
102
104
|
default: W(() => [
|
|
103
105
|
o.hideInputColor ? (m(), E("div", It, [
|
|
104
|
-
je(
|
|
106
|
+
je(O.$slots, "picker-icon", {}, () => [
|
|
105
107
|
L(w(A), {
|
|
106
108
|
class: "cursor-pointer",
|
|
107
109
|
style: te(`color: ${f.value}`),
|
|
@@ -116,10 +118,10 @@ const It = { key: 1 }, Vt = {
|
|
|
116
118
|
placeholder: "",
|
|
117
119
|
"onUpdate:modelValue": C
|
|
118
120
|
}, vt({ _: 2 }, [
|
|
119
|
-
|
|
121
|
+
O.$slots.leading ? {
|
|
120
122
|
name: "leading",
|
|
121
123
|
fn: W(() => [
|
|
122
|
-
je(
|
|
124
|
+
je(O.$slots, "leading")
|
|
123
125
|
]),
|
|
124
126
|
key: "0"
|
|
125
127
|
} : void 0
|
|
@@ -131,7 +133,7 @@ const It = { key: 1 }, Vt = {
|
|
|
131
133
|
_: 3
|
|
132
134
|
}, 8, ["class"]));
|
|
133
135
|
}
|
|
134
|
-
}, Tt = ["id"], Lt = { 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"],
|
|
136
|
+
}, Tt = ["id"], Lt = { 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"], Ot = { 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" }, Mt = { class: "flex items-center" }, Qt = { class: "grid cursor-pointer px-5" }, At = {
|
|
135
137
|
key: 5,
|
|
136
138
|
class: "flex gap-x-3 items-center px-5"
|
|
137
139
|
}, Pt = { class: "flex" }, Xt = { class: "mt-1 mx-2 cursor-pointer" }, Rl = {
|
|
@@ -188,7 +190,7 @@ const It = { key: 1 }, Vt = {
|
|
|
188
190
|
},
|
|
189
191
|
emits: ["update:modelValue", "update:image", "uploadImage"],
|
|
190
192
|
setup(o, { emit: V }) {
|
|
191
|
-
const r = o,
|
|
193
|
+
const r = o, y = V, d = {
|
|
192
194
|
default: [
|
|
193
195
|
"changes",
|
|
194
196
|
"font-size",
|
|
@@ -207,8 +209,8 @@ const It = { key: 1 }, Vt = {
|
|
|
207
209
|
Y.register(p, !0);
|
|
208
210
|
const a = Y.import("attributors/style/background");
|
|
209
211
|
Y.register(a, !0);
|
|
210
|
-
const
|
|
211
|
-
Y.register(
|
|
212
|
+
const H = Y.import("attributors/style/color");
|
|
213
|
+
Y.register(H, !0);
|
|
212
214
|
const Z = Y.import("attributors/style/direction");
|
|
213
215
|
Y.register(Z, !0);
|
|
214
216
|
const M = Y.import("attributors/style/font");
|
|
@@ -219,10 +221,10 @@ const It = { key: 1 }, Vt = {
|
|
|
219
221
|
We(B, "blotName", "divider"), We(B, "tagName", "hr"), Y.register(B);
|
|
220
222
|
const z = v(
|
|
221
223
|
Math.random().toString(36).replace(/[^a-zA-Z]+/g, "")
|
|
222
|
-
),
|
|
223
|
-
|
|
224
|
+
), O = v(!1), X = v(!1), U = v(!1), le = v(!1), J = v(!1), j = v(!1), R = v(!1), q = v(""), ae = v(""), ee = v(""), x = v(), Se = v(!1), ue = v(r.image), ie = (u) => {
|
|
225
|
+
O.value = x.value.getQuill().history.stack.undo.length > 0, X.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;
|
|
224
226
|
let n = document.createElement("div");
|
|
225
|
-
n.innerHTML = u, Se.value && (n.innerText ?
|
|
227
|
+
n.innerHTML = u, Se.value && (n.innerText ? y("update:modelValue", u || "") : y("update:modelValue", ""), n.remove());
|
|
226
228
|
}, Xe = () => {
|
|
227
229
|
if (x.value.getQuill().getSelection(!0)) {
|
|
228
230
|
const n = x.value.getQuill().getSelection(!0);
|
|
@@ -231,18 +233,18 @@ const It = { key: 1 }, Vt = {
|
|
|
231
233
|
}
|
|
232
234
|
}, Ee = () => {
|
|
233
235
|
x.value.getQuill().history.undo(), ie(r.modelValue);
|
|
234
|
-
},
|
|
236
|
+
}, Oe = () => {
|
|
235
237
|
x.value.getQuill().history.redo(), ie(r.modelValue);
|
|
236
238
|
}, Ce = () => {
|
|
237
239
|
var u;
|
|
238
|
-
x.value.getQuill().format("bold", !
|
|
240
|
+
x.value.getQuill().format("bold", !U.value), (u = x.value.getQuill().getSelection()) != null && u.length || (U.value = !U.value);
|
|
239
241
|
}, ne = () => {
|
|
240
242
|
var u;
|
|
241
243
|
x.value.getQuill().format("italic", !le.value), (u = x.value.getQuill().getSelection()) != null && u.length || (le.value = !le.value);
|
|
242
244
|
}, Ie = () => {
|
|
243
245
|
var u;
|
|
244
246
|
x.value.getQuill().format("underline", !J.value), (u = x.value.getQuill().getSelection()) != null && u.length || (J.value = !J.value);
|
|
245
|
-
},
|
|
247
|
+
}, Ue = (u) => {
|
|
246
248
|
x.value.getQuill().format("size", u), q.value = u, j.value = !1;
|
|
247
249
|
}, me = () => {
|
|
248
250
|
const u = x.value.getQuill().getSelection();
|
|
@@ -251,11 +253,11 @@ const It = { key: 1 }, Vt = {
|
|
|
251
253
|
x.value.getQuill().format("blockquote", !R.value);
|
|
252
254
|
}, oe = (u) => {
|
|
253
255
|
const n = x.value.getQuill().getSelection();
|
|
254
|
-
n && (x.value.getQuill().clipboard.dangerouslyPasteHTML(n.index, `<img src="${u}" />`), ue.value = u,
|
|
255
|
-
},
|
|
256
|
+
n && (x.value.getQuill().clipboard.dangerouslyPasteHTML(n.index, `<img src="${u}" />`), ue.value = u, y("update:image", ue.value));
|
|
257
|
+
}, De = () => {
|
|
256
258
|
if (x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1), r.isCustomImageUpload) {
|
|
257
259
|
if (!x.value.getQuill().getSelection()) return;
|
|
258
|
-
|
|
260
|
+
y("upload-image", x.value);
|
|
259
261
|
return;
|
|
260
262
|
}
|
|
261
263
|
const u = document.createElement("input");
|
|
@@ -263,7 +265,7 @@ const It = { key: 1 }, Vt = {
|
|
|
263
265
|
const n = u.files[0], b = new FileReader();
|
|
264
266
|
b.onload = () => oe(b.result), b.readAsDataURL(n);
|
|
265
267
|
}, u.click();
|
|
266
|
-
},
|
|
268
|
+
}, He = (u) => /^data:image\/(png|jpg|jpeg|gif);base64,/.test(u), F = (u) => {
|
|
267
269
|
setTimeout(() => {
|
|
268
270
|
var b;
|
|
269
271
|
if (u) {
|
|
@@ -273,31 +275,31 @@ const It = { key: 1 }, Vt = {
|
|
|
273
275
|
if (xe && xe.length > 0)
|
|
274
276
|
for (let pe = 0; pe < xe.length; pe++) {
|
|
275
277
|
const ke = (b = xe[pe]) == null ? void 0 : b.getAttribute("src");
|
|
276
|
-
|
|
278
|
+
He(ke) && y("update:image", ke);
|
|
277
279
|
}
|
|
278
280
|
}
|
|
279
281
|
}, 100);
|
|
280
282
|
const { items: n } = u.clipboardData;
|
|
281
283
|
n.length && n[0].getAsString((b) => {
|
|
282
|
-
|
|
284
|
+
He(b) && (x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1));
|
|
283
285
|
});
|
|
284
286
|
}, _ = () => {
|
|
285
287
|
x.value.getQuill().theme.tooltip.edit("video");
|
|
286
288
|
}, Ve = (u) => {
|
|
287
289
|
x.value.getQuill().format("list", u), ae.value = u;
|
|
288
|
-
},
|
|
290
|
+
}, he = (u = void 0) => {
|
|
289
291
|
x.value.getQuill().format("align", u), ee.value = u;
|
|
290
292
|
}, de = v(""), qe = () => {
|
|
291
293
|
x.value.getQuill().format("color", de.value);
|
|
292
294
|
};
|
|
293
295
|
Je(() => {
|
|
294
|
-
|
|
296
|
+
Ue(r.initialFontSize || r.fontSizes[0].value), Se.value = !0;
|
|
295
297
|
});
|
|
296
|
-
const
|
|
298
|
+
const ye = v(100), ce = v(!1), Te = (u) => {
|
|
297
299
|
var b, P;
|
|
298
|
-
|
|
300
|
+
ye.value = u;
|
|
299
301
|
const n = (b = window.getSelection()) == null ? void 0 : b.focusNode;
|
|
300
|
-
n && n.nodeName !== "#text" && (x.value.getQuill().format("width", `${
|
|
302
|
+
n && n.nodeName !== "#text" && (x.value.getQuill().format("width", `${ye.value}%`), (P = n == null ? void 0 : n.querySelector("img")) == null || P.setAttribute("style", "margin:auto;display:block;"));
|
|
301
303
|
}, be = (u = "left") => {
|
|
302
304
|
var b, P;
|
|
303
305
|
const n = (b = window.getSelection()) == null ? void 0 : b.focusNode;
|
|
@@ -374,7 +376,7 @@ const It = { key: 1 }, Vt = {
|
|
|
374
376
|
_: 1
|
|
375
377
|
}, 8, ["modelValue", "confirmButtonProps"])
|
|
376
378
|
])),
|
|
377
|
-
|
|
379
|
+
h("div", {
|
|
378
380
|
class: Q(["grid", { "has-error": o.errorMessage }]),
|
|
379
381
|
onClick: Me
|
|
380
382
|
}, [
|
|
@@ -396,14 +398,14 @@ const It = { key: 1 }, Vt = {
|
|
|
396
398
|
onPaste: F
|
|
397
399
|
}, {
|
|
398
400
|
toolbar: W(() => [
|
|
399
|
-
|
|
401
|
+
h("div", {
|
|
400
402
|
id: z.value,
|
|
401
403
|
class: "flex min-h-[36px] flex-wrap !py-2 !px-3 gap-y-2 rounded-t"
|
|
402
404
|
}, [
|
|
403
405
|
f.value.includes("changes") ? (m(), E(ge, { key: 0 }, [
|
|
404
|
-
|
|
406
|
+
h("div", Lt, [
|
|
405
407
|
L(w(A), {
|
|
406
|
-
class: Q(
|
|
408
|
+
class: Q(O.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
|
|
407
409
|
width: "20",
|
|
408
410
|
height: "20",
|
|
409
411
|
name: "text-editor/undo",
|
|
@@ -414,11 +416,11 @@ const It = { key: 1 }, Vt = {
|
|
|
414
416
|
width: "20",
|
|
415
417
|
height: "20",
|
|
416
418
|
name: "text-editor/redo",
|
|
417
|
-
onClick:
|
|
419
|
+
onClick: Oe
|
|
418
420
|
}, null, 8, ["class"])
|
|
419
421
|
]),
|
|
420
|
-
n[16] || (n[16] =
|
|
421
|
-
], 64)) :
|
|
422
|
+
n[16] || (n[16] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
|
|
423
|
+
], 64)) : D("", !0),
|
|
422
424
|
f.value.includes("font-size") ? (m(), E(ge, { key: 1 }, [
|
|
423
425
|
L(w(rt), {
|
|
424
426
|
modelValue: j.value,
|
|
@@ -426,18 +428,18 @@ const It = { key: 1 }, Vt = {
|
|
|
426
428
|
class: "px-5"
|
|
427
429
|
}, {
|
|
428
430
|
menu: W(() => [
|
|
429
|
-
|
|
431
|
+
h("div", Rt, [
|
|
430
432
|
(m(!0), E(ge, null, Ke(o.fontSizes, (b) => (m(), E("div", {
|
|
431
433
|
key: b.value,
|
|
432
434
|
class: Q(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50", q.value === b.value ? "font-medium" : ""]),
|
|
433
|
-
onClick: (P) =>
|
|
435
|
+
onClick: (P) => Ue(b.value)
|
|
434
436
|
}, Pe(b.label), 11, Et))), 128))
|
|
435
437
|
])
|
|
436
438
|
]),
|
|
437
439
|
default: W(() => {
|
|
438
440
|
var b;
|
|
439
441
|
return [
|
|
440
|
-
|
|
442
|
+
h("div", Bt, [
|
|
441
443
|
ve(Pe((b = o.fontSizes.find((P) => P.value === q.value)) == null ? void 0 : b.label) + " ", 1),
|
|
442
444
|
L(w(A), {
|
|
443
445
|
width: "20",
|
|
@@ -450,12 +452,12 @@ const It = { key: 1 }, Vt = {
|
|
|
450
452
|
}),
|
|
451
453
|
_: 1
|
|
452
454
|
}, 8, ["modelValue"]),
|
|
453
|
-
n[17] || (n[17] =
|
|
454
|
-
], 64)) :
|
|
455
|
+
n[17] || (n[17] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
|
|
456
|
+
], 64)) : D("", !0),
|
|
455
457
|
f.value.includes("font-style") ? (m(), E(ge, { key: 2 }, [
|
|
456
|
-
|
|
458
|
+
h("div", Ot, [
|
|
457
459
|
L(w(A), {
|
|
458
|
-
class: Q(["cursor-pointer",
|
|
460
|
+
class: Q(["cursor-pointer", U.value ? "text-oc-text" : "text-oc-text-300"]),
|
|
459
461
|
width: "20",
|
|
460
462
|
height: "20",
|
|
461
463
|
name: "text-editor/bold",
|
|
@@ -476,9 +478,9 @@ const It = { key: 1 }, Vt = {
|
|
|
476
478
|
onClick: Ie
|
|
477
479
|
}, null, 8, ["class"])
|
|
478
480
|
]),
|
|
479
|
-
n[18] || (n[18] =
|
|
480
|
-
], 64)) :
|
|
481
|
-
|
|
481
|
+
n[18] || (n[18] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
|
|
482
|
+
], 64)) : D("", !0),
|
|
483
|
+
h("div", Ut, [
|
|
482
484
|
f.value.includes("link") ? (m(), N(w(A), {
|
|
483
485
|
key: 0,
|
|
484
486
|
class: "cursor-pointer",
|
|
@@ -486,15 +488,15 @@ const It = { key: 1 }, Vt = {
|
|
|
486
488
|
height: "20",
|
|
487
489
|
name: "text-editor/link",
|
|
488
490
|
onClick: me
|
|
489
|
-
})) :
|
|
491
|
+
})) : D("", !0),
|
|
490
492
|
f.value.includes("image") ? (m(), N(w(A), {
|
|
491
493
|
key: 1,
|
|
492
494
|
class: "cursor-pointer",
|
|
493
495
|
width: "20",
|
|
494
496
|
height: "20",
|
|
495
497
|
name: "text-editor/image",
|
|
496
|
-
onClick:
|
|
497
|
-
})) :
|
|
498
|
+
onClick: De
|
|
499
|
+
})) : D("", !0),
|
|
498
500
|
f.value.includes("quote") ? (m(), N(w(A), {
|
|
499
501
|
key: 2,
|
|
500
502
|
class: Q(["cursor-pointer", R.value ? "text-oc-text" : "text-oc-text-300"]),
|
|
@@ -502,7 +504,7 @@ const It = { key: 1 }, Vt = {
|
|
|
502
504
|
height: "20",
|
|
503
505
|
name: "text-editor/quote",
|
|
504
506
|
onClick: Ne
|
|
505
|
-
}, null, 8, ["class"])) :
|
|
507
|
+
}, null, 8, ["class"])) : D("", !0),
|
|
506
508
|
f.value.includes("media") ? (m(), N(w(A), {
|
|
507
509
|
key: 3,
|
|
508
510
|
class: "cursor-pointer",
|
|
@@ -510,7 +512,7 @@ const It = { key: 1 }, Vt = {
|
|
|
510
512
|
height: "20",
|
|
511
513
|
name: "text-editor/media",
|
|
512
514
|
onClick: _
|
|
513
|
-
})) :
|
|
515
|
+
})) : D("", !0),
|
|
514
516
|
L(w(A), {
|
|
515
517
|
class: "cursor-pointer",
|
|
516
518
|
width: "20",
|
|
@@ -520,8 +522,8 @@ const It = { key: 1 }, Vt = {
|
|
|
520
522
|
})
|
|
521
523
|
]),
|
|
522
524
|
f.value.includes("list") ? (m(), E(ge, { key: 3 }, [
|
|
523
|
-
n[19] || (n[19] =
|
|
524
|
-
|
|
525
|
+
n[19] || (n[19] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
|
|
526
|
+
h("div", Dt, [
|
|
525
527
|
L(w(A), {
|
|
526
528
|
class: Q(["cursor-pointer", ae.value === "bullet" ? "text-oc-text" : "text-oc-text-300"]),
|
|
527
529
|
width: "20",
|
|
@@ -537,42 +539,42 @@ const It = { key: 1 }, Vt = {
|
|
|
537
539
|
onClick: n[6] || (n[6] = (b) => Ve("ordered"))
|
|
538
540
|
}, null, 8, ["class"])
|
|
539
541
|
])
|
|
540
|
-
], 64)) :
|
|
542
|
+
], 64)) : D("", !0),
|
|
541
543
|
f.value.includes("alignment") ? (m(), E(ge, { key: 4 }, [
|
|
542
|
-
n[20] || (n[20] =
|
|
543
|
-
|
|
544
|
+
n[20] || (n[20] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
|
|
545
|
+
h("div", Ht, [
|
|
544
546
|
L(w(A), {
|
|
545
547
|
class: Q(["cursor-pointer", ee.value ? "text-oc-text-300" : "text-oc-text"]),
|
|
546
548
|
width: "20",
|
|
547
549
|
height: "20",
|
|
548
550
|
name: "text-editor/left",
|
|
549
|
-
onClick: n[7] || (n[7] = (b) =>
|
|
551
|
+
onClick: n[7] || (n[7] = (b) => he())
|
|
550
552
|
}, null, 8, ["class"]),
|
|
551
553
|
L(w(A), {
|
|
552
554
|
class: Q(["cursor-pointer", ee.value === "center" ? "text-oc-text" : "text-oc-text-300"]),
|
|
553
555
|
width: "20",
|
|
554
556
|
height: "20",
|
|
555
557
|
name: "text-editor/center",
|
|
556
|
-
onClick: n[8] || (n[8] = (b) =>
|
|
558
|
+
onClick: n[8] || (n[8] = (b) => he("center"))
|
|
557
559
|
}, null, 8, ["class"]),
|
|
558
560
|
L(w(A), {
|
|
559
561
|
class: Q(["cursor-pointer", ee.value === "right" ? "text-oc-text" : "text-oc-text-300"]),
|
|
560
562
|
width: "20",
|
|
561
563
|
height: "20",
|
|
562
564
|
name: "text-editor/right",
|
|
563
|
-
onClick: n[9] || (n[9] = (b) =>
|
|
565
|
+
onClick: n[9] || (n[9] = (b) => he("right"))
|
|
564
566
|
}, null, 8, ["class"]),
|
|
565
567
|
L(w(A), {
|
|
566
568
|
class: Q(["cursor-pointer", ee.value === "justify" ? "text-oc-text" : "text-oc-text-300"]),
|
|
567
569
|
width: "20",
|
|
568
570
|
height: "20",
|
|
569
571
|
name: "text-editor/justify",
|
|
570
|
-
onClick: n[10] || (n[10] = (b) =>
|
|
572
|
+
onClick: n[10] || (n[10] = (b) => he("justify"))
|
|
571
573
|
}, null, 8, ["class"])
|
|
572
574
|
])
|
|
573
|
-
], 64)) :
|
|
574
|
-
n[22] || (n[22] =
|
|
575
|
-
|
|
575
|
+
], 64)) : D("", !0),
|
|
576
|
+
n[22] || (n[22] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
|
|
577
|
+
h("div", Mt, [
|
|
576
578
|
L(w(Vt), {
|
|
577
579
|
modelValue: de.value,
|
|
578
580
|
"onUpdate:modelValue": [
|
|
@@ -582,11 +584,11 @@ const It = { key: 1 }, Vt = {
|
|
|
582
584
|
"hide-input-color": ""
|
|
583
585
|
}, {
|
|
584
586
|
"picker-icon": W(() => [
|
|
585
|
-
|
|
586
|
-
|
|
587
|
+
h("div", Qt, [
|
|
588
|
+
h("div", {
|
|
587
589
|
style: te(`color:${de.value}`)
|
|
588
590
|
}, "A", 4),
|
|
589
|
-
|
|
591
|
+
h("div", {
|
|
590
592
|
class: "h-[5px] w-full rounded border",
|
|
591
593
|
style: te(`background:${de.value}`)
|
|
592
594
|
}, null, 4)
|
|
@@ -595,17 +597,17 @@ const It = { key: 1 }, Vt = {
|
|
|
595
597
|
_: 1
|
|
596
598
|
}, 8, ["modelValue"])
|
|
597
599
|
]),
|
|
598
|
-
n[23] || (n[23] =
|
|
600
|
+
n[23] || (n[23] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
|
|
599
601
|
ce.value ? (m(), E("div", At, [
|
|
600
602
|
L(w(Ae), {
|
|
601
603
|
label: "Image width",
|
|
602
604
|
class: "w-[120px]",
|
|
603
|
-
"model-value":
|
|
605
|
+
"model-value": ye.value,
|
|
604
606
|
"min-limit": 0,
|
|
605
607
|
"max-limit": 100,
|
|
606
608
|
"onUpdate:modelValue": Te
|
|
607
609
|
}, null, 8, ["model-value"]),
|
|
608
|
-
|
|
610
|
+
h("div", Pt, [
|
|
609
611
|
L(w(A), {
|
|
610
612
|
class: "cursor-pointer",
|
|
611
613
|
width: "20",
|
|
@@ -628,8 +630,8 @@ const It = { key: 1 }, Vt = {
|
|
|
628
630
|
onClick: n[14] || (n[14] = (b) => be("right"))
|
|
629
631
|
})
|
|
630
632
|
])
|
|
631
|
-
])) :
|
|
632
|
-
|
|
633
|
+
])) : D("", !0),
|
|
634
|
+
h("div", Xt, [
|
|
633
635
|
(m(), E("svg", {
|
|
634
636
|
width: "20",
|
|
635
637
|
height: "20",
|
|
@@ -637,19 +639,19 @@ const It = { key: 1 }, Vt = {
|
|
|
637
639
|
fill: "none",
|
|
638
640
|
xmlns: "http://www.w3.org/2000/svg",
|
|
639
641
|
onClick: n[15] || (n[15] = (b) => Xe())
|
|
640
|
-
}, n[21] || (n[21] = [
|
|
641
|
-
|
|
642
|
+
}, [...n[21] || (n[21] = [
|
|
643
|
+
h("path", {
|
|
642
644
|
"fill-rule": "evenodd",
|
|
643
645
|
"clip-rule": "evenodd",
|
|
644
646
|
d: "M2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5Z",
|
|
645
647
|
fill: "#000000"
|
|
646
648
|
}, null, -1)
|
|
647
|
-
])))
|
|
649
|
+
])]))
|
|
648
650
|
])
|
|
649
651
|
], 8, Tt)
|
|
650
652
|
]),
|
|
651
653
|
_: 1
|
|
652
|
-
}, 8, ["id", "content", "options", "placeholder"])) :
|
|
654
|
+
}, 8, ["id", "content", "options", "placeholder"])) : D("", !0)
|
|
653
655
|
], 2)
|
|
654
656
|
]),
|
|
655
657
|
_: 1
|
|
@@ -666,7 +668,7 @@ const It = { key: 1 }, Vt = {
|
|
|
666
668
|
"update:modelValue": []
|
|
667
669
|
},
|
|
668
670
|
setup(o, { emit: V }) {
|
|
669
|
-
const r = o,
|
|
671
|
+
const r = o, y = V, d = v(""), f = (p) => {
|
|
670
672
|
d.value = p, d.value = `#${p.replace(/#/g, "")}`;
|
|
671
673
|
}, C = () => {
|
|
672
674
|
let p = d.value;
|
|
@@ -694,7 +696,7 @@ const It = { key: 1 }, Vt = {
|
|
|
694
696
|
default:
|
|
695
697
|
a = a.slice(0, 6);
|
|
696
698
|
}
|
|
697
|
-
d.value = `#${a.toUpperCase()}`,
|
|
699
|
+
d.value = `#${a.toUpperCase()}`, y("update:modelValue", d.value);
|
|
698
700
|
};
|
|
699
701
|
return fe(
|
|
700
702
|
() => r.modelValue,
|
|
@@ -730,27 +732,27 @@ const It = { key: 1 }, Vt = {
|
|
|
730
732
|
"update-hsl-value": []
|
|
731
733
|
},
|
|
732
734
|
setup(o, { emit: V }) {
|
|
733
|
-
const r = o,
|
|
735
|
+
const r = o, y = V, d = v({
|
|
734
736
|
r: 0,
|
|
735
737
|
g: 0,
|
|
736
738
|
b: 0
|
|
737
739
|
}), f = v(), C = v(), p = v(), a = (M, T) => {
|
|
738
|
-
var z,
|
|
740
|
+
var z, O, X;
|
|
739
741
|
let B = 255;
|
|
740
742
|
if (r.inputType == "HSL" && (B = 100, M == "r" && (B = 360)), !isNaN(parseInt(T))) {
|
|
741
743
|
if (M == "r") {
|
|
742
|
-
let
|
|
743
|
-
|
|
744
|
+
let U = parseInt(T);
|
|
745
|
+
U <= B && (d.value.r = U, r.inputType == "RGB" ? H("r") : Z()), (z = f.value) == null || z.focus();
|
|
744
746
|
} else if (M == "g") {
|
|
745
|
-
let
|
|
746
|
-
|
|
747
|
+
let U = parseInt(T);
|
|
748
|
+
U <= B && (d.value.g = U, r.inputType == "RGB" ? H("g") : Z()), (O = C.value) == null || O.focus();
|
|
747
749
|
} else if (M == "b") {
|
|
748
|
-
let
|
|
749
|
-
|
|
750
|
+
let U = parseInt(T);
|
|
751
|
+
U <= B && (d.value.b = U, r.inputType == "RGB" ? H("b") : Z()), (X = p.value) == null || X.focus();
|
|
750
752
|
}
|
|
751
753
|
}
|
|
752
|
-
},
|
|
753
|
-
|
|
754
|
+
}, H = (M) => {
|
|
755
|
+
y("update-rgb-value", {
|
|
754
756
|
type: M,
|
|
755
757
|
value: {
|
|
756
758
|
r: parseInt(d.value.r),
|
|
@@ -759,7 +761,7 @@ const It = { key: 1 }, Vt = {
|
|
|
759
761
|
}
|
|
760
762
|
});
|
|
761
763
|
}, Z = () => {
|
|
762
|
-
|
|
764
|
+
y("update-hsl-value", {
|
|
763
765
|
h: parseInt(d.value.r),
|
|
764
766
|
s: parseInt(d.value.g),
|
|
765
767
|
l: parseInt(d.value.b)
|
|
@@ -816,11 +818,11 @@ const It = { key: 1 }, Vt = {
|
|
|
816
818
|
"update:modelValue": []
|
|
817
819
|
},
|
|
818
820
|
setup(o, { emit: V }) {
|
|
819
|
-
const r = o,
|
|
821
|
+
const r = o, y = V, d = v(""), f = (p) => {
|
|
820
822
|
d.value = p;
|
|
821
823
|
}, C = () => {
|
|
822
824
|
let p = parseInt(d.value);
|
|
823
|
-
p && p <= 100 ?
|
|
825
|
+
p && p <= 100 ? y("update:modelValue", p) : d.value = r.modelValue;
|
|
824
826
|
};
|
|
825
827
|
return fe(
|
|
826
828
|
() => r.modelValue,
|
|
@@ -836,9 +838,9 @@ const It = { key: 1 }, Vt = {
|
|
|
836
838
|
onBlur: C,
|
|
837
839
|
onKeyup: ot(C, ["enter"])
|
|
838
840
|
}, {
|
|
839
|
-
leading: W(() => a[0] || (a[0] = [
|
|
840
|
-
ve("%")
|
|
841
|
-
])),
|
|
841
|
+
leading: W(() => [...a[0] || (a[0] = [
|
|
842
|
+
ve("%", -1)
|
|
843
|
+
])]),
|
|
842
844
|
_: 1
|
|
843
845
|
}, 8, ["model-value"]));
|
|
844
846
|
}
|
|
@@ -849,12 +851,12 @@ const It = { key: 1 }, Vt = {
|
|
|
849
851
|
},
|
|
850
852
|
emits: ["update:model-value"],
|
|
851
853
|
setup(o, { emit: V }) {
|
|
852
|
-
const
|
|
853
|
-
|
|
854
|
+
const y = v(o.modelValue), d = V, f = (C) => {
|
|
855
|
+
y.value = C, d("update:model-value", C);
|
|
854
856
|
};
|
|
855
857
|
return (C, p) => (m(), N(w(Ze), {
|
|
856
858
|
class: "!w-[80px]",
|
|
857
|
-
"model-value":
|
|
859
|
+
"model-value": y.value,
|
|
858
860
|
options: [
|
|
859
861
|
{
|
|
860
862
|
label: "HEX",
|
|
@@ -879,12 +881,12 @@ const It = { key: 1 }, Vt = {
|
|
|
879
881
|
},
|
|
880
882
|
emits: ["update:modelValue", "onInput"],
|
|
881
883
|
setup(o, { emit: V }) {
|
|
882
|
-
const r = Re("opacitySlider"),
|
|
883
|
-
|
|
884
|
+
const r = Re("opacitySlider"), y = V, d = (f) => {
|
|
885
|
+
y("update:modelValue", parseInt(f.target.value)), y("onInput", f);
|
|
884
886
|
};
|
|
885
887
|
return (f, C) => (m(), E("div", Yt, [
|
|
886
|
-
|
|
887
|
-
|
|
888
|
+
h("div", Wt, [
|
|
889
|
+
h("input", {
|
|
888
890
|
ref_key: "opacitySlider",
|
|
889
891
|
ref: r,
|
|
890
892
|
value: o.modelValue,
|
|
@@ -904,26 +906,26 @@ const It = { key: 1 }, Vt = {
|
|
|
904
906
|
},
|
|
905
907
|
emits: ["onAddColor", "onMouseDown", "onDeleteColor"],
|
|
906
908
|
setup(o, { emit: V }) {
|
|
907
|
-
const r = Re("gradientBar"),
|
|
909
|
+
const r = Re("gradientBar"), y = v(), d = V, f = (T) => {
|
|
908
910
|
T.preventDefault();
|
|
909
911
|
}, C = v("left:0"), p = v(!1), a = (T) => {
|
|
910
912
|
d("onMouseDown", T);
|
|
911
|
-
},
|
|
912
|
-
let T =
|
|
913
|
+
}, H = () => {
|
|
914
|
+
let T = y.value.querySelector(".select");
|
|
913
915
|
C.value = T == null ? void 0 : T.getAttribute("style");
|
|
914
916
|
}, Z = () => {
|
|
915
917
|
var B;
|
|
916
|
-
|
|
918
|
+
H(), (((B = y.value.querySelectorAll(".gradient-handle")) == null ? void 0 : B.length) ?? 2) > 2 ? p.value = !0 : p.value = !1;
|
|
917
919
|
}, M = (T) => {
|
|
918
920
|
p.value = !1, d("onAddColor", T);
|
|
919
921
|
};
|
|
920
922
|
return (T, B) => (m(), E("div", {
|
|
921
923
|
ref_key: "gradientSlider",
|
|
922
|
-
ref:
|
|
924
|
+
ref: y,
|
|
923
925
|
class: "relative h-[40px]",
|
|
924
926
|
onClick: Z
|
|
925
927
|
}, [
|
|
926
|
-
|
|
928
|
+
h("button", {
|
|
927
929
|
type: "button",
|
|
928
930
|
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"]),
|
|
929
931
|
style: te(C.value),
|
|
@@ -935,7 +937,7 @@ const It = { key: 1 }, Vt = {
|
|
|
935
937
|
height: "14"
|
|
936
938
|
})
|
|
937
939
|
], 6),
|
|
938
|
-
|
|
940
|
+
h("div", {
|
|
939
941
|
class: Q(["gradient-bar", {
|
|
940
942
|
"mt-[20px]": o.gradientType === "linear",
|
|
941
943
|
"mt-[12px]": o.gradientType === "radial"
|
|
@@ -943,7 +945,7 @@ const It = { key: 1 }, Vt = {
|
|
|
943
945
|
onMousedown: a,
|
|
944
946
|
onDragstart: f
|
|
945
947
|
}, [
|
|
946
|
-
|
|
948
|
+
h("div", {
|
|
947
949
|
ref_key: "gradientBar",
|
|
948
950
|
ref: r,
|
|
949
951
|
class: "gradient-container",
|
|
@@ -959,18 +961,18 @@ const It = { key: 1 }, Vt = {
|
|
|
959
961
|
},
|
|
960
962
|
emits: ["update:modelValue", "onInput", "onChange"],
|
|
961
963
|
setup(o, { emit: V }) {
|
|
962
|
-
const r = V,
|
|
964
|
+
const r = V, y = (d) => {
|
|
963
965
|
r("update:modelValue", parseFloat(d.target.value)), r("onInput", d);
|
|
964
966
|
};
|
|
965
967
|
return (d, f) => (m(), E("div", Zt, [
|
|
966
|
-
|
|
968
|
+
h("input", {
|
|
967
969
|
value: o.modelValue,
|
|
968
970
|
class: "picker-hue-range-slider",
|
|
969
971
|
type: "range",
|
|
970
972
|
min: "0",
|
|
971
973
|
max: "360",
|
|
972
974
|
step: "0.1",
|
|
973
|
-
onInput:
|
|
975
|
+
onInput: y,
|
|
974
976
|
onChange: f[0] || (f[0] = (C) => d.$emit("onChange", C))
|
|
975
977
|
}, null, 40, Jt)
|
|
976
978
|
]));
|
|
@@ -992,9 +994,9 @@ const It = { key: 1 }, Vt = {
|
|
|
992
994
|
},
|
|
993
995
|
emits: ["update:angle", "update:percentageX", "update:percentageY", "onInput"],
|
|
994
996
|
setup(o, { emit: V }) {
|
|
995
|
-
const r = v(!1),
|
|
997
|
+
const r = v(!1), y = v(!1);
|
|
996
998
|
Je(() => {
|
|
997
|
-
r.value = !0,
|
|
999
|
+
r.value = !0, y.value = !0;
|
|
998
1000
|
});
|
|
999
1001
|
const d = V, f = (C, p) => {
|
|
1000
1002
|
let a = parseInt(C);
|
|
@@ -1019,16 +1021,16 @@ const It = { key: 1 }, Vt = {
|
|
|
1019
1021
|
"max-limit": 360,
|
|
1020
1022
|
"onUpdate:modelValue": p[0] || (p[0] = (a) => f(a, "angle"))
|
|
1021
1023
|
}, {
|
|
1022
|
-
"min-limit-label": W(() => p[3] || (p[3] = [
|
|
1023
|
-
ve("0 ")
|
|
1024
|
-
])),
|
|
1025
|
-
"max-limit-label": W(() => p[4] || (p[4] = [
|
|
1026
|
-
ve("360"),
|
|
1027
|
-
|
|
1028
|
-
])),
|
|
1024
|
+
"min-limit-label": W(() => [...p[3] || (p[3] = [
|
|
1025
|
+
ve("0 ", -1)
|
|
1026
|
+
])]),
|
|
1027
|
+
"max-limit-label": W(() => [...p[4] || (p[4] = [
|
|
1028
|
+
ve("360", -1),
|
|
1029
|
+
h("span", null, "°", -1)
|
|
1030
|
+
])]),
|
|
1029
1031
|
_: 1
|
|
1030
|
-
}, 8, ["model-value"])) :
|
|
1031
|
-
o.gradientType == "radial" &&
|
|
1032
|
+
}, 8, ["model-value"])) : D("", !0),
|
|
1033
|
+
o.gradientType == "radial" && y.value ? (m(), E("div", tl, [
|
|
1032
1034
|
L(w(Ae), {
|
|
1033
1035
|
label: "Position X",
|
|
1034
1036
|
"model-value": o.percentageX,
|
|
@@ -1036,12 +1038,12 @@ const It = { key: 1 }, Vt = {
|
|
|
1036
1038
|
"max-limit": 100,
|
|
1037
1039
|
"onUpdate:modelValue": p[1] || (p[1] = (a) => f(a, "percentageX"))
|
|
1038
1040
|
}, {
|
|
1039
|
-
"min-limit-label": W(() => p[5] || (p[5] = [
|
|
1040
|
-
ve("0")
|
|
1041
|
-
])),
|
|
1042
|
-
"max-limit-label": W(() => p[6] || (p[6] = [
|
|
1043
|
-
ve("100%")
|
|
1044
|
-
])),
|
|
1041
|
+
"min-limit-label": W(() => [...p[5] || (p[5] = [
|
|
1042
|
+
ve("0", -1)
|
|
1043
|
+
])]),
|
|
1044
|
+
"max-limit-label": W(() => [...p[6] || (p[6] = [
|
|
1045
|
+
ve("100%", -1)
|
|
1046
|
+
])]),
|
|
1045
1047
|
_: 1
|
|
1046
1048
|
}, 8, ["model-value"]),
|
|
1047
1049
|
L(w(Ae), {
|
|
@@ -1051,22 +1053,22 @@ const It = { key: 1 }, Vt = {
|
|
|
1051
1053
|
"max-limit": 100,
|
|
1052
1054
|
"onUpdate:modelValue": p[2] || (p[2] = (a) => f(a, "percentageY"))
|
|
1053
1055
|
}, {
|
|
1054
|
-
"min-limit-label": W(() => p[7] || (p[7] = [
|
|
1055
|
-
ve("0")
|
|
1056
|
-
])),
|
|
1057
|
-
"max-limit-label": W(() => p[8] || (p[8] = [
|
|
1058
|
-
ve("100%")
|
|
1059
|
-
])),
|
|
1056
|
+
"min-limit-label": W(() => [...p[7] || (p[7] = [
|
|
1057
|
+
ve("0", -1)
|
|
1058
|
+
])]),
|
|
1059
|
+
"max-limit-label": W(() => [...p[8] || (p[8] = [
|
|
1060
|
+
ve("100%", -1)
|
|
1061
|
+
])]),
|
|
1060
1062
|
_: 1
|
|
1061
1063
|
}, 8, ["model-value"])
|
|
1062
|
-
])) :
|
|
1064
|
+
])) : D("", !0)
|
|
1063
1065
|
]));
|
|
1064
1066
|
}
|
|
1065
1067
|
}, al = {
|
|
1066
1068
|
__name: "PickerWrap",
|
|
1067
1069
|
emits: ["onMouseDown"],
|
|
1068
1070
|
setup(o) {
|
|
1069
|
-
const V = Re("canvas"), r = Re("pickerWrap"),
|
|
1071
|
+
const V = Re("canvas"), r = Re("pickerWrap"), y = Re("pickerPointer"), d = (f) => {
|
|
1070
1072
|
f.preventDefault();
|
|
1071
1073
|
};
|
|
1072
1074
|
return (f, C) => (m(), E("div", {
|
|
@@ -1076,15 +1078,15 @@ const It = { key: 1 }, Vt = {
|
|
|
1076
1078
|
onMousedown: C[0] || (C[0] = (p) => f.$emit("onMouseDown", p)),
|
|
1077
1079
|
onDragstart: d
|
|
1078
1080
|
}, [
|
|
1079
|
-
|
|
1081
|
+
h("canvas", {
|
|
1080
1082
|
ref_key: "canvas",
|
|
1081
1083
|
ref: V,
|
|
1082
1084
|
class: "colour-area"
|
|
1083
1085
|
}, null, 512),
|
|
1084
|
-
C[1] || (C[1] =
|
|
1085
|
-
|
|
1086
|
+
C[1] || (C[1] = h("div", { class: "colour-area-mask" }, null, -1)),
|
|
1087
|
+
h("div", {
|
|
1086
1088
|
ref_key: "pickerPointer",
|
|
1087
|
-
ref:
|
|
1089
|
+
ref: y,
|
|
1088
1090
|
class: "colour-area-point-circle"
|
|
1089
1091
|
}, null, 512)
|
|
1090
1092
|
], 544));
|
|
@@ -1117,32 +1119,32 @@ const It = { key: 1 }, Vt = {
|
|
|
1117
1119
|
emits: ["onChangeMode"],
|
|
1118
1120
|
setup(o) {
|
|
1119
1121
|
return (V, r) => (m(), E("div", nl, [
|
|
1120
|
-
|
|
1122
|
+
h("button", {
|
|
1121
1123
|
type: "button",
|
|
1122
1124
|
class: Q(o.mode == "solid" ? "active" : ""),
|
|
1123
1125
|
style: { padding: "7px" },
|
|
1124
|
-
onClick: r[0] || (r[0] = (
|
|
1126
|
+
onClick: r[0] || (r[0] = (y) => V.$emit("onChangeMode", "solid"))
|
|
1125
1127
|
}, [
|
|
1126
1128
|
o.modelValue && o.mode == "solid" ? (m(), E("div", {
|
|
1127
1129
|
key: 0,
|
|
1128
1130
|
class: "w-[28px] h-[28px] rounded-full border",
|
|
1129
1131
|
style: te(`background:${o.modelValue}`)
|
|
1130
|
-
}, null, 4)) : (m(), E("svg", ol, r[3] || (r[3] = [
|
|
1131
|
-
|
|
1132
|
-
|
|
1132
|
+
}, null, 4)) : (m(), E("svg", ol, [...r[3] || (r[3] = [
|
|
1133
|
+
h("g", { opacity: "0.5" }, [
|
|
1134
|
+
h("path", {
|
|
1133
1135
|
d: "M0 14C0 6.26801 6.26801 0 14 0C21.732 0 28 6.26801 28 14C28 21.732 21.732 28 14 28C6.26801 28 0 21.732 0 14Z",
|
|
1134
1136
|
fill: "#03102F"
|
|
1135
1137
|
})
|
|
1136
1138
|
], -1)
|
|
1137
|
-
])))
|
|
1139
|
+
])]))
|
|
1138
1140
|
], 2),
|
|
1139
|
-
|
|
1141
|
+
h("button", {
|
|
1140
1142
|
type: "button",
|
|
1141
1143
|
class: Q(o.gradientType == "linear" && o.mode != "solid" ? "active" : ""),
|
|
1142
1144
|
style: te(`${o.iconClasses.linear ? "" : "padding: 7px;"}`),
|
|
1143
|
-
onClick: r[1] || (r[1] = (
|
|
1145
|
+
onClick: r[1] || (r[1] = (y) => V.$emit("onChangeMode", "linear"))
|
|
1144
1146
|
}, [
|
|
1145
|
-
|
|
1147
|
+
h("div", {
|
|
1146
1148
|
class: "w-[28px] h-[28px] rounded-full border",
|
|
1147
1149
|
style: te(
|
|
1148
1150
|
o.modelValue && o.gradientType == "linear" && o.mode != "solid" ? `background:${o.modelValue}` : `
|
|
@@ -1155,13 +1157,13 @@ const It = { key: 1 }, Vt = {
|
|
|
1155
1157
|
)
|
|
1156
1158
|
}, null, 4)
|
|
1157
1159
|
], 6),
|
|
1158
|
-
|
|
1160
|
+
h("button", {
|
|
1159
1161
|
type: "button",
|
|
1160
1162
|
class: Q(o.gradientType == "radial" && o.mode != "solid" ? "active" : ""),
|
|
1161
1163
|
style: te(`${o.iconClasses.radial ? "" : "padding: 6px;"}`),
|
|
1162
|
-
onClick: r[2] || (r[2] = (
|
|
1164
|
+
onClick: r[2] || (r[2] = (y) => V.$emit("onChangeMode", "radial"))
|
|
1163
1165
|
}, [
|
|
1164
|
-
|
|
1166
|
+
h("div", {
|
|
1165
1167
|
class: "w-[28px] h-[28px] rounded-full border",
|
|
1166
1168
|
style: te(
|
|
1167
1169
|
o.modelValue && o.gradientType == "radial" && o.mode != "solid" ? `background:${o.modelValue}` : "background: radial-gradient(circle at 50% 50%, rgb(255, 255, 255) 0%, rgb(3, 16, 47) 100%);"
|
|
@@ -1176,10 +1178,10 @@ const It = { key: 1 }, Vt = {
|
|
|
1176
1178
|
}, ul = {
|
|
1177
1179
|
key: 1,
|
|
1178
1180
|
class: "grid items-center mb-5"
|
|
1179
|
-
}, dl = { key: 2 }, cl = { key: 0 }, pl = { class: "ck-cp-local-color-conatiner" }, gl = ["onClick"], vl = { class: "flex items-center gap-2" }, ml = { id: "ck-cp-target-background" }, fl = { class: "flex gap-3" },
|
|
1181
|
+
}, dl = { key: 2 }, cl = { key: 0 }, pl = { class: "ck-cp-local-color-conatiner" }, gl = ["onClick"], vl = { class: "flex items-center gap-2" }, ml = { id: "ck-cp-target-background" }, fl = { class: "flex gap-3" }, hl = {
|
|
1180
1182
|
key: 0,
|
|
1181
1183
|
class: "w-full flex gap-3"
|
|
1182
|
-
},
|
|
1184
|
+
}, yl = {
|
|
1183
1185
|
key: 4,
|
|
1184
1186
|
class: "ck-cp-local-color-conatiner"
|
|
1185
1187
|
}, bl = ["onClick"], xl = {
|
|
@@ -1219,43 +1221,43 @@ const It = { key: 1 }, Vt = {
|
|
|
1219
1221
|
},
|
|
1220
1222
|
emits: ["update:modelValue", "last-used-pick"],
|
|
1221
1223
|
setup(o, { emit: V }) {
|
|
1222
|
-
const r = o,
|
|
1224
|
+
const r = o, y = v(r.variant == "gradient" ? "gradient" : "solid"), d = v(null), f = V, C = v(r.modelValue), p = (t) => {
|
|
1223
1225
|
C.value = t, X.value && f("update:modelValue", t);
|
|
1224
1226
|
}, a = v([
|
|
1225
1227
|
{ id: 1, r: 68, g: 71, b: 119, a: 100, percent: 0, hue: 0, select: !0 },
|
|
1226
1228
|
{ id: 2, r: 0, g: 0, b: 255, a: 100, percent: 100, hue: 0, select: !1 }
|
|
1227
|
-
]),
|
|
1229
|
+
]), H = v(r.lastUsedColors);
|
|
1228
1230
|
fe(
|
|
1229
1231
|
() => r.lastUsedColors,
|
|
1230
1232
|
() => {
|
|
1231
|
-
|
|
1233
|
+
H.value = r.lastUsedColors;
|
|
1232
1234
|
},
|
|
1233
1235
|
{
|
|
1234
1236
|
deep: !0
|
|
1235
1237
|
}
|
|
1236
1238
|
);
|
|
1237
|
-
const Z = $e(() => r.variant !== "gradient" ?
|
|
1239
|
+
const Z = $e(() => r.variant !== "gradient" ? H.value.filter((t) => !t.includes("linear") && !t.includes("radial")) : H.value), M = v(!1), T = v("linear"), B = _e({
|
|
1238
1240
|
angle: 90,
|
|
1239
1241
|
percentageX: 50,
|
|
1240
1242
|
percentageY: 50
|
|
1241
|
-
}), z = v(""),
|
|
1243
|
+
}), z = v(""), O = v(r.inputType), X = v(!1), U = v(), le = v(), J = v(), j = v(), R = v(), q = _e({
|
|
1242
1244
|
h: 0,
|
|
1243
1245
|
s: 0,
|
|
1244
1246
|
l: 0
|
|
1245
1247
|
});
|
|
1246
|
-
Be("gradientBar", le), Be("canvas", J), Be("pickerWrap", j), Be("pickerPointer", R), Be("opacitySlider",
|
|
1248
|
+
Be("gradientBar", le), Be("canvas", J), Be("pickerWrap", j), Be("pickerPointer", R), Be("opacitySlider", U);
|
|
1247
1249
|
let ae = 0, ee = 0, x = 0, Se = 0, ue = 0, ie = 0;
|
|
1248
1250
|
const Xe = (t) => {
|
|
1249
|
-
!j.value || !R.value || (ue = j.value.offsetHeight - R.value.offsetHeight, ie = j.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), P(), window.addEventListener("mousemove", Ee), window.addEventListener("mouseup",
|
|
1251
|
+
!j.value || !R.value || (ue = j.value.offsetHeight - R.value.offsetHeight, ie = j.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), P(), window.addEventListener("mousemove", Ee), window.addEventListener("mouseup", Oe));
|
|
1250
1252
|
}, Ee = (t) => {
|
|
1251
1253
|
t.preventDefault();
|
|
1252
1254
|
const e = j.value.getBoundingClientRect(), l = t.clientX - e.left - R.value.offsetWidth / 2, i = t.clientY - e.top - R.value.offsetHeight / 2;
|
|
1253
1255
|
l >= 0 && l <= ie ? (ae = l, R.value.style.left = `${l}px`) : 0 > l ? (ae = 0, R.value.style.left = "0px") : l > ie && (ae = ie, R.value.style.left = `${ie}px`), i >= 0 && i <= ue ? (ee = i, R.value.style.top = `${i}px`) : 0 > i ? (ee = 0, R.value.style.top = "0px") : i > ue && (ee = ue, R.value.style.top = `${ue}px`), Ce(!1), P();
|
|
1254
|
-
},
|
|
1255
|
-
window.removeEventListener("mousemove", Ee), window.removeEventListener("mouseup",
|
|
1256
|
+
}, Oe = () => {
|
|
1257
|
+
window.removeEventListener("mousemove", Ee), window.removeEventListener("mouseup", Oe);
|
|
1256
1258
|
}, Ce = (t) => {
|
|
1257
1259
|
if (!t) {
|
|
1258
|
-
let e =
|
|
1260
|
+
let e = Ue();
|
|
1259
1261
|
const l = at(ne.value, e.s, e.l);
|
|
1260
1262
|
if (l) {
|
|
1261
1263
|
if (X.value) {
|
|
@@ -1270,7 +1272,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1270
1272
|
Me(e), setTimeout(() => {
|
|
1271
1273
|
Ce(t), P();
|
|
1272
1274
|
}, 0);
|
|
1273
|
-
},
|
|
1275
|
+
}, Ue = () => {
|
|
1274
1276
|
let t = { s: 0, l: 0 }, e = j.value.offsetWidth - R.value.offsetWidth, l = j.value.offsetHeight - R.value.offsetHeight, i = parseInt(R.value.style.left), c = 1 - parseInt(R.value.style.top) / l, k = i / e;
|
|
1275
1277
|
return t.l = c / 2 * (2 - k), t.s = c * 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;
|
|
1276
1278
|
}, me = () => {
|
|
@@ -1293,12 +1295,12 @@ const It = { key: 1 }, Vt = {
|
|
|
1293
1295
|
}, Ne = () => {
|
|
1294
1296
|
const t = a.value.find((e) => e.select == !0);
|
|
1295
1297
|
t && (t.hue = ne.value);
|
|
1296
|
-
}, oe = v(100),
|
|
1298
|
+
}, oe = v(100), De = (t) => {
|
|
1297
1299
|
if (r.showAlpha) {
|
|
1298
1300
|
const e = a.value.find((l) => l.select == !0);
|
|
1299
1301
|
e && (e.a = parseInt(t), G());
|
|
1300
1302
|
}
|
|
1301
|
-
},
|
|
1303
|
+
}, He = (t) => {
|
|
1302
1304
|
var l, i, s, c;
|
|
1303
1305
|
const e = (i = (l = d.value) == null ? void 0 : l.querySelector(".gradient-handle-content")) == null ? void 0 : i.getBoundingClientRect();
|
|
1304
1306
|
return t === 0 ? "0px" : t === 100 && e ? `${(((s = le.value) == null ? void 0 : s.offsetWidth) || 0) - (e.width || 0)}px` : `${(((c = le.value) == null ? void 0 : c.offsetWidth) || 0) * (t / 100) - ((e == null ? void 0 : e.width) || 0) / 2}px`;
|
|
@@ -1323,9 +1325,9 @@ const It = { key: 1 }, Vt = {
|
|
|
1323
1325
|
}
|
|
1324
1326
|
}
|
|
1325
1327
|
}
|
|
1326
|
-
window.addEventListener("mousemove", de), window.addEventListener("mouseup",
|
|
1328
|
+
window.addEventListener("mousemove", de), window.addEventListener("mouseup", he);
|
|
1327
1329
|
}
|
|
1328
|
-
},
|
|
1330
|
+
}, he = () => {
|
|
1329
1331
|
window.removeEventListener("mousemove", de), window.removeEventListener("mouseup", Ve);
|
|
1330
1332
|
}, de = (t) => {
|
|
1331
1333
|
var c, k;
|
|
@@ -1354,7 +1356,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1354
1356
|
a.value[i].select = !1;
|
|
1355
1357
|
const k = (I = d.value) == null ? void 0 : I.querySelector(".gradient-handle.select");
|
|
1356
1358
|
k == null || k.classList.remove("select"), a.value = [...a.value, c], be(c), _ = ($ = d.value) == null ? void 0 : $.querySelector(`#clr-gb-${c.id}`), G();
|
|
1357
|
-
},
|
|
1359
|
+
}, ye = (t) => {
|
|
1358
1360
|
if (t.r == 0 && t.g == 0 && t.b == 0)
|
|
1359
1361
|
return !0;
|
|
1360
1362
|
if (t.r == 255 && t.g == 255 && t.b == 255)
|
|
@@ -1371,7 +1373,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1371
1373
|
}
|
|
1372
1374
|
}, ce = (t, e, l, i, s) => {
|
|
1373
1375
|
setTimeout(() => {
|
|
1374
|
-
if (
|
|
1376
|
+
if (ye({ r: t, g: e, b: l })) {
|
|
1375
1377
|
let c = me();
|
|
1376
1378
|
c && (R.value.style.left = `${c.x}px`, R.value.style.top = `${c.y}px`);
|
|
1377
1379
|
} else {
|
|
@@ -1386,9 +1388,9 @@ const It = { key: 1 }, Vt = {
|
|
|
1386
1388
|
let e = me();
|
|
1387
1389
|
e && (R.value.style.left = `${e.x}px`, R.value.style.top = `${e.y}px`), K(), G();
|
|
1388
1390
|
}, be = (t) => {
|
|
1389
|
-
if (
|
|
1391
|
+
if (y.value == "gradient") {
|
|
1390
1392
|
let e = document.createElement("div");
|
|
1391
|
-
e.id = `clr-gb-${t.id}`, e.classList.add("gradient-handle"), e.style.left =
|
|
1393
|
+
e.id = `clr-gb-${t.id}`, e.classList.add("gradient-handle"), e.style.left = He(t.percent);
|
|
1392
1394
|
let l = document.createElement("div");
|
|
1393
1395
|
l.classList.add("gradient-handle-content"), t.select == !0 && e.classList.add("select"), e.appendChild(l), F && F.appendChild(e);
|
|
1394
1396
|
}
|
|
@@ -1402,11 +1404,11 @@ const It = { key: 1 }, Vt = {
|
|
|
1402
1404
|
}, K = () => {
|
|
1403
1405
|
if (r.showAlpha) {
|
|
1404
1406
|
let t = a.value.find((e) => e.select == !0);
|
|
1405
|
-
t && (
|
|
1407
|
+
t && (U.value.style.background = ` linear-gradient(90deg,rgba(255, 255, 255, 0) 0%, rgba(${t.r}, ${t.g}, ${t.b}, 100) 97%)`);
|
|
1406
1408
|
}
|
|
1407
1409
|
}, G = () => {
|
|
1408
1410
|
var t;
|
|
1409
|
-
if (
|
|
1411
|
+
if (y.value == "gradient") {
|
|
1410
1412
|
a.value.sort((s, c) => s.percent - c.percent);
|
|
1411
1413
|
let e = "linear-gradient(90deg, ", l;
|
|
1412
1414
|
if (T.value == "linear") {
|
|
@@ -1470,7 +1472,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1470
1472
|
const { sRGBHex: s } = i, c = a.value.find((I) => I.select == !0), k = ze(s);
|
|
1471
1473
|
if (k) {
|
|
1472
1474
|
const I = Qe(k.r, k.g, k.b);
|
|
1473
|
-
if (c && (c.hue = I, c.r = k.r, c.g = k.g, c.b = k.b),
|
|
1475
|
+
if (c && (c.hue = I, c.r = k.r, c.g = k.g, c.b = k.b), ye(k)) {
|
|
1474
1476
|
const $ = me();
|
|
1475
1477
|
$ && (R.value.style.left = `${$.x}px`, R.value.style.top = `${$.y}px`);
|
|
1476
1478
|
} else {
|
|
@@ -1508,18 +1510,18 @@ const It = { key: 1 }, Vt = {
|
|
|
1508
1510
|
const t = ze(z.value);
|
|
1509
1511
|
if (t) {
|
|
1510
1512
|
const e = Qe(t.r, t.g, t.b), l = a.value.find((i) => i.select == !0);
|
|
1511
|
-
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), G(), K(), pe(
|
|
1513
|
+
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), G(), K(), pe(O.value));
|
|
1512
1514
|
}
|
|
1513
1515
|
}
|
|
1514
1516
|
}, P = () => {
|
|
1515
1517
|
const t = a.value.find((e) => e.select == !0);
|
|
1516
|
-
t && (z.value = tt(t.r, t.g, t.b).toUpperCase()), pe(
|
|
1518
|
+
t && (z.value = tt(t.r, t.g, t.b).toUpperCase()), pe(O.value);
|
|
1517
1519
|
}, se = (t) => {
|
|
1518
1520
|
f("last-used-pick", t);
|
|
1519
1521
|
};
|
|
1520
1522
|
window.EyeDropper && (M.value = !0);
|
|
1521
1523
|
const xe = (t = "") => {
|
|
1522
|
-
if (
|
|
1524
|
+
if (y.value == "gradient") {
|
|
1523
1525
|
let e = t.includes("linear") ? "linear" : "radial", l = [];
|
|
1524
1526
|
if (T.value = e, e == "linear") {
|
|
1525
1527
|
let i = /^linear-gradient\((.*)\)$/, s = t.replace(";", "").trim().match(i), c = /,\s*(?![^()]*\))/;
|
|
@@ -1613,7 +1615,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1613
1615
|
break;
|
|
1614
1616
|
}
|
|
1615
1617
|
}
|
|
1616
|
-
|
|
1618
|
+
O.value = t;
|
|
1617
1619
|
}
|
|
1618
1620
|
}, ke = (t) => {
|
|
1619
1621
|
t && xe(t), Te();
|
|
@@ -1631,16 +1633,16 @@ const It = { key: 1 }, Vt = {
|
|
|
1631
1633
|
a.value.forEach((e) => {
|
|
1632
1634
|
const l = F == null ? void 0 : F.querySelector(`#clr-gb-${e.id}`);
|
|
1633
1635
|
l == null || l.remove();
|
|
1634
|
-
}), t !== "solid" ? (
|
|
1636
|
+
}), t !== "solid" ? (y.value = "gradient", setTimeout(() => {
|
|
1635
1637
|
var e;
|
|
1636
1638
|
F = (e = d.value) == null ? void 0 : e.querySelector(".gradient-bar"), Fe(t), Te();
|
|
1637
|
-
}, 200)) : t === "solid" && (
|
|
1639
|
+
}, 200)) : t === "solid" && (y.value = "solid", a.value = a.value.map((e) => (e.select = !1, e)), a.value[0].select = !0, setTimeout(() => {
|
|
1638
1640
|
ke(r.modelValue);
|
|
1639
1641
|
}, 200));
|
|
1640
1642
|
};
|
|
1641
1643
|
return Je(() => {
|
|
1642
1644
|
var t;
|
|
1643
|
-
|
|
1645
|
+
y.value = r.modelValue.includes("linear") || r.modelValue.includes("radial") ? "gradient" : "solid", y.value == "gradient" && (F = (t = d.value) == null ? void 0 : t.querySelector(".gradient-bar")), ke(r.modelValue), pe(O.value), ft(() => {
|
|
1644
1646
|
X.value = !0;
|
|
1645
1647
|
});
|
|
1646
1648
|
}), (t, e) => (m(), E("div", {
|
|
@@ -1653,14 +1655,14 @@ const It = { key: 1 }, Vt = {
|
|
|
1653
1655
|
L(il, {
|
|
1654
1656
|
class: "mr-auto",
|
|
1655
1657
|
variant: o.variant,
|
|
1656
|
-
mode:
|
|
1658
|
+
mode: y.value,
|
|
1657
1659
|
"model-value": o.modelValue,
|
|
1658
1660
|
iconClasses: o.iconClasses,
|
|
1659
1661
|
gradientType: T.value,
|
|
1660
1662
|
onOnChangeMode: ut
|
|
1661
1663
|
}, null, 8, ["variant", "mode", "model-value", "iconClasses", "gradientType"])
|
|
1662
|
-
])) :
|
|
1663
|
-
|
|
1664
|
+
])) : D("", !0),
|
|
1665
|
+
y.value == "gradient" && o.variant == "gradient" ? (m(), E("div", ul, [
|
|
1664
1666
|
L(Kt, {
|
|
1665
1667
|
gradientType: T.value,
|
|
1666
1668
|
onOnAddColor: qe,
|
|
@@ -1674,15 +1676,15 @@ const It = { key: 1 }, Vt = {
|
|
|
1674
1676
|
"onUpdate:angle": e[1] || (e[1] = (l) => B.angle = l),
|
|
1675
1677
|
percentageX: B.percentageX,
|
|
1676
1678
|
"onUpdate:percentageX": e[2] || (e[2] = (l) => B.percentageX = l),
|
|
1677
|
-
inputType:
|
|
1678
|
-
mode:
|
|
1679
|
+
inputType: O.value,
|
|
1680
|
+
mode: y.value,
|
|
1679
1681
|
gradientType: T.value,
|
|
1680
1682
|
onOnInput: G
|
|
1681
1683
|
}, null, 8, ["percentageY", "angle", "percentageX", "inputType", "mode", "gradientType"])
|
|
1682
1684
|
])) : (m(), E("div", dl, [
|
|
1683
1685
|
o.presetColors ? (m(), E("div", cl, [
|
|
1684
|
-
e[10] || (e[10] =
|
|
1685
|
-
|
|
1686
|
+
e[10] || (e[10] = h("div", { class: "text-oc-text-400 text-sm my-3 font-medium" }, "Choose color", -1)),
|
|
1687
|
+
h("div", pl, [
|
|
1686
1688
|
(m(!0), E(ge, null, Ke(o.presetColors, (l) => (m(), E("div", {
|
|
1687
1689
|
key: `color-${l}`,
|
|
1688
1690
|
class: "ck-cp-color-item !w-[32px] !h-[32px]",
|
|
@@ -1690,10 +1692,10 @@ const It = { key: 1 }, Vt = {
|
|
|
1690
1692
|
onClick: (i) => se(l)
|
|
1691
1693
|
}, null, 12, gl))), 128))
|
|
1692
1694
|
])
|
|
1693
|
-
])) :
|
|
1695
|
+
])) : D("", !0)
|
|
1694
1696
|
])),
|
|
1695
1697
|
L(al, { onOnMouseDown: Xe }),
|
|
1696
|
-
|
|
1698
|
+
h("div", vl, [
|
|
1697
1699
|
L(_t, {
|
|
1698
1700
|
class: Q(M.value ? "max-w-[90%]" : ""),
|
|
1699
1701
|
modelValue: ne.value,
|
|
@@ -1708,71 +1710,71 @@ const It = { key: 1 }, Vt = {
|
|
|
1708
1710
|
class: "cp-btn",
|
|
1709
1711
|
style: { padding: "7px" },
|
|
1710
1712
|
onClick: Ye
|
|
1711
|
-
}, e[11] || (e[11] = [
|
|
1712
|
-
|
|
1713
|
+
}, [...e[11] || (e[11] = [
|
|
1714
|
+
h("svg", {
|
|
1713
1715
|
version: "1.1",
|
|
1714
1716
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1715
1717
|
width: "32",
|
|
1716
1718
|
height: "32",
|
|
1717
1719
|
viewBox: "0 0 32 32"
|
|
1718
1720
|
}, [
|
|
1719
|
-
|
|
1721
|
+
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" })
|
|
1720
1722
|
], -1)
|
|
1721
|
-
]))) :
|
|
1723
|
+
])])) : D("", !0)
|
|
1722
1724
|
]),
|
|
1723
1725
|
o.showAlpha ? (m(), N(jt, {
|
|
1724
1726
|
key: 3,
|
|
1725
1727
|
modelValue: oe.value,
|
|
1726
1728
|
"onUpdate:modelValue": e[5] || (e[5] = (l) => oe.value = l),
|
|
1727
|
-
onOnInput: e[6] || (e[6] = (l) =>
|
|
1728
|
-
}, null, 8, ["modelValue"])) :
|
|
1729
|
-
|
|
1730
|
-
[
|
|
1729
|
+
onOnInput: e[6] || (e[6] = (l) => De(l.target.value))
|
|
1730
|
+
}, null, 8, ["modelValue"])) : D("", !0),
|
|
1731
|
+
ht(h("div", ml, null, 512), [
|
|
1732
|
+
[yt, !1]
|
|
1731
1733
|
]),
|
|
1732
|
-
|
|
1734
|
+
h("div", fl, [
|
|
1733
1735
|
L(Gt, {
|
|
1734
|
-
"model-value":
|
|
1736
|
+
"model-value": O.value,
|
|
1735
1737
|
"onUpdate:modelValue": pe
|
|
1736
1738
|
}, null, 8, ["model-value"]),
|
|
1737
|
-
X.value && o.showInputSet ? (m(), E("div",
|
|
1738
|
-
|
|
1739
|
+
X.value && o.showInputSet ? (m(), E("div", hl, [
|
|
1740
|
+
O.value == "HEX" ? (m(), N(Nt, {
|
|
1739
1741
|
key: 0,
|
|
1740
1742
|
modelValue: z.value,
|
|
1741
1743
|
"onUpdate:modelValue": [
|
|
1742
1744
|
e[7] || (e[7] = (l) => z.value = l),
|
|
1743
1745
|
b
|
|
1744
1746
|
]
|
|
1745
|
-
}, null, 8, ["modelValue"])) :
|
|
1746
|
-
|
|
1747
|
+
}, null, 8, ["modelValue"])) : D("", !0),
|
|
1748
|
+
O.value == "RGB" ? (m(), N(nt, {
|
|
1747
1749
|
key: 1,
|
|
1748
1750
|
"rgb-value": a.value.find((l) => l.select == !0),
|
|
1749
1751
|
onUpdateRgbValue: u
|
|
1750
|
-
}, null, 8, ["rgb-value"])) :
|
|
1751
|
-
|
|
1752
|
+
}, null, 8, ["rgb-value"])) : D("", !0),
|
|
1753
|
+
O.value == "HSL" ? (m(), N(nt, {
|
|
1752
1754
|
key: 2,
|
|
1753
1755
|
"input-type": "HSL",
|
|
1754
1756
|
"hsl-value": q,
|
|
1755
1757
|
onUpdateHslValue: n
|
|
1756
|
-
}, null, 8, ["hsl-value"])) :
|
|
1758
|
+
}, null, 8, ["hsl-value"])) : D("", !0),
|
|
1757
1759
|
o.showAlpha ? (m(), N(Ft, {
|
|
1758
1760
|
key: 3,
|
|
1759
1761
|
modelValue: oe.value,
|
|
1760
1762
|
"onUpdate:modelValue": [
|
|
1761
1763
|
e[8] || (e[8] = (l) => oe.value = l),
|
|
1762
|
-
e[9] || (e[9] = (l) =>
|
|
1764
|
+
e[9] || (e[9] = (l) => De(l))
|
|
1763
1765
|
]
|
|
1764
|
-
}, null, 8, ["modelValue"])) :
|
|
1765
|
-
])) :
|
|
1766
|
+
}, null, 8, ["modelValue"])) : D("", !0)
|
|
1767
|
+
])) : D("", !0)
|
|
1766
1768
|
]),
|
|
1767
|
-
e[12] || (e[12] =
|
|
1768
|
-
|
|
1769
|
+
e[12] || (e[12] = h("div", { class: "text-oc-text-400 text-sm my-3 font-medium font-inter" }, "Last used", -1)),
|
|
1770
|
+
H.value.length > 0 && o.showColorList ? (m(), E("div", yl, [
|
|
1769
1771
|
(m(!0), E(ge, null, Ke(Z.value, (l) => (m(), E("div", {
|
|
1770
1772
|
key: `color-${l}`,
|
|
1771
1773
|
class: "ck-cp-color-item !w-[32px] !h-[32px]",
|
|
1772
1774
|
style: te(`background:${l}`),
|
|
1773
1775
|
onClick: (i) => se(l)
|
|
1774
1776
|
}, null, 12, bl))), 128))
|
|
1775
|
-
])) :
|
|
1777
|
+
])) : D("", !0)
|
|
1776
1778
|
], 10, sl));
|
|
1777
1779
|
}
|
|
1778
1780
|
}, kl = { class: "flex flex-col pt-10 px-7 gap-y-7 items-center" }, $l = { class: "flex flex-col gap-y-4 text-center items-center" }, wl = {
|
|
@@ -1830,36 +1832,38 @@ const It = { key: 1 }, Vt = {
|
|
|
1830
1832
|
}
|
|
1831
1833
|
]
|
|
1832
1834
|
}));
|
|
1833
|
-
return (
|
|
1835
|
+
return (y, d) => (m(), E("div", kl, [
|
|
1834
1836
|
L(w(Ct), {
|
|
1835
1837
|
class: "w-[140px] bg-white rounded-full h-[140px]",
|
|
1836
1838
|
"additional-options": r.value,
|
|
1837
1839
|
"tooltip-formatter": () => null,
|
|
1838
1840
|
"tooltip-value-formatter": () => null
|
|
1839
1841
|
}, null, 8, ["additional-options"]),
|
|
1840
|
-
|
|
1841
|
-
o.title ? (m(), E("span", wl, Pe(o.title), 1)) :
|
|
1842
|
-
je(
|
|
1843
|
-
o.description ? (m(), E("span", Sl, Pe(o.description), 1)) :
|
|
1842
|
+
h("div", $l, [
|
|
1843
|
+
o.title ? (m(), E("span", wl, Pe(o.title), 1)) : D("", !0),
|
|
1844
|
+
je(y.$slots, "description", {}, () => [
|
|
1845
|
+
o.description ? (m(), E("span", Sl, Pe(o.description), 1)) : D("", !0)
|
|
1844
1846
|
])
|
|
1845
1847
|
])
|
|
1846
1848
|
]));
|
|
1847
1849
|
}
|
|
1848
|
-
},
|
|
1849
|
-
() => import("./OcCodeBlock-
|
|
1850
|
-
),
|
|
1851
|
-
() => import("./OcLottieAnimation-
|
|
1850
|
+
}, Ol = it(
|
|
1851
|
+
() => import("./OcCodeBlock-CMo9zvOn.js")
|
|
1852
|
+
), Ul = it(
|
|
1853
|
+
() => import("./OcLottieAnimation-DtD2oJib.js")
|
|
1852
1854
|
);
|
|
1853
1855
|
export {
|
|
1854
1856
|
Al as BarChart,
|
|
1855
1857
|
Xl as BarRaceChart,
|
|
1856
1858
|
ql as Card,
|
|
1857
|
-
|
|
1859
|
+
Ol as CodeBlock,
|
|
1858
1860
|
Vt as ColorPicker,
|
|
1859
1861
|
xl as ColorPickerPopup,
|
|
1860
1862
|
Ml as LineChart,
|
|
1861
|
-
|
|
1863
|
+
Ul as LottieAnimation,
|
|
1864
|
+
Gl as OcOverviewPieChart,
|
|
1862
1865
|
El as OnboardingProgressbar,
|
|
1866
|
+
Wl as OverviewMonthlyBarChart,
|
|
1863
1867
|
Ct as PieChart,
|
|
1864
1868
|
Rl as TextEditor
|
|
1865
1869
|
};
|