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