@firstnoodle-ui/bui 0.0.66 → 0.0.67
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.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var O1 = (n, t, e) =>
|
|
4
|
-
import { createElementBlock as i, openBlock as o, renderSlot as
|
|
5
|
-
import { useRoute as G1, useRouter as ue, onBeforeRouteUpdate as
|
|
6
|
-
import { size as
|
|
1
|
+
var bt = Object.defineProperty;
|
|
2
|
+
var Lt = (n, t, e) => t in n ? bt(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var O1 = (n, t, e) => Lt(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { createElementBlock as i, openBlock as o, renderSlot as R, createElementVNode as u, defineComponent as $, toDisplayString as X, ref as L, watch as i1, computed as O, createBlock as V, createCommentVNode as k, normalizeClass as D, normalizeStyle as t1, createVNode as w, unref as p, withCtx as Z, resolveDynamicComponent as $1, provide as yt, onMounted as a1, withModifiers as x, Fragment as M, renderList as m1, onBeforeMount as A1, toRef as Ht, onUnmounted as F1, onBeforeUnmount as B1, nextTick as D1, createStaticVNode as u1, Teleport as x1, withDirectives as U1, vShow as X1, Transition as de, useSlots as R1, withKeys as _, createSlots as Ae, vModelText as Vt, reactive as Re, createTextVNode as Ee, resolveComponent as kt, getCurrentInstance as Oe } from "vue";
|
|
5
|
+
import { useRoute as G1, useRouter as ue, onBeforeRouteUpdate as Ie } from "vue-router";
|
|
6
|
+
import { size as Pe, autoUpdate as wt, offset as Mt, flip as Zt, shift as He, limitShift as $t, computePosition as Dt } from "@floating-ui/dom";
|
|
7
7
|
import ne from "debounce";
|
|
8
|
-
import { Extension as
|
|
8
|
+
import { Extension as Ne } from "@tiptap/core";
|
|
9
9
|
import { Plugin as Bt, PluginKey as St } from "prosemirror-state";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
10
|
+
import Fe from "@tiptap/extension-bold";
|
|
11
|
+
import xe from "@tiptap/extension-bullet-list";
|
|
12
|
+
import Ue from "@tiptap/extension-document";
|
|
13
13
|
import oe from "@tiptap/extension-heading";
|
|
14
14
|
import se from "@tiptap/extension-highlight";
|
|
15
15
|
import ae from "@tiptap/extension-history";
|
|
16
|
-
import
|
|
16
|
+
import Ye from "@tiptap/extension-italic";
|
|
17
17
|
import re from "@tiptap/extension-link";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import { useEditor as
|
|
18
|
+
import We from "@tiptap/extension-list-item";
|
|
19
|
+
import je from "@tiptap/extension-ordered-list";
|
|
20
|
+
import Ke from "@tiptap/extension-paragraph";
|
|
21
|
+
import Qe from "@tiptap/extension-placeholder";
|
|
22
|
+
import qe from "@tiptap/extension-text";
|
|
23
|
+
import Xe from "@tiptap/extension-underline";
|
|
24
|
+
import { useEditor as Ge, EditorContent as Je } from "@tiptap/vue-3";
|
|
25
25
|
import Tt from "@tiptap/extension-hard-break";
|
|
26
26
|
import zt from "@tiptap/extension-image";
|
|
27
27
|
import { Markdown as At } from "@tiptap/markdown";
|
|
@@ -33,7 +33,7 @@ const M1 = (n, t) => {
|
|
|
33
33
|
}, Rt = {}, Et = { class: "fixed top-0 left-0 w-screen h-screen overflow-hidden text-primary" };
|
|
34
34
|
function Ot(n, t) {
|
|
35
35
|
return o(), i("main", Et, [
|
|
36
|
-
|
|
36
|
+
R(n.$slots, "default"),
|
|
37
37
|
t[0] || (t[0] = u("div", {
|
|
38
38
|
id: "modals",
|
|
39
39
|
class: "z-10 fixed w-screen h-screen top-0 left-0 pointer-events-none"
|
|
@@ -48,7 +48,7 @@ function Ot(n, t) {
|
|
|
48
48
|
}, null, -1))
|
|
49
49
|
]);
|
|
50
50
|
}
|
|
51
|
-
const Fo = /* @__PURE__ */ M1(Rt, [["render", Ot]]), It = { class: "w-full space-y-4" }, Pt = { class: "w-full h-12 flex items-center" }, Nt = { class: "flex-none pr-2 text-xs leading-none font-medium text-secondary" }, xo = /* @__PURE__ */
|
|
51
|
+
const Fo = /* @__PURE__ */ M1(Rt, [["render", Ot]]), It = { class: "w-full space-y-4" }, Pt = { class: "w-full h-12 flex items-center" }, Nt = { class: "flex-none pr-2 text-xs leading-none font-medium text-secondary" }, xo = /* @__PURE__ */ $({
|
|
52
52
|
__name: "AsideSectionLabel",
|
|
53
53
|
props: {
|
|
54
54
|
label: {}
|
|
@@ -72,7 +72,7 @@ const Fo = /* @__PURE__ */ M1(Rt, [["render", Ot]]), It = { class: "w-full space
|
|
|
72
72
|
}, Yt = {
|
|
73
73
|
key: 2,
|
|
74
74
|
class: "absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center"
|
|
75
|
-
}, Wt = { class: "flex flex-col items-center gap-4 pb-8" }, jt = ["src"], Kt = { class: "absolute inset-0 pointer-events-none" }, Qt = { class: "w-full h-full" }, qt = { id: "crop-mask" }, Xt = ["x", "y", "width", "height"], Gt = ["cx", "cy", "r"], Jt = { class: "absolute bottom-4 left-0 w-full flex justify-center gap-1" }, _t = { class: "bg-primary rounded-lg overflow-hidden" }, e5 = { class: "flex items-center gap-2" },
|
|
75
|
+
}, Wt = { class: "flex flex-col items-center gap-4 pb-8" }, jt = ["src"], Kt = { class: "absolute inset-0 pointer-events-none" }, Qt = { class: "w-full h-full" }, qt = { id: "crop-mask" }, Xt = ["x", "y", "width", "height"], Gt = ["cx", "cy", "r"], Jt = { class: "absolute bottom-4 left-0 w-full flex justify-center gap-1" }, _t = { class: "bg-primary rounded-lg overflow-hidden" }, e5 = { class: "flex items-center gap-2" }, r1 = 510, Uo = /* @__PURE__ */ $({
|
|
76
76
|
__name: "AvatarUpload",
|
|
77
77
|
props: {
|
|
78
78
|
modelValue: { default: null },
|
|
@@ -82,80 +82,80 @@ const Fo = /* @__PURE__ */ M1(Rt, [["render", Ot]]), It = { class: "w-full space
|
|
|
82
82
|
},
|
|
83
83
|
emits: ["update:modelValue", "change"],
|
|
84
84
|
setup(n, { emit: t }) {
|
|
85
|
-
const e = n, l = t, s =
|
|
86
|
-
|
|
85
|
+
const e = n, l = t, s = L(), a = L(), r = L(), f = L(), C = L(null), m = L(null), d = L(e.modelValue), h = L(100), b = L(!1), c = L(0), H = L(0), v = L(1), g = L(1), T = L(0), z = L(0), y = L(0), B = L(0);
|
|
86
|
+
i1(
|
|
87
87
|
() => e.modelValue,
|
|
88
88
|
(F) => {
|
|
89
89
|
d.value = F;
|
|
90
90
|
}
|
|
91
91
|
);
|
|
92
|
-
const
|
|
92
|
+
const W = O(() => ({
|
|
93
93
|
width: `${e.size}px`,
|
|
94
94
|
height: `${e.size}px`,
|
|
95
95
|
borderRadius: e.cropShape === "circle" ? "50%" : "8px"
|
|
96
|
-
})),
|
|
96
|
+
})), Q = () => {
|
|
97
97
|
var F;
|
|
98
98
|
e.disabled || (F = s.value) == null || F.click();
|
|
99
|
-
},
|
|
99
|
+
}, s1 = () => {
|
|
100
100
|
if (!e.disabled)
|
|
101
101
|
if (d.value && m.value) {
|
|
102
102
|
const F = new Image();
|
|
103
103
|
F.onload = () => {
|
|
104
|
-
C.value = F, T.value = F.width,
|
|
104
|
+
C.value = F, T.value = F.width, z.value = F.height, h.value = r1 * 0.5;
|
|
105
105
|
const Y = Math.max(h.value / F.width, h.value / F.height);
|
|
106
106
|
g.value = Y;
|
|
107
|
-
const
|
|
108
|
-
v.value = Math.max(
|
|
109
|
-
const v1 = F.width * v.value,
|
|
110
|
-
y.value = (
|
|
107
|
+
const o1 = Math.min(r1 / F.width, r1 / F.height);
|
|
108
|
+
v.value = Math.max(o1, Y);
|
|
109
|
+
const v1 = F.width * v.value, A = F.height * v.value;
|
|
110
|
+
y.value = (r1 - v1) / 2, B.value = (r1 - A) / 2;
|
|
111
111
|
}, F.src = m.value;
|
|
112
112
|
} else
|
|
113
|
-
|
|
113
|
+
Q();
|
|
114
114
|
}, f1 = (F) => {
|
|
115
115
|
var v1;
|
|
116
|
-
const Y = F.target,
|
|
117
|
-
if (
|
|
118
|
-
const
|
|
119
|
-
|
|
116
|
+
const Y = F.target, o1 = (v1 = Y.files) == null ? void 0 : v1[0];
|
|
117
|
+
if (o1 && o1.type.startsWith("image/")) {
|
|
118
|
+
const A = new FileReader();
|
|
119
|
+
A.onload = (U) => {
|
|
120
120
|
var V1;
|
|
121
|
-
const
|
|
122
|
-
m.value =
|
|
121
|
+
const K = (V1 = U.target) == null ? void 0 : V1.result;
|
|
122
|
+
m.value = K;
|
|
123
123
|
const d1 = new Image();
|
|
124
124
|
d1.onload = () => {
|
|
125
|
-
C.value = d1, T.value = d1.width,
|
|
125
|
+
C.value = d1, T.value = d1.width, z.value = d1.height, h.value = r1 * 0.7;
|
|
126
126
|
const L1 = Math.max(h.value / d1.width, h.value / d1.height);
|
|
127
127
|
g.value = L1;
|
|
128
|
-
const k1 = Math.min(
|
|
128
|
+
const k1 = Math.min(r1 / d1.width, r1 / d1.height);
|
|
129
129
|
v.value = Math.max(k1, L1);
|
|
130
130
|
const S = d1.width * v.value, G = d1.height * v.value;
|
|
131
|
-
y.value = (
|
|
131
|
+
y.value = (r1 - S) / 2, B.value = (r1 - G) / 2, setTimeout(() => {
|
|
132
132
|
}, 10);
|
|
133
|
-
}, d1.src =
|
|
134
|
-
},
|
|
133
|
+
}, d1.src = K;
|
|
134
|
+
}, A.readAsDataURL(o1);
|
|
135
135
|
}
|
|
136
136
|
Y.value = "";
|
|
137
|
-
},
|
|
138
|
-
|
|
137
|
+
}, E = (F) => {
|
|
138
|
+
b.value = !0, c.value = F.clientX - y.value, H.value = F.clientY - B.value, window.addEventListener("mousemove", I), window.addEventListener("mouseup", J);
|
|
139
139
|
}, I = (F) => {
|
|
140
|
-
if (
|
|
141
|
-
let Y = F.clientX - c.value,
|
|
142
|
-
const v1 =
|
|
143
|
-
Y = Math.min(Y, U), Y = Math.max(Y,
|
|
140
|
+
if (b.value) {
|
|
141
|
+
let Y = F.clientX - c.value, o1 = F.clientY - H.value;
|
|
142
|
+
const v1 = r1 / 2, A = r1 / 2, U = v1 - h.value / 2, K = v1 + h.value / 2, d1 = A - h.value / 2, V1 = A + h.value / 2, L1 = T.value * v.value, k1 = z.value * v.value;
|
|
143
|
+
Y = Math.min(Y, U), Y = Math.max(Y, K - L1), o1 = Math.min(o1, d1), o1 = Math.max(o1, V1 - k1), y.value = Y, B.value = o1;
|
|
144
144
|
}
|
|
145
145
|
}, J = () => {
|
|
146
|
-
|
|
146
|
+
b.value = !1, window.removeEventListener("mousemove", I), window.removeEventListener("mouseup", J);
|
|
147
147
|
}, P = (F) => {
|
|
148
148
|
const Y = Math.max(g.value, Math.min(v.value + F, 3));
|
|
149
149
|
Y !== v.value && (v.value = Y);
|
|
150
|
-
}, N = () => P(0.1),
|
|
150
|
+
}, N = () => P(0.1), n1 = () => P(-0.1), S1 = () => {
|
|
151
151
|
var S;
|
|
152
152
|
if (!C.value || !a.value) return;
|
|
153
153
|
const F = a.value, Y = F.getContext("2d");
|
|
154
154
|
if (!Y) return;
|
|
155
|
-
const
|
|
156
|
-
F.width =
|
|
157
|
-
const v1 =
|
|
158
|
-
Y.fillStyle = "#ffffff", Y.fillRect(0, 0,
|
|
155
|
+
const o1 = 512;
|
|
156
|
+
F.width = o1, F.height = o1;
|
|
157
|
+
const v1 = r1 / 2, A = r1 / 2, U = v1 - h.value / 2, K = A - h.value / 2, d1 = (U - y.value) / v.value, V1 = (K - B.value) / v.value, L1 = h.value / v.value;
|
|
158
|
+
Y.fillStyle = "#ffffff", Y.fillRect(0, 0, o1, o1), e.cropShape === "circle" && (Y.save(), Y.beginPath(), Y.arc(o1 / 2, o1 / 2, o1 / 2, 0, Math.PI * 2), Y.closePath(), Y.clip()), Y.drawImage(
|
|
159
159
|
C.value,
|
|
160
160
|
d1,
|
|
161
161
|
V1,
|
|
@@ -163,8 +163,8 @@ const Fo = /* @__PURE__ */ M1(Rt, [["render", Ot]]), It = { class: "w-full space
|
|
|
163
163
|
L1,
|
|
164
164
|
0,
|
|
165
165
|
0,
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
o1,
|
|
167
|
+
o1
|
|
168
168
|
), e.cropShape === "circle" && Y.restore();
|
|
169
169
|
const k1 = F.toDataURL("image/png");
|
|
170
170
|
d.value = k1, l("update:modelValue", k1), l("change", k1), (S = f.value) == null || S.close();
|
|
@@ -174,9 +174,9 @@ const Fo = /* @__PURE__ */ M1(Rt, [["render", Ot]]), It = { class: "w-full space
|
|
|
174
174
|
};
|
|
175
175
|
return (F, Y) => (o(), i("div", Ft, [
|
|
176
176
|
u("div", {
|
|
177
|
-
style: t1(
|
|
178
|
-
class:
|
|
179
|
-
onClick:
|
|
177
|
+
style: t1(W.value),
|
|
178
|
+
class: D(["relative overflow-hidden bg-tertiary border border-default flex items-center justify-center cursor-pointer group", { "opacity-50 cursor-not-allowed": F.disabled }]),
|
|
179
|
+
onClick: s1
|
|
180
180
|
}, [
|
|
181
181
|
d.value ? (o(), i("img", {
|
|
182
182
|
key: 0,
|
|
@@ -213,18 +213,18 @@ const Fo = /* @__PURE__ */ M1(Rt, [["render", Ot]]), It = { class: "w-full space
|
|
|
213
213
|
main: Z(() => [
|
|
214
214
|
u("div", Wt, [
|
|
215
215
|
u("div", {
|
|
216
|
-
class:
|
|
217
|
-
style: t1({ width: `${
|
|
218
|
-
onMousedown:
|
|
216
|
+
class: D(["relative bg-slate-100 dark:bg-slate-800 overflow-hidden select-none transition-all", { "cursor-grabbing": b.value, "cursor-grab": !b.value }]),
|
|
217
|
+
style: t1({ width: `${r1}px`, height: `${r1}px` }),
|
|
218
|
+
onMousedown: E
|
|
219
219
|
}, [
|
|
220
220
|
C.value ? (o(), i("div", {
|
|
221
221
|
key: 0,
|
|
222
222
|
class: "absolute border border-yellow-300 pointer-events-none",
|
|
223
223
|
style: t1({
|
|
224
224
|
width: `${T.value * v.value}px`,
|
|
225
|
-
height: `${
|
|
225
|
+
height: `${z.value * v.value}px`,
|
|
226
226
|
left: `${y.value}px`,
|
|
227
|
-
top: `${
|
|
227
|
+
top: `${B.value}px`
|
|
228
228
|
})
|
|
229
229
|
}, [
|
|
230
230
|
C.value ? (o(), i("img", {
|
|
@@ -247,16 +247,16 @@ const Fo = /* @__PURE__ */ M1(Rt, [["render", Ot]]), It = { class: "w-full space
|
|
|
247
247
|
}, null, -1)),
|
|
248
248
|
F.cropShape === "square" ? (o(), i("rect", {
|
|
249
249
|
key: 0,
|
|
250
|
-
x: (
|
|
251
|
-
y: (
|
|
250
|
+
x: (r1 - h.value) / 2,
|
|
251
|
+
y: (r1 - h.value) / 2,
|
|
252
252
|
width: h.value,
|
|
253
253
|
height: h.value,
|
|
254
254
|
fill: "black",
|
|
255
255
|
rx: "8"
|
|
256
256
|
}, null, 8, Xt)) : (o(), i("circle", {
|
|
257
257
|
key: 1,
|
|
258
|
-
cx:
|
|
259
|
-
cy:
|
|
258
|
+
cx: r1 / 2,
|
|
259
|
+
cy: r1 / 2,
|
|
260
260
|
r: h.value / 2,
|
|
261
261
|
fill: "black"
|
|
262
262
|
}, null, 8, Gt))
|
|
@@ -271,10 +271,10 @@ const Fo = /* @__PURE__ */ M1(Rt, [["render", Ot]]), It = { class: "w-full space
|
|
|
271
271
|
}, null, -1))
|
|
272
272
|
])),
|
|
273
273
|
u("div", {
|
|
274
|
-
class:
|
|
274
|
+
class: D(["absolute border-2 border-white shadow-lg", { "rounded-full": F.cropShape === "circle", "rounded-lg": F.cropShape === "square" }]),
|
|
275
275
|
style: t1({
|
|
276
|
-
left: `${(
|
|
277
|
-
top: `${(
|
|
276
|
+
left: `${(r1 - h.value) / 2}px`,
|
|
277
|
+
top: `${(r1 - h.value) / 2}px`,
|
|
278
278
|
width: `${h.value}px`,
|
|
279
279
|
height: `${h.value}px`
|
|
280
280
|
})
|
|
@@ -285,7 +285,7 @@ const Fo = /* @__PURE__ */ M1(Rt, [["render", Ot]]), It = { class: "w-full space
|
|
|
285
285
|
], -1)),
|
|
286
286
|
u("div", Jt, [
|
|
287
287
|
u("section", _t, [
|
|
288
|
-
w(p(
|
|
288
|
+
w(p(j), {
|
|
289
289
|
icon: "plus",
|
|
290
290
|
variant: "outlineSubtle",
|
|
291
291
|
class: "z-0 hover:z-10 focus:z-10 active:z-10",
|
|
@@ -293,13 +293,13 @@ const Fo = /* @__PURE__ */ M1(Rt, [["render", Ot]]), It = { class: "w-full space
|
|
|
293
293
|
style: { borderRadius: "8px 0 0 8px" },
|
|
294
294
|
onClick: N
|
|
295
295
|
}, null, 8, ["disabled"]),
|
|
296
|
-
w(p(
|
|
296
|
+
w(p(j), {
|
|
297
297
|
icon: "dash",
|
|
298
298
|
variant: "outlineSubtle",
|
|
299
299
|
class: "z-0 hover:z-10 focus:z-10 active:z-10 -ml-px",
|
|
300
300
|
disabled: v.value <= g.value,
|
|
301
301
|
style: { borderRadius: "0px 8px 8px 0px" },
|
|
302
|
-
onClick:
|
|
302
|
+
onClick: n1
|
|
303
303
|
}, null, 8, ["disabled"])
|
|
304
304
|
])
|
|
305
305
|
])
|
|
@@ -317,12 +317,12 @@ const Fo = /* @__PURE__ */ M1(Rt, [["render", Ot]]), It = { class: "w-full space
|
|
|
317
317
|
justify: "between"
|
|
318
318
|
}, {
|
|
319
319
|
default: Z(() => [
|
|
320
|
-
w(p(
|
|
320
|
+
w(p(j), {
|
|
321
321
|
disabled: F.disabled,
|
|
322
322
|
variant: "outlineSubtle",
|
|
323
323
|
label: "Upload",
|
|
324
324
|
icon: "photo",
|
|
325
|
-
onClick:
|
|
325
|
+
onClick: Q
|
|
326
326
|
}, null, 8, ["disabled"]),
|
|
327
327
|
u("div", e5, [
|
|
328
328
|
w(p(E1), {
|
|
@@ -342,7 +342,7 @@ const Fo = /* @__PURE__ */ M1(Rt, [["render", Ot]]), It = { class: "w-full space
|
|
|
342
342
|
}, 512)) : k("", !0)
|
|
343
343
|
]));
|
|
344
344
|
}
|
|
345
|
-
}), t5 = { class: "py-1 min-w-0 leading-none truncate" }, Ve = /* @__PURE__ */
|
|
345
|
+
}), t5 = { class: "py-1 min-w-0 leading-none truncate" }, Ve = /* @__PURE__ */ $({
|
|
346
346
|
__name: "ButtonLabel",
|
|
347
347
|
props: {
|
|
348
348
|
label: {}
|
|
@@ -353,10 +353,10 @@ const Fo = /* @__PURE__ */ M1(Rt, [["render", Ot]]), It = { class: "w-full space
|
|
|
353
353
|
}), l5 = {}, n5 = { class: "flex items-center gap-1 overflow-hidden" };
|
|
354
354
|
function o5(n, t) {
|
|
355
355
|
return o(), i("div", n5, [
|
|
356
|
-
|
|
356
|
+
R(n.$slots, "default")
|
|
357
357
|
]);
|
|
358
358
|
}
|
|
359
|
-
const ke = /* @__PURE__ */ M1(l5, [["render", o5]]), s5 = { class: "w-3 h-3 bg-orange-500 rounded-full border border-white dark:border-[var(--color-bg-primary)]" },
|
|
359
|
+
const ke = /* @__PURE__ */ M1(l5, [["render", o5]]), s5 = { class: "w-3 h-3 bg-orange-500 rounded-full border border-white dark:border-[var(--color-bg-primary)]" }, _e = /* @__PURE__ */ $({
|
|
360
360
|
__name: "NotificationBadge",
|
|
361
361
|
props: {
|
|
362
362
|
inside: { type: Boolean }
|
|
@@ -364,7 +364,7 @@ const ke = /* @__PURE__ */ M1(l5, [["render", o5]]), s5 = { class: "w-3 h-3 bg-o
|
|
|
364
364
|
setup(n) {
|
|
365
365
|
return (t, e) => (o(), i("div", s5));
|
|
366
366
|
}
|
|
367
|
-
}), we = /* @__PURE__ */
|
|
367
|
+
}), we = /* @__PURE__ */ $({
|
|
368
368
|
__name: "NotificationBadge",
|
|
369
369
|
props: {
|
|
370
370
|
inside: { type: Boolean }
|
|
@@ -377,10 +377,10 @@ const ke = /* @__PURE__ */ M1(l5, [["render", o5]]), s5 = { class: "w-3 h-3 bg-o
|
|
|
377
377
|
right: t.inside ? "0.15em" : "-0.3em"
|
|
378
378
|
})
|
|
379
379
|
}, [
|
|
380
|
-
w(p(
|
|
380
|
+
w(p(_e))
|
|
381
381
|
], 4));
|
|
382
382
|
}
|
|
383
|
-
}),
|
|
383
|
+
}), j = /* @__PURE__ */ $({
|
|
384
384
|
__name: "Button",
|
|
385
385
|
props: {
|
|
386
386
|
variant: { default: "fill" },
|
|
@@ -407,7 +407,7 @@ const ke = /* @__PURE__ */ M1(l5, [["render", o5]]), s5 = { class: "w-3 h-3 bg-o
|
|
|
407
407
|
},
|
|
408
408
|
emits: ["click", "blur"],
|
|
409
409
|
setup(n, { expose: t, emit: e }) {
|
|
410
|
-
const l = n, s = e, a =
|
|
410
|
+
const l = n, s = e, a = L(l.routerLinkTo ? "router-link" : "button"), r = L(), f = L(), C = O(() => {
|
|
411
411
|
const c = ["flex-none size-4"];
|
|
412
412
|
return l.variant === "fill" || l.variant === "destructive" ? c.push("text-light") : l.variant === "outline" || l.variant === "text" ? c.push("text-blue-500") : (l.variant === "outlineSubtle" || l.variant === "textSubtle") && c.push("text-slate-700 dark:text-slate-200"), c.join(" ");
|
|
413
413
|
}), m = O(() => {
|
|
@@ -502,7 +502,7 @@ const ke = /* @__PURE__ */ M1(l5, [["render", o5]]), s5 = { class: "w-3 h-3 bg-o
|
|
|
502
502
|
ref_key: "buttonRef",
|
|
503
503
|
ref: r,
|
|
504
504
|
to: c.routerLinkTo,
|
|
505
|
-
class:
|
|
505
|
+
class: D(m.value),
|
|
506
506
|
disabled: c.disabled || c.loading,
|
|
507
507
|
style: t1(d.value),
|
|
508
508
|
onClick: h,
|
|
@@ -513,7 +513,7 @@ const ke = /* @__PURE__ */ M1(l5, [["render", o5]]), s5 = { class: "w-3 h-3 bg-o
|
|
|
513
513
|
default: Z(() => [
|
|
514
514
|
c.loading ? (o(), V(p(N1), {
|
|
515
515
|
key: 0,
|
|
516
|
-
class:
|
|
516
|
+
class: D(C.value)
|
|
517
517
|
}, null, 8, ["class"])) : c.icon ? (o(), V(p(l1), {
|
|
518
518
|
key: 1,
|
|
519
519
|
name: c.icon
|
|
@@ -545,7 +545,7 @@ const ke = /* @__PURE__ */ M1(l5, [["render", o5]]), s5 = { class: "w-3 h-3 bg-o
|
|
|
545
545
|
ref: r,
|
|
546
546
|
to: c.routerLinkTo,
|
|
547
547
|
target: l.linkTarget,
|
|
548
|
-
class:
|
|
548
|
+
class: D(m.value),
|
|
549
549
|
disabled: c.disabled || c.loading,
|
|
550
550
|
style: t1(d.value),
|
|
551
551
|
onClick: h,
|
|
@@ -556,7 +556,7 @@ const ke = /* @__PURE__ */ M1(l5, [["render", o5]]), s5 = { class: "w-3 h-3 bg-o
|
|
|
556
556
|
default: Z(() => [
|
|
557
557
|
c.loading ? (o(), V(p(N1), {
|
|
558
558
|
key: 0,
|
|
559
|
-
class:
|
|
559
|
+
class: D(C.value)
|
|
560
560
|
}, null, 8, ["class"])) : c.icon ? (o(), V(p(l1), {
|
|
561
561
|
key: 1,
|
|
562
562
|
name: c.icon
|
|
@@ -580,15 +580,15 @@ const ke = /* @__PURE__ */ M1(l5, [["render", o5]]), s5 = { class: "w-3 h-3 bg-o
|
|
|
580
580
|
_: 1
|
|
581
581
|
}, 40, ["to", "target", "class", "disabled", "style"]));
|
|
582
582
|
}
|
|
583
|
-
}), Yo = /* @__PURE__ */
|
|
583
|
+
}), Yo = /* @__PURE__ */ $({
|
|
584
584
|
__name: "ButtonGroup",
|
|
585
585
|
props: {
|
|
586
586
|
direction: { default: "horizontal" },
|
|
587
587
|
fullwidth: { type: Boolean, default: !1 }
|
|
588
588
|
},
|
|
589
589
|
setup(n) {
|
|
590
|
-
const t = n, e =
|
|
591
|
-
|
|
590
|
+
const t = n, e = L(""), l = L();
|
|
591
|
+
yt("childOfButtonGroup", !0);
|
|
592
592
|
const s = () => {
|
|
593
593
|
const a = [];
|
|
594
594
|
t.fullwidth ? a.push("flex w-full") : a.push("inline-flex"), t.direction === "vertical" ? a.push("flex-col items-stretch") : a.push("items-center"), e.value = a.join(" "), l.value && Array.from(l.value.children).forEach((r, f) => {
|
|
@@ -596,13 +596,13 @@ const ke = /* @__PURE__ */ M1(l5, [["render", o5]]), s5 = { class: "w-3 h-3 bg-o
|
|
|
596
596
|
t.direction === "vertical" ? (r.classList.add("-mt-px"), r.classList.add("first:mt-0"), f === 0 ? r.nodeName === "BUTTON" ? r.classList.add("rounded-t-md") : (C = r.querySelector("button")) == null || C.classList.add("rounded-t-md") : f === l.value.children.length - 1 && (r.nodeName === "BUTTON" ? r.classList.add("rounded-b-md") : (m = r.querySelector("button")) == null || m.classList.add("rounded-b-md"))) : (r.classList.add("-ml-px"), r.classList.add("first:ml-0"), f === 0 ? r.nodeName === "BUTTON" ? r.classList.add("rounded-l-md") : (d = r.querySelector("button")) == null || d.classList.add("rounded-l-md") : f === l.value.children.length - 1 && (r.nodeName === "BUTTON" ? r.classList.add("rounded-r-md") : (h = r.querySelector("button")) == null || h.classList.add("rounded-r-md")));
|
|
597
597
|
});
|
|
598
598
|
};
|
|
599
|
-
return
|
|
599
|
+
return a1(s), (a, r) => (o(), i("div", {
|
|
600
600
|
ref_key: "buttonGroupRef",
|
|
601
601
|
ref: l,
|
|
602
|
-
class:
|
|
602
|
+
class: D(e.value),
|
|
603
603
|
onClick: x(s, ["stop", "prevent"])
|
|
604
604
|
}, [
|
|
605
|
-
|
|
605
|
+
R(a.$slots, "default")
|
|
606
606
|
], 2));
|
|
607
607
|
}
|
|
608
608
|
}), j1 = (n, t) => (n % t + t) % t, a5 = (n, t) => {
|
|
@@ -630,13 +630,13 @@ const Me = {
|
|
|
630
630
|
WEEK: 6048e5,
|
|
631
631
|
YEAR: 3154e7,
|
|
632
632
|
DECADE: 3154e7 * 10
|
|
633
|
-
},
|
|
633
|
+
}, et = (n) => {
|
|
634
634
|
if (Object.keys(Me).includes(n))
|
|
635
635
|
return Me[n];
|
|
636
636
|
if (Object.keys(q).includes(n))
|
|
637
637
|
return n;
|
|
638
638
|
throw new Error(`Invalid time unit [${n}}]`);
|
|
639
|
-
}, r5 = { class: "w-56 grid grid-cols-7" }, i5 = { class: "col-span-5 flex items-center justify-center text-sm" }, d5 = { class: "w-56 grid grid-cols-2 py-8" }, u5 = /* @__PURE__ */
|
|
639
|
+
}, r5 = { class: "w-56 grid grid-cols-7" }, i5 = { class: "col-span-5 flex items-center justify-center text-sm" }, d5 = { class: "w-56 grid grid-cols-2 py-8" }, u5 = /* @__PURE__ */ $({
|
|
640
640
|
__name: "DecadeView",
|
|
641
641
|
props: {
|
|
642
642
|
viewData: {}
|
|
@@ -646,20 +646,20 @@ const Me = {
|
|
|
646
646
|
const e = n, l = t, s = O(() => `${e.viewData[0].label} - ${e.viewData[e.viewData.length - 1].label}`);
|
|
647
647
|
return (a, r) => (o(), i("div", null, [
|
|
648
648
|
u("nav", r5, [
|
|
649
|
-
w(p(
|
|
649
|
+
w(p(j), {
|
|
650
650
|
icon: "chevron-left",
|
|
651
651
|
variant: "textSubtle",
|
|
652
652
|
onClick: r[0] || (r[0] = (f) => l("move", { amount: -10, unit: p(q).YEAR }))
|
|
653
653
|
}),
|
|
654
654
|
u("div", i5, X(s.value), 1),
|
|
655
|
-
w(p(
|
|
655
|
+
w(p(j), {
|
|
656
656
|
icon: "chevron-right",
|
|
657
657
|
variant: "textSubtle",
|
|
658
658
|
onClick: r[1] || (r[1] = (f) => l("move", { amount: 10, unit: p(q).YEAR }))
|
|
659
659
|
})
|
|
660
660
|
]),
|
|
661
661
|
u("main", d5, [
|
|
662
|
-
(o(!0), i(M, null, m1(a.viewData, (f) => (o(), V(p(
|
|
662
|
+
(o(!0), i(M, null, m1(a.viewData, (f) => (o(), V(p(j), {
|
|
663
663
|
key: f.label,
|
|
664
664
|
variant: f.selected ? "fill" : f.current ? "text" : "textSubtle",
|
|
665
665
|
label: f.label.toString(),
|
|
@@ -676,10 +676,10 @@ const Me = {
|
|
|
676
676
|
]));
|
|
677
677
|
}
|
|
678
678
|
});
|
|
679
|
-
function
|
|
679
|
+
function tt(n) {
|
|
680
680
|
return n && n.charAt(0).toUpperCase() + n.slice(1);
|
|
681
681
|
}
|
|
682
|
-
const p5 = /* @__PURE__ */
|
|
682
|
+
const p5 = /* @__PURE__ */ $({
|
|
683
683
|
__name: "DateButton",
|
|
684
684
|
props: {
|
|
685
685
|
date: {}
|
|
@@ -688,7 +688,7 @@ const p5 = /* @__PURE__ */ D({
|
|
|
688
688
|
setup(n, { emit: t }) {
|
|
689
689
|
const e = t;
|
|
690
690
|
return (l, s) => (o(), i("button", {
|
|
691
|
-
class:
|
|
691
|
+
class: D(["flex items-center justify-center w-8 h-8 rounded text-sm font-medium cursor-pointer", {
|
|
692
692
|
"bg-secondary text-tertiary rounded-none cursor-not-allowed": l.date.disabled,
|
|
693
693
|
"text-muted hover:text-secondary hover:bg-tertiary": l.date.inactive,
|
|
694
694
|
"bg-action text-white": l.date.selected,
|
|
@@ -699,7 +699,7 @@ const p5 = /* @__PURE__ */ D({
|
|
|
699
699
|
onClick: s[0] || (s[0] = x((a) => e("click", l.date), ["stop"]))
|
|
700
700
|
}, X(l.date.label), 3));
|
|
701
701
|
}
|
|
702
|
-
}), f5 = { class: "w-56 grid grid-cols-7" }, c5 = { class: "col-span-3 h-8 flex items-center justify-center" }, C5 = { class: "w-56 grid grid-cols-7 bg-bg-medium rounded my-2" }, v5 = { class: "w-56 grid grid-cols-7" }, h5 = /* @__PURE__ */
|
|
702
|
+
}), f5 = { class: "w-56 grid grid-cols-7" }, c5 = { class: "col-span-3 h-8 flex items-center justify-center" }, C5 = { class: "w-56 grid grid-cols-7 bg-bg-medium rounded my-2" }, v5 = { class: "w-56 grid grid-cols-7" }, h5 = /* @__PURE__ */ $({
|
|
703
703
|
__name: "MonthView",
|
|
704
704
|
props: {
|
|
705
705
|
viewData: {},
|
|
@@ -712,34 +712,34 @@ const p5 = /* @__PURE__ */ D({
|
|
|
712
712
|
const e = t;
|
|
713
713
|
return (l, s) => (o(), i("div", null, [
|
|
714
714
|
u("nav", f5, [
|
|
715
|
-
w(p(
|
|
715
|
+
w(p(j), {
|
|
716
716
|
variant: "textSubtle",
|
|
717
717
|
icon: "chevron-left-double",
|
|
718
718
|
onClick: s[0] || (s[0] = (a) => e("move", { amount: -1, unit: p(q).YEAR }))
|
|
719
719
|
}),
|
|
720
|
-
w(p(
|
|
720
|
+
w(p(j), {
|
|
721
721
|
variant: "textSubtle",
|
|
722
722
|
icon: "chevron-left",
|
|
723
723
|
onClick: s[1] || (s[1] = (a) => e("move", { amount: -1, unit: p(q).MONTH }))
|
|
724
724
|
}),
|
|
725
725
|
u("div", c5, [
|
|
726
|
-
w(p(
|
|
726
|
+
w(p(j), {
|
|
727
727
|
variant: "textSubtle",
|
|
728
|
-
label: p(
|
|
728
|
+
label: p(tt)(l.currentMonth.slice(0, 3)),
|
|
729
729
|
onClick: s[2] || (s[2] = (a) => e("change-view", p(q).YEAR))
|
|
730
730
|
}, null, 8, ["label"]),
|
|
731
|
-
w(p(
|
|
731
|
+
w(p(j), {
|
|
732
732
|
variant: "textSubtle",
|
|
733
733
|
label: l.currentYear.toString(),
|
|
734
734
|
onClick: s[3] || (s[3] = (a) => e("change-view", p(q).DECADE))
|
|
735
735
|
}, null, 8, ["label"])
|
|
736
736
|
]),
|
|
737
|
-
w(p(
|
|
737
|
+
w(p(j), {
|
|
738
738
|
variant: "textSubtle",
|
|
739
739
|
icon: "chevron-right",
|
|
740
740
|
onClick: s[4] || (s[4] = (a) => e("move", { amount: 1, unit: p(q).MONTH }))
|
|
741
741
|
}),
|
|
742
|
-
w(p(
|
|
742
|
+
w(p(j), {
|
|
743
743
|
variant: "textSubtle",
|
|
744
744
|
icon: "chevron-right-double",
|
|
745
745
|
onClick: s[5] || (s[5] = (a) => e("move", { amount: 1, unit: p(q).YEAR }))
|
|
@@ -763,7 +763,7 @@ const p5 = /* @__PURE__ */ D({
|
|
|
763
763
|
])
|
|
764
764
|
]));
|
|
765
765
|
}
|
|
766
|
-
}), m5 = { class: "w-56 grid grid-cols-7" }, g5 = { class: "col-span-5 text-sm flex justify-center items-center" }, b5 = { class: "w-56 grid grid-cols-2 py-4" }, L5 = /* @__PURE__ */
|
|
766
|
+
}), m5 = { class: "w-56 grid grid-cols-7" }, g5 = { class: "col-span-5 text-sm flex justify-center items-center" }, b5 = { class: "w-56 grid grid-cols-2 py-4" }, L5 = /* @__PURE__ */ $({
|
|
767
767
|
__name: "YearView",
|
|
768
768
|
props: {
|
|
769
769
|
viewData: {},
|
|
@@ -774,23 +774,23 @@ const p5 = /* @__PURE__ */ D({
|
|
|
774
774
|
const e = t;
|
|
775
775
|
return (l, s) => (o(), i("div", null, [
|
|
776
776
|
u("nav", m5, [
|
|
777
|
-
w(p(
|
|
777
|
+
w(p(j), {
|
|
778
778
|
icon: "chevron-left",
|
|
779
779
|
variant: "textSubtle",
|
|
780
780
|
onClick: s[0] || (s[0] = (a) => e("move", { amount: -1, unit: "YEAR" }))
|
|
781
781
|
}),
|
|
782
782
|
u("div", g5, X(l.currentYear), 1),
|
|
783
|
-
w(p(
|
|
783
|
+
w(p(j), {
|
|
784
784
|
icon: "chevron-right",
|
|
785
785
|
variant: "textSubtle",
|
|
786
786
|
onClick: s[1] || (s[1] = (a) => e("move", { amount: 1, unit: "YEAR" }))
|
|
787
787
|
})
|
|
788
788
|
]),
|
|
789
789
|
u("main", b5, [
|
|
790
|
-
(o(!0), i(M, null, m1(l.viewData, (a, r) => (o(), V(p(
|
|
790
|
+
(o(!0), i(M, null, m1(l.viewData, (a, r) => (o(), V(p(j), {
|
|
791
791
|
key: a.label,
|
|
792
792
|
variant: a.selected ? "fill" : a.current ? "text" : "textSubtle",
|
|
793
|
-
label: p(
|
|
793
|
+
label: p(tt)(a.label.toString()),
|
|
794
794
|
onClick: (f) => e(
|
|
795
795
|
"select",
|
|
796
796
|
{
|
|
@@ -814,7 +814,7 @@ const C1 = (n) => {
|
|
|
814
814
|
}, Wo = (n, t, e) => {
|
|
815
815
|
if (n == null || t == null) return null;
|
|
816
816
|
n = C1(n), t = C1(t);
|
|
817
|
-
const l =
|
|
817
|
+
const l = et(e);
|
|
818
818
|
if (!n || !t || !l)
|
|
819
819
|
return null;
|
|
820
820
|
if (l === q.MONTH || l === q.YEAR)
|
|
@@ -826,7 +826,7 @@ const C1 = (n) => {
|
|
|
826
826
|
const e = new Date(Date.UTC(t.getUTCFullYear(), 0, 1));
|
|
827
827
|
return t && e ? Math.ceil(((t.getTime() - e.getTime()) / pe.DAY + 1) / 7) : 0;
|
|
828
828
|
}, I1 = (n, t, e) => {
|
|
829
|
-
const l = C1(n), s =
|
|
829
|
+
const l = C1(n), s = et(e);
|
|
830
830
|
if (s === q.MONTH) throw new Error("Cannot move date by month");
|
|
831
831
|
let a = l.getTime();
|
|
832
832
|
return a += t * pe[s], l.setTime(a), l;
|
|
@@ -988,7 +988,7 @@ class Z5 {
|
|
|
988
988
|
}
|
|
989
989
|
var h1 = ((n) => (n[n.DATE = q.DAY] = "DATE", n[n.WEEK = q.WEEK] = "WEEK", n[n.MONTH = q.MONTH] = "MONTH", n[n.YEAR = q.YEAR] = "YEAR", n[n.DECADE = q.DECADE] = "DECADE", n))(h1 || {});
|
|
990
990
|
const $5 = (n = null, t) => {
|
|
991
|
-
const e = new Z5(t, n), l =
|
|
991
|
+
const e = new Z5(t, n), l = L([]), s = L(h1.MONTH), a = L(""), r = L(0), f = (H) => {
|
|
992
992
|
if (!Object.keys(h1).includes(H)) {
|
|
993
993
|
console.warn(`[changeView] wrong view type: ${H}`);
|
|
994
994
|
return;
|
|
@@ -1037,7 +1037,7 @@ const $5 = (n = null, t) => {
|
|
|
1037
1037
|
throw new Error(`[moveViewDate] unknown unit: ${v}`);
|
|
1038
1038
|
}
|
|
1039
1039
|
C();
|
|
1040
|
-
},
|
|
1040
|
+
}, b = (H, v) => {
|
|
1041
1041
|
switch (v) {
|
|
1042
1042
|
case q.DAY:
|
|
1043
1043
|
e.setDateCursorDate(H);
|
|
@@ -1054,7 +1054,7 @@ const $5 = (n = null, t) => {
|
|
|
1054
1054
|
}
|
|
1055
1055
|
C();
|
|
1056
1056
|
}, c = ({ value: H, unit: v, view: g }) => {
|
|
1057
|
-
|
|
1057
|
+
b(H, v), f(g);
|
|
1058
1058
|
};
|
|
1059
1059
|
return {
|
|
1060
1060
|
selectedDate: e.selectedDate,
|
|
@@ -1066,13 +1066,13 @@ const $5 = (n = null, t) => {
|
|
|
1066
1066
|
moveRequest: d,
|
|
1067
1067
|
moveViewDate: h,
|
|
1068
1068
|
setSelectedDate: m,
|
|
1069
|
-
setViewDate:
|
|
1069
|
+
setViewDate: b,
|
|
1070
1070
|
setViewDateAndChangeView: c
|
|
1071
1071
|
};
|
|
1072
1072
|
}, D5 = { class: "flex flex-col" }, B5 = { class: "p-4" }, S5 = {
|
|
1073
1073
|
key: 0,
|
|
1074
1074
|
class: "flex items-center justify-end p-4 border-t border-default"
|
|
1075
|
-
}, T5 = /* @__PURE__ */
|
|
1075
|
+
}, T5 = /* @__PURE__ */ $({
|
|
1076
1076
|
__name: "CalendarView",
|
|
1077
1077
|
props: {
|
|
1078
1078
|
value: { default: null },
|
|
@@ -1095,8 +1095,8 @@ const $5 = (n = null, t) => {
|
|
|
1095
1095
|
setSelectedDate: d,
|
|
1096
1096
|
setViewDateAndChangeView: h
|
|
1097
1097
|
} = $5(n.value, { weekStart: n.weekStart, disabledDates: n.disabledDates });
|
|
1098
|
-
|
|
1099
|
-
const
|
|
1098
|
+
i1(() => n.value, (g) => d(g));
|
|
1099
|
+
const b = Ht(a), c = L(Object.values(w1).map((g, T) => Object.values(w1)[j1(T + n.weekStart, Object.values(w1).length)])), H = (g) => {
|
|
1100
1100
|
if (!g) {
|
|
1101
1101
|
e("change", null);
|
|
1102
1102
|
return;
|
|
@@ -1119,7 +1119,7 @@ const $5 = (n = null, t) => {
|
|
|
1119
1119
|
break;
|
|
1120
1120
|
}
|
|
1121
1121
|
};
|
|
1122
|
-
return
|
|
1122
|
+
return a1(() => {
|
|
1123
1123
|
document.addEventListener("keydown", v);
|
|
1124
1124
|
}), F1(() => {
|
|
1125
1125
|
document.removeEventListener("keydown", v);
|
|
@@ -1127,7 +1127,7 @@ const $5 = (n = null, t) => {
|
|
|
1127
1127
|
u("main", B5, [
|
|
1128
1128
|
p(s) === p(h1).MONTH ? (o(), V(h5, {
|
|
1129
1129
|
key: 0,
|
|
1130
|
-
"current-month":
|
|
1130
|
+
"current-month": b.value,
|
|
1131
1131
|
"current-year": p(r),
|
|
1132
1132
|
"view-data": p(l),
|
|
1133
1133
|
weekdays: c.value,
|
|
@@ -1150,14 +1150,14 @@ const $5 = (n = null, t) => {
|
|
|
1150
1150
|
}, null, 8, ["view-data", "onMove", "onSelect"])) : k("", !0)
|
|
1151
1151
|
]),
|
|
1152
1152
|
g.clearable ? (o(), i("footer", S5, [
|
|
1153
|
-
w(p(
|
|
1153
|
+
w(p(j), {
|
|
1154
1154
|
square: "",
|
|
1155
1155
|
size: "tiny",
|
|
1156
1156
|
variant: "outlineSubtle",
|
|
1157
1157
|
"leading-icon": "trash",
|
|
1158
1158
|
label: "Clear",
|
|
1159
1159
|
disabled: !g.value,
|
|
1160
|
-
onClick: T[0] || (T[0] = (
|
|
1160
|
+
onClick: T[0] || (T[0] = (z) => H(null))
|
|
1161
1161
|
}, null, 8, ["disabled"])
|
|
1162
1162
|
])) : k("", !0)
|
|
1163
1163
|
]));
|
|
@@ -1166,18 +1166,18 @@ const $5 = (n = null, t) => {
|
|
|
1166
1166
|
const l = new Date(n), s = new Intl.DateTimeFormat("en-001", { weekday: "short" }).format(l), a = l.getDate().toString().padStart(2, "0"), r = new Intl.DateTimeFormat("en-001", { month: "short" }).format(l), f = l.getFullYear(), C = l.getHours().toString().padStart(2, "0"), m = l.getMinutes().toString().padStart(2, "0");
|
|
1167
1167
|
let d = `${a} ${r} ${f}`;
|
|
1168
1168
|
return t && (d = `${s} ${d}`), e && (d = `${d} ${C}:${m}`), d;
|
|
1169
|
-
}, z5 = (n) => J1(n, !1, !1), A5 = (n) => J1(n, !0, !1), R5 = (n) => J1(n, !1, !0), E5 = (n) => J1(n, !0, !0),
|
|
1169
|
+
}, z5 = (n) => J1(n, !1, !1), A5 = (n) => J1(n, !0, !1), R5 = (n) => J1(n, !1, !0), E5 = (n) => J1(n, !0, !0), lt = (n, t = !1) => {
|
|
1170
1170
|
const e = new Date(n), l = e.getFullYear(), s = (e.getMonth() + 1).toString().padStart(2, "0"), a = e.getDate().toString().padStart(2, "0"), r = e.getHours().toString().padStart(2, "0"), f = e.getMinutes().toString().padStart(2, "0");
|
|
1171
1171
|
let C = `${l}-${s}-${a}`;
|
|
1172
1172
|
return t && (C = `${C} ${r}:${f}`), C;
|
|
1173
|
-
}, O5 = (n) =>
|
|
1173
|
+
}, O5 = (n) => lt(n, !1), I5 = (n) => lt(n, !0), Go = {
|
|
1174
1174
|
readableDate: z5,
|
|
1175
1175
|
readableDateWithDay: A5,
|
|
1176
1176
|
readableDateTime: R5,
|
|
1177
1177
|
readableDateTimeWithDay: E5,
|
|
1178
1178
|
dbDate: O5,
|
|
1179
1179
|
dbDateTime: I5
|
|
1180
|
-
}, Jo = ["dbDate", "dbDateTime", "readableDate", "readableDateWithDay", "readableDateTime", "readableDateTimeWithDay"], P5 = /* @__PURE__ */
|
|
1180
|
+
}, Jo = ["dbDate", "dbDateTime", "readableDate", "readableDateWithDay", "readableDateTime", "readableDateTimeWithDay"], P5 = /* @__PURE__ */ $({
|
|
1181
1181
|
__name: "CircleIndicator",
|
|
1182
1182
|
props: {
|
|
1183
1183
|
value: { type: Boolean },
|
|
@@ -1187,7 +1187,7 @@ const $5 = (n = null, t) => {
|
|
|
1187
1187
|
setup(n) {
|
|
1188
1188
|
const t = O(() => n.indeterminate ? "dash" : n.value ? "check" : null);
|
|
1189
1189
|
return (e, l) => (o(), i("button", {
|
|
1190
|
-
class:
|
|
1190
|
+
class: D(["group inline-flex items-center justify-center w-6 h-6 rounded-full border focus:outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-black dark:focus-visible:outline-white", {
|
|
1191
1191
|
"border-default bg-primary hover:bg-secondary hover:border-strong cursor-pointer": !e.disabled && !e.value,
|
|
1192
1192
|
"border-action bg-action text-white hover:bg-action-hover hover:border-action-hover cursor-pointer": !e.disabled && e.value,
|
|
1193
1193
|
"border-default bg-tertiary text-white cursor-default": e.disabled && e.value,
|
|
@@ -1212,7 +1212,7 @@ const $5 = (n = null, t) => {
|
|
|
1212
1212
|
viewBox: "0 0 10 8",
|
|
1213
1213
|
fill: "none",
|
|
1214
1214
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1215
|
-
}, x5 = /* @__PURE__ */
|
|
1215
|
+
}, x5 = /* @__PURE__ */ $({
|
|
1216
1216
|
__name: "DefaultIndicator",
|
|
1217
1217
|
props: {
|
|
1218
1218
|
value: { type: Boolean },
|
|
@@ -1221,7 +1221,7 @@ const $5 = (n = null, t) => {
|
|
|
1221
1221
|
},
|
|
1222
1222
|
setup(n) {
|
|
1223
1223
|
return (t, e) => (o(), i("button", {
|
|
1224
|
-
class:
|
|
1224
|
+
class: D(["flex items-center justify-center w-4 h-4 border rounded focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-black dark:focus-visible:outline-white", {
|
|
1225
1225
|
"border-action bg-action hover:bg-action-hover hover:border-action-hover cursor-pointer": (t.value || t.indeterminate) && !t.disabled,
|
|
1226
1226
|
"bg-primary border-default hover:border-strong hover:bg-secondary cursor-pointer": !t.value && !t.indeterminate && !t.disabled,
|
|
1227
1227
|
"cursor-default border-default bg-tertiary": t.disabled
|
|
@@ -1235,7 +1235,7 @@ const $5 = (n = null, t) => {
|
|
|
1235
1235
|
])])) : k("", !0)
|
|
1236
1236
|
], 2));
|
|
1237
1237
|
}
|
|
1238
|
-
}),
|
|
1238
|
+
}), nt = /* @__PURE__ */ $({
|
|
1239
1239
|
__name: "Checkbox",
|
|
1240
1240
|
props: {
|
|
1241
1241
|
label: {},
|
|
@@ -1248,7 +1248,7 @@ const $5 = (n = null, t) => {
|
|
|
1248
1248
|
setup(n, { emit: t }) {
|
|
1249
1249
|
const e = t;
|
|
1250
1250
|
return (l, s) => (o(), i("div", {
|
|
1251
|
-
class:
|
|
1251
|
+
class: D(["group flex items-center space-x-2", {
|
|
1252
1252
|
"border-action": l.checked && !l.disabled,
|
|
1253
1253
|
"border-default": !l.checked && !l.disabled,
|
|
1254
1254
|
"border-subtle cursor-default": l.disabled,
|
|
@@ -1269,7 +1269,7 @@ const $5 = (n = null, t) => {
|
|
|
1269
1269
|
}, null, 8, ["value", "disabled", "indeterminate"])),
|
|
1270
1270
|
l.label ? (o(), i("span", {
|
|
1271
1271
|
key: 2,
|
|
1272
|
-
class:
|
|
1272
|
+
class: D(["block text-sm leading-tight select-none", {
|
|
1273
1273
|
"hover:underline": !l.disabled,
|
|
1274
1274
|
"text-tertiary": l.disabled
|
|
1275
1275
|
}])
|
|
@@ -1285,7 +1285,7 @@ const $5 = (n = null, t) => {
|
|
|
1285
1285
|
}, Q5 = {
|
|
1286
1286
|
key: 0,
|
|
1287
1287
|
class: "relative"
|
|
1288
|
-
}, _o = /* @__PURE__ */
|
|
1288
|
+
}, _o = /* @__PURE__ */ $({
|
|
1289
1289
|
__name: "Collapse",
|
|
1290
1290
|
props: {
|
|
1291
1291
|
alignment: { default: "right" },
|
|
@@ -1298,20 +1298,20 @@ const $5 = (n = null, t) => {
|
|
|
1298
1298
|
},
|
|
1299
1299
|
emits: ["toggle"],
|
|
1300
1300
|
setup(n, { emit: t }) {
|
|
1301
|
-
const e = n, l = t, s =
|
|
1301
|
+
const e = n, l = t, s = L(), a = L(), r = L(!1), f = O(() => e.open ? e.borderClassOpen : e.borderClassClosed), C = O(() => r.value ? {
|
|
1302
1302
|
top: "-1px",
|
|
1303
1303
|
paddingTop: "1px"
|
|
1304
1304
|
} : {});
|
|
1305
|
-
|
|
1305
|
+
i1(
|
|
1306
1306
|
() => e.open,
|
|
1307
1307
|
(d) => {
|
|
1308
1308
|
d || (r.value = !1);
|
|
1309
1309
|
}
|
|
1310
|
-
),
|
|
1310
|
+
), i1(r, (d) => {
|
|
1311
1311
|
d && s.value.blur();
|
|
1312
1312
|
});
|
|
1313
|
-
const m =
|
|
1314
|
-
return
|
|
1313
|
+
const m = L(null);
|
|
1314
|
+
return a1(() => {
|
|
1315
1315
|
e.sticky && (m.value = new IntersectionObserver(
|
|
1316
1316
|
([d]) => {
|
|
1317
1317
|
e.open && (r.value = d.intersectionRatio < 1);
|
|
@@ -1326,7 +1326,7 @@ const $5 = (n = null, t) => {
|
|
|
1326
1326
|
u("header", {
|
|
1327
1327
|
ref_key: "headerRef",
|
|
1328
1328
|
ref: a,
|
|
1329
|
-
class:
|
|
1329
|
+
class: D(["w-full border-b", [
|
|
1330
1330
|
{
|
|
1331
1331
|
"shadow-sm-xs border-strong sticky z-10": r.value,
|
|
1332
1332
|
relative: !r.value
|
|
@@ -1338,28 +1338,28 @@ const $5 = (n = null, t) => {
|
|
|
1338
1338
|
}, [
|
|
1339
1339
|
u("div", Y5, [
|
|
1340
1340
|
d.alignment === "left" ? (o(), i("div", W5, [
|
|
1341
|
-
|
|
1341
|
+
R(d.$slots, "header", { sticky: r.value })
|
|
1342
1342
|
])) : k("", !0),
|
|
1343
1343
|
u("div", j5, [
|
|
1344
|
-
d.$slots.content ? (o(), V(p(
|
|
1344
|
+
d.$slots.content ? (o(), V(p(j), {
|
|
1345
1345
|
key: 0,
|
|
1346
1346
|
small: "",
|
|
1347
1347
|
variant: "textSubtle",
|
|
1348
1348
|
icon: d.open ? "chevron-down-small" : "chevron-right-small",
|
|
1349
|
-
onClick: h[0] || (h[0] = (
|
|
1349
|
+
onClick: h[0] || (h[0] = (b) => l("toggle", d.id))
|
|
1350
1350
|
}, null, 8, ["icon"])) : k("", !0)
|
|
1351
1351
|
]),
|
|
1352
1352
|
d.alignment === "right" ? (o(), i("div", K5, [
|
|
1353
|
-
|
|
1353
|
+
R(d.$slots, "header", { sticky: r.value })
|
|
1354
1354
|
])) : k("", !0)
|
|
1355
1355
|
])
|
|
1356
1356
|
], 6),
|
|
1357
1357
|
d.open ? (o(), i("main", Q5, [
|
|
1358
|
-
|
|
1358
|
+
R(d.$slots, "content")
|
|
1359
1359
|
])) : k("", !0)
|
|
1360
1360
|
]));
|
|
1361
1361
|
}
|
|
1362
|
-
}), E1 = /* @__PURE__ */
|
|
1362
|
+
}), E1 = /* @__PURE__ */ $({
|
|
1363
1363
|
__name: "ConfirmCancel",
|
|
1364
1364
|
props: {
|
|
1365
1365
|
order: { default: "confirm-first" },
|
|
@@ -1384,7 +1384,7 @@ const $5 = (n = null, t) => {
|
|
|
1384
1384
|
class: "gap-2"
|
|
1385
1385
|
}, {
|
|
1386
1386
|
default: Z(() => [
|
|
1387
|
-
l.value ? (o(), V(p(
|
|
1387
|
+
l.value ? (o(), V(p(j), {
|
|
1388
1388
|
key: 0,
|
|
1389
1389
|
small: s.small,
|
|
1390
1390
|
"stop-propagation": "",
|
|
@@ -1393,20 +1393,20 @@ const $5 = (n = null, t) => {
|
|
|
1393
1393
|
variant: s.confirmVariant,
|
|
1394
1394
|
disabled: s.confirmDisabled,
|
|
1395
1395
|
loading: s.loading,
|
|
1396
|
-
class:
|
|
1396
|
+
class: D({ "flex-1": s.fillContainer }),
|
|
1397
1397
|
onClick: a[0] || (a[0] = (r) => e("confirm"))
|
|
1398
1398
|
}, null, 8, ["small", "icon", "label", "variant", "disabled", "loading", "class"])) : k("", !0),
|
|
1399
|
-
w(p(
|
|
1399
|
+
w(p(j), {
|
|
1400
1400
|
variant: s.cancelVariant,
|
|
1401
1401
|
"stop-propagation": "",
|
|
1402
1402
|
disabled: s.cancelDisabled,
|
|
1403
1403
|
small: s.small,
|
|
1404
1404
|
icon: s.cancelIcon,
|
|
1405
1405
|
label: s.cancelLabel,
|
|
1406
|
-
class:
|
|
1406
|
+
class: D({ "flex-1": s.fillContainer }),
|
|
1407
1407
|
onClick: a[1] || (a[1] = (r) => e("cancel"))
|
|
1408
1408
|
}, null, 8, ["variant", "disabled", "small", "icon", "label", "class"]),
|
|
1409
|
-
l.value ? k("", !0) : (o(), V(p(
|
|
1409
|
+
l.value ? k("", !0) : (o(), V(p(j), {
|
|
1410
1410
|
key: 1,
|
|
1411
1411
|
small: s.small,
|
|
1412
1412
|
"stop-propagation": "",
|
|
@@ -1415,7 +1415,7 @@ const $5 = (n = null, t) => {
|
|
|
1415
1415
|
variant: s.confirmVariant,
|
|
1416
1416
|
disabled: s.confirmDisabled,
|
|
1417
1417
|
loading: s.loading,
|
|
1418
|
-
class:
|
|
1418
|
+
class: D({ "flex-1": s.fillContainer }),
|
|
1419
1419
|
onClick: a[2] || (a[2] = (r) => e("confirm"))
|
|
1420
1420
|
}, null, 8, ["small", "icon", "label", "variant", "disabled", "loading", "class"]))
|
|
1421
1421
|
]),
|
|
@@ -1446,11 +1446,11 @@ function ce(n) {
|
|
|
1446
1446
|
const t = (e) => {
|
|
1447
1447
|
e.key === "Escape" && n();
|
|
1448
1448
|
};
|
|
1449
|
-
|
|
1449
|
+
a1(() => window.addEventListener("keydown", t)), F1(() => window.removeEventListener("keydown", t));
|
|
1450
1450
|
}
|
|
1451
1451
|
const q5 = () => {
|
|
1452
|
-
const n =
|
|
1453
|
-
return
|
|
1452
|
+
const n = L(!1);
|
|
1453
|
+
return a1(() => n.value = !0), { mounted: n };
|
|
1454
1454
|
}, Ce = () => ({
|
|
1455
1455
|
nextFrame: (n) => {
|
|
1456
1456
|
requestAnimationFrame(() => {
|
|
@@ -1478,25 +1478,25 @@ const q5 = () => {
|
|
|
1478
1478
|
key: 1,
|
|
1479
1479
|
class: "absolute w-16 right-0 z-10 h-full flex items-center justify-end pl-2",
|
|
1480
1480
|
style: { background: "linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 90%, rgba(255,255,255,1) 100%)" }
|
|
1481
|
-
}, Ze = 120, e4 = /* @__PURE__ */
|
|
1481
|
+
}, Ze = 120, e4 = /* @__PURE__ */ $({
|
|
1482
1482
|
__name: "ContentSlider",
|
|
1483
1483
|
setup(n, { expose: t }) {
|
|
1484
|
-
const e =
|
|
1484
|
+
const e = L(0), l = L(null), s = L(null), a = L(l.value ? l.value.clientWidth : 0), r = L(s.value ? s.value.scrollWidth : 0), f = () => e.value = Math.max(0, e.value - Ze), C = () => {
|
|
1485
1485
|
e.value = Math.min(r.value - a.value, e.value + Ze);
|
|
1486
|
-
}, m = O(() => e.value > 0), d = O(() => e.value < r.value - a.value), { nextFrame: h } = Ce(),
|
|
1486
|
+
}, m = O(() => e.value > 0), d = O(() => e.value < r.value - a.value), { nextFrame: h } = Ce(), b = () => {
|
|
1487
1487
|
D1(() => {
|
|
1488
1488
|
h(() => {
|
|
1489
1489
|
a.value = l.value ? l.value.clientWidth : 0, r.value = s.value ? s.value.scrollWidth : 0, a.value >= r.value && (e.value = 0);
|
|
1490
1490
|
});
|
|
1491
1491
|
});
|
|
1492
1492
|
};
|
|
1493
|
-
return
|
|
1493
|
+
return a1(b), t({ update: b }), (c, H) => (o(), i("div", {
|
|
1494
1494
|
ref_key: "listContainer",
|
|
1495
1495
|
ref: l,
|
|
1496
1496
|
class: "relative flex-1 flex items-center py-1 overflow-hidden whitespace-nowrap"
|
|
1497
1497
|
}, [
|
|
1498
1498
|
m.value ? (o(), i("aside", G5, [
|
|
1499
|
-
w(p(
|
|
1499
|
+
w(p(j), {
|
|
1500
1500
|
small: "",
|
|
1501
1501
|
icon: "chevron-left",
|
|
1502
1502
|
variant: "outline",
|
|
@@ -1510,10 +1510,10 @@ const q5 = () => {
|
|
|
1510
1510
|
class: "flex items-center gap-2 snap-x scroll-px-2 transition-transform duration-300",
|
|
1511
1511
|
style: t1({ transform: `translateX(-${e.value}px)` })
|
|
1512
1512
|
}, [
|
|
1513
|
-
|
|
1513
|
+
R(c.$slots, "default")
|
|
1514
1514
|
], 4),
|
|
1515
1515
|
d.value ? (o(), i("aside", J5, [
|
|
1516
|
-
d.value ? (o(), V(p(
|
|
1516
|
+
d.value ? (o(), V(p(j), {
|
|
1517
1517
|
key: 0,
|
|
1518
1518
|
small: "",
|
|
1519
1519
|
icon: "chevron-right",
|
|
@@ -1819,7 +1819,7 @@ const t4 = /* @__PURE__ */ M1(_5, [["render", el]]), tl = {
|
|
|
1819
1819
|
}, A2 = {
|
|
1820
1820
|
key: 167,
|
|
1821
1821
|
d: "M1.67045 7.12399C1.87812 6.94198 2.19402 6.96278 2.37603 7.17045C3.48422 8.43486 5.56103 9.3323 8.00001 9.3323C10.439 9.3323 12.5158 8.43486 13.624 7.17045C13.806 6.96278 14.1219 6.94198 14.3296 7.12399C14.5372 7.306 14.5581 7.6219 14.376 7.82957C14.1691 8.06569 13.9374 8.28852 13.6838 8.49653L14.8536 9.66625C15.0488 9.86151 15.0488 10.1781 14.8536 10.3734C14.6583 10.5686 14.3417 10.5686 14.1464 10.3734L12.8524 9.07929C12.1896 9.47611 11.4305 9.79042 10.607 10.005L10.9903 11.9217C11.0445 12.1925 10.8689 12.4559 10.5981 12.5101C10.3273 12.5642 10.0639 12.3886 10.0097 12.1179L9.62769 10.2077C9.10187 10.2895 8.55696 10.3323 8.00001 10.3323C7.44307 10.3323 6.89815 10.2895 6.37233 10.2077L5.9903 12.1179C5.93614 12.3886 5.67273 12.5642 5.40195 12.5101C5.13117 12.4559 4.95556 12.1925 5.00971 11.9217L5.39307 10.005C4.56953 9.79041 3.81042 9.47611 3.14764 9.07928L1.85355 10.3734C1.65829 10.5686 1.34171 10.5686 1.14645 10.3734C0.951183 10.1781 0.951183 9.86151 1.14645 9.66625L2.31618 8.49652C2.0626 8.28851 1.83093 8.06568 1.62399 7.82957C1.44198 7.6219 1.46278 7.306 1.67045 7.12399Z"
|
|
1822
|
-
}, l1 = /* @__PURE__ */
|
|
1822
|
+
}, l1 = /* @__PURE__ */ $({
|
|
1823
1823
|
__name: "Icon",
|
|
1824
1824
|
props: {
|
|
1825
1825
|
name: {}
|
|
@@ -2283,7 +2283,7 @@ const t4 = /* @__PURE__ */ M1(_5, [["render", el]]), tl = {
|
|
|
2283
2283
|
], 64)) : k("", !0)
|
|
2284
2284
|
]));
|
|
2285
2285
|
}
|
|
2286
|
-
}), R2 = /* @__PURE__ */
|
|
2286
|
+
}), R2 = /* @__PURE__ */ $({
|
|
2287
2287
|
__name: "DeleteButton",
|
|
2288
2288
|
emits: ["click"],
|
|
2289
2289
|
setup(n) {
|
|
@@ -2294,7 +2294,7 @@ const t4 = /* @__PURE__ */ M1(_5, [["render", el]]), tl = {
|
|
|
2294
2294
|
w(p(l1), { name: "close" })
|
|
2295
2295
|
]));
|
|
2296
2296
|
}
|
|
2297
|
-
}), E2 = { class: "flex items-center justify-between w-full h-12" }, O2 = { key: 0 }, I2 = { key: 1 }, P2 = { class: "flex items-center h-12" }, l4 = /* @__PURE__ */
|
|
2297
|
+
}), E2 = { class: "flex items-center justify-between w-full h-12" }, O2 = { key: 0 }, I2 = { key: 1 }, P2 = { class: "flex items-center h-12" }, l4 = /* @__PURE__ */ $({
|
|
2298
2298
|
__name: "Dialog",
|
|
2299
2299
|
props: {
|
|
2300
2300
|
closeable: { type: Boolean, default: !0 },
|
|
@@ -2304,8 +2304,8 @@ const t4 = /* @__PURE__ */ M1(_5, [["render", el]]), tl = {
|
|
|
2304
2304
|
},
|
|
2305
2305
|
emits: ["close", "open"],
|
|
2306
2306
|
setup(n, { expose: t, emit: e }) {
|
|
2307
|
-
const l = e, s =
|
|
2308
|
-
|
|
2307
|
+
const l = e, s = L(!1);
|
|
2308
|
+
a1(() => s.value = !0);
|
|
2309
2309
|
const a = () => s.value = !1, r = () => n.closeable && a();
|
|
2310
2310
|
return n.closeable && ce(r), t({ close: a }), (f, C) => (o(), V(x1, { to: f.target }, [
|
|
2311
2311
|
w(p(ve), {
|
|
@@ -2315,7 +2315,7 @@ const t4 = /* @__PURE__ */ M1(_5, [["render", el]]), tl = {
|
|
|
2315
2315
|
onClose: C[1] || (C[1] = (m) => l("close"))
|
|
2316
2316
|
}, {
|
|
2317
2317
|
default: Z(() => [
|
|
2318
|
-
w(p(
|
|
2318
|
+
w(p(ot), {
|
|
2319
2319
|
onTransitionAfterEnter: C[0] || (C[0] = (m) => l("open"))
|
|
2320
2320
|
}, {
|
|
2321
2321
|
default: Z(() => [
|
|
@@ -2325,9 +2325,9 @@ const t4 = /* @__PURE__ */ M1(_5, [["render", el]]), tl = {
|
|
|
2325
2325
|
header: Z(() => [
|
|
2326
2326
|
u("header", E2, [
|
|
2327
2327
|
f.title ? (o(), i("h4", O2, X(f.title), 1)) : (o(), i("h4", I2, [
|
|
2328
|
-
|
|
2328
|
+
R(f.$slots, "title", { close: a })
|
|
2329
2329
|
])),
|
|
2330
|
-
f.closeable ? (o(), V(p(
|
|
2330
|
+
f.closeable ? (o(), V(p(j), {
|
|
2331
2331
|
key: 2,
|
|
2332
2332
|
small: "",
|
|
2333
2333
|
icon: "close",
|
|
@@ -2337,11 +2337,11 @@ const t4 = /* @__PURE__ */ M1(_5, [["render", el]]), tl = {
|
|
|
2337
2337
|
])
|
|
2338
2338
|
]),
|
|
2339
2339
|
main: Z(() => [
|
|
2340
|
-
|
|
2340
|
+
R(f.$slots, "main", { close: a })
|
|
2341
2341
|
]),
|
|
2342
2342
|
footer: Z(() => [
|
|
2343
2343
|
u("footer", P2, [
|
|
2344
|
-
|
|
2344
|
+
R(f.$slots, "footer", { close: a })
|
|
2345
2345
|
])
|
|
2346
2346
|
]),
|
|
2347
2347
|
_: 3
|
|
@@ -2359,7 +2359,7 @@ const t4 = /* @__PURE__ */ M1(_5, [["render", el]]), tl = {
|
|
|
2359
2359
|
}, 8, ["show", "type"])
|
|
2360
2360
|
], 8, ["to"]));
|
|
2361
2361
|
}
|
|
2362
|
-
}),
|
|
2362
|
+
}), ot = /* @__PURE__ */ $({
|
|
2363
2363
|
__name: "FadeInUp",
|
|
2364
2364
|
emits: ["transition-after-enter"],
|
|
2365
2365
|
setup(n, { emit: t }) {
|
|
@@ -2374,15 +2374,15 @@ const t4 = /* @__PURE__ */ M1(_5, [["render", el]]), tl = {
|
|
|
2374
2374
|
onAfterEnter: s[0] || (s[0] = (a) => e("transition-after-enter"))
|
|
2375
2375
|
}, {
|
|
2376
2376
|
default: Z(() => [
|
|
2377
|
-
|
|
2377
|
+
R(l.$slots, "default")
|
|
2378
2378
|
]),
|
|
2379
2379
|
_: 3
|
|
2380
2380
|
}));
|
|
2381
2381
|
}
|
|
2382
|
-
}), N2 = { class: "text-
|
|
2382
|
+
}), N2 = { class: "text-xs" }, F2 = {
|
|
2383
2383
|
key: 0,
|
|
2384
2384
|
class: "h-4 px-1 min-w-4 flex items-center justify-center rounded-full text-xs font-medium bg-tertiary"
|
|
2385
|
-
}, x2 = /* @__PURE__ */
|
|
2385
|
+
}, x2 = /* @__PURE__ */ $({
|
|
2386
2386
|
__name: "FilterChip",
|
|
2387
2387
|
props: {
|
|
2388
2388
|
label: {},
|
|
@@ -2394,7 +2394,7 @@ const t4 = /* @__PURE__ */ M1(_5, [["render", el]]), tl = {
|
|
|
2394
2394
|
emits: ["click", "delete"],
|
|
2395
2395
|
setup(n) {
|
|
2396
2396
|
return (t, e) => (o(), i("button", {
|
|
2397
|
-
class:
|
|
2397
|
+
class: D(["h-6 py-2 rounded-md flex items-center gap-1 cursor-pointer hover:bg-secondary active:bg-tertiary", {
|
|
2398
2398
|
"border-action bg-secondary": t.focus && !t.active,
|
|
2399
2399
|
"border-default hover:border-strong active:border-strong": !t.focus && !t.active,
|
|
2400
2400
|
"px-2 border text-secondary hover:text-tertiary active:text-primary": !t.active,
|
|
@@ -2413,25 +2413,25 @@ const t4 = /* @__PURE__ */ M1(_5, [["render", el]]), tl = {
|
|
|
2413
2413
|
})) : k("", !0)
|
|
2414
2414
|
], 2));
|
|
2415
2415
|
}
|
|
2416
|
-
}), U2 = { class: "opacity-0" }, Y2 = { key: 1 }, n4 = /* @__PURE__ */
|
|
2416
|
+
}), U2 = { class: "opacity-0" }, Y2 = { key: 1 }, n4 = /* @__PURE__ */ $({
|
|
2417
2417
|
__name: "FirstPaint",
|
|
2418
2418
|
props: {
|
|
2419
2419
|
delayIndex: {}
|
|
2420
2420
|
},
|
|
2421
2421
|
setup(n) {
|
|
2422
2422
|
const t = n;
|
|
2423
|
-
return
|
|
2423
|
+
return a1(() => {
|
|
2424
2424
|
if (t.delayIndex < 1 || t.delayIndex > 20)
|
|
2425
2425
|
throw new Error("delayIndex has to be between 1 and 20");
|
|
2426
2426
|
}), (e, l) => (o(), i("div", {
|
|
2427
|
-
class:
|
|
2427
|
+
class: D(["first-paint rounded", `delay-${e.delayIndex}`])
|
|
2428
2428
|
}, [
|
|
2429
2429
|
u("div", U2, [
|
|
2430
|
-
e.$slots.default ?
|
|
2430
|
+
e.$slots.default ? R(e.$slots, "default", { key: 0 }) : (o(), i("span", Y2, "Some random text"))
|
|
2431
2431
|
])
|
|
2432
2432
|
], 2));
|
|
2433
2433
|
}
|
|
2434
|
-
}), e1 = /* @__PURE__ */
|
|
2434
|
+
}), e1 = /* @__PURE__ */ $({
|
|
2435
2435
|
__name: "Flexbox",
|
|
2436
2436
|
props: {
|
|
2437
2437
|
align: { default: "center" },
|
|
@@ -2461,10 +2461,10 @@ const t4 = /* @__PURE__ */ M1(_5, [["render", el]]), tl = {
|
|
|
2461
2461
|
t.justify ? l[t.justify] : ""
|
|
2462
2462
|
]);
|
|
2463
2463
|
return (a, r) => (o(), V($1(a.tag), {
|
|
2464
|
-
class:
|
|
2464
|
+
class: D(s.value)
|
|
2465
2465
|
}, {
|
|
2466
2466
|
default: Z(() => [
|
|
2467
|
-
|
|
2467
|
+
R(a.$slots, "default")
|
|
2468
2468
|
]),
|
|
2469
2469
|
_: 3
|
|
2470
2470
|
}, 8, ["class"]));
|
|
@@ -2493,7 +2493,7 @@ const j2 = () => {
|
|
|
2493
2493
|
e.style.width = "100%", n.appendChild(e);
|
|
2494
2494
|
const l = e.offsetWidth;
|
|
2495
2495
|
return (s = n.parentNode) == null || s.removeChild(n), le = t - l, le;
|
|
2496
|
-
},
|
|
2496
|
+
}, st = (n, t) => {
|
|
2497
2497
|
if (!t) {
|
|
2498
2498
|
n.scrollTop = 0;
|
|
2499
2499
|
return;
|
|
@@ -2504,7 +2504,7 @@ const j2 = () => {
|
|
|
2504
2504
|
e.push(l), l = l.offsetParent;
|
|
2505
2505
|
const s = t.offsetTop + e.reduce((C, m) => C + m.offsetTop, 0), a = s + t.offsetHeight, r = n.scrollTop, f = r + n.clientHeight;
|
|
2506
2506
|
s < r ? n.scrollTop = s : a > f && (n.scrollTop = a - n.clientHeight);
|
|
2507
|
-
}, ie = (n) => n != null, s4 = (n) => ie(n) && (typeof n == "string" ? n !== "" : !0) && (Array.isArray(n) ? n.length > 0 : !0), K2 = ["aria-label"], $e = /* @__PURE__ */
|
|
2507
|
+
}, ie = (n) => n != null, s4 = (n) => ie(n) && (typeof n == "string" ? n !== "" : !0) && (Array.isArray(n) ? n.length > 0 : !0), K2 = ["aria-label"], $e = /* @__PURE__ */ $({
|
|
2508
2508
|
__name: "Aside",
|
|
2509
2509
|
props: {
|
|
2510
2510
|
width: { default: 256 },
|
|
@@ -2516,12 +2516,12 @@ const j2 = () => {
|
|
|
2516
2516
|
},
|
|
2517
2517
|
emits: ["resize-start", "resize", "resize-end"],
|
|
2518
2518
|
setup(n, { emit: t }) {
|
|
2519
|
-
const e = n, l = t, s =
|
|
2519
|
+
const e = n, l = t, s = L(), a = O(() => [
|
|
2520
2520
|
e.side === "left" ? "left-0" : "right-0",
|
|
2521
2521
|
e.border ? e.side === "left" ? "border-r border-default" : "border-l border-default" : ""
|
|
2522
2522
|
]);
|
|
2523
2523
|
let r, f;
|
|
2524
|
-
const C =
|
|
2524
|
+
const C = L(!1);
|
|
2525
2525
|
function m(c) {
|
|
2526
2526
|
r = c.pageX, f = e.width, C.value = !0, window.addEventListener("mouseup", h), window.addEventListener("mousemove", d), l("resize-start");
|
|
2527
2527
|
}
|
|
@@ -2532,7 +2532,7 @@ const j2 = () => {
|
|
|
2532
2532
|
function h() {
|
|
2533
2533
|
C.value = !1, window.removeEventListener("mouseup", h), window.removeEventListener("mousemove", d), l("resize-end");
|
|
2534
2534
|
}
|
|
2535
|
-
function
|
|
2535
|
+
function b(c) {
|
|
2536
2536
|
let v = e.width;
|
|
2537
2537
|
if (e.side === "left" ? c.key === "ArrowLeft" ? v = e.width - 30 : c.key === "ArrowRight" && (v = e.width + 30) : c.key === "ArrowLeft" ? v = e.width + 30 : c.key === "ArrowRight" && (v = e.width - 30), v !== e.width) {
|
|
2538
2538
|
c.preventDefault();
|
|
@@ -2548,23 +2548,23 @@ const j2 = () => {
|
|
|
2548
2548
|
width: `${c.width}px`,
|
|
2549
2549
|
transitionProperty: C.value ? "none" : "transform, width"
|
|
2550
2550
|
}),
|
|
2551
|
-
class:
|
|
2551
|
+
class: D(["absolute top-0 z-10 h-full overflow-x-hidden bg-primary", a.value])
|
|
2552
2552
|
}, [
|
|
2553
|
-
|
|
2553
|
+
R(c.$slots, "default"),
|
|
2554
2554
|
e.draggable ? (o(), i("button", {
|
|
2555
2555
|
key: 0,
|
|
2556
2556
|
tabindex: "0",
|
|
2557
2557
|
"aria-label": `Resize ${e.side} panel`,
|
|
2558
|
-
class:
|
|
2558
|
+
class: D(["absolute z-10 top-0 h-full w-1 hover:border-action cursor-ew-resize", [
|
|
2559
2559
|
e.side === "left" ? "right-0 border-r" : "left-0 border-l",
|
|
2560
2560
|
C.value ? "border-action bg-action" : "border-transparent bg-transparent hover:bg-tertiary focus:outline-none focus:border-action focus:bg-tertiary"
|
|
2561
2561
|
]]),
|
|
2562
2562
|
onMousedown: m,
|
|
2563
|
-
onKeydown:
|
|
2563
|
+
onKeydown: b
|
|
2564
2564
|
}, null, 42, K2)) : k("", !0)
|
|
2565
2565
|
], 6));
|
|
2566
2566
|
}
|
|
2567
|
-
}), Q2 = { class: "relative w-full h-full overflow-hidden bg-primary" }, a4 = /* @__PURE__ */
|
|
2567
|
+
}), Q2 = { class: "relative w-full h-full overflow-hidden bg-primary" }, a4 = /* @__PURE__ */ $({
|
|
2568
2568
|
__name: "HorizontalLayout",
|
|
2569
2569
|
props: {
|
|
2570
2570
|
asideLeftBgColorClass: { default: "" },
|
|
@@ -2580,14 +2580,14 @@ const j2 = () => {
|
|
|
2580
2580
|
},
|
|
2581
2581
|
emits: ["aside-left-resize", "aside-left-resize-end", "aside-left-resize-start", "aside-left-transition-end", "aside-right-resize", "aside-right-resize-end", "aside-right-resize-start", "aside-right-transition-end"],
|
|
2582
2582
|
setup(n, { emit: t }) {
|
|
2583
|
-
const e = n, l = t, s =
|
|
2583
|
+
const e = n, l = t, s = L(!1), a = L(e.asideLeftWidth), r = L(e.asideRightWidth), f = L(e.asideLeftWidth), C = L(e.asideRightWidth), m = O(() => ({
|
|
2584
2584
|
paddingLeft: `${f.value}px`,
|
|
2585
2585
|
paddingRight: `${C.value}px`
|
|
2586
2586
|
})), d = () => {
|
|
2587
2587
|
s.value = !1, l("aside-left-resize-end");
|
|
2588
2588
|
}, h = () => {
|
|
2589
2589
|
s.value = !0, l("aside-left-resize-start");
|
|
2590
|
-
},
|
|
2590
|
+
}, b = (y) => {
|
|
2591
2591
|
a.value = f.value = y, l("aside-left-resize", y);
|
|
2592
2592
|
}, c = (y) => !y && l("aside-left-transition-end"), H = () => {
|
|
2593
2593
|
s.value = !1, l("aside-right-resize-end");
|
|
@@ -2596,46 +2596,46 @@ const j2 = () => {
|
|
|
2596
2596
|
}, g = (y) => {
|
|
2597
2597
|
r.value = C.value = y, l("aside-right-resize", y);
|
|
2598
2598
|
}, T = (y) => !y && l("aside-right-transition-end");
|
|
2599
|
-
|
|
2599
|
+
i1(
|
|
2600
2600
|
() => e.asideLeftVisible,
|
|
2601
2601
|
(y) => f.value = y ? a.value : 0
|
|
2602
|
-
),
|
|
2602
|
+
), i1(
|
|
2603
2603
|
() => e.asideRightVisible,
|
|
2604
2604
|
(y) => C.value = y ? r.value : 0
|
|
2605
|
-
),
|
|
2605
|
+
), i1(
|
|
2606
2606
|
() => e.asideLeftWidth,
|
|
2607
2607
|
(y) => a.value = f.value = y
|
|
2608
|
-
),
|
|
2608
|
+
), i1(
|
|
2609
2609
|
() => e.asideRightWidth,
|
|
2610
2610
|
(y) => r.value = C.value = y
|
|
2611
2611
|
);
|
|
2612
|
-
const
|
|
2613
|
-
return
|
|
2614
|
-
f.value = e.asideLeftVisible &&
|
|
2615
|
-
}), (y,
|
|
2616
|
-
p(
|
|
2612
|
+
const z = R1();
|
|
2613
|
+
return a1(() => {
|
|
2614
|
+
f.value = e.asideLeftVisible && z["aside-left"] ? a.value : 0, C.value = e.asideRightVisible && z["aside-right"] ? r.value : 0;
|
|
2615
|
+
}), (y, B) => (o(), i("div", Q2, [
|
|
2616
|
+
p(z)["aside-left"] && y.asideLeftVisible ? (o(), V($e, {
|
|
2617
2617
|
key: 0,
|
|
2618
2618
|
side: "left",
|
|
2619
2619
|
border: e.borders,
|
|
2620
2620
|
draggable: y.asideLeftDraggable,
|
|
2621
2621
|
width: a.value,
|
|
2622
2622
|
onResizeStart: h,
|
|
2623
|
-
onResize:
|
|
2623
|
+
onResize: b,
|
|
2624
2624
|
onResizeEnd: d,
|
|
2625
2625
|
onTransitioning: c
|
|
2626
2626
|
}, {
|
|
2627
2627
|
default: Z(() => [
|
|
2628
|
-
|
|
2628
|
+
R(y.$slots, "aside-left")
|
|
2629
2629
|
]),
|
|
2630
2630
|
_: 3
|
|
2631
2631
|
}, 8, ["border", "draggable", "width"])) : k("", !0),
|
|
2632
2632
|
u("main", {
|
|
2633
|
-
class:
|
|
2633
|
+
class: D(["relative z-0 h-full overflow-x-hidden overflow-y-auto", [e.mainBgColorClass]]),
|
|
2634
2634
|
style: t1(m.value)
|
|
2635
2635
|
}, [
|
|
2636
|
-
|
|
2636
|
+
R(y.$slots, "main")
|
|
2637
2637
|
], 6),
|
|
2638
|
-
p(
|
|
2638
|
+
p(z)["aside-right"] && y.asideRightVisible ? (o(), V($e, {
|
|
2639
2639
|
key: 1,
|
|
2640
2640
|
side: "right",
|
|
2641
2641
|
border: e.borders,
|
|
@@ -2647,13 +2647,13 @@ const j2 = () => {
|
|
|
2647
2647
|
onTransitioning: T
|
|
2648
2648
|
}, {
|
|
2649
2649
|
default: Z(() => [
|
|
2650
|
-
|
|
2650
|
+
R(y.$slots, "aside-right")
|
|
2651
2651
|
]),
|
|
2652
2652
|
_: 3
|
|
2653
2653
|
}, 8, ["border", "draggable", "width"])) : k("", !0)
|
|
2654
2654
|
]));
|
|
2655
2655
|
}
|
|
2656
|
-
}), r4 = /* @__PURE__ */
|
|
2656
|
+
}), r4 = /* @__PURE__ */ $({
|
|
2657
2657
|
__name: "InlineFormWrapper",
|
|
2658
2658
|
props: {
|
|
2659
2659
|
order: {},
|
|
@@ -2679,7 +2679,7 @@ const j2 = () => {
|
|
|
2679
2679
|
class: "border border-default bg-primary rounded-lg focus:outline-none focus-within:shadow-sm focus-within:border-action"
|
|
2680
2680
|
}, {
|
|
2681
2681
|
default: Z(() => [
|
|
2682
|
-
|
|
2682
|
+
R(l.$slots, "default"),
|
|
2683
2683
|
w(p(e1), {
|
|
2684
2684
|
tag: "footer",
|
|
2685
2685
|
justify: "between",
|
|
@@ -2688,7 +2688,7 @@ const j2 = () => {
|
|
|
2688
2688
|
default: Z(() => [
|
|
2689
2689
|
w(p(e1), null, {
|
|
2690
2690
|
default: Z(() => [
|
|
2691
|
-
|
|
2691
|
+
R(l.$slots, "footer-left")
|
|
2692
2692
|
]),
|
|
2693
2693
|
_: 3
|
|
2694
2694
|
}),
|
|
@@ -2717,7 +2717,7 @@ const j2 = () => {
|
|
|
2717
2717
|
}), q2 = ["autofocus", "disabled", "value", "placeholder"], X2 = ["auto-focus", "disabled", "type", "value", "placeholder", "onKeydown"], G2 = {
|
|
2718
2718
|
key: 3,
|
|
2719
2719
|
class: "flex-none px-1"
|
|
2720
|
-
}, z1 = /* @__PURE__ */
|
|
2720
|
+
}, z1 = /* @__PURE__ */ $({
|
|
2721
2721
|
__name: "Input",
|
|
2722
2722
|
props: {
|
|
2723
2723
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -2733,8 +2733,8 @@ const j2 = () => {
|
|
|
2733
2733
|
},
|
|
2734
2734
|
emits: ["change", "enter"],
|
|
2735
2735
|
setup(n, { expose: t, emit: e }) {
|
|
2736
|
-
const l = e, s =
|
|
2737
|
-
|
|
2736
|
+
const l = e, s = L(), a = L();
|
|
2737
|
+
a1(() => {
|
|
2738
2738
|
var d, h;
|
|
2739
2739
|
n.multiline ? (d = s.value) == null || d.focus() : (h = a.value) == null || h.focus();
|
|
2740
2740
|
});
|
|
@@ -2748,7 +2748,7 @@ const j2 = () => {
|
|
|
2748
2748
|
d.stopImmediatePropagation(), d.stopPropagation(), d.preventDefault();
|
|
2749
2749
|
};
|
|
2750
2750
|
return t({ focus: r }), (d, h) => (o(), i("div", {
|
|
2751
|
-
class:
|
|
2751
|
+
class: D(["relative flex-1 w-full overflow-hidden inline-flex items-center text-sm rounded-lg border focus:shadow-sm-inner focus:outline-hidden focus-within:border-action", {
|
|
2752
2752
|
"bg-primary border-default text-primary": d.variant === "border" && !d.disabled,
|
|
2753
2753
|
"bg-secondary border-weak text-secondary": d.variant === "border" && d.disabled,
|
|
2754
2754
|
"bg-tertiary border-transparent text-primary": d.variant === "fill" && !d.disabled,
|
|
@@ -2765,7 +2765,7 @@ const j2 = () => {
|
|
|
2765
2765
|
}, [
|
|
2766
2766
|
d.icon ? (o(), i("div", {
|
|
2767
2767
|
key: 0,
|
|
2768
|
-
class:
|
|
2768
|
+
class: D(["flex-none h-full flex rounded-lg bg-transparent cursor-pointer", {
|
|
2769
2769
|
"items-start py-2": d.multiline,
|
|
2770
2770
|
"items-center": !d.multiline,
|
|
2771
2771
|
"px-2": d.size === "default",
|
|
@@ -2785,7 +2785,7 @@ const j2 = () => {
|
|
|
2785
2785
|
disabled: d.disabled,
|
|
2786
2786
|
value: d.value,
|
|
2787
2787
|
placeholder: d.placeholder,
|
|
2788
|
-
class:
|
|
2788
|
+
class: D(["flex-1 py-2 w-full bg-transparent focus:outline-hidden", {
|
|
2789
2789
|
"text-xs": d.size === "small",
|
|
2790
2790
|
"text-sm": d.size === "default"
|
|
2791
2791
|
}]),
|
|
@@ -2799,7 +2799,7 @@ const j2 = () => {
|
|
|
2799
2799
|
type: d.inputType,
|
|
2800
2800
|
value: d.value,
|
|
2801
2801
|
placeholder: d.placeholder,
|
|
2802
|
-
class:
|
|
2802
|
+
class: D(["flex-1 min-w-0 bg-transparent focus:outline-hidden", {
|
|
2803
2803
|
"text-xs": d.size === "small",
|
|
2804
2804
|
"text-sm": d.size === "default"
|
|
2805
2805
|
}]),
|
|
@@ -2812,21 +2812,21 @@ const j2 = () => {
|
|
|
2812
2812
|
onInput: x(f, ["stop", "prevent"])
|
|
2813
2813
|
}, null, 42, X2)),
|
|
2814
2814
|
d.$slots["inline-controls"] ? (o(), i("section", G2, [
|
|
2815
|
-
|
|
2815
|
+
R(d.$slots, "inline-controls")
|
|
2816
2816
|
])) : k("", !0),
|
|
2817
|
-
d.clearable && d.value.length ? (o(), V(p(
|
|
2817
|
+
d.clearable && d.value.length ? (o(), V(p(j), {
|
|
2818
2818
|
key: 4,
|
|
2819
2819
|
small: "",
|
|
2820
2820
|
icon: "close",
|
|
2821
2821
|
variant: "textSubtle",
|
|
2822
2822
|
class: "flex-none hidden",
|
|
2823
|
-
onClick: h[2] || (h[2] = (
|
|
2823
|
+
onClick: h[2] || (h[2] = (b) => {
|
|
2824
2824
|
r(), l("change", "");
|
|
2825
2825
|
})
|
|
2826
2826
|
})) : k("", !0)
|
|
2827
2827
|
], 2));
|
|
2828
2828
|
}
|
|
2829
|
-
}), De = /* @__PURE__ */
|
|
2829
|
+
}), De = /* @__PURE__ */ $({
|
|
2830
2830
|
__name: "StepButton",
|
|
2831
2831
|
props: {
|
|
2832
2832
|
direction: {},
|
|
@@ -2834,9 +2834,9 @@ const j2 = () => {
|
|
|
2834
2834
|
},
|
|
2835
2835
|
emits: ["click"],
|
|
2836
2836
|
setup(n, { expose: t, emit: e }) {
|
|
2837
|
-
const l = e, s =
|
|
2837
|
+
const l = e, s = L(!1);
|
|
2838
2838
|
return t({ setActive: (a) => s.value = a }), (a, r) => (o(), i("button", {
|
|
2839
|
-
class:
|
|
2839
|
+
class: D(["flex items-center justify-center border border-default text-tertiary focus:outline-hidden hover:z-10 hover:bg-secondary hover:border-strong hover:text-secondary focus:bg-secondary focus:border-strong focus:text-secondary focus:outline-none active:bg-tertiary active:text-tertiary", {
|
|
2840
2840
|
"h-4 rounded-tr-lg": a.direction === "up" && a.size === "default",
|
|
2841
2841
|
"h-[calc(--spacing(4)+1px)] rounded-br-lg": a.direction === "down" && a.size === "default",
|
|
2842
2842
|
"h-3 rounded-tr-lg": a.direction === "up" && a.size === "small",
|
|
@@ -2850,7 +2850,7 @@ const j2 = () => {
|
|
|
2850
2850
|
}, null, 8, ["name"])
|
|
2851
2851
|
], 2));
|
|
2852
2852
|
}
|
|
2853
|
-
}), J2 = ["min", "max", "auto-focus", "disabled", "value", "placeholder", "onKeydown"], i4 = /* @__PURE__ */
|
|
2853
|
+
}), J2 = ["min", "max", "auto-focus", "disabled", "value", "placeholder", "onKeydown"], i4 = /* @__PURE__ */ $({
|
|
2854
2854
|
__name: "InputNumber",
|
|
2855
2855
|
props: {
|
|
2856
2856
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -2867,7 +2867,7 @@ const j2 = () => {
|
|
|
2867
2867
|
},
|
|
2868
2868
|
emits: ["change", "enter"],
|
|
2869
2869
|
setup(n, { expose: t, emit: e }) {
|
|
2870
|
-
const l = e, s =
|
|
2870
|
+
const l = e, s = L(), a = L(), r = L(), f = () => {
|
|
2871
2871
|
s.value.focus();
|
|
2872
2872
|
}, C = (c) => {
|
|
2873
2873
|
c.target && l("change", Number.parseInt(c.target.value));
|
|
@@ -2878,11 +2878,11 @@ const j2 = () => {
|
|
|
2878
2878
|
c === 1 ? (v = a.value) == null || v.setActive(H) : (g = r.value) == null || g.setActive(H);
|
|
2879
2879
|
}, h = (c) => {
|
|
2880
2880
|
l("change", P1(n.value + c, n.min ?? null, n.max ?? null));
|
|
2881
|
-
},
|
|
2881
|
+
}, b = (c) => {
|
|
2882
2882
|
c.stopImmediatePropagation(), c.stopPropagation(), c.preventDefault();
|
|
2883
2883
|
};
|
|
2884
2884
|
return t({ focus: f }), (c, H) => (o(), i("div", {
|
|
2885
|
-
class:
|
|
2885
|
+
class: D(["relative flex-1 w-full overflow-hidden overscroll-none inline-flex items-center pr-0 rounded-lg border focus:shadow-sm-inner focus:outline-hidden focus-within:border-action", {
|
|
2886
2886
|
"bg-primary border-default text-primary": c.variant === "border" && !c.disabled,
|
|
2887
2887
|
"bg-secondary border-weak text-secondary": c.variant === "border" && c.disabled,
|
|
2888
2888
|
"bg-tertiary border-transparent text-primary": c.variant === "fill" && !c.disabled,
|
|
@@ -2896,7 +2896,7 @@ const j2 = () => {
|
|
|
2896
2896
|
}, [
|
|
2897
2897
|
c.icon ? (o(), i("div", {
|
|
2898
2898
|
key: 0,
|
|
2899
|
-
class:
|
|
2899
|
+
class: D(["flex-none flex rounded-lg bg-transparent cursor-pointer", {
|
|
2900
2900
|
"px-2": c.size === "default",
|
|
2901
2901
|
"px-1.5": c.size === "small"
|
|
2902
2902
|
}])
|
|
@@ -2916,7 +2916,7 @@ const j2 = () => {
|
|
|
2916
2916
|
disabled: c.disabled,
|
|
2917
2917
|
value: c.value,
|
|
2918
2918
|
placeholder: c.placeholder,
|
|
2919
|
-
class:
|
|
2919
|
+
class: D(["flex-1 min-w-0 bg-transparent focus:outline-hidden", {
|
|
2920
2920
|
"text-xs": c.size === "small",
|
|
2921
2921
|
"text-sm": c.size === "default"
|
|
2922
2922
|
}]),
|
|
@@ -2933,12 +2933,12 @@ const j2 = () => {
|
|
|
2933
2933
|
H[3] || (H[3] = _((v) => d(1, !1), ["up"])),
|
|
2934
2934
|
H[5] || (H[5] = _((v) => d(-1, !1), ["down"]))
|
|
2935
2935
|
],
|
|
2936
|
-
onBlur:
|
|
2936
|
+
onBlur: b,
|
|
2937
2937
|
onInput: x(C, ["stop", "prevent"])
|
|
2938
2938
|
}, null, 42, J2),
|
|
2939
2939
|
c.showSteppers ? (o(), i("section", {
|
|
2940
2940
|
key: 1,
|
|
2941
|
-
class:
|
|
2941
|
+
class: D(["top-0 flex flex-col h-full -space-y-px -mt-[2px] -mr-px", {
|
|
2942
2942
|
"w-8": c.size === "default",
|
|
2943
2943
|
"w-6": c.size === "small"
|
|
2944
2944
|
}])
|
|
@@ -2984,7 +2984,7 @@ function tn(n, t) {
|
|
|
2984
2984
|
const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
2985
2985
|
key: 0,
|
|
2986
2986
|
class: "flex items-center justify-between h-12 w-full mb-4"
|
|
2987
|
-
}, nn = { class: "flex items-center h-full" }, on = /* @__PURE__ */
|
|
2987
|
+
}, nn = { class: "flex items-center h-full" }, on = /* @__PURE__ */ $({
|
|
2988
2988
|
__name: "Modal",
|
|
2989
2989
|
props: {
|
|
2990
2990
|
closeable: { type: Boolean, default: !0 },
|
|
@@ -2997,8 +2997,8 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
2997
2997
|
},
|
|
2998
2998
|
emits: ["close", "ready"],
|
|
2999
2999
|
setup(n, { expose: t, emit: e }) {
|
|
3000
|
-
const l = n, s = e, a = R1(), r =
|
|
3001
|
-
|
|
3000
|
+
const l = n, s = e, a = R1(), r = L(), f = L(!1);
|
|
3001
|
+
a1(() => {
|
|
3002
3002
|
a.default && (l.title || a.header || a.main || a.footer) && console.warn(
|
|
3003
3003
|
"You are using named slots (or props.title) and default slot at the same time. This is not supported. Please use either named slots (and props.title) or the default slot."
|
|
3004
3004
|
), f.value = !0;
|
|
@@ -3010,20 +3010,20 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3010
3010
|
const d = () => {
|
|
3011
3011
|
s("ready");
|
|
3012
3012
|
};
|
|
3013
|
-
return t({ close: C }), (h,
|
|
3013
|
+
return t({ close: C }), (h, b) => (o(), V(x1, { to: h.target }, [
|
|
3014
3014
|
w(p(ve), {
|
|
3015
3015
|
show: f.value,
|
|
3016
3016
|
type: h.overlayType,
|
|
3017
3017
|
onClick: m,
|
|
3018
|
-
onClose:
|
|
3018
|
+
onClose: b[0] || (b[0] = (c) => s("close"))
|
|
3019
3019
|
}, {
|
|
3020
3020
|
default: Z(() => [
|
|
3021
|
-
w(p(
|
|
3021
|
+
w(p(ot), { onTransitionAfterEnter: d }, {
|
|
3022
3022
|
default: Z(() => [
|
|
3023
3023
|
U1(w(p(he), {
|
|
3024
3024
|
ref_key: "windowRef",
|
|
3025
3025
|
ref: r,
|
|
3026
|
-
class:
|
|
3026
|
+
class: D(["h-full", [
|
|
3027
3027
|
l.widthClass,
|
|
3028
3028
|
{
|
|
3029
3029
|
"px-8 py-6": !p(a).default,
|
|
@@ -3032,9 +3032,9 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3032
3032
|
]])
|
|
3033
3033
|
}, {
|
|
3034
3034
|
default: Z(() => [
|
|
3035
|
-
h.$slots.default ?
|
|
3035
|
+
h.$slots.default ? R(h.$slots, "default", { key: 0 }) : (o(), V(p(me), { key: 1 }, Ae({
|
|
3036
3036
|
main: Z(() => [
|
|
3037
|
-
|
|
3037
|
+
R(h.$slots, "main", { close: C })
|
|
3038
3038
|
]),
|
|
3039
3039
|
_: 2
|
|
3040
3040
|
}, [
|
|
@@ -3043,14 +3043,14 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3043
3043
|
fn: Z(() => [
|
|
3044
3044
|
l.title ? (o(), i("header", ln, [
|
|
3045
3045
|
u("h4", null, X(l.title), 1),
|
|
3046
|
-
h.closeable ? (o(), V(p(
|
|
3046
|
+
h.closeable ? (o(), V(p(j), {
|
|
3047
3047
|
key: 0,
|
|
3048
3048
|
icon: "close",
|
|
3049
3049
|
variant: "textSubtle",
|
|
3050
3050
|
onClick: m
|
|
3051
3051
|
})) : k("", !0)
|
|
3052
3052
|
])) : k("", !0),
|
|
3053
|
-
|
|
3053
|
+
R(h.$slots, "header", { close: C })
|
|
3054
3054
|
]),
|
|
3055
3055
|
key: "0"
|
|
3056
3056
|
} : void 0,
|
|
@@ -3058,7 +3058,7 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3058
3058
|
name: "footer",
|
|
3059
3059
|
fn: Z(() => [
|
|
3060
3060
|
u("footer", nn, [
|
|
3061
|
-
|
|
3061
|
+
R(h.$slots, "footer", { close: C })
|
|
3062
3062
|
])
|
|
3063
3063
|
]),
|
|
3064
3064
|
key: "1"
|
|
@@ -3077,7 +3077,7 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3077
3077
|
}, 8, ["show", "type"])
|
|
3078
3078
|
], 8, ["to"]));
|
|
3079
3079
|
}
|
|
3080
|
-
}), sn = { class: "text-sm tracking-wide" }, an = { class: "text-sm tracking-wide" }, d4 = /* @__PURE__ */
|
|
3080
|
+
}), sn = { class: "text-sm tracking-wide" }, an = { class: "text-sm tracking-wide" }, d4 = /* @__PURE__ */ $({
|
|
3081
3081
|
__name: "NavItem",
|
|
3082
3082
|
props: {
|
|
3083
3083
|
exact: { type: Boolean, default: !1 },
|
|
@@ -3097,7 +3097,7 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3097
3097
|
onClick: s[0] || (s[0] = (a) => e("navigate", l.href))
|
|
3098
3098
|
}, [
|
|
3099
3099
|
u("div", {
|
|
3100
|
-
class:
|
|
3100
|
+
class: D(["h-full flex items-center space-x-2 px-4 rounded-lg group-hover:opacity-100", {
|
|
3101
3101
|
"bg-secondary text-primary opacity-100": l.isActive || l.isExactActive,
|
|
3102
3102
|
"bg-primary text-secondary opacity-50 hover:bg-secondary": !(l.isActive || l.isExactActive)
|
|
3103
3103
|
}])
|
|
@@ -3107,7 +3107,7 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3107
3107
|
name: l.icon
|
|
3108
3108
|
}, null, 8, ["name"])) : k("", !0),
|
|
3109
3109
|
u("span", sn, [
|
|
3110
|
-
|
|
3110
|
+
R(l.$slots, "default")
|
|
3111
3111
|
])
|
|
3112
3112
|
], 2)
|
|
3113
3113
|
])) : (o(), i("a", {
|
|
@@ -3116,7 +3116,7 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3116
3116
|
onClick: s[1] || (s[1] = (a) => e("navigate", l.href))
|
|
3117
3117
|
}, [
|
|
3118
3118
|
u("div", {
|
|
3119
|
-
class:
|
|
3119
|
+
class: D(["h-10 flex items-center space-x-2 px-4 rounded-lg group-hover:opacity-100", {
|
|
3120
3120
|
"bg-action text-white font-medium opacity-100": l.isActive || l.isExactActive,
|
|
3121
3121
|
"bg-primary text-secondary opacity-50 hover:bg-secondary active:bg-tertiary": !(l.isActive || l.isExactActive)
|
|
3122
3122
|
}])
|
|
@@ -3126,7 +3126,7 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3126
3126
|
name: l.icon
|
|
3127
3127
|
}, null, 8, ["name"])) : k("", !0),
|
|
3128
3128
|
u("span", an, [
|
|
3129
|
-
|
|
3129
|
+
R(l.$slots, "default")
|
|
3130
3130
|
])
|
|
3131
3131
|
], 2)
|
|
3132
3132
|
]));
|
|
@@ -3134,7 +3134,7 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3134
3134
|
}), rn = {
|
|
3135
3135
|
"data-theme": "dark",
|
|
3136
3136
|
class: "inline-flex items-stretch h-10 px-1 rounded-xl bg-black shadow-xl pointer-events-auto justify-between"
|
|
3137
|
-
}, dn = { class: "text-sm cursor-default truncate min-w-0" }, u4 = /* @__PURE__ */
|
|
3137
|
+
}, dn = { class: "text-sm cursor-default truncate min-w-0" }, u4 = /* @__PURE__ */ $({
|
|
3138
3138
|
__name: "Notification",
|
|
3139
3139
|
props: {
|
|
3140
3140
|
showDetailsButton: { type: Boolean },
|
|
@@ -3146,7 +3146,7 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3146
3146
|
const e = t, l = O(() => n.type === "default" ? "information" : n.type === "error" ? "error" : n.type === "warning" ? "warning" : "check-circled");
|
|
3147
3147
|
return (s, a) => (o(), i("div", rn, [
|
|
3148
3148
|
w(p(e1), {
|
|
3149
|
-
class:
|
|
3149
|
+
class: D(["gap-2 px-3 rounded-l-lg flex-1 overflow-hidden", {
|
|
3150
3150
|
"text-stone-300": s.type === "default",
|
|
3151
3151
|
"text-amber-300": s.type === "warning",
|
|
3152
3152
|
"text-red-300": s.type === "error",
|
|
@@ -3163,7 +3163,7 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3163
3163
|
default: Z(() => [
|
|
3164
3164
|
w(p(e1), { class: "px-2" }, {
|
|
3165
3165
|
default: Z(() => [
|
|
3166
|
-
s.showDetailsButton ? (o(), V(p(
|
|
3166
|
+
s.showDetailsButton ? (o(), V(p(j), {
|
|
3167
3167
|
key: 0,
|
|
3168
3168
|
small: "",
|
|
3169
3169
|
variant: "outline",
|
|
@@ -3175,7 +3175,7 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3175
3175
|
}),
|
|
3176
3176
|
w(p(e1), { class: "px-1" }, {
|
|
3177
3177
|
default: Z(() => [
|
|
3178
|
-
w(p(
|
|
3178
|
+
w(p(j), {
|
|
3179
3179
|
small: "",
|
|
3180
3180
|
variant: "textSubtle",
|
|
3181
3181
|
icon: "close",
|
|
@@ -3189,7 +3189,7 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3189
3189
|
})
|
|
3190
3190
|
]));
|
|
3191
3191
|
}
|
|
3192
|
-
}), p4 = /* @__PURE__ */
|
|
3192
|
+
}), p4 = /* @__PURE__ */ $({
|
|
3193
3193
|
__name: "Pagination",
|
|
3194
3194
|
props: {
|
|
3195
3195
|
borders: { type: Boolean, default: !1 },
|
|
@@ -3199,25 +3199,25 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3199
3199
|
},
|
|
3200
3200
|
emits: ["change"],
|
|
3201
3201
|
setup(n, { emit: t }) {
|
|
3202
|
-
const e = t, l =
|
|
3203
|
-
let
|
|
3204
|
-
|
|
3202
|
+
const e = t, l = L(), s = O(() => a5(0, n.lastPage).map((h) => ({ label: `${h + 1}` }))), a = O(() => n.borders ? { borderRadius: "8px 0 0 8px" } : void 0), r = O(() => n.borders ? { borderRadius: "0px 8px 8px 0px" } : void 0), f = O(() => n.borders ? { borderRadius: "0" } : void 0), C = O(() => n.borders ? "outlineSubtle" : "textSubtle"), m = (h) => {
|
|
3203
|
+
let b = n.currentPage + h;
|
|
3204
|
+
b > n.lastPage && (b = 1), b < 1 && (b = n.lastPage), e("change", b);
|
|
3205
3205
|
}, d = (h) => {
|
|
3206
3206
|
e("change", h.label);
|
|
3207
3207
|
};
|
|
3208
|
-
return (h,
|
|
3208
|
+
return (h, b) => (o(), i("nav", {
|
|
3209
3209
|
ref_key: "navRef",
|
|
3210
3210
|
ref: l,
|
|
3211
3211
|
class: "relative z-0 inline-flex"
|
|
3212
3212
|
}, [
|
|
3213
|
-
w(p(
|
|
3213
|
+
w(p(j), {
|
|
3214
3214
|
variant: C.value,
|
|
3215
3215
|
icon: h.orientation === "horizontal" ? "chevron-left" : "chevron-up",
|
|
3216
3216
|
style: t1(a.value),
|
|
3217
3217
|
class: "z-0 hover:z-10 focus:z-10 active:z-10",
|
|
3218
|
-
onClick:
|
|
3218
|
+
onClick: b[0] || (b[0] = (c) => m(-1))
|
|
3219
3219
|
}, null, 8, ["variant", "icon", "style"]),
|
|
3220
|
-
w(p(
|
|
3220
|
+
w(p(at), {
|
|
3221
3221
|
"same-width-as-element": l.value,
|
|
3222
3222
|
placement: "bottom",
|
|
3223
3223
|
value: h.currentPage,
|
|
@@ -3225,7 +3225,7 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3225
3225
|
onSelect: d
|
|
3226
3226
|
}, {
|
|
3227
3227
|
trigger: Z((c) => [
|
|
3228
|
-
w(p(
|
|
3228
|
+
w(p(j), {
|
|
3229
3229
|
variant: C.value,
|
|
3230
3230
|
label: `${h.currentPage} / ${h.lastPage}`,
|
|
3231
3231
|
style: t1(f.value),
|
|
@@ -3235,16 +3235,16 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3235
3235
|
]),
|
|
3236
3236
|
_: 1
|
|
3237
3237
|
}, 8, ["same-width-as-element", "value", "options"]),
|
|
3238
|
-
w(p(
|
|
3238
|
+
w(p(j), {
|
|
3239
3239
|
variant: C.value,
|
|
3240
3240
|
icon: h.orientation === "horizontal" ? "chevron-right" : "chevron-down",
|
|
3241
3241
|
style: t1(r.value),
|
|
3242
3242
|
class: "z-0 hover:z-10 focus:z-10 active:z-10 -ml-px",
|
|
3243
|
-
onClick:
|
|
3243
|
+
onClick: b[1] || (b[1] = (c) => m(1))
|
|
3244
3244
|
}, null, 8, ["variant", "icon", "style"])
|
|
3245
3245
|
], 512));
|
|
3246
3246
|
}
|
|
3247
|
-
}), un = ["aria-label"], Be = /* @__PURE__ */
|
|
3247
|
+
}), un = ["aria-label"], Be = /* @__PURE__ */ $({
|
|
3248
3248
|
__name: "ResizablePanel",
|
|
3249
3249
|
props: {
|
|
3250
3250
|
size: { default: 256 },
|
|
@@ -3256,7 +3256,7 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3256
3256
|
},
|
|
3257
3257
|
emits: ["resize-start", "resize", "resize-end"],
|
|
3258
3258
|
setup(n, { emit: t }) {
|
|
3259
|
-
const e = n, l = t, s = O(() => ["left", "right"].includes(e.placement) ? "horizontal" : "vertical"), a =
|
|
3259
|
+
const e = n, l = t, s = O(() => ["left", "right"].includes(e.placement) ? "horizontal" : "vertical"), a = L(), r = O(() => {
|
|
3260
3260
|
let v, g;
|
|
3261
3261
|
return s.value === "horizontal" ? (v = e.placement === "left" ? "left-0" : "right-0", v += " top-0 h-full overflow-x-hidden", g = e.border ? e.placement === "left" ? "border-r border-default" : "border-l border-default" : "") : (v = e.placement === "top" ? "top-0" : "bottom-0", v += " left-0 w-full overflow-y-hidden", g = e.border ? e.placement === "top" ? "border-b border-default" : "border-t border-default" : ""), [
|
|
3262
3262
|
v,
|
|
@@ -3267,26 +3267,26 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3267
3267
|
return s.value === "horizontal" ? (v.push(e.placement === "left" ? "right-0 border-r" : "left-0 border-l"), v.push("top-0 h-full w-1 cursor-ew-resize")) : (v.push(e.placement === "top" ? "bottom-0 border-b" : "top-0 border-t"), v.push("left-0 w-full h-1 cursor-ns-resize")), v;
|
|
3268
3268
|
});
|
|
3269
3269
|
let C, m;
|
|
3270
|
-
const d =
|
|
3270
|
+
const d = L(!1);
|
|
3271
3271
|
function h(v) {
|
|
3272
3272
|
const g = e.placement === "left" || e.placement === "right" ? "pageX" : "pageY";
|
|
3273
|
-
C = v[g], m = e.size, d.value = !0, window.addEventListener("mouseup", c), window.addEventListener("mousemove",
|
|
3273
|
+
C = v[g], m = e.size, d.value = !0, window.addEventListener("mouseup", c), window.addEventListener("mousemove", b), l("resize-start");
|
|
3274
3274
|
}
|
|
3275
|
-
function
|
|
3275
|
+
function b(v) {
|
|
3276
3276
|
let g;
|
|
3277
3277
|
s.value === "vertical" ? g = e.placement === "top" ? v.pageY - C : C - v.pageY : g = e.placement === "left" ? v.pageX - C : C - v.pageX;
|
|
3278
|
-
const T = m + g,
|
|
3279
|
-
|
|
3278
|
+
const T = m + g, z = P1(T, e.minSize, e.maxSize);
|
|
3279
|
+
z !== e.size && l("resize", z);
|
|
3280
3280
|
}
|
|
3281
3281
|
function c() {
|
|
3282
|
-
d.value = !1, window.removeEventListener("mouseup", c), window.removeEventListener("mousemove",
|
|
3282
|
+
d.value = !1, window.removeEventListener("mouseup", c), window.removeEventListener("mousemove", b), l("resize-end");
|
|
3283
3283
|
}
|
|
3284
3284
|
function H(v) {
|
|
3285
3285
|
let T = e.size;
|
|
3286
3286
|
if (e.placement === "left" ? v.key === "ArrowLeft" ? T = e.size - 30 : v.key === "ArrowRight" && (T = e.size + 30) : e.placement === "right" ? v.key === "ArrowLeft" ? T = e.size + 30 : v.key === "ArrowRight" && (T = e.size - 30) : e.placement === "top" ? v.key === "ArrowUp" ? T = e.size - 30 : v.key === "ArrowDown" && (T = e.size + 30) : e.placement === "bottom" && (v.key === "ArrowUp" ? T = e.size + 30 : v.key === "ArrowDown" && (T = e.size - 30)), T !== e.size) {
|
|
3287
3287
|
v.preventDefault();
|
|
3288
|
-
const
|
|
3289
|
-
|
|
3288
|
+
const z = P1(T, e.minSize, e.maxSize);
|
|
3289
|
+
z !== e.size && l("resize", z);
|
|
3290
3290
|
}
|
|
3291
3291
|
}
|
|
3292
3292
|
return (v, g) => (o(), i("aside", {
|
|
@@ -3296,14 +3296,14 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3296
3296
|
[s.value === "horizontal" ? "width" : "height"]: `${v.size}px`,
|
|
3297
3297
|
transitionProperty: d.value ? "none" : `transform, ${["left", "right"].includes(v.placement) ? "width" : "height"}`
|
|
3298
3298
|
}),
|
|
3299
|
-
class:
|
|
3299
|
+
class: D(["absolute z-10 bg-primary", r.value])
|
|
3300
3300
|
}, [
|
|
3301
|
-
|
|
3301
|
+
R(v.$slots, "default"),
|
|
3302
3302
|
e.draggable ? (o(), i("button", {
|
|
3303
3303
|
key: 0,
|
|
3304
3304
|
tabindex: "0",
|
|
3305
3305
|
"aria-label": `Resize ${e.placement} panel`,
|
|
3306
|
-
class:
|
|
3306
|
+
class: D(["absolute z-10 hover:border-action", [
|
|
3307
3307
|
f.value,
|
|
3308
3308
|
d.value ? "border-action bg-action" : "border-transparent bg-transparent hover:bg-tertiary focus:outline-none focus:border-action focus:bg-tertiary"
|
|
3309
3309
|
]]),
|
|
@@ -3312,7 +3312,7 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3312
3312
|
}, null, 42, un)) : k("", !0)
|
|
3313
3313
|
], 6));
|
|
3314
3314
|
}
|
|
3315
|
-
}), pn = { class: "relative w-full h-full overflow-hidden bg-primary" }, f4 = /* @__PURE__ */
|
|
3315
|
+
}), pn = { class: "relative w-full h-full overflow-hidden bg-primary" }, f4 = /* @__PURE__ */ $({
|
|
3316
3316
|
__name: "PanelLayout",
|
|
3317
3317
|
props: {
|
|
3318
3318
|
borders: { type: Boolean, default: !1 },
|
|
@@ -3328,14 +3328,14 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3328
3328
|
},
|
|
3329
3329
|
emits: ["start-panel-resize", "start-panel-resize-end", "start-panel-resize-start", "start-panel-transition-end", "end-panel-resize", "end-panel-resize-end", "end-panel-resize-start", "end-panel-transition-end"],
|
|
3330
3330
|
setup(n, { emit: t }) {
|
|
3331
|
-
const e = n, l = t, s =
|
|
3331
|
+
const e = n, l = t, s = L(!1), a = L(e.startPanelSize), r = L(e.endPanelSize), f = L(e.startPanelSize), C = L(e.endPanelSize), m = O(() => ({
|
|
3332
3332
|
[e.orientation === "horizontal" ? "paddingLeft" : "paddingTop"]: `${f.value}px`,
|
|
3333
3333
|
[e.orientation === "horizontal" ? "paddingRight" : "paddingBottom"]: `${C.value}px`
|
|
3334
3334
|
})), d = () => {
|
|
3335
3335
|
s.value = !1, l("start-panel-resize-end");
|
|
3336
3336
|
}, h = () => {
|
|
3337
3337
|
s.value = !0, l("start-panel-resize-start");
|
|
3338
|
-
},
|
|
3338
|
+
}, b = (y) => {
|
|
3339
3339
|
a.value = f.value = y, l("start-panel-resize", y);
|
|
3340
3340
|
}, c = (y) => !y && l("start-panel-transition-end"), H = () => {
|
|
3341
3341
|
s.value = !1, l("end-panel-resize-end");
|
|
@@ -3344,46 +3344,46 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3344
3344
|
}, g = (y) => {
|
|
3345
3345
|
r.value = C.value = y, l("end-panel-resize", y);
|
|
3346
3346
|
}, T = (y) => !y && l("end-panel-transition-end");
|
|
3347
|
-
|
|
3347
|
+
i1(
|
|
3348
3348
|
() => e.startPanelVisible,
|
|
3349
3349
|
(y) => f.value = y ? a.value : 0
|
|
3350
|
-
),
|
|
3350
|
+
), i1(
|
|
3351
3351
|
() => e.endPanelVisible,
|
|
3352
3352
|
(y) => C.value = y ? r.value : 0
|
|
3353
|
-
),
|
|
3353
|
+
), i1(
|
|
3354
3354
|
() => e.startPanelSize,
|
|
3355
3355
|
(y) => a.value = f.value = y
|
|
3356
|
-
),
|
|
3356
|
+
), i1(
|
|
3357
3357
|
() => e.endPanelSize,
|
|
3358
3358
|
(y) => r.value = C.value = y
|
|
3359
3359
|
);
|
|
3360
|
-
const
|
|
3361
|
-
return
|
|
3362
|
-
f.value = e.startPanelVisible &&
|
|
3363
|
-
}), (y,
|
|
3364
|
-
p(
|
|
3360
|
+
const z = R1();
|
|
3361
|
+
return a1(() => {
|
|
3362
|
+
f.value = e.startPanelVisible && z["start-panel"] ? a.value : 0, C.value = e.endPanelVisible && z["end-panel"] ? r.value : 0;
|
|
3363
|
+
}), (y, B) => (o(), i("div", pn, [
|
|
3364
|
+
p(z)["start-panel"] && y.startPanelVisible ? (o(), V(Be, {
|
|
3365
3365
|
key: 0,
|
|
3366
3366
|
placement: y.orientation === "horizontal" ? "left" : "top",
|
|
3367
3367
|
border: e.borders,
|
|
3368
3368
|
draggable: y.startPanelDraggable,
|
|
3369
3369
|
size: a.value,
|
|
3370
3370
|
onResizeStart: h,
|
|
3371
|
-
onResize:
|
|
3371
|
+
onResize: b,
|
|
3372
3372
|
onResizeEnd: d,
|
|
3373
3373
|
onTransitioning: c
|
|
3374
3374
|
}, {
|
|
3375
3375
|
default: Z(() => [
|
|
3376
|
-
|
|
3376
|
+
R(y.$slots, "start-panel")
|
|
3377
3377
|
]),
|
|
3378
3378
|
_: 3
|
|
3379
3379
|
}, 8, ["placement", "border", "draggable", "size"])) : k("", !0),
|
|
3380
3380
|
u("main", {
|
|
3381
|
-
class:
|
|
3381
|
+
class: D(["relative z-0 h-full overflow-hidden", [e.mainPanelBgColorClass]]),
|
|
3382
3382
|
style: t1(m.value)
|
|
3383
3383
|
}, [
|
|
3384
|
-
|
|
3384
|
+
R(y.$slots, "main")
|
|
3385
3385
|
], 6),
|
|
3386
|
-
p(
|
|
3386
|
+
p(z)["end-panel"] && y.endPanelVisible ? (o(), V(Be, {
|
|
3387
3387
|
key: 1,
|
|
3388
3388
|
placement: y.orientation === "horizontal" ? "right" : "bottom",
|
|
3389
3389
|
border: e.borders,
|
|
@@ -3395,25 +3395,25 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3395
3395
|
onTransitioning: T
|
|
3396
3396
|
}, {
|
|
3397
3397
|
default: Z(() => [
|
|
3398
|
-
|
|
3398
|
+
R(y.$slots, "end-panel")
|
|
3399
3399
|
]),
|
|
3400
3400
|
_: 3
|
|
3401
3401
|
}, 8, ["placement", "border", "draggable", "size"])) : k("", !0)
|
|
3402
3402
|
]));
|
|
3403
3403
|
}
|
|
3404
|
-
}), fn =
|
|
3404
|
+
}), fn = Pe({
|
|
3405
3405
|
apply({ rects: n, elements: t }) {
|
|
3406
3406
|
Object.assign(t.floating.style, {
|
|
3407
3407
|
width: `${n.reference.width}px`
|
|
3408
3408
|
});
|
|
3409
3409
|
}
|
|
3410
|
-
}), cn = (n) =>
|
|
3410
|
+
}), cn = (n) => Pe({
|
|
3411
3411
|
apply({ elements: t }) {
|
|
3412
3412
|
Object.assign(t.floating.style, {
|
|
3413
3413
|
width: `${n.offsetWidth}px`
|
|
3414
3414
|
});
|
|
3415
3415
|
}
|
|
3416
|
-
}), Y1 = /* @__PURE__ */
|
|
3416
|
+
}), Y1 = /* @__PURE__ */ $({
|
|
3417
3417
|
__name: "Popper",
|
|
3418
3418
|
props: {
|
|
3419
3419
|
closeDelay: { default: 20 },
|
|
@@ -3438,86 +3438,86 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3438
3438
|
setup(n, { expose: t, emit: e }) {
|
|
3439
3439
|
const l = n, s = e, a = R1();
|
|
3440
3440
|
let r;
|
|
3441
|
-
const f =
|
|
3441
|
+
const f = L(), C = L(), m = L(), d = L(!1), { mounted: h } = q5(), { disableClickOutside: b, enableClickOutside: c, updateClickOutside: H } = fe(() => W()), v = async () => {
|
|
3442
3442
|
if (m.value && C.value) {
|
|
3443
|
-
const
|
|
3444
|
-
l.offsetOptions &&
|
|
3443
|
+
const E = [];
|
|
3444
|
+
l.offsetOptions && E.push(Mt(l.offsetOptions)), l.flipOptions && E.push(Zt(l.flipOptions)), l.limitShiftOptions ? E.push(
|
|
3445
3445
|
He({
|
|
3446
3446
|
...l.shiftOptions,
|
|
3447
3447
|
limiter: $t(l.limitShiftOptions)
|
|
3448
3448
|
})
|
|
3449
|
-
) : l.shiftOptions &&
|
|
3449
|
+
) : l.shiftOptions && E.push(He(l.shiftOptions)), l.popperWidthClass || (l.sameWidthAsTrigger ? E.push(fn) : l.sameWidthAsElement && E.push(cn(l.sameWidthAsElement)));
|
|
3450
3450
|
const I = await Dt(m.value, C.value, {
|
|
3451
3451
|
placement: l.placement,
|
|
3452
|
-
middleware:
|
|
3452
|
+
middleware: E
|
|
3453
3453
|
});
|
|
3454
3454
|
C.value.style.left = `${I.x}px`, C.value.style.top = `${I.y}px`;
|
|
3455
3455
|
}
|
|
3456
3456
|
};
|
|
3457
|
-
|
|
3458
|
-
const
|
|
3459
|
-
if (
|
|
3460
|
-
return console.error(`[Popper]: The <Popper> component expects only one child element at its root. You passed ${
|
|
3461
|
-
l.popperWidthClass ? (l.sameWidthAsElement || l.sameWidthAsTrigger) && console.warn("[Popper]: The props 'sameWidthAsElement' or 'sameWidthAsTrigger' will be ignored because the 'popperWidthClass' is set") : l.sameWidthAsElement && l.sameWidthAsTrigger && console.warn("[Popper]: The 'sameWidthAsElement' prop will be ignored because 'sameWidthAsTrigger' is set to true"), l.trigger === "manual" && l.show &&
|
|
3457
|
+
a1(() => {
|
|
3458
|
+
const E = a.default && a.default({ visible: d.value });
|
|
3459
|
+
if (E && E.length > 1)
|
|
3460
|
+
return console.error(`[Popper]: The <Popper> component expects only one child element at its root. You passed ${E.length} child nodes.`);
|
|
3461
|
+
l.popperWidthClass ? (l.sameWidthAsElement || l.sameWidthAsTrigger) && console.warn("[Popper]: The props 'sameWidthAsElement' or 'sameWidthAsTrigger' will be ignored because the 'popperWidthClass' is set") : l.sameWidthAsElement && l.sameWidthAsTrigger && console.warn("[Popper]: The 'sameWidthAsElement' prop will be ignored because 'sameWidthAsTrigger' is set to true"), l.trigger === "manual" && l.show && z();
|
|
3462
3462
|
}), F1(() => {
|
|
3463
|
-
|
|
3463
|
+
z.clear(), r && (r(), r = null);
|
|
3464
3464
|
});
|
|
3465
3465
|
const g = () => {
|
|
3466
|
-
|
|
3466
|
+
z.clear(), d.value && (d.value = !1, s("close"), l.closeOnClickOutside && b(), r && (r(), r = null));
|
|
3467
3467
|
}, T = async () => {
|
|
3468
3468
|
d.value || (d.value = !0, await D1(), s("open", [m.value, C.value]), r = wt(m.value, C.value, v), l.closeOnClickOutside && C.value && m.value && c([C.value, m.value]));
|
|
3469
|
-
},
|
|
3470
|
-
l.disabled || (y.clear(),
|
|
3471
|
-
},
|
|
3472
|
-
|
|
3473
|
-
},
|
|
3474
|
-
l.trigger === "click" && (
|
|
3475
|
-
},
|
|
3476
|
-
C.value && m.value && H([C.value, m.value, ...
|
|
3477
|
-
}, f1 = () => d.value ?
|
|
3478
|
-
return
|
|
3469
|
+
}, z = ne(T, l.openDelay), y = ne(g, l.closeDelay), B = async () => {
|
|
3470
|
+
l.disabled || (y.clear(), z());
|
|
3471
|
+
}, W = async () => {
|
|
3472
|
+
z.clear(), y();
|
|
3473
|
+
}, Q = (E) => {
|
|
3474
|
+
l.trigger === "click" && (E.preventDefault(), E.stopPropagation(), f1());
|
|
3475
|
+
}, s1 = (E) => {
|
|
3476
|
+
C.value && m.value && H([C.value, m.value, ...E]);
|
|
3477
|
+
}, f1 = () => d.value ? W() : B();
|
|
3478
|
+
return i1(
|
|
3479
3479
|
() => l.disabled,
|
|
3480
|
-
(
|
|
3481
|
-
),
|
|
3480
|
+
(E) => d.value && E && g()
|
|
3481
|
+
), i1(
|
|
3482
3482
|
() => l.show,
|
|
3483
|
-
(
|
|
3484
|
-
l.trigger === "manual" ?
|
|
3483
|
+
(E) => {
|
|
3484
|
+
l.trigger === "manual" ? E ? z() : y() : console.warn("[Popper]: The 'show' prop is only available when the 'trigger' prop is set to 'manual'");
|
|
3485
3485
|
}
|
|
3486
3486
|
), t({
|
|
3487
3487
|
close: g,
|
|
3488
3488
|
containerRef: f,
|
|
3489
3489
|
open: T,
|
|
3490
|
-
updateClickOutsideTargets:
|
|
3491
|
-
}), (
|
|
3490
|
+
updateClickOutsideTargets: s1
|
|
3491
|
+
}), (E, I) => (o(), i("div", {
|
|
3492
3492
|
ref_key: "containerRef",
|
|
3493
3493
|
ref: f,
|
|
3494
|
-
class:
|
|
3495
|
-
onMouseleave: I[5] || (I[5] = (J) => l.trigger === "hover" &&
|
|
3494
|
+
class: D(l.rootClass),
|
|
3495
|
+
onMouseleave: I[5] || (I[5] = (J) => l.trigger === "hover" && W())
|
|
3496
3496
|
}, [
|
|
3497
3497
|
u("div", {
|
|
3498
3498
|
ref_key: "triggerRef",
|
|
3499
3499
|
ref: m,
|
|
3500
|
-
class:
|
|
3501
|
-
onMouseover: I[0] || (I[0] = (J) => l.trigger === "hover" &&
|
|
3502
|
-
onClick:
|
|
3503
|
-
onFocus: I[1] || (I[1] = (J) => l.trigger === "focus" &&
|
|
3504
|
-
onKeyup: I[2] || (I[2] = _((J) =>
|
|
3500
|
+
class: D(l.triggerClass),
|
|
3501
|
+
onMouseover: I[0] || (I[0] = (J) => l.trigger === "hover" && B()),
|
|
3502
|
+
onClick: Q,
|
|
3503
|
+
onFocus: I[1] || (I[1] = (J) => l.trigger === "focus" && B()),
|
|
3504
|
+
onKeyup: I[2] || (I[2] = _((J) => W(), ["esc"]))
|
|
3505
3505
|
}, [
|
|
3506
|
-
|
|
3506
|
+
R(E.$slots, "default", { visible: d.value })
|
|
3507
3507
|
], 34),
|
|
3508
3508
|
p(h) ? (o(), V(x1, {
|
|
3509
3509
|
key: 0,
|
|
3510
|
-
to:
|
|
3510
|
+
to: E.teleportTarget
|
|
3511
3511
|
}, [
|
|
3512
3512
|
!l.disabled && d.value ? (o(), i("div", {
|
|
3513
3513
|
key: 0,
|
|
3514
3514
|
ref_key: "popperRef",
|
|
3515
3515
|
ref: C,
|
|
3516
|
-
class:
|
|
3517
|
-
onMouseover: I[3] || (I[3] = (J) => l.trigger === "hover" &&
|
|
3518
|
-
onMouseleave: I[4] || (I[4] = (J) => l.trigger === "hover" &&
|
|
3516
|
+
class: D(["absolute", l.popperWidthClass]),
|
|
3517
|
+
onMouseover: I[3] || (I[3] = (J) => l.trigger === "hover" && B()),
|
|
3518
|
+
onMouseleave: I[4] || (I[4] = (J) => l.trigger === "hover" && W())
|
|
3519
3519
|
}, [
|
|
3520
|
-
|
|
3520
|
+
R(E.$slots, "content", {
|
|
3521
3521
|
close: g,
|
|
3522
3522
|
isOpen: d.value
|
|
3523
3523
|
})
|
|
@@ -3528,13 +3528,13 @@ const N1 = /* @__PURE__ */ M1(_2, [["render", tn]]), ln = {
|
|
|
3528
3528
|
}), Cn = {}, vn = { class: "pointer-events-auto rounded-lg overflow-hidden border border-default bg-primary shadow-xl dark:shadow-black/25" };
|
|
3529
3529
|
function hn(n, t) {
|
|
3530
3530
|
return o(), i("div", vn, [
|
|
3531
|
-
|
|
3531
|
+
R(n.$slots, "default")
|
|
3532
3532
|
]);
|
|
3533
3533
|
}
|
|
3534
3534
|
const W1 = /* @__PURE__ */ M1(Cn, [["render", hn]]), mn = {
|
|
3535
3535
|
key: 0,
|
|
3536
3536
|
class: "flex items-center justify-between px-4 pb-4"
|
|
3537
|
-
}, c4 = /* @__PURE__ */
|
|
3537
|
+
}, c4 = /* @__PURE__ */ $({
|
|
3538
3538
|
__name: "PopCalendar",
|
|
3539
3539
|
props: {
|
|
3540
3540
|
mode: { default: "immediate" },
|
|
@@ -3549,7 +3549,7 @@ const W1 = /* @__PURE__ */ M1(Cn, [["render", hn]]), mn = {
|
|
|
3549
3549
|
},
|
|
3550
3550
|
emits: ["change", "close", "open"],
|
|
3551
3551
|
setup(n, { emit: t }) {
|
|
3552
|
-
const e = t, l =
|
|
3552
|
+
const e = t, l = L(), s = L(null), a = (m) => {
|
|
3553
3553
|
var d;
|
|
3554
3554
|
n.mode === "immediate" ? (e("change", m), (d = l.value) == null || d.close()) : s.value = m;
|
|
3555
3555
|
}, r = () => {
|
|
@@ -3571,7 +3571,7 @@ const W1 = /* @__PURE__ */ M1(Cn, [["render", hn]]), mn = {
|
|
|
3571
3571
|
onOpen: C
|
|
3572
3572
|
}, {
|
|
3573
3573
|
default: Z((h) => [
|
|
3574
|
-
|
|
3574
|
+
R(m.$slots, "trigger", {
|
|
3575
3575
|
visible: h.visible
|
|
3576
3576
|
})
|
|
3577
3577
|
]),
|
|
@@ -3585,14 +3585,14 @@ const W1 = /* @__PURE__ */ M1(Cn, [["render", hn]]), mn = {
|
|
|
3585
3585
|
onChange: a
|
|
3586
3586
|
}, null, 8, ["value", "format", "disabled-dates"]),
|
|
3587
3587
|
m.mode === "confirmation" || m.clearable ? (o(), i("footer", mn, [
|
|
3588
|
-
m.clearable ? (o(), V(p(
|
|
3588
|
+
m.clearable ? (o(), V(p(j), {
|
|
3589
3589
|
key: 0,
|
|
3590
3590
|
icon: "trash",
|
|
3591
3591
|
label: "Clear",
|
|
3592
3592
|
variant: "outlineSubtle",
|
|
3593
3593
|
onClick: f
|
|
3594
3594
|
})) : k("", !0),
|
|
3595
|
-
m.mode === "confirmation" ? (o(), V(p(
|
|
3595
|
+
m.mode === "confirmation" ? (o(), V(p(j), {
|
|
3596
3596
|
key: 1,
|
|
3597
3597
|
icon: "check",
|
|
3598
3598
|
label: "Done",
|
|
@@ -3610,7 +3610,7 @@ const W1 = /* @__PURE__ */ M1(Cn, [["render", hn]]), mn = {
|
|
|
3610
3610
|
}), gn = { class: "inline-flex" }, bn = {
|
|
3611
3611
|
key: 0,
|
|
3612
3612
|
class: "flex flex-col gap-0"
|
|
3613
|
-
}, Ln = { class: "text-sm text-secondary" }, C4 = /* @__PURE__ */
|
|
3613
|
+
}, Ln = { class: "text-sm text-secondary" }, C4 = /* @__PURE__ */ $({
|
|
3614
3614
|
__name: "PopConfirm",
|
|
3615
3615
|
props: {
|
|
3616
3616
|
order: {},
|
|
@@ -3634,7 +3634,7 @@ const W1 = /* @__PURE__ */ M1(Cn, [["render", hn]]), mn = {
|
|
|
3634
3634
|
},
|
|
3635
3635
|
emits: ["cancel", "close", "confirm"],
|
|
3636
3636
|
setup(n, { emit: t }) {
|
|
3637
|
-
const e = t, l =
|
|
3637
|
+
const e = t, l = L(), s = L(), { trapFocus: a } = X5(s), r = () => {
|
|
3638
3638
|
e("close"), l.value && l.value.close();
|
|
3639
3639
|
}, f = () => D1(a), C = () => {
|
|
3640
3640
|
r(), e("cancel");
|
|
@@ -3650,10 +3650,10 @@ const W1 = /* @__PURE__ */ M1(Cn, [["render", hn]]), mn = {
|
|
|
3650
3650
|
onOpen: f,
|
|
3651
3651
|
onClose: r
|
|
3652
3652
|
}, {
|
|
3653
|
-
default: Z((
|
|
3653
|
+
default: Z((b) => [
|
|
3654
3654
|
u("div", gn, [
|
|
3655
|
-
|
|
3656
|
-
visible:
|
|
3655
|
+
R(d.$slots, "trigger", {
|
|
3656
|
+
visible: b && b.visible
|
|
3657
3657
|
})
|
|
3658
3658
|
])
|
|
3659
3659
|
]),
|
|
@@ -3663,7 +3663,7 @@ const W1 = /* @__PURE__ */ M1(Cn, [["render", hn]]), mn = {
|
|
|
3663
3663
|
u("div", {
|
|
3664
3664
|
ref_key: "contentRef",
|
|
3665
3665
|
ref: s,
|
|
3666
|
-
class:
|
|
3666
|
+
class: D(["flex flex-col max-w-72", {
|
|
3667
3667
|
"p-4 gap-4": d.title || d.description,
|
|
3668
3668
|
"p-2": !(d.title || d.description)
|
|
3669
3669
|
}])
|
|
@@ -3703,7 +3703,7 @@ function Hn(n, t) {
|
|
|
3703
3703
|
}
|
|
3704
3704
|
const v4 = /* @__PURE__ */ M1(yn, [["render", Hn]]);
|
|
3705
3705
|
var b1 = /* @__PURE__ */ ((n) => (n.ERROR = "error", n.IDLE = "idle", n.LOADING = "loading", n.MATCH = "match", n.NO_MATCH = "no match", n))(b1 || {});
|
|
3706
|
-
const Vn = ["onKeydown"], kn = /* @__PURE__ */
|
|
3706
|
+
const Vn = ["onKeydown"], kn = /* @__PURE__ */ $({
|
|
3707
3707
|
__name: "option",
|
|
3708
3708
|
props: {
|
|
3709
3709
|
label: {},
|
|
@@ -3713,14 +3713,14 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
3713
3713
|
},
|
|
3714
3714
|
emits: ["click", "focus", "hover"],
|
|
3715
3715
|
setup(n, { emit: t }) {
|
|
3716
|
-
const e = n, l = t, s =
|
|
3716
|
+
const e = n, l = t, s = L(), a = O(() => e.hoveredOption && e.hoveredOption.label === e.label), r = () => {
|
|
3717
3717
|
e.disabled || l("click");
|
|
3718
3718
|
};
|
|
3719
3719
|
return (f, C) => (o(), i("div", {
|
|
3720
3720
|
ref_key: "root",
|
|
3721
3721
|
ref: s,
|
|
3722
3722
|
tabindex: "0",
|
|
3723
|
-
class:
|
|
3723
|
+
class: D(["flex items-center justify-between w-full h-8 px-3 space-x-2 text-sm focus:outline-hidden", {
|
|
3724
3724
|
"cursor-not-allowed text-muted ": f.disabled,
|
|
3725
3725
|
"cursor-pointer text-primary hover:bg-secondary focus:bg-secondary active:bg-tertiary": !f.disabled && !f.selected,
|
|
3726
3726
|
"cursor-pointer text-light-blue font-medium hover:bg-secondary focus:bg-secondary active:bg-tertiary": f.selected,
|
|
@@ -3732,10 +3732,10 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
3732
3732
|
onMouseover: C[0] || (C[0] = (m) => l("hover", f.label)),
|
|
3733
3733
|
onFocus: C[1] || (C[1] = (m) => l("focus", f.label))
|
|
3734
3734
|
}, [
|
|
3735
|
-
|
|
3735
|
+
R(f.$slots, "default")
|
|
3736
3736
|
], 42, Vn));
|
|
3737
3737
|
}
|
|
3738
|
-
}), wn = { class: "flex items-center px-2 pb-2 space-x-2" }, Mn = /* @__PURE__ */
|
|
3738
|
+
}), wn = { class: "flex items-center px-2 pb-2 space-x-2" }, Mn = /* @__PURE__ */ $({
|
|
3739
3739
|
__name: "ResultFilters",
|
|
3740
3740
|
props: {
|
|
3741
3741
|
selected: {},
|
|
@@ -3777,7 +3777,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
3777
3777
|
}, xn = {
|
|
3778
3778
|
key: 6,
|
|
3779
3779
|
class: "flex-none border-t border-default bg-primary"
|
|
3780
|
-
},
|
|
3780
|
+
}, at = /* @__PURE__ */ $({
|
|
3781
3781
|
__name: "PopSelect",
|
|
3782
3782
|
props: {
|
|
3783
3783
|
resetOnClose: { type: Boolean, default: !1 },
|
|
@@ -3805,86 +3805,86 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
3805
3805
|
},
|
|
3806
3806
|
emits: ["close", "save-custom", "select"],
|
|
3807
3807
|
setup(n, { expose: t, emit: e }) {
|
|
3808
|
-
const l = n, s = e, a = R1(), r =
|
|
3808
|
+
const l = n, s = e, a = R1(), r = L(null), f = L([]), C = L(""), m = L(), d = L(), h = L(), b = L(), c = L(), H = L(), v = L(l.resultFilters || []), g = L(l.resultFilters ? l.resultFilters[0] : null), { nextFrame: T } = Ce(), z = O(() => l.selected ? Array.isArray(l.selected) ? l.selected : [l.selected] : []), y = O(() => f.value.every((A) => A.disabled)), B = O(() => !C.value.length && !f.value.length), W = O(() => C.value.length && !f.value.length), Q = O(() => {
|
|
3809
3809
|
if (d.value) return b1.ERROR;
|
|
3810
3810
|
if (l.loading) return b1.LOADING;
|
|
3811
|
-
if (
|
|
3812
|
-
if (
|
|
3811
|
+
if (W.value && !l.loading) return b1.NO_MATCH;
|
|
3812
|
+
if (B.value && !l.loading) return b1.IDLE;
|
|
3813
3813
|
if (f.value.length && !l.loading) return b1.MATCH;
|
|
3814
|
-
}),
|
|
3815
|
-
f.value = g.value ?
|
|
3816
|
-
U.count =
|
|
3814
|
+
}), s1 = (A) => {
|
|
3815
|
+
f.value = g.value ? A.filter(g.value.execute) : A, l.resultFilters && v.value.forEach((U) => {
|
|
3816
|
+
U.count = A.filter(U.execute).length;
|
|
3817
3817
|
});
|
|
3818
3818
|
};
|
|
3819
|
-
|
|
3819
|
+
i1(
|
|
3820
3820
|
() => l.options,
|
|
3821
|
-
(
|
|
3822
|
-
|
|
3821
|
+
(A) => {
|
|
3822
|
+
s1(A), r.value = null;
|
|
3823
3823
|
}
|
|
3824
3824
|
), A1(() => {
|
|
3825
|
-
l.filterable && l.remoteMethod && console.warn('[PopSelect] should not have both "filterable" and "remoteMethod" props at the same time'),
|
|
3825
|
+
l.filterable && l.remoteMethod && console.warn('[PopSelect] should not have both "filterable" and "remoteMethod" props at the same time'), s1(l.options);
|
|
3826
3826
|
});
|
|
3827
|
-
const f1 = () => c.value.close(),
|
|
3827
|
+
const f1 = () => c.value.close(), E = () => c.value.open(), I = async () => {
|
|
3828
3828
|
T(() => {
|
|
3829
3829
|
H.value && T(() => H.value.update()), h.value && T(() => h.value.focus());
|
|
3830
3830
|
});
|
|
3831
3831
|
}, J = () => {
|
|
3832
|
-
l.keepOpen || (r.value = null, l.resetOnClose && (C.value = "", l.remoteMethod ? l.remoteMethod("") :
|
|
3833
|
-
}, P = (
|
|
3834
|
-
s("select",
|
|
3835
|
-
}, N = (
|
|
3836
|
-
const U =
|
|
3832
|
+
l.keepOpen || (r.value = null, l.resetOnClose && (C.value = "", l.remoteMethod ? l.remoteMethod("") : s1([]), g.value = l.resultFilters ? l.resultFilters[0] : null), s("close"));
|
|
3833
|
+
}, P = (A) => {
|
|
3834
|
+
s("select", A), l.keepOpen || f1();
|
|
3835
|
+
}, N = (A) => f.value = l.options.filter((U) => U.label.toLowerCase().includes(A.toLowerCase())), S1 = W2(async (A) => {
|
|
3836
|
+
const U = A.target.value;
|
|
3837
3837
|
r.value = null, l.filterable ? N(U) : l.remoteMethod && await l.remoteMethod(U);
|
|
3838
|
-
}, l.debounceMs), g1 = (
|
|
3839
|
-
r.value = f.value.find((U) => U.label ===
|
|
3840
|
-
}, F = (
|
|
3841
|
-
if (!
|
|
3842
|
-
const U =
|
|
3838
|
+
}, l.debounceMs), g1 = (A) => {
|
|
3839
|
+
r.value = f.value.find((U) => U.label === A) || null;
|
|
3840
|
+
}, F = (A) => {
|
|
3841
|
+
if (!b.value.length) return;
|
|
3842
|
+
const U = b.value[f.value.findIndex((K) => K.label === A.label)].$el;
|
|
3843
3843
|
if (H.value && U) {
|
|
3844
|
-
const
|
|
3845
|
-
|
|
3844
|
+
const K = H.value.$el.querySelector(".scrollbar__wrap");
|
|
3845
|
+
K && (st(K, U), H.value.handleScroll());
|
|
3846
3846
|
}
|
|
3847
|
-
}, Y = async (
|
|
3847
|
+
}, Y = async (A) => {
|
|
3848
3848
|
if (f.value.length === 0) return;
|
|
3849
|
-
let U = f.value.findIndex((
|
|
3849
|
+
let U = f.value.findIndex((K) => {
|
|
3850
3850
|
var d1;
|
|
3851
|
-
return
|
|
3851
|
+
return K.label === ((d1 = r.value) == null ? void 0 : d1.label);
|
|
3852
3852
|
});
|
|
3853
|
-
y.value || (
|
|
3854
|
-
},
|
|
3853
|
+
y.value || (A === "next" ? (U++, U === f.value.length && (U = 0)) : A === "prev" && (U--, U < 0 && (U = f.value.length - 1)), r.value = f.value[U], r.value.disabled === !0 && Y(A), await D1(), r.value && F(r.value));
|
|
3854
|
+
}, o1 = () => {
|
|
3855
3855
|
r.value ? P(r.value) : C.value.length && s("save-custom", C.value);
|
|
3856
|
-
}, v1 = (
|
|
3857
|
-
g.value =
|
|
3856
|
+
}, v1 = (A) => {
|
|
3857
|
+
g.value = A, s1(l.options), h.value.focus();
|
|
3858
3858
|
};
|
|
3859
|
-
return t({ close: f1, focus:
|
|
3859
|
+
return t({ close: f1, focus: E }), (A, U) => (o(), V(p(Y1), {
|
|
3860
3860
|
ref_key: "popperRef",
|
|
3861
3861
|
ref: c,
|
|
3862
3862
|
trigger: "click",
|
|
3863
|
-
placement:
|
|
3864
|
-
disabled:
|
|
3865
|
-
"popper-width-class":
|
|
3866
|
-
"same-width-as-element":
|
|
3867
|
-
"same-width-as-trigger":
|
|
3868
|
-
"root-class":
|
|
3869
|
-
"trigger-class":
|
|
3863
|
+
placement: A.placement,
|
|
3864
|
+
disabled: A.disabled,
|
|
3865
|
+
"popper-width-class": A.popperWidthClass,
|
|
3866
|
+
"same-width-as-element": A.sameWidthAsElement,
|
|
3867
|
+
"same-width-as-trigger": A.sameWidthAsTrigger,
|
|
3868
|
+
"root-class": A.rootClass,
|
|
3869
|
+
"trigger-class": A.triggerClass,
|
|
3870
3870
|
onClose: J,
|
|
3871
3871
|
onOpen: I
|
|
3872
3872
|
}, {
|
|
3873
|
-
default: Z((
|
|
3874
|
-
A
|
|
3875
|
-
disabled:
|
|
3876
|
-
visible:
|
|
3873
|
+
default: Z((K) => [
|
|
3874
|
+
R(A.$slots, "trigger", {
|
|
3875
|
+
disabled: A.disabled,
|
|
3876
|
+
visible: K && K.visible
|
|
3877
3877
|
})
|
|
3878
3878
|
]),
|
|
3879
3879
|
content: Z(() => [
|
|
3880
3880
|
w(p(W1), {
|
|
3881
3881
|
ref_key: "contentRef",
|
|
3882
3882
|
ref: m,
|
|
3883
|
-
class:
|
|
3883
|
+
class: D(["flex flex-col", { "h-72": A.fixedHeight }])
|
|
3884
3884
|
}, {
|
|
3885
3885
|
default: Z(() => [
|
|
3886
|
-
|
|
3887
|
-
|
|
3886
|
+
A.filterable || A.remoteMethod || A.resultFilters ? (o(), i("header", Zn, [
|
|
3887
|
+
A.filterable || A.remoteMethod ? (o(), i("header", $n, [
|
|
3888
3888
|
w(p(l1), {
|
|
3889
3889
|
name: "magnifying-glass",
|
|
3890
3890
|
class: "text-light-blue"
|
|
@@ -3892,25 +3892,25 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
3892
3892
|
U1(u("input", {
|
|
3893
3893
|
ref_key: "inputRef",
|
|
3894
3894
|
ref: h,
|
|
3895
|
-
"onUpdate:modelValue": U[0] || (U[0] = (
|
|
3895
|
+
"onUpdate:modelValue": U[0] || (U[0] = (K) => C.value = K),
|
|
3896
3896
|
type: "text",
|
|
3897
3897
|
class: "w-full h-8 text-sm leading-none bg-primary rounded-tr-lg focus:outline-hidden",
|
|
3898
|
-
placeholder:
|
|
3898
|
+
placeholder: A.placeholder,
|
|
3899
3899
|
onClick: U[1] || (U[1] = x(() => {
|
|
3900
3900
|
}, ["stop", "prevent"])),
|
|
3901
3901
|
onInput: U[2] || (U[2] = //@ts-ignore
|
|
3902
|
-
(...
|
|
3902
|
+
(...K) => p(S1) && p(S1)(...K)),
|
|
3903
3903
|
onKeydown: [
|
|
3904
|
-
U[3] || (U[3] = _(x((
|
|
3905
|
-
U[4] || (U[4] = _(x((
|
|
3906
|
-
_(x(
|
|
3904
|
+
U[3] || (U[3] = _(x((K) => Y("next"), ["prevent"]), ["down"])),
|
|
3905
|
+
U[4] || (U[4] = _(x((K) => Y("prev"), ["prevent"]), ["up"])),
|
|
3906
|
+
_(x(o1, ["prevent"]), ["enter"]),
|
|
3907
3907
|
_(x(J, ["stop", "prevent"]), ["esc"])
|
|
3908
3908
|
]
|
|
3909
3909
|
}, null, 40, Dn), [
|
|
3910
|
-
[
|
|
3910
|
+
[Vt, C.value]
|
|
3911
3911
|
])
|
|
3912
3912
|
])) : k("", !0),
|
|
3913
|
-
|
|
3913
|
+
A.resultFilters ? (o(), V(Mn, {
|
|
3914
3914
|
key: 1,
|
|
3915
3915
|
"show-counts": "",
|
|
3916
3916
|
filters: v.value,
|
|
@@ -3918,62 +3918,62 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
3918
3918
|
onChange: v1
|
|
3919
3919
|
}, null, 8, ["filters", "selected"])) : k("", !0)
|
|
3920
3920
|
])) : k("", !0),
|
|
3921
|
-
|
|
3921
|
+
A.$slots.error ? (o(), i("div", {
|
|
3922
3922
|
key: 1,
|
|
3923
3923
|
ref_key: "errorRef",
|
|
3924
3924
|
ref: d,
|
|
3925
3925
|
class: "flex-1 bg-primary h-full"
|
|
3926
3926
|
}, [
|
|
3927
|
-
A
|
|
3928
|
-
], 512)) :
|
|
3927
|
+
R(A.$slots, "error")
|
|
3928
|
+
], 512)) : Q.value === p(b1).LOADING ? (o(), i("div", Bn, [
|
|
3929
3929
|
u("div", Sn, [
|
|
3930
3930
|
w(p(N1), { class: "w-4 h-4 text-granite-grey" }),
|
|
3931
|
-
u("span", Tn, X(
|
|
3931
|
+
u("span", Tn, X(A.loadingText), 1)
|
|
3932
3932
|
])
|
|
3933
|
-
])) :
|
|
3933
|
+
])) : Q.value === p(b1).NO_MATCH ? (o(), i("div", zn, [
|
|
3934
3934
|
u("div", An, [
|
|
3935
3935
|
U[5] || (U[5] = u("div", { class: "w-4 h-4 text-center leading-none" }, " ... ", -1)),
|
|
3936
|
-
u("span", Rn, X(
|
|
3936
|
+
u("span", Rn, X(A.noMatchText), 1)
|
|
3937
3937
|
])
|
|
3938
|
-
])) :
|
|
3938
|
+
])) : Q.value === p(b1).IDLE ? (o(), i("div", En, [
|
|
3939
3939
|
u("div", On, [
|
|
3940
|
-
w(p(l1), { name:
|
|
3941
|
-
u("span", In, X(
|
|
3940
|
+
w(p(l1), { name: A.emptyStateIcon }, null, 8, ["name"]),
|
|
3941
|
+
u("span", In, X(A.emptyStateText), 1)
|
|
3942
3942
|
]),
|
|
3943
3943
|
U[6] || (U[6] = u("div", { class: "h-8 w-full bg-primary" }, null, -1))
|
|
3944
|
-
])) :
|
|
3944
|
+
])) : Q.value === p(b1).MATCH ? (o(), V(p(q1), {
|
|
3945
3945
|
key: 5,
|
|
3946
3946
|
ref_key: "scrollbarRef",
|
|
3947
3947
|
ref: H
|
|
3948
3948
|
}, {
|
|
3949
3949
|
default: Z(() => [
|
|
3950
3950
|
u("div", Pn, [
|
|
3951
|
-
(o(!0), i(M, null, m1(f.value, (
|
|
3951
|
+
(o(!0), i(M, null, m1(f.value, (K) => (o(), V(kn, {
|
|
3952
3952
|
ref_for: !0,
|
|
3953
3953
|
ref_key: "optionsRef",
|
|
3954
|
-
ref:
|
|
3955
|
-
key:
|
|
3956
|
-
disabled:
|
|
3957
|
-
label:
|
|
3954
|
+
ref: b,
|
|
3955
|
+
key: K.id || K.label,
|
|
3956
|
+
disabled: K.disabled,
|
|
3957
|
+
label: K.label,
|
|
3958
3958
|
"hovered-option": r.value,
|
|
3959
|
-
selected:
|
|
3959
|
+
selected: z.value.includes(K),
|
|
3960
3960
|
onFocus: g1,
|
|
3961
3961
|
onHover: g1,
|
|
3962
|
-
onClick: (d1) => P(
|
|
3962
|
+
onClick: (d1) => P(K)
|
|
3963
3963
|
}, {
|
|
3964
3964
|
default: Z(() => [
|
|
3965
3965
|
u("div", Nn, [
|
|
3966
|
-
|
|
3966
|
+
K.icon ? (o(), V(p(l1), {
|
|
3967
3967
|
key: 0,
|
|
3968
|
-
name:
|
|
3968
|
+
name: K.icon
|
|
3969
3969
|
}, null, 8, ["name"])) : k("", !0),
|
|
3970
|
-
w(p(
|
|
3970
|
+
w(p(it), {
|
|
3971
3971
|
"background-color": "yellow",
|
|
3972
|
-
value:
|
|
3972
|
+
value: K.label,
|
|
3973
3973
|
highlight: C.value
|
|
3974
3974
|
}, null, 8, ["value", "highlight"])
|
|
3975
3975
|
]),
|
|
3976
|
-
|
|
3976
|
+
K.meta ? (o(), i("div", Fn, X(K.meta), 1)) : k("", !0)
|
|
3977
3977
|
]),
|
|
3978
3978
|
_: 2
|
|
3979
3979
|
}, 1032, ["disabled", "label", "hovered-option", "selected", "onClick"]))), 128))
|
|
@@ -3982,7 +3982,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
3982
3982
|
_: 1
|
|
3983
3983
|
}, 512)) : k("", !0),
|
|
3984
3984
|
p(a).footer ? (o(), i("footer", xn, [
|
|
3985
|
-
A
|
|
3985
|
+
R(A.$slots, "footer")
|
|
3986
3986
|
])) : k("", !0)
|
|
3987
3987
|
]),
|
|
3988
3988
|
_: 3
|
|
@@ -3991,7 +3991,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
3991
3991
|
_: 3
|
|
3992
3992
|
}, 8, ["placement", "disabled", "popper-width-class", "same-width-as-element", "same-width-as-trigger", "root-class", "trigger-class"]));
|
|
3993
3993
|
}
|
|
3994
|
-
}), ve = /* @__PURE__ */
|
|
3994
|
+
}), ve = /* @__PURE__ */ $({
|
|
3995
3995
|
__name: "ScreenOverlay",
|
|
3996
3996
|
props: {
|
|
3997
3997
|
show: { type: Boolean, default: !1 },
|
|
@@ -3999,7 +3999,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
3999
3999
|
},
|
|
4000
4000
|
emits: ["click", "close"],
|
|
4001
4001
|
setup(n, { emit: t }) {
|
|
4002
|
-
const e = n, l = t, s =
|
|
4002
|
+
const e = n, l = t, s = L(""), a = Re({ backdropFilter: "" });
|
|
4003
4003
|
return A1(() => {
|
|
4004
4004
|
e.type === "default" ? (s.value = "bg-black/25 dark:bg-black/50", a.backdropFilter = "") : e.type === "blurred" && (s.value = "bg-black/25", a.backdropFilter = "blur(3px)");
|
|
4005
4005
|
}), (r, f) => (o(), V(de, {
|
|
@@ -4013,11 +4013,11 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4013
4013
|
}, {
|
|
4014
4014
|
default: Z(() => [
|
|
4015
4015
|
U1(u("div", {
|
|
4016
|
-
class:
|
|
4016
|
+
class: D(["z-40 fixed w-screen h-screen top-0 left-0 flex items-center justify-center pointer-events-auto p-4", s.value]),
|
|
4017
4017
|
style: t1(a),
|
|
4018
4018
|
onMousedown: f[0] || (f[0] = x((C) => l("click"), ["self"]))
|
|
4019
4019
|
}, [
|
|
4020
|
-
|
|
4020
|
+
R(r.$slots, "default")
|
|
4021
4021
|
], 38), [
|
|
4022
4022
|
[X1, r.show]
|
|
4023
4023
|
])
|
|
@@ -4043,7 +4043,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4043
4043
|
axis: "Y",
|
|
4044
4044
|
client: "clientY",
|
|
4045
4045
|
direction: "top"
|
|
4046
|
-
}, Wn = ["aria-label", "aria-valuenow"], Se = /* @__PURE__ */
|
|
4046
|
+
}, Wn = ["aria-label", "aria-valuenow"], Se = /* @__PURE__ */ $({
|
|
4047
4047
|
__name: "Bar",
|
|
4048
4048
|
props: {
|
|
4049
4049
|
vertical: { type: Boolean },
|
|
@@ -4052,16 +4052,16 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4052
4052
|
},
|
|
4053
4053
|
emits: ["move", "update"],
|
|
4054
4054
|
setup(n, { emit: t }) {
|
|
4055
|
-
const e = n, l = t, s =
|
|
4055
|
+
const e = n, l = t, s = L(), a = L(), r = L(!1), f = e.vertical ? Yn : Un, C = L(0), m = (g) => {
|
|
4056
4056
|
if (!r.value) return;
|
|
4057
4057
|
const T = C.value;
|
|
4058
4058
|
if (!T) return;
|
|
4059
|
-
const
|
|
4060
|
-
if (
|
|
4061
|
-
const y = ((
|
|
4059
|
+
const z = s.value.getBoundingClientRect();
|
|
4060
|
+
if (z) {
|
|
4061
|
+
const y = ((z[f.direction] || 0) - (g[f.client] || 0)) * -1, B = a.value && typeof a.value[f.offset] == "number" ? a.value[f.offset] - T : 0, W = s.value ? Number(s.value[f.offset]) : 0, Q = W ? (y - B) * 100 / W : 0;
|
|
4062
4062
|
l("update", {
|
|
4063
4063
|
scrollReference: f.scroll,
|
|
4064
|
-
positionPercentage:
|
|
4064
|
+
positionPercentage: Q,
|
|
4065
4065
|
scrollSize: f.scrollSize
|
|
4066
4066
|
});
|
|
4067
4067
|
}
|
|
@@ -4069,18 +4069,18 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4069
4069
|
r.value = !1, C.value = 0, document.removeEventListener("mousemove", m), document.onselectstart = null;
|
|
4070
4070
|
}, h = (g) => {
|
|
4071
4071
|
g.stopImmediatePropagation(), r.value = !0, document.addEventListener("mousemove", m), document.addEventListener("mouseup", d), document.onselectstart = () => !1;
|
|
4072
|
-
},
|
|
4072
|
+
}, b = (g) => {
|
|
4073
4073
|
if (!(g.ctrlKey || g.button === 2) && (h(g), g.currentTarget)) {
|
|
4074
|
-
const T = g.currentTarget[f.offset],
|
|
4075
|
-
C.value = T - (
|
|
4074
|
+
const T = g.currentTarget[f.offset], z = g[f.client], B = g.currentTarget.getBoundingClientRect()[f.direction];
|
|
4075
|
+
C.value = T - (z - B);
|
|
4076
4076
|
}
|
|
4077
4077
|
}, c = (g) => {
|
|
4078
4078
|
const T = g.target.getBoundingClientRect();
|
|
4079
4079
|
if (T) {
|
|
4080
|
-
const
|
|
4080
|
+
const z = T[f.direction], y = g[f.client], B = Math.abs((z ? Number(z) : 0) - (y ? Number(y) : 0)), W = a.value[f.offset] / 2, Q = s.value ? Number(s.value[f.offset]) : 0, s1 = Q ? (B - W) * 100 / Q : 0;
|
|
4081
4081
|
l("update", {
|
|
4082
4082
|
scrollReference: f.scroll,
|
|
4083
|
-
positionPercentage:
|
|
4083
|
+
positionPercentage: s1,
|
|
4084
4084
|
scrollSize: f.scrollSize
|
|
4085
4085
|
});
|
|
4086
4086
|
}
|
|
@@ -4098,7 +4098,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4098
4098
|
return (g, T) => (o(), i("div", {
|
|
4099
4099
|
ref_key: "scrollbarRef",
|
|
4100
4100
|
ref: s,
|
|
4101
|
-
class:
|
|
4101
|
+
class: D(`scrollbar__bar is-${p(f).key}`),
|
|
4102
4102
|
onClick: T[1] || (T[1] = x(() => {
|
|
4103
4103
|
}, ["stop", "prevent"])),
|
|
4104
4104
|
onMousedown: x(c, ["stop", "prevent"])
|
|
@@ -4116,12 +4116,12 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4116
4116
|
"aria-valuemax": "100",
|
|
4117
4117
|
onClick: T[0] || (T[0] = x(() => {
|
|
4118
4118
|
}, ["stop", "prevent"])),
|
|
4119
|
-
onMousedown: x(
|
|
4119
|
+
onMousedown: x(b, ["stop", "prevent"]),
|
|
4120
4120
|
onKeydown: v
|
|
4121
4121
|
}, null, 44, Wn)
|
|
4122
4122
|
], 34));
|
|
4123
4123
|
}
|
|
4124
|
-
}), q1 = /* @__PURE__ */
|
|
4124
|
+
}), q1 = /* @__PURE__ */ $({
|
|
4125
4125
|
__name: "Scrollbar",
|
|
4126
4126
|
props: {
|
|
4127
4127
|
disableX: { type: Boolean, default: !1 },
|
|
@@ -4139,28 +4139,28 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4139
4139
|
setup(n, { expose: t, emit: e }) {
|
|
4140
4140
|
const l = n, s = e;
|
|
4141
4141
|
let a;
|
|
4142
|
-
const r =
|
|
4142
|
+
const r = L(6), f = L(0), C = L(0), m = L(0), d = L("0"), h = L("0"), b = Re({
|
|
4143
4143
|
marginRight: "",
|
|
4144
4144
|
marginBottom: ""
|
|
4145
4145
|
}), c = { height: 100, width: 100 }, H = ["scrollbar__wrap"];
|
|
4146
4146
|
!r.value && H.push("scrollbar__wrap--hidden-default"), l.wrapClass && H.push(l.wrapClass);
|
|
4147
|
-
const v =
|
|
4147
|
+
const v = L(), g = L(), T = () => {
|
|
4148
4148
|
C.value = v.value.scrollTop * 100 / v.value.clientHeight, f.value = v.value.scrollLeft * 100 / v.value.clientWidth, s("scroll", v.value.scrollTop);
|
|
4149
|
-
const
|
|
4150
|
-
if (m.value > 0 && v.value.scrollTop === 0 ? s("intersect", { edge: "top", hit: !0 }) : m.value === 0 && v.value.scrollTop > 0 ? s("intersect", { edge: "top", hit: !1 }) : m.value + v.value.clientHeight < I &&
|
|
4149
|
+
const E = v.value.scrollTop + v.value.clientHeight, I = v.value.scrollHeight;
|
|
4150
|
+
if (m.value > 0 && v.value.scrollTop === 0 ? s("intersect", { edge: "top", hit: !0 }) : m.value === 0 && v.value.scrollTop > 0 ? s("intersect", { edge: "top", hit: !1 }) : m.value + v.value.clientHeight < I && E === I ? s("intersect", { edge: "bottom", hit: !0 }) : m.value + v.value.clientHeight === I && E < I && s("intersect", { edge: "bottom", hit: !1 }), l.triggers)
|
|
4151
4151
|
for (const J of l.triggers)
|
|
4152
4152
|
m.value < J.px && v.value.scrollTop >= J.px ? J.callback(J, "down") : m.value > J.px && v.value.scrollTop <= J.px && J.callback(J, "up");
|
|
4153
4153
|
m.value = v.value.scrollTop;
|
|
4154
|
-
},
|
|
4154
|
+
}, z = () => ({
|
|
4155
4155
|
heightPercentage: v.value.clientHeight * 100 / v.value.scrollHeight,
|
|
4156
4156
|
widthPercentage: v.value.clientWidth * 100 / v.value.scrollWidth
|
|
4157
4157
|
}), y = async () => {
|
|
4158
4158
|
if (!v.value) return;
|
|
4159
4159
|
await D1();
|
|
4160
|
-
const { heightPercentage:
|
|
4161
|
-
!
|
|
4160
|
+
const { heightPercentage: E, widthPercentage: I } = z();
|
|
4161
|
+
!E && !I || (l.disableX || (c.width === 100 && I < 100 ? s("scrollXActive", !0) : I === 100 && c.width < 100 && s("scrollXActive", !1), I === 100 ? b.marginBottom = "0px" : r.value && (b.marginBottom = `-${r.value}px`), c.width = I, h.value = I < 100 ? `${I}%` : ""), l.disableY || (c.height === 100 && E < 100 ? s("scrollYActive", !0) : E === 100 && c.height < 100 && s("scrollYActive", !1), E === 100 ? b.marginRight = "0px" : r.value && (b.marginRight = `-${r.value}px`), c.height = E, d.value = E < 100 ? `${E}%` : ""), T());
|
|
4162
4162
|
};
|
|
4163
|
-
|
|
4163
|
+
a1(async () => {
|
|
4164
4164
|
await D1(y), c.height === 100 && s("intersect", { edge: "top", hit: !0 }), l.windowResize && window.addEventListener("resize", y), l.noresize || (a = new MutationObserver(y), a.observe(g.value, {
|
|
4165
4165
|
childList: !0,
|
|
4166
4166
|
subtree: !0
|
|
@@ -4168,62 +4168,62 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4168
4168
|
}), B1(() => {
|
|
4169
4169
|
!l.noresize && a.disconnect(), l.windowResize && window.removeEventListener("resize", y);
|
|
4170
4170
|
});
|
|
4171
|
-
const
|
|
4172
|
-
v.value[
|
|
4173
|
-
},
|
|
4174
|
-
|
|
4171
|
+
const B = (E) => {
|
|
4172
|
+
v.value[E.scrollReference] = E.positionPercentage * v.value[E.scrollSize] / 100;
|
|
4173
|
+
}, W = (E, I) => {
|
|
4174
|
+
E === "x" ? v.value.scrollBy({ left: I, behavior: "smooth" }) : v.value.scrollBy({ top: I, behavior: "smooth" }), T();
|
|
4175
4175
|
};
|
|
4176
4176
|
return t({ handleScroll: T, reset: () => {
|
|
4177
4177
|
v.value.scrollTop = 0, T();
|
|
4178
|
-
}, jumpToPercentage: (
|
|
4179
|
-
|
|
4180
|
-
}, scrollToPercentage: (
|
|
4181
|
-
|
|
4182
|
-
}, update: y }), (
|
|
4183
|
-
class:
|
|
4178
|
+
}, jumpToPercentage: (E, I) => {
|
|
4179
|
+
E === "x" ? v.value.scrollLeft = v.value.scrollWidth * I / 100 : v.value.scrollTop = v.value.scrollHeight * I / 100, T();
|
|
4180
|
+
}, scrollToPercentage: (E, I) => {
|
|
4181
|
+
E === "x" ? v.value.scrollTo({ left: v.value.scrollWidth * I / 100, behavior: "smooth" }) : v.value.scrollTo({ top: v.value.scrollHeight * I / 100, behavior: "smooth" }), T();
|
|
4182
|
+
}, update: y }), (E, I) => (o(), i("main", {
|
|
4183
|
+
class: D(["scrollbar scroll-hidden", [E.viewHeightClass, { show: E.show }]])
|
|
4184
4184
|
}, [
|
|
4185
4185
|
u("div", {
|
|
4186
4186
|
id: "wrapRef",
|
|
4187
4187
|
ref_key: "wrapRef",
|
|
4188
4188
|
ref: v,
|
|
4189
|
-
class:
|
|
4190
|
-
style: t1(
|
|
4189
|
+
class: D(["relative", [H]]),
|
|
4190
|
+
style: t1(b),
|
|
4191
4191
|
onScroll: T
|
|
4192
4192
|
}, [
|
|
4193
4193
|
(o(), V($1(l.tag), {
|
|
4194
4194
|
ref_key: "contentRef",
|
|
4195
4195
|
ref: g,
|
|
4196
|
-
class:
|
|
4196
|
+
class: D(["scrollbar__view relative", [E.viewClass]])
|
|
4197
4197
|
}, {
|
|
4198
4198
|
default: Z(() => [
|
|
4199
|
-
|
|
4199
|
+
R(E.$slots, "default")
|
|
4200
4200
|
]),
|
|
4201
4201
|
_: 3
|
|
4202
4202
|
}, 8, ["class"]))
|
|
4203
4203
|
], 38),
|
|
4204
|
-
|
|
4204
|
+
E.disableX ? k("", !0) : (o(), V(Se, {
|
|
4205
4205
|
key: 0,
|
|
4206
4206
|
move: f.value,
|
|
4207
4207
|
size: h.value,
|
|
4208
|
-
onMove: I[0] || (I[0] = (J) =>
|
|
4209
|
-
onUpdate:
|
|
4208
|
+
onMove: I[0] || (I[0] = (J) => W("x", J * 40)),
|
|
4209
|
+
onUpdate: B
|
|
4210
4210
|
}, null, 8, ["move", "size"])),
|
|
4211
|
-
|
|
4211
|
+
E.disableY ? k("", !0) : (o(), V(Se, {
|
|
4212
4212
|
key: 1,
|
|
4213
4213
|
vertical: "",
|
|
4214
4214
|
move: C.value,
|
|
4215
4215
|
size: d.value,
|
|
4216
|
-
onMove: I[1] || (I[1] = (J) =>
|
|
4217
|
-
onUpdate:
|
|
4216
|
+
onMove: I[1] || (I[1] = (J) => W("y", J * 40)),
|
|
4217
|
+
onUpdate: B
|
|
4218
4218
|
}, null, 8, ["move", "size"]))
|
|
4219
4219
|
], 2));
|
|
4220
4220
|
}
|
|
4221
|
-
}), h4 = /* @__PURE__ */
|
|
4221
|
+
}), h4 = /* @__PURE__ */ $({
|
|
4222
4222
|
__name: "ScrollBottomLoader",
|
|
4223
4223
|
emits: ["intersect"],
|
|
4224
4224
|
setup(n, { emit: t }) {
|
|
4225
|
-
const e = t, l =
|
|
4226
|
-
return
|
|
4225
|
+
const e = t, l = L(), s = L(null);
|
|
4226
|
+
return a1(() => {
|
|
4227
4227
|
s.value = new IntersectionObserver(
|
|
4228
4228
|
([a]) => a.isIntersecting && e("intersect"),
|
|
4229
4229
|
{ threshold: 0.01 }
|
|
@@ -4233,7 +4233,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4233
4233
|
ref: l,
|
|
4234
4234
|
class: "w-full h-16 flex items-center justify-center bg-white"
|
|
4235
4235
|
}, [
|
|
4236
|
-
a.$slots.default ?
|
|
4236
|
+
a.$slots.default ? R(a.$slots, "default", { key: 0 }) : (o(), V(p(N1), {
|
|
4237
4237
|
key: 1,
|
|
4238
4238
|
class: "w-6 h-6 text-granite-grey"
|
|
4239
4239
|
}))
|
|
@@ -4242,7 +4242,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4242
4242
|
}), m4 = ["top", "bottom", "left", "right"], g4 = ["up", "down", "left", "right"], jn = {
|
|
4243
4243
|
key: 1,
|
|
4244
4244
|
class: "text-xs"
|
|
4245
|
-
}, Kn = /* @__PURE__ */
|
|
4245
|
+
}, Kn = /* @__PURE__ */ $({
|
|
4246
4246
|
__name: "SegmentButton",
|
|
4247
4247
|
props: {
|
|
4248
4248
|
active: { type: Boolean },
|
|
@@ -4252,7 +4252,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4252
4252
|
setup(n, { emit: t }) {
|
|
4253
4253
|
const e = t;
|
|
4254
4254
|
return (l, s) => (o(), i("button", {
|
|
4255
|
-
class:
|
|
4255
|
+
class: D(["cursor-pointer h-6 px-2 flex items-center gap-2 rounded", {
|
|
4256
4256
|
"text-tertiary dark:text-muted bg-secondary hover:bg-tertiary hover:text-tertiary": !l.active,
|
|
4257
4257
|
"bg-primary dark:bg-tertiary shadow-xs text-primary": l.active
|
|
4258
4258
|
}]),
|
|
@@ -4265,7 +4265,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4265
4265
|
l.segment.label ? (o(), i("p", jn, X(l.segment.label), 1)) : k("", !0)
|
|
4266
4266
|
], 2));
|
|
4267
4267
|
}
|
|
4268
|
-
}), b4 = /* @__PURE__ */
|
|
4268
|
+
}), b4 = /* @__PURE__ */ $({
|
|
4269
4269
|
__name: "SegmentedControls",
|
|
4270
4270
|
props: {
|
|
4271
4271
|
segments: {},
|
|
@@ -4286,7 +4286,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4286
4286
|
_: 1
|
|
4287
4287
|
}));
|
|
4288
4288
|
}
|
|
4289
|
-
}), L4 = /* @__PURE__ */
|
|
4289
|
+
}), L4 = /* @__PURE__ */ $({
|
|
4290
4290
|
__name: "OptionGroup",
|
|
4291
4291
|
props: {
|
|
4292
4292
|
label: {},
|
|
@@ -4294,17 +4294,17 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4294
4294
|
},
|
|
4295
4295
|
setup(n) {
|
|
4296
4296
|
return (t, e) => (o(), i("section", {
|
|
4297
|
-
class:
|
|
4297
|
+
class: D(["relative w-full border-t border-default", { "first:border-t-0 first:pt-0": !t.label, "py-2": t.small, "py-4": !t.small }])
|
|
4298
4298
|
}, [
|
|
4299
4299
|
t.label ? (o(), i("div", {
|
|
4300
4300
|
key: 0,
|
|
4301
4301
|
style: t1({ top: t.small ? "-0.55rem" : "-0.63rem" }),
|
|
4302
|
-
class:
|
|
4302
|
+
class: D(["absolute bg-primary px-2 font-medium text-tertiary", { "text-[10px]": t.small, "text-xs": !t.small }])
|
|
4303
4303
|
}, X(t.label), 7)) : k("", !0),
|
|
4304
|
-
|
|
4304
|
+
R(t.$slots, "default")
|
|
4305
4305
|
], 2));
|
|
4306
4306
|
}
|
|
4307
|
-
}), Qn = { class: "list-none flex items-center w-full overflow-hidden bg-primary" }, qn = { class: "flex-1 w-full overflow-hidden flex items-center gap-2" }, y4 = /* @__PURE__ */
|
|
4307
|
+
}), Qn = { class: "list-none flex items-center w-full overflow-hidden bg-primary" }, qn = { class: "flex-1 w-full overflow-hidden flex items-center gap-2" }, y4 = /* @__PURE__ */ $({
|
|
4308
4308
|
__name: "SelectListOption",
|
|
4309
4309
|
props: {
|
|
4310
4310
|
hoveredOption: {},
|
|
@@ -4319,7 +4319,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4319
4319
|
const e = t, l = O(() => n.variant === "checkbox" || n.variant === "single"), s = O(() => n.hoveredOption ? "id" in n.hoveredOption && "id" in n.option ? n.hoveredOption.id === n.option.id : n.hoveredOption && n.hoveredOption.label === n.option.label : !1), a = () => e("click");
|
|
4320
4320
|
return (r, f) => (o(), i("li", Qn, [
|
|
4321
4321
|
(o(), V($1(l.value ? "button" : "div"), {
|
|
4322
|
-
class:
|
|
4322
|
+
class: D(["cursor-pointer w-full overflow-hidden rounded-lg flex items-center px-2 py-1 gap-2 hover:bg-secondary active:bg-tertiary", {
|
|
4323
4323
|
"": r.variant === "checkbox",
|
|
4324
4324
|
"bg-secondary": s.value,
|
|
4325
4325
|
"h-6 text-xs": r.small,
|
|
@@ -4331,7 +4331,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4331
4331
|
}, {
|
|
4332
4332
|
default: Z(() => [
|
|
4333
4333
|
u("main", qn, [
|
|
4334
|
-
r.variant === "checkbox" ? (o(), V(p(
|
|
4334
|
+
r.variant === "checkbox" ? (o(), V(p(nt), {
|
|
4335
4335
|
key: 0,
|
|
4336
4336
|
checked: r.selected,
|
|
4337
4337
|
class: "flex-0",
|
|
@@ -4340,15 +4340,15 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4340
4340
|
r.option.icon ? (o(), V(p(l1), {
|
|
4341
4341
|
key: 1,
|
|
4342
4342
|
name: r.option.icon,
|
|
4343
|
-
class:
|
|
4343
|
+
class: D(["w-4 h-4 flex-0", {
|
|
4344
4344
|
"text-action": r.selected && r.variant === "single"
|
|
4345
4345
|
}])
|
|
4346
4346
|
}, null, 8, ["name", "class"])) : k("", !0),
|
|
4347
|
-
w(p(
|
|
4347
|
+
w(p(it), {
|
|
4348
4348
|
"background-color": "yellow",
|
|
4349
4349
|
value: r.option.label,
|
|
4350
4350
|
highlight: r.search,
|
|
4351
|
-
class:
|
|
4351
|
+
class: D(["flex-1 pl-1 -ml-1 text-left min-w-0 truncate", {
|
|
4352
4352
|
"text-action": r.selected && r.variant === "single",
|
|
4353
4353
|
"text-xs": r.small,
|
|
4354
4354
|
"text-sm": !r.small
|
|
@@ -4357,9 +4357,9 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4357
4357
|
]),
|
|
4358
4358
|
r.option.suffix ? (o(), i("span", {
|
|
4359
4359
|
key: 0,
|
|
4360
|
-
class:
|
|
4360
|
+
class: D(["flex-0 text-sm text-secondary", { "text-xs": r.small, "text-sm": !r.small }])
|
|
4361
4361
|
}, X(r.option.suffix), 3)) : k("", !0),
|
|
4362
|
-
r.variant === "deletable" ? (o(), V(p(
|
|
4362
|
+
r.variant === "deletable" ? (o(), V(p(j), {
|
|
4363
4363
|
key: 1,
|
|
4364
4364
|
small: "",
|
|
4365
4365
|
icon: "close",
|
|
@@ -4371,7 +4371,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4371
4371
|
}, 40, ["class"]))
|
|
4372
4372
|
]));
|
|
4373
4373
|
}
|
|
4374
|
-
}), Xn = { class: "flex-1 h-full flex flex-col items-center justify-center gap-2" }, Gn = { class: "flex flex-col items-center justify-center" }, Jn = { class: "flex items-center justify-center w-12 h-12" }, _1 = /* @__PURE__ */
|
|
4374
|
+
}), Xn = { class: "flex-1 h-full flex flex-col items-center justify-center gap-2" }, Gn = { class: "flex flex-col items-center justify-center" }, Jn = { class: "flex items-center justify-center w-12 h-12" }, _1 = /* @__PURE__ */ $({
|
|
4375
4375
|
__name: "StatusCard",
|
|
4376
4376
|
props: {
|
|
4377
4377
|
status: {},
|
|
@@ -4381,11 +4381,11 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4381
4381
|
return (t, e) => (o(), i("div", Xn, [
|
|
4382
4382
|
u("div", Gn, [
|
|
4383
4383
|
u("div", Jn, [
|
|
4384
|
-
|
|
4384
|
+
R(t.$slots, "default")
|
|
4385
4385
|
])
|
|
4386
4386
|
]),
|
|
4387
4387
|
u("span", {
|
|
4388
|
-
class:
|
|
4388
|
+
class: D(["text-ui-label-14-medium", {
|
|
4389
4389
|
"text-disabled-font": t.variant === "idle" || t.variant === "no match",
|
|
4390
4390
|
"text-alert": t.variant === "error",
|
|
4391
4391
|
"text-primary": t.variant === "loading"
|
|
@@ -4393,7 +4393,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4393
4393
|
}, X(t.status), 3)
|
|
4394
4394
|
]));
|
|
4395
4395
|
}
|
|
4396
|
-
}), _n = /* @__PURE__ */
|
|
4396
|
+
}), _n = /* @__PURE__ */ $({
|
|
4397
4397
|
__name: "ErrorCard",
|
|
4398
4398
|
props: {
|
|
4399
4399
|
message: {}
|
|
@@ -4451,7 +4451,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4451
4451
|
_: 1
|
|
4452
4452
|
}, 8, ["status"]));
|
|
4453
4453
|
}
|
|
4454
|
-
}), e0 = /* @__PURE__ */
|
|
4454
|
+
}), e0 = /* @__PURE__ */ $({
|
|
4455
4455
|
__name: "IdleCard",
|
|
4456
4456
|
setup(n) {
|
|
4457
4457
|
return (t, e) => (o(), V(p(_1), {
|
|
@@ -4477,7 +4477,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4477
4477
|
_: 1
|
|
4478
4478
|
}));
|
|
4479
4479
|
}
|
|
4480
|
-
}), t0 = /* @__PURE__ */
|
|
4480
|
+
}), t0 = /* @__PURE__ */ $({
|
|
4481
4481
|
__name: "LoadingCard",
|
|
4482
4482
|
setup(n) {
|
|
4483
4483
|
return (t, e) => (o(), V(p(_1), {
|
|
@@ -4490,7 +4490,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4490
4490
|
_: 1
|
|
4491
4491
|
}));
|
|
4492
4492
|
}
|
|
4493
|
-
}), l0 = /* @__PURE__ */
|
|
4493
|
+
}), l0 = /* @__PURE__ */ $({
|
|
4494
4494
|
__name: "NoMatchCard",
|
|
4495
4495
|
setup(n) {
|
|
4496
4496
|
return (t, e) => (o(), V(p(_1), {
|
|
@@ -4560,7 +4560,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4560
4560
|
}, i0 = { class: "flex-none flex items-center justify-between gap-1 px-4 py-1" }, d0 = {
|
|
4561
4561
|
key: 0,
|
|
4562
4562
|
class: "px-4 h-8 flex items-center text-ui-label-14-regular text-disabled-font"
|
|
4563
|
-
}, u0 = { class: "flex-0" }, H4 = /* @__PURE__ */
|
|
4563
|
+
}, u0 = { class: "flex-0" }, H4 = /* @__PURE__ */ $({
|
|
4564
4564
|
__name: "SelectList",
|
|
4565
4565
|
props: {
|
|
4566
4566
|
identifier: { default: "label" },
|
|
@@ -4580,37 +4580,37 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4580
4580
|
},
|
|
4581
4581
|
emits: ["escape", "selectQuery", "select"],
|
|
4582
4582
|
setup(n, { expose: t, emit: e }) {
|
|
4583
|
-
const l = n, s = e, { nextFrame: a } = Ce(), r =
|
|
4583
|
+
const l = n, s = e, { nextFrame: a } = Ce(), r = L(null), f = L([]), C = L(""), m = L(), d = L(), h = L(), b = L(), c = L(), H = L(l.filters ? l.filters[0] : null), v = L(!1), g = L(!1), T = L(""), z = (S) => {
|
|
4584
4584
|
if (!Array.isArray(S)) throw new Error("Item passed must be an Array");
|
|
4585
4585
|
return S.length === 0 ? !1 : "options" in S[0];
|
|
4586
|
-
}, y = O(() =>
|
|
4587
|
-
|
|
4586
|
+
}, y = O(() => z(l.options)), B = O(() => y.value ? l.options.flatMap((S) => S.options) : l.options), W = O(() => l.loading ? "loading" : l.errorMessage ? "error" : C.value.length && !f.value.length ? "no match" : f.value.length ? "match" : "idle"), Q = O(() => l.selected && "length" in l.selected), s1 = O(() => l.selected ? Q.value ? l.selected.length : 1 : 0), f1 = O(() => l.selected ? H.value ? l.selected.length >= B.value.filter(H.value.execute).length : Q.value ? l.selected.length === B.value.length : !1 : !1), E = O(() => l.selected ? Q.value ? !l.selected.length : !l.selected : !0);
|
|
4587
|
+
i1(() => l.selected, (S) => {
|
|
4588
4588
|
S && v.value && a(() => {
|
|
4589
|
-
if (h.value.update(),
|
|
4590
|
-
const G =
|
|
4591
|
-
p1 && (
|
|
4589
|
+
if (h.value.update(), Q.value && s1.value) {
|
|
4590
|
+
const G = b.value[b.value.length - 1].$el, p1 = c.value.$el.querySelector(".scrollbar__wrap");
|
|
4591
|
+
p1 && (st(p1, G), c.value.handleScroll());
|
|
4592
4592
|
}
|
|
4593
4593
|
});
|
|
4594
|
-
}),
|
|
4594
|
+
}), i1(() => l.options, (S) => {
|
|
4595
4595
|
g1(S), r.value = null;
|
|
4596
|
-
}), A1(() => g1(l.options)),
|
|
4597
|
-
!
|
|
4596
|
+
}), A1(() => g1(l.options)), a1(() => {
|
|
4597
|
+
!Q.value && l.selectAll && console.warn("[SelectList] selectAll prop not allowed when SelectList is not isMultiselect. You need to pass an Array of selected options (or empty) if you want it to be isMultiselect."), a(() => {
|
|
4598
4598
|
h.value && h.value.update(), m.value.addEventListener("keydown", I);
|
|
4599
4599
|
});
|
|
4600
4600
|
}), B1(() => m.value.removeEventListener("keydown", I));
|
|
4601
4601
|
const I = (S) => {
|
|
4602
|
-
S.key === "Enter" ? P() : S.key === "Escape" ? s("escape") : S.key === "ArrowDown" ?
|
|
4602
|
+
S.key === "Enter" ? P() : S.key === "Escape" ? s("escape") : S.key === "ArrowDown" ? A("next") : S.key === "ArrowUp" && A("prev");
|
|
4603
4603
|
}, J = (S) => {
|
|
4604
|
-
if (
|
|
4604
|
+
if (Q.value) {
|
|
4605
4605
|
const G = l.selected.map((p1) => p1.label).includes(S.label) ? [...l.selected.filter((p1) => p1.label !== S.label)] : [...l.selected, S];
|
|
4606
4606
|
s("select", G);
|
|
4607
4607
|
} else
|
|
4608
4608
|
s("select", S);
|
|
4609
4609
|
}, P = () => {
|
|
4610
4610
|
r.value ? J(r.value) : C.value.length && s("selectQuery", C.value);
|
|
4611
|
-
}, N = (S) => l.selected ?
|
|
4611
|
+
}, N = (S) => l.selected ? Q.value ? l.selected.some((G) => G[l.identifier] === S[l.identifier]) : S[l.identifier] === l.selected[l.identifier] : !1, n1 = async (S) => {
|
|
4612
4612
|
C.value = S, r.value = null, l.searchFunction && await l.searchFunction(S);
|
|
4613
|
-
}, S1 = l.searchDebounce ? ne(
|
|
4613
|
+
}, S1 = l.searchDebounce ? ne(n1, l.searchDebounce) : n1, g1 = (S) => {
|
|
4614
4614
|
var G;
|
|
4615
4615
|
if (y.value) {
|
|
4616
4616
|
const p1 = S;
|
|
@@ -4628,23 +4628,23 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4628
4628
|
}, F = (S) => {
|
|
4629
4629
|
H.value = S, g1(l.options);
|
|
4630
4630
|
}, Y = () => {
|
|
4631
|
-
if (!
|
|
4632
|
-
|
|
4633
|
-
},
|
|
4631
|
+
if (!Q.value) throw new Error('[SelectList@onToggleAll] method should not be called when "isMultiselect=false"');
|
|
4632
|
+
s1.value === 0 || s1.value && !f1.value ? s("select", H.value ? B.value.filter(H.value.execute) : B.value) : s("select", []);
|
|
4633
|
+
}, o1 = (S) => r.value = B.value.find((G) => G[l.identifier] === S[l.identifier]) || null, v1 = O(() => {
|
|
4634
4634
|
const S = Array.isArray(f.value) && f.value.length > 0 && "options" in f.value[0] ? f.value.flatMap((G) => G.options) : f.value;
|
|
4635
4635
|
return S.length > 0 && S.every((G) => !!G.disabled);
|
|
4636
|
-
}),
|
|
4636
|
+
}), A = async (S) => {
|
|
4637
4637
|
if (f.value.length === 0) return;
|
|
4638
|
-
let G =
|
|
4638
|
+
let G = B.value.findIndex((p1) => {
|
|
4639
4639
|
var Z1;
|
|
4640
4640
|
return p1.label === ((Z1 = r.value) == null ? void 0 : Z1.label);
|
|
4641
4641
|
});
|
|
4642
|
-
v1.value || (S === "next" ? (G++, G === f.value.length && (G = 0)) : S === "prev" && (G--, G < 0 && (G = f.value.length - 1)), r.value =
|
|
4642
|
+
v1.value || (S === "next" ? (G++, G === f.value.length && (G = 0)) : S === "prev" && (G--, G < 0 && (G = f.value.length - 1)), r.value = B.value[G], r.value.disabled === !0 && A(S), await D1(), r.value && U(r.value));
|
|
4643
4643
|
}, U = (S) => {
|
|
4644
4644
|
if (!d.value.children.length) return;
|
|
4645
4645
|
const G = null;
|
|
4646
4646
|
h.value;
|
|
4647
|
-
},
|
|
4647
|
+
}, K = () => {
|
|
4648
4648
|
v.value = !v.value, c.value.update();
|
|
4649
4649
|
}, d1 = O(() => v.value && g.value ? T.value : "border-transparent"), V1 = (S) => {
|
|
4650
4650
|
S.hit ? S.edge === "bottom" && S.hit ? T.value = "border-b-transparent border-t-outline-subtle shadow-scroll-top" : S.edge === "top" && S.hit && (T.value = "border-t-transparent border-b-outline-subtle shadow-scroll-bottom") : T.value = "border-y-outline-subtle shadow-scroll-y";
|
|
@@ -4653,7 +4653,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4653
4653
|
};
|
|
4654
4654
|
return t({
|
|
4655
4655
|
// focusSearch,
|
|
4656
|
-
isMultiselect:
|
|
4656
|
+
isMultiselect: Q,
|
|
4657
4657
|
reset: () => {
|
|
4658
4658
|
C.value = "", l.searchFunction ? l.searchFunction("") : g1([]), H.value = l.filters ? l.filters[0] : null;
|
|
4659
4659
|
},
|
|
@@ -4669,7 +4669,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4669
4669
|
})
|
|
4670
4670
|
}, [
|
|
4671
4671
|
S.$slots.header || S.searchFunction || S.filters || S.selectAll ? (o(), i("header", n0, [
|
|
4672
|
-
|
|
4672
|
+
R(S.$slots, "header"),
|
|
4673
4673
|
S.searchFunction ? (o(), i("section", o0, [
|
|
4674
4674
|
w(p(z1), {
|
|
4675
4675
|
class: "w-full",
|
|
@@ -4677,11 +4677,11 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4677
4677
|
value: C.value,
|
|
4678
4678
|
placeholder: S.placeholder,
|
|
4679
4679
|
onChange: p(S1),
|
|
4680
|
-
onClear: G[0] || (G[0] = (p1) =>
|
|
4680
|
+
onClear: G[0] || (G[0] = (p1) => n1(""))
|
|
4681
4681
|
}, null, 8, ["value", "placeholder", "onChange"])
|
|
4682
4682
|
])) : k("", !0),
|
|
4683
4683
|
S.filters ? (o(), i("section", s0, [
|
|
4684
|
-
(o(!0), i(M, null, m1(S.filters, (p1) => (o(), V(p(
|
|
4684
|
+
(o(!0), i(M, null, m1(S.filters, (p1) => (o(), V(p(j), {
|
|
4685
4685
|
key: p1.name,
|
|
4686
4686
|
small: "",
|
|
4687
4687
|
variant: "textSubtle",
|
|
@@ -4695,8 +4695,8 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4695
4695
|
class: "cursor-pointer flex items-center gap-2 p-1 rounded-lg hover:bg-secondary active:bg-tertiary",
|
|
4696
4696
|
onClick: Y
|
|
4697
4697
|
}, [
|
|
4698
|
-
w(p(
|
|
4699
|
-
indeterminate: !!(
|
|
4698
|
+
w(p(nt), {
|
|
4699
|
+
indeterminate: !!(s1.value && !f1.value),
|
|
4700
4700
|
checked: f1.value,
|
|
4701
4701
|
onClick: Y
|
|
4702
4702
|
}, null, 8, ["indeterminate", "checked"]),
|
|
@@ -4704,10 +4704,10 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4704
4704
|
])) : k("", !0)
|
|
4705
4705
|
])) : k("", !0),
|
|
4706
4706
|
u("main", a0, [
|
|
4707
|
-
|
|
4707
|
+
W.value === "error" ? (o(), V(p(_n), {
|
|
4708
4708
|
key: 0,
|
|
4709
4709
|
message: S.errorMessage
|
|
4710
|
-
}, null, 8, ["message"])) :
|
|
4710
|
+
}, null, 8, ["message"])) : W.value === "loading" ? (o(), V(p(t0), { key: 1 })) : W.value === "no match" ? (o(), V(p(l0), { key: 2 })) : W.value === "idle" ? (o(), V(p(e0), { key: 3 })) : W.value === "match" ? (o(), V(p(q1), {
|
|
4711
4711
|
key: 4,
|
|
4712
4712
|
ref_key: "scrollbarRef",
|
|
4713
4713
|
ref: h,
|
|
@@ -4718,14 +4718,14 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4718
4718
|
u("ul", {
|
|
4719
4719
|
ref_key: "optionsRef",
|
|
4720
4720
|
ref: d,
|
|
4721
|
-
class:
|
|
4721
|
+
class: D(["px-1", {
|
|
4722
4722
|
"py-1": S.small && y.value || !S.small && !y.value,
|
|
4723
4723
|
"py-2": !S.small && y.value
|
|
4724
4724
|
}])
|
|
4725
4725
|
}, [
|
|
4726
|
-
|
|
4726
|
+
R(S.$slots, "options", {
|
|
4727
4727
|
options: f.value,
|
|
4728
|
-
hover:
|
|
4728
|
+
hover: o1,
|
|
4729
4729
|
hoveredOption: r.value,
|
|
4730
4730
|
select: J,
|
|
4731
4731
|
getIsSelected: N
|
|
@@ -4738,14 +4738,14 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4738
4738
|
S.$slots.footer ? (o(), i("footer", r0, [
|
|
4739
4739
|
S.showSelection ? (o(), i(M, { key: 0 }, [
|
|
4740
4740
|
u("header", i0, [
|
|
4741
|
-
w(p(
|
|
4741
|
+
w(p(j), {
|
|
4742
4742
|
square: "",
|
|
4743
4743
|
size: "tiny",
|
|
4744
4744
|
variant: "text",
|
|
4745
4745
|
class: "-ml-4",
|
|
4746
|
-
label: `${v.value ? "Hide" : "Show"} selected items (${
|
|
4746
|
+
label: `${v.value ? "Hide" : "Show"} selected items (${s1.value})`,
|
|
4747
4747
|
"trailing-icon": v.value ? "chevron-down" : "chevron-up",
|
|
4748
|
-
onClick:
|
|
4748
|
+
onClick: K
|
|
4749
4749
|
}, null, 8, ["label", "trailing-icon"])
|
|
4750
4750
|
]),
|
|
4751
4751
|
w(p(q1), {
|
|
@@ -4753,14 +4753,14 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4753
4753
|
ref: c,
|
|
4754
4754
|
show: "",
|
|
4755
4755
|
tag: "ul",
|
|
4756
|
-
class:
|
|
4756
|
+
class: D(["border-y", d1.value]),
|
|
4757
4757
|
"view-height-class": v.value ? "flex-1 max-h-72" : "flex-none h-0",
|
|
4758
4758
|
onScrollYActive: L1,
|
|
4759
4759
|
onIntersect: V1
|
|
4760
4760
|
}, {
|
|
4761
4761
|
default: Z(() => [
|
|
4762
4762
|
v.value ? (o(), i(M, { key: 0 }, [
|
|
4763
|
-
|
|
4763
|
+
E.value ? (o(), i("span", d0, "Nothing selected")) : k("", !0),
|
|
4764
4764
|
G[2] || (G[2] = u("section", { class: "w-full px-4 flex flex-wrap items-center gap-2" }, null, -1))
|
|
4765
4765
|
], 64)) : k("", !0)
|
|
4766
4766
|
]),
|
|
@@ -4768,16 +4768,16 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4768
4768
|
}, 8, ["class", "view-height-class"])
|
|
4769
4769
|
], 64)) : k("", !0),
|
|
4770
4770
|
u("footer", u0, [
|
|
4771
|
-
|
|
4771
|
+
R(S.$slots, "footer")
|
|
4772
4772
|
])
|
|
4773
4773
|
])) : k("", !0)
|
|
4774
4774
|
], 4));
|
|
4775
4775
|
}
|
|
4776
|
-
}), V4 = ["error", "idle", "loading", "match", "no match"], k4 = ["checkbox", "deletable", "single"], he = /* @__PURE__ */
|
|
4776
|
+
}), V4 = ["error", "idle", "loading", "match", "no match"], k4 = ["checkbox", "deletable", "single"], he = /* @__PURE__ */ $({
|
|
4777
4777
|
__name: "WindowFrame",
|
|
4778
4778
|
setup(n, { expose: t }) {
|
|
4779
4779
|
var l;
|
|
4780
|
-
const e =
|
|
4780
|
+
const e = L();
|
|
4781
4781
|
return t({
|
|
4782
4782
|
focus: (l = e.value) == null ? void 0 : l.focus()
|
|
4783
4783
|
}), (s, a) => (o(), i("div", {
|
|
@@ -4786,13 +4786,13 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4786
4786
|
tabindex: "0",
|
|
4787
4787
|
class: "w-full flex flex-col bg-primary shadow-xl border border-default rounded-xl focus:outline-hidden"
|
|
4788
4788
|
}, [
|
|
4789
|
-
|
|
4789
|
+
R(s.$slots, "default")
|
|
4790
4790
|
], 512));
|
|
4791
4791
|
}
|
|
4792
4792
|
}), p0 = {
|
|
4793
4793
|
key: 0,
|
|
4794
4794
|
class: "px-6 flex items-center justify-between w-full h-12"
|
|
4795
|
-
}, f0 = { class: "px-6" }, c0 = { class: "px-6" }, w4 = /* @__PURE__ */
|
|
4795
|
+
}, f0 = { class: "px-6" }, c0 = { class: "px-6" }, w4 = /* @__PURE__ */ $({
|
|
4796
4796
|
__name: "SideOver",
|
|
4797
4797
|
props: {
|
|
4798
4798
|
closeable: { type: Boolean, default: !0 },
|
|
@@ -4805,8 +4805,8 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4805
4805
|
},
|
|
4806
4806
|
emits: ["close", "open"],
|
|
4807
4807
|
setup(n, { expose: t, emit: e }) {
|
|
4808
|
-
const l = e, s = R1(), a =
|
|
4809
|
-
|
|
4808
|
+
const l = e, s = R1(), a = L(!1), r = L();
|
|
4809
|
+
a1(() => a.value = !0);
|
|
4810
4810
|
const f = () => a.value = !1, C = async () => {
|
|
4811
4811
|
n.closeable && (n.interceptClose ? await n.interceptClose() && f() : f());
|
|
4812
4812
|
};
|
|
@@ -4820,7 +4820,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4820
4820
|
type: d.overlayType,
|
|
4821
4821
|
class: "p-4",
|
|
4822
4822
|
onClick: C,
|
|
4823
|
-
onClose: h[0] || (h[0] = (
|
|
4823
|
+
onClose: h[0] || (h[0] = (b) => l("close"))
|
|
4824
4824
|
}, {
|
|
4825
4825
|
default: Z(() => [
|
|
4826
4826
|
w(de, {
|
|
@@ -4836,7 +4836,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4836
4836
|
U1(w(he, {
|
|
4837
4837
|
ref_key: "panelRef",
|
|
4838
4838
|
ref: r,
|
|
4839
|
-
class:
|
|
4839
|
+
class: D(["flex flex-col overflow-hidden w-full h-full focus:outline-hidden", [d.widthClass, {
|
|
4840
4840
|
"py-4": !p(s).default,
|
|
4841
4841
|
"ml-auto": d.placement === "right",
|
|
4842
4842
|
"mr-auto": d.placement === "left"
|
|
@@ -4844,15 +4844,15 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4844
4844
|
style: { "pointer-events": "auto" }
|
|
4845
4845
|
}, {
|
|
4846
4846
|
default: Z(() => [
|
|
4847
|
-
d.$slots.default ?
|
|
4847
|
+
d.$slots.default ? R(d.$slots, "default", { key: 0 }) : (o(), V(p(me), { key: 1 }, Ae({
|
|
4848
4848
|
main: Z(() => [
|
|
4849
4849
|
u("main", f0, [
|
|
4850
|
-
|
|
4850
|
+
R(d.$slots, "main")
|
|
4851
4851
|
])
|
|
4852
4852
|
]),
|
|
4853
4853
|
footer: Z(() => [
|
|
4854
4854
|
u("footer", c0, [
|
|
4855
|
-
|
|
4855
|
+
R(d.$slots, "footer")
|
|
4856
4856
|
])
|
|
4857
4857
|
]),
|
|
4858
4858
|
_: 2
|
|
@@ -4862,14 +4862,14 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4862
4862
|
fn: Z(() => [
|
|
4863
4863
|
d.title ? (o(), i("header", p0, [
|
|
4864
4864
|
u("h4", null, X(d.title), 1),
|
|
4865
|
-
d.closeable ? (o(), V(p(
|
|
4865
|
+
d.closeable ? (o(), V(p(j), {
|
|
4866
4866
|
key: 0,
|
|
4867
4867
|
small: "",
|
|
4868
4868
|
icon: "close",
|
|
4869
4869
|
variant: "textSubtle",
|
|
4870
4870
|
onClick: C
|
|
4871
4871
|
})) : k("", !0)
|
|
4872
|
-
])) :
|
|
4872
|
+
])) : R(d.$slots, "header", { key: 1 })
|
|
4873
4873
|
]),
|
|
4874
4874
|
key: "0"
|
|
4875
4875
|
} : void 0
|
|
@@ -4887,12 +4887,12 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4887
4887
|
}, 8, ["show", "type"])
|
|
4888
4888
|
], 8, ["to"]));
|
|
4889
4889
|
}
|
|
4890
|
-
}), M4 = /* @__PURE__ */
|
|
4890
|
+
}), M4 = /* @__PURE__ */ $({
|
|
4891
4891
|
__name: "StatusSelect",
|
|
4892
4892
|
setup(n) {
|
|
4893
4893
|
return (t, e) => " TODO ";
|
|
4894
4894
|
}
|
|
4895
|
-
}), Z4 = /* @__PURE__ */
|
|
4895
|
+
}), Z4 = /* @__PURE__ */ $({
|
|
4896
4896
|
__name: "Switch",
|
|
4897
4897
|
props: {
|
|
4898
4898
|
value: { type: Boolean, default: !1 },
|
|
@@ -4910,7 +4910,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4910
4910
|
role: "checkbox",
|
|
4911
4911
|
tabindex: s.readonly ? -1 : 0,
|
|
4912
4912
|
"aria-checked": s.value,
|
|
4913
|
-
class:
|
|
4913
|
+
class: D([[
|
|
4914
4914
|
s.small ? "h-4" : "h-6",
|
|
4915
4915
|
s.value ? s.onColorClass : s.offColorClass,
|
|
4916
4916
|
s.readonly ? "cursor-default" : "cursor-pointer focus-visible:outline focus-visible:-outline-offset-2 focus-visible:outline-black dark:focus-visible:outline-white"
|
|
@@ -4925,7 +4925,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4925
4925
|
default: Z(() => [
|
|
4926
4926
|
u("span", {
|
|
4927
4927
|
"aria-hidden": "true",
|
|
4928
|
-
class:
|
|
4928
|
+
class: D([[
|
|
4929
4929
|
s.small ? "h-3 w-3" : "h-5 w-5",
|
|
4930
4930
|
s.value ? s.small ? "translate-x-3" : "translate-x-5" : "translate-x-0"
|
|
4931
4931
|
], "inline-block rounded-full bg-primary shadow-sm transform transition ease-in-out duration-200"])
|
|
@@ -4938,7 +4938,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4938
4938
|
key: 0,
|
|
4939
4939
|
class: "absolute",
|
|
4940
4940
|
style: { top: "0em", right: "-0.6em" }
|
|
4941
|
-
}, $4 = /* @__PURE__ */
|
|
4941
|
+
}, $4 = /* @__PURE__ */ $({
|
|
4942
4942
|
__name: "Tab",
|
|
4943
4943
|
props: {
|
|
4944
4944
|
icon: {},
|
|
@@ -4952,14 +4952,14 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4952
4952
|
},
|
|
4953
4953
|
emits: ["select"],
|
|
4954
4954
|
setup(n, { emit: t }) {
|
|
4955
|
-
const e = n, l = t, s =
|
|
4955
|
+
const e = n, l = t, s = L(), a = () => {
|
|
4956
4956
|
s.value.blur(), l("select", e.name);
|
|
4957
4957
|
};
|
|
4958
4958
|
return (r, f) => (o(), i("button", {
|
|
4959
4959
|
ref_key: "tabRef",
|
|
4960
4960
|
ref: s,
|
|
4961
4961
|
disabled: r.disabled,
|
|
4962
|
-
class:
|
|
4962
|
+
class: D(["cursor-pointer", {
|
|
4963
4963
|
"text-sm gap-2 px-4 h-8": r.size === "default" && r.type === "default",
|
|
4964
4964
|
"text-xs gap-1 px-3 h-6": r.size === "small" && r.type === "default",
|
|
4965
4965
|
"relative flex items-center justify-center border-b focus:outline-hidden focus-visible:outline": r.type === "default",
|
|
@@ -4982,12 +4982,12 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4982
4982
|
u("span", v0, [
|
|
4983
4983
|
Ee(X(r.name) + " ", 1),
|
|
4984
4984
|
r.notification ? (o(), i("div", h0, [
|
|
4985
|
-
w(p(
|
|
4985
|
+
w(p(_e))
|
|
4986
4986
|
])) : k("", !0)
|
|
4987
4987
|
])
|
|
4988
4988
|
], 10, C0));
|
|
4989
4989
|
}
|
|
4990
|
-
}), m0 = { class: "truncate" }, D4 = /* @__PURE__ */
|
|
4990
|
+
}), m0 = { class: "truncate" }, D4 = /* @__PURE__ */ $({
|
|
4991
4991
|
__name: "Tag",
|
|
4992
4992
|
props: {
|
|
4993
4993
|
label: {},
|
|
@@ -4999,7 +4999,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
4999
4999
|
const e = t;
|
|
5000
5000
|
return (l, s) => (o(), V(p(e1), {
|
|
5001
5001
|
inline: "",
|
|
5002
|
-
class:
|
|
5002
|
+
class: D(["h-5 truncate text-xs rounded-sm text-tertiary bg-tertiary", {
|
|
5003
5003
|
"px-1": !l.deletable,
|
|
5004
5004
|
"pl-1 pr-0.5": l.deletable
|
|
5005
5005
|
}])
|
|
@@ -5015,7 +5015,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
5015
5015
|
]),
|
|
5016
5016
|
_: 1
|
|
5017
5017
|
}),
|
|
5018
|
-
l.deletable ? (o(), V(p(
|
|
5018
|
+
l.deletable ? (o(), V(p(j), {
|
|
5019
5019
|
key: 0,
|
|
5020
5020
|
small: "",
|
|
5021
5021
|
variant: "textSubtle",
|
|
@@ -5028,7 +5028,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
5028
5028
|
_: 1
|
|
5029
5029
|
}, 8, ["class"]));
|
|
5030
5030
|
}
|
|
5031
|
-
}), ee = /* @__PURE__ */
|
|
5031
|
+
}), ee = /* @__PURE__ */ $({
|
|
5032
5032
|
__name: "Tooltip",
|
|
5033
5033
|
props: {
|
|
5034
5034
|
bgColorClass: { default: "bg-black" },
|
|
@@ -5042,7 +5042,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
5042
5042
|
triggerFullWidth: { type: Boolean, default: !1 }
|
|
5043
5043
|
},
|
|
5044
5044
|
setup(n, { expose: t }) {
|
|
5045
|
-
const e = n, l =
|
|
5045
|
+
const e = n, l = L();
|
|
5046
5046
|
return t({ hide: () => {
|
|
5047
5047
|
l.value && l.value.close();
|
|
5048
5048
|
} }), (s, a) => (o(), V(p(Y1), {
|
|
@@ -5059,19 +5059,19 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
5059
5059
|
content: Z(() => [
|
|
5060
5060
|
e.text ? (o(), i("div", {
|
|
5061
5061
|
key: 0,
|
|
5062
|
-
class:
|
|
5062
|
+
class: D(["z-50 min-w-0 px-2 py-1 rounded-md text-sm shadow-sm-md", [e.bgColorClass, e.textColorClass]])
|
|
5063
5063
|
}, [
|
|
5064
5064
|
u("span", null, X(e.text), 1),
|
|
5065
|
-
|
|
5065
|
+
R(s.$slots, "content")
|
|
5066
5066
|
], 2)) : k("", !0)
|
|
5067
5067
|
]),
|
|
5068
5068
|
default: Z(() => [
|
|
5069
|
-
|
|
5069
|
+
R(s.$slots, "default")
|
|
5070
5070
|
]),
|
|
5071
5071
|
_: 3
|
|
5072
5072
|
}, 8, ["trigger", "open-delay", "offset-options", "root-class", "trigger-class", "placement"]));
|
|
5073
5073
|
}
|
|
5074
|
-
}), g0 = { class: "text-xs" }, b0 = /* @__PURE__ */
|
|
5074
|
+
}), g0 = { class: "text-xs" }, b0 = /* @__PURE__ */ $({
|
|
5075
5075
|
__name: "EntryTag",
|
|
5076
5076
|
props: {
|
|
5077
5077
|
entry: {}
|
|
@@ -5086,7 +5086,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
5086
5086
|
w(p(e1), {
|
|
5087
5087
|
id: s.entry.id,
|
|
5088
5088
|
tabindex: "1",
|
|
5089
|
-
class:
|
|
5089
|
+
class: D(["gap-0.5 h-6 pl-1 pr-0.5 rounded-md border cursor-default", {
|
|
5090
5090
|
"border-strong text-primary": !p(ie)(s.entry.error),
|
|
5091
5091
|
"border-red-400 text-red-400 focus:bg-red-400 focus:text-white": p(ie)(s.entry.error)
|
|
5092
5092
|
}]),
|
|
@@ -5110,7 +5110,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
5110
5110
|
_: 1
|
|
5111
5111
|
}, 8, ["text"]));
|
|
5112
5112
|
}
|
|
5113
|
-
}), L0 = ["value", "placeholder"], B4 = /* @__PURE__ */
|
|
5113
|
+
}), L0 = ["value", "placeholder"], B4 = /* @__PURE__ */ $({
|
|
5114
5114
|
__name: "TagInput",
|
|
5115
5115
|
props: {
|
|
5116
5116
|
placeholder: { default: "Enter value, comma separated" },
|
|
@@ -5118,12 +5118,12 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
5118
5118
|
},
|
|
5119
5119
|
emits: ["update:entries"],
|
|
5120
5120
|
setup(n, { expose: t, emit: e }) {
|
|
5121
|
-
const l = e, s =
|
|
5122
|
-
r.value = [...r.value, ...m(
|
|
5123
|
-
}, C = (
|
|
5124
|
-
|
|
5125
|
-
}, m = (
|
|
5126
|
-
const v = c.trim(), g = [...n.validators].reduce((T,
|
|
5121
|
+
const l = e, s = L(), a = L(""), r = L([]), f = (b) => {
|
|
5122
|
+
r.value = [...r.value, ...m(b)], l("update:entries", r.value);
|
|
5123
|
+
}, C = (b) => {
|
|
5124
|
+
b.target && (a.value = b.target.value, (b.data === "," || a.value.includes(",")) && (r.value = [...r.value, ...m(a.value)], a.value = "", l("update:entries", r.value)));
|
|
5125
|
+
}, m = (b) => b.trim().split(",").filter((c) => c.length).map((c, H) => {
|
|
5126
|
+
const v = c.trim(), g = [...n.validators].reduce((T, z, y, B) => (z.validate(v) || (T = z.errorMessage(v), B.splice(1)), T), null);
|
|
5127
5127
|
return {
|
|
5128
5128
|
id: H + v + Date.now(),
|
|
5129
5129
|
value: v,
|
|
@@ -5131,13 +5131,13 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
5131
5131
|
};
|
|
5132
5132
|
}), d = () => {
|
|
5133
5133
|
if (a.value.length || !r.value.length) return;
|
|
5134
|
-
const
|
|
5134
|
+
const b = r.value[r.value.length - 1].id, c = document.getElementById(b);
|
|
5135
5135
|
c && c.focus();
|
|
5136
|
-
}, h = (
|
|
5136
|
+
}, h = (b) => {
|
|
5137
5137
|
var c;
|
|
5138
|
-
r.value = r.value.filter((H) => H.id !==
|
|
5138
|
+
r.value = r.value.filter((H) => H.id !== b), l("update:entries", r.value), (c = s.value) == null || c.focus();
|
|
5139
5139
|
};
|
|
5140
|
-
return t({ importEntries: f, inputElement: s }), (
|
|
5140
|
+
return t({ importEntries: f, inputElement: s }), (b, c) => (o(), V(p(e1), { class: "flex-1 flex-wrap gap-1 px-2 py-1" }, {
|
|
5141
5141
|
default: Z(() => [
|
|
5142
5142
|
(o(!0), i(M, null, m1(r.value, (H) => (o(), V(p(b0), {
|
|
5143
5143
|
key: H.id,
|
|
@@ -5149,7 +5149,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
5149
5149
|
ref: s,
|
|
5150
5150
|
type: "text",
|
|
5151
5151
|
value: a.value,
|
|
5152
|
-
placeholder: r.value.length ? "" :
|
|
5152
|
+
placeholder: r.value.length ? "" : b.placeholder,
|
|
5153
5153
|
class: "flex-1 min-w-0 h-6 text-xs leading-tight bg-transparent focus:outline-hidden",
|
|
5154
5154
|
onKeyup: _(d, ["delete"]),
|
|
5155
5155
|
onChange: c[0] || (c[0] = x(() => {
|
|
@@ -5166,7 +5166,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
5166
5166
|
}, y0 = {
|
|
5167
5167
|
key: 1,
|
|
5168
5168
|
class: "text-xs leading-none"
|
|
5169
|
-
}, c1 = /* @__PURE__ */
|
|
5169
|
+
}, c1 = /* @__PURE__ */ $({
|
|
5170
5170
|
__name: "FormattingButton",
|
|
5171
5171
|
props: {
|
|
5172
5172
|
active: { type: Boolean, default: !1 },
|
|
@@ -5188,7 +5188,7 @@ const Vn = ["onKeydown"], kn = /* @__PURE__ */ D({
|
|
|
5188
5188
|
tag: "button",
|
|
5189
5189
|
inline: "",
|
|
5190
5190
|
justify: "center",
|
|
5191
|
-
class:
|
|
5191
|
+
class: D(["h-8 gap-2 rounded-lg border border-transparent focus:outline-hidden focus:border-strong", {
|
|
5192
5192
|
"bg-tertiary text-primary font-bold": l.active && !l.highlight,
|
|
5193
5193
|
"bg-tertiary text-action border border-default": l.highlight,
|
|
5194
5194
|
"text-tertiary bg-transparent": !l.active && !l.disabled && !l.highlight,
|
|
@@ -5218,7 +5218,7 @@ function k0(n, t) {
|
|
|
5218
5218
|
u("div", { class: "w-px h-full bg-tertiary" }, null, -1)
|
|
5219
5219
|
])]);
|
|
5220
5220
|
}
|
|
5221
|
-
const T4 = /* @__PURE__ */ M1(H0, [["render", k0]]), Te =
|
|
5221
|
+
const T4 = /* @__PURE__ */ M1(H0, [["render", k0]]), Te = Ne.create({
|
|
5222
5222
|
name: "enterKeyBehaviour",
|
|
5223
5223
|
priority: 1e3,
|
|
5224
5224
|
addOptions() {
|
|
@@ -5274,7 +5274,7 @@ const T4 = /* @__PURE__ */ M1(H0, [["render", k0]]), Te = Pe.create({
|
|
|
5274
5274
|
for (; f < s.length && /\w/.test(s[f]); )
|
|
5275
5275
|
f++;
|
|
5276
5276
|
return s.slice(r + 1, f) || null;
|
|
5277
|
-
}, M0 =
|
|
5277
|
+
}, M0 = Ne.create({
|
|
5278
5278
|
name: "pasteImage",
|
|
5279
5279
|
addProseMirrorPlugins() {
|
|
5280
5280
|
return [
|
|
@@ -5313,12 +5313,12 @@ const T4 = /* @__PURE__ */ M1(H0, [["render", k0]]), Te = Pe.create({
|
|
|
5313
5313
|
n.chain().focus().command(({ tr: h }) => (h.insertText(t, m, d), !0)).run();
|
|
5314
5314
|
};
|
|
5315
5315
|
function $0(n, t, e) {
|
|
5316
|
-
const l =
|
|
5316
|
+
const l = L(null), s = () => {
|
|
5317
5317
|
var r, f, C;
|
|
5318
5318
|
const a = ((C = (f = (r = n.value) == null ? void 0 : r.storage) == null ? void 0 : f[t]) == null ? void 0 : C[e]) ?? null;
|
|
5319
5319
|
l.value !== a && (l.value = a);
|
|
5320
5320
|
};
|
|
5321
|
-
return
|
|
5321
|
+
return a1(() => {
|
|
5322
5322
|
var a, r;
|
|
5323
5323
|
(a = n.value) == null || a.on("update", s), (r = n.value) == null || r.on("transaction", s), s();
|
|
5324
5324
|
}), B1(() => {
|
|
@@ -5326,49 +5326,49 @@ function $0(n, t, e) {
|
|
|
5326
5326
|
(a = n.value) == null || a.off("update", s), (r = n.value) == null || r.off("transaction", s);
|
|
5327
5327
|
}), l;
|
|
5328
5328
|
}
|
|
5329
|
-
const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE__ */
|
|
5329
|
+
const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE__ */ $({
|
|
5330
5330
|
__name: "InserLink",
|
|
5331
5331
|
props: {
|
|
5332
5332
|
editor: {}
|
|
5333
5333
|
},
|
|
5334
5334
|
emits: ["cancel", "inserted", "updateTargets"],
|
|
5335
5335
|
setup(n, { emit: t }) {
|
|
5336
|
-
const e = n, l = t, s =
|
|
5336
|
+
const e = n, l = t, s = L(), a = L(), r = L(""), f = (y) => r.value = y, C = () => {
|
|
5337
5337
|
var y;
|
|
5338
|
-
c.value ?
|
|
5339
|
-
}, m =
|
|
5340
|
-
c.value &&
|
|
5338
|
+
c.value ? z() : (y = d.value) == null || y.focus();
|
|
5339
|
+
}, m = L(""), d = L(), h = (y) => m.value = y, b = () => {
|
|
5340
|
+
c.value && z();
|
|
5341
5341
|
}, c = O(() => {
|
|
5342
|
-
var y,
|
|
5343
|
-
return !m.value || !r.value ? !1 : ((y = m.value) == null ? void 0 : y.trim().length) > 0 && ((
|
|
5344
|
-
}), H =
|
|
5342
|
+
var y, B;
|
|
5343
|
+
return !m.value || !r.value ? !1 : ((y = m.value) == null ? void 0 : y.trim().length) > 0 && ((B = r.value) == null ? void 0 : B.trim().length) > 0;
|
|
5344
|
+
}), H = L(!1), v = ([y, B]) => {
|
|
5345
5345
|
var J, P;
|
|
5346
|
-
const { state:
|
|
5346
|
+
const { state: W, view: Q } = e.editor, { empty: s1, from: f1 } = W.selection, I = W.doc.resolve(f1).marks().find((N) => N.type.name === "link");
|
|
5347
5347
|
if (I)
|
|
5348
5348
|
m.value = I.attrs.href;
|
|
5349
|
-
else if (
|
|
5349
|
+
else if (s1)
|
|
5350
5350
|
r.value = w0(e.editor) || "", H.value = !0;
|
|
5351
5351
|
else {
|
|
5352
|
-
const { from: N, to:
|
|
5353
|
-
r.value =
|
|
5352
|
+
const { from: N, to: n1 } = Q.state.selection;
|
|
5353
|
+
r.value = W.doc.textBetween(N, n1, "");
|
|
5354
5354
|
}
|
|
5355
|
-
r.value.trim().length ? (J = d.value) == null || J.focus() : (P = a.value) == null || P.focus(), l("updateTargets", [
|
|
5355
|
+
r.value.trim().length ? (J = d.value) == null || J.focus() : (P = a.value) == null || P.focus(), l("updateTargets", [B]);
|
|
5356
5356
|
}, g = () => l("updateTargets", []), T = () => {
|
|
5357
5357
|
m.value = "", r.value = "";
|
|
5358
|
-
},
|
|
5358
|
+
}, z = () => {
|
|
5359
5359
|
var y;
|
|
5360
5360
|
if (m.value && !m.value.includes("http") && (m.value = `https://${m.value}`), m.value) {
|
|
5361
5361
|
if (e.editor.chain().focus().extendMarkRange("link").setLink({ href: m.value }).run(), H.value)
|
|
5362
5362
|
Z0(e.editor, r.value);
|
|
5363
5363
|
else {
|
|
5364
|
-
const
|
|
5365
|
-
e.editor.view.dispatch(
|
|
5364
|
+
const B = e.editor.state.tr.insertText(r.value);
|
|
5365
|
+
e.editor.view.dispatch(B);
|
|
5366
5366
|
}
|
|
5367
5367
|
l("inserted");
|
|
5368
5368
|
}
|
|
5369
5369
|
(y = s.value) == null || y.close(), T();
|
|
5370
5370
|
};
|
|
5371
|
-
return (y,
|
|
5371
|
+
return (y, B) => (o(), V(p(Y1), {
|
|
5372
5372
|
ref_key: "popperRef",
|
|
5373
5373
|
ref: s,
|
|
5374
5374
|
placement: "top",
|
|
@@ -5376,18 +5376,18 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5376
5376
|
onOpen: v,
|
|
5377
5377
|
onClose: g
|
|
5378
5378
|
}, {
|
|
5379
|
-
default: Z(({ visible:
|
|
5379
|
+
default: Z(({ visible: W }) => [
|
|
5380
5380
|
w(c1, {
|
|
5381
5381
|
icon: "link",
|
|
5382
|
-
active:
|
|
5382
|
+
active: W
|
|
5383
5383
|
}, null, 8, ["active"])
|
|
5384
5384
|
]),
|
|
5385
|
-
content: Z(({ close:
|
|
5385
|
+
content: Z(({ close: W }) => [
|
|
5386
5386
|
w(p(W1), { class: "p-4 flex flex-col gap-4" }, {
|
|
5387
5387
|
default: Z(() => [
|
|
5388
|
-
|
|
5388
|
+
B[2] || (B[2] = u("p", { class: "text-sm" }, " Insert link ", -1)),
|
|
5389
5389
|
u("section", D0, [
|
|
5390
|
-
|
|
5390
|
+
B[0] || (B[0] = u("div", {
|
|
5391
5391
|
style: { "font-size": "11px" },
|
|
5392
5392
|
class: "text-secondary font-medium"
|
|
5393
5393
|
}, " Text to display ", -1)),
|
|
@@ -5401,7 +5401,7 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5401
5401
|
}, null, 8, ["value"])
|
|
5402
5402
|
]),
|
|
5403
5403
|
u("section", B0, [
|
|
5404
|
-
|
|
5404
|
+
B[1] || (B[1] = u("div", {
|
|
5405
5405
|
style: { "font-size": "11px" },
|
|
5406
5406
|
class: "text-secondary font-medium"
|
|
5407
5407
|
}, " Address ", -1)),
|
|
@@ -5411,7 +5411,7 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5411
5411
|
placeholder: "Link to a web page",
|
|
5412
5412
|
value: m.value || "",
|
|
5413
5413
|
onChange: h,
|
|
5414
|
-
onEnter:
|
|
5414
|
+
onEnter: b
|
|
5415
5415
|
}, null, 8, ["value"])
|
|
5416
5416
|
]),
|
|
5417
5417
|
w(p(E1), {
|
|
@@ -5419,9 +5419,9 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5419
5419
|
order: "confirm-last",
|
|
5420
5420
|
"confirm-label": "Insert",
|
|
5421
5421
|
"confirm-disabled": !c.value,
|
|
5422
|
-
onConfirm:
|
|
5423
|
-
onCancel: (
|
|
5424
|
-
T(),
|
|
5422
|
+
onConfirm: z,
|
|
5423
|
+
onCancel: (Q) => {
|
|
5424
|
+
T(), W();
|
|
5425
5425
|
}
|
|
5426
5426
|
}, null, 8, ["confirm-disabled", "onCancel"])
|
|
5427
5427
|
]),
|
|
@@ -5431,13 +5431,13 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5431
5431
|
_: 1
|
|
5432
5432
|
}, 512));
|
|
5433
5433
|
}
|
|
5434
|
-
}), A4 = /* @__PURE__ */
|
|
5434
|
+
}), A4 = /* @__PURE__ */ $({
|
|
5435
5435
|
__name: "InsertImage",
|
|
5436
5436
|
props: {
|
|
5437
5437
|
editor: {}
|
|
5438
5438
|
},
|
|
5439
5439
|
setup(n) {
|
|
5440
|
-
const t =
|
|
5440
|
+
const t = L(), e = (s) => {
|
|
5441
5441
|
var f;
|
|
5442
5442
|
const a = (f = s.target.files) == null ? void 0 : f[0];
|
|
5443
5443
|
if (!a) return;
|
|
@@ -5464,30 +5464,30 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5464
5464
|
}, null, 544)
|
|
5465
5465
|
], 64));
|
|
5466
5466
|
}
|
|
5467
|
-
}), S0 = { class: "p-4 space-y-2" },
|
|
5467
|
+
}), S0 = { class: "p-4 space-y-2" }, rt = /* @__PURE__ */ $({
|
|
5468
5468
|
__name: "Dialog",
|
|
5469
5469
|
setup(n) {
|
|
5470
5470
|
return (t, e) => (o(), V(x1, { to: "#modals" }, [
|
|
5471
5471
|
w(p(W1), { class: "w-96" }, {
|
|
5472
5472
|
default: Z(() => [
|
|
5473
5473
|
u("div", S0, [
|
|
5474
|
-
|
|
5474
|
+
R(t.$slots, "default")
|
|
5475
5475
|
])
|
|
5476
5476
|
]),
|
|
5477
5477
|
_: 3
|
|
5478
5478
|
})
|
|
5479
5479
|
]));
|
|
5480
5480
|
}
|
|
5481
|
-
}), T0 = { class: "space-y-1" }, z0 = { class: "space-y-1" }, A0 = /* @__PURE__ */
|
|
5481
|
+
}), T0 = { class: "space-y-1" }, z0 = { class: "space-y-1" }, A0 = /* @__PURE__ */ $({
|
|
5482
5482
|
__name: "InsertLinkDialog",
|
|
5483
5483
|
props: {
|
|
5484
5484
|
editor: {}
|
|
5485
5485
|
},
|
|
5486
5486
|
emits: ["cancel", "inserted"],
|
|
5487
5487
|
setup(n, { emit: t }) {
|
|
5488
|
-
const e = n, l = t, s =
|
|
5488
|
+
const e = n, l = t, s = L(null), a = L(null), r = L(), f = () => {
|
|
5489
5489
|
s.value = e.editor.getAttributes("link").href;
|
|
5490
|
-
const { view: h, state:
|
|
5490
|
+
const { view: h, state: b } = e.editor;
|
|
5491
5491
|
if (s.value) {
|
|
5492
5492
|
const c = h.state.selection.ranges[0].$from.parent.content.content.filter(
|
|
5493
5493
|
(H) => H.marks.length > 0 && H.marks[0].attrs.href === s.value
|
|
@@ -5495,10 +5495,10 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5495
5495
|
a.value = c[0].text;
|
|
5496
5496
|
} else {
|
|
5497
5497
|
const { from: c, to: H } = h.state.selection;
|
|
5498
|
-
a.value =
|
|
5498
|
+
a.value = b.doc.textBetween(c, H, "");
|
|
5499
5499
|
}
|
|
5500
5500
|
};
|
|
5501
|
-
A1(() => f()),
|
|
5501
|
+
A1(() => f()), a1(() => r.value.focus());
|
|
5502
5502
|
const C = (h) => s.value = h, m = (h) => a.value = h, d = () => {
|
|
5503
5503
|
if (s.value && !s.value.includes("http") && (s.value = `https://${s.value}`), s.value) {
|
|
5504
5504
|
e.editor.chain().focus().extendMarkRange("link").setLink({ href: s.value }).run();
|
|
@@ -5506,11 +5506,11 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5506
5506
|
e.editor.view.dispatch(h), l("inserted");
|
|
5507
5507
|
}
|
|
5508
5508
|
};
|
|
5509
|
-
return (h,
|
|
5509
|
+
return (h, b) => (o(), V(rt, null, {
|
|
5510
5510
|
default: Z(() => [
|
|
5511
|
-
|
|
5511
|
+
b[3] || (b[3] = u("header", null, "Insert link", -1)),
|
|
5512
5512
|
u("section", T0, [
|
|
5513
|
-
|
|
5513
|
+
b[1] || (b[1] = u("div", { class: "text-xs text-secondary" }, " Text to display ", -1)),
|
|
5514
5514
|
w(p(z1), {
|
|
5515
5515
|
ref_key: "inputRef",
|
|
5516
5516
|
ref: r,
|
|
@@ -5520,7 +5520,7 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5520
5520
|
}, null, 8, ["value"])
|
|
5521
5521
|
]),
|
|
5522
5522
|
u("section", z0, [
|
|
5523
|
-
|
|
5523
|
+
b[2] || (b[2] = u("div", { class: "text-xs text-secondary" }, " Address ", -1)),
|
|
5524
5524
|
w(p(z1), {
|
|
5525
5525
|
placeholder: "Link to a web page",
|
|
5526
5526
|
value: s.value || "",
|
|
@@ -5530,24 +5530,24 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5530
5530
|
w(p(E1), {
|
|
5531
5531
|
"confirm-label": "Insert",
|
|
5532
5532
|
onConfirm: d,
|
|
5533
|
-
onCancel:
|
|
5533
|
+
onCancel: b[0] || (b[0] = (c) => l("cancel"))
|
|
5534
5534
|
})
|
|
5535
5535
|
]),
|
|
5536
5536
|
_: 1
|
|
5537
5537
|
}));
|
|
5538
5538
|
}
|
|
5539
|
-
}), R0 = { class: "space-y-1" }, E0 = { class: "flex flex-1 justify-end" }, O0 = /* @__PURE__ */
|
|
5539
|
+
}), R0 = { class: "space-y-1" }, E0 = { class: "flex flex-1 justify-end" }, O0 = /* @__PURE__ */ $({
|
|
5540
5540
|
__name: "InsertTextDialog",
|
|
5541
5541
|
emits: ["cancel", "insert"],
|
|
5542
5542
|
setup(n, { emit: t }) {
|
|
5543
|
-
const e = t, l =
|
|
5544
|
-
|
|
5543
|
+
const e = t, l = L(null), s = L();
|
|
5544
|
+
a1(() => s.value.focus());
|
|
5545
5545
|
const a = () => {
|
|
5546
5546
|
e("cancel"), l.value = null;
|
|
5547
5547
|
}, r = (C) => l.value = C, f = () => {
|
|
5548
5548
|
e("insert", l.value), l.value = null;
|
|
5549
5549
|
};
|
|
5550
|
-
return (C, m) => (o(), V(
|
|
5550
|
+
return (C, m) => (o(), V(rt, null, {
|
|
5551
5551
|
default: Z(() => [
|
|
5552
5552
|
m[0] || (m[0] = u("header", null, "Insert text", -1)),
|
|
5553
5553
|
u("section", R0, [
|
|
@@ -5573,7 +5573,7 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5573
5573
|
}), I0 = { key: 1 }, P0 = {
|
|
5574
5574
|
key: 0,
|
|
5575
5575
|
class: "pr-1"
|
|
5576
|
-
}, R4 = /* @__PURE__ */
|
|
5576
|
+
}, R4 = /* @__PURE__ */ $({
|
|
5577
5577
|
__name: "TextEditor",
|
|
5578
5578
|
props: {
|
|
5579
5579
|
autoHideMenu: { type: Boolean, default: !1 },
|
|
@@ -5600,23 +5600,23 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5600
5600
|
},
|
|
5601
5601
|
emits: ["blur", "change", "focus"],
|
|
5602
5602
|
setup(n, { expose: t, emit: e }) {
|
|
5603
|
-
const l = n, s = e, a =
|
|
5603
|
+
const l = n, s = e, a = L(!1), r = L(!1), f = L(!1), C = L(!1), m = L(), { disableClickOutside: d, enableClickOutside: h } = fe(() => r.value = !1), b = Ge({
|
|
5604
5604
|
content: l.content,
|
|
5605
5605
|
extensions: [
|
|
5606
|
-
Ne,
|
|
5607
5606
|
Fe,
|
|
5607
|
+
xe,
|
|
5608
5608
|
oe,
|
|
5609
5609
|
se,
|
|
5610
5610
|
ae,
|
|
5611
|
-
Ue,
|
|
5612
|
-
re,
|
|
5613
5611
|
Ye,
|
|
5612
|
+
re,
|
|
5614
5613
|
We,
|
|
5615
|
-
qe,
|
|
5616
|
-
xe,
|
|
5617
5614
|
je,
|
|
5618
|
-
|
|
5619
|
-
|
|
5615
|
+
Xe,
|
|
5616
|
+
Ue,
|
|
5617
|
+
Ke,
|
|
5618
|
+
qe,
|
|
5619
|
+
Qe.configure({
|
|
5620
5620
|
placeholder: l.placeholder || ""
|
|
5621
5621
|
})
|
|
5622
5622
|
],
|
|
@@ -5633,22 +5633,22 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5633
5633
|
});
|
|
5634
5634
|
B1(() => d());
|
|
5635
5635
|
const c = O(() => l.showMenu !== void 0 ? l.showMenu : r.value || !l.autoHideMenu), H = O(() => r.value ? "bg-1 border-b border-default opacity-100" : "bg-2 border-b border-subtle opacity-50"), v = O(() => r.value ? "bg-2 border-t border-default opacity-100" : "bg-2 border-t border-subtle opacity-50"), g = ["start", "end", "all"], T = (P) => {
|
|
5636
|
-
var
|
|
5636
|
+
var n1;
|
|
5637
5637
|
const N = g.includes(P) ? P : "end";
|
|
5638
|
-
(
|
|
5639
|
-
},
|
|
5638
|
+
(n1 = b.value) == null || n1.commands.focus(N);
|
|
5639
|
+
}, z = () => {
|
|
5640
5640
|
var P;
|
|
5641
|
-
(P =
|
|
5642
|
-
}, y = () => C.value = !1,
|
|
5641
|
+
(P = b.value) == null || P.commands.blur(), r.value = !1;
|
|
5642
|
+
}, y = () => C.value = !1, B = () => r.value = !0, W = () => C.value = !1, Q = (P) => {
|
|
5643
5643
|
var N;
|
|
5644
|
-
return (N =
|
|
5645
|
-
},
|
|
5646
|
-
|
|
5647
|
-
}, f1 = () => C.value = !0,
|
|
5648
|
-
return t({ blur:
|
|
5644
|
+
return (N = b.value) == null ? void 0 : N.commands.insertContent(P);
|
|
5645
|
+
}, s1 = (P) => {
|
|
5646
|
+
Q(P), f.value = !1;
|
|
5647
|
+
}, f1 = () => C.value = !0, E = () => f.value = !0;
|
|
5648
|
+
return t({ blur: z, closeInsert: () => f.value = !1, focus: T, setContent: (P) => {
|
|
5649
5649
|
var N;
|
|
5650
|
-
return (N =
|
|
5651
|
-
} }), (P, N) => p(
|
|
5650
|
+
return (N = b.value) == null ? void 0 : N.commands.setContent(P);
|
|
5651
|
+
} }), (P, N) => p(b) ? (o(), i("section", {
|
|
5652
5652
|
key: 0,
|
|
5653
5653
|
ref_key: "editorRef",
|
|
5654
5654
|
ref: m,
|
|
@@ -5657,7 +5657,7 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5657
5657
|
w(p(e1), {
|
|
5658
5658
|
col: "",
|
|
5659
5659
|
align: "stretch",
|
|
5660
|
-
class:
|
|
5660
|
+
class: D(["relative rounded-lg font-normal focus-within:border-default", {
|
|
5661
5661
|
border: !P.embedded,
|
|
5662
5662
|
"flex-1 min-h-0": P.expandVertically,
|
|
5663
5663
|
"shadow-sm-outline border-action": r.value,
|
|
@@ -5669,7 +5669,7 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5669
5669
|
P.headerLabel || P.headerIcon ? (o(), V(p(e1), {
|
|
5670
5670
|
key: 0,
|
|
5671
5671
|
tag: "header",
|
|
5672
|
-
class:
|
|
5672
|
+
class: D(["flex-0 h-10 px-3 gap-2 text-sm text-primary rounded-t-lg overflow-hidden", H.value])
|
|
5673
5673
|
}, {
|
|
5674
5674
|
default: Z(() => [
|
|
5675
5675
|
P.headerIcon ? (o(), V(p(l1), {
|
|
@@ -5686,19 +5686,19 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5686
5686
|
fullwidth: ""
|
|
5687
5687
|
}, {
|
|
5688
5688
|
default: Z(() => [
|
|
5689
|
-
w(p(
|
|
5690
|
-
class:
|
|
5689
|
+
w(p(Je), {
|
|
5690
|
+
class: D(["flex-1 overflow-y-auto rounded-t-lg focus:outline-hidden", {
|
|
5691
5691
|
[P.editorContentClasses]: !r.value,
|
|
5692
5692
|
[P.editorContentFocusClasses]: r.value
|
|
5693
5693
|
}]),
|
|
5694
|
-
editor: p(
|
|
5694
|
+
editor: p(b)
|
|
5695
5695
|
}, null, 8, ["class", "editor"])
|
|
5696
5696
|
]),
|
|
5697
5697
|
_: 1
|
|
5698
5698
|
}),
|
|
5699
5699
|
c.value ? (o(), i("nav", {
|
|
5700
5700
|
key: 1,
|
|
5701
|
-
class:
|
|
5701
|
+
class: D(["flex-0 min-h-0 p-1 rounded-b-lg overflow-hidden", v.value])
|
|
5702
5702
|
}, [
|
|
5703
5703
|
w(p(e1), { justify: "between" }, {
|
|
5704
5704
|
default: Z(() => [
|
|
@@ -5708,15 +5708,15 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5708
5708
|
w(c1, {
|
|
5709
5709
|
icon: "undo",
|
|
5710
5710
|
tooltip: "Undo",
|
|
5711
|
-
onClick: N[0] || (N[0] = (
|
|
5712
|
-
p(
|
|
5711
|
+
onClick: N[0] || (N[0] = (n1) => {
|
|
5712
|
+
p(b).chain().focus().undo().run(), B();
|
|
5713
5713
|
})
|
|
5714
5714
|
}),
|
|
5715
5715
|
w(c1, {
|
|
5716
5716
|
icon: "redo",
|
|
5717
5717
|
tooltip: "Redo",
|
|
5718
|
-
onClick: N[1] || (N[1] = (
|
|
5719
|
-
p(
|
|
5718
|
+
onClick: N[1] || (N[1] = (n1) => {
|
|
5719
|
+
p(b).chain().focus().redo().run(), B();
|
|
5720
5720
|
})
|
|
5721
5721
|
})
|
|
5722
5722
|
], 64)) : k("", !0),
|
|
@@ -5724,25 +5724,25 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5724
5724
|
w(c1, {
|
|
5725
5725
|
icon: "bold",
|
|
5726
5726
|
tooltip: "Bold",
|
|
5727
|
-
active: p(
|
|
5728
|
-
onClick: N[2] || (N[2] = (
|
|
5729
|
-
p(
|
|
5727
|
+
active: p(b).isActive("bold"),
|
|
5728
|
+
onClick: N[2] || (N[2] = (n1) => {
|
|
5729
|
+
p(b).chain().focus().toggleBold().run(), B();
|
|
5730
5730
|
})
|
|
5731
5731
|
}, null, 8, ["active"]),
|
|
5732
5732
|
w(c1, {
|
|
5733
5733
|
icon: "italics",
|
|
5734
5734
|
tooltip: "Italic",
|
|
5735
|
-
active: p(
|
|
5736
|
-
onClick: N[3] || (N[3] = (
|
|
5737
|
-
p(
|
|
5735
|
+
active: p(b).isActive("italic"),
|
|
5736
|
+
onClick: N[3] || (N[3] = (n1) => {
|
|
5737
|
+
p(b).chain().focus().toggleItalic().run(), B();
|
|
5738
5738
|
})
|
|
5739
5739
|
}, null, 8, ["active"]),
|
|
5740
5740
|
w(c1, {
|
|
5741
5741
|
icon: "underline",
|
|
5742
5742
|
tooltip: "Underline",
|
|
5743
|
-
active: p(
|
|
5744
|
-
onClick: N[4] || (N[4] = (
|
|
5745
|
-
p(
|
|
5743
|
+
active: p(b).isActive("underline"),
|
|
5744
|
+
onClick: N[4] || (N[4] = (n1) => {
|
|
5745
|
+
p(b).chain().focus().toggleUnderline().run(), B();
|
|
5746
5746
|
})
|
|
5747
5747
|
}, null, 8, ["active"])
|
|
5748
5748
|
], 64)) : k("", !0),
|
|
@@ -5750,60 +5750,60 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5750
5750
|
key: 2,
|
|
5751
5751
|
icon: "square-solid",
|
|
5752
5752
|
tooltip: "Yellow highlight",
|
|
5753
|
-
active: p(
|
|
5754
|
-
onClick: N[5] || (N[5] = (
|
|
5755
|
-
p(
|
|
5753
|
+
active: p(b).isActive("highlight"),
|
|
5754
|
+
onClick: N[5] || (N[5] = (n1) => {
|
|
5755
|
+
p(b).chain().focus().toggleHighlight().run(), B();
|
|
5756
5756
|
})
|
|
5757
5757
|
}, null, 8, ["active"])) : k("", !0),
|
|
5758
5758
|
p(oe) ? (o(), V(c1, {
|
|
5759
5759
|
key: 3,
|
|
5760
5760
|
icon: "heading",
|
|
5761
5761
|
tooltip: "Heading",
|
|
5762
|
-
active: p(
|
|
5763
|
-
onClick: N[6] || (N[6] = (
|
|
5764
|
-
p(
|
|
5762
|
+
active: p(b).isActive("heading", { level: 1 }),
|
|
5763
|
+
onClick: N[6] || (N[6] = (n1) => {
|
|
5764
|
+
p(b).chain().focus().toggleHeading({ level: 1 }).run(), B();
|
|
5765
5765
|
})
|
|
5766
5766
|
}, null, 8, ["active"])) : k("", !0),
|
|
5767
5767
|
p(re) ? (o(), V(c1, {
|
|
5768
5768
|
key: 4,
|
|
5769
5769
|
icon: "link",
|
|
5770
5770
|
tooltip: "Add link",
|
|
5771
|
-
active: p(
|
|
5772
|
-
onClick: N[7] || (N[7] = (
|
|
5773
|
-
f1(),
|
|
5771
|
+
active: p(b).isActive("link"),
|
|
5772
|
+
onClick: N[7] || (N[7] = (n1) => {
|
|
5773
|
+
f1(), B();
|
|
5774
5774
|
})
|
|
5775
5775
|
}, null, 8, ["active"])) : k("", !0),
|
|
5776
5776
|
P.listStyles ? (o(), i(M, { key: 5 }, [
|
|
5777
5777
|
w(c1, {
|
|
5778
5778
|
icon: "bullet-list",
|
|
5779
5779
|
tooltip: "Bullet list",
|
|
5780
|
-
active: p(
|
|
5781
|
-
onClick: N[8] || (N[8] = (
|
|
5782
|
-
p(
|
|
5780
|
+
active: p(b).isActive("bulletList"),
|
|
5781
|
+
onClick: N[8] || (N[8] = (n1) => {
|
|
5782
|
+
p(b).chain().focus().toggleBulletList().run(), B();
|
|
5783
5783
|
})
|
|
5784
5784
|
}, null, 8, ["active"]),
|
|
5785
5785
|
w(c1, {
|
|
5786
5786
|
icon: "numbered-list",
|
|
5787
5787
|
tooltip: "Numbered list",
|
|
5788
|
-
active: p(
|
|
5789
|
-
onClick: N[9] || (N[9] = (
|
|
5790
|
-
p(
|
|
5788
|
+
active: p(b).isActive("orderedList"),
|
|
5789
|
+
onClick: N[9] || (N[9] = (n1) => {
|
|
5790
|
+
p(b).chain().focus().toggleOrderedList().run(), B();
|
|
5791
5791
|
})
|
|
5792
5792
|
}, null, 8, ["active"]),
|
|
5793
5793
|
w(c1, {
|
|
5794
5794
|
icon: "indent-right",
|
|
5795
5795
|
tooltip: "Indent right",
|
|
5796
|
-
disabled: !p(
|
|
5797
|
-
onClick: N[10] || (N[10] = (
|
|
5798
|
-
p(
|
|
5796
|
+
disabled: !p(b).can().sinkListItem("listItem"),
|
|
5797
|
+
onClick: N[10] || (N[10] = (n1) => {
|
|
5798
|
+
p(b).chain().focus().sinkListItem("listItem").run(), B();
|
|
5799
5799
|
})
|
|
5800
5800
|
}, null, 8, ["disabled"]),
|
|
5801
5801
|
w(c1, {
|
|
5802
5802
|
icon: "indent-left",
|
|
5803
5803
|
tooltip: "Indent left",
|
|
5804
|
-
disabled: !p(
|
|
5805
|
-
onClick: N[11] || (N[11] = (
|
|
5806
|
-
p(
|
|
5804
|
+
disabled: !p(b).can().liftListItem("listItem"),
|
|
5805
|
+
onClick: N[11] || (N[11] = (n1) => {
|
|
5806
|
+
p(b).chain().focus().liftListItem("listItem").run(), B();
|
|
5807
5807
|
})
|
|
5808
5808
|
}, null, 8, ["disabled"])
|
|
5809
5809
|
], 64)) : k("", !0),
|
|
@@ -5812,16 +5812,16 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5812
5812
|
highlight: "",
|
|
5813
5813
|
icon: P.insertIcon,
|
|
5814
5814
|
tooltip: P.insertTooltip,
|
|
5815
|
-
active: p(
|
|
5816
|
-
onClick: N[12] || (N[12] = (
|
|
5817
|
-
|
|
5815
|
+
active: p(b).isActive("insert"),
|
|
5816
|
+
onClick: N[12] || (N[12] = (n1) => {
|
|
5817
|
+
E(), B();
|
|
5818
5818
|
})
|
|
5819
5819
|
}, null, 8, ["icon", "tooltip", "active"])) : k("", !0)
|
|
5820
5820
|
]),
|
|
5821
5821
|
_: 1
|
|
5822
5822
|
}),
|
|
5823
5823
|
P.$slots.menuRight ? (o(), i("div", P0, [
|
|
5824
|
-
|
|
5824
|
+
R(P.$slots, "menuRight")
|
|
5825
5825
|
])) : k("", !0)
|
|
5826
5826
|
]),
|
|
5827
5827
|
_: 3
|
|
@@ -5829,15 +5829,15 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5829
5829
|
], 2)) : k("", !0),
|
|
5830
5830
|
C.value ? (o(), V(A0, {
|
|
5831
5831
|
key: 2,
|
|
5832
|
-
editor: p(
|
|
5833
|
-
onInserted:
|
|
5832
|
+
editor: p(b),
|
|
5833
|
+
onInserted: W,
|
|
5834
5834
|
onCancel: y
|
|
5835
5835
|
}, null, 8, ["editor"])) : k("", !0),
|
|
5836
5836
|
f.value ? (o(), i(M, { key: 3 }, [
|
|
5837
|
-
P.$slots.insert ?
|
|
5837
|
+
P.$slots.insert ? R(P.$slots, "insert", { key: 0 }) : (o(), V(O0, {
|
|
5838
5838
|
key: 1,
|
|
5839
|
-
onInsert:
|
|
5840
|
-
onCancel: N[13] || (N[13] = (
|
|
5839
|
+
onInsert: s1,
|
|
5840
|
+
onCancel: N[13] || (N[13] = (n1) => f.value = !1)
|
|
5841
5841
|
}))
|
|
5842
5842
|
], 64)) : k("", !0)
|
|
5843
5843
|
]),
|
|
@@ -5848,7 +5848,7 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5848
5848
|
}), N0 = { class: "relative z-0" }, F0 = {
|
|
5849
5849
|
key: 1,
|
|
5850
5850
|
class: "relative z-10"
|
|
5851
|
-
},
|
|
5851
|
+
}, it = /* @__PURE__ */ $({
|
|
5852
5852
|
__name: "TextHighlight",
|
|
5853
5853
|
props: {
|
|
5854
5854
|
value: {},
|
|
@@ -5859,7 +5859,7 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5859
5859
|
backgroundColor: { default: null }
|
|
5860
5860
|
},
|
|
5861
5861
|
setup(n) {
|
|
5862
|
-
const t = n, e =
|
|
5862
|
+
const t = n, e = L([]), l = O(() => {
|
|
5863
5863
|
if (!t.backgroundColor) return "";
|
|
5864
5864
|
const a = "ring-2 shadow-sm ";
|
|
5865
5865
|
switch (t.backgroundColor) {
|
|
@@ -5887,14 +5887,14 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5887
5887
|
d = f.indexOf(C, d + 1), d !== -1 && m.push(d, d + C.length);
|
|
5888
5888
|
while (d > -1);
|
|
5889
5889
|
const h = [];
|
|
5890
|
-
let
|
|
5890
|
+
let b = 0;
|
|
5891
5891
|
for (const c of m)
|
|
5892
|
-
h.push(a.substring(
|
|
5892
|
+
h.push(a.substring(b, c)), b = c;
|
|
5893
5893
|
return h.push(a.substring(m[m.length - 1], a.length)), h;
|
|
5894
5894
|
};
|
|
5895
5895
|
return A1(() => {
|
|
5896
5896
|
e.value = t.highlight ? s(t.value, t.highlight) : [];
|
|
5897
|
-
}),
|
|
5897
|
+
}), i1(
|
|
5898
5898
|
() => t.highlight,
|
|
5899
5899
|
(a) => {
|
|
5900
5900
|
e.value = a ? s(t.value, a) : [];
|
|
@@ -5907,7 +5907,7 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5907
5907
|
}, [
|
|
5908
5908
|
a.highlight && f.toLowerCase() === a.highlight.toLowerCase() ? (o(), i("span", {
|
|
5909
5909
|
key: 0,
|
|
5910
|
-
class:
|
|
5910
|
+
class: D(["relative z-0 rounded", [
|
|
5911
5911
|
{
|
|
5912
5912
|
"font-bold": a.bold,
|
|
5913
5913
|
underline: a.underline
|
|
@@ -5922,10 +5922,10 @@ const D0 = { class: "space-y-1" }, B0 = { class: "space-y-1" }, z4 = /* @__PURE_
|
|
|
5922
5922
|
}), x0 = {}, U0 = { class: "ProseMirror" };
|
|
5923
5923
|
function Y0(n, t) {
|
|
5924
5924
|
return o(), i("section", U0, [
|
|
5925
|
-
|
|
5925
|
+
R(n.$slots, "default")
|
|
5926
5926
|
]);
|
|
5927
5927
|
}
|
|
5928
|
-
const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */
|
|
5928
|
+
const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ $({
|
|
5929
5929
|
__name: "TiptapEditor",
|
|
5930
5930
|
props: {
|
|
5931
5931
|
content: {},
|
|
@@ -5935,7 +5935,7 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
5935
5935
|
emits: ["blur", "change", "editor-ready", "new-line-state-changed", "focus", "enter-key"],
|
|
5936
5936
|
setup(n, { expose: t, emit: e }) {
|
|
5937
5937
|
var m;
|
|
5938
|
-
const l = e, s =
|
|
5938
|
+
const l = e, s = L(!1), a = Ge({
|
|
5939
5939
|
content: n.content,
|
|
5940
5940
|
extensions: [
|
|
5941
5941
|
Tt.configure({
|
|
@@ -5945,25 +5945,25 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
5945
5945
|
onEnter: () => l("enter-key"),
|
|
5946
5946
|
modEnterOnly: !n.shiftEnterCreatesNewLine
|
|
5947
5947
|
}),
|
|
5948
|
-
Ne,
|
|
5949
5948
|
Fe,
|
|
5949
|
+
xe,
|
|
5950
5950
|
oe.configure({
|
|
5951
5951
|
levels: [1, 2, 3]
|
|
5952
5952
|
}),
|
|
5953
5953
|
se,
|
|
5954
5954
|
ae,
|
|
5955
5955
|
zt,
|
|
5956
|
-
Ue,
|
|
5957
|
-
re,
|
|
5958
5956
|
Ye,
|
|
5957
|
+
re,
|
|
5959
5958
|
We,
|
|
5960
|
-
qe,
|
|
5961
|
-
xe,
|
|
5962
5959
|
je,
|
|
5960
|
+
Xe,
|
|
5961
|
+
Ue,
|
|
5962
|
+
Ke,
|
|
5963
5963
|
M0,
|
|
5964
|
-
|
|
5964
|
+
qe,
|
|
5965
5965
|
At,
|
|
5966
|
-
|
|
5966
|
+
Qe.configure({ placeholder: n.placeholder })
|
|
5967
5967
|
],
|
|
5968
5968
|
onCreate: () => l("editor-ready"),
|
|
5969
5969
|
onUpdate: ({ editor: d }) => l("change", d.getMarkdown()),
|
|
@@ -5979,19 +5979,19 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
5979
5979
|
Te.name,
|
|
5980
5980
|
"hasUsedNewline"
|
|
5981
5981
|
);
|
|
5982
|
-
|
|
5982
|
+
i1(r, (d) => {
|
|
5983
5983
|
l("new-line-state-changed", d || !1);
|
|
5984
|
-
}),
|
|
5984
|
+
}), i1(
|
|
5985
5985
|
() => n.placeholder,
|
|
5986
5986
|
(d) => {
|
|
5987
|
-
var h,
|
|
5988
|
-
(
|
|
5987
|
+
var h, b;
|
|
5988
|
+
(b = (h = a.value) == null ? void 0 : h.extensionManager.extensions.find((c) => c.name === "placeholder")) == null || b.options.configure({ placeholder: d });
|
|
5989
5989
|
}
|
|
5990
5990
|
);
|
|
5991
5991
|
const f = ["start", "end", "all"], C = (d) => {
|
|
5992
|
-
var
|
|
5992
|
+
var b;
|
|
5993
5993
|
const h = f.includes(d) ? d : "end";
|
|
5994
|
-
(
|
|
5994
|
+
(b = a.value) == null || b.commands.focus(h);
|
|
5995
5995
|
};
|
|
5996
5996
|
return t({
|
|
5997
5997
|
editor: a,
|
|
@@ -6020,13 +6020,13 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6020
6020
|
toggleOrderedList: () => a.value.chain().focus().toggleOrderedList().run(),
|
|
6021
6021
|
toggleUnderline: () => a.value.chain().focus().toggleUnderline().run(),
|
|
6022
6022
|
undo: () => a.value.chain().focus().undo().run()
|
|
6023
|
-
}), (d, h) => p(a) ? (o(), V(p(
|
|
6023
|
+
}), (d, h) => p(a) ? (o(), V(p(Je), {
|
|
6024
6024
|
key: 0,
|
|
6025
6025
|
class: "flex-1 focus:outline-hidden",
|
|
6026
6026
|
editor: p(a)
|
|
6027
6027
|
}, null, 8, ["editor"])) : k("", !0);
|
|
6028
6028
|
}
|
|
6029
|
-
}), W0 = ["disabled"], j0 = { key: 1 }, I4 = /* @__PURE__ */
|
|
6029
|
+
}), W0 = ["disabled"], j0 = { key: 1 }, I4 = /* @__PURE__ */ $({
|
|
6030
6030
|
__name: "ToggleButton",
|
|
6031
6031
|
props: {
|
|
6032
6032
|
active: { type: Boolean },
|
|
@@ -6041,7 +6041,7 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6041
6041
|
},
|
|
6042
6042
|
emits: ["click", "blur"],
|
|
6043
6043
|
setup(n, { expose: t, emit: e }) {
|
|
6044
|
-
const l = n, s = e, a =
|
|
6044
|
+
const l = n, s = e, a = L(), r = O(() => {
|
|
6045
6045
|
const d = [];
|
|
6046
6046
|
return l.icon && !l.label && d.push("w-6"), l.disabled ? d.push("opacity-75 cursor-not-allowed") : d.push("cursor-pointer"), d.push("rounded-md"), d.push(
|
|
6047
6047
|
...l.active ? [
|
|
@@ -6074,11 +6074,11 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6074
6074
|
u("button", {
|
|
6075
6075
|
ref_key: "buttonRef",
|
|
6076
6076
|
ref: a,
|
|
6077
|
-
class:
|
|
6077
|
+
class: D(["z-0 relative inline-flex items-center justify-center gap-1 h-6 leading-none text-sm border focus:z-10 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-black dark:focus-visible:outline-white", r.value]),
|
|
6078
6078
|
disabled: d.disabled,
|
|
6079
6079
|
style: t1(f.value),
|
|
6080
6080
|
onClick: C,
|
|
6081
|
-
onBlur: h[0] || (h[0] = (
|
|
6081
|
+
onBlur: h[0] || (h[0] = (b) => s("blur"))
|
|
6082
6082
|
}, [
|
|
6083
6083
|
d.icon ? (o(), V(p(l1), {
|
|
6084
6084
|
key: 0,
|
|
@@ -6165,19 +6165,19 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6165
6165
|
for (; C.length > 0 && d.length > 0; ) {
|
|
6166
6166
|
const h = d.shift();
|
|
6167
6167
|
if (!h) break;
|
|
6168
|
-
let
|
|
6168
|
+
let b = !1;
|
|
6169
6169
|
for (let c = C.length - 1; c >= 0; c--)
|
|
6170
6170
|
if (C[c][e] === h.id) {
|
|
6171
6171
|
const H = r.get(C[c][t]);
|
|
6172
|
-
H && ((h.children ?? (h.children = [])).push(H), d.push(H)), C.splice(c, 1),
|
|
6172
|
+
H && ((h.children ?? (h.children = [])).push(H), d.push(H)), C.splice(c, 1), b = !0;
|
|
6173
6173
|
}
|
|
6174
|
-
if (d.length === 0 && !
|
|
6174
|
+
if (d.length === 0 && !b && C.length > 0)
|
|
6175
6175
|
throw new Error(
|
|
6176
6176
|
`Some items could not be attached to the tree (orphans): ${JSON.stringify(C)}`
|
|
6177
6177
|
);
|
|
6178
6178
|
}
|
|
6179
6179
|
return m;
|
|
6180
|
-
}, q0 = { class: "flex items-center w-full h-6 pl-2 px-1 border border-default rounded-sm" }, X0 = ["value", "onKeydown"], G0 = { class: "flex items-center gap-1" }, J0 = /* @__PURE__ */
|
|
6180
|
+
}, q0 = { class: "flex items-center w-full h-6 pl-2 px-1 border border-default rounded-sm" }, X0 = ["value", "onKeydown"], G0 = { class: "flex items-center gap-1" }, J0 = /* @__PURE__ */ $({
|
|
6181
6181
|
__name: "InputNode",
|
|
6182
6182
|
props: {
|
|
6183
6183
|
value: {},
|
|
@@ -6186,8 +6186,8 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6186
6186
|
},
|
|
6187
6187
|
emits: ["cancel", "change", "save"],
|
|
6188
6188
|
setup(n, { emit: t }) {
|
|
6189
|
-
const e = t, l =
|
|
6190
|
-
|
|
6189
|
+
const e = t, l = L(), s = L(), { disableClickOutside: a, enableClickOutside: r } = fe(() => e("cancel"));
|
|
6190
|
+
a1(() => {
|
|
6191
6191
|
var d;
|
|
6192
6192
|
r([s.value.$el]), (d = l.value) == null || d.focus();
|
|
6193
6193
|
}), B1(() => a());
|
|
@@ -6226,18 +6226,18 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6226
6226
|
}, null, 40, X0)
|
|
6227
6227
|
]),
|
|
6228
6228
|
u("aside", G0, [
|
|
6229
|
-
w(p(
|
|
6229
|
+
w(p(j), {
|
|
6230
6230
|
small: "",
|
|
6231
6231
|
icon: "check",
|
|
6232
6232
|
variant: "outlineSubtle",
|
|
6233
6233
|
loading: d.saving,
|
|
6234
|
-
onClick: h[2] || (h[2] = (
|
|
6234
|
+
onClick: h[2] || (h[2] = (b) => e("save"))
|
|
6235
6235
|
}, null, 8, ["loading"]),
|
|
6236
|
-
w(p(
|
|
6236
|
+
w(p(j), {
|
|
6237
6237
|
small: "",
|
|
6238
6238
|
icon: "close",
|
|
6239
6239
|
variant: "outlineSubtle",
|
|
6240
|
-
onClick: h[3] || (h[3] = (
|
|
6240
|
+
onClick: h[3] || (h[3] = (b) => e("cancel"))
|
|
6241
6241
|
})
|
|
6242
6242
|
])
|
|
6243
6243
|
]),
|
|
@@ -6250,7 +6250,7 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6250
6250
|
}, eo = { class: "text-xs truncate" }, to = {
|
|
6251
6251
|
key: 0,
|
|
6252
6252
|
class: "relative"
|
|
6253
|
-
}, Y4 = /* @__PURE__ */
|
|
6253
|
+
}, Y4 = /* @__PURE__ */ $({
|
|
6254
6254
|
__name: "TreeList",
|
|
6255
6255
|
props: {
|
|
6256
6256
|
indentationAmount: { default: 20 },
|
|
@@ -6262,17 +6262,17 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6262
6262
|
emits: ["action", "key", "select", "toggle", "cancel-new-child", "save"],
|
|
6263
6263
|
setup(n, { emit: t }) {
|
|
6264
6264
|
const e = t, l = O(() => n.selection.length > 0 && n.selection[n.selection.length - 1].id === n.node.id), s = O(() => n.createNewPath.length > 0 && n.createNewPath[n.createNewPath.length - 1].id === n.node.id);
|
|
6265
|
-
|
|
6265
|
+
i1(() => s.value, (v, g) => {
|
|
6266
6266
|
!v && g && r.value && (r.value = !1), a.value = "";
|
|
6267
6267
|
});
|
|
6268
|
-
const a =
|
|
6268
|
+
const a = L(""), r = L(!1), f = () => {
|
|
6269
6269
|
e("save", a.value), r.value = !0;
|
|
6270
6270
|
}, C = () => {
|
|
6271
6271
|
e("cancel-new-child"), a.value = "";
|
|
6272
6272
|
}, m = (v) => console.log(n.node.label, v), d = (v) => e("action", { path: [n.node], targetNode: n.node, action: v }), h = (v) => {
|
|
6273
6273
|
const g = [n.node, ...v.path];
|
|
6274
6274
|
v.action.handler(g), e("action", { path: g, targetNode: g[g.length - 1], action: v.action });
|
|
6275
|
-
},
|
|
6275
|
+
}, b = (v) => {
|
|
6276
6276
|
const g = [n.node, ...v];
|
|
6277
6277
|
e("key", { path: g, targetNode: g[g.length - 1] });
|
|
6278
6278
|
}, c = (v) => {
|
|
@@ -6281,13 +6281,13 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6281
6281
|
e("toggle", { path: [n.node, ...v], targetNode: [n.node, ...v][[n.node, ...v].length - 1] });
|
|
6282
6282
|
};
|
|
6283
6283
|
return (v, g) => {
|
|
6284
|
-
var
|
|
6285
|
-
const T =
|
|
6284
|
+
var z;
|
|
6285
|
+
const T = kt("TreeList", !0);
|
|
6286
6286
|
return o(), i(M, null, [
|
|
6287
6287
|
w(p(e1), {
|
|
6288
6288
|
tag: "button",
|
|
6289
6289
|
justify: "between",
|
|
6290
|
-
class:
|
|
6290
|
+
class: D(["w-full h-8 pr-1 gap-0 border-b border-default cursor-pointer", {
|
|
6291
6291
|
"text-white bg-action border-transparent rounded-lg": l.value,
|
|
6292
6292
|
"text-secondary hover:text-primary hover:bg-secondary": !l.value
|
|
6293
6293
|
}]),
|
|
@@ -6318,7 +6318,7 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6318
6318
|
(y = v.node.children) != null && y.length || s.value ? (o(), i("button", {
|
|
6319
6319
|
key: 0,
|
|
6320
6320
|
class: "w-4 h-4 flex items-center justify-center rounded cursor-pointer",
|
|
6321
|
-
onClick: g[0] || (g[0] = x((
|
|
6321
|
+
onClick: g[0] || (g[0] = x((B) => e("toggle", { path: [v.node], targetNode: v.node }), ["stop", "prevent"]))
|
|
6322
6322
|
}, [
|
|
6323
6323
|
w(p(l1), {
|
|
6324
6324
|
name: v.node.open ? "chevron-down-small" : "chevron-right-small"
|
|
@@ -6334,13 +6334,13 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6334
6334
|
class: "flex-none"
|
|
6335
6335
|
}, {
|
|
6336
6336
|
default: Z(() => [
|
|
6337
|
-
w(p(
|
|
6337
|
+
w(p(at), {
|
|
6338
6338
|
options: v.node.actions,
|
|
6339
6339
|
placement: "bottom-end",
|
|
6340
6340
|
onSelect: d
|
|
6341
6341
|
}, {
|
|
6342
6342
|
trigger: Z(() => [
|
|
6343
|
-
w(p(
|
|
6343
|
+
w(p(j), {
|
|
6344
6344
|
icon: "options",
|
|
6345
6345
|
small: "",
|
|
6346
6346
|
variant: "textSubtle"
|
|
@@ -6354,7 +6354,7 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6354
6354
|
]),
|
|
6355
6355
|
_: 1
|
|
6356
6356
|
}, 8, ["class", "style"]),
|
|
6357
|
-
(s.value || (
|
|
6357
|
+
(s.value || (z = v.node.children) != null && z.length) && v.node.open ? (o(), i("main", to, [
|
|
6358
6358
|
s.value ? (o(), V(J0, {
|
|
6359
6359
|
key: 0,
|
|
6360
6360
|
value: a.value,
|
|
@@ -6372,11 +6372,11 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6372
6372
|
"create-new-path": v.createNewPath,
|
|
6373
6373
|
selection: v.selection,
|
|
6374
6374
|
onAction: h,
|
|
6375
|
-
onCancelNewChild: g[11] || (g[11] = (
|
|
6376
|
-
onSave: g[12] || (g[12] = (
|
|
6377
|
-
onKey: g[13] || (g[13] = (
|
|
6378
|
-
onSelect: g[14] || (g[14] = (
|
|
6379
|
-
onToggle: g[15] || (g[15] = (
|
|
6375
|
+
onCancelNewChild: g[11] || (g[11] = (B) => e("cancel-new-child")),
|
|
6376
|
+
onSave: g[12] || (g[12] = (B) => e("save", B)),
|
|
6377
|
+
onKey: g[13] || (g[13] = (B) => b(B.path)),
|
|
6378
|
+
onSelect: g[14] || (g[14] = (B) => c(B.path)),
|
|
6379
|
+
onToggle: g[15] || (g[15] = (B) => H(B.path))
|
|
6380
6380
|
}, null, 8, ["indentation-amount", "level", "node", "create-new-path", "selection"]))), 128))
|
|
6381
6381
|
])) : k("", !0)
|
|
6382
6382
|
], 64);
|
|
@@ -6554,7 +6554,7 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6554
6554
|
"visibility-on",
|
|
6555
6555
|
"warning",
|
|
6556
6556
|
"zoom"
|
|
6557
|
-
], ze = /* @__PURE__ */
|
|
6557
|
+
], ze = /* @__PURE__ */ $({
|
|
6558
6558
|
__name: "RunningSection",
|
|
6559
6559
|
props: {
|
|
6560
6560
|
border: { type: Boolean, default: !1 },
|
|
@@ -6562,7 +6562,7 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6562
6562
|
type: { default: "header" }
|
|
6563
6563
|
},
|
|
6564
6564
|
setup(n) {
|
|
6565
|
-
const t = n, e =
|
|
6565
|
+
const t = n, e = L(), l = t.type === "header" ? "border-b" : "border-t", s = O(() => [t.heightClass, t.border ? "border-default" : "border-transparent", t.border ? l : ""]), a = O(() => {
|
|
6566
6566
|
let r;
|
|
6567
6567
|
if (t.heightClass === "h-auto") {
|
|
6568
6568
|
if (e.value) {
|
|
@@ -6578,16 +6578,16 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6578
6578
|
return (r, f) => (o(), V($1(r.type), {
|
|
6579
6579
|
ref_key: "containerRef",
|
|
6580
6580
|
ref: e,
|
|
6581
|
-
class:
|
|
6581
|
+
class: D(["relative flex-none w-full overflow-hidden transition-height duration-500 ease-in-out", s.value]),
|
|
6582
6582
|
style: t1(a.value)
|
|
6583
6583
|
}, {
|
|
6584
6584
|
default: Z(() => [
|
|
6585
|
-
|
|
6585
|
+
R(r.$slots, "default")
|
|
6586
6586
|
]),
|
|
6587
6587
|
_: 3
|
|
6588
6588
|
}, 8, ["class", "style"]));
|
|
6589
6589
|
}
|
|
6590
|
-
}), es = ["header", "footer"], me = /* @__PURE__ */
|
|
6590
|
+
}), es = ["header", "footer"], me = /* @__PURE__ */ $({
|
|
6591
6591
|
__name: "VerticalLayout",
|
|
6592
6592
|
props: {
|
|
6593
6593
|
borders: { type: Boolean, default: !1 },
|
|
@@ -6602,7 +6602,7 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6602
6602
|
col: "",
|
|
6603
6603
|
align: "stretch",
|
|
6604
6604
|
justify: "start",
|
|
6605
|
-
class:
|
|
6605
|
+
class: D(["relative h-full overflow-x-hidden", e])
|
|
6606
6606
|
}, {
|
|
6607
6607
|
default: Z(() => [
|
|
6608
6608
|
l.$slots.header ? (o(), V(ze, {
|
|
@@ -6612,7 +6612,7 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6612
6612
|
"height-class": l.headerHeightClass
|
|
6613
6613
|
}, {
|
|
6614
6614
|
default: Z(() => [
|
|
6615
|
-
|
|
6615
|
+
R(l.$slots, "header")
|
|
6616
6616
|
]),
|
|
6617
6617
|
_: 3
|
|
6618
6618
|
}, 8, ["border", "height-class"])) : k("", !0),
|
|
@@ -6621,7 +6621,7 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6621
6621
|
"wrap-class": "h-full"
|
|
6622
6622
|
}, {
|
|
6623
6623
|
default: Z(() => [
|
|
6624
|
-
|
|
6624
|
+
R(l.$slots, "main")
|
|
6625
6625
|
]),
|
|
6626
6626
|
_: 3
|
|
6627
6627
|
}),
|
|
@@ -6632,7 +6632,7 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6632
6632
|
"height-class": l.footerHeightClass
|
|
6633
6633
|
}, {
|
|
6634
6634
|
default: Z(() => [
|
|
6635
|
-
|
|
6635
|
+
R(l.$slots, "footer")
|
|
6636
6636
|
]),
|
|
6637
6637
|
_: 3
|
|
6638
6638
|
}, 8, ["border", "height-class"])) : k("", !0)
|
|
@@ -6640,14 +6640,14 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6640
6640
|
_: 3
|
|
6641
6641
|
}));
|
|
6642
6642
|
}
|
|
6643
|
-
}), Q1 = "+",
|
|
6643
|
+
}), Q1 = "+", dt = "[", ut = "]", y1 = ":", no = ["asc", "desc"], ts = ["=", "!=", "<", "<=", ">", ">="], ls = ["eq", "ne", "lt", "le", "gt", "ge"], oo = {
|
|
6644
6644
|
eq: "=",
|
|
6645
6645
|
ne: "!=",
|
|
6646
6646
|
lt: "<",
|
|
6647
6647
|
le: "<=",
|
|
6648
6648
|
gt: ">",
|
|
6649
6649
|
ge: ">="
|
|
6650
|
-
},
|
|
6650
|
+
}, pt = {
|
|
6651
6651
|
"=": "eq",
|
|
6652
6652
|
"!=": "ne",
|
|
6653
6653
|
"<": "lt",
|
|
@@ -6670,7 +6670,7 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6670
6670
|
case ">=":
|
|
6671
6671
|
return n >= t;
|
|
6672
6672
|
}
|
|
6673
|
-
}, ge = "[", be = "]", te = (n, t) => n.startsWith(t + ge) && n.endsWith(be), os = (n, t) => `${n}${ge}${t}${be}`,
|
|
6673
|
+
}, ge = "[", be = "]", te = (n, t) => n.startsWith(t + ge) && n.endsWith(be), os = (n, t) => `${n}${ge}${t}${be}`, ft = (n, t) => Object.keys(n).reduce((e, l) => (te(l, t) && e.push({
|
|
6674
6674
|
content: Le(l, t),
|
|
6675
6675
|
value: n[l]
|
|
6676
6676
|
}), e), []), ss = (n, t) => {
|
|
@@ -6679,18 +6679,18 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6679
6679
|
content: Le(e, t),
|
|
6680
6680
|
value: n[e]
|
|
6681
6681
|
} : null;
|
|
6682
|
-
}, Le = (n, t) => n.replace(t + ge, "").replace(be, ""), so = (n, t) => Object.keys(n).reduce((e, l) => (te(l, t) || (e[l] = n[l]), e), {}),
|
|
6682
|
+
}, Le = (n, t) => n.replace(t + ge, "").replace(be, ""), so = (n, t) => Object.keys(n).reduce((e, l) => (te(l, t) || (e[l] = n[l]), e), {}), ct = (n, t, e) => Object.keys(n).reduce((l, s) => (te(s, t) ? e !== Le(s, t) && (l[s] = n[s]) : l[s] = n[s], l), {}), Ct = "sort", vt = (n, t) => `${n}${y1}${t}`, ao = (n, t) => `${n}${y1}${t}`, ht = (n, t, e) => `${n}${dt}${vt(t, e)}${ut}`, ro = (n, t) => `${n}${dt}${ao("sort", t)}${ut}`, io = (n) => {
|
|
6683
6683
|
if (!n.includes(y1))
|
|
6684
6684
|
throw new Error(`Error in filter syntax: Filter must contain a filter separator "${y1}"`);
|
|
6685
6685
|
if (!n.indexOf(y1) || n.indexOf(y1) === n.length - 1)
|
|
6686
6686
|
throw new Error(`Error in filter syntax: filter separator cannot be in the beginning or the end of the string: [${n}]`);
|
|
6687
6687
|
const [t, e] = n.split(y1);
|
|
6688
6688
|
return { id: t, operator: e };
|
|
6689
|
-
}, as = (n) => n.split(Q1),
|
|
6689
|
+
}, as = (n) => n.split(Q1), mt = (n) => {
|
|
6690
6690
|
const [t, e] = n.content.split(y1);
|
|
6691
|
-
return t ===
|
|
6692
|
-
},
|
|
6693
|
-
const e =
|
|
6691
|
+
return t === Ct && no.includes(e);
|
|
6692
|
+
}, gt = (n, t) => {
|
|
6693
|
+
const e = ft(n, t), [l] = e.filter((a) => mt(a)).map((a) => {
|
|
6694
6694
|
const [r, f] = a.content.split(y1);
|
|
6695
6695
|
return {
|
|
6696
6696
|
direction: f,
|
|
@@ -6702,20 +6702,20 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6702
6702
|
return {
|
|
6703
6703
|
id: r,
|
|
6704
6704
|
operator: oo[f],
|
|
6705
|
-
value: n[
|
|
6705
|
+
value: n[ht(t, r, f)]
|
|
6706
6706
|
};
|
|
6707
|
-
}).reduce((a, r) => (r.id ===
|
|
6708
|
-
}, uo = (n, t, e) =>
|
|
6707
|
+
}).reduce((a, r) => (r.id === Ct && r.operator === void 0 ? a.sorting = l : a.filters.push(r), a), { sorting: void 0, filters: [] });
|
|
6708
|
+
}, uo = (n, t, e) => gt(n, t).filters.find((l) => l.id === e), po = (n, t) => so(n, t), fo = (n, t, e) => {
|
|
6709
6709
|
const l = uo(n, t, e);
|
|
6710
6710
|
if (!l) return n;
|
|
6711
|
-
const s =
|
|
6712
|
-
return
|
|
6711
|
+
const s = vt(l.id, pt[l.operator]);
|
|
6712
|
+
return ct(n, t, s);
|
|
6713
6713
|
}, co = (n, t) => {
|
|
6714
|
-
const e =
|
|
6715
|
-
return e ?
|
|
6714
|
+
const e = ft(n, t).find((l) => mt(l));
|
|
6715
|
+
return e ? ct(n, t, e.content) : n;
|
|
6716
6716
|
}, Co = (n, t, e, l, s) => {
|
|
6717
6717
|
const a = { ...n };
|
|
6718
|
-
return a[
|
|
6718
|
+
return a[ht(t, e, pt[l])] = s, a;
|
|
6719
6719
|
}, vo = (n, t, e, l) => {
|
|
6720
6720
|
const s = { ...n };
|
|
6721
6721
|
return s[ro(t, e)] = l, s;
|
|
@@ -6735,53 +6735,54 @@ const E4 = /* @__PURE__ */ M1(x0, [["render", Y0]]), O4 = /* @__PURE__ */ D({
|
|
|
6735
6735
|
d && (h = Co(h, n, t.id, t.operator, d)), await l.push({ query: h });
|
|
6736
6736
|
};
|
|
6737
6737
|
return { clearFilter: a, isActive: r, updateFilter: C, values: f };
|
|
6738
|
-
}, is = ({
|
|
6739
|
-
const
|
|
6740
|
-
|
|
6738
|
+
}, is = ({ groupId: n, filters: t, sorting: e, items: l, remoteFilterMethod: s }) => {
|
|
6739
|
+
const a = G1(), r = ue();
|
|
6740
|
+
a1(() => v(a.query)), Ie((z) => v(z.query));
|
|
6741
|
+
const f = L(!1), C = L([]), m = L(t), d = O(() => m.value.filter((z) => !!z.value)), h = O(() => !!d.value.length), b = L(e.default), c = async () => {
|
|
6742
|
+
if (s && l)
|
|
6741
6743
|
throw new Error("You should only pass either 'items' (frontend filtering) or 'remoteFilterMethod' (backend filtering). You passed both.");
|
|
6742
|
-
if (!
|
|
6744
|
+
if (!s && !l)
|
|
6743
6745
|
throw new Error("Filters have to have either items or remoteFilterMethod to work. None was provided.");
|
|
6744
|
-
if (
|
|
6746
|
+
if (s)
|
|
6745
6747
|
try {
|
|
6746
|
-
|
|
6747
|
-
const
|
|
6748
|
-
|
|
6748
|
+
f.value = !0;
|
|
6749
|
+
const z = await s(b.value, d.value);
|
|
6750
|
+
C.value = z, f.value = !1;
|
|
6749
6751
|
} catch {
|
|
6750
|
-
|
|
6752
|
+
f.value = !1;
|
|
6751
6753
|
}
|
|
6752
|
-
else
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
) :
|
|
6754
|
+
else l && (C.value = e.sortingMethod ? e.sortingMethod(
|
|
6755
|
+
b.value,
|
|
6756
|
+
l.value.filter((z) => d.value.every((y) => y.execute(y.value, y.operator, z)))
|
|
6757
|
+
) : l.value.filter((z) => d.value.every((y) => y.execute(y.value, y.operator, z))));
|
|
6756
6758
|
};
|
|
6757
|
-
|
|
6758
|
-
const
|
|
6759
|
-
const { filters:
|
|
6760
|
-
|
|
6761
|
-
const
|
|
6762
|
-
|
|
6759
|
+
i1(l ? [b, d, l] : [b, d], () => c(), { immediate: !0, deep: !0 });
|
|
6760
|
+
const v = (z) => {
|
|
6761
|
+
const { filters: y, sorting: B } = gt(z, n);
|
|
6762
|
+
b.value = B ? T(B) : e.default, m.value.forEach((W) => {
|
|
6763
|
+
const Q = y.find((s1) => s1.id === W.id);
|
|
6764
|
+
Q ? (W.operator = Q.operator, W.value = Q.value) : (W.operator = "=", W.value = null);
|
|
6763
6765
|
});
|
|
6764
|
-
},
|
|
6765
|
-
const
|
|
6766
|
-
await
|
|
6767
|
-
},
|
|
6768
|
-
direction:
|
|
6769
|
-
field:
|
|
6766
|
+
}, g = async () => {
|
|
6767
|
+
const z = po(a.query, n);
|
|
6768
|
+
await r.push({ query: z });
|
|
6769
|
+
}, T = (z) => ({
|
|
6770
|
+
direction: z.direction,
|
|
6771
|
+
field: z.field
|
|
6770
6772
|
});
|
|
6771
6773
|
return {
|
|
6772
6774
|
activeFilters: d,
|
|
6773
|
-
activeSorting:
|
|
6775
|
+
activeSorting: b,
|
|
6774
6776
|
availableFilters: m,
|
|
6775
6777
|
filteringActive: h,
|
|
6776
|
-
filteredItems:
|
|
6777
|
-
loadingItems:
|
|
6778
|
-
applyFilters:
|
|
6779
|
-
clearFilters:
|
|
6780
|
-
updateFilters: g
|
|
6778
|
+
filteredItems: C,
|
|
6779
|
+
loadingItems: f,
|
|
6780
|
+
applyFilters: c,
|
|
6781
|
+
clearFilters: g
|
|
6781
6782
|
};
|
|
6782
6783
|
}, ds = (n) => {
|
|
6783
6784
|
const t = G1();
|
|
6784
|
-
|
|
6785
|
+
a1(() => n(t.query)), Ie((e) => n(e.query));
|
|
6785
6786
|
}, us = (n) => {
|
|
6786
6787
|
const t = G1(), e = ue();
|
|
6787
6788
|
if (!Oe())
|
|
@@ -6804,9 +6805,9 @@ function fs(n, t) {
|
|
|
6804
6805
|
const m = a instanceof Date, d = r instanceof Date;
|
|
6805
6806
|
if (m && d)
|
|
6806
6807
|
return a.getTime() - r.getTime();
|
|
6807
|
-
const h = new Date(a).getTime(),
|
|
6808
|
-
if (!Number.isNaN(h) && !Number.isNaN(
|
|
6809
|
-
return h -
|
|
6808
|
+
const h = new Date(a).getTime(), b = new Date(r).getTime();
|
|
6809
|
+
if (!Number.isNaN(h) && !Number.isNaN(b))
|
|
6810
|
+
return h - b;
|
|
6810
6811
|
const c = String(a).toLowerCase(), H = String(r).toLowerCase();
|
|
6811
6812
|
return c.localeCompare(H);
|
|
6812
6813
|
});
|
|
@@ -6818,17 +6819,17 @@ export {
|
|
|
6818
6819
|
$e as BAside,
|
|
6819
6820
|
xo as BAsideSectionLabel,
|
|
6820
6821
|
Uo as BAvatarUpload,
|
|
6821
|
-
|
|
6822
|
+
j as BButton,
|
|
6822
6823
|
Yo as BButtonGroup,
|
|
6823
6824
|
T5 as BCalendarView,
|
|
6824
|
-
|
|
6825
|
+
nt as BCheckbox,
|
|
6825
6826
|
_o as BCollapse,
|
|
6826
6827
|
E1 as BConfirmCancel,
|
|
6827
6828
|
e4 as BContentSlider,
|
|
6828
6829
|
t4 as BDataPoint,
|
|
6829
6830
|
R2 as BDeleteButton,
|
|
6830
6831
|
l4 as BDialog,
|
|
6831
|
-
|
|
6832
|
+
ot as BFadeInUp,
|
|
6832
6833
|
x2 as BFilterChip,
|
|
6833
6834
|
n4 as BFirstPaint,
|
|
6834
6835
|
e1 as BFlexbox,
|
|
@@ -6845,12 +6846,12 @@ export {
|
|
|
6845
6846
|
on as BModal,
|
|
6846
6847
|
d4 as BNavItem,
|
|
6847
6848
|
u4 as BNotification,
|
|
6848
|
-
|
|
6849
|
+
_e as BNotificationBadge,
|
|
6849
6850
|
p4 as BPagination,
|
|
6850
6851
|
f4 as BPanelLayout,
|
|
6851
6852
|
c4 as BPopCalendar,
|
|
6852
6853
|
C4 as BPopConfirm,
|
|
6853
|
-
|
|
6854
|
+
at as BPopSelect,
|
|
6854
6855
|
v4 as BPopSelectFooterButton,
|
|
6855
6856
|
Y1 as BPopper,
|
|
6856
6857
|
W1 as BPopperContent,
|
|
@@ -6870,7 +6871,7 @@ export {
|
|
|
6870
6871
|
D4 as BTag,
|
|
6871
6872
|
B4 as BTagInput,
|
|
6872
6873
|
R4 as BTextEditor,
|
|
6873
|
-
|
|
6874
|
+
it as BTextHighlight,
|
|
6874
6875
|
E4 as BTextViewer,
|
|
6875
6876
|
O4 as BTiptapEditor,
|
|
6876
6877
|
I4 as BToggleButton,
|
|
@@ -6901,9 +6902,9 @@ export {
|
|
|
6901
6902
|
I5 as dbDateTime,
|
|
6902
6903
|
W2 as debounce,
|
|
6903
6904
|
m4 as egdes,
|
|
6904
|
-
|
|
6905
|
+
ut as filterEndingBracket,
|
|
6905
6906
|
y1 as filterSeparator,
|
|
6906
|
-
|
|
6907
|
+
dt as filterStartingBracket,
|
|
6907
6908
|
Q1 as filterValueSeparator,
|
|
6908
6909
|
K0 as flattenTree,
|
|
6909
6910
|
Q0 as flattenTreeNodes,
|
|
@@ -6911,11 +6912,11 @@ export {
|
|
|
6911
6912
|
V5 as getDecade,
|
|
6912
6913
|
uo as getFilterFromQuery,
|
|
6913
6914
|
as as getFilterValues,
|
|
6914
|
-
|
|
6915
|
+
gt as getFiltersAndSortingFromQuery,
|
|
6915
6916
|
o4 as getModifierKeyIcon,
|
|
6916
6917
|
N4 as getNodeValueByPath,
|
|
6917
6918
|
ss as getQueryObjectFromQuery,
|
|
6918
|
-
|
|
6919
|
+
ft as getQueryObjectsFromQuery,
|
|
6919
6920
|
Ko as getWeekNumber,
|
|
6920
6921
|
ie as hasValue,
|
|
6921
6922
|
s4 as hasValueAndNotEmpty,
|
|
@@ -6926,7 +6927,7 @@ export {
|
|
|
6926
6927
|
I1 as moveDate,
|
|
6927
6928
|
P4 as openPath,
|
|
6928
6929
|
ls as operatorLetters,
|
|
6929
|
-
|
|
6930
|
+
pt as operatorToLetters,
|
|
6930
6931
|
ts as operators,
|
|
6931
6932
|
C1 as parseDate,
|
|
6932
6933
|
Qo as printDate,
|
|
@@ -6937,12 +6938,12 @@ export {
|
|
|
6937
6938
|
A5 as readableDateWithDay,
|
|
6938
6939
|
fo as removeFilterFromQuery,
|
|
6939
6940
|
po as removeFiltersFromQuery,
|
|
6940
|
-
|
|
6941
|
+
ct as removeQueryObjectFromQuery,
|
|
6941
6942
|
so as removeQueryObjectsFromQuery,
|
|
6942
6943
|
co as removeSortingFromQuery,
|
|
6943
6944
|
os as renderQueryObject,
|
|
6944
6945
|
g4 as scrollDirections,
|
|
6945
|
-
|
|
6946
|
+
st as scrollIntoView,
|
|
6946
6947
|
j2 as scrollbarWidth,
|
|
6947
6948
|
k4 as selectOptionVariants,
|
|
6948
6949
|
x4 as setNodeObjectValueByPath,
|