@orchidui/dashboard 1.20.1-3 → 1.20.1-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +258 -255
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
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 $e, createBlock as
|
|
5
|
-
import { Q as Y, a as
|
|
6
|
-
import { BaseInput as st, Dropdown as rt, Input as we, Icon as A, Modal as
|
|
7
|
-
import { rgbToHsl as et, rgb2Hex as tt, rgbaToHex8 as
|
|
8
|
-
import { PieChart as
|
|
9
|
-
import { LineChart as
|
|
10
|
-
import { BarChart as
|
|
11
|
-
import { BarRaceChart as
|
|
12
|
-
import { _ as
|
|
13
|
-
const
|
|
4
|
+
import { ref as v, computed as $e, createBlock as P, 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 H, onMounted as Je, watch as fe, createElementVNode as h, Teleport as mt, Fragment as ge, createTextVNode as ve, toDisplayString as Ne, renderList as Ke, withKeys as ot, inject as Re, reactive as _e, provide as Be, nextTick as ft, withDirectives as ht, vShow as yt, defineComponent as bt, defineAsyncComponent as it } from "vue";
|
|
5
|
+
import { Q as Y, a as xt } from "./QuillEditor-DwCbpq2d.js";
|
|
6
|
+
import { BaseInput as st, Dropdown as rt, Input as we, Icon as A, Modal as kt, Select as Ze, Slider as Ae } from "@orchidui/core";
|
|
7
|
+
import { rgbToHsl as et, rgb2Hex as tt, rgbaToHex8 as $t, hsl2Hex as lt, hexToRgb as ze, rgbToHue as Qe, hslToRgb as at, hex8ToRgba as wt, parseRgba as St, parseRgb as Ct } from "./Dashboard/ColorPicker/components/converters.js";
|
|
8
|
+
import { PieChart as It } from "./Dashboard/Charts/PieChart/OcPieChart.js";
|
|
9
|
+
import { LineChart as Ql } from "./Dashboard/Charts/LineChart/OcLineChart.js";
|
|
10
|
+
import { BarChart as Nl } from "./Dashboard/Charts/BarChart/OcBarChart.js";
|
|
11
|
+
import { BarRaceChart as Xl } from "./Dashboard/Charts/BarRaceChart/OcBarRaceChart.js";
|
|
12
|
+
import { _ as Fl } from "./OcCard-D3be6IMj.js";
|
|
13
|
+
const Vt = { key: 1 }, Tt = {
|
|
14
14
|
__name: "OcColorPicker",
|
|
15
15
|
props: {
|
|
16
16
|
modelValue: {
|
|
@@ -49,7 +49,7 @@ const It = { key: 1 }, Vt = {
|
|
|
49
49
|
};
|
|
50
50
|
let M = localStorage.getItem("ck-cp-local-color-list");
|
|
51
51
|
M && (O.value = [...new Set(JSON.parse(M))], Z());
|
|
52
|
-
const
|
|
52
|
+
const T = (U) => {
|
|
53
53
|
if (!U && f.value)
|
|
54
54
|
if (O.value.find((D) => D === f.value))
|
|
55
55
|
O.value = [
|
|
@@ -61,10 +61,10 @@ const It = { key: 1 }, Vt = {
|
|
|
61
61
|
let D = f.value;
|
|
62
62
|
O.value.unshift(D), Z();
|
|
63
63
|
}
|
|
64
|
-
}, B = v(!1),
|
|
64
|
+
}, B = v(!1), z = (U) => {
|
|
65
65
|
f.value = U, y("update:model-value", U), u.value = !1;
|
|
66
66
|
};
|
|
67
|
-
return (U, N) => (m(),
|
|
67
|
+
return (U, N) => (m(), P(w(st), {
|
|
68
68
|
class: Q(n.hideInputColor ? "w-[40px]" : ""),
|
|
69
69
|
onClick: N[1] || (N[1] = () => {
|
|
70
70
|
var D;
|
|
@@ -72,13 +72,13 @@ const It = { key: 1 }, Vt = {
|
|
|
72
72
|
})
|
|
73
73
|
}, {
|
|
74
74
|
default: W(() => [
|
|
75
|
-
|
|
75
|
+
L(w(rt), {
|
|
76
76
|
ref_key: "dropdownRef",
|
|
77
77
|
ref: a,
|
|
78
78
|
modelValue: u.value,
|
|
79
79
|
"onUpdate:modelValue": [
|
|
80
80
|
N[0] || (N[0] = (D) => u.value = D),
|
|
81
|
-
|
|
81
|
+
T
|
|
82
82
|
],
|
|
83
83
|
"max-menu-height": 800,
|
|
84
84
|
placement: n.placement,
|
|
@@ -87,7 +87,7 @@ const It = { key: 1 }, Vt = {
|
|
|
87
87
|
}
|
|
88
88
|
}, {
|
|
89
89
|
menu: W(() => [
|
|
90
|
-
B.value ? H("", !0) : (m(),
|
|
90
|
+
B.value ? H("", !0) : (m(), P(w(kl), {
|
|
91
91
|
key: 0,
|
|
92
92
|
variant: n.variant,
|
|
93
93
|
"show-alpha": !n.hideOpacity,
|
|
@@ -96,19 +96,19 @@ const It = { key: 1 }, Vt = {
|
|
|
96
96
|
"last-used-colors": O.value,
|
|
97
97
|
"preset-colors": n.presetColors,
|
|
98
98
|
"onUpdate:modelValue": C,
|
|
99
|
-
onLastUsedPick:
|
|
99
|
+
onLastUsedPick: z
|
|
100
100
|
}, null, 8, ["variant", "show-alpha", "type", "model-value", "last-used-colors", "preset-colors"]))
|
|
101
101
|
]),
|
|
102
102
|
default: W(() => [
|
|
103
|
-
n.hideInputColor ? (m(), E("div",
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
n.hideInputColor ? (m(), E("div", Vt, [
|
|
104
|
+
je(U.$slots, "picker-icon", {}, () => [
|
|
105
|
+
L(w(A), {
|
|
106
106
|
class: "cursor-pointer",
|
|
107
107
|
style: te(`color: ${f.value}`),
|
|
108
108
|
name: "drop"
|
|
109
109
|
}, null, 8, ["style"])
|
|
110
110
|
])
|
|
111
|
-
])) : (m(),
|
|
111
|
+
])) : (m(), P(w(we), {
|
|
112
112
|
key: 0,
|
|
113
113
|
"model-value": f.value,
|
|
114
114
|
icon: "drop",
|
|
@@ -119,7 +119,7 @@ const It = { key: 1 }, Vt = {
|
|
|
119
119
|
U.$slots.leading ? {
|
|
120
120
|
name: "leading",
|
|
121
121
|
fn: W(() => [
|
|
122
|
-
|
|
122
|
+
je(U.$slots, "leading")
|
|
123
123
|
]),
|
|
124
124
|
key: "0"
|
|
125
125
|
} : void 0
|
|
@@ -131,10 +131,10 @@ const It = { key: 1 }, Vt = {
|
|
|
131
131
|
_: 3
|
|
132
132
|
}, 8, ["class"]));
|
|
133
133
|
}
|
|
134
|
-
}, Lt = ["id"],
|
|
134
|
+
}, Lt = ["id"], Bt = { class: "flex items-center gap-x-3 px-5" }, Rt = { class: "flex items-center gap-x-5 cursor-pointer" }, Et = { class: "flex flex-col py-2 overflow-hidden" }, Ut = ["onClick"], Dt = { class: "flex gap-x-3 items-center px-5" }, Ht = { class: "flex items-center gap-x-3 px-5" }, Ot = { class: "flex gap-x-3 items-center px-5" }, Mt = { class: "flex gap-x-3 items-center px-5" }, Qt = { class: "flex items-center" }, At = { class: "grid cursor-pointer px-5" }, Nt = {
|
|
135
135
|
key: 5,
|
|
136
136
|
class: "flex gap-x-3 items-center px-5"
|
|
137
|
-
},
|
|
137
|
+
}, Pt = { class: "flex" }, Xt = { class: "mt-1 mx-2 cursor-pointer" }, El = {
|
|
138
138
|
__name: "OcTextEditor",
|
|
139
139
|
props: {
|
|
140
140
|
/**
|
|
@@ -212,13 +212,13 @@ const It = { key: 1 }, Vt = {
|
|
|
212
212
|
Y.register(Z, !0);
|
|
213
213
|
const M = Y.import("attributors/style/font");
|
|
214
214
|
Y.register(M, !0);
|
|
215
|
-
const
|
|
216
|
-
class B extends
|
|
215
|
+
const T = Y.import("blots/block/embed");
|
|
216
|
+
class B extends T {
|
|
217
217
|
}
|
|
218
218
|
We(B, "blotName", "divider"), We(B, "tagName", "hr"), Y.register(B);
|
|
219
|
-
const
|
|
219
|
+
const z = v(
|
|
220
220
|
Math.random().toString(36).replace(/[^a-zA-Z]+/g, "")
|
|
221
|
-
), U = v(!1), N = v(!1), D = v(!1), le = v(!1), J = v(!1),
|
|
221
|
+
), U = v(!1), N = v(!1), D = v(!1), le = v(!1), J = v(!1), j = v(!1), R = v(!1), X = v(""), ae = v(""), ee = v(""), b = v(), Se = v(!1), ue = v(r.image), ie = (c) => {
|
|
222
222
|
U.value = b.value.getQuill().history.stack.undo.length > 0, N.value = b.value.getQuill().history.stack.redo.length > 0, D.value = b.value.getQuill().getFormat().bold, le.value = b.value.getQuill().getFormat().italic, J.value = b.value.getQuill().getFormat().underline, R.value = b.value.getQuill().getFormat().blockquote, ae.value = b.value.getQuill().getFormat().list, ee.value = b.value.getQuill().getFormat().align;
|
|
223
223
|
let o = document.createElement("div");
|
|
224
224
|
o.innerHTML = c, Se.value && (o.innerText ? y("update:modelValue", c || "") : y("update:modelValue", ""), o.remove());
|
|
@@ -242,7 +242,7 @@ const It = { key: 1 }, Vt = {
|
|
|
242
242
|
var c;
|
|
243
243
|
b.value.getQuill().format("underline", !J.value), (c = b.value.getQuill().getSelection()) != null && c.length || (J.value = !J.value);
|
|
244
244
|
}, De = (c) => {
|
|
245
|
-
b.value.getQuill().format("size", c),
|
|
245
|
+
b.value.getQuill().format("size", c), X.value = c, j.value = !1;
|
|
246
246
|
}, me = () => {
|
|
247
247
|
const c = b.value.getQuill().getSelection();
|
|
248
248
|
c && c.length > 0 && b.value.getQuill().theme.tooltip.edit();
|
|
@@ -258,7 +258,7 @@ const It = { key: 1 }, Vt = {
|
|
|
258
258
|
const o = c.files[0], x = new FileReader();
|
|
259
259
|
x.onload = () => oe(x.result), x.readAsDataURL(o);
|
|
260
260
|
}, c.click();
|
|
261
|
-
}, Oe = (c) => /^data:image\/(png|jpg|jpeg|gif);base64,/.test(c),
|
|
261
|
+
}, Oe = (c) => /^data:image\/(png|jpg|jpeg|gif);base64,/.test(c), q = (c) => {
|
|
262
262
|
setTimeout(() => {
|
|
263
263
|
var x;
|
|
264
264
|
if (c) {
|
|
@@ -288,7 +288,7 @@ const It = { key: 1 }, Vt = {
|
|
|
288
288
|
Je(() => {
|
|
289
289
|
De(r.initialFontSize || r.fontSizes[0].value), Se.value = !0;
|
|
290
290
|
});
|
|
291
|
-
const ye = v(100), ce = v(!1),
|
|
291
|
+
const ye = v(100), ce = v(!1), Te = (c) => {
|
|
292
292
|
var x, G;
|
|
293
293
|
ye.value = c;
|
|
294
294
|
const o = (x = window.getSelection()) == null ? void 0 : x.focusNode;
|
|
@@ -304,7 +304,7 @@ const It = { key: 1 }, Vt = {
|
|
|
304
304
|
var o;
|
|
305
305
|
const c = (o = window.getSelection()) == null ? void 0 : o.focusNode;
|
|
306
306
|
ce.value = c.innerHTML && c.innerHTML.includes("<img");
|
|
307
|
-
}, K = v(!1), F = v(3),
|
|
307
|
+
}, K = v(!1), F = v(3), Le = v(3), Fe = $e(() => {
|
|
308
308
|
let c = [];
|
|
309
309
|
for (let o = 1; o < 30; o++)
|
|
310
310
|
c.push({
|
|
@@ -322,14 +322,14 @@ const It = { key: 1 }, Vt = {
|
|
|
322
322
|
return c;
|
|
323
323
|
}), Ye = () => {
|
|
324
324
|
let c = b.value.getQuill().getModule("better-table");
|
|
325
|
-
c == null || c.insertTable(parseInt(F.value), parseInt(
|
|
325
|
+
c == null || c.insertTable(parseInt(F.value), parseInt(Le.value)), K.value = !1;
|
|
326
326
|
};
|
|
327
327
|
return fe(
|
|
328
328
|
() => r.modelValue,
|
|
329
329
|
(c) => {
|
|
330
330
|
c || b.value.getQuill().setContents([], "silent");
|
|
331
331
|
}
|
|
332
|
-
), (c, o) => (m(),
|
|
332
|
+
), (c, o) => (m(), P(w(st), {
|
|
333
333
|
label: n.label,
|
|
334
334
|
hint: n.hint,
|
|
335
335
|
"error-message": n.errorMessage,
|
|
@@ -339,45 +339,48 @@ const It = { key: 1 }, Vt = {
|
|
|
339
339
|
"tooltip-options": n.tooltipOptions
|
|
340
340
|
}, {
|
|
341
341
|
default: W(() => [
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
modelValue
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
342
|
+
(m(), P(mt, { to: "body" }, [
|
|
343
|
+
L(w(kt), {
|
|
344
|
+
size: "small",
|
|
345
|
+
title: "Insert table",
|
|
346
|
+
modelValue: K.value,
|
|
347
|
+
"onUpdate:modelValue": o[2] || (o[2] = (x) => K.value = x),
|
|
348
|
+
class: "!w-full !h-full",
|
|
349
|
+
confirmButtonProps: {
|
|
350
|
+
label: "Save",
|
|
351
|
+
onClick: () => Ye()
|
|
352
|
+
}
|
|
353
|
+
}, {
|
|
354
|
+
default: W(() => [
|
|
355
|
+
L(w(Ze), {
|
|
356
|
+
modelValue: Le.value,
|
|
357
|
+
"onUpdate:modelValue": o[0] || (o[0] = (x) => Le.value = x),
|
|
358
|
+
options: Ge.value,
|
|
359
|
+
label: "Table cell",
|
|
360
|
+
class: "mb-3"
|
|
361
|
+
}, null, 8, ["modelValue", "options"]),
|
|
362
|
+
L(w(Ze), {
|
|
363
|
+
modelValue: F.value,
|
|
364
|
+
"onUpdate:modelValue": o[1] || (o[1] = (x) => F.value = x),
|
|
365
|
+
options: Fe.value,
|
|
366
|
+
label: "Table rows"
|
|
367
|
+
}, null, 8, ["modelValue", "options"])
|
|
368
|
+
]),
|
|
369
|
+
_: 1
|
|
370
|
+
}, 8, ["modelValue", "confirmButtonProps"])
|
|
371
|
+
])),
|
|
369
372
|
h("div", {
|
|
370
373
|
class: Q(["grid", { "has-error": n.errorMessage }]),
|
|
371
374
|
onClick: Me
|
|
372
375
|
}, [
|
|
373
|
-
|
|
376
|
+
z.value ? (m(), P(w(xt), {
|
|
374
377
|
key: 0,
|
|
375
|
-
id: `#${
|
|
378
|
+
id: `#${z.value}`,
|
|
376
379
|
ref_key: "quill",
|
|
377
380
|
ref: b,
|
|
378
381
|
content: n.modelValue,
|
|
379
382
|
options: {
|
|
380
|
-
bounds: `#${
|
|
383
|
+
bounds: `#${z.value}`
|
|
381
384
|
},
|
|
382
385
|
"is-text-only": "",
|
|
383
386
|
theme: "snow",
|
|
@@ -385,23 +388,23 @@ const It = { key: 1 }, Vt = {
|
|
|
385
388
|
class: "min-h-[200px]",
|
|
386
389
|
placeholder: n.placeholder,
|
|
387
390
|
"onUpdate:content": ie,
|
|
388
|
-
onPaste:
|
|
391
|
+
onPaste: q
|
|
389
392
|
}, {
|
|
390
393
|
toolbar: W(() => [
|
|
391
394
|
h("div", {
|
|
392
|
-
id:
|
|
395
|
+
id: z.value,
|
|
393
396
|
class: "flex min-h-[36px] flex-wrap !py-2 !px-3 gap-y-2 rounded-t"
|
|
394
397
|
}, [
|
|
395
398
|
f.value.includes("changes") ? (m(), E(ge, { key: 0 }, [
|
|
396
|
-
h("div",
|
|
397
|
-
|
|
399
|
+
h("div", Bt, [
|
|
400
|
+
L(w(A), {
|
|
398
401
|
class: Q(U.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
|
|
399
402
|
width: "20",
|
|
400
403
|
height: "20",
|
|
401
404
|
name: "text-editor/undo",
|
|
402
405
|
onClick: Ee
|
|
403
406
|
}, null, 8, ["class"]),
|
|
404
|
-
|
|
407
|
+
L(w(A), {
|
|
405
408
|
class: Q(N.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
|
|
406
409
|
width: "20",
|
|
407
410
|
height: "20",
|
|
@@ -412,30 +415,30 @@ const It = { key: 1 }, Vt = {
|
|
|
412
415
|
o[16] || (o[16] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
|
|
413
416
|
], 64)) : H("", !0),
|
|
414
417
|
f.value.includes("font-size") ? (m(), E(ge, { key: 1 }, [
|
|
415
|
-
|
|
416
|
-
modelValue:
|
|
417
|
-
"onUpdate:modelValue": o[3] || (o[3] = (x) =>
|
|
418
|
+
L(w(rt), {
|
|
419
|
+
modelValue: j.value,
|
|
420
|
+
"onUpdate:modelValue": o[3] || (o[3] = (x) => j.value = x),
|
|
418
421
|
class: "px-5"
|
|
419
422
|
}, {
|
|
420
423
|
menu: W(() => [
|
|
421
|
-
h("div",
|
|
424
|
+
h("div", Et, [
|
|
422
425
|
(m(!0), E(ge, null, Ke(n.fontSizes, (x) => (m(), E("div", {
|
|
423
426
|
key: x.value,
|
|
424
|
-
class: Q(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50",
|
|
427
|
+
class: Q(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50", X.value === x.value ? "font-medium" : ""]),
|
|
425
428
|
onClick: (G) => De(x.value)
|
|
426
|
-
}, Ne(x.label), 11,
|
|
429
|
+
}, Ne(x.label), 11, Ut))), 128))
|
|
427
430
|
])
|
|
428
431
|
]),
|
|
429
432
|
default: W(() => {
|
|
430
433
|
var x;
|
|
431
434
|
return [
|
|
432
|
-
h("div",
|
|
433
|
-
ve(Ne((x = n.fontSizes.find((G) => G.value ===
|
|
434
|
-
|
|
435
|
+
h("div", Rt, [
|
|
436
|
+
ve(Ne((x = n.fontSizes.find((G) => G.value === X.value)) == null ? void 0 : x.label) + " ", 1),
|
|
437
|
+
L(w(A), {
|
|
435
438
|
width: "20",
|
|
436
439
|
height: "20",
|
|
437
440
|
name: "chevron-down",
|
|
438
|
-
class: Q(["transition-all",
|
|
441
|
+
class: Q(["transition-all", j.value ? "rotate-180" : ""])
|
|
439
442
|
}, null, 8, ["class"])
|
|
440
443
|
])
|
|
441
444
|
];
|
|
@@ -445,22 +448,22 @@ const It = { key: 1 }, Vt = {
|
|
|
445
448
|
o[17] || (o[17] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
|
|
446
449
|
], 64)) : H("", !0),
|
|
447
450
|
f.value.includes("font-style") ? (m(), E(ge, { key: 2 }, [
|
|
448
|
-
h("div",
|
|
449
|
-
|
|
451
|
+
h("div", Dt, [
|
|
452
|
+
L(w(A), {
|
|
450
453
|
class: Q(["cursor-pointer", D.value ? "text-oc-text" : "text-oc-text-300"]),
|
|
451
454
|
width: "20",
|
|
452
455
|
height: "20",
|
|
453
456
|
name: "text-editor/bold",
|
|
454
457
|
onClick: Ce
|
|
455
458
|
}, null, 8, ["class"]),
|
|
456
|
-
|
|
459
|
+
L(w(A), {
|
|
457
460
|
class: Q(["cursor-pointer", le.value ? "text-oc-text" : "text-oc-text-300"]),
|
|
458
461
|
width: "20",
|
|
459
462
|
height: "20",
|
|
460
463
|
name: "text-editor/italic",
|
|
461
464
|
onClick: ne
|
|
462
465
|
}, null, 8, ["class"]),
|
|
463
|
-
|
|
466
|
+
L(w(A), {
|
|
464
467
|
class: Q(["cursor-pointer", J.value ? "text-oc-text" : "text-oc-text-300"]),
|
|
465
468
|
width: "20",
|
|
466
469
|
height: "20",
|
|
@@ -470,8 +473,8 @@ const It = { key: 1 }, Vt = {
|
|
|
470
473
|
]),
|
|
471
474
|
o[18] || (o[18] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
|
|
472
475
|
], 64)) : H("", !0),
|
|
473
|
-
h("div",
|
|
474
|
-
f.value.includes("link") ? (m(),
|
|
476
|
+
h("div", Ht, [
|
|
477
|
+
f.value.includes("link") ? (m(), P(w(A), {
|
|
475
478
|
key: 0,
|
|
476
479
|
class: "cursor-pointer",
|
|
477
480
|
width: "20",
|
|
@@ -479,7 +482,7 @@ const It = { key: 1 }, Vt = {
|
|
|
479
482
|
name: "text-editor/link",
|
|
480
483
|
onClick: me
|
|
481
484
|
})) : H("", !0),
|
|
482
|
-
f.value.includes("image") ? (m(),
|
|
485
|
+
f.value.includes("image") ? (m(), P(w(A), {
|
|
483
486
|
key: 1,
|
|
484
487
|
class: "cursor-pointer",
|
|
485
488
|
width: "20",
|
|
@@ -487,7 +490,7 @@ const It = { key: 1 }, Vt = {
|
|
|
487
490
|
name: "text-editor/image",
|
|
488
491
|
onClick: He
|
|
489
492
|
})) : H("", !0),
|
|
490
|
-
f.value.includes("quote") ? (m(),
|
|
493
|
+
f.value.includes("quote") ? (m(), P(w(A), {
|
|
491
494
|
key: 2,
|
|
492
495
|
class: Q(["cursor-pointer", R.value ? "text-oc-text" : "text-oc-text-300"]),
|
|
493
496
|
width: "20",
|
|
@@ -495,7 +498,7 @@ const It = { key: 1 }, Vt = {
|
|
|
495
498
|
name: "text-editor/quote",
|
|
496
499
|
onClick: Xe
|
|
497
500
|
}, null, 8, ["class"])) : H("", !0),
|
|
498
|
-
f.value.includes("media") ? (m(),
|
|
501
|
+
f.value.includes("media") ? (m(), P(w(A), {
|
|
499
502
|
key: 3,
|
|
500
503
|
class: "cursor-pointer",
|
|
501
504
|
width: "20",
|
|
@@ -503,7 +506,7 @@ const It = { key: 1 }, Vt = {
|
|
|
503
506
|
name: "text-editor/media",
|
|
504
507
|
onClick: _
|
|
505
508
|
})) : H("", !0),
|
|
506
|
-
|
|
509
|
+
L(w(A), {
|
|
507
510
|
class: "cursor-pointer",
|
|
508
511
|
width: "20",
|
|
509
512
|
height: "20",
|
|
@@ -513,15 +516,15 @@ const It = { key: 1 }, Vt = {
|
|
|
513
516
|
]),
|
|
514
517
|
f.value.includes("list") ? (m(), E(ge, { key: 3 }, [
|
|
515
518
|
o[19] || (o[19] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
|
|
516
|
-
h("div",
|
|
517
|
-
|
|
519
|
+
h("div", Ot, [
|
|
520
|
+
L(w(A), {
|
|
518
521
|
class: Q(["cursor-pointer", ae.value === "bullet" ? "text-oc-text" : "text-oc-text-300"]),
|
|
519
522
|
width: "20",
|
|
520
523
|
height: "20",
|
|
521
524
|
name: "text-editor/bullet",
|
|
522
525
|
onClick: o[5] || (o[5] = (x) => Ve("bullet"))
|
|
523
526
|
}, null, 8, ["class"]),
|
|
524
|
-
|
|
527
|
+
L(w(A), {
|
|
525
528
|
class: Q(["cursor-pointer", ae.value === "ordered" ? "text-oc-text" : "text-oc-text-300"]),
|
|
526
529
|
width: "20",
|
|
527
530
|
height: "20",
|
|
@@ -532,29 +535,29 @@ const It = { key: 1 }, Vt = {
|
|
|
532
535
|
], 64)) : H("", !0),
|
|
533
536
|
f.value.includes("alignment") ? (m(), E(ge, { key: 4 }, [
|
|
534
537
|
o[20] || (o[20] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
|
|
535
|
-
h("div",
|
|
536
|
-
|
|
538
|
+
h("div", Mt, [
|
|
539
|
+
L(w(A), {
|
|
537
540
|
class: Q(["cursor-pointer", ee.value ? "text-oc-text-300" : "text-oc-text"]),
|
|
538
541
|
width: "20",
|
|
539
542
|
height: "20",
|
|
540
543
|
name: "text-editor/left",
|
|
541
544
|
onClick: o[7] || (o[7] = (x) => he())
|
|
542
545
|
}, null, 8, ["class"]),
|
|
543
|
-
|
|
546
|
+
L(w(A), {
|
|
544
547
|
class: Q(["cursor-pointer", ee.value === "center" ? "text-oc-text" : "text-oc-text-300"]),
|
|
545
548
|
width: "20",
|
|
546
549
|
height: "20",
|
|
547
550
|
name: "text-editor/center",
|
|
548
551
|
onClick: o[8] || (o[8] = (x) => he("center"))
|
|
549
552
|
}, null, 8, ["class"]),
|
|
550
|
-
|
|
553
|
+
L(w(A), {
|
|
551
554
|
class: Q(["cursor-pointer", ee.value === "right" ? "text-oc-text" : "text-oc-text-300"]),
|
|
552
555
|
width: "20",
|
|
553
556
|
height: "20",
|
|
554
557
|
name: "text-editor/right",
|
|
555
558
|
onClick: o[9] || (o[9] = (x) => he("right"))
|
|
556
559
|
}, null, 8, ["class"]),
|
|
557
|
-
|
|
560
|
+
L(w(A), {
|
|
558
561
|
class: Q(["cursor-pointer", ee.value === "justify" ? "text-oc-text" : "text-oc-text-300"]),
|
|
559
562
|
width: "20",
|
|
560
563
|
height: "20",
|
|
@@ -564,8 +567,8 @@ const It = { key: 1 }, Vt = {
|
|
|
564
567
|
])
|
|
565
568
|
], 64)) : H("", !0),
|
|
566
569
|
o[22] || (o[22] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
|
|
567
|
-
h("div",
|
|
568
|
-
|
|
570
|
+
h("div", Qt, [
|
|
571
|
+
L(w(Tt), {
|
|
569
572
|
modelValue: de.value,
|
|
570
573
|
"onUpdate:modelValue": [
|
|
571
574
|
o[11] || (o[11] = (x) => de.value = x),
|
|
@@ -574,7 +577,7 @@ const It = { key: 1 }, Vt = {
|
|
|
574
577
|
"hide-input-color": ""
|
|
575
578
|
}, {
|
|
576
579
|
"picker-icon": W(() => [
|
|
577
|
-
h("div",
|
|
580
|
+
h("div", At, [
|
|
578
581
|
h("div", {
|
|
579
582
|
style: te(`color:${de.value}`)
|
|
580
583
|
}, "A", 4),
|
|
@@ -588,31 +591,31 @@ const It = { key: 1 }, Vt = {
|
|
|
588
591
|
}, 8, ["modelValue"])
|
|
589
592
|
]),
|
|
590
593
|
o[23] || (o[23] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
|
|
591
|
-
ce.value ? (m(), E("div",
|
|
592
|
-
|
|
594
|
+
ce.value ? (m(), E("div", Nt, [
|
|
595
|
+
L(w(Ae), {
|
|
593
596
|
label: "Image width",
|
|
594
597
|
class: "w-[120px]",
|
|
595
598
|
"model-value": ye.value,
|
|
596
599
|
"min-limit": 0,
|
|
597
600
|
"max-limit": 100,
|
|
598
|
-
"onUpdate:modelValue":
|
|
601
|
+
"onUpdate:modelValue": Te
|
|
599
602
|
}, null, 8, ["model-value"]),
|
|
600
|
-
h("div",
|
|
601
|
-
|
|
603
|
+
h("div", Pt, [
|
|
604
|
+
L(w(A), {
|
|
602
605
|
class: "cursor-pointer",
|
|
603
606
|
width: "20",
|
|
604
607
|
height: "20",
|
|
605
608
|
name: "text-editor/left",
|
|
606
609
|
onClick: o[12] || (o[12] = (x) => be())
|
|
607
610
|
}),
|
|
608
|
-
|
|
611
|
+
L(w(A), {
|
|
609
612
|
class: "cursor-pointer",
|
|
610
613
|
width: "20",
|
|
611
614
|
height: "20",
|
|
612
615
|
name: "text-editor/center",
|
|
613
616
|
onClick: o[13] || (o[13] = (x) => be("center"))
|
|
614
617
|
}),
|
|
615
|
-
|
|
618
|
+
L(w(A), {
|
|
616
619
|
class: "cursor-pointer",
|
|
617
620
|
width: "20",
|
|
618
621
|
height: "20",
|
|
@@ -621,7 +624,7 @@ const It = { key: 1 }, Vt = {
|
|
|
621
624
|
})
|
|
622
625
|
])
|
|
623
626
|
])) : H("", !0),
|
|
624
|
-
h("div",
|
|
627
|
+
h("div", Xt, [
|
|
625
628
|
(m(), E("svg", {
|
|
626
629
|
width: "20",
|
|
627
630
|
height: "20",
|
|
@@ -647,7 +650,7 @@ const It = { key: 1 }, Vt = {
|
|
|
647
650
|
_: 1
|
|
648
651
|
}, 8, ["label", "hint", "error-message", "is-required", "label-icon", "tooltip-text", "tooltip-options"]));
|
|
649
652
|
}
|
|
650
|
-
},
|
|
653
|
+
}, qt = {
|
|
651
654
|
__name: "InputHex",
|
|
652
655
|
props: {
|
|
653
656
|
modelValue: {
|
|
@@ -694,7 +697,7 @@ const It = { key: 1 }, Vt = {
|
|
|
694
697
|
p !== a && (u.value = p);
|
|
695
698
|
},
|
|
696
699
|
{ immediate: !0 }
|
|
697
|
-
), (p, a) => (m(),
|
|
700
|
+
), (p, a) => (m(), P(w(we), {
|
|
698
701
|
class: "w-[158px]",
|
|
699
702
|
placeholder: "#FFFFFF",
|
|
700
703
|
"model-value": u.value,
|
|
@@ -703,7 +706,7 @@ const It = { key: 1 }, Vt = {
|
|
|
703
706
|
onKeyup: ot(C, ["enter"])
|
|
704
707
|
}, null, 8, ["model-value"]));
|
|
705
708
|
}
|
|
706
|
-
},
|
|
709
|
+
}, Ft = { class: "grid grid-cols-3 gap-3" }, nt = {
|
|
707
710
|
__name: "InputRgbHsl",
|
|
708
711
|
props: {
|
|
709
712
|
inputType: {
|
|
@@ -726,18 +729,18 @@ const It = { key: 1 }, Vt = {
|
|
|
726
729
|
r: 0,
|
|
727
730
|
g: 0,
|
|
728
731
|
b: 0
|
|
729
|
-
}), f = v(), C = v(), p = v(), a = (M,
|
|
730
|
-
var
|
|
732
|
+
}), f = v(), C = v(), p = v(), a = (M, T) => {
|
|
733
|
+
var z, U, N;
|
|
731
734
|
let B = 255;
|
|
732
|
-
if (r.inputType == "HSL" && (B = 100, M == "r" && (B = 360)), !isNaN(parseInt(
|
|
735
|
+
if (r.inputType == "HSL" && (B = 100, M == "r" && (B = 360)), !isNaN(parseInt(T))) {
|
|
733
736
|
if (M == "r") {
|
|
734
|
-
let D = parseInt(
|
|
735
|
-
D <= B && (u.value.r = D, r.inputType == "RGB" ? O("r") : Z()), (
|
|
737
|
+
let D = parseInt(T);
|
|
738
|
+
D <= B && (u.value.r = D, r.inputType == "RGB" ? O("r") : Z()), (z = f.value) == null || z.focus();
|
|
736
739
|
} else if (M == "g") {
|
|
737
|
-
let D = parseInt(
|
|
740
|
+
let D = parseInt(T);
|
|
738
741
|
D <= B && (u.value.g = D, r.inputType == "RGB" ? O("g") : Z()), (U = C.value) == null || U.focus();
|
|
739
742
|
} else if (M == "b") {
|
|
740
|
-
let D = parseInt(
|
|
743
|
+
let D = parseInt(T);
|
|
741
744
|
D <= B && (u.value.b = D, r.inputType == "RGB" ? O("b") : Z()), (N = p.value) == null || N.focus();
|
|
742
745
|
}
|
|
743
746
|
}
|
|
@@ -759,8 +762,8 @@ const It = { key: 1 }, Vt = {
|
|
|
759
762
|
};
|
|
760
763
|
return r.inputType === "RGB" ? fe(
|
|
761
764
|
() => r.rgbValue,
|
|
762
|
-
(M,
|
|
763
|
-
M !==
|
|
765
|
+
(M, T) => {
|
|
766
|
+
M !== T && (u.value = M);
|
|
764
767
|
},
|
|
765
768
|
{ immediate: !0, deep: !0 }
|
|
766
769
|
) : fe(
|
|
@@ -773,31 +776,31 @@ const It = { key: 1 }, Vt = {
|
|
|
773
776
|
};
|
|
774
777
|
},
|
|
775
778
|
{ immediate: !0, deep: !0 }
|
|
776
|
-
), (M,
|
|
777
|
-
|
|
779
|
+
), (M, T) => (m(), E("div", Ft, [
|
|
780
|
+
L(w(we), {
|
|
778
781
|
ref_key: "rInputEl",
|
|
779
782
|
ref: f,
|
|
780
783
|
"model-value": u.value.r,
|
|
781
784
|
placeholder: "100",
|
|
782
|
-
"onUpdate:modelValue":
|
|
785
|
+
"onUpdate:modelValue": T[0] || (T[0] = (B) => a("r", B))
|
|
783
786
|
}, null, 8, ["model-value"]),
|
|
784
|
-
|
|
787
|
+
L(w(we), {
|
|
785
788
|
ref_key: "gInputEl",
|
|
786
789
|
ref: C,
|
|
787
790
|
"model-value": u.value.g,
|
|
788
791
|
placeholder: "100",
|
|
789
|
-
"onUpdate:modelValue":
|
|
792
|
+
"onUpdate:modelValue": T[1] || (T[1] = (B) => a("g", B))
|
|
790
793
|
}, null, 8, ["model-value"]),
|
|
791
|
-
|
|
794
|
+
L(w(we), {
|
|
792
795
|
ref_key: "bInputEl",
|
|
793
796
|
ref: p,
|
|
794
797
|
"model-value": u.value.b,
|
|
795
798
|
placeholder: "100",
|
|
796
|
-
"onUpdate:modelValue":
|
|
799
|
+
"onUpdate:modelValue": T[2] || (T[2] = (B) => a("b", B))
|
|
797
800
|
}, null, 8, ["model-value"])
|
|
798
801
|
]));
|
|
799
802
|
}
|
|
800
|
-
},
|
|
803
|
+
}, Gt = {
|
|
801
804
|
__name: "InputOpacity",
|
|
802
805
|
props: {
|
|
803
806
|
modelValue: {
|
|
@@ -820,7 +823,7 @@ const It = { key: 1 }, Vt = {
|
|
|
820
823
|
p !== a && (u.value = p);
|
|
821
824
|
},
|
|
822
825
|
{ immediate: !0 }
|
|
823
|
-
), (p, a) => (m(),
|
|
826
|
+
), (p, a) => (m(), P(w(we), {
|
|
824
827
|
class: "w-[75px]",
|
|
825
828
|
placeholder: "100",
|
|
826
829
|
"model-value": u.value,
|
|
@@ -834,7 +837,7 @@ const It = { key: 1 }, Vt = {
|
|
|
834
837
|
_: 1
|
|
835
838
|
}, 8, ["model-value"]));
|
|
836
839
|
}
|
|
837
|
-
},
|
|
840
|
+
}, Yt = {
|
|
838
841
|
__name: "SelectColorFormat",
|
|
839
842
|
props: {
|
|
840
843
|
modelValue: { default: "RGB", type: String }
|
|
@@ -844,7 +847,7 @@ const It = { key: 1 }, Vt = {
|
|
|
844
847
|
const y = v(n.modelValue), u = V, f = (C) => {
|
|
845
848
|
y.value = C, u("update:model-value", C);
|
|
846
849
|
};
|
|
847
|
-
return (C, p) => (m(),
|
|
850
|
+
return (C, p) => (m(), P(w(Ze), {
|
|
848
851
|
class: "!w-[80px]",
|
|
849
852
|
"model-value": y.value,
|
|
850
853
|
options: [
|
|
@@ -864,7 +867,7 @@ const It = { key: 1 }, Vt = {
|
|
|
864
867
|
"onUpdate:modelValue": f
|
|
865
868
|
}, null, 8, ["model-value"]));
|
|
866
869
|
}
|
|
867
|
-
},
|
|
870
|
+
}, Wt = { class: "opacity-bar" }, zt = { class: "picker-opacity-slider opacity-bar-background" }, jt = ["value"], Kt = {
|
|
868
871
|
__name: "SliderOpacity",
|
|
869
872
|
props: {
|
|
870
873
|
modelValue: { default: 0, type: Number }
|
|
@@ -874,8 +877,8 @@ const It = { key: 1 }, Vt = {
|
|
|
874
877
|
const r = Re("opacitySlider"), y = V, u = (f) => {
|
|
875
878
|
y("update:modelValue", parseInt(f.target.value)), y("onInput", f);
|
|
876
879
|
};
|
|
877
|
-
return (f, C) => (m(), E("div",
|
|
878
|
-
h("div",
|
|
880
|
+
return (f, C) => (m(), E("div", Wt, [
|
|
881
|
+
h("div", zt, [
|
|
879
882
|
h("input", {
|
|
880
883
|
ref_key: "opacitySlider",
|
|
881
884
|
ref: r,
|
|
@@ -889,27 +892,27 @@ const It = { key: 1 }, Vt = {
|
|
|
889
892
|
])
|
|
890
893
|
]));
|
|
891
894
|
}
|
|
892
|
-
},
|
|
895
|
+
}, Zt = {
|
|
893
896
|
__name: "SliderGradient",
|
|
894
897
|
props: {
|
|
895
898
|
gradientType: String
|
|
896
899
|
},
|
|
897
900
|
emits: ["onAddColor", "onMouseDown", "onDeleteColor"],
|
|
898
901
|
setup(n, { emit: V }) {
|
|
899
|
-
const r = Re("gradientBar"), y = v(), u = V, f = (
|
|
900
|
-
|
|
901
|
-
}, C = v("left:0"), p = v(!1), a = (
|
|
902
|
-
u("onMouseDown",
|
|
902
|
+
const r = Re("gradientBar"), y = v(), u = V, f = (T) => {
|
|
903
|
+
T.preventDefault();
|
|
904
|
+
}, C = v("left:0"), p = v(!1), a = (T) => {
|
|
905
|
+
u("onMouseDown", T);
|
|
903
906
|
}, O = () => {
|
|
904
|
-
let
|
|
905
|
-
C.value =
|
|
907
|
+
let T = y.value.querySelector(".select");
|
|
908
|
+
C.value = T == null ? void 0 : T.getAttribute("style");
|
|
906
909
|
}, Z = () => {
|
|
907
910
|
var B;
|
|
908
911
|
O(), (((B = y.value.querySelectorAll(".gradient-handle")) == null ? void 0 : B.length) ?? 2) > 2 ? p.value = !0 : p.value = !1;
|
|
909
|
-
}, M = (
|
|
910
|
-
p.value = !1, u("onAddColor",
|
|
912
|
+
}, M = (T) => {
|
|
913
|
+
p.value = !1, u("onAddColor", T);
|
|
911
914
|
};
|
|
912
|
-
return (
|
|
915
|
+
return (T, B) => (m(), E("div", {
|
|
913
916
|
ref_key: "gradientSlider",
|
|
914
917
|
ref: y,
|
|
915
918
|
class: "relative h-[40px]",
|
|
@@ -919,9 +922,9 @@ const It = { key: 1 }, Vt = {
|
|
|
919
922
|
type: "button",
|
|
920
923
|
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"]),
|
|
921
924
|
style: te(C.value),
|
|
922
|
-
onClick: B[0] || (B[0] = (
|
|
925
|
+
onClick: B[0] || (B[0] = (z) => T.$emit("onDeleteColor"))
|
|
923
926
|
}, [
|
|
924
|
-
|
|
927
|
+
L(w(A), {
|
|
925
928
|
name: "bin",
|
|
926
929
|
width: "14",
|
|
927
930
|
height: "14"
|
|
@@ -944,7 +947,7 @@ const It = { key: 1 }, Vt = {
|
|
|
944
947
|
], 34)
|
|
945
948
|
], 512));
|
|
946
949
|
}
|
|
947
|
-
},
|
|
950
|
+
}, Jt = { class: "picker-hue" }, _t = ["value"], el = {
|
|
948
951
|
__name: "SliderHue",
|
|
949
952
|
props: {
|
|
950
953
|
modelValue: { default: 0, type: Number }
|
|
@@ -954,7 +957,7 @@ const It = { key: 1 }, Vt = {
|
|
|
954
957
|
const r = V, y = (u) => {
|
|
955
958
|
r("update:modelValue", parseFloat(u.target.value)), r("onInput", u);
|
|
956
959
|
};
|
|
957
|
-
return (u, f) => (m(), E("div",
|
|
960
|
+
return (u, f) => (m(), E("div", Jt, [
|
|
958
961
|
h("input", {
|
|
959
962
|
value: n.modelValue,
|
|
960
963
|
class: "picker-hue-range-slider",
|
|
@@ -964,13 +967,13 @@ const It = { key: 1 }, Vt = {
|
|
|
964
967
|
step: "0.1",
|
|
965
968
|
onInput: y,
|
|
966
969
|
onChange: f[0] || (f[0] = (C) => u.$emit("onChange", C))
|
|
967
|
-
}, null, 40,
|
|
970
|
+
}, null, 40, _t)
|
|
968
971
|
]));
|
|
969
972
|
}
|
|
970
|
-
},
|
|
973
|
+
}, tl = { class: "px-2 mt-2" }, ll = {
|
|
971
974
|
key: 1,
|
|
972
975
|
class: "grid grid-cols-2 gap-4 px-1"
|
|
973
|
-
},
|
|
976
|
+
}, al = {
|
|
974
977
|
__name: "GradientSettings",
|
|
975
978
|
props: {
|
|
976
979
|
mode: {
|
|
@@ -1002,8 +1005,8 @@ const It = { key: 1 }, Vt = {
|
|
|
1002
1005
|
break;
|
|
1003
1006
|
}
|
|
1004
1007
|
};
|
|
1005
|
-
return (C, p) => (m(), E("div",
|
|
1006
|
-
n.gradientType == "linear" && r.value ? (m(),
|
|
1008
|
+
return (C, p) => (m(), E("div", tl, [
|
|
1009
|
+
n.gradientType == "linear" && r.value ? (m(), P(w(Ae), {
|
|
1007
1010
|
key: 0,
|
|
1008
1011
|
label: "Angle",
|
|
1009
1012
|
"model-value": n.angle,
|
|
@@ -1020,8 +1023,8 @@ const It = { key: 1 }, Vt = {
|
|
|
1020
1023
|
])),
|
|
1021
1024
|
_: 1
|
|
1022
1025
|
}, 8, ["model-value"])) : H("", !0),
|
|
1023
|
-
n.gradientType == "radial" && y.value ? (m(), E("div",
|
|
1024
|
-
|
|
1026
|
+
n.gradientType == "radial" && y.value ? (m(), E("div", ll, [
|
|
1027
|
+
L(w(Ae), {
|
|
1025
1028
|
label: "Position X",
|
|
1026
1029
|
"model-value": n.percentageX,
|
|
1027
1030
|
"min-limit": 0,
|
|
@@ -1036,7 +1039,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1036
1039
|
])),
|
|
1037
1040
|
_: 1
|
|
1038
1041
|
}, 8, ["model-value"]),
|
|
1039
|
-
|
|
1042
|
+
L(w(Ae), {
|
|
1040
1043
|
label: "Position Y",
|
|
1041
1044
|
"model-value": n.percentageY,
|
|
1042
1045
|
"min-limit": 0,
|
|
@@ -1054,7 +1057,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1054
1057
|
])) : H("", !0)
|
|
1055
1058
|
]));
|
|
1056
1059
|
}
|
|
1057
|
-
},
|
|
1060
|
+
}, nl = {
|
|
1058
1061
|
__name: "PickerWrap",
|
|
1059
1062
|
emits: ["onMouseDown"],
|
|
1060
1063
|
setup(n) {
|
|
@@ -1081,14 +1084,14 @@ const It = { key: 1 }, Vt = {
|
|
|
1081
1084
|
}, null, 512)
|
|
1082
1085
|
], 544));
|
|
1083
1086
|
}
|
|
1084
|
-
},
|
|
1087
|
+
}, ol = { class: "w-full flex justify-center" }, il = {
|
|
1085
1088
|
key: 1,
|
|
1086
1089
|
width: "28",
|
|
1087
1090
|
height: "28",
|
|
1088
1091
|
viewBox: "0 0 28 28",
|
|
1089
1092
|
fill: "none",
|
|
1090
1093
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1091
|
-
},
|
|
1094
|
+
}, sl = {
|
|
1092
1095
|
__name: "ColorType",
|
|
1093
1096
|
props: {
|
|
1094
1097
|
variant: String,
|
|
@@ -1108,7 +1111,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1108
1111
|
},
|
|
1109
1112
|
emits: ["onChangeMode"],
|
|
1110
1113
|
setup(n) {
|
|
1111
|
-
return (V, r) => (m(), E("div",
|
|
1114
|
+
return (V, r) => (m(), E("div", ol, [
|
|
1112
1115
|
h("button", {
|
|
1113
1116
|
type: "button",
|
|
1114
1117
|
class: Q(n.mode == "solid" ? "active" : ""),
|
|
@@ -1119,7 +1122,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1119
1122
|
key: 0,
|
|
1120
1123
|
class: "w-[28px] h-[28px] rounded-full border",
|
|
1121
1124
|
style: te(`background:${n.modelValue}`)
|
|
1122
|
-
}, null, 4)) : (m(), E("svg",
|
|
1125
|
+
}, null, 4)) : (m(), E("svg", il, r[3] || (r[3] = [
|
|
1123
1126
|
h("g", { opacity: "0.5" }, [
|
|
1124
1127
|
h("path", {
|
|
1125
1128
|
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",
|
|
@@ -1162,19 +1165,19 @@ const It = { key: 1 }, Vt = {
|
|
|
1162
1165
|
], 6)
|
|
1163
1166
|
]));
|
|
1164
1167
|
}
|
|
1165
|
-
},
|
|
1168
|
+
}, rl = ["cp-theme"], ul = {
|
|
1166
1169
|
key: 0,
|
|
1167
1170
|
class: "flex justify-end border-b h-[46px] relative mt-[-5px] mb-5"
|
|
1168
|
-
},
|
|
1171
|
+
}, dl = {
|
|
1169
1172
|
key: 1,
|
|
1170
1173
|
class: "grid items-center mb-5"
|
|
1171
|
-
},
|
|
1174
|
+
}, cl = { key: 2 }, pl = { key: 0 }, gl = { class: "ck-cp-local-color-conatiner" }, vl = ["onClick"], ml = { class: "flex items-center gap-2" }, fl = { id: "ck-cp-target-background" }, hl = { class: "flex gap-3" }, yl = {
|
|
1172
1175
|
key: 0,
|
|
1173
1176
|
class: "w-full flex gap-3"
|
|
1174
|
-
},
|
|
1177
|
+
}, bl = {
|
|
1175
1178
|
key: 4,
|
|
1176
1179
|
class: "ck-cp-local-color-conatiner"
|
|
1177
|
-
},
|
|
1180
|
+
}, xl = ["onClick"], kl = {
|
|
1178
1181
|
__name: "OcColorPickerPopup",
|
|
1179
1182
|
props: {
|
|
1180
1183
|
modelValue: {
|
|
@@ -1226,22 +1229,22 @@ const It = { key: 1 }, Vt = {
|
|
|
1226
1229
|
deep: !0
|
|
1227
1230
|
}
|
|
1228
1231
|
);
|
|
1229
|
-
const Z = $e(() => r.variant !== "gradient" ? O.value.filter((t) => !t.includes("linear") && !t.includes("radial")) : O.value), M = v(!1),
|
|
1232
|
+
const Z = $e(() => r.variant !== "gradient" ? O.value.filter((t) => !t.includes("linear") && !t.includes("radial")) : O.value), M = v(!1), T = v("linear"), B = _e({
|
|
1230
1233
|
angle: 90,
|
|
1231
1234
|
percentageX: 50,
|
|
1232
1235
|
percentageY: 50
|
|
1233
|
-
}),
|
|
1236
|
+
}), z = v(""), U = v(r.inputType), N = v(!1), D = v(), le = v(), J = v(), j = v(), R = v(), X = _e({
|
|
1234
1237
|
h: 0,
|
|
1235
1238
|
s: 0,
|
|
1236
1239
|
l: 0
|
|
1237
1240
|
});
|
|
1238
|
-
Be("gradientBar", le), Be("canvas", J), Be("pickerWrap",
|
|
1241
|
+
Be("gradientBar", le), Be("canvas", J), Be("pickerWrap", j), Be("pickerPointer", R), Be("opacitySlider", D);
|
|
1239
1242
|
let ae = 0, ee = 0, b = 0, Se = 0, ue = 0, ie = 0;
|
|
1240
1243
|
const Pe = (t) => {
|
|
1241
|
-
!
|
|
1244
|
+
!j.value || !R.value || (ue = j.value.offsetHeight - R.value.offsetHeight, ie = j.value.offsetWidth - R.value.offsetWidth, b = t.clientX - t.target.getBoundingClientRect().left, Se = t.clientY - t.target.getBoundingClientRect().top, ae = b - 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", Ue));
|
|
1242
1245
|
}, Ee = (t) => {
|
|
1243
1246
|
t.preventDefault();
|
|
1244
|
-
const e =
|
|
1247
|
+
const e = j.value.getBoundingClientRect(), l = t.clientX - e.left - R.value.offsetWidth / 2, i = t.clientY - e.top - R.value.offsetHeight / 2;
|
|
1245
1248
|
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), G();
|
|
1246
1249
|
}, Ue = () => {
|
|
1247
1250
|
window.removeEventListener("mousemove", Ee), window.removeEventListener("mouseup", Ue);
|
|
@@ -1263,7 +1266,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1263
1266
|
Ce(t), G();
|
|
1264
1267
|
}, 0);
|
|
1265
1268
|
}, De = () => {
|
|
1266
|
-
let t = { s: 0, l: 0 }, e =
|
|
1269
|
+
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), d = 1 - parseInt(R.value.style.top) / l, k = i / e;
|
|
1267
1270
|
return t.l = d / 2 * (2 - k), t.s = d * k / (1 - Math.abs(2 * t.l - 1)), Number.isNaN(t.s) && (t.s = t.l), t.l = t.l > 1 ? 1 : t.l, t.s = t.s > 1 ? 1 : t.s, t;
|
|
1268
1271
|
}, me = () => {
|
|
1269
1272
|
const t = a.value.find((e) => e.select == !0);
|
|
@@ -1271,7 +1274,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1271
1274
|
const { l: e, s: l } = et(t.r, t.g, t.b);
|
|
1272
1275
|
let i = e, s = l;
|
|
1273
1276
|
Number.isNaN(s) && (s = i);
|
|
1274
|
-
let d = { x: 0, y: 0 }, k =
|
|
1277
|
+
let d = { x: 0, y: 0 }, k = j.value.offsetWidth - R.value.offsetWidth, I = j.value.offsetHeight - R.value.offsetHeight;
|
|
1275
1278
|
const [$, g] = 2 * i - 1 < 0 ? [
|
|
1276
1279
|
k * 2 * s / (1 + s),
|
|
1277
1280
|
I * (1 - i * (1 + s))
|
|
@@ -1295,7 +1298,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1295
1298
|
const e = (i = (l = u.value) == null ? void 0 : l.querySelector(".gradient-handle-content")) == null ? void 0 : i.getBoundingClientRect();
|
|
1296
1299
|
return t === 0 ? "0px" : t === 100 && e ? `${(((s = le.value) == null ? void 0 : s.offsetWidth) || 0) - (e.width || 0)}px` : `${(((d = le.value) == null ? void 0 : d.offsetWidth) || 0) * (t / 100) - ((e == null ? void 0 : e.width) || 0) / 2}px`;
|
|
1297
1300
|
};
|
|
1298
|
-
let
|
|
1301
|
+
let q = null, _ = null;
|
|
1299
1302
|
const Ve = (t) => {
|
|
1300
1303
|
var i, s;
|
|
1301
1304
|
const l = t.target.offsetParent;
|
|
@@ -1322,7 +1325,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1322
1325
|
}, de = (t) => {
|
|
1323
1326
|
var d, k;
|
|
1324
1327
|
t.preventDefault();
|
|
1325
|
-
const e = (k = (d = u.value) == null ? void 0 : d.querySelector(".gradient-handle-content")) == null ? void 0 : k.getBoundingClientRect(), l =
|
|
1328
|
+
const e = (k = (d = u.value) == null ? void 0 : d.querySelector(".gradient-handle-content")) == null ? void 0 : k.getBoundingClientRect(), l = q == null ? void 0 : q.getBoundingClientRect(), i = l.width - (e == null ? void 0 : e.width);
|
|
1326
1329
|
let s = t.clientX - (l.left || 0) - ((e == null ? void 0 : e.width) || 0) / 2;
|
|
1327
1330
|
if (s < 0 ? s = 0 : s > i && (s = i), _) {
|
|
1328
1331
|
_.style.left = `${s}px`;
|
|
@@ -1333,7 +1336,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1333
1336
|
}
|
|
1334
1337
|
}, qe = (t) => {
|
|
1335
1338
|
var I, $;
|
|
1336
|
-
const e =
|
|
1339
|
+
const e = q == null ? void 0 : q.getBoundingClientRect(), l = Math.round((t.clientX - ((e == null ? void 0 : e.left) || 0)) / ((e == null ? void 0 : e.width) || 1) * 100), i = a.value.findIndex((g) => g.select == !0), s = a.value[i], d = {
|
|
1337
1340
|
id: Date.now(),
|
|
1338
1341
|
r: s.r,
|
|
1339
1342
|
g: s.g,
|
|
@@ -1371,8 +1374,8 @@ const It = { key: 1 }, Vt = {
|
|
|
1371
1374
|
d && (R.value.style.left = `${d.x}px`, R.value.style.top = `${d.y}px`), ne.value = i, Ie(s);
|
|
1372
1375
|
}
|
|
1373
1376
|
}, 0);
|
|
1374
|
-
},
|
|
1375
|
-
a.value.forEach((l) => be(l)),
|
|
1377
|
+
}, Te = () => {
|
|
1378
|
+
a.value.forEach((l) => be(l)), Le();
|
|
1376
1379
|
const t = a.value[0];
|
|
1377
1380
|
ne.value = t.hue, Ie(!0);
|
|
1378
1381
|
let e = me();
|
|
@@ -1382,7 +1385,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1382
1385
|
let e = document.createElement("div");
|
|
1383
1386
|
e.id = `clr-gb-${t.id}`, e.classList.add("gradient-handle"), e.style.left = Oe(t.percent);
|
|
1384
1387
|
let l = document.createElement("div");
|
|
1385
|
-
l.classList.add("gradient-handle-content"), t.select == !0 && e.classList.add("select"), e.appendChild(l),
|
|
1388
|
+
l.classList.add("gradient-handle-content"), t.select == !0 && e.classList.add("select"), e.appendChild(l), q && q.appendChild(e);
|
|
1386
1389
|
}
|
|
1387
1390
|
}, Me = (t) => {
|
|
1388
1391
|
const e = J.value.getContext("2d", { willReadFrequently: !0 }), l = J.value.width, i = J.value.height;
|
|
@@ -1401,7 +1404,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1401
1404
|
if (y.value == "gradient") {
|
|
1402
1405
|
a.value.sort((s, d) => s.percent - d.percent);
|
|
1403
1406
|
let e = "linear-gradient(90deg, ", l;
|
|
1404
|
-
if (
|
|
1407
|
+
if (T.value == "linear") {
|
|
1405
1408
|
l = `linear-gradient(${B.angle}deg, `;
|
|
1406
1409
|
for (let s = 0; s < a.value.length; s++) {
|
|
1407
1410
|
const { r: d, g: k, b: I, a: $, percent: g } = a.value[s];
|
|
@@ -1422,7 +1425,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1422
1425
|
let d = "";
|
|
1423
1426
|
switch (r.type) {
|
|
1424
1427
|
case "HEX8":
|
|
1425
|
-
d =
|
|
1428
|
+
d = $t(e, l, i, s / 100);
|
|
1426
1429
|
break;
|
|
1427
1430
|
case "RGBA":
|
|
1428
1431
|
d = `rgba(${e},${l},${i},${s / 100})`;
|
|
@@ -1436,12 +1439,12 @@ const It = { key: 1 }, Vt = {
|
|
|
1436
1439
|
}
|
|
1437
1440
|
p(d);
|
|
1438
1441
|
}
|
|
1439
|
-
},
|
|
1442
|
+
}, Le = () => {
|
|
1440
1443
|
a.value.forEach((t) => {
|
|
1441
1444
|
t.hue = Qe(t.r, t.g, t.b);
|
|
1442
1445
|
});
|
|
1443
1446
|
}, Fe = (t) => {
|
|
1444
|
-
|
|
1447
|
+
T.value = t, F();
|
|
1445
1448
|
}, Ge = () => {
|
|
1446
1449
|
var t, e;
|
|
1447
1450
|
if (a.value.length > 2) {
|
|
@@ -1459,7 +1462,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1459
1462
|
var l;
|
|
1460
1463
|
const t = (l = u.value) == null ? void 0 : l.querySelector("#cp-btn-eyedropper");
|
|
1461
1464
|
t == null || t.classList.add("active"), new EyeDropper().open().then((i) => {
|
|
1462
|
-
const { sRGBHex: s } = i, d = a.value.find((I) => I.select == !0), k =
|
|
1465
|
+
const { sRGBHex: s } = i, d = a.value.find((I) => I.select == !0), k = ze(s);
|
|
1463
1466
|
if (k) {
|
|
1464
1467
|
const I = Qe(k.r, k.g, k.b);
|
|
1465
1468
|
if (d && (d.hue = I, d.r = k.r, d.g = k.g, d.b = k.b), ye(k)) {
|
|
@@ -1489,15 +1492,15 @@ const It = { key: 1 }, Vt = {
|
|
|
1489
1492
|
} else
|
|
1490
1493
|
oe.value = e, F(), K();
|
|
1491
1494
|
}, o = (t) => {
|
|
1492
|
-
|
|
1495
|
+
X.h = t.h, X.s = t.s, X.l = t.l;
|
|
1493
1496
|
const e = a.value.find((l) => l.select == !0);
|
|
1494
|
-
if (e && !Number.isNaN(
|
|
1495
|
-
const { r: l, g: i, b: s } = at(
|
|
1496
|
-
e.hue =
|
|
1497
|
+
if (e && !Number.isNaN(X.h) && !Number.isNaN(X.s) && !Number.isNaN(X.l)) {
|
|
1498
|
+
const { r: l, g: i, b: s } = at(X.h, X.s / 100, X.l / 100);
|
|
1499
|
+
e.hue = X.h, e.r = l, e.g = i, e.b = s, ce(e.r, e.g, e.b, e.hue, !0), F(), K();
|
|
1497
1500
|
}
|
|
1498
1501
|
}, x = () => {
|
|
1499
|
-
if (
|
|
1500
|
-
const t =
|
|
1502
|
+
if (z.value) {
|
|
1503
|
+
const t = ze(z.value);
|
|
1501
1504
|
if (t) {
|
|
1502
1505
|
const e = Qe(t.r, t.g, t.b), l = a.value.find((i) => i.select == !0);
|
|
1503
1506
|
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), F(), K(), pe(U.value));
|
|
@@ -1505,7 +1508,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1505
1508
|
}
|
|
1506
1509
|
}, G = () => {
|
|
1507
1510
|
const t = a.value.find((e) => e.select == !0);
|
|
1508
|
-
t && (
|
|
1511
|
+
t && (z.value = tt(t.r, t.g, t.b).toUpperCase()), pe(U.value);
|
|
1509
1512
|
}, se = (t) => {
|
|
1510
1513
|
f("last-used-pick", t);
|
|
1511
1514
|
};
|
|
@@ -1513,7 +1516,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1513
1516
|
const xe = (t = "") => {
|
|
1514
1517
|
if (y.value == "gradient") {
|
|
1515
1518
|
let e = t.includes("linear") ? "linear" : "radial", l = [];
|
|
1516
|
-
if (
|
|
1519
|
+
if (T.value = e, e == "linear") {
|
|
1517
1520
|
let i = /^linear-gradient\((.*)\)$/, s = t.replace(";", "").trim().match(i), d = /,\s*(?![^()]*\))/;
|
|
1518
1521
|
if (s) {
|
|
1519
1522
|
let k = s[1].split(d);
|
|
@@ -1579,16 +1582,16 @@ const It = { key: 1 }, Vt = {
|
|
|
1579
1582
|
};
|
|
1580
1583
|
if (t.includes("#"))
|
|
1581
1584
|
if (t.length >= 8)
|
|
1582
|
-
e =
|
|
1585
|
+
e = wt(t);
|
|
1583
1586
|
else {
|
|
1584
|
-
let l =
|
|
1587
|
+
let l = ze(t);
|
|
1585
1588
|
l ? (e.a = 1, e.r = l.r, e.g = l.g, e.b = l.b) : e = null;
|
|
1586
1589
|
}
|
|
1587
1590
|
else if (t.includes("rgb"))
|
|
1588
1591
|
if (t.includes("rgba"))
|
|
1589
|
-
e =
|
|
1592
|
+
e = St(t);
|
|
1590
1593
|
else {
|
|
1591
|
-
let l =
|
|
1594
|
+
let l = Ct(t);
|
|
1592
1595
|
l ? (e.a = 1, e.r = l.r, e.g = l.g, e.b = l.b) : e = null;
|
|
1593
1596
|
}
|
|
1594
1597
|
e && (a.value[0].r = e.r, a.value[0].b = e.b, a.value[0].g = e.g, a.value[0].a = parseInt((e.a * 100).toFixed(0)), oe.value = a.value[0].a, a.value[0].hue = 0);
|
|
@@ -1601,38 +1604,38 @@ const It = { key: 1 }, Vt = {
|
|
|
1601
1604
|
break;
|
|
1602
1605
|
case "HSL": {
|
|
1603
1606
|
const { h: l, s: i, l: s } = et(e.r, e.g, e.b);
|
|
1604
|
-
|
|
1607
|
+
X.h = Math.round(l), X.s = Math.round(i * 100), X.l = Math.round(s * 100);
|
|
1605
1608
|
break;
|
|
1606
1609
|
}
|
|
1607
1610
|
}
|
|
1608
1611
|
U.value = t;
|
|
1609
1612
|
}
|
|
1610
1613
|
}, ke = (t) => {
|
|
1611
|
-
t && xe(t),
|
|
1614
|
+
t && xe(t), Te();
|
|
1612
1615
|
};
|
|
1613
1616
|
fe(
|
|
1614
1617
|
() => r.modelValue,
|
|
1615
1618
|
(t, e) => {
|
|
1616
1619
|
t !== e && t !== C.value && (a.value.forEach((l) => {
|
|
1617
|
-
const i =
|
|
1620
|
+
const i = q == null ? void 0 : q.querySelector(`#clr-gb-${l.id}`);
|
|
1618
1621
|
i == null || i.remove();
|
|
1619
1622
|
}), ke(t));
|
|
1620
1623
|
}
|
|
1621
1624
|
);
|
|
1622
1625
|
const ut = (t) => {
|
|
1623
1626
|
a.value.forEach((e) => {
|
|
1624
|
-
const l =
|
|
1627
|
+
const l = q == null ? void 0 : q.querySelector(`#clr-gb-${e.id}`);
|
|
1625
1628
|
l == null || l.remove();
|
|
1626
1629
|
}), t !== "solid" ? (y.value = "gradient", setTimeout(() => {
|
|
1627
1630
|
var e;
|
|
1628
|
-
|
|
1631
|
+
q = (e = u.value) == null ? void 0 : e.querySelector(".gradient-bar"), Fe(t), Te();
|
|
1629
1632
|
}, 200)) : t === "solid" && (y.value = "solid", a.value = a.value.map((e) => (e.select = !1, e)), a.value[0].select = !0, setTimeout(() => {
|
|
1630
1633
|
ke(r.modelValue);
|
|
1631
1634
|
}, 200));
|
|
1632
1635
|
};
|
|
1633
1636
|
return Je(() => {
|
|
1634
1637
|
var t;
|
|
1635
|
-
y.value = r.modelValue.includes("linear") || r.modelValue.includes("radial") ? "gradient" : "solid", y.value == "gradient" && (
|
|
1638
|
+
y.value = r.modelValue.includes("linear") || r.modelValue.includes("radial") ? "gradient" : "solid", y.value == "gradient" && (q = (t = u.value) == null ? void 0 : t.querySelector(".gradient-bar")), ke(r.modelValue), pe(U.value), ft(() => {
|
|
1636
1639
|
N.value = !0;
|
|
1637
1640
|
});
|
|
1638
1641
|
}), (t, e) => (m(), E("div", {
|
|
@@ -1641,25 +1644,25 @@ const It = { key: 1 }, Vt = {
|
|
|
1641
1644
|
class: Q(["ck-cp-container", n.disabled ? "ck-cp-disabled " : ""]),
|
|
1642
1645
|
"cp-theme": n.theme
|
|
1643
1646
|
}, [
|
|
1644
|
-
n.variant == "gradient" ? (m(), E("div",
|
|
1645
|
-
|
|
1647
|
+
n.variant == "gradient" ? (m(), E("div", ul, [
|
|
1648
|
+
L(sl, {
|
|
1646
1649
|
class: "mr-auto",
|
|
1647
1650
|
variant: n.variant,
|
|
1648
1651
|
mode: y.value,
|
|
1649
1652
|
"model-value": n.modelValue,
|
|
1650
1653
|
iconClasses: n.iconClasses,
|
|
1651
|
-
gradientType:
|
|
1654
|
+
gradientType: T.value,
|
|
1652
1655
|
onOnChangeMode: ut
|
|
1653
1656
|
}, null, 8, ["variant", "mode", "model-value", "iconClasses", "gradientType"])
|
|
1654
1657
|
])) : H("", !0),
|
|
1655
|
-
y.value == "gradient" && n.variant == "gradient" ? (m(), E("div",
|
|
1656
|
-
|
|
1657
|
-
gradientType:
|
|
1658
|
+
y.value == "gradient" && n.variant == "gradient" ? (m(), E("div", dl, [
|
|
1659
|
+
L(Zt, {
|
|
1660
|
+
gradientType: T.value,
|
|
1658
1661
|
onOnAddColor: qe,
|
|
1659
1662
|
onOnMouseDown: Ve,
|
|
1660
1663
|
onOnDeleteColor: Ge
|
|
1661
1664
|
}, null, 8, ["gradientType"]),
|
|
1662
|
-
|
|
1665
|
+
L(al, {
|
|
1663
1666
|
percentageY: B.percentageY,
|
|
1664
1667
|
"onUpdate:percentageY": e[0] || (e[0] = (l) => B.percentageY = l),
|
|
1665
1668
|
angle: B.angle,
|
|
@@ -1668,25 +1671,25 @@ const It = { key: 1 }, Vt = {
|
|
|
1668
1671
|
"onUpdate:percentageX": e[2] || (e[2] = (l) => B.percentageX = l),
|
|
1669
1672
|
inputType: U.value,
|
|
1670
1673
|
mode: y.value,
|
|
1671
|
-
gradientType:
|
|
1674
|
+
gradientType: T.value,
|
|
1672
1675
|
onOnInput: F
|
|
1673
1676
|
}, null, 8, ["percentageY", "angle", "percentageX", "inputType", "mode", "gradientType"])
|
|
1674
|
-
])) : (m(), E("div",
|
|
1675
|
-
n.presetColors ? (m(), E("div",
|
|
1677
|
+
])) : (m(), E("div", cl, [
|
|
1678
|
+
n.presetColors ? (m(), E("div", pl, [
|
|
1676
1679
|
e[10] || (e[10] = h("div", { class: "text-oc-text-400 text-sm my-3 font-medium" }, "Choose color", -1)),
|
|
1677
|
-
h("div",
|
|
1680
|
+
h("div", gl, [
|
|
1678
1681
|
(m(!0), E(ge, null, Ke(n.presetColors, (l) => (m(), E("div", {
|
|
1679
1682
|
key: `color-${l}`,
|
|
1680
1683
|
class: "ck-cp-color-item !w-[32px] !h-[32px]",
|
|
1681
1684
|
style: te(`background:${l}`),
|
|
1682
1685
|
onClick: (i) => se(l)
|
|
1683
|
-
}, null, 12,
|
|
1686
|
+
}, null, 12, vl))), 128))
|
|
1684
1687
|
])
|
|
1685
1688
|
])) : H("", !0)
|
|
1686
1689
|
])),
|
|
1687
|
-
|
|
1688
|
-
h("div",
|
|
1689
|
-
|
|
1690
|
+
L(nl, { onOnMouseDown: Pe }),
|
|
1691
|
+
h("div", ml, [
|
|
1692
|
+
L(el, {
|
|
1690
1693
|
class: Q(M.value ? "max-w-[90%]" : ""),
|
|
1691
1694
|
modelValue: ne.value,
|
|
1692
1695
|
"onUpdate:modelValue": e[3] || (e[3] = (l) => ne.value = l),
|
|
@@ -1712,41 +1715,41 @@ const It = { key: 1 }, Vt = {
|
|
|
1712
1715
|
], -1)
|
|
1713
1716
|
]))) : H("", !0)
|
|
1714
1717
|
]),
|
|
1715
|
-
n.showAlpha ? (m(),
|
|
1718
|
+
n.showAlpha ? (m(), P(Kt, {
|
|
1716
1719
|
key: 3,
|
|
1717
1720
|
modelValue: oe.value,
|
|
1718
1721
|
"onUpdate:modelValue": e[5] || (e[5] = (l) => oe.value = l),
|
|
1719
1722
|
onOnInput: e[6] || (e[6] = (l) => He(l.target.value))
|
|
1720
1723
|
}, null, 8, ["modelValue"])) : H("", !0),
|
|
1721
|
-
|
|
1722
|
-
[
|
|
1724
|
+
ht(h("div", fl, null, 512), [
|
|
1725
|
+
[yt, !1]
|
|
1723
1726
|
]),
|
|
1724
|
-
h("div",
|
|
1725
|
-
|
|
1727
|
+
h("div", hl, [
|
|
1728
|
+
L(Yt, {
|
|
1726
1729
|
"model-value": U.value,
|
|
1727
1730
|
"onUpdate:modelValue": pe
|
|
1728
1731
|
}, null, 8, ["model-value"]),
|
|
1729
|
-
N.value && n.showInputSet ? (m(), E("div",
|
|
1730
|
-
U.value == "HEX" ? (m(),
|
|
1732
|
+
N.value && n.showInputSet ? (m(), E("div", yl, [
|
|
1733
|
+
U.value == "HEX" ? (m(), P(qt, {
|
|
1731
1734
|
key: 0,
|
|
1732
|
-
modelValue:
|
|
1735
|
+
modelValue: z.value,
|
|
1733
1736
|
"onUpdate:modelValue": [
|
|
1734
|
-
e[7] || (e[7] = (l) =>
|
|
1737
|
+
e[7] || (e[7] = (l) => z.value = l),
|
|
1735
1738
|
x
|
|
1736
1739
|
]
|
|
1737
1740
|
}, null, 8, ["modelValue"])) : H("", !0),
|
|
1738
|
-
U.value == "RGB" ? (m(),
|
|
1741
|
+
U.value == "RGB" ? (m(), P(nt, {
|
|
1739
1742
|
key: 1,
|
|
1740
1743
|
"rgb-value": a.value.find((l) => l.select == !0),
|
|
1741
1744
|
onUpdateRgbValue: c
|
|
1742
1745
|
}, null, 8, ["rgb-value"])) : H("", !0),
|
|
1743
|
-
U.value == "HSL" ? (m(),
|
|
1746
|
+
U.value == "HSL" ? (m(), P(nt, {
|
|
1744
1747
|
key: 2,
|
|
1745
1748
|
"input-type": "HSL",
|
|
1746
|
-
"hsl-value":
|
|
1749
|
+
"hsl-value": X,
|
|
1747
1750
|
onUpdateHslValue: o
|
|
1748
1751
|
}, null, 8, ["hsl-value"])) : H("", !0),
|
|
1749
|
-
n.showAlpha ? (m(),
|
|
1752
|
+
n.showAlpha ? (m(), P(Gt, {
|
|
1750
1753
|
key: 3,
|
|
1751
1754
|
modelValue: oe.value,
|
|
1752
1755
|
"onUpdate:modelValue": [
|
|
@@ -1757,23 +1760,23 @@ const It = { key: 1 }, Vt = {
|
|
|
1757
1760
|
])) : H("", !0)
|
|
1758
1761
|
]),
|
|
1759
1762
|
e[12] || (e[12] = h("div", { class: "text-oc-text-400 text-sm my-3 font-medium font-inter" }, "Last used", -1)),
|
|
1760
|
-
O.value.length > 0 && n.showColorList ? (m(), E("div",
|
|
1763
|
+
O.value.length > 0 && n.showColorList ? (m(), E("div", bl, [
|
|
1761
1764
|
(m(!0), E(ge, null, Ke(Z.value, (l) => (m(), E("div", {
|
|
1762
1765
|
key: `color-${l}`,
|
|
1763
1766
|
class: "ck-cp-color-item !w-[32px] !h-[32px]",
|
|
1764
1767
|
style: te(`background:${l}`),
|
|
1765
1768
|
onClick: (i) => se(l)
|
|
1766
|
-
}, null, 12,
|
|
1769
|
+
}, null, 12, xl))), 128))
|
|
1767
1770
|
])) : H("", !0)
|
|
1768
|
-
], 10,
|
|
1771
|
+
], 10, rl));
|
|
1769
1772
|
}
|
|
1770
|
-
},
|
|
1773
|
+
}, $l = { class: "flex flex-col pt-10 px-7 gap-y-7 items-center" }, wl = { class: "flex flex-col gap-y-4 text-center items-center" }, Sl = {
|
|
1771
1774
|
key: 0,
|
|
1772
1775
|
class: "text-xl font-medium"
|
|
1773
|
-
},
|
|
1776
|
+
}, Cl = {
|
|
1774
1777
|
key: 0,
|
|
1775
1778
|
class: "text-sm text-oc-text-400"
|
|
1776
|
-
},
|
|
1779
|
+
}, Ul = /* @__PURE__ */ bt({
|
|
1777
1780
|
__name: "OcOnboardingProgressbar",
|
|
1778
1781
|
props: {
|
|
1779
1782
|
title: {
|
|
@@ -1822,36 +1825,36 @@ const It = { key: 1 }, Vt = {
|
|
|
1822
1825
|
}
|
|
1823
1826
|
]
|
|
1824
1827
|
}));
|
|
1825
|
-
return (y, u) => (m(), E("div",
|
|
1826
|
-
|
|
1828
|
+
return (y, u) => (m(), E("div", $l, [
|
|
1829
|
+
L(w(It), {
|
|
1827
1830
|
class: "w-[140px] bg-white rounded-full h-[140px]",
|
|
1828
1831
|
"additional-options": r.value,
|
|
1829
1832
|
"tooltip-formatter": () => null,
|
|
1830
1833
|
"tooltip-value-formatter": () => null
|
|
1831
1834
|
}, null, 8, ["additional-options"]),
|
|
1832
|
-
h("div",
|
|
1833
|
-
n.title ? (m(), E("span",
|
|
1834
|
-
|
|
1835
|
-
n.description ? (m(), E("span",
|
|
1835
|
+
h("div", wl, [
|
|
1836
|
+
n.title ? (m(), E("span", Sl, Ne(n.title), 1)) : H("", !0),
|
|
1837
|
+
je(y.$slots, "description", {}, () => [
|
|
1838
|
+
n.description ? (m(), E("span", Cl, Ne(n.description), 1)) : H("", !0)
|
|
1836
1839
|
])
|
|
1837
1840
|
])
|
|
1838
1841
|
]));
|
|
1839
1842
|
}
|
|
1840
|
-
}),
|
|
1843
|
+
}), Dl = it(
|
|
1841
1844
|
() => import("./OcCodeBlock-uFQyGnLq.js")
|
|
1842
|
-
),
|
|
1845
|
+
), Hl = it(
|
|
1843
1846
|
() => import("./OcLottieAnimation-BjY3rCjS.js")
|
|
1844
1847
|
);
|
|
1845
1848
|
export {
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1849
|
+
Nl as BarChart,
|
|
1850
|
+
Xl as BarRaceChart,
|
|
1851
|
+
Fl as Card,
|
|
1852
|
+
Dl as CodeBlock,
|
|
1853
|
+
Tt as ColorPicker,
|
|
1854
|
+
kl as ColorPickerPopup,
|
|
1855
|
+
Ql as LineChart,
|
|
1856
|
+
Hl as LottieAnimation,
|
|
1857
|
+
Ul as OnboardingProgressbar,
|
|
1858
|
+
It as PieChart,
|
|
1859
|
+
El as TextEditor
|
|
1857
1860
|
};
|