@leodamours/ds-components 0.2.7 → 0.2.9
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 -1
- package/dist/index.js +762 -751
- 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
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: d[0] || (d[0] = (i) =>
|
|
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
|
-
}, d =
|
|
200
|
+
}, d = t.fullWidth ? ["w-full"] : [];
|
|
201
201
|
return [
|
|
202
202
|
...s,
|
|
203
|
-
...r[
|
|
204
|
-
...a[
|
|
203
|
+
...r[t.size],
|
|
204
|
+
...a[t.variant],
|
|
205
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,13 +252,13 @@ 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 i = s[
|
|
260
|
+
}, r = C(() => {
|
|
261
|
+
const i = s[n.size], f = [
|
|
262
262
|
i.box,
|
|
263
263
|
i.radius,
|
|
264
264
|
"inline-flex items-center justify-center",
|
|
@@ -266,24 +266,24 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
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
|
-
),
|
|
277
|
-
}), a =
|
|
276
|
+
), f.join(" ");
|
|
277
|
+
}), a = C(() => [
|
|
278
278
|
"font-sans select-none",
|
|
279
|
-
s[
|
|
280
|
-
|
|
279
|
+
s[n.size].label,
|
|
280
|
+
n.disabled ? "text-fg-disabled" : "text-fg"
|
|
281
281
|
].join(" ")), d = (i) => {
|
|
282
|
-
if (
|
|
282
|
+
if (n.disabled) return;
|
|
283
283
|
const c = i.target.checked;
|
|
284
284
|
o("update:modelValue", c), o("change", c, i);
|
|
285
285
|
};
|
|
286
|
-
return (i,
|
|
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",
|
|
@@ -303,7 +303,7 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
303
303
|
class: T(r.value),
|
|
304
304
|
"aria-hidden": "true"
|
|
305
305
|
}, [
|
|
306
|
-
e.modelValue ? (g(), v("svg", St, [...
|
|
306
|
+
e.modelValue ? (g(), v("svg", St, [...f[0] || (f[0] = [
|
|
307
307
|
F("polyline", { points: "2.5 6 5 8.5 9.5 3.5" }, null, -1)
|
|
308
308
|
])])) : D("", !0)
|
|
309
309
|
], 2),
|
|
@@ -317,7 +317,7 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
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,28 +407,28 @@ 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(
|
|
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
432
|
let u;
|
|
433
433
|
switch (i) {
|
|
434
434
|
case "top":
|
|
@@ -461,19 +461,19 @@ function Ze(e, n, t) {
|
|
|
461
461
|
y: o.y
|
|
462
462
|
};
|
|
463
463
|
}
|
|
464
|
-
switch (ye(
|
|
464
|
+
switch (ye(t)) {
|
|
465
465
|
case "start":
|
|
466
|
-
u[a] -=
|
|
466
|
+
u[a] -= m * (n && f ? -1 : 1);
|
|
467
467
|
break;
|
|
468
468
|
case "end":
|
|
469
|
-
u[a] +=
|
|
469
|
+
u[a] += m * (n && f ? -1 : 1);
|
|
470
470
|
break;
|
|
471
471
|
}
|
|
472
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,
|
|
@@ -482,17 +482,17 @@ async function Ut(e, n) {
|
|
|
482
482
|
elements: d,
|
|
483
483
|
strategy: i
|
|
484
484
|
} = e, {
|
|
485
|
-
boundary:
|
|
485
|
+
boundary: f = "clippingAncestors",
|
|
486
486
|
rootBoundary: c = "viewport",
|
|
487
487
|
elementContext: l = "floating",
|
|
488
|
-
altBoundary:
|
|
488
|
+
altBoundary: m = !1,
|
|
489
489
|
padding: u = 0
|
|
490
|
-
} = pe(
|
|
491
|
-
element: (
|
|
492
|
-
boundary:
|
|
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
|
+
boundary: f,
|
|
493
493
|
rootBoundary: c,
|
|
494
494
|
strategy: i
|
|
495
|
-
})),
|
|
495
|
+
})), k = l === "floating" ? {
|
|
496
496
|
x: o,
|
|
497
497
|
y: s,
|
|
498
498
|
width: a.floating.width,
|
|
@@ -505,108 +505,108 @@ async function Ut(e, n) {
|
|
|
505
505
|
y: 1
|
|
506
506
|
}, B = Ae(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
507
507
|
elements: d,
|
|
508
|
-
rect:
|
|
508
|
+
rect: k,
|
|
509
509
|
offsetParent: x,
|
|
510
510
|
strategy: i
|
|
511
|
-
}) :
|
|
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
|
-
} =
|
|
526
|
-
let
|
|
525
|
+
} = n, d = r.filter(Boolean), i = await (a.isRTL == null ? void 0 : a.isRTL(t));
|
|
526
|
+
let f = await a.getElementRects({
|
|
527
527
|
reference: e,
|
|
528
|
-
floating:
|
|
528
|
+
floating: t,
|
|
529
529
|
strategy: s
|
|
530
530
|
}), {
|
|
531
531
|
x: c,
|
|
532
532
|
y: l
|
|
533
|
-
} = Ze(
|
|
533
|
+
} = Ze(f, o, i), m = o, u = {}, h = 0;
|
|
534
534
|
for (let y = 0; y < d.length; y++) {
|
|
535
|
-
var
|
|
535
|
+
var b;
|
|
536
536
|
const {
|
|
537
|
-
name:
|
|
538
|
-
fn:
|
|
537
|
+
name: p,
|
|
538
|
+
fn: k
|
|
539
539
|
} = d[y], {
|
|
540
540
|
x,
|
|
541
541
|
y: $,
|
|
542
542
|
data: B,
|
|
543
543
|
reset: O
|
|
544
|
-
} = await
|
|
544
|
+
} = await k({
|
|
545
545
|
x: c,
|
|
546
546
|
y: l,
|
|
547
547
|
initialPlacement: o,
|
|
548
|
-
placement:
|
|
548
|
+
placement: m,
|
|
549
549
|
strategy: s,
|
|
550
550
|
middlewareData: u,
|
|
551
|
-
rects:
|
|
551
|
+
rects: f,
|
|
552
552
|
platform: {
|
|
553
553
|
...a,
|
|
554
|
-
detectOverflow: (
|
|
554
|
+
detectOverflow: (b = a.detectOverflow) != null ? b : Ut
|
|
555
555
|
},
|
|
556
556
|
elements: {
|
|
557
557
|
reference: e,
|
|
558
|
-
floating:
|
|
558
|
+
floating: t
|
|
559
559
|
}
|
|
560
560
|
});
|
|
561
561
|
c = x ?? c, l = $ ?? l, u = {
|
|
562
562
|
...u,
|
|
563
|
-
[
|
|
564
|
-
...u[
|
|
563
|
+
[p]: {
|
|
564
|
+
...u[p],
|
|
565
565
|
...B
|
|
566
566
|
}
|
|
567
|
-
}, O &&
|
|
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
572
|
x: c,
|
|
573
573
|
y: l
|
|
574
|
-
} = Ze(
|
|
574
|
+
} = Ze(f, m, i)), y = -1);
|
|
575
575
|
}
|
|
576
576
|
return {
|
|
577
577
|
x: c,
|
|
578
578
|
y: l,
|
|
579
|
-
placement:
|
|
579
|
+
placement: m,
|
|
580
580
|
strategy: s,
|
|
581
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
593
|
elements: d,
|
|
594
594
|
middlewareData: i
|
|
595
|
-
} =
|
|
596
|
-
element:
|
|
595
|
+
} = t, {
|
|
596
|
+
element: f,
|
|
597
597
|
padding: c = 0
|
|
598
|
-
} = pe(e,
|
|
599
|
-
if (
|
|
598
|
+
} = pe(e, t) || {};
|
|
599
|
+
if (f == null)
|
|
600
600
|
return {};
|
|
601
|
-
const l = it(c),
|
|
602
|
-
x:
|
|
601
|
+
const l = it(c), m = {
|
|
602
|
+
x: n,
|
|
603
603
|
y: o
|
|
604
|
-
}, u = qe(s),
|
|
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 = d.floating[x] || r.floating[
|
|
607
|
-
const z = $ / 2 - B / 2, M = A / 2 - h
|
|
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
|
-
[u]:
|
|
609
|
+
[u]: m[u] + H,
|
|
610
610
|
data: {
|
|
611
611
|
[u]: V,
|
|
612
612
|
centerOffset: L - V - 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
630
|
initialPlacement: d,
|
|
631
631
|
platform: i,
|
|
632
|
-
elements:
|
|
633
|
-
} =
|
|
632
|
+
elements: f
|
|
633
|
+
} = t, {
|
|
634
634
|
mainAxis: c = !0,
|
|
635
635
|
crossAxis: l = !0,
|
|
636
|
-
fallbackPlacements:
|
|
636
|
+
fallbackPlacements: m,
|
|
637
637
|
fallbackStrategy: u = "bestFit",
|
|
638
|
-
fallbackAxisSideDirection:
|
|
639
|
-
flipAlignment:
|
|
638
|
+
fallbackAxisSideDirection: h = "none",
|
|
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
|
-
!
|
|
646
|
-
const A = [d, ...B], z = await i.detectOverflow(
|
|
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 (c && M.push(z[
|
|
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 && (!(l === "alignment" ?
|
|
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,
|
|
@@ -671,16 +671,16 @@ const Xt = async (e, n, t) => {
|
|
|
671
671
|
if (!P)
|
|
672
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
|
}
|
|
@@ -699,16 +699,16 @@ 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
|
-
mainAxis:
|
|
709
|
+
mainAxis: m,
|
|
710
710
|
crossAxis: u,
|
|
711
|
-
alignmentAxis:
|
|
711
|
+
alignmentAxis: h
|
|
712
712
|
} = typeof l == "number" ? {
|
|
713
713
|
mainAxis: l,
|
|
714
714
|
crossAxis: 0,
|
|
@@ -718,11 +718,11 @@ async function Qt(e, n) {
|
|
|
718
718
|
crossAxis: l.crossAxis || 0,
|
|
719
719
|
alignmentAxis: l.alignmentAxis
|
|
720
720
|
};
|
|
721
|
-
return d && typeof
|
|
721
|
+
return d && typeof h == "number" && (u = d === "end" ? h * -1 : h), i ? {
|
|
722
722
|
x: u * c,
|
|
723
|
-
y:
|
|
723
|
+
y: m * f
|
|
724
724
|
} : {
|
|
725
|
-
x:
|
|
725
|
+
x: m * f,
|
|
726
726
|
y: u * c
|
|
727
727
|
};
|
|
728
728
|
}
|
|
@@ -730,15 +730,15 @@ 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
739
|
middlewareData: d
|
|
740
|
-
} =
|
|
741
|
-
return a === ((
|
|
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
742
|
x: s + i.x,
|
|
743
743
|
y: r + i.y,
|
|
744
744
|
data: {
|
|
@@ -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
763
|
crossAxis: d = !1,
|
|
764
764
|
limiter: i = {
|
|
765
|
-
fn: (
|
|
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
|
-
...
|
|
777
|
-
} = pe(e,
|
|
778
|
-
x:
|
|
776
|
+
...f
|
|
777
|
+
} = pe(e, t), c = {
|
|
778
|
+
x: n,
|
|
779
779
|
y: o
|
|
780
|
-
}, l = await r.detectOverflow(
|
|
781
|
-
let
|
|
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
|
|
784
|
-
|
|
783
|
+
const p = u === "y" ? "top" : "left", k = u === "y" ? "bottom" : "right", x = h + l[p], $ = h - l[k];
|
|
784
|
+
h = Pe(x, h, $);
|
|
785
785
|
}
|
|
786
786
|
if (d) {
|
|
787
|
-
const
|
|
788
|
-
|
|
787
|
+
const p = m === "y" ? "top" : "left", k = m === "y" ? "bottom" : "right", x = b + l[p], $ = b - l[k];
|
|
788
|
+
b = Pe(x, b, $);
|
|
789
789
|
}
|
|
790
790
|
const y = i.fn({
|
|
791
|
-
...
|
|
792
|
-
[u]:
|
|
793
|
-
[
|
|
791
|
+
...t,
|
|
792
|
+
[u]: h,
|
|
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
801
|
[u]: a,
|
|
802
|
-
[
|
|
802
|
+
[m]: d
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
805
|
};
|
|
@@ -809,36 +809,36 @@ 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
818
|
elements: d
|
|
819
|
-
} =
|
|
819
|
+
} = t, {
|
|
820
820
|
apply: i = () => {
|
|
821
821
|
},
|
|
822
|
-
...
|
|
823
|
-
} = pe(e,
|
|
824
|
-
width:
|
|
825
|
-
height:
|
|
822
|
+
...f
|
|
823
|
+
} = pe(e, t), c = await a.detectOverflow(t, f), l = le(s), m = ye(s), u = ne(s) === "y", {
|
|
824
|
+
width: h,
|
|
825
|
+
height: b
|
|
826
826
|
} = r.floating;
|
|
827
|
-
let y,
|
|
828
|
-
l === "top" || l === "bottom" ? (y = l,
|
|
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(c.left, 0), Y = q(c.right, 0), U = q(c.top, 0),
|
|
833
|
-
u ? z =
|
|
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
835
|
await i({
|
|
836
|
-
...
|
|
836
|
+
...t,
|
|
837
837
|
availableWidth: z,
|
|
838
838
|
availableHeight: A
|
|
839
839
|
});
|
|
840
840
|
const M = await a.getDimensions(d.floating);
|
|
841
|
-
return
|
|
841
|
+
return h !== M.width || b !== M.height ? {
|
|
842
842
|
reset: {
|
|
843
843
|
rects: !0
|
|
844
844
|
}
|
|
@@ -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,38 +934,38 @@ 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
955
|
const d = Ne(a);
|
|
956
|
-
return
|
|
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 d && (
|
|
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
|
};
|
|
@@ -974,15 +974,15 @@ 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(
|
|
984
|
+
} = dt(t);
|
|
985
|
+
let a = (r ? De(n.width) : n.width) / o, d = (r ? De(n.height) : n.height) / s;
|
|
986
986
|
return (!a || !Number.isFinite(a)) && (a = 1), (!d || !Number.isFinite(d)) && (d = 1), {
|
|
987
987
|
x: a,
|
|
988
988
|
y: d
|
|
@@ -990,43 +990,43 @@ function ge(e) {
|
|
|
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 d = fn(r,
|
|
1008
|
-
let i = (s.left + d.x) / a.x,
|
|
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
|
|
1011
|
-
let
|
|
1012
|
-
for (;
|
|
1013
|
-
const y = ge(
|
|
1014
|
-
i *= y.x,
|
|
1010
|
+
const m = K(r), u = o && J(o) ? K(o) : o;
|
|
1011
|
+
let h = m, b = Ne(h);
|
|
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
1018
|
width: c,
|
|
1019
1019
|
height: l,
|
|
1020
1020
|
x: i,
|
|
1021
|
-
y:
|
|
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,39 +1034,39 @@ 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), d =
|
|
1042
|
+
const r = s === "fixed", a = te(o), d = t ? Ve(t.floating) : !1;
|
|
1043
1043
|
if (o === a || d && r)
|
|
1044
|
-
return
|
|
1044
|
+
return n;
|
|
1045
1045
|
let i = {
|
|
1046
1046
|
scrollLeft: 0,
|
|
1047
1047
|
scrollTop: 0
|
|
1048
|
-
},
|
|
1048
|
+
}, f = Z(1);
|
|
1049
1049
|
const c = Z(0), l = ee(o);
|
|
1050
|
-
if ((l || !l && !r) && ((ue(o) !== "body" ||
|
|
1050
|
+
if ((l || !l && !r) && ((ue(o) !== "body" || Ce(a)) && (i = Se(o)), ee(o))) {
|
|
1051
1051
|
const u = ce(o);
|
|
1052
|
-
|
|
1052
|
+
f = ge(o), c.x = u.x + o.clientLeft, c.y = u.y + o.clientTop;
|
|
1053
1053
|
}
|
|
1054
|
-
const
|
|
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 d = -
|
|
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,
|
|
@@ -1074,19 +1074,19 @@ function gn(e) {
|
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
1076
|
const et = 25;
|
|
1077
|
-
function hn(e,
|
|
1078
|
-
const
|
|
1077
|
+
function hn(e, t) {
|
|
1078
|
+
const n = K(e), o = te(e), s = n.visualViewport;
|
|
1079
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
1082
|
const c = Xe();
|
|
1083
|
-
(!c || c &&
|
|
1083
|
+
(!c || c && t === "fixed") && (d = s.offsetLeft, i = s.offsetTop);
|
|
1084
1084
|
}
|
|
1085
|
-
const
|
|
1086
|
-
if (
|
|
1087
|
-
const c = o.ownerDocument, l = c.body,
|
|
1088
|
-
|
|
1089
|
-
} else
|
|
1085
|
+
const f = ze(o);
|
|
1086
|
+
if (f <= 0) {
|
|
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
|
+
h <= et && (r -= h);
|
|
1089
|
+
} else f <= et && (r += f);
|
|
1090
1090
|
return {
|
|
1091
1091
|
width: r,
|
|
1092
1092
|
height: a,
|
|
@@ -1095,62 +1095,62 @@ function hn(e, n) {
|
|
|
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
1102
|
height: d,
|
|
1103
1103
|
x: i,
|
|
1104
|
-
y:
|
|
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
|
|
1130
|
+
function yn(e, t) {
|
|
1131
|
+
const n = t.get(e);
|
|
1132
|
+
if (n)
|
|
1133
|
+
return n;
|
|
1134
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
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) ||
|
|
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 l = tt(
|
|
1152
|
-
return
|
|
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
1155
|
width: i.right - i.left,
|
|
1156
1156
|
height: i.bottom - i.top,
|
|
@@ -1160,34 +1160,34 @@ function xn(e) {
|
|
|
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(
|
|
1171
|
+
function kn(e, t, n) {
|
|
1172
|
+
const o = ee(t), s = te(t), r = n === "fixed", a = ce(e, !0, r, t);
|
|
1173
1173
|
let d = {
|
|
1174
1174
|
scrollLeft: 0,
|
|
1175
1175
|
scrollTop: 0
|
|
1176
1176
|
};
|
|
1177
1177
|
const i = Z(0);
|
|
1178
|
-
function
|
|
1178
|
+
function f() {
|
|
1179
1179
|
i.x = ze(s);
|
|
1180
1180
|
}
|
|
1181
1181
|
if (o || !o && !r)
|
|
1182
|
-
if ((ue(
|
|
1183
|
-
const u = ce(
|
|
1184
|
-
i.x = u.x +
|
|
1185
|
-
} else s &&
|
|
1186
|
-
r && !o && s &&
|
|
1187
|
-
const c = s && !o && !r ? ft(s, d) : Z(0), l = a.left + d.scrollLeft - i.x - c.x,
|
|
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
|
+
} else s && f();
|
|
1186
|
+
r && !o && s && f();
|
|
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
1189
|
x: l,
|
|
1190
|
-
y:
|
|
1190
|
+
y: m,
|
|
1191
1191
|
width: a.width,
|
|
1192
1192
|
height: a.height
|
|
1193
1193
|
};
|
|
@@ -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,35 +1241,35 @@ 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
1258
|
var d;
|
|
1259
|
-
clearTimeout(o), (d =
|
|
1259
|
+
clearTimeout(o), (d = n) == null || d.disconnect(), n = null;
|
|
1260
1260
|
}
|
|
1261
1261
|
function a(d, i) {
|
|
1262
1262
|
d === void 0 && (d = !1), i === void 0 && (i = 1), r();
|
|
1263
|
-
const
|
|
1263
|
+
const f = e.getBoundingClientRect(), {
|
|
1264
1264
|
left: c,
|
|
1265
1265
|
top: l,
|
|
1266
|
-
width:
|
|
1266
|
+
width: m,
|
|
1267
1267
|
height: u
|
|
1268
|
-
} =
|
|
1269
|
-
if (d ||
|
|
1268
|
+
} = f;
|
|
1269
|
+
if (d || t(), !m || !u)
|
|
1270
1270
|
return;
|
|
1271
|
-
const
|
|
1272
|
-
rootMargin: -
|
|
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
1273
|
threshold: q(0, ae(1, i)) || 1
|
|
1274
1274
|
};
|
|
1275
1275
|
let $ = !0;
|
|
@@ -1282,22 +1282,22 @@ function Dn(e, n) {
|
|
|
1282
1282
|
a(!1, 1e-7);
|
|
1283
1283
|
}, 1e3);
|
|
1284
1284
|
}
|
|
1285
|
-
A === 1 && !gt(
|
|
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,
|
|
@@ -1305,43 +1305,43 @@ function En(e, n, t, o) {
|
|
|
1305
1305
|
elementResize: a = typeof ResizeObserver == "function",
|
|
1306
1306
|
layoutShift: d = typeof IntersectionObserver == "function",
|
|
1307
1307
|
animationFrame: i = !1
|
|
1308
|
-
} = o,
|
|
1309
|
-
c.forEach((
|
|
1310
|
-
s &&
|
|
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 l =
|
|
1315
|
-
let
|
|
1316
|
-
a && (u = new ResizeObserver((
|
|
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 = u) == null || x.observe(
|
|
1321
|
-
})),
|
|
1322
|
-
}),
|
|
1323
|
-
let
|
|
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
1324
|
i && y();
|
|
1325
1325
|
function y() {
|
|
1326
|
-
const
|
|
1327
|
-
|
|
1326
|
+
const p = ce(e);
|
|
1327
|
+
b && !gt(b, p) && n(), b = p, h = requestAnimationFrame(y);
|
|
1328
1328
|
}
|
|
1329
|
-
return
|
|
1330
|
-
var
|
|
1331
|
-
c.forEach((
|
|
1332
|
-
s &&
|
|
1333
|
-
}), l == null || l(), (
|
|
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,37 +1363,37 @@ 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
|
-
}), d =
|
|
1389
|
+
return (A = me(n.placement)) != null ? A : "bottom";
|
|
1390
|
+
}), d = C(() => {
|
|
1391
1391
|
var A;
|
|
1392
|
-
return (A = me(
|
|
1393
|
-
}), i =
|
|
1392
|
+
return (A = me(n.strategy)) != null ? A : "absolute";
|
|
1393
|
+
}), i = C(() => {
|
|
1394
1394
|
var A;
|
|
1395
|
-
return (A = me(
|
|
1396
|
-
}),
|
|
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
1398
|
position: u.value,
|
|
1399
1399
|
left: "0",
|
|
@@ -1401,7 +1401,7 @@ function xt(e, n, t) {
|
|
|
1401
1401
|
};
|
|
1402
1402
|
if (!c.value)
|
|
1403
1403
|
return A;
|
|
1404
|
-
const z = ot(c.value, l.value), M = ot(c.value,
|
|
1404
|
+
const z = ot(c.value, l.value), M = ot(c.value, m.value);
|
|
1405
1405
|
return i.value ? {
|
|
1406
1406
|
...A,
|
|
1407
1407
|
transform: "translate(" + z + "px, " + M + "px)",
|
|
@@ -1414,29 +1414,29 @@ function xt(e, n, t) {
|
|
|
1414
1414
|
top: M + "px"
|
|
1415
1415
|
};
|
|
1416
1416
|
});
|
|
1417
|
-
let
|
|
1417
|
+
let k;
|
|
1418
1418
|
function x() {
|
|
1419
|
-
if (
|
|
1419
|
+
if (f.value == null || c.value == null)
|
|
1420
1420
|
return;
|
|
1421
1421
|
const A = s.value;
|
|
1422
|
-
Tn(
|
|
1422
|
+
Tn(f.value, c.value, {
|
|
1423
1423
|
middleware: r.value,
|
|
1424
1424
|
placement: a.value,
|
|
1425
1425
|
strategy: d.value
|
|
1426
1426
|
}).then((z) => {
|
|
1427
|
-
l.value = z.x,
|
|
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 (
|
|
1439
|
-
|
|
1438
|
+
if (f.value != null && c.value != null) {
|
|
1439
|
+
k = o(f.value, c.value, x);
|
|
1440
1440
|
return;
|
|
1441
1441
|
}
|
|
1442
1442
|
}
|
|
@@ -1445,18 +1445,18 @@ function xt(e, n, t) {
|
|
|
1445
1445
|
}
|
|
1446
1446
|
return we([r, a, d, s], x, {
|
|
1447
1447
|
flush: "sync"
|
|
1448
|
-
}), we([
|
|
1448
|
+
}), we([f, c], B, {
|
|
1449
1449
|
flush: "sync"
|
|
1450
1450
|
}), we(s, O, {
|
|
1451
1451
|
flush: "sync"
|
|
1452
|
-
}),
|
|
1452
|
+
}), Ft() && $t($), {
|
|
1453
1453
|
x: be(l),
|
|
1454
|
-
y: be(
|
|
1454
|
+
y: be(m),
|
|
1455
1455
|
strategy: be(u),
|
|
1456
|
-
placement: be(
|
|
1457
|
-
middlewareData: be(
|
|
1456
|
+
placement: be(h),
|
|
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
|
|
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
1608
|
if (!(!a.value || i.value < 0))
|
|
1609
1609
|
return c(i.value);
|
|
1610
|
-
}), c = (
|
|
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
|
-
}),
|
|
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
|
|
1654
|
-
(L) =>
|
|
1652
|
+
n.disabled || n.loading || (a.value = !0, je(() => {
|
|
1653
|
+
const w = n.options.findIndex(
|
|
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
1659
|
a.value = !1, i.value = -1;
|
|
1660
1660
|
}, W = () => {
|
|
1661
|
-
|
|
1662
|
-
}, Y = (
|
|
1663
|
-
if (w
|
|
1664
|
-
const L =
|
|
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,
|
|
@@ -1710,13 +1710,13 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1710
1710
|
"aria-expanded": a.value ? "true" : "false",
|
|
1711
1711
|
"aria-controls": R(d),
|
|
1712
1712
|
"aria-haspopup": "listbox",
|
|
1713
|
-
"aria-activedescendant":
|
|
1713
|
+
"aria-activedescendant": f.value,
|
|
1714
1714
|
onClick: W,
|
|
1715
1715
|
onKeydown: U
|
|
1716
1716
|
}, {
|
|
1717
1717
|
default: Re(() => [
|
|
1718
|
-
N(
|
|
1719
|
-
X(E(
|
|
1718
|
+
N(w.$slots, "trigger", {}, () => [
|
|
1719
|
+
X(E(h.value || e.placeholder), 1)
|
|
1720
1720
|
])
|
|
1721
1721
|
]),
|
|
1722
1722
|
_: 3
|
|
@@ -1735,24 +1735,24 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1735
1735
|
}, ["stop"]))
|
|
1736
1736
|
}, [
|
|
1737
1737
|
(g(!0), v(se, null, re(e.options, (V, P) => (g(), v("div", {
|
|
1738
|
-
key:
|
|
1738
|
+
key: b(V),
|
|
1739
1739
|
id: c(P),
|
|
1740
1740
|
role: "option",
|
|
1741
|
-
"aria-selected":
|
|
1742
|
-
"aria-disabled":
|
|
1741
|
+
"aria-selected": m.value === b(V) ? "true" : "false",
|
|
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
|
-
|
|
1746
|
-
|
|
1747
|
-
i.value === P &&
|
|
1748
|
-
(i.value !== P &&
|
|
1745
|
+
p(V) ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
1746
|
+
m.value === b(V) ? "bg-brand text-brand-on-solid" : "",
|
|
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
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
1810
|
return o.helpText && !o.error && x.push(d), o.error && x.push(i), x.length > 0 ? x.join(" ") : void 0;
|
|
1811
|
-
}), c =
|
|
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",
|
|
@@ -1840,11 +1840,11 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1840
1840
|
l.value ? B.pr : B.px,
|
|
1841
1841
|
...O
|
|
1842
1842
|
].join(" ");
|
|
1843
|
-
}),
|
|
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
|
});
|
|
1847
|
-
function
|
|
1847
|
+
function b(x) {
|
|
1848
1848
|
const $ = x.target;
|
|
1849
1849
|
if (o.type === "number") {
|
|
1850
1850
|
const B = Number($.value);
|
|
@@ -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),
|
|
@@ -1876,7 +1876,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1876
1876
|
F("div", Kn, [
|
|
1877
1877
|
e.iconLeft ? (g(), v("div", Un, [
|
|
1878
1878
|
(g(), I($e(e.iconLeft), {
|
|
1879
|
-
class: T(
|
|
1879
|
+
class: T(h.value)
|
|
1880
1880
|
}, null, 8, ["class"]))
|
|
1881
1881
|
])) : D("", !0),
|
|
1882
1882
|
F("input", {
|
|
@@ -1894,17 +1894,17 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1894
1894
|
min: e.min,
|
|
1895
1895
|
max: e.max,
|
|
1896
1896
|
step: e.step,
|
|
1897
|
-
"aria-describedby":
|
|
1897
|
+
"aria-describedby": f.value,
|
|
1898
1898
|
"aria-invalid": e.error ? "true" : void 0,
|
|
1899
1899
|
class: T(u.value),
|
|
1900
|
-
onInput:
|
|
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
1905
|
e.iconRight && !c.value ? (g(), v("div", Yn, [
|
|
1906
1906
|
(g(), I($e(e.iconRight), {
|
|
1907
|
-
class: T(
|
|
1907
|
+
class: T(h.value)
|
|
1908
1908
|
}, null, 8, ["class"]))
|
|
1909
1909
|
])) : D("", !0),
|
|
1910
1910
|
c.value ? (g(), v("button", {
|
|
@@ -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",
|
|
@@ -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
|
-
...d[
|
|
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,23 +2015,23 @@ 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 d =
|
|
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
|
-
}[
|
|
2026
|
+
}[n.size]} max-h-[90vh] flex flex-col`);
|
|
2027
2027
|
function i() {
|
|
2028
2028
|
o("update:modelValue", !1), o("close");
|
|
2029
2029
|
}
|
|
2030
|
-
function
|
|
2031
|
-
|
|
2030
|
+
function f() {
|
|
2031
|
+
n.persistent || i();
|
|
2032
2032
|
}
|
|
2033
2033
|
function c() {
|
|
2034
|
-
|
|
2034
|
+
n.persistent || i();
|
|
2035
2035
|
}
|
|
2036
2036
|
function l() {
|
|
2037
2037
|
return r.value ? Array.from(
|
|
@@ -2040,22 +2040,22 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2040
2040
|
)
|
|
2041
2041
|
) : [];
|
|
2042
2042
|
}
|
|
2043
|
-
function
|
|
2043
|
+
function m(u) {
|
|
2044
2044
|
if (u.key !== "Tab") return;
|
|
2045
|
-
const
|
|
2046
|
-
if (
|
|
2047
|
-
const
|
|
2048
|
-
u.shiftKey && document.activeElement ===
|
|
2045
|
+
const h = l();
|
|
2046
|
+
if (h.length === 0) return;
|
|
2047
|
+
const b = h[0], y = h[h.length - 1];
|
|
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
|
-
() =>
|
|
2051
|
+
() => n.modelValue,
|
|
2052
2052
|
async (u) => {
|
|
2053
|
-
var
|
|
2054
|
-
u ? (a = document.activeElement, document.body.style.overflow = "hidden", document.addEventListener("keydown",
|
|
2053
|
+
var h;
|
|
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
|
-
document.body.style.overflow = "", document.removeEventListener("keydown",
|
|
2058
|
-
}), (u,
|
|
2057
|
+
document.body.style.overflow = "", document.removeEventListener("keydown", m);
|
|
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",
|
|
@@ -2073,7 +2073,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2073
2073
|
F("div", {
|
|
2074
2074
|
class: "absolute inset-0 bg-bg-inverse/50",
|
|
2075
2075
|
"aria-hidden": "true",
|
|
2076
|
-
onClick:
|
|
2076
|
+
onClick: f
|
|
2077
2077
|
}),
|
|
2078
2078
|
F("div", {
|
|
2079
2079
|
ref_key: "panelRef",
|
|
@@ -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,21 +2126,21 @@ 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 =
|
|
2134
|
+
}, a = C(() => {
|
|
2135
2135
|
const l = [
|
|
2136
|
-
r[
|
|
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
2146
|
) : s.value ? l.push("bg-bg border-brand") : l.push(
|
|
@@ -2148,17 +2148,17 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
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
2150
|
), l.join(" ");
|
|
2151
|
-
}), d =
|
|
2152
|
-
const l = [r[
|
|
2153
|
-
return
|
|
2154
|
-
}), i =
|
|
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(" ")),
|
|
2159
|
-
if (
|
|
2160
|
-
const l = c.target,
|
|
2161
|
-
o("update:modelValue",
|
|
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
2163
|
return (c, l) => (g(), v("label", {
|
|
2164
2164
|
class: T([
|
|
@@ -2175,7 +2175,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2175
2175
|
disabled: e.disabled,
|
|
2176
2176
|
value: e.value,
|
|
2177
2177
|
class: "sr-only peer",
|
|
2178
|
-
onChange:
|
|
2178
|
+
onChange: f
|
|
2179
2179
|
}, null, 40, no),
|
|
2180
2180
|
F("span", {
|
|
2181
2181
|
class: T(a.value),
|
|
@@ -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,11 +2217,11 @@ 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
|
|
2220
|
+
setup(e, { emit: t }) {
|
|
2221
|
+
const n = e, o = t, s = fe("select"), r = `${s}-help`, a = `${s}-error`, d = C(() => {
|
|
2222
2222
|
const c = [];
|
|
2223
|
-
return
|
|
2224
|
-
}), i =
|
|
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
2225
|
const c = [
|
|
2226
2226
|
"block",
|
|
2227
2227
|
"w-full",
|
|
@@ -2245,11 +2245,11 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
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
|
-
},
|
|
2249
|
-
return [...c, l[
|
|
2250
|
-
}),
|
|
2251
|
-
const
|
|
2252
|
-
o("update:modelValue", u && typeof u.value == "number" ? u.value :
|
|
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
2254
|
return (c, l) => (g(), v("div", oo, [
|
|
2255
2255
|
e.label ? (g(), v("label", {
|
|
@@ -2269,9 +2269,9 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2269
2269
|
"aria-describedby": d.value,
|
|
2270
2270
|
"aria-invalid": e.error ? "true" : void 0,
|
|
2271
2271
|
class: T(i.value),
|
|
2272
|
-
onChange:
|
|
2273
|
-
onBlur: l[0] || (l[0] = (
|
|
2274
|
-
onFocus: l[1] || (l[1] = (
|
|
2272
|
+
onChange: f,
|
|
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,
|
|
@@ -2279,11 +2279,11 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2279
2279
|
disabled: "",
|
|
2280
2280
|
selected: !e.modelValue
|
|
2281
2281
|
}, E(e.placeholder), 9, io)) : D("", !0),
|
|
2282
|
-
(g(!0), v(se, null, re(e.options, (
|
|
2283
|
-
key:
|
|
2284
|
-
value:
|
|
2285
|
-
disabled:
|
|
2286
|
-
}, E(
|
|
2282
|
+
(g(!0), v(se, null, re(e.options, (m) => (g(), v("option", {
|
|
2283
|
+
key: m.value,
|
|
2284
|
+
value: m.value,
|
|
2285
|
+
disabled: m.disabled
|
|
2286
|
+
}, E(m.label), 9, co))), 128))
|
|
2287
2287
|
], 42, lo),
|
|
2288
2288
|
F("div", uo, [
|
|
2289
2289
|
_(R(Ge), { class: "w-4 h-4 text-fg-tertiary" })
|
|
@@ -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,55 +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"],
|
|
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 b
|
|
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
|
-
|
|
2360
|
+
function h(b, y) {
|
|
2361
|
+
s("cell:click", b, y);
|
|
2362
|
+
}
|
|
2363
|
+
return t({
|
|
2364
|
+
handleRowClick: u,
|
|
2365
|
+
handleCellClick: h
|
|
2366
|
+
}), (b, y) => (g(), v("div", fo, [
|
|
2358
2367
|
F("table", bo, [
|
|
2359
2368
|
F("thead", {
|
|
2360
2369
|
class: T(e.stickyHeader ? "sticky top-0 z-10" : "")
|
|
2361
2370
|
}, [
|
|
2362
2371
|
F("tr", mo, [
|
|
2363
|
-
(g(!0), v(se, null, re(e.columns, (
|
|
2364
|
-
key:
|
|
2365
|
-
style: he(
|
|
2366
|
-
class: T(
|
|
2367
|
-
"aria-sort":
|
|
2368
|
-
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
|
|
2369
2378
|
}, [
|
|
2370
2379
|
F("div", {
|
|
2371
|
-
class: T(["flex items-center gap-1",
|
|
2380
|
+
class: T(["flex items-center gap-1", c(p.align)])
|
|
2372
2381
|
}, [
|
|
2373
|
-
N(
|
|
2374
|
-
X(E(
|
|
2382
|
+
N(b.$slots, `header-${p.key}`, { column: p }, () => [
|
|
2383
|
+
X(E(p.label), 1)
|
|
2375
2384
|
]),
|
|
2376
|
-
|
|
2377
|
-
e.sortBy ===
|
|
2385
|
+
p.sortable ? (g(), v("span", ho, [
|
|
2386
|
+
e.sortBy === p.key && e.sortOrder === "asc" ? (g(), I(R(Sn), {
|
|
2378
2387
|
key: 0,
|
|
2379
2388
|
class: "w-4 h-4"
|
|
2380
|
-
})) : e.sortBy ===
|
|
2389
|
+
})) : e.sortBy === p.key && e.sortOrder === "desc" ? (g(), I(R(Ge), {
|
|
2381
2390
|
key: 1,
|
|
2382
2391
|
class: "w-4 h-4"
|
|
2383
2392
|
})) : (g(), I(R(zn), {
|
|
@@ -2395,7 +2404,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2395
2404
|
colspan: e.columns.length,
|
|
2396
2405
|
class: "text-center py-12"
|
|
2397
2406
|
}, [
|
|
2398
|
-
N(
|
|
2407
|
+
N(b.$slots, "loading", {}, () => [
|
|
2399
2408
|
_(Jn, { centered: "" })
|
|
2400
2409
|
])
|
|
2401
2410
|
], 8, yo)
|
|
@@ -2404,53 +2413,55 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2404
2413
|
colspan: e.columns.length,
|
|
2405
2414
|
class: "text-center py-12 text-fg-secondary"
|
|
2406
2415
|
}, [
|
|
2407
|
-
N(
|
|
2416
|
+
N(b.$slots, "empty", {}, () => [
|
|
2408
2417
|
X(E(e.emptyText), 1)
|
|
2409
2418
|
])
|
|
2410
2419
|
], 8, wo)
|
|
2411
2420
|
])) : D("", !0),
|
|
2412
|
-
(g(!0), v(se, null, re(e.rows, (
|
|
2413
|
-
key:
|
|
2421
|
+
(g(!0), v(se, null, re(e.rows, (p, k) => (g(), v("tr", {
|
|
2422
|
+
key: k,
|
|
2414
2423
|
class: T([
|
|
2415
2424
|
"border-b border-solid border-y-border-light transition-colors hover:bg-surface-hover-light border-x-border",
|
|
2416
|
-
e.striped &&
|
|
2417
|
-
])
|
|
2425
|
+
e.striped && k % 2 === 1 ? "bg-bg-secondary" : ""
|
|
2426
|
+
]),
|
|
2427
|
+
onClick: (x) => u(p, k)
|
|
2418
2428
|
}, [
|
|
2419
|
-
(g(!0), v(se, null, re(e.columns, (
|
|
2420
|
-
key:
|
|
2421
|
-
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)
|
|
2422
2433
|
}, [
|
|
2423
|
-
N(
|
|
2424
|
-
row:
|
|
2425
|
-
value:
|
|
2426
|
-
index:
|
|
2434
|
+
N(b.$slots, `cell-${x.key}`, {
|
|
2435
|
+
row: p,
|
|
2436
|
+
value: p[x.key],
|
|
2437
|
+
index: k
|
|
2427
2438
|
}, () => [
|
|
2428
|
-
X(E(
|
|
2439
|
+
X(E(p[x.key]), 1)
|
|
2429
2440
|
])
|
|
2430
|
-
],
|
|
2431
|
-
],
|
|
2441
|
+
], 10, Co))), 128))
|
|
2442
|
+
], 10, ko))), 128))
|
|
2432
2443
|
])
|
|
2433
2444
|
]),
|
|
2434
|
-
e.pagination ? (g(), v("div",
|
|
2435
|
-
F("span",
|
|
2436
|
-
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, [
|
|
2437
2448
|
F("button", {
|
|
2438
2449
|
type: "button",
|
|
2439
2450
|
disabled: e.pagination.page <= 1,
|
|
2440
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",
|
|
2441
|
-
onClick:
|
|
2442
|
-
}, 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),
|
|
2443
2454
|
F("button", {
|
|
2444
2455
|
type: "button",
|
|
2445
|
-
disabled: e.pagination.page >=
|
|
2456
|
+
disabled: e.pagination.page >= r.value,
|
|
2446
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",
|
|
2447
|
-
onClick:
|
|
2448
|
-
}, 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)
|
|
2449
2460
|
])
|
|
2450
2461
|
])) : D("", !0)
|
|
2451
2462
|
]));
|
|
2452
2463
|
}
|
|
2453
|
-
}),
|
|
2464
|
+
}), Bo = ["aria-label"], To = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick", "onKeydown"], Ro = ["id", "aria-labelledby", "hidden"], bs = /* @__PURE__ */ S({
|
|
2454
2465
|
__name: "DsTabs",
|
|
2455
2466
|
props: {
|
|
2456
2467
|
modelValue: {},
|
|
@@ -2459,16 +2470,16 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2459
2470
|
ariaLabel: { default: "Tabs" }
|
|
2460
2471
|
},
|
|
2461
2472
|
emits: ["update:modelValue"],
|
|
2462
|
-
setup(e, { emit:
|
|
2463
|
-
const
|
|
2464
|
-
() =>
|
|
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"
|
|
2465
2476
|
);
|
|
2466
|
-
function a(
|
|
2467
|
-
|
|
2477
|
+
function a(f) {
|
|
2478
|
+
f.disabled || o("update:modelValue", f.key);
|
|
2468
2479
|
}
|
|
2469
|
-
function d(
|
|
2470
|
-
const c =
|
|
2471
|
-
return
|
|
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" ? [
|
|
2472
2483
|
l,
|
|
2473
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",
|
|
2474
2485
|
c ? "border-b-brand text-brand" : "border-b-transparent text-fg-secondary hover:text-fg hover:border-b-border-strong"
|
|
@@ -2478,41 +2489,41 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2478
2489
|
c ? "bg-bg text-fg shadow-default" : "bg-transparent text-fg-secondary hover:text-fg"
|
|
2479
2490
|
].join(" ");
|
|
2480
2491
|
}
|
|
2481
|
-
function i(
|
|
2482
|
-
const l =
|
|
2483
|
-
(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
|
|
2484
2495
|
);
|
|
2485
2496
|
let u = -1;
|
|
2486
|
-
switch (
|
|
2497
|
+
switch (f.key) {
|
|
2487
2498
|
case "ArrowRight":
|
|
2488
2499
|
case "ArrowDown":
|
|
2489
|
-
|
|
2500
|
+
f.preventDefault(), u = (m + 1) % l.length;
|
|
2490
2501
|
break;
|
|
2491
2502
|
case "ArrowLeft":
|
|
2492
2503
|
case "ArrowUp":
|
|
2493
|
-
|
|
2504
|
+
f.preventDefault(), u = (m - 1 + l.length) % l.length;
|
|
2494
2505
|
break;
|
|
2495
2506
|
case "Home":
|
|
2496
|
-
|
|
2507
|
+
f.preventDefault(), u = 0;
|
|
2497
2508
|
break;
|
|
2498
2509
|
case "End":
|
|
2499
|
-
|
|
2510
|
+
f.preventDefault(), u = l.length - 1;
|
|
2500
2511
|
break;
|
|
2501
2512
|
default:
|
|
2502
2513
|
return;
|
|
2503
2514
|
}
|
|
2504
|
-
const
|
|
2505
|
-
o("update:modelValue",
|
|
2506
|
-
const
|
|
2507
|
-
|
|
2515
|
+
const h = l[u];
|
|
2516
|
+
o("update:modelValue", h.key);
|
|
2517
|
+
const b = document.getElementById(`${s}-tab-${h.key}`);
|
|
2518
|
+
b == null || b.focus();
|
|
2508
2519
|
}
|
|
2509
|
-
return (
|
|
2520
|
+
return (f, c) => (g(), v("div", null, [
|
|
2510
2521
|
F("div", {
|
|
2511
2522
|
class: T(r.value),
|
|
2512
2523
|
role: "tablist",
|
|
2513
2524
|
"aria-label": e.ariaLabel
|
|
2514
2525
|
}, [
|
|
2515
|
-
(g(!0), v(se, null, re(e.tabs, (l,
|
|
2526
|
+
(g(!0), v(se, null, re(e.tabs, (l, m) => (g(), v("button", {
|
|
2516
2527
|
key: l.key,
|
|
2517
2528
|
id: `${R(s)}-tab-${l.key}`,
|
|
2518
2529
|
role: "tab",
|
|
@@ -2523,9 +2534,9 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2523
2534
|
disabled: l.disabled,
|
|
2524
2535
|
class: T(d(l)),
|
|
2525
2536
|
onClick: (u) => a(l),
|
|
2526
|
-
onKeydown: (u) => i(u,
|
|
2527
|
-
}, E(l.label), 43,
|
|
2528
|
-
], 10,
|
|
2537
|
+
onKeydown: (u) => i(u, m)
|
|
2538
|
+
}, E(l.label), 43, To))), 128))
|
|
2539
|
+
], 10, Bo),
|
|
2529
2540
|
(g(!0), v(se, null, re(e.tabs, (l) => (g(), v("div", {
|
|
2530
2541
|
key: l.key,
|
|
2531
2542
|
id: `${R(s)}-panel-${l.key}`,
|
|
@@ -2534,21 +2545,21 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2534
2545
|
hidden: e.modelValue !== l.key,
|
|
2535
2546
|
tabindex: 0
|
|
2536
2547
|
}, [
|
|
2537
|
-
e.modelValue === l.key ? N(
|
|
2538
|
-
], 8,
|
|
2548
|
+
e.modelValue === l.key ? N(f.$slots, l.key, { key: 0 }) : D("", !0)
|
|
2549
|
+
], 8, Ro))), 128))
|
|
2539
2550
|
]));
|
|
2540
2551
|
}
|
|
2541
|
-
}),
|
|
2552
|
+
}), Lo = { class: "w-full" }, Oo = ["for"], Vo = {
|
|
2542
2553
|
key: 0,
|
|
2543
2554
|
class: "text-error ml-1",
|
|
2544
2555
|
"aria-hidden": "true"
|
|
2545
|
-
},
|
|
2556
|
+
}, So = { class: "relative" }, zo = ["id", "value", "placeholder", "disabled", "readonly", "required", "rows", "maxlength", "aria-describedby", "aria-invalid"], Mo = {
|
|
2546
2557
|
key: 1,
|
|
2547
2558
|
class: "flex justify-between mt-1"
|
|
2548
|
-
},
|
|
2559
|
+
}, jo = {
|
|
2549
2560
|
key: 2,
|
|
2550
2561
|
class: "text-caption ml-auto"
|
|
2551
|
-
},
|
|
2562
|
+
}, ms = /* @__PURE__ */ S({
|
|
2552
2563
|
__name: "DsTextarea",
|
|
2553
2564
|
props: {
|
|
2554
2565
|
modelValue: {},
|
|
@@ -2564,12 +2575,12 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2564
2575
|
maxLength: {}
|
|
2565
2576
|
},
|
|
2566
2577
|
emits: ["update:modelValue", "blur", "focus"],
|
|
2567
|
-
setup(e, { expose:
|
|
2568
|
-
const o = e, s =
|
|
2569
|
-
const
|
|
2570
|
-
return o.helpText && !o.error &&
|
|
2571
|
-
}), c =
|
|
2572
|
-
const
|
|
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(() => {
|
|
2580
|
+
const b = [];
|
|
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(() => {
|
|
2583
|
+
const b = [
|
|
2573
2584
|
"block",
|
|
2574
2585
|
"w-full",
|
|
2575
2586
|
"rounded-md",
|
|
@@ -2592,30 +2603,30 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2592
2603
|
small: "px-2 py-1 text-sm",
|
|
2593
2604
|
medium: "px-3 py-2 text-base",
|
|
2594
2605
|
large: "px-4 py-3 text-lg"
|
|
2595
|
-
},
|
|
2596
|
-
return [...
|
|
2597
|
-
}),
|
|
2598
|
-
const y =
|
|
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(" ");
|
|
2608
|
+
}), m = (b) => {
|
|
2609
|
+
const y = b.target;
|
|
2599
2610
|
s("update:modelValue", y.value);
|
|
2600
2611
|
};
|
|
2601
2612
|
function u() {
|
|
2602
|
-
var
|
|
2603
|
-
(
|
|
2613
|
+
var b;
|
|
2614
|
+
(b = r.value) == null || b.focus();
|
|
2604
2615
|
}
|
|
2605
|
-
function
|
|
2606
|
-
var
|
|
2607
|
-
(
|
|
2616
|
+
function h() {
|
|
2617
|
+
var b;
|
|
2618
|
+
(b = r.value) == null || b.blur();
|
|
2608
2619
|
}
|
|
2609
|
-
return
|
|
2620
|
+
return t({ focus: u, blur: h, textareaRef: r }), (b, y) => (g(), v("div", Lo, [
|
|
2610
2621
|
e.label ? (g(), v("label", {
|
|
2611
2622
|
key: 0,
|
|
2612
2623
|
for: R(a),
|
|
2613
2624
|
class: "block text-label mb-1"
|
|
2614
2625
|
}, [
|
|
2615
2626
|
X(E(e.label) + " ", 1),
|
|
2616
|
-
e.required ? (g(), v("span",
|
|
2617
|
-
], 8,
|
|
2618
|
-
F("div",
|
|
2627
|
+
e.required ? (g(), v("span", Vo, "*")) : D("", !0)
|
|
2628
|
+
], 8, Oo)) : D("", !0),
|
|
2629
|
+
F("div", So, [
|
|
2619
2630
|
F("textarea", {
|
|
2620
2631
|
ref_key: "textareaRef",
|
|
2621
2632
|
ref: r,
|
|
@@ -2627,15 +2638,15 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2627
2638
|
required: e.required,
|
|
2628
2639
|
rows: e.rows,
|
|
2629
2640
|
maxlength: e.maxLength,
|
|
2630
|
-
"aria-describedby":
|
|
2641
|
+
"aria-describedby": f.value,
|
|
2631
2642
|
"aria-invalid": e.error ? "true" : void 0,
|
|
2632
2643
|
class: T(l.value),
|
|
2633
|
-
onInput:
|
|
2634
|
-
onBlur: y[0] || (y[0] = (
|
|
2635
|
-
onFocus: y[1] || (y[1] = (
|
|
2636
|
-
}, null, 42,
|
|
2644
|
+
onInput: m,
|
|
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)
|
|
2637
2648
|
]),
|
|
2638
|
-
e.helpText || e.error || e.maxLength ? (g(), v("div",
|
|
2649
|
+
e.helpText || e.error || e.maxLength ? (g(), v("div", Mo, [
|
|
2639
2650
|
e.helpText && !e.error ? (g(), v("div", {
|
|
2640
2651
|
key: 0,
|
|
2641
2652
|
id: d,
|
|
@@ -2648,44 +2659,44 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2648
2659
|
role: "alert",
|
|
2649
2660
|
"aria-live": "polite"
|
|
2650
2661
|
}, E(e.error), 1)) : D("", !0),
|
|
2651
|
-
e.maxLength ? (g(), v("div",
|
|
2662
|
+
e.maxLength ? (g(), v("div", jo, E(c.value) + " / " + E(e.maxLength), 1)) : D("", !0)
|
|
2652
2663
|
])) : D("", !0)
|
|
2653
2664
|
]));
|
|
2654
2665
|
}
|
|
2655
|
-
}),
|
|
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({
|
|
2656
2667
|
__name: "DsUnderConstruction",
|
|
2657
2668
|
props: {
|
|
2658
2669
|
title: { default: "Under Construction" },
|
|
2659
2670
|
description: { default: "This page is under construction. Please check back later." }
|
|
2660
2671
|
},
|
|
2661
2672
|
setup(e) {
|
|
2662
|
-
return (
|
|
2673
|
+
return (t, n) => (g(), v("div", Po, [
|
|
2663
2674
|
_(R(wt), { class: "w-10 h-10 text-fg-secondary" }),
|
|
2664
|
-
F("h2",
|
|
2665
|
-
F("p",
|
|
2675
|
+
F("h2", Io, E(e.title), 1),
|
|
2676
|
+
F("p", No, E(e.description), 1)
|
|
2666
2677
|
]));
|
|
2667
2678
|
}
|
|
2668
|
-
}),
|
|
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 = {
|
|
2669
2680
|
key: 0,
|
|
2670
2681
|
class: "text-label m-0"
|
|
2671
|
-
},
|
|
2682
|
+
}, Uo = /* @__PURE__ */ S({
|
|
2672
2683
|
__name: "DsToast",
|
|
2673
2684
|
props: {
|
|
2674
2685
|
toast: {}
|
|
2675
2686
|
},
|
|
2676
2687
|
emits: ["dismiss"],
|
|
2677
|
-
setup(e, { emit:
|
|
2678
|
-
const
|
|
2679
|
-
let s = null, r =
|
|
2688
|
+
setup(e, { emit: t }) {
|
|
2689
|
+
const n = e, o = t;
|
|
2690
|
+
let s = null, r = n.toast.duration, a = 0;
|
|
2680
2691
|
function d() {
|
|
2681
2692
|
r <= 0 || (a = Date.now(), s = setTimeout(() => {
|
|
2682
|
-
o("dismiss",
|
|
2693
|
+
o("dismiss", n.toast.id);
|
|
2683
2694
|
}, r));
|
|
2684
2695
|
}
|
|
2685
2696
|
function i() {
|
|
2686
2697
|
s && (clearTimeout(s), s = null, r -= Date.now() - a);
|
|
2687
2698
|
}
|
|
2688
|
-
function
|
|
2699
|
+
function f() {
|
|
2689
2700
|
d();
|
|
2690
2701
|
}
|
|
2691
2702
|
const c = {
|
|
@@ -2694,29 +2705,29 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2694
2705
|
success: "border-l-success",
|
|
2695
2706
|
warning: "border-l-warning",
|
|
2696
2707
|
info: "border-l-info"
|
|
2697
|
-
}, l =
|
|
2708
|
+
}, l = C(() => [
|
|
2698
2709
|
"flex items-start gap-3 w-80 p-4 bg-bg border border-solid border-border rounded-lg shadow-lg",
|
|
2699
2710
|
"border-l-4",
|
|
2700
|
-
c[
|
|
2701
|
-
].join(" ")),
|
|
2711
|
+
c[n.toast.variant] || "border-l-brand"
|
|
2712
|
+
].join(" ")), m = {
|
|
2702
2713
|
brand: "text-brand",
|
|
2703
2714
|
error: "text-error",
|
|
2704
2715
|
success: "text-success",
|
|
2705
2716
|
warning: "text-warning",
|
|
2706
2717
|
info: "text-info"
|
|
2707
|
-
}, u =
|
|
2718
|
+
}, u = C(() => ["shrink-0 mt-0.5", m[n.toast.variant] || "text-brand"].join(" "));
|
|
2708
2719
|
return Et(() => {
|
|
2709
|
-
|
|
2720
|
+
n.toast.duration > 0 && d();
|
|
2710
2721
|
}), rt(() => {
|
|
2711
2722
|
s && clearTimeout(s);
|
|
2712
|
-
}), (
|
|
2723
|
+
}), (h, b) => (g(), v("div", {
|
|
2713
2724
|
class: T(l.value),
|
|
2714
2725
|
role: e.toast.variant === "error" ? "alert" : "status",
|
|
2715
2726
|
"aria-live": e.toast.variant === "error" ? "assertive" : "polite",
|
|
2716
2727
|
onMouseenter: i,
|
|
2717
|
-
onMouseleave:
|
|
2728
|
+
onMouseleave: f
|
|
2718
2729
|
}, [
|
|
2719
|
-
F("div",
|
|
2730
|
+
F("div", Ho, [
|
|
2720
2731
|
F("span", {
|
|
2721
2732
|
class: T(u.value),
|
|
2722
2733
|
"aria-hidden": "true"
|
|
@@ -2735,8 +2746,8 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2735
2746
|
class: "w-5 h-5"
|
|
2736
2747
|
}))
|
|
2737
2748
|
], 2),
|
|
2738
|
-
F("div",
|
|
2739
|
-
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),
|
|
2740
2751
|
F("p", {
|
|
2741
2752
|
class: T(["text-body-sm m-0", e.toast.title ? "mt-0.5" : ""])
|
|
2742
2753
|
}, E(e.toast.message), 3)
|
|
@@ -2747,50 +2758,50 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2747
2758
|
type: "button",
|
|
2748
2759
|
class: "p-1 rounded-md text-fg-tertiary hover:text-fg transition-colors shrink-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand",
|
|
2749
2760
|
"aria-label": "Dismiss notification",
|
|
2750
|
-
onClick:
|
|
2761
|
+
onClick: b[0] || (b[0] = (y) => h.$emit("dismiss", e.toast.id))
|
|
2751
2762
|
}, [
|
|
2752
2763
|
_(R(Be), { class: "w-4 h-4" })
|
|
2753
2764
|
])) : D("", !0)
|
|
2754
|
-
], 42,
|
|
2765
|
+
], 42, Wo));
|
|
2755
2766
|
}
|
|
2756
2767
|
});
|
|
2757
|
-
let
|
|
2768
|
+
let Xo = 0;
|
|
2758
2769
|
const Te = j([]);
|
|
2759
|
-
function xe(e,
|
|
2760
|
-
const o = ++
|
|
2770
|
+
function xe(e, t, n) {
|
|
2771
|
+
const o = ++Xo, s = {
|
|
2761
2772
|
id: o,
|
|
2762
2773
|
variant: e,
|
|
2763
|
-
message:
|
|
2764
|
-
title:
|
|
2765
|
-
duration: (
|
|
2766
|
-
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
|
|
2767
2778
|
};
|
|
2768
2779
|
return Te.value.push(s), o;
|
|
2769
2780
|
}
|
|
2770
|
-
function
|
|
2771
|
-
const
|
|
2772
|
-
|
|
2781
|
+
function Yo(e) {
|
|
2782
|
+
const t = Te.value.findIndex((n) => n.id === e);
|
|
2783
|
+
t !== -1 && Te.value.splice(t, 1);
|
|
2773
2784
|
}
|
|
2774
|
-
function
|
|
2785
|
+
function Go() {
|
|
2775
2786
|
return {
|
|
2776
2787
|
toasts: Te,
|
|
2777
|
-
removeToast:
|
|
2778
|
-
success: (e,
|
|
2779
|
-
error: (e,
|
|
2780
|
-
warning: (e,
|
|
2781
|
-
info: (e,
|
|
2782
|
-
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)
|
|
2783
2794
|
};
|
|
2784
2795
|
}
|
|
2785
|
-
const
|
|
2796
|
+
const Jo = {
|
|
2786
2797
|
class: "fixed top-4 right-4 z-50 flex flex-col gap-3",
|
|
2787
2798
|
"aria-label": "Notifications"
|
|
2788
|
-
},
|
|
2799
|
+
}, hs = /* @__PURE__ */ S({
|
|
2789
2800
|
__name: "DsToastContainer",
|
|
2790
2801
|
setup(e) {
|
|
2791
|
-
const { toasts:
|
|
2802
|
+
const { toasts: t, removeToast: n } = Go();
|
|
2792
2803
|
return (o, s) => (g(), I(Le, { to: "body" }, [
|
|
2793
|
-
F("div",
|
|
2804
|
+
F("div", Jo, [
|
|
2794
2805
|
_(At, {
|
|
2795
2806
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
2796
2807
|
"enter-from-class": "opacity-0 translate-x-8",
|
|
@@ -2800,10 +2811,10 @@ const Yo = {
|
|
|
2800
2811
|
"leave-to-class": "opacity-0 translate-x-8"
|
|
2801
2812
|
}, {
|
|
2802
2813
|
default: Re(() => [
|
|
2803
|
-
(g(!0), v(se, null, re(R(
|
|
2814
|
+
(g(!0), v(se, null, re(R(t), (r) => (g(), I(Uo, {
|
|
2804
2815
|
key: r.id,
|
|
2805
2816
|
toast: r,
|
|
2806
|
-
onDismiss: R(
|
|
2817
|
+
onDismiss: R(n)
|
|
2807
2818
|
}, null, 8, ["toast", "onDismiss"]))), 128))
|
|
2808
2819
|
]),
|
|
2809
2820
|
_: 1
|
|
@@ -2811,7 +2822,7 @@ const Yo = {
|
|
|
2811
2822
|
])
|
|
2812
2823
|
]));
|
|
2813
2824
|
}
|
|
2814
|
-
}),
|
|
2825
|
+
}), Qo = ["aria-describedby"], Zo = ["id"], vs = /* @__PURE__ */ S({
|
|
2815
2826
|
__name: "DsTooltip",
|
|
2816
2827
|
props: {
|
|
2817
2828
|
content: {},
|
|
@@ -2819,39 +2830,39 @@ const Yo = {
|
|
|
2819
2830
|
disabled: { type: Boolean, default: !1 }
|
|
2820
2831
|
},
|
|
2821
2832
|
setup(e) {
|
|
2822
|
-
const
|
|
2823
|
-
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),
|
|
2824
2835
|
middleware: [ht(8), pt(), vt({ padding: 8 }), Ln({ element: a })]
|
|
2825
|
-
}), c =
|
|
2836
|
+
}), c = C(() => {
|
|
2826
2837
|
const u = i.value.arrow;
|
|
2827
2838
|
if (!u) return {};
|
|
2828
|
-
const
|
|
2839
|
+
const h = f.value.split("-")[0], b = { top: "bottom", right: "left", bottom: "top", left: "right" }[h];
|
|
2829
2840
|
return {
|
|
2830
2841
|
left: u.x != null ? `${u.x}px` : "",
|
|
2831
2842
|
top: u.y != null ? `${u.y}px` : "",
|
|
2832
|
-
[
|
|
2843
|
+
[b]: "-4px"
|
|
2833
2844
|
};
|
|
2834
2845
|
});
|
|
2835
2846
|
function l() {
|
|
2836
|
-
|
|
2847
|
+
t.disabled || (o.value = !0);
|
|
2837
2848
|
}
|
|
2838
|
-
function
|
|
2849
|
+
function m() {
|
|
2839
2850
|
o.value = !1;
|
|
2840
2851
|
}
|
|
2841
|
-
return (u,
|
|
2852
|
+
return (u, h) => (g(), v("div", {
|
|
2842
2853
|
class: "inline-flex",
|
|
2843
2854
|
onMouseenter: l,
|
|
2844
|
-
onMouseleave:
|
|
2855
|
+
onMouseleave: m,
|
|
2845
2856
|
onFocusin: l,
|
|
2846
|
-
onFocusout:
|
|
2857
|
+
onFocusout: m
|
|
2847
2858
|
}, [
|
|
2848
2859
|
F("div", {
|
|
2849
2860
|
ref_key: "referenceRef",
|
|
2850
2861
|
ref: s,
|
|
2851
|
-
"aria-describedby": o.value ? R(
|
|
2862
|
+
"aria-describedby": o.value ? R(n) : void 0
|
|
2852
2863
|
}, [
|
|
2853
2864
|
N(u.$slots, "default")
|
|
2854
|
-
], 8,
|
|
2865
|
+
], 8, Qo),
|
|
2855
2866
|
(g(), I(Le, { to: "body" }, [
|
|
2856
2867
|
_(at, {
|
|
2857
2868
|
"enter-active-class": "transition-opacity duration-150",
|
|
@@ -2864,7 +2875,7 @@ const Yo = {
|
|
|
2864
2875
|
default: Re(() => [
|
|
2865
2876
|
o.value && !e.disabled ? (g(), v("div", {
|
|
2866
2877
|
key: 0,
|
|
2867
|
-
id: R(
|
|
2878
|
+
id: R(n),
|
|
2868
2879
|
ref_key: "floatingRef",
|
|
2869
2880
|
ref: r,
|
|
2870
2881
|
role: "tooltip",
|
|
@@ -2878,14 +2889,14 @@ const Yo = {
|
|
|
2878
2889
|
style: he(c.value),
|
|
2879
2890
|
class: "absolute w-2 h-2 bg-bg-inverse rotate-45"
|
|
2880
2891
|
}, null, 4)
|
|
2881
|
-
], 12,
|
|
2892
|
+
], 12, Zo)) : D("", !0)
|
|
2882
2893
|
]),
|
|
2883
2894
|
_: 1
|
|
2884
2895
|
})
|
|
2885
2896
|
]))
|
|
2886
2897
|
], 32));
|
|
2887
2898
|
}
|
|
2888
|
-
}),
|
|
2899
|
+
}), _o = {
|
|
2889
2900
|
// Core UI
|
|
2890
2901
|
bg: "#FFFFFF",
|
|
2891
2902
|
"bg-secondary": "#F8FAFC",
|
|
@@ -2993,7 +3004,7 @@ const Yo = {
|
|
|
2993
3004
|
"transcript-highlight": "#FEF3C7",
|
|
2994
3005
|
"transcript-speaker": "#EDE9FE",
|
|
2995
3006
|
"transcript-timestamp": "#F3F4F6"
|
|
2996
|
-
},
|
|
3007
|
+
}, es = {
|
|
2997
3008
|
"space-1": "4px",
|
|
2998
3009
|
"space-2": "8px",
|
|
2999
3010
|
"space-3": "12px",
|
|
@@ -3002,52 +3013,52 @@ const Yo = {
|
|
|
3002
3013
|
"space-6": "32px",
|
|
3003
3014
|
"space-7": "48px",
|
|
3004
3015
|
"space-8": "64px"
|
|
3005
|
-
},
|
|
3016
|
+
}, ts = {
|
|
3006
3017
|
"radius-sm": "4px",
|
|
3007
3018
|
"radius-md": "6px",
|
|
3008
3019
|
"radius-lg": "8px",
|
|
3009
3020
|
"radius-xl": "12px",
|
|
3010
3021
|
"radius-full": "9999px"
|
|
3011
|
-
},
|
|
3022
|
+
}, ns = {
|
|
3012
3023
|
"shadow-sm": "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
3013
3024
|
"shadow-md": "0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 4px 6px -1px rgba(0, 0, 0, 0.1)",
|
|
3014
3025
|
"shadow-lg": "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"
|
|
3015
|
-
},
|
|
3016
|
-
function
|
|
3026
|
+
}, ps = { ..._o, ...es, ...ts, ...ns };
|
|
3027
|
+
function ys(e) {
|
|
3017
3028
|
return `--ds-${e}`;
|
|
3018
3029
|
}
|
|
3019
|
-
function
|
|
3020
|
-
const
|
|
3030
|
+
function xs(e, t = ":root") {
|
|
3031
|
+
const n = Object.entries(e).map(([o, s]) => ` --ds-${o}: ${s};`).join(`
|
|
3021
3032
|
`);
|
|
3022
|
-
return `${
|
|
3023
|
-
${
|
|
3033
|
+
return `${t} {
|
|
3034
|
+
${n}
|
|
3024
3035
|
}`;
|
|
3025
3036
|
}
|
|
3026
3037
|
export {
|
|
3027
|
-
|
|
3028
|
-
|
|
3038
|
+
ss as DsAvatar,
|
|
3039
|
+
rs as DsBadge,
|
|
3029
3040
|
Ot as DsButton,
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3041
|
+
as as DsCheckbox,
|
|
3042
|
+
ls as DsDropdownSelect,
|
|
3043
|
+
is as DsInput,
|
|
3033
3044
|
Jn as DsLoadingSpinner,
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
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,
|
|
3051
3062
|
fe as useId,
|
|
3052
|
-
|
|
3063
|
+
Go as useToast
|
|
3053
3064
|
};
|