@orchidui/dashboard 1.19.0-3 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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 ze = (n, V, r) => gt(n, typeof V != "symbol" ? V + "" : V, r);
|
|
4
|
-
import { ref as v, computed as
|
|
5
|
-
import { Q as G, a as yt } from "./QuillEditor-
|
|
4
|
+
import { ref as v, computed as be, createBlock as F, openBlock as m, unref as w, normalizeClass as Q, withCtx as Y, createVNode as T, createElementBlock as E, createSlots as vt, renderSlot as Ke, normalizeStyle as ee, createCommentVNode as H, onMounted as _e, watch as ye, createElementVNode as b, Fragment as pe, createTextVNode as ge, toDisplayString as Pe, renderList as Ze, withKeys as it, inject as Be, reactive as et, provide as Te, nextTick as mt, withDirectives as ft, vShow as ht, defineComponent as bt, defineAsyncComponent as st } from "vue";
|
|
5
|
+
import { Q as G, a as yt } from "./QuillEditor-DwCbpq2d.js";
|
|
6
6
|
import { BaseInput as rt, Dropdown as ut, Input as $e, Icon as A, Modal as xt, Select as Je, Slider as Ne } from "@orchidui/core";
|
|
7
7
|
import { rgbToHsl as tt, rgb2Hex as lt, rgbaToHex8 as kt, hsl2Hex as at, hexToRgb as je, rgbToHue as Ae, hslToRgb as nt, hex8ToRgba as $t, parseRgba as wt, parseRgb as St } from "./Dashboard/ColorPicker/components/converters.js";
|
|
8
8
|
import { PieChart as Ct } from "./Dashboard/Charts/PieChart/OcPieChart.js";
|
|
9
|
-
import { LineChart as
|
|
9
|
+
import { LineChart as Ml } from "./Dashboard/Charts/LineChart/OcLineChart.js";
|
|
10
10
|
import { BarChart as Al } from "./Dashboard/Charts/BarChart/OcBarChart.js";
|
|
11
11
|
import { BarRaceChart as Pl } from "./Dashboard/Charts/BarRaceChart/OcBarRaceChart.js";
|
|
12
12
|
import { _ as ql } from "./OcCard-D3be6IMj.js";
|
|
@@ -33,9 +33,9 @@ const It = { key: 1 }, Vt = {
|
|
|
33
33
|
},
|
|
34
34
|
emits: ["update:model-value"],
|
|
35
35
|
setup(n, { emit: V }) {
|
|
36
|
-
const r = n, y = V, u = v(!1), f = v(r.modelValue), C = (
|
|
37
|
-
|
|
38
|
-
}, p =
|
|
36
|
+
const r = n, y = V, u = v(!1), f = v(r.modelValue), C = (U) => {
|
|
37
|
+
U && (f.value = U, y("update:model-value", U));
|
|
38
|
+
}, p = be(() => r.variant === "gradient" ? {
|
|
39
39
|
class: "w-[20px] h-[20px] hide-svg-icon",
|
|
40
40
|
style: {
|
|
41
41
|
background: f.value
|
|
@@ -44,31 +44,31 @@ const It = { key: 1 }, Vt = {
|
|
|
44
44
|
style: {
|
|
45
45
|
color: f.value
|
|
46
46
|
}
|
|
47
|
-
}), a = v(),
|
|
48
|
-
|
|
47
|
+
}), a = v(), O = v([]), j = () => {
|
|
48
|
+
O.value.length > 8 && (O.value = O.value.filter((U, N) => N < 8)), localStorage.setItem("ck-cp-local-color-list", JSON.stringify(O.value));
|
|
49
49
|
};
|
|
50
|
-
let
|
|
51
|
-
|
|
52
|
-
const L = (
|
|
53
|
-
if (!
|
|
54
|
-
if (
|
|
55
|
-
|
|
50
|
+
let M = localStorage.getItem("ck-cp-local-color-list");
|
|
51
|
+
M && (O.value = [...new Set(JSON.parse(M))], j());
|
|
52
|
+
const L = (U) => {
|
|
53
|
+
if (!U && f.value)
|
|
54
|
+
if (O.value.find((D) => D === f.value))
|
|
55
|
+
O.value = [
|
|
56
56
|
f.value,
|
|
57
|
-
...
|
|
57
|
+
...O.value.filter((D) => D !== f.value)
|
|
58
58
|
], j();
|
|
59
59
|
else {
|
|
60
|
-
|
|
61
|
-
let
|
|
62
|
-
|
|
60
|
+
O.value.length >= 9 && O.value.pop();
|
|
61
|
+
let D = f.value;
|
|
62
|
+
O.value.unshift(D), j();
|
|
63
63
|
}
|
|
64
|
-
}, B = v(!1), W = (
|
|
65
|
-
f.value =
|
|
64
|
+
}, B = v(!1), W = (U) => {
|
|
65
|
+
f.value = U, y("update:model-value", U), u.value = !1;
|
|
66
66
|
};
|
|
67
|
-
return (
|
|
67
|
+
return (U, N) => (m(), F(w(rt), {
|
|
68
68
|
class: Q(n.hideInputColor ? "w-[40px]" : ""),
|
|
69
69
|
onClick: N[1] || (N[1] = () => {
|
|
70
|
-
var
|
|
71
|
-
return (
|
|
70
|
+
var D;
|
|
71
|
+
return (D = a.value) == null ? void 0 : D.toggleDropdown();
|
|
72
72
|
})
|
|
73
73
|
}, {
|
|
74
74
|
default: Y(() => [
|
|
@@ -77,7 +77,7 @@ const It = { key: 1 }, Vt = {
|
|
|
77
77
|
ref: a,
|
|
78
78
|
modelValue: u.value,
|
|
79
79
|
"onUpdate:modelValue": [
|
|
80
|
-
N[0] || (N[0] = (
|
|
80
|
+
N[0] || (N[0] = (D) => u.value = D),
|
|
81
81
|
L
|
|
82
82
|
],
|
|
83
83
|
"max-menu-height": 800,
|
|
@@ -87,13 +87,13 @@ const It = { key: 1 }, Vt = {
|
|
|
87
87
|
}
|
|
88
88
|
}, {
|
|
89
89
|
menu: Y(() => [
|
|
90
|
-
B.value ?
|
|
90
|
+
B.value ? H("", !0) : (m(), F(w(xl), {
|
|
91
91
|
key: 0,
|
|
92
92
|
variant: n.variant,
|
|
93
93
|
"show-alpha": !n.hideOpacity,
|
|
94
94
|
type: n.hideOpacity ? "HEX" : "HEX8",
|
|
95
95
|
"model-value": n.modelValue,
|
|
96
|
-
"last-used-colors":
|
|
96
|
+
"last-used-colors": O.value,
|
|
97
97
|
"preset-colors": n.presetColors,
|
|
98
98
|
"onUpdate:modelValue": C,
|
|
99
99
|
onLastUsedPick: W
|
|
@@ -101,7 +101,7 @@ const It = { key: 1 }, Vt = {
|
|
|
101
101
|
]),
|
|
102
102
|
default: Y(() => [
|
|
103
103
|
n.hideInputColor ? (m(), E("div", It, [
|
|
104
|
-
Ke(
|
|
104
|
+
Ke(U.$slots, "picker-icon", {}, () => [
|
|
105
105
|
T(w(A), {
|
|
106
106
|
class: "cursor-pointer",
|
|
107
107
|
style: ee(`color: ${f.value}`),
|
|
@@ -116,10 +116,10 @@ const It = { key: 1 }, Vt = {
|
|
|
116
116
|
placeholder: "",
|
|
117
117
|
"onUpdate:modelValue": C
|
|
118
118
|
}, vt({ _: 2 }, [
|
|
119
|
-
|
|
119
|
+
U.$slots.leading ? {
|
|
120
120
|
name: "leading",
|
|
121
121
|
fn: Y(() => [
|
|
122
|
-
Ke(
|
|
122
|
+
Ke(U.$slots, "leading")
|
|
123
123
|
]),
|
|
124
124
|
key: "0"
|
|
125
125
|
} : void 0
|
|
@@ -131,7 +131,7 @@ const It = { key: 1 }, Vt = {
|
|
|
131
131
|
_: 3
|
|
132
132
|
}, 8, ["class"]));
|
|
133
133
|
}
|
|
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"],
|
|
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 = {
|
|
@@ -200,25 +200,25 @@ const It = { key: 1 }, Vt = {
|
|
|
200
200
|
"alignment"
|
|
201
201
|
],
|
|
202
202
|
"text-only": ["changes", "font-size", "font-style", "link", "quote", "list", "alignment"]
|
|
203
|
-
}, f =
|
|
203
|
+
}, f = be(() => u[r.variant]), C = G.import("attributors/style/size");
|
|
204
204
|
C.whitelist = r.fontSizes.map((c) => c.value), G.register(C, !0);
|
|
205
205
|
const p = G.import("attributors/style/align");
|
|
206
206
|
G.register(p, !0);
|
|
207
207
|
const a = G.import("attributors/style/background");
|
|
208
208
|
G.register(a, !0);
|
|
209
|
-
const
|
|
210
|
-
G.register(
|
|
209
|
+
const O = G.import("attributors/style/color");
|
|
210
|
+
G.register(O, !0);
|
|
211
211
|
const j = G.import("attributors/style/direction");
|
|
212
212
|
G.register(j, !0);
|
|
213
|
-
const
|
|
214
|
-
G.register(
|
|
213
|
+
const M = G.import("attributors/style/font");
|
|
214
|
+
G.register(M, !0);
|
|
215
215
|
const L = G.import("blots/block/embed");
|
|
216
216
|
class B extends L {
|
|
217
217
|
}
|
|
218
218
|
ze(B, "blotName", "divider"), ze(B, "tagName", "hr"), G.register(B);
|
|
219
219
|
const W = v(
|
|
220
220
|
Math.random().toString(36).replace(/[^a-zA-Z]+/g, "")
|
|
221
|
-
),
|
|
221
|
+
), U = v(!1), N = v(!1), D = v(!1), te = v(!1), K = v(!1), z = v(!1), R = v(!1), q = v(""), le = v(""), _ = v(""), x = v(), we = v(!1), ue = v(r.image), ve = be(() => {
|
|
222
222
|
const c = [
|
|
223
223
|
"background",
|
|
224
224
|
"bold",
|
|
@@ -244,7 +244,7 @@ const It = { key: 1 }, Vt = {
|
|
|
244
244
|
formats: c
|
|
245
245
|
};
|
|
246
246
|
}), Se = (c) => {
|
|
247
|
-
|
|
247
|
+
U.value = x.value.getQuill().history.stack.undo.length > 0, N.value = x.value.getQuill().history.stack.redo.length > 0, D.value = x.value.getQuill().getFormat().bold, te.value = x.value.getQuill().getFormat().italic, K.value = x.value.getQuill().getFormat().underline, R.value = x.value.getQuill().getFormat().blockquote, le.value = x.value.getQuill().getFormat().list, _.value = x.value.getQuill().getFormat().align;
|
|
248
248
|
let o = document.createElement("div");
|
|
249
249
|
o.innerHTML = c, we.value && (o.innerText ? y("update:modelValue", c || "") : y("update:modelValue", ""), o.remove());
|
|
250
250
|
}, Re = () => {
|
|
@@ -259,7 +259,7 @@ const It = { key: 1 }, Vt = {
|
|
|
259
259
|
x.value.getQuill().history.redo(), Se(r.modelValue);
|
|
260
260
|
}, ae = () => {
|
|
261
261
|
var c;
|
|
262
|
-
x.value.getQuill().format("bold", !
|
|
262
|
+
x.value.getQuill().format("bold", !D.value), (c = x.value.getQuill().getSelection()) != null && c.length || (D.value = !D.value);
|
|
263
263
|
}, Ie = () => {
|
|
264
264
|
var c;
|
|
265
265
|
x.value.getQuill().format("italic", !te.value), (c = x.value.getQuill().getSelection()) != null && c.length || (te.value = !te.value);
|
|
@@ -273,54 +273,54 @@ const It = { key: 1 }, Vt = {
|
|
|
273
273
|
c && c.length > 0 && x.value.getQuill().theme.tooltip.edit();
|
|
274
274
|
}, ne = () => {
|
|
275
275
|
x.value.getQuill().format("blockquote", !R.value);
|
|
276
|
-
},
|
|
276
|
+
}, Ue = (c) => {
|
|
277
277
|
const o = x.value.getQuill().getSelection();
|
|
278
278
|
o && (x.value.getQuill().clipboard.dangerouslyPasteHTML(o.index, `<img src="${c}" />`), ue.value = c, y("update:image", ue.value));
|
|
279
279
|
}, Fe = () => {
|
|
280
280
|
x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1);
|
|
281
281
|
const c = document.createElement("input");
|
|
282
282
|
c.type = "file", c.accept = "jpg,.jpeg,.png,.webp,.gif", c.onchange = () => {
|
|
283
|
-
const o = c.files[0],
|
|
284
|
-
|
|
283
|
+
const o = c.files[0], h = new FileReader();
|
|
284
|
+
h.onload = () => Ue(h.result), h.readAsDataURL(o);
|
|
285
285
|
}, c.click();
|
|
286
286
|
}, P = (c) => /^data:image\/(png|jpg|jpeg|gif);base64,/.test(c), Z = (c) => {
|
|
287
287
|
setTimeout(() => {
|
|
288
|
-
var
|
|
288
|
+
var h;
|
|
289
289
|
if (c) {
|
|
290
290
|
const J = x.value.getHTML(), ce = document.createElement("div");
|
|
291
291
|
ce.innerHTML = J;
|
|
292
292
|
let se = ce.getElementsByTagName("img");
|
|
293
293
|
if (se && se.length > 0)
|
|
294
|
-
for (let
|
|
295
|
-
const Qe = (
|
|
294
|
+
for (let he = 0; he < se.length; he++) {
|
|
295
|
+
const Qe = (h = se[he]) == null ? void 0 : h.getAttribute("src");
|
|
296
296
|
P(Qe) && y("update:image", Qe);
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
}, 100);
|
|
300
300
|
const { items: o } = c.clipboardData;
|
|
301
|
-
o.length && o[0].getAsString((
|
|
302
|
-
P(
|
|
301
|
+
o.length && o[0].getAsString((h) => {
|
|
302
|
+
P(h) && (x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1));
|
|
303
303
|
});
|
|
304
|
-
},
|
|
304
|
+
}, De = () => {
|
|
305
305
|
x.value.getQuill().theme.tooltip.edit("video");
|
|
306
|
-
},
|
|
306
|
+
}, He = (c) => {
|
|
307
307
|
x.value.getQuill().format("list", c), le.value = c;
|
|
308
308
|
}, me = (c = void 0) => {
|
|
309
309
|
x.value.getQuill().format("align", c), _.value = c;
|
|
310
|
-
}, fe = v(""),
|
|
310
|
+
}, fe = v(""), Oe = () => {
|
|
311
311
|
x.value.getQuill().format("color", fe.value);
|
|
312
312
|
};
|
|
313
313
|
_e(() => {
|
|
314
314
|
de(r.initialFontSize || r.fontSizes[0].value), we.value = !0;
|
|
315
315
|
});
|
|
316
|
-
const ie = v(100), xe = v(!1),
|
|
317
|
-
var
|
|
316
|
+
const ie = v(100), xe = v(!1), Me = (c) => {
|
|
317
|
+
var h, J;
|
|
318
318
|
ie.value = c;
|
|
319
|
-
const o = (
|
|
319
|
+
const o = (h = window.getSelection()) == null ? void 0 : h.focusNode;
|
|
320
320
|
o && o.nodeName !== "#text" && (x.value.getQuill().format("width", `${ie.value}%`), (J = o == null ? void 0 : o.querySelector("img")) == null || J.setAttribute("style", "margin:auto;display:block;"));
|
|
321
321
|
}, ke = (c = "left") => {
|
|
322
|
-
var
|
|
323
|
-
const o = (
|
|
322
|
+
var h, J;
|
|
323
|
+
const o = (h = window.getSelection()) == null ? void 0 : h.focusNode;
|
|
324
324
|
if (o && o.nodeName !== "#text") {
|
|
325
325
|
let ce = "float:left";
|
|
326
326
|
c == "center" ? ce = "" : c == "right" && (ce = "float:right"), (J = o == null ? void 0 : o.querySelector("img")) == null || J.setAttribute("style", `margin:auto;display:block;${ce}`);
|
|
@@ -329,7 +329,7 @@ const It = { key: 1 }, Vt = {
|
|
|
329
329
|
var o;
|
|
330
330
|
const c = (o = window.getSelection()) == null ? void 0 : o.focusNode;
|
|
331
331
|
xe.value = c.innerHTML && c.innerHTML.includes("<img");
|
|
332
|
-
}, X = v(!1), Ve = v(3), Le = v(3), Ge =
|
|
332
|
+
}, X = v(!1), Ve = v(3), Le = v(3), Ge = be(() => {
|
|
333
333
|
let c = [];
|
|
334
334
|
for (let o = 1; o < 30; o++)
|
|
335
335
|
c.push({
|
|
@@ -337,7 +337,7 @@ const It = { key: 1 }, Vt = {
|
|
|
337
337
|
value: o.toString()
|
|
338
338
|
});
|
|
339
339
|
return c;
|
|
340
|
-
}), Ye =
|
|
340
|
+
}), Ye = be(() => {
|
|
341
341
|
let c = [];
|
|
342
342
|
for (let o = 1; o < 12; o++)
|
|
343
343
|
c.push({
|
|
@@ -346,7 +346,8 @@ const It = { key: 1 }, Vt = {
|
|
|
346
346
|
});
|
|
347
347
|
return c;
|
|
348
348
|
}), We = () => {
|
|
349
|
-
x.value.getQuill().getModule("better-table")
|
|
349
|
+
let c = x.value.getQuill().getModule("better-table");
|
|
350
|
+
c == null || c.insertTable(parseInt(Ve.value), parseInt(Le.value)), X.value = !1;
|
|
350
351
|
};
|
|
351
352
|
return ye(
|
|
352
353
|
() => r.modelValue,
|
|
@@ -366,7 +367,7 @@ const It = { key: 1 }, Vt = {
|
|
|
366
367
|
T(w(xt), {
|
|
367
368
|
title: "Insert table",
|
|
368
369
|
modelValue: X.value,
|
|
369
|
-
"onUpdate:modelValue": o[2] || (o[2] = (
|
|
370
|
+
"onUpdate:modelValue": o[2] || (o[2] = (h) => X.value = h),
|
|
370
371
|
class: "!w-full !h-full",
|
|
371
372
|
confirmButtonProps: {
|
|
372
373
|
label: "Save",
|
|
@@ -376,21 +377,21 @@ const It = { key: 1 }, Vt = {
|
|
|
376
377
|
default: Y(() => [
|
|
377
378
|
T(w(Je), {
|
|
378
379
|
modelValue: Le.value,
|
|
379
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
380
|
+
"onUpdate:modelValue": o[0] || (o[0] = (h) => Le.value = h),
|
|
380
381
|
options: Ye.value,
|
|
381
382
|
label: "Table cell",
|
|
382
383
|
class: "mb-3"
|
|
383
384
|
}, null, 8, ["modelValue", "options"]),
|
|
384
385
|
T(w(Je), {
|
|
385
386
|
modelValue: Ve.value,
|
|
386
|
-
"onUpdate:modelValue": o[1] || (o[1] = (
|
|
387
|
+
"onUpdate:modelValue": o[1] || (o[1] = (h) => Ve.value = h),
|
|
387
388
|
options: Ge.value,
|
|
388
389
|
label: "Table rows"
|
|
389
390
|
}, null, 8, ["modelValue", "options"])
|
|
390
391
|
]),
|
|
391
392
|
_: 1
|
|
392
393
|
}, 8, ["modelValue", "confirmButtonProps"]),
|
|
393
|
-
|
|
394
|
+
b("div", {
|
|
394
395
|
class: Q(["grid", { "has-error": n.errorMessage }]),
|
|
395
396
|
onClick: oe
|
|
396
397
|
}, [
|
|
@@ -403,6 +404,7 @@ const It = { key: 1 }, Vt = {
|
|
|
403
404
|
options: {
|
|
404
405
|
bounds: `#${W.value}`
|
|
405
406
|
},
|
|
407
|
+
"is-text-only": "",
|
|
406
408
|
theme: "snow",
|
|
407
409
|
"content-type": "html",
|
|
408
410
|
"global-options": ve.value,
|
|
@@ -412,14 +414,14 @@ const It = { key: 1 }, Vt = {
|
|
|
412
414
|
onPaste: Z
|
|
413
415
|
}, {
|
|
414
416
|
toolbar: Y(() => [
|
|
415
|
-
|
|
417
|
+
b("div", {
|
|
416
418
|
id: W.value,
|
|
417
419
|
class: "flex min-h-[36px] flex-wrap !py-2 !px-3 gap-y-2 rounded-t"
|
|
418
420
|
}, [
|
|
419
421
|
f.value.includes("changes") ? (m(), E(pe, { key: 0 }, [
|
|
420
|
-
|
|
422
|
+
b("div", Tt, [
|
|
421
423
|
T(w(A), {
|
|
422
|
-
class: Q(
|
|
424
|
+
class: Q(U.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
|
|
423
425
|
width: "20",
|
|
424
426
|
height: "20",
|
|
425
427
|
name: "text-editor/undo",
|
|
@@ -433,28 +435,28 @@ const It = { key: 1 }, Vt = {
|
|
|
433
435
|
onClick: Ce
|
|
434
436
|
}, null, 8, ["class"])
|
|
435
437
|
]),
|
|
436
|
-
o[16] || (o[16] =
|
|
437
|
-
], 64)) :
|
|
438
|
+
o[16] || (o[16] = b("div", { class: "border-l border-oc-gray-200" }, null, -1))
|
|
439
|
+
], 64)) : H("", !0),
|
|
438
440
|
f.value.includes("font-size") ? (m(), E(pe, { key: 1 }, [
|
|
439
441
|
T(w(ut), {
|
|
440
442
|
modelValue: z.value,
|
|
441
|
-
"onUpdate:modelValue": o[3] || (o[3] = (
|
|
443
|
+
"onUpdate:modelValue": o[3] || (o[3] = (h) => z.value = h),
|
|
442
444
|
class: "px-5"
|
|
443
445
|
}, {
|
|
444
446
|
menu: Y(() => [
|
|
445
|
-
|
|
446
|
-
(m(!0), E(pe, null, Ze(n.fontSizes, (
|
|
447
|
-
key:
|
|
448
|
-
class: Q(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50", q.value ===
|
|
449
|
-
onClick: (J) => de(
|
|
450
|
-
}, Pe(
|
|
447
|
+
b("div", Rt, [
|
|
448
|
+
(m(!0), E(pe, null, Ze(n.fontSizes, (h) => (m(), E("div", {
|
|
449
|
+
key: h.value,
|
|
450
|
+
class: Q(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50", q.value === h.value ? "font-medium" : ""]),
|
|
451
|
+
onClick: (J) => de(h.value)
|
|
452
|
+
}, Pe(h.label), 11, Et))), 128))
|
|
451
453
|
])
|
|
452
454
|
]),
|
|
453
455
|
default: Y(() => {
|
|
454
|
-
var
|
|
456
|
+
var h;
|
|
455
457
|
return [
|
|
456
|
-
|
|
457
|
-
ge(Pe((
|
|
458
|
+
b("div", Bt, [
|
|
459
|
+
ge(Pe((h = n.fontSizes.find((J) => J.value === q.value)) == null ? void 0 : h.label) + " ", 1),
|
|
458
460
|
T(w(A), {
|
|
459
461
|
width: "20",
|
|
460
462
|
height: "20",
|
|
@@ -466,12 +468,12 @@ const It = { key: 1 }, Vt = {
|
|
|
466
468
|
}),
|
|
467
469
|
_: 1
|
|
468
470
|
}, 8, ["modelValue"]),
|
|
469
|
-
o[17] || (o[17] =
|
|
470
|
-
], 64)) :
|
|
471
|
+
o[17] || (o[17] = b("div", { class: "border-l border-oc-gray-200" }, null, -1))
|
|
472
|
+
], 64)) : H("", !0),
|
|
471
473
|
f.value.includes("font-style") ? (m(), E(pe, { key: 2 }, [
|
|
472
|
-
|
|
474
|
+
b("div", Ut, [
|
|
473
475
|
T(w(A), {
|
|
474
|
-
class: Q(["cursor-pointer",
|
|
476
|
+
class: Q(["cursor-pointer", D.value ? "text-oc-text" : "text-oc-text-300"]),
|
|
475
477
|
width: "20",
|
|
476
478
|
height: "20",
|
|
477
479
|
name: "text-editor/bold",
|
|
@@ -492,9 +494,9 @@ const It = { key: 1 }, Vt = {
|
|
|
492
494
|
onClick: Xe
|
|
493
495
|
}, null, 8, ["class"])
|
|
494
496
|
]),
|
|
495
|
-
o[18] || (o[18] =
|
|
496
|
-
], 64)) :
|
|
497
|
-
|
|
497
|
+
o[18] || (o[18] = b("div", { class: "border-l border-oc-gray-200" }, null, -1))
|
|
498
|
+
], 64)) : H("", !0),
|
|
499
|
+
b("div", Dt, [
|
|
498
500
|
f.value.includes("link") ? (m(), F(w(A), {
|
|
499
501
|
key: 0,
|
|
500
502
|
class: "cursor-pointer",
|
|
@@ -502,7 +504,7 @@ const It = { key: 1 }, Vt = {
|
|
|
502
504
|
height: "20",
|
|
503
505
|
name: "text-editor/link",
|
|
504
506
|
onClick: qe
|
|
505
|
-
})) :
|
|
507
|
+
})) : H("", !0),
|
|
506
508
|
f.value.includes("image") ? (m(), F(w(A), {
|
|
507
509
|
key: 1,
|
|
508
510
|
class: "cursor-pointer",
|
|
@@ -510,7 +512,7 @@ const It = { key: 1 }, Vt = {
|
|
|
510
512
|
height: "20",
|
|
511
513
|
name: "text-editor/image",
|
|
512
514
|
onClick: Fe
|
|
513
|
-
})) :
|
|
515
|
+
})) : H("", !0),
|
|
514
516
|
f.value.includes("quote") ? (m(), F(w(A), {
|
|
515
517
|
key: 2,
|
|
516
518
|
class: Q(["cursor-pointer", R.value ? "text-oc-text" : "text-oc-text-300"]),
|
|
@@ -518,91 +520,91 @@ const It = { key: 1 }, Vt = {
|
|
|
518
520
|
height: "20",
|
|
519
521
|
name: "text-editor/quote",
|
|
520
522
|
onClick: ne
|
|
521
|
-
}, null, 8, ["class"])) :
|
|
523
|
+
}, null, 8, ["class"])) : H("", !0),
|
|
522
524
|
f.value.includes("media") ? (m(), F(w(A), {
|
|
523
525
|
key: 3,
|
|
524
526
|
class: "cursor-pointer",
|
|
525
527
|
width: "20",
|
|
526
528
|
height: "20",
|
|
527
529
|
name: "text-editor/media",
|
|
528
|
-
onClick:
|
|
529
|
-
})) :
|
|
530
|
+
onClick: De
|
|
531
|
+
})) : H("", !0),
|
|
530
532
|
T(w(A), {
|
|
531
533
|
class: "cursor-pointer",
|
|
532
534
|
width: "20",
|
|
533
535
|
height: "20",
|
|
534
536
|
name: "table",
|
|
535
|
-
onClick: o[4] || (o[4] = (
|
|
537
|
+
onClick: o[4] || (o[4] = (h) => X.value = !X.value)
|
|
536
538
|
})
|
|
537
539
|
]),
|
|
538
540
|
f.value.includes("list") ? (m(), E(pe, { key: 3 }, [
|
|
539
|
-
o[19] || (o[19] =
|
|
540
|
-
|
|
541
|
+
o[19] || (o[19] = b("div", { class: "border-l border-oc-gray-200" }, null, -1)),
|
|
542
|
+
b("div", Ht, [
|
|
541
543
|
T(w(A), {
|
|
542
544
|
class: Q(["cursor-pointer", le.value === "bullet" ? "text-oc-text" : "text-oc-text-300"]),
|
|
543
545
|
width: "20",
|
|
544
546
|
height: "20",
|
|
545
547
|
name: "text-editor/bullet",
|
|
546
|
-
onClick: o[5] || (o[5] = (
|
|
548
|
+
onClick: o[5] || (o[5] = (h) => He("bullet"))
|
|
547
549
|
}, null, 8, ["class"]),
|
|
548
550
|
T(w(A), {
|
|
549
551
|
class: Q(["cursor-pointer", le.value === "ordered" ? "text-oc-text" : "text-oc-text-300"]),
|
|
550
552
|
width: "20",
|
|
551
553
|
height: "20",
|
|
552
554
|
name: "text-editor/number",
|
|
553
|
-
onClick: o[6] || (o[6] = (
|
|
555
|
+
onClick: o[6] || (o[6] = (h) => He("ordered"))
|
|
554
556
|
}, null, 8, ["class"])
|
|
555
557
|
])
|
|
556
|
-
], 64)) :
|
|
558
|
+
], 64)) : H("", !0),
|
|
557
559
|
f.value.includes("alignment") ? (m(), E(pe, { key: 4 }, [
|
|
558
|
-
o[20] || (o[20] =
|
|
559
|
-
|
|
560
|
+
o[20] || (o[20] = b("div", { class: "border-l border-oc-gray-200" }, null, -1)),
|
|
561
|
+
b("div", Ot, [
|
|
560
562
|
T(w(A), {
|
|
561
563
|
class: Q(["cursor-pointer", _.value ? "text-oc-text-300" : "text-oc-text"]),
|
|
562
564
|
width: "20",
|
|
563
565
|
height: "20",
|
|
564
566
|
name: "text-editor/left",
|
|
565
|
-
onClick: o[7] || (o[7] = (
|
|
567
|
+
onClick: o[7] || (o[7] = (h) => me())
|
|
566
568
|
}, null, 8, ["class"]),
|
|
567
569
|
T(w(A), {
|
|
568
570
|
class: Q(["cursor-pointer", _.value === "center" ? "text-oc-text" : "text-oc-text-300"]),
|
|
569
571
|
width: "20",
|
|
570
572
|
height: "20",
|
|
571
573
|
name: "text-editor/center",
|
|
572
|
-
onClick: o[8] || (o[8] = (
|
|
574
|
+
onClick: o[8] || (o[8] = (h) => me("center"))
|
|
573
575
|
}, null, 8, ["class"]),
|
|
574
576
|
T(w(A), {
|
|
575
577
|
class: Q(["cursor-pointer", _.value === "right" ? "text-oc-text" : "text-oc-text-300"]),
|
|
576
578
|
width: "20",
|
|
577
579
|
height: "20",
|
|
578
580
|
name: "text-editor/right",
|
|
579
|
-
onClick: o[9] || (o[9] = (
|
|
581
|
+
onClick: o[9] || (o[9] = (h) => me("right"))
|
|
580
582
|
}, null, 8, ["class"]),
|
|
581
583
|
T(w(A), {
|
|
582
584
|
class: Q(["cursor-pointer", _.value === "justify" ? "text-oc-text" : "text-oc-text-300"]),
|
|
583
585
|
width: "20",
|
|
584
586
|
height: "20",
|
|
585
587
|
name: "text-editor/justify",
|
|
586
|
-
onClick: o[10] || (o[10] = (
|
|
588
|
+
onClick: o[10] || (o[10] = (h) => me("justify"))
|
|
587
589
|
}, null, 8, ["class"])
|
|
588
590
|
])
|
|
589
|
-
], 64)) :
|
|
590
|
-
o[22] || (o[22] =
|
|
591
|
-
|
|
591
|
+
], 64)) : H("", !0),
|
|
592
|
+
o[22] || (o[22] = b("div", { class: "border-l border-oc-gray-200" }, null, -1)),
|
|
593
|
+
b("div", Mt, [
|
|
592
594
|
T(w(Vt), {
|
|
593
595
|
modelValue: fe.value,
|
|
594
596
|
"onUpdate:modelValue": [
|
|
595
|
-
o[11] || (o[11] = (
|
|
596
|
-
|
|
597
|
+
o[11] || (o[11] = (h) => fe.value = h),
|
|
598
|
+
Oe
|
|
597
599
|
],
|
|
598
600
|
"hide-input-color": ""
|
|
599
601
|
}, {
|
|
600
602
|
"picker-icon": Y(() => [
|
|
601
|
-
|
|
602
|
-
|
|
603
|
+
b("div", Qt, [
|
|
604
|
+
b("div", {
|
|
603
605
|
style: ee(`color:${fe.value}`)
|
|
604
606
|
}, "A", 4),
|
|
605
|
-
|
|
607
|
+
b("div", {
|
|
606
608
|
class: "h-[5px] w-full rounded border",
|
|
607
609
|
style: ee(`background:${fe.value}`)
|
|
608
610
|
}, null, 4)
|
|
@@ -611,7 +613,7 @@ const It = { key: 1 }, Vt = {
|
|
|
611
613
|
_: 1
|
|
612
614
|
}, 8, ["modelValue"])
|
|
613
615
|
]),
|
|
614
|
-
o[23] || (o[23] =
|
|
616
|
+
o[23] || (o[23] = b("div", { class: "border-l border-oc-gray-200" }, null, -1)),
|
|
615
617
|
xe.value ? (m(), E("div", At, [
|
|
616
618
|
T(w(Ne), {
|
|
617
619
|
label: "Image width",
|
|
@@ -619,42 +621,42 @@ const It = { key: 1 }, Vt = {
|
|
|
619
621
|
"model-value": ie.value,
|
|
620
622
|
"min-limit": 0,
|
|
621
623
|
"max-limit": 100,
|
|
622
|
-
"onUpdate:modelValue":
|
|
624
|
+
"onUpdate:modelValue": Me
|
|
623
625
|
}, null, 8, ["model-value"]),
|
|
624
|
-
|
|
626
|
+
b("div", Nt, [
|
|
625
627
|
T(w(A), {
|
|
626
628
|
class: "cursor-pointer",
|
|
627
629
|
width: "20",
|
|
628
630
|
height: "20",
|
|
629
631
|
name: "text-editor/left",
|
|
630
|
-
onClick: o[12] || (o[12] = (
|
|
632
|
+
onClick: o[12] || (o[12] = (h) => ke())
|
|
631
633
|
}),
|
|
632
634
|
T(w(A), {
|
|
633
635
|
class: "cursor-pointer",
|
|
634
636
|
width: "20",
|
|
635
637
|
height: "20",
|
|
636
638
|
name: "text-editor/center",
|
|
637
|
-
onClick: o[13] || (o[13] = (
|
|
639
|
+
onClick: o[13] || (o[13] = (h) => ke("center"))
|
|
638
640
|
}),
|
|
639
641
|
T(w(A), {
|
|
640
642
|
class: "cursor-pointer",
|
|
641
643
|
width: "20",
|
|
642
644
|
height: "20",
|
|
643
645
|
name: "text-editor/right",
|
|
644
|
-
onClick: o[14] || (o[14] = (
|
|
646
|
+
onClick: o[14] || (o[14] = (h) => ke("right"))
|
|
645
647
|
})
|
|
646
648
|
])
|
|
647
|
-
])) :
|
|
648
|
-
|
|
649
|
+
])) : H("", !0),
|
|
650
|
+
b("div", Pt, [
|
|
649
651
|
(m(), E("svg", {
|
|
650
652
|
width: "20",
|
|
651
653
|
height: "20",
|
|
652
654
|
viewBox: "0 0 15 15",
|
|
653
655
|
fill: "none",
|
|
654
656
|
xmlns: "http://www.w3.org/2000/svg",
|
|
655
|
-
onClick: o[15] || (o[15] = (
|
|
657
|
+
onClick: o[15] || (o[15] = (h) => Re())
|
|
656
658
|
}, o[21] || (o[21] = [
|
|
657
|
-
|
|
659
|
+
b("path", {
|
|
658
660
|
"fill-rule": "evenodd",
|
|
659
661
|
"clip-rule": "evenodd",
|
|
660
662
|
d: "M2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5Z",
|
|
@@ -665,7 +667,7 @@ const It = { key: 1 }, Vt = {
|
|
|
665
667
|
], 8, Lt)
|
|
666
668
|
]),
|
|
667
669
|
_: 1
|
|
668
|
-
}, 8, ["id", "content", "options", "global-options", "placeholder"])) :
|
|
670
|
+
}, 8, ["id", "content", "options", "global-options", "placeholder"])) : H("", !0)
|
|
669
671
|
], 2)
|
|
670
672
|
]),
|
|
671
673
|
_: 1
|
|
@@ -750,24 +752,24 @@ const It = { key: 1 }, Vt = {
|
|
|
750
752
|
r: 0,
|
|
751
753
|
g: 0,
|
|
752
754
|
b: 0
|
|
753
|
-
}), f = v(), C = v(), p = v(), a = (
|
|
754
|
-
var W,
|
|
755
|
+
}), f = v(), C = v(), p = v(), a = (M, L) => {
|
|
756
|
+
var W, U, N;
|
|
755
757
|
let B = 255;
|
|
756
|
-
if (r.inputType == "HSL" && (B = 100,
|
|
757
|
-
if (
|
|
758
|
-
let
|
|
759
|
-
|
|
760
|
-
} else if (
|
|
761
|
-
let
|
|
762
|
-
|
|
763
|
-
} else if (
|
|
764
|
-
let
|
|
765
|
-
|
|
758
|
+
if (r.inputType == "HSL" && (B = 100, M == "r" && (B = 360)), !isNaN(parseInt(L))) {
|
|
759
|
+
if (M == "r") {
|
|
760
|
+
let D = parseInt(L);
|
|
761
|
+
D <= B && (u.value.r = D, r.inputType == "RGB" ? O("r") : j()), (W = f.value) == null || W.focus();
|
|
762
|
+
} else if (M == "g") {
|
|
763
|
+
let D = parseInt(L);
|
|
764
|
+
D <= B && (u.value.g = D, r.inputType == "RGB" ? O("g") : j()), (U = C.value) == null || U.focus();
|
|
765
|
+
} else if (M == "b") {
|
|
766
|
+
let D = parseInt(L);
|
|
767
|
+
D <= B && (u.value.b = D, r.inputType == "RGB" ? O("b") : j()), (N = p.value) == null || N.focus();
|
|
766
768
|
}
|
|
767
769
|
}
|
|
768
|
-
},
|
|
770
|
+
}, O = (M) => {
|
|
769
771
|
y("update-rgb-value", {
|
|
770
|
-
type:
|
|
772
|
+
type: M,
|
|
771
773
|
value: {
|
|
772
774
|
r: parseInt(u.value.r),
|
|
773
775
|
g: parseInt(u.value.g),
|
|
@@ -783,21 +785,21 @@ const It = { key: 1 }, Vt = {
|
|
|
783
785
|
};
|
|
784
786
|
return r.inputType === "RGB" ? ye(
|
|
785
787
|
() => r.rgbValue,
|
|
786
|
-
(
|
|
787
|
-
|
|
788
|
+
(M, L) => {
|
|
789
|
+
M !== L && (u.value = M);
|
|
788
790
|
},
|
|
789
791
|
{ immediate: !0, deep: !0 }
|
|
790
792
|
) : ye(
|
|
791
793
|
() => r.hslValue,
|
|
792
|
-
(
|
|
794
|
+
(M) => {
|
|
793
795
|
u.value = {
|
|
794
|
-
r:
|
|
795
|
-
g:
|
|
796
|
-
b:
|
|
796
|
+
r: M.h,
|
|
797
|
+
g: M.s,
|
|
798
|
+
b: M.l
|
|
797
799
|
};
|
|
798
800
|
},
|
|
799
801
|
{ immediate: !0, deep: !0 }
|
|
800
|
-
), (
|
|
802
|
+
), (M, L) => (m(), E("div", qt, [
|
|
801
803
|
T(w($e), {
|
|
802
804
|
ref_key: "rInputEl",
|
|
803
805
|
ref: f,
|
|
@@ -899,8 +901,8 @@ const It = { key: 1 }, Vt = {
|
|
|
899
901
|
y("update:modelValue", parseInt(f.target.value)), y("onInput", f);
|
|
900
902
|
};
|
|
901
903
|
return (f, C) => (m(), E("div", Yt, [
|
|
902
|
-
|
|
903
|
-
|
|
904
|
+
b("div", Wt, [
|
|
905
|
+
b("input", {
|
|
904
906
|
ref_key: "opacitySlider",
|
|
905
907
|
ref: r,
|
|
906
908
|
value: n.modelValue,
|
|
@@ -924,13 +926,13 @@ const It = { key: 1 }, Vt = {
|
|
|
924
926
|
L.preventDefault();
|
|
925
927
|
}, C = v("left:0"), p = v(!1), a = (L) => {
|
|
926
928
|
u("onMouseDown", L);
|
|
927
|
-
},
|
|
929
|
+
}, O = () => {
|
|
928
930
|
let L = y.value.querySelector(".select");
|
|
929
931
|
C.value = L == null ? void 0 : L.getAttribute("style");
|
|
930
932
|
}, j = () => {
|
|
931
933
|
var B;
|
|
932
|
-
|
|
933
|
-
},
|
|
934
|
+
O(), (((B = y.value.querySelectorAll(".gradient-handle")) == null ? void 0 : B.length) ?? 2) > 2 ? p.value = !0 : p.value = !1;
|
|
935
|
+
}, M = (L) => {
|
|
934
936
|
p.value = !1, u("onAddColor", L);
|
|
935
937
|
};
|
|
936
938
|
return (L, B) => (m(), E("div", {
|
|
@@ -939,7 +941,7 @@ const It = { key: 1 }, Vt = {
|
|
|
939
941
|
class: "relative h-[40px]",
|
|
940
942
|
onClick: j
|
|
941
943
|
}, [
|
|
942
|
-
|
|
944
|
+
b("button", {
|
|
943
945
|
type: "button",
|
|
944
946
|
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"]),
|
|
945
947
|
style: ee(C.value),
|
|
@@ -951,7 +953,7 @@ const It = { key: 1 }, Vt = {
|
|
|
951
953
|
height: "14"
|
|
952
954
|
})
|
|
953
955
|
], 6),
|
|
954
|
-
|
|
956
|
+
b("div", {
|
|
955
957
|
class: Q(["gradient-bar", {
|
|
956
958
|
"mt-[20px]": n.gradientType === "linear",
|
|
957
959
|
"mt-[12px]": n.gradientType === "radial"
|
|
@@ -959,11 +961,11 @@ const It = { key: 1 }, Vt = {
|
|
|
959
961
|
onMousedown: a,
|
|
960
962
|
onDragstart: f
|
|
961
963
|
}, [
|
|
962
|
-
|
|
964
|
+
b("div", {
|
|
963
965
|
ref_key: "gradientBar",
|
|
964
966
|
ref: r,
|
|
965
967
|
class: "gradient-container",
|
|
966
|
-
onDblclick:
|
|
968
|
+
onDblclick: M
|
|
967
969
|
}, null, 544)
|
|
968
970
|
], 34)
|
|
969
971
|
], 512));
|
|
@@ -979,7 +981,7 @@ const It = { key: 1 }, Vt = {
|
|
|
979
981
|
r("update:modelValue", parseFloat(u.target.value)), r("onInput", u);
|
|
980
982
|
};
|
|
981
983
|
return (u, f) => (m(), E("div", Zt, [
|
|
982
|
-
|
|
984
|
+
b("input", {
|
|
983
985
|
value: n.modelValue,
|
|
984
986
|
class: "picker-hue-range-slider",
|
|
985
987
|
type: "range",
|
|
@@ -1040,10 +1042,10 @@ const It = { key: 1 }, Vt = {
|
|
|
1040
1042
|
])),
|
|
1041
1043
|
"max-limit-label": Y(() => p[4] || (p[4] = [
|
|
1042
1044
|
ge("360"),
|
|
1043
|
-
|
|
1045
|
+
b("span", null, "°", -1)
|
|
1044
1046
|
])),
|
|
1045
1047
|
_: 1
|
|
1046
|
-
}, 8, ["model-value"])) :
|
|
1048
|
+
}, 8, ["model-value"])) : H("", !0),
|
|
1047
1049
|
n.gradientType == "radial" && y.value ? (m(), E("div", tl, [
|
|
1048
1050
|
T(w(Ne), {
|
|
1049
1051
|
label: "Position X",
|
|
@@ -1075,7 +1077,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1075
1077
|
])),
|
|
1076
1078
|
_: 1
|
|
1077
1079
|
}, 8, ["model-value"])
|
|
1078
|
-
])) :
|
|
1080
|
+
])) : H("", !0)
|
|
1079
1081
|
]));
|
|
1080
1082
|
}
|
|
1081
1083
|
}, al = {
|
|
@@ -1092,13 +1094,13 @@ const It = { key: 1 }, Vt = {
|
|
|
1092
1094
|
onMousedown: C[0] || (C[0] = (p) => f.$emit("onMouseDown", p)),
|
|
1093
1095
|
onDragstart: u
|
|
1094
1096
|
}, [
|
|
1095
|
-
|
|
1097
|
+
b("canvas", {
|
|
1096
1098
|
ref_key: "canvas",
|
|
1097
1099
|
ref: V,
|
|
1098
1100
|
class: "colour-area"
|
|
1099
1101
|
}, null, 512),
|
|
1100
|
-
C[1] || (C[1] =
|
|
1101
|
-
|
|
1102
|
+
C[1] || (C[1] = b("div", { class: "colour-area-mask" }, null, -1)),
|
|
1103
|
+
b("div", {
|
|
1102
1104
|
ref_key: "pickerPointer",
|
|
1103
1105
|
ref: y,
|
|
1104
1106
|
class: "colour-area-point-circle"
|
|
@@ -1133,7 +1135,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1133
1135
|
emits: ["onChangeMode"],
|
|
1134
1136
|
setup(n) {
|
|
1135
1137
|
return (V, r) => (m(), E("div", nl, [
|
|
1136
|
-
|
|
1138
|
+
b("button", {
|
|
1137
1139
|
type: "button",
|
|
1138
1140
|
class: Q(n.mode == "solid" ? "active" : ""),
|
|
1139
1141
|
style: { padding: "7px" },
|
|
@@ -1144,21 +1146,21 @@ const It = { key: 1 }, Vt = {
|
|
|
1144
1146
|
class: "w-[28px] h-[28px] rounded-full border",
|
|
1145
1147
|
style: ee(`background:${n.modelValue}`)
|
|
1146
1148
|
}, null, 4)) : (m(), E("svg", ol, r[3] || (r[3] = [
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
+
b("g", { opacity: "0.5" }, [
|
|
1150
|
+
b("path", {
|
|
1149
1151
|
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",
|
|
1150
1152
|
fill: "#03102F"
|
|
1151
1153
|
})
|
|
1152
1154
|
], -1)
|
|
1153
1155
|
])))
|
|
1154
1156
|
], 2),
|
|
1155
|
-
|
|
1157
|
+
b("button", {
|
|
1156
1158
|
type: "button",
|
|
1157
1159
|
class: Q(n.gradientType == "linear" && n.mode != "solid" ? "active" : ""),
|
|
1158
1160
|
style: ee(`${n.iconClasses.linear ? "" : "padding: 7px;"}`),
|
|
1159
1161
|
onClick: r[1] || (r[1] = (y) => V.$emit("onChangeMode", "linear"))
|
|
1160
1162
|
}, [
|
|
1161
|
-
|
|
1163
|
+
b("div", {
|
|
1162
1164
|
class: "w-[28px] h-[28px] rounded-full border",
|
|
1163
1165
|
style: ee(
|
|
1164
1166
|
n.modelValue && n.gradientType == "linear" && n.mode != "solid" ? `background:${n.modelValue}` : `
|
|
@@ -1171,13 +1173,13 @@ const It = { key: 1 }, Vt = {
|
|
|
1171
1173
|
)
|
|
1172
1174
|
}, null, 4)
|
|
1173
1175
|
], 6),
|
|
1174
|
-
|
|
1176
|
+
b("button", {
|
|
1175
1177
|
type: "button",
|
|
1176
1178
|
class: Q(n.gradientType == "radial" && n.mode != "solid" ? "active" : ""),
|
|
1177
1179
|
style: ee(`${n.iconClasses.radial ? "" : "padding: 6px;"}`),
|
|
1178
1180
|
onClick: r[2] || (r[2] = (y) => V.$emit("onChangeMode", "radial"))
|
|
1179
1181
|
}, [
|
|
1180
|
-
|
|
1182
|
+
b("div", {
|
|
1181
1183
|
class: "w-[28px] h-[28px] rounded-full border",
|
|
1182
1184
|
style: ee(
|
|
1183
1185
|
n.modelValue && n.gradientType == "radial" && n.mode != "solid" ? `background:${n.modelValue}` : "background: radial-gradient(circle at 50% 50%, rgb(255, 255, 255) 0%, rgb(3, 16, 47) 100%);"
|
|
@@ -1192,10 +1194,10 @@ const It = { key: 1 }, Vt = {
|
|
|
1192
1194
|
}, ul = {
|
|
1193
1195
|
key: 1,
|
|
1194
1196
|
class: "grid items-center mb-5"
|
|
1195
|
-
}, 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" },
|
|
1197
|
+
}, 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 = {
|
|
1196
1198
|
key: 0,
|
|
1197
1199
|
class: "w-full flex gap-3"
|
|
1198
|
-
},
|
|
1200
|
+
}, bl = {
|
|
1199
1201
|
key: 4,
|
|
1200
1202
|
class: "ck-cp-local-color-conatiner"
|
|
1201
1203
|
}, yl = ["onClick"], xl = {
|
|
@@ -1240,33 +1242,33 @@ const It = { key: 1 }, Vt = {
|
|
|
1240
1242
|
}, a = v([
|
|
1241
1243
|
{ id: 1, r: 68, g: 71, b: 119, a: 100, percent: 0, hue: 0, select: !0 },
|
|
1242
1244
|
{ id: 2, r: 0, g: 0, b: 255, a: 100, percent: 100, hue: 0, select: !1 }
|
|
1243
|
-
]),
|
|
1245
|
+
]), O = v(r.lastUsedColors);
|
|
1244
1246
|
ye(
|
|
1245
1247
|
() => r.lastUsedColors,
|
|
1246
1248
|
() => {
|
|
1247
|
-
|
|
1249
|
+
O.value = r.lastUsedColors;
|
|
1248
1250
|
},
|
|
1249
1251
|
{
|
|
1250
1252
|
deep: !0
|
|
1251
1253
|
}
|
|
1252
1254
|
);
|
|
1253
|
-
const j =
|
|
1255
|
+
const j = be(() => r.variant !== "gradient" ? O.value.filter((t) => !t.includes("linear") && !t.includes("radial")) : O.value), M = v(!1), L = v("linear"), B = et({
|
|
1254
1256
|
angle: 90,
|
|
1255
1257
|
percentageX: 50,
|
|
1256
1258
|
percentageY: 50
|
|
1257
|
-
}), W = v(""),
|
|
1259
|
+
}), W = v(""), U = v(r.inputType), N = v(!1), D = v(), te = v(), K = v(), z = v(), R = v(), q = et({
|
|
1258
1260
|
h: 0,
|
|
1259
1261
|
s: 0,
|
|
1260
1262
|
l: 0
|
|
1261
1263
|
});
|
|
1262
|
-
Te("gradientBar", te), Te("canvas", K), Te("pickerWrap", z), Te("pickerPointer", R), Te("opacitySlider",
|
|
1264
|
+
Te("gradientBar", te), Te("canvas", K), Te("pickerWrap", z), Te("pickerPointer", R), Te("opacitySlider", D);
|
|
1263
1265
|
let le = 0, _ = 0, x = 0, we = 0, ue = 0, ve = 0;
|
|
1264
1266
|
const Se = (t) => {
|
|
1265
|
-
!z.value || !R.value || (ue = z.value.offsetHeight - R.value.offsetHeight, ve = z.value.offsetWidth - R.value.offsetWidth, x = t.clientX - t.target.getBoundingClientRect().left, we = t.clientY - t.target.getBoundingClientRect().top, le = x - R.value.offsetWidth / 2, _ = we - R.value.offsetHeight / 2, R.value.style.left = `${le}px`, R.value.style.top = `${_}px`, Ce(!1),
|
|
1267
|
+
!z.value || !R.value || (ue = z.value.offsetHeight - R.value.offsetHeight, ve = z.value.offsetWidth - R.value.offsetWidth, x = t.clientX - t.target.getBoundingClientRect().left, we = t.clientY - t.target.getBoundingClientRect().top, le = x - R.value.offsetWidth / 2, _ = we - R.value.offsetHeight / 2, R.value.style.left = `${le}px`, R.value.style.top = `${_}px`, Ce(!1), h(), window.addEventListener("mousemove", Re), window.addEventListener("mouseup", Ee));
|
|
1266
1268
|
}, Re = (t) => {
|
|
1267
1269
|
t.preventDefault();
|
|
1268
1270
|
const e = z.value.getBoundingClientRect(), l = t.clientX - e.left - R.value.offsetWidth / 2, i = t.clientY - e.top - R.value.offsetHeight / 2;
|
|
1269
|
-
l >= 0 && l <= ve ? (le = l, R.value.style.left = `${l}px`) : 0 > l ? (le = 0, R.value.style.left = "0px") : l > ve && (le = ve, R.value.style.left = `${ve}px`), i >= 0 && i <= ue ? (_ = i, R.value.style.top = `${i}px`) : 0 > i ? (_ = 0, R.value.style.top = "0px") : i > ue && (_ = ue, R.value.style.top = `${ue}px`), Ce(!1),
|
|
1271
|
+
l >= 0 && l <= ve ? (le = l, R.value.style.left = `${l}px`) : 0 > l ? (le = 0, R.value.style.left = "0px") : l > ve && (le = ve, R.value.style.left = `${ve}px`), i >= 0 && i <= ue ? (_ = i, R.value.style.top = `${i}px`) : 0 > i ? (_ = 0, R.value.style.top = "0px") : i > ue && (_ = ue, R.value.style.top = `${ue}px`), Ce(!1), h();
|
|
1270
1272
|
}, Ee = () => {
|
|
1271
1273
|
window.removeEventListener("mousemove", Re), window.removeEventListener("mouseup", Ee);
|
|
1272
1274
|
}, Ce = (t) => {
|
|
@@ -1284,7 +1286,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1284
1286
|
}, ae = v(0), Ie = async (t) => {
|
|
1285
1287
|
const { rgb: e } = at(ae.value, 100, 50);
|
|
1286
1288
|
ke(e), setTimeout(() => {
|
|
1287
|
-
Ce(t),
|
|
1289
|
+
Ce(t), h();
|
|
1288
1290
|
}, 0);
|
|
1289
1291
|
}, Xe = () => {
|
|
1290
1292
|
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;
|
|
@@ -1309,7 +1311,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1309
1311
|
}, qe = () => {
|
|
1310
1312
|
const t = a.value.find((e) => e.select == !0);
|
|
1311
1313
|
t && (t.hue = ae.value);
|
|
1312
|
-
}, ne = v(100),
|
|
1314
|
+
}, ne = v(100), Ue = (t) => {
|
|
1313
1315
|
if (r.showAlpha) {
|
|
1314
1316
|
const e = a.value.find((l) => l.select == !0);
|
|
1315
1317
|
e && (e.a = parseInt(t), X());
|
|
@@ -1320,7 +1322,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1320
1322
|
return t === 0 ? "0px" : t === 100 && e ? `${(((s = te.value) == null ? void 0 : s.offsetWidth) || 0) - (e.width || 0)}px` : `${(((d = te.value) == null ? void 0 : d.offsetWidth) || 0) * (t / 100) - ((e == null ? void 0 : e.width) || 0) / 2}px`;
|
|
1321
1323
|
};
|
|
1322
1324
|
let P = null, Z = null;
|
|
1323
|
-
const
|
|
1325
|
+
const De = (t) => {
|
|
1324
1326
|
var i, s;
|
|
1325
1327
|
const l = t.target.offsetParent;
|
|
1326
1328
|
if ((i = l == null ? void 0 : l.id) != null && i.includes("clr-gb-")) {
|
|
@@ -1334,15 +1336,15 @@ const It = { key: 1 }, Vt = {
|
|
|
1334
1336
|
for (let g = 0; g < a.value.length; g++) {
|
|
1335
1337
|
const S = a.value[g];
|
|
1336
1338
|
if (S.id == d) {
|
|
1337
|
-
$ != -1 && (a.value[$].select = !1), a.value[g].select = !0, ne.value = S.a, ie(S.r, S.g, S.b, S.hue, !0), oe(),
|
|
1339
|
+
$ != -1 && (a.value[$].select = !1), a.value[g].select = !0, ne.value = S.a, ie(S.r, S.g, S.b, S.hue, !0), oe(), h();
|
|
1338
1340
|
break;
|
|
1339
1341
|
}
|
|
1340
1342
|
}
|
|
1341
1343
|
}
|
|
1342
|
-
window.addEventListener("mousemove", me), window.addEventListener("mouseup",
|
|
1344
|
+
window.addEventListener("mousemove", me), window.addEventListener("mouseup", He);
|
|
1343
1345
|
}
|
|
1344
|
-
},
|
|
1345
|
-
window.removeEventListener("mousemove", me), window.removeEventListener("mouseup",
|
|
1346
|
+
}, He = () => {
|
|
1347
|
+
window.removeEventListener("mousemove", me), window.removeEventListener("mouseup", De);
|
|
1346
1348
|
}, me = (t) => {
|
|
1347
1349
|
var d, k;
|
|
1348
1350
|
t.preventDefault();
|
|
@@ -1369,8 +1371,8 @@ const It = { key: 1 }, Vt = {
|
|
|
1369
1371
|
};
|
|
1370
1372
|
a.value[i].select = !1;
|
|
1371
1373
|
const k = (I = u.value) == null ? void 0 : I.querySelector(".gradient-handle.select");
|
|
1372
|
-
k == null || k.classList.remove("select"), a.value = [...a.value, d],
|
|
1373
|
-
},
|
|
1374
|
+
k == null || k.classList.remove("select"), a.value = [...a.value, d], Me(d), Z = ($ = u.value) == null ? void 0 : $.querySelector(`#clr-gb-${d.id}`), X();
|
|
1375
|
+
}, Oe = (t) => {
|
|
1374
1376
|
if (t.r == 0 && t.g == 0 && t.b == 0)
|
|
1375
1377
|
return !0;
|
|
1376
1378
|
if (t.r == 255 && t.g == 255 && t.b == 255)
|
|
@@ -1387,7 +1389,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1387
1389
|
}
|
|
1388
1390
|
}, ie = (t, e, l, i, s) => {
|
|
1389
1391
|
setTimeout(() => {
|
|
1390
|
-
if (
|
|
1392
|
+
if (Oe({ r: t, g: e, b: l })) {
|
|
1391
1393
|
let d = de();
|
|
1392
1394
|
d && (R.value.style.left = `${d.x}px`, R.value.style.top = `${d.y}px`);
|
|
1393
1395
|
} else {
|
|
@@ -1396,12 +1398,12 @@ const It = { key: 1 }, Vt = {
|
|
|
1396
1398
|
}
|
|
1397
1399
|
}, 0);
|
|
1398
1400
|
}, xe = () => {
|
|
1399
|
-
a.value.forEach((l) =>
|
|
1401
|
+
a.value.forEach((l) => Me(l)), Ve();
|
|
1400
1402
|
const t = a.value[0];
|
|
1401
1403
|
ae.value = t.hue, Ie(!0);
|
|
1402
1404
|
let e = de();
|
|
1403
1405
|
e && (R.value.style.left = `${e.x}px`, R.value.style.top = `${e.y}px`), oe(), X();
|
|
1404
|
-
},
|
|
1406
|
+
}, Me = (t) => {
|
|
1405
1407
|
if (y.value == "gradient") {
|
|
1406
1408
|
let e = document.createElement("div");
|
|
1407
1409
|
e.id = `clr-gb-${t.id}`, e.classList.add("gradient-handle"), e.style.left = Fe(t.percent);
|
|
@@ -1418,7 +1420,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1418
1420
|
}, oe = () => {
|
|
1419
1421
|
if (r.showAlpha) {
|
|
1420
1422
|
let t = a.value.find((e) => e.select == !0);
|
|
1421
|
-
t && (
|
|
1423
|
+
t && (D.value.style.background = ` linear-gradient(90deg,rgba(255, 255, 255, 0) 0%, rgba(${t.r}, ${t.g}, ${t.b}, 100) 97%)`);
|
|
1422
1424
|
}
|
|
1423
1425
|
}, X = () => {
|
|
1424
1426
|
var t;
|
|
@@ -1476,7 +1478,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1476
1478
|
const s = (t = u.value) == null ? void 0 : t.querySelector(`#clr-gb-${i}`);
|
|
1477
1479
|
s == null || s.remove();
|
|
1478
1480
|
const d = a.value[0];
|
|
1479
|
-
d && (d.select = !0, Z = (e = u.value) == null ? void 0 : e.querySelector(`#clr-gb-${d.id}`), Z == null || Z.classList.add("select"), ie(d.r, d.g, d.b, d.hue, !1),
|
|
1481
|
+
d && (d.select = !0, Z = (e = u.value) == null ? void 0 : e.querySelector(`#clr-gb-${d.id}`), Z == null || Z.classList.add("select"), ie(d.r, d.g, d.b, d.hue, !1), h(), X());
|
|
1480
1482
|
}
|
|
1481
1483
|
}
|
|
1482
1484
|
}, Ye = () => {
|
|
@@ -1486,7 +1488,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1486
1488
|
const { sRGBHex: s } = i, d = a.value.find((I) => I.select == !0), k = je(s);
|
|
1487
1489
|
if (k) {
|
|
1488
1490
|
const I = Ae(k.r, k.g, k.b);
|
|
1489
|
-
if (d && (d.hue = I, d.r = k.r, d.g = k.g, d.b = k.b),
|
|
1491
|
+
if (d && (d.hue = I, d.r = k.r, d.g = k.g, d.b = k.b), Oe(k)) {
|
|
1490
1492
|
const $ = de();
|
|
1491
1493
|
$ && (R.value.style.left = `${$.x}px`, R.value.style.top = `${$.y}px`);
|
|
1492
1494
|
} else {
|
|
@@ -1496,7 +1498,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1496
1498
|
const g = de();
|
|
1497
1499
|
g && (R.value.style.left = `${g.x}px`, R.value.style.top = `${g.y}px`);
|
|
1498
1500
|
}
|
|
1499
|
-
|
|
1501
|
+
h(), oe(), X(), t == null || t.classList.remove("active");
|
|
1500
1502
|
}
|
|
1501
1503
|
}).catch(() => {
|
|
1502
1504
|
t == null || t.classList.remove("active");
|
|
@@ -1524,16 +1526,16 @@ const It = { key: 1 }, Vt = {
|
|
|
1524
1526
|
const t = je(W.value);
|
|
1525
1527
|
if (t) {
|
|
1526
1528
|
const e = Ae(t.r, t.g, t.b), l = a.value.find((i) => i.select == !0);
|
|
1527
|
-
l && (l.r = t.r, l.g = t.g, l.b = t.b, l.hue = e, ie(t.r, t.g, t.b, l.hue, !0), X(), oe(), se(
|
|
1529
|
+
l && (l.r = t.r, l.g = t.g, l.b = t.b, l.hue = e, ie(t.r, t.g, t.b, l.hue, !0), X(), oe(), se(U.value));
|
|
1528
1530
|
}
|
|
1529
1531
|
}
|
|
1530
|
-
},
|
|
1532
|
+
}, h = () => {
|
|
1531
1533
|
const t = a.value.find((e) => e.select == !0);
|
|
1532
|
-
t && (W.value = lt(t.r, t.g, t.b).toUpperCase()), se(
|
|
1534
|
+
t && (W.value = lt(t.r, t.g, t.b).toUpperCase()), se(U.value);
|
|
1533
1535
|
}, J = (t) => {
|
|
1534
1536
|
f("last-used-pick", t);
|
|
1535
1537
|
};
|
|
1536
|
-
window.EyeDropper && (
|
|
1538
|
+
window.EyeDropper && (M.value = !0);
|
|
1537
1539
|
const ce = (t = "") => {
|
|
1538
1540
|
if (y.value == "gradient") {
|
|
1539
1541
|
let e = t.includes("linear") ? "linear" : "radial", l = [];
|
|
@@ -1629,9 +1631,9 @@ const It = { key: 1 }, Vt = {
|
|
|
1629
1631
|
break;
|
|
1630
1632
|
}
|
|
1631
1633
|
}
|
|
1632
|
-
|
|
1634
|
+
U.value = t;
|
|
1633
1635
|
}
|
|
1634
|
-
},
|
|
1636
|
+
}, he = (t) => {
|
|
1635
1637
|
t && ce(t), xe();
|
|
1636
1638
|
};
|
|
1637
1639
|
ye(
|
|
@@ -1640,7 +1642,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1640
1642
|
t !== e && t !== C.value && (a.value.forEach((l) => {
|
|
1641
1643
|
const i = P == null ? void 0 : P.querySelector(`#clr-gb-${l.id}`);
|
|
1642
1644
|
i == null || i.remove();
|
|
1643
|
-
}),
|
|
1645
|
+
}), he(t));
|
|
1644
1646
|
}
|
|
1645
1647
|
);
|
|
1646
1648
|
const Qe = (t) => {
|
|
@@ -1651,12 +1653,12 @@ const It = { key: 1 }, Vt = {
|
|
|
1651
1653
|
var e;
|
|
1652
1654
|
P = (e = u.value) == null ? void 0 : e.querySelector(".gradient-bar"), Le(t), xe();
|
|
1653
1655
|
}, 200)) : t === "solid" && (y.value = "solid", a.value = a.value.map((e) => (e.select = !1, e)), a.value[0].select = !0, setTimeout(() => {
|
|
1654
|
-
|
|
1656
|
+
he(r.modelValue);
|
|
1655
1657
|
}, 200));
|
|
1656
1658
|
};
|
|
1657
1659
|
return _e(() => {
|
|
1658
1660
|
var t;
|
|
1659
|
-
y.value = r.modelValue.includes("linear") || r.modelValue.includes("radial") ? "gradient" : "solid", y.value == "gradient" && (P = (t = u.value) == null ? void 0 : t.querySelector(".gradient-bar")),
|
|
1661
|
+
y.value = r.modelValue.includes("linear") || r.modelValue.includes("radial") ? "gradient" : "solid", y.value == "gradient" && (P = (t = u.value) == null ? void 0 : t.querySelector(".gradient-bar")), he(r.modelValue), se(U.value), mt(() => {
|
|
1660
1662
|
N.value = !0;
|
|
1661
1663
|
});
|
|
1662
1664
|
}), (t, e) => (m(), E("div", {
|
|
@@ -1675,12 +1677,12 @@ const It = { key: 1 }, Vt = {
|
|
|
1675
1677
|
gradientType: L.value,
|
|
1676
1678
|
onOnChangeMode: Qe
|
|
1677
1679
|
}, null, 8, ["variant", "mode", "model-value", "iconClasses", "gradientType"])
|
|
1678
|
-
])) :
|
|
1680
|
+
])) : H("", !0),
|
|
1679
1681
|
y.value == "gradient" && n.variant == "gradient" ? (m(), E("div", ul, [
|
|
1680
1682
|
T(Kt, {
|
|
1681
1683
|
gradientType: L.value,
|
|
1682
1684
|
onOnAddColor: fe,
|
|
1683
|
-
onOnMouseDown:
|
|
1685
|
+
onOnMouseDown: De,
|
|
1684
1686
|
onOnDeleteColor: Ge
|
|
1685
1687
|
}, null, 8, ["gradientType"]),
|
|
1686
1688
|
T(ll, {
|
|
@@ -1690,15 +1692,15 @@ const It = { key: 1 }, Vt = {
|
|
|
1690
1692
|
"onUpdate:angle": e[1] || (e[1] = (l) => B.angle = l),
|
|
1691
1693
|
percentageX: B.percentageX,
|
|
1692
1694
|
"onUpdate:percentageX": e[2] || (e[2] = (l) => B.percentageX = l),
|
|
1693
|
-
inputType:
|
|
1695
|
+
inputType: U.value,
|
|
1694
1696
|
mode: y.value,
|
|
1695
1697
|
gradientType: L.value,
|
|
1696
1698
|
onOnInput: X
|
|
1697
1699
|
}, null, 8, ["percentageY", "angle", "percentageX", "inputType", "mode", "gradientType"])
|
|
1698
1700
|
])) : (m(), E("div", dl, [
|
|
1699
1701
|
n.presetColors ? (m(), E("div", cl, [
|
|
1700
|
-
e[10] || (e[10] =
|
|
1701
|
-
|
|
1702
|
+
e[10] || (e[10] = b("div", { class: "text-oc-text-400 text-sm my-3 font-medium" }, "Choose color", -1)),
|
|
1703
|
+
b("div", pl, [
|
|
1702
1704
|
(m(!0), E(pe, null, Ze(n.presetColors, (l) => (m(), E("div", {
|
|
1703
1705
|
key: `color-${l}`,
|
|
1704
1706
|
class: "ck-cp-color-item !w-[32px] !h-[32px]",
|
|
@@ -1706,18 +1708,18 @@ const It = { key: 1 }, Vt = {
|
|
|
1706
1708
|
onClick: (i) => J(l)
|
|
1707
1709
|
}, null, 12, gl))), 128))
|
|
1708
1710
|
])
|
|
1709
|
-
])) :
|
|
1711
|
+
])) : H("", !0)
|
|
1710
1712
|
])),
|
|
1711
1713
|
T(al, { onOnMouseDown: Se }),
|
|
1712
|
-
|
|
1714
|
+
b("div", vl, [
|
|
1713
1715
|
T(_t, {
|
|
1714
|
-
class: Q(
|
|
1716
|
+
class: Q(M.value ? "max-w-[90%]" : ""),
|
|
1715
1717
|
modelValue: ae.value,
|
|
1716
1718
|
"onUpdate:modelValue": e[3] || (e[3] = (l) => ae.value = l),
|
|
1717
1719
|
onOnInput: e[4] || (e[4] = (l) => Ie(!1)),
|
|
1718
1720
|
onOnChange: qe
|
|
1719
1721
|
}, null, 8, ["class", "modelValue"]),
|
|
1720
|
-
|
|
1722
|
+
M.value ? (m(), E("button", {
|
|
1721
1723
|
key: 0,
|
|
1722
1724
|
id: "cp-btn-eyedropper",
|
|
1723
1725
|
type: "button",
|
|
@@ -1725,70 +1727,70 @@ const It = { key: 1 }, Vt = {
|
|
|
1725
1727
|
style: { padding: "7px" },
|
|
1726
1728
|
onClick: Ye
|
|
1727
1729
|
}, e[11] || (e[11] = [
|
|
1728
|
-
|
|
1730
|
+
b("svg", {
|
|
1729
1731
|
version: "1.1",
|
|
1730
1732
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1731
1733
|
width: "32",
|
|
1732
1734
|
height: "32",
|
|
1733
1735
|
viewBox: "0 0 32 32"
|
|
1734
1736
|
}, [
|
|
1735
|
-
|
|
1737
|
+
b("path", { d: "M21.35 1.825l-6.344 6.35-0.588-0.588c-0.781-0.781-2.050-0.781-2.831 0s-0.781 2.050 0 2.831l10 10c0.781 0.781 2.050 0.781 2.831 0s0.781-2.050 0-2.831l-0.587-0.587 6.344-6.35c2.438-2.438 2.438-6.388 0-8.819s-6.387-2.438-8.819 0zM3.462 20.206c-0.938 0.938-1.462 2.212-1.462 3.538v2.65l-1.663 2.494c-0.531 0.794-0.425 1.85 0.25 2.525s1.731 0.781 2.525 0.25l2.494-1.663h2.65c1.325 0 2.6-0.525 3.537-1.462l7.544-7.544-2.831-2.831-7.544 7.544c-0.188 0.188-0.444 0.294-0.706 0.294h-2.256v-2.256c0-0.262 0.106-0.519 0.294-0.706l7.544-7.544-2.831-2.831-7.544 7.544z" })
|
|
1736
1738
|
], -1)
|
|
1737
|
-
]))) :
|
|
1739
|
+
]))) : H("", !0)
|
|
1738
1740
|
]),
|
|
1739
1741
|
n.showAlpha ? (m(), F(jt, {
|
|
1740
1742
|
key: 3,
|
|
1741
1743
|
modelValue: ne.value,
|
|
1742
1744
|
"onUpdate:modelValue": e[5] || (e[5] = (l) => ne.value = l),
|
|
1743
|
-
onOnInput: e[6] || (e[6] = (l) =>
|
|
1744
|
-
}, null, 8, ["modelValue"])) :
|
|
1745
|
-
ft(
|
|
1746
|
-
[
|
|
1745
|
+
onOnInput: e[6] || (e[6] = (l) => Ue(l.target.value))
|
|
1746
|
+
}, null, 8, ["modelValue"])) : H("", !0),
|
|
1747
|
+
ft(b("div", ml, null, 512), [
|
|
1748
|
+
[ht, !1]
|
|
1747
1749
|
]),
|
|
1748
|
-
|
|
1750
|
+
b("div", fl, [
|
|
1749
1751
|
T(Gt, {
|
|
1750
|
-
"model-value":
|
|
1752
|
+
"model-value": U.value,
|
|
1751
1753
|
"onUpdate:modelValue": se
|
|
1752
1754
|
}, null, 8, ["model-value"]),
|
|
1753
|
-
N.value && n.showInputSet ? (m(), E("div",
|
|
1754
|
-
|
|
1755
|
+
N.value && n.showInputSet ? (m(), E("div", hl, [
|
|
1756
|
+
U.value == "HEX" ? (m(), F(Xt, {
|
|
1755
1757
|
key: 0,
|
|
1756
1758
|
modelValue: W.value,
|
|
1757
1759
|
"onUpdate:modelValue": [
|
|
1758
1760
|
e[7] || (e[7] = (l) => W.value = l),
|
|
1759
1761
|
o
|
|
1760
1762
|
]
|
|
1761
|
-
}, null, 8, ["modelValue"])) :
|
|
1762
|
-
|
|
1763
|
+
}, null, 8, ["modelValue"])) : H("", !0),
|
|
1764
|
+
U.value == "RGB" ? (m(), F(ot, {
|
|
1763
1765
|
key: 1,
|
|
1764
1766
|
"rgb-value": a.value.find((l) => l.select == !0),
|
|
1765
1767
|
onUpdateRgbValue: We
|
|
1766
|
-
}, null, 8, ["rgb-value"])) :
|
|
1767
|
-
|
|
1768
|
+
}, null, 8, ["rgb-value"])) : H("", !0),
|
|
1769
|
+
U.value == "HSL" ? (m(), F(ot, {
|
|
1768
1770
|
key: 2,
|
|
1769
1771
|
"input-type": "HSL",
|
|
1770
1772
|
"hsl-value": q,
|
|
1771
1773
|
onUpdateHslValue: c
|
|
1772
|
-
}, null, 8, ["hsl-value"])) :
|
|
1774
|
+
}, null, 8, ["hsl-value"])) : H("", !0),
|
|
1773
1775
|
n.showAlpha ? (m(), F(Ft, {
|
|
1774
1776
|
key: 3,
|
|
1775
1777
|
modelValue: ne.value,
|
|
1776
1778
|
"onUpdate:modelValue": [
|
|
1777
1779
|
e[8] || (e[8] = (l) => ne.value = l),
|
|
1778
|
-
e[9] || (e[9] = (l) =>
|
|
1780
|
+
e[9] || (e[9] = (l) => Ue(l))
|
|
1779
1781
|
]
|
|
1780
|
-
}, null, 8, ["modelValue"])) :
|
|
1781
|
-
])) :
|
|
1782
|
+
}, null, 8, ["modelValue"])) : H("", !0)
|
|
1783
|
+
])) : H("", !0)
|
|
1782
1784
|
]),
|
|
1783
|
-
e[12] || (e[12] =
|
|
1784
|
-
|
|
1785
|
+
e[12] || (e[12] = b("div", { class: "text-oc-text-400 text-sm my-3 font-medium font-inter" }, "Last used", -1)),
|
|
1786
|
+
O.value.length > 0 && n.showColorList ? (m(), E("div", bl, [
|
|
1785
1787
|
(m(!0), E(pe, null, Ze(j.value, (l) => (m(), E("div", {
|
|
1786
1788
|
key: `color-${l}`,
|
|
1787
1789
|
class: "ck-cp-color-item !w-[32px] !h-[32px]",
|
|
1788
1790
|
style: ee(`background:${l}`),
|
|
1789
1791
|
onClick: (i) => J(l)
|
|
1790
1792
|
}, null, 12, yl))), 128))
|
|
1791
|
-
])) :
|
|
1793
|
+
])) : H("", !0)
|
|
1792
1794
|
], 10, sl));
|
|
1793
1795
|
}
|
|
1794
1796
|
}, 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 = {
|
|
@@ -1797,7 +1799,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1797
1799
|
}, Sl = {
|
|
1798
1800
|
key: 0,
|
|
1799
1801
|
class: "text-sm text-oc-text-400"
|
|
1800
|
-
}, El = /* @__PURE__ */
|
|
1802
|
+
}, El = /* @__PURE__ */ bt({
|
|
1801
1803
|
__name: "OcOnboardingProgressbar",
|
|
1802
1804
|
props: {
|
|
1803
1805
|
title: {
|
|
@@ -1818,7 +1820,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1818
1820
|
}
|
|
1819
1821
|
},
|
|
1820
1822
|
setup(n) {
|
|
1821
|
-
const V = n, r =
|
|
1823
|
+
const V = n, r = be(() => ({
|
|
1822
1824
|
grid: {
|
|
1823
1825
|
containLabel: !1
|
|
1824
1826
|
},
|
|
@@ -1853,28 +1855,28 @@ const It = { key: 1 }, Vt = {
|
|
|
1853
1855
|
"tooltip-formatter": () => null,
|
|
1854
1856
|
"tooltip-value-formatter": () => null
|
|
1855
1857
|
}, null, 8, ["additional-options"]),
|
|
1856
|
-
|
|
1857
|
-
n.title ? (m(), E("span", wl, Pe(n.title), 1)) :
|
|
1858
|
+
b("div", $l, [
|
|
1859
|
+
n.title ? (m(), E("span", wl, Pe(n.title), 1)) : H("", !0),
|
|
1858
1860
|
Ke(y.$slots, "description", {}, () => [
|
|
1859
|
-
n.description ? (m(), E("span", Sl, Pe(n.description), 1)) :
|
|
1861
|
+
n.description ? (m(), E("span", Sl, Pe(n.description), 1)) : H("", !0)
|
|
1860
1862
|
])
|
|
1861
1863
|
])
|
|
1862
1864
|
]));
|
|
1863
1865
|
}
|
|
1864
|
-
}),
|
|
1866
|
+
}), Ul = st(
|
|
1865
1867
|
() => import("./OcCodeBlock-uFQyGnLq.js")
|
|
1866
|
-
),
|
|
1867
|
-
() => import("./OcLottieAnimation-
|
|
1868
|
+
), Dl = st(
|
|
1869
|
+
() => import("./OcLottieAnimation-BjY3rCjS.js")
|
|
1868
1870
|
);
|
|
1869
1871
|
export {
|
|
1870
1872
|
Al as BarChart,
|
|
1871
1873
|
Pl as BarRaceChart,
|
|
1872
1874
|
ql as Card,
|
|
1873
|
-
|
|
1875
|
+
Ul as CodeBlock,
|
|
1874
1876
|
Vt as ColorPicker,
|
|
1875
1877
|
xl as ColorPickerPopup,
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
+
Ml as LineChart,
|
|
1879
|
+
Dl as LottieAnimation,
|
|
1878
1880
|
El as OnboardingProgressbar,
|
|
1879
1881
|
Ct as PieChart,
|
|
1880
1882
|
Rl as TextEditor
|