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