@leodamours/ds-components 0.2.8 → 0.2.10
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/components/DsTable.vue.d.ts +10 -4
- package/dist/index.js +868 -861
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as S, ref as j, watch as we, computed as
|
|
2
|
-
const Bt = ["aria-label"], Tt = ["src", "alt"],
|
|
1
|
+
import { defineComponent as S, ref as j, watch as we, computed as C, openBlock as g, createElementBlock as v, normalizeClass as T, toDisplayString as E, createCommentVNode as D, renderSlot as N, createTextVNode as X, createBlock as I, resolveDynamicComponent as $e, normalizeStyle as he, createElementVNode as F, shallowRef as Ct, getCurrentScope as Ft, onScopeDispose as $t, shallowReadonly as be, unref as R, mergeProps as de, createVNode as _, withCtx as Re, Teleport as Le, withModifiers as Dt, Fragment as se, renderList as re, nextTick as je, withKeys as st, onBeforeUnmount as rt, Transition as at, onMounted as Et, TransitionGroup as At } from "vue";
|
|
2
|
+
const Bt = ["aria-label"], Tt = ["src", "alt"], ss = /* @__PURE__ */ S({
|
|
3
3
|
__name: "DsAvatar",
|
|
4
4
|
props: {
|
|
5
5
|
src: {},
|
|
@@ -9,11 +9,11 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
9
9
|
variant: { default: "brand" }
|
|
10
10
|
},
|
|
11
11
|
setup(e) {
|
|
12
|
-
const
|
|
13
|
-
we(() =>
|
|
14
|
-
|
|
12
|
+
const t = e, n = j(!1);
|
|
13
|
+
we(() => t.src, () => {
|
|
14
|
+
n.value = !1;
|
|
15
15
|
});
|
|
16
|
-
const o =
|
|
16
|
+
const o = C(() => t.name ? t.name.split(" ").map((a) => a[0]).slice(0, 2).join("").toUpperCase() : "?"), s = C(() => [
|
|
17
17
|
"inline-flex",
|
|
18
18
|
"items-center",
|
|
19
19
|
"justify-center",
|
|
@@ -25,8 +25,8 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
25
25
|
md: "w-8 h-8 text-sm",
|
|
26
26
|
lg: "w-10 h-10 text-base",
|
|
27
27
|
xl: "w-12 h-12 text-lg"
|
|
28
|
-
}[
|
|
29
|
-
].join(" ")), r =
|
|
28
|
+
}[t.size]
|
|
29
|
+
].join(" ")), r = C(() => [
|
|
30
30
|
"w-full",
|
|
31
31
|
"h-full",
|
|
32
32
|
"flex",
|
|
@@ -37,19 +37,19 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
37
37
|
{
|
|
38
38
|
brand: "bg-brand-soft text-brand-on-soft",
|
|
39
39
|
neutral: "bg-neutral-soft text-neutral-on-soft"
|
|
40
|
-
}[
|
|
40
|
+
}[t.variant]
|
|
41
41
|
].join(" "));
|
|
42
|
-
return (a,
|
|
42
|
+
return (a, d) => (g(), v("span", {
|
|
43
43
|
class: T(s.value),
|
|
44
44
|
role: "img",
|
|
45
45
|
"aria-label": e.alt || e.name
|
|
46
46
|
}, [
|
|
47
|
-
e.src && !
|
|
47
|
+
e.src && !n.value ? (g(), v("img", {
|
|
48
48
|
key: 0,
|
|
49
49
|
src: e.src,
|
|
50
50
|
alt: e.alt || e.name || "",
|
|
51
51
|
class: "w-full h-full object-cover rounded-full",
|
|
52
|
-
onError:
|
|
52
|
+
onError: d[0] || (d[0] = (i) => n.value = !0)
|
|
53
53
|
}, null, 40, Tt)) : (g(), v("span", {
|
|
54
54
|
key: 1,
|
|
55
55
|
class: T(r.value),
|
|
@@ -57,7 +57,7 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
57
57
|
}, E(o.value), 3))
|
|
58
58
|
], 10, Bt));
|
|
59
59
|
}
|
|
60
|
-
}),
|
|
60
|
+
}), rs = /* @__PURE__ */ S({
|
|
61
61
|
__name: "DsBadge",
|
|
62
62
|
props: {
|
|
63
63
|
label: {},
|
|
@@ -66,14 +66,14 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
66
66
|
dot: { type: Boolean, default: !1 }
|
|
67
67
|
},
|
|
68
68
|
setup(e) {
|
|
69
|
-
const
|
|
69
|
+
const t = e, n = C(() => {
|
|
70
70
|
const s = [
|
|
71
71
|
"inline-flex",
|
|
72
72
|
"items-center",
|
|
73
73
|
"font-medium",
|
|
74
74
|
"rounded-full",
|
|
75
75
|
"whitespace-nowrap"
|
|
76
|
-
], r =
|
|
76
|
+
], r = t.dot ? { sm: "px-1.5 py-0.5", md: "px-2 py-0.5", lg: "px-2.5 py-1" } : { sm: "px-1.5 py-0.5 text-xs", md: "px-2 py-0.5 text-xs", lg: "px-2.5 py-1 text-sm" }, a = {
|
|
77
77
|
brand: "bg-brand-soft text-brand-on-soft",
|
|
78
78
|
neutral: "bg-neutral-soft text-neutral-on-soft",
|
|
79
79
|
error: "bg-error-soft text-error-on-soft",
|
|
@@ -84,10 +84,10 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
84
84
|
};
|
|
85
85
|
return [
|
|
86
86
|
...s,
|
|
87
|
-
r[
|
|
88
|
-
a[
|
|
87
|
+
r[t.size],
|
|
88
|
+
a[t.variant]
|
|
89
89
|
].join(" ");
|
|
90
|
-
}), o =
|
|
90
|
+
}), o = C(() => {
|
|
91
91
|
const s = { sm: "w-1.5 h-1.5", md: "w-2 h-2", lg: "w-2.5 h-2.5" }, r = {
|
|
92
92
|
brand: "bg-brand",
|
|
93
93
|
neutral: "bg-neutral",
|
|
@@ -97,10 +97,10 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
97
97
|
info: "bg-info",
|
|
98
98
|
processing: "bg-processing"
|
|
99
99
|
};
|
|
100
|
-
return ["inline-block", "rounded-full", s[
|
|
100
|
+
return ["inline-block", "rounded-full", s[t.size], r[t.variant]].join(" ");
|
|
101
101
|
});
|
|
102
102
|
return (s, r) => (g(), v("span", {
|
|
103
|
-
class: T(
|
|
103
|
+
class: T(n.value)
|
|
104
104
|
}, [
|
|
105
105
|
e.dot ? (g(), v("span", {
|
|
106
106
|
key: 0,
|
|
@@ -128,7 +128,7 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
128
128
|
},
|
|
129
129
|
emits: ["click"],
|
|
130
130
|
setup(e) {
|
|
131
|
-
const
|
|
131
|
+
const t = e, n = C(() => {
|
|
132
132
|
const s = [
|
|
133
133
|
"inline-flex",
|
|
134
134
|
"items-center",
|
|
@@ -197,24 +197,24 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
197
197
|
"hover:bg-error-hover",
|
|
198
198
|
"active:bg-error-active"
|
|
199
199
|
]
|
|
200
|
-
},
|
|
200
|
+
}, d = t.fullWidth ? ["w-full"] : [];
|
|
201
201
|
return [
|
|
202
202
|
...s,
|
|
203
|
-
...r[
|
|
204
|
-
...a[
|
|
205
|
-
...
|
|
203
|
+
...r[t.size],
|
|
204
|
+
...a[t.variant],
|
|
205
|
+
...d
|
|
206
206
|
].join(" ");
|
|
207
|
-
}), o =
|
|
207
|
+
}), o = C(() => ({
|
|
208
208
|
small: "w-3 h-3",
|
|
209
209
|
medium: "w-4 h-4",
|
|
210
210
|
large: "w-5 h-5"
|
|
211
|
-
})[
|
|
211
|
+
})[t.size]);
|
|
212
212
|
return (s, r) => (g(), v("button", {
|
|
213
213
|
type: e.htmlType,
|
|
214
214
|
disabled: e.disabled || e.loading,
|
|
215
215
|
"aria-label": e.ariaLabel,
|
|
216
216
|
"aria-busy": e.loading ? "true" : void 0,
|
|
217
|
-
class: T(
|
|
217
|
+
class: T(n.value),
|
|
218
218
|
onClick: r[0] || (r[0] = (a) => s.$emit("click", a))
|
|
219
219
|
}, [
|
|
220
220
|
e.iconLeft ? (g(), I($e(e.iconLeft), {
|
|
@@ -241,7 +241,7 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
241
241
|
"stroke-linecap": "round",
|
|
242
242
|
"stroke-linejoin": "round",
|
|
243
243
|
class: "w-full h-full"
|
|
244
|
-
},
|
|
244
|
+
}, as = /* @__PURE__ */ S({
|
|
245
245
|
__name: "DsCheckbox",
|
|
246
246
|
props: {
|
|
247
247
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -252,38 +252,38 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
252
252
|
size: { default: "medium" }
|
|
253
253
|
},
|
|
254
254
|
emits: ["update:modelValue", "change"],
|
|
255
|
-
setup(e, { emit:
|
|
256
|
-
const
|
|
255
|
+
setup(e, { emit: t }) {
|
|
256
|
+
const n = e, o = t, s = {
|
|
257
257
|
small: { box: "w-3.5 h-3.5", label: "text-xs", radius: "rounded" },
|
|
258
258
|
medium: { box: "w-4 h-4", label: "text-sm", radius: "rounded" },
|
|
259
259
|
large: { box: "w-5 h-5", label: "text-base", radius: "rounded-md" }
|
|
260
|
-
}, r =
|
|
261
|
-
const
|
|
262
|
-
|
|
263
|
-
|
|
260
|
+
}, r = C(() => {
|
|
261
|
+
const i = s[n.size], f = [
|
|
262
|
+
i.box,
|
|
263
|
+
i.radius,
|
|
264
264
|
"inline-flex items-center justify-center",
|
|
265
265
|
"border border-solid",
|
|
266
266
|
"transition-all duration-150",
|
|
267
267
|
"shrink-0"
|
|
268
268
|
];
|
|
269
|
-
return
|
|
270
|
-
|
|
269
|
+
return n.disabled ? f.push(
|
|
270
|
+
n.modelValue ? "bg-brand-disabled border-brand-disabled text-brand-on-solid" : "bg-bg-tertiary border-border text-transparent",
|
|
271
271
|
"opacity-60"
|
|
272
|
-
) :
|
|
272
|
+
) : n.modelValue ? f.push("bg-brand border-brand text-brand-on-solid") : f.push(
|
|
273
273
|
"bg-bg border-border-strong text-transparent",
|
|
274
274
|
"group-hover:border-brand",
|
|
275
275
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-brand peer-focus-visible:ring-offset-2"
|
|
276
276
|
), f.join(" ");
|
|
277
|
-
}), a =
|
|
277
|
+
}), a = C(() => [
|
|
278
278
|
"font-sans select-none",
|
|
279
|
-
s[
|
|
280
|
-
|
|
281
|
-
].join(" ")),
|
|
282
|
-
if (
|
|
283
|
-
const
|
|
284
|
-
o("update:modelValue",
|
|
279
|
+
s[n.size].label,
|
|
280
|
+
n.disabled ? "text-fg-disabled" : "text-fg"
|
|
281
|
+
].join(" ")), d = (i) => {
|
|
282
|
+
if (n.disabled) return;
|
|
283
|
+
const c = i.target.checked;
|
|
284
|
+
o("update:modelValue", c), o("change", c, i);
|
|
285
285
|
};
|
|
286
|
-
return (
|
|
286
|
+
return (i, f) => (g(), v("label", {
|
|
287
287
|
class: T([
|
|
288
288
|
"inline-flex items-center gap-2",
|
|
289
289
|
e.disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
@@ -297,7 +297,7 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
297
297
|
disabled: e.disabled,
|
|
298
298
|
value: e.value,
|
|
299
299
|
class: "sr-only peer",
|
|
300
|
-
onChange:
|
|
300
|
+
onChange: d
|
|
301
301
|
}, null, 40, Vt),
|
|
302
302
|
F("span", {
|
|
303
303
|
class: T(r.value),
|
|
@@ -307,17 +307,17 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
307
307
|
F("polyline", { points: "2.5 6 5 8.5 9.5 3.5" }, null, -1)
|
|
308
308
|
])])) : D("", !0)
|
|
309
309
|
], 2),
|
|
310
|
-
e.label ||
|
|
310
|
+
e.label || i.$slots.default ? (g(), v("span", {
|
|
311
311
|
key: 0,
|
|
312
312
|
class: T(a.value)
|
|
313
313
|
}, [
|
|
314
|
-
N(
|
|
314
|
+
N(i.$slots, "default", {}, () => [
|
|
315
315
|
X(E(e.label), 1)
|
|
316
316
|
])
|
|
317
317
|
], 2)) : D("", !0)
|
|
318
318
|
], 2));
|
|
319
319
|
}
|
|
320
|
-
}), ae = Math.min, q = Math.max, De = Math.round,
|
|
320
|
+
}), ae = Math.min, q = Math.max, De = Math.round, Fe = Math.floor, Z = (e) => ({
|
|
321
321
|
x: e,
|
|
322
322
|
y: e
|
|
323
323
|
}), zt = {
|
|
@@ -329,11 +329,11 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
329
329
|
start: "end",
|
|
330
330
|
end: "start"
|
|
331
331
|
};
|
|
332
|
-
function Pe(e,
|
|
333
|
-
return q(e, ae(
|
|
332
|
+
function Pe(e, t, n) {
|
|
333
|
+
return q(e, ae(t, n));
|
|
334
334
|
}
|
|
335
|
-
function pe(e,
|
|
336
|
-
return typeof e == "function" ? e(
|
|
335
|
+
function pe(e, t) {
|
|
336
|
+
return typeof e == "function" ? e(t) : e;
|
|
337
337
|
}
|
|
338
338
|
function le(e) {
|
|
339
339
|
return e.split("-")[0];
|
|
@@ -354,39 +354,39 @@ function ne(e) {
|
|
|
354
354
|
function qe(e) {
|
|
355
355
|
return lt(ne(e));
|
|
356
356
|
}
|
|
357
|
-
function Pt(e,
|
|
358
|
-
|
|
357
|
+
function Pt(e, t, n) {
|
|
358
|
+
n === void 0 && (n = !1);
|
|
359
359
|
const o = ye(e), s = qe(e), r = He(s);
|
|
360
|
-
let a = s === "x" ? o === (
|
|
361
|
-
return
|
|
360
|
+
let a = s === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
361
|
+
return t.reference[r] > t.floating[r] && (a = Ee(a)), [a, Ee(a)];
|
|
362
362
|
}
|
|
363
363
|
function It(e) {
|
|
364
|
-
const
|
|
365
|
-
return [Ie(e),
|
|
364
|
+
const t = Ee(e);
|
|
365
|
+
return [Ie(e), t, Ie(t)];
|
|
366
366
|
}
|
|
367
367
|
function Ie(e) {
|
|
368
|
-
return e.replace(/start|end/g, (
|
|
368
|
+
return e.replace(/start|end/g, (t) => Mt[t]);
|
|
369
369
|
}
|
|
370
370
|
const Je = ["left", "right"], Qe = ["right", "left"], Nt = ["top", "bottom"], Wt = ["bottom", "top"];
|
|
371
|
-
function Ht(e,
|
|
371
|
+
function Ht(e, t, n) {
|
|
372
372
|
switch (e) {
|
|
373
373
|
case "top":
|
|
374
374
|
case "bottom":
|
|
375
|
-
return
|
|
375
|
+
return n ? t ? Qe : Je : t ? Je : Qe;
|
|
376
376
|
case "left":
|
|
377
377
|
case "right":
|
|
378
|
-
return
|
|
378
|
+
return t ? Nt : Wt;
|
|
379
379
|
default:
|
|
380
380
|
return [];
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
|
-
function qt(e,
|
|
383
|
+
function qt(e, t, n, o) {
|
|
384
384
|
const s = ye(e);
|
|
385
|
-
let r = Ht(le(e),
|
|
386
|
-
return s && (r = r.map((a) => a + "-" + s),
|
|
385
|
+
let r = Ht(le(e), n === "start", o);
|
|
386
|
+
return s && (r = r.map((a) => a + "-" + s), t && (r = r.concat(r.map(Ie)))), r;
|
|
387
387
|
}
|
|
388
388
|
function Ee(e) {
|
|
389
|
-
return e.replace(/left|right|bottom|top/g, (
|
|
389
|
+
return e.replace(/left|right|bottom|top/g, (t) => zt[t]);
|
|
390
390
|
}
|
|
391
391
|
function Kt(e) {
|
|
392
392
|
return {
|
|
@@ -407,147 +407,147 @@ function it(e) {
|
|
|
407
407
|
}
|
|
408
408
|
function Ae(e) {
|
|
409
409
|
const {
|
|
410
|
-
x:
|
|
411
|
-
y:
|
|
410
|
+
x: t,
|
|
411
|
+
y: n,
|
|
412
412
|
width: o,
|
|
413
413
|
height: s
|
|
414
414
|
} = e;
|
|
415
415
|
return {
|
|
416
416
|
width: o,
|
|
417
417
|
height: s,
|
|
418
|
-
top:
|
|
419
|
-
left:
|
|
420
|
-
right:
|
|
421
|
-
bottom:
|
|
422
|
-
x:
|
|
423
|
-
y:
|
|
418
|
+
top: n,
|
|
419
|
+
left: t,
|
|
420
|
+
right: t + o,
|
|
421
|
+
bottom: n + s,
|
|
422
|
+
x: t,
|
|
423
|
+
y: n
|
|
424
424
|
};
|
|
425
425
|
}
|
|
426
|
-
function Ze(e,
|
|
426
|
+
function Ze(e, t, n) {
|
|
427
427
|
let {
|
|
428
428
|
reference: o,
|
|
429
429
|
floating: s
|
|
430
430
|
} = e;
|
|
431
|
-
const r = ne(
|
|
432
|
-
let
|
|
433
|
-
switch (
|
|
431
|
+
const r = ne(t), a = qe(t), d = He(a), i = le(t), f = r === "y", c = o.x + o.width / 2 - s.width / 2, l = o.y + o.height / 2 - s.height / 2, m = o[d] / 2 - s[d] / 2;
|
|
432
|
+
let u;
|
|
433
|
+
switch (i) {
|
|
434
434
|
case "top":
|
|
435
|
-
|
|
436
|
-
x:
|
|
435
|
+
u = {
|
|
436
|
+
x: c,
|
|
437
437
|
y: o.y - s.height
|
|
438
438
|
};
|
|
439
439
|
break;
|
|
440
440
|
case "bottom":
|
|
441
|
-
|
|
442
|
-
x:
|
|
441
|
+
u = {
|
|
442
|
+
x: c,
|
|
443
443
|
y: o.y + o.height
|
|
444
444
|
};
|
|
445
445
|
break;
|
|
446
446
|
case "right":
|
|
447
|
-
|
|
447
|
+
u = {
|
|
448
448
|
x: o.x + o.width,
|
|
449
|
-
y:
|
|
449
|
+
y: l
|
|
450
450
|
};
|
|
451
451
|
break;
|
|
452
452
|
case "left":
|
|
453
|
-
|
|
453
|
+
u = {
|
|
454
454
|
x: o.x - s.width,
|
|
455
|
-
y:
|
|
455
|
+
y: l
|
|
456
456
|
};
|
|
457
457
|
break;
|
|
458
458
|
default:
|
|
459
|
-
|
|
459
|
+
u = {
|
|
460
460
|
x: o.x,
|
|
461
461
|
y: o.y
|
|
462
462
|
};
|
|
463
463
|
}
|
|
464
|
-
switch (ye(
|
|
464
|
+
switch (ye(t)) {
|
|
465
465
|
case "start":
|
|
466
|
-
|
|
466
|
+
u[a] -= m * (n && f ? -1 : 1);
|
|
467
467
|
break;
|
|
468
468
|
case "end":
|
|
469
|
-
|
|
469
|
+
u[a] += m * (n && f ? -1 : 1);
|
|
470
470
|
break;
|
|
471
471
|
}
|
|
472
|
-
return
|
|
472
|
+
return u;
|
|
473
473
|
}
|
|
474
|
-
async function Ut(e,
|
|
475
|
-
var
|
|
476
|
-
|
|
474
|
+
async function Ut(e, t) {
|
|
475
|
+
var n;
|
|
476
|
+
t === void 0 && (t = {});
|
|
477
477
|
const {
|
|
478
478
|
x: o,
|
|
479
479
|
y: s,
|
|
480
480
|
platform: r,
|
|
481
481
|
rects: a,
|
|
482
|
-
elements:
|
|
483
|
-
strategy:
|
|
482
|
+
elements: d,
|
|
483
|
+
strategy: i
|
|
484
484
|
} = e, {
|
|
485
485
|
boundary: f = "clippingAncestors",
|
|
486
|
-
rootBoundary:
|
|
487
|
-
elementContext:
|
|
486
|
+
rootBoundary: c = "viewport",
|
|
487
|
+
elementContext: l = "floating",
|
|
488
488
|
altBoundary: m = !1,
|
|
489
|
-
padding:
|
|
490
|
-
} = pe(
|
|
491
|
-
element: (
|
|
489
|
+
padding: u = 0
|
|
490
|
+
} = pe(t, e), h = it(u), y = d[m ? l === "floating" ? "reference" : "floating" : l], p = Ae(await r.getClippingRect({
|
|
491
|
+
element: (n = await (r.isElement == null ? void 0 : r.isElement(y))) == null || n ? y : y.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(d.floating)),
|
|
492
492
|
boundary: f,
|
|
493
|
-
rootBoundary:
|
|
494
|
-
strategy:
|
|
495
|
-
})),
|
|
493
|
+
rootBoundary: c,
|
|
494
|
+
strategy: i
|
|
495
|
+
})), k = l === "floating" ? {
|
|
496
496
|
x: o,
|
|
497
497
|
y: s,
|
|
498
498
|
width: a.floating.width,
|
|
499
499
|
height: a.floating.height
|
|
500
|
-
} : a.reference, x = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(
|
|
500
|
+
} : a.reference, x = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(d.floating)), $ = await (r.isElement == null ? void 0 : r.isElement(x)) ? await (r.getScale == null ? void 0 : r.getScale(x)) || {
|
|
501
501
|
x: 1,
|
|
502
502
|
y: 1
|
|
503
503
|
} : {
|
|
504
504
|
x: 1,
|
|
505
505
|
y: 1
|
|
506
506
|
}, B = Ae(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
507
|
-
elements:
|
|
508
|
-
rect:
|
|
507
|
+
elements: d,
|
|
508
|
+
rect: k,
|
|
509
509
|
offsetParent: x,
|
|
510
|
-
strategy:
|
|
511
|
-
}) :
|
|
510
|
+
strategy: i
|
|
511
|
+
}) : k);
|
|
512
512
|
return {
|
|
513
|
-
top: (
|
|
514
|
-
bottom: (B.bottom -
|
|
515
|
-
left: (
|
|
516
|
-
right: (B.right -
|
|
513
|
+
top: (p.top - B.top + h.top) / $.y,
|
|
514
|
+
bottom: (B.bottom - p.bottom + h.bottom) / $.y,
|
|
515
|
+
left: (p.left - B.left + h.left) / $.x,
|
|
516
|
+
right: (B.right - p.right + h.right) / $.x
|
|
517
517
|
};
|
|
518
518
|
}
|
|
519
|
-
const Xt = async (e,
|
|
519
|
+
const Xt = async (e, t, n) => {
|
|
520
520
|
const {
|
|
521
521
|
placement: o = "bottom",
|
|
522
522
|
strategy: s = "absolute",
|
|
523
523
|
middleware: r = [],
|
|
524
524
|
platform: a
|
|
525
|
-
} =
|
|
525
|
+
} = n, d = r.filter(Boolean), i = await (a.isRTL == null ? void 0 : a.isRTL(t));
|
|
526
526
|
let f = await a.getElementRects({
|
|
527
527
|
reference: e,
|
|
528
|
-
floating:
|
|
528
|
+
floating: t,
|
|
529
529
|
strategy: s
|
|
530
530
|
}), {
|
|
531
|
-
x:
|
|
532
|
-
y:
|
|
533
|
-
} = Ze(f, o,
|
|
534
|
-
for (let y = 0; y <
|
|
531
|
+
x: c,
|
|
532
|
+
y: l
|
|
533
|
+
} = Ze(f, o, i), m = o, u = {}, h = 0;
|
|
534
|
+
for (let y = 0; y < d.length; y++) {
|
|
535
535
|
var b;
|
|
536
536
|
const {
|
|
537
|
-
name:
|
|
538
|
-
fn:
|
|
539
|
-
} =
|
|
537
|
+
name: p,
|
|
538
|
+
fn: k
|
|
539
|
+
} = d[y], {
|
|
540
540
|
x,
|
|
541
541
|
y: $,
|
|
542
542
|
data: B,
|
|
543
543
|
reset: O
|
|
544
|
-
} = await
|
|
545
|
-
x:
|
|
546
|
-
y:
|
|
544
|
+
} = await k({
|
|
545
|
+
x: c,
|
|
546
|
+
y: l,
|
|
547
547
|
initialPlacement: o,
|
|
548
548
|
placement: m,
|
|
549
549
|
strategy: s,
|
|
550
|
-
middlewareData:
|
|
550
|
+
middlewareData: u,
|
|
551
551
|
rects: f,
|
|
552
552
|
platform: {
|
|
553
553
|
...a,
|
|
@@ -555,60 +555,60 @@ const Xt = async (e, n, t) => {
|
|
|
555
555
|
},
|
|
556
556
|
elements: {
|
|
557
557
|
reference: e,
|
|
558
|
-
floating:
|
|
558
|
+
floating: t
|
|
559
559
|
}
|
|
560
560
|
});
|
|
561
|
-
|
|
562
|
-
...
|
|
563
|
-
[
|
|
564
|
-
...
|
|
561
|
+
c = x ?? c, l = $ ?? l, u = {
|
|
562
|
+
...u,
|
|
563
|
+
[p]: {
|
|
564
|
+
...u[p],
|
|
565
565
|
...B
|
|
566
566
|
}
|
|
567
567
|
}, O && h <= 50 && (h++, typeof O == "object" && (O.placement && (m = O.placement), O.rects && (f = O.rects === !0 ? await a.getElementRects({
|
|
568
568
|
reference: e,
|
|
569
|
-
floating:
|
|
569
|
+
floating: t,
|
|
570
570
|
strategy: s
|
|
571
571
|
}) : O.rects), {
|
|
572
|
-
x:
|
|
573
|
-
y:
|
|
574
|
-
} = Ze(f, m,
|
|
572
|
+
x: c,
|
|
573
|
+
y: l
|
|
574
|
+
} = Ze(f, m, i)), y = -1);
|
|
575
575
|
}
|
|
576
576
|
return {
|
|
577
|
-
x:
|
|
578
|
-
y:
|
|
577
|
+
x: c,
|
|
578
|
+
y: l,
|
|
579
579
|
placement: m,
|
|
580
580
|
strategy: s,
|
|
581
|
-
middlewareData:
|
|
581
|
+
middlewareData: u
|
|
582
582
|
};
|
|
583
583
|
}, Yt = (e) => ({
|
|
584
584
|
name: "arrow",
|
|
585
585
|
options: e,
|
|
586
|
-
async fn(
|
|
586
|
+
async fn(t) {
|
|
587
587
|
const {
|
|
588
|
-
x:
|
|
588
|
+
x: n,
|
|
589
589
|
y: o,
|
|
590
590
|
placement: s,
|
|
591
591
|
rects: r,
|
|
592
592
|
platform: a,
|
|
593
|
-
elements:
|
|
594
|
-
middlewareData:
|
|
595
|
-
} =
|
|
593
|
+
elements: d,
|
|
594
|
+
middlewareData: i
|
|
595
|
+
} = t, {
|
|
596
596
|
element: f,
|
|
597
|
-
padding:
|
|
598
|
-
} = pe(e,
|
|
597
|
+
padding: c = 0
|
|
598
|
+
} = pe(e, t) || {};
|
|
599
599
|
if (f == null)
|
|
600
600
|
return {};
|
|
601
|
-
const
|
|
602
|
-
x:
|
|
601
|
+
const l = it(c), m = {
|
|
602
|
+
x: n,
|
|
603
603
|
y: o
|
|
604
|
-
},
|
|
604
|
+
}, u = qe(s), h = He(u), b = await a.getDimensions(f), y = u === "y", p = y ? "top" : "left", k = y ? "bottom" : "right", x = y ? "clientHeight" : "clientWidth", $ = r.reference[h] + r.reference[u] - m[u] - r.floating[h], B = m[u] - r.reference[u], O = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(f));
|
|
605
605
|
let A = O ? O[x] : 0;
|
|
606
|
-
(!A || !await (a.isElement == null ? void 0 : a.isElement(O))) && (A =
|
|
607
|
-
const z = $ / 2 - B / 2, M = A / 2 - b[h] / 2 - 1, W = ae(
|
|
606
|
+
(!A || !await (a.isElement == null ? void 0 : a.isElement(O))) && (A = d.floating[x] || r.floating[h]);
|
|
607
|
+
const z = $ / 2 - B / 2, M = A / 2 - b[h] / 2 - 1, W = ae(l[p], M), Y = ae(l[k], M), U = W, w = A - b[h] - Y, L = A / 2 - b[h] / 2 + z, V = Pe(U, L, w), P = !i.arrow && ye(s) != null && L !== V && r.reference[h] / 2 - (L < U ? W : Y) - b[h] / 2 < 0, H = P ? L < U ? L - U : L - w : 0;
|
|
608
608
|
return {
|
|
609
|
-
[
|
|
609
|
+
[u]: m[u] + H,
|
|
610
610
|
data: {
|
|
611
|
-
[
|
|
611
|
+
[u]: V,
|
|
612
612
|
centerOffset: L - V - H,
|
|
613
613
|
...P && {
|
|
614
614
|
alignmentOffset: H
|
|
@@ -621,31 +621,31 @@ const Xt = async (e, n, t) => {
|
|
|
621
621
|
return e === void 0 && (e = {}), {
|
|
622
622
|
name: "flip",
|
|
623
623
|
options: e,
|
|
624
|
-
async fn(
|
|
625
|
-
var
|
|
624
|
+
async fn(t) {
|
|
625
|
+
var n, o;
|
|
626
626
|
const {
|
|
627
627
|
placement: s,
|
|
628
628
|
middlewareData: r,
|
|
629
629
|
rects: a,
|
|
630
|
-
initialPlacement:
|
|
631
|
-
platform:
|
|
630
|
+
initialPlacement: d,
|
|
631
|
+
platform: i,
|
|
632
632
|
elements: f
|
|
633
|
-
} =
|
|
634
|
-
mainAxis:
|
|
635
|
-
crossAxis:
|
|
633
|
+
} = t, {
|
|
634
|
+
mainAxis: c = !0,
|
|
635
|
+
crossAxis: l = !0,
|
|
636
636
|
fallbackPlacements: m,
|
|
637
|
-
fallbackStrategy:
|
|
637
|
+
fallbackStrategy: u = "bestFit",
|
|
638
638
|
fallbackAxisSideDirection: h = "none",
|
|
639
639
|
flipAlignment: b = !0,
|
|
640
640
|
...y
|
|
641
|
-
} = pe(e,
|
|
642
|
-
if ((
|
|
641
|
+
} = pe(e, t);
|
|
642
|
+
if ((n = r.arrow) != null && n.alignmentOffset)
|
|
643
643
|
return {};
|
|
644
|
-
const
|
|
645
|
-
!m && O && B.push(...qt(
|
|
646
|
-
const A = [
|
|
644
|
+
const p = le(s), k = ne(d), x = le(d) === d, $ = await (i.isRTL == null ? void 0 : i.isRTL(f.floating)), B = m || (x || !b ? [Ee(d)] : It(d)), O = h !== "none";
|
|
645
|
+
!m && O && B.push(...qt(d, b, h, $));
|
|
646
|
+
const A = [d, ...B], z = await i.detectOverflow(t, y), M = [];
|
|
647
647
|
let W = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
648
|
-
if (
|
|
648
|
+
if (c && M.push(z[p]), l) {
|
|
649
649
|
const L = Pt(s, a, $);
|
|
650
650
|
M.push(z[L[0]], z[L[1]]);
|
|
651
651
|
}
|
|
@@ -655,9 +655,9 @@ const Xt = async (e, n, t) => {
|
|
|
655
655
|
}], !M.every((L) => L <= 0)) {
|
|
656
656
|
var Y, U;
|
|
657
657
|
const L = (((Y = r.flip) == null ? void 0 : Y.index) || 0) + 1, V = A[L];
|
|
658
|
-
if (V && (!(
|
|
658
|
+
if (V && (!(l === "alignment" ? k !== ne(V) : !1) || // We leave the current main axis only if every placement on that axis
|
|
659
659
|
// overflows the main axis.
|
|
660
|
-
W.every((G) => ne(G.placement) ===
|
|
660
|
+
W.every((G) => ne(G.placement) === k ? G.overflows[0] > 0 : !0)))
|
|
661
661
|
return {
|
|
662
662
|
data: {
|
|
663
663
|
index: L,
|
|
@@ -669,23 +669,23 @@ const Xt = async (e, n, t) => {
|
|
|
669
669
|
};
|
|
670
670
|
let P = (U = W.filter((H) => H.overflows[0] <= 0).sort((H, G) => H.overflows[1] - G.overflows[1])[0]) == null ? void 0 : U.placement;
|
|
671
671
|
if (!P)
|
|
672
|
-
switch (
|
|
672
|
+
switch (u) {
|
|
673
673
|
case "bestFit": {
|
|
674
|
-
var
|
|
675
|
-
const H = (
|
|
674
|
+
var w;
|
|
675
|
+
const H = (w = W.filter((G) => {
|
|
676
676
|
if (O) {
|
|
677
677
|
const oe = ne(G.placement);
|
|
678
|
-
return oe ===
|
|
678
|
+
return oe === k || // Create a bias to the `y` side axis due to horizontal
|
|
679
679
|
// reading directions favoring greater width.
|
|
680
680
|
oe === "y";
|
|
681
681
|
}
|
|
682
682
|
return !0;
|
|
683
|
-
}).map((G) => [G.placement, G.overflows.filter((oe) => oe > 0).reduce((oe, kt) => oe + kt, 0)]).sort((G, oe) => G[1] - oe[1])[0]) == null ? void 0 :
|
|
683
|
+
}).map((G) => [G.placement, G.overflows.filter((oe) => oe > 0).reduce((oe, kt) => oe + kt, 0)]).sort((G, oe) => G[1] - oe[1])[0]) == null ? void 0 : w[0];
|
|
684
684
|
H && (P = H);
|
|
685
685
|
break;
|
|
686
686
|
}
|
|
687
687
|
case "initialPlacement":
|
|
688
|
-
P =
|
|
688
|
+
P = d;
|
|
689
689
|
break;
|
|
690
690
|
}
|
|
691
691
|
if (s !== P)
|
|
@@ -699,50 +699,50 @@ const Xt = async (e, n, t) => {
|
|
|
699
699
|
}
|
|
700
700
|
};
|
|
701
701
|
}, Jt = /* @__PURE__ */ new Set(["left", "top"]);
|
|
702
|
-
async function Qt(e,
|
|
702
|
+
async function Qt(e, t) {
|
|
703
703
|
const {
|
|
704
|
-
placement:
|
|
704
|
+
placement: n,
|
|
705
705
|
platform: o,
|
|
706
706
|
elements: s
|
|
707
|
-
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), a = le(
|
|
707
|
+
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), a = le(n), d = ye(n), i = ne(n) === "y", f = Jt.has(a) ? -1 : 1, c = r && i ? -1 : 1, l = pe(t, e);
|
|
708
708
|
let {
|
|
709
709
|
mainAxis: m,
|
|
710
|
-
crossAxis:
|
|
710
|
+
crossAxis: u,
|
|
711
711
|
alignmentAxis: h
|
|
712
|
-
} = typeof
|
|
713
|
-
mainAxis:
|
|
712
|
+
} = typeof l == "number" ? {
|
|
713
|
+
mainAxis: l,
|
|
714
714
|
crossAxis: 0,
|
|
715
715
|
alignmentAxis: null
|
|
716
716
|
} : {
|
|
717
|
-
mainAxis:
|
|
718
|
-
crossAxis:
|
|
719
|
-
alignmentAxis:
|
|
717
|
+
mainAxis: l.mainAxis || 0,
|
|
718
|
+
crossAxis: l.crossAxis || 0,
|
|
719
|
+
alignmentAxis: l.alignmentAxis
|
|
720
720
|
};
|
|
721
|
-
return
|
|
722
|
-
x:
|
|
721
|
+
return d && typeof h == "number" && (u = d === "end" ? h * -1 : h), i ? {
|
|
722
|
+
x: u * c,
|
|
723
723
|
y: m * f
|
|
724
724
|
} : {
|
|
725
725
|
x: m * f,
|
|
726
|
-
y:
|
|
726
|
+
y: u * c
|
|
727
727
|
};
|
|
728
728
|
}
|
|
729
729
|
const Zt = function(e) {
|
|
730
730
|
return e === void 0 && (e = 0), {
|
|
731
731
|
name: "offset",
|
|
732
732
|
options: e,
|
|
733
|
-
async fn(
|
|
734
|
-
var
|
|
733
|
+
async fn(t) {
|
|
734
|
+
var n, o;
|
|
735
735
|
const {
|
|
736
736
|
x: s,
|
|
737
737
|
y: r,
|
|
738
738
|
placement: a,
|
|
739
|
-
middlewareData:
|
|
740
|
-
} =
|
|
741
|
-
return a === ((
|
|
742
|
-
x: s +
|
|
743
|
-
y: r +
|
|
739
|
+
middlewareData: d
|
|
740
|
+
} = t, i = await Qt(t, e);
|
|
741
|
+
return a === ((n = d.offset) == null ? void 0 : n.placement) && (o = d.arrow) != null && o.alignmentOffset ? {} : {
|
|
742
|
+
x: s + i.x,
|
|
743
|
+
y: r + i.y,
|
|
744
744
|
data: {
|
|
745
|
-
...
|
|
745
|
+
...i,
|
|
746
746
|
placement: a
|
|
747
747
|
}
|
|
748
748
|
};
|
|
@@ -752,54 +752,54 @@ const Zt = function(e) {
|
|
|
752
752
|
return e === void 0 && (e = {}), {
|
|
753
753
|
name: "shift",
|
|
754
754
|
options: e,
|
|
755
|
-
async fn(
|
|
755
|
+
async fn(t) {
|
|
756
756
|
const {
|
|
757
|
-
x:
|
|
757
|
+
x: n,
|
|
758
758
|
y: o,
|
|
759
759
|
placement: s,
|
|
760
760
|
platform: r
|
|
761
|
-
} =
|
|
761
|
+
} = t, {
|
|
762
762
|
mainAxis: a = !0,
|
|
763
|
-
crossAxis:
|
|
764
|
-
limiter:
|
|
765
|
-
fn: (
|
|
763
|
+
crossAxis: d = !1,
|
|
764
|
+
limiter: i = {
|
|
765
|
+
fn: (p) => {
|
|
766
766
|
let {
|
|
767
|
-
x:
|
|
767
|
+
x: k,
|
|
768
768
|
y: x
|
|
769
|
-
} =
|
|
769
|
+
} = p;
|
|
770
770
|
return {
|
|
771
|
-
x:
|
|
771
|
+
x: k,
|
|
772
772
|
y: x
|
|
773
773
|
};
|
|
774
774
|
}
|
|
775
775
|
},
|
|
776
776
|
...f
|
|
777
|
-
} = pe(e,
|
|
778
|
-
x:
|
|
777
|
+
} = pe(e, t), c = {
|
|
778
|
+
x: n,
|
|
779
779
|
y: o
|
|
780
|
-
},
|
|
781
|
-
let h =
|
|
780
|
+
}, l = await r.detectOverflow(t, f), m = ne(le(s)), u = lt(m);
|
|
781
|
+
let h = c[u], b = c[m];
|
|
782
782
|
if (a) {
|
|
783
|
-
const
|
|
783
|
+
const p = u === "y" ? "top" : "left", k = u === "y" ? "bottom" : "right", x = h + l[p], $ = h - l[k];
|
|
784
784
|
h = Pe(x, h, $);
|
|
785
785
|
}
|
|
786
|
-
if (
|
|
787
|
-
const
|
|
786
|
+
if (d) {
|
|
787
|
+
const p = m === "y" ? "top" : "left", k = m === "y" ? "bottom" : "right", x = b + l[p], $ = b - l[k];
|
|
788
788
|
b = Pe(x, b, $);
|
|
789
789
|
}
|
|
790
|
-
const y =
|
|
791
|
-
...
|
|
792
|
-
[
|
|
790
|
+
const y = i.fn({
|
|
791
|
+
...t,
|
|
792
|
+
[u]: h,
|
|
793
793
|
[m]: b
|
|
794
794
|
});
|
|
795
795
|
return {
|
|
796
796
|
...y,
|
|
797
797
|
data: {
|
|
798
|
-
x: y.x -
|
|
798
|
+
x: y.x - n,
|
|
799
799
|
y: y.y - o,
|
|
800
800
|
enabled: {
|
|
801
|
-
[
|
|
802
|
-
[m]:
|
|
801
|
+
[u]: a,
|
|
802
|
+
[m]: d
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
805
|
};
|
|
@@ -809,35 +809,35 @@ const Zt = function(e) {
|
|
|
809
809
|
return e === void 0 && (e = {}), {
|
|
810
810
|
name: "size",
|
|
811
811
|
options: e,
|
|
812
|
-
async fn(
|
|
813
|
-
var
|
|
812
|
+
async fn(t) {
|
|
813
|
+
var n, o;
|
|
814
814
|
const {
|
|
815
815
|
placement: s,
|
|
816
816
|
rects: r,
|
|
817
817
|
platform: a,
|
|
818
|
-
elements:
|
|
819
|
-
} =
|
|
820
|
-
apply:
|
|
818
|
+
elements: d
|
|
819
|
+
} = t, {
|
|
820
|
+
apply: i = () => {
|
|
821
821
|
},
|
|
822
822
|
...f
|
|
823
|
-
} = pe(e,
|
|
823
|
+
} = pe(e, t), c = await a.detectOverflow(t, f), l = le(s), m = ye(s), u = ne(s) === "y", {
|
|
824
824
|
width: h,
|
|
825
825
|
height: b
|
|
826
826
|
} = r.floating;
|
|
827
|
-
let y,
|
|
828
|
-
|
|
829
|
-
const
|
|
827
|
+
let y, p;
|
|
828
|
+
l === "top" || l === "bottom" ? (y = l, p = m === (await (a.isRTL == null ? void 0 : a.isRTL(d.floating)) ? "start" : "end") ? "left" : "right") : (p = l, y = m === "end" ? "top" : "bottom");
|
|
829
|
+
const k = b - c.top - c.bottom, x = h - c.left - c.right, $ = ae(b - c[y], k), B = ae(h - c[p], x), O = !t.middlewareData.shift;
|
|
830
830
|
let A = $, z = B;
|
|
831
|
-
if ((
|
|
832
|
-
const W = q(
|
|
833
|
-
|
|
831
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (z = x), (o = t.middlewareData.shift) != null && o.enabled.y && (A = k), O && !m) {
|
|
832
|
+
const W = q(c.left, 0), Y = q(c.right, 0), U = q(c.top, 0), w = q(c.bottom, 0);
|
|
833
|
+
u ? z = h - 2 * (W !== 0 || Y !== 0 ? W + Y : q(c.left, c.right)) : A = b - 2 * (U !== 0 || w !== 0 ? U + w : q(c.top, c.bottom));
|
|
834
834
|
}
|
|
835
|
-
await
|
|
836
|
-
...
|
|
835
|
+
await i({
|
|
836
|
+
...t,
|
|
837
837
|
availableWidth: z,
|
|
838
838
|
availableHeight: A
|
|
839
839
|
});
|
|
840
|
-
const M = await a.getDimensions(
|
|
840
|
+
const M = await a.getDimensions(d.floating);
|
|
841
841
|
return h !== M.width || b !== M.height ? {
|
|
842
842
|
reset: {
|
|
843
843
|
rects: !0
|
|
@@ -853,12 +853,12 @@ function ue(e) {
|
|
|
853
853
|
return Ke(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
854
854
|
}
|
|
855
855
|
function K(e) {
|
|
856
|
-
var
|
|
857
|
-
return (e == null || (
|
|
856
|
+
var t;
|
|
857
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
858
858
|
}
|
|
859
859
|
function te(e) {
|
|
860
|
-
var
|
|
861
|
-
return (
|
|
860
|
+
var t;
|
|
861
|
+
return (t = (Ke(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
862
862
|
}
|
|
863
863
|
function Ke(e) {
|
|
864
864
|
return Oe() ? e instanceof Node || e instanceof K(e).Node : !1;
|
|
@@ -873,14 +873,14 @@ function _e(e) {
|
|
|
873
873
|
return !Oe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof K(e).ShadowRoot;
|
|
874
874
|
}
|
|
875
875
|
const tn = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
876
|
-
function
|
|
876
|
+
function Ce(e) {
|
|
877
877
|
const {
|
|
878
|
-
overflow:
|
|
879
|
-
overflowX:
|
|
878
|
+
overflow: t,
|
|
879
|
+
overflowX: n,
|
|
880
880
|
overflowY: o,
|
|
881
881
|
display: s
|
|
882
882
|
} = Q(e);
|
|
883
|
-
return /auto|scroll|overlay|hidden|clip/.test(
|
|
883
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !tn.has(s);
|
|
884
884
|
}
|
|
885
885
|
const nn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
886
886
|
function on(e) {
|
|
@@ -888,9 +888,9 @@ function on(e) {
|
|
|
888
888
|
}
|
|
889
889
|
const sn = [":popover-open", ":modal"];
|
|
890
890
|
function Ve(e) {
|
|
891
|
-
return sn.some((
|
|
891
|
+
return sn.some((t) => {
|
|
892
892
|
try {
|
|
893
|
-
return e.matches(
|
|
893
|
+
return e.matches(t);
|
|
894
894
|
} catch {
|
|
895
895
|
return !1;
|
|
896
896
|
}
|
|
@@ -898,17 +898,17 @@ function Ve(e) {
|
|
|
898
898
|
}
|
|
899
899
|
const rn = ["transform", "translate", "scale", "rotate", "perspective"], an = ["transform", "translate", "scale", "rotate", "perspective", "filter"], ln = ["paint", "layout", "strict", "content"];
|
|
900
900
|
function Ue(e) {
|
|
901
|
-
const
|
|
902
|
-
return rn.some((o) =>
|
|
901
|
+
const t = Xe(), n = J(e) ? Q(e) : e;
|
|
902
|
+
return rn.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || an.some((o) => (n.willChange || "").includes(o)) || ln.some((o) => (n.contain || "").includes(o));
|
|
903
903
|
}
|
|
904
904
|
function cn(e) {
|
|
905
|
-
let
|
|
906
|
-
for (; ee(
|
|
907
|
-
if (Ue(
|
|
908
|
-
return
|
|
909
|
-
if (Ve(
|
|
905
|
+
let t = ie(e);
|
|
906
|
+
for (; ee(t) && !ve(t); ) {
|
|
907
|
+
if (Ue(t))
|
|
908
|
+
return t;
|
|
909
|
+
if (Ve(t))
|
|
910
910
|
return null;
|
|
911
|
-
|
|
911
|
+
t = ie(t);
|
|
912
912
|
}
|
|
913
913
|
return null;
|
|
914
914
|
}
|
|
@@ -934,99 +934,99 @@ function Se(e) {
|
|
|
934
934
|
function ie(e) {
|
|
935
935
|
if (ue(e) === "html")
|
|
936
936
|
return e;
|
|
937
|
-
const
|
|
937
|
+
const t = (
|
|
938
938
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
939
939
|
e.assignedSlot || // DOM Element detected.
|
|
940
940
|
e.parentNode || // ShadowRoot detected.
|
|
941
941
|
_e(e) && e.host || // Fallback.
|
|
942
942
|
te(e)
|
|
943
943
|
);
|
|
944
|
-
return _e(
|
|
944
|
+
return _e(t) ? t.host : t;
|
|
945
945
|
}
|
|
946
946
|
function ct(e) {
|
|
947
|
-
const
|
|
948
|
-
return ve(
|
|
947
|
+
const t = ie(e);
|
|
948
|
+
return ve(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : ee(t) && Ce(t) ? t : ct(t);
|
|
949
949
|
}
|
|
950
|
-
function ke(e,
|
|
950
|
+
function ke(e, t, n) {
|
|
951
951
|
var o;
|
|
952
|
-
|
|
952
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
953
953
|
const s = ct(e), r = s === ((o = e.ownerDocument) == null ? void 0 : o.body), a = K(s);
|
|
954
954
|
if (r) {
|
|
955
|
-
const
|
|
956
|
-
return
|
|
955
|
+
const d = Ne(a);
|
|
956
|
+
return t.concat(a, a.visualViewport || [], Ce(s) ? s : [], d && n ? ke(d) : []);
|
|
957
957
|
}
|
|
958
|
-
return
|
|
958
|
+
return t.concat(s, ke(s, [], n));
|
|
959
959
|
}
|
|
960
960
|
function Ne(e) {
|
|
961
961
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
962
962
|
}
|
|
963
963
|
function dt(e) {
|
|
964
|
-
const
|
|
965
|
-
let
|
|
966
|
-
const s = ee(e), r = s ? e.offsetWidth :
|
|
967
|
-
return
|
|
968
|
-
width:
|
|
964
|
+
const t = Q(e);
|
|
965
|
+
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
966
|
+
const s = ee(e), r = s ? e.offsetWidth : n, a = s ? e.offsetHeight : o, d = De(n) !== r || De(o) !== a;
|
|
967
|
+
return d && (n = r, o = a), {
|
|
968
|
+
width: n,
|
|
969
969
|
height: o,
|
|
970
|
-
$:
|
|
970
|
+
$: d
|
|
971
971
|
};
|
|
972
972
|
}
|
|
973
973
|
function Ye(e) {
|
|
974
974
|
return J(e) ? e : e.contextElement;
|
|
975
975
|
}
|
|
976
976
|
function ge(e) {
|
|
977
|
-
const
|
|
978
|
-
if (!ee(
|
|
977
|
+
const t = Ye(e);
|
|
978
|
+
if (!ee(t))
|
|
979
979
|
return Z(1);
|
|
980
|
-
const
|
|
980
|
+
const n = t.getBoundingClientRect(), {
|
|
981
981
|
width: o,
|
|
982
982
|
height: s,
|
|
983
983
|
$: r
|
|
984
|
-
} = dt(
|
|
985
|
-
let a = (r ? De(
|
|
986
|
-
return (!a || !Number.isFinite(a)) && (a = 1), (!
|
|
984
|
+
} = dt(t);
|
|
985
|
+
let a = (r ? De(n.width) : n.width) / o, d = (r ? De(n.height) : n.height) / s;
|
|
986
|
+
return (!a || !Number.isFinite(a)) && (a = 1), (!d || !Number.isFinite(d)) && (d = 1), {
|
|
987
987
|
x: a,
|
|
988
|
-
y:
|
|
988
|
+
y: d
|
|
989
989
|
};
|
|
990
990
|
}
|
|
991
991
|
const un = /* @__PURE__ */ Z(0);
|
|
992
992
|
function ut(e) {
|
|
993
|
-
const
|
|
994
|
-
return !Xe() || !
|
|
995
|
-
x:
|
|
996
|
-
y:
|
|
993
|
+
const t = K(e);
|
|
994
|
+
return !Xe() || !t.visualViewport ? un : {
|
|
995
|
+
x: t.visualViewport.offsetLeft,
|
|
996
|
+
y: t.visualViewport.offsetTop
|
|
997
997
|
};
|
|
998
998
|
}
|
|
999
|
-
function fn(e,
|
|
1000
|
-
return
|
|
999
|
+
function fn(e, t, n) {
|
|
1000
|
+
return t === void 0 && (t = !1), !n || t && n !== K(e) ? !1 : t;
|
|
1001
1001
|
}
|
|
1002
|
-
function ce(e,
|
|
1003
|
-
|
|
1002
|
+
function ce(e, t, n, o) {
|
|
1003
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1004
1004
|
const s = e.getBoundingClientRect(), r = Ye(e);
|
|
1005
1005
|
let a = Z(1);
|
|
1006
|
-
|
|
1007
|
-
const
|
|
1008
|
-
let
|
|
1006
|
+
t && (o ? J(o) && (a = ge(o)) : a = ge(e));
|
|
1007
|
+
const d = fn(r, n, o) ? ut(r) : Z(0);
|
|
1008
|
+
let i = (s.left + d.x) / a.x, f = (s.top + d.y) / a.y, c = s.width / a.x, l = s.height / a.y;
|
|
1009
1009
|
if (r) {
|
|
1010
|
-
const m = K(r),
|
|
1010
|
+
const m = K(r), u = o && J(o) ? K(o) : o;
|
|
1011
1011
|
let h = m, b = Ne(h);
|
|
1012
|
-
for (; b && o &&
|
|
1013
|
-
const y = ge(b),
|
|
1014
|
-
|
|
1012
|
+
for (; b && o && u !== h; ) {
|
|
1013
|
+
const y = ge(b), p = b.getBoundingClientRect(), k = Q(b), x = p.left + (b.clientLeft + parseFloat(k.paddingLeft)) * y.x, $ = p.top + (b.clientTop + parseFloat(k.paddingTop)) * y.y;
|
|
1014
|
+
i *= y.x, f *= y.y, c *= y.x, l *= y.y, i += x, f += $, h = K(b), b = Ne(h);
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
1017
|
return Ae({
|
|
1018
|
-
width:
|
|
1019
|
-
height:
|
|
1020
|
-
x:
|
|
1018
|
+
width: c,
|
|
1019
|
+
height: l,
|
|
1020
|
+
x: i,
|
|
1021
1021
|
y: f
|
|
1022
1022
|
});
|
|
1023
1023
|
}
|
|
1024
|
-
function ze(e,
|
|
1025
|
-
const
|
|
1026
|
-
return
|
|
1024
|
+
function ze(e, t) {
|
|
1025
|
+
const n = Se(e).scrollLeft;
|
|
1026
|
+
return t ? t.left + n : ce(te(e)).left + n;
|
|
1027
1027
|
}
|
|
1028
|
-
function ft(e,
|
|
1029
|
-
const
|
|
1028
|
+
function ft(e, t) {
|
|
1029
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - ze(e, n), s = n.top + t.scrollTop;
|
|
1030
1030
|
return {
|
|
1031
1031
|
x: o,
|
|
1032
1032
|
y: s
|
|
@@ -1034,159 +1034,159 @@ function ft(e, n) {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
function bn(e) {
|
|
1036
1036
|
let {
|
|
1037
|
-
elements:
|
|
1038
|
-
rect:
|
|
1037
|
+
elements: t,
|
|
1038
|
+
rect: n,
|
|
1039
1039
|
offsetParent: o,
|
|
1040
1040
|
strategy: s
|
|
1041
1041
|
} = e;
|
|
1042
|
-
const r = s === "fixed", a = te(o),
|
|
1043
|
-
if (o === a ||
|
|
1044
|
-
return
|
|
1045
|
-
let
|
|
1042
|
+
const r = s === "fixed", a = te(o), d = t ? Ve(t.floating) : !1;
|
|
1043
|
+
if (o === a || d && r)
|
|
1044
|
+
return n;
|
|
1045
|
+
let i = {
|
|
1046
1046
|
scrollLeft: 0,
|
|
1047
1047
|
scrollTop: 0
|
|
1048
1048
|
}, f = Z(1);
|
|
1049
|
-
const
|
|
1050
|
-
if ((
|
|
1051
|
-
const
|
|
1052
|
-
f = ge(o),
|
|
1049
|
+
const c = Z(0), l = ee(o);
|
|
1050
|
+
if ((l || !l && !r) && ((ue(o) !== "body" || Ce(a)) && (i = Se(o)), ee(o))) {
|
|
1051
|
+
const u = ce(o);
|
|
1052
|
+
f = ge(o), c.x = u.x + o.clientLeft, c.y = u.y + o.clientTop;
|
|
1053
1053
|
}
|
|
1054
|
-
const m = a && !
|
|
1054
|
+
const m = a && !l && !r ? ft(a, i) : Z(0);
|
|
1055
1055
|
return {
|
|
1056
|
-
width:
|
|
1057
|
-
height:
|
|
1058
|
-
x:
|
|
1059
|
-
y:
|
|
1056
|
+
width: n.width * f.x,
|
|
1057
|
+
height: n.height * f.y,
|
|
1058
|
+
x: n.x * f.x - i.scrollLeft * f.x + c.x + m.x,
|
|
1059
|
+
y: n.y * f.y - i.scrollTop * f.y + c.y + m.y
|
|
1060
1060
|
};
|
|
1061
1061
|
}
|
|
1062
1062
|
function mn(e) {
|
|
1063
1063
|
return Array.from(e.getClientRects());
|
|
1064
1064
|
}
|
|
1065
1065
|
function gn(e) {
|
|
1066
|
-
const
|
|
1067
|
-
let a = -
|
|
1068
|
-
const
|
|
1069
|
-
return Q(o).direction === "rtl" && (a += q(
|
|
1066
|
+
const t = te(e), n = Se(e), o = e.ownerDocument.body, s = q(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = q(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
1067
|
+
let a = -n.scrollLeft + ze(e);
|
|
1068
|
+
const d = -n.scrollTop;
|
|
1069
|
+
return Q(o).direction === "rtl" && (a += q(t.clientWidth, o.clientWidth) - s), {
|
|
1070
1070
|
width: s,
|
|
1071
1071
|
height: r,
|
|
1072
1072
|
x: a,
|
|
1073
|
-
y:
|
|
1073
|
+
y: d
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
1076
|
const et = 25;
|
|
1077
|
-
function hn(e,
|
|
1078
|
-
const
|
|
1079
|
-
let r = o.clientWidth, a = o.clientHeight,
|
|
1077
|
+
function hn(e, t) {
|
|
1078
|
+
const n = K(e), o = te(e), s = n.visualViewport;
|
|
1079
|
+
let r = o.clientWidth, a = o.clientHeight, d = 0, i = 0;
|
|
1080
1080
|
if (s) {
|
|
1081
1081
|
r = s.width, a = s.height;
|
|
1082
|
-
const
|
|
1083
|
-
(!
|
|
1082
|
+
const c = Xe();
|
|
1083
|
+
(!c || c && t === "fixed") && (d = s.offsetLeft, i = s.offsetTop);
|
|
1084
1084
|
}
|
|
1085
1085
|
const f = ze(o);
|
|
1086
1086
|
if (f <= 0) {
|
|
1087
|
-
const
|
|
1087
|
+
const c = o.ownerDocument, l = c.body, m = getComputedStyle(l), u = c.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, h = Math.abs(o.clientWidth - l.clientWidth - u);
|
|
1088
1088
|
h <= et && (r -= h);
|
|
1089
1089
|
} else f <= et && (r += f);
|
|
1090
1090
|
return {
|
|
1091
1091
|
width: r,
|
|
1092
1092
|
height: a,
|
|
1093
|
-
x:
|
|
1094
|
-
y:
|
|
1093
|
+
x: d,
|
|
1094
|
+
y: i
|
|
1095
1095
|
};
|
|
1096
1096
|
}
|
|
1097
1097
|
const vn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1098
|
-
function pn(e,
|
|
1099
|
-
const
|
|
1098
|
+
function pn(e, t) {
|
|
1099
|
+
const n = ce(e, !0, t === "fixed"), o = n.top + e.clientTop, s = n.left + e.clientLeft, r = ee(e) ? ge(e) : Z(1), a = e.clientWidth * r.x, d = e.clientHeight * r.y, i = s * r.x, f = o * r.y;
|
|
1100
1100
|
return {
|
|
1101
1101
|
width: a,
|
|
1102
|
-
height:
|
|
1103
|
-
x:
|
|
1102
|
+
height: d,
|
|
1103
|
+
x: i,
|
|
1104
1104
|
y: f
|
|
1105
1105
|
};
|
|
1106
1106
|
}
|
|
1107
|
-
function tt(e,
|
|
1107
|
+
function tt(e, t, n) {
|
|
1108
1108
|
let o;
|
|
1109
|
-
if (
|
|
1110
|
-
o = hn(e,
|
|
1111
|
-
else if (
|
|
1109
|
+
if (t === "viewport")
|
|
1110
|
+
o = hn(e, n);
|
|
1111
|
+
else if (t === "document")
|
|
1112
1112
|
o = gn(te(e));
|
|
1113
|
-
else if (J(
|
|
1114
|
-
o = pn(
|
|
1113
|
+
else if (J(t))
|
|
1114
|
+
o = pn(t, n);
|
|
1115
1115
|
else {
|
|
1116
1116
|
const s = ut(e);
|
|
1117
1117
|
o = {
|
|
1118
|
-
x:
|
|
1119
|
-
y:
|
|
1120
|
-
width:
|
|
1121
|
-
height:
|
|
1118
|
+
x: t.x - s.x,
|
|
1119
|
+
y: t.y - s.y,
|
|
1120
|
+
width: t.width,
|
|
1121
|
+
height: t.height
|
|
1122
1122
|
};
|
|
1123
1123
|
}
|
|
1124
1124
|
return Ae(o);
|
|
1125
1125
|
}
|
|
1126
|
-
function bt(e,
|
|
1127
|
-
const
|
|
1128
|
-
return
|
|
1126
|
+
function bt(e, t) {
|
|
1127
|
+
const n = ie(e);
|
|
1128
|
+
return n === t || !J(n) || ve(n) ? !1 : Q(n).position === "fixed" || bt(n, t);
|
|
1129
1129
|
}
|
|
1130
|
-
function yn(e,
|
|
1131
|
-
const
|
|
1132
|
-
if (
|
|
1133
|
-
return
|
|
1134
|
-
let o = ke(e, [], !1).filter((
|
|
1130
|
+
function yn(e, t) {
|
|
1131
|
+
const n = t.get(e);
|
|
1132
|
+
if (n)
|
|
1133
|
+
return n;
|
|
1134
|
+
let o = ke(e, [], !1).filter((d) => J(d) && ue(d) !== "body"), s = null;
|
|
1135
1135
|
const r = Q(e).position === "fixed";
|
|
1136
1136
|
let a = r ? ie(e) : e;
|
|
1137
1137
|
for (; J(a) && !ve(a); ) {
|
|
1138
|
-
const
|
|
1139
|
-
!
|
|
1138
|
+
const d = Q(a), i = Ue(a);
|
|
1139
|
+
!i && d.position === "fixed" && (s = null), (r ? !i && !s : !i && d.position === "static" && !!s && vn.has(s.position) || Ce(a) && !i && bt(e, a)) ? o = o.filter((c) => c !== a) : s = d, a = ie(a);
|
|
1140
1140
|
}
|
|
1141
|
-
return
|
|
1141
|
+
return t.set(e, o), o;
|
|
1142
1142
|
}
|
|
1143
1143
|
function xn(e) {
|
|
1144
1144
|
let {
|
|
1145
|
-
element:
|
|
1146
|
-
boundary:
|
|
1145
|
+
element: t,
|
|
1146
|
+
boundary: n,
|
|
1147
1147
|
rootBoundary: o,
|
|
1148
1148
|
strategy: s
|
|
1149
1149
|
} = e;
|
|
1150
|
-
const a = [...
|
|
1151
|
-
const
|
|
1152
|
-
return f.top = q(
|
|
1153
|
-
}, tt(
|
|
1150
|
+
const a = [...n === "clippingAncestors" ? Ve(t) ? [] : yn(t, this._c) : [].concat(n), o], d = a[0], i = a.reduce((f, c) => {
|
|
1151
|
+
const l = tt(t, c, s);
|
|
1152
|
+
return f.top = q(l.top, f.top), f.right = ae(l.right, f.right), f.bottom = ae(l.bottom, f.bottom), f.left = q(l.left, f.left), f;
|
|
1153
|
+
}, tt(t, d, s));
|
|
1154
1154
|
return {
|
|
1155
|
-
width:
|
|
1156
|
-
height:
|
|
1157
|
-
x:
|
|
1158
|
-
y:
|
|
1155
|
+
width: i.right - i.left,
|
|
1156
|
+
height: i.bottom - i.top,
|
|
1157
|
+
x: i.left,
|
|
1158
|
+
y: i.top
|
|
1159
1159
|
};
|
|
1160
1160
|
}
|
|
1161
1161
|
function wn(e) {
|
|
1162
1162
|
const {
|
|
1163
|
-
width:
|
|
1164
|
-
height:
|
|
1163
|
+
width: t,
|
|
1164
|
+
height: n
|
|
1165
1165
|
} = dt(e);
|
|
1166
1166
|
return {
|
|
1167
|
-
width:
|
|
1168
|
-
height:
|
|
1167
|
+
width: t,
|
|
1168
|
+
height: n
|
|
1169
1169
|
};
|
|
1170
1170
|
}
|
|
1171
|
-
function kn(e,
|
|
1172
|
-
const o = ee(
|
|
1173
|
-
let
|
|
1171
|
+
function kn(e, t, n) {
|
|
1172
|
+
const o = ee(t), s = te(t), r = n === "fixed", a = ce(e, !0, r, t);
|
|
1173
|
+
let d = {
|
|
1174
1174
|
scrollLeft: 0,
|
|
1175
1175
|
scrollTop: 0
|
|
1176
1176
|
};
|
|
1177
|
-
const
|
|
1177
|
+
const i = Z(0);
|
|
1178
1178
|
function f() {
|
|
1179
|
-
|
|
1179
|
+
i.x = ze(s);
|
|
1180
1180
|
}
|
|
1181
1181
|
if (o || !o && !r)
|
|
1182
|
-
if ((ue(
|
|
1183
|
-
const
|
|
1184
|
-
|
|
1182
|
+
if ((ue(t) !== "body" || Ce(s)) && (d = Se(t)), o) {
|
|
1183
|
+
const u = ce(t, !0, r, t);
|
|
1184
|
+
i.x = u.x + t.clientLeft, i.y = u.y + t.clientTop;
|
|
1185
1185
|
} else s && f();
|
|
1186
1186
|
r && !o && s && f();
|
|
1187
|
-
const
|
|
1187
|
+
const c = s && !o && !r ? ft(s, d) : Z(0), l = a.left + d.scrollLeft - i.x - c.x, m = a.top + d.scrollTop - i.y - c.y;
|
|
1188
1188
|
return {
|
|
1189
|
-
x:
|
|
1189
|
+
x: l,
|
|
1190
1190
|
y: m,
|
|
1191
1191
|
width: a.width,
|
|
1192
1192
|
height: a.height
|
|
@@ -1195,18 +1195,18 @@ function kn(e, n, t) {
|
|
|
1195
1195
|
function Me(e) {
|
|
1196
1196
|
return Q(e).position === "static";
|
|
1197
1197
|
}
|
|
1198
|
-
function nt(e,
|
|
1198
|
+
function nt(e, t) {
|
|
1199
1199
|
if (!ee(e) || Q(e).position === "fixed")
|
|
1200
1200
|
return null;
|
|
1201
|
-
if (
|
|
1202
|
-
return
|
|
1203
|
-
let
|
|
1204
|
-
return te(e) ===
|
|
1201
|
+
if (t)
|
|
1202
|
+
return t(e);
|
|
1203
|
+
let n = e.offsetParent;
|
|
1204
|
+
return te(e) === n && (n = n.ownerDocument.body), n;
|
|
1205
1205
|
}
|
|
1206
|
-
function mt(e,
|
|
1207
|
-
const
|
|
1206
|
+
function mt(e, t) {
|
|
1207
|
+
const n = K(e);
|
|
1208
1208
|
if (Ve(e))
|
|
1209
|
-
return
|
|
1209
|
+
return n;
|
|
1210
1210
|
if (!ee(e)) {
|
|
1211
1211
|
let s = ie(e);
|
|
1212
1212
|
for (; s && !ve(s); ) {
|
|
@@ -1214,17 +1214,17 @@ function mt(e, n) {
|
|
|
1214
1214
|
return s;
|
|
1215
1215
|
s = ie(s);
|
|
1216
1216
|
}
|
|
1217
|
-
return
|
|
1217
|
+
return n;
|
|
1218
1218
|
}
|
|
1219
|
-
let o = nt(e,
|
|
1219
|
+
let o = nt(e, t);
|
|
1220
1220
|
for (; o && on(o) && Me(o); )
|
|
1221
|
-
o = nt(o,
|
|
1222
|
-
return o && ve(o) && Me(o) && !Ue(o) ?
|
|
1221
|
+
o = nt(o, t);
|
|
1222
|
+
return o && ve(o) && Me(o) && !Ue(o) ? n : o || cn(e) || n;
|
|
1223
1223
|
}
|
|
1224
|
-
const
|
|
1225
|
-
const
|
|
1224
|
+
const Cn = async function(e) {
|
|
1225
|
+
const t = this.getOffsetParent || mt, n = this.getDimensions, o = await n(e.floating);
|
|
1226
1226
|
return {
|
|
1227
|
-
reference: kn(e.reference, await
|
|
1227
|
+
reference: kn(e.reference, await t(e.floating), e.strategy),
|
|
1228
1228
|
floating: {
|
|
1229
1229
|
x: 0,
|
|
1230
1230
|
y: 0,
|
|
@@ -1233,7 +1233,7 @@ const Fn = async function(e) {
|
|
|
1233
1233
|
}
|
|
1234
1234
|
};
|
|
1235
1235
|
};
|
|
1236
|
-
function
|
|
1236
|
+
function Fn(e) {
|
|
1237
1237
|
return Q(e).direction === "rtl";
|
|
1238
1238
|
}
|
|
1239
1239
|
const $n = {
|
|
@@ -1241,41 +1241,41 @@ const $n = {
|
|
|
1241
1241
|
getDocumentElement: te,
|
|
1242
1242
|
getClippingRect: xn,
|
|
1243
1243
|
getOffsetParent: mt,
|
|
1244
|
-
getElementRects:
|
|
1244
|
+
getElementRects: Cn,
|
|
1245
1245
|
getClientRects: mn,
|
|
1246
1246
|
getDimensions: wn,
|
|
1247
1247
|
getScale: ge,
|
|
1248
1248
|
isElement: J,
|
|
1249
|
-
isRTL:
|
|
1249
|
+
isRTL: Fn
|
|
1250
1250
|
};
|
|
1251
|
-
function gt(e,
|
|
1252
|
-
return e.x ===
|
|
1251
|
+
function gt(e, t) {
|
|
1252
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1253
1253
|
}
|
|
1254
|
-
function Dn(e,
|
|
1255
|
-
let
|
|
1254
|
+
function Dn(e, t) {
|
|
1255
|
+
let n = null, o;
|
|
1256
1256
|
const s = te(e);
|
|
1257
1257
|
function r() {
|
|
1258
|
-
var
|
|
1259
|
-
clearTimeout(o), (
|
|
1258
|
+
var d;
|
|
1259
|
+
clearTimeout(o), (d = n) == null || d.disconnect(), n = null;
|
|
1260
1260
|
}
|
|
1261
|
-
function a(
|
|
1262
|
-
|
|
1261
|
+
function a(d, i) {
|
|
1262
|
+
d === void 0 && (d = !1), i === void 0 && (i = 1), r();
|
|
1263
1263
|
const f = e.getBoundingClientRect(), {
|
|
1264
|
-
left:
|
|
1265
|
-
top:
|
|
1264
|
+
left: c,
|
|
1265
|
+
top: l,
|
|
1266
1266
|
width: m,
|
|
1267
|
-
height:
|
|
1267
|
+
height: u
|
|
1268
1268
|
} = f;
|
|
1269
|
-
if (
|
|
1269
|
+
if (d || t(), !m || !u)
|
|
1270
1270
|
return;
|
|
1271
|
-
const h =
|
|
1272
|
-
rootMargin: -h + "px " + -b + "px " + -y + "px " + -
|
|
1273
|
-
threshold: q(0, ae(1,
|
|
1271
|
+
const h = Fe(l), b = Fe(s.clientWidth - (c + m)), y = Fe(s.clientHeight - (l + u)), p = Fe(c), x = {
|
|
1272
|
+
rootMargin: -h + "px " + -b + "px " + -y + "px " + -p + "px",
|
|
1273
|
+
threshold: q(0, ae(1, i)) || 1
|
|
1274
1274
|
};
|
|
1275
1275
|
let $ = !0;
|
|
1276
1276
|
function B(O) {
|
|
1277
1277
|
const A = O[0].intersectionRatio;
|
|
1278
|
-
if (A !==
|
|
1278
|
+
if (A !== i) {
|
|
1279
1279
|
if (!$)
|
|
1280
1280
|
return a();
|
|
1281
1281
|
A ? a(!1, A) : o = setTimeout(() => {
|
|
@@ -1285,63 +1285,63 @@ function Dn(e, n) {
|
|
|
1285
1285
|
A === 1 && !gt(f, e.getBoundingClientRect()) && a(), $ = !1;
|
|
1286
1286
|
}
|
|
1287
1287
|
try {
|
|
1288
|
-
|
|
1288
|
+
n = new IntersectionObserver(B, {
|
|
1289
1289
|
...x,
|
|
1290
1290
|
// Handle <iframe>s
|
|
1291
1291
|
root: s.ownerDocument
|
|
1292
1292
|
});
|
|
1293
1293
|
} catch {
|
|
1294
|
-
|
|
1294
|
+
n = new IntersectionObserver(B, x);
|
|
1295
1295
|
}
|
|
1296
|
-
|
|
1296
|
+
n.observe(e);
|
|
1297
1297
|
}
|
|
1298
1298
|
return a(!0), r;
|
|
1299
1299
|
}
|
|
1300
|
-
function En(e,
|
|
1300
|
+
function En(e, t, n, o) {
|
|
1301
1301
|
o === void 0 && (o = {});
|
|
1302
1302
|
const {
|
|
1303
1303
|
ancestorScroll: s = !0,
|
|
1304
1304
|
ancestorResize: r = !0,
|
|
1305
1305
|
elementResize: a = typeof ResizeObserver == "function",
|
|
1306
|
-
layoutShift:
|
|
1307
|
-
animationFrame:
|
|
1308
|
-
} = o, f = Ye(e),
|
|
1309
|
-
|
|
1310
|
-
s &&
|
|
1306
|
+
layoutShift: d = typeof IntersectionObserver == "function",
|
|
1307
|
+
animationFrame: i = !1
|
|
1308
|
+
} = o, f = Ye(e), c = s || r ? [...f ? ke(f) : [], ...ke(t)] : [];
|
|
1309
|
+
c.forEach((p) => {
|
|
1310
|
+
s && p.addEventListener("scroll", n, {
|
|
1311
1311
|
passive: !0
|
|
1312
|
-
}), r &&
|
|
1312
|
+
}), r && p.addEventListener("resize", n);
|
|
1313
1313
|
});
|
|
1314
|
-
const
|
|
1315
|
-
let m = -1,
|
|
1316
|
-
a && (
|
|
1317
|
-
let [
|
|
1318
|
-
|
|
1314
|
+
const l = f && d ? Dn(f, n) : null;
|
|
1315
|
+
let m = -1, u = null;
|
|
1316
|
+
a && (u = new ResizeObserver((p) => {
|
|
1317
|
+
let [k] = p;
|
|
1318
|
+
k && k.target === f && u && (u.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1319
1319
|
var x;
|
|
1320
|
-
(x =
|
|
1321
|
-
})),
|
|
1322
|
-
}), f && !
|
|
1323
|
-
let h, b =
|
|
1324
|
-
|
|
1320
|
+
(x = u) == null || x.observe(t);
|
|
1321
|
+
})), n();
|
|
1322
|
+
}), f && !i && u.observe(f), u.observe(t));
|
|
1323
|
+
let h, b = i ? ce(e) : null;
|
|
1324
|
+
i && y();
|
|
1325
1325
|
function y() {
|
|
1326
|
-
const
|
|
1327
|
-
b && !gt(b,
|
|
1326
|
+
const p = ce(e);
|
|
1327
|
+
b && !gt(b, p) && n(), b = p, h = requestAnimationFrame(y);
|
|
1328
1328
|
}
|
|
1329
|
-
return
|
|
1330
|
-
var
|
|
1331
|
-
|
|
1332
|
-
s &&
|
|
1333
|
-
}),
|
|
1329
|
+
return n(), () => {
|
|
1330
|
+
var p;
|
|
1331
|
+
c.forEach((k) => {
|
|
1332
|
+
s && k.removeEventListener("scroll", n), r && k.removeEventListener("resize", n);
|
|
1333
|
+
}), l == null || l(), (p = u) == null || p.disconnect(), u = null, i && cancelAnimationFrame(h);
|
|
1334
1334
|
};
|
|
1335
1335
|
}
|
|
1336
|
-
const ht = Zt, vt = _t, pt = Gt, An = en, Bn = Yt, Tn = (e,
|
|
1336
|
+
const ht = Zt, vt = _t, pt = Gt, An = en, Bn = Yt, Tn = (e, t, n) => {
|
|
1337
1337
|
const o = /* @__PURE__ */ new Map(), s = {
|
|
1338
1338
|
platform: $n,
|
|
1339
|
-
...
|
|
1339
|
+
...n
|
|
1340
1340
|
}, r = {
|
|
1341
1341
|
...s.platform,
|
|
1342
1342
|
_c: o
|
|
1343
1343
|
};
|
|
1344
|
-
return Xt(e,
|
|
1344
|
+
return Xt(e, t, {
|
|
1345
1345
|
...s,
|
|
1346
1346
|
platform: r
|
|
1347
1347
|
});
|
|
@@ -1351,8 +1351,8 @@ function Rn(e) {
|
|
|
1351
1351
|
}
|
|
1352
1352
|
function We(e) {
|
|
1353
1353
|
if (Rn(e)) {
|
|
1354
|
-
const
|
|
1355
|
-
return Ke(
|
|
1354
|
+
const t = e.$el;
|
|
1355
|
+
return Ke(t) && ue(t) === "#comment" ? null : t;
|
|
1356
1356
|
}
|
|
1357
1357
|
return e;
|
|
1358
1358
|
}
|
|
@@ -1363,100 +1363,100 @@ function Ln(e) {
|
|
|
1363
1363
|
return {
|
|
1364
1364
|
name: "arrow",
|
|
1365
1365
|
options: e,
|
|
1366
|
-
fn(
|
|
1367
|
-
const
|
|
1368
|
-
return
|
|
1369
|
-
element:
|
|
1366
|
+
fn(t) {
|
|
1367
|
+
const n = We(me(e.element));
|
|
1368
|
+
return n == null ? {} : Bn({
|
|
1369
|
+
element: n,
|
|
1370
1370
|
padding: e.padding
|
|
1371
|
-
}).fn(
|
|
1371
|
+
}).fn(t);
|
|
1372
1372
|
}
|
|
1373
1373
|
};
|
|
1374
1374
|
}
|
|
1375
1375
|
function yt(e) {
|
|
1376
1376
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1377
1377
|
}
|
|
1378
|
-
function ot(e,
|
|
1379
|
-
const
|
|
1380
|
-
return Math.round(
|
|
1378
|
+
function ot(e, t) {
|
|
1379
|
+
const n = yt(e);
|
|
1380
|
+
return Math.round(t * n) / n;
|
|
1381
1381
|
}
|
|
1382
|
-
function xt(e,
|
|
1383
|
-
|
|
1384
|
-
const o =
|
|
1382
|
+
function xt(e, t, n) {
|
|
1383
|
+
n === void 0 && (n = {});
|
|
1384
|
+
const o = n.whileElementsMounted, s = C(() => {
|
|
1385
1385
|
var A;
|
|
1386
|
-
return (A = me(
|
|
1387
|
-
}), r =
|
|
1386
|
+
return (A = me(n.open)) != null ? A : !0;
|
|
1387
|
+
}), r = C(() => me(n.middleware)), a = C(() => {
|
|
1388
1388
|
var A;
|
|
1389
|
-
return (A = me(
|
|
1390
|
-
}),
|
|
1389
|
+
return (A = me(n.placement)) != null ? A : "bottom";
|
|
1390
|
+
}), d = C(() => {
|
|
1391
1391
|
var A;
|
|
1392
|
-
return (A = me(
|
|
1393
|
-
}),
|
|
1392
|
+
return (A = me(n.strategy)) != null ? A : "absolute";
|
|
1393
|
+
}), i = C(() => {
|
|
1394
1394
|
var A;
|
|
1395
|
-
return (A = me(
|
|
1396
|
-
}), f =
|
|
1395
|
+
return (A = me(n.transform)) != null ? A : !0;
|
|
1396
|
+
}), f = C(() => We(e.value)), c = C(() => We(t.value)), l = j(0), m = j(0), u = j(d.value), h = j(a.value), b = Ct({}), y = j(!1), p = C(() => {
|
|
1397
1397
|
const A = {
|
|
1398
|
-
position:
|
|
1398
|
+
position: u.value,
|
|
1399
1399
|
left: "0",
|
|
1400
1400
|
top: "0"
|
|
1401
1401
|
};
|
|
1402
|
-
if (!
|
|
1402
|
+
if (!c.value)
|
|
1403
1403
|
return A;
|
|
1404
|
-
const z = ot(
|
|
1405
|
-
return
|
|
1404
|
+
const z = ot(c.value, l.value), M = ot(c.value, m.value);
|
|
1405
|
+
return i.value ? {
|
|
1406
1406
|
...A,
|
|
1407
1407
|
transform: "translate(" + z + "px, " + M + "px)",
|
|
1408
|
-
...yt(
|
|
1408
|
+
...yt(c.value) >= 1.5 && {
|
|
1409
1409
|
willChange: "transform"
|
|
1410
1410
|
}
|
|
1411
1411
|
} : {
|
|
1412
|
-
position:
|
|
1412
|
+
position: u.value,
|
|
1413
1413
|
left: z + "px",
|
|
1414
1414
|
top: M + "px"
|
|
1415
1415
|
};
|
|
1416
1416
|
});
|
|
1417
|
-
let
|
|
1417
|
+
let k;
|
|
1418
1418
|
function x() {
|
|
1419
|
-
if (f.value == null ||
|
|
1419
|
+
if (f.value == null || c.value == null)
|
|
1420
1420
|
return;
|
|
1421
1421
|
const A = s.value;
|
|
1422
|
-
Tn(f.value,
|
|
1422
|
+
Tn(f.value, c.value, {
|
|
1423
1423
|
middleware: r.value,
|
|
1424
1424
|
placement: a.value,
|
|
1425
|
-
strategy:
|
|
1425
|
+
strategy: d.value
|
|
1426
1426
|
}).then((z) => {
|
|
1427
|
-
|
|
1427
|
+
l.value = z.x, m.value = z.y, u.value = z.strategy, h.value = z.placement, b.value = z.middlewareData, y.value = A !== !1;
|
|
1428
1428
|
});
|
|
1429
1429
|
}
|
|
1430
1430
|
function $() {
|
|
1431
|
-
typeof
|
|
1431
|
+
typeof k == "function" && (k(), k = void 0);
|
|
1432
1432
|
}
|
|
1433
1433
|
function B() {
|
|
1434
1434
|
if ($(), o === void 0) {
|
|
1435
1435
|
x();
|
|
1436
1436
|
return;
|
|
1437
1437
|
}
|
|
1438
|
-
if (f.value != null &&
|
|
1439
|
-
|
|
1438
|
+
if (f.value != null && c.value != null) {
|
|
1439
|
+
k = o(f.value, c.value, x);
|
|
1440
1440
|
return;
|
|
1441
1441
|
}
|
|
1442
1442
|
}
|
|
1443
1443
|
function O() {
|
|
1444
1444
|
s.value || (y.value = !1);
|
|
1445
1445
|
}
|
|
1446
|
-
return we([r, a,
|
|
1446
|
+
return we([r, a, d, s], x, {
|
|
1447
1447
|
flush: "sync"
|
|
1448
|
-
}), we([f,
|
|
1448
|
+
}), we([f, c], B, {
|
|
1449
1449
|
flush: "sync"
|
|
1450
1450
|
}), we(s, O, {
|
|
1451
1451
|
flush: "sync"
|
|
1452
|
-
}),
|
|
1453
|
-
x: be(
|
|
1452
|
+
}), Ft() && $t($), {
|
|
1453
|
+
x: be(l),
|
|
1454
1454
|
y: be(m),
|
|
1455
|
-
strategy: be(
|
|
1455
|
+
strategy: be(u),
|
|
1456
1456
|
placement: be(h),
|
|
1457
1457
|
middlewareData: be(b),
|
|
1458
1458
|
isPositioned: be(y),
|
|
1459
|
-
floatingStyles:
|
|
1459
|
+
floatingStyles: p,
|
|
1460
1460
|
update: x
|
|
1461
1461
|
};
|
|
1462
1462
|
}
|
|
@@ -1464,11 +1464,11 @@ const Be = /* @__PURE__ */ S({
|
|
|
1464
1464
|
inheritAttrs: !1,
|
|
1465
1465
|
__name: "DsIconX",
|
|
1466
1466
|
setup(e) {
|
|
1467
|
-
return (
|
|
1467
|
+
return (t, n) => (g(), v("svg", de({
|
|
1468
1468
|
fill: "none",
|
|
1469
1469
|
stroke: "currentColor",
|
|
1470
1470
|
viewBox: "0 0 24 24"
|
|
1471
|
-
},
|
|
1471
|
+
}, t.$attrs, { "aria-hidden": "true" }), [...n[0] || (n[0] = [
|
|
1472
1472
|
F("path", {
|
|
1473
1473
|
"stroke-linecap": "round",
|
|
1474
1474
|
"stroke-linejoin": "round",
|
|
@@ -1481,11 +1481,11 @@ const Be = /* @__PURE__ */ S({
|
|
|
1481
1481
|
inheritAttrs: !1,
|
|
1482
1482
|
__name: "DsIconCheck",
|
|
1483
1483
|
setup(e) {
|
|
1484
|
-
return (
|
|
1484
|
+
return (t, n) => (g(), v("svg", de({
|
|
1485
1485
|
fill: "none",
|
|
1486
1486
|
stroke: "currentColor",
|
|
1487
1487
|
viewBox: "0 0 24 24"
|
|
1488
|
-
},
|
|
1488
|
+
}, t.$attrs, { "aria-hidden": "true" }), [...n[0] || (n[0] = [
|
|
1489
1489
|
F("path", {
|
|
1490
1490
|
"stroke-linecap": "round",
|
|
1491
1491
|
"stroke-linejoin": "round",
|
|
@@ -1498,11 +1498,11 @@ const Be = /* @__PURE__ */ S({
|
|
|
1498
1498
|
inheritAttrs: !1,
|
|
1499
1499
|
__name: "DsIconWarning",
|
|
1500
1500
|
setup(e) {
|
|
1501
|
-
return (
|
|
1501
|
+
return (t, n) => (g(), v("svg", de({
|
|
1502
1502
|
fill: "none",
|
|
1503
1503
|
stroke: "currentColor",
|
|
1504
1504
|
viewBox: "0 0 24 24"
|
|
1505
|
-
},
|
|
1505
|
+
}, t.$attrs, { "aria-hidden": "true" }), [...n[0] || (n[0] = [
|
|
1506
1506
|
F("path", {
|
|
1507
1507
|
"stroke-linecap": "round",
|
|
1508
1508
|
"stroke-linejoin": "round",
|
|
@@ -1515,11 +1515,11 @@ const Be = /* @__PURE__ */ S({
|
|
|
1515
1515
|
inheritAttrs: !1,
|
|
1516
1516
|
__name: "DsIconInfo",
|
|
1517
1517
|
setup(e) {
|
|
1518
|
-
return (
|
|
1518
|
+
return (t, n) => (g(), v("svg", de({
|
|
1519
1519
|
fill: "none",
|
|
1520
1520
|
stroke: "currentColor",
|
|
1521
1521
|
viewBox: "0 0 24 24"
|
|
1522
|
-
},
|
|
1522
|
+
}, t.$attrs, { "aria-hidden": "true" }), [...n[0] || (n[0] = [
|
|
1523
1523
|
F("path", {
|
|
1524
1524
|
"stroke-linecap": "round",
|
|
1525
1525
|
"stroke-linejoin": "round",
|
|
@@ -1532,11 +1532,11 @@ const Be = /* @__PURE__ */ S({
|
|
|
1532
1532
|
inheritAttrs: !1,
|
|
1533
1533
|
__name: "DsIconChevronDown",
|
|
1534
1534
|
setup(e) {
|
|
1535
|
-
return (
|
|
1535
|
+
return (t, n) => (g(), v("svg", de({
|
|
1536
1536
|
fill: "none",
|
|
1537
1537
|
stroke: "currentColor",
|
|
1538
1538
|
viewBox: "0 0 24 24"
|
|
1539
|
-
},
|
|
1539
|
+
}, t.$attrs, { "aria-hidden": "true" }), [...n[0] || (n[0] = [
|
|
1540
1540
|
F("path", {
|
|
1541
1541
|
"stroke-linecap": "round",
|
|
1542
1542
|
"stroke-linejoin": "round",
|
|
@@ -1549,11 +1549,11 @@ const Be = /* @__PURE__ */ S({
|
|
|
1549
1549
|
inheritAttrs: !1,
|
|
1550
1550
|
__name: "DsIconChevronUp",
|
|
1551
1551
|
setup(e) {
|
|
1552
|
-
return (
|
|
1552
|
+
return (t, n) => (g(), v("svg", de({
|
|
1553
1553
|
fill: "none",
|
|
1554
1554
|
stroke: "currentColor",
|
|
1555
1555
|
viewBox: "0 0 24 24"
|
|
1556
|
-
},
|
|
1556
|
+
}, t.$attrs, { "aria-hidden": "true" }), [...n[0] || (n[0] = [
|
|
1557
1557
|
F("path", {
|
|
1558
1558
|
"stroke-linecap": "round",
|
|
1559
1559
|
"stroke-linejoin": "round",
|
|
@@ -1566,11 +1566,11 @@ const Be = /* @__PURE__ */ S({
|
|
|
1566
1566
|
inheritAttrs: !1,
|
|
1567
1567
|
__name: "DsIconSort",
|
|
1568
1568
|
setup(e) {
|
|
1569
|
-
return (
|
|
1569
|
+
return (t, n) => (g(), v("svg", de({
|
|
1570
1570
|
fill: "none",
|
|
1571
1571
|
stroke: "currentColor",
|
|
1572
1572
|
viewBox: "0 0 24 24"
|
|
1573
|
-
},
|
|
1573
|
+
}, t.$attrs, { "aria-hidden": "true" }), [...n[0] || (n[0] = [
|
|
1574
1574
|
F("path", {
|
|
1575
1575
|
"stroke-linecap": "round",
|
|
1576
1576
|
"stroke-linejoin": "round",
|
|
@@ -1588,7 +1588,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1588
1588
|
key: 0,
|
|
1589
1589
|
class: "px-3 py-2 text-sm text-fg-disabled",
|
|
1590
1590
|
role: "status"
|
|
1591
|
-
},
|
|
1591
|
+
}, ls = /* @__PURE__ */ S({
|
|
1592
1592
|
__name: "DsDropdownSelect",
|
|
1593
1593
|
props: {
|
|
1594
1594
|
modelValue: {},
|
|
@@ -1603,91 +1603,91 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1603
1603
|
emptyText: { default: "No options available" }
|
|
1604
1604
|
},
|
|
1605
1605
|
emits: ["update:modelValue", "change"],
|
|
1606
|
-
setup(e, { emit:
|
|
1607
|
-
const
|
|
1608
|
-
if (!(!a.value ||
|
|
1609
|
-
return
|
|
1610
|
-
}),
|
|
1606
|
+
setup(e, { emit: t }) {
|
|
1607
|
+
const n = e, o = t, s = j(), r = j(), a = j(!1), d = fe("listbox"), i = j(-1), f = C(() => {
|
|
1608
|
+
if (!(!a.value || i.value < 0))
|
|
1609
|
+
return c(i.value);
|
|
1610
|
+
}), c = (w) => `${d}-option-${w}`, { floatingStyles: l } = xt(s, r, {
|
|
1611
1611
|
placement: "bottom-start",
|
|
1612
1612
|
middleware: [
|
|
1613
1613
|
ht(4),
|
|
1614
1614
|
pt(),
|
|
1615
1615
|
vt({ padding: 8 }),
|
|
1616
1616
|
An({
|
|
1617
|
-
apply({ rects:
|
|
1617
|
+
apply({ rects: w }) {
|
|
1618
1618
|
r.value && Object.assign(r.value.style, {
|
|
1619
|
-
minWidth: `${
|
|
1619
|
+
minWidth: `${w.reference.width}px`
|
|
1620
1620
|
});
|
|
1621
1621
|
}
|
|
1622
1622
|
})
|
|
1623
1623
|
],
|
|
1624
1624
|
whileElementsMounted: En
|
|
1625
|
-
}), m =
|
|
1625
|
+
}), m = C(() => n.modelValue), u = C(() => n.options.find((w) => b(w) === m.value)), h = C(() => u.value ? y(u.value) : ""), b = (w) => typeof w == "object" && w !== null ? w.value : w, y = (w) => typeof w == "object" && w !== null ? w.label : String(w), p = (w) => typeof w == "object" && w !== null && w.disabled || !1, k = () => {
|
|
1626
1626
|
je(() => {
|
|
1627
|
-
const
|
|
1628
|
-
if (!
|
|
1629
|
-
const L =
|
|
1627
|
+
const w = r.value;
|
|
1628
|
+
if (!w || i.value < 0) return;
|
|
1629
|
+
const L = w.querySelector(`#${c(i.value)}`);
|
|
1630
1630
|
L == null || L.scrollIntoView({ block: "nearest" });
|
|
1631
1631
|
});
|
|
1632
|
-
}, x = (
|
|
1633
|
-
let V =
|
|
1634
|
-
for (; V >= 0 && V <
|
|
1635
|
-
if (!
|
|
1632
|
+
}, x = (w, L) => {
|
|
1633
|
+
let V = w;
|
|
1634
|
+
for (; V >= 0 && V < n.options.length; ) {
|
|
1635
|
+
if (!p(n.options[V])) return V;
|
|
1636
1636
|
V += L;
|
|
1637
1637
|
}
|
|
1638
1638
|
return -1;
|
|
1639
1639
|
}, $ = () => {
|
|
1640
|
-
const
|
|
1641
|
-
|
|
1640
|
+
const w = x(i.value + 1, 1);
|
|
1641
|
+
w >= 0 && (i.value = w, k());
|
|
1642
1642
|
}, B = () => {
|
|
1643
|
-
const
|
|
1644
|
-
|
|
1643
|
+
const w = x(i.value - 1, -1);
|
|
1644
|
+
w >= 0 && (i.value = w, k());
|
|
1645
1645
|
}, O = () => {
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1646
|
+
const w = x(0, 1);
|
|
1647
|
+
w >= 0 && (i.value = w, k());
|
|
1648
1648
|
}, A = () => {
|
|
1649
|
-
const
|
|
1650
|
-
|
|
1649
|
+
const w = x(n.options.length - 1, -1);
|
|
1650
|
+
w >= 0 && (i.value = w, k());
|
|
1651
1651
|
}, z = () => {
|
|
1652
|
-
|
|
1653
|
-
const
|
|
1652
|
+
n.disabled || n.loading || (a.value = !0, je(() => {
|
|
1653
|
+
const w = n.options.findIndex(
|
|
1654
1654
|
(L) => b(L) === m.value
|
|
1655
1655
|
);
|
|
1656
|
-
|
|
1656
|
+
w >= 0 && !p(n.options[w]) ? i.value = w : O(), k();
|
|
1657
1657
|
}));
|
|
1658
1658
|
}, M = () => {
|
|
1659
|
-
a.value = !1,
|
|
1659
|
+
a.value = !1, i.value = -1;
|
|
1660
1660
|
}, W = () => {
|
|
1661
|
-
|
|
1662
|
-
}, Y = (
|
|
1663
|
-
if (w
|
|
1664
|
-
const L = b(
|
|
1665
|
-
o("update:modelValue", L), o("change", L,
|
|
1666
|
-
}, U = (
|
|
1667
|
-
if (!(
|
|
1661
|
+
n.disabled || n.loading || (a.value ? M() : z());
|
|
1662
|
+
}, Y = (w) => {
|
|
1663
|
+
if (p(w)) return;
|
|
1664
|
+
const L = b(w);
|
|
1665
|
+
o("update:modelValue", L), o("change", L, w), M();
|
|
1666
|
+
}, U = (w) => {
|
|
1667
|
+
if (!(n.disabled || n.loading)) {
|
|
1668
1668
|
if (!a.value) {
|
|
1669
|
-
(
|
|
1669
|
+
(w.key === "ArrowDown" || w.key === "ArrowUp" || w.key === "Enter" || w.key === " ") && (w.preventDefault(), z());
|
|
1670
1670
|
return;
|
|
1671
1671
|
}
|
|
1672
|
-
switch (
|
|
1672
|
+
switch (w.key) {
|
|
1673
1673
|
case "ArrowDown":
|
|
1674
|
-
|
|
1674
|
+
w.preventDefault(), i.value < 0 ? O() : $();
|
|
1675
1675
|
break;
|
|
1676
1676
|
case "ArrowUp":
|
|
1677
|
-
|
|
1677
|
+
w.preventDefault(), i.value < 0 ? A() : B();
|
|
1678
1678
|
break;
|
|
1679
1679
|
case "Home":
|
|
1680
|
-
|
|
1680
|
+
w.preventDefault(), O();
|
|
1681
1681
|
break;
|
|
1682
1682
|
case "End":
|
|
1683
|
-
|
|
1683
|
+
w.preventDefault(), A();
|
|
1684
1684
|
break;
|
|
1685
1685
|
case "Enter":
|
|
1686
1686
|
case " ":
|
|
1687
|
-
|
|
1687
|
+
w.preventDefault(), i.value >= 0 && i.value < n.options.length && Y(n.options[i.value]);
|
|
1688
1688
|
break;
|
|
1689
1689
|
case "Escape":
|
|
1690
|
-
|
|
1690
|
+
w.preventDefault(), M();
|
|
1691
1691
|
break;
|
|
1692
1692
|
case "Tab":
|
|
1693
1693
|
M();
|
|
@@ -1695,7 +1695,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
1697
1697
|
};
|
|
1698
|
-
return (
|
|
1698
|
+
return (w, L) => (g(), v("div", jn, [
|
|
1699
1699
|
_(Ot, {
|
|
1700
1700
|
ref_key: "triggerRef",
|
|
1701
1701
|
ref: s,
|
|
@@ -1708,14 +1708,14 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1708
1708
|
fullWidth: e.fullWidth,
|
|
1709
1709
|
role: "combobox",
|
|
1710
1710
|
"aria-expanded": a.value ? "true" : "false",
|
|
1711
|
-
"aria-controls": R(
|
|
1711
|
+
"aria-controls": R(d),
|
|
1712
1712
|
"aria-haspopup": "listbox",
|
|
1713
1713
|
"aria-activedescendant": f.value,
|
|
1714
1714
|
onClick: W,
|
|
1715
1715
|
onKeydown: U
|
|
1716
1716
|
}, {
|
|
1717
1717
|
default: Re(() => [
|
|
1718
|
-
N(
|
|
1718
|
+
N(w.$slots, "trigger", {}, () => [
|
|
1719
1719
|
X(E(h.value || e.placeholder), 1)
|
|
1720
1720
|
])
|
|
1721
1721
|
]),
|
|
@@ -1726,33 +1726,33 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1726
1726
|
key: 0,
|
|
1727
1727
|
ref_key: "floatingRef",
|
|
1728
1728
|
ref: r,
|
|
1729
|
-
id: R(
|
|
1729
|
+
id: R(d),
|
|
1730
1730
|
role: "listbox",
|
|
1731
1731
|
"aria-label": e.placeholder,
|
|
1732
|
-
style: he(R(
|
|
1732
|
+
style: he(R(l)),
|
|
1733
1733
|
class: "z-50 min-w-32 bg-bg border border-solid border-border rounded-md shadow-default max-h-64 overflow-y-auto",
|
|
1734
1734
|
onClick: L[0] || (L[0] = Dt(() => {
|
|
1735
1735
|
}, ["stop"]))
|
|
1736
1736
|
}, [
|
|
1737
1737
|
(g(!0), v(se, null, re(e.options, (V, P) => (g(), v("div", {
|
|
1738
1738
|
key: b(V),
|
|
1739
|
-
id:
|
|
1739
|
+
id: c(P),
|
|
1740
1740
|
role: "option",
|
|
1741
1741
|
"aria-selected": m.value === b(V) ? "true" : "false",
|
|
1742
|
-
"aria-disabled":
|
|
1742
|
+
"aria-disabled": p(V) ? "true" : void 0,
|
|
1743
1743
|
class: T([
|
|
1744
1744
|
"px-3 py-2 text-sm transition-colors outline-none",
|
|
1745
|
-
|
|
1745
|
+
p(V) ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
1746
1746
|
m.value === b(V) ? "bg-brand text-brand-on-solid" : "",
|
|
1747
|
-
|
|
1748
|
-
(
|
|
1747
|
+
i.value === P && m.value !== b(V) ? "bg-surface-hover" : "",
|
|
1748
|
+
(i.value !== P && m.value !== b(V), ""),
|
|
1749
1749
|
P === 0 ? "rounded-t-md" : "",
|
|
1750
1750
|
P === e.options.length - 1 ? "rounded-b-md" : ""
|
|
1751
1751
|
]),
|
|
1752
1752
|
onClick: (H) => Y(V),
|
|
1753
|
-
onMouseenter: (H) =>
|
|
1753
|
+
onMouseenter: (H) => i.value = P
|
|
1754
1754
|
}, [
|
|
1755
|
-
N(
|
|
1755
|
+
N(w.$slots, "option", {
|
|
1756
1756
|
option: V,
|
|
1757
1757
|
index: P
|
|
1758
1758
|
}, () => [
|
|
@@ -1781,7 +1781,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1781
1781
|
key: 1,
|
|
1782
1782
|
class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",
|
|
1783
1783
|
"aria-hidden": "true"
|
|
1784
|
-
},
|
|
1784
|
+
}, is = /* @__PURE__ */ S({
|
|
1785
1785
|
__name: "DsInput",
|
|
1786
1786
|
props: {
|
|
1787
1787
|
modelValue: {},
|
|
@@ -1804,11 +1804,11 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1804
1804
|
step: {}
|
|
1805
1805
|
},
|
|
1806
1806
|
emits: ["update:modelValue", "blur", "focus", "enter", "clear"],
|
|
1807
|
-
setup(e, { expose:
|
|
1808
|
-
const o = e, s =
|
|
1807
|
+
setup(e, { expose: t, emit: n }) {
|
|
1808
|
+
const o = e, s = n, r = j(null), a = fe("input"), d = `${a}-help`, i = `${a}-error`, f = C(() => {
|
|
1809
1809
|
const x = [];
|
|
1810
|
-
return o.helpText && !o.error && x.push(
|
|
1811
|
-
}),
|
|
1810
|
+
return o.helpText && !o.error && x.push(d), o.error && x.push(i), x.length > 0 ? x.join(" ") : void 0;
|
|
1811
|
+
}), c = C(() => o.clearable && m.value && !o.disabled), l = C(() => o.iconRight || o.clearable), m = C(() => o.modelValue == null ? !1 : typeof o.modelValue == "string" ? o.modelValue.length > 0 : !0), u = C(() => {
|
|
1812
1812
|
const x = [
|
|
1813
1813
|
"block",
|
|
1814
1814
|
"w-full",
|
|
@@ -1837,10 +1837,10 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1837
1837
|
B.text,
|
|
1838
1838
|
B.py,
|
|
1839
1839
|
o.iconLeft ? B.pl : B.px,
|
|
1840
|
-
|
|
1840
|
+
l.value ? B.pr : B.px,
|
|
1841
1841
|
...O
|
|
1842
1842
|
].join(" ");
|
|
1843
|
-
}), h =
|
|
1843
|
+
}), h = C(() => {
|
|
1844
1844
|
const x = { small: "w-4 h-4", medium: "w-5 h-5", large: "w-6 h-6" }, $ = o.error ? "text-error" : "text-fg-tertiary";
|
|
1845
1845
|
return `${x[o.size]} ${$}`;
|
|
1846
1846
|
});
|
|
@@ -1856,15 +1856,15 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1856
1856
|
var x;
|
|
1857
1857
|
s("update:modelValue", ""), s("clear"), (x = r.value) == null || x.focus();
|
|
1858
1858
|
}
|
|
1859
|
-
function
|
|
1859
|
+
function p() {
|
|
1860
1860
|
var x;
|
|
1861
1861
|
(x = r.value) == null || x.focus();
|
|
1862
1862
|
}
|
|
1863
|
-
function
|
|
1863
|
+
function k() {
|
|
1864
1864
|
var x;
|
|
1865
1865
|
(x = r.value) == null || x.blur();
|
|
1866
1866
|
}
|
|
1867
|
-
return
|
|
1867
|
+
return t({ focus: p, blur: k, inputRef: r }), (x, $) => (g(), v("div", Wn, [
|
|
1868
1868
|
e.label ? (g(), v("label", {
|
|
1869
1869
|
key: 0,
|
|
1870
1870
|
for: R(a),
|
|
@@ -1896,18 +1896,18 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1896
1896
|
step: e.step,
|
|
1897
1897
|
"aria-describedby": f.value,
|
|
1898
1898
|
"aria-invalid": e.error ? "true" : void 0,
|
|
1899
|
-
class: T(
|
|
1899
|
+
class: T(u.value),
|
|
1900
1900
|
onInput: b,
|
|
1901
1901
|
onBlur: $[0] || ($[0] = (B) => x.$emit("blur", B)),
|
|
1902
1902
|
onFocus: $[1] || ($[1] = (B) => x.$emit("focus", B)),
|
|
1903
1903
|
onKeydown: $[2] || ($[2] = st((B) => x.$emit("enter"), ["enter"]))
|
|
1904
1904
|
}, null, 42, Xn),
|
|
1905
|
-
e.iconRight && !
|
|
1905
|
+
e.iconRight && !c.value ? (g(), v("div", Yn, [
|
|
1906
1906
|
(g(), I($e(e.iconRight), {
|
|
1907
1907
|
class: T(h.value)
|
|
1908
1908
|
}, null, 8, ["class"]))
|
|
1909
1909
|
])) : D("", !0),
|
|
1910
|
-
|
|
1910
|
+
c.value ? (g(), v("button", {
|
|
1911
1911
|
key: 2,
|
|
1912
1912
|
type: "button",
|
|
1913
1913
|
"aria-label": "Clear input",
|
|
@@ -1919,12 +1919,12 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1919
1919
|
]),
|
|
1920
1920
|
e.helpText && !e.error ? (g(), v("div", {
|
|
1921
1921
|
key: 1,
|
|
1922
|
-
id:
|
|
1922
|
+
id: d,
|
|
1923
1923
|
class: "mt-1 text-caption"
|
|
1924
1924
|
}, E(e.helpText), 1)) : D("", !0),
|
|
1925
1925
|
e.error ? (g(), v("div", {
|
|
1926
1926
|
key: 2,
|
|
1927
|
-
id:
|
|
1927
|
+
id: i,
|
|
1928
1928
|
class: "mt-1 text-sm text-error font-sans",
|
|
1929
1929
|
role: "alert",
|
|
1930
1930
|
"aria-live": "polite"
|
|
@@ -1943,10 +1943,10 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1943
1943
|
centered: { type: Boolean, default: !1 }
|
|
1944
1944
|
},
|
|
1945
1945
|
setup(e) {
|
|
1946
|
-
const
|
|
1946
|
+
const t = e, n = C(() => {
|
|
1947
1947
|
const r = ["inline-flex", "items-center"];
|
|
1948
|
-
return
|
|
1949
|
-
}), o =
|
|
1948
|
+
return t.centered && r.push("justify-center"), t.text && r.push("gap-2"), r.join(" ");
|
|
1949
|
+
}), o = C(() => {
|
|
1950
1950
|
const r = [
|
|
1951
1951
|
"animate-spin",
|
|
1952
1952
|
"rounded-full",
|
|
@@ -1955,7 +1955,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1955
1955
|
small: ["w-4", "h-4", "border-2"],
|
|
1956
1956
|
medium: ["w-6", "h-6", "border-4"],
|
|
1957
1957
|
large: ["w-8", "h-8", "border-6"]
|
|
1958
|
-
},
|
|
1958
|
+
}, d = {
|
|
1959
1959
|
primary: [
|
|
1960
1960
|
"border-brand",
|
|
1961
1961
|
"border-t-transparent"
|
|
@@ -1975,20 +1975,20 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1975
1975
|
};
|
|
1976
1976
|
return [
|
|
1977
1977
|
...r,
|
|
1978
|
-
...a[
|
|
1979
|
-
...
|
|
1978
|
+
...a[t.size],
|
|
1979
|
+
...d[t.variant]
|
|
1980
1980
|
].join(" ");
|
|
1981
|
-
}), s =
|
|
1981
|
+
}), s = C(() => [
|
|
1982
1982
|
{
|
|
1983
1983
|
small: "text-sm",
|
|
1984
1984
|
medium: "text-base",
|
|
1985
1985
|
large: "text-lg"
|
|
1986
|
-
}[
|
|
1986
|
+
}[t.size],
|
|
1987
1987
|
"text-fg-secondary",
|
|
1988
1988
|
"font-medium"
|
|
1989
1989
|
].join(" "));
|
|
1990
1990
|
return (r, a) => (g(), v("div", {
|
|
1991
|
-
class: T(
|
|
1991
|
+
class: T(n.value),
|
|
1992
1992
|
role: "status",
|
|
1993
1993
|
"aria-live": "polite"
|
|
1994
1994
|
}, [
|
|
@@ -2005,7 +2005,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2005
2005
|
}), Qn = ["aria-labelledby"], Zn = { class: "flex items-center justify-between px-6 py-4 border-b border-solid border-border" }, _n = ["id"], eo = { class: "px-6 py-4 overflow-y-auto flex-1" }, to = {
|
|
2006
2006
|
key: 0,
|
|
2007
2007
|
class: "px-6 py-4 border-t border-solid border-border"
|
|
2008
|
-
},
|
|
2008
|
+
}, cs = /* @__PURE__ */ S({
|
|
2009
2009
|
__name: "DsModal",
|
|
2010
2010
|
props: {
|
|
2011
2011
|
modelValue: { type: Boolean },
|
|
@@ -2015,47 +2015,47 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2015
2015
|
persistent: { type: Boolean, default: !1 }
|
|
2016
2016
|
},
|
|
2017
2017
|
emits: ["update:modelValue", "close"],
|
|
2018
|
-
setup(e, { emit:
|
|
2019
|
-
const
|
|
2018
|
+
setup(e, { emit: t }) {
|
|
2019
|
+
const n = e, o = t, s = fe("modal-title"), r = j(null);
|
|
2020
2020
|
let a = null;
|
|
2021
|
-
const
|
|
2021
|
+
const d = C(() => `relative z-10 bg-bg rounded-lg shadow-lg w-full ${{
|
|
2022
2022
|
sm: "max-w-sm",
|
|
2023
2023
|
md: "max-w-lg",
|
|
2024
2024
|
lg: "max-w-2xl",
|
|
2025
2025
|
xl: "max-w-4xl"
|
|
2026
|
-
}[
|
|
2027
|
-
function
|
|
2026
|
+
}[n.size]} max-h-[90vh] flex flex-col`);
|
|
2027
|
+
function i() {
|
|
2028
2028
|
o("update:modelValue", !1), o("close");
|
|
2029
2029
|
}
|
|
2030
2030
|
function f() {
|
|
2031
|
-
|
|
2031
|
+
n.persistent || i();
|
|
2032
2032
|
}
|
|
2033
|
-
function
|
|
2034
|
-
|
|
2033
|
+
function c() {
|
|
2034
|
+
n.persistent || i();
|
|
2035
2035
|
}
|
|
2036
|
-
function
|
|
2036
|
+
function l() {
|
|
2037
2037
|
return r.value ? Array.from(
|
|
2038
2038
|
r.value.querySelectorAll(
|
|
2039
2039
|
'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
2040
2040
|
)
|
|
2041
2041
|
) : [];
|
|
2042
2042
|
}
|
|
2043
|
-
function m(
|
|
2044
|
-
if (
|
|
2045
|
-
const h =
|
|
2043
|
+
function m(u) {
|
|
2044
|
+
if (u.key !== "Tab") return;
|
|
2045
|
+
const h = l();
|
|
2046
2046
|
if (h.length === 0) return;
|
|
2047
2047
|
const b = h[0], y = h[h.length - 1];
|
|
2048
|
-
|
|
2048
|
+
u.shiftKey && document.activeElement === b ? (u.preventDefault(), y.focus()) : !u.shiftKey && document.activeElement === y && (u.preventDefault(), b.focus());
|
|
2049
2049
|
}
|
|
2050
2050
|
return we(
|
|
2051
|
-
() =>
|
|
2052
|
-
async (
|
|
2051
|
+
() => n.modelValue,
|
|
2052
|
+
async (u) => {
|
|
2053
2053
|
var h;
|
|
2054
|
-
|
|
2054
|
+
u ? (a = document.activeElement, document.body.style.overflow = "hidden", document.addEventListener("keydown", m), await je(), (h = r.value) == null || h.focus()) : (document.body.style.overflow = "", document.removeEventListener("keydown", m), a == null || a.focus(), a = null);
|
|
2055
2055
|
}
|
|
2056
2056
|
), rt(() => {
|
|
2057
2057
|
document.body.style.overflow = "", document.removeEventListener("keydown", m);
|
|
2058
|
-
}), (
|
|
2058
|
+
}), (u, h) => (g(), I(Le, { to: "body" }, [
|
|
2059
2059
|
_(at, {
|
|
2060
2060
|
"enter-active-class": "transition-opacity duration-200",
|
|
2061
2061
|
"enter-from-class": "opacity-0",
|
|
@@ -2068,7 +2068,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2068
2068
|
e.modelValue ? (g(), v("div", {
|
|
2069
2069
|
key: 0,
|
|
2070
2070
|
class: "fixed inset-0 z-50 flex items-center justify-center p-4",
|
|
2071
|
-
onKeydown: st(
|
|
2071
|
+
onKeydown: st(c, ["escape"])
|
|
2072
2072
|
}, [
|
|
2073
2073
|
F("div", {
|
|
2074
2074
|
class: "absolute inset-0 bg-bg-inverse/50",
|
|
@@ -2081,11 +2081,11 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2081
2081
|
role: "dialog",
|
|
2082
2082
|
"aria-modal": "true",
|
|
2083
2083
|
"aria-labelledby": R(s),
|
|
2084
|
-
class: T(
|
|
2084
|
+
class: T(d.value),
|
|
2085
2085
|
tabindex: "-1"
|
|
2086
2086
|
}, [
|
|
2087
2087
|
F("div", Zn, [
|
|
2088
|
-
N(
|
|
2088
|
+
N(u.$slots, "header", {}, () => [
|
|
2089
2089
|
F("h2", {
|
|
2090
2090
|
id: R(s),
|
|
2091
2091
|
class: "text-heading-lg m-0"
|
|
@@ -2096,16 +2096,16 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2096
2096
|
type: "button",
|
|
2097
2097
|
class: "p-1 rounded-md text-fg-tertiary hover:text-fg hover:bg-surface-hover-light transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand",
|
|
2098
2098
|
"aria-label": "Close dialog",
|
|
2099
|
-
onClick:
|
|
2099
|
+
onClick: i
|
|
2100
2100
|
}, [
|
|
2101
2101
|
_(R(Be), { class: "w-5 h-5" })
|
|
2102
2102
|
])) : D("", !0)
|
|
2103
2103
|
]),
|
|
2104
2104
|
F("div", eo, [
|
|
2105
|
-
N(
|
|
2105
|
+
N(u.$slots, "default")
|
|
2106
2106
|
]),
|
|
2107
|
-
|
|
2108
|
-
N(
|
|
2107
|
+
u.$slots.footer ? (g(), v("div", to, [
|
|
2108
|
+
N(u.$slots, "footer")
|
|
2109
2109
|
])) : D("", !0)
|
|
2110
2110
|
], 10, Qn)
|
|
2111
2111
|
], 32)) : D("", !0)
|
|
@@ -2114,7 +2114,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2114
2114
|
})
|
|
2115
2115
|
]));
|
|
2116
2116
|
}
|
|
2117
|
-
}), no = ["id", "name", "checked", "disabled", "value"],
|
|
2117
|
+
}), no = ["id", "name", "checked", "disabled", "value"], ds = /* @__PURE__ */ S({
|
|
2118
2118
|
__name: "DsRadio",
|
|
2119
2119
|
props: {
|
|
2120
2120
|
modelValue: { type: [String, Number, Boolean] },
|
|
@@ -2126,41 +2126,41 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2126
2126
|
size: { default: "medium" }
|
|
2127
2127
|
},
|
|
2128
2128
|
emits: ["update:modelValue", "change"],
|
|
2129
|
-
setup(e, { emit:
|
|
2130
|
-
const
|
|
2129
|
+
setup(e, { emit: t }) {
|
|
2130
|
+
const n = e, o = t, s = C(() => n.modelValue === n.value), r = {
|
|
2131
2131
|
small: { circle: "w-3.5 h-3.5", dot: "w-1.5 h-1.5", label: "text-xs" },
|
|
2132
2132
|
medium: { circle: "w-4 h-4", dot: "w-2 h-2", label: "text-sm" },
|
|
2133
2133
|
large: { circle: "w-5 h-5", dot: "w-2.5 h-2.5", label: "text-base" }
|
|
2134
|
-
}, a =
|
|
2135
|
-
const
|
|
2136
|
-
r[
|
|
2134
|
+
}, a = C(() => {
|
|
2135
|
+
const l = [
|
|
2136
|
+
r[n.size].circle,
|
|
2137
2137
|
"rounded-full",
|
|
2138
2138
|
"inline-flex items-center justify-center",
|
|
2139
2139
|
"border border-solid",
|
|
2140
2140
|
"transition-all duration-150",
|
|
2141
2141
|
"shrink-0"
|
|
2142
2142
|
];
|
|
2143
|
-
return
|
|
2143
|
+
return n.disabled ? l.push(
|
|
2144
2144
|
s.value ? "bg-bg border-brand-disabled" : "bg-bg-tertiary border-border",
|
|
2145
2145
|
"opacity-60"
|
|
2146
|
-
) : s.value ?
|
|
2146
|
+
) : s.value ? l.push("bg-bg border-brand") : l.push(
|
|
2147
2147
|
"bg-bg border-border-strong",
|
|
2148
2148
|
"group-hover:border-brand",
|
|
2149
2149
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-brand peer-focus-visible:ring-offset-2"
|
|
2150
|
-
),
|
|
2151
|
-
}),
|
|
2152
|
-
const
|
|
2153
|
-
return
|
|
2154
|
-
}),
|
|
2150
|
+
), l.join(" ");
|
|
2151
|
+
}), d = C(() => {
|
|
2152
|
+
const l = [r[n.size].dot, "rounded-full"];
|
|
2153
|
+
return n.disabled ? l.push("bg-brand-disabled") : l.push("bg-brand"), l.join(" ");
|
|
2154
|
+
}), i = C(() => [
|
|
2155
2155
|
"font-sans select-none",
|
|
2156
|
-
r[
|
|
2157
|
-
|
|
2158
|
-
].join(" ")), f = (
|
|
2159
|
-
if (
|
|
2160
|
-
const
|
|
2161
|
-
o("update:modelValue", m), o("change", m,
|
|
2156
|
+
r[n.size].label,
|
|
2157
|
+
n.disabled ? "text-fg-disabled" : "text-fg"
|
|
2158
|
+
].join(" ")), f = (c) => {
|
|
2159
|
+
if (n.disabled) return;
|
|
2160
|
+
const l = c.target, m = n.value ?? l.value;
|
|
2161
|
+
o("update:modelValue", m), o("change", m, c);
|
|
2162
2162
|
};
|
|
2163
|
-
return (
|
|
2163
|
+
return (c, l) => (g(), v("label", {
|
|
2164
2164
|
class: T([
|
|
2165
2165
|
"inline-flex items-center gap-2",
|
|
2166
2166
|
e.disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
@@ -2183,14 +2183,14 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2183
2183
|
}, [
|
|
2184
2184
|
s.value ? (g(), v("span", {
|
|
2185
2185
|
key: 0,
|
|
2186
|
-
class: T(
|
|
2186
|
+
class: T(d.value)
|
|
2187
2187
|
}, null, 2)) : D("", !0)
|
|
2188
2188
|
], 2),
|
|
2189
|
-
e.label ||
|
|
2189
|
+
e.label || c.$slots.default ? (g(), v("span", {
|
|
2190
2190
|
key: 0,
|
|
2191
|
-
class: T(
|
|
2191
|
+
class: T(i.value)
|
|
2192
2192
|
}, [
|
|
2193
|
-
N(
|
|
2193
|
+
N(c.$slots, "default", {}, () => [
|
|
2194
2194
|
X(E(e.label), 1)
|
|
2195
2195
|
])
|
|
2196
2196
|
], 2)) : D("", !0)
|
|
@@ -2203,7 +2203,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2203
2203
|
}, ao = { class: "relative" }, lo = ["id", "value", "disabled", "required", "aria-describedby", "aria-invalid"], io = ["selected"], co = ["value", "disabled"], uo = {
|
|
2204
2204
|
class: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",
|
|
2205
2205
|
"aria-hidden": "true"
|
|
2206
|
-
},
|
|
2206
|
+
}, us = /* @__PURE__ */ S({
|
|
2207
2207
|
__name: "DsSelect",
|
|
2208
2208
|
props: {
|
|
2209
2209
|
modelValue: {},
|
|
@@ -2217,12 +2217,12 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2217
2217
|
options: {}
|
|
2218
2218
|
},
|
|
2219
2219
|
emits: ["update:modelValue", "blur", "focus"],
|
|
2220
|
-
setup(e, { emit:
|
|
2221
|
-
const
|
|
2222
|
-
const
|
|
2223
|
-
return
|
|
2224
|
-
}),
|
|
2225
|
-
const
|
|
2220
|
+
setup(e, { emit: t }) {
|
|
2221
|
+
const n = e, o = t, s = fe("select"), r = `${s}-help`, a = `${s}-error`, d = C(() => {
|
|
2222
|
+
const c = [];
|
|
2223
|
+
return n.helpText && !n.error && c.push(r), n.error && c.push(a), c.length > 0 ? c.join(" ") : void 0;
|
|
2224
|
+
}), i = C(() => {
|
|
2225
|
+
const c = [
|
|
2226
2226
|
"block",
|
|
2227
2227
|
"w-full",
|
|
2228
2228
|
"rounded-md",
|
|
@@ -2241,17 +2241,17 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2241
2241
|
"font-sans",
|
|
2242
2242
|
"box-border",
|
|
2243
2243
|
"pr-10"
|
|
2244
|
-
],
|
|
2244
|
+
], l = {
|
|
2245
2245
|
small: "px-2 py-1 text-sm",
|
|
2246
2246
|
medium: "px-3 py-2 text-base",
|
|
2247
2247
|
large: "px-4 py-3 text-lg"
|
|
2248
|
-
}, m =
|
|
2249
|
-
return [...
|
|
2250
|
-
}), f = (
|
|
2251
|
-
const m =
|
|
2252
|
-
o("update:modelValue",
|
|
2248
|
+
}, m = n.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-brand"];
|
|
2249
|
+
return [...c, l[n.size], ...m].join(" ");
|
|
2250
|
+
}), f = (c) => {
|
|
2251
|
+
const m = c.target.value, u = n.options.find((h) => String(h.value) === m);
|
|
2252
|
+
o("update:modelValue", u && typeof u.value == "number" ? u.value : m);
|
|
2253
2253
|
};
|
|
2254
|
-
return (
|
|
2254
|
+
return (c, l) => (g(), v("div", oo, [
|
|
2255
2255
|
e.label ? (g(), v("label", {
|
|
2256
2256
|
key: 0,
|
|
2257
2257
|
for: R(s),
|
|
@@ -2266,12 +2266,12 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2266
2266
|
value: e.modelValue,
|
|
2267
2267
|
disabled: e.disabled,
|
|
2268
2268
|
required: e.required,
|
|
2269
|
-
"aria-describedby":
|
|
2269
|
+
"aria-describedby": d.value,
|
|
2270
2270
|
"aria-invalid": e.error ? "true" : void 0,
|
|
2271
|
-
class: T(
|
|
2271
|
+
class: T(i.value),
|
|
2272
2272
|
onChange: f,
|
|
2273
|
-
onBlur:
|
|
2274
|
-
onFocus:
|
|
2273
|
+
onBlur: l[0] || (l[0] = (m) => c.$emit("blur", m)),
|
|
2274
|
+
onFocus: l[1] || (l[1] = (m) => c.$emit("focus", m))
|
|
2275
2275
|
}, [
|
|
2276
2276
|
e.placeholder ? (g(), v("option", {
|
|
2277
2277
|
key: 0,
|
|
@@ -2310,10 +2310,10 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2310
2310
|
key: 0,
|
|
2311
2311
|
class: "inline-flex",
|
|
2312
2312
|
"aria-hidden": "true"
|
|
2313
|
-
}, vo = { class: "border-solid border-border" }, po = { key: 0 }, yo = ["colspan"], xo = { key: 1 }, wo = ["colspan"], ko = {
|
|
2313
|
+
}, vo = { class: "border-solid border-border" }, po = { key: 0 }, yo = ["colspan"], xo = { key: 1 }, wo = ["colspan"], ko = ["onClick"], Co = ["onClick"], Fo = {
|
|
2314
2314
|
key: 0,
|
|
2315
2315
|
class: "flex items-center justify-between px-4 py-3 border-t border-solid border-border bg-bg-secondary text-sm"
|
|
2316
|
-
},
|
|
2316
|
+
}, $o = { class: "text-fg-secondary" }, Do = { class: "flex gap-2" }, Eo = ["disabled"], Ao = ["disabled"], fs = /* @__PURE__ */ S({
|
|
2317
2317
|
__name: "DsTable",
|
|
2318
2318
|
props: {
|
|
2319
2319
|
columns: {},
|
|
@@ -2329,58 +2329,64 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2329
2329
|
ofLabel: { default: "of" },
|
|
2330
2330
|
pagination: {}
|
|
2331
2331
|
},
|
|
2332
|
-
emits: ["update:sortBy", "update:sortOrder", "update:page", "row:click"],
|
|
2333
|
-
setup(e, { emit: n }) {
|
|
2334
|
-
const
|
|
2335
|
-
|
|
2336
|
-
|
|
2332
|
+
emits: ["update:sortBy", "update:sortOrder", "update:page", "row:click", "cell:click"],
|
|
2333
|
+
setup(e, { expose: t, emit: n }) {
|
|
2334
|
+
const o = e, s = n, r = C(() => o.pagination ? Math.ceil(o.pagination.total / o.pagination.perPage) : 0), a = C(() => o.pagination ? (o.pagination.page - 1) * o.pagination.perPage + 1 : 0), d = C(() => o.pagination ? Math.min(
|
|
2335
|
+
o.pagination.page * o.pagination.perPage,
|
|
2336
|
+
o.pagination.total
|
|
2337
2337
|
) : 0);
|
|
2338
|
-
function
|
|
2339
|
-
|
|
2338
|
+
function i(b) {
|
|
2339
|
+
o.sortBy === b ? o.sortOrder === "asc" ? s("update:sortOrder", "desc") : (s("update:sortBy", ""), s("update:sortOrder", "asc")) : (s("update:sortBy", b), s("update:sortOrder", "asc"));
|
|
2340
2340
|
}
|
|
2341
|
-
function
|
|
2342
|
-
if (
|
|
2343
|
-
return
|
|
2341
|
+
function f(b) {
|
|
2342
|
+
if (b.sortable)
|
|
2343
|
+
return o.sortBy !== b.key ? "none" : o.sortOrder === "asc" ? "ascending" : "descending";
|
|
2344
2344
|
}
|
|
2345
|
-
function
|
|
2346
|
-
return
|
|
2345
|
+
function c(b) {
|
|
2346
|
+
return b === "center" ? "justify-center" : b === "right" ? "justify-end" : "";
|
|
2347
2347
|
}
|
|
2348
|
-
function
|
|
2348
|
+
function l(b) {
|
|
2349
2349
|
return [
|
|
2350
2350
|
"px-4 py-3 text-left font-sans text-sm font-500 text-fg-secondary",
|
|
2351
|
-
|
|
2351
|
+
b.sortable ? "cursor-pointer select-none hover:text-fg" : ""
|
|
2352
2352
|
].join(" ");
|
|
2353
2353
|
}
|
|
2354
|
-
function
|
|
2355
|
-
return `px-4 py-3 ${
|
|
2354
|
+
function m(b) {
|
|
2355
|
+
return `px-4 py-3 ${b.align === "center" ? "text-center" : b.align === "right" ? "text-right" : "text-left"}`;
|
|
2356
|
+
}
|
|
2357
|
+
function u(b, y) {
|
|
2358
|
+
s("row:click", b, y);
|
|
2356
2359
|
}
|
|
2357
|
-
function
|
|
2358
|
-
|
|
2360
|
+
function h(b, y) {
|
|
2361
|
+
s("cell:click", b, y);
|
|
2359
2362
|
}
|
|
2360
|
-
return (
|
|
2363
|
+
return t({
|
|
2364
|
+
handleRowClick: u,
|
|
2365
|
+
handleCellClick: h
|
|
2366
|
+
}), (b, y) => (g(), v("div", fo, [
|
|
2361
2367
|
F("table", bo, [
|
|
2362
2368
|
F("thead", {
|
|
2363
2369
|
class: T(e.stickyHeader ? "sticky top-0 z-10" : "")
|
|
2364
2370
|
}, [
|
|
2365
2371
|
F("tr", mo, [
|
|
2366
|
-
(g(!0), v(se, null, re(e.columns, (
|
|
2367
|
-
key:
|
|
2368
|
-
style: he(
|
|
2369
|
-
class: T(
|
|
2370
|
-
"aria-sort":
|
|
2371
|
-
onClick: (
|
|
2372
|
+
(g(!0), v(se, null, re(e.columns, (p) => (g(), v("th", {
|
|
2373
|
+
key: p.key,
|
|
2374
|
+
style: he(p.width ? { width: p.width } : void 0),
|
|
2375
|
+
class: T(l(p)),
|
|
2376
|
+
"aria-sort": f(p),
|
|
2377
|
+
onClick: (k) => p.sortable ? i(p.key) : void 0
|
|
2372
2378
|
}, [
|
|
2373
2379
|
F("div", {
|
|
2374
|
-
class: T(["flex items-center gap-1",
|
|
2380
|
+
class: T(["flex items-center gap-1", c(p.align)])
|
|
2375
2381
|
}, [
|
|
2376
|
-
N(
|
|
2377
|
-
X(E(
|
|
2382
|
+
N(b.$slots, `header-${p.key}`, { column: p }, () => [
|
|
2383
|
+
X(E(p.label), 1)
|
|
2378
2384
|
]),
|
|
2379
|
-
|
|
2380
|
-
e.sortBy ===
|
|
2385
|
+
p.sortable ? (g(), v("span", ho, [
|
|
2386
|
+
e.sortBy === p.key && e.sortOrder === "asc" ? (g(), I(R(Sn), {
|
|
2381
2387
|
key: 0,
|
|
2382
2388
|
class: "w-4 h-4"
|
|
2383
|
-
})) : e.sortBy ===
|
|
2389
|
+
})) : e.sortBy === p.key && e.sortOrder === "desc" ? (g(), I(R(Ge), {
|
|
2384
2390
|
key: 1,
|
|
2385
2391
|
class: "w-4 h-4"
|
|
2386
2392
|
})) : (g(), I(R(zn), {
|
|
@@ -2398,7 +2404,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2398
2404
|
colspan: e.columns.length,
|
|
2399
2405
|
class: "text-center py-12"
|
|
2400
2406
|
}, [
|
|
2401
|
-
N(
|
|
2407
|
+
N(b.$slots, "loading", {}, () => [
|
|
2402
2408
|
_(Jn, { centered: "" })
|
|
2403
2409
|
])
|
|
2404
2410
|
], 8, yo)
|
|
@@ -2407,54 +2413,55 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2407
2413
|
colspan: e.columns.length,
|
|
2408
2414
|
class: "text-center py-12 text-fg-secondary"
|
|
2409
2415
|
}, [
|
|
2410
|
-
N(
|
|
2416
|
+
N(b.$slots, "empty", {}, () => [
|
|
2411
2417
|
X(E(e.emptyText), 1)
|
|
2412
2418
|
])
|
|
2413
2419
|
], 8, wo)
|
|
2414
2420
|
])) : D("", !0),
|
|
2415
|
-
(g(!0), v(se, null, re(e.rows, (
|
|
2416
|
-
key:
|
|
2421
|
+
(g(!0), v(se, null, re(e.rows, (p, k) => (g(), v("tr", {
|
|
2422
|
+
key: k,
|
|
2417
2423
|
class: T([
|
|
2418
2424
|
"border-b border-solid border-y-border-light transition-colors hover:bg-surface-hover-light border-x-border",
|
|
2419
|
-
e.striped &&
|
|
2420
|
-
])
|
|
2425
|
+
e.striped && k % 2 === 1 ? "bg-bg-secondary" : ""
|
|
2426
|
+
]),
|
|
2427
|
+
onClick: (x) => u(p, k)
|
|
2421
2428
|
}, [
|
|
2422
|
-
(g(!0), v(se, null, re(e.columns, (
|
|
2423
|
-
key:
|
|
2424
|
-
class: T(
|
|
2429
|
+
(g(!0), v(se, null, re(e.columns, (x) => (g(), v("td", {
|
|
2430
|
+
key: x.key,
|
|
2431
|
+
class: T(m(x)),
|
|
2432
|
+
onClick: ($) => h(p, x.key)
|
|
2425
2433
|
}, [
|
|
2426
|
-
N(
|
|
2427
|
-
row:
|
|
2428
|
-
value:
|
|
2429
|
-
index:
|
|
2430
|
-
onClick: (C) => m(b)
|
|
2434
|
+
N(b.$slots, `cell-${x.key}`, {
|
|
2435
|
+
row: p,
|
|
2436
|
+
value: p[x.key],
|
|
2437
|
+
index: k
|
|
2431
2438
|
}, () => [
|
|
2432
|
-
X(E(
|
|
2439
|
+
X(E(p[x.key]), 1)
|
|
2433
2440
|
])
|
|
2434
|
-
],
|
|
2435
|
-
],
|
|
2441
|
+
], 10, Co))), 128))
|
|
2442
|
+
], 10, ko))), 128))
|
|
2436
2443
|
])
|
|
2437
2444
|
]),
|
|
2438
|
-
e.pagination ? (g(), v("div",
|
|
2439
|
-
F("span",
|
|
2440
|
-
F("div",
|
|
2445
|
+
e.pagination ? (g(), v("div", Fo, [
|
|
2446
|
+
F("span", $o, E(a.value) + "–" + E(d.value) + " " + E(e.ofLabel) + " " + E(e.pagination.total), 1),
|
|
2447
|
+
F("div", Do, [
|
|
2441
2448
|
F("button", {
|
|
2442
2449
|
type: "button",
|
|
2443
2450
|
disabled: e.pagination.page <= 1,
|
|
2444
2451
|
class: "px-3 py-1 rounded-md border border-solid border-border bg-bg text-fg disabled:opacity-50 disabled:cursor-not-allowed hover:bg-surface-hover-light transition-colors",
|
|
2445
|
-
onClick:
|
|
2446
|
-
}, E(e.previousPageLabel), 9,
|
|
2452
|
+
onClick: y[0] || (y[0] = (p) => b.$emit("update:page", e.pagination.page - 1))
|
|
2453
|
+
}, E(e.previousPageLabel), 9, Eo),
|
|
2447
2454
|
F("button", {
|
|
2448
2455
|
type: "button",
|
|
2449
|
-
disabled: e.pagination.page >=
|
|
2456
|
+
disabled: e.pagination.page >= r.value,
|
|
2450
2457
|
class: "px-3 py-1 rounded-md border border-solid border-border bg-bg text-fg disabled:opacity-50 disabled:cursor-not-allowed hover:bg-surface-hover-light transition-colors",
|
|
2451
|
-
onClick:
|
|
2452
|
-
}, E(e.nextPageLabel), 9,
|
|
2458
|
+
onClick: y[1] || (y[1] = (p) => b.$emit("update:page", e.pagination.page + 1))
|
|
2459
|
+
}, E(e.nextPageLabel), 9, Ao)
|
|
2453
2460
|
])
|
|
2454
2461
|
])) : D("", !0)
|
|
2455
2462
|
]));
|
|
2456
2463
|
}
|
|
2457
|
-
}),
|
|
2464
|
+
}), Bo = ["aria-label"], To = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick", "onKeydown"], Ro = ["id", "aria-labelledby", "hidden"], bs = /* @__PURE__ */ S({
|
|
2458
2465
|
__name: "DsTabs",
|
|
2459
2466
|
props: {
|
|
2460
2467
|
modelValue: {},
|
|
@@ -2463,96 +2470,96 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2463
2470
|
ariaLabel: { default: "Tabs" }
|
|
2464
2471
|
},
|
|
2465
2472
|
emits: ["update:modelValue"],
|
|
2466
|
-
setup(e, { emit:
|
|
2467
|
-
const
|
|
2468
|
-
() =>
|
|
2473
|
+
setup(e, { emit: t }) {
|
|
2474
|
+
const n = e, o = t, s = fe("tabs"), r = C(
|
|
2475
|
+
() => n.variant === "line" ? "flex border-b border-solid border-border gap-0" : "flex gap-1 bg-neutral-soft p-1 rounded-lg"
|
|
2469
2476
|
);
|
|
2470
2477
|
function a(f) {
|
|
2471
2478
|
f.disabled || o("update:modelValue", f.key);
|
|
2472
2479
|
}
|
|
2473
|
-
function
|
|
2474
|
-
const
|
|
2475
|
-
return
|
|
2476
|
-
|
|
2480
|
+
function d(f) {
|
|
2481
|
+
const c = n.modelValue === f.key, l = "font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed";
|
|
2482
|
+
return n.variant === "line" ? [
|
|
2483
|
+
l,
|
|
2477
2484
|
"px-4 py-2 text-sm border-b-2 border-solid border-t-0 border-l-0 border-r-0 bg-transparent -mb-px",
|
|
2478
|
-
|
|
2485
|
+
c ? "border-b-brand text-brand" : "border-b-transparent text-fg-secondary hover:text-fg hover:border-b-border-strong"
|
|
2479
2486
|
].join(" ") : [
|
|
2480
|
-
|
|
2487
|
+
l,
|
|
2481
2488
|
"px-3 py-1.5 text-sm rounded-md border-0",
|
|
2482
|
-
|
|
2489
|
+
c ? "bg-bg text-fg shadow-default" : "bg-transparent text-fg-secondary hover:text-fg"
|
|
2483
2490
|
].join(" ");
|
|
2484
2491
|
}
|
|
2485
|
-
function
|
|
2486
|
-
const
|
|
2487
|
-
(y) => y.key ===
|
|
2492
|
+
function i(f, c) {
|
|
2493
|
+
const l = n.tabs.filter((y) => !y.disabled), m = l.findIndex(
|
|
2494
|
+
(y) => y.key === n.tabs[c].key
|
|
2488
2495
|
);
|
|
2489
|
-
let
|
|
2496
|
+
let u = -1;
|
|
2490
2497
|
switch (f.key) {
|
|
2491
2498
|
case "ArrowRight":
|
|
2492
2499
|
case "ArrowDown":
|
|
2493
|
-
f.preventDefault(),
|
|
2500
|
+
f.preventDefault(), u = (m + 1) % l.length;
|
|
2494
2501
|
break;
|
|
2495
2502
|
case "ArrowLeft":
|
|
2496
2503
|
case "ArrowUp":
|
|
2497
|
-
f.preventDefault(),
|
|
2504
|
+
f.preventDefault(), u = (m - 1 + l.length) % l.length;
|
|
2498
2505
|
break;
|
|
2499
2506
|
case "Home":
|
|
2500
|
-
f.preventDefault(),
|
|
2507
|
+
f.preventDefault(), u = 0;
|
|
2501
2508
|
break;
|
|
2502
2509
|
case "End":
|
|
2503
|
-
f.preventDefault(),
|
|
2510
|
+
f.preventDefault(), u = l.length - 1;
|
|
2504
2511
|
break;
|
|
2505
2512
|
default:
|
|
2506
2513
|
return;
|
|
2507
2514
|
}
|
|
2508
|
-
const h =
|
|
2515
|
+
const h = l[u];
|
|
2509
2516
|
o("update:modelValue", h.key);
|
|
2510
2517
|
const b = document.getElementById(`${s}-tab-${h.key}`);
|
|
2511
2518
|
b == null || b.focus();
|
|
2512
2519
|
}
|
|
2513
|
-
return (f,
|
|
2520
|
+
return (f, c) => (g(), v("div", null, [
|
|
2514
2521
|
F("div", {
|
|
2515
2522
|
class: T(r.value),
|
|
2516
2523
|
role: "tablist",
|
|
2517
2524
|
"aria-label": e.ariaLabel
|
|
2518
2525
|
}, [
|
|
2519
|
-
(g(!0), v(se, null, re(e.tabs, (
|
|
2520
|
-
key:
|
|
2521
|
-
id: `${R(s)}-tab-${
|
|
2526
|
+
(g(!0), v(se, null, re(e.tabs, (l, m) => (g(), v("button", {
|
|
2527
|
+
key: l.key,
|
|
2528
|
+
id: `${R(s)}-tab-${l.key}`,
|
|
2522
2529
|
role: "tab",
|
|
2523
2530
|
type: "button",
|
|
2524
|
-
"aria-selected": e.modelValue ===
|
|
2525
|
-
"aria-controls": `${R(s)}-panel-${
|
|
2526
|
-
tabindex: e.modelValue ===
|
|
2527
|
-
disabled:
|
|
2528
|
-
class: T(
|
|
2529
|
-
onClick: (
|
|
2530
|
-
onKeydown: (
|
|
2531
|
-
}, E(
|
|
2532
|
-
], 10,
|
|
2533
|
-
(g(!0), v(se, null, re(e.tabs, (
|
|
2534
|
-
key:
|
|
2535
|
-
id: `${R(s)}-panel-${
|
|
2531
|
+
"aria-selected": e.modelValue === l.key,
|
|
2532
|
+
"aria-controls": `${R(s)}-panel-${l.key}`,
|
|
2533
|
+
tabindex: e.modelValue === l.key ? 0 : -1,
|
|
2534
|
+
disabled: l.disabled,
|
|
2535
|
+
class: T(d(l)),
|
|
2536
|
+
onClick: (u) => a(l),
|
|
2537
|
+
onKeydown: (u) => i(u, m)
|
|
2538
|
+
}, E(l.label), 43, To))), 128))
|
|
2539
|
+
], 10, Bo),
|
|
2540
|
+
(g(!0), v(se, null, re(e.tabs, (l) => (g(), v("div", {
|
|
2541
|
+
key: l.key,
|
|
2542
|
+
id: `${R(s)}-panel-${l.key}`,
|
|
2536
2543
|
role: "tabpanel",
|
|
2537
|
-
"aria-labelledby": `${R(s)}-tab-${
|
|
2538
|
-
hidden: e.modelValue !==
|
|
2544
|
+
"aria-labelledby": `${R(s)}-tab-${l.key}`,
|
|
2545
|
+
hidden: e.modelValue !== l.key,
|
|
2539
2546
|
tabindex: 0
|
|
2540
2547
|
}, [
|
|
2541
|
-
e.modelValue ===
|
|
2542
|
-
], 8,
|
|
2548
|
+
e.modelValue === l.key ? N(f.$slots, l.key, { key: 0 }) : D("", !0)
|
|
2549
|
+
], 8, Ro))), 128))
|
|
2543
2550
|
]));
|
|
2544
2551
|
}
|
|
2545
|
-
}),
|
|
2552
|
+
}), Lo = { class: "w-full" }, Oo = ["for"], Vo = {
|
|
2546
2553
|
key: 0,
|
|
2547
2554
|
class: "text-error ml-1",
|
|
2548
2555
|
"aria-hidden": "true"
|
|
2549
|
-
},
|
|
2556
|
+
}, So = { class: "relative" }, zo = ["id", "value", "placeholder", "disabled", "readonly", "required", "rows", "maxlength", "aria-describedby", "aria-invalid"], Mo = {
|
|
2550
2557
|
key: 1,
|
|
2551
2558
|
class: "flex justify-between mt-1"
|
|
2552
|
-
},
|
|
2559
|
+
}, jo = {
|
|
2553
2560
|
key: 2,
|
|
2554
2561
|
class: "text-caption ml-auto"
|
|
2555
|
-
},
|
|
2562
|
+
}, ms = /* @__PURE__ */ S({
|
|
2556
2563
|
__name: "DsTextarea",
|
|
2557
2564
|
props: {
|
|
2558
2565
|
modelValue: {},
|
|
@@ -2568,11 +2575,11 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2568
2575
|
maxLength: {}
|
|
2569
2576
|
},
|
|
2570
2577
|
emits: ["update:modelValue", "blur", "focus"],
|
|
2571
|
-
setup(e, { expose:
|
|
2572
|
-
const o = e, s =
|
|
2578
|
+
setup(e, { expose: t, emit: n }) {
|
|
2579
|
+
const o = e, s = n, r = j(null), a = fe("textarea"), d = `${a}-help`, i = `${a}-error`, f = C(() => {
|
|
2573
2580
|
const b = [];
|
|
2574
|
-
return o.helpText && !o.error && b.push(
|
|
2575
|
-
}),
|
|
2581
|
+
return o.helpText && !o.error && b.push(d), o.error && b.push(i), b.length > 0 ? b.join(" ") : void 0;
|
|
2582
|
+
}), c = C(() => (o.modelValue || "").length), l = C(() => {
|
|
2576
2583
|
const b = [
|
|
2577
2584
|
"block",
|
|
2578
2585
|
"w-full",
|
|
@@ -2596,13 +2603,13 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2596
2603
|
small: "px-2 py-1 text-sm",
|
|
2597
2604
|
medium: "px-3 py-2 text-base",
|
|
2598
2605
|
large: "px-4 py-3 text-lg"
|
|
2599
|
-
},
|
|
2600
|
-
return [...b, y[o.size], ...
|
|
2606
|
+
}, p = o.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-brand"];
|
|
2607
|
+
return [...b, y[o.size], ...p].join(" ");
|
|
2601
2608
|
}), m = (b) => {
|
|
2602
2609
|
const y = b.target;
|
|
2603
2610
|
s("update:modelValue", y.value);
|
|
2604
2611
|
};
|
|
2605
|
-
function
|
|
2612
|
+
function u() {
|
|
2606
2613
|
var b;
|
|
2607
2614
|
(b = r.value) == null || b.focus();
|
|
2608
2615
|
}
|
|
@@ -2610,16 +2617,16 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2610
2617
|
var b;
|
|
2611
2618
|
(b = r.value) == null || b.blur();
|
|
2612
2619
|
}
|
|
2613
|
-
return
|
|
2620
|
+
return t({ focus: u, blur: h, textareaRef: r }), (b, y) => (g(), v("div", Lo, [
|
|
2614
2621
|
e.label ? (g(), v("label", {
|
|
2615
2622
|
key: 0,
|
|
2616
2623
|
for: R(a),
|
|
2617
2624
|
class: "block text-label mb-1"
|
|
2618
2625
|
}, [
|
|
2619
2626
|
X(E(e.label) + " ", 1),
|
|
2620
|
-
e.required ? (g(), v("span",
|
|
2621
|
-
], 8,
|
|
2622
|
-
F("div",
|
|
2627
|
+
e.required ? (g(), v("span", Vo, "*")) : D("", !0)
|
|
2628
|
+
], 8, Oo)) : D("", !0),
|
|
2629
|
+
F("div", So, [
|
|
2623
2630
|
F("textarea", {
|
|
2624
2631
|
ref_key: "textareaRef",
|
|
2625
2632
|
ref: r,
|
|
@@ -2633,96 +2640,96 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2633
2640
|
maxlength: e.maxLength,
|
|
2634
2641
|
"aria-describedby": f.value,
|
|
2635
2642
|
"aria-invalid": e.error ? "true" : void 0,
|
|
2636
|
-
class: T(
|
|
2643
|
+
class: T(l.value),
|
|
2637
2644
|
onInput: m,
|
|
2638
|
-
onBlur: y[0] || (y[0] = (
|
|
2639
|
-
onFocus: y[1] || (y[1] = (
|
|
2640
|
-
}, null, 42,
|
|
2645
|
+
onBlur: y[0] || (y[0] = (p) => b.$emit("blur", p)),
|
|
2646
|
+
onFocus: y[1] || (y[1] = (p) => b.$emit("focus", p))
|
|
2647
|
+
}, null, 42, zo)
|
|
2641
2648
|
]),
|
|
2642
|
-
e.helpText || e.error || e.maxLength ? (g(), v("div",
|
|
2649
|
+
e.helpText || e.error || e.maxLength ? (g(), v("div", Mo, [
|
|
2643
2650
|
e.helpText && !e.error ? (g(), v("div", {
|
|
2644
2651
|
key: 0,
|
|
2645
|
-
id:
|
|
2652
|
+
id: d,
|
|
2646
2653
|
class: "text-caption"
|
|
2647
2654
|
}, E(e.helpText), 1)) : D("", !0),
|
|
2648
2655
|
e.error ? (g(), v("div", {
|
|
2649
2656
|
key: 1,
|
|
2650
|
-
id:
|
|
2657
|
+
id: i,
|
|
2651
2658
|
class: "text-sm text-error font-sans",
|
|
2652
2659
|
role: "alert",
|
|
2653
2660
|
"aria-live": "polite"
|
|
2654
2661
|
}, E(e.error), 1)) : D("", !0),
|
|
2655
|
-
e.maxLength ? (g(), v("div",
|
|
2662
|
+
e.maxLength ? (g(), v("div", jo, E(c.value) + " / " + E(e.maxLength), 1)) : D("", !0)
|
|
2656
2663
|
])) : D("", !0)
|
|
2657
2664
|
]));
|
|
2658
2665
|
}
|
|
2659
|
-
}),
|
|
2666
|
+
}), Po = { class: "flex flex-col items-center justify-center h-screen gap-4px" }, Io = { class: "text-heading-xl text-fg m-0 p-0" }, No = { class: "text-body-lg text-fg-secondary m-0 p-0" }, gs = /* @__PURE__ */ S({
|
|
2660
2667
|
__name: "DsUnderConstruction",
|
|
2661
2668
|
props: {
|
|
2662
2669
|
title: { default: "Under Construction" },
|
|
2663
2670
|
description: { default: "This page is under construction. Please check back later." }
|
|
2664
2671
|
},
|
|
2665
2672
|
setup(e) {
|
|
2666
|
-
return (
|
|
2673
|
+
return (t, n) => (g(), v("div", Po, [
|
|
2667
2674
|
_(R(wt), { class: "w-10 h-10 text-fg-secondary" }),
|
|
2668
|
-
F("h2",
|
|
2669
|
-
F("p",
|
|
2675
|
+
F("h2", Io, E(e.title), 1),
|
|
2676
|
+
F("p", No, E(e.description), 1)
|
|
2670
2677
|
]));
|
|
2671
2678
|
}
|
|
2672
|
-
}),
|
|
2679
|
+
}), Wo = ["role", "aria-live"], Ho = { class: "flex items-start gap-3 flex-1 min-w-0" }, qo = { class: "flex-1 min-w-0" }, Ko = {
|
|
2673
2680
|
key: 0,
|
|
2674
2681
|
class: "text-label m-0"
|
|
2675
|
-
},
|
|
2682
|
+
}, Uo = /* @__PURE__ */ S({
|
|
2676
2683
|
__name: "DsToast",
|
|
2677
2684
|
props: {
|
|
2678
2685
|
toast: {}
|
|
2679
2686
|
},
|
|
2680
2687
|
emits: ["dismiss"],
|
|
2681
|
-
setup(e, { emit:
|
|
2682
|
-
const
|
|
2683
|
-
let s = null, r =
|
|
2684
|
-
function
|
|
2688
|
+
setup(e, { emit: t }) {
|
|
2689
|
+
const n = e, o = t;
|
|
2690
|
+
let s = null, r = n.toast.duration, a = 0;
|
|
2691
|
+
function d() {
|
|
2685
2692
|
r <= 0 || (a = Date.now(), s = setTimeout(() => {
|
|
2686
|
-
o("dismiss",
|
|
2693
|
+
o("dismiss", n.toast.id);
|
|
2687
2694
|
}, r));
|
|
2688
2695
|
}
|
|
2689
|
-
function
|
|
2696
|
+
function i() {
|
|
2690
2697
|
s && (clearTimeout(s), s = null, r -= Date.now() - a);
|
|
2691
2698
|
}
|
|
2692
2699
|
function f() {
|
|
2693
|
-
|
|
2700
|
+
d();
|
|
2694
2701
|
}
|
|
2695
|
-
const
|
|
2702
|
+
const c = {
|
|
2696
2703
|
brand: "border-l-brand",
|
|
2697
2704
|
error: "border-l-error",
|
|
2698
2705
|
success: "border-l-success",
|
|
2699
2706
|
warning: "border-l-warning",
|
|
2700
2707
|
info: "border-l-info"
|
|
2701
|
-
},
|
|
2708
|
+
}, l = C(() => [
|
|
2702
2709
|
"flex items-start gap-3 w-80 p-4 bg-bg border border-solid border-border rounded-lg shadow-lg",
|
|
2703
2710
|
"border-l-4",
|
|
2704
|
-
|
|
2711
|
+
c[n.toast.variant] || "border-l-brand"
|
|
2705
2712
|
].join(" ")), m = {
|
|
2706
2713
|
brand: "text-brand",
|
|
2707
2714
|
error: "text-error",
|
|
2708
2715
|
success: "text-success",
|
|
2709
2716
|
warning: "text-warning",
|
|
2710
2717
|
info: "text-info"
|
|
2711
|
-
},
|
|
2718
|
+
}, u = C(() => ["shrink-0 mt-0.5", m[n.toast.variant] || "text-brand"].join(" "));
|
|
2712
2719
|
return Et(() => {
|
|
2713
|
-
|
|
2720
|
+
n.toast.duration > 0 && d();
|
|
2714
2721
|
}), rt(() => {
|
|
2715
2722
|
s && clearTimeout(s);
|
|
2716
2723
|
}), (h, b) => (g(), v("div", {
|
|
2717
|
-
class: T(
|
|
2724
|
+
class: T(l.value),
|
|
2718
2725
|
role: e.toast.variant === "error" ? "alert" : "status",
|
|
2719
2726
|
"aria-live": e.toast.variant === "error" ? "assertive" : "polite",
|
|
2720
|
-
onMouseenter:
|
|
2727
|
+
onMouseenter: i,
|
|
2721
2728
|
onMouseleave: f
|
|
2722
2729
|
}, [
|
|
2723
|
-
F("div",
|
|
2730
|
+
F("div", Ho, [
|
|
2724
2731
|
F("span", {
|
|
2725
|
-
class: T(
|
|
2732
|
+
class: T(u.value),
|
|
2726
2733
|
"aria-hidden": "true"
|
|
2727
2734
|
}, [
|
|
2728
2735
|
e.toast.variant === "success" ? (g(), I(R(On), {
|
|
@@ -2739,8 +2746,8 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2739
2746
|
class: "w-5 h-5"
|
|
2740
2747
|
}))
|
|
2741
2748
|
], 2),
|
|
2742
|
-
F("div",
|
|
2743
|
-
e.toast.title ? (g(), v("p",
|
|
2749
|
+
F("div", qo, [
|
|
2750
|
+
e.toast.title ? (g(), v("p", Ko, E(e.toast.title), 1)) : D("", !0),
|
|
2744
2751
|
F("p", {
|
|
2745
2752
|
class: T(["text-body-sm m-0", e.toast.title ? "mt-0.5" : ""])
|
|
2746
2753
|
}, E(e.toast.message), 3)
|
|
@@ -2755,46 +2762,46 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2755
2762
|
}, [
|
|
2756
2763
|
_(R(Be), { class: "w-4 h-4" })
|
|
2757
2764
|
])) : D("", !0)
|
|
2758
|
-
], 42,
|
|
2765
|
+
], 42, Wo));
|
|
2759
2766
|
}
|
|
2760
2767
|
});
|
|
2761
|
-
let
|
|
2768
|
+
let Xo = 0;
|
|
2762
2769
|
const Te = j([]);
|
|
2763
|
-
function xe(e,
|
|
2764
|
-
const o = ++
|
|
2770
|
+
function xe(e, t, n) {
|
|
2771
|
+
const o = ++Xo, s = {
|
|
2765
2772
|
id: o,
|
|
2766
2773
|
variant: e,
|
|
2767
|
-
message:
|
|
2768
|
-
title:
|
|
2769
|
-
duration: (
|
|
2770
|
-
closable: (
|
|
2774
|
+
message: t,
|
|
2775
|
+
title: n == null ? void 0 : n.title,
|
|
2776
|
+
duration: (n == null ? void 0 : n.duration) ?? 5e3,
|
|
2777
|
+
closable: (n == null ? void 0 : n.closable) ?? !0
|
|
2771
2778
|
};
|
|
2772
2779
|
return Te.value.push(s), o;
|
|
2773
2780
|
}
|
|
2774
|
-
function
|
|
2775
|
-
const
|
|
2776
|
-
|
|
2781
|
+
function Yo(e) {
|
|
2782
|
+
const t = Te.value.findIndex((n) => n.id === e);
|
|
2783
|
+
t !== -1 && Te.value.splice(t, 1);
|
|
2777
2784
|
}
|
|
2778
|
-
function
|
|
2785
|
+
function Go() {
|
|
2779
2786
|
return {
|
|
2780
2787
|
toasts: Te,
|
|
2781
|
-
removeToast:
|
|
2782
|
-
success: (e,
|
|
2783
|
-
error: (e,
|
|
2784
|
-
warning: (e,
|
|
2785
|
-
info: (e,
|
|
2786
|
-
brand: (e,
|
|
2788
|
+
removeToast: Yo,
|
|
2789
|
+
success: (e, t) => xe("success", e, t),
|
|
2790
|
+
error: (e, t) => xe("error", e, t),
|
|
2791
|
+
warning: (e, t) => xe("warning", e, t),
|
|
2792
|
+
info: (e, t) => xe("info", e, t),
|
|
2793
|
+
brand: (e, t) => xe("brand", e, t)
|
|
2787
2794
|
};
|
|
2788
2795
|
}
|
|
2789
|
-
const
|
|
2796
|
+
const Jo = {
|
|
2790
2797
|
class: "fixed top-4 right-4 z-50 flex flex-col gap-3",
|
|
2791
2798
|
"aria-label": "Notifications"
|
|
2792
|
-
},
|
|
2799
|
+
}, hs = /* @__PURE__ */ S({
|
|
2793
2800
|
__name: "DsToastContainer",
|
|
2794
2801
|
setup(e) {
|
|
2795
|
-
const { toasts:
|
|
2802
|
+
const { toasts: t, removeToast: n } = Go();
|
|
2796
2803
|
return (o, s) => (g(), I(Le, { to: "body" }, [
|
|
2797
|
-
F("div",
|
|
2804
|
+
F("div", Jo, [
|
|
2798
2805
|
_(At, {
|
|
2799
2806
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
2800
2807
|
"enter-from-class": "opacity-0 translate-x-8",
|
|
@@ -2804,10 +2811,10 @@ const Yo = {
|
|
|
2804
2811
|
"leave-to-class": "opacity-0 translate-x-8"
|
|
2805
2812
|
}, {
|
|
2806
2813
|
default: Re(() => [
|
|
2807
|
-
(g(!0), v(se, null, re(R(
|
|
2814
|
+
(g(!0), v(se, null, re(R(t), (r) => (g(), I(Uo, {
|
|
2808
2815
|
key: r.id,
|
|
2809
2816
|
toast: r,
|
|
2810
|
-
onDismiss: R(
|
|
2817
|
+
onDismiss: R(n)
|
|
2811
2818
|
}, null, 8, ["toast", "onDismiss"]))), 128))
|
|
2812
2819
|
]),
|
|
2813
2820
|
_: 1
|
|
@@ -2815,7 +2822,7 @@ const Yo = {
|
|
|
2815
2822
|
])
|
|
2816
2823
|
]));
|
|
2817
2824
|
}
|
|
2818
|
-
}),
|
|
2825
|
+
}), Qo = ["aria-describedby"], Zo = ["id"], vs = /* @__PURE__ */ S({
|
|
2819
2826
|
__name: "DsTooltip",
|
|
2820
2827
|
props: {
|
|
2821
2828
|
content: {},
|
|
@@ -2823,39 +2830,39 @@ const Yo = {
|
|
|
2823
2830
|
disabled: { type: Boolean, default: !1 }
|
|
2824
2831
|
},
|
|
2825
2832
|
setup(e) {
|
|
2826
|
-
const
|
|
2827
|
-
placement:
|
|
2833
|
+
const t = e, n = fe("tooltip"), o = j(!1), s = j(null), r = j(null), a = j(null), { floatingStyles: d, middlewareData: i, placement: f } = xt(s, r, {
|
|
2834
|
+
placement: C(() => t.placement),
|
|
2828
2835
|
middleware: [ht(8), pt(), vt({ padding: 8 }), Ln({ element: a })]
|
|
2829
|
-
}),
|
|
2830
|
-
const
|
|
2831
|
-
if (!
|
|
2836
|
+
}), c = C(() => {
|
|
2837
|
+
const u = i.value.arrow;
|
|
2838
|
+
if (!u) return {};
|
|
2832
2839
|
const h = f.value.split("-")[0], b = { top: "bottom", right: "left", bottom: "top", left: "right" }[h];
|
|
2833
2840
|
return {
|
|
2834
|
-
left:
|
|
2835
|
-
top:
|
|
2841
|
+
left: u.x != null ? `${u.x}px` : "",
|
|
2842
|
+
top: u.y != null ? `${u.y}px` : "",
|
|
2836
2843
|
[b]: "-4px"
|
|
2837
2844
|
};
|
|
2838
2845
|
});
|
|
2839
|
-
function
|
|
2840
|
-
|
|
2846
|
+
function l() {
|
|
2847
|
+
t.disabled || (o.value = !0);
|
|
2841
2848
|
}
|
|
2842
2849
|
function m() {
|
|
2843
2850
|
o.value = !1;
|
|
2844
2851
|
}
|
|
2845
|
-
return (
|
|
2852
|
+
return (u, h) => (g(), v("div", {
|
|
2846
2853
|
class: "inline-flex",
|
|
2847
|
-
onMouseenter:
|
|
2854
|
+
onMouseenter: l,
|
|
2848
2855
|
onMouseleave: m,
|
|
2849
|
-
onFocusin:
|
|
2856
|
+
onFocusin: l,
|
|
2850
2857
|
onFocusout: m
|
|
2851
2858
|
}, [
|
|
2852
2859
|
F("div", {
|
|
2853
2860
|
ref_key: "referenceRef",
|
|
2854
2861
|
ref: s,
|
|
2855
|
-
"aria-describedby": o.value ? R(
|
|
2862
|
+
"aria-describedby": o.value ? R(n) : void 0
|
|
2856
2863
|
}, [
|
|
2857
|
-
N(
|
|
2858
|
-
], 8,
|
|
2864
|
+
N(u.$slots, "default")
|
|
2865
|
+
], 8, Qo),
|
|
2859
2866
|
(g(), I(Le, { to: "body" }, [
|
|
2860
2867
|
_(at, {
|
|
2861
2868
|
"enter-active-class": "transition-opacity duration-150",
|
|
@@ -2868,28 +2875,28 @@ const Yo = {
|
|
|
2868
2875
|
default: Re(() => [
|
|
2869
2876
|
o.value && !e.disabled ? (g(), v("div", {
|
|
2870
2877
|
key: 0,
|
|
2871
|
-
id: R(
|
|
2878
|
+
id: R(n),
|
|
2872
2879
|
ref_key: "floatingRef",
|
|
2873
2880
|
ref: r,
|
|
2874
2881
|
role: "tooltip",
|
|
2875
|
-
style: he(R(
|
|
2882
|
+
style: he(R(d)),
|
|
2876
2883
|
class: "z-50 px-2 py-1 text-xs font-medium bg-bg-inverse text-fg-inverse rounded-md shadow-md max-w-xs pointer-events-none"
|
|
2877
2884
|
}, [
|
|
2878
2885
|
X(E(e.content) + " ", 1),
|
|
2879
2886
|
F("div", {
|
|
2880
2887
|
ref_key: "arrowRef",
|
|
2881
2888
|
ref: a,
|
|
2882
|
-
style: he(
|
|
2889
|
+
style: he(c.value),
|
|
2883
2890
|
class: "absolute w-2 h-2 bg-bg-inverse rotate-45"
|
|
2884
2891
|
}, null, 4)
|
|
2885
|
-
], 12,
|
|
2892
|
+
], 12, Zo)) : D("", !0)
|
|
2886
2893
|
]),
|
|
2887
2894
|
_: 1
|
|
2888
2895
|
})
|
|
2889
2896
|
]))
|
|
2890
2897
|
], 32));
|
|
2891
2898
|
}
|
|
2892
|
-
}),
|
|
2899
|
+
}), _o = {
|
|
2893
2900
|
// Core UI
|
|
2894
2901
|
bg: "#FFFFFF",
|
|
2895
2902
|
"bg-secondary": "#F8FAFC",
|
|
@@ -2997,7 +3004,7 @@ const Yo = {
|
|
|
2997
3004
|
"transcript-highlight": "#FEF3C7",
|
|
2998
3005
|
"transcript-speaker": "#EDE9FE",
|
|
2999
3006
|
"transcript-timestamp": "#F3F4F6"
|
|
3000
|
-
},
|
|
3007
|
+
}, es = {
|
|
3001
3008
|
"space-1": "4px",
|
|
3002
3009
|
"space-2": "8px",
|
|
3003
3010
|
"space-3": "12px",
|
|
@@ -3006,52 +3013,52 @@ const Yo = {
|
|
|
3006
3013
|
"space-6": "32px",
|
|
3007
3014
|
"space-7": "48px",
|
|
3008
3015
|
"space-8": "64px"
|
|
3009
|
-
},
|
|
3016
|
+
}, ts = {
|
|
3010
3017
|
"radius-sm": "4px",
|
|
3011
3018
|
"radius-md": "6px",
|
|
3012
3019
|
"radius-lg": "8px",
|
|
3013
3020
|
"radius-xl": "12px",
|
|
3014
3021
|
"radius-full": "9999px"
|
|
3015
|
-
},
|
|
3022
|
+
}, ns = {
|
|
3016
3023
|
"shadow-sm": "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
3017
3024
|
"shadow-md": "0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 4px 6px -1px rgba(0, 0, 0, 0.1)",
|
|
3018
3025
|
"shadow-lg": "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"
|
|
3019
|
-
},
|
|
3020
|
-
function
|
|
3026
|
+
}, ps = { ..._o, ...es, ...ts, ...ns };
|
|
3027
|
+
function ys(e) {
|
|
3021
3028
|
return `--ds-${e}`;
|
|
3022
3029
|
}
|
|
3023
|
-
function
|
|
3024
|
-
const
|
|
3030
|
+
function xs(e, t = ":root") {
|
|
3031
|
+
const n = Object.entries(e).map(([o, s]) => ` --ds-${o}: ${s};`).join(`
|
|
3025
3032
|
`);
|
|
3026
|
-
return `${
|
|
3027
|
-
${
|
|
3033
|
+
return `${t} {
|
|
3034
|
+
${n}
|
|
3028
3035
|
}`;
|
|
3029
3036
|
}
|
|
3030
3037
|
export {
|
|
3031
|
-
|
|
3032
|
-
|
|
3038
|
+
ss as DsAvatar,
|
|
3039
|
+
rs as DsBadge,
|
|
3033
3040
|
Ot as DsButton,
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3041
|
+
as as DsCheckbox,
|
|
3042
|
+
ls as DsDropdownSelect,
|
|
3043
|
+
is as DsInput,
|
|
3037
3044
|
Jn as DsLoadingSpinner,
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3045
|
+
cs as DsModal,
|
|
3046
|
+
ds as DsRadio,
|
|
3047
|
+
us as DsSelect,
|
|
3048
|
+
fs as DsTable,
|
|
3049
|
+
bs as DsTabs,
|
|
3050
|
+
ms as DsTextarea,
|
|
3051
|
+
Uo as DsToast,
|
|
3052
|
+
hs as DsToastContainer,
|
|
3053
|
+
vs as DsTooltip,
|
|
3054
|
+
gs as DsUnderConstruction,
|
|
3055
|
+
ps as allTokens,
|
|
3056
|
+
_o as colorTokens,
|
|
3057
|
+
xs as generateThemeCss,
|
|
3058
|
+
ts as radiusTokens,
|
|
3059
|
+
ns as shadowTokens,
|
|
3060
|
+
es as spacingTokens,
|
|
3061
|
+
ys as tokenToCssVar,
|
|
3055
3062
|
fe as useId,
|
|
3056
|
-
|
|
3063
|
+
Go as useToast
|
|
3057
3064
|
};
|