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