@leodamours/ds-components 0.3.0 → 0.3.1
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/README.md +492 -49
- package/dist/components/DsSwitch.vue.d.ts +57 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1499 -1646
- package/dist/palette-DkSoRw54.js +250 -0
- package/dist/style.css +1 -0
- package/dist/styles/ds-preset.d.ts +22 -0
- package/dist/uno.d.ts +2 -0
- package/dist/uno.js +183 -0
- package/package.json +12 -2
- package/dist/index.css +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as z, ref as j, watch as he, computed as w, openBlock as g, createElementBlock as h, normalizeClass as R, toDisplayString as L, createCommentVNode as V, renderSlot as P, createTextVNode as K, createBlock as N, resolveDynamicComponent as Te, normalizeStyle as le, createElementVNode as k, shallowRef as Tt, getCurrentScope as Vt, onScopeDispose as Rt, shallowReadonly as me, unref as B, mergeProps as fe, createVNode as ee, withCtx as Ae, Teleport as Oe, withModifiers as Lt, Fragment as re, renderList as ae, nextTick as ke, onMounted as ot, withKeys as rt, onBeforeUnmount as at, Transition as lt, TransitionGroup as St } from "vue";
|
|
2
|
+
import { a as Mo, c as jo, e as Po, g as Io, b as Fo, d as No, h as Wo, f as Ho, r as qo, s as Ko, i as Uo, t as Xo } from "./palette-DkSoRw54.js";
|
|
3
|
+
const Bt = ["aria-label"], At = ["src", "alt"], ho = /* @__PURE__ */ z({
|
|
3
4
|
__name: "DsAvatar",
|
|
4
5
|
props: {
|
|
5
6
|
src: {},
|
|
@@ -9,11 +10,11 @@ const Rt = ["aria-label"], Lt = ["src", "alt"], Es = /* @__PURE__ */ S({
|
|
|
9
10
|
variant: { default: "brand" }
|
|
10
11
|
},
|
|
11
12
|
setup(e) {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const n = e, t = j(!1);
|
|
14
|
+
he(() => n.src, () => {
|
|
15
|
+
t.value = !1;
|
|
15
16
|
});
|
|
16
|
-
const
|
|
17
|
+
const s = w(() => n.name ? n.name.split(" ").map((a) => a[0]).slice(0, 2).join("").toUpperCase() : "?"), o = w(() => [
|
|
17
18
|
"inline-flex",
|
|
18
19
|
"items-center",
|
|
19
20
|
"justify-center",
|
|
@@ -25,7 +26,7 @@ const Rt = ["aria-label"], Lt = ["src", "alt"], Es = /* @__PURE__ */ S({
|
|
|
25
26
|
md: "w-8 h-8 text-sm",
|
|
26
27
|
lg: "w-10 h-10 text-base",
|
|
27
28
|
xl: "w-12 h-12 text-lg"
|
|
28
|
-
}[
|
|
29
|
+
}[n.size]
|
|
29
30
|
].join(" ")), r = w(() => [
|
|
30
31
|
"w-full",
|
|
31
32
|
"h-full",
|
|
@@ -37,27 +38,27 @@ const Rt = ["aria-label"], Lt = ["src", "alt"], Es = /* @__PURE__ */ S({
|
|
|
37
38
|
{
|
|
38
39
|
brand: "bg-brand-soft text-brand-on-soft",
|
|
39
40
|
neutral: "bg-neutral-soft text-neutral-on-soft"
|
|
40
|
-
}[
|
|
41
|
+
}[n.variant]
|
|
41
42
|
].join(" "));
|
|
42
|
-
return (a,
|
|
43
|
-
class:
|
|
43
|
+
return (a, i) => (g(), h("span", {
|
|
44
|
+
class: R(o.value),
|
|
44
45
|
role: "img",
|
|
45
46
|
"aria-label": e.alt || e.name
|
|
46
47
|
}, [
|
|
47
|
-
e.src && !
|
|
48
|
+
e.src && !t.value ? (g(), h("img", {
|
|
48
49
|
key: 0,
|
|
49
50
|
src: e.src,
|
|
50
51
|
alt: e.alt || e.name || "",
|
|
51
52
|
class: "w-full h-full object-cover rounded-full",
|
|
52
|
-
onError:
|
|
53
|
-
}, null, 40,
|
|
53
|
+
onError: i[0] || (i[0] = (c) => t.value = !0)
|
|
54
|
+
}, null, 40, At)) : (g(), h("span", {
|
|
54
55
|
key: 1,
|
|
55
|
-
class:
|
|
56
|
+
class: R(r.value),
|
|
56
57
|
"aria-hidden": "true"
|
|
57
|
-
},
|
|
58
|
-
], 10,
|
|
58
|
+
}, L(s.value), 3))
|
|
59
|
+
], 10, Bt));
|
|
59
60
|
}
|
|
60
|
-
}),
|
|
61
|
+
}), vo = /* @__PURE__ */ z({
|
|
61
62
|
__name: "DsBadge",
|
|
62
63
|
props: {
|
|
63
64
|
label: {},
|
|
@@ -66,14 +67,14 @@ const Rt = ["aria-label"], Lt = ["src", "alt"], Es = /* @__PURE__ */ S({
|
|
|
66
67
|
dot: { type: Boolean, default: !1 }
|
|
67
68
|
},
|
|
68
69
|
setup(e) {
|
|
69
|
-
const
|
|
70
|
-
const
|
|
70
|
+
const n = e, t = w(() => {
|
|
71
|
+
const o = [
|
|
71
72
|
"inline-flex",
|
|
72
73
|
"items-center",
|
|
73
74
|
"font-medium",
|
|
74
75
|
"rounded-full",
|
|
75
76
|
"whitespace-nowrap"
|
|
76
|
-
], r =
|
|
77
|
+
], r = n.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
78
|
brand: "bg-brand-soft text-brand-on-soft",
|
|
78
79
|
neutral: "bg-neutral-soft text-neutral-on-soft",
|
|
79
80
|
error: "bg-error-soft text-error-on-soft",
|
|
@@ -83,12 +84,12 @@ const Rt = ["aria-label"], Lt = ["src", "alt"], Es = /* @__PURE__ */ S({
|
|
|
83
84
|
processing: "bg-processing-soft text-processing-on-soft"
|
|
84
85
|
};
|
|
85
86
|
return [
|
|
86
|
-
...
|
|
87
|
-
r[
|
|
88
|
-
a[
|
|
87
|
+
...o,
|
|
88
|
+
r[n.size],
|
|
89
|
+
a[n.variant]
|
|
89
90
|
].join(" ");
|
|
90
|
-
}),
|
|
91
|
-
const
|
|
91
|
+
}), s = w(() => {
|
|
92
|
+
const o = { sm: "w-1.5 h-1.5", md: "w-2 h-2", lg: "w-2.5 h-2.5" }, r = {
|
|
92
93
|
brand: "bg-brand",
|
|
93
94
|
neutral: "bg-neutral",
|
|
94
95
|
error: "bg-error",
|
|
@@ -97,22 +98,22 @@ const Rt = ["aria-label"], Lt = ["src", "alt"], Es = /* @__PURE__ */ S({
|
|
|
97
98
|
info: "bg-info",
|
|
98
99
|
processing: "bg-processing"
|
|
99
100
|
};
|
|
100
|
-
return ["inline-block", "rounded-full",
|
|
101
|
+
return ["inline-block", "rounded-full", o[n.size], r[n.variant]].join(" ");
|
|
101
102
|
});
|
|
102
|
-
return (
|
|
103
|
-
class:
|
|
103
|
+
return (o, r) => (g(), h("span", {
|
|
104
|
+
class: R(t.value)
|
|
104
105
|
}, [
|
|
105
106
|
e.dot ? (g(), h("span", {
|
|
106
107
|
key: 0,
|
|
107
|
-
class:
|
|
108
|
+
class: R(s.value),
|
|
108
109
|
"aria-hidden": "true"
|
|
109
|
-
}, null, 2)) :
|
|
110
|
-
e.dot ?
|
|
111
|
-
|
|
110
|
+
}, null, 2)) : V("", !0),
|
|
111
|
+
e.dot ? V("", !0) : P(o.$slots, "default", { key: 1 }, () => [
|
|
112
|
+
K(L(e.label), 1)
|
|
112
113
|
])
|
|
113
114
|
], 2));
|
|
114
115
|
}
|
|
115
|
-
}),
|
|
116
|
+
}), Ot = ["type", "disabled", "aria-label", "aria-busy"], zt = { key: 1 }, it = /* @__PURE__ */ z({
|
|
116
117
|
__name: "DsButton",
|
|
117
118
|
props: {
|
|
118
119
|
label: {},
|
|
@@ -128,8 +129,8 @@ const Rt = ["aria-label"], Lt = ["src", "alt"], Es = /* @__PURE__ */ S({
|
|
|
128
129
|
},
|
|
129
130
|
emits: ["click"],
|
|
130
131
|
setup(e) {
|
|
131
|
-
const
|
|
132
|
-
const
|
|
132
|
+
const n = e, t = w(() => {
|
|
133
|
+
const o = [
|
|
133
134
|
"inline-flex",
|
|
134
135
|
"items-center",
|
|
135
136
|
"justify-center",
|
|
@@ -205,76 +206,76 @@ const Rt = ["aria-label"], Lt = ["src", "alt"], Es = /* @__PURE__ */ S({
|
|
|
205
206
|
"hover:bg-warning-hover",
|
|
206
207
|
"active:bg-warning-active"
|
|
207
208
|
]
|
|
208
|
-
},
|
|
209
|
+
}, i = n.fullWidth ? ["w-full"] : [];
|
|
209
210
|
return [
|
|
210
|
-
...
|
|
211
|
-
...r[
|
|
212
|
-
...a[
|
|
213
|
-
...
|
|
211
|
+
...o,
|
|
212
|
+
...r[n.size],
|
|
213
|
+
...a[n.variant],
|
|
214
|
+
...i
|
|
214
215
|
].join(" ");
|
|
215
|
-
}),
|
|
216
|
+
}), s = w(() => ({
|
|
216
217
|
small: "w-3 h-3",
|
|
217
218
|
medium: "w-4 h-4",
|
|
218
219
|
large: "w-5 h-5"
|
|
219
|
-
})[
|
|
220
|
-
return (
|
|
220
|
+
})[n.size]);
|
|
221
|
+
return (o, r) => (g(), h("button", {
|
|
221
222
|
type: e.htmlType,
|
|
222
223
|
disabled: e.disabled || e.loading,
|
|
223
224
|
"aria-label": e.ariaLabel,
|
|
224
225
|
"aria-busy": e.loading ? "true" : void 0,
|
|
225
|
-
class:
|
|
226
|
-
onClick: r[0] || (r[0] = (a) =>
|
|
226
|
+
class: R(t.value),
|
|
227
|
+
onClick: r[0] || (r[0] = (a) => o.$emit("click", a))
|
|
227
228
|
}, [
|
|
228
|
-
e.iconLeft ? (g(), N(
|
|
229
|
+
e.iconLeft ? (g(), N(Te(e.iconLeft), {
|
|
229
230
|
key: 0,
|
|
230
|
-
class:
|
|
231
|
-
style: le(e.label ||
|
|
231
|
+
class: R(s.value),
|
|
232
|
+
style: le(e.label || o.$slots.default ? "margin-right: 0.375rem" : ""),
|
|
232
233
|
"aria-hidden": "true"
|
|
233
|
-
}, null, 8, ["class", "style"])) :
|
|
234
|
-
e.label ? (g(), h("span",
|
|
235
|
-
e.iconRight ? (g(), N(
|
|
234
|
+
}, null, 8, ["class", "style"])) : V("", !0),
|
|
235
|
+
e.label ? (g(), h("span", zt, L(e.label), 1)) : P(o.$slots, "default", { key: 2 }),
|
|
236
|
+
e.iconRight ? (g(), N(Te(e.iconRight), {
|
|
236
237
|
key: 3,
|
|
237
|
-
class:
|
|
238
|
-
style: le(e.label ||
|
|
238
|
+
class: R(s.value),
|
|
239
|
+
style: le(e.label || o.$slots.default ? "margin-left: 0.375rem" : ""),
|
|
239
240
|
"aria-hidden": "true"
|
|
240
|
-
}, null, 8, ["class", "style"])) :
|
|
241
|
-
], 10,
|
|
241
|
+
}, null, 8, ["class", "style"])) : V("", !0)
|
|
242
|
+
], 10, Ot));
|
|
242
243
|
}
|
|
243
|
-
}),
|
|
244
|
+
}), Et = {
|
|
244
245
|
key: 0,
|
|
245
246
|
class: "px-4 py-3 border-b border-b-solid border-border"
|
|
246
247
|
}, Mt = {
|
|
247
248
|
key: 1,
|
|
248
249
|
class: "px-4 py-3 border-t border-t-solid border-border"
|
|
249
|
-
},
|
|
250
|
+
}, po = /* @__PURE__ */ z({
|
|
250
251
|
__name: "DsCard",
|
|
251
252
|
props: {
|
|
252
253
|
variant: { default: "default" },
|
|
253
254
|
noPadding: { type: Boolean, default: !1 }
|
|
254
255
|
},
|
|
255
256
|
setup(e) {
|
|
256
|
-
const
|
|
257
|
-
const
|
|
257
|
+
const n = e, t = w(() => {
|
|
258
|
+
const o = ["rounded-lg", "bg-bg", "overflow-hidden"], r = {
|
|
258
259
|
default: ["border", "border-solid", "border-border-strong", "legacy-card-box-shadow"],
|
|
259
260
|
outlined: ["border", "border-solid", "border-border-strong"],
|
|
260
261
|
elevated: ["shadow-default"]
|
|
261
262
|
};
|
|
262
|
-
return [...
|
|
263
|
-
}),
|
|
264
|
-
return (
|
|
265
|
-
class:
|
|
263
|
+
return [...o, ...r[n.variant]].join(" ");
|
|
264
|
+
}), s = w(() => n.noPadding ? "" : "px-4 py-4");
|
|
265
|
+
return (o, r) => (g(), h("div", {
|
|
266
|
+
class: R(t.value)
|
|
266
267
|
}, [
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
])) :
|
|
268
|
+
o.$slots.header ? (g(), h("div", Et, [
|
|
269
|
+
P(o.$slots, "header")
|
|
270
|
+
])) : V("", !0),
|
|
270
271
|
k("div", {
|
|
271
|
-
class:
|
|
272
|
+
class: R(s.value)
|
|
272
273
|
}, [
|
|
273
|
-
|
|
274
|
+
P(o.$slots, "default")
|
|
274
275
|
], 2),
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
])) :
|
|
276
|
+
o.$slots.footer ? (g(), h("div", Mt, [
|
|
277
|
+
P(o.$slots, "footer")
|
|
278
|
+
])) : V("", !0)
|
|
278
279
|
], 2));
|
|
279
280
|
}
|
|
280
281
|
}), jt = ["id", "checked", "disabled", "value"], Pt = {
|
|
@@ -286,7 +287,7 @@ const Rt = ["aria-label"], Lt = ["src", "alt"], Es = /* @__PURE__ */ S({
|
|
|
286
287
|
"stroke-linecap": "round",
|
|
287
288
|
"stroke-linejoin": "round",
|
|
288
289
|
class: "w-full h-full"
|
|
289
|
-
},
|
|
290
|
+
}, yo = /* @__PURE__ */ z({
|
|
290
291
|
__name: "DsCheckbox",
|
|
291
292
|
props: {
|
|
292
293
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -297,39 +298,39 @@ const Rt = ["aria-label"], Lt = ["src", "alt"], Es = /* @__PURE__ */ S({
|
|
|
297
298
|
size: { default: "medium" }
|
|
298
299
|
},
|
|
299
300
|
emits: ["update:modelValue", "change"],
|
|
300
|
-
setup(e, { emit:
|
|
301
|
-
const
|
|
301
|
+
setup(e, { emit: n }) {
|
|
302
|
+
const t = e, s = n, o = {
|
|
302
303
|
small: { box: "w-3.5 h-3.5", label: "text-xs", radius: "rounded" },
|
|
303
304
|
medium: { box: "w-4 h-4", label: "text-sm", radius: "rounded" },
|
|
304
305
|
large: { box: "w-5 h-5", label: "text-base", radius: "rounded-md" }
|
|
305
306
|
}, r = w(() => {
|
|
306
|
-
const
|
|
307
|
-
|
|
308
|
-
|
|
307
|
+
const c = o[t.size], f = [
|
|
308
|
+
c.box,
|
|
309
|
+
c.radius,
|
|
309
310
|
"inline-flex items-center justify-center",
|
|
310
311
|
"border border-solid",
|
|
311
312
|
"transition-all duration-fast",
|
|
312
313
|
"shrink-0"
|
|
313
314
|
];
|
|
314
|
-
return
|
|
315
|
-
|
|
315
|
+
return t.disabled ? f.push(
|
|
316
|
+
t.modelValue ? "bg-brand-disabled border-brand-disabled text-brand-on-solid" : "bg-bg-tertiary border-border text-transparent",
|
|
316
317
|
"opacity-60"
|
|
317
|
-
) :
|
|
318
|
+
) : t.modelValue ? f.push("bg-brand border-brand text-brand-on-solid") : f.push(
|
|
318
319
|
"bg-bg border-border-strong text-transparent",
|
|
319
320
|
"group-hover:border-brand",
|
|
320
321
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring peer-focus-visible:ring-offset-2"
|
|
321
|
-
),
|
|
322
|
+
), f.join(" ");
|
|
322
323
|
}), a = w(() => [
|
|
323
324
|
"font-sans select-none",
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
].join(" ")),
|
|
327
|
-
if (
|
|
328
|
-
const d =
|
|
329
|
-
|
|
325
|
+
o[t.size].label,
|
|
326
|
+
t.disabled ? "text-fg-disabled" : "text-fg"
|
|
327
|
+
].join(" ")), i = (c) => {
|
|
328
|
+
if (t.disabled) return;
|
|
329
|
+
const d = c.target.checked;
|
|
330
|
+
s("update:modelValue", d), s("change", d, c);
|
|
330
331
|
};
|
|
331
|
-
return (
|
|
332
|
-
class:
|
|
332
|
+
return (c, f) => (g(), h("label", {
|
|
333
|
+
class: R([
|
|
333
334
|
"inline-flex items-center gap-2",
|
|
334
335
|
e.disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
335
336
|
"group"
|
|
@@ -342,27 +343,27 @@ const Rt = ["aria-label"], Lt = ["src", "alt"], Es = /* @__PURE__ */ S({
|
|
|
342
343
|
disabled: e.disabled,
|
|
343
344
|
value: e.value,
|
|
344
345
|
class: "sr-only peer",
|
|
345
|
-
onChange:
|
|
346
|
+
onChange: i
|
|
346
347
|
}, null, 40, jt),
|
|
347
348
|
k("span", {
|
|
348
|
-
class:
|
|
349
|
+
class: R(r.value),
|
|
349
350
|
"aria-hidden": "true"
|
|
350
351
|
}, [
|
|
351
|
-
e.modelValue ? (g(), h("svg", Pt, [...
|
|
352
|
+
e.modelValue ? (g(), h("svg", Pt, [...f[0] || (f[0] = [
|
|
352
353
|
k("polyline", { points: "2.5 6 5 8.5 9.5 3.5" }, null, -1)
|
|
353
|
-
])])) :
|
|
354
|
+
])])) : V("", !0)
|
|
354
355
|
], 2),
|
|
355
|
-
e.label ||
|
|
356
|
+
e.label || c.$slots.default ? (g(), h("span", {
|
|
356
357
|
key: 0,
|
|
357
|
-
class:
|
|
358
|
+
class: R(a.value)
|
|
358
359
|
}, [
|
|
359
|
-
|
|
360
|
-
|
|
360
|
+
P(c.$slots, "default", {}, () => [
|
|
361
|
+
K(L(e.label), 1)
|
|
361
362
|
])
|
|
362
|
-
], 2)) :
|
|
363
|
+
], 2)) : V("", !0)
|
|
363
364
|
], 2));
|
|
364
365
|
}
|
|
365
|
-
}), ie = Math.min, q = Math.max,
|
|
366
|
+
}), ie = Math.min, q = Math.max, Ve = Math.round, De = Math.floor, Z = (e) => ({
|
|
366
367
|
x: e,
|
|
367
368
|
y: e
|
|
368
369
|
}), It = {
|
|
@@ -370,70 +371,70 @@ const Rt = ["aria-label"], Lt = ["src", "alt"], Es = /* @__PURE__ */ S({
|
|
|
370
371
|
right: "left",
|
|
371
372
|
bottom: "top",
|
|
372
373
|
top: "bottom"
|
|
373
|
-
},
|
|
374
|
+
}, Ft = {
|
|
374
375
|
start: "end",
|
|
375
376
|
end: "start"
|
|
376
377
|
};
|
|
377
|
-
function
|
|
378
|
-
return q(e, ie(
|
|
378
|
+
function Fe(e, n, t) {
|
|
379
|
+
return q(e, ie(n, t));
|
|
379
380
|
}
|
|
380
|
-
function ye(e,
|
|
381
|
-
return typeof e == "function" ? e(
|
|
381
|
+
function ye(e, n) {
|
|
382
|
+
return typeof e == "function" ? e(n) : e;
|
|
382
383
|
}
|
|
383
384
|
function ce(e) {
|
|
384
385
|
return e.split("-")[0];
|
|
385
386
|
}
|
|
386
|
-
function
|
|
387
|
+
function xe(e) {
|
|
387
388
|
return e.split("-")[1];
|
|
388
389
|
}
|
|
389
|
-
function
|
|
390
|
+
function ct(e) {
|
|
390
391
|
return e === "x" ? "y" : "x";
|
|
391
392
|
}
|
|
392
|
-
function
|
|
393
|
+
function qe(e) {
|
|
393
394
|
return e === "y" ? "height" : "width";
|
|
394
395
|
}
|
|
395
|
-
const
|
|
396
|
-
function
|
|
397
|
-
return
|
|
396
|
+
const Nt = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
397
|
+
function ne(e) {
|
|
398
|
+
return Nt.has(ce(e)) ? "y" : "x";
|
|
398
399
|
}
|
|
399
400
|
function Ke(e) {
|
|
400
|
-
return
|
|
401
|
+
return ct(ne(e));
|
|
401
402
|
}
|
|
402
|
-
function
|
|
403
|
-
|
|
404
|
-
const
|
|
405
|
-
let a =
|
|
406
|
-
return
|
|
403
|
+
function Wt(e, n, t) {
|
|
404
|
+
t === void 0 && (t = !1);
|
|
405
|
+
const s = xe(e), o = Ke(e), r = qe(o);
|
|
406
|
+
let a = o === "x" ? s === (t ? "end" : "start") ? "right" : "left" : s === "start" ? "bottom" : "top";
|
|
407
|
+
return n.reference[r] > n.floating[r] && (a = Re(a)), [a, Re(a)];
|
|
407
408
|
}
|
|
408
|
-
function
|
|
409
|
-
const
|
|
410
|
-
return [
|
|
409
|
+
function Ht(e) {
|
|
410
|
+
const n = Re(e);
|
|
411
|
+
return [Ne(e), n, Ne(n)];
|
|
411
412
|
}
|
|
412
|
-
function
|
|
413
|
-
return e.replace(/start|end/g, (
|
|
413
|
+
function Ne(e) {
|
|
414
|
+
return e.replace(/start|end/g, (n) => Ft[n]);
|
|
414
415
|
}
|
|
415
|
-
const
|
|
416
|
-
function
|
|
416
|
+
const Je = ["left", "right"], Qe = ["right", "left"], qt = ["top", "bottom"], Kt = ["bottom", "top"];
|
|
417
|
+
function Ut(e, n, t) {
|
|
417
418
|
switch (e) {
|
|
418
419
|
case "top":
|
|
419
420
|
case "bottom":
|
|
420
|
-
return
|
|
421
|
+
return t ? n ? Qe : Je : n ? Je : Qe;
|
|
421
422
|
case "left":
|
|
422
423
|
case "right":
|
|
423
|
-
return
|
|
424
|
+
return n ? qt : Kt;
|
|
424
425
|
default:
|
|
425
426
|
return [];
|
|
426
427
|
}
|
|
427
428
|
}
|
|
428
|
-
function
|
|
429
|
-
const
|
|
430
|
-
let r =
|
|
431
|
-
return
|
|
429
|
+
function Xt(e, n, t, s) {
|
|
430
|
+
const o = xe(e);
|
|
431
|
+
let r = Ut(ce(e), t === "start", s);
|
|
432
|
+
return o && (r = r.map((a) => a + "-" + o), n && (r = r.concat(r.map(Ne)))), r;
|
|
432
433
|
}
|
|
433
|
-
function
|
|
434
|
-
return e.replace(/left|right|bottom|top/g, (
|
|
434
|
+
function Re(e) {
|
|
435
|
+
return e.replace(/left|right|bottom|top/g, (n) => It[n]);
|
|
435
436
|
}
|
|
436
|
-
function
|
|
437
|
+
function Yt(e) {
|
|
437
438
|
return {
|
|
438
439
|
top: 0,
|
|
439
440
|
right: 0,
|
|
@@ -442,409 +443,409 @@ function Gt(e) {
|
|
|
442
443
|
...e
|
|
443
444
|
};
|
|
444
445
|
}
|
|
445
|
-
function
|
|
446
|
-
return typeof e != "number" ?
|
|
446
|
+
function dt(e) {
|
|
447
|
+
return typeof e != "number" ? Yt(e) : {
|
|
447
448
|
top: e,
|
|
448
449
|
right: e,
|
|
449
450
|
bottom: e,
|
|
450
451
|
left: e
|
|
451
452
|
};
|
|
452
453
|
}
|
|
453
|
-
function
|
|
454
|
+
function Le(e) {
|
|
454
455
|
const {
|
|
455
|
-
x:
|
|
456
|
-
y:
|
|
457
|
-
width:
|
|
458
|
-
height:
|
|
456
|
+
x: n,
|
|
457
|
+
y: t,
|
|
458
|
+
width: s,
|
|
459
|
+
height: o
|
|
459
460
|
} = e;
|
|
460
461
|
return {
|
|
461
|
-
width:
|
|
462
|
-
height:
|
|
463
|
-
top:
|
|
464
|
-
left:
|
|
465
|
-
right:
|
|
466
|
-
bottom:
|
|
467
|
-
x:
|
|
468
|
-
y:
|
|
462
|
+
width: s,
|
|
463
|
+
height: o,
|
|
464
|
+
top: t,
|
|
465
|
+
left: n,
|
|
466
|
+
right: n + s,
|
|
467
|
+
bottom: t + o,
|
|
468
|
+
x: n,
|
|
469
|
+
y: t
|
|
469
470
|
};
|
|
470
471
|
}
|
|
471
|
-
function
|
|
472
|
+
function Ze(e, n, t) {
|
|
472
473
|
let {
|
|
473
|
-
reference:
|
|
474
|
-
floating:
|
|
474
|
+
reference: s,
|
|
475
|
+
floating: o
|
|
475
476
|
} = e;
|
|
476
|
-
const r =
|
|
477
|
-
let
|
|
478
|
-
switch (
|
|
477
|
+
const r = ne(n), a = Ke(n), i = qe(a), c = ce(n), f = r === "y", d = s.x + s.width / 2 - o.width / 2, l = s.y + s.height / 2 - o.height / 2, b = s[i] / 2 - o[i] / 2;
|
|
478
|
+
let u;
|
|
479
|
+
switch (c) {
|
|
479
480
|
case "top":
|
|
480
|
-
|
|
481
|
+
u = {
|
|
481
482
|
x: d,
|
|
482
|
-
y:
|
|
483
|
+
y: s.y - o.height
|
|
483
484
|
};
|
|
484
485
|
break;
|
|
485
486
|
case "bottom":
|
|
486
|
-
|
|
487
|
+
u = {
|
|
487
488
|
x: d,
|
|
488
|
-
y:
|
|
489
|
+
y: s.y + s.height
|
|
489
490
|
};
|
|
490
491
|
break;
|
|
491
492
|
case "right":
|
|
492
|
-
|
|
493
|
-
x:
|
|
494
|
-
y:
|
|
493
|
+
u = {
|
|
494
|
+
x: s.x + s.width,
|
|
495
|
+
y: l
|
|
495
496
|
};
|
|
496
497
|
break;
|
|
497
498
|
case "left":
|
|
498
|
-
|
|
499
|
-
x:
|
|
500
|
-
y:
|
|
499
|
+
u = {
|
|
500
|
+
x: s.x - o.width,
|
|
501
|
+
y: l
|
|
501
502
|
};
|
|
502
503
|
break;
|
|
503
504
|
default:
|
|
504
|
-
|
|
505
|
-
x:
|
|
506
|
-
y:
|
|
505
|
+
u = {
|
|
506
|
+
x: s.x,
|
|
507
|
+
y: s.y
|
|
507
508
|
};
|
|
508
509
|
}
|
|
509
|
-
switch (
|
|
510
|
+
switch (xe(n)) {
|
|
510
511
|
case "start":
|
|
511
|
-
|
|
512
|
+
u[a] -= b * (t && f ? -1 : 1);
|
|
512
513
|
break;
|
|
513
514
|
case "end":
|
|
514
|
-
|
|
515
|
+
u[a] += b * (t && f ? -1 : 1);
|
|
515
516
|
break;
|
|
516
517
|
}
|
|
517
|
-
return
|
|
518
|
+
return u;
|
|
518
519
|
}
|
|
519
|
-
async function
|
|
520
|
-
var
|
|
521
|
-
|
|
520
|
+
async function Gt(e, n) {
|
|
521
|
+
var t;
|
|
522
|
+
n === void 0 && (n = {});
|
|
522
523
|
const {
|
|
523
|
-
x:
|
|
524
|
-
y:
|
|
524
|
+
x: s,
|
|
525
|
+
y: o,
|
|
525
526
|
platform: r,
|
|
526
527
|
rects: a,
|
|
527
|
-
elements:
|
|
528
|
-
strategy:
|
|
528
|
+
elements: i,
|
|
529
|
+
strategy: c
|
|
529
530
|
} = e, {
|
|
530
|
-
boundary:
|
|
531
|
+
boundary: f = "clippingAncestors",
|
|
531
532
|
rootBoundary: d = "viewport",
|
|
532
|
-
elementContext:
|
|
533
|
+
elementContext: l = "floating",
|
|
533
534
|
altBoundary: b = !1,
|
|
534
|
-
padding:
|
|
535
|
-
} = ye(
|
|
536
|
-
element: (
|
|
537
|
-
boundary:
|
|
535
|
+
padding: u = 0
|
|
536
|
+
} = ye(n, e), v = dt(u), y = i[b ? l === "floating" ? "reference" : "floating" : l], p = Le(await r.getClippingRect({
|
|
537
|
+
element: (t = await (r.isElement == null ? void 0 : r.isElement(y))) == null || t ? y : y.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(i.floating)),
|
|
538
|
+
boundary: f,
|
|
538
539
|
rootBoundary: d,
|
|
539
|
-
strategy:
|
|
540
|
-
})), C =
|
|
541
|
-
x:
|
|
542
|
-
y:
|
|
540
|
+
strategy: c
|
|
541
|
+
})), C = l === "floating" ? {
|
|
542
|
+
x: s,
|
|
543
|
+
y: o,
|
|
543
544
|
width: a.floating.width,
|
|
544
545
|
height: a.floating.height
|
|
545
|
-
} : a.reference,
|
|
546
|
+
} : a.reference, D = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(i.floating)), A = await (r.isElement == null ? void 0 : r.isElement(D)) ? await (r.getScale == null ? void 0 : r.getScale(D)) || {
|
|
546
547
|
x: 1,
|
|
547
548
|
y: 1
|
|
548
549
|
} : {
|
|
549
550
|
x: 1,
|
|
550
551
|
y: 1
|
|
551
|
-
},
|
|
552
|
-
elements:
|
|
552
|
+
}, T = Le(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
553
|
+
elements: i,
|
|
553
554
|
rect: C,
|
|
554
|
-
offsetParent:
|
|
555
|
-
strategy:
|
|
555
|
+
offsetParent: D,
|
|
556
|
+
strategy: c
|
|
556
557
|
}) : C);
|
|
557
558
|
return {
|
|
558
|
-
top: (
|
|
559
|
-
bottom: (
|
|
560
|
-
left: (
|
|
561
|
-
right: (
|
|
559
|
+
top: (p.top - T.top + v.top) / A.y,
|
|
560
|
+
bottom: (T.bottom - p.bottom + v.bottom) / A.y,
|
|
561
|
+
left: (p.left - T.left + v.left) / A.x,
|
|
562
|
+
right: (T.right - p.right + v.right) / A.x
|
|
562
563
|
};
|
|
563
564
|
}
|
|
564
|
-
const
|
|
565
|
+
const Jt = async (e, n, t) => {
|
|
565
566
|
const {
|
|
566
|
-
placement:
|
|
567
|
-
strategy:
|
|
567
|
+
placement: s = "bottom",
|
|
568
|
+
strategy: o = "absolute",
|
|
568
569
|
middleware: r = [],
|
|
569
570
|
platform: a
|
|
570
|
-
} =
|
|
571
|
-
let
|
|
571
|
+
} = t, i = r.filter(Boolean), c = await (a.isRTL == null ? void 0 : a.isRTL(n));
|
|
572
|
+
let f = await a.getElementRects({
|
|
572
573
|
reference: e,
|
|
573
|
-
floating:
|
|
574
|
-
strategy:
|
|
574
|
+
floating: n,
|
|
575
|
+
strategy: o
|
|
575
576
|
}), {
|
|
576
577
|
x: d,
|
|
577
|
-
y:
|
|
578
|
-
} =
|
|
579
|
-
for (let
|
|
578
|
+
y: l
|
|
579
|
+
} = Ze(f, s, c), b = s, u = {}, v = 0;
|
|
580
|
+
for (let y = 0; y < i.length; y++) {
|
|
580
581
|
var m;
|
|
581
582
|
const {
|
|
582
|
-
name:
|
|
583
|
+
name: p,
|
|
583
584
|
fn: C
|
|
584
|
-
} =
|
|
585
|
-
x:
|
|
586
|
-
y:
|
|
587
|
-
data:
|
|
588
|
-
reset:
|
|
585
|
+
} = i[y], {
|
|
586
|
+
x: D,
|
|
587
|
+
y: A,
|
|
588
|
+
data: T,
|
|
589
|
+
reset: S
|
|
589
590
|
} = await C({
|
|
590
591
|
x: d,
|
|
591
|
-
y:
|
|
592
|
-
initialPlacement:
|
|
592
|
+
y: l,
|
|
593
|
+
initialPlacement: s,
|
|
593
594
|
placement: b,
|
|
594
|
-
strategy:
|
|
595
|
-
middlewareData:
|
|
596
|
-
rects:
|
|
595
|
+
strategy: o,
|
|
596
|
+
middlewareData: u,
|
|
597
|
+
rects: f,
|
|
597
598
|
platform: {
|
|
598
599
|
...a,
|
|
599
|
-
detectOverflow: (m = a.detectOverflow) != null ? m :
|
|
600
|
+
detectOverflow: (m = a.detectOverflow) != null ? m : Gt
|
|
600
601
|
},
|
|
601
602
|
elements: {
|
|
602
603
|
reference: e,
|
|
603
|
-
floating:
|
|
604
|
+
floating: n
|
|
604
605
|
}
|
|
605
606
|
});
|
|
606
|
-
d =
|
|
607
|
-
...
|
|
608
|
-
[
|
|
609
|
-
...
|
|
610
|
-
...
|
|
607
|
+
d = D ?? d, l = A ?? l, u = {
|
|
608
|
+
...u,
|
|
609
|
+
[p]: {
|
|
610
|
+
...u[p],
|
|
611
|
+
...T
|
|
611
612
|
}
|
|
612
|
-
},
|
|
613
|
+
}, S && v <= 50 && (v++, typeof S == "object" && (S.placement && (b = S.placement), S.rects && (f = S.rects === !0 ? await a.getElementRects({
|
|
613
614
|
reference: e,
|
|
614
|
-
floating:
|
|
615
|
-
strategy:
|
|
616
|
-
}) :
|
|
615
|
+
floating: n,
|
|
616
|
+
strategy: o
|
|
617
|
+
}) : S.rects), {
|
|
617
618
|
x: d,
|
|
618
|
-
y:
|
|
619
|
-
} =
|
|
619
|
+
y: l
|
|
620
|
+
} = Ze(f, b, c)), y = -1);
|
|
620
621
|
}
|
|
621
622
|
return {
|
|
622
623
|
x: d,
|
|
623
|
-
y:
|
|
624
|
+
y: l,
|
|
624
625
|
placement: b,
|
|
625
|
-
strategy:
|
|
626
|
-
middlewareData:
|
|
626
|
+
strategy: o,
|
|
627
|
+
middlewareData: u
|
|
627
628
|
};
|
|
628
|
-
},
|
|
629
|
+
}, Qt = (e) => ({
|
|
629
630
|
name: "arrow",
|
|
630
631
|
options: e,
|
|
631
|
-
async fn(
|
|
632
|
+
async fn(n) {
|
|
632
633
|
const {
|
|
633
|
-
x:
|
|
634
|
-
y:
|
|
635
|
-
placement:
|
|
634
|
+
x: t,
|
|
635
|
+
y: s,
|
|
636
|
+
placement: o,
|
|
636
637
|
rects: r,
|
|
637
638
|
platform: a,
|
|
638
|
-
elements:
|
|
639
|
-
middlewareData:
|
|
640
|
-
} =
|
|
641
|
-
element:
|
|
639
|
+
elements: i,
|
|
640
|
+
middlewareData: c
|
|
641
|
+
} = n, {
|
|
642
|
+
element: f,
|
|
642
643
|
padding: d = 0
|
|
643
|
-
} = ye(e,
|
|
644
|
-
if (
|
|
644
|
+
} = ye(e, n) || {};
|
|
645
|
+
if (f == null)
|
|
645
646
|
return {};
|
|
646
|
-
const
|
|
647
|
-
x:
|
|
648
|
-
y:
|
|
649
|
-
},
|
|
650
|
-
let $ =
|
|
651
|
-
(!$ || !await (a.isElement == null ? void 0 : a.isElement(
|
|
652
|
-
const
|
|
647
|
+
const l = dt(d), b = {
|
|
648
|
+
x: t,
|
|
649
|
+
y: s
|
|
650
|
+
}, u = Ke(o), v = qe(u), m = await a.getDimensions(f), y = u === "y", p = y ? "top" : "left", C = y ? "bottom" : "right", D = y ? "clientHeight" : "clientWidth", A = r.reference[v] + r.reference[u] - b[u] - r.floating[v], T = b[u] - r.reference[u], S = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(f));
|
|
651
|
+
let $ = S ? S[D] : 0;
|
|
652
|
+
(!$ || !await (a.isElement == null ? void 0 : a.isElement(S))) && ($ = i.floating[D] || r.floating[v]);
|
|
653
|
+
const M = A / 2 - T / 2, I = $ / 2 - m[v] / 2 - 1, W = ie(l[p], I), Y = ie(l[C], I), X = W, x = $ - m[v] - Y, O = $ / 2 - m[v] / 2 + M, E = Fe(X, O, x), F = !c.arrow && xe(o) != null && O !== E && r.reference[v] / 2 - (O < X ? W : Y) - m[v] / 2 < 0, H = F ? O < X ? O - X : O - x : 0;
|
|
653
654
|
return {
|
|
654
|
-
[
|
|
655
|
+
[u]: b[u] + H,
|
|
655
656
|
data: {
|
|
656
|
-
[
|
|
657
|
-
centerOffset:
|
|
658
|
-
...
|
|
657
|
+
[u]: E,
|
|
658
|
+
centerOffset: O - E - H,
|
|
659
|
+
...F && {
|
|
659
660
|
alignmentOffset: H
|
|
660
661
|
}
|
|
661
662
|
},
|
|
662
|
-
reset:
|
|
663
|
+
reset: F
|
|
663
664
|
};
|
|
664
665
|
}
|
|
665
|
-
}),
|
|
666
|
+
}), Zt = function(e) {
|
|
666
667
|
return e === void 0 && (e = {}), {
|
|
667
668
|
name: "flip",
|
|
668
669
|
options: e,
|
|
669
|
-
async fn(
|
|
670
|
-
var
|
|
670
|
+
async fn(n) {
|
|
671
|
+
var t, s;
|
|
671
672
|
const {
|
|
672
|
-
placement:
|
|
673
|
+
placement: o,
|
|
673
674
|
middlewareData: r,
|
|
674
675
|
rects: a,
|
|
675
|
-
initialPlacement:
|
|
676
|
-
platform:
|
|
677
|
-
elements:
|
|
678
|
-
} =
|
|
676
|
+
initialPlacement: i,
|
|
677
|
+
platform: c,
|
|
678
|
+
elements: f
|
|
679
|
+
} = n, {
|
|
679
680
|
mainAxis: d = !0,
|
|
680
|
-
crossAxis:
|
|
681
|
+
crossAxis: l = !0,
|
|
681
682
|
fallbackPlacements: b,
|
|
682
|
-
fallbackStrategy:
|
|
683
|
-
fallbackAxisSideDirection:
|
|
683
|
+
fallbackStrategy: u = "bestFit",
|
|
684
|
+
fallbackAxisSideDirection: v = "none",
|
|
684
685
|
flipAlignment: m = !0,
|
|
685
|
-
...
|
|
686
|
-
} = ye(e,
|
|
687
|
-
if ((
|
|
686
|
+
...y
|
|
687
|
+
} = ye(e, n);
|
|
688
|
+
if ((t = r.arrow) != null && t.alignmentOffset)
|
|
688
689
|
return {};
|
|
689
|
-
const
|
|
690
|
-
!b &&
|
|
691
|
-
const $ = [
|
|
692
|
-
let W = ((
|
|
693
|
-
if (d &&
|
|
694
|
-
const
|
|
695
|
-
|
|
690
|
+
const p = ce(o), C = ne(i), D = ce(i) === i, A = await (c.isRTL == null ? void 0 : c.isRTL(f.floating)), T = b || (D || !m ? [Re(i)] : Ht(i)), S = v !== "none";
|
|
691
|
+
!b && S && T.push(...Xt(i, m, v, A));
|
|
692
|
+
const $ = [i, ...T], M = await c.detectOverflow(n, y), I = [];
|
|
693
|
+
let W = ((s = r.flip) == null ? void 0 : s.overflows) || [];
|
|
694
|
+
if (d && I.push(M[p]), l) {
|
|
695
|
+
const O = Wt(o, a, A);
|
|
696
|
+
I.push(M[O[0]], M[O[1]]);
|
|
696
697
|
}
|
|
697
698
|
if (W = [...W, {
|
|
698
|
-
placement:
|
|
699
|
-
overflows:
|
|
700
|
-
}], !
|
|
701
|
-
var Y,
|
|
702
|
-
const
|
|
703
|
-
if (
|
|
699
|
+
placement: o,
|
|
700
|
+
overflows: I
|
|
701
|
+
}], !I.every((O) => O <= 0)) {
|
|
702
|
+
var Y, X;
|
|
703
|
+
const O = (((Y = r.flip) == null ? void 0 : Y.index) || 0) + 1, E = $[O];
|
|
704
|
+
if (E && (!(l === "alignment" ? C !== ne(E) : !1) || // We leave the current main axis only if every placement on that axis
|
|
704
705
|
// overflows the main axis.
|
|
705
|
-
W.every((G) =>
|
|
706
|
+
W.every((G) => ne(G.placement) === C ? G.overflows[0] > 0 : !0)))
|
|
706
707
|
return {
|
|
707
708
|
data: {
|
|
708
|
-
index:
|
|
709
|
+
index: O,
|
|
709
710
|
overflows: W
|
|
710
711
|
},
|
|
711
712
|
reset: {
|
|
712
|
-
placement:
|
|
713
|
+
placement: E
|
|
713
714
|
}
|
|
714
715
|
};
|
|
715
|
-
let
|
|
716
|
-
if (!
|
|
717
|
-
switch (
|
|
716
|
+
let F = (X = W.filter((H) => H.overflows[0] <= 0).sort((H, G) => H.overflows[1] - G.overflows[1])[0]) == null ? void 0 : X.placement;
|
|
717
|
+
if (!F)
|
|
718
|
+
switch (u) {
|
|
718
719
|
case "bestFit": {
|
|
719
|
-
var
|
|
720
|
-
const H = (
|
|
721
|
-
if (
|
|
722
|
-
const
|
|
723
|
-
return
|
|
720
|
+
var x;
|
|
721
|
+
const H = (x = W.filter((G) => {
|
|
722
|
+
if (S) {
|
|
723
|
+
const oe = ne(G.placement);
|
|
724
|
+
return oe === C || // Create a bias to the `y` side axis due to horizontal
|
|
724
725
|
// reading directions favoring greater width.
|
|
725
|
-
|
|
726
|
+
oe === "y";
|
|
726
727
|
}
|
|
727
728
|
return !0;
|
|
728
|
-
}).map((G) => [G.placement, G.overflows.filter((
|
|
729
|
-
H && (
|
|
729
|
+
}).map((G) => [G.placement, G.overflows.filter((oe) => oe > 0).reduce((oe, Dt) => oe + Dt, 0)]).sort((G, oe) => G[1] - oe[1])[0]) == null ? void 0 : x[0];
|
|
730
|
+
H && (F = H);
|
|
730
731
|
break;
|
|
731
732
|
}
|
|
732
733
|
case "initialPlacement":
|
|
733
|
-
|
|
734
|
+
F = i;
|
|
734
735
|
break;
|
|
735
736
|
}
|
|
736
|
-
if (
|
|
737
|
+
if (o !== F)
|
|
737
738
|
return {
|
|
738
739
|
reset: {
|
|
739
|
-
placement:
|
|
740
|
+
placement: F
|
|
740
741
|
}
|
|
741
742
|
};
|
|
742
743
|
}
|
|
743
744
|
return {};
|
|
744
745
|
}
|
|
745
746
|
};
|
|
746
|
-
},
|
|
747
|
-
async function
|
|
747
|
+
}, _t = /* @__PURE__ */ new Set(["left", "top"]);
|
|
748
|
+
async function en(e, n) {
|
|
748
749
|
const {
|
|
749
|
-
placement:
|
|
750
|
-
platform:
|
|
751
|
-
elements:
|
|
752
|
-
} = e, r = await (
|
|
750
|
+
placement: t,
|
|
751
|
+
platform: s,
|
|
752
|
+
elements: o
|
|
753
|
+
} = e, r = await (s.isRTL == null ? void 0 : s.isRTL(o.floating)), a = ce(t), i = xe(t), c = ne(t) === "y", f = _t.has(a) ? -1 : 1, d = r && c ? -1 : 1, l = ye(n, e);
|
|
753
754
|
let {
|
|
754
755
|
mainAxis: b,
|
|
755
|
-
crossAxis:
|
|
756
|
-
alignmentAxis:
|
|
757
|
-
} = typeof
|
|
758
|
-
mainAxis:
|
|
756
|
+
crossAxis: u,
|
|
757
|
+
alignmentAxis: v
|
|
758
|
+
} = typeof l == "number" ? {
|
|
759
|
+
mainAxis: l,
|
|
759
760
|
crossAxis: 0,
|
|
760
761
|
alignmentAxis: null
|
|
761
762
|
} : {
|
|
762
|
-
mainAxis:
|
|
763
|
-
crossAxis:
|
|
764
|
-
alignmentAxis:
|
|
763
|
+
mainAxis: l.mainAxis || 0,
|
|
764
|
+
crossAxis: l.crossAxis || 0,
|
|
765
|
+
alignmentAxis: l.alignmentAxis
|
|
765
766
|
};
|
|
766
|
-
return
|
|
767
|
-
x:
|
|
768
|
-
y: b *
|
|
767
|
+
return i && typeof v == "number" && (u = i === "end" ? v * -1 : v), c ? {
|
|
768
|
+
x: u * d,
|
|
769
|
+
y: b * f
|
|
769
770
|
} : {
|
|
770
|
-
x: b *
|
|
771
|
-
y:
|
|
771
|
+
x: b * f,
|
|
772
|
+
y: u * d
|
|
772
773
|
};
|
|
773
774
|
}
|
|
774
|
-
const
|
|
775
|
+
const tn = function(e) {
|
|
775
776
|
return e === void 0 && (e = 0), {
|
|
776
777
|
name: "offset",
|
|
777
778
|
options: e,
|
|
778
|
-
async fn(
|
|
779
|
-
var
|
|
779
|
+
async fn(n) {
|
|
780
|
+
var t, s;
|
|
780
781
|
const {
|
|
781
|
-
x:
|
|
782
|
+
x: o,
|
|
782
783
|
y: r,
|
|
783
784
|
placement: a,
|
|
784
|
-
middlewareData:
|
|
785
|
-
} =
|
|
786
|
-
return a === ((
|
|
787
|
-
x:
|
|
788
|
-
y: r +
|
|
785
|
+
middlewareData: i
|
|
786
|
+
} = n, c = await en(n, e);
|
|
787
|
+
return a === ((t = i.offset) == null ? void 0 : t.placement) && (s = i.arrow) != null && s.alignmentOffset ? {} : {
|
|
788
|
+
x: o + c.x,
|
|
789
|
+
y: r + c.y,
|
|
789
790
|
data: {
|
|
790
|
-
...
|
|
791
|
+
...c,
|
|
791
792
|
placement: a
|
|
792
793
|
}
|
|
793
794
|
};
|
|
794
795
|
}
|
|
795
796
|
};
|
|
796
|
-
},
|
|
797
|
+
}, nn = function(e) {
|
|
797
798
|
return e === void 0 && (e = {}), {
|
|
798
799
|
name: "shift",
|
|
799
800
|
options: e,
|
|
800
|
-
async fn(
|
|
801
|
+
async fn(n) {
|
|
801
802
|
const {
|
|
802
|
-
x:
|
|
803
|
-
y:
|
|
804
|
-
placement:
|
|
803
|
+
x: t,
|
|
804
|
+
y: s,
|
|
805
|
+
placement: o,
|
|
805
806
|
platform: r
|
|
806
|
-
} =
|
|
807
|
+
} = n, {
|
|
807
808
|
mainAxis: a = !0,
|
|
808
|
-
crossAxis:
|
|
809
|
-
limiter:
|
|
810
|
-
fn: (
|
|
809
|
+
crossAxis: i = !1,
|
|
810
|
+
limiter: c = {
|
|
811
|
+
fn: (p) => {
|
|
811
812
|
let {
|
|
812
813
|
x: C,
|
|
813
|
-
y:
|
|
814
|
-
} =
|
|
814
|
+
y: D
|
|
815
|
+
} = p;
|
|
815
816
|
return {
|
|
816
817
|
x: C,
|
|
817
|
-
y:
|
|
818
|
+
y: D
|
|
818
819
|
};
|
|
819
820
|
}
|
|
820
821
|
},
|
|
821
|
-
...
|
|
822
|
-
} = ye(e,
|
|
823
|
-
x:
|
|
824
|
-
y:
|
|
825
|
-
},
|
|
826
|
-
let
|
|
822
|
+
...f
|
|
823
|
+
} = ye(e, n), d = {
|
|
824
|
+
x: t,
|
|
825
|
+
y: s
|
|
826
|
+
}, l = await r.detectOverflow(n, f), b = ne(ce(o)), u = ct(b);
|
|
827
|
+
let v = d[u], m = d[b];
|
|
827
828
|
if (a) {
|
|
828
|
-
const
|
|
829
|
-
|
|
829
|
+
const p = u === "y" ? "top" : "left", C = u === "y" ? "bottom" : "right", D = v + l[p], A = v - l[C];
|
|
830
|
+
v = Fe(D, v, A);
|
|
830
831
|
}
|
|
831
|
-
if (
|
|
832
|
-
const
|
|
833
|
-
m =
|
|
832
|
+
if (i) {
|
|
833
|
+
const p = b === "y" ? "top" : "left", C = b === "y" ? "bottom" : "right", D = m + l[p], A = m - l[C];
|
|
834
|
+
m = Fe(D, m, A);
|
|
834
835
|
}
|
|
835
|
-
const
|
|
836
|
-
...
|
|
837
|
-
[
|
|
836
|
+
const y = c.fn({
|
|
837
|
+
...n,
|
|
838
|
+
[u]: v,
|
|
838
839
|
[b]: m
|
|
839
840
|
});
|
|
840
841
|
return {
|
|
841
|
-
...
|
|
842
|
+
...y,
|
|
842
843
|
data: {
|
|
843
|
-
x:
|
|
844
|
-
y:
|
|
844
|
+
x: y.x - t,
|
|
845
|
+
y: y.y - s,
|
|
845
846
|
enabled: {
|
|
846
|
-
[
|
|
847
|
-
[b]:
|
|
847
|
+
[u]: a,
|
|
848
|
+
[b]: i
|
|
848
849
|
}
|
|
849
850
|
}
|
|
850
851
|
};
|
|
@@ -854,36 +855,36 @@ const nn = function(e) {
|
|
|
854
855
|
return e === void 0 && (e = {}), {
|
|
855
856
|
name: "size",
|
|
856
857
|
options: e,
|
|
857
|
-
async fn(
|
|
858
|
-
var
|
|
858
|
+
async fn(n) {
|
|
859
|
+
var t, s;
|
|
859
860
|
const {
|
|
860
|
-
placement:
|
|
861
|
+
placement: o,
|
|
861
862
|
rects: r,
|
|
862
863
|
platform: a,
|
|
863
|
-
elements:
|
|
864
|
-
} =
|
|
865
|
-
apply:
|
|
864
|
+
elements: i
|
|
865
|
+
} = n, {
|
|
866
|
+
apply: c = () => {
|
|
866
867
|
},
|
|
867
|
-
...
|
|
868
|
-
} = ye(e,
|
|
869
|
-
width:
|
|
868
|
+
...f
|
|
869
|
+
} = ye(e, n), d = await a.detectOverflow(n, f), l = ce(o), b = xe(o), u = ne(o) === "y", {
|
|
870
|
+
width: v,
|
|
870
871
|
height: m
|
|
871
872
|
} = r.floating;
|
|
872
|
-
let
|
|
873
|
-
|
|
874
|
-
const C = m - d.top - d.bottom,
|
|
875
|
-
let $ =
|
|
876
|
-
if ((
|
|
877
|
-
const W = q(d.left, 0), Y = q(d.right, 0),
|
|
878
|
-
|
|
873
|
+
let y, p;
|
|
874
|
+
l === "top" || l === "bottom" ? (y = l, p = b === (await (a.isRTL == null ? void 0 : a.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (p = l, y = b === "end" ? "top" : "bottom");
|
|
875
|
+
const C = m - d.top - d.bottom, D = v - d.left - d.right, A = ie(m - d[y], C), T = ie(v - d[p], D), S = !n.middlewareData.shift;
|
|
876
|
+
let $ = A, M = T;
|
|
877
|
+
if ((t = n.middlewareData.shift) != null && t.enabled.x && (M = D), (s = n.middlewareData.shift) != null && s.enabled.y && ($ = C), S && !b) {
|
|
878
|
+
const W = q(d.left, 0), Y = q(d.right, 0), X = q(d.top, 0), x = q(d.bottom, 0);
|
|
879
|
+
u ? M = v - 2 * (W !== 0 || Y !== 0 ? W + Y : q(d.left, d.right)) : $ = m - 2 * (X !== 0 || x !== 0 ? X + x : q(d.top, d.bottom));
|
|
879
880
|
}
|
|
880
|
-
await
|
|
881
|
-
...
|
|
882
|
-
availableWidth:
|
|
881
|
+
await c({
|
|
882
|
+
...n,
|
|
883
|
+
availableWidth: M,
|
|
883
884
|
availableHeight: $
|
|
884
885
|
});
|
|
885
|
-
const
|
|
886
|
-
return
|
|
886
|
+
const I = await a.getDimensions(i.floating);
|
|
887
|
+
return v !== I.width || m !== I.height ? {
|
|
887
888
|
reset: {
|
|
888
889
|
rects: !0
|
|
889
890
|
}
|
|
@@ -891,84 +892,84 @@ const nn = function(e) {
|
|
|
891
892
|
}
|
|
892
893
|
};
|
|
893
894
|
};
|
|
894
|
-
function
|
|
895
|
+
function ze() {
|
|
895
896
|
return typeof window < "u";
|
|
896
897
|
}
|
|
897
|
-
function
|
|
898
|
-
return
|
|
898
|
+
function be(e) {
|
|
899
|
+
return Ue(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
899
900
|
}
|
|
900
901
|
function U(e) {
|
|
901
|
-
var
|
|
902
|
-
return (e == null || (
|
|
902
|
+
var n;
|
|
903
|
+
return (e == null || (n = e.ownerDocument) == null ? void 0 : n.defaultView) || window;
|
|
903
904
|
}
|
|
904
|
-
function
|
|
905
|
-
var
|
|
906
|
-
return (
|
|
905
|
+
function te(e) {
|
|
906
|
+
var n;
|
|
907
|
+
return (n = (Ue(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : n.documentElement;
|
|
907
908
|
}
|
|
908
|
-
function
|
|
909
|
-
return
|
|
909
|
+
function Ue(e) {
|
|
910
|
+
return ze() ? e instanceof Node || e instanceof U(e).Node : !1;
|
|
910
911
|
}
|
|
911
|
-
function
|
|
912
|
-
return
|
|
912
|
+
function J(e) {
|
|
913
|
+
return ze() ? e instanceof Element || e instanceof U(e).Element : !1;
|
|
913
914
|
}
|
|
914
|
-
function
|
|
915
|
-
return
|
|
915
|
+
function _(e) {
|
|
916
|
+
return ze() ? e instanceof HTMLElement || e instanceof U(e).HTMLElement : !1;
|
|
916
917
|
}
|
|
917
|
-
function
|
|
918
|
-
return !
|
|
918
|
+
function _e(e) {
|
|
919
|
+
return !ze() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
|
|
919
920
|
}
|
|
920
|
-
const
|
|
921
|
-
function
|
|
921
|
+
const on = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
922
|
+
function Ce(e) {
|
|
922
923
|
const {
|
|
923
|
-
overflow:
|
|
924
|
-
overflowX:
|
|
925
|
-
overflowY:
|
|
926
|
-
display:
|
|
927
|
-
} =
|
|
928
|
-
return /auto|scroll|overlay|hidden|clip/.test(
|
|
929
|
-
}
|
|
930
|
-
const
|
|
931
|
-
function
|
|
932
|
-
return
|
|
933
|
-
}
|
|
934
|
-
const
|
|
935
|
-
function
|
|
936
|
-
return
|
|
924
|
+
overflow: n,
|
|
925
|
+
overflowX: t,
|
|
926
|
+
overflowY: s,
|
|
927
|
+
display: o
|
|
928
|
+
} = Q(e);
|
|
929
|
+
return /auto|scroll|overlay|hidden|clip/.test(n + s + t) && !on.has(o);
|
|
930
|
+
}
|
|
931
|
+
const rn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
932
|
+
function an(e) {
|
|
933
|
+
return rn.has(be(e));
|
|
934
|
+
}
|
|
935
|
+
const ln = [":popover-open", ":modal"];
|
|
936
|
+
function Ee(e) {
|
|
937
|
+
return ln.some((n) => {
|
|
937
938
|
try {
|
|
938
|
-
return e.matches(
|
|
939
|
+
return e.matches(n);
|
|
939
940
|
} catch {
|
|
940
941
|
return !1;
|
|
941
942
|
}
|
|
942
943
|
});
|
|
943
944
|
}
|
|
944
|
-
const
|
|
945
|
-
function
|
|
946
|
-
const
|
|
947
|
-
return
|
|
948
|
-
}
|
|
949
|
-
function
|
|
950
|
-
let
|
|
951
|
-
for (;
|
|
952
|
-
if (
|
|
953
|
-
return
|
|
954
|
-
if (
|
|
945
|
+
const cn = ["transform", "translate", "scale", "rotate", "perspective"], dn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], un = ["paint", "layout", "strict", "content"];
|
|
946
|
+
function Xe(e) {
|
|
947
|
+
const n = Ye(), t = J(e) ? Q(e) : e;
|
|
948
|
+
return cn.some((s) => t[s] ? t[s] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !n && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !n && (t.filter ? t.filter !== "none" : !1) || dn.some((s) => (t.willChange || "").includes(s)) || un.some((s) => (t.contain || "").includes(s));
|
|
949
|
+
}
|
|
950
|
+
function fn(e) {
|
|
951
|
+
let n = de(e);
|
|
952
|
+
for (; _(n) && !pe(n); ) {
|
|
953
|
+
if (Xe(n))
|
|
954
|
+
return n;
|
|
955
|
+
if (Ee(n))
|
|
955
956
|
return null;
|
|
956
|
-
|
|
957
|
+
n = de(n);
|
|
957
958
|
}
|
|
958
959
|
return null;
|
|
959
960
|
}
|
|
960
|
-
function
|
|
961
|
+
function Ye() {
|
|
961
962
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
962
963
|
}
|
|
963
|
-
const
|
|
964
|
-
function
|
|
965
|
-
return
|
|
964
|
+
const bn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
965
|
+
function pe(e) {
|
|
966
|
+
return bn.has(be(e));
|
|
966
967
|
}
|
|
967
|
-
function
|
|
968
|
+
function Q(e) {
|
|
968
969
|
return U(e).getComputedStyle(e);
|
|
969
970
|
}
|
|
970
971
|
function Me(e) {
|
|
971
|
-
return
|
|
972
|
+
return J(e) ? {
|
|
972
973
|
scrollLeft: e.scrollLeft,
|
|
973
974
|
scrollTop: e.scrollTop
|
|
974
975
|
} : {
|
|
@@ -977,543 +978,543 @@ function Me(e) {
|
|
|
977
978
|
};
|
|
978
979
|
}
|
|
979
980
|
function de(e) {
|
|
980
|
-
if (
|
|
981
|
+
if (be(e) === "html")
|
|
981
982
|
return e;
|
|
982
|
-
const
|
|
983
|
+
const n = (
|
|
983
984
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
984
985
|
e.assignedSlot || // DOM Element detected.
|
|
985
986
|
e.parentNode || // ShadowRoot detected.
|
|
986
|
-
|
|
987
|
-
|
|
987
|
+
_e(e) && e.host || // Fallback.
|
|
988
|
+
te(e)
|
|
988
989
|
);
|
|
989
|
-
return
|
|
990
|
+
return _e(n) ? n.host : n;
|
|
990
991
|
}
|
|
991
|
-
function
|
|
992
|
-
const
|
|
993
|
-
return
|
|
992
|
+
function ut(e) {
|
|
993
|
+
const n = de(e);
|
|
994
|
+
return pe(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : _(n) && Ce(n) ? n : ut(n);
|
|
994
995
|
}
|
|
995
|
-
function
|
|
996
|
-
var
|
|
997
|
-
|
|
998
|
-
const
|
|
996
|
+
function $e(e, n, t) {
|
|
997
|
+
var s;
|
|
998
|
+
n === void 0 && (n = []), t === void 0 && (t = !0);
|
|
999
|
+
const o = ut(e), r = o === ((s = e.ownerDocument) == null ? void 0 : s.body), a = U(o);
|
|
999
1000
|
if (r) {
|
|
1000
|
-
const
|
|
1001
|
-
return
|
|
1001
|
+
const i = We(a);
|
|
1002
|
+
return n.concat(a, a.visualViewport || [], Ce(o) ? o : [], i && t ? $e(i) : []);
|
|
1002
1003
|
}
|
|
1003
|
-
return
|
|
1004
|
+
return n.concat(o, $e(o, [], t));
|
|
1004
1005
|
}
|
|
1005
|
-
function
|
|
1006
|
+
function We(e) {
|
|
1006
1007
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1007
1008
|
}
|
|
1008
|
-
function
|
|
1009
|
-
const
|
|
1010
|
-
let
|
|
1011
|
-
const
|
|
1012
|
-
return
|
|
1013
|
-
width:
|
|
1014
|
-
height:
|
|
1015
|
-
$:
|
|
1009
|
+
function ft(e) {
|
|
1010
|
+
const n = Q(e);
|
|
1011
|
+
let t = parseFloat(n.width) || 0, s = parseFloat(n.height) || 0;
|
|
1012
|
+
const o = _(e), r = o ? e.offsetWidth : t, a = o ? e.offsetHeight : s, i = Ve(t) !== r || Ve(s) !== a;
|
|
1013
|
+
return i && (t = r, s = a), {
|
|
1014
|
+
width: t,
|
|
1015
|
+
height: s,
|
|
1016
|
+
$: i
|
|
1016
1017
|
};
|
|
1017
1018
|
}
|
|
1018
|
-
function
|
|
1019
|
-
return
|
|
1019
|
+
function Ge(e) {
|
|
1020
|
+
return J(e) ? e : e.contextElement;
|
|
1020
1021
|
}
|
|
1021
1022
|
function ve(e) {
|
|
1022
|
-
const
|
|
1023
|
-
if (!
|
|
1024
|
-
return
|
|
1025
|
-
const
|
|
1026
|
-
width:
|
|
1027
|
-
height:
|
|
1023
|
+
const n = Ge(e);
|
|
1024
|
+
if (!_(n))
|
|
1025
|
+
return Z(1);
|
|
1026
|
+
const t = n.getBoundingClientRect(), {
|
|
1027
|
+
width: s,
|
|
1028
|
+
height: o,
|
|
1028
1029
|
$: r
|
|
1029
|
-
} =
|
|
1030
|
-
let a = (r ?
|
|
1031
|
-
return (!a || !Number.isFinite(a)) && (a = 1), (!
|
|
1030
|
+
} = ft(n);
|
|
1031
|
+
let a = (r ? Ve(t.width) : t.width) / s, i = (r ? Ve(t.height) : t.height) / o;
|
|
1032
|
+
return (!a || !Number.isFinite(a)) && (a = 1), (!i || !Number.isFinite(i)) && (i = 1), {
|
|
1032
1033
|
x: a,
|
|
1033
|
-
y:
|
|
1034
|
+
y: i
|
|
1034
1035
|
};
|
|
1035
1036
|
}
|
|
1036
|
-
const
|
|
1037
|
-
function
|
|
1038
|
-
const
|
|
1039
|
-
return !
|
|
1040
|
-
x:
|
|
1041
|
-
y:
|
|
1037
|
+
const mn = /* @__PURE__ */ Z(0);
|
|
1038
|
+
function bt(e) {
|
|
1039
|
+
const n = U(e);
|
|
1040
|
+
return !Ye() || !n.visualViewport ? mn : {
|
|
1041
|
+
x: n.visualViewport.offsetLeft,
|
|
1042
|
+
y: n.visualViewport.offsetTop
|
|
1042
1043
|
};
|
|
1043
1044
|
}
|
|
1044
|
-
function
|
|
1045
|
-
return
|
|
1045
|
+
function gn(e, n, t) {
|
|
1046
|
+
return n === void 0 && (n = !1), !t || n && t !== U(e) ? !1 : n;
|
|
1046
1047
|
}
|
|
1047
|
-
function
|
|
1048
|
-
|
|
1049
|
-
const
|
|
1050
|
-
let a =
|
|
1051
|
-
|
|
1052
|
-
const
|
|
1053
|
-
let
|
|
1048
|
+
function ue(e, n, t, s) {
|
|
1049
|
+
n === void 0 && (n = !1), t === void 0 && (t = !1);
|
|
1050
|
+
const o = e.getBoundingClientRect(), r = Ge(e);
|
|
1051
|
+
let a = Z(1);
|
|
1052
|
+
n && (s ? J(s) && (a = ve(s)) : a = ve(e));
|
|
1053
|
+
const i = gn(r, t, s) ? bt(r) : Z(0);
|
|
1054
|
+
let c = (o.left + i.x) / a.x, f = (o.top + i.y) / a.y, d = o.width / a.x, l = o.height / a.y;
|
|
1054
1055
|
if (r) {
|
|
1055
|
-
const b = U(r),
|
|
1056
|
-
let
|
|
1057
|
-
for (; m &&
|
|
1058
|
-
const
|
|
1059
|
-
|
|
1056
|
+
const b = U(r), u = s && J(s) ? U(s) : s;
|
|
1057
|
+
let v = b, m = We(v);
|
|
1058
|
+
for (; m && s && u !== v; ) {
|
|
1059
|
+
const y = ve(m), p = m.getBoundingClientRect(), C = Q(m), D = p.left + (m.clientLeft + parseFloat(C.paddingLeft)) * y.x, A = p.top + (m.clientTop + parseFloat(C.paddingTop)) * y.y;
|
|
1060
|
+
c *= y.x, f *= y.y, d *= y.x, l *= y.y, c += D, f += A, v = U(m), m = We(v);
|
|
1060
1061
|
}
|
|
1061
1062
|
}
|
|
1062
|
-
return
|
|
1063
|
+
return Le({
|
|
1063
1064
|
width: d,
|
|
1064
|
-
height:
|
|
1065
|
-
x:
|
|
1066
|
-
y:
|
|
1065
|
+
height: l,
|
|
1066
|
+
x: c,
|
|
1067
|
+
y: f
|
|
1067
1068
|
});
|
|
1068
1069
|
}
|
|
1069
|
-
function je(e,
|
|
1070
|
-
const
|
|
1071
|
-
return
|
|
1070
|
+
function je(e, n) {
|
|
1071
|
+
const t = Me(e).scrollLeft;
|
|
1072
|
+
return n ? n.left + t : ue(te(e)).left + t;
|
|
1072
1073
|
}
|
|
1073
|
-
function
|
|
1074
|
-
const
|
|
1074
|
+
function mt(e, n) {
|
|
1075
|
+
const t = e.getBoundingClientRect(), s = t.left + n.scrollLeft - je(e, t), o = t.top + n.scrollTop;
|
|
1075
1076
|
return {
|
|
1076
|
-
x:
|
|
1077
|
-
y:
|
|
1077
|
+
x: s,
|
|
1078
|
+
y: o
|
|
1078
1079
|
};
|
|
1079
1080
|
}
|
|
1080
|
-
function
|
|
1081
|
+
function hn(e) {
|
|
1081
1082
|
let {
|
|
1082
|
-
elements:
|
|
1083
|
-
rect:
|
|
1084
|
-
offsetParent:
|
|
1085
|
-
strategy:
|
|
1083
|
+
elements: n,
|
|
1084
|
+
rect: t,
|
|
1085
|
+
offsetParent: s,
|
|
1086
|
+
strategy: o
|
|
1086
1087
|
} = e;
|
|
1087
|
-
const r =
|
|
1088
|
-
if (
|
|
1089
|
-
return
|
|
1090
|
-
let
|
|
1088
|
+
const r = o === "fixed", a = te(s), i = n ? Ee(n.floating) : !1;
|
|
1089
|
+
if (s === a || i && r)
|
|
1090
|
+
return t;
|
|
1091
|
+
let c = {
|
|
1091
1092
|
scrollLeft: 0,
|
|
1092
1093
|
scrollTop: 0
|
|
1093
|
-
},
|
|
1094
|
-
const d =
|
|
1095
|
-
if ((
|
|
1096
|
-
const
|
|
1097
|
-
|
|
1094
|
+
}, f = Z(1);
|
|
1095
|
+
const d = Z(0), l = _(s);
|
|
1096
|
+
if ((l || !l && !r) && ((be(s) !== "body" || Ce(a)) && (c = Me(s)), _(s))) {
|
|
1097
|
+
const u = ue(s);
|
|
1098
|
+
f = ve(s), d.x = u.x + s.clientLeft, d.y = u.y + s.clientTop;
|
|
1098
1099
|
}
|
|
1099
|
-
const b = a && !
|
|
1100
|
+
const b = a && !l && !r ? mt(a, c) : Z(0);
|
|
1100
1101
|
return {
|
|
1101
|
-
width:
|
|
1102
|
-
height:
|
|
1103
|
-
x:
|
|
1104
|
-
y:
|
|
1102
|
+
width: t.width * f.x,
|
|
1103
|
+
height: t.height * f.y,
|
|
1104
|
+
x: t.x * f.x - c.scrollLeft * f.x + d.x + b.x,
|
|
1105
|
+
y: t.y * f.y - c.scrollTop * f.y + d.y + b.y
|
|
1105
1106
|
};
|
|
1106
1107
|
}
|
|
1107
1108
|
function vn(e) {
|
|
1108
1109
|
return Array.from(e.getClientRects());
|
|
1109
1110
|
}
|
|
1110
|
-
function
|
|
1111
|
-
const
|
|
1112
|
-
let a = -
|
|
1113
|
-
const
|
|
1114
|
-
return
|
|
1115
|
-
width:
|
|
1111
|
+
function pn(e) {
|
|
1112
|
+
const n = te(e), t = Me(e), s = e.ownerDocument.body, o = q(n.scrollWidth, n.clientWidth, s.scrollWidth, s.clientWidth), r = q(n.scrollHeight, n.clientHeight, s.scrollHeight, s.clientHeight);
|
|
1113
|
+
let a = -t.scrollLeft + je(e);
|
|
1114
|
+
const i = -t.scrollTop;
|
|
1115
|
+
return Q(s).direction === "rtl" && (a += q(n.clientWidth, s.clientWidth) - o), {
|
|
1116
|
+
width: o,
|
|
1116
1117
|
height: r,
|
|
1117
1118
|
x: a,
|
|
1118
|
-
y:
|
|
1119
|
+
y: i
|
|
1119
1120
|
};
|
|
1120
1121
|
}
|
|
1121
|
-
const
|
|
1122
|
-
function yn(e,
|
|
1123
|
-
const
|
|
1124
|
-
let r =
|
|
1125
|
-
if (
|
|
1126
|
-
r =
|
|
1127
|
-
const d =
|
|
1128
|
-
(!d || d &&
|
|
1122
|
+
const et = 25;
|
|
1123
|
+
function yn(e, n) {
|
|
1124
|
+
const t = U(e), s = te(e), o = t.visualViewport;
|
|
1125
|
+
let r = s.clientWidth, a = s.clientHeight, i = 0, c = 0;
|
|
1126
|
+
if (o) {
|
|
1127
|
+
r = o.width, a = o.height;
|
|
1128
|
+
const d = Ye();
|
|
1129
|
+
(!d || d && n === "fixed") && (i = o.offsetLeft, c = o.offsetTop);
|
|
1129
1130
|
}
|
|
1130
|
-
const
|
|
1131
|
-
if (
|
|
1132
|
-
const d =
|
|
1133
|
-
|
|
1134
|
-
} else
|
|
1131
|
+
const f = je(s);
|
|
1132
|
+
if (f <= 0) {
|
|
1133
|
+
const d = s.ownerDocument, l = d.body, b = getComputedStyle(l), u = d.compatMode === "CSS1Compat" && parseFloat(b.marginLeft) + parseFloat(b.marginRight) || 0, v = Math.abs(s.clientWidth - l.clientWidth - u);
|
|
1134
|
+
v <= et && (r -= v);
|
|
1135
|
+
} else f <= et && (r += f);
|
|
1135
1136
|
return {
|
|
1136
1137
|
width: r,
|
|
1137
1138
|
height: a,
|
|
1138
|
-
x:
|
|
1139
|
-
y:
|
|
1139
|
+
x: i,
|
|
1140
|
+
y: c
|
|
1140
1141
|
};
|
|
1141
1142
|
}
|
|
1142
|
-
const
|
|
1143
|
-
function
|
|
1144
|
-
const
|
|
1143
|
+
const xn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1144
|
+
function wn(e, n) {
|
|
1145
|
+
const t = ue(e, !0, n === "fixed"), s = t.top + e.clientTop, o = t.left + e.clientLeft, r = _(e) ? ve(e) : Z(1), a = e.clientWidth * r.x, i = e.clientHeight * r.y, c = o * r.x, f = s * r.y;
|
|
1145
1146
|
return {
|
|
1146
1147
|
width: a,
|
|
1147
|
-
height:
|
|
1148
|
-
x:
|
|
1149
|
-
y:
|
|
1148
|
+
height: i,
|
|
1149
|
+
x: c,
|
|
1150
|
+
y: f
|
|
1150
1151
|
};
|
|
1151
1152
|
}
|
|
1152
|
-
function
|
|
1153
|
-
let
|
|
1154
|
-
if (
|
|
1155
|
-
|
|
1156
|
-
else if (
|
|
1157
|
-
|
|
1158
|
-
else if (
|
|
1159
|
-
|
|
1153
|
+
function tt(e, n, t) {
|
|
1154
|
+
let s;
|
|
1155
|
+
if (n === "viewport")
|
|
1156
|
+
s = yn(e, t);
|
|
1157
|
+
else if (n === "document")
|
|
1158
|
+
s = pn(te(e));
|
|
1159
|
+
else if (J(n))
|
|
1160
|
+
s = wn(n, t);
|
|
1160
1161
|
else {
|
|
1161
|
-
const
|
|
1162
|
-
|
|
1163
|
-
x:
|
|
1164
|
-
y:
|
|
1165
|
-
width:
|
|
1166
|
-
height:
|
|
1162
|
+
const o = bt(e);
|
|
1163
|
+
s = {
|
|
1164
|
+
x: n.x - o.x,
|
|
1165
|
+
y: n.y - o.y,
|
|
1166
|
+
width: n.width,
|
|
1167
|
+
height: n.height
|
|
1167
1168
|
};
|
|
1168
1169
|
}
|
|
1169
|
-
return
|
|
1170
|
+
return Le(s);
|
|
1170
1171
|
}
|
|
1171
|
-
function
|
|
1172
|
-
const
|
|
1173
|
-
return
|
|
1172
|
+
function gt(e, n) {
|
|
1173
|
+
const t = de(e);
|
|
1174
|
+
return t === n || !J(t) || pe(t) ? !1 : Q(t).position === "fixed" || gt(t, n);
|
|
1174
1175
|
}
|
|
1175
|
-
function
|
|
1176
|
-
const
|
|
1177
|
-
if (
|
|
1178
|
-
return
|
|
1179
|
-
let
|
|
1180
|
-
const r =
|
|
1176
|
+
function kn(e, n) {
|
|
1177
|
+
const t = n.get(e);
|
|
1178
|
+
if (t)
|
|
1179
|
+
return t;
|
|
1180
|
+
let s = $e(e, [], !1).filter((i) => J(i) && be(i) !== "body"), o = null;
|
|
1181
|
+
const r = Q(e).position === "fixed";
|
|
1181
1182
|
let a = r ? de(e) : e;
|
|
1182
|
-
for (;
|
|
1183
|
-
const
|
|
1184
|
-
!
|
|
1183
|
+
for (; J(a) && !pe(a); ) {
|
|
1184
|
+
const i = Q(a), c = Xe(a);
|
|
1185
|
+
!c && i.position === "fixed" && (o = null), (r ? !c && !o : !c && i.position === "static" && !!o && xn.has(o.position) || Ce(a) && !c && gt(e, a)) ? s = s.filter((d) => d !== a) : o = i, a = de(a);
|
|
1185
1186
|
}
|
|
1186
|
-
return
|
|
1187
|
+
return n.set(e, s), s;
|
|
1187
1188
|
}
|
|
1188
|
-
function
|
|
1189
|
+
function $n(e) {
|
|
1189
1190
|
let {
|
|
1190
|
-
element:
|
|
1191
|
-
boundary:
|
|
1192
|
-
rootBoundary:
|
|
1193
|
-
strategy:
|
|
1191
|
+
element: n,
|
|
1192
|
+
boundary: t,
|
|
1193
|
+
rootBoundary: s,
|
|
1194
|
+
strategy: o
|
|
1194
1195
|
} = e;
|
|
1195
|
-
const a = [...
|
|
1196
|
-
const
|
|
1197
|
-
return
|
|
1198
|
-
},
|
|
1196
|
+
const a = [...t === "clippingAncestors" ? Ee(n) ? [] : kn(n, this._c) : [].concat(t), s], i = a[0], c = a.reduce((f, d) => {
|
|
1197
|
+
const l = tt(n, d, o);
|
|
1198
|
+
return f.top = q(l.top, f.top), f.right = ie(l.right, f.right), f.bottom = ie(l.bottom, f.bottom), f.left = q(l.left, f.left), f;
|
|
1199
|
+
}, tt(n, i, o));
|
|
1199
1200
|
return {
|
|
1200
|
-
width:
|
|
1201
|
-
height:
|
|
1202
|
-
x:
|
|
1203
|
-
y:
|
|
1201
|
+
width: c.right - c.left,
|
|
1202
|
+
height: c.bottom - c.top,
|
|
1203
|
+
x: c.left,
|
|
1204
|
+
y: c.top
|
|
1204
1205
|
};
|
|
1205
1206
|
}
|
|
1206
|
-
function
|
|
1207
|
+
function Cn(e) {
|
|
1207
1208
|
const {
|
|
1208
|
-
width:
|
|
1209
|
-
height:
|
|
1210
|
-
} =
|
|
1209
|
+
width: n,
|
|
1210
|
+
height: t
|
|
1211
|
+
} = ft(e);
|
|
1211
1212
|
return {
|
|
1212
|
-
width:
|
|
1213
|
-
height:
|
|
1213
|
+
width: n,
|
|
1214
|
+
height: t
|
|
1214
1215
|
};
|
|
1215
1216
|
}
|
|
1216
|
-
function Dn(e,
|
|
1217
|
-
const
|
|
1218
|
-
let
|
|
1217
|
+
function Dn(e, n, t) {
|
|
1218
|
+
const s = _(n), o = te(n), r = t === "fixed", a = ue(e, !0, r, n);
|
|
1219
|
+
let i = {
|
|
1219
1220
|
scrollLeft: 0,
|
|
1220
1221
|
scrollTop: 0
|
|
1221
1222
|
};
|
|
1222
|
-
const
|
|
1223
|
-
function
|
|
1224
|
-
|
|
1223
|
+
const c = Z(0);
|
|
1224
|
+
function f() {
|
|
1225
|
+
c.x = je(o);
|
|
1225
1226
|
}
|
|
1226
|
-
if (
|
|
1227
|
-
if ((
|
|
1228
|
-
const
|
|
1229
|
-
|
|
1230
|
-
} else
|
|
1231
|
-
r && !
|
|
1232
|
-
const d =
|
|
1227
|
+
if (s || !s && !r)
|
|
1228
|
+
if ((be(n) !== "body" || Ce(o)) && (i = Me(n)), s) {
|
|
1229
|
+
const u = ue(n, !0, r, n);
|
|
1230
|
+
c.x = u.x + n.clientLeft, c.y = u.y + n.clientTop;
|
|
1231
|
+
} else o && f();
|
|
1232
|
+
r && !s && o && f();
|
|
1233
|
+
const d = o && !s && !r ? mt(o, i) : Z(0), l = a.left + i.scrollLeft - c.x - d.x, b = a.top + i.scrollTop - c.y - d.y;
|
|
1233
1234
|
return {
|
|
1234
|
-
x:
|
|
1235
|
+
x: l,
|
|
1235
1236
|
y: b,
|
|
1236
1237
|
width: a.width,
|
|
1237
1238
|
height: a.height
|
|
1238
1239
|
};
|
|
1239
1240
|
}
|
|
1240
1241
|
function Ie(e) {
|
|
1241
|
-
return
|
|
1242
|
+
return Q(e).position === "static";
|
|
1242
1243
|
}
|
|
1243
|
-
function
|
|
1244
|
-
if (!
|
|
1244
|
+
function nt(e, n) {
|
|
1245
|
+
if (!_(e) || Q(e).position === "fixed")
|
|
1245
1246
|
return null;
|
|
1246
|
-
if (
|
|
1247
|
-
return
|
|
1248
|
-
let
|
|
1249
|
-
return
|
|
1247
|
+
if (n)
|
|
1248
|
+
return n(e);
|
|
1249
|
+
let t = e.offsetParent;
|
|
1250
|
+
return te(e) === t && (t = t.ownerDocument.body), t;
|
|
1250
1251
|
}
|
|
1251
|
-
function
|
|
1252
|
-
const
|
|
1253
|
-
if (
|
|
1254
|
-
return
|
|
1255
|
-
if (!
|
|
1256
|
-
let
|
|
1257
|
-
for (;
|
|
1258
|
-
if (
|
|
1259
|
-
return
|
|
1260
|
-
|
|
1252
|
+
function ht(e, n) {
|
|
1253
|
+
const t = U(e);
|
|
1254
|
+
if (Ee(e))
|
|
1255
|
+
return t;
|
|
1256
|
+
if (!_(e)) {
|
|
1257
|
+
let o = de(e);
|
|
1258
|
+
for (; o && !pe(o); ) {
|
|
1259
|
+
if (J(o) && !Ie(o))
|
|
1260
|
+
return o;
|
|
1261
|
+
o = de(o);
|
|
1261
1262
|
}
|
|
1262
|
-
return
|
|
1263
|
+
return t;
|
|
1263
1264
|
}
|
|
1264
|
-
let
|
|
1265
|
-
for (;
|
|
1266
|
-
|
|
1267
|
-
return
|
|
1265
|
+
let s = nt(e, n);
|
|
1266
|
+
for (; s && an(s) && Ie(s); )
|
|
1267
|
+
s = nt(s, n);
|
|
1268
|
+
return s && pe(s) && Ie(s) && !Xe(s) ? t : s || fn(e) || t;
|
|
1268
1269
|
}
|
|
1269
|
-
const
|
|
1270
|
-
const
|
|
1270
|
+
const Tn = async function(e) {
|
|
1271
|
+
const n = this.getOffsetParent || ht, t = this.getDimensions, s = await t(e.floating);
|
|
1271
1272
|
return {
|
|
1272
|
-
reference: Dn(e.reference, await
|
|
1273
|
+
reference: Dn(e.reference, await n(e.floating), e.strategy),
|
|
1273
1274
|
floating: {
|
|
1274
1275
|
x: 0,
|
|
1275
1276
|
y: 0,
|
|
1276
|
-
width:
|
|
1277
|
-
height:
|
|
1277
|
+
width: s.width,
|
|
1278
|
+
height: s.height
|
|
1278
1279
|
}
|
|
1279
1280
|
};
|
|
1280
1281
|
};
|
|
1281
|
-
function
|
|
1282
|
-
return
|
|
1283
|
-
}
|
|
1284
|
-
const
|
|
1285
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1286
|
-
getDocumentElement:
|
|
1287
|
-
getClippingRect:
|
|
1288
|
-
getOffsetParent:
|
|
1289
|
-
getElementRects:
|
|
1282
|
+
function Vn(e) {
|
|
1283
|
+
return Q(e).direction === "rtl";
|
|
1284
|
+
}
|
|
1285
|
+
const Rn = {
|
|
1286
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: hn,
|
|
1287
|
+
getDocumentElement: te,
|
|
1288
|
+
getClippingRect: $n,
|
|
1289
|
+
getOffsetParent: ht,
|
|
1290
|
+
getElementRects: Tn,
|
|
1290
1291
|
getClientRects: vn,
|
|
1291
|
-
getDimensions:
|
|
1292
|
+
getDimensions: Cn,
|
|
1292
1293
|
getScale: ve,
|
|
1293
|
-
isElement:
|
|
1294
|
-
isRTL:
|
|
1294
|
+
isElement: J,
|
|
1295
|
+
isRTL: Vn
|
|
1295
1296
|
};
|
|
1296
|
-
function vt(e,
|
|
1297
|
-
return e.x ===
|
|
1297
|
+
function vt(e, n) {
|
|
1298
|
+
return e.x === n.x && e.y === n.y && e.width === n.width && e.height === n.height;
|
|
1298
1299
|
}
|
|
1299
|
-
function
|
|
1300
|
-
let
|
|
1301
|
-
const
|
|
1300
|
+
function Ln(e, n) {
|
|
1301
|
+
let t = null, s;
|
|
1302
|
+
const o = te(e);
|
|
1302
1303
|
function r() {
|
|
1303
|
-
var
|
|
1304
|
-
clearTimeout(
|
|
1304
|
+
var i;
|
|
1305
|
+
clearTimeout(s), (i = t) == null || i.disconnect(), t = null;
|
|
1305
1306
|
}
|
|
1306
|
-
function a(
|
|
1307
|
-
|
|
1308
|
-
const
|
|
1307
|
+
function a(i, c) {
|
|
1308
|
+
i === void 0 && (i = !1), c === void 0 && (c = 1), r();
|
|
1309
|
+
const f = e.getBoundingClientRect(), {
|
|
1309
1310
|
left: d,
|
|
1310
|
-
top:
|
|
1311
|
+
top: l,
|
|
1311
1312
|
width: b,
|
|
1312
|
-
height:
|
|
1313
|
-
} =
|
|
1314
|
-
if (
|
|
1313
|
+
height: u
|
|
1314
|
+
} = f;
|
|
1315
|
+
if (i || n(), !b || !u)
|
|
1315
1316
|
return;
|
|
1316
|
-
const
|
|
1317
|
-
rootMargin: -
|
|
1318
|
-
threshold: q(0, ie(1,
|
|
1317
|
+
const v = De(l), m = De(o.clientWidth - (d + b)), y = De(o.clientHeight - (l + u)), p = De(d), D = {
|
|
1318
|
+
rootMargin: -v + "px " + -m + "px " + -y + "px " + -p + "px",
|
|
1319
|
+
threshold: q(0, ie(1, c)) || 1
|
|
1319
1320
|
};
|
|
1320
|
-
let
|
|
1321
|
-
function
|
|
1322
|
-
const $ =
|
|
1323
|
-
if ($ !==
|
|
1324
|
-
if (!
|
|
1321
|
+
let A = !0;
|
|
1322
|
+
function T(S) {
|
|
1323
|
+
const $ = S[0].intersectionRatio;
|
|
1324
|
+
if ($ !== c) {
|
|
1325
|
+
if (!A)
|
|
1325
1326
|
return a();
|
|
1326
|
-
$ ? a(!1, $) :
|
|
1327
|
+
$ ? a(!1, $) : s = setTimeout(() => {
|
|
1327
1328
|
a(!1, 1e-7);
|
|
1328
1329
|
}, 1e3);
|
|
1329
1330
|
}
|
|
1330
|
-
$ === 1 && !vt(
|
|
1331
|
+
$ === 1 && !vt(f, e.getBoundingClientRect()) && a(), A = !1;
|
|
1331
1332
|
}
|
|
1332
1333
|
try {
|
|
1333
|
-
|
|
1334
|
-
...
|
|
1334
|
+
t = new IntersectionObserver(T, {
|
|
1335
|
+
...D,
|
|
1335
1336
|
// Handle <iframe>s
|
|
1336
|
-
root:
|
|
1337
|
+
root: o.ownerDocument
|
|
1337
1338
|
});
|
|
1338
1339
|
} catch {
|
|
1339
|
-
|
|
1340
|
+
t = new IntersectionObserver(T, D);
|
|
1340
1341
|
}
|
|
1341
|
-
|
|
1342
|
+
t.observe(e);
|
|
1342
1343
|
}
|
|
1343
1344
|
return a(!0), r;
|
|
1344
1345
|
}
|
|
1345
|
-
function
|
|
1346
|
-
|
|
1346
|
+
function Sn(e, n, t, s) {
|
|
1347
|
+
s === void 0 && (s = {});
|
|
1347
1348
|
const {
|
|
1348
|
-
ancestorScroll:
|
|
1349
|
+
ancestorScroll: o = !0,
|
|
1349
1350
|
ancestorResize: r = !0,
|
|
1350
1351
|
elementResize: a = typeof ResizeObserver == "function",
|
|
1351
|
-
layoutShift:
|
|
1352
|
-
animationFrame:
|
|
1353
|
-
} =
|
|
1354
|
-
d.forEach((
|
|
1355
|
-
|
|
1352
|
+
layoutShift: i = typeof IntersectionObserver == "function",
|
|
1353
|
+
animationFrame: c = !1
|
|
1354
|
+
} = s, f = Ge(e), d = o || r ? [...f ? $e(f) : [], ...$e(n)] : [];
|
|
1355
|
+
d.forEach((p) => {
|
|
1356
|
+
o && p.addEventListener("scroll", t, {
|
|
1356
1357
|
passive: !0
|
|
1357
|
-
}), r &&
|
|
1358
|
+
}), r && p.addEventListener("resize", t);
|
|
1358
1359
|
});
|
|
1359
|
-
const
|
|
1360
|
-
let b = -1,
|
|
1361
|
-
a && (
|
|
1362
|
-
let [C] =
|
|
1363
|
-
C && C.target ===
|
|
1364
|
-
var
|
|
1365
|
-
(
|
|
1366
|
-
})),
|
|
1367
|
-
}),
|
|
1368
|
-
let
|
|
1369
|
-
|
|
1370
|
-
function
|
|
1371
|
-
const
|
|
1372
|
-
m && !vt(m,
|
|
1360
|
+
const l = f && i ? Ln(f, t) : null;
|
|
1361
|
+
let b = -1, u = null;
|
|
1362
|
+
a && (u = new ResizeObserver((p) => {
|
|
1363
|
+
let [C] = p;
|
|
1364
|
+
C && C.target === f && u && (u.unobserve(n), cancelAnimationFrame(b), b = requestAnimationFrame(() => {
|
|
1365
|
+
var D;
|
|
1366
|
+
(D = u) == null || D.observe(n);
|
|
1367
|
+
})), t();
|
|
1368
|
+
}), f && !c && u.observe(f), u.observe(n));
|
|
1369
|
+
let v, m = c ? ue(e) : null;
|
|
1370
|
+
c && y();
|
|
1371
|
+
function y() {
|
|
1372
|
+
const p = ue(e);
|
|
1373
|
+
m && !vt(m, p) && t(), m = p, v = requestAnimationFrame(y);
|
|
1373
1374
|
}
|
|
1374
|
-
return
|
|
1375
|
-
var
|
|
1375
|
+
return t(), () => {
|
|
1376
|
+
var p;
|
|
1376
1377
|
d.forEach((C) => {
|
|
1377
|
-
|
|
1378
|
-
}),
|
|
1378
|
+
o && C.removeEventListener("scroll", t), r && C.removeEventListener("resize", t);
|
|
1379
|
+
}), l == null || l(), (p = u) == null || p.disconnect(), u = null, c && cancelAnimationFrame(v);
|
|
1379
1380
|
};
|
|
1380
1381
|
}
|
|
1381
|
-
const
|
|
1382
|
-
const
|
|
1383
|
-
platform:
|
|
1384
|
-
...
|
|
1382
|
+
const pt = tn, yt = nn, xt = Zt, Bn = sn, An = Qt, On = (e, n, t) => {
|
|
1383
|
+
const s = /* @__PURE__ */ new Map(), o = {
|
|
1384
|
+
platform: Rn,
|
|
1385
|
+
...t
|
|
1385
1386
|
}, r = {
|
|
1386
|
-
...
|
|
1387
|
-
_c:
|
|
1387
|
+
...o.platform,
|
|
1388
|
+
_c: s
|
|
1388
1389
|
};
|
|
1389
|
-
return
|
|
1390
|
-
...
|
|
1390
|
+
return Jt(e, n, {
|
|
1391
|
+
...o,
|
|
1391
1392
|
platform: r
|
|
1392
1393
|
});
|
|
1393
1394
|
};
|
|
1394
|
-
function
|
|
1395
|
+
function zn(e) {
|
|
1395
1396
|
return e != null && typeof e == "object" && "$el" in e;
|
|
1396
1397
|
}
|
|
1397
|
-
function
|
|
1398
|
-
if (
|
|
1399
|
-
const
|
|
1400
|
-
return
|
|
1398
|
+
function He(e) {
|
|
1399
|
+
if (zn(e)) {
|
|
1400
|
+
const n = e.$el;
|
|
1401
|
+
return Ue(n) && be(n) === "#comment" ? null : n;
|
|
1401
1402
|
}
|
|
1402
1403
|
return e;
|
|
1403
1404
|
}
|
|
1404
|
-
function
|
|
1405
|
-
return typeof e == "function" ? e() :
|
|
1405
|
+
function ge(e) {
|
|
1406
|
+
return typeof e == "function" ? e() : B(e);
|
|
1406
1407
|
}
|
|
1407
|
-
function
|
|
1408
|
+
function En(e) {
|
|
1408
1409
|
return {
|
|
1409
1410
|
name: "arrow",
|
|
1410
1411
|
options: e,
|
|
1411
|
-
fn(
|
|
1412
|
-
const
|
|
1413
|
-
return
|
|
1414
|
-
element:
|
|
1412
|
+
fn(n) {
|
|
1413
|
+
const t = He(ge(e.element));
|
|
1414
|
+
return t == null ? {} : An({
|
|
1415
|
+
element: t,
|
|
1415
1416
|
padding: e.padding
|
|
1416
|
-
}).fn(
|
|
1417
|
+
}).fn(n);
|
|
1417
1418
|
}
|
|
1418
1419
|
};
|
|
1419
1420
|
}
|
|
1420
|
-
function
|
|
1421
|
+
function wt(e) {
|
|
1421
1422
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1422
1423
|
}
|
|
1423
|
-
function st(e,
|
|
1424
|
-
const
|
|
1425
|
-
return Math.round(
|
|
1424
|
+
function st(e, n) {
|
|
1425
|
+
const t = wt(e);
|
|
1426
|
+
return Math.round(n * t) / t;
|
|
1426
1427
|
}
|
|
1427
|
-
function
|
|
1428
|
-
|
|
1429
|
-
const
|
|
1430
|
-
var $;
|
|
1431
|
-
return ($ = he(n.open)) != null ? $ : !0;
|
|
1432
|
-
}), r = w(() => he(n.middleware)), a = w(() => {
|
|
1428
|
+
function kt(e, n, t) {
|
|
1429
|
+
t === void 0 && (t = {});
|
|
1430
|
+
const s = t.whileElementsMounted, o = w(() => {
|
|
1433
1431
|
var $;
|
|
1434
|
-
return ($ =
|
|
1435
|
-
}),
|
|
1432
|
+
return ($ = ge(t.open)) != null ? $ : !0;
|
|
1433
|
+
}), r = w(() => ge(t.middleware)), a = w(() => {
|
|
1436
1434
|
var $;
|
|
1437
|
-
return ($ =
|
|
1435
|
+
return ($ = ge(t.placement)) != null ? $ : "bottom";
|
|
1438
1436
|
}), i = w(() => {
|
|
1439
1437
|
var $;
|
|
1440
|
-
return ($ =
|
|
1441
|
-
}),
|
|
1438
|
+
return ($ = ge(t.strategy)) != null ? $ : "absolute";
|
|
1439
|
+
}), c = w(() => {
|
|
1440
|
+
var $;
|
|
1441
|
+
return ($ = ge(t.transform)) != null ? $ : !0;
|
|
1442
|
+
}), f = w(() => He(e.value)), d = w(() => He(n.value)), l = j(0), b = j(0), u = j(i.value), v = j(a.value), m = Tt({}), y = j(!1), p = w(() => {
|
|
1442
1443
|
const $ = {
|
|
1443
|
-
position:
|
|
1444
|
+
position: u.value,
|
|
1444
1445
|
left: "0",
|
|
1445
1446
|
top: "0"
|
|
1446
1447
|
};
|
|
1447
1448
|
if (!d.value)
|
|
1448
1449
|
return $;
|
|
1449
|
-
const
|
|
1450
|
-
return
|
|
1450
|
+
const M = st(d.value, l.value), I = st(d.value, b.value);
|
|
1451
|
+
return c.value ? {
|
|
1451
1452
|
...$,
|
|
1452
|
-
transform: "translate(" +
|
|
1453
|
-
...
|
|
1453
|
+
transform: "translate(" + M + "px, " + I + "px)",
|
|
1454
|
+
...wt(d.value) >= 1.5 && {
|
|
1454
1455
|
willChange: "transform"
|
|
1455
1456
|
}
|
|
1456
1457
|
} : {
|
|
1457
|
-
position:
|
|
1458
|
-
left:
|
|
1459
|
-
top:
|
|
1458
|
+
position: u.value,
|
|
1459
|
+
left: M + "px",
|
|
1460
|
+
top: I + "px"
|
|
1460
1461
|
};
|
|
1461
1462
|
});
|
|
1462
1463
|
let C;
|
|
1463
|
-
function
|
|
1464
|
-
if (
|
|
1464
|
+
function D() {
|
|
1465
|
+
if (f.value == null || d.value == null)
|
|
1465
1466
|
return;
|
|
1466
|
-
const $ =
|
|
1467
|
-
|
|
1467
|
+
const $ = o.value;
|
|
1468
|
+
On(f.value, d.value, {
|
|
1468
1469
|
middleware: r.value,
|
|
1469
1470
|
placement: a.value,
|
|
1470
|
-
strategy:
|
|
1471
|
-
}).then((
|
|
1472
|
-
|
|
1471
|
+
strategy: i.value
|
|
1472
|
+
}).then((M) => {
|
|
1473
|
+
l.value = M.x, b.value = M.y, u.value = M.strategy, v.value = M.placement, m.value = M.middlewareData, y.value = $ !== !1;
|
|
1473
1474
|
});
|
|
1474
1475
|
}
|
|
1475
|
-
function
|
|
1476
|
+
function A() {
|
|
1476
1477
|
typeof C == "function" && (C(), C = void 0);
|
|
1477
1478
|
}
|
|
1478
|
-
function
|
|
1479
|
-
if (
|
|
1480
|
-
|
|
1479
|
+
function T() {
|
|
1480
|
+
if (A(), s === void 0) {
|
|
1481
|
+
D();
|
|
1481
1482
|
return;
|
|
1482
1483
|
}
|
|
1483
|
-
if (
|
|
1484
|
-
C =
|
|
1484
|
+
if (f.value != null && d.value != null) {
|
|
1485
|
+
C = s(f.value, d.value, D);
|
|
1485
1486
|
return;
|
|
1486
1487
|
}
|
|
1487
1488
|
}
|
|
1488
|
-
function
|
|
1489
|
-
|
|
1489
|
+
function S() {
|
|
1490
|
+
o.value || (y.value = !1);
|
|
1490
1491
|
}
|
|
1491
|
-
return
|
|
1492
|
+
return he([r, a, i, o], D, {
|
|
1492
1493
|
flush: "sync"
|
|
1493
|
-
}),
|
|
1494
|
+
}), he([f, d], T, {
|
|
1494
1495
|
flush: "sync"
|
|
1495
|
-
}),
|
|
1496
|
+
}), he(o, S, {
|
|
1496
1497
|
flush: "sync"
|
|
1497
|
-
}),
|
|
1498
|
-
x:
|
|
1499
|
-
y:
|
|
1500
|
-
strategy:
|
|
1501
|
-
placement:
|
|
1502
|
-
middlewareData:
|
|
1503
|
-
isPositioned:
|
|
1504
|
-
floatingStyles:
|
|
1505
|
-
update:
|
|
1498
|
+
}), Vt() && Rt(A), {
|
|
1499
|
+
x: me(l),
|
|
1500
|
+
y: me(b),
|
|
1501
|
+
strategy: me(u),
|
|
1502
|
+
placement: me(v),
|
|
1503
|
+
middlewareData: me(m),
|
|
1504
|
+
isPositioned: me(y),
|
|
1505
|
+
floatingStyles: p,
|
|
1506
|
+
update: D
|
|
1506
1507
|
};
|
|
1507
1508
|
}
|
|
1508
|
-
const Mn = /* @__PURE__ */
|
|
1509
|
+
const Mn = /* @__PURE__ */ z({
|
|
1509
1510
|
inheritAttrs: !1,
|
|
1510
1511
|
__name: "DsIconCheck",
|
|
1511
1512
|
setup(e) {
|
|
1512
|
-
return (
|
|
1513
|
+
return (n, t) => (g(), h("svg", fe({
|
|
1513
1514
|
fill: "none",
|
|
1514
1515
|
stroke: "currentColor",
|
|
1515
1516
|
viewBox: "0 0 24 24"
|
|
1516
|
-
},
|
|
1517
|
+
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1517
1518
|
k("path", {
|
|
1518
1519
|
"stroke-linecap": "round",
|
|
1519
1520
|
"stroke-linejoin": "round",
|
|
@@ -1522,15 +1523,15 @@ const Mn = /* @__PURE__ */ S({
|
|
|
1522
1523
|
}, null, -1)
|
|
1523
1524
|
])], 16));
|
|
1524
1525
|
}
|
|
1525
|
-
}), Pe = /* @__PURE__ */
|
|
1526
|
+
}), Pe = /* @__PURE__ */ z({
|
|
1526
1527
|
inheritAttrs: !1,
|
|
1527
1528
|
__name: "DsIconChevronDown",
|
|
1528
1529
|
setup(e) {
|
|
1529
|
-
return (
|
|
1530
|
+
return (n, t) => (g(), h("svg", fe({
|
|
1530
1531
|
fill: "none",
|
|
1531
1532
|
stroke: "currentColor",
|
|
1532
1533
|
viewBox: "0 0 24 24"
|
|
1533
|
-
},
|
|
1534
|
+
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1534
1535
|
k("path", {
|
|
1535
1536
|
"stroke-linecap": "round",
|
|
1536
1537
|
"stroke-linejoin": "round",
|
|
@@ -1539,15 +1540,15 @@ const Mn = /* @__PURE__ */ S({
|
|
|
1539
1540
|
}, null, -1)
|
|
1540
1541
|
])], 16));
|
|
1541
1542
|
}
|
|
1542
|
-
}), jn = /* @__PURE__ */
|
|
1543
|
+
}), jn = /* @__PURE__ */ z({
|
|
1543
1544
|
inheritAttrs: !1,
|
|
1544
1545
|
__name: "DsIconChevronUp",
|
|
1545
1546
|
setup(e) {
|
|
1546
|
-
return (
|
|
1547
|
+
return (n, t) => (g(), h("svg", fe({
|
|
1547
1548
|
fill: "none",
|
|
1548
1549
|
stroke: "currentColor",
|
|
1549
1550
|
viewBox: "0 0 24 24"
|
|
1550
|
-
},
|
|
1551
|
+
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1551
1552
|
k("path", {
|
|
1552
1553
|
"stroke-linecap": "round",
|
|
1553
1554
|
"stroke-linejoin": "round",
|
|
@@ -1556,15 +1557,15 @@ const Mn = /* @__PURE__ */ S({
|
|
|
1556
1557
|
}, null, -1)
|
|
1557
1558
|
])], 16));
|
|
1558
1559
|
}
|
|
1559
|
-
}), Pn = /* @__PURE__ */
|
|
1560
|
+
}), Pn = /* @__PURE__ */ z({
|
|
1560
1561
|
inheritAttrs: !1,
|
|
1561
1562
|
__name: "DsIconInfo",
|
|
1562
1563
|
setup(e) {
|
|
1563
|
-
return (
|
|
1564
|
+
return (n, t) => (g(), h("svg", fe({
|
|
1564
1565
|
fill: "none",
|
|
1565
1566
|
stroke: "currentColor",
|
|
1566
1567
|
viewBox: "0 0 24 24"
|
|
1567
|
-
},
|
|
1568
|
+
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1568
1569
|
k("path", {
|
|
1569
1570
|
"stroke-linecap": "round",
|
|
1570
1571
|
"stroke-linejoin": "round",
|
|
@@ -1573,15 +1574,15 @@ const Mn = /* @__PURE__ */ S({
|
|
|
1573
1574
|
}, null, -1)
|
|
1574
1575
|
])], 16));
|
|
1575
1576
|
}
|
|
1576
|
-
}), In = /* @__PURE__ */
|
|
1577
|
+
}), In = /* @__PURE__ */ z({
|
|
1577
1578
|
inheritAttrs: !1,
|
|
1578
1579
|
__name: "DsIconSort",
|
|
1579
1580
|
setup(e) {
|
|
1580
|
-
return (
|
|
1581
|
+
return (n, t) => (g(), h("svg", fe({
|
|
1581
1582
|
fill: "none",
|
|
1582
1583
|
stroke: "currentColor",
|
|
1583
1584
|
viewBox: "0 0 24 24"
|
|
1584
|
-
},
|
|
1585
|
+
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1585
1586
|
k("path", {
|
|
1586
1587
|
"stroke-linecap": "round",
|
|
1587
1588
|
"stroke-linejoin": "round",
|
|
@@ -1590,15 +1591,15 @@ const Mn = /* @__PURE__ */ S({
|
|
|
1590
1591
|
}, null, -1)
|
|
1591
1592
|
])], 16));
|
|
1592
1593
|
}
|
|
1593
|
-
}),
|
|
1594
|
+
}), $t = /* @__PURE__ */ z({
|
|
1594
1595
|
inheritAttrs: !1,
|
|
1595
1596
|
__name: "DsIconWarning",
|
|
1596
1597
|
setup(e) {
|
|
1597
|
-
return (
|
|
1598
|
+
return (n, t) => (g(), h("svg", fe({
|
|
1598
1599
|
fill: "none",
|
|
1599
1600
|
stroke: "currentColor",
|
|
1600
1601
|
viewBox: "0 0 24 24"
|
|
1601
|
-
},
|
|
1602
|
+
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1602
1603
|
k("path", {
|
|
1603
1604
|
"stroke-linecap": "round",
|
|
1604
1605
|
"stroke-linejoin": "round",
|
|
@@ -1607,15 +1608,15 @@ const Mn = /* @__PURE__ */ S({
|
|
|
1607
1608
|
}, null, -1)
|
|
1608
1609
|
])], 16));
|
|
1609
1610
|
}
|
|
1610
|
-
}),
|
|
1611
|
+
}), Se = /* @__PURE__ */ z({
|
|
1611
1612
|
inheritAttrs: !1,
|
|
1612
1613
|
__name: "DsIconX",
|
|
1613
1614
|
setup(e) {
|
|
1614
|
-
return (
|
|
1615
|
+
return (n, t) => (g(), h("svg", fe({
|
|
1615
1616
|
fill: "none",
|
|
1616
1617
|
stroke: "currentColor",
|
|
1617
1618
|
viewBox: "0 0 24 24"
|
|
1618
|
-
},
|
|
1619
|
+
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1619
1620
|
k("path", {
|
|
1620
1621
|
"stroke-linecap": "round",
|
|
1621
1622
|
"stroke-linejoin": "round",
|
|
@@ -1625,15 +1626,15 @@ const Mn = /* @__PURE__ */ S({
|
|
|
1625
1626
|
])], 16));
|
|
1626
1627
|
}
|
|
1627
1628
|
});
|
|
1628
|
-
let
|
|
1629
|
-
function
|
|
1630
|
-
return `${e}-${++
|
|
1629
|
+
let Fn = 0;
|
|
1630
|
+
function se(e = "ds") {
|
|
1631
|
+
return `${e}-${++Fn}`;
|
|
1631
1632
|
}
|
|
1632
|
-
const
|
|
1633
|
+
const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-selected", "aria-disabled", "onClick", "onMouseenter"], qn = {
|
|
1633
1634
|
key: 0,
|
|
1634
1635
|
class: "px-3 py-2 text-sm text-fg-disabled",
|
|
1635
1636
|
role: "status"
|
|
1636
|
-
},
|
|
1637
|
+
}, xo = /* @__PURE__ */ z({
|
|
1637
1638
|
__name: "DsDropdownSelect",
|
|
1638
1639
|
props: {
|
|
1639
1640
|
modelValue: {},
|
|
@@ -1648,173 +1649,173 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
1648
1649
|
emptyText: { default: "No options available" }
|
|
1649
1650
|
},
|
|
1650
1651
|
emits: ["update:modelValue", "change"],
|
|
1651
|
-
setup(e, { emit:
|
|
1652
|
-
const
|
|
1653
|
-
if (!(!a.value ||
|
|
1654
|
-
return d(
|
|
1655
|
-
}), d = (
|
|
1652
|
+
setup(e, { emit: n }) {
|
|
1653
|
+
const t = e, s = n, o = j(), r = j(), a = j(!1), i = se("listbox"), c = j(-1), f = w(() => {
|
|
1654
|
+
if (!(!a.value || c.value < 0))
|
|
1655
|
+
return d(c.value);
|
|
1656
|
+
}), d = (x) => `${i}-option-${x}`, { floatingStyles: l } = kt(o, r, {
|
|
1656
1657
|
placement: "bottom-start",
|
|
1657
1658
|
middleware: [
|
|
1658
|
-
|
|
1659
|
-
|
|
1659
|
+
pt(4),
|
|
1660
|
+
xt(),
|
|
1660
1661
|
yt({ padding: 8 }),
|
|
1661
|
-
|
|
1662
|
-
apply({ rects:
|
|
1662
|
+
Bn({
|
|
1663
|
+
apply({ rects: x }) {
|
|
1663
1664
|
r.value && Object.assign(r.value.style, {
|
|
1664
|
-
minWidth: `${
|
|
1665
|
+
minWidth: `${x.reference.width}px`
|
|
1665
1666
|
});
|
|
1666
1667
|
}
|
|
1667
1668
|
})
|
|
1668
1669
|
],
|
|
1669
|
-
whileElementsMounted:
|
|
1670
|
-
}), b = w(() =>
|
|
1671
|
-
|
|
1672
|
-
const
|
|
1673
|
-
if (!
|
|
1674
|
-
const
|
|
1675
|
-
|
|
1670
|
+
whileElementsMounted: Sn
|
|
1671
|
+
}), b = w(() => t.modelValue), u = w(() => t.options.find((x) => m(x) === b.value)), v = w(() => u.value ? y(u.value) : ""), m = (x) => typeof x == "object" && x !== null ? x.value : x, y = (x) => typeof x == "object" && x !== null ? x.label : String(x), p = (x) => typeof x == "object" && x !== null && x.disabled || !1, C = () => {
|
|
1672
|
+
ke(() => {
|
|
1673
|
+
const x = r.value;
|
|
1674
|
+
if (!x || c.value < 0) return;
|
|
1675
|
+
const O = x.querySelector(`#${d(c.value)}`);
|
|
1676
|
+
O == null || O.scrollIntoView({ block: "nearest" });
|
|
1676
1677
|
});
|
|
1677
|
-
},
|
|
1678
|
-
let
|
|
1679
|
-
for (;
|
|
1680
|
-
if (!
|
|
1681
|
-
|
|
1678
|
+
}, D = (x, O) => {
|
|
1679
|
+
let E = x;
|
|
1680
|
+
for (; E >= 0 && E < t.options.length; ) {
|
|
1681
|
+
if (!p(t.options[E])) return E;
|
|
1682
|
+
E += O;
|
|
1682
1683
|
}
|
|
1683
1684
|
return -1;
|
|
1684
|
-
},
|
|
1685
|
-
const
|
|
1686
|
-
|
|
1687
|
-
}, D = () => {
|
|
1688
|
-
const y = F(i.value - 1, -1);
|
|
1689
|
-
y >= 0 && (i.value = y, C());
|
|
1685
|
+
}, A = () => {
|
|
1686
|
+
const x = D(c.value + 1, 1);
|
|
1687
|
+
x >= 0 && (c.value = x, C());
|
|
1690
1688
|
}, T = () => {
|
|
1691
|
-
const
|
|
1692
|
-
|
|
1689
|
+
const x = D(c.value - 1, -1);
|
|
1690
|
+
x >= 0 && (c.value = x, C());
|
|
1691
|
+
}, S = () => {
|
|
1692
|
+
const x = D(0, 1);
|
|
1693
|
+
x >= 0 && (c.value = x, C());
|
|
1693
1694
|
}, $ = () => {
|
|
1694
|
-
const
|
|
1695
|
-
|
|
1696
|
-
},
|
|
1697
|
-
|
|
1698
|
-
const
|
|
1699
|
-
(
|
|
1695
|
+
const x = D(t.options.length - 1, -1);
|
|
1696
|
+
x >= 0 && (c.value = x, C());
|
|
1697
|
+
}, M = () => {
|
|
1698
|
+
t.disabled || t.loading || (a.value = !0, ke(() => {
|
|
1699
|
+
const x = t.options.findIndex(
|
|
1700
|
+
(O) => m(O) === b.value
|
|
1700
1701
|
);
|
|
1701
|
-
|
|
1702
|
+
x >= 0 && !p(t.options[x]) ? c.value = x : S(), C();
|
|
1702
1703
|
}));
|
|
1703
|
-
},
|
|
1704
|
-
a.value = !1,
|
|
1704
|
+
}, I = () => {
|
|
1705
|
+
a.value = !1, c.value = -1;
|
|
1705
1706
|
}, W = () => {
|
|
1706
|
-
|
|
1707
|
-
}, Y = (
|
|
1708
|
-
if (
|
|
1709
|
-
const
|
|
1710
|
-
|
|
1711
|
-
},
|
|
1712
|
-
if (!(
|
|
1707
|
+
t.disabled || t.loading || (a.value ? I() : M());
|
|
1708
|
+
}, Y = (x) => {
|
|
1709
|
+
if (p(x)) return;
|
|
1710
|
+
const O = m(x);
|
|
1711
|
+
s("update:modelValue", O), s("change", O, x), I();
|
|
1712
|
+
}, X = (x) => {
|
|
1713
|
+
if (!(t.disabled || t.loading)) {
|
|
1713
1714
|
if (!a.value) {
|
|
1714
|
-
(
|
|
1715
|
+
(x.key === "ArrowDown" || x.key === "ArrowUp" || x.key === "Enter" || x.key === " ") && (x.preventDefault(), M());
|
|
1715
1716
|
return;
|
|
1716
1717
|
}
|
|
1717
|
-
switch (
|
|
1718
|
+
switch (x.key) {
|
|
1718
1719
|
case "ArrowDown":
|
|
1719
|
-
|
|
1720
|
+
x.preventDefault(), c.value < 0 ? S() : A();
|
|
1720
1721
|
break;
|
|
1721
1722
|
case "ArrowUp":
|
|
1722
|
-
|
|
1723
|
+
x.preventDefault(), c.value < 0 ? $() : T();
|
|
1723
1724
|
break;
|
|
1724
1725
|
case "Home":
|
|
1725
|
-
|
|
1726
|
+
x.preventDefault(), S();
|
|
1726
1727
|
break;
|
|
1727
1728
|
case "End":
|
|
1728
|
-
|
|
1729
|
+
x.preventDefault(), $();
|
|
1729
1730
|
break;
|
|
1730
1731
|
case "Enter":
|
|
1731
1732
|
case " ":
|
|
1732
|
-
|
|
1733
|
+
x.preventDefault(), c.value >= 0 && c.value < t.options.length && Y(t.options[c.value]);
|
|
1733
1734
|
break;
|
|
1734
1735
|
case "Escape":
|
|
1735
|
-
|
|
1736
|
+
x.preventDefault(), I();
|
|
1736
1737
|
break;
|
|
1737
1738
|
case "Tab":
|
|
1738
|
-
|
|
1739
|
+
I();
|
|
1739
1740
|
break;
|
|
1740
1741
|
}
|
|
1741
1742
|
}
|
|
1742
1743
|
};
|
|
1743
|
-
return (
|
|
1744
|
-
|
|
1744
|
+
return (x, O) => (g(), h("div", Nn, [
|
|
1745
|
+
ee(it, {
|
|
1745
1746
|
ref_key: "triggerRef",
|
|
1746
|
-
ref:
|
|
1747
|
+
ref: o,
|
|
1747
1748
|
variant: e.variant,
|
|
1748
1749
|
disabled: e.disabled,
|
|
1749
1750
|
loading: e.loading,
|
|
1750
1751
|
size: e.size,
|
|
1751
1752
|
iconLeft: e.iconLeft,
|
|
1752
|
-
iconRight:
|
|
1753
|
+
iconRight: B(Pe),
|
|
1753
1754
|
fullWidth: e.fullWidth,
|
|
1754
1755
|
role: "combobox",
|
|
1755
1756
|
"aria-expanded": a.value ? "true" : "false",
|
|
1756
|
-
"aria-controls":
|
|
1757
|
+
"aria-controls": B(i),
|
|
1757
1758
|
"aria-haspopup": "listbox",
|
|
1758
|
-
"aria-activedescendant":
|
|
1759
|
+
"aria-activedescendant": f.value,
|
|
1759
1760
|
onClick: W,
|
|
1760
|
-
onKeydown:
|
|
1761
|
+
onKeydown: X
|
|
1761
1762
|
}, {
|
|
1762
|
-
default:
|
|
1763
|
-
|
|
1764
|
-
|
|
1763
|
+
default: Ae(() => [
|
|
1764
|
+
P(x.$slots, "trigger", {}, () => [
|
|
1765
|
+
K(L(v.value || e.placeholder), 1)
|
|
1765
1766
|
])
|
|
1766
1767
|
]),
|
|
1767
1768
|
_: 3
|
|
1768
1769
|
}, 8, ["variant", "disabled", "loading", "size", "iconLeft", "iconRight", "fullWidth", "aria-expanded", "aria-controls", "aria-activedescendant"]),
|
|
1769
|
-
(g(), N(
|
|
1770
|
+
(g(), N(Oe, { to: "body" }, [
|
|
1770
1771
|
a.value ? (g(), h("div", {
|
|
1771
1772
|
key: 0,
|
|
1772
1773
|
ref_key: "floatingRef",
|
|
1773
1774
|
ref: r,
|
|
1774
|
-
id:
|
|
1775
|
+
id: B(i),
|
|
1775
1776
|
role: "listbox",
|
|
1776
1777
|
"aria-label": e.placeholder,
|
|
1777
|
-
style: le(
|
|
1778
|
+
style: le(B(l)),
|
|
1778
1779
|
class: "z-dropdown min-w-32 bg-bg border border-solid border-border rounded-md shadow-default max-h-64 overflow-y-auto",
|
|
1779
|
-
onClick:
|
|
1780
|
+
onClick: O[0] || (O[0] = Lt(() => {
|
|
1780
1781
|
}, ["stop"]))
|
|
1781
1782
|
}, [
|
|
1782
|
-
(g(!0), h(re, null, ae(e.options, (
|
|
1783
|
-
key: m(
|
|
1784
|
-
id: d(
|
|
1783
|
+
(g(!0), h(re, null, ae(e.options, (E, F) => (g(), h("div", {
|
|
1784
|
+
key: m(E),
|
|
1785
|
+
id: d(F),
|
|
1785
1786
|
role: "option",
|
|
1786
|
-
"aria-selected": b.value === m(
|
|
1787
|
-
"aria-disabled":
|
|
1788
|
-
class:
|
|
1787
|
+
"aria-selected": b.value === m(E) ? "true" : "false",
|
|
1788
|
+
"aria-disabled": p(E) ? "true" : void 0,
|
|
1789
|
+
class: R([
|
|
1789
1790
|
"px-3 py-2 text-sm transition-colors outline-none",
|
|
1790
|
-
|
|
1791
|
-
b.value === m(
|
|
1792
|
-
|
|
1793
|
-
(
|
|
1794
|
-
|
|
1795
|
-
|
|
1791
|
+
p(E) ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
1792
|
+
b.value === m(E) ? "bg-brand text-brand-on-solid" : "",
|
|
1793
|
+
c.value === F && b.value !== m(E) ? "bg-surface-hover" : "",
|
|
1794
|
+
(c.value !== F && b.value !== m(E), ""),
|
|
1795
|
+
F === 0 ? "rounded-t-md" : "",
|
|
1796
|
+
F === e.options.length - 1 ? "rounded-b-md" : ""
|
|
1796
1797
|
]),
|
|
1797
|
-
onClick: (H) => Y(
|
|
1798
|
-
onMouseenter: (H) =>
|
|
1798
|
+
onClick: (H) => Y(E),
|
|
1799
|
+
onMouseenter: (H) => c.value = F
|
|
1799
1800
|
}, [
|
|
1800
|
-
|
|
1801
|
-
option:
|
|
1802
|
-
index:
|
|
1801
|
+
P(x.$slots, "option", {
|
|
1802
|
+
option: E,
|
|
1803
|
+
index: F
|
|
1803
1804
|
}, () => [
|
|
1804
|
-
|
|
1805
|
+
K(L(y(E)), 1)
|
|
1805
1806
|
])
|
|
1806
|
-
], 42,
|
|
1807
|
-
e.options.length ?
|
|
1808
|
-
], 12,
|
|
1807
|
+
], 42, Hn))), 128)),
|
|
1808
|
+
e.options.length ? V("", !0) : (g(), h("div", qn, L(e.emptyText), 1))
|
|
1809
|
+
], 12, Wn)) : V("", !0)
|
|
1809
1810
|
])),
|
|
1810
1811
|
a.value ? (g(), h("div", {
|
|
1811
1812
|
key: 0,
|
|
1812
1813
|
class: "fixed inset-0 z-dropdown",
|
|
1813
|
-
onClick:
|
|
1814
|
-
})) :
|
|
1814
|
+
onClick: I
|
|
1815
|
+
})) : V("", !0)
|
|
1815
1816
|
]));
|
|
1816
1817
|
}
|
|
1817
|
-
}), Kn = ["aria-expanded"],
|
|
1818
|
+
}), Kn = ["aria-expanded"], Un = { class: "text-label" }, Xn = { class: "flex items-center gap-2" }, Yn = { class: "px-4 pb-4 border-t border-t-solid border-border" }, Gn = { class: "pt-3" }, wo = /* @__PURE__ */ z({
|
|
1818
1819
|
__name: "DsExpandableCard",
|
|
1819
1820
|
props: {
|
|
1820
1821
|
title: {},
|
|
@@ -1823,76 +1824,76 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
1823
1824
|
variant: { default: "default" }
|
|
1824
1825
|
},
|
|
1825
1826
|
emits: ["update:modelValue"],
|
|
1826
|
-
setup(e, { emit:
|
|
1827
|
-
const
|
|
1828
|
-
function
|
|
1829
|
-
const b = !
|
|
1830
|
-
a.value = b,
|
|
1827
|
+
setup(e, { emit: n }) {
|
|
1828
|
+
const t = e, s = n, o = j(null), r = j(0), a = j(t.modelValue ?? t.defaultExpanded), i = w(() => t.modelValue !== void 0 ? t.modelValue : a.value);
|
|
1829
|
+
function c() {
|
|
1830
|
+
const b = !i.value;
|
|
1831
|
+
a.value = b, s("update:modelValue", b);
|
|
1831
1832
|
}
|
|
1832
|
-
const
|
|
1833
|
-
maxHeight:
|
|
1833
|
+
const f = w(() => ({
|
|
1834
|
+
maxHeight: i.value ? `${r.value}px` : "0px"
|
|
1834
1835
|
}));
|
|
1835
1836
|
function d() {
|
|
1836
|
-
|
|
1837
|
+
o.value && (o.value.style.maxHeight = "none", r.value = o.value.scrollHeight, o.value.style.maxHeight = i.value ? `${r.value}px` : "0px");
|
|
1837
1838
|
}
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
}),
|
|
1841
|
-
|
|
1839
|
+
ot(() => {
|
|
1840
|
+
ke(d);
|
|
1841
|
+
}), he(i, () => {
|
|
1842
|
+
ke(d);
|
|
1842
1843
|
});
|
|
1843
|
-
const
|
|
1844
|
-
const b = ["rounded-lg", "bg-bg", "overflow-hidden"],
|
|
1844
|
+
const l = w(() => {
|
|
1845
|
+
const b = ["rounded-lg", "bg-bg", "overflow-hidden"], u = {
|
|
1845
1846
|
default: ["border", "border-solid", "border-border-strong", "legacy-card-box-shadow"],
|
|
1846
1847
|
outlined: ["border", "border-solid", "border-border-strong"],
|
|
1847
1848
|
elevated: ["shadow-default"]
|
|
1848
1849
|
};
|
|
1849
|
-
return [...b, ...
|
|
1850
|
+
return [...b, ...u[t.variant]].join(" ");
|
|
1850
1851
|
});
|
|
1851
|
-
return (b,
|
|
1852
|
-
class:
|
|
1852
|
+
return (b, u) => (g(), h("div", {
|
|
1853
|
+
class: R(l.value)
|
|
1853
1854
|
}, [
|
|
1854
1855
|
k("button", {
|
|
1855
1856
|
type: "button",
|
|
1856
1857
|
class: "w-full flex items-center justify-between px-4 py-3 text-left bg-transparent border-none cursor-pointer",
|
|
1857
|
-
"aria-expanded":
|
|
1858
|
-
onClick:
|
|
1858
|
+
"aria-expanded": i.value,
|
|
1859
|
+
onClick: c
|
|
1859
1860
|
}, [
|
|
1860
|
-
k("span",
|
|
1861
|
-
k("span",
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
class:
|
|
1861
|
+
k("span", Un, L(e.title), 1),
|
|
1862
|
+
k("span", Xn, [
|
|
1863
|
+
P(b.$slots, "header-extra"),
|
|
1864
|
+
ee(B(Pe), {
|
|
1865
|
+
class: R(["w-4 h-4 text-fg-secondary transition-transform duration-normal", { "rotate-180": i.value }]),
|
|
1865
1866
|
"aria-hidden": "true"
|
|
1866
1867
|
}, null, 8, ["class"])
|
|
1867
1868
|
])
|
|
1868
1869
|
], 8, Kn),
|
|
1869
1870
|
k("div", {
|
|
1870
1871
|
ref_key: "contentRef",
|
|
1871
|
-
ref:
|
|
1872
|
+
ref: o,
|
|
1872
1873
|
class: "overflow-hidden transition-all duration-normal ease-in-out",
|
|
1873
|
-
style: le(
|
|
1874
|
+
style: le(f.value)
|
|
1874
1875
|
}, [
|
|
1875
|
-
k("div",
|
|
1876
|
-
k("div",
|
|
1877
|
-
|
|
1876
|
+
k("div", Yn, [
|
|
1877
|
+
k("div", Gn, [
|
|
1878
|
+
P(b.$slots, "default")
|
|
1878
1879
|
])
|
|
1879
1880
|
])
|
|
1880
1881
|
], 4)
|
|
1881
1882
|
], 2));
|
|
1882
1883
|
}
|
|
1883
|
-
}),
|
|
1884
|
+
}), Jn = { class: "w-full" }, Qn = ["for"], Zn = {
|
|
1884
1885
|
key: 0,
|
|
1885
1886
|
class: "text-error ml-1",
|
|
1886
1887
|
"aria-hidden": "true"
|
|
1887
|
-
},
|
|
1888
|
+
}, _n = { class: "relative" }, es = {
|
|
1888
1889
|
key: 0,
|
|
1889
1890
|
class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",
|
|
1890
1891
|
"aria-hidden": "true"
|
|
1891
|
-
},
|
|
1892
|
+
}, ts = ["id", "type", "value", "placeholder", "disabled", "readonly", "required", "autocomplete", "maxlength", "min", "max", "step", "aria-describedby", "aria-invalid"], ns = {
|
|
1892
1893
|
key: 1,
|
|
1893
1894
|
class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",
|
|
1894
1895
|
"aria-hidden": "true"
|
|
1895
|
-
},
|
|
1896
|
+
}, ko = /* @__PURE__ */ z({
|
|
1896
1897
|
__name: "DsInput",
|
|
1897
1898
|
props: {
|
|
1898
1899
|
modelValue: {},
|
|
@@ -1915,12 +1916,12 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
1915
1916
|
step: {}
|
|
1916
1917
|
},
|
|
1917
1918
|
emits: ["update:modelValue", "blur", "focus", "enter", "clear"],
|
|
1918
|
-
setup(e, { expose:
|
|
1919
|
-
const
|
|
1920
|
-
const
|
|
1921
|
-
return
|
|
1922
|
-
}), d = w(() =>
|
|
1923
|
-
const
|
|
1919
|
+
setup(e, { expose: n, emit: t }) {
|
|
1920
|
+
const s = e, o = t, r = j(null), a = se("input"), i = `${a}-help`, c = `${a}-error`, f = w(() => {
|
|
1921
|
+
const T = [];
|
|
1922
|
+
return s.helpText && !s.error && T.push(i), s.error && T.push(c), T.length > 0 ? T.join(" ") : void 0;
|
|
1923
|
+
}), d = w(() => s.clearable && b.value && !s.disabled), l = w(() => s.iconRight || s.clearable), b = w(() => s.modelValue == null ? !1 : typeof s.modelValue == "string" ? s.modelValue.length > 0 : !0), u = w(() => {
|
|
1924
|
+
const T = [
|
|
1924
1925
|
"block",
|
|
1925
1926
|
"w-full",
|
|
1926
1927
|
"rounded-md",
|
|
@@ -1942,68 +1943,68 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
1942
1943
|
small: { text: "text-sm", py: "py-1", px: "px-2", pl: "pl-8", pr: "pr-8" },
|
|
1943
1944
|
medium: { text: "text-base", py: "py-2", px: "px-3", pl: "pl-10", pr: "pr-10" },
|
|
1944
1945
|
large: { text: "text-lg", py: "py-3", px: "px-4", pl: "pl-12", pr: "pr-12" }
|
|
1945
|
-
}[
|
|
1946
|
+
}[s.size], M = s.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-focus-ring"];
|
|
1946
1947
|
return [
|
|
1947
|
-
...
|
|
1948
|
+
...T,
|
|
1948
1949
|
$.text,
|
|
1949
1950
|
$.py,
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
...
|
|
1951
|
+
s.iconLeft ? $.pl : $.px,
|
|
1952
|
+
l.value ? $.pr : $.px,
|
|
1953
|
+
...M
|
|
1953
1954
|
].join(" ");
|
|
1954
|
-
}),
|
|
1955
|
+
}), v = w(() => [
|
|
1955
1956
|
"absolute inset-y-0 flex items-center justify-center",
|
|
1956
1957
|
{
|
|
1957
1958
|
small: "right-2",
|
|
1958
1959
|
medium: "right-3",
|
|
1959
1960
|
large: "right-3"
|
|
1960
|
-
}[
|
|
1961
|
+
}[s.size],
|
|
1961
1962
|
"appearance-none bg-transparent border-none p-0 m-0",
|
|
1962
1963
|
"text-fg-tertiary hover:text-fg-secondary",
|
|
1963
1964
|
"cursor-pointer transition-colors"
|
|
1964
|
-
].join(" ")), m = w(() => ({ small: "w-3.5 h-3.5", medium: "w-4 h-4", large: "w-5 h-5" })[
|
|
1965
|
-
const
|
|
1966
|
-
return `${
|
|
1965
|
+
].join(" ")), m = w(() => ({ small: "w-3.5 h-3.5", medium: "w-4 h-4", large: "w-5 h-5" })[s.size]), y = w(() => {
|
|
1966
|
+
const T = { small: "w-4 h-4", medium: "w-5 h-5", large: "w-6 h-6" }, S = s.error ? "text-error" : "text-fg-tertiary";
|
|
1967
|
+
return `${T[s.size]} ${S}`;
|
|
1967
1968
|
});
|
|
1968
|
-
function
|
|
1969
|
-
const
|
|
1970
|
-
if (
|
|
1971
|
-
const $ = Number(
|
|
1972
|
-
|
|
1969
|
+
function p(T) {
|
|
1970
|
+
const S = T.target;
|
|
1971
|
+
if (s.type === "number") {
|
|
1972
|
+
const $ = Number(S.value);
|
|
1973
|
+
o("update:modelValue", Number.isNaN($) ? S.value : $);
|
|
1973
1974
|
} else
|
|
1974
|
-
|
|
1975
|
+
o("update:modelValue", S.value);
|
|
1975
1976
|
}
|
|
1976
1977
|
function C() {
|
|
1977
|
-
var
|
|
1978
|
-
|
|
1978
|
+
var T;
|
|
1979
|
+
o("update:modelValue", ""), o("clear"), (T = r.value) == null || T.focus();
|
|
1979
1980
|
}
|
|
1980
|
-
function
|
|
1981
|
-
var
|
|
1982
|
-
(
|
|
1981
|
+
function D() {
|
|
1982
|
+
var T;
|
|
1983
|
+
(T = r.value) == null || T.focus();
|
|
1983
1984
|
}
|
|
1984
|
-
function
|
|
1985
|
-
var
|
|
1986
|
-
(
|
|
1985
|
+
function A() {
|
|
1986
|
+
var T;
|
|
1987
|
+
(T = r.value) == null || T.blur();
|
|
1987
1988
|
}
|
|
1988
|
-
return
|
|
1989
|
+
return n({ focus: D, blur: A, inputRef: r }), (T, S) => (g(), h("div", Jn, [
|
|
1989
1990
|
e.label ? (g(), h("label", {
|
|
1990
1991
|
key: 0,
|
|
1991
|
-
for:
|
|
1992
|
+
for: B(a),
|
|
1992
1993
|
class: "block text-label mb-1"
|
|
1993
1994
|
}, [
|
|
1994
|
-
|
|
1995
|
-
e.required ? (g(), h("span",
|
|
1996
|
-
], 8,
|
|
1997
|
-
k("div",
|
|
1998
|
-
e.iconLeft ? (g(), h("div",
|
|
1999
|
-
(g(), N(
|
|
2000
|
-
class:
|
|
1995
|
+
K(L(e.label) + " ", 1),
|
|
1996
|
+
e.required ? (g(), h("span", Zn, "*")) : V("", !0)
|
|
1997
|
+
], 8, Qn)) : V("", !0),
|
|
1998
|
+
k("div", _n, [
|
|
1999
|
+
e.iconLeft ? (g(), h("div", es, [
|
|
2000
|
+
(g(), N(Te(e.iconLeft), {
|
|
2001
|
+
class: R(y.value)
|
|
2001
2002
|
}, null, 8, ["class"]))
|
|
2002
|
-
])) :
|
|
2003
|
+
])) : V("", !0),
|
|
2003
2004
|
k("input", {
|
|
2004
2005
|
ref_key: "inputRef",
|
|
2005
2006
|
ref: r,
|
|
2006
|
-
id:
|
|
2007
|
+
id: B(a),
|
|
2007
2008
|
type: e.type,
|
|
2008
2009
|
value: e.modelValue,
|
|
2009
2010
|
placeholder: e.placeholder,
|
|
@@ -2015,49 +2016,49 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2015
2016
|
min: e.min,
|
|
2016
2017
|
max: e.max,
|
|
2017
2018
|
step: e.step,
|
|
2018
|
-
"aria-describedby":
|
|
2019
|
+
"aria-describedby": f.value,
|
|
2019
2020
|
"aria-invalid": e.error ? "true" : void 0,
|
|
2020
|
-
class:
|
|
2021
|
-
onInput:
|
|
2022
|
-
onBlur:
|
|
2023
|
-
onFocus:
|
|
2024
|
-
onKeydown:
|
|
2025
|
-
}, null, 42,
|
|
2026
|
-
e.iconRight && !d.value ? (g(), h("div",
|
|
2027
|
-
(g(), N(
|
|
2028
|
-
class:
|
|
2021
|
+
class: R(u.value),
|
|
2022
|
+
onInput: p,
|
|
2023
|
+
onBlur: S[0] || (S[0] = ($) => T.$emit("blur", $)),
|
|
2024
|
+
onFocus: S[1] || (S[1] = ($) => T.$emit("focus", $)),
|
|
2025
|
+
onKeydown: S[2] || (S[2] = rt(($) => T.$emit("enter"), ["enter"]))
|
|
2026
|
+
}, null, 42, ts),
|
|
2027
|
+
e.iconRight && !d.value ? (g(), h("div", ns, [
|
|
2028
|
+
(g(), N(Te(e.iconRight), {
|
|
2029
|
+
class: R(y.value)
|
|
2029
2030
|
}, null, 8, ["class"]))
|
|
2030
|
-
])) :
|
|
2031
|
+
])) : V("", !0),
|
|
2031
2032
|
d.value ? (g(), h("button", {
|
|
2032
2033
|
key: 2,
|
|
2033
2034
|
type: "button",
|
|
2034
2035
|
"aria-label": "Clear input",
|
|
2035
|
-
class:
|
|
2036
|
+
class: R(v.value),
|
|
2036
2037
|
onClick: C
|
|
2037
2038
|
}, [
|
|
2038
|
-
|
|
2039
|
-
class:
|
|
2039
|
+
ee(B(Se), {
|
|
2040
|
+
class: R(m.value)
|
|
2040
2041
|
}, null, 8, ["class"])
|
|
2041
|
-
], 2)) :
|
|
2042
|
+
], 2)) : V("", !0)
|
|
2042
2043
|
]),
|
|
2043
2044
|
e.helpText && !e.error ? (g(), h("div", {
|
|
2044
2045
|
key: 1,
|
|
2045
|
-
id:
|
|
2046
|
+
id: i,
|
|
2046
2047
|
class: "mt-1 text-caption"
|
|
2047
|
-
},
|
|
2048
|
+
}, L(e.helpText), 1)) : V("", !0),
|
|
2048
2049
|
e.error ? (g(), h("div", {
|
|
2049
2050
|
key: 2,
|
|
2050
|
-
id:
|
|
2051
|
+
id: c,
|
|
2051
2052
|
class: "mt-1 text-sm text-error font-sans",
|
|
2052
2053
|
role: "alert",
|
|
2053
2054
|
"aria-live": "polite"
|
|
2054
|
-
},
|
|
2055
|
+
}, L(e.error), 1)) : V("", !0)
|
|
2055
2056
|
]));
|
|
2056
2057
|
}
|
|
2057
|
-
}),
|
|
2058
|
+
}), ss = {
|
|
2058
2059
|
key: 1,
|
|
2059
2060
|
class: "sr-only"
|
|
2060
|
-
},
|
|
2061
|
+
}, os = /* @__PURE__ */ z({
|
|
2061
2062
|
__name: "DsLoadingSpinner",
|
|
2062
2063
|
props: {
|
|
2063
2064
|
size: { default: "medium" },
|
|
@@ -2066,10 +2067,10 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2066
2067
|
centered: { type: Boolean, default: !1 }
|
|
2067
2068
|
},
|
|
2068
2069
|
setup(e) {
|
|
2069
|
-
const
|
|
2070
|
+
const n = e, t = w(() => {
|
|
2070
2071
|
const r = ["inline-flex", "items-center"];
|
|
2071
|
-
return
|
|
2072
|
-
}),
|
|
2072
|
+
return n.centered && r.push("justify-center"), n.text && r.push("gap-2"), r.join(" ");
|
|
2073
|
+
}), s = w(() => {
|
|
2073
2074
|
const r = [
|
|
2074
2075
|
"animate-spin",
|
|
2075
2076
|
"rounded-full",
|
|
@@ -2078,7 +2079,7 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2078
2079
|
small: ["w-4", "h-4", "border-2"],
|
|
2079
2080
|
medium: ["w-6", "h-6", "border-4"],
|
|
2080
2081
|
large: ["w-8", "h-8", "border-6"]
|
|
2081
|
-
},
|
|
2082
|
+
}, i = {
|
|
2082
2083
|
primary: [
|
|
2083
2084
|
"border-brand",
|
|
2084
2085
|
"border-t-transparent"
|
|
@@ -2098,37 +2099,37 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2098
2099
|
};
|
|
2099
2100
|
return [
|
|
2100
2101
|
...r,
|
|
2101
|
-
...a[
|
|
2102
|
-
...
|
|
2102
|
+
...a[n.size],
|
|
2103
|
+
...i[n.variant]
|
|
2103
2104
|
].join(" ");
|
|
2104
|
-
}),
|
|
2105
|
+
}), o = w(() => [
|
|
2105
2106
|
{
|
|
2106
2107
|
small: "text-sm",
|
|
2107
2108
|
medium: "text-base",
|
|
2108
2109
|
large: "text-lg"
|
|
2109
|
-
}[
|
|
2110
|
+
}[n.size],
|
|
2110
2111
|
"text-fg-secondary",
|
|
2111
2112
|
"font-medium"
|
|
2112
2113
|
].join(" "));
|
|
2113
2114
|
return (r, a) => (g(), h("div", {
|
|
2114
|
-
class:
|
|
2115
|
+
class: R(t.value),
|
|
2115
2116
|
role: "status",
|
|
2116
2117
|
"aria-live": "polite"
|
|
2117
2118
|
}, [
|
|
2118
2119
|
k("div", {
|
|
2119
|
-
class:
|
|
2120
|
+
class: R(s.value),
|
|
2120
2121
|
"aria-hidden": "true"
|
|
2121
2122
|
}, null, 2),
|
|
2122
2123
|
e.text ? (g(), h("span", {
|
|
2123
2124
|
key: 0,
|
|
2124
|
-
class:
|
|
2125
|
-
},
|
|
2125
|
+
class: R(o.value)
|
|
2126
|
+
}, L(e.text), 3)) : (g(), h("span", ss, "Loading"))
|
|
2126
2127
|
], 2));
|
|
2127
2128
|
}
|
|
2128
|
-
}),
|
|
2129
|
+
}), rs = ["aria-labelledby"], as = { class: "flex items-center justify-between px-6 py-4" }, ls = ["id"], is = { class: "px-6 py-4 overflow-y-auto flex-1" }, cs = {
|
|
2129
2130
|
key: 0,
|
|
2130
2131
|
class: "px-6 py-4"
|
|
2131
|
-
},
|
|
2132
|
+
}, ds = /* @__PURE__ */ z({
|
|
2132
2133
|
__name: "DsModal",
|
|
2133
2134
|
props: {
|
|
2134
2135
|
modelValue: { type: Boolean },
|
|
@@ -2138,48 +2139,48 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2138
2139
|
persistent: { type: Boolean, default: !1 }
|
|
2139
2140
|
},
|
|
2140
2141
|
emits: ["update:modelValue", "close"],
|
|
2141
|
-
setup(e, { emit:
|
|
2142
|
-
const
|
|
2142
|
+
setup(e, { emit: n }) {
|
|
2143
|
+
const t = e, s = n, o = se("modal-title"), r = j(null);
|
|
2143
2144
|
let a = null;
|
|
2144
|
-
const
|
|
2145
|
+
const i = w(() => `relative z-sticky bg-bg rounded-xl shadow-lg overflow-hidden w-full ${{
|
|
2145
2146
|
sm: "max-w-sm",
|
|
2146
2147
|
md: "max-w-lg",
|
|
2147
2148
|
lg: "max-w-2xl",
|
|
2148
2149
|
xl: "max-w-4xl"
|
|
2149
|
-
}[
|
|
2150
|
-
function
|
|
2151
|
-
|
|
2150
|
+
}[t.size]} max-h-[90vh] flex flex-col`);
|
|
2151
|
+
function c() {
|
|
2152
|
+
s("update:modelValue", !1), s("close");
|
|
2152
2153
|
}
|
|
2153
|
-
function
|
|
2154
|
-
|
|
2154
|
+
function f() {
|
|
2155
|
+
t.persistent || c();
|
|
2155
2156
|
}
|
|
2156
2157
|
function d() {
|
|
2157
|
-
|
|
2158
|
+
t.persistent || c();
|
|
2158
2159
|
}
|
|
2159
|
-
function
|
|
2160
|
+
function l() {
|
|
2160
2161
|
return r.value ? Array.from(
|
|
2161
2162
|
r.value.querySelectorAll(
|
|
2162
2163
|
'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
2163
2164
|
)
|
|
2164
2165
|
) : [];
|
|
2165
2166
|
}
|
|
2166
|
-
function b(
|
|
2167
|
-
if (
|
|
2168
|
-
const
|
|
2169
|
-
if (
|
|
2170
|
-
const m =
|
|
2171
|
-
|
|
2167
|
+
function b(u) {
|
|
2168
|
+
if (u.key !== "Tab") return;
|
|
2169
|
+
const v = l();
|
|
2170
|
+
if (v.length === 0) return;
|
|
2171
|
+
const m = v[0], y = v[v.length - 1];
|
|
2172
|
+
u.shiftKey && document.activeElement === m ? (u.preventDefault(), y.focus()) : !u.shiftKey && document.activeElement === y && (u.preventDefault(), m.focus());
|
|
2172
2173
|
}
|
|
2173
|
-
return
|
|
2174
|
-
() =>
|
|
2175
|
-
async (
|
|
2176
|
-
var
|
|
2177
|
-
|
|
2174
|
+
return he(
|
|
2175
|
+
() => t.modelValue,
|
|
2176
|
+
async (u) => {
|
|
2177
|
+
var v;
|
|
2178
|
+
u ? (a = document.activeElement, document.body.style.overflow = "hidden", document.addEventListener("keydown", b), await ke(), (v = r.value) == null || v.focus()) : (document.body.style.overflow = "", document.removeEventListener("keydown", b), a == null || a.focus(), a = null);
|
|
2178
2179
|
}
|
|
2179
|
-
),
|
|
2180
|
+
), at(() => {
|
|
2180
2181
|
document.body.style.overflow = "", document.removeEventListener("keydown", b);
|
|
2181
|
-
}), (
|
|
2182
|
-
|
|
2182
|
+
}), (u, v) => (g(), N(Oe, { to: "body" }, [
|
|
2183
|
+
ee(lt, {
|
|
2183
2184
|
"enter-active-class": "ds-modal-enter-active",
|
|
2184
2185
|
"enter-from-class": "ds-modal-enter-from",
|
|
2185
2186
|
"enter-to-class": "ds-modal-enter-to",
|
|
@@ -2187,61 +2188,61 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2187
2188
|
"leave-from-class": "ds-modal-enter-to",
|
|
2188
2189
|
"leave-to-class": "ds-modal-enter-from"
|
|
2189
2190
|
}, {
|
|
2190
|
-
default:
|
|
2191
|
+
default: Ae(() => [
|
|
2191
2192
|
e.modelValue ? (g(), h("div", {
|
|
2192
2193
|
key: 0,
|
|
2193
2194
|
class: "fixed inset-0 z-modal flex items-center justify-center p-4",
|
|
2194
|
-
onKeydown:
|
|
2195
|
+
onKeydown: rt(d, ["escape"])
|
|
2195
2196
|
}, [
|
|
2196
2197
|
k("div", {
|
|
2197
2198
|
class: "absolute inset-0 bg-overlay backdrop-blur-sm",
|
|
2198
2199
|
"aria-hidden": "true",
|
|
2199
|
-
onClick:
|
|
2200
|
+
onClick: f
|
|
2200
2201
|
}),
|
|
2201
2202
|
k("div", {
|
|
2202
2203
|
ref_key: "panelRef",
|
|
2203
2204
|
ref: r,
|
|
2204
2205
|
role: "dialog",
|
|
2205
2206
|
"aria-modal": "true",
|
|
2206
|
-
"aria-labelledby":
|
|
2207
|
-
class:
|
|
2207
|
+
"aria-labelledby": B(o),
|
|
2208
|
+
class: R(i.value),
|
|
2208
2209
|
tabindex: "-1"
|
|
2209
2210
|
}, [
|
|
2210
|
-
k("div",
|
|
2211
|
-
|
|
2211
|
+
k("div", as, [
|
|
2212
|
+
P(u.$slots, "header", {}, () => [
|
|
2212
2213
|
k("h2", {
|
|
2213
|
-
id:
|
|
2214
|
+
id: B(o),
|
|
2214
2215
|
class: "text-heading-lg m-0"
|
|
2215
|
-
},
|
|
2216
|
+
}, L(e.title), 9, ls)
|
|
2216
2217
|
], !0),
|
|
2217
|
-
e.closable ? (g(), N(
|
|
2218
|
+
e.closable ? (g(), N(it, {
|
|
2218
2219
|
key: 0,
|
|
2219
2220
|
variant: "ghost",
|
|
2220
2221
|
size: "small",
|
|
2221
|
-
"icon-left":
|
|
2222
|
+
"icon-left": B(Se),
|
|
2222
2223
|
"aria-label": "Close dialog",
|
|
2223
|
-
onClick:
|
|
2224
|
-
}, null, 8, ["icon-left"])) :
|
|
2224
|
+
onClick: c
|
|
2225
|
+
}, null, 8, ["icon-left"])) : V("", !0)
|
|
2225
2226
|
]),
|
|
2226
|
-
k("div",
|
|
2227
|
-
|
|
2227
|
+
k("div", is, [
|
|
2228
|
+
P(u.$slots, "default", {}, void 0, !0)
|
|
2228
2229
|
]),
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
])) :
|
|
2232
|
-
], 10,
|
|
2233
|
-
], 32)) :
|
|
2230
|
+
u.$slots.footer ? (g(), h("div", cs, [
|
|
2231
|
+
P(u.$slots, "footer", {}, void 0, !0)
|
|
2232
|
+
])) : V("", !0)
|
|
2233
|
+
], 10, rs)
|
|
2234
|
+
], 32)) : V("", !0)
|
|
2234
2235
|
]),
|
|
2235
2236
|
_: 3
|
|
2236
2237
|
})
|
|
2237
2238
|
]));
|
|
2238
2239
|
}
|
|
2239
|
-
}),
|
|
2240
|
-
const
|
|
2241
|
-
for (const [
|
|
2242
|
-
|
|
2243
|
-
return
|
|
2244
|
-
},
|
|
2240
|
+
}), Ct = (e, n) => {
|
|
2241
|
+
const t = e.__vccOpts || e;
|
|
2242
|
+
for (const [s, o] of n)
|
|
2243
|
+
t[s] = o;
|
|
2244
|
+
return t;
|
|
2245
|
+
}, $o = /* @__PURE__ */ Ct(ds, [["__scopeId", "data-v-cc8b4649"]]), us = ["id", "name", "checked", "disabled", "value"], Co = /* @__PURE__ */ z({
|
|
2245
2246
|
__name: "DsRadio",
|
|
2246
2247
|
props: {
|
|
2247
2248
|
modelValue: { type: [String, Number, Boolean] },
|
|
@@ -2253,42 +2254,42 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2253
2254
|
size: { default: "medium" }
|
|
2254
2255
|
},
|
|
2255
2256
|
emits: ["update:modelValue", "change"],
|
|
2256
|
-
setup(e, { emit:
|
|
2257
|
-
const
|
|
2257
|
+
setup(e, { emit: n }) {
|
|
2258
|
+
const t = e, s = n, o = w(() => t.modelValue === t.value), r = {
|
|
2258
2259
|
small: { circle: "w-3.5 h-3.5", dot: "w-1.5 h-1.5", label: "text-xs" },
|
|
2259
2260
|
medium: { circle: "w-4 h-4", dot: "w-2 h-2", label: "text-sm" },
|
|
2260
2261
|
large: { circle: "w-5 h-5", dot: "w-2.5 h-2.5", label: "text-base" }
|
|
2261
2262
|
}, a = w(() => {
|
|
2262
|
-
const
|
|
2263
|
-
r[
|
|
2263
|
+
const l = [
|
|
2264
|
+
r[t.size].circle,
|
|
2264
2265
|
"rounded-full",
|
|
2265
2266
|
"inline-flex items-center justify-center",
|
|
2266
2267
|
"border border-solid",
|
|
2267
2268
|
"transition-all duration-fast",
|
|
2268
2269
|
"shrink-0"
|
|
2269
2270
|
];
|
|
2270
|
-
return
|
|
2271
|
-
|
|
2271
|
+
return t.disabled ? l.push(
|
|
2272
|
+
o.value ? "bg-bg border-brand-disabled" : "bg-bg-tertiary border-border",
|
|
2272
2273
|
"opacity-60"
|
|
2273
|
-
) :
|
|
2274
|
+
) : o.value ? l.push("bg-bg border-brand") : l.push(
|
|
2274
2275
|
"bg-bg border-border-strong",
|
|
2275
2276
|
"group-hover:border-brand",
|
|
2276
2277
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring peer-focus-visible:ring-offset-2"
|
|
2277
|
-
),
|
|
2278
|
-
}),
|
|
2279
|
-
const
|
|
2280
|
-
return
|
|
2281
|
-
}),
|
|
2278
|
+
), l.join(" ");
|
|
2279
|
+
}), i = w(() => {
|
|
2280
|
+
const l = [r[t.size].dot, "rounded-full"];
|
|
2281
|
+
return t.disabled ? l.push("bg-brand-disabled") : l.push("bg-brand"), l.join(" ");
|
|
2282
|
+
}), c = w(() => [
|
|
2282
2283
|
"font-sans select-none",
|
|
2283
|
-
r[
|
|
2284
|
-
|
|
2285
|
-
].join(" ")),
|
|
2286
|
-
if (
|
|
2287
|
-
const
|
|
2288
|
-
|
|
2284
|
+
r[t.size].label,
|
|
2285
|
+
t.disabled ? "text-fg-disabled" : "text-fg"
|
|
2286
|
+
].join(" ")), f = (d) => {
|
|
2287
|
+
if (t.disabled) return;
|
|
2288
|
+
const l = d.target, b = t.value ?? l.value;
|
|
2289
|
+
s("update:modelValue", b), s("change", b, d);
|
|
2289
2290
|
};
|
|
2290
|
-
return (d,
|
|
2291
|
-
class:
|
|
2291
|
+
return (d, l) => (g(), h("label", {
|
|
2292
|
+
class: R([
|
|
2292
2293
|
"inline-flex items-center gap-2",
|
|
2293
2294
|
e.disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
2294
2295
|
"group"
|
|
@@ -2298,39 +2299,39 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2298
2299
|
id: e.id,
|
|
2299
2300
|
type: "radio",
|
|
2300
2301
|
name: e.name,
|
|
2301
|
-
checked:
|
|
2302
|
+
checked: o.value,
|
|
2302
2303
|
disabled: e.disabled,
|
|
2303
2304
|
value: e.value,
|
|
2304
2305
|
class: "sr-only peer",
|
|
2305
|
-
onChange:
|
|
2306
|
-
}, null, 40,
|
|
2306
|
+
onChange: f
|
|
2307
|
+
}, null, 40, us),
|
|
2307
2308
|
k("span", {
|
|
2308
|
-
class:
|
|
2309
|
+
class: R(a.value),
|
|
2309
2310
|
"aria-hidden": "true"
|
|
2310
2311
|
}, [
|
|
2311
|
-
|
|
2312
|
+
o.value ? (g(), h("span", {
|
|
2312
2313
|
key: 0,
|
|
2313
|
-
class:
|
|
2314
|
-
}, null, 2)) :
|
|
2314
|
+
class: R(i.value)
|
|
2315
|
+
}, null, 2)) : V("", !0)
|
|
2315
2316
|
], 2),
|
|
2316
2317
|
e.label || d.$slots.default ? (g(), h("span", {
|
|
2317
2318
|
key: 0,
|
|
2318
|
-
class:
|
|
2319
|
+
class: R(c.value)
|
|
2319
2320
|
}, [
|
|
2320
|
-
|
|
2321
|
-
|
|
2321
|
+
P(d.$slots, "default", {}, () => [
|
|
2322
|
+
K(L(e.label), 1)
|
|
2322
2323
|
])
|
|
2323
|
-
], 2)) :
|
|
2324
|
+
], 2)) : V("", !0)
|
|
2324
2325
|
], 2));
|
|
2325
2326
|
}
|
|
2326
|
-
}),
|
|
2327
|
+
}), fs = { class: "w-full" }, bs = ["for"], ms = {
|
|
2327
2328
|
key: 0,
|
|
2328
2329
|
class: "text-error ml-1",
|
|
2329
2330
|
"aria-hidden": "true"
|
|
2330
|
-
},
|
|
2331
|
+
}, gs = { class: "relative" }, hs = ["id", "value", "disabled", "required", "aria-describedby", "aria-invalid"], vs = ["selected"], ps = ["value", "disabled"], ys = {
|
|
2331
2332
|
class: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",
|
|
2332
2333
|
"aria-hidden": "true"
|
|
2333
|
-
},
|
|
2334
|
+
}, Do = /* @__PURE__ */ z({
|
|
2334
2335
|
__name: "DsSelect",
|
|
2335
2336
|
props: {
|
|
2336
2337
|
modelValue: {},
|
|
@@ -2344,11 +2345,11 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2344
2345
|
options: {}
|
|
2345
2346
|
},
|
|
2346
2347
|
emits: ["update:modelValue", "blur", "focus"],
|
|
2347
|
-
setup(e, { emit:
|
|
2348
|
-
const
|
|
2348
|
+
setup(e, { emit: n }) {
|
|
2349
|
+
const t = e, s = n, o = se("select"), r = `${o}-help`, a = `${o}-error`, i = w(() => {
|
|
2349
2350
|
const d = [];
|
|
2350
|
-
return
|
|
2351
|
-
}),
|
|
2351
|
+
return t.helpText && !t.error && d.push(r), t.error && d.push(a), d.length > 0 ? d.join(" ") : void 0;
|
|
2352
|
+
}), c = w(() => {
|
|
2352
2353
|
const d = [
|
|
2353
2354
|
"block",
|
|
2354
2355
|
"w-full",
|
|
@@ -2368,75 +2369,75 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2368
2369
|
"font-sans",
|
|
2369
2370
|
"box-border",
|
|
2370
2371
|
"pr-10"
|
|
2371
|
-
],
|
|
2372
|
+
], l = {
|
|
2372
2373
|
small: "px-2 py-1 text-sm",
|
|
2373
2374
|
medium: "px-3 py-2 text-base",
|
|
2374
2375
|
large: "px-4 py-3 text-lg"
|
|
2375
|
-
}, b =
|
|
2376
|
-
return [...d,
|
|
2377
|
-
}),
|
|
2378
|
-
const b = d.target.value,
|
|
2379
|
-
|
|
2376
|
+
}, b = t.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-focus-ring"];
|
|
2377
|
+
return [...d, l[t.size], ...b].join(" ");
|
|
2378
|
+
}), f = (d) => {
|
|
2379
|
+
const b = d.target.value, u = t.options.find((v) => String(v.value) === b);
|
|
2380
|
+
s("update:modelValue", u && typeof u.value == "number" ? u.value : b);
|
|
2380
2381
|
};
|
|
2381
|
-
return (d,
|
|
2382
|
+
return (d, l) => (g(), h("div", fs, [
|
|
2382
2383
|
e.label ? (g(), h("label", {
|
|
2383
2384
|
key: 0,
|
|
2384
|
-
for:
|
|
2385
|
+
for: B(o),
|
|
2385
2386
|
class: "block text-label mb-1"
|
|
2386
2387
|
}, [
|
|
2387
|
-
|
|
2388
|
-
e.required ? (g(), h("span",
|
|
2389
|
-
], 8,
|
|
2390
|
-
k("div",
|
|
2388
|
+
K(L(e.label) + " ", 1),
|
|
2389
|
+
e.required ? (g(), h("span", ms, "*")) : V("", !0)
|
|
2390
|
+
], 8, bs)) : V("", !0),
|
|
2391
|
+
k("div", gs, [
|
|
2391
2392
|
k("select", {
|
|
2392
|
-
id:
|
|
2393
|
+
id: B(o),
|
|
2393
2394
|
value: e.modelValue,
|
|
2394
2395
|
disabled: e.disabled,
|
|
2395
2396
|
required: e.required,
|
|
2396
|
-
"aria-describedby":
|
|
2397
|
+
"aria-describedby": i.value,
|
|
2397
2398
|
"aria-invalid": e.error ? "true" : void 0,
|
|
2398
|
-
class:
|
|
2399
|
-
onChange:
|
|
2400
|
-
onBlur:
|
|
2401
|
-
onFocus:
|
|
2399
|
+
class: R(c.value),
|
|
2400
|
+
onChange: f,
|
|
2401
|
+
onBlur: l[0] || (l[0] = (b) => d.$emit("blur", b)),
|
|
2402
|
+
onFocus: l[1] || (l[1] = (b) => d.$emit("focus", b))
|
|
2402
2403
|
}, [
|
|
2403
2404
|
e.placeholder ? (g(), h("option", {
|
|
2404
2405
|
key: 0,
|
|
2405
2406
|
value: "",
|
|
2406
2407
|
disabled: "",
|
|
2407
2408
|
selected: !e.modelValue
|
|
2408
|
-
},
|
|
2409
|
+
}, L(e.placeholder), 9, vs)) : V("", !0),
|
|
2409
2410
|
(g(!0), h(re, null, ae(e.options, (b) => (g(), h("option", {
|
|
2410
2411
|
key: b.value,
|
|
2411
2412
|
value: b.value,
|
|
2412
2413
|
disabled: b.disabled
|
|
2413
|
-
},
|
|
2414
|
-
], 42,
|
|
2415
|
-
k("div",
|
|
2416
|
-
|
|
2414
|
+
}, L(b.label), 9, ps))), 128))
|
|
2415
|
+
], 42, hs),
|
|
2416
|
+
k("div", ys, [
|
|
2417
|
+
ee(B(Pe), { class: "w-4 h-4 text-fg-tertiary" })
|
|
2417
2418
|
])
|
|
2418
2419
|
]),
|
|
2419
2420
|
e.helpText && !e.error ? (g(), h("div", {
|
|
2420
2421
|
key: 1,
|
|
2421
2422
|
id: r,
|
|
2422
2423
|
class: "mt-1 text-caption"
|
|
2423
|
-
},
|
|
2424
|
+
}, L(e.helpText), 1)) : V("", !0),
|
|
2424
2425
|
e.error ? (g(), h("div", {
|
|
2425
2426
|
key: 2,
|
|
2426
2427
|
id: a,
|
|
2427
2428
|
class: "mt-1 text-sm text-error font-sans",
|
|
2428
2429
|
role: "alert",
|
|
2429
2430
|
"aria-live": "polite"
|
|
2430
|
-
},
|
|
2431
|
+
}, L(e.error), 1)) : V("", !0)
|
|
2431
2432
|
]));
|
|
2432
2433
|
}
|
|
2433
|
-
}),
|
|
2434
|
+
}), xs = { class: "flex flex-col gap-1.5" }, ws = {
|
|
2434
2435
|
key: 0,
|
|
2435
2436
|
class: "flex items-center justify-between"
|
|
2436
|
-
},
|
|
2437
|
+
}, ks = ["for"], $s = {
|
|
2437
2438
|
key: 1,
|
|
2438
2439
|
class: "text-body-sm tabular-nums"
|
|
2439
|
-
},
|
|
2440
|
+
}, Cs = ["id", "value", "min", "max", "step", "disabled"], Ds = /* @__PURE__ */ z({
|
|
2440
2441
|
__name: "DsSlider",
|
|
2441
2442
|
props: {
|
|
2442
2443
|
modelValue: { default: 0 },
|
|
@@ -2448,48 +2449,132 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2448
2449
|
showValue: { type: Boolean, default: !1 }
|
|
2449
2450
|
},
|
|
2450
2451
|
emits: ["update:modelValue"],
|
|
2451
|
-
setup(e, { emit:
|
|
2452
|
-
const
|
|
2452
|
+
setup(e, { emit: n }) {
|
|
2453
|
+
const t = e, s = n, o = se(), r = w(() => (t.modelValue - t.min) / (t.max - t.min) * 100), a = w(() => ({
|
|
2453
2454
|
"--slider-percent": `${r.value}%`
|
|
2454
2455
|
}));
|
|
2455
|
-
function
|
|
2456
|
-
const
|
|
2457
|
-
|
|
2456
|
+
function i(c) {
|
|
2457
|
+
const f = c.target;
|
|
2458
|
+
s("update:modelValue", Number(f.value));
|
|
2458
2459
|
}
|
|
2459
|
-
return (
|
|
2460
|
-
e.label || e.showValue ? (g(), h("div",
|
|
2460
|
+
return (c, f) => (g(), h("div", xs, [
|
|
2461
|
+
e.label || e.showValue ? (g(), h("div", ws, [
|
|
2461
2462
|
e.label ? (g(), h("label", {
|
|
2462
2463
|
key: 0,
|
|
2463
|
-
for:
|
|
2464
|
+
for: B(o),
|
|
2464
2465
|
class: "text-label"
|
|
2465
|
-
},
|
|
2466
|
-
e.showValue ? (g(), h("span",
|
|
2467
|
-
])) :
|
|
2466
|
+
}, L(e.label), 9, ks)) : V("", !0),
|
|
2467
|
+
e.showValue ? (g(), h("span", $s, L(e.modelValue), 1)) : V("", !0)
|
|
2468
|
+
])) : V("", !0),
|
|
2468
2469
|
k("input", {
|
|
2469
|
-
id:
|
|
2470
|
+
id: B(o),
|
|
2470
2471
|
type: "range",
|
|
2471
|
-
class:
|
|
2472
|
+
class: R(["ds-slider", { "opacity-50 cursor-not-allowed": e.disabled }]),
|
|
2472
2473
|
value: e.modelValue,
|
|
2473
2474
|
min: e.min,
|
|
2474
2475
|
max: e.max,
|
|
2475
2476
|
step: e.step,
|
|
2476
2477
|
disabled: e.disabled,
|
|
2477
2478
|
style: le(a.value),
|
|
2478
|
-
onInput:
|
|
2479
|
-
}, null, 46,
|
|
2479
|
+
onInput: i
|
|
2480
|
+
}, null, 46, Cs)
|
|
2480
2481
|
]));
|
|
2481
2482
|
}
|
|
2482
|
-
}),
|
|
2483
|
+
}), To = /* @__PURE__ */ Ct(Ds, [["__scopeId", "data-v-75234e8c"]]), Ts = ["id", "checked", "aria-checked", "disabled"], Vo = /* @__PURE__ */ z({
|
|
2484
|
+
__name: "DsSwitch",
|
|
2485
|
+
props: {
|
|
2486
|
+
modelValue: { type: Boolean, default: !1 },
|
|
2487
|
+
label: {},
|
|
2488
|
+
id: {},
|
|
2489
|
+
disabled: { type: Boolean, default: !1 },
|
|
2490
|
+
size: { default: "medium" },
|
|
2491
|
+
labelPosition: { default: "right" }
|
|
2492
|
+
},
|
|
2493
|
+
emits: ["update:modelValue", "change"],
|
|
2494
|
+
setup(e, { emit: n }) {
|
|
2495
|
+
const t = e, s = n, o = se("switch"), r = t.id ?? o, a = {
|
|
2496
|
+
small: { track: "w-7 h-4", thumb: "w-3 h-3", translate: "translate-x-3", label: "text-xs" },
|
|
2497
|
+
medium: { track: "w-9 h-5", thumb: "w-4 h-4", translate: "translate-x-4", label: "text-sm" },
|
|
2498
|
+
large: { track: "w-11 h-6", thumb: "w-5 h-5", translate: "translate-x-5", label: "text-base" }
|
|
2499
|
+
}, i = w(() => {
|
|
2500
|
+
const b = [
|
|
2501
|
+
a[t.size].track,
|
|
2502
|
+
"relative inline-flex items-center",
|
|
2503
|
+
"rounded-full",
|
|
2504
|
+
"border border-solid border-transparent",
|
|
2505
|
+
"transition-colors duration-fast",
|
|
2506
|
+
"shrink-0"
|
|
2507
|
+
];
|
|
2508
|
+
return t.disabled ? b.push(
|
|
2509
|
+
t.modelValue ? "bg-brand-disabled" : "bg-neutral-border",
|
|
2510
|
+
"opacity-60"
|
|
2511
|
+
) : t.modelValue ? b.push("bg-brand", "group-hover:bg-brand-hover") : b.push("bg-neutral-border", "group-hover:bg-neutral-border-hover"), t.disabled || b.push("peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring peer-focus-visible:ring-offset-2"), b.join(" ");
|
|
2512
|
+
}), c = w(() => {
|
|
2513
|
+
const l = a[t.size], b = [
|
|
2514
|
+
l.thumb,
|
|
2515
|
+
"absolute left-0.5",
|
|
2516
|
+
"rounded-full",
|
|
2517
|
+
"bg-bg",
|
|
2518
|
+
"shadow-thumb",
|
|
2519
|
+
"transition-transform duration-fast"
|
|
2520
|
+
];
|
|
2521
|
+
return t.modelValue && b.push(l.translate), b.join(" ");
|
|
2522
|
+
}), f = w(() => [
|
|
2523
|
+
"font-sans select-none",
|
|
2524
|
+
a[t.size].label,
|
|
2525
|
+
t.disabled ? "text-fg-disabled" : "text-fg"
|
|
2526
|
+
].join(" ")), d = (l) => {
|
|
2527
|
+
if (t.disabled) return;
|
|
2528
|
+
const u = l.target.checked;
|
|
2529
|
+
s("update:modelValue", u), s("change", u, l);
|
|
2530
|
+
};
|
|
2531
|
+
return (l, b) => (g(), h("label", {
|
|
2532
|
+
class: R([
|
|
2533
|
+
"inline-flex items-center gap-2",
|
|
2534
|
+
e.labelPosition === "left" ? "flex-row-reverse" : "",
|
|
2535
|
+
e.disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
2536
|
+
"group"
|
|
2537
|
+
])
|
|
2538
|
+
}, [
|
|
2539
|
+
k("input", {
|
|
2540
|
+
id: B(r),
|
|
2541
|
+
type: "checkbox",
|
|
2542
|
+
role: "switch",
|
|
2543
|
+
checked: e.modelValue,
|
|
2544
|
+
"aria-checked": e.modelValue,
|
|
2545
|
+
disabled: e.disabled,
|
|
2546
|
+
class: "sr-only peer",
|
|
2547
|
+
onChange: d
|
|
2548
|
+
}, null, 40, Ts),
|
|
2549
|
+
k("span", {
|
|
2550
|
+
class: R(i.value),
|
|
2551
|
+
"aria-hidden": "true"
|
|
2552
|
+
}, [
|
|
2553
|
+
k("span", {
|
|
2554
|
+
class: R(c.value)
|
|
2555
|
+
}, null, 2)
|
|
2556
|
+
], 2),
|
|
2557
|
+
e.label || l.$slots.default ? (g(), h("span", {
|
|
2558
|
+
key: 0,
|
|
2559
|
+
class: R(f.value)
|
|
2560
|
+
}, [
|
|
2561
|
+
P(l.$slots, "default", {}, () => [
|
|
2562
|
+
K(L(e.label), 1)
|
|
2563
|
+
])
|
|
2564
|
+
], 2)) : V("", !0)
|
|
2565
|
+
], 2));
|
|
2566
|
+
}
|
|
2567
|
+
}), Vs = { class: "w-full overflow-x-auto shadow-sm" }, Rs = {
|
|
2483
2568
|
class: "w-full border-collapse text-sm",
|
|
2484
2569
|
role: "table"
|
|
2485
|
-
},
|
|
2570
|
+
}, Ls = { class: "border-b border-solid border-border bg-bg-secondary" }, Ss = ["aria-sort", "onClick"], Bs = {
|
|
2486
2571
|
key: 0,
|
|
2487
2572
|
class: "inline-flex",
|
|
2488
2573
|
"aria-hidden": "true"
|
|
2489
|
-
},
|
|
2574
|
+
}, As = { class: "border-solid border-border" }, Os = { key: 0 }, zs = ["colspan"], Es = { key: 1 }, Ms = ["colspan"], js = ["onClick"], Ps = ["onClick"], Is = {
|
|
2490
2575
|
key: 0,
|
|
2491
2576
|
class: "flex items-center justify-between px-4 py-3 border-t border-solid border-border bg-bg-secondary text-sm"
|
|
2492
|
-
},
|
|
2577
|
+
}, Fs = { class: "text-fg-secondary" }, Ns = { class: "flex gap-2" }, Ws = ["disabled"], Hs = ["disabled"], Ro = /* @__PURE__ */ z({
|
|
2493
2578
|
__name: "DsTable",
|
|
2494
2579
|
props: {
|
|
2495
2580
|
columns: {},
|
|
@@ -2506,22 +2591,22 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2506
2591
|
pagination: {}
|
|
2507
2592
|
},
|
|
2508
2593
|
emits: ["update:sortBy", "update:sortOrder", "update:page", "row:click", "cell:click"],
|
|
2509
|
-
setup(e, { expose:
|
|
2510
|
-
const
|
|
2511
|
-
|
|
2512
|
-
|
|
2594
|
+
setup(e, { expose: n, emit: t }) {
|
|
2595
|
+
const s = e, o = t, r = w(() => s.pagination ? Math.ceil(s.pagination.total / s.pagination.perPage) : 0), a = w(() => s.pagination ? (s.pagination.page - 1) * s.pagination.perPage + 1 : 0), i = w(() => s.pagination ? Math.min(
|
|
2596
|
+
s.pagination.page * s.pagination.perPage,
|
|
2597
|
+
s.pagination.total
|
|
2513
2598
|
) : 0);
|
|
2514
|
-
function
|
|
2515
|
-
|
|
2599
|
+
function c(m) {
|
|
2600
|
+
s.sortBy === m ? s.sortOrder === "asc" ? o("update:sortOrder", "desc") : (o("update:sortBy", ""), o("update:sortOrder", "asc")) : (o("update:sortBy", m), o("update:sortOrder", "asc"));
|
|
2516
2601
|
}
|
|
2517
|
-
function
|
|
2602
|
+
function f(m) {
|
|
2518
2603
|
if (m.sortable)
|
|
2519
|
-
return
|
|
2604
|
+
return s.sortBy !== m.key ? "none" : s.sortOrder === "asc" ? "ascending" : "descending";
|
|
2520
2605
|
}
|
|
2521
2606
|
function d(m) {
|
|
2522
2607
|
return m === "center" ? "justify-center" : m === "right" ? "justify-end" : "";
|
|
2523
2608
|
}
|
|
2524
|
-
function
|
|
2609
|
+
function l(m) {
|
|
2525
2610
|
return [
|
|
2526
2611
|
"px-4 py-3 text-left font-sans text-sm font-500 text-fg-secondary",
|
|
2527
2612
|
m.sortable ? "cursor-pointer select-none hover:text-fg" : ""
|
|
@@ -2530,114 +2615,114 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2530
2615
|
function b(m) {
|
|
2531
2616
|
return `px-4 py-3 ${m.align === "center" ? "text-center" : m.align === "right" ? "text-right" : "text-left"}`;
|
|
2532
2617
|
}
|
|
2533
|
-
function
|
|
2534
|
-
|
|
2618
|
+
function u(m, y) {
|
|
2619
|
+
o("row:click", m, y);
|
|
2535
2620
|
}
|
|
2536
|
-
function
|
|
2537
|
-
|
|
2621
|
+
function v(m, y) {
|
|
2622
|
+
o("cell:click", m, y);
|
|
2538
2623
|
}
|
|
2539
|
-
return
|
|
2540
|
-
handleRowClick:
|
|
2541
|
-
handleCellClick:
|
|
2542
|
-
}), (m,
|
|
2543
|
-
k("table",
|
|
2624
|
+
return n({
|
|
2625
|
+
handleRowClick: u,
|
|
2626
|
+
handleCellClick: v
|
|
2627
|
+
}), (m, y) => (g(), h("div", Vs, [
|
|
2628
|
+
k("table", Rs, [
|
|
2544
2629
|
k("thead", {
|
|
2545
|
-
class:
|
|
2630
|
+
class: R(e.stickyHeader ? "sticky top-0 z-sticky" : "")
|
|
2546
2631
|
}, [
|
|
2547
|
-
k("tr",
|
|
2548
|
-
(g(!0), h(re, null, ae(e.columns, (
|
|
2549
|
-
key:
|
|
2550
|
-
style: le(
|
|
2551
|
-
class:
|
|
2552
|
-
"aria-sort":
|
|
2553
|
-
onClick: (C) =>
|
|
2632
|
+
k("tr", Ls, [
|
|
2633
|
+
(g(!0), h(re, null, ae(e.columns, (p) => (g(), h("th", {
|
|
2634
|
+
key: p.key,
|
|
2635
|
+
style: le(p.width ? { width: p.width } : void 0),
|
|
2636
|
+
class: R(l(p)),
|
|
2637
|
+
"aria-sort": f(p),
|
|
2638
|
+
onClick: (C) => p.sortable ? c(p.key) : void 0
|
|
2554
2639
|
}, [
|
|
2555
2640
|
k("div", {
|
|
2556
|
-
class:
|
|
2641
|
+
class: R(["flex items-center gap-1", d(p.align)])
|
|
2557
2642
|
}, [
|
|
2558
|
-
|
|
2559
|
-
|
|
2643
|
+
P(m.$slots, `header-${p.key}`, { column: p }, () => [
|
|
2644
|
+
K(L(p.label), 1)
|
|
2560
2645
|
]),
|
|
2561
|
-
|
|
2562
|
-
e.sortBy ===
|
|
2646
|
+
p.sortable ? (g(), h("span", Bs, [
|
|
2647
|
+
e.sortBy === p.key && e.sortOrder === "asc" ? (g(), N(B(jn), {
|
|
2563
2648
|
key: 0,
|
|
2564
2649
|
class: "w-4 h-4"
|
|
2565
|
-
})) : e.sortBy ===
|
|
2650
|
+
})) : e.sortBy === p.key && e.sortOrder === "desc" ? (g(), N(B(Pe), {
|
|
2566
2651
|
key: 1,
|
|
2567
2652
|
class: "w-4 h-4"
|
|
2568
|
-
})) : (g(), N(
|
|
2653
|
+
})) : (g(), N(B(In), {
|
|
2569
2654
|
key: 2,
|
|
2570
2655
|
class: "w-4 h-4 text-fg-tertiary"
|
|
2571
2656
|
}))
|
|
2572
|
-
])) :
|
|
2657
|
+
])) : V("", !0)
|
|
2573
2658
|
], 2)
|
|
2574
|
-
], 14,
|
|
2659
|
+
], 14, Ss))), 128))
|
|
2575
2660
|
])
|
|
2576
2661
|
], 2),
|
|
2577
|
-
k("tbody",
|
|
2578
|
-
e.loading ? (g(), h("tr",
|
|
2662
|
+
k("tbody", As, [
|
|
2663
|
+
e.loading ? (g(), h("tr", Os, [
|
|
2579
2664
|
k("td", {
|
|
2580
2665
|
colspan: e.columns.length,
|
|
2581
2666
|
class: "text-center py-12"
|
|
2582
2667
|
}, [
|
|
2583
|
-
|
|
2584
|
-
|
|
2668
|
+
P(m.$slots, "loading", {}, () => [
|
|
2669
|
+
ee(os, { centered: "" })
|
|
2585
2670
|
])
|
|
2586
|
-
], 8,
|
|
2587
|
-
])) : e.rows.length === 0 ? (g(), h("tr",
|
|
2671
|
+
], 8, zs)
|
|
2672
|
+
])) : e.rows.length === 0 ? (g(), h("tr", Es, [
|
|
2588
2673
|
k("td", {
|
|
2589
2674
|
colspan: e.columns.length,
|
|
2590
2675
|
class: "text-center py-12 text-fg-secondary"
|
|
2591
2676
|
}, [
|
|
2592
|
-
|
|
2593
|
-
|
|
2677
|
+
P(m.$slots, "empty", {}, () => [
|
|
2678
|
+
K(L(e.emptyText), 1)
|
|
2594
2679
|
])
|
|
2595
|
-
], 8,
|
|
2596
|
-
])) :
|
|
2597
|
-
(g(!0), h(re, null, ae(e.rows, (
|
|
2680
|
+
], 8, Ms)
|
|
2681
|
+
])) : V("", !0),
|
|
2682
|
+
(g(!0), h(re, null, ae(e.rows, (p, C) => (g(), h("tr", {
|
|
2598
2683
|
key: C,
|
|
2599
|
-
class:
|
|
2684
|
+
class: R([
|
|
2600
2685
|
"border-b border-solid border-y-border-light transition-colors hover:bg-surface-hover-light border-x-border",
|
|
2601
2686
|
e.striped && C % 2 === 1 ? "bg-bg-secondary" : ""
|
|
2602
2687
|
]),
|
|
2603
|
-
onClick: (
|
|
2688
|
+
onClick: (D) => u(p, C)
|
|
2604
2689
|
}, [
|
|
2605
|
-
(g(!0), h(re, null, ae(e.columns, (
|
|
2606
|
-
key:
|
|
2607
|
-
class:
|
|
2608
|
-
onClick: (
|
|
2690
|
+
(g(!0), h(re, null, ae(e.columns, (D) => (g(), h("td", {
|
|
2691
|
+
key: D.key,
|
|
2692
|
+
class: R(b(D)),
|
|
2693
|
+
onClick: (A) => v(p, D.key)
|
|
2609
2694
|
}, [
|
|
2610
|
-
|
|
2611
|
-
row:
|
|
2612
|
-
value:
|
|
2695
|
+
P(m.$slots, `cell-${D.key}`, {
|
|
2696
|
+
row: p,
|
|
2697
|
+
value: p[D.key],
|
|
2613
2698
|
index: C
|
|
2614
2699
|
}, () => [
|
|
2615
|
-
|
|
2700
|
+
K(L(p[D.key]), 1)
|
|
2616
2701
|
])
|
|
2617
|
-
], 10,
|
|
2618
|
-
], 10,
|
|
2702
|
+
], 10, Ps))), 128))
|
|
2703
|
+
], 10, js))), 128))
|
|
2619
2704
|
])
|
|
2620
2705
|
]),
|
|
2621
|
-
e.pagination ? (g(), h("div",
|
|
2622
|
-
k("span",
|
|
2623
|
-
k("div",
|
|
2706
|
+
e.pagination ? (g(), h("div", Is, [
|
|
2707
|
+
k("span", Fs, L(a.value) + "–" + L(i.value) + " " + L(e.ofLabel) + " " + L(e.pagination.total), 1),
|
|
2708
|
+
k("div", Ns, [
|
|
2624
2709
|
k("button", {
|
|
2625
2710
|
type: "button",
|
|
2626
2711
|
disabled: e.pagination.page <= 1,
|
|
2627
2712
|
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",
|
|
2628
|
-
onClick:
|
|
2629
|
-
},
|
|
2713
|
+
onClick: y[0] || (y[0] = (p) => m.$emit("update:page", e.pagination.page - 1))
|
|
2714
|
+
}, L(e.previousPageLabel), 9, Ws),
|
|
2630
2715
|
k("button", {
|
|
2631
2716
|
type: "button",
|
|
2632
2717
|
disabled: e.pagination.page >= r.value,
|
|
2633
2718
|
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",
|
|
2634
|
-
onClick:
|
|
2635
|
-
},
|
|
2719
|
+
onClick: y[1] || (y[1] = (p) => m.$emit("update:page", e.pagination.page + 1))
|
|
2720
|
+
}, L(e.nextPageLabel), 9, Hs)
|
|
2636
2721
|
])
|
|
2637
|
-
])) :
|
|
2722
|
+
])) : V("", !0)
|
|
2638
2723
|
]));
|
|
2639
2724
|
}
|
|
2640
|
-
}),
|
|
2725
|
+
}), qs = ["aria-label"], Ks = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick", "onKeydown"], Us = ["id", "aria-labelledby", "hidden"], Lo = /* @__PURE__ */ z({
|
|
2641
2726
|
__name: "DsTabs",
|
|
2642
2727
|
props: {
|
|
2643
2728
|
modelValue: {},
|
|
@@ -2646,96 +2731,96 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2646
2731
|
ariaLabel: { default: "Tabs" }
|
|
2647
2732
|
},
|
|
2648
2733
|
emits: ["update:modelValue"],
|
|
2649
|
-
setup(e, { emit:
|
|
2650
|
-
const
|
|
2651
|
-
() =>
|
|
2734
|
+
setup(e, { emit: n }) {
|
|
2735
|
+
const t = e, s = n, o = se("tabs"), r = w(
|
|
2736
|
+
() => t.variant === "line" ? "flex border-b border-solid border-border gap-0" : "flex gap-1 bg-neutral-soft p-1 rounded-lg"
|
|
2652
2737
|
);
|
|
2653
|
-
function a(
|
|
2654
|
-
|
|
2738
|
+
function a(f) {
|
|
2739
|
+
f.disabled || s("update:modelValue", f.key);
|
|
2655
2740
|
}
|
|
2656
|
-
function
|
|
2657
|
-
const d =
|
|
2658
|
-
return
|
|
2659
|
-
|
|
2741
|
+
function i(f) {
|
|
2742
|
+
const d = t.modelValue === f.key, l = "font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed";
|
|
2743
|
+
return t.variant === "line" ? [
|
|
2744
|
+
l,
|
|
2660
2745
|
"px-4 py-2 text-sm border-b-2 border-solid border-t-0 border-l-0 border-r-0 bg-transparent -mb-px",
|
|
2661
2746
|
d ? "border-b-brand text-brand" : "border-b-transparent text-fg-secondary hover:text-fg hover:border-b-border-strong"
|
|
2662
2747
|
].join(" ") : [
|
|
2663
|
-
|
|
2748
|
+
l,
|
|
2664
2749
|
"px-3 py-1.5 text-sm rounded-md border-0",
|
|
2665
2750
|
d ? "bg-bg text-fg shadow-default" : "bg-transparent text-fg-secondary hover:text-fg"
|
|
2666
2751
|
].join(" ");
|
|
2667
2752
|
}
|
|
2668
|
-
function
|
|
2669
|
-
const
|
|
2670
|
-
(
|
|
2753
|
+
function c(f, d) {
|
|
2754
|
+
const l = t.tabs.filter((y) => !y.disabled), b = l.findIndex(
|
|
2755
|
+
(y) => y.key === t.tabs[d].key
|
|
2671
2756
|
);
|
|
2672
|
-
let
|
|
2673
|
-
switch (
|
|
2757
|
+
let u = -1;
|
|
2758
|
+
switch (f.key) {
|
|
2674
2759
|
case "ArrowRight":
|
|
2675
2760
|
case "ArrowDown":
|
|
2676
|
-
|
|
2761
|
+
f.preventDefault(), u = (b + 1) % l.length;
|
|
2677
2762
|
break;
|
|
2678
2763
|
case "ArrowLeft":
|
|
2679
2764
|
case "ArrowUp":
|
|
2680
|
-
|
|
2765
|
+
f.preventDefault(), u = (b - 1 + l.length) % l.length;
|
|
2681
2766
|
break;
|
|
2682
2767
|
case "Home":
|
|
2683
|
-
|
|
2768
|
+
f.preventDefault(), u = 0;
|
|
2684
2769
|
break;
|
|
2685
2770
|
case "End":
|
|
2686
|
-
|
|
2771
|
+
f.preventDefault(), u = l.length - 1;
|
|
2687
2772
|
break;
|
|
2688
2773
|
default:
|
|
2689
2774
|
return;
|
|
2690
2775
|
}
|
|
2691
|
-
const
|
|
2692
|
-
|
|
2693
|
-
const m = document.getElementById(`${
|
|
2776
|
+
const v = l[u];
|
|
2777
|
+
s("update:modelValue", v.key);
|
|
2778
|
+
const m = document.getElementById(`${o}-tab-${v.key}`);
|
|
2694
2779
|
m == null || m.focus();
|
|
2695
2780
|
}
|
|
2696
|
-
return (
|
|
2781
|
+
return (f, d) => (g(), h("div", null, [
|
|
2697
2782
|
k("div", {
|
|
2698
|
-
class:
|
|
2783
|
+
class: R(r.value),
|
|
2699
2784
|
role: "tablist",
|
|
2700
2785
|
"aria-label": e.ariaLabel
|
|
2701
2786
|
}, [
|
|
2702
|
-
(g(!0), h(re, null, ae(e.tabs, (
|
|
2703
|
-
key:
|
|
2704
|
-
id: `${
|
|
2787
|
+
(g(!0), h(re, null, ae(e.tabs, (l, b) => (g(), h("button", {
|
|
2788
|
+
key: l.key,
|
|
2789
|
+
id: `${B(o)}-tab-${l.key}`,
|
|
2705
2790
|
role: "tab",
|
|
2706
2791
|
type: "button",
|
|
2707
|
-
"aria-selected": e.modelValue ===
|
|
2708
|
-
"aria-controls": `${
|
|
2709
|
-
tabindex: e.modelValue ===
|
|
2710
|
-
disabled:
|
|
2711
|
-
class:
|
|
2712
|
-
onClick: (
|
|
2713
|
-
onKeydown: (
|
|
2714
|
-
},
|
|
2715
|
-
], 10,
|
|
2716
|
-
(g(!0), h(re, null, ae(e.tabs, (
|
|
2717
|
-
key:
|
|
2718
|
-
id: `${
|
|
2792
|
+
"aria-selected": e.modelValue === l.key,
|
|
2793
|
+
"aria-controls": `${B(o)}-panel-${l.key}`,
|
|
2794
|
+
tabindex: e.modelValue === l.key ? 0 : -1,
|
|
2795
|
+
disabled: l.disabled,
|
|
2796
|
+
class: R(i(l)),
|
|
2797
|
+
onClick: (u) => a(l),
|
|
2798
|
+
onKeydown: (u) => c(u, b)
|
|
2799
|
+
}, L(l.label), 43, Ks))), 128))
|
|
2800
|
+
], 10, qs),
|
|
2801
|
+
(g(!0), h(re, null, ae(e.tabs, (l) => (g(), h("div", {
|
|
2802
|
+
key: l.key,
|
|
2803
|
+
id: `${B(o)}-panel-${l.key}`,
|
|
2719
2804
|
role: "tabpanel",
|
|
2720
|
-
"aria-labelledby": `${
|
|
2721
|
-
hidden: e.modelValue !==
|
|
2805
|
+
"aria-labelledby": `${B(o)}-tab-${l.key}`,
|
|
2806
|
+
hidden: e.modelValue !== l.key,
|
|
2722
2807
|
tabindex: 0
|
|
2723
2808
|
}, [
|
|
2724
|
-
e.modelValue ===
|
|
2725
|
-
], 8,
|
|
2809
|
+
e.modelValue === l.key ? P(f.$slots, l.key, { key: 0 }) : V("", !0)
|
|
2810
|
+
], 8, Us))), 128))
|
|
2726
2811
|
]));
|
|
2727
2812
|
}
|
|
2728
|
-
}),
|
|
2813
|
+
}), Xs = { class: "w-full" }, Ys = ["for"], Gs = {
|
|
2729
2814
|
key: 0,
|
|
2730
2815
|
class: "text-error ml-1",
|
|
2731
2816
|
"aria-hidden": "true"
|
|
2732
|
-
},
|
|
2817
|
+
}, Js = { class: "relative" }, Qs = ["id", "value", "placeholder", "disabled", "readonly", "required", "rows", "maxlength", "aria-describedby", "aria-invalid"], Zs = {
|
|
2733
2818
|
key: 1,
|
|
2734
2819
|
class: "flex justify-between mt-1"
|
|
2735
|
-
},
|
|
2820
|
+
}, _s = {
|
|
2736
2821
|
key: 2,
|
|
2737
2822
|
class: "text-caption ml-auto"
|
|
2738
|
-
},
|
|
2823
|
+
}, So = /* @__PURE__ */ z({
|
|
2739
2824
|
__name: "DsTextarea",
|
|
2740
2825
|
props: {
|
|
2741
2826
|
modelValue: {},
|
|
@@ -2751,11 +2836,11 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2751
2836
|
maxLength: {}
|
|
2752
2837
|
},
|
|
2753
2838
|
emits: ["update:modelValue", "blur", "focus"],
|
|
2754
|
-
setup(e, { expose:
|
|
2755
|
-
const
|
|
2839
|
+
setup(e, { expose: n, emit: t }) {
|
|
2840
|
+
const s = e, o = t, r = j(null), a = se("textarea"), i = `${a}-help`, c = `${a}-error`, f = w(() => {
|
|
2756
2841
|
const m = [];
|
|
2757
|
-
return
|
|
2758
|
-
}), d = w(() => (
|
|
2842
|
+
return s.helpText && !s.error && m.push(i), s.error && m.push(c), m.length > 0 ? m.join(" ") : void 0;
|
|
2843
|
+
}), d = w(() => (s.modelValue || "").length), l = w(() => {
|
|
2759
2844
|
const m = [
|
|
2760
2845
|
"block",
|
|
2761
2846
|
"w-full",
|
|
@@ -2775,38 +2860,38 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2775
2860
|
"disabled:bg-surface-disabled",
|
|
2776
2861
|
"disabled:text-fg-disabled",
|
|
2777
2862
|
"box-border"
|
|
2778
|
-
],
|
|
2863
|
+
], y = {
|
|
2779
2864
|
small: "px-2 py-1 text-sm",
|
|
2780
2865
|
medium: "px-3 py-2 text-base",
|
|
2781
2866
|
large: "px-4 py-3 text-lg"
|
|
2782
|
-
},
|
|
2783
|
-
return [...m,
|
|
2867
|
+
}, p = s.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-focus-ring"];
|
|
2868
|
+
return [...m, y[s.size], ...p].join(" ");
|
|
2784
2869
|
}), b = (m) => {
|
|
2785
|
-
const
|
|
2786
|
-
|
|
2870
|
+
const y = m.target;
|
|
2871
|
+
o("update:modelValue", y.value);
|
|
2787
2872
|
};
|
|
2788
|
-
function
|
|
2873
|
+
function u() {
|
|
2789
2874
|
var m;
|
|
2790
2875
|
(m = r.value) == null || m.focus();
|
|
2791
2876
|
}
|
|
2792
|
-
function
|
|
2877
|
+
function v() {
|
|
2793
2878
|
var m;
|
|
2794
2879
|
(m = r.value) == null || m.blur();
|
|
2795
2880
|
}
|
|
2796
|
-
return
|
|
2881
|
+
return n({ focus: u, blur: v, textareaRef: r }), (m, y) => (g(), h("div", Xs, [
|
|
2797
2882
|
e.label ? (g(), h("label", {
|
|
2798
2883
|
key: 0,
|
|
2799
|
-
for:
|
|
2884
|
+
for: B(a),
|
|
2800
2885
|
class: "block text-label mb-1"
|
|
2801
2886
|
}, [
|
|
2802
|
-
|
|
2803
|
-
e.required ? (g(), h("span",
|
|
2804
|
-
], 8,
|
|
2805
|
-
k("div",
|
|
2887
|
+
K(L(e.label) + " ", 1),
|
|
2888
|
+
e.required ? (g(), h("span", Gs, "*")) : V("", !0)
|
|
2889
|
+
], 8, Ys)) : V("", !0),
|
|
2890
|
+
k("div", Js, [
|
|
2806
2891
|
k("textarea", {
|
|
2807
2892
|
ref_key: "textareaRef",
|
|
2808
2893
|
ref: r,
|
|
2809
|
-
id:
|
|
2894
|
+
id: B(a),
|
|
2810
2895
|
value: e.modelValue,
|
|
2811
2896
|
placeholder: e.placeholder,
|
|
2812
2897
|
disabled: e.disabled,
|
|
@@ -2814,66 +2899,66 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2814
2899
|
required: e.required,
|
|
2815
2900
|
rows: e.rows,
|
|
2816
2901
|
maxlength: e.maxLength,
|
|
2817
|
-
"aria-describedby":
|
|
2902
|
+
"aria-describedby": f.value,
|
|
2818
2903
|
"aria-invalid": e.error ? "true" : void 0,
|
|
2819
|
-
class:
|
|
2904
|
+
class: R(l.value),
|
|
2820
2905
|
onInput: b,
|
|
2821
|
-
onBlur:
|
|
2822
|
-
onFocus:
|
|
2823
|
-
}, null, 42,
|
|
2906
|
+
onBlur: y[0] || (y[0] = (p) => m.$emit("blur", p)),
|
|
2907
|
+
onFocus: y[1] || (y[1] = (p) => m.$emit("focus", p))
|
|
2908
|
+
}, null, 42, Qs)
|
|
2824
2909
|
]),
|
|
2825
|
-
e.helpText || e.error || e.maxLength ? (g(), h("div",
|
|
2910
|
+
e.helpText || e.error || e.maxLength ? (g(), h("div", Zs, [
|
|
2826
2911
|
e.helpText && !e.error ? (g(), h("div", {
|
|
2827
2912
|
key: 0,
|
|
2828
|
-
id:
|
|
2913
|
+
id: i,
|
|
2829
2914
|
class: "text-caption"
|
|
2830
|
-
},
|
|
2915
|
+
}, L(e.helpText), 1)) : V("", !0),
|
|
2831
2916
|
e.error ? (g(), h("div", {
|
|
2832
2917
|
key: 1,
|
|
2833
|
-
id:
|
|
2918
|
+
id: c,
|
|
2834
2919
|
class: "text-sm text-error font-sans",
|
|
2835
2920
|
role: "alert",
|
|
2836
2921
|
"aria-live": "polite"
|
|
2837
|
-
},
|
|
2838
|
-
e.maxLength ? (g(), h("div",
|
|
2839
|
-
])) :
|
|
2922
|
+
}, L(e.error), 1)) : V("", !0),
|
|
2923
|
+
e.maxLength ? (g(), h("div", _s, L(d.value) + " / " + L(e.maxLength), 1)) : V("", !0)
|
|
2924
|
+
])) : V("", !0)
|
|
2840
2925
|
]));
|
|
2841
2926
|
}
|
|
2842
|
-
}),
|
|
2927
|
+
}), eo = { class: "flex flex-col items-center justify-center h-screen gap-4px" }, to = { class: "text-heading-xl text-fg m-0 p-0" }, no = { class: "text-body-lg text-fg-secondary m-0 p-0" }, Bo = /* @__PURE__ */ z({
|
|
2843
2928
|
__name: "DsUnderConstruction",
|
|
2844
2929
|
props: {
|
|
2845
2930
|
title: { default: "Under Construction" },
|
|
2846
2931
|
description: { default: "This page is under construction. Please check back later." }
|
|
2847
2932
|
},
|
|
2848
2933
|
setup(e) {
|
|
2849
|
-
return (
|
|
2850
|
-
|
|
2851
|
-
k("h2",
|
|
2852
|
-
k("p",
|
|
2934
|
+
return (n, t) => (g(), h("div", eo, [
|
|
2935
|
+
ee(B($t), { class: "w-10 h-10 text-fg-secondary" }),
|
|
2936
|
+
k("h2", to, L(e.title), 1),
|
|
2937
|
+
k("p", no, L(e.description), 1)
|
|
2853
2938
|
]));
|
|
2854
2939
|
}
|
|
2855
|
-
}),
|
|
2940
|
+
}), so = ["role", "aria-live"], oo = { class: "flex items-start gap-3 flex-1 min-w-0" }, ro = { class: "flex-1 min-w-0" }, ao = {
|
|
2856
2941
|
key: 0,
|
|
2857
2942
|
class: "text-label m-0"
|
|
2858
|
-
},
|
|
2943
|
+
}, lo = /* @__PURE__ */ z({
|
|
2859
2944
|
__name: "DsToast",
|
|
2860
2945
|
props: {
|
|
2861
2946
|
toast: {}
|
|
2862
2947
|
},
|
|
2863
2948
|
emits: ["dismiss"],
|
|
2864
|
-
setup(e, { emit:
|
|
2865
|
-
const
|
|
2866
|
-
let
|
|
2867
|
-
function
|
|
2868
|
-
r <= 0 || (a = Date.now(),
|
|
2869
|
-
|
|
2949
|
+
setup(e, { emit: n }) {
|
|
2950
|
+
const t = e, s = n;
|
|
2951
|
+
let o = null, r = t.toast.duration, a = 0;
|
|
2952
|
+
function i() {
|
|
2953
|
+
r <= 0 || (a = Date.now(), o = setTimeout(() => {
|
|
2954
|
+
s("dismiss", t.toast.id);
|
|
2870
2955
|
}, r));
|
|
2871
2956
|
}
|
|
2872
|
-
function
|
|
2873
|
-
|
|
2957
|
+
function c() {
|
|
2958
|
+
o && (clearTimeout(o), o = null, r -= Date.now() - a);
|
|
2874
2959
|
}
|
|
2875
|
-
function
|
|
2876
|
-
|
|
2960
|
+
function f() {
|
|
2961
|
+
i();
|
|
2877
2962
|
}
|
|
2878
2963
|
const d = {
|
|
2879
2964
|
brand: "border-l-brand",
|
|
@@ -2881,52 +2966,52 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2881
2966
|
success: "border-l-success",
|
|
2882
2967
|
warning: "border-l-warning",
|
|
2883
2968
|
info: "border-l-info"
|
|
2884
|
-
},
|
|
2969
|
+
}, l = w(() => [
|
|
2885
2970
|
"flex items-start gap-3 w-80 p-4 bg-bg border border-solid border-border rounded-lg shadow-lg",
|
|
2886
2971
|
"border-l-4",
|
|
2887
|
-
d[
|
|
2972
|
+
d[t.toast.variant] || "border-l-brand"
|
|
2888
2973
|
].join(" ")), b = {
|
|
2889
2974
|
brand: "text-brand",
|
|
2890
2975
|
error: "text-error",
|
|
2891
2976
|
success: "text-success",
|
|
2892
2977
|
warning: "text-warning",
|
|
2893
2978
|
info: "text-info"
|
|
2894
|
-
},
|
|
2895
|
-
return
|
|
2896
|
-
|
|
2897
|
-
}),
|
|
2898
|
-
|
|
2899
|
-
}), (
|
|
2900
|
-
class:
|
|
2979
|
+
}, u = w(() => ["shrink-0 mt-0.5", b[t.toast.variant] || "text-brand"].join(" "));
|
|
2980
|
+
return ot(() => {
|
|
2981
|
+
t.toast.duration > 0 && i();
|
|
2982
|
+
}), at(() => {
|
|
2983
|
+
o && clearTimeout(o);
|
|
2984
|
+
}), (v, m) => (g(), h("div", {
|
|
2985
|
+
class: R(l.value),
|
|
2901
2986
|
role: e.toast.variant === "error" ? "alert" : "status",
|
|
2902
2987
|
"aria-live": e.toast.variant === "error" ? "assertive" : "polite",
|
|
2903
|
-
onMouseenter:
|
|
2904
|
-
onMouseleave:
|
|
2988
|
+
onMouseenter: c,
|
|
2989
|
+
onMouseleave: f
|
|
2905
2990
|
}, [
|
|
2906
|
-
k("div",
|
|
2991
|
+
k("div", oo, [
|
|
2907
2992
|
k("span", {
|
|
2908
|
-
class:
|
|
2993
|
+
class: R(u.value),
|
|
2909
2994
|
"aria-hidden": "true"
|
|
2910
2995
|
}, [
|
|
2911
|
-
e.toast.variant === "success" ? (g(), N(
|
|
2996
|
+
e.toast.variant === "success" ? (g(), N(B(Mn), {
|
|
2912
2997
|
key: 0,
|
|
2913
2998
|
class: "w-5 h-5"
|
|
2914
|
-
})) : e.toast.variant === "error" ? (g(), N(
|
|
2999
|
+
})) : e.toast.variant === "error" ? (g(), N(B(Se), {
|
|
2915
3000
|
key: 1,
|
|
2916
3001
|
class: "w-5 h-5"
|
|
2917
|
-
})) : e.toast.variant === "warning" ? (g(), N(
|
|
3002
|
+
})) : e.toast.variant === "warning" ? (g(), N(B($t), {
|
|
2918
3003
|
key: 2,
|
|
2919
3004
|
class: "w-5 h-5"
|
|
2920
|
-
})) : (g(), N(
|
|
3005
|
+
})) : (g(), N(B(Pn), {
|
|
2921
3006
|
key: 3,
|
|
2922
3007
|
class: "w-5 h-5"
|
|
2923
3008
|
}))
|
|
2924
3009
|
], 2),
|
|
2925
|
-
k("div",
|
|
2926
|
-
e.toast.title ? (g(), h("p",
|
|
3010
|
+
k("div", ro, [
|
|
3011
|
+
e.toast.title ? (g(), h("p", ao, L(e.toast.title), 1)) : V("", !0),
|
|
2927
3012
|
k("p", {
|
|
2928
|
-
class:
|
|
2929
|
-
},
|
|
3013
|
+
class: R(["text-body-sm m-0", e.toast.title ? "mt-0.5" : ""])
|
|
3014
|
+
}, L(e.toast.message), 3)
|
|
2930
3015
|
])
|
|
2931
3016
|
]),
|
|
2932
3017
|
e.toast.closable ? (g(), h("button", {
|
|
@@ -2934,51 +3019,51 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2934
3019
|
type: "button",
|
|
2935
3020
|
class: "appearance-none bg-transparent border-none p-1 rounded-md text-fg-tertiary hover:text-fg cursor-pointer transition-colors shrink-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring",
|
|
2936
3021
|
"aria-label": "Dismiss notification",
|
|
2937
|
-
onClick: m[0] || (m[0] = (
|
|
3022
|
+
onClick: m[0] || (m[0] = (y) => v.$emit("dismiss", e.toast.id))
|
|
2938
3023
|
}, [
|
|
2939
|
-
|
|
2940
|
-
])) :
|
|
2941
|
-
], 42,
|
|
3024
|
+
ee(B(Se), { class: "w-4 h-4" })
|
|
3025
|
+
])) : V("", !0)
|
|
3026
|
+
], 42, so));
|
|
2942
3027
|
}
|
|
2943
3028
|
});
|
|
2944
|
-
let
|
|
2945
|
-
const
|
|
2946
|
-
function
|
|
2947
|
-
const
|
|
2948
|
-
id:
|
|
3029
|
+
let io = 0;
|
|
3030
|
+
const Be = j([]);
|
|
3031
|
+
function we(e, n, t) {
|
|
3032
|
+
const s = ++io, o = {
|
|
3033
|
+
id: s,
|
|
2949
3034
|
variant: e,
|
|
2950
|
-
message:
|
|
2951
|
-
title:
|
|
2952
|
-
duration: (
|
|
2953
|
-
closable: (
|
|
3035
|
+
message: n,
|
|
3036
|
+
title: t == null ? void 0 : t.title,
|
|
3037
|
+
duration: (t == null ? void 0 : t.duration) ?? 5e3,
|
|
3038
|
+
closable: (t == null ? void 0 : t.closable) ?? !0
|
|
2954
3039
|
};
|
|
2955
|
-
return
|
|
3040
|
+
return Be.value.push(o), s;
|
|
2956
3041
|
}
|
|
2957
|
-
function
|
|
2958
|
-
const
|
|
2959
|
-
|
|
3042
|
+
function co(e) {
|
|
3043
|
+
const n = Be.value.findIndex((t) => t.id === e);
|
|
3044
|
+
n !== -1 && Be.value.splice(n, 1);
|
|
2960
3045
|
}
|
|
2961
|
-
function
|
|
3046
|
+
function uo() {
|
|
2962
3047
|
return {
|
|
2963
|
-
toasts:
|
|
2964
|
-
removeToast:
|
|
2965
|
-
success: (e,
|
|
2966
|
-
error: (e,
|
|
2967
|
-
warning: (e,
|
|
2968
|
-
info: (e,
|
|
2969
|
-
brand: (e,
|
|
3048
|
+
toasts: Be,
|
|
3049
|
+
removeToast: co,
|
|
3050
|
+
success: (e, n) => we("success", e, n),
|
|
3051
|
+
error: (e, n) => we("error", e, n),
|
|
3052
|
+
warning: (e, n) => we("warning", e, n),
|
|
3053
|
+
info: (e, n) => we("info", e, n),
|
|
3054
|
+
brand: (e, n) => we("brand", e, n)
|
|
2970
3055
|
};
|
|
2971
3056
|
}
|
|
2972
|
-
const
|
|
3057
|
+
const fo = {
|
|
2973
3058
|
class: "fixed top-4 right-4 z-toast flex flex-col gap-3",
|
|
2974
3059
|
"aria-label": "Notifications"
|
|
2975
|
-
},
|
|
3060
|
+
}, Ao = /* @__PURE__ */ z({
|
|
2976
3061
|
__name: "DsToastContainer",
|
|
2977
3062
|
setup(e) {
|
|
2978
|
-
const { toasts:
|
|
2979
|
-
return (
|
|
2980
|
-
k("div",
|
|
2981
|
-
|
|
3063
|
+
const { toasts: n, removeToast: t } = uo();
|
|
3064
|
+
return (s, o) => (g(), N(Oe, { to: "body" }, [
|
|
3065
|
+
k("div", fo, [
|
|
3066
|
+
ee(St, {
|
|
2982
3067
|
"enter-active-class": "transition-all duration-slow ease-out",
|
|
2983
3068
|
"enter-from-class": "opacity-0 translate-x-8",
|
|
2984
3069
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -2986,11 +3071,11 @@ const fs = {
|
|
|
2986
3071
|
"leave-from-class": "opacity-100 translate-x-0",
|
|
2987
3072
|
"leave-to-class": "opacity-0 translate-x-8"
|
|
2988
3073
|
}, {
|
|
2989
|
-
default:
|
|
2990
|
-
(g(!0), h(re, null, ae(
|
|
3074
|
+
default: Ae(() => [
|
|
3075
|
+
(g(!0), h(re, null, ae(B(n), (r) => (g(), N(lo, {
|
|
2991
3076
|
key: r.id,
|
|
2992
3077
|
toast: r,
|
|
2993
|
-
onDismiss:
|
|
3078
|
+
onDismiss: B(t)
|
|
2994
3079
|
}, null, 8, ["toast", "onDismiss"]))), 128))
|
|
2995
3080
|
]),
|
|
2996
3081
|
_: 1
|
|
@@ -2998,7 +3083,7 @@ const fs = {
|
|
|
2998
3083
|
])
|
|
2999
3084
|
]));
|
|
3000
3085
|
}
|
|
3001
|
-
}),
|
|
3086
|
+
}), bo = ["aria-describedby"], mo = ["id"], Oo = /* @__PURE__ */ z({
|
|
3002
3087
|
__name: "DsTooltip",
|
|
3003
3088
|
props: {
|
|
3004
3089
|
content: {},
|
|
@@ -3006,41 +3091,41 @@ const fs = {
|
|
|
3006
3091
|
disabled: { type: Boolean, default: !1 }
|
|
3007
3092
|
},
|
|
3008
3093
|
setup(e) {
|
|
3009
|
-
const
|
|
3010
|
-
placement: w(() =>
|
|
3011
|
-
middleware: [
|
|
3094
|
+
const n = e, t = se("tooltip"), s = j(!1), o = j(null), r = j(null), a = j(null), { floatingStyles: i, middlewareData: c, placement: f } = kt(o, r, {
|
|
3095
|
+
placement: w(() => n.placement),
|
|
3096
|
+
middleware: [pt(8), xt(), yt({ padding: 8 }), En({ element: a })]
|
|
3012
3097
|
}), d = w(() => {
|
|
3013
|
-
const
|
|
3014
|
-
if (!
|
|
3015
|
-
const
|
|
3098
|
+
const u = c.value.arrow;
|
|
3099
|
+
if (!u) return {};
|
|
3100
|
+
const v = f.value.split("-")[0], m = { top: "bottom", right: "left", bottom: "top", left: "right" }[v];
|
|
3016
3101
|
return {
|
|
3017
|
-
left:
|
|
3018
|
-
top:
|
|
3102
|
+
left: u.x != null ? `${u.x}px` : "",
|
|
3103
|
+
top: u.y != null ? `${u.y}px` : "",
|
|
3019
3104
|
[m]: "-4px"
|
|
3020
3105
|
};
|
|
3021
3106
|
});
|
|
3022
|
-
function
|
|
3023
|
-
|
|
3107
|
+
function l() {
|
|
3108
|
+
n.disabled || (s.value = !0);
|
|
3024
3109
|
}
|
|
3025
3110
|
function b() {
|
|
3026
|
-
|
|
3111
|
+
s.value = !1;
|
|
3027
3112
|
}
|
|
3028
|
-
return (
|
|
3113
|
+
return (u, v) => (g(), h("div", {
|
|
3029
3114
|
class: "inline-flex",
|
|
3030
|
-
onMouseenter:
|
|
3115
|
+
onMouseenter: l,
|
|
3031
3116
|
onMouseleave: b,
|
|
3032
|
-
onFocusin:
|
|
3117
|
+
onFocusin: l,
|
|
3033
3118
|
onFocusout: b
|
|
3034
3119
|
}, [
|
|
3035
3120
|
k("div", {
|
|
3036
3121
|
ref_key: "referenceRef",
|
|
3037
|
-
ref:
|
|
3038
|
-
"aria-describedby":
|
|
3122
|
+
ref: o,
|
|
3123
|
+
"aria-describedby": s.value ? B(t) : void 0
|
|
3039
3124
|
}, [
|
|
3040
|
-
|
|
3041
|
-
], 8,
|
|
3042
|
-
(g(), N(
|
|
3043
|
-
|
|
3125
|
+
P(u.$slots, "default")
|
|
3126
|
+
], 8, bo),
|
|
3127
|
+
(g(), N(Oe, { to: "body" }, [
|
|
3128
|
+
ee(lt, {
|
|
3044
3129
|
"enter-active-class": "transition-opacity duration-fast",
|
|
3045
3130
|
"enter-from-class": "opacity-0",
|
|
3046
3131
|
"enter-to-class": "opacity-100",
|
|
@@ -3048,297 +3133,65 @@ const fs = {
|
|
|
3048
3133
|
"leave-from-class": "opacity-100",
|
|
3049
3134
|
"leave-to-class": "opacity-0"
|
|
3050
3135
|
}, {
|
|
3051
|
-
default:
|
|
3052
|
-
|
|
3136
|
+
default: Ae(() => [
|
|
3137
|
+
s.value && !e.disabled ? (g(), h("div", {
|
|
3053
3138
|
key: 0,
|
|
3054
|
-
id:
|
|
3139
|
+
id: B(t),
|
|
3055
3140
|
ref_key: "floatingRef",
|
|
3056
3141
|
ref: r,
|
|
3057
3142
|
role: "tooltip",
|
|
3058
|
-
style: le(
|
|
3143
|
+
style: le(B(i)),
|
|
3059
3144
|
class: "z-tooltip px-2 py-1 text-xs font-medium bg-bg-inverse text-fg-inverse rounded-md shadow-md max-w-xs pointer-events-none"
|
|
3060
3145
|
}, [
|
|
3061
|
-
|
|
3146
|
+
K(L(e.content) + " ", 1),
|
|
3062
3147
|
k("div", {
|
|
3063
3148
|
ref_key: "arrowRef",
|
|
3064
3149
|
ref: a,
|
|
3065
3150
|
style: le(d.value),
|
|
3066
3151
|
class: "absolute w-2 h-2 bg-bg-inverse rotate-45"
|
|
3067
3152
|
}, null, 4)
|
|
3068
|
-
], 12,
|
|
3153
|
+
], 12, mo)) : V("", !0)
|
|
3069
3154
|
]),
|
|
3070
3155
|
_: 1
|
|
3071
3156
|
})
|
|
3072
3157
|
]))
|
|
3073
3158
|
], 32));
|
|
3074
3159
|
}
|
|
3075
|
-
})
|
|
3076
|
-
// Core UI
|
|
3077
|
-
bg: "#FFFFFF",
|
|
3078
|
-
"bg-secondary": "#F8FAFC",
|
|
3079
|
-
"bg-tertiary": "#F1F5F9",
|
|
3080
|
-
"bg-inverse": "#0F172A",
|
|
3081
|
-
"bg-inverse-secondary": "#1E293B",
|
|
3082
|
-
fg: "#0F172A",
|
|
3083
|
-
"fg-secondary": "#64748B",
|
|
3084
|
-
"fg-tertiary": "#94A3B8",
|
|
3085
|
-
"fg-inverse": "#FFFFFF",
|
|
3086
|
-
"fg-disabled": "#94A3B8",
|
|
3087
|
-
icon: "#64748B",
|
|
3088
|
-
"icon-hover": "#0F172A",
|
|
3089
|
-
"icon-active": "#0EA5E9",
|
|
3090
|
-
"icon-inverse": "#FFFFFF",
|
|
3091
|
-
"icon-disabled": "#CBD5E1",
|
|
3092
|
-
border: "#E2E8F0",
|
|
3093
|
-
"border-light": "#F1F5F9",
|
|
3094
|
-
"border-strong": "#CBD5E1",
|
|
3095
|
-
"border-focus": "#0F172A",
|
|
3096
|
-
"surface-hover": "#E2E8F0",
|
|
3097
|
-
"surface-hover-light": "#F1F5F9",
|
|
3098
|
-
"surface-active": "#B7E6FD",
|
|
3099
|
-
"surface-disabled": "#FAFCFF",
|
|
3100
|
-
// Brand
|
|
3101
|
-
brand: "#0EA5E9",
|
|
3102
|
-
"brand-hover": "#0284C7",
|
|
3103
|
-
"brand-active": "#0369A1",
|
|
3104
|
-
"brand-disabled": "#BAE6FD",
|
|
3105
|
-
"brand-soft": "#F0F9FF",
|
|
3106
|
-
"brand-soft-hover": "#E0F2FE",
|
|
3107
|
-
"brand-soft-active": "#B7E6FD",
|
|
3108
|
-
"brand-on-solid": "#FFFFFF",
|
|
3109
|
-
"brand-on-soft": "#0EA5E9",
|
|
3110
|
-
"brand-border": "#B7E6FD",
|
|
3111
|
-
"brand-border-hover": "#7DD3FC",
|
|
3112
|
-
"brand-border-strong": "#0369A1",
|
|
3113
|
-
"brand-secondary": "#6366F1",
|
|
3114
|
-
// Neutral
|
|
3115
|
-
neutral: "#64748B",
|
|
3116
|
-
"neutral-soft": "#F8FAFC",
|
|
3117
|
-
"neutral-soft-hover": "#F1F5F9",
|
|
3118
|
-
"neutral-soft-active": "#E2E8F0",
|
|
3119
|
-
"neutral-on-solid": "#FFFFFF",
|
|
3120
|
-
"neutral-on-soft": "#0F172A",
|
|
3121
|
-
"neutral-border": "#D1D5DB",
|
|
3122
|
-
"neutral-border-hover": "#B5BCC9",
|
|
3123
|
-
"neutral-border-strong": "#94A3B8",
|
|
3124
|
-
// Error
|
|
3125
|
-
error: "#EF4444",
|
|
3126
|
-
"error-hover": "#DC2626",
|
|
3127
|
-
"error-active": "#B91C1C",
|
|
3128
|
-
"error-soft": "#FEF2F2",
|
|
3129
|
-
"error-soft-hover": "#FEE2E2",
|
|
3130
|
-
"error-soft-active": "#FECACA",
|
|
3131
|
-
"error-on-solid": "#FFFFFF",
|
|
3132
|
-
"error-on-soft": "#EF4444",
|
|
3133
|
-
"error-border": "#F8CDD1",
|
|
3134
|
-
"error-border-hover": "#F5A6B3",
|
|
3135
|
-
"error-border-strong": "#B91C1C",
|
|
3136
|
-
// Success
|
|
3137
|
-
success: "#10B981",
|
|
3138
|
-
"success-hover": "#0A8D63",
|
|
3139
|
-
"success-active": "#047857",
|
|
3140
|
-
"success-soft": "#ECFDF5",
|
|
3141
|
-
"success-soft-hover": "#D1FAE5",
|
|
3142
|
-
"success-soft-active": "#A7F3D0",
|
|
3143
|
-
"success-on-solid": "#FFFFFF",
|
|
3144
|
-
"success-on-soft": "#10B981",
|
|
3145
|
-
"success-border": "#BEF3D0",
|
|
3146
|
-
"success-border-hover": "#86EFAC",
|
|
3147
|
-
"success-border-strong": "#0EA875",
|
|
3148
|
-
// Warning
|
|
3149
|
-
warning: "#F59E0B",
|
|
3150
|
-
"warning-hover": "#D97706",
|
|
3151
|
-
"warning-active": "#B45309",
|
|
3152
|
-
"warning-soft": "#FFFBEB",
|
|
3153
|
-
"warning-soft-hover": "#FEF3C7",
|
|
3154
|
-
"warning-soft-active": "#FDE68A",
|
|
3155
|
-
"warning-on-solid": "#FFFFFF",
|
|
3156
|
-
"warning-on-soft": "#92400E",
|
|
3157
|
-
"warning-border": "#F3E6A5",
|
|
3158
|
-
"warning-border-hover": "#E6D378",
|
|
3159
|
-
"warning-border-strong": "#B45309",
|
|
3160
|
-
// Info
|
|
3161
|
-
info: "#3B82F6",
|
|
3162
|
-
"info-hover": "#2563EB",
|
|
3163
|
-
"info-active": "#1D4ED8",
|
|
3164
|
-
"info-soft": "#EFF6FF",
|
|
3165
|
-
"info-soft-hover": "#DBEAFE",
|
|
3166
|
-
"info-soft-active": "#BFDBFE",
|
|
3167
|
-
"info-on-solid": "#FFFFFF",
|
|
3168
|
-
"info-on-soft": "#1E40AF",
|
|
3169
|
-
"info-border": "#C5D7F5",
|
|
3170
|
-
"info-border-hover": "#A8CCF2",
|
|
3171
|
-
"info-border-strong": "#1D4ED8",
|
|
3172
|
-
// Processing
|
|
3173
|
-
processing: "#06B6D4",
|
|
3174
|
-
"processing-hover": "#0891B2",
|
|
3175
|
-
"processing-active": "#0E7490",
|
|
3176
|
-
"processing-soft": "#ECFEFF",
|
|
3177
|
-
"processing-soft-hover": "#CFFAFE",
|
|
3178
|
-
"processing-soft-active": "#A5F3FC",
|
|
3179
|
-
"processing-on-solid": "#FFFFFF",
|
|
3180
|
-
"processing-on-soft": "#155E75",
|
|
3181
|
-
"processing-border": "#B3F0FC",
|
|
3182
|
-
"processing-border-hover": "#7FE8F5",
|
|
3183
|
-
"processing-border-strong": "#0E7490",
|
|
3184
|
-
// Overlay
|
|
3185
|
-
overlay: "rgba(15, 23, 42, 0.15)",
|
|
3186
|
-
// Focus
|
|
3187
|
-
"focus-ring": "#0EA5E9"
|
|
3188
|
-
}, hs = {
|
|
3189
|
-
"space-1": "4px",
|
|
3190
|
-
"space-2": "8px",
|
|
3191
|
-
"space-3": "12px",
|
|
3192
|
-
"space-4": "16px",
|
|
3193
|
-
"space-5": "24px",
|
|
3194
|
-
"space-6": "32px",
|
|
3195
|
-
"space-7": "48px",
|
|
3196
|
-
"space-8": "64px"
|
|
3197
|
-
}, ps = {
|
|
3198
|
-
"radius-sm": "4px",
|
|
3199
|
-
"radius-md": "6px",
|
|
3200
|
-
"radius-lg": "8px",
|
|
3201
|
-
"radius-xl": "12px",
|
|
3202
|
-
"radius-full": "9999px"
|
|
3203
|
-
}, vs = {
|
|
3204
|
-
"shadow-sm": "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
3205
|
-
"shadow-md": "0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 4px 6px -1px rgba(0, 0, 0, 0.1)",
|
|
3206
|
-
"shadow-lg": "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
|
3207
|
-
"shadow-thumb": "0 1px 3px rgba(0, 0, 0, 0.15)",
|
|
3208
|
-
"shadow-card": "0 4px 2px 0 rgba(69, 89, 114, 0.02), 0 6px 14px 0 rgba(69, 89, 114, 0.06)",
|
|
3209
|
-
"shadow-elevated": "0px 2px 2px 0px rgba(69, 89, 114, 0.06), 0px 6px 6px 0px rgba(69, 89, 114, 0.04)",
|
|
3210
|
-
"shadow-focus": "0 0 0 0.125rem rgba(14, 165, 233, 0.2)"
|
|
3211
|
-
}, xs = {
|
|
3212
|
-
"z-sticky": "10",
|
|
3213
|
-
"z-dropdown": "40",
|
|
3214
|
-
"z-overlay": "50",
|
|
3215
|
-
"z-modal": "50",
|
|
3216
|
-
"z-toast": "60",
|
|
3217
|
-
"z-tooltip": "70"
|
|
3218
|
-
}, ys = {
|
|
3219
|
-
"duration-fast": "150ms",
|
|
3220
|
-
"duration-normal": "200ms",
|
|
3221
|
-
"duration-slow": "300ms",
|
|
3222
|
-
"ease-default": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
3223
|
-
"ease-in": "cubic-bezier(0.4, 0, 1, 1)",
|
|
3224
|
-
"ease-out": "cubic-bezier(0, 0, 0.2, 1)",
|
|
3225
|
-
"ease-in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
3226
|
-
}, qs = { ...gs, ...hs, ...ps, ...vs, ...xs, ...ys };
|
|
3227
|
-
function Us(e) {
|
|
3228
|
-
return `--ds-${e}`;
|
|
3229
|
-
}
|
|
3230
|
-
function Ks(e, t = ":root") {
|
|
3231
|
-
const n = Object.entries(e).map(([o, s]) => ` --ds-${o}: ${s};`).join(`
|
|
3232
|
-
`);
|
|
3233
|
-
return `${t} {
|
|
3234
|
-
${n}
|
|
3235
|
-
}`;
|
|
3236
|
-
}
|
|
3237
|
-
function ws(e) {
|
|
3238
|
-
const t = e.replace("#", ""), n = t.length === 3 ? t.split("").map((c) => c + c).join("") : t, o = parseInt(n.slice(0, 2), 16) / 255, s = parseInt(n.slice(2, 4), 16) / 255, r = parseInt(n.slice(4, 6), 16) / 255, a = Math.max(o, s, r), l = Math.min(o, s, r);
|
|
3239
|
-
let i = 0, u = 0;
|
|
3240
|
-
const d = (a + l) / 2;
|
|
3241
|
-
if (a !== l) {
|
|
3242
|
-
const c = a - l;
|
|
3243
|
-
switch (u = d > 0.5 ? c / (2 - a - l) : c / (a + l), a) {
|
|
3244
|
-
case o:
|
|
3245
|
-
i = ((s - r) / c + (s < r ? 6 : 0)) / 6;
|
|
3246
|
-
break;
|
|
3247
|
-
case s:
|
|
3248
|
-
i = ((r - o) / c + 2) / 6;
|
|
3249
|
-
break;
|
|
3250
|
-
case r:
|
|
3251
|
-
i = ((o - s) / c + 4) / 6;
|
|
3252
|
-
break;
|
|
3253
|
-
}
|
|
3254
|
-
}
|
|
3255
|
-
return { h: i * 360, s: u * 100, l: d * 100 };
|
|
3256
|
-
}
|
|
3257
|
-
function J(e, t, n) {
|
|
3258
|
-
e /= 360, t /= 100, n /= 100;
|
|
3259
|
-
let o, s, r;
|
|
3260
|
-
if (t === 0)
|
|
3261
|
-
o = s = r = n;
|
|
3262
|
-
else {
|
|
3263
|
-
const l = (d, c, b) => (b < 0 && (b += 1), b > 1 && (b -= 1), b < 0.16666666666666666 ? d + (c - d) * 6 * b : b < 0.5 ? c : b < 0.6666666666666666 ? d + (c - d) * (0.6666666666666666 - b) * 6 : d), i = n < 0.5 ? n * (1 + t) : n + t - n * t, u = 2 * n - i;
|
|
3264
|
-
o = l(u, i, e + 1 / 3), s = l(u, i, e), r = l(u, i, e - 1 / 3);
|
|
3265
|
-
}
|
|
3266
|
-
const a = (l) => {
|
|
3267
|
-
const i = Math.round(l * 255).toString(16);
|
|
3268
|
-
return i.length === 1 ? "0" + i : i;
|
|
3269
|
-
};
|
|
3270
|
-
return `#${a(o)}${a(s)}${a(r)}`.toUpperCase();
|
|
3271
|
-
}
|
|
3272
|
-
function ks(e) {
|
|
3273
|
-
const t = e.replace("#", ""), n = parseInt(t.slice(0, 2), 16) / 255, o = parseInt(t.slice(2, 4), 16) / 255, s = parseInt(t.slice(4, 6), 16) / 255, r = (l) => l <= 0.03928 ? l / 12.92 : Math.pow((l + 0.055) / 1.055, 2.4);
|
|
3274
|
-
return 0.2126 * r(n) + 0.7152 * r(o) + 0.0722 * r(s) > 0.4 ? "#000000" : "#FFFFFF";
|
|
3275
|
-
}
|
|
3276
|
-
function $s(e) {
|
|
3277
|
-
const { h: t, s: n, l: o } = ws(e), s = 100 - o;
|
|
3278
|
-
return {
|
|
3279
|
-
base: J(t, n, o),
|
|
3280
|
-
hover: J(t, n, o * 0.85),
|
|
3281
|
-
active: J(t, n, o * 0.72),
|
|
3282
|
-
disabled: J(t, n, o + s * 0.7),
|
|
3283
|
-
soft: J(t, n, o + s * 0.85),
|
|
3284
|
-
"soft-hover": J(t, n, o + s * 0.78),
|
|
3285
|
-
"soft-active": J(t, n, o + s * 0.7),
|
|
3286
|
-
"on-solid": ks(e),
|
|
3287
|
-
"on-soft": J(t, n, Math.max(10, o * 0.86)),
|
|
3288
|
-
border: J(t, n, o + s * 0.7),
|
|
3289
|
-
"border-hover": J(t, n, o + s * 0.55),
|
|
3290
|
-
"border-strong": J(t, n, o * 0.72)
|
|
3291
|
-
};
|
|
3292
|
-
}
|
|
3293
|
-
const Cs = ["brand", "error", "success", "warning", "info", "processing", "neutral"];
|
|
3294
|
-
function Fs(e) {
|
|
3295
|
-
const t = {};
|
|
3296
|
-
for (const n of Cs) {
|
|
3297
|
-
const o = $s(e[n]);
|
|
3298
|
-
t[n] = o.base, t[`${n}-hover`] = o.hover, t[`${n}-active`] = o.active, t[`${n}-soft`] = o.soft, t[`${n}-soft-hover`] = o["soft-hover"], t[`${n}-soft-active`] = o["soft-active"], t[`${n}-on-solid`] = o["on-solid"], t[`${n}-on-soft`] = o["on-soft"], t[`${n}-border`] = o.border, t[`${n}-border-hover`] = o["border-hover"], t[`${n}-border-strong`] = o["border-strong"], n === "brand" && (t["brand-disabled"] = o.disabled);
|
|
3299
|
-
}
|
|
3300
|
-
return t["focus-ring"] = e.brand, t;
|
|
3301
|
-
}
|
|
3302
|
-
function Xs(e, t = ":root") {
|
|
3303
|
-
const n = Fs(e), o = Object.entries(n).map(([s, r]) => ` --ds-${s}: ${r};`).join(`
|
|
3304
|
-
`);
|
|
3305
|
-
return `${t} {
|
|
3306
|
-
${o}
|
|
3307
|
-
}`;
|
|
3308
|
-
}
|
|
3160
|
+
});
|
|
3309
3161
|
export {
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3162
|
+
ho as DsAvatar,
|
|
3163
|
+
vo as DsBadge,
|
|
3164
|
+
it as DsButton,
|
|
3165
|
+
po as DsCard,
|
|
3166
|
+
yo as DsCheckbox,
|
|
3167
|
+
xo as DsDropdownSelect,
|
|
3168
|
+
wo as DsExpandableCard,
|
|
3169
|
+
ko as DsInput,
|
|
3170
|
+
os as DsLoadingSpinner,
|
|
3171
|
+
$o as DsModal,
|
|
3172
|
+
Co as DsRadio,
|
|
3173
|
+
Do as DsSelect,
|
|
3174
|
+
To as DsSlider,
|
|
3175
|
+
Vo as DsSwitch,
|
|
3176
|
+
Ro as DsTable,
|
|
3177
|
+
Lo as DsTabs,
|
|
3178
|
+
So as DsTextarea,
|
|
3179
|
+
lo as DsToast,
|
|
3180
|
+
Ao as DsToastContainer,
|
|
3181
|
+
Oo as DsTooltip,
|
|
3182
|
+
Bo as DsUnderConstruction,
|
|
3183
|
+
Mo as allTokens,
|
|
3184
|
+
jo as colorTokens,
|
|
3185
|
+
Po as expandBases,
|
|
3186
|
+
Io as generateFullTheme,
|
|
3187
|
+
Fo as generatePalette,
|
|
3188
|
+
No as generateThemeCss,
|
|
3189
|
+
Wo as hexToHSL,
|
|
3190
|
+
Ho as hslToHex,
|
|
3191
|
+
qo as radiusTokens,
|
|
3192
|
+
Ko as shadowTokens,
|
|
3193
|
+
Uo as spacingTokens,
|
|
3194
|
+
Xo as tokenToCssVar,
|
|
3195
|
+
se as useId,
|
|
3196
|
+
uo as useToast
|
|
3344
3197
|
};
|