@leodamours/ds-components 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +492 -49
- package/dist/components/DsSwitch.vue.d.ts +57 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1592 -1688
- 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 re, computed as w, openBlock as g, createElementBlock as p, normalizeClass as V, toDisplayString as L, createCommentVNode as R, renderSlot as P, createTextVNode as K, createBlock as N, resolveDynamicComponent as Te, normalizeStyle as _, createElementVNode as $, shallowRef as Tt, getCurrentScope as Vt, onScopeDispose as Rt, shallowReadonly as he, unref as S, mergeProps as me, createVNode as te, withCtx as Ae, Teleport as Oe, withModifiers as Lt, Fragment as le, renderList as ie, nextTick as fe, onMounted as qe, withKeys as rt, onBeforeUnmount as Ke, Transition as lt, reactive as Bt, 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 At = ["aria-label"], Ot = ["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
|
+
re(() => 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(), p("span", {
|
|
44
|
+
class: V(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(), p("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] = (l) => t.value = !0)
|
|
54
|
+
}, null, 40, Ot)) : (g(), p("span", {
|
|
54
55
|
key: 1,
|
|
55
|
-
class:
|
|
56
|
+
class: V(r.value),
|
|
56
57
|
"aria-hidden": "true"
|
|
57
|
-
},
|
|
58
|
-
], 10,
|
|
58
|
+
}, L(s.value), 3))
|
|
59
|
+
], 10, At));
|
|
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(), p("span", {
|
|
104
|
+
class: V(t.value)
|
|
104
105
|
}, [
|
|
105
|
-
e.dot ? (g(),
|
|
106
|
+
e.dot ? (g(), p("span", {
|
|
106
107
|
key: 0,
|
|
107
|
-
class:
|
|
108
|
+
class: V(s.value),
|
|
108
109
|
"aria-hidden": "true"
|
|
109
|
-
}, null, 2)) :
|
|
110
|
-
e.dot ?
|
|
111
|
-
|
|
110
|
+
}, null, 2)) : R("", !0),
|
|
111
|
+
e.dot ? R("", !0) : P(o.$slots, "default", { key: 1 }, () => [
|
|
112
|
+
K(L(e.label), 1)
|
|
112
113
|
])
|
|
113
114
|
], 2));
|
|
114
115
|
}
|
|
115
|
-
}),
|
|
116
|
+
}), zt = ["type", "disabled", "aria-label", "aria-busy"], Et = { 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,79 +206,79 @@ 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(), p("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: V(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:
|
|
231
|
+
class: V(s.value),
|
|
232
|
+
style: _(e.label || o.$slots.default ? "margin-right: 0.375rem" : ""),
|
|
232
233
|
"aria-hidden": "true"
|
|
233
|
-
}, null, 8, ["class", "style"])) :
|
|
234
|
-
e.label ? (g(),
|
|
235
|
-
e.iconRight ? (g(), N(
|
|
234
|
+
}, null, 8, ["class", "style"])) : R("", !0),
|
|
235
|
+
e.label ? (g(), p("span", Et, 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:
|
|
238
|
+
class: V(s.value),
|
|
239
|
+
style: _(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"])) : R("", !0)
|
|
242
|
+
], 10, zt));
|
|
242
243
|
}
|
|
243
|
-
}),
|
|
244
|
+
}), Mt = {
|
|
244
245
|
key: 0,
|
|
245
246
|
class: "px-4 py-3 border-b border-b-solid border-border"
|
|
246
|
-
},
|
|
247
|
+
}, jt = {
|
|
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
|
|
258
|
-
default: ["border", "border-solid", "border-border-strong"
|
|
257
|
+
const n = e, t = w(() => {
|
|
258
|
+
const o = ["rounded-lg", "bg-bg", "overflow-hidden"], r = {
|
|
259
|
+
default: ["border", "border-solid", "border-border-strong"],
|
|
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(), p("div", {
|
|
266
|
+
class: V(t.value)
|
|
266
267
|
}, [
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
])) :
|
|
270
|
-
|
|
271
|
-
class:
|
|
268
|
+
o.$slots.header ? (g(), p("div", Mt, [
|
|
269
|
+
P(o.$slots, "header")
|
|
270
|
+
])) : R("", !0),
|
|
271
|
+
$("div", {
|
|
272
|
+
class: V(s.value)
|
|
272
273
|
}, [
|
|
273
|
-
|
|
274
|
+
P(o.$slots, "default")
|
|
274
275
|
], 2),
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
])) :
|
|
276
|
+
o.$slots.footer ? (g(), p("div", jt, [
|
|
277
|
+
P(o.$slots, "footer")
|
|
278
|
+
])) : R("", !0)
|
|
278
279
|
], 2));
|
|
279
280
|
}
|
|
280
|
-
}),
|
|
281
|
+
}), Pt = ["id", "checked", "disabled", "value"], It = {
|
|
281
282
|
key: 0,
|
|
282
283
|
viewBox: "0 0 12 12",
|
|
283
284
|
fill: "none",
|
|
@@ -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,75 +298,75 @@ 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 l = o[t.size], c = [
|
|
308
|
+
l.box,
|
|
309
|
+
l.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 ? c.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 ? c.push("bg-brand border-brand text-brand-on-solid") : c.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
|
+
), c.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 = (l) => {
|
|
328
|
+
if (t.disabled) return;
|
|
329
|
+
const d = l.target.checked;
|
|
330
|
+
s("update:modelValue", d), s("change", d, l);
|
|
330
331
|
};
|
|
331
|
-
return (
|
|
332
|
-
class:
|
|
332
|
+
return (l, c) => (g(), p("label", {
|
|
333
|
+
class: V([
|
|
333
334
|
"inline-flex items-center gap-2",
|
|
334
335
|
e.disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
335
336
|
"group"
|
|
336
337
|
])
|
|
337
338
|
}, [
|
|
338
|
-
|
|
339
|
+
$("input", {
|
|
339
340
|
id: e.id,
|
|
340
341
|
type: "checkbox",
|
|
341
342
|
checked: e.modelValue,
|
|
342
343
|
disabled: e.disabled,
|
|
343
344
|
value: e.value,
|
|
344
345
|
class: "sr-only peer",
|
|
345
|
-
onChange:
|
|
346
|
-
}, null, 40,
|
|
347
|
-
|
|
348
|
-
class:
|
|
346
|
+
onChange: i
|
|
347
|
+
}, null, 40, Pt),
|
|
348
|
+
$("span", {
|
|
349
|
+
class: V(r.value),
|
|
349
350
|
"aria-hidden": "true"
|
|
350
351
|
}, [
|
|
351
|
-
e.modelValue ? (g(),
|
|
352
|
-
|
|
353
|
-
])])) :
|
|
352
|
+
e.modelValue ? (g(), p("svg", It, [...c[0] || (c[0] = [
|
|
353
|
+
$("polyline", { points: "2.5 6 5 8.5 9.5 3.5" }, null, -1)
|
|
354
|
+
])])) : R("", !0)
|
|
354
355
|
], 2),
|
|
355
|
-
e.label ||
|
|
356
|
+
e.label || l.$slots.default ? (g(), p("span", {
|
|
356
357
|
key: 0,
|
|
357
|
-
class:
|
|
358
|
+
class: V(a.value)
|
|
358
359
|
}, [
|
|
359
|
-
|
|
360
|
-
|
|
360
|
+
P(l.$slots, "default", {}, () => [
|
|
361
|
+
K(L(e.label), 1)
|
|
361
362
|
])
|
|
362
|
-
], 2)) :
|
|
363
|
+
], 2)) : R("", !0)
|
|
363
364
|
], 2));
|
|
364
365
|
}
|
|
365
|
-
}),
|
|
366
|
+
}), ce = Math.min, q = Math.max, Ve = Math.round, De = Math.floor, Z = (e) => ({
|
|
366
367
|
x: e,
|
|
367
368
|
y: e
|
|
368
|
-
}),
|
|
369
|
+
}), Ft = {
|
|
369
370
|
left: "right",
|
|
370
371
|
right: "left",
|
|
371
372
|
bottom: "top",
|
|
@@ -374,64 +375,64 @@ const Rt = ["aria-label"], Lt = ["src", "alt"], Es = /* @__PURE__ */ S({
|
|
|
374
375
|
start: "end",
|
|
375
376
|
end: "start"
|
|
376
377
|
};
|
|
377
|
-
function
|
|
378
|
-
return q(e,
|
|
378
|
+
function Fe(e, n, t) {
|
|
379
|
+
return q(e, ce(n, t));
|
|
379
380
|
}
|
|
380
|
-
function
|
|
381
|
-
return typeof e == "function" ? e(
|
|
381
|
+
function xe(e, n) {
|
|
382
|
+
return typeof e == "function" ? e(n) : e;
|
|
382
383
|
}
|
|
383
|
-
function
|
|
384
|
+
function de(e) {
|
|
384
385
|
return e.split("-")[0];
|
|
385
386
|
}
|
|
386
387
|
function we(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
393
|
function Ue(e) {
|
|
393
394
|
return e === "y" ? "height" : "width";
|
|
394
395
|
}
|
|
395
396
|
const Wt = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
396
|
-
function
|
|
397
|
-
return Wt.has(
|
|
397
|
+
function se(e) {
|
|
398
|
+
return Wt.has(de(e)) ? "y" : "x";
|
|
398
399
|
}
|
|
399
|
-
function
|
|
400
|
-
return
|
|
400
|
+
function Xe(e) {
|
|
401
|
+
return ct(se(e));
|
|
401
402
|
}
|
|
402
|
-
function Ht(e,
|
|
403
|
-
|
|
404
|
-
const
|
|
405
|
-
let a =
|
|
406
|
-
return
|
|
403
|
+
function Ht(e, n, t) {
|
|
404
|
+
t === void 0 && (t = !1);
|
|
405
|
+
const s = we(e), o = Xe(e), r = Ue(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
409
|
function qt(e) {
|
|
409
|
-
const
|
|
410
|
-
return [
|
|
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) => Nt[n]);
|
|
414
415
|
}
|
|
415
|
-
const
|
|
416
|
-
function Xt(e,
|
|
416
|
+
const Ze = ["left", "right"], _e = ["right", "left"], Kt = ["top", "bottom"], Ut = ["bottom", "top"];
|
|
417
|
+
function Xt(e, n, t) {
|
|
417
418
|
switch (e) {
|
|
418
419
|
case "top":
|
|
419
420
|
case "bottom":
|
|
420
|
-
return
|
|
421
|
+
return t ? n ? _e : Ze : n ? Ze : _e;
|
|
421
422
|
case "left":
|
|
422
423
|
case "right":
|
|
423
|
-
return
|
|
424
|
+
return n ? Kt : Ut;
|
|
424
425
|
default:
|
|
425
426
|
return [];
|
|
426
427
|
}
|
|
427
428
|
}
|
|
428
|
-
function Yt(e,
|
|
429
|
-
const
|
|
430
|
-
let r = Xt(
|
|
431
|
-
return
|
|
429
|
+
function Yt(e, n, t, s) {
|
|
430
|
+
const o = we(e);
|
|
431
|
+
let r = Xt(de(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) => Ft[n]);
|
|
435
436
|
}
|
|
436
437
|
function Gt(e) {
|
|
437
438
|
return {
|
|
@@ -442,7 +443,7 @@ function Gt(e) {
|
|
|
442
443
|
...e
|
|
443
444
|
};
|
|
444
445
|
}
|
|
445
|
-
function
|
|
446
|
+
function dt(e) {
|
|
446
447
|
return typeof e != "number" ? Gt(e) : {
|
|
447
448
|
top: e,
|
|
448
449
|
right: e,
|
|
@@ -450,293 +451,293 @@ function ut(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 et(e, n, t) {
|
|
472
473
|
let {
|
|
473
|
-
reference:
|
|
474
|
-
floating:
|
|
474
|
+
reference: s,
|
|
475
|
+
floating: o
|
|
475
476
|
} = e;
|
|
476
|
-
const r =
|
|
477
|
+
const r = se(n), a = Xe(n), i = Ue(a), l = de(n), c = r === "y", d = s.x + s.width / 2 - o.width / 2, u = s.y + s.height / 2 - o.height / 2, b = s[i] / 2 - o[i] / 2;
|
|
477
478
|
let f;
|
|
478
|
-
switch (
|
|
479
|
+
switch (l) {
|
|
479
480
|
case "top":
|
|
480
481
|
f = {
|
|
481
482
|
x: d,
|
|
482
|
-
y:
|
|
483
|
+
y: s.y - o.height
|
|
483
484
|
};
|
|
484
485
|
break;
|
|
485
486
|
case "bottom":
|
|
486
487
|
f = {
|
|
487
488
|
x: d,
|
|
488
|
-
y:
|
|
489
|
+
y: s.y + s.height
|
|
489
490
|
};
|
|
490
491
|
break;
|
|
491
492
|
case "right":
|
|
492
493
|
f = {
|
|
493
|
-
x:
|
|
494
|
-
y:
|
|
494
|
+
x: s.x + s.width,
|
|
495
|
+
y: u
|
|
495
496
|
};
|
|
496
497
|
break;
|
|
497
498
|
case "left":
|
|
498
499
|
f = {
|
|
499
|
-
x:
|
|
500
|
-
y:
|
|
500
|
+
x: s.x - o.width,
|
|
501
|
+
y: u
|
|
501
502
|
};
|
|
502
503
|
break;
|
|
503
504
|
default:
|
|
504
505
|
f = {
|
|
505
|
-
x:
|
|
506
|
-
y:
|
|
506
|
+
x: s.x,
|
|
507
|
+
y: s.y
|
|
507
508
|
};
|
|
508
509
|
}
|
|
509
|
-
switch (we(
|
|
510
|
+
switch (we(n)) {
|
|
510
511
|
case "start":
|
|
511
|
-
f[a] -= b * (
|
|
512
|
+
f[a] -= b * (t && c ? -1 : 1);
|
|
512
513
|
break;
|
|
513
514
|
case "end":
|
|
514
|
-
f[a] += b * (
|
|
515
|
+
f[a] += b * (t && c ? -1 : 1);
|
|
515
516
|
break;
|
|
516
517
|
}
|
|
517
518
|
return f;
|
|
518
519
|
}
|
|
519
|
-
async function Jt(e,
|
|
520
|
-
var
|
|
521
|
-
|
|
520
|
+
async function Jt(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: l
|
|
529
530
|
} = e, {
|
|
530
|
-
boundary:
|
|
531
|
+
boundary: c = "clippingAncestors",
|
|
531
532
|
rootBoundary: d = "viewport",
|
|
532
|
-
elementContext:
|
|
533
|
+
elementContext: u = "floating",
|
|
533
534
|
altBoundary: b = !1,
|
|
534
535
|
padding: f = 0
|
|
535
|
-
} =
|
|
536
|
-
element: (
|
|
537
|
-
boundary:
|
|
536
|
+
} = xe(n, e), h = dt(f), v = i[b ? u === "floating" ? "reference" : "floating" : u], y = Le(await r.getClippingRect({
|
|
537
|
+
element: (t = await (r.isElement == null ? void 0 : r.isElement(v))) == null || t ? v : v.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(i.floating)),
|
|
538
|
+
boundary: c,
|
|
538
539
|
rootBoundary: d,
|
|
539
|
-
strategy:
|
|
540
|
-
})),
|
|
541
|
-
x:
|
|
542
|
-
y:
|
|
540
|
+
strategy: l
|
|
541
|
+
})), k = u === "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, C = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(i.floating)), A = await (r.isElement == null ? void 0 : r.isElement(C)) ? await (r.getScale == null ? void 0 : r.getScale(C)) || {
|
|
546
547
|
x: 1,
|
|
547
548
|
y: 1
|
|
548
549
|
} : {
|
|
549
550
|
x: 1,
|
|
550
551
|
y: 1
|
|
551
|
-
},
|
|
552
|
-
elements:
|
|
553
|
-
rect:
|
|
554
|
-
offsetParent:
|
|
555
|
-
strategy:
|
|
556
|
-
}) :
|
|
552
|
+
}, T = Le(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
553
|
+
elements: i,
|
|
554
|
+
rect: k,
|
|
555
|
+
offsetParent: C,
|
|
556
|
+
strategy: l
|
|
557
|
+
}) : k);
|
|
557
558
|
return {
|
|
558
|
-
top: (
|
|
559
|
-
bottom: (
|
|
560
|
-
left: (
|
|
561
|
-
right: (
|
|
559
|
+
top: (y.top - T.top + h.top) / A.y,
|
|
560
|
+
bottom: (T.bottom - y.bottom + h.bottom) / A.y,
|
|
561
|
+
left: (y.left - T.left + h.left) / A.x,
|
|
562
|
+
right: (T.right - y.right + h.right) / A.x
|
|
562
563
|
};
|
|
563
564
|
}
|
|
564
|
-
const Qt = async (e,
|
|
565
|
+
const Qt = 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), l = await (a.isRTL == null ? void 0 : a.isRTL(n));
|
|
572
|
+
let c = 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: u
|
|
579
|
+
} = et(c, s, l), b = s, f = {}, h = 0;
|
|
580
|
+
for (let v = 0; v < i.length; v++) {
|
|
580
581
|
var m;
|
|
581
582
|
const {
|
|
582
|
-
name:
|
|
583
|
-
fn:
|
|
584
|
-
} =
|
|
585
|
-
x:
|
|
586
|
-
y:
|
|
587
|
-
data:
|
|
588
|
-
reset:
|
|
589
|
-
} = await
|
|
583
|
+
name: y,
|
|
584
|
+
fn: k
|
|
585
|
+
} = i[v], {
|
|
586
|
+
x: C,
|
|
587
|
+
y: A,
|
|
588
|
+
data: T,
|
|
589
|
+
reset: B
|
|
590
|
+
} = await k({
|
|
590
591
|
x: d,
|
|
591
|
-
y:
|
|
592
|
-
initialPlacement:
|
|
592
|
+
y: u,
|
|
593
|
+
initialPlacement: s,
|
|
593
594
|
placement: b,
|
|
594
|
-
strategy:
|
|
595
|
+
strategy: o,
|
|
595
596
|
middlewareData: f,
|
|
596
|
-
rects:
|
|
597
|
+
rects: c,
|
|
597
598
|
platform: {
|
|
598
599
|
...a,
|
|
599
600
|
detectOverflow: (m = a.detectOverflow) != null ? m : Jt
|
|
600
601
|
},
|
|
601
602
|
elements: {
|
|
602
603
|
reference: e,
|
|
603
|
-
floating:
|
|
604
|
+
floating: n
|
|
604
605
|
}
|
|
605
606
|
});
|
|
606
|
-
d =
|
|
607
|
+
d = C ?? d, u = A ?? u, f = {
|
|
607
608
|
...f,
|
|
608
|
-
[
|
|
609
|
-
...f[
|
|
610
|
-
...
|
|
609
|
+
[y]: {
|
|
610
|
+
...f[y],
|
|
611
|
+
...T
|
|
611
612
|
}
|
|
612
|
-
},
|
|
613
|
+
}, B && h <= 50 && (h++, typeof B == "object" && (B.placement && (b = B.placement), B.rects && (c = B.rects === !0 ? await a.getElementRects({
|
|
613
614
|
reference: e,
|
|
614
|
-
floating:
|
|
615
|
-
strategy:
|
|
616
|
-
}) :
|
|
615
|
+
floating: n,
|
|
616
|
+
strategy: o
|
|
617
|
+
}) : B.rects), {
|
|
617
618
|
x: d,
|
|
618
|
-
y:
|
|
619
|
-
} =
|
|
619
|
+
y: u
|
|
620
|
+
} = et(c, b, l)), v = -1);
|
|
620
621
|
}
|
|
621
622
|
return {
|
|
622
623
|
x: d,
|
|
623
|
-
y:
|
|
624
|
+
y: u,
|
|
624
625
|
placement: b,
|
|
625
|
-
strategy:
|
|
626
|
+
strategy: o,
|
|
626
627
|
middlewareData: f
|
|
627
628
|
};
|
|
628
629
|
}, Zt = (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: l
|
|
641
|
+
} = n, {
|
|
642
|
+
element: c,
|
|
642
643
|
padding: d = 0
|
|
643
|
-
} =
|
|
644
|
-
if (
|
|
644
|
+
} = xe(e, n) || {};
|
|
645
|
+
if (c == null)
|
|
645
646
|
return {};
|
|
646
|
-
const
|
|
647
|
-
x:
|
|
648
|
-
y:
|
|
649
|
-
}, f =
|
|
650
|
-
let
|
|
651
|
-
(
|
|
652
|
-
const
|
|
647
|
+
const u = dt(d), b = {
|
|
648
|
+
x: t,
|
|
649
|
+
y: s
|
|
650
|
+
}, f = Xe(o), h = Ue(f), m = await a.getDimensions(c), v = f === "y", y = v ? "top" : "left", k = v ? "bottom" : "right", C = v ? "clientHeight" : "clientWidth", A = r.reference[h] + r.reference[f] - b[f] - r.floating[h], T = b[f] - r.reference[f], B = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(c));
|
|
651
|
+
let D = B ? B[C] : 0;
|
|
652
|
+
(!D || !await (a.isElement == null ? void 0 : a.isElement(B))) && (D = i.floating[C] || r.floating[h]);
|
|
653
|
+
const M = A / 2 - T / 2, I = D / 2 - m[h] / 2 - 1, W = ce(u[y], I), Y = ce(u[k], I), X = W, x = D - m[h] - Y, O = D / 2 - m[h] / 2 + M, E = Fe(X, O, x), F = !l.arrow && we(o) != null && O !== E && r.reference[h] / 2 - (O < X ? W : Y) - m[h] / 2 < 0, H = F ? O < X ? O - X : O - x : 0;
|
|
653
654
|
return {
|
|
654
655
|
[f]: b[f] + H,
|
|
655
656
|
data: {
|
|
656
|
-
[f]:
|
|
657
|
-
centerOffset:
|
|
658
|
-
...
|
|
657
|
+
[f]: 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
|
}), _t = 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: l,
|
|
678
|
+
elements: c
|
|
679
|
+
} = n, {
|
|
679
680
|
mainAxis: d = !0,
|
|
680
|
-
crossAxis:
|
|
681
|
+
crossAxis: u = !0,
|
|
681
682
|
fallbackPlacements: b,
|
|
682
683
|
fallbackStrategy: f = "bestFit",
|
|
683
|
-
fallbackAxisSideDirection:
|
|
684
|
+
fallbackAxisSideDirection: h = "none",
|
|
684
685
|
flipAlignment: m = !0,
|
|
685
|
-
...
|
|
686
|
-
} =
|
|
687
|
-
if ((
|
|
686
|
+
...v
|
|
687
|
+
} = xe(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 y = de(o), k = se(i), C = de(i) === i, A = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), T = b || (C || !m ? [Re(i)] : qt(i)), B = h !== "none";
|
|
691
|
+
!b && B && T.push(...Yt(i, m, h, A));
|
|
692
|
+
const D = [i, ...T], M = await l.detectOverflow(n, v), I = [];
|
|
693
|
+
let W = ((s = r.flip) == null ? void 0 : s.overflows) || [];
|
|
694
|
+
if (d && I.push(M[y]), u) {
|
|
695
|
+
const O = Ht(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 = D[O];
|
|
704
|
+
if (E && (!(u === "alignment" ? k !== se(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) => se(G.placement) === k ? 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 (!
|
|
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)
|
|
717
718
|
switch (f) {
|
|
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 (B) {
|
|
723
|
+
const ae = se(G.placement);
|
|
724
|
+
return ae === k || // Create a bias to the `y` side axis due to horizontal
|
|
724
725
|
// reading directions favoring greater width.
|
|
725
|
-
|
|
726
|
+
ae === "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((ae) => ae > 0).reduce((ae, Dt) => ae + Dt, 0)]).sort((G, ae) => G[1] - ae[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
|
}
|
|
@@ -744,30 +745,30 @@ const Qt = async (e, t, n) => {
|
|
|
744
745
|
}
|
|
745
746
|
};
|
|
746
747
|
}, en = /* @__PURE__ */ new Set(["left", "top"]);
|
|
747
|
-
async function tn(e,
|
|
748
|
+
async function tn(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 = de(t), i = we(t), l = se(t) === "y", c = en.has(a) ? -1 : 1, d = r && l ? -1 : 1, u = xe(n, e);
|
|
753
754
|
let {
|
|
754
755
|
mainAxis: b,
|
|
755
756
|
crossAxis: f,
|
|
756
|
-
alignmentAxis:
|
|
757
|
-
} = typeof
|
|
758
|
-
mainAxis:
|
|
757
|
+
alignmentAxis: h
|
|
758
|
+
} = typeof u == "number" ? {
|
|
759
|
+
mainAxis: u,
|
|
759
760
|
crossAxis: 0,
|
|
760
761
|
alignmentAxis: null
|
|
761
762
|
} : {
|
|
762
|
-
mainAxis:
|
|
763
|
-
crossAxis:
|
|
764
|
-
alignmentAxis:
|
|
763
|
+
mainAxis: u.mainAxis || 0,
|
|
764
|
+
crossAxis: u.crossAxis || 0,
|
|
765
|
+
alignmentAxis: u.alignmentAxis
|
|
765
766
|
};
|
|
766
|
-
return
|
|
767
|
+
return i && typeof h == "number" && (f = i === "end" ? h * -1 : h), l ? {
|
|
767
768
|
x: f * d,
|
|
768
|
-
y: b *
|
|
769
|
+
y: b * c
|
|
769
770
|
} : {
|
|
770
|
-
x: b *
|
|
771
|
+
x: b * c,
|
|
771
772
|
y: f * d
|
|
772
773
|
};
|
|
773
774
|
}
|
|
@@ -775,115 +776,115 @@ const nn = 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, l = await tn(n, e);
|
|
787
|
+
return a === ((t = i.offset) == null ? void 0 : t.placement) && (s = i.arrow) != null && s.alignmentOffset ? {} : {
|
|
788
|
+
x: o + l.x,
|
|
789
|
+
y: r + l.y,
|
|
789
790
|
data: {
|
|
790
|
-
...
|
|
791
|
+
...l,
|
|
791
792
|
placement: a
|
|
792
793
|
}
|
|
793
794
|
};
|
|
794
795
|
}
|
|
795
796
|
};
|
|
796
|
-
},
|
|
797
|
+
}, sn = 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: l = {
|
|
811
|
+
fn: (y) => {
|
|
811
812
|
let {
|
|
812
|
-
x:
|
|
813
|
-
y:
|
|
814
|
-
} =
|
|
813
|
+
x: k,
|
|
814
|
+
y: C
|
|
815
|
+
} = y;
|
|
815
816
|
return {
|
|
816
|
-
x:
|
|
817
|
-
y:
|
|
817
|
+
x: k,
|
|
818
|
+
y: C
|
|
818
819
|
};
|
|
819
820
|
}
|
|
820
821
|
},
|
|
821
|
-
...
|
|
822
|
-
} =
|
|
823
|
-
x:
|
|
824
|
-
y:
|
|
825
|
-
},
|
|
826
|
-
let
|
|
822
|
+
...c
|
|
823
|
+
} = xe(e, n), d = {
|
|
824
|
+
x: t,
|
|
825
|
+
y: s
|
|
826
|
+
}, u = await r.detectOverflow(n, c), b = se(de(o)), f = ct(b);
|
|
827
|
+
let h = d[f], m = d[b];
|
|
827
828
|
if (a) {
|
|
828
|
-
const
|
|
829
|
-
|
|
829
|
+
const y = f === "y" ? "top" : "left", k = f === "y" ? "bottom" : "right", C = h + u[y], A = h - u[k];
|
|
830
|
+
h = Fe(C, h, A);
|
|
830
831
|
}
|
|
831
|
-
if (
|
|
832
|
-
const
|
|
833
|
-
m =
|
|
832
|
+
if (i) {
|
|
833
|
+
const y = b === "y" ? "top" : "left", k = b === "y" ? "bottom" : "right", C = m + u[y], A = m - u[k];
|
|
834
|
+
m = Fe(C, m, A);
|
|
834
835
|
}
|
|
835
|
-
const
|
|
836
|
-
...
|
|
837
|
-
[f]:
|
|
836
|
+
const v = l.fn({
|
|
837
|
+
...n,
|
|
838
|
+
[f]: h,
|
|
838
839
|
[b]: m
|
|
839
840
|
});
|
|
840
841
|
return {
|
|
841
|
-
...
|
|
842
|
+
...v,
|
|
842
843
|
data: {
|
|
843
|
-
x:
|
|
844
|
-
y:
|
|
844
|
+
x: v.x - t,
|
|
845
|
+
y: v.y - s,
|
|
845
846
|
enabled: {
|
|
846
847
|
[f]: a,
|
|
847
|
-
[b]:
|
|
848
|
+
[b]: i
|
|
848
849
|
}
|
|
849
850
|
}
|
|
850
851
|
};
|
|
851
852
|
}
|
|
852
853
|
};
|
|
853
|
-
},
|
|
854
|
+
}, on = 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: l = () => {
|
|
866
867
|
},
|
|
867
|
-
...
|
|
868
|
-
} =
|
|
869
|
-
width:
|
|
868
|
+
...c
|
|
869
|
+
} = xe(e, n), d = await a.detectOverflow(n, c), u = de(o), b = we(o), f = se(o) === "y", {
|
|
870
|
+
width: h,
|
|
870
871
|
height: m
|
|
871
872
|
} = r.floating;
|
|
872
|
-
let
|
|
873
|
-
|
|
874
|
-
const
|
|
875
|
-
let
|
|
876
|
-
if ((
|
|
877
|
-
const W = q(d.left, 0), Y = q(d.right, 0),
|
|
878
|
-
f ?
|
|
873
|
+
let v, y;
|
|
874
|
+
u === "top" || u === "bottom" ? (v = u, y = b === (await (a.isRTL == null ? void 0 : a.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (y = u, v = b === "end" ? "top" : "bottom");
|
|
875
|
+
const k = m - d.top - d.bottom, C = h - d.left - d.right, A = ce(m - d[v], k), T = ce(h - d[y], C), B = !n.middlewareData.shift;
|
|
876
|
+
let D = A, M = T;
|
|
877
|
+
if ((t = n.middlewareData.shift) != null && t.enabled.x && (M = C), (s = n.middlewareData.shift) != null && s.enabled.y && (D = k), B && !b) {
|
|
878
|
+
const W = q(d.left, 0), Y = q(d.right, 0), X = q(d.top, 0), x = q(d.bottom, 0);
|
|
879
|
+
f ? M = h - 2 * (W !== 0 || Y !== 0 ? W + Y : q(d.left, d.right)) : D = m - 2 * (X !== 0 || x !== 0 ? X + x : q(d.top, d.bottom));
|
|
879
880
|
}
|
|
880
|
-
await
|
|
881
|
-
...
|
|
882
|
-
availableWidth:
|
|
883
|
-
availableHeight:
|
|
881
|
+
await l({
|
|
882
|
+
...n,
|
|
883
|
+
availableWidth: M,
|
|
884
|
+
availableHeight: D
|
|
884
885
|
});
|
|
885
|
-
const
|
|
886
|
-
return
|
|
886
|
+
const I = await a.getDimensions(i.floating);
|
|
887
|
+
return h !== 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 ge(e) {
|
|
899
|
+
return Ye(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
905
|
function ne(e) {
|
|
905
|
-
var
|
|
906
|
-
return (
|
|
906
|
+
var n;
|
|
907
|
+
return (n = (Ye(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : n.documentElement;
|
|
907
908
|
}
|
|
908
|
-
function
|
|
909
|
-
return
|
|
909
|
+
function Ye(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
915
|
function ee(e) {
|
|
915
|
-
return
|
|
916
|
+
return ze() ? e instanceof HTMLElement || e instanceof U(e).HTMLElement : !1;
|
|
916
917
|
}
|
|
917
|
-
function
|
|
918
|
-
return !
|
|
918
|
+
function tt(e) {
|
|
919
|
+
return !ze() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
|
|
919
920
|
}
|
|
920
|
-
const
|
|
921
|
-
function
|
|
921
|
+
const an = /* @__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
|
|
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) && !an.has(o);
|
|
930
|
+
}
|
|
931
|
+
const rn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
931
932
|
function ln(e) {
|
|
932
|
-
return
|
|
933
|
+
return rn.has(ge(e));
|
|
933
934
|
}
|
|
934
935
|
const cn = [":popover-open", ":modal"];
|
|
935
|
-
function
|
|
936
|
-
return cn.some((
|
|
936
|
+
function Ee(e) {
|
|
937
|
+
return cn.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
945
|
const dn = ["transform", "translate", "scale", "rotate", "perspective"], un = ["transform", "translate", "scale", "rotate", "perspective", "filter"], fn = ["paint", "layout", "strict", "content"];
|
|
945
|
-
function
|
|
946
|
-
const
|
|
947
|
-
return dn.some((
|
|
946
|
+
function Ge(e) {
|
|
947
|
+
const n = Je(), t = J(e) ? Q(e) : e;
|
|
948
|
+
return dn.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) || un.some((s) => (t.willChange || "").includes(s)) || fn.some((s) => (t.contain || "").includes(s));
|
|
948
949
|
}
|
|
949
950
|
function bn(e) {
|
|
950
|
-
let
|
|
951
|
-
for (; ee(
|
|
952
|
-
if (
|
|
953
|
-
return
|
|
954
|
-
if (
|
|
951
|
+
let n = ue(e);
|
|
952
|
+
for (; ee(n) && !ye(n); ) {
|
|
953
|
+
if (Ge(n))
|
|
954
|
+
return n;
|
|
955
|
+
if (Ee(n))
|
|
955
956
|
return null;
|
|
956
|
-
|
|
957
|
+
n = ue(n);
|
|
957
958
|
}
|
|
958
959
|
return null;
|
|
959
960
|
}
|
|
960
|
-
function
|
|
961
|
+
function Je() {
|
|
961
962
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
962
963
|
}
|
|
963
964
|
const mn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
964
|
-
function
|
|
965
|
-
return mn.has(
|
|
965
|
+
function ye(e) {
|
|
966
|
+
return mn.has(ge(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
|
} : {
|
|
@@ -976,545 +977,545 @@ function Me(e) {
|
|
|
976
977
|
scrollTop: e.scrollY
|
|
977
978
|
};
|
|
978
979
|
}
|
|
979
|
-
function
|
|
980
|
-
if (
|
|
980
|
+
function ue(e) {
|
|
981
|
+
if (ge(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
|
+
tt(e) && e.host || // Fallback.
|
|
987
988
|
ne(e)
|
|
988
989
|
);
|
|
989
|
-
return
|
|
990
|
+
return tt(n) ? n.host : n;
|
|
990
991
|
}
|
|
991
|
-
function
|
|
992
|
-
const
|
|
993
|
-
return
|
|
992
|
+
function ut(e) {
|
|
993
|
+
const n = ue(e);
|
|
994
|
+
return ye(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : ee(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 = ee(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 Qe(e) {
|
|
1020
|
+
return J(e) ? e : e.contextElement;
|
|
1020
1021
|
}
|
|
1021
|
-
function
|
|
1022
|
-
const
|
|
1023
|
-
if (!ee(
|
|
1024
|
-
return
|
|
1025
|
-
const
|
|
1026
|
-
width:
|
|
1027
|
-
height:
|
|
1022
|
+
function pe(e) {
|
|
1023
|
+
const n = Qe(e);
|
|
1024
|
+
if (!ee(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 gn = /* @__PURE__ */
|
|
1037
|
-
function
|
|
1038
|
-
const
|
|
1039
|
-
return !
|
|
1040
|
-
x:
|
|
1041
|
-
y:
|
|
1037
|
+
const gn = /* @__PURE__ */ Z(0);
|
|
1038
|
+
function bt(e) {
|
|
1039
|
+
const n = U(e);
|
|
1040
|
+
return !Je() || !n.visualViewport ? gn : {
|
|
1041
|
+
x: n.visualViewport.offsetLeft,
|
|
1042
|
+
y: n.visualViewport.offsetTop
|
|
1042
1043
|
};
|
|
1043
1044
|
}
|
|
1044
|
-
function hn(e,
|
|
1045
|
-
return
|
|
1045
|
+
function hn(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 be(e, n, t, s) {
|
|
1049
|
+
n === void 0 && (n = !1), t === void 0 && (t = !1);
|
|
1050
|
+
const o = e.getBoundingClientRect(), r = Qe(e);
|
|
1051
|
+
let a = Z(1);
|
|
1052
|
+
n && (s ? J(s) && (a = pe(s)) : a = pe(e));
|
|
1053
|
+
const i = hn(r, t, s) ? bt(r) : Z(0);
|
|
1054
|
+
let l = (o.left + i.x) / a.x, c = (o.top + i.y) / a.y, d = o.width / a.x, u = o.height / a.y;
|
|
1054
1055
|
if (r) {
|
|
1055
|
-
const b = U(r), f =
|
|
1056
|
-
let
|
|
1057
|
-
for (; m &&
|
|
1058
|
-
const
|
|
1059
|
-
|
|
1056
|
+
const b = U(r), f = s && J(s) ? U(s) : s;
|
|
1057
|
+
let h = b, m = We(h);
|
|
1058
|
+
for (; m && s && f !== h; ) {
|
|
1059
|
+
const v = pe(m), y = m.getBoundingClientRect(), k = Q(m), C = y.left + (m.clientLeft + parseFloat(k.paddingLeft)) * v.x, A = y.top + (m.clientTop + parseFloat(k.paddingTop)) * v.y;
|
|
1060
|
+
l *= v.x, c *= v.y, d *= v.x, u *= v.y, l += C, c += A, h = U(m), m = We(h);
|
|
1060
1061
|
}
|
|
1061
1062
|
}
|
|
1062
|
-
return
|
|
1063
|
+
return Le({
|
|
1063
1064
|
width: d,
|
|
1064
|
-
height:
|
|
1065
|
-
x:
|
|
1066
|
-
y:
|
|
1065
|
+
height: u,
|
|
1066
|
+
x: l,
|
|
1067
|
+
y: c
|
|
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 : be(ne(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 vn(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 = ne(s), i = n ? Ee(n.floating) : !1;
|
|
1089
|
+
if (s === a || i && r)
|
|
1090
|
+
return t;
|
|
1091
|
+
let l = {
|
|
1091
1092
|
scrollLeft: 0,
|
|
1092
1093
|
scrollTop: 0
|
|
1093
|
-
},
|
|
1094
|
-
const d =
|
|
1095
|
-
if ((
|
|
1096
|
-
const f =
|
|
1097
|
-
|
|
1094
|
+
}, c = Z(1);
|
|
1095
|
+
const d = Z(0), u = ee(s);
|
|
1096
|
+
if ((u || !u && !r) && ((ge(s) !== "body" || Ce(a)) && (l = Me(s)), ee(s))) {
|
|
1097
|
+
const f = be(s);
|
|
1098
|
+
c = pe(s), d.x = f.x + s.clientLeft, d.y = f.y + s.clientTop;
|
|
1098
1099
|
}
|
|
1099
|
-
const b = a && !
|
|
1100
|
+
const b = a && !u && !r ? mt(a, l) : Z(0);
|
|
1100
1101
|
return {
|
|
1101
|
-
width:
|
|
1102
|
-
height:
|
|
1103
|
-
x:
|
|
1104
|
-
y:
|
|
1102
|
+
width: t.width * c.x,
|
|
1103
|
+
height: t.height * c.y,
|
|
1104
|
+
x: t.x * c.x - l.scrollLeft * c.x + d.x + b.x,
|
|
1105
|
+
y: t.y * c.y - l.scrollTop * c.y + d.y + b.y
|
|
1105
1106
|
};
|
|
1106
1107
|
}
|
|
1107
|
-
function
|
|
1108
|
+
function pn(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 yn(e) {
|
|
1112
|
+
const n = ne(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
|
|
1123
|
-
const
|
|
1124
|
-
let r =
|
|
1125
|
-
if (
|
|
1126
|
-
r =
|
|
1127
|
-
const d =
|
|
1128
|
-
(!d || d &&
|
|
1122
|
+
const nt = 25;
|
|
1123
|
+
function xn(e, n) {
|
|
1124
|
+
const t = U(e), s = ne(e), o = t.visualViewport;
|
|
1125
|
+
let r = s.clientWidth, a = s.clientHeight, i = 0, l = 0;
|
|
1126
|
+
if (o) {
|
|
1127
|
+
r = o.width, a = o.height;
|
|
1128
|
+
const d = Je();
|
|
1129
|
+
(!d || d && n === "fixed") && (i = o.offsetLeft, l = o.offsetTop);
|
|
1129
1130
|
}
|
|
1130
|
-
const
|
|
1131
|
-
if (
|
|
1132
|
-
const d =
|
|
1133
|
-
|
|
1134
|
-
} else
|
|
1131
|
+
const c = je(s);
|
|
1132
|
+
if (c <= 0) {
|
|
1133
|
+
const d = s.ownerDocument, u = d.body, b = getComputedStyle(u), f = d.compatMode === "CSS1Compat" && parseFloat(b.marginLeft) + parseFloat(b.marginRight) || 0, h = Math.abs(s.clientWidth - u.clientWidth - f);
|
|
1134
|
+
h <= nt && (r -= h);
|
|
1135
|
+
} else c <= nt && (r += c);
|
|
1135
1136
|
return {
|
|
1136
1137
|
width: r,
|
|
1137
1138
|
height: a,
|
|
1138
|
-
x:
|
|
1139
|
-
y:
|
|
1139
|
+
x: i,
|
|
1140
|
+
y: l
|
|
1140
1141
|
};
|
|
1141
1142
|
}
|
|
1142
1143
|
const wn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1143
|
-
function kn(e,
|
|
1144
|
-
const
|
|
1144
|
+
function kn(e, n) {
|
|
1145
|
+
const t = be(e, !0, n === "fixed"), s = t.top + e.clientTop, o = t.left + e.clientLeft, r = ee(e) ? pe(e) : Z(1), a = e.clientWidth * r.x, i = e.clientHeight * r.y, l = o * r.x, c = s * r.y;
|
|
1145
1146
|
return {
|
|
1146
1147
|
width: a,
|
|
1147
|
-
height:
|
|
1148
|
-
x:
|
|
1149
|
-
y:
|
|
1148
|
+
height: i,
|
|
1149
|
+
x: l,
|
|
1150
|
+
y: c
|
|
1150
1151
|
};
|
|
1151
1152
|
}
|
|
1152
|
-
function
|
|
1153
|
-
let
|
|
1154
|
-
if (
|
|
1155
|
-
|
|
1156
|
-
else if (
|
|
1157
|
-
|
|
1158
|
-
else if (
|
|
1159
|
-
|
|
1153
|
+
function st(e, n, t) {
|
|
1154
|
+
let s;
|
|
1155
|
+
if (n === "viewport")
|
|
1156
|
+
s = xn(e, t);
|
|
1157
|
+
else if (n === "document")
|
|
1158
|
+
s = yn(ne(e));
|
|
1159
|
+
else if (J(n))
|
|
1160
|
+
s = kn(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 = ue(e);
|
|
1174
|
+
return t === n || !J(t) || ye(t) ? !1 : Q(t).position === "fixed" || gt(t, n);
|
|
1174
1175
|
}
|
|
1175
|
-
function $n(e,
|
|
1176
|
-
const
|
|
1177
|
-
if (
|
|
1178
|
-
return
|
|
1179
|
-
let
|
|
1180
|
-
const r =
|
|
1181
|
-
let a = r ?
|
|
1182
|
-
for (;
|
|
1183
|
-
const
|
|
1184
|
-
!
|
|
1176
|
+
function $n(e, n) {
|
|
1177
|
+
const t = n.get(e);
|
|
1178
|
+
if (t)
|
|
1179
|
+
return t;
|
|
1180
|
+
let s = $e(e, [], !1).filter((i) => J(i) && ge(i) !== "body"), o = null;
|
|
1181
|
+
const r = Q(e).position === "fixed";
|
|
1182
|
+
let a = r ? ue(e) : e;
|
|
1183
|
+
for (; J(a) && !ye(a); ) {
|
|
1184
|
+
const i = Q(a), l = Ge(a);
|
|
1185
|
+
!l && i.position === "fixed" && (o = null), (r ? !l && !o : !l && i.position === "static" && !!o && wn.has(o.position) || Ce(a) && !l && gt(e, a)) ? s = s.filter((d) => d !== a) : o = i, a = ue(a);
|
|
1185
1186
|
}
|
|
1186
|
-
return
|
|
1187
|
+
return n.set(e, s), s;
|
|
1187
1188
|
}
|
|
1188
1189
|
function Cn(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) ? [] : $n(n, this._c) : [].concat(t), s], i = a[0], l = a.reduce((c, d) => {
|
|
1197
|
+
const u = st(n, d, o);
|
|
1198
|
+
return c.top = q(u.top, c.top), c.right = ce(u.right, c.right), c.bottom = ce(u.bottom, c.bottom), c.left = q(u.left, c.left), c;
|
|
1199
|
+
}, st(n, i, o));
|
|
1199
1200
|
return {
|
|
1200
|
-
width:
|
|
1201
|
-
height:
|
|
1202
|
-
x:
|
|
1203
|
-
y:
|
|
1201
|
+
width: l.right - l.left,
|
|
1202
|
+
height: l.bottom - l.top,
|
|
1203
|
+
x: l.left,
|
|
1204
|
+
y: l.top
|
|
1204
1205
|
};
|
|
1205
1206
|
}
|
|
1206
|
-
function
|
|
1207
|
+
function Dn(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
|
|
1217
|
-
const
|
|
1218
|
-
let
|
|
1217
|
+
function Tn(e, n, t) {
|
|
1218
|
+
const s = ee(n), o = ne(n), r = t === "fixed", a = be(e, !0, r, n);
|
|
1219
|
+
let i = {
|
|
1219
1220
|
scrollLeft: 0,
|
|
1220
1221
|
scrollTop: 0
|
|
1221
1222
|
};
|
|
1222
|
-
const
|
|
1223
|
-
function
|
|
1224
|
-
|
|
1223
|
+
const l = Z(0);
|
|
1224
|
+
function c() {
|
|
1225
|
+
l.x = je(o);
|
|
1225
1226
|
}
|
|
1226
|
-
if (
|
|
1227
|
-
if ((
|
|
1228
|
-
const f =
|
|
1229
|
-
|
|
1230
|
-
} else
|
|
1231
|
-
r && !
|
|
1232
|
-
const d =
|
|
1227
|
+
if (s || !s && !r)
|
|
1228
|
+
if ((ge(n) !== "body" || Ce(o)) && (i = Me(n)), s) {
|
|
1229
|
+
const f = be(n, !0, r, n);
|
|
1230
|
+
l.x = f.x + n.clientLeft, l.y = f.y + n.clientTop;
|
|
1231
|
+
} else o && c();
|
|
1232
|
+
r && !s && o && c();
|
|
1233
|
+
const d = o && !s && !r ? mt(o, i) : Z(0), u = a.left + i.scrollLeft - l.x - d.x, b = a.top + i.scrollTop - l.y - d.y;
|
|
1233
1234
|
return {
|
|
1234
|
-
x:
|
|
1235
|
+
x: u,
|
|
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 ot(e,
|
|
1244
|
-
if (!ee(e) ||
|
|
1244
|
+
function ot(e, n) {
|
|
1245
|
+
if (!ee(e) || Q(e).position === "fixed")
|
|
1245
1246
|
return null;
|
|
1246
|
-
if (
|
|
1247
|
-
return
|
|
1248
|
-
let
|
|
1249
|
-
return ne(e) ===
|
|
1247
|
+
if (n)
|
|
1248
|
+
return n(e);
|
|
1249
|
+
let t = e.offsetParent;
|
|
1250
|
+
return ne(e) === t && (t = t.ownerDocument.body), t;
|
|
1250
1251
|
}
|
|
1251
|
-
function
|
|
1252
|
-
const
|
|
1253
|
-
if (
|
|
1254
|
-
return
|
|
1252
|
+
function ht(e, n) {
|
|
1253
|
+
const t = U(e);
|
|
1254
|
+
if (Ee(e))
|
|
1255
|
+
return t;
|
|
1255
1256
|
if (!ee(e)) {
|
|
1256
|
-
let
|
|
1257
|
-
for (;
|
|
1258
|
-
if (
|
|
1259
|
-
return
|
|
1260
|
-
|
|
1257
|
+
let o = ue(e);
|
|
1258
|
+
for (; o && !ye(o); ) {
|
|
1259
|
+
if (J(o) && !Ie(o))
|
|
1260
|
+
return o;
|
|
1261
|
+
o = ue(o);
|
|
1261
1262
|
}
|
|
1262
|
-
return
|
|
1263
|
+
return t;
|
|
1263
1264
|
}
|
|
1264
|
-
let
|
|
1265
|
-
for (;
|
|
1266
|
-
|
|
1267
|
-
return
|
|
1265
|
+
let s = ot(e, n);
|
|
1266
|
+
for (; s && ln(s) && Ie(s); )
|
|
1267
|
+
s = ot(s, n);
|
|
1268
|
+
return s && ye(s) && Ie(s) && !Ge(s) ? t : s || bn(e) || t;
|
|
1268
1269
|
}
|
|
1269
|
-
const
|
|
1270
|
-
const
|
|
1270
|
+
const Vn = async function(e) {
|
|
1271
|
+
const n = this.getOffsetParent || ht, t = this.getDimensions, s = await t(e.floating);
|
|
1271
1272
|
return {
|
|
1272
|
-
reference:
|
|
1273
|
+
reference: Tn(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
|
|
1282
|
+
function Rn(e) {
|
|
1283
|
+
return Q(e).direction === "rtl";
|
|
1283
1284
|
}
|
|
1284
|
-
const
|
|
1285
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1285
|
+
const Ln = {
|
|
1286
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: vn,
|
|
1286
1287
|
getDocumentElement: ne,
|
|
1287
1288
|
getClippingRect: Cn,
|
|
1288
|
-
getOffsetParent:
|
|
1289
|
-
getElementRects:
|
|
1290
|
-
getClientRects:
|
|
1291
|
-
getDimensions:
|
|
1292
|
-
getScale:
|
|
1293
|
-
isElement:
|
|
1294
|
-
isRTL:
|
|
1289
|
+
getOffsetParent: ht,
|
|
1290
|
+
getElementRects: Vn,
|
|
1291
|
+
getClientRects: pn,
|
|
1292
|
+
getDimensions: Dn,
|
|
1293
|
+
getScale: pe,
|
|
1294
|
+
isElement: J,
|
|
1295
|
+
isRTL: Rn
|
|
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 Bn(e, n) {
|
|
1301
|
+
let t = null, s;
|
|
1302
|
+
const o = ne(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, l) {
|
|
1308
|
+
i === void 0 && (i = !1), l === void 0 && (l = 1), r();
|
|
1309
|
+
const c = e.getBoundingClientRect(), {
|
|
1309
1310
|
left: d,
|
|
1310
|
-
top:
|
|
1311
|
+
top: u,
|
|
1311
1312
|
width: b,
|
|
1312
1313
|
height: f
|
|
1313
|
-
} =
|
|
1314
|
-
if (
|
|
1314
|
+
} = c;
|
|
1315
|
+
if (i || n(), !b || !f)
|
|
1315
1316
|
return;
|
|
1316
|
-
const
|
|
1317
|
-
rootMargin: -
|
|
1318
|
-
threshold: q(0,
|
|
1317
|
+
const h = De(u), m = De(o.clientWidth - (d + b)), v = De(o.clientHeight - (u + f)), y = De(d), C = {
|
|
1318
|
+
rootMargin: -h + "px " + -m + "px " + -v + "px " + -y + "px",
|
|
1319
|
+
threshold: q(0, ce(1, l)) || 1
|
|
1319
1320
|
};
|
|
1320
|
-
let
|
|
1321
|
-
function
|
|
1322
|
-
const
|
|
1323
|
-
if (
|
|
1324
|
-
if (!
|
|
1321
|
+
let A = !0;
|
|
1322
|
+
function T(B) {
|
|
1323
|
+
const D = B[0].intersectionRatio;
|
|
1324
|
+
if (D !== l) {
|
|
1325
|
+
if (!A)
|
|
1325
1326
|
return a();
|
|
1326
|
-
|
|
1327
|
+
D ? a(!1, D) : s = setTimeout(() => {
|
|
1327
1328
|
a(!1, 1e-7);
|
|
1328
1329
|
}, 1e3);
|
|
1329
1330
|
}
|
|
1330
|
-
|
|
1331
|
+
D === 1 && !vt(c, e.getBoundingClientRect()) && a(), A = !1;
|
|
1331
1332
|
}
|
|
1332
1333
|
try {
|
|
1333
|
-
|
|
1334
|
-
...
|
|
1334
|
+
t = new IntersectionObserver(T, {
|
|
1335
|
+
...C,
|
|
1335
1336
|
// Handle <iframe>s
|
|
1336
|
-
root:
|
|
1337
|
+
root: o.ownerDocument
|
|
1337
1338
|
});
|
|
1338
1339
|
} catch {
|
|
1339
|
-
|
|
1340
|
+
t = new IntersectionObserver(T, C);
|
|
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: l = !1
|
|
1354
|
+
} = s, c = Qe(e), d = o || r ? [...c ? $e(c) : [], ...$e(n)] : [];
|
|
1355
|
+
d.forEach((y) => {
|
|
1356
|
+
o && y.addEventListener("scroll", t, {
|
|
1356
1357
|
passive: !0
|
|
1357
|
-
}), r &&
|
|
1358
|
+
}), r && y.addEventListener("resize", t);
|
|
1358
1359
|
});
|
|
1359
|
-
const
|
|
1360
|
+
const u = c && i ? Bn(c, t) : null;
|
|
1360
1361
|
let b = -1, f = null;
|
|
1361
|
-
a && (f = new ResizeObserver((
|
|
1362
|
-
let [
|
|
1363
|
-
|
|
1364
|
-
var
|
|
1365
|
-
(
|
|
1366
|
-
})),
|
|
1367
|
-
}),
|
|
1368
|
-
let
|
|
1369
|
-
|
|
1370
|
-
function
|
|
1371
|
-
const
|
|
1372
|
-
m && !vt(m,
|
|
1362
|
+
a && (f = new ResizeObserver((y) => {
|
|
1363
|
+
let [k] = y;
|
|
1364
|
+
k && k.target === c && f && (f.unobserve(n), cancelAnimationFrame(b), b = requestAnimationFrame(() => {
|
|
1365
|
+
var C;
|
|
1366
|
+
(C = f) == null || C.observe(n);
|
|
1367
|
+
})), t();
|
|
1368
|
+
}), c && !l && f.observe(c), f.observe(n));
|
|
1369
|
+
let h, m = l ? be(e) : null;
|
|
1370
|
+
l && v();
|
|
1371
|
+
function v() {
|
|
1372
|
+
const y = be(e);
|
|
1373
|
+
m && !vt(m, y) && t(), m = y, h = requestAnimationFrame(v);
|
|
1373
1374
|
}
|
|
1374
|
-
return
|
|
1375
|
-
var
|
|
1376
|
-
d.forEach((
|
|
1377
|
-
|
|
1378
|
-
}),
|
|
1375
|
+
return t(), () => {
|
|
1376
|
+
var y;
|
|
1377
|
+
d.forEach((k) => {
|
|
1378
|
+
o && k.removeEventListener("scroll", t), r && k.removeEventListener("resize", t);
|
|
1379
|
+
}), u == null || u(), (y = f) == null || y.disconnect(), f = null, l && cancelAnimationFrame(h);
|
|
1379
1380
|
};
|
|
1380
1381
|
}
|
|
1381
|
-
const
|
|
1382
|
-
const
|
|
1383
|
-
platform:
|
|
1384
|
-
...
|
|
1382
|
+
const pt = nn, yt = sn, xt = _t, An = on, On = Zt, zn = (e, n, t) => {
|
|
1383
|
+
const s = /* @__PURE__ */ new Map(), o = {
|
|
1384
|
+
platform: Ln,
|
|
1385
|
+
...t
|
|
1385
1386
|
}, r = {
|
|
1386
|
-
...
|
|
1387
|
-
_c:
|
|
1387
|
+
...o.platform,
|
|
1388
|
+
_c: s
|
|
1388
1389
|
};
|
|
1389
|
-
return Qt(e,
|
|
1390
|
-
...
|
|
1390
|
+
return Qt(e, n, {
|
|
1391
|
+
...o,
|
|
1391
1392
|
platform: r
|
|
1392
1393
|
});
|
|
1393
1394
|
};
|
|
1394
|
-
function
|
|
1395
|
+
function En(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 (En(e)) {
|
|
1400
|
+
const n = e.$el;
|
|
1401
|
+
return Ye(n) && ge(n) === "#comment" ? null : n;
|
|
1401
1402
|
}
|
|
1402
1403
|
return e;
|
|
1403
1404
|
}
|
|
1404
|
-
function
|
|
1405
|
-
return typeof e == "function" ? e() :
|
|
1405
|
+
function ve(e) {
|
|
1406
|
+
return typeof e == "function" ? e() : S(e);
|
|
1406
1407
|
}
|
|
1407
|
-
function
|
|
1408
|
+
function Mn(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(ve(e.element));
|
|
1414
|
+
return t == null ? {} : On({
|
|
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
|
|
1424
|
-
const
|
|
1425
|
-
return Math.round(
|
|
1424
|
+
function at(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 (
|
|
1432
|
-
}), r = w(() =>
|
|
1433
|
-
var
|
|
1434
|
-
return (
|
|
1435
|
-
}), l = w(() => {
|
|
1436
|
-
var $;
|
|
1437
|
-
return ($ = he(n.strategy)) != null ? $ : "absolute";
|
|
1428
|
+
function kt(e, n, t) {
|
|
1429
|
+
t === void 0 && (t = {});
|
|
1430
|
+
const s = t.whileElementsMounted, o = w(() => {
|
|
1431
|
+
var D;
|
|
1432
|
+
return (D = ve(t.open)) != null ? D : !0;
|
|
1433
|
+
}), r = w(() => ve(t.middleware)), a = w(() => {
|
|
1434
|
+
var D;
|
|
1435
|
+
return (D = ve(t.placement)) != null ? D : "bottom";
|
|
1438
1436
|
}), i = w(() => {
|
|
1439
|
-
var
|
|
1440
|
-
return (
|
|
1441
|
-
}),
|
|
1442
|
-
|
|
1437
|
+
var D;
|
|
1438
|
+
return (D = ve(t.strategy)) != null ? D : "absolute";
|
|
1439
|
+
}), l = w(() => {
|
|
1440
|
+
var D;
|
|
1441
|
+
return (D = ve(t.transform)) != null ? D : !0;
|
|
1442
|
+
}), c = w(() => He(e.value)), d = w(() => He(n.value)), u = j(0), b = j(0), f = j(i.value), h = j(a.value), m = Tt({}), v = j(!1), y = w(() => {
|
|
1443
|
+
const D = {
|
|
1443
1444
|
position: f.value,
|
|
1444
1445
|
left: "0",
|
|
1445
1446
|
top: "0"
|
|
1446
1447
|
};
|
|
1447
1448
|
if (!d.value)
|
|
1448
|
-
return
|
|
1449
|
-
const
|
|
1450
|
-
return
|
|
1451
|
-
|
|
1452
|
-
transform: "translate(" +
|
|
1453
|
-
...
|
|
1449
|
+
return D;
|
|
1450
|
+
const M = at(d.value, u.value), I = at(d.value, b.value);
|
|
1451
|
+
return l.value ? {
|
|
1452
|
+
...D,
|
|
1453
|
+
transform: "translate(" + M + "px, " + I + "px)",
|
|
1454
|
+
...wt(d.value) >= 1.5 && {
|
|
1454
1455
|
willChange: "transform"
|
|
1455
1456
|
}
|
|
1456
1457
|
} : {
|
|
1457
1458
|
position: f.value,
|
|
1458
|
-
left:
|
|
1459
|
-
top:
|
|
1459
|
+
left: M + "px",
|
|
1460
|
+
top: I + "px"
|
|
1460
1461
|
};
|
|
1461
1462
|
});
|
|
1462
|
-
let
|
|
1463
|
-
function
|
|
1464
|
-
if (
|
|
1463
|
+
let k;
|
|
1464
|
+
function C() {
|
|
1465
|
+
if (c.value == null || d.value == null)
|
|
1465
1466
|
return;
|
|
1466
|
-
const
|
|
1467
|
-
|
|
1467
|
+
const D = o.value;
|
|
1468
|
+
zn(c.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
|
+
u.value = M.x, b.value = M.y, f.value = M.strategy, h.value = M.placement, m.value = M.middlewareData, v.value = D !== !1;
|
|
1473
1474
|
});
|
|
1474
1475
|
}
|
|
1475
|
-
function
|
|
1476
|
-
typeof
|
|
1476
|
+
function A() {
|
|
1477
|
+
typeof k == "function" && (k(), k = void 0);
|
|
1477
1478
|
}
|
|
1478
|
-
function
|
|
1479
|
-
if (
|
|
1480
|
-
|
|
1479
|
+
function T() {
|
|
1480
|
+
if (A(), s === void 0) {
|
|
1481
|
+
C();
|
|
1481
1482
|
return;
|
|
1482
1483
|
}
|
|
1483
|
-
if (
|
|
1484
|
-
|
|
1484
|
+
if (c.value != null && d.value != null) {
|
|
1485
|
+
k = s(c.value, d.value, C);
|
|
1485
1486
|
return;
|
|
1486
1487
|
}
|
|
1487
1488
|
}
|
|
1488
|
-
function
|
|
1489
|
-
|
|
1489
|
+
function B() {
|
|
1490
|
+
o.value || (v.value = !1);
|
|
1490
1491
|
}
|
|
1491
|
-
return
|
|
1492
|
+
return re([r, a, i, o], C, {
|
|
1492
1493
|
flush: "sync"
|
|
1493
|
-
}),
|
|
1494
|
+
}), re([c, d], T, {
|
|
1494
1495
|
flush: "sync"
|
|
1495
|
-
}),
|
|
1496
|
+
}), re(o, B, {
|
|
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: he(u),
|
|
1500
|
+
y: he(b),
|
|
1501
|
+
strategy: he(f),
|
|
1502
|
+
placement: he(h),
|
|
1503
|
+
middlewareData: he(m),
|
|
1504
|
+
isPositioned: he(v),
|
|
1505
|
+
floatingStyles: y,
|
|
1506
|
+
update: C
|
|
1506
1507
|
};
|
|
1507
1508
|
}
|
|
1508
|
-
const
|
|
1509
|
+
const jn = /* @__PURE__ */ z({
|
|
1509
1510
|
inheritAttrs: !1,
|
|
1510
1511
|
__name: "DsIconCheck",
|
|
1511
1512
|
setup(e) {
|
|
1512
|
-
return (
|
|
1513
|
+
return (n, t) => (g(), p("svg", me({
|
|
1513
1514
|
fill: "none",
|
|
1514
1515
|
stroke: "currentColor",
|
|
1515
1516
|
viewBox: "0 0 24 24"
|
|
1516
|
-
},
|
|
1517
|
-
|
|
1517
|
+
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1518
|
+
$("path", {
|
|
1518
1519
|
"stroke-linecap": "round",
|
|
1519
1520
|
"stroke-linejoin": "round",
|
|
1520
1521
|
"stroke-width": "2",
|
|
@@ -1522,16 +1523,16 @@ 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(), p("svg", me({
|
|
1530
1531
|
fill: "none",
|
|
1531
1532
|
stroke: "currentColor",
|
|
1532
1533
|
viewBox: "0 0 24 24"
|
|
1533
|
-
},
|
|
1534
|
-
|
|
1534
|
+
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1535
|
+
$("path", {
|
|
1535
1536
|
"stroke-linecap": "round",
|
|
1536
1537
|
"stroke-linejoin": "round",
|
|
1537
1538
|
"stroke-width": "2",
|
|
@@ -1539,16 +1540,16 @@ const Mn = /* @__PURE__ */ S({
|
|
|
1539
1540
|
}, null, -1)
|
|
1540
1541
|
])], 16));
|
|
1541
1542
|
}
|
|
1542
|
-
}),
|
|
1543
|
+
}), Pn = /* @__PURE__ */ z({
|
|
1543
1544
|
inheritAttrs: !1,
|
|
1544
1545
|
__name: "DsIconChevronUp",
|
|
1545
1546
|
setup(e) {
|
|
1546
|
-
return (
|
|
1547
|
+
return (n, t) => (g(), p("svg", me({
|
|
1547
1548
|
fill: "none",
|
|
1548
1549
|
stroke: "currentColor",
|
|
1549
1550
|
viewBox: "0 0 24 24"
|
|
1550
|
-
},
|
|
1551
|
-
|
|
1551
|
+
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1552
|
+
$("path", {
|
|
1552
1553
|
"stroke-linecap": "round",
|
|
1553
1554
|
"stroke-linejoin": "round",
|
|
1554
1555
|
"stroke-width": "2",
|
|
@@ -1556,16 +1557,16 @@ const Mn = /* @__PURE__ */ S({
|
|
|
1556
1557
|
}, null, -1)
|
|
1557
1558
|
])], 16));
|
|
1558
1559
|
}
|
|
1559
|
-
}),
|
|
1560
|
+
}), In = /* @__PURE__ */ z({
|
|
1560
1561
|
inheritAttrs: !1,
|
|
1561
1562
|
__name: "DsIconInfo",
|
|
1562
1563
|
setup(e) {
|
|
1563
|
-
return (
|
|
1564
|
+
return (n, t) => (g(), p("svg", me({
|
|
1564
1565
|
fill: "none",
|
|
1565
1566
|
stroke: "currentColor",
|
|
1566
1567
|
viewBox: "0 0 24 24"
|
|
1567
|
-
},
|
|
1568
|
-
|
|
1568
|
+
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1569
|
+
$("path", {
|
|
1569
1570
|
"stroke-linecap": "round",
|
|
1570
1571
|
"stroke-linejoin": "round",
|
|
1571
1572
|
"stroke-width": "2",
|
|
@@ -1573,16 +1574,16 @@ const Mn = /* @__PURE__ */ S({
|
|
|
1573
1574
|
}, null, -1)
|
|
1574
1575
|
])], 16));
|
|
1575
1576
|
}
|
|
1576
|
-
}),
|
|
1577
|
+
}), Fn = /* @__PURE__ */ z({
|
|
1577
1578
|
inheritAttrs: !1,
|
|
1578
1579
|
__name: "DsIconSort",
|
|
1579
1580
|
setup(e) {
|
|
1580
|
-
return (
|
|
1581
|
+
return (n, t) => (g(), p("svg", me({
|
|
1581
1582
|
fill: "none",
|
|
1582
1583
|
stroke: "currentColor",
|
|
1583
1584
|
viewBox: "0 0 24 24"
|
|
1584
|
-
},
|
|
1585
|
-
|
|
1585
|
+
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1586
|
+
$("path", {
|
|
1586
1587
|
"stroke-linecap": "round",
|
|
1587
1588
|
"stroke-linejoin": "round",
|
|
1588
1589
|
"stroke-width": "2",
|
|
@@ -1590,16 +1591,16 @@ 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(), p("svg", me({
|
|
1598
1599
|
fill: "none",
|
|
1599
1600
|
stroke: "currentColor",
|
|
1600
1601
|
viewBox: "0 0 24 24"
|
|
1601
|
-
},
|
|
1602
|
-
|
|
1602
|
+
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1603
|
+
$("path", {
|
|
1603
1604
|
"stroke-linecap": "round",
|
|
1604
1605
|
"stroke-linejoin": "round",
|
|
1605
1606
|
"stroke-width": "2",
|
|
@@ -1607,16 +1608,16 @@ const Mn = /* @__PURE__ */ S({
|
|
|
1607
1608
|
}, null, -1)
|
|
1608
1609
|
])], 16));
|
|
1609
1610
|
}
|
|
1610
|
-
}),
|
|
1611
|
+
}), Be = /* @__PURE__ */ z({
|
|
1611
1612
|
inheritAttrs: !1,
|
|
1612
1613
|
__name: "DsIconX",
|
|
1613
1614
|
setup(e) {
|
|
1614
|
-
return (
|
|
1615
|
+
return (n, t) => (g(), p("svg", me({
|
|
1615
1616
|
fill: "none",
|
|
1616
1617
|
stroke: "currentColor",
|
|
1617
1618
|
viewBox: "0 0 24 24"
|
|
1618
|
-
},
|
|
1619
|
-
|
|
1619
|
+
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1620
|
+
$("path", {
|
|
1620
1621
|
"stroke-linecap": "round",
|
|
1621
1622
|
"stroke-linejoin": "round",
|
|
1622
1623
|
"stroke-width": "2",
|
|
@@ -1626,14 +1627,14 @@ const Mn = /* @__PURE__ */ S({
|
|
|
1626
1627
|
}
|
|
1627
1628
|
});
|
|
1628
1629
|
let Nn = 0;
|
|
1629
|
-
function
|
|
1630
|
+
function oe(e = "ds") {
|
|
1630
1631
|
return `${e}-${++Nn}`;
|
|
1631
1632
|
}
|
|
1632
|
-
const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-selected", "aria-disabled", "onClick", "onMouseenter"],
|
|
1633
|
+
const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-selected", "aria-disabled", "onClick", "onMouseenter"], Kn = {
|
|
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 = oe("listbox"), l = j(-1), c = w(() => {
|
|
1654
|
+
if (!(!a.value || l.value < 0))
|
|
1655
|
+
return d(l.value);
|
|
1656
|
+
}), d = (x) => `${i}-option-${x}`, { floatingStyles: u } = 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
|
+
An({
|
|
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), f = w(() => t.options.find((x) => m(x) === b.value)), h = w(() => f.value ? v(f.value) : ""), m = (x) => typeof x == "object" && x !== null ? x.value : x, v = (x) => typeof x == "object" && x !== null ? x.label : String(x), y = (x) => typeof x == "object" && x !== null && x.disabled || !1, k = () => {
|
|
1672
|
+
fe(() => {
|
|
1673
|
+
const x = r.value;
|
|
1674
|
+
if (!x || l.value < 0) return;
|
|
1675
|
+
const O = x.querySelector(`#${d(l.value)}`);
|
|
1676
|
+
O == null || O.scrollIntoView({ block: "nearest" });
|
|
1676
1677
|
});
|
|
1677
|
-
},
|
|
1678
|
-
let
|
|
1679
|
-
for (;
|
|
1680
|
-
if (!
|
|
1681
|
-
|
|
1678
|
+
}, C = (x, O) => {
|
|
1679
|
+
let E = x;
|
|
1680
|
+
for (; E >= 0 && E < t.options.length; ) {
|
|
1681
|
+
if (!y(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 = C(l.value + 1, 1);
|
|
1687
|
+
x >= 0 && (l.value = x, k());
|
|
1690
1688
|
}, T = () => {
|
|
1691
|
-
const
|
|
1692
|
-
|
|
1693
|
-
},
|
|
1694
|
-
const
|
|
1695
|
-
|
|
1696
|
-
},
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1689
|
+
const x = C(l.value - 1, -1);
|
|
1690
|
+
x >= 0 && (l.value = x, k());
|
|
1691
|
+
}, B = () => {
|
|
1692
|
+
const x = C(0, 1);
|
|
1693
|
+
x >= 0 && (l.value = x, k());
|
|
1694
|
+
}, D = () => {
|
|
1695
|
+
const x = C(t.options.length - 1, -1);
|
|
1696
|
+
x >= 0 && (l.value = x, k());
|
|
1697
|
+
}, M = () => {
|
|
1698
|
+
t.disabled || t.loading || (a.value = !0, fe(() => {
|
|
1699
|
+
const x = t.options.findIndex(
|
|
1700
|
+
(O) => m(O) === b.value
|
|
1700
1701
|
);
|
|
1701
|
-
|
|
1702
|
+
x >= 0 && !y(t.options[x]) ? l.value = x : B(), k();
|
|
1702
1703
|
}));
|
|
1703
|
-
},
|
|
1704
|
-
a.value = !1,
|
|
1704
|
+
}, I = () => {
|
|
1705
|
+
a.value = !1, l.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 (y(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(), l.value < 0 ? B() : A();
|
|
1720
1721
|
break;
|
|
1721
1722
|
case "ArrowUp":
|
|
1722
|
-
|
|
1723
|
+
x.preventDefault(), l.value < 0 ? D() : T();
|
|
1723
1724
|
break;
|
|
1724
1725
|
case "Home":
|
|
1725
|
-
|
|
1726
|
+
x.preventDefault(), B();
|
|
1726
1727
|
break;
|
|
1727
1728
|
case "End":
|
|
1728
|
-
|
|
1729
|
+
x.preventDefault(), D();
|
|
1729
1730
|
break;
|
|
1730
1731
|
case "Enter":
|
|
1731
1732
|
case " ":
|
|
1732
|
-
|
|
1733
|
+
x.preventDefault(), l.value >= 0 && l.value < t.options.length && Y(t.options[l.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
|
-
te(
|
|
1744
|
+
return (x, O) => (g(), p("div", Wn, [
|
|
1745
|
+
te(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: S(Pe),
|
|
1753
1754
|
fullWidth: e.fullWidth,
|
|
1754
1755
|
role: "combobox",
|
|
1755
1756
|
"aria-expanded": a.value ? "true" : "false",
|
|
1756
|
-
"aria-controls":
|
|
1757
|
+
"aria-controls": S(i),
|
|
1757
1758
|
"aria-haspopup": "listbox",
|
|
1758
|
-
"aria-activedescendant":
|
|
1759
|
+
"aria-activedescendant": c.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(h.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
|
-
a.value ? (g(),
|
|
1770
|
+
(g(), N(Oe, { to: "body" }, [
|
|
1771
|
+
a.value ? (g(), p("div", {
|
|
1771
1772
|
key: 0,
|
|
1772
1773
|
ref_key: "floatingRef",
|
|
1773
1774
|
ref: r,
|
|
1774
|
-
id:
|
|
1775
|
+
id: S(i),
|
|
1775
1776
|
role: "listbox",
|
|
1776
1777
|
"aria-label": e.placeholder,
|
|
1777
|
-
style:
|
|
1778
|
+
style: _(S(u)),
|
|
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),
|
|
1783
|
-
key: m(
|
|
1784
|
-
id: d(
|
|
1783
|
+
(g(!0), p(le, null, ie(e.options, (E, F) => (g(), p("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": y(E) ? "true" : void 0,
|
|
1789
|
+
class: V([
|
|
1789
1790
|
"px-3 py-2 text-sm transition-colors outline-none",
|
|
1790
|
-
|
|
1791
|
-
b.value === m(
|
|
1792
|
-
|
|
1793
|
-
(
|
|
1794
|
-
|
|
1795
|
-
|
|
1791
|
+
y(E) ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
1792
|
+
b.value === m(E) ? "bg-brand text-brand-on-solid" : "",
|
|
1793
|
+
l.value === F && b.value !== m(E) ? "bg-surface-hover" : "",
|
|
1794
|
+
(l.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) => l.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(v(E)), 1)
|
|
1805
1806
|
])
|
|
1806
1807
|
], 42, qn))), 128)),
|
|
1807
|
-
e.options.length ?
|
|
1808
|
-
], 12, Hn)) :
|
|
1808
|
+
e.options.length ? R("", !0) : (g(), p("div", Kn, L(e.emptyText), 1))
|
|
1809
|
+
], 12, Hn)) : R("", !0)
|
|
1809
1810
|
])),
|
|
1810
|
-
a.value ? (g(),
|
|
1811
|
+
a.value ? (g(), p("div", {
|
|
1811
1812
|
key: 0,
|
|
1812
1813
|
class: "fixed inset-0 z-dropdown",
|
|
1813
|
-
onClick:
|
|
1814
|
-
})) :
|
|
1814
|
+
onClick: I
|
|
1815
|
+
})) : R("", !0)
|
|
1815
1816
|
]));
|
|
1816
1817
|
}
|
|
1817
|
-
}),
|
|
1818
|
+
}), Un = ["aria-expanded"], Xn = { class: "text-label" }, Yn = { class: "flex items-center gap-2" }, Gn = { class: "px-4 pb-4 border-t border-t-solid border-border" }, Jn = { class: "pt-3" }, wo = /* @__PURE__ */ z({
|
|
1818
1819
|
__name: "DsExpandableCard",
|
|
1819
1820
|
props: {
|
|
1820
1821
|
title: {},
|
|
@@ -1823,58 +1824,63 @@ 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
|
|
1827
|
+
setup(e, { emit: n }) {
|
|
1828
|
+
const t = e, s = n, o = j(null), r = j(0), a = j(t.modelValue ?? t.defaultExpanded);
|
|
1829
|
+
re(
|
|
1830
|
+
() => t.modelValue,
|
|
1831
|
+
(u) => {
|
|
1832
|
+
u !== void 0 && (a.value = u);
|
|
1833
|
+
}
|
|
1834
|
+
);
|
|
1828
1835
|
function i() {
|
|
1829
|
-
|
|
1830
|
-
a.value = b, o("update:modelValue", b);
|
|
1836
|
+
a.value = !a.value, s("update:modelValue", a.value);
|
|
1831
1837
|
}
|
|
1832
|
-
const
|
|
1833
|
-
maxHeight:
|
|
1838
|
+
const l = w(() => ({
|
|
1839
|
+
maxHeight: a.value ? `${r.value}px` : "0px"
|
|
1834
1840
|
}));
|
|
1835
|
-
function
|
|
1836
|
-
|
|
1841
|
+
function c() {
|
|
1842
|
+
o.value && (o.value.style.maxHeight = "none", r.value = o.value.scrollHeight, o.value.style.maxHeight = a.value ? `${r.value}px` : "0px");
|
|
1837
1843
|
}
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
}),
|
|
1841
|
-
|
|
1844
|
+
qe(() => {
|
|
1845
|
+
fe(c);
|
|
1846
|
+
}), re(a, () => {
|
|
1847
|
+
fe(c);
|
|
1842
1848
|
});
|
|
1843
|
-
const
|
|
1844
|
-
const
|
|
1845
|
-
default: ["border", "border-solid", "border-border-strong"
|
|
1849
|
+
const d = w(() => {
|
|
1850
|
+
const u = ["rounded-lg", "bg-bg", "overflow-hidden"], b = {
|
|
1851
|
+
default: ["border", "border-solid", "border-border-strong"],
|
|
1846
1852
|
outlined: ["border", "border-solid", "border-border-strong"],
|
|
1847
1853
|
elevated: ["shadow-default"]
|
|
1848
1854
|
};
|
|
1849
|
-
return [...
|
|
1855
|
+
return [...u, ...b[t.variant]].join(" ");
|
|
1850
1856
|
});
|
|
1851
|
-
return (
|
|
1852
|
-
class:
|
|
1857
|
+
return (u, b) => (g(), p("div", {
|
|
1858
|
+
class: V(d.value)
|
|
1853
1859
|
}, [
|
|
1854
|
-
|
|
1860
|
+
$("button", {
|
|
1855
1861
|
type: "button",
|
|
1856
1862
|
class: "w-full flex items-center justify-between px-4 py-3 text-left bg-transparent border-none cursor-pointer",
|
|
1857
|
-
"aria-expanded":
|
|
1863
|
+
"aria-expanded": a.value,
|
|
1858
1864
|
onClick: i
|
|
1859
1865
|
}, [
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
te(
|
|
1864
|
-
class:
|
|
1866
|
+
$("span", Xn, L(e.title), 1),
|
|
1867
|
+
$("span", Yn, [
|
|
1868
|
+
P(u.$slots, "header-extra"),
|
|
1869
|
+
te(S(Pe), {
|
|
1870
|
+
class: V(["w-4 h-4 text-fg-secondary transition-transform duration-normal", { "rotate-180": a.value }]),
|
|
1865
1871
|
"aria-hidden": "true"
|
|
1866
1872
|
}, null, 8, ["class"])
|
|
1867
1873
|
])
|
|
1868
|
-
], 8,
|
|
1869
|
-
|
|
1874
|
+
], 8, Un),
|
|
1875
|
+
$("div", {
|
|
1870
1876
|
ref_key: "contentRef",
|
|
1871
|
-
ref:
|
|
1877
|
+
ref: o,
|
|
1872
1878
|
class: "overflow-hidden transition-all duration-normal ease-in-out",
|
|
1873
|
-
style:
|
|
1879
|
+
style: _(l.value)
|
|
1874
1880
|
}, [
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1881
|
+
$("div", Gn, [
|
|
1882
|
+
$("div", Jn, [
|
|
1883
|
+
P(u.$slots, "default")
|
|
1878
1884
|
])
|
|
1879
1885
|
])
|
|
1880
1886
|
], 4)
|
|
@@ -1884,15 +1890,15 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
1884
1890
|
key: 0,
|
|
1885
1891
|
class: "text-error ml-1",
|
|
1886
1892
|
"aria-hidden": "true"
|
|
1887
|
-
},
|
|
1893
|
+
}, es = { class: "relative" }, ts = {
|
|
1888
1894
|
key: 0,
|
|
1889
1895
|
class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",
|
|
1890
1896
|
"aria-hidden": "true"
|
|
1891
|
-
},
|
|
1897
|
+
}, ns = ["id", "type", "value", "placeholder", "disabled", "readonly", "required", "autocomplete", "maxlength", "min", "max", "step", "aria-describedby", "aria-invalid"], ss = {
|
|
1892
1898
|
key: 1,
|
|
1893
1899
|
class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",
|
|
1894
1900
|
"aria-hidden": "true"
|
|
1895
|
-
},
|
|
1901
|
+
}, ko = /* @__PURE__ */ z({
|
|
1896
1902
|
__name: "DsInput",
|
|
1897
1903
|
props: {
|
|
1898
1904
|
modelValue: {},
|
|
@@ -1915,12 +1921,12 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
1915
1921
|
step: {}
|
|
1916
1922
|
},
|
|
1917
1923
|
emits: ["update:modelValue", "blur", "focus", "enter", "clear"],
|
|
1918
|
-
setup(e, { expose:
|
|
1919
|
-
const
|
|
1920
|
-
const
|
|
1921
|
-
return
|
|
1922
|
-
}), d = w(() =>
|
|
1923
|
-
const
|
|
1924
|
+
setup(e, { expose: n, emit: t }) {
|
|
1925
|
+
const s = e, o = t, r = j(null), a = oe("input"), i = `${a}-help`, l = `${a}-error`, c = w(() => {
|
|
1926
|
+
const T = [];
|
|
1927
|
+
return s.helpText && !s.error && T.push(i), s.error && T.push(l), T.length > 0 ? T.join(" ") : void 0;
|
|
1928
|
+
}), d = w(() => s.clearable && b.value && !s.disabled), u = w(() => s.iconRight || s.clearable), b = w(() => s.modelValue == null ? !1 : typeof s.modelValue == "string" ? s.modelValue.length > 0 : !0), f = w(() => {
|
|
1929
|
+
const T = [
|
|
1924
1930
|
"block",
|
|
1925
1931
|
"w-full",
|
|
1926
1932
|
"rounded-md",
|
|
@@ -1938,72 +1944,72 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
1938
1944
|
"disabled:bg-surface-disabled",
|
|
1939
1945
|
"disabled:text-fg-disabled",
|
|
1940
1946
|
"box-border"
|
|
1941
|
-
],
|
|
1947
|
+
], D = {
|
|
1942
1948
|
small: { text: "text-sm", py: "py-1", px: "px-2", pl: "pl-8", pr: "pr-8" },
|
|
1943
1949
|
medium: { text: "text-base", py: "py-2", px: "px-3", pl: "pl-10", pr: "pr-10" },
|
|
1944
1950
|
large: { text: "text-lg", py: "py-3", px: "px-4", pl: "pl-12", pr: "pr-12" }
|
|
1945
|
-
}[
|
|
1951
|
+
}[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
1952
|
return [
|
|
1947
|
-
...
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
...
|
|
1953
|
+
...T,
|
|
1954
|
+
D.text,
|
|
1955
|
+
D.py,
|
|
1956
|
+
s.iconLeft ? D.pl : D.px,
|
|
1957
|
+
u.value ? D.pr : D.px,
|
|
1958
|
+
...M
|
|
1953
1959
|
].join(" ");
|
|
1954
|
-
}),
|
|
1960
|
+
}), h = w(() => [
|
|
1955
1961
|
"absolute inset-y-0 flex items-center justify-center",
|
|
1956
1962
|
{
|
|
1957
1963
|
small: "right-2",
|
|
1958
1964
|
medium: "right-3",
|
|
1959
1965
|
large: "right-3"
|
|
1960
|
-
}[
|
|
1966
|
+
}[s.size],
|
|
1961
1967
|
"appearance-none bg-transparent border-none p-0 m-0",
|
|
1962
1968
|
"text-fg-tertiary hover:text-fg-secondary",
|
|
1963
1969
|
"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 `${
|
|
1970
|
+
].join(" ")), m = w(() => ({ small: "w-3.5 h-3.5", medium: "w-4 h-4", large: "w-5 h-5" })[s.size]), v = w(() => {
|
|
1971
|
+
const T = { small: "w-4 h-4", medium: "w-5 h-5", large: "w-6 h-6" }, B = s.error ? "text-error" : "text-fg-tertiary";
|
|
1972
|
+
return `${T[s.size]} ${B}`;
|
|
1967
1973
|
});
|
|
1968
|
-
function
|
|
1969
|
-
const
|
|
1970
|
-
if (
|
|
1971
|
-
const
|
|
1972
|
-
|
|
1974
|
+
function y(T) {
|
|
1975
|
+
const B = T.target;
|
|
1976
|
+
if (s.type === "number") {
|
|
1977
|
+
const D = Number(B.value);
|
|
1978
|
+
o("update:modelValue", Number.isNaN(D) ? B.value : D);
|
|
1973
1979
|
} else
|
|
1974
|
-
|
|
1980
|
+
o("update:modelValue", B.value);
|
|
1975
1981
|
}
|
|
1976
|
-
function
|
|
1977
|
-
var
|
|
1978
|
-
|
|
1982
|
+
function k() {
|
|
1983
|
+
var T;
|
|
1984
|
+
o("update:modelValue", ""), o("clear"), (T = r.value) == null || T.focus();
|
|
1979
1985
|
}
|
|
1980
|
-
function
|
|
1981
|
-
var
|
|
1982
|
-
(
|
|
1986
|
+
function C() {
|
|
1987
|
+
var T;
|
|
1988
|
+
(T = r.value) == null || T.focus();
|
|
1983
1989
|
}
|
|
1984
|
-
function
|
|
1985
|
-
var
|
|
1986
|
-
(
|
|
1990
|
+
function A() {
|
|
1991
|
+
var T;
|
|
1992
|
+
(T = r.value) == null || T.blur();
|
|
1987
1993
|
}
|
|
1988
|
-
return
|
|
1989
|
-
e.label ? (g(),
|
|
1994
|
+
return n({ focus: C, blur: A, inputRef: r }), (T, B) => (g(), p("div", Qn, [
|
|
1995
|
+
e.label ? (g(), p("label", {
|
|
1990
1996
|
key: 0,
|
|
1991
|
-
for:
|
|
1997
|
+
for: S(a),
|
|
1992
1998
|
class: "block text-label mb-1"
|
|
1993
1999
|
}, [
|
|
1994
|
-
|
|
1995
|
-
e.required ? (g(),
|
|
1996
|
-
], 8, Zn)) :
|
|
1997
|
-
|
|
1998
|
-
e.iconLeft ? (g(),
|
|
1999
|
-
(g(), N(
|
|
2000
|
-
class:
|
|
2000
|
+
K(L(e.label) + " ", 1),
|
|
2001
|
+
e.required ? (g(), p("span", _n, "*")) : R("", !0)
|
|
2002
|
+
], 8, Zn)) : R("", !0),
|
|
2003
|
+
$("div", es, [
|
|
2004
|
+
e.iconLeft ? (g(), p("div", ts, [
|
|
2005
|
+
(g(), N(Te(e.iconLeft), {
|
|
2006
|
+
class: V(v.value)
|
|
2001
2007
|
}, null, 8, ["class"]))
|
|
2002
|
-
])) :
|
|
2003
|
-
|
|
2008
|
+
])) : R("", !0),
|
|
2009
|
+
$("input", {
|
|
2004
2010
|
ref_key: "inputRef",
|
|
2005
2011
|
ref: r,
|
|
2006
|
-
id:
|
|
2012
|
+
id: S(a),
|
|
2007
2013
|
type: e.type,
|
|
2008
2014
|
value: e.modelValue,
|
|
2009
2015
|
placeholder: e.placeholder,
|
|
@@ -2015,49 +2021,49 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2015
2021
|
min: e.min,
|
|
2016
2022
|
max: e.max,
|
|
2017
2023
|
step: e.step,
|
|
2018
|
-
"aria-describedby":
|
|
2024
|
+
"aria-describedby": c.value,
|
|
2019
2025
|
"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(),
|
|
2027
|
-
(g(), N(
|
|
2028
|
-
class:
|
|
2026
|
+
class: V(f.value),
|
|
2027
|
+
onInput: y,
|
|
2028
|
+
onBlur: B[0] || (B[0] = (D) => T.$emit("blur", D)),
|
|
2029
|
+
onFocus: B[1] || (B[1] = (D) => T.$emit("focus", D)),
|
|
2030
|
+
onKeydown: B[2] || (B[2] = rt((D) => T.$emit("enter"), ["enter"]))
|
|
2031
|
+
}, null, 42, ns),
|
|
2032
|
+
e.iconRight && !d.value ? (g(), p("div", ss, [
|
|
2033
|
+
(g(), N(Te(e.iconRight), {
|
|
2034
|
+
class: V(v.value)
|
|
2029
2035
|
}, null, 8, ["class"]))
|
|
2030
|
-
])) :
|
|
2031
|
-
d.value ? (g(),
|
|
2036
|
+
])) : R("", !0),
|
|
2037
|
+
d.value ? (g(), p("button", {
|
|
2032
2038
|
key: 2,
|
|
2033
2039
|
type: "button",
|
|
2034
2040
|
"aria-label": "Clear input",
|
|
2035
|
-
class:
|
|
2036
|
-
onClick:
|
|
2041
|
+
class: V(h.value),
|
|
2042
|
+
onClick: k
|
|
2037
2043
|
}, [
|
|
2038
|
-
te(
|
|
2039
|
-
class:
|
|
2044
|
+
te(S(Be), {
|
|
2045
|
+
class: V(m.value)
|
|
2040
2046
|
}, null, 8, ["class"])
|
|
2041
|
-
], 2)) :
|
|
2047
|
+
], 2)) : R("", !0)
|
|
2042
2048
|
]),
|
|
2043
|
-
e.helpText && !e.error ? (g(),
|
|
2049
|
+
e.helpText && !e.error ? (g(), p("div", {
|
|
2044
2050
|
key: 1,
|
|
2045
|
-
id:
|
|
2051
|
+
id: i,
|
|
2046
2052
|
class: "mt-1 text-caption"
|
|
2047
|
-
},
|
|
2048
|
-
e.error ? (g(),
|
|
2053
|
+
}, L(e.helpText), 1)) : R("", !0),
|
|
2054
|
+
e.error ? (g(), p("div", {
|
|
2049
2055
|
key: 2,
|
|
2050
|
-
id:
|
|
2056
|
+
id: l,
|
|
2051
2057
|
class: "mt-1 text-sm text-error font-sans",
|
|
2052
2058
|
role: "alert",
|
|
2053
2059
|
"aria-live": "polite"
|
|
2054
|
-
},
|
|
2060
|
+
}, L(e.error), 1)) : R("", !0)
|
|
2055
2061
|
]));
|
|
2056
2062
|
}
|
|
2057
|
-
}),
|
|
2063
|
+
}), os = {
|
|
2058
2064
|
key: 1,
|
|
2059
2065
|
class: "sr-only"
|
|
2060
|
-
},
|
|
2066
|
+
}, as = /* @__PURE__ */ z({
|
|
2061
2067
|
__name: "DsLoadingSpinner",
|
|
2062
2068
|
props: {
|
|
2063
2069
|
size: { default: "medium" },
|
|
@@ -2066,10 +2072,10 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2066
2072
|
centered: { type: Boolean, default: !1 }
|
|
2067
2073
|
},
|
|
2068
2074
|
setup(e) {
|
|
2069
|
-
const
|
|
2075
|
+
const n = e, t = w(() => {
|
|
2070
2076
|
const r = ["inline-flex", "items-center"];
|
|
2071
|
-
return
|
|
2072
|
-
}),
|
|
2077
|
+
return n.centered && r.push("justify-center"), n.text && r.push("gap-2"), r.join(" ");
|
|
2078
|
+
}), s = w(() => {
|
|
2073
2079
|
const r = [
|
|
2074
2080
|
"animate-spin",
|
|
2075
2081
|
"rounded-full",
|
|
@@ -2078,7 +2084,7 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2078
2084
|
small: ["w-4", "h-4", "border-2"],
|
|
2079
2085
|
medium: ["w-6", "h-6", "border-4"],
|
|
2080
2086
|
large: ["w-8", "h-8", "border-6"]
|
|
2081
|
-
},
|
|
2087
|
+
}, i = {
|
|
2082
2088
|
primary: [
|
|
2083
2089
|
"border-brand",
|
|
2084
2090
|
"border-t-transparent"
|
|
@@ -2098,37 +2104,37 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2098
2104
|
};
|
|
2099
2105
|
return [
|
|
2100
2106
|
...r,
|
|
2101
|
-
...a[
|
|
2102
|
-
...
|
|
2107
|
+
...a[n.size],
|
|
2108
|
+
...i[n.variant]
|
|
2103
2109
|
].join(" ");
|
|
2104
|
-
}),
|
|
2110
|
+
}), o = w(() => [
|
|
2105
2111
|
{
|
|
2106
2112
|
small: "text-sm",
|
|
2107
2113
|
medium: "text-base",
|
|
2108
2114
|
large: "text-lg"
|
|
2109
|
-
}[
|
|
2115
|
+
}[n.size],
|
|
2110
2116
|
"text-fg-secondary",
|
|
2111
2117
|
"font-medium"
|
|
2112
2118
|
].join(" "));
|
|
2113
|
-
return (r, a) => (g(),
|
|
2114
|
-
class:
|
|
2119
|
+
return (r, a) => (g(), p("div", {
|
|
2120
|
+
class: V(t.value),
|
|
2115
2121
|
role: "status",
|
|
2116
2122
|
"aria-live": "polite"
|
|
2117
2123
|
}, [
|
|
2118
|
-
|
|
2119
|
-
class:
|
|
2124
|
+
$("div", {
|
|
2125
|
+
class: V(s.value),
|
|
2120
2126
|
"aria-hidden": "true"
|
|
2121
2127
|
}, null, 2),
|
|
2122
|
-
e.text ? (g(),
|
|
2128
|
+
e.text ? (g(), p("span", {
|
|
2123
2129
|
key: 0,
|
|
2124
|
-
class:
|
|
2125
|
-
},
|
|
2130
|
+
class: V(o.value)
|
|
2131
|
+
}, L(e.text), 3)) : (g(), p("span", os, "Loading"))
|
|
2126
2132
|
], 2));
|
|
2127
2133
|
}
|
|
2128
|
-
}),
|
|
2134
|
+
}), rs = ["aria-labelledby"], ls = { class: "flex items-center justify-between px-6 py-4" }, is = ["id"], cs = { class: "px-6 py-4 overflow-y-auto flex-1" }, ds = {
|
|
2129
2135
|
key: 0,
|
|
2130
2136
|
class: "px-6 py-4"
|
|
2131
|
-
},
|
|
2137
|
+
}, us = /* @__PURE__ */ z({
|
|
2132
2138
|
__name: "DsModal",
|
|
2133
2139
|
props: {
|
|
2134
2140
|
modelValue: { type: Boolean },
|
|
@@ -2138,25 +2144,25 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2138
2144
|
persistent: { type: Boolean, default: !1 }
|
|
2139
2145
|
},
|
|
2140
2146
|
emits: ["update:modelValue", "close"],
|
|
2141
|
-
setup(e, { emit:
|
|
2142
|
-
const
|
|
2147
|
+
setup(e, { emit: n }) {
|
|
2148
|
+
const t = e, s = n, o = oe("modal-title"), r = j(null);
|
|
2143
2149
|
let a = null;
|
|
2144
|
-
const
|
|
2150
|
+
const i = w(() => `relative z-sticky bg-bg rounded-xl shadow-lg overflow-hidden w-full ${{
|
|
2145
2151
|
sm: "max-w-sm",
|
|
2146
2152
|
md: "max-w-lg",
|
|
2147
2153
|
lg: "max-w-2xl",
|
|
2148
2154
|
xl: "max-w-4xl"
|
|
2149
|
-
}[
|
|
2150
|
-
function
|
|
2151
|
-
|
|
2155
|
+
}[t.size]} max-h-[90vh] flex flex-col`);
|
|
2156
|
+
function l() {
|
|
2157
|
+
s("update:modelValue", !1), s("close");
|
|
2152
2158
|
}
|
|
2153
|
-
function
|
|
2154
|
-
|
|
2159
|
+
function c() {
|
|
2160
|
+
t.persistent || l();
|
|
2155
2161
|
}
|
|
2156
2162
|
function d() {
|
|
2157
|
-
|
|
2163
|
+
t.persistent || l();
|
|
2158
2164
|
}
|
|
2159
|
-
function
|
|
2165
|
+
function u() {
|
|
2160
2166
|
return r.value ? Array.from(
|
|
2161
2167
|
r.value.querySelectorAll(
|
|
2162
2168
|
'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
@@ -2165,21 +2171,21 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2165
2171
|
}
|
|
2166
2172
|
function b(f) {
|
|
2167
2173
|
if (f.key !== "Tab") return;
|
|
2168
|
-
const
|
|
2169
|
-
if (
|
|
2170
|
-
const m =
|
|
2171
|
-
f.shiftKey && document.activeElement === m ? (f.preventDefault(),
|
|
2174
|
+
const h = u();
|
|
2175
|
+
if (h.length === 0) return;
|
|
2176
|
+
const m = h[0], v = h[h.length - 1];
|
|
2177
|
+
f.shiftKey && document.activeElement === m ? (f.preventDefault(), v.focus()) : !f.shiftKey && document.activeElement === v && (f.preventDefault(), m.focus());
|
|
2172
2178
|
}
|
|
2173
|
-
return
|
|
2174
|
-
() =>
|
|
2179
|
+
return re(
|
|
2180
|
+
() => t.modelValue,
|
|
2175
2181
|
async (f) => {
|
|
2176
|
-
var
|
|
2177
|
-
f ? (a = document.activeElement, document.body.style.overflow = "hidden", document.addEventListener("keydown", b), await
|
|
2182
|
+
var h;
|
|
2183
|
+
f ? (a = document.activeElement, document.body.style.overflow = "hidden", document.addEventListener("keydown", b), await fe(), (h = r.value) == null || h.focus()) : (document.body.style.overflow = "", document.removeEventListener("keydown", b), a == null || a.focus(), a = null);
|
|
2178
2184
|
}
|
|
2179
|
-
),
|
|
2185
|
+
), Ke(() => {
|
|
2180
2186
|
document.body.style.overflow = "", document.removeEventListener("keydown", b);
|
|
2181
|
-
}), (f,
|
|
2182
|
-
te(
|
|
2187
|
+
}), (f, h) => (g(), N(Oe, { to: "body" }, [
|
|
2188
|
+
te(lt, {
|
|
2183
2189
|
"enter-active-class": "ds-modal-enter-active",
|
|
2184
2190
|
"enter-from-class": "ds-modal-enter-from",
|
|
2185
2191
|
"enter-to-class": "ds-modal-enter-to",
|
|
@@ -2187,61 +2193,61 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2187
2193
|
"leave-from-class": "ds-modal-enter-to",
|
|
2188
2194
|
"leave-to-class": "ds-modal-enter-from"
|
|
2189
2195
|
}, {
|
|
2190
|
-
default:
|
|
2191
|
-
e.modelValue ? (g(),
|
|
2196
|
+
default: Ae(() => [
|
|
2197
|
+
e.modelValue ? (g(), p("div", {
|
|
2192
2198
|
key: 0,
|
|
2193
2199
|
class: "fixed inset-0 z-modal flex items-center justify-center p-4",
|
|
2194
|
-
onKeydown:
|
|
2200
|
+
onKeydown: rt(d, ["escape"])
|
|
2195
2201
|
}, [
|
|
2196
|
-
|
|
2202
|
+
$("div", {
|
|
2197
2203
|
class: "absolute inset-0 bg-overlay backdrop-blur-sm",
|
|
2198
2204
|
"aria-hidden": "true",
|
|
2199
|
-
onClick:
|
|
2205
|
+
onClick: c
|
|
2200
2206
|
}),
|
|
2201
|
-
|
|
2207
|
+
$("div", {
|
|
2202
2208
|
ref_key: "panelRef",
|
|
2203
2209
|
ref: r,
|
|
2204
2210
|
role: "dialog",
|
|
2205
2211
|
"aria-modal": "true",
|
|
2206
|
-
"aria-labelledby":
|
|
2207
|
-
class:
|
|
2212
|
+
"aria-labelledby": S(o),
|
|
2213
|
+
class: V(i.value),
|
|
2208
2214
|
tabindex: "-1"
|
|
2209
2215
|
}, [
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
id:
|
|
2216
|
+
$("div", ls, [
|
|
2217
|
+
P(f.$slots, "header", {}, () => [
|
|
2218
|
+
$("h2", {
|
|
2219
|
+
id: S(o),
|
|
2214
2220
|
class: "text-heading-lg m-0"
|
|
2215
|
-
},
|
|
2221
|
+
}, L(e.title), 9, is)
|
|
2216
2222
|
], !0),
|
|
2217
|
-
e.closable ? (g(), N(
|
|
2223
|
+
e.closable ? (g(), N(it, {
|
|
2218
2224
|
key: 0,
|
|
2219
2225
|
variant: "ghost",
|
|
2220
2226
|
size: "small",
|
|
2221
|
-
"icon-left":
|
|
2227
|
+
"icon-left": S(Be),
|
|
2222
2228
|
"aria-label": "Close dialog",
|
|
2223
|
-
onClick:
|
|
2224
|
-
}, null, 8, ["icon-left"])) :
|
|
2229
|
+
onClick: l
|
|
2230
|
+
}, null, 8, ["icon-left"])) : R("", !0)
|
|
2225
2231
|
]),
|
|
2226
|
-
|
|
2227
|
-
|
|
2232
|
+
$("div", cs, [
|
|
2233
|
+
P(f.$slots, "default", {}, void 0, !0)
|
|
2228
2234
|
]),
|
|
2229
|
-
f.$slots.footer ? (g(),
|
|
2230
|
-
|
|
2231
|
-
])) :
|
|
2232
|
-
], 10,
|
|
2233
|
-
], 32)) :
|
|
2235
|
+
f.$slots.footer ? (g(), p("div", ds, [
|
|
2236
|
+
P(f.$slots, "footer", {}, void 0, !0)
|
|
2237
|
+
])) : R("", !0)
|
|
2238
|
+
], 10, rs)
|
|
2239
|
+
], 32)) : R("", !0)
|
|
2234
2240
|
]),
|
|
2235
2241
|
_: 3
|
|
2236
2242
|
})
|
|
2237
2243
|
]));
|
|
2238
2244
|
}
|
|
2239
|
-
}),
|
|
2240
|
-
const
|
|
2241
|
-
for (const [
|
|
2242
|
-
|
|
2243
|
-
return
|
|
2244
|
-
},
|
|
2245
|
+
}), Ct = (e, n) => {
|
|
2246
|
+
const t = e.__vccOpts || e;
|
|
2247
|
+
for (const [s, o] of n)
|
|
2248
|
+
t[s] = o;
|
|
2249
|
+
return t;
|
|
2250
|
+
}, $o = /* @__PURE__ */ Ct(us, [["__scopeId", "data-v-cc8b4649"]]), fs = ["id", "name", "checked", "disabled", "value"], Co = /* @__PURE__ */ z({
|
|
2245
2251
|
__name: "DsRadio",
|
|
2246
2252
|
props: {
|
|
2247
2253
|
modelValue: { type: [String, Number, Boolean] },
|
|
@@ -2253,84 +2259,84 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2253
2259
|
size: { default: "medium" }
|
|
2254
2260
|
},
|
|
2255
2261
|
emits: ["update:modelValue", "change"],
|
|
2256
|
-
setup(e, { emit:
|
|
2257
|
-
const
|
|
2262
|
+
setup(e, { emit: n }) {
|
|
2263
|
+
const t = e, s = n, o = w(() => t.modelValue === t.value), r = {
|
|
2258
2264
|
small: { circle: "w-3.5 h-3.5", dot: "w-1.5 h-1.5", label: "text-xs" },
|
|
2259
2265
|
medium: { circle: "w-4 h-4", dot: "w-2 h-2", label: "text-sm" },
|
|
2260
2266
|
large: { circle: "w-5 h-5", dot: "w-2.5 h-2.5", label: "text-base" }
|
|
2261
2267
|
}, a = w(() => {
|
|
2262
|
-
const
|
|
2263
|
-
r[
|
|
2268
|
+
const u = [
|
|
2269
|
+
r[t.size].circle,
|
|
2264
2270
|
"rounded-full",
|
|
2265
2271
|
"inline-flex items-center justify-center",
|
|
2266
2272
|
"border border-solid",
|
|
2267
2273
|
"transition-all duration-fast",
|
|
2268
2274
|
"shrink-0"
|
|
2269
2275
|
];
|
|
2270
|
-
return
|
|
2271
|
-
|
|
2276
|
+
return t.disabled ? u.push(
|
|
2277
|
+
o.value ? "bg-bg border-brand-disabled" : "bg-bg-tertiary border-border",
|
|
2272
2278
|
"opacity-60"
|
|
2273
|
-
) :
|
|
2279
|
+
) : o.value ? u.push("bg-bg border-brand") : u.push(
|
|
2274
2280
|
"bg-bg border-border-strong",
|
|
2275
2281
|
"group-hover:border-brand",
|
|
2276
2282
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring peer-focus-visible:ring-offset-2"
|
|
2277
|
-
),
|
|
2278
|
-
}),
|
|
2279
|
-
const
|
|
2280
|
-
return
|
|
2281
|
-
}),
|
|
2283
|
+
), u.join(" ");
|
|
2284
|
+
}), i = w(() => {
|
|
2285
|
+
const u = [r[t.size].dot, "rounded-full"];
|
|
2286
|
+
return t.disabled ? u.push("bg-brand-disabled") : u.push("bg-brand"), u.join(" ");
|
|
2287
|
+
}), l = w(() => [
|
|
2282
2288
|
"font-sans select-none",
|
|
2283
|
-
r[
|
|
2284
|
-
|
|
2285
|
-
].join(" ")),
|
|
2286
|
-
if (
|
|
2287
|
-
const
|
|
2288
|
-
|
|
2289
|
+
r[t.size].label,
|
|
2290
|
+
t.disabled ? "text-fg-disabled" : "text-fg"
|
|
2291
|
+
].join(" ")), c = (d) => {
|
|
2292
|
+
if (t.disabled) return;
|
|
2293
|
+
const u = d.target, b = t.value ?? u.value;
|
|
2294
|
+
s("update:modelValue", b), s("change", b, d);
|
|
2289
2295
|
};
|
|
2290
|
-
return (d,
|
|
2291
|
-
class:
|
|
2296
|
+
return (d, u) => (g(), p("label", {
|
|
2297
|
+
class: V([
|
|
2292
2298
|
"inline-flex items-center gap-2",
|
|
2293
2299
|
e.disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
2294
2300
|
"group"
|
|
2295
2301
|
])
|
|
2296
2302
|
}, [
|
|
2297
|
-
|
|
2303
|
+
$("input", {
|
|
2298
2304
|
id: e.id,
|
|
2299
2305
|
type: "radio",
|
|
2300
2306
|
name: e.name,
|
|
2301
|
-
checked:
|
|
2307
|
+
checked: o.value,
|
|
2302
2308
|
disabled: e.disabled,
|
|
2303
2309
|
value: e.value,
|
|
2304
2310
|
class: "sr-only peer",
|
|
2305
|
-
onChange:
|
|
2306
|
-
}, null, 40,
|
|
2307
|
-
|
|
2308
|
-
class:
|
|
2311
|
+
onChange: c
|
|
2312
|
+
}, null, 40, fs),
|
|
2313
|
+
$("span", {
|
|
2314
|
+
class: V(a.value),
|
|
2309
2315
|
"aria-hidden": "true"
|
|
2310
2316
|
}, [
|
|
2311
|
-
|
|
2317
|
+
o.value ? (g(), p("span", {
|
|
2312
2318
|
key: 0,
|
|
2313
|
-
class:
|
|
2314
|
-
}, null, 2)) :
|
|
2319
|
+
class: V(i.value)
|
|
2320
|
+
}, null, 2)) : R("", !0)
|
|
2315
2321
|
], 2),
|
|
2316
|
-
e.label || d.$slots.default ? (g(),
|
|
2322
|
+
e.label || d.$slots.default ? (g(), p("span", {
|
|
2317
2323
|
key: 0,
|
|
2318
|
-
class:
|
|
2324
|
+
class: V(l.value)
|
|
2319
2325
|
}, [
|
|
2320
|
-
|
|
2321
|
-
|
|
2326
|
+
P(d.$slots, "default", {}, () => [
|
|
2327
|
+
K(L(e.label), 1)
|
|
2322
2328
|
])
|
|
2323
|
-
], 2)) :
|
|
2329
|
+
], 2)) : R("", !0)
|
|
2324
2330
|
], 2));
|
|
2325
2331
|
}
|
|
2326
|
-
}),
|
|
2332
|
+
}), bs = { class: "w-full" }, ms = ["for"], gs = {
|
|
2327
2333
|
key: 0,
|
|
2328
2334
|
class: "text-error ml-1",
|
|
2329
2335
|
"aria-hidden": "true"
|
|
2330
|
-
},
|
|
2336
|
+
}, hs = { class: "relative" }, vs = ["id", "value", "disabled", "required", "aria-describedby", "aria-invalid"], ps = ["selected"], ys = ["value", "disabled"], xs = {
|
|
2331
2337
|
class: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",
|
|
2332
2338
|
"aria-hidden": "true"
|
|
2333
|
-
},
|
|
2339
|
+
}, Do = /* @__PURE__ */ z({
|
|
2334
2340
|
__name: "DsSelect",
|
|
2335
2341
|
props: {
|
|
2336
2342
|
modelValue: {},
|
|
@@ -2344,11 +2350,11 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2344
2350
|
options: {}
|
|
2345
2351
|
},
|
|
2346
2352
|
emits: ["update:modelValue", "blur", "focus"],
|
|
2347
|
-
setup(e, { emit:
|
|
2348
|
-
const
|
|
2353
|
+
setup(e, { emit: n }) {
|
|
2354
|
+
const t = e, s = n, o = oe("select"), r = `${o}-help`, a = `${o}-error`, i = w(() => {
|
|
2349
2355
|
const d = [];
|
|
2350
|
-
return
|
|
2351
|
-
}),
|
|
2356
|
+
return t.helpText && !t.error && d.push(r), t.error && d.push(a), d.length > 0 ? d.join(" ") : void 0;
|
|
2357
|
+
}), l = w(() => {
|
|
2352
2358
|
const d = [
|
|
2353
2359
|
"block",
|
|
2354
2360
|
"w-full",
|
|
@@ -2368,75 +2374,75 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2368
2374
|
"font-sans",
|
|
2369
2375
|
"box-border",
|
|
2370
2376
|
"pr-10"
|
|
2371
|
-
],
|
|
2377
|
+
], u = {
|
|
2372
2378
|
small: "px-2 py-1 text-sm",
|
|
2373
2379
|
medium: "px-3 py-2 text-base",
|
|
2374
2380
|
large: "px-4 py-3 text-lg"
|
|
2375
|
-
}, b =
|
|
2376
|
-
return [...d,
|
|
2377
|
-
}),
|
|
2378
|
-
const b = d.target.value, f =
|
|
2379
|
-
|
|
2381
|
+
}, b = t.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-focus-ring"];
|
|
2382
|
+
return [...d, u[t.size], ...b].join(" ");
|
|
2383
|
+
}), c = (d) => {
|
|
2384
|
+
const b = d.target.value, f = t.options.find((h) => String(h.value) === b);
|
|
2385
|
+
s("update:modelValue", f && typeof f.value == "number" ? f.value : b);
|
|
2380
2386
|
};
|
|
2381
|
-
return (d,
|
|
2382
|
-
e.label ? (g(),
|
|
2387
|
+
return (d, u) => (g(), p("div", bs, [
|
|
2388
|
+
e.label ? (g(), p("label", {
|
|
2383
2389
|
key: 0,
|
|
2384
|
-
for:
|
|
2390
|
+
for: S(o),
|
|
2385
2391
|
class: "block text-label mb-1"
|
|
2386
2392
|
}, [
|
|
2387
|
-
|
|
2388
|
-
e.required ? (g(),
|
|
2389
|
-
], 8,
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
id:
|
|
2393
|
+
K(L(e.label) + " ", 1),
|
|
2394
|
+
e.required ? (g(), p("span", gs, "*")) : R("", !0)
|
|
2395
|
+
], 8, ms)) : R("", !0),
|
|
2396
|
+
$("div", hs, [
|
|
2397
|
+
$("select", {
|
|
2398
|
+
id: S(o),
|
|
2393
2399
|
value: e.modelValue,
|
|
2394
2400
|
disabled: e.disabled,
|
|
2395
2401
|
required: e.required,
|
|
2396
|
-
"aria-describedby":
|
|
2402
|
+
"aria-describedby": i.value,
|
|
2397
2403
|
"aria-invalid": e.error ? "true" : void 0,
|
|
2398
|
-
class:
|
|
2399
|
-
onChange:
|
|
2400
|
-
onBlur:
|
|
2401
|
-
onFocus:
|
|
2404
|
+
class: V(l.value),
|
|
2405
|
+
onChange: c,
|
|
2406
|
+
onBlur: u[0] || (u[0] = (b) => d.$emit("blur", b)),
|
|
2407
|
+
onFocus: u[1] || (u[1] = (b) => d.$emit("focus", b))
|
|
2402
2408
|
}, [
|
|
2403
|
-
e.placeholder ? (g(),
|
|
2409
|
+
e.placeholder ? (g(), p("option", {
|
|
2404
2410
|
key: 0,
|
|
2405
2411
|
value: "",
|
|
2406
2412
|
disabled: "",
|
|
2407
2413
|
selected: !e.modelValue
|
|
2408
|
-
},
|
|
2409
|
-
(g(!0),
|
|
2414
|
+
}, L(e.placeholder), 9, ps)) : R("", !0),
|
|
2415
|
+
(g(!0), p(le, null, ie(e.options, (b) => (g(), p("option", {
|
|
2410
2416
|
key: b.value,
|
|
2411
2417
|
value: b.value,
|
|
2412
2418
|
disabled: b.disabled
|
|
2413
|
-
},
|
|
2414
|
-
], 42,
|
|
2415
|
-
|
|
2416
|
-
te(
|
|
2419
|
+
}, L(b.label), 9, ys))), 128))
|
|
2420
|
+
], 42, vs),
|
|
2421
|
+
$("div", xs, [
|
|
2422
|
+
te(S(Pe), { class: "w-4 h-4 text-fg-tertiary" })
|
|
2417
2423
|
])
|
|
2418
2424
|
]),
|
|
2419
|
-
e.helpText && !e.error ? (g(),
|
|
2425
|
+
e.helpText && !e.error ? (g(), p("div", {
|
|
2420
2426
|
key: 1,
|
|
2421
2427
|
id: r,
|
|
2422
2428
|
class: "mt-1 text-caption"
|
|
2423
|
-
},
|
|
2424
|
-
e.error ? (g(),
|
|
2429
|
+
}, L(e.helpText), 1)) : R("", !0),
|
|
2430
|
+
e.error ? (g(), p("div", {
|
|
2425
2431
|
key: 2,
|
|
2426
2432
|
id: a,
|
|
2427
2433
|
class: "mt-1 text-sm text-error font-sans",
|
|
2428
2434
|
role: "alert",
|
|
2429
2435
|
"aria-live": "polite"
|
|
2430
|
-
},
|
|
2436
|
+
}, L(e.error), 1)) : R("", !0)
|
|
2431
2437
|
]));
|
|
2432
2438
|
}
|
|
2433
|
-
}),
|
|
2439
|
+
}), ws = { class: "flex flex-col gap-1.5" }, ks = {
|
|
2434
2440
|
key: 0,
|
|
2435
2441
|
class: "flex items-center justify-between"
|
|
2436
|
-
},
|
|
2442
|
+
}, $s = ["for"], Cs = {
|
|
2437
2443
|
key: 1,
|
|
2438
2444
|
class: "text-body-sm tabular-nums"
|
|
2439
|
-
},
|
|
2445
|
+
}, Ds = ["id", "value", "min", "max", "step", "disabled"], Ts = /* @__PURE__ */ z({
|
|
2440
2446
|
__name: "DsSlider",
|
|
2441
2447
|
props: {
|
|
2442
2448
|
modelValue: { default: 0 },
|
|
@@ -2448,48 +2454,132 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2448
2454
|
showValue: { type: Boolean, default: !1 }
|
|
2449
2455
|
},
|
|
2450
2456
|
emits: ["update:modelValue"],
|
|
2451
|
-
setup(e, { emit:
|
|
2452
|
-
const
|
|
2457
|
+
setup(e, { emit: n }) {
|
|
2458
|
+
const t = e, s = n, o = oe(), r = w(() => (t.modelValue - t.min) / (t.max - t.min) * 100), a = w(() => ({
|
|
2453
2459
|
"--slider-percent": `${r.value}%`
|
|
2454
2460
|
}));
|
|
2455
|
-
function l
|
|
2456
|
-
const
|
|
2457
|
-
|
|
2461
|
+
function i(l) {
|
|
2462
|
+
const c = l.target;
|
|
2463
|
+
s("update:modelValue", Number(c.value));
|
|
2458
2464
|
}
|
|
2459
|
-
return (
|
|
2460
|
-
e.label || e.showValue ? (g(),
|
|
2461
|
-
e.label ? (g(),
|
|
2465
|
+
return (l, c) => (g(), p("div", ws, [
|
|
2466
|
+
e.label || e.showValue ? (g(), p("div", ks, [
|
|
2467
|
+
e.label ? (g(), p("label", {
|
|
2462
2468
|
key: 0,
|
|
2463
|
-
for:
|
|
2469
|
+
for: S(o),
|
|
2464
2470
|
class: "text-label"
|
|
2465
|
-
},
|
|
2466
|
-
e.showValue ? (g(),
|
|
2467
|
-
])) :
|
|
2468
|
-
|
|
2469
|
-
id:
|
|
2471
|
+
}, L(e.label), 9, $s)) : R("", !0),
|
|
2472
|
+
e.showValue ? (g(), p("span", Cs, L(e.modelValue), 1)) : R("", !0)
|
|
2473
|
+
])) : R("", !0),
|
|
2474
|
+
$("input", {
|
|
2475
|
+
id: S(o),
|
|
2470
2476
|
type: "range",
|
|
2471
|
-
class:
|
|
2477
|
+
class: V(["ds-slider", { "opacity-50 cursor-not-allowed": e.disabled }]),
|
|
2472
2478
|
value: e.modelValue,
|
|
2473
2479
|
min: e.min,
|
|
2474
2480
|
max: e.max,
|
|
2475
2481
|
step: e.step,
|
|
2476
2482
|
disabled: e.disabled,
|
|
2477
|
-
style:
|
|
2478
|
-
onInput:
|
|
2479
|
-
}, null, 46,
|
|
2483
|
+
style: _(a.value),
|
|
2484
|
+
onInput: i
|
|
2485
|
+
}, null, 46, Ds)
|
|
2480
2486
|
]));
|
|
2481
2487
|
}
|
|
2482
|
-
}),
|
|
2488
|
+
}), To = /* @__PURE__ */ Ct(Ts, [["__scopeId", "data-v-75234e8c"]]), Vs = ["id", "checked", "aria-checked", "disabled"], Vo = /* @__PURE__ */ z({
|
|
2489
|
+
__name: "DsSwitch",
|
|
2490
|
+
props: {
|
|
2491
|
+
modelValue: { type: Boolean, default: !1 },
|
|
2492
|
+
label: {},
|
|
2493
|
+
id: {},
|
|
2494
|
+
disabled: { type: Boolean, default: !1 },
|
|
2495
|
+
size: { default: "medium" },
|
|
2496
|
+
labelPosition: { default: "right" }
|
|
2497
|
+
},
|
|
2498
|
+
emits: ["update:modelValue", "change"],
|
|
2499
|
+
setup(e, { emit: n }) {
|
|
2500
|
+
const t = e, s = n, o = oe("switch"), r = t.id ?? o, a = {
|
|
2501
|
+
small: { track: "w-7 h-4", thumb: "w-3 h-3", translate: "translate-x-3", label: "text-xs" },
|
|
2502
|
+
medium: { track: "w-9 h-5", thumb: "w-4 h-4", translate: "translate-x-4", label: "text-sm" },
|
|
2503
|
+
large: { track: "w-11 h-6", thumb: "w-5 h-5", translate: "translate-x-5", label: "text-base" }
|
|
2504
|
+
}, i = w(() => {
|
|
2505
|
+
const b = [
|
|
2506
|
+
a[t.size].track,
|
|
2507
|
+
"relative inline-flex items-center",
|
|
2508
|
+
"rounded-full",
|
|
2509
|
+
"border border-solid border-transparent",
|
|
2510
|
+
"transition-colors duration-fast",
|
|
2511
|
+
"shrink-0"
|
|
2512
|
+
];
|
|
2513
|
+
return t.disabled ? b.push(
|
|
2514
|
+
t.modelValue ? "bg-brand-disabled" : "bg-neutral-border",
|
|
2515
|
+
"opacity-60"
|
|
2516
|
+
) : 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(" ");
|
|
2517
|
+
}), l = w(() => {
|
|
2518
|
+
const u = a[t.size], b = [
|
|
2519
|
+
u.thumb,
|
|
2520
|
+
"absolute left-0.5",
|
|
2521
|
+
"rounded-full",
|
|
2522
|
+
"bg-bg",
|
|
2523
|
+
"shadow-thumb",
|
|
2524
|
+
"transition-transform duration-fast"
|
|
2525
|
+
];
|
|
2526
|
+
return t.modelValue && b.push(u.translate), b.join(" ");
|
|
2527
|
+
}), c = w(() => [
|
|
2528
|
+
"font-sans select-none",
|
|
2529
|
+
a[t.size].label,
|
|
2530
|
+
t.disabled ? "text-fg-disabled" : "text-fg"
|
|
2531
|
+
].join(" ")), d = (u) => {
|
|
2532
|
+
if (t.disabled) return;
|
|
2533
|
+
const f = u.target.checked;
|
|
2534
|
+
s("update:modelValue", f), s("change", f, u);
|
|
2535
|
+
};
|
|
2536
|
+
return (u, b) => (g(), p("label", {
|
|
2537
|
+
class: V([
|
|
2538
|
+
"inline-flex items-center gap-2",
|
|
2539
|
+
e.labelPosition === "left" ? "flex-row-reverse" : "",
|
|
2540
|
+
e.disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
2541
|
+
"group"
|
|
2542
|
+
])
|
|
2543
|
+
}, [
|
|
2544
|
+
$("input", {
|
|
2545
|
+
id: S(r),
|
|
2546
|
+
type: "checkbox",
|
|
2547
|
+
role: "switch",
|
|
2548
|
+
checked: e.modelValue,
|
|
2549
|
+
"aria-checked": e.modelValue,
|
|
2550
|
+
disabled: e.disabled,
|
|
2551
|
+
class: "sr-only peer",
|
|
2552
|
+
onChange: d
|
|
2553
|
+
}, null, 40, Vs),
|
|
2554
|
+
$("span", {
|
|
2555
|
+
class: V(i.value),
|
|
2556
|
+
"aria-hidden": "true"
|
|
2557
|
+
}, [
|
|
2558
|
+
$("span", {
|
|
2559
|
+
class: V(l.value)
|
|
2560
|
+
}, null, 2)
|
|
2561
|
+
], 2),
|
|
2562
|
+
e.label || u.$slots.default ? (g(), p("span", {
|
|
2563
|
+
key: 0,
|
|
2564
|
+
class: V(c.value)
|
|
2565
|
+
}, [
|
|
2566
|
+
P(u.$slots, "default", {}, () => [
|
|
2567
|
+
K(L(e.label), 1)
|
|
2568
|
+
])
|
|
2569
|
+
], 2)) : R("", !0)
|
|
2570
|
+
], 2));
|
|
2571
|
+
}
|
|
2572
|
+
}), Rs = { class: "w-full overflow-x-auto rounded-lg border border-solid border-border-light" }, Ls = {
|
|
2483
2573
|
class: "w-full border-collapse text-sm",
|
|
2484
2574
|
role: "table"
|
|
2485
|
-
},
|
|
2575
|
+
}, Bs = { class: "bg-bg-secondary" }, Ss = ["aria-sort", "onClick"], As = {
|
|
2486
2576
|
key: 0,
|
|
2487
2577
|
class: "inline-flex",
|
|
2488
2578
|
"aria-hidden": "true"
|
|
2489
|
-
},
|
|
2579
|
+
}, Os = { key: 0 }, zs = ["colspan"], Es = { key: 1 }, Ms = ["colspan"], js = ["onClick"], Ps = ["onClick"], Is = {
|
|
2490
2580
|
key: 0,
|
|
2491
|
-
class: "flex items-center justify-between px-4 py-3
|
|
2492
|
-
},
|
|
2581
|
+
class: "flex items-center justify-between px-4 py-3 bg-bg-secondary text-sm"
|
|
2582
|
+
}, Fs = { class: "text-fg-secondary" }, Ns = { class: "flex gap-2" }, Ws = ["disabled"], Hs = ["disabled"], Ro = /* @__PURE__ */ z({
|
|
2493
2583
|
__name: "DsTable",
|
|
2494
2584
|
props: {
|
|
2495
2585
|
columns: {},
|
|
@@ -2506,22 +2596,22 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2506
2596
|
pagination: {}
|
|
2507
2597
|
},
|
|
2508
2598
|
emits: ["update:sortBy", "update:sortOrder", "update:page", "row:click", "cell:click"],
|
|
2509
|
-
setup(e, { expose:
|
|
2510
|
-
const
|
|
2511
|
-
|
|
2512
|
-
|
|
2599
|
+
setup(e, { expose: n, emit: t }) {
|
|
2600
|
+
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(
|
|
2601
|
+
s.pagination.page * s.pagination.perPage,
|
|
2602
|
+
s.pagination.total
|
|
2513
2603
|
) : 0);
|
|
2514
|
-
function
|
|
2515
|
-
|
|
2604
|
+
function l(m) {
|
|
2605
|
+
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
2606
|
}
|
|
2517
|
-
function
|
|
2607
|
+
function c(m) {
|
|
2518
2608
|
if (m.sortable)
|
|
2519
|
-
return
|
|
2609
|
+
return s.sortBy !== m.key ? "none" : s.sortOrder === "asc" ? "ascending" : "descending";
|
|
2520
2610
|
}
|
|
2521
2611
|
function d(m) {
|
|
2522
2612
|
return m === "center" ? "justify-center" : m === "right" ? "justify-end" : "";
|
|
2523
2613
|
}
|
|
2524
|
-
function
|
|
2614
|
+
function u(m) {
|
|
2525
2615
|
return [
|
|
2526
2616
|
"px-4 py-3 text-left font-sans text-sm font-500 text-fg-secondary",
|
|
2527
2617
|
m.sortable ? "cursor-pointer select-none hover:text-fg" : ""
|
|
@@ -2530,114 +2620,114 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2530
2620
|
function b(m) {
|
|
2531
2621
|
return `px-4 py-3 ${m.align === "center" ? "text-center" : m.align === "right" ? "text-right" : "text-left"}`;
|
|
2532
2622
|
}
|
|
2533
|
-
function f(m,
|
|
2534
|
-
|
|
2623
|
+
function f(m, v) {
|
|
2624
|
+
o("row:click", m, v);
|
|
2535
2625
|
}
|
|
2536
|
-
function
|
|
2537
|
-
|
|
2626
|
+
function h(m, v) {
|
|
2627
|
+
o("cell:click", m, v);
|
|
2538
2628
|
}
|
|
2539
|
-
return
|
|
2629
|
+
return n({
|
|
2540
2630
|
handleRowClick: f,
|
|
2541
|
-
handleCellClick:
|
|
2542
|
-
}), (m,
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
class:
|
|
2631
|
+
handleCellClick: h
|
|
2632
|
+
}), (m, v) => (g(), p("div", Rs, [
|
|
2633
|
+
$("table", Ls, [
|
|
2634
|
+
$("thead", {
|
|
2635
|
+
class: V(e.stickyHeader ? "sticky top-0 z-sticky" : "")
|
|
2546
2636
|
}, [
|
|
2547
|
-
|
|
2548
|
-
(g(!0),
|
|
2549
|
-
key:
|
|
2550
|
-
style:
|
|
2551
|
-
class:
|
|
2552
|
-
"aria-sort":
|
|
2553
|
-
onClick: (
|
|
2637
|
+
$("tr", Bs, [
|
|
2638
|
+
(g(!0), p(le, null, ie(e.columns, (y) => (g(), p("th", {
|
|
2639
|
+
key: y.key,
|
|
2640
|
+
style: _(y.width ? { width: y.width } : void 0),
|
|
2641
|
+
class: V(u(y)),
|
|
2642
|
+
"aria-sort": c(y),
|
|
2643
|
+
onClick: (k) => y.sortable ? l(y.key) : void 0
|
|
2554
2644
|
}, [
|
|
2555
|
-
|
|
2556
|
-
class:
|
|
2645
|
+
$("div", {
|
|
2646
|
+
class: V(["flex items-center gap-1", d(y.align)])
|
|
2557
2647
|
}, [
|
|
2558
|
-
|
|
2559
|
-
|
|
2648
|
+
P(m.$slots, `header-${y.key}`, { column: y }, () => [
|
|
2649
|
+
K(L(y.label), 1)
|
|
2560
2650
|
]),
|
|
2561
|
-
|
|
2562
|
-
e.sortBy ===
|
|
2651
|
+
y.sortable ? (g(), p("span", As, [
|
|
2652
|
+
e.sortBy === y.key && e.sortOrder === "asc" ? (g(), N(S(Pn), {
|
|
2563
2653
|
key: 0,
|
|
2564
2654
|
class: "w-4 h-4"
|
|
2565
|
-
})) : e.sortBy ===
|
|
2655
|
+
})) : e.sortBy === y.key && e.sortOrder === "desc" ? (g(), N(S(Pe), {
|
|
2566
2656
|
key: 1,
|
|
2567
2657
|
class: "w-4 h-4"
|
|
2568
|
-
})) : (g(), N(
|
|
2658
|
+
})) : (g(), N(S(Fn), {
|
|
2569
2659
|
key: 2,
|
|
2570
2660
|
class: "w-4 h-4 text-fg-tertiary"
|
|
2571
2661
|
}))
|
|
2572
|
-
])) :
|
|
2662
|
+
])) : R("", !0)
|
|
2573
2663
|
], 2)
|
|
2574
|
-
], 14,
|
|
2664
|
+
], 14, Ss))), 128))
|
|
2575
2665
|
])
|
|
2576
2666
|
], 2),
|
|
2577
|
-
|
|
2578
|
-
e.loading ? (g(),
|
|
2579
|
-
|
|
2667
|
+
$("tbody", null, [
|
|
2668
|
+
e.loading ? (g(), p("tr", Os, [
|
|
2669
|
+
$("td", {
|
|
2580
2670
|
colspan: e.columns.length,
|
|
2581
2671
|
class: "text-center py-12"
|
|
2582
2672
|
}, [
|
|
2583
|
-
|
|
2584
|
-
te(
|
|
2673
|
+
P(m.$slots, "loading", {}, () => [
|
|
2674
|
+
te(as, { centered: "" })
|
|
2585
2675
|
])
|
|
2586
|
-
], 8,
|
|
2587
|
-
])) : e.rows.length === 0 ? (g(),
|
|
2588
|
-
|
|
2676
|
+
], 8, zs)
|
|
2677
|
+
])) : e.rows.length === 0 ? (g(), p("tr", Es, [
|
|
2678
|
+
$("td", {
|
|
2589
2679
|
colspan: e.columns.length,
|
|
2590
2680
|
class: "text-center py-12 text-fg-secondary"
|
|
2591
2681
|
}, [
|
|
2592
|
-
|
|
2593
|
-
|
|
2682
|
+
P(m.$slots, "empty", {}, () => [
|
|
2683
|
+
K(L(e.emptyText), 1)
|
|
2594
2684
|
])
|
|
2595
|
-
], 8,
|
|
2596
|
-
])) :
|
|
2597
|
-
(g(!0),
|
|
2598
|
-
key:
|
|
2599
|
-
class:
|
|
2600
|
-
"
|
|
2601
|
-
e.striped &&
|
|
2685
|
+
], 8, Ms)
|
|
2686
|
+
])) : R("", !0),
|
|
2687
|
+
(g(!0), p(le, null, ie(e.rows, (y, k) => (g(), p("tr", {
|
|
2688
|
+
key: k,
|
|
2689
|
+
class: V([
|
|
2690
|
+
"transition-colors hover:bg-surface-hover-light",
|
|
2691
|
+
e.striped && k % 2 === 1 ? "bg-bg-secondary" : ""
|
|
2602
2692
|
]),
|
|
2603
|
-
onClick: (
|
|
2693
|
+
onClick: (C) => f(y, k)
|
|
2604
2694
|
}, [
|
|
2605
|
-
(g(!0),
|
|
2606
|
-
key:
|
|
2607
|
-
class:
|
|
2608
|
-
onClick: (
|
|
2695
|
+
(g(!0), p(le, null, ie(e.columns, (C) => (g(), p("td", {
|
|
2696
|
+
key: C.key,
|
|
2697
|
+
class: V(b(C)),
|
|
2698
|
+
onClick: (A) => h(y, C.key)
|
|
2609
2699
|
}, [
|
|
2610
|
-
|
|
2611
|
-
row:
|
|
2612
|
-
value:
|
|
2613
|
-
index:
|
|
2700
|
+
P(m.$slots, `cell-${C.key}`, {
|
|
2701
|
+
row: y,
|
|
2702
|
+
value: y[C.key],
|
|
2703
|
+
index: k
|
|
2614
2704
|
}, () => [
|
|
2615
|
-
|
|
2705
|
+
K(L(y[C.key]), 1)
|
|
2616
2706
|
])
|
|
2617
|
-
], 10,
|
|
2618
|
-
], 10,
|
|
2707
|
+
], 10, Ps))), 128))
|
|
2708
|
+
], 10, js))), 128))
|
|
2619
2709
|
])
|
|
2620
2710
|
]),
|
|
2621
|
-
e.pagination ? (g(),
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2711
|
+
e.pagination ? (g(), p("div", Is, [
|
|
2712
|
+
$("span", Fs, L(a.value) + "–" + L(i.value) + " " + L(e.ofLabel) + " " + L(e.pagination.total), 1),
|
|
2713
|
+
$("div", Ns, [
|
|
2714
|
+
$("button", {
|
|
2625
2715
|
type: "button",
|
|
2626
2716
|
disabled: e.pagination.page <= 1,
|
|
2627
2717
|
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
|
-
},
|
|
2630
|
-
|
|
2718
|
+
onClick: v[0] || (v[0] = (y) => m.$emit("update:page", e.pagination.page - 1))
|
|
2719
|
+
}, L(e.previousPageLabel), 9, Ws),
|
|
2720
|
+
$("button", {
|
|
2631
2721
|
type: "button",
|
|
2632
2722
|
disabled: e.pagination.page >= r.value,
|
|
2633
2723
|
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
|
-
},
|
|
2724
|
+
onClick: v[1] || (v[1] = (y) => m.$emit("update:page", e.pagination.page + 1))
|
|
2725
|
+
}, L(e.nextPageLabel), 9, Hs)
|
|
2636
2726
|
])
|
|
2637
|
-
])) :
|
|
2727
|
+
])) : R("", !0)
|
|
2638
2728
|
]));
|
|
2639
2729
|
}
|
|
2640
|
-
}),
|
|
2730
|
+
}), qs = ["aria-label"], Ks = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick", "onKeydown"], Us = ["id", "aria-labelledby", "hidden"], Lo = /* @__PURE__ */ z({
|
|
2641
2731
|
__name: "DsTabs",
|
|
2642
2732
|
props: {
|
|
2643
2733
|
modelValue: {},
|
|
@@ -2646,96 +2736,142 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2646
2736
|
ariaLabel: { default: "Tabs" }
|
|
2647
2737
|
},
|
|
2648
2738
|
emits: ["update:modelValue"],
|
|
2649
|
-
setup(e, { emit:
|
|
2650
|
-
const
|
|
2651
|
-
() =>
|
|
2739
|
+
setup(e, { emit: n }) {
|
|
2740
|
+
const t = e, s = n, o = oe("tabs"), r = j(null), a = w(
|
|
2741
|
+
() => t.variant === "line" ? "relative flex gap-1 border-b border-t-0 border-l-0 border-r-0 border-solid border-border" : "relative flex gap-1 bg-neutral-soft p-1 rounded-lg"
|
|
2652
2742
|
);
|
|
2653
|
-
function
|
|
2654
|
-
|
|
2743
|
+
function i(h) {
|
|
2744
|
+
h.disabled || s("update:modelValue", h.key);
|
|
2655
2745
|
}
|
|
2656
|
-
function l(
|
|
2657
|
-
const
|
|
2658
|
-
return
|
|
2659
|
-
|
|
2660
|
-
"px-4 py-2
|
|
2661
|
-
|
|
2746
|
+
function l(h) {
|
|
2747
|
+
const m = t.modelValue === h.key, v = "relative z-1 font-medium text-sm 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";
|
|
2748
|
+
return t.variant === "line" ? [
|
|
2749
|
+
v,
|
|
2750
|
+
"px-4 py-2.5 rounded-t-md border-0 bg-transparent",
|
|
2751
|
+
m ? "text-brand" : "text-fg-secondary hover:text-fg not-disabled:hover:bg-surface-hover-light"
|
|
2662
2752
|
].join(" ") : [
|
|
2663
|
-
|
|
2664
|
-
"px-3 py-1.5
|
|
2665
|
-
|
|
2753
|
+
v,
|
|
2754
|
+
"px-3 py-1.5 rounded-md border-0 bg-transparent",
|
|
2755
|
+
m ? "text-fg" : "text-fg-secondary hover:text-fg"
|
|
2666
2756
|
].join(" ");
|
|
2667
2757
|
}
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2758
|
+
const c = Bt({ left: 0, top: 0, width: 0, height: 0, visible: !1 }), d = j(!1);
|
|
2759
|
+
function u() {
|
|
2760
|
+
const h = document.getElementById(`${o}-tab-${t.modelValue}`);
|
|
2761
|
+
if (!h) {
|
|
2762
|
+
c.visible = !1;
|
|
2763
|
+
return;
|
|
2764
|
+
}
|
|
2765
|
+
c.left = h.offsetLeft, c.top = h.offsetTop, c.width = h.offsetWidth, c.height = h.offsetHeight, c.visible = !0;
|
|
2766
|
+
}
|
|
2767
|
+
let b = null;
|
|
2768
|
+
qe(async () => {
|
|
2769
|
+
await fe(), u(), requestAnimationFrame(() => {
|
|
2770
|
+
d.value = !0;
|
|
2771
|
+
}), typeof ResizeObserver < "u" && r.value && (b = new ResizeObserver(() => u()), b.observe(r.value));
|
|
2772
|
+
}), Ke(() => {
|
|
2773
|
+
b == null || b.disconnect();
|
|
2774
|
+
}), re(
|
|
2775
|
+
[() => t.modelValue, () => t.variant, () => t.tabs],
|
|
2776
|
+
async () => {
|
|
2777
|
+
await fe(), u();
|
|
2778
|
+
},
|
|
2779
|
+
{ deep: !0 }
|
|
2780
|
+
);
|
|
2781
|
+
function f(h, m) {
|
|
2782
|
+
const v = t.tabs.filter((T) => !T.disabled), y = v.findIndex(
|
|
2783
|
+
(T) => T.key === t.tabs[m].key
|
|
2671
2784
|
);
|
|
2672
|
-
let
|
|
2673
|
-
switch (
|
|
2785
|
+
let k = -1;
|
|
2786
|
+
switch (h.key) {
|
|
2674
2787
|
case "ArrowRight":
|
|
2675
2788
|
case "ArrowDown":
|
|
2676
|
-
|
|
2789
|
+
h.preventDefault(), k = (y + 1) % v.length;
|
|
2677
2790
|
break;
|
|
2678
2791
|
case "ArrowLeft":
|
|
2679
2792
|
case "ArrowUp":
|
|
2680
|
-
|
|
2793
|
+
h.preventDefault(), k = (y - 1 + v.length) % v.length;
|
|
2681
2794
|
break;
|
|
2682
2795
|
case "Home":
|
|
2683
|
-
|
|
2796
|
+
h.preventDefault(), k = 0;
|
|
2684
2797
|
break;
|
|
2685
2798
|
case "End":
|
|
2686
|
-
|
|
2799
|
+
h.preventDefault(), k = v.length - 1;
|
|
2687
2800
|
break;
|
|
2688
2801
|
default:
|
|
2689
2802
|
return;
|
|
2690
2803
|
}
|
|
2691
|
-
const
|
|
2692
|
-
|
|
2693
|
-
const
|
|
2694
|
-
|
|
2804
|
+
const C = v[k];
|
|
2805
|
+
s("update:modelValue", C.key);
|
|
2806
|
+
const A = document.getElementById(`${o}-tab-${C.key}`);
|
|
2807
|
+
A == null || A.focus();
|
|
2695
2808
|
}
|
|
2696
|
-
return (
|
|
2697
|
-
|
|
2698
|
-
|
|
2809
|
+
return (h, m) => (g(), p("div", null, [
|
|
2810
|
+
$("div", {
|
|
2811
|
+
ref_key: "tablistRef",
|
|
2812
|
+
ref: r,
|
|
2813
|
+
class: V(a.value),
|
|
2699
2814
|
role: "tablist",
|
|
2700
2815
|
"aria-label": e.ariaLabel
|
|
2701
2816
|
}, [
|
|
2702
|
-
|
|
2703
|
-
key:
|
|
2704
|
-
|
|
2817
|
+
e.variant === "line" ? (g(), p("span", {
|
|
2818
|
+
key: 0,
|
|
2819
|
+
"aria-hidden": "true",
|
|
2820
|
+
class: V(["pointer-events-none absolute bottom-0 h-2px rounded-full bg-brand", d.value ? "transition-all duration-200 ease-out motion-reduce:transition-none" : ""]),
|
|
2821
|
+
style: _({
|
|
2822
|
+
left: `${c.left}px`,
|
|
2823
|
+
width: `${c.width}px`,
|
|
2824
|
+
opacity: c.visible ? 1 : 0
|
|
2825
|
+
})
|
|
2826
|
+
}, null, 6)) : (g(), p("span", {
|
|
2827
|
+
key: 1,
|
|
2828
|
+
"aria-hidden": "true",
|
|
2829
|
+
class: V(["pointer-events-none absolute rounded-md bg-bg shadow-default", d.value ? "transition-all duration-200 ease-out motion-reduce:transition-none" : ""]),
|
|
2830
|
+
style: _({
|
|
2831
|
+
left: `${c.left}px`,
|
|
2832
|
+
top: `${c.top}px`,
|
|
2833
|
+
width: `${c.width}px`,
|
|
2834
|
+
height: `${c.height}px`,
|
|
2835
|
+
opacity: c.visible ? 1 : 0
|
|
2836
|
+
})
|
|
2837
|
+
}, null, 6)),
|
|
2838
|
+
(g(!0), p(le, null, ie(e.tabs, (v, y) => (g(), p("button", {
|
|
2839
|
+
key: v.key,
|
|
2840
|
+
id: `${S(o)}-tab-${v.key}`,
|
|
2705
2841
|
role: "tab",
|
|
2706
2842
|
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),
|
|
2717
|
-
key:
|
|
2718
|
-
id: `${
|
|
2843
|
+
"aria-selected": e.modelValue === v.key,
|
|
2844
|
+
"aria-controls": `${S(o)}-panel-${v.key}`,
|
|
2845
|
+
tabindex: e.modelValue === v.key ? 0 : -1,
|
|
2846
|
+
disabled: v.disabled,
|
|
2847
|
+
class: V(l(v)),
|
|
2848
|
+
onClick: (k) => i(v),
|
|
2849
|
+
onKeydown: (k) => f(k, y)
|
|
2850
|
+
}, L(v.label), 43, Ks))), 128))
|
|
2851
|
+
], 10, qs),
|
|
2852
|
+
(g(!0), p(le, null, ie(e.tabs, (v) => (g(), p("div", {
|
|
2853
|
+
key: v.key,
|
|
2854
|
+
id: `${S(o)}-panel-${v.key}`,
|
|
2719
2855
|
role: "tabpanel",
|
|
2720
|
-
"aria-labelledby": `${
|
|
2721
|
-
hidden: e.modelValue !==
|
|
2856
|
+
"aria-labelledby": `${S(o)}-tab-${v.key}`,
|
|
2857
|
+
hidden: e.modelValue !== v.key,
|
|
2722
2858
|
tabindex: 0
|
|
2723
2859
|
}, [
|
|
2724
|
-
e.modelValue ===
|
|
2725
|
-
], 8,
|
|
2860
|
+
e.modelValue === v.key ? P(h.$slots, v.key, { key: 0 }) : R("", !0)
|
|
2861
|
+
], 8, Us))), 128))
|
|
2726
2862
|
]));
|
|
2727
2863
|
}
|
|
2728
|
-
}),
|
|
2864
|
+
}), Xs = { class: "w-full" }, Ys = ["for"], Gs = {
|
|
2729
2865
|
key: 0,
|
|
2730
2866
|
class: "text-error ml-1",
|
|
2731
2867
|
"aria-hidden": "true"
|
|
2732
|
-
},
|
|
2868
|
+
}, Js = { class: "relative" }, Qs = ["id", "value", "placeholder", "disabled", "readonly", "required", "rows", "maxlength", "aria-describedby", "aria-invalid"], Zs = {
|
|
2733
2869
|
key: 1,
|
|
2734
2870
|
class: "flex justify-between mt-1"
|
|
2735
|
-
},
|
|
2871
|
+
}, _s = {
|
|
2736
2872
|
key: 2,
|
|
2737
2873
|
class: "text-caption ml-auto"
|
|
2738
|
-
},
|
|
2874
|
+
}, Bo = /* @__PURE__ */ z({
|
|
2739
2875
|
__name: "DsTextarea",
|
|
2740
2876
|
props: {
|
|
2741
2877
|
modelValue: {},
|
|
@@ -2751,11 +2887,11 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2751
2887
|
maxLength: {}
|
|
2752
2888
|
},
|
|
2753
2889
|
emits: ["update:modelValue", "blur", "focus"],
|
|
2754
|
-
setup(e, { expose:
|
|
2755
|
-
const
|
|
2890
|
+
setup(e, { expose: n, emit: t }) {
|
|
2891
|
+
const s = e, o = t, r = j(null), a = oe("textarea"), i = `${a}-help`, l = `${a}-error`, c = w(() => {
|
|
2756
2892
|
const m = [];
|
|
2757
|
-
return
|
|
2758
|
-
}), d = w(() => (
|
|
2893
|
+
return s.helpText && !s.error && m.push(i), s.error && m.push(l), m.length > 0 ? m.join(" ") : void 0;
|
|
2894
|
+
}), d = w(() => (s.modelValue || "").length), u = w(() => {
|
|
2759
2895
|
const m = [
|
|
2760
2896
|
"block",
|
|
2761
2897
|
"w-full",
|
|
@@ -2775,38 +2911,38 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2775
2911
|
"disabled:bg-surface-disabled",
|
|
2776
2912
|
"disabled:text-fg-disabled",
|
|
2777
2913
|
"box-border"
|
|
2778
|
-
],
|
|
2914
|
+
], v = {
|
|
2779
2915
|
small: "px-2 py-1 text-sm",
|
|
2780
2916
|
medium: "px-3 py-2 text-base",
|
|
2781
2917
|
large: "px-4 py-3 text-lg"
|
|
2782
|
-
},
|
|
2783
|
-
return [...m,
|
|
2918
|
+
}, y = s.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-focus-ring"];
|
|
2919
|
+
return [...m, v[s.size], ...y].join(" ");
|
|
2784
2920
|
}), b = (m) => {
|
|
2785
|
-
const
|
|
2786
|
-
|
|
2921
|
+
const v = m.target;
|
|
2922
|
+
o("update:modelValue", v.value);
|
|
2787
2923
|
};
|
|
2788
2924
|
function f() {
|
|
2789
2925
|
var m;
|
|
2790
2926
|
(m = r.value) == null || m.focus();
|
|
2791
2927
|
}
|
|
2792
|
-
function
|
|
2928
|
+
function h() {
|
|
2793
2929
|
var m;
|
|
2794
2930
|
(m = r.value) == null || m.blur();
|
|
2795
2931
|
}
|
|
2796
|
-
return
|
|
2797
|
-
e.label ? (g(),
|
|
2932
|
+
return n({ focus: f, blur: h, textareaRef: r }), (m, v) => (g(), p("div", Xs, [
|
|
2933
|
+
e.label ? (g(), p("label", {
|
|
2798
2934
|
key: 0,
|
|
2799
|
-
for:
|
|
2935
|
+
for: S(a),
|
|
2800
2936
|
class: "block text-label mb-1"
|
|
2801
2937
|
}, [
|
|
2802
|
-
|
|
2803
|
-
e.required ? (g(),
|
|
2804
|
-
], 8,
|
|
2805
|
-
|
|
2806
|
-
|
|
2938
|
+
K(L(e.label) + " ", 1),
|
|
2939
|
+
e.required ? (g(), p("span", Gs, "*")) : R("", !0)
|
|
2940
|
+
], 8, Ys)) : R("", !0),
|
|
2941
|
+
$("div", Js, [
|
|
2942
|
+
$("textarea", {
|
|
2807
2943
|
ref_key: "textareaRef",
|
|
2808
2944
|
ref: r,
|
|
2809
|
-
id:
|
|
2945
|
+
id: S(a),
|
|
2810
2946
|
value: e.modelValue,
|
|
2811
2947
|
placeholder: e.placeholder,
|
|
2812
2948
|
disabled: e.disabled,
|
|
@@ -2814,66 +2950,66 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2814
2950
|
required: e.required,
|
|
2815
2951
|
rows: e.rows,
|
|
2816
2952
|
maxlength: e.maxLength,
|
|
2817
|
-
"aria-describedby":
|
|
2953
|
+
"aria-describedby": c.value,
|
|
2818
2954
|
"aria-invalid": e.error ? "true" : void 0,
|
|
2819
|
-
class:
|
|
2955
|
+
class: V(u.value),
|
|
2820
2956
|
onInput: b,
|
|
2821
|
-
onBlur:
|
|
2822
|
-
onFocus:
|
|
2823
|
-
}, null, 42,
|
|
2957
|
+
onBlur: v[0] || (v[0] = (y) => m.$emit("blur", y)),
|
|
2958
|
+
onFocus: v[1] || (v[1] = (y) => m.$emit("focus", y))
|
|
2959
|
+
}, null, 42, Qs)
|
|
2824
2960
|
]),
|
|
2825
|
-
e.helpText || e.error || e.maxLength ? (g(),
|
|
2826
|
-
e.helpText && !e.error ? (g(),
|
|
2961
|
+
e.helpText || e.error || e.maxLength ? (g(), p("div", Zs, [
|
|
2962
|
+
e.helpText && !e.error ? (g(), p("div", {
|
|
2827
2963
|
key: 0,
|
|
2828
|
-
id:
|
|
2964
|
+
id: i,
|
|
2829
2965
|
class: "text-caption"
|
|
2830
|
-
},
|
|
2831
|
-
e.error ? (g(),
|
|
2966
|
+
}, L(e.helpText), 1)) : R("", !0),
|
|
2967
|
+
e.error ? (g(), p("div", {
|
|
2832
2968
|
key: 1,
|
|
2833
|
-
id:
|
|
2969
|
+
id: l,
|
|
2834
2970
|
class: "text-sm text-error font-sans",
|
|
2835
2971
|
role: "alert",
|
|
2836
2972
|
"aria-live": "polite"
|
|
2837
|
-
},
|
|
2838
|
-
e.maxLength ? (g(),
|
|
2839
|
-
])) :
|
|
2973
|
+
}, L(e.error), 1)) : R("", !0),
|
|
2974
|
+
e.maxLength ? (g(), p("div", _s, L(d.value) + " / " + L(e.maxLength), 1)) : R("", !0)
|
|
2975
|
+
])) : R("", !0)
|
|
2840
2976
|
]));
|
|
2841
2977
|
}
|
|
2842
|
-
}),
|
|
2978
|
+
}), 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" }, So = /* @__PURE__ */ z({
|
|
2843
2979
|
__name: "DsUnderConstruction",
|
|
2844
2980
|
props: {
|
|
2845
2981
|
title: { default: "Under Construction" },
|
|
2846
2982
|
description: { default: "This page is under construction. Please check back later." }
|
|
2847
2983
|
},
|
|
2848
2984
|
setup(e) {
|
|
2849
|
-
return (
|
|
2850
|
-
te(
|
|
2851
|
-
|
|
2852
|
-
|
|
2985
|
+
return (n, t) => (g(), p("div", eo, [
|
|
2986
|
+
te(S($t), { class: "w-10 h-10 text-fg-secondary" }),
|
|
2987
|
+
$("h2", to, L(e.title), 1),
|
|
2988
|
+
$("p", no, L(e.description), 1)
|
|
2853
2989
|
]));
|
|
2854
2990
|
}
|
|
2855
|
-
}),
|
|
2991
|
+
}), so = ["role", "aria-live"], oo = { class: "flex items-start gap-3 flex-1 min-w-0" }, ao = { class: "flex-1 min-w-0" }, ro = {
|
|
2856
2992
|
key: 0,
|
|
2857
2993
|
class: "text-label m-0"
|
|
2858
|
-
},
|
|
2994
|
+
}, lo = /* @__PURE__ */ z({
|
|
2859
2995
|
__name: "DsToast",
|
|
2860
2996
|
props: {
|
|
2861
2997
|
toast: {}
|
|
2862
2998
|
},
|
|
2863
2999
|
emits: ["dismiss"],
|
|
2864
|
-
setup(e, { emit:
|
|
2865
|
-
const
|
|
2866
|
-
let
|
|
2867
|
-
function
|
|
2868
|
-
r <= 0 || (a = Date.now(),
|
|
2869
|
-
|
|
3000
|
+
setup(e, { emit: n }) {
|
|
3001
|
+
const t = e, s = n;
|
|
3002
|
+
let o = null, r = t.toast.duration, a = 0;
|
|
3003
|
+
function i() {
|
|
3004
|
+
r <= 0 || (a = Date.now(), o = setTimeout(() => {
|
|
3005
|
+
s("dismiss", t.toast.id);
|
|
2870
3006
|
}, r));
|
|
2871
3007
|
}
|
|
2872
|
-
function
|
|
2873
|
-
|
|
3008
|
+
function l() {
|
|
3009
|
+
o && (clearTimeout(o), o = null, r -= Date.now() - a);
|
|
2874
3010
|
}
|
|
2875
|
-
function
|
|
2876
|
-
|
|
3011
|
+
function c() {
|
|
3012
|
+
i();
|
|
2877
3013
|
}
|
|
2878
3014
|
const d = {
|
|
2879
3015
|
brand: "border-l-brand",
|
|
@@ -2881,104 +3017,104 @@ const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-s
|
|
|
2881
3017
|
success: "border-l-success",
|
|
2882
3018
|
warning: "border-l-warning",
|
|
2883
3019
|
info: "border-l-info"
|
|
2884
|
-
},
|
|
3020
|
+
}, u = w(() => [
|
|
2885
3021
|
"flex items-start gap-3 w-80 p-4 bg-bg border border-solid border-border rounded-lg shadow-lg",
|
|
2886
3022
|
"border-l-4",
|
|
2887
|
-
d[
|
|
3023
|
+
d[t.toast.variant] || "border-l-brand"
|
|
2888
3024
|
].join(" ")), b = {
|
|
2889
3025
|
brand: "text-brand",
|
|
2890
3026
|
error: "text-error",
|
|
2891
3027
|
success: "text-success",
|
|
2892
3028
|
warning: "text-warning",
|
|
2893
3029
|
info: "text-info"
|
|
2894
|
-
}, f = w(() => ["shrink-0 mt-0.5", b[
|
|
2895
|
-
return
|
|
2896
|
-
|
|
2897
|
-
}),
|
|
2898
|
-
|
|
2899
|
-
}), (
|
|
2900
|
-
class:
|
|
3030
|
+
}, f = w(() => ["shrink-0 mt-0.5", b[t.toast.variant] || "text-brand"].join(" "));
|
|
3031
|
+
return qe(() => {
|
|
3032
|
+
t.toast.duration > 0 && i();
|
|
3033
|
+
}), Ke(() => {
|
|
3034
|
+
o && clearTimeout(o);
|
|
3035
|
+
}), (h, m) => (g(), p("div", {
|
|
3036
|
+
class: V(u.value),
|
|
2901
3037
|
role: e.toast.variant === "error" ? "alert" : "status",
|
|
2902
3038
|
"aria-live": e.toast.variant === "error" ? "assertive" : "polite",
|
|
2903
|
-
onMouseenter:
|
|
2904
|
-
onMouseleave:
|
|
3039
|
+
onMouseenter: l,
|
|
3040
|
+
onMouseleave: c
|
|
2905
3041
|
}, [
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
class:
|
|
3042
|
+
$("div", oo, [
|
|
3043
|
+
$("span", {
|
|
3044
|
+
class: V(f.value),
|
|
2909
3045
|
"aria-hidden": "true"
|
|
2910
3046
|
}, [
|
|
2911
|
-
e.toast.variant === "success" ? (g(), N(
|
|
3047
|
+
e.toast.variant === "success" ? (g(), N(S(jn), {
|
|
2912
3048
|
key: 0,
|
|
2913
3049
|
class: "w-5 h-5"
|
|
2914
|
-
})) : e.toast.variant === "error" ? (g(), N(
|
|
3050
|
+
})) : e.toast.variant === "error" ? (g(), N(S(Be), {
|
|
2915
3051
|
key: 1,
|
|
2916
3052
|
class: "w-5 h-5"
|
|
2917
|
-
})) : e.toast.variant === "warning" ? (g(), N(
|
|
3053
|
+
})) : e.toast.variant === "warning" ? (g(), N(S($t), {
|
|
2918
3054
|
key: 2,
|
|
2919
3055
|
class: "w-5 h-5"
|
|
2920
|
-
})) : (g(), N(
|
|
3056
|
+
})) : (g(), N(S(In), {
|
|
2921
3057
|
key: 3,
|
|
2922
3058
|
class: "w-5 h-5"
|
|
2923
3059
|
}))
|
|
2924
3060
|
], 2),
|
|
2925
|
-
|
|
2926
|
-
e.toast.title ? (g(),
|
|
2927
|
-
|
|
2928
|
-
class:
|
|
2929
|
-
},
|
|
3061
|
+
$("div", ao, [
|
|
3062
|
+
e.toast.title ? (g(), p("p", ro, L(e.toast.title), 1)) : R("", !0),
|
|
3063
|
+
$("p", {
|
|
3064
|
+
class: V(["text-body-sm m-0", e.toast.title ? "mt-0.5" : ""])
|
|
3065
|
+
}, L(e.toast.message), 3)
|
|
2930
3066
|
])
|
|
2931
3067
|
]),
|
|
2932
|
-
e.toast.closable ? (g(),
|
|
3068
|
+
e.toast.closable ? (g(), p("button", {
|
|
2933
3069
|
key: 0,
|
|
2934
3070
|
type: "button",
|
|
2935
3071
|
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
3072
|
"aria-label": "Dismiss notification",
|
|
2937
|
-
onClick: m[0] || (m[0] = (
|
|
3073
|
+
onClick: m[0] || (m[0] = (v) => h.$emit("dismiss", e.toast.id))
|
|
2938
3074
|
}, [
|
|
2939
|
-
te(
|
|
2940
|
-
])) :
|
|
2941
|
-
], 42,
|
|
3075
|
+
te(S(Be), { class: "w-4 h-4" })
|
|
3076
|
+
])) : R("", !0)
|
|
3077
|
+
], 42, so));
|
|
2942
3078
|
}
|
|
2943
3079
|
});
|
|
2944
|
-
let
|
|
2945
|
-
const
|
|
2946
|
-
function ke(e,
|
|
2947
|
-
const
|
|
2948
|
-
id:
|
|
3080
|
+
let io = 0;
|
|
3081
|
+
const Se = j([]);
|
|
3082
|
+
function ke(e, n, t) {
|
|
3083
|
+
const s = ++io, o = {
|
|
3084
|
+
id: s,
|
|
2949
3085
|
variant: e,
|
|
2950
|
-
message:
|
|
2951
|
-
title:
|
|
2952
|
-
duration: (
|
|
2953
|
-
closable: (
|
|
3086
|
+
message: n,
|
|
3087
|
+
title: t == null ? void 0 : t.title,
|
|
3088
|
+
duration: (t == null ? void 0 : t.duration) ?? 5e3,
|
|
3089
|
+
closable: (t == null ? void 0 : t.closable) ?? !0
|
|
2954
3090
|
};
|
|
2955
|
-
return
|
|
3091
|
+
return Se.value.push(o), s;
|
|
2956
3092
|
}
|
|
2957
|
-
function
|
|
2958
|
-
const
|
|
2959
|
-
|
|
3093
|
+
function co(e) {
|
|
3094
|
+
const n = Se.value.findIndex((t) => t.id === e);
|
|
3095
|
+
n !== -1 && Se.value.splice(n, 1);
|
|
2960
3096
|
}
|
|
2961
|
-
function
|
|
3097
|
+
function uo() {
|
|
2962
3098
|
return {
|
|
2963
|
-
toasts:
|
|
2964
|
-
removeToast:
|
|
2965
|
-
success: (e,
|
|
2966
|
-
error: (e,
|
|
2967
|
-
warning: (e,
|
|
2968
|
-
info: (e,
|
|
2969
|
-
brand: (e,
|
|
3099
|
+
toasts: Se,
|
|
3100
|
+
removeToast: co,
|
|
3101
|
+
success: (e, n) => ke("success", e, n),
|
|
3102
|
+
error: (e, n) => ke("error", e, n),
|
|
3103
|
+
warning: (e, n) => ke("warning", e, n),
|
|
3104
|
+
info: (e, n) => ke("info", e, n),
|
|
3105
|
+
brand: (e, n) => ke("brand", e, n)
|
|
2970
3106
|
};
|
|
2971
3107
|
}
|
|
2972
|
-
const
|
|
3108
|
+
const fo = {
|
|
2973
3109
|
class: "fixed top-4 right-4 z-toast flex flex-col gap-3",
|
|
2974
3110
|
"aria-label": "Notifications"
|
|
2975
|
-
},
|
|
3111
|
+
}, Ao = /* @__PURE__ */ z({
|
|
2976
3112
|
__name: "DsToastContainer",
|
|
2977
3113
|
setup(e) {
|
|
2978
|
-
const { toasts:
|
|
2979
|
-
return (
|
|
2980
|
-
|
|
2981
|
-
te(
|
|
3114
|
+
const { toasts: n, removeToast: t } = uo();
|
|
3115
|
+
return (s, o) => (g(), N(Oe, { to: "body" }, [
|
|
3116
|
+
$("div", fo, [
|
|
3117
|
+
te(St, {
|
|
2982
3118
|
"enter-active-class": "transition-all duration-slow ease-out",
|
|
2983
3119
|
"enter-from-class": "opacity-0 translate-x-8",
|
|
2984
3120
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -2986,11 +3122,11 @@ const fs = {
|
|
|
2986
3122
|
"leave-from-class": "opacity-100 translate-x-0",
|
|
2987
3123
|
"leave-to-class": "opacity-0 translate-x-8"
|
|
2988
3124
|
}, {
|
|
2989
|
-
default:
|
|
2990
|
-
(g(!0),
|
|
3125
|
+
default: Ae(() => [
|
|
3126
|
+
(g(!0), p(le, null, ie(S(n), (r) => (g(), N(lo, {
|
|
2991
3127
|
key: r.id,
|
|
2992
3128
|
toast: r,
|
|
2993
|
-
onDismiss:
|
|
3129
|
+
onDismiss: S(t)
|
|
2994
3130
|
}, null, 8, ["toast", "onDismiss"]))), 128))
|
|
2995
3131
|
]),
|
|
2996
3132
|
_: 1
|
|
@@ -2998,7 +3134,7 @@ const fs = {
|
|
|
2998
3134
|
])
|
|
2999
3135
|
]));
|
|
3000
3136
|
}
|
|
3001
|
-
}),
|
|
3137
|
+
}), bo = ["aria-describedby"], mo = ["id"], Oo = /* @__PURE__ */ z({
|
|
3002
3138
|
__name: "DsTooltip",
|
|
3003
3139
|
props: {
|
|
3004
3140
|
content: {},
|
|
@@ -3006,41 +3142,41 @@ const fs = {
|
|
|
3006
3142
|
disabled: { type: Boolean, default: !1 }
|
|
3007
3143
|
},
|
|
3008
3144
|
setup(e) {
|
|
3009
|
-
const
|
|
3010
|
-
placement: w(() =>
|
|
3011
|
-
middleware: [
|
|
3145
|
+
const n = e, t = oe("tooltip"), s = j(!1), o = j(null), r = j(null), a = j(null), { floatingStyles: i, middlewareData: l, placement: c } = kt(o, r, {
|
|
3146
|
+
placement: w(() => n.placement),
|
|
3147
|
+
middleware: [pt(8), xt(), yt({ padding: 8 }), Mn({ element: a })]
|
|
3012
3148
|
}), d = w(() => {
|
|
3013
|
-
const f =
|
|
3149
|
+
const f = l.value.arrow;
|
|
3014
3150
|
if (!f) return {};
|
|
3015
|
-
const
|
|
3151
|
+
const h = c.value.split("-")[0], m = { top: "bottom", right: "left", bottom: "top", left: "right" }[h];
|
|
3016
3152
|
return {
|
|
3017
3153
|
left: f.x != null ? `${f.x}px` : "",
|
|
3018
3154
|
top: f.y != null ? `${f.y}px` : "",
|
|
3019
3155
|
[m]: "-4px"
|
|
3020
3156
|
};
|
|
3021
3157
|
});
|
|
3022
|
-
function
|
|
3023
|
-
|
|
3158
|
+
function u() {
|
|
3159
|
+
n.disabled || (s.value = !0);
|
|
3024
3160
|
}
|
|
3025
3161
|
function b() {
|
|
3026
|
-
|
|
3162
|
+
s.value = !1;
|
|
3027
3163
|
}
|
|
3028
|
-
return (f,
|
|
3164
|
+
return (f, h) => (g(), p("div", {
|
|
3029
3165
|
class: "inline-flex",
|
|
3030
|
-
onMouseenter:
|
|
3166
|
+
onMouseenter: u,
|
|
3031
3167
|
onMouseleave: b,
|
|
3032
|
-
onFocusin:
|
|
3168
|
+
onFocusin: u,
|
|
3033
3169
|
onFocusout: b
|
|
3034
3170
|
}, [
|
|
3035
|
-
|
|
3171
|
+
$("div", {
|
|
3036
3172
|
ref_key: "referenceRef",
|
|
3037
|
-
ref:
|
|
3038
|
-
"aria-describedby":
|
|
3173
|
+
ref: o,
|
|
3174
|
+
"aria-describedby": s.value ? S(t) : void 0
|
|
3039
3175
|
}, [
|
|
3040
|
-
|
|
3041
|
-
], 8,
|
|
3042
|
-
(g(), N(
|
|
3043
|
-
te(
|
|
3176
|
+
P(f.$slots, "default")
|
|
3177
|
+
], 8, bo),
|
|
3178
|
+
(g(), N(Oe, { to: "body" }, [
|
|
3179
|
+
te(lt, {
|
|
3044
3180
|
"enter-active-class": "transition-opacity duration-fast",
|
|
3045
3181
|
"enter-from-class": "opacity-0",
|
|
3046
3182
|
"enter-to-class": "opacity-100",
|
|
@@ -3048,297 +3184,65 @@ const fs = {
|
|
|
3048
3184
|
"leave-from-class": "opacity-100",
|
|
3049
3185
|
"leave-to-class": "opacity-0"
|
|
3050
3186
|
}, {
|
|
3051
|
-
default:
|
|
3052
|
-
|
|
3187
|
+
default: Ae(() => [
|
|
3188
|
+
s.value && !e.disabled ? (g(), p("div", {
|
|
3053
3189
|
key: 0,
|
|
3054
|
-
id:
|
|
3190
|
+
id: S(t),
|
|
3055
3191
|
ref_key: "floatingRef",
|
|
3056
3192
|
ref: r,
|
|
3057
3193
|
role: "tooltip",
|
|
3058
|
-
style:
|
|
3194
|
+
style: _(S(i)),
|
|
3059
3195
|
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
3196
|
}, [
|
|
3061
|
-
|
|
3062
|
-
|
|
3197
|
+
K(L(e.content) + " ", 1),
|
|
3198
|
+
$("div", {
|
|
3063
3199
|
ref_key: "arrowRef",
|
|
3064
3200
|
ref: a,
|
|
3065
|
-
style:
|
|
3201
|
+
style: _(d.value),
|
|
3066
3202
|
class: "absolute w-2 h-2 bg-bg-inverse rotate-45"
|
|
3067
3203
|
}, null, 4)
|
|
3068
|
-
], 12,
|
|
3204
|
+
], 12, mo)) : R("", !0)
|
|
3069
3205
|
]),
|
|
3070
3206
|
_: 1
|
|
3071
3207
|
})
|
|
3072
3208
|
]))
|
|
3073
3209
|
], 32));
|
|
3074
3210
|
}
|
|
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
|
-
}
|
|
3211
|
+
});
|
|
3309
3212
|
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
|
-
|
|
3213
|
+
ho as DsAvatar,
|
|
3214
|
+
vo as DsBadge,
|
|
3215
|
+
it as DsButton,
|
|
3216
|
+
po as DsCard,
|
|
3217
|
+
yo as DsCheckbox,
|
|
3218
|
+
xo as DsDropdownSelect,
|
|
3219
|
+
wo as DsExpandableCard,
|
|
3220
|
+
ko as DsInput,
|
|
3221
|
+
as as DsLoadingSpinner,
|
|
3222
|
+
$o as DsModal,
|
|
3223
|
+
Co as DsRadio,
|
|
3224
|
+
Do as DsSelect,
|
|
3225
|
+
To as DsSlider,
|
|
3226
|
+
Vo as DsSwitch,
|
|
3227
|
+
Ro as DsTable,
|
|
3228
|
+
Lo as DsTabs,
|
|
3229
|
+
Bo as DsTextarea,
|
|
3230
|
+
lo as DsToast,
|
|
3231
|
+
Ao as DsToastContainer,
|
|
3232
|
+
Oo as DsTooltip,
|
|
3233
|
+
So as DsUnderConstruction,
|
|
3234
|
+
Mo as allTokens,
|
|
3235
|
+
jo as colorTokens,
|
|
3236
|
+
Po as expandBases,
|
|
3237
|
+
Io as generateFullTheme,
|
|
3238
|
+
Fo as generatePalette,
|
|
3239
|
+
No as generateThemeCss,
|
|
3240
|
+
Wo as hexToHSL,
|
|
3241
|
+
Ho as hslToHex,
|
|
3242
|
+
qo as radiusTokens,
|
|
3243
|
+
Ko as shadowTokens,
|
|
3244
|
+
Uo as spacingTokens,
|
|
3245
|
+
Xo as tokenToCssVar,
|
|
3246
|
+
oe as useId,
|
|
3247
|
+
uo as useToast
|
|
3344
3248
|
};
|