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