@speckle/ui-components 2.17.16 → 2.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/form/Checkbox.vue.d.ts +1 -1
- package/dist/components/form/Radio.vue.d.ts +1 -1
- package/dist/components/form/select/Base.vue.d.ts +3 -3
- package/dist/components/layout/DialogSection.vue.d.ts +9 -0
- package/dist/lib.cjs +1 -1
- package/dist/lib.cjs.map +1 -1
- package/dist/lib.js +1060 -1043
- package/dist/lib.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/lib.js
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var se = (e, t, r) => (
|
|
4
|
-
import { defineComponent as P, resolveDynamicComponent as
|
|
5
|
-
import { isObjectLike as je, clamp as lt, isArray as
|
|
6
|
-
import { ArrowPathIcon as ct, ExclamationCircleIcon as
|
|
7
|
-
import { CheckCircleIcon as
|
|
8
|
-
import { XMarkIcon as ye, CheckIcon as pt, CheckCircleIcon as mt, ExclamationCircleIcon as Ve, EnvelopeIcon as
|
|
9
|
-
import { wait as
|
|
1
|
+
var Bt = Object.defineProperty;
|
|
2
|
+
var Vt = (e, t, r) => t in e ? Bt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var se = (e, t, r) => (Vt(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
+
import { defineComponent as P, resolveDynamicComponent as Q, computed as c, openBlock as a, createBlock as L, normalizeClass as b, withCtx as M, createCommentVNode as I, renderSlot as D, createTextVNode as R, createElementBlock as m, createElementVNode as p, createVNode as z, Transition as Ee, unref as l, toDisplayString as V, toRefs as le, Fragment as K, renderList as G, ref as O, onMounted as ae, onBeforeUnmount as Ue, normalizeStyle as ne, mergeProps as ie, withDirectives as be, isRef as Be, vModelText as qe, useSlots as We, vModelDynamic as zt, pushScopeId as Ot, popScopeId as Lt, watch as fe, Teleport as Mt, withModifiers as pe, useModel as it, toHandlers as st, nextTick as At, getCurrentInstance as _t, inject as Pt, withKeys as ve, mergeModels as nt, defineAsyncComponent as jt } from "vue";
|
|
5
|
+
import { isObjectLike as je, clamp as lt, isArray as N, isString as Se, isUndefined as ge, debounce as He, throttle as ut, noop as Tt, uniq as Ft, intersection as Rt, difference as Dt } from "lodash";
|
|
6
|
+
import { ArrowPathIcon as ct, ExclamationCircleIcon as Et, ChevronUpIcon as dt, ChevronDownIcon as Ut, XMarkIcon as Ke, MagnifyingGlassIcon as qt, CheckIcon as ft, Squares2X2Icon as Wt, Bars3Icon as Ht, UserCircleIcon as Kt } from "@heroicons/vue/24/solid";
|
|
7
|
+
import { CheckCircleIcon as Gt, XCircleIcon as Xt, ExclamationCircleIcon as Zt, InformationCircleIcon as Nt, ClipboardDocumentCheckIcon as Qt, ClipboardDocumentIcon as Jt, XMarkIcon as Yt, ChevronDownIcon as es, CheckIcon as ts, ExclamationTriangleIcon as ss } from "@heroicons/vue/24/outline";
|
|
8
|
+
import { XMarkIcon as ye, CheckIcon as pt, CheckCircleIcon as mt, ExclamationCircleIcon as Ve, EnvelopeIcon as ns, KeyIcon as ls, XCircleIcon as as, InformationCircleIcon as os } from "@heroicons/vue/20/solid";
|
|
9
|
+
import { wait as rs, isNullOrUndefined as is, SourceApps as us, getClientOperatingSystem as cs, OperatingSystem as Te, md5 as ds } from "@speckle/shared";
|
|
10
10
|
import { useField as Ie } from "vee-validate";
|
|
11
11
|
import { nanoid as ze } from "nanoid";
|
|
12
|
-
import { useResizeObserver as
|
|
13
|
-
import { Listbox as
|
|
12
|
+
import { useResizeObserver as fs, useMutationObserver as ps, useMounted as ms, useElementBounding as hs, useIntersectionObserver as vs, useClipboard as gs, onKeyDown as bs, isClient as Ge, computedAsync as ys, useFocus as xs, useDropZone as ks } from "@vueuse/core";
|
|
13
|
+
import { Listbox as ws, ListboxLabel as Cs, ListboxButton as $s, ListboxOptions as Is, ListboxOption as Ss, Switch as Bs, TransitionRoot as ht, Dialog as Vs, TransitionChild as at, DialogPanel as zs, Disclosure as Os, DisclosureButton as Ls, DisclosurePanel as Ms, Menu as As, MenuButton as _s, MenuItems as Ps, MenuItem as js, Combobox as Ts, ComboboxOptions as Fs, ComboboxOption as Rs } from "@headlessui/vue";
|
|
14
14
|
import { directive as vt } from "vue-tippy";
|
|
15
|
-
import
|
|
16
|
-
const
|
|
17
|
-
key: 2,
|
|
18
|
-
style: { margin: "0 !important", width: "0.01px" }
|
|
19
|
-
}, Rs = /* @__PURE__ */ P({
|
|
15
|
+
import Ds from "v3-infinite-loading";
|
|
16
|
+
const Es = /* @__PURE__ */ P({
|
|
20
17
|
__name: "Button",
|
|
21
18
|
props: {
|
|
22
19
|
/**
|
|
@@ -144,10 +141,10 @@ const Fs = {
|
|
|
144
141
|
},
|
|
145
142
|
emits: ["click"],
|
|
146
143
|
setup(e, { emit: t }) {
|
|
147
|
-
const r = t, s = e, o =
|
|
144
|
+
const r = t, s = e, o = Q("NuxtLink"), n = Q("RouterLink"), d = c(() => s.linkComponent ? s.linkComponent : s.external ? "a" : je(o) ? o : je(n) ? n : "a"), h = c(() => {
|
|
148
145
|
if (!s.to)
|
|
149
146
|
return s.submit ? "submit" : "button";
|
|
150
|
-
}), i = c(() => s.disabled || s.loading),
|
|
147
|
+
}), i = c(() => s.disabled || s.loading), f = c(() => s.loading ? ct : s.iconLeft), x = c(() => {
|
|
151
148
|
const w = [];
|
|
152
149
|
if (w.push("border-2"), i.value)
|
|
153
150
|
w.push(
|
|
@@ -300,7 +297,7 @@ const Fs = {
|
|
|
300
297
|
case "base":
|
|
301
298
|
return "px-3";
|
|
302
299
|
}
|
|
303
|
-
}),
|
|
300
|
+
}), k = c(() => {
|
|
304
301
|
const w = [];
|
|
305
302
|
return s.fullWidth && w.push("w-full"), i.value && w.push("cursor-not-allowed"), w.join(" ");
|
|
306
303
|
}), $ = c(() => {
|
|
@@ -311,11 +308,11 @@ const Fs = {
|
|
|
311
308
|
}), B = c(() => {
|
|
312
309
|
const w = s.link || s.text;
|
|
313
310
|
return [
|
|
314
|
-
"transition inline-flex justify-center text-center items-center
|
|
315
|
-
|
|
311
|
+
"transition inline-flex justify-center text-center items-center outline-none select-none leading-[0.9rem]",
|
|
312
|
+
k.value,
|
|
316
313
|
u.value,
|
|
317
314
|
y.value,
|
|
318
|
-
w ? "" :
|
|
315
|
+
w ? "" : x.value,
|
|
319
316
|
w ? "" : v.value,
|
|
320
317
|
w ? "" : g.value,
|
|
321
318
|
s.link ? "" : S.value,
|
|
@@ -342,33 +339,33 @@ const Fs = {
|
|
|
342
339
|
break;
|
|
343
340
|
}
|
|
344
341
|
return w.join(" ");
|
|
345
|
-
}),
|
|
342
|
+
}), A = (w) => {
|
|
346
343
|
if (i.value) {
|
|
347
344
|
w.preventDefault(), w.stopPropagation(), w.stopImmediatePropagation();
|
|
348
345
|
return;
|
|
349
346
|
}
|
|
350
347
|
r("click", w);
|
|
351
348
|
};
|
|
352
|
-
return (w, U) => (a(),
|
|
349
|
+
return (w, U) => (a(), L(Q(e.to ? d.value : "button"), {
|
|
353
350
|
href: e.to,
|
|
354
351
|
to: e.to,
|
|
355
|
-
type:
|
|
352
|
+
type: h.value,
|
|
356
353
|
external: e.external,
|
|
357
354
|
class: b(B.value),
|
|
358
355
|
disabled: i.value,
|
|
359
356
|
role: "button",
|
|
360
|
-
onClick:
|
|
357
|
+
onClick: A
|
|
361
358
|
}, {
|
|
362
|
-
default:
|
|
363
|
-
|
|
359
|
+
default: M(() => [
|
|
360
|
+
f.value ? (a(), L(Q(f.value), {
|
|
364
361
|
key: 0,
|
|
365
362
|
class: b(`${T.value} ${e.hideText ? "" : "mr-2"}`)
|
|
366
363
|
}, null, 8, ["class"])) : I("", !0),
|
|
367
|
-
e.hideText ? (
|
|
364
|
+
e.hideText ? I("", !0) : D(w.$slots, "default", { key: 1 }, () => [
|
|
368
365
|
R("Button")
|
|
369
366
|
], !0),
|
|
370
|
-
e.iconRight || !e.loading ? (a(),
|
|
371
|
-
key:
|
|
367
|
+
e.iconRight || !e.loading ? (a(), L(Q(e.iconRight), {
|
|
368
|
+
key: 2,
|
|
372
369
|
class: b(`${T.value} ${e.hideText ? "" : "ml-2"}`)
|
|
373
370
|
}, null, 8, ["class"])) : I("", !0)
|
|
374
371
|
]),
|
|
@@ -381,7 +378,7 @@ const Oe = (e, t) => {
|
|
|
381
378
|
for (const [s, o] of t)
|
|
382
379
|
r[s] = o;
|
|
383
380
|
return r;
|
|
384
|
-
}, oe = /* @__PURE__ */ Oe(
|
|
381
|
+
}, oe = /* @__PURE__ */ Oe(Es, [["__scopeId", "data-v-8c1638d3"]]), Us = /* @__PURE__ */ P({
|
|
385
382
|
__name: "Link",
|
|
386
383
|
props: {
|
|
387
384
|
to: {
|
|
@@ -431,14 +428,14 @@ const Oe = (e, t) => {
|
|
|
431
428
|
},
|
|
432
429
|
emits: ["click"],
|
|
433
430
|
setup(e, { emit: t }) {
|
|
434
|
-
const r = t, s = e, o = (
|
|
431
|
+
const r = t, s = e, o = (n) => {
|
|
435
432
|
if (s.disabled) {
|
|
436
|
-
|
|
433
|
+
n.preventDefault(), n.stopPropagation(), n.stopImmediatePropagation();
|
|
437
434
|
return;
|
|
438
435
|
}
|
|
439
|
-
r("click",
|
|
436
|
+
r("click", n);
|
|
440
437
|
};
|
|
441
|
-
return (
|
|
438
|
+
return (n, d) => (a(), L(oe, {
|
|
442
439
|
link: "",
|
|
443
440
|
to: e.to,
|
|
444
441
|
external: e.external,
|
|
@@ -451,8 +448,8 @@ const Oe = (e, t) => {
|
|
|
451
448
|
role: "link",
|
|
452
449
|
onClickCapture: o
|
|
453
450
|
}, {
|
|
454
|
-
default:
|
|
455
|
-
D(
|
|
451
|
+
default: M(() => [
|
|
452
|
+
D(n.$slots, "default", {}, () => [
|
|
456
453
|
R("Link")
|
|
457
454
|
])
|
|
458
455
|
]),
|
|
@@ -461,22 +458,22 @@ const Oe = (e, t) => {
|
|
|
461
458
|
}
|
|
462
459
|
});
|
|
463
460
|
var we = /* @__PURE__ */ ((e) => (e[e.Success = 0] = "Success", e[e.Warning = 1] = "Warning", e[e.Danger = 2] = "Danger", e[e.Info = 3] = "Info", e))(we || {});
|
|
464
|
-
const
|
|
461
|
+
const qs = {
|
|
465
462
|
"aria-live": "assertive",
|
|
466
463
|
class: "pointer-events-none fixed inset-0 flex items-end px-4 py-6 mt-10 sm:items-start sm:p-6 z-50"
|
|
467
|
-
},
|
|
464
|
+
}, Ws = { class: "flex w-full flex-col items-center space-y-4 sm:items-end" }, Hs = {
|
|
468
465
|
key: 0,
|
|
469
466
|
class: "pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg bg-foundation text-foreground shadow-lg ring-1 ring-primary-muted ring-opacity-5"
|
|
470
|
-
},
|
|
467
|
+
}, Ks = { class: "p-4" }, Gs = { class: "flex items-start" }, Xs = { class: "flex-shrink-0" }, Zs = { class: "ml-2 w-0 flex-1 flex flex-col" }, Ns = {
|
|
471
468
|
key: 0,
|
|
472
469
|
class: "text-foreground font-bold"
|
|
473
|
-
},
|
|
470
|
+
}, Qs = {
|
|
474
471
|
key: 1,
|
|
475
472
|
class: "label label--light text-foreground-2"
|
|
476
|
-
},
|
|
473
|
+
}, Js = {
|
|
477
474
|
key: 2,
|
|
478
475
|
class: "flex justify-start mt-2"
|
|
479
|
-
},
|
|
476
|
+
}, Ys = /* @__PURE__ */ p("span", { class: "sr-only" }, "Close", -1), Io = /* @__PURE__ */ P({
|
|
480
477
|
__name: "ToastRenderer",
|
|
481
478
|
props: {
|
|
482
479
|
notification: null
|
|
@@ -485,17 +482,17 @@ const Es = {
|
|
|
485
482
|
setup(e, { emit: t }) {
|
|
486
483
|
const r = t, s = e, o = c(
|
|
487
484
|
() => {
|
|
488
|
-
var
|
|
489
|
-
return !((
|
|
485
|
+
var h, i;
|
|
486
|
+
return !((h = s.notification) != null && h.description) && !((i = s.notification) != null && i.cta);
|
|
490
487
|
}
|
|
491
|
-
),
|
|
488
|
+
), n = () => {
|
|
492
489
|
r("update:notification", null);
|
|
493
|
-
}, d = (
|
|
494
|
-
var i,
|
|
495
|
-
(
|
|
490
|
+
}, d = (h) => {
|
|
491
|
+
var i, f, x;
|
|
492
|
+
(x = (f = (i = s.notification) == null ? void 0 : i.cta) == null ? void 0 : f.onClick) == null || x.call(f, h), n();
|
|
496
493
|
};
|
|
497
|
-
return (
|
|
498
|
-
|
|
494
|
+
return (h, i) => (a(), m("div", qs, [
|
|
495
|
+
p("div", Ws, [
|
|
499
496
|
z(Ee, {
|
|
500
497
|
"enter-active-class": "transform ease-out duration-300 transition",
|
|
501
498
|
"enter-from-class": "translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",
|
|
@@ -504,56 +501,56 @@ const Es = {
|
|
|
504
501
|
"leave-from-class": "opacity-100",
|
|
505
502
|
"leave-to-class": "opacity-0"
|
|
506
503
|
}, {
|
|
507
|
-
default:
|
|
508
|
-
e.notification ? (a(),
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
e.notification.type ===
|
|
504
|
+
default: M(() => [
|
|
505
|
+
e.notification ? (a(), m("div", Hs, [
|
|
506
|
+
p("div", Ks, [
|
|
507
|
+
p("div", Gs, [
|
|
508
|
+
p("div", Xs, [
|
|
509
|
+
e.notification.type === l(we).Success ? (a(), L(l(Gt), {
|
|
513
510
|
key: 0,
|
|
514
511
|
class: "h-6 w-6 text-success",
|
|
515
512
|
"aria-hidden": "true"
|
|
516
|
-
})) : e.notification.type ===
|
|
513
|
+
})) : e.notification.type === l(we).Danger ? (a(), L(l(Xt), {
|
|
517
514
|
key: 1,
|
|
518
515
|
class: "h-6 w-6 text-danger",
|
|
519
516
|
"aria-hidden": "true"
|
|
520
|
-
})) : e.notification.type ===
|
|
517
|
+
})) : e.notification.type === l(we).Warning ? (a(), L(l(Zt), {
|
|
521
518
|
key: 2,
|
|
522
519
|
class: "h-6 w-6 text-warning",
|
|
523
520
|
"aria-hidden": "true"
|
|
524
|
-
})) : e.notification.type ===
|
|
521
|
+
})) : e.notification.type === l(we).Info ? (a(), L(l(Nt), {
|
|
525
522
|
key: 3,
|
|
526
523
|
class: "h-6 w-6 text-info",
|
|
527
524
|
"aria-hidden": "true"
|
|
528
525
|
})) : I("", !0)
|
|
529
526
|
]),
|
|
530
|
-
|
|
531
|
-
e.notification.title ? (a(),
|
|
532
|
-
e.notification.description ? (a(),
|
|
533
|
-
e.notification.cta ? (a(),
|
|
534
|
-
z(
|
|
527
|
+
p("div", Zs, [
|
|
528
|
+
e.notification.title ? (a(), m("p", Ns, V(e.notification.title), 1)) : I("", !0),
|
|
529
|
+
e.notification.description ? (a(), m("p", Qs, V(e.notification.description), 1)) : I("", !0),
|
|
530
|
+
e.notification.cta ? (a(), m("div", Js, [
|
|
531
|
+
z(Us, {
|
|
535
532
|
to: e.notification.cta.url,
|
|
536
533
|
class: "label",
|
|
537
534
|
primary: "",
|
|
538
535
|
onClick: d
|
|
539
536
|
}, {
|
|
540
|
-
default:
|
|
537
|
+
default: M(() => [
|
|
541
538
|
R(V(e.notification.cta.title), 1)
|
|
542
539
|
]),
|
|
543
540
|
_: 1
|
|
544
541
|
}, 8, ["to"])
|
|
545
542
|
])) : I("", !0)
|
|
546
543
|
]),
|
|
547
|
-
|
|
544
|
+
p("div", {
|
|
548
545
|
class: b(["ml-4 flex flex-shrink-0", { "self-center": o.value }])
|
|
549
546
|
}, [
|
|
550
|
-
|
|
547
|
+
p("button", {
|
|
551
548
|
type: "button",
|
|
552
549
|
class: "inline-flex rounded-md bg-foundation text-foreground-2 hover:text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",
|
|
553
|
-
onClick:
|
|
550
|
+
onClick: n
|
|
554
551
|
}, [
|
|
555
|
-
|
|
556
|
-
z(
|
|
552
|
+
Ys,
|
|
553
|
+
z(l(ye), {
|
|
557
554
|
class: "h-6 w-6",
|
|
558
555
|
"aria-hidden": "true"
|
|
559
556
|
})
|
|
@@ -568,18 +565,18 @@ const Es = {
|
|
|
568
565
|
])
|
|
569
566
|
]));
|
|
570
567
|
}
|
|
571
|
-
}),
|
|
572
|
-
function
|
|
568
|
+
}), en = "Enter";
|
|
569
|
+
function gt(e) {
|
|
573
570
|
return (t) => {
|
|
574
|
-
t.code ===
|
|
571
|
+
t.code === en && e(t);
|
|
575
572
|
};
|
|
576
573
|
}
|
|
577
|
-
const
|
|
574
|
+
const tn = /* @__PURE__ */ p("circle", {
|
|
578
575
|
cx: "4",
|
|
579
576
|
cy: "4",
|
|
580
577
|
r: "3"
|
|
581
|
-
}, null, -1),
|
|
582
|
-
|
|
578
|
+
}, null, -1), sn = [
|
|
579
|
+
tn
|
|
583
580
|
], Xe = /* @__PURE__ */ P({
|
|
584
581
|
__name: "Badge",
|
|
585
582
|
props: {
|
|
@@ -595,116 +592,116 @@ const en = /* @__PURE__ */ f("circle", {
|
|
|
595
592
|
setup(e, { emit: t }) {
|
|
596
593
|
const r = t, s = e, o = c(
|
|
597
594
|
() => s.colorClasses || "bg-blue-100 text-blue-800"
|
|
598
|
-
),
|
|
595
|
+
), n = c(
|
|
599
596
|
() => s.dotIconColorClasses || "text-blue-400"
|
|
600
597
|
), d = c(() => {
|
|
601
|
-
const
|
|
598
|
+
const x = [
|
|
602
599
|
"inline-flex items-center",
|
|
603
600
|
o.value,
|
|
604
601
|
s.size === "lg" ? "px-3 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
|
|
605
602
|
];
|
|
606
|
-
return s.rounded ? (
|
|
603
|
+
return s.rounded ? (x.push("rounded"), x.push(
|
|
607
604
|
s.size === "lg" ? "px-2 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
|
|
608
|
-
)) : (
|
|
605
|
+
)) : (x.push("rounded-full"), x.push(
|
|
609
606
|
s.size === "lg" ? "px-2.5 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
|
|
610
|
-
)),
|
|
611
|
-
}),
|
|
612
|
-
const
|
|
607
|
+
)), x.join(" ");
|
|
608
|
+
}), h = c(() => {
|
|
609
|
+
const x = [
|
|
613
610
|
"mt-0.5 ml-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full focus:outline-none"
|
|
614
611
|
];
|
|
615
|
-
return s.clickableIcon ?
|
|
612
|
+
return s.clickableIcon ? x.push("cursor-pointer") : x.push("cursor-default"), x.join(" ");
|
|
616
613
|
}), i = c(() => [
|
|
617
614
|
"-ml-0.5 mr-1.5 h-2 w-2",
|
|
618
|
-
|
|
619
|
-
].join(" ")),
|
|
615
|
+
n.value
|
|
616
|
+
].join(" ")), f = (x) => {
|
|
620
617
|
if (!s.clickableIcon) {
|
|
621
|
-
|
|
618
|
+
x.stopPropagation(), x.stopImmediatePropagation(), x.preventDefault();
|
|
622
619
|
return;
|
|
623
620
|
}
|
|
624
|
-
r("click-icon",
|
|
621
|
+
r("click-icon", x);
|
|
625
622
|
};
|
|
626
|
-
return (
|
|
623
|
+
return (x, y) => (a(), m("span", {
|
|
627
624
|
class: b(d.value)
|
|
628
625
|
}, [
|
|
629
|
-
e.dot ? (a(),
|
|
626
|
+
e.dot ? (a(), m("svg", {
|
|
630
627
|
key: 0,
|
|
631
628
|
class: b(i.value),
|
|
632
629
|
fill: "currentColor",
|
|
633
630
|
viewBox: "0 0 8 8"
|
|
634
|
-
},
|
|
635
|
-
D(
|
|
631
|
+
}, sn, 2)) : I("", !0),
|
|
632
|
+
D(x.$slots, "default", {}, () => [
|
|
636
633
|
R("Badge")
|
|
637
634
|
]),
|
|
638
|
-
e.iconLeft ? (a(),
|
|
635
|
+
e.iconLeft ? (a(), m("button", {
|
|
639
636
|
key: 1,
|
|
640
|
-
class: b(
|
|
641
|
-
onClick: y[0] || (y[0] = (v) =>
|
|
637
|
+
class: b(h.value),
|
|
638
|
+
onClick: y[0] || (y[0] = (v) => f(v))
|
|
642
639
|
}, [
|
|
643
|
-
(a(),
|
|
644
|
-
class: b(["h-4 w-4",
|
|
640
|
+
(a(), L(Q(e.iconLeft), {
|
|
641
|
+
class: b(["h-4 w-4", n.value])
|
|
645
642
|
}, null, 8, ["class"]))
|
|
646
643
|
], 2)) : I("", !0)
|
|
647
644
|
], 2));
|
|
648
645
|
}
|
|
649
646
|
});
|
|
650
647
|
let ot = [];
|
|
651
|
-
function
|
|
648
|
+
function nn(e) {
|
|
652
649
|
ot = ot ? e : e.slice();
|
|
653
650
|
}
|
|
654
651
|
var Ce = /* @__PURE__ */ ((e) => (e[e.sm = 640] = "sm", e[e.md = 746] = "md", e[e.lg = 1024] = "lg", e[e.xl = 1280] = "xl", e[e["2xl"] = 1536] = "2xl", e))(Ce || {});
|
|
655
|
-
function
|
|
652
|
+
function bt(e) {
|
|
656
653
|
const {
|
|
657
654
|
props: {
|
|
658
655
|
modelValue: t,
|
|
659
656
|
steps: r,
|
|
660
657
|
orientation: s,
|
|
661
658
|
goVerticalBelow: o,
|
|
662
|
-
nonInteractive:
|
|
659
|
+
nonInteractive: n,
|
|
663
660
|
stepsPadding: d
|
|
664
661
|
},
|
|
665
|
-
emit:
|
|
662
|
+
emit: h
|
|
666
663
|
} = e, i = c(
|
|
667
664
|
() => (s == null ? void 0 : s.value) === "vertical" ? "vertical" : "horizontal"
|
|
668
|
-
),
|
|
665
|
+
), f = c({
|
|
669
666
|
get: () => lt((t == null ? void 0 : t.value) || 0, -1, r.value.length),
|
|
670
|
-
set: (
|
|
671
|
-
}),
|
|
667
|
+
set: (k) => h("update:modelValue", lt(k, 0, r.value.length))
|
|
668
|
+
}), x = (k) => `${k + 1}`, y = (k) => k === f.value, v = (k) => k < f.value, g = (k, $) => {
|
|
672
669
|
var T;
|
|
673
|
-
if (
|
|
670
|
+
if (n != null && n.value) {
|
|
674
671
|
$ == null || $.preventDefault(), $ == null || $.stopPropagation(), $ == null || $.stopImmediatePropagation();
|
|
675
672
|
return;
|
|
676
673
|
}
|
|
677
|
-
|
|
678
|
-
const B = r.value[
|
|
674
|
+
f.value = k;
|
|
675
|
+
const B = r.value[f.value];
|
|
679
676
|
(T = B == null ? void 0 : B.onClick) == null || T.call(B);
|
|
680
677
|
}, u = c(() => {
|
|
681
|
-
const
|
|
678
|
+
const k = ["flex"];
|
|
682
679
|
let $, B;
|
|
683
|
-
return (d == null ? void 0 : d.value) === "xs" ? ($ = "space-x-2", B = "space-y-1") : (d == null ? void 0 : d.value) === "sm" ? ($ = "space-x-4", B = "space-y-1") : ($ = "space-x-8", B = "space-y-4"),
|
|
680
|
+
return (d == null ? void 0 : d.value) === "xs" ? ($ = "space-x-2", B = "space-y-1") : (d == null ? void 0 : d.value) === "sm" ? ($ = "space-x-4", B = "space-y-1") : ($ = "space-x-8", B = "space-y-4"), k.push("flex"), i.value === "vertical" || o != null && o.value ? (k.push(`flex-col ${B} justify-center`), (o == null ? void 0 : o.value) === Ce.sm ? k.push(
|
|
684
681
|
`sm:flex-row sm:space-y-0 sm:justify-start sm:${$} sm:items-center`
|
|
685
|
-
) : (o == null ? void 0 : o.value) === Ce.md ?
|
|
682
|
+
) : (o == null ? void 0 : o.value) === Ce.md ? k.push(
|
|
686
683
|
`md:flex-row md:space-y-0 md:justify-start md:${$} md:items-center`
|
|
687
|
-
) : (o == null ? void 0 : o.value) === Ce.lg ?
|
|
684
|
+
) : (o == null ? void 0 : o.value) === Ce.lg ? k.push(
|
|
688
685
|
`lg:flex-row lg:space-y-0 lg:justify-start lg:${$} lg:items-center`
|
|
689
|
-
) : (o == null ? void 0 : o.value) === Ce.xl &&
|
|
686
|
+
) : (o == null ? void 0 : o.value) === Ce.xl && k.push(
|
|
690
687
|
`xl:flex-row xl:space-y-0 xl:justify-start xl:${$} xl:items-center`
|
|
691
|
-
)) :
|
|
688
|
+
)) : k.push(`flex-row ${$} items-center`), k.join(" ");
|
|
692
689
|
}), S = c(() => {
|
|
693
|
-
const
|
|
694
|
-
return
|
|
690
|
+
const k = ["flex items-center"];
|
|
691
|
+
return n != null && n.value || k.push("cursor-pointer"), k.join(" ");
|
|
695
692
|
});
|
|
696
693
|
return {
|
|
697
|
-
value:
|
|
694
|
+
value: f,
|
|
698
695
|
isCurrentStep: y,
|
|
699
696
|
isFinishedStep: v,
|
|
700
697
|
switchStep: g,
|
|
701
|
-
getStepDisplayValue:
|
|
698
|
+
getStepDisplayValue: x,
|
|
702
699
|
listClasses: u,
|
|
703
700
|
linkClasses: S,
|
|
704
701
|
orientation: i
|
|
705
702
|
};
|
|
706
703
|
}
|
|
707
|
-
|
|
704
|
+
nn([
|
|
708
705
|
"sm:space-x-8",
|
|
709
706
|
"md:space-x-8",
|
|
710
707
|
"lg:space-x-8",
|
|
@@ -718,13 +715,13 @@ sn([
|
|
|
718
715
|
"lg:space-x-4",
|
|
719
716
|
"xl:space-x-4"
|
|
720
717
|
]);
|
|
721
|
-
const
|
|
718
|
+
const ln = ["aria-label"], an = ["href", "onClick"], on = { class: "flex space-x-3 items-center text-primary-focus normal font-medium leading-5" }, rn = { class: "shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center" }, un = { class: "flex flex-col" }, cn = {
|
|
722
719
|
key: 0,
|
|
723
720
|
class: "label label--light text-foreground"
|
|
724
|
-
},
|
|
721
|
+
}, dn = ["href", "onClick"], fn = { class: "flex space-x-3 items-center text-primary-focus normal font-medium leading-5" }, pn = { class: "shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center" }, mn = { class: "flex flex-col" }, hn = {
|
|
725
722
|
key: 0,
|
|
726
723
|
class: "label label--light text-foreground"
|
|
727
|
-
},
|
|
724
|
+
}, vn = ["href", "onClick"], gn = { class: "flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5" }, bn = { class: "shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center" }, yn = { class: "flex flex-col" }, xn = {
|
|
728
725
|
key: 0,
|
|
729
726
|
class: "label label--light"
|
|
730
727
|
}, So = /* @__PURE__ */ P({
|
|
@@ -742,88 +739,88 @@ const nn = ["aria-label"], ln = ["href", "onClick"], an = { class: "flex space-x
|
|
|
742
739
|
setup(e, { emit: t }) {
|
|
743
740
|
const r = t, s = e, {
|
|
744
741
|
isCurrentStep: o,
|
|
745
|
-
isFinishedStep:
|
|
742
|
+
isFinishedStep: n,
|
|
746
743
|
switchStep: d,
|
|
747
|
-
getStepDisplayValue:
|
|
744
|
+
getStepDisplayValue: h,
|
|
748
745
|
listClasses: i,
|
|
749
|
-
linkClasses:
|
|
750
|
-
} =
|
|
746
|
+
linkClasses: f
|
|
747
|
+
} = bt({
|
|
751
748
|
props: le(s),
|
|
752
749
|
emit: r
|
|
753
750
|
});
|
|
754
|
-
return (
|
|
751
|
+
return (x, y) => (a(), m("nav", {
|
|
755
752
|
class: "flex justify-center",
|
|
756
753
|
"aria-label": e.ariaLabel || "Progress steps"
|
|
757
754
|
}, [
|
|
758
|
-
|
|
759
|
-
class: b(
|
|
755
|
+
p("ol", {
|
|
756
|
+
class: b(l(i))
|
|
760
757
|
}, [
|
|
761
|
-
(a(!0),
|
|
758
|
+
(a(!0), m(K, null, G(e.steps, (v, g) => (a(), m("li", {
|
|
762
759
|
key: v.name
|
|
763
760
|
}, [
|
|
764
|
-
n
|
|
761
|
+
l(n)(g) ? (a(), m("a", {
|
|
765
762
|
key: 0,
|
|
766
763
|
href: v.href,
|
|
767
|
-
class: b(
|
|
768
|
-
onClick: (u) =>
|
|
764
|
+
class: b(l(f)),
|
|
765
|
+
onClick: (u) => l(d)(g, u)
|
|
769
766
|
}, [
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
z(
|
|
767
|
+
p("div", on, [
|
|
768
|
+
p("div", rn, [
|
|
769
|
+
z(l(pt), { class: "w-5 h-5" })
|
|
773
770
|
]),
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
v.description ? (a(),
|
|
771
|
+
p("div", un, [
|
|
772
|
+
p("div", null, V(v.name), 1),
|
|
773
|
+
v.description ? (a(), m("div", cn, V(v.description), 1)) : I("", !0)
|
|
777
774
|
])
|
|
778
775
|
])
|
|
779
|
-
], 10,
|
|
776
|
+
], 10, an)) : l(o)(g) ? (a(), m("a", {
|
|
780
777
|
key: 1,
|
|
781
778
|
href: v.href,
|
|
782
|
-
class: b(
|
|
779
|
+
class: b(l(f)),
|
|
783
780
|
"aria-current": "step",
|
|
784
|
-
onClick: (u) =>
|
|
781
|
+
onClick: (u) => l(d)(g, u)
|
|
785
782
|
}, [
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
v.description ? (a(),
|
|
783
|
+
p("div", fn, [
|
|
784
|
+
p("div", pn, V(l(h)(g)), 1),
|
|
785
|
+
p("div", mn, [
|
|
786
|
+
p("div", null, V(v.name), 1),
|
|
787
|
+
v.description ? (a(), m("div", hn, V(v.description), 1)) : I("", !0)
|
|
791
788
|
])
|
|
792
789
|
])
|
|
793
|
-
], 10,
|
|
790
|
+
], 10, dn)) : (a(), m("a", {
|
|
794
791
|
key: 2,
|
|
795
792
|
href: v.href,
|
|
796
|
-
class: b(
|
|
797
|
-
onClick: (u) =>
|
|
793
|
+
class: b(l(f)),
|
|
794
|
+
onClick: (u) => l(d)(g, u)
|
|
798
795
|
}, [
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
v.description ? (a(),
|
|
796
|
+
p("div", gn, [
|
|
797
|
+
p("div", bn, V(l(h)(g)), 1),
|
|
798
|
+
p("div", yn, [
|
|
799
|
+
p("div", null, V(v.name), 1),
|
|
800
|
+
v.description ? (a(), m("div", xn, V(v.description), 1)) : I("", !0)
|
|
804
801
|
])
|
|
805
802
|
])
|
|
806
|
-
], 10,
|
|
803
|
+
], 10, vn))
|
|
807
804
|
]))), 128))
|
|
808
805
|
], 2)
|
|
809
|
-
], 8,
|
|
806
|
+
], 8, ln));
|
|
810
807
|
}
|
|
811
|
-
}),
|
|
808
|
+
}), kn = ["aria-label"], wn = ["href", "onClick"], Cn = { class: "relative flex h-5 w-5 flex-shrink-0 items-center justify-center" }, $n = {
|
|
812
809
|
key: 0,
|
|
813
810
|
class: "h-3 w-3 rounded-full bg-foreground-2"
|
|
814
|
-
},
|
|
811
|
+
}, In = ["href", "onClick"], Sn = {
|
|
815
812
|
class: "relative flex h-5 w-5 flex-shrink-0 items-center justify-center",
|
|
816
813
|
"aria-hidden": "true"
|
|
817
|
-
},
|
|
814
|
+
}, Bn = {
|
|
818
815
|
key: 0,
|
|
819
816
|
class: "h-3 w-3 rounded-full bg-foreground"
|
|
820
|
-
},
|
|
817
|
+
}, Vn = /* @__PURE__ */ p("span", { class: "absolute h-4 w-4 rounded-full bg-outline-2" }, null, -1), zn = /* @__PURE__ */ p("span", { class: "relative block h-2 w-2 rounded-full bg-primary-focus" }, null, -1), On = ["href", "onClick"], Ln = {
|
|
821
818
|
class: "relative flex h-5 w-5 flex-shrink-0 items-center justify-center",
|
|
822
819
|
"aria-hidden": "true"
|
|
823
|
-
},
|
|
820
|
+
}, Mn = {
|
|
824
821
|
key: 0,
|
|
825
822
|
class: "h-3 w-3 rounded-full bg-foreground-2"
|
|
826
|
-
},
|
|
823
|
+
}, An = {
|
|
827
824
|
key: 1,
|
|
828
825
|
class: "h-4 w-4 rounded-full bg-foreground-disabled"
|
|
829
826
|
}, Bo = /* @__PURE__ */ P({
|
|
@@ -840,77 +837,77 @@ const nn = ["aria-label"], ln = ["href", "onClick"], an = { class: "flex space-x
|
|
|
840
837
|
},
|
|
841
838
|
emits: ["update:modelValue"],
|
|
842
839
|
setup(e, { emit: t }) {
|
|
843
|
-
const r = t, s = e, { isCurrentStep: o, isFinishedStep:
|
|
840
|
+
const r = t, s = e, { isCurrentStep: o, isFinishedStep: n, switchStep: d, listClasses: h, linkClasses: i } = bt({
|
|
844
841
|
props: le(s),
|
|
845
842
|
emit: r
|
|
846
|
-
}),
|
|
843
|
+
}), f = c(() => {
|
|
847
844
|
const y = ["h6 font-medium leading-7"];
|
|
848
845
|
let v;
|
|
849
846
|
return s.stepsPadding === "xs" ? v = "ml-1" : s.stepsPadding === "sm" ? v = "ml-2" : v = "ml-3", y.push(v), s.basic && y.push("sr-only"), y.join(" ");
|
|
850
|
-
}),
|
|
847
|
+
}), x = c(() => {
|
|
851
848
|
const y = [];
|
|
852
849
|
return s.basic && y.push("basic"), y.join(" ");
|
|
853
850
|
});
|
|
854
|
-
return (y, v) => (a(),
|
|
851
|
+
return (y, v) => (a(), m("nav", {
|
|
855
852
|
class: "flex justify-center",
|
|
856
853
|
"aria-label": e.ariaLabel || "Progress steps"
|
|
857
854
|
}, [
|
|
858
|
-
|
|
859
|
-
class: b([
|
|
855
|
+
p("ol", {
|
|
856
|
+
class: b([l(h), x.value])
|
|
860
857
|
}, [
|
|
861
|
-
(a(!0),
|
|
858
|
+
(a(!0), m(K, null, G(e.steps, (g, u) => (a(), m("li", {
|
|
862
859
|
key: g.name
|
|
863
860
|
}, [
|
|
864
|
-
n
|
|
861
|
+
l(n)(u) ? (a(), m("a", {
|
|
865
862
|
key: 0,
|
|
866
863
|
href: g.href,
|
|
867
|
-
class: b(
|
|
868
|
-
onClick: (S) =>
|
|
864
|
+
class: b(l(i)),
|
|
865
|
+
onClick: (S) => l(d)(u, S)
|
|
869
866
|
}, [
|
|
870
|
-
|
|
871
|
-
e.basic ? (a(),
|
|
867
|
+
p("span", Cn, [
|
|
868
|
+
e.basic ? (a(), m("span", $n)) : (a(), L(l(mt), {
|
|
872
869
|
key: 1,
|
|
873
870
|
class: "h-full w-full text-primary",
|
|
874
871
|
"aria-hidden": "true"
|
|
875
872
|
}))
|
|
876
873
|
]),
|
|
877
|
-
|
|
878
|
-
class: b(["text-foreground",
|
|
874
|
+
p("span", {
|
|
875
|
+
class: b(["text-foreground", f.value])
|
|
879
876
|
}, V(g.name), 3)
|
|
880
|
-
], 10,
|
|
877
|
+
], 10, wn)) : l(o)(u) ? (a(), m("a", {
|
|
881
878
|
key: 1,
|
|
882
879
|
href: g.href,
|
|
883
|
-
class: b(
|
|
880
|
+
class: b(l(i)),
|
|
884
881
|
"aria-current": "step",
|
|
885
|
-
onClick: (S) =>
|
|
882
|
+
onClick: (S) => l(d)(u, S)
|
|
886
883
|
}, [
|
|
887
|
-
|
|
888
|
-
e.basic ? (a(),
|
|
889
|
-
|
|
890
|
-
|
|
884
|
+
p("span", Sn, [
|
|
885
|
+
e.basic ? (a(), m("span", Bn)) : (a(), m(K, { key: 1 }, [
|
|
886
|
+
Vn,
|
|
887
|
+
zn
|
|
891
888
|
], 64))
|
|
892
889
|
]),
|
|
893
|
-
|
|
894
|
-
class: b(["text-primary-focus",
|
|
890
|
+
p("span", {
|
|
891
|
+
class: b(["text-primary-focus", f.value])
|
|
895
892
|
}, V(g.name), 3)
|
|
896
|
-
], 10,
|
|
893
|
+
], 10, In)) : (a(), m("a", {
|
|
897
894
|
key: 2,
|
|
898
895
|
href: g.href,
|
|
899
|
-
class: b(
|
|
900
|
-
onClick: (S) =>
|
|
896
|
+
class: b(l(i)),
|
|
897
|
+
onClick: (S) => l(d)(u, S)
|
|
901
898
|
}, [
|
|
902
|
-
|
|
903
|
-
e.basic ? (a(),
|
|
899
|
+
p("div", Ln, [
|
|
900
|
+
e.basic ? (a(), m("span", Mn)) : (a(), m("div", An))
|
|
904
901
|
]),
|
|
905
|
-
|
|
906
|
-
class: b(["text-foreground-disabled",
|
|
902
|
+
p("p", {
|
|
903
|
+
class: b(["text-foreground-disabled", f.value])
|
|
907
904
|
}, V(g.name), 3)
|
|
908
|
-
], 10,
|
|
905
|
+
], 10, On))
|
|
909
906
|
]))), 128))
|
|
910
907
|
], 2)
|
|
911
|
-
], 8,
|
|
908
|
+
], 8, kn));
|
|
912
909
|
}
|
|
913
|
-
}), _n = {},
|
|
910
|
+
}), _n = {}, Pn = {
|
|
914
911
|
xmlns: "http://www.w3.org/2000/svg",
|
|
915
912
|
class: "icon icon-tabler icon-tabler-pointer",
|
|
916
913
|
width: "44",
|
|
@@ -921,34 +918,34 @@ const nn = ["aria-label"], ln = ["href", "onClick"], an = { class: "flex space-x
|
|
|
921
918
|
fill: "rgba(255,255,255,0.8)",
|
|
922
919
|
"stroke-linecap": "round",
|
|
923
920
|
"stroke-linejoin": "round"
|
|
924
|
-
},
|
|
921
|
+
}, jn = /* @__PURE__ */ p("path", {
|
|
925
922
|
stroke: "none",
|
|
926
923
|
d: "M0 0h24v24H0z",
|
|
927
924
|
fill: "none"
|
|
928
|
-
}, null, -1),
|
|
929
|
-
|
|
930
|
-
|
|
925
|
+
}, null, -1), Tn = /* @__PURE__ */ p("path", { d: "M7.904 17.563a1.2 1.2 0 0 0 2.228 .308l2.09 -3.093l4.907 4.907a1.067 1.067 0 0 0 1.509 0l1.047 -1.047a1.067 1.067 0 0 0 0 -1.509l-4.907 -4.907l3.113 -2.09a1.2 1.2 0 0 0 -.309 -2.228l-13.582 -3.904l3.904 13.563z" }, null, -1), Fn = [
|
|
926
|
+
jn,
|
|
927
|
+
Tn
|
|
931
928
|
];
|
|
932
|
-
function
|
|
933
|
-
return a(),
|
|
929
|
+
function Rn(e, t) {
|
|
930
|
+
return a(), m("svg", Pn, Fn);
|
|
934
931
|
}
|
|
935
|
-
const
|
|
932
|
+
const Dn = /* @__PURE__ */ Oe(_n, [["render", Rn]]), En = {}, Un = {
|
|
936
933
|
viewBox: "0 0 18 17",
|
|
937
934
|
fill: "none",
|
|
938
935
|
xmlns: "http://www.w3.org/2000/svg"
|
|
939
|
-
},
|
|
936
|
+
}, qn = /* @__PURE__ */ p("path", {
|
|
940
937
|
d: "M9 1.25V3.5M14.834 3.666L13.243 5.257M17.25 9.5H15M4.757 13.743L3.167 15.333M3 9.5H0.75M4.757 5.257L3.167 3.667",
|
|
941
938
|
stroke: "currentColor",
|
|
942
939
|
"stroke-width": "1",
|
|
943
940
|
"stroke-linecap": "round",
|
|
944
941
|
"stroke-linejoin": "round"
|
|
945
|
-
}, null, -1),
|
|
946
|
-
|
|
942
|
+
}, null, -1), Wn = [
|
|
943
|
+
qn
|
|
947
944
|
];
|
|
948
|
-
function
|
|
949
|
-
return a(),
|
|
945
|
+
function Hn(e, t) {
|
|
946
|
+
return a(), m("svg", Un, Wn);
|
|
950
947
|
}
|
|
951
|
-
const
|
|
948
|
+
const Kn = /* @__PURE__ */ Oe(En, [["render", Hn]]), Gn = { class: "relative aspect-square w-full h-full max-w-[250px] mx-auto mb-8 border-t border-r border-outline-3 select-none" }, Xn = { class: "w-full h-full overflow-hidden" }, Vo = /* @__PURE__ */ P({
|
|
952
949
|
__name: "Instructional",
|
|
953
950
|
props: {
|
|
954
951
|
actions: Array,
|
|
@@ -958,18 +955,18 @@ const Hn = /* @__PURE__ */ Oe(Dn, [["render", Wn]]), Kn = { class: "relative asp
|
|
|
958
955
|
slotsConfig: Array
|
|
959
956
|
},
|
|
960
957
|
setup(e) {
|
|
961
|
-
const t = e, r =
|
|
958
|
+
const t = e, r = O(!0), s = O({ ...t.initialPosition }), o = O(!1), n = O(500), d = O(!0), h = O(t.slotsConfig || []);
|
|
962
959
|
async function i(y) {
|
|
963
|
-
await
|
|
960
|
+
await rs(y.duration);
|
|
964
961
|
}
|
|
965
|
-
function
|
|
966
|
-
const v =
|
|
962
|
+
function f(y) {
|
|
963
|
+
const v = h.value.find((g) => g.name === y.slot);
|
|
967
964
|
v && (v.visible = !v.visible);
|
|
968
965
|
}
|
|
969
|
-
function
|
|
966
|
+
function x(y) {
|
|
970
967
|
switch (y.type) {
|
|
971
968
|
case "animation":
|
|
972
|
-
s.value = { top: y.top, left: y.left },
|
|
969
|
+
s.value = { top: y.top, left: y.left }, n.value = y.duration;
|
|
973
970
|
break;
|
|
974
971
|
case "click":
|
|
975
972
|
o.value = !0, setTimeout(() => o.value = !1, 500);
|
|
@@ -977,7 +974,7 @@ const Hn = /* @__PURE__ */ Oe(Dn, [["render", Wn]]), Kn = { class: "relative asp
|
|
|
977
974
|
case "delay":
|
|
978
975
|
return i(y);
|
|
979
976
|
case "slot":
|
|
980
|
-
|
|
977
|
+
f(y);
|
|
981
978
|
break;
|
|
982
979
|
}
|
|
983
980
|
}
|
|
@@ -986,30 +983,30 @@ const Hn = /* @__PURE__ */ Oe(Dn, [["render", Wn]]), Kn = { class: "relative asp
|
|
|
986
983
|
for (; r.value; ) {
|
|
987
984
|
await i({ type: "delay", duration: 800 }), d.value = !0;
|
|
988
985
|
for (const v of t.actions || [])
|
|
989
|
-
await
|
|
986
|
+
await x(v);
|
|
990
987
|
d.value = !1, s.value = { ...t.initialPosition }, await i({ type: "delay", duration: 200 });
|
|
991
988
|
}
|
|
992
989
|
})();
|
|
993
990
|
}), Ue(() => {
|
|
994
991
|
r.value = !1;
|
|
995
|
-
}), (y, v) => (a(),
|
|
996
|
-
|
|
992
|
+
}), (y, v) => (a(), m("div", Gn, [
|
|
993
|
+
p("div", {
|
|
997
994
|
class: "absolute z-50 text-foreground dark:text-foundation",
|
|
998
995
|
style: ne({
|
|
999
996
|
transitionProperty: "all",
|
|
1000
997
|
top: s.value.top + "%",
|
|
1001
998
|
left: s.value.left + "%",
|
|
1002
|
-
transitionDuration:
|
|
999
|
+
transitionDuration: n.value + "ms"
|
|
1003
1000
|
})
|
|
1004
1001
|
}, [
|
|
1005
|
-
z(
|
|
1002
|
+
z(Kn, {
|
|
1006
1003
|
class: b(["absolute -top-5 -left-4 h-12 w-12 -rotate-12 text-foreground", [{ hidden: !o.value }]])
|
|
1007
1004
|
}, null, 8, ["class"]),
|
|
1008
|
-
z(
|
|
1005
|
+
z(Dn, { class: "absolute inset-0 h-11 w-11" })
|
|
1009
1006
|
], 4),
|
|
1010
|
-
|
|
1007
|
+
p("div", Xn, [
|
|
1011
1008
|
D(y.$slots, "background"),
|
|
1012
|
-
(a(!0),
|
|
1009
|
+
(a(!0), m(K, null, G(h.value, (g) => (a(), m(K, {
|
|
1013
1010
|
key: g.name
|
|
1014
1011
|
}, [
|
|
1015
1012
|
g.visible ? D(y.$slots, g.name, { key: 0 }) : I("", !0)
|
|
@@ -1017,7 +1014,7 @@ const Hn = /* @__PURE__ */ Oe(Dn, [["render", Wn]]), Kn = { class: "relative asp
|
|
|
1017
1014
|
])
|
|
1018
1015
|
]));
|
|
1019
1016
|
}
|
|
1020
|
-
}),
|
|
1017
|
+
}), Zn = ["disabled"], zo = /* @__PURE__ */ P({
|
|
1021
1018
|
__name: "CardButton",
|
|
1022
1019
|
props: {
|
|
1023
1020
|
disabled: { type: Boolean },
|
|
@@ -1033,30 +1030,30 @@ const Hn = /* @__PURE__ */ Oe(Dn, [["render", Wn]]), Kn = { class: "relative asp
|
|
|
1033
1030
|
return s.disabled ? d.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed") : (d.push(
|
|
1034
1031
|
s.modelValue ? "bg-primary-focus text-foreground-on-primary" : "bg-foundation text-foreground"
|
|
1035
1032
|
), d.push("ring-outline-2 hover:ring-4")), d.join(" ");
|
|
1036
|
-
}),
|
|
1033
|
+
}), n = (d) => {
|
|
1037
1034
|
if (s.disabled) {
|
|
1038
1035
|
d.preventDefault(), d.stopPropagation(), d.stopImmediatePropagation();
|
|
1039
1036
|
return;
|
|
1040
1037
|
}
|
|
1041
1038
|
r("update:modelValue", !s.modelValue), r("click", d);
|
|
1042
1039
|
};
|
|
1043
|
-
return (d,
|
|
1040
|
+
return (d, h) => (a(), m("button", {
|
|
1044
1041
|
class: b(o.value),
|
|
1045
1042
|
disabled: e.disabled,
|
|
1046
|
-
onClick:
|
|
1043
|
+
onClick: n
|
|
1047
1044
|
}, [
|
|
1048
1045
|
D(d.$slots, "default", {}, () => [
|
|
1049
1046
|
R("Text")
|
|
1050
1047
|
])
|
|
1051
|
-
], 10,
|
|
1048
|
+
], 10, Zn));
|
|
1052
1049
|
}
|
|
1053
|
-
}),
|
|
1050
|
+
}), Nn = { class: "relative flex items-start" }, Qn = { class: "flex h-6 items-center" }, Jn = ["id", "checked", "aria-describedby", "name", "disabled", "value"], Yn = {
|
|
1054
1051
|
class: "ml-2 text-sm",
|
|
1055
1052
|
style: { "padding-top": "2px" }
|
|
1056
|
-
},
|
|
1053
|
+
}, el = ["for"], tl = {
|
|
1057
1054
|
key: 0,
|
|
1058
1055
|
class: "text-danger ml-1"
|
|
1059
|
-
},
|
|
1056
|
+
}, sl = ["id"], Oo = /* @__PURE__ */ P({
|
|
1060
1057
|
inheritAttrs: !1,
|
|
1061
1058
|
__name: "Checkbox",
|
|
1062
1059
|
props: {
|
|
@@ -1145,61 +1142,61 @@ const Hn = /* @__PURE__ */ Oe(Dn, [["render", Wn]]), Kn = { class: "relative asp
|
|
|
1145
1142
|
},
|
|
1146
1143
|
emits: ["update:modelValue"],
|
|
1147
1144
|
setup(e) {
|
|
1148
|
-
const t = e, r = (
|
|
1145
|
+
const t = e, r = (k) => `${k}-${ze()}`, s = c(() => t.value || t.name), {
|
|
1149
1146
|
checked: o,
|
|
1150
|
-
errorMessage:
|
|
1147
|
+
errorMessage: n,
|
|
1151
1148
|
handleChange: d,
|
|
1152
|
-
value:
|
|
1149
|
+
value: h
|
|
1153
1150
|
} = Ie(t.name, t.rules, {
|
|
1154
1151
|
validateOnMount: t.validateOnMount,
|
|
1155
1152
|
type: "checkbox",
|
|
1156
1153
|
checkedValue: s,
|
|
1157
1154
|
initialValue: t.modelValue || void 0
|
|
1158
|
-
}), i = c(() => t.label || t.name),
|
|
1159
|
-
const
|
|
1160
|
-
return t.inlineDescription ?
|
|
1161
|
-
}), g =
|
|
1162
|
-
t.disabled || d(
|
|
1155
|
+
}), i = c(() => t.label || t.name), f = c(() => n.value ? "border-danger-lighter" : "border-foreground-4 "), x = c(() => t.description || n.value), y = c(() => `${t.name}-description`), v = c(() => {
|
|
1156
|
+
const k = [];
|
|
1157
|
+
return t.inlineDescription ? k.push("inline ml-2") : k.push("block"), n.value ? k.push("text-danger") : k.push("text-foreground-2"), k.join(" ");
|
|
1158
|
+
}), g = O(r("checkbox")), u = c(() => t.id || g.value), S = (k) => {
|
|
1159
|
+
t.disabled || d(k);
|
|
1163
1160
|
};
|
|
1164
1161
|
return ae(() => {
|
|
1165
|
-
const
|
|
1166
|
-
B !== T && d(
|
|
1167
|
-
}), (
|
|
1168
|
-
|
|
1169
|
-
|
|
1162
|
+
const k = t.modelValue, $ = h.value, B = Array.isArray(k) ? k.includes(t.value) : k === t.value, T = Array.isArray($) ? $.includes(t.value) : $ === t.value;
|
|
1163
|
+
B !== T && d(k);
|
|
1164
|
+
}), (k, $) => (a(), m("div", Nn, [
|
|
1165
|
+
p("div", Qn, [
|
|
1166
|
+
p("input", ie({
|
|
1170
1167
|
id: u.value,
|
|
1171
|
-
checked:
|
|
1168
|
+
checked: l(o),
|
|
1172
1169
|
"aria-describedby": y.value,
|
|
1173
1170
|
name: e.name,
|
|
1174
1171
|
disabled: e.disabled,
|
|
1175
1172
|
value: s.value,
|
|
1176
1173
|
type: "checkbox",
|
|
1177
|
-
class: ["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",
|
|
1178
|
-
},
|
|
1174
|
+
class: ["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2", f.value]
|
|
1175
|
+
}, k.$attrs, { onChange: S }), null, 16, Jn)
|
|
1179
1176
|
]),
|
|
1180
|
-
|
|
1181
|
-
|
|
1177
|
+
p("div", Yn, [
|
|
1178
|
+
p("label", {
|
|
1182
1179
|
for: u.value,
|
|
1183
1180
|
class: b(["font-medium text-foreground", { "sr-only": e.hideLabel }])
|
|
1184
1181
|
}, [
|
|
1185
|
-
|
|
1186
|
-
e.showRequired ? (a(),
|
|
1187
|
-
], 10,
|
|
1188
|
-
|
|
1182
|
+
p("span", null, V(i.value), 1),
|
|
1183
|
+
e.showRequired ? (a(), m("span", tl, "*")) : I("", !0)
|
|
1184
|
+
], 10, el),
|
|
1185
|
+
x.value ? (a(), m("p", {
|
|
1189
1186
|
key: 0,
|
|
1190
1187
|
id: y.value,
|
|
1191
1188
|
class: b(v.value)
|
|
1192
|
-
}, V(
|
|
1189
|
+
}, V(x.value), 11, sl)) : I("", !0)
|
|
1193
1190
|
])
|
|
1194
1191
|
]));
|
|
1195
1192
|
}
|
|
1196
|
-
}),
|
|
1193
|
+
}), nl = { class: "flex h-6 items-center" }, ll = ["id", "checked", "aria-describedby", "name", "disabled", "value"], al = ["for"], ol = {
|
|
1197
1194
|
key: 0,
|
|
1198
1195
|
class: "text-sm"
|
|
1199
|
-
},
|
|
1196
|
+
}, rl = {
|
|
1200
1197
|
key: 1,
|
|
1201
1198
|
class: "text-danger ml-1"
|
|
1202
|
-
},
|
|
1199
|
+
}, il = ["id"], Lo = /* @__PURE__ */ P({
|
|
1203
1200
|
inheritAttrs: !1,
|
|
1204
1201
|
__name: "Radio",
|
|
1205
1202
|
props: {
|
|
@@ -1295,119 +1292,119 @@ const Hn = /* @__PURE__ */ Oe(Dn, [["render", Wn]]), Kn = { class: "relative asp
|
|
|
1295
1292
|
},
|
|
1296
1293
|
emits: ["update:modelValue"],
|
|
1297
1294
|
setup(e) {
|
|
1298
|
-
const t = e, r = (
|
|
1295
|
+
const t = e, r = (k) => `${k}-${ze()}`, s = c(() => t.value || t.name), {
|
|
1299
1296
|
checked: o,
|
|
1300
|
-
errorMessage:
|
|
1297
|
+
errorMessage: n,
|
|
1301
1298
|
handleChange: d,
|
|
1302
|
-
value:
|
|
1299
|
+
value: h
|
|
1303
1300
|
} = Ie(t.name, t.rules, {
|
|
1304
1301
|
validateOnMount: t.validateOnMount,
|
|
1305
1302
|
type: "radio",
|
|
1306
1303
|
checkedValue: s,
|
|
1307
1304
|
initialValue: t.modelValue || void 0
|
|
1308
|
-
}), i = c(() => t.label || t.name),
|
|
1309
|
-
const
|
|
1310
|
-
return
|
|
1311
|
-
}), g =
|
|
1312
|
-
t.disabled || d(
|
|
1305
|
+
}), i = c(() => t.label || t.name), f = c(() => n.value ? "border-danger-lighter" : "border-foreground-4 "), x = c(() => t.description || n.value), y = c(() => `${t.name}-description`), v = c(() => {
|
|
1306
|
+
const k = [];
|
|
1307
|
+
return n.value ? k.push("text-danger") : k.push("text-foreground-2"), k.join(" ");
|
|
1308
|
+
}), g = O(r("radio")), u = c(() => t.id || g.value), S = (k) => {
|
|
1309
|
+
t.disabled || d(k);
|
|
1313
1310
|
};
|
|
1314
1311
|
return ae(() => {
|
|
1315
|
-
const
|
|
1316
|
-
B !== T && d(
|
|
1317
|
-
}), (
|
|
1312
|
+
const k = t.modelValue, $ = h.value, B = Array.isArray(k) ? k.includes(t.value) : k === t.value, T = Array.isArray($) ? $.includes(t.value) : $ === t.value;
|
|
1313
|
+
B !== T && d(k);
|
|
1314
|
+
}), (k, $) => (a(), m("div", {
|
|
1318
1315
|
class: b(["relative flex gap-2 mb-2 last:mb-0", e.description ? "items-start" : "items-center"])
|
|
1319
1316
|
}, [
|
|
1320
|
-
|
|
1321
|
-
|
|
1317
|
+
p("div", nl, [
|
|
1318
|
+
p("input", ie({
|
|
1322
1319
|
id: u.value,
|
|
1323
|
-
checked:
|
|
1320
|
+
checked: l(o),
|
|
1324
1321
|
"aria-describedby": y.value,
|
|
1325
1322
|
name: e.name,
|
|
1326
1323
|
disabled: e.disabled,
|
|
1327
1324
|
value: s.value,
|
|
1328
1325
|
type: "radio",
|
|
1329
|
-
class: ["h-4 w-4 rounded-full text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",
|
|
1330
|
-
},
|
|
1326
|
+
class: ["h-4 w-4 rounded-full text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2", f.value]
|
|
1327
|
+
}, k.$attrs, { onChange: S }), null, 16, ll)
|
|
1331
1328
|
]),
|
|
1332
|
-
|
|
1333
|
-
class: b(["text-sm", e.inlineDescription ? "flex gap-2 items-center" : ""])
|
|
1329
|
+
p("div", {
|
|
1330
|
+
class: b(["text-xs sm:text-sm", e.inlineDescription ? "flex gap-2 items-center" : ""])
|
|
1334
1331
|
}, [
|
|
1335
|
-
|
|
1332
|
+
p("label", {
|
|
1336
1333
|
for: u.value,
|
|
1337
1334
|
class: b(["text-foreground flex gap-2 items-center", { "sr-only": e.hideLabel }])
|
|
1338
1335
|
}, [
|
|
1339
|
-
e.icon ? (a(),
|
|
1340
|
-
(a(),
|
|
1336
|
+
e.icon ? (a(), m("div", ol, [
|
|
1337
|
+
(a(), L(Q(e.icon), { class: "h-8 sm:h-10 w-8 sm:w-10" }))
|
|
1341
1338
|
])) : I("", !0),
|
|
1342
|
-
|
|
1343
|
-
e.showRequired ? (a(),
|
|
1344
|
-
], 10,
|
|
1345
|
-
|
|
1339
|
+
p("span", null, V(i.value), 1),
|
|
1340
|
+
e.showRequired ? (a(), m("span", rl, "*")) : I("", !0)
|
|
1341
|
+
], 10, al),
|
|
1342
|
+
x.value ? (a(), m("p", {
|
|
1346
1343
|
key: 0,
|
|
1347
1344
|
id: y.value,
|
|
1348
1345
|
class: b(v.value)
|
|
1349
|
-
}, V(
|
|
1346
|
+
}, V(x.value), 11, il)) : I("", !0)
|
|
1350
1347
|
], 2)
|
|
1351
1348
|
], 2));
|
|
1352
1349
|
}
|
|
1353
1350
|
});
|
|
1354
1351
|
function Ze(e) {
|
|
1355
|
-
const { props: t, inputEl: r, emit: s, options: o } = e, { value:
|
|
1356
|
-
validateOnMount:
|
|
1357
|
-
validateOnValueUpdate:
|
|
1358
|
-
initialValue:
|
|
1359
|
-
}),
|
|
1360
|
-
const
|
|
1361
|
-
return
|
|
1352
|
+
const { props: t, inputEl: r, emit: s, options: o } = e, { value: n, errorMessage: d } = Ie(t.name, t.rules, {
|
|
1353
|
+
validateOnMount: l(t.validateOnMount),
|
|
1354
|
+
validateOnValueUpdate: l(t.validateOnValueUpdate),
|
|
1355
|
+
initialValue: l(t.modelValue) || void 0
|
|
1356
|
+
}), h = c(() => {
|
|
1357
|
+
const A = ["block label text-foreground-2 mb-2"];
|
|
1358
|
+
return l(t.showLabel) || A.push("sr-only"), A.join(" ");
|
|
1362
1359
|
}), i = c(() => [
|
|
1363
1360
|
"focus:outline-none disabled:cursor-not-allowed disabled:bg-foundation-disabled",
|
|
1364
1361
|
"disabled:text-disabled-muted placeholder:text-foreground-2",
|
|
1365
1362
|
"rounded"
|
|
1366
|
-
].join(" ")),
|
|
1367
|
-
const
|
|
1363
|
+
].join(" ")), f = c(() => {
|
|
1364
|
+
const A = [
|
|
1368
1365
|
"block w-full text-foreground transition-all",
|
|
1369
1366
|
i.value
|
|
1370
1367
|
];
|
|
1371
|
-
d.value ?
|
|
1368
|
+
d.value ? A.push(
|
|
1372
1369
|
"focus:border-danger focus:ring-danger border-2 border-danger text-danger-darker"
|
|
1373
|
-
) :
|
|
1374
|
-
const w =
|
|
1375
|
-
return w === "foundation" ?
|
|
1376
|
-
}),
|
|
1377
|
-
const
|
|
1378
|
-
return !
|
|
1370
|
+
) : A.push("border-0 focus:ring-2 focus:ring-outline-2");
|
|
1371
|
+
const w = l(t.color);
|
|
1372
|
+
return w === "foundation" ? A.push("bg-foundation shadow-sm hover:shadow") : w === "transparent" ? A.push("bg-transparent") : A.push("bg-foundation-page"), A.join(" ");
|
|
1373
|
+
}), x = O(ze()), y = c(() => l(t.label) || l(t.name)), v = c(() => {
|
|
1374
|
+
const A = d.value;
|
|
1375
|
+
return !A || !l(t.useLabelInErrors) ? A : A.replace("Value", y.value);
|
|
1379
1376
|
}), g = c(
|
|
1380
|
-
() => v.value &&
|
|
1381
|
-
), u = c(() => v.value ||
|
|
1382
|
-
() => S.value ? `${
|
|
1377
|
+
() => v.value && l(t.hideErrorMessage)
|
|
1378
|
+
), u = c(() => v.value || l(t.help)), S = c(() => !!u.value), k = c(
|
|
1379
|
+
() => S.value ? `${l(t.name)}-${x.value}` : void 0
|
|
1383
1380
|
), $ = c(() => {
|
|
1384
|
-
const
|
|
1385
|
-
return
|
|
1381
|
+
const A = ["mt-2 text-xs sm:text-sm"];
|
|
1382
|
+
return A.push(d.value ? "text-danger" : "text-foreground-2"), A.join(" ");
|
|
1386
1383
|
}), B = () => {
|
|
1387
|
-
var
|
|
1388
|
-
(
|
|
1384
|
+
var A;
|
|
1385
|
+
(A = r.value) == null || A.focus();
|
|
1389
1386
|
}, T = () => {
|
|
1390
|
-
var
|
|
1391
|
-
|
|
1387
|
+
var A;
|
|
1388
|
+
n.value = N(n.value) ? [] : "", (A = o == null ? void 0 : o.customClear) == null || A.call(o), s("change", { value: n.value }), s("clear");
|
|
1392
1389
|
};
|
|
1393
1390
|
return ae(() => {
|
|
1394
|
-
|
|
1391
|
+
l(t.autoFocus) && B();
|
|
1395
1392
|
}), {
|
|
1396
1393
|
coreInputClasses: i,
|
|
1397
|
-
coreClasses:
|
|
1394
|
+
coreClasses: f,
|
|
1398
1395
|
title: y,
|
|
1399
|
-
value:
|
|
1400
|
-
helpTipId:
|
|
1396
|
+
value: n,
|
|
1397
|
+
helpTipId: k,
|
|
1401
1398
|
helpTipClasses: $,
|
|
1402
1399
|
helpTip: u,
|
|
1403
1400
|
hideHelpTip: g,
|
|
1404
1401
|
errorMessage: v,
|
|
1405
1402
|
clear: T,
|
|
1406
1403
|
focus: B,
|
|
1407
|
-
labelClasses:
|
|
1404
|
+
labelClasses: h
|
|
1408
1405
|
};
|
|
1409
1406
|
}
|
|
1410
|
-
const
|
|
1407
|
+
const ul = ["for"], cl = { class: "relative" }, dl = ["id", "name", "placeholder", "disabled", "aria-invalid", "aria-describedby"], fl = /* @__PURE__ */ p("span", { class: "text-xs sr-only" }, "Clear input", -1), pl = ["id"], Mo = /* @__PURE__ */ P({
|
|
1411
1408
|
__name: "TextArea",
|
|
1412
1409
|
props: {
|
|
1413
1410
|
name: null,
|
|
@@ -1430,12 +1427,12 @@ const il = ["for"], ul = { class: "relative" }, cl = ["id", "name", "placeholder
|
|
|
1430
1427
|
},
|
|
1431
1428
|
emits: ["update:modelValue", "change", "input", "clear"],
|
|
1432
1429
|
setup(e, { expose: t, emit: r }) {
|
|
1433
|
-
const s = r, o = e,
|
|
1430
|
+
const s = r, o = e, n = O(null), {
|
|
1434
1431
|
coreClasses: d,
|
|
1435
|
-
title:
|
|
1432
|
+
title: h,
|
|
1436
1433
|
value: i,
|
|
1437
|
-
helpTipId:
|
|
1438
|
-
helpTipClasses:
|
|
1434
|
+
helpTipId: f,
|
|
1435
|
+
helpTipClasses: x,
|
|
1439
1436
|
helpTip: y,
|
|
1440
1437
|
errorMessage: v,
|
|
1441
1438
|
labelClasses: g,
|
|
@@ -1444,86 +1441,86 @@ const il = ["for"], ul = { class: "relative" }, cl = ["id", "name", "placeholder
|
|
|
1444
1441
|
} = Ze({
|
|
1445
1442
|
props: le(o),
|
|
1446
1443
|
emit: s,
|
|
1447
|
-
inputEl:
|
|
1448
|
-
}),
|
|
1444
|
+
inputEl: n
|
|
1445
|
+
}), k = c(() => {
|
|
1449
1446
|
const $ = ["pl-2"];
|
|
1450
1447
|
return o.showClear && v.value ? $.push("pr-12") : (o.showClear || v.value) && $.push("pr-8"), $.join(" ");
|
|
1451
1448
|
});
|
|
1452
|
-
return t({ focus: S }), ($, B) => (a(),
|
|
1449
|
+
return t({ focus: S }), ($, B) => (a(), m("div", {
|
|
1453
1450
|
class: b([e.fullWidth ? "w-full" : ""])
|
|
1454
1451
|
}, [
|
|
1455
|
-
|
|
1452
|
+
p("label", {
|
|
1456
1453
|
for: e.name,
|
|
1457
|
-
class: b(
|
|
1454
|
+
class: b(l(g))
|
|
1458
1455
|
}, [
|
|
1459
|
-
|
|
1460
|
-
], 10,
|
|
1461
|
-
|
|
1462
|
-
be(
|
|
1456
|
+
p("span", null, V(l(h)), 1)
|
|
1457
|
+
], 10, ul),
|
|
1458
|
+
p("div", cl, [
|
|
1459
|
+
be(p("textarea", ie({
|
|
1463
1460
|
id: e.name,
|
|
1464
1461
|
ref_key: "inputElement",
|
|
1465
|
-
ref:
|
|
1462
|
+
ref: n,
|
|
1466
1463
|
"onUpdate:modelValue": B[0] || (B[0] = (T) => Be(i) ? i.value = T : null),
|
|
1467
1464
|
name: e.name,
|
|
1468
1465
|
class: [
|
|
1469
|
-
|
|
1470
|
-
|
|
1466
|
+
l(d),
|
|
1467
|
+
k.value,
|
|
1471
1468
|
e.textareaClasses || "",
|
|
1472
1469
|
"min-h-[3rem] simple-scrollbar text-sm"
|
|
1473
1470
|
],
|
|
1474
1471
|
placeholder: e.placeholder,
|
|
1475
1472
|
disabled: e.disabled,
|
|
1476
|
-
"aria-invalid":
|
|
1477
|
-
"aria-describedby":
|
|
1473
|
+
"aria-invalid": l(v) ? "true" : "false",
|
|
1474
|
+
"aria-describedby": l(f)
|
|
1478
1475
|
}, $.$attrs, {
|
|
1479
|
-
onChange: B[1] || (B[1] = (T) => $.$emit("change", { event: T, value:
|
|
1480
|
-
onInput: B[2] || (B[2] = (T) => $.$emit("input", { event: T, value:
|
|
1481
|
-
}), null, 16,
|
|
1482
|
-
[qe,
|
|
1476
|
+
onChange: B[1] || (B[1] = (T) => $.$emit("change", { event: T, value: l(i) })),
|
|
1477
|
+
onInput: B[2] || (B[2] = (T) => $.$emit("input", { event: T, value: l(i) }))
|
|
1478
|
+
}), null, 16, dl), [
|
|
1479
|
+
[qe, l(i)]
|
|
1483
1480
|
]),
|
|
1484
|
-
e.showClear ? (a(),
|
|
1481
|
+
e.showClear ? (a(), m("a", {
|
|
1485
1482
|
key: 0,
|
|
1486
1483
|
title: "Clear input",
|
|
1487
1484
|
class: "absolute top-2 right-0 flex items-center pr-2 cursor-pointer",
|
|
1488
1485
|
onClick: B[3] || (B[3] = //@ts-ignore
|
|
1489
|
-
(...T) =>
|
|
1486
|
+
(...T) => l(u) && l(u)(...T)),
|
|
1490
1487
|
onKeydown: B[4] || (B[4] = //@ts-ignore
|
|
1491
|
-
(...T) =>
|
|
1488
|
+
(...T) => l(u) && l(u)(...T))
|
|
1492
1489
|
}, [
|
|
1493
|
-
|
|
1494
|
-
z(
|
|
1490
|
+
fl,
|
|
1491
|
+
z(l(ye), {
|
|
1495
1492
|
class: "h-5 w-5 text-foreground",
|
|
1496
1493
|
"aria-hidden": "true"
|
|
1497
1494
|
})
|
|
1498
1495
|
], 32)) : I("", !0),
|
|
1499
|
-
|
|
1496
|
+
l(v) ? (a(), m("div", {
|
|
1500
1497
|
key: 1,
|
|
1501
1498
|
class: b([
|
|
1502
1499
|
"pointer-events-none absolute inset-y-0 right-0 flex items-start mt-2",
|
|
1503
1500
|
e.showClear ? "pr-8" : "pr-2"
|
|
1504
1501
|
])
|
|
1505
1502
|
}, [
|
|
1506
|
-
z(
|
|
1503
|
+
z(l(Ve), {
|
|
1507
1504
|
class: "h-4 w-4 text-danger",
|
|
1508
1505
|
"aria-hidden": "true"
|
|
1509
1506
|
})
|
|
1510
1507
|
], 2)) : I("", !0),
|
|
1511
|
-
e.showRequired && !
|
|
1508
|
+
e.showRequired && !l(v) ? (a(), m("div", {
|
|
1512
1509
|
key: 2,
|
|
1513
1510
|
class: b(["pointer-events-none absolute inset-y-0 mt-0.5 text-4xl right-0 flex items-start text-danger opacity-50", [e.showClear ? "pr-8" : "pr-2"]])
|
|
1514
1511
|
}, " * ", 2)) : I("", !0)
|
|
1515
1512
|
]),
|
|
1516
|
-
|
|
1513
|
+
l(f) ? (a(), m("p", {
|
|
1517
1514
|
key: 0,
|
|
1518
|
-
id:
|
|
1519
|
-
class: b(
|
|
1520
|
-
}, V(
|
|
1515
|
+
id: l(f),
|
|
1516
|
+
class: b(l(x))
|
|
1517
|
+
}, V(l(y)), 11, pl)) : I("", !0)
|
|
1521
1518
|
], 2));
|
|
1522
1519
|
}
|
|
1523
1520
|
}), ml = ["for"], hl = { class: "relative" }, vl = {
|
|
1524
1521
|
key: 0,
|
|
1525
1522
|
class: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"
|
|
1526
|
-
}, gl = ["id", "type", "name", "placeholder", "disabled", "aria-invalid", "aria-describedby"], bl = /* @__PURE__ */
|
|
1523
|
+
}, gl = ["id", "type", "name", "placeholder", "disabled", "aria-invalid", "aria-describedby"], bl = /* @__PURE__ */ p("span", { class: "text-xs sr-only" }, "Clear input", -1), yl = ["id"], xl = /* @__PURE__ */ P({
|
|
1527
1524
|
inheritAttrs: !1,
|
|
1528
1525
|
__name: "TextInput",
|
|
1529
1526
|
props: {
|
|
@@ -1660,17 +1657,17 @@ const il = ["for"], ul = { class: "relative" }, cl = ["id", "name", "placeholder
|
|
|
1660
1657
|
},
|
|
1661
1658
|
emits: ["update:modelValue", "change", "input", "clear", "focus", "blur"],
|
|
1662
1659
|
setup(e, { expose: t, emit: r }) {
|
|
1663
|
-
const s = e, o = r,
|
|
1664
|
-
coreClasses:
|
|
1660
|
+
const s = e, o = r, n = We(), d = O(null), {
|
|
1661
|
+
coreClasses: h,
|
|
1665
1662
|
title: i,
|
|
1666
|
-
value:
|
|
1667
|
-
helpTipId:
|
|
1663
|
+
value: f,
|
|
1664
|
+
helpTipId: x,
|
|
1668
1665
|
helpTipClasses: y,
|
|
1669
1666
|
helpTip: v,
|
|
1670
1667
|
hideHelpTip: g,
|
|
1671
1668
|
errorMessage: u,
|
|
1672
1669
|
clear: S,
|
|
1673
|
-
focus:
|
|
1670
|
+
focus: k,
|
|
1674
1671
|
labelClasses: $
|
|
1675
1672
|
} = Ze({
|
|
1676
1673
|
props: le(s),
|
|
@@ -1681,9 +1678,9 @@ const il = ["for"], ul = { class: "relative" }, cl = ["id", "name", "placeholder
|
|
|
1681
1678
|
return u.value ? U.push("text-danger") : U.push("text-foreground-2"), U.join(" ");
|
|
1682
1679
|
}), T = c(
|
|
1683
1680
|
() => ["email", "password"].includes(s.type) || s.customIcon
|
|
1684
|
-
),
|
|
1681
|
+
), A = c(() => {
|
|
1685
1682
|
const U = [];
|
|
1686
|
-
return T.value ? U.push("pl-8") : U.push("pl-2"),
|
|
1683
|
+
return T.value ? U.push("pl-8") : U.push("pl-2"), n["input-right"] || (u.value || s.showClear) && (u.value && s.showClear ? U.push("pr-12") : U.push("pr-8")), U.join(" ");
|
|
1687
1684
|
}), w = c(() => {
|
|
1688
1685
|
switch (s.size) {
|
|
1689
1686
|
case "sm":
|
|
@@ -1697,103 +1694,103 @@ const il = ["for"], ul = { class: "relative" }, cl = ["id", "name", "placeholder
|
|
|
1697
1694
|
return "h-8 text-sm";
|
|
1698
1695
|
}
|
|
1699
1696
|
});
|
|
1700
|
-
return t({ focus:
|
|
1697
|
+
return t({ focus: k }), (U, q) => (a(), m("div", {
|
|
1701
1698
|
class: b([e.fullWidth ? "w-full" : "", e.wrapperClasses])
|
|
1702
1699
|
}, [
|
|
1703
|
-
|
|
1700
|
+
p("label", {
|
|
1704
1701
|
for: e.name,
|
|
1705
|
-
class: b(
|
|
1702
|
+
class: b(l($))
|
|
1706
1703
|
}, [
|
|
1707
|
-
|
|
1704
|
+
p("span", null, V(l(i)), 1)
|
|
1708
1705
|
], 10, ml),
|
|
1709
|
-
|
|
1710
|
-
T.value ? (a(),
|
|
1711
|
-
e.customIcon ? (a(),
|
|
1706
|
+
p("div", hl, [
|
|
1707
|
+
T.value ? (a(), m("div", vl, [
|
|
1708
|
+
e.customIcon ? (a(), L(Q(e.customIcon), {
|
|
1712
1709
|
key: 0,
|
|
1713
1710
|
class: b(B.value),
|
|
1714
1711
|
"aria-hidden": "true"
|
|
1715
|
-
}, null, 8, ["class"])) : e.type === "email" ? (a(),
|
|
1712
|
+
}, null, 8, ["class"])) : e.type === "email" ? (a(), L(l(ns), {
|
|
1716
1713
|
key: 1,
|
|
1717
1714
|
class: b(B.value),
|
|
1718
1715
|
"aria-hidden": "true"
|
|
1719
|
-
}, null, 8, ["class"])) : e.type === "password" ? (a(),
|
|
1716
|
+
}, null, 8, ["class"])) : e.type === "password" ? (a(), L(l(ls), {
|
|
1720
1717
|
key: 2,
|
|
1721
1718
|
class: b(B.value),
|
|
1722
1719
|
"aria-hidden": "true"
|
|
1723
1720
|
}, null, 8, ["class"])) : I("", !0)
|
|
1724
1721
|
])) : I("", !0),
|
|
1725
|
-
be(
|
|
1722
|
+
be(p("input", ie({
|
|
1726
1723
|
id: e.name,
|
|
1727
1724
|
ref_key: "inputElement",
|
|
1728
1725
|
ref: d,
|
|
1729
|
-
"onUpdate:modelValue": q[0] || (q[0] = (E) => Be(
|
|
1726
|
+
"onUpdate:modelValue": q[0] || (q[0] = (E) => Be(f) ? f.value = E : null),
|
|
1730
1727
|
type: e.type,
|
|
1731
1728
|
name: e.name,
|
|
1732
|
-
class: [
|
|
1729
|
+
class: [l(h), A.value, w.value, e.inputClasses || ""],
|
|
1733
1730
|
placeholder: e.placeholder,
|
|
1734
1731
|
disabled: e.disabled,
|
|
1735
|
-
"aria-invalid":
|
|
1736
|
-
"aria-describedby":
|
|
1732
|
+
"aria-invalid": l(u) ? "true" : "false",
|
|
1733
|
+
"aria-describedby": l(x),
|
|
1737
1734
|
role: "textbox"
|
|
1738
1735
|
}, U.$attrs, {
|
|
1739
|
-
onChange: q[1] || (q[1] = (E) => U.$emit("change", { event: E, value:
|
|
1740
|
-
onInput: q[2] || (q[2] = (E) => U.$emit("input", { event: E, value:
|
|
1736
|
+
onChange: q[1] || (q[1] = (E) => U.$emit("change", { event: E, value: l(f) })),
|
|
1737
|
+
onInput: q[2] || (q[2] = (E) => U.$emit("input", { event: E, value: l(f) })),
|
|
1741
1738
|
onFocus: q[3] || (q[3] = (E) => U.$emit("focus")),
|
|
1742
1739
|
onBlur: q[4] || (q[4] = (E) => U.$emit("blur"))
|
|
1743
1740
|
}), null, 16, gl), [
|
|
1744
|
-
[
|
|
1741
|
+
[zt, l(f)]
|
|
1745
1742
|
]),
|
|
1746
1743
|
D(U.$slots, "input-right", {}, () => [
|
|
1747
|
-
e.showClear ? (a(),
|
|
1744
|
+
e.showClear ? (a(), m("a", {
|
|
1748
1745
|
key: 0,
|
|
1749
1746
|
title: "Clear input",
|
|
1750
1747
|
class: "absolute inset-y-0 right-0 flex items-center pr-2 cursor-pointer",
|
|
1751
1748
|
onClick: q[5] || (q[5] = //@ts-ignore
|
|
1752
|
-
(...E) =>
|
|
1749
|
+
(...E) => l(S) && l(S)(...E)),
|
|
1753
1750
|
onKeydown: q[6] || (q[6] = //@ts-ignore
|
|
1754
|
-
(...E) =>
|
|
1751
|
+
(...E) => l(S) && l(S)(...E))
|
|
1755
1752
|
}, [
|
|
1756
1753
|
bl,
|
|
1757
|
-
z(
|
|
1754
|
+
z(l(ye), {
|
|
1758
1755
|
class: "h-5 w-5 text-foreground",
|
|
1759
1756
|
"aria-hidden": "true"
|
|
1760
1757
|
})
|
|
1761
1758
|
], 32)) : I("", !0),
|
|
1762
|
-
|
|
1759
|
+
l(u) ? (a(), m("div", {
|
|
1763
1760
|
key: 1,
|
|
1764
1761
|
class: b([
|
|
1765
1762
|
"pointer-events-none absolute inset-y-0 right-0 flex items-center",
|
|
1766
1763
|
e.showClear ? "pr-8" : "pr-2"
|
|
1767
1764
|
])
|
|
1768
1765
|
}, [
|
|
1769
|
-
z(
|
|
1766
|
+
z(l(Ve), {
|
|
1770
1767
|
class: "h-4 w-4 text-danger",
|
|
1771
1768
|
"aria-hidden": "true"
|
|
1772
1769
|
})
|
|
1773
1770
|
], 2)) : I("", !0),
|
|
1774
|
-
e.showRequired && !
|
|
1771
|
+
e.showRequired && !l(u) ? (a(), m("div", {
|
|
1775
1772
|
key: 2,
|
|
1776
1773
|
class: b(["pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center text-danger opacity-50", [e.showClear ? "pr-8" : "pr-2"]])
|
|
1777
1774
|
}, " * ", 2)) : I("", !0)
|
|
1778
1775
|
])
|
|
1779
1776
|
]),
|
|
1780
|
-
|
|
1777
|
+
l(x) && !l(g) ? (a(), m("p", {
|
|
1781
1778
|
key: 0,
|
|
1782
|
-
id:
|
|
1783
|
-
class: b(
|
|
1784
|
-
}, V(
|
|
1779
|
+
id: l(x),
|
|
1780
|
+
class: b(l(y))
|
|
1781
|
+
}, V(l(v)), 11, yl)) : I("", !0)
|
|
1785
1782
|
], 2));
|
|
1786
1783
|
}
|
|
1787
|
-
}),
|
|
1784
|
+
}), yt = /^https?:\/\//, Ne = /^[\w-_.+]+@[\w-_.+]+$/, kl = (e) => (e || "").match(Ne) ? !0 : "Value should be a valid e-mail address", wl = (e) => (e || "").split(",").map((s) => s.trim()).every((s) => s.match(Ne)) || "Value should be one or multiple comma-delimited e-mail addresses", Cl = (e) => (Se(e) && (e = e.trim()), e ? !0 : "Value is required"), $l = (e, t) => (r, s) => r === s.form[e] ? !0 : `Value must be the same as in field '${t || e}'`, Il = (e) => (t) => {
|
|
1788
1785
|
const { minLength: r, maxLength: s } = e;
|
|
1789
|
-
return t =
|
|
1786
|
+
return t = is(t) ? "" : t, Se(t) ? !ge(r) && t.length < r ? `Value needs to be at least ${r} characters long` : !ge(s) && t.length > s ? `Value needs to be no more than ${s} characters long` : !0 : "Value should be a text string";
|
|
1790
1787
|
}, Sl = (e) => (t) => {
|
|
1791
1788
|
const { match: r, message: s } = e;
|
|
1792
1789
|
return Se(t) ? r ? Se(r) ? t.includes(r) ? !0 : s : r.test(t) ? !0 : s : !0 : "Value should be a text string";
|
|
1793
|
-
}, Bl = (e) =>
|
|
1790
|
+
}, Bl = (e) => yt.test(e) ? !0 : "Value is not a valid URL", Vl = (e) => Array.isArray(e) && e.length > 0 ? !0 : "Value should have at least a single item selected", Ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1794
1791
|
__proto__: null,
|
|
1795
|
-
VALID_EMAIL:
|
|
1796
|
-
VALID_HTTP_URL:
|
|
1792
|
+
VALID_EMAIL: Ne,
|
|
1793
|
+
VALID_HTTP_URL: yt,
|
|
1797
1794
|
isEmail: kl,
|
|
1798
1795
|
isItemSelected: Vl,
|
|
1799
1796
|
isOneOrMultipleEmails: wl,
|
|
@@ -1803,74 +1800,74 @@ const il = ["for"], ul = { class: "relative" }, cl = ["id", "name", "placeholder
|
|
|
1803
1800
|
isUrl: Bl,
|
|
1804
1801
|
stringContains: Sl
|
|
1805
1802
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1806
|
-
function
|
|
1803
|
+
function xt(e) {
|
|
1807
1804
|
const {
|
|
1808
1805
|
skipCalculation: t,
|
|
1809
1806
|
elementToWatchForChanges: r,
|
|
1810
1807
|
itemContainer: s,
|
|
1811
1808
|
trackResize: o = !1,
|
|
1812
|
-
trackMutations:
|
|
1813
|
-
} = e || {}, d =
|
|
1809
|
+
trackMutations: n = !0
|
|
1810
|
+
} = e || {}, d = O(0), h = () => {
|
|
1814
1811
|
const i = s.value;
|
|
1815
1812
|
if (t != null && t.value || !i)
|
|
1816
1813
|
return;
|
|
1817
|
-
const
|
|
1818
|
-
let
|
|
1819
|
-
for (const g of
|
|
1814
|
+
const f = i.children;
|
|
1815
|
+
let x = 0, y = 0, v;
|
|
1816
|
+
for (const g of f) {
|
|
1820
1817
|
const u = g.offsetTop;
|
|
1821
|
-
ge(v) ? (v = u,
|
|
1818
|
+
ge(v) ? (v = u, x += 1) : u === v && (x += 1), y += 1;
|
|
1822
1819
|
}
|
|
1823
|
-
d.value = y -
|
|
1820
|
+
d.value = y - x;
|
|
1824
1821
|
};
|
|
1825
|
-
return o &&
|
|
1822
|
+
return o && fs(r, h), n && ps(r, h, {
|
|
1826
1823
|
childList: !0,
|
|
1827
1824
|
subtree: !0
|
|
1828
1825
|
}), {
|
|
1829
1826
|
hiddenItemCount: d
|
|
1830
1827
|
};
|
|
1831
1828
|
}
|
|
1832
|
-
function
|
|
1829
|
+
function kt(e) {
|
|
1833
1830
|
const { props: t, emit: r, dynamicVisibility: s } = e;
|
|
1834
1831
|
let o;
|
|
1835
1832
|
if (s) {
|
|
1836
|
-
const { elementToWatchForChanges:
|
|
1837
|
-
o =
|
|
1833
|
+
const { elementToWatchForChanges: f, itemContainer: x } = s;
|
|
1834
|
+
o = xt({
|
|
1838
1835
|
skipCalculation: c(() => {
|
|
1839
1836
|
var v;
|
|
1840
1837
|
return !((v = t.multiple) != null && v.value);
|
|
1841
1838
|
}),
|
|
1842
|
-
elementToWatchForChanges:
|
|
1843
|
-
itemContainer:
|
|
1839
|
+
elementToWatchForChanges: f,
|
|
1840
|
+
itemContainer: x
|
|
1844
1841
|
}).hiddenItemCount;
|
|
1845
1842
|
} else
|
|
1846
|
-
o =
|
|
1847
|
-
const
|
|
1843
|
+
o = O(0);
|
|
1844
|
+
const n = c({
|
|
1848
1845
|
get: () => {
|
|
1849
|
-
var
|
|
1850
|
-
const
|
|
1851
|
-
return (y = t.multiple) != null && y.value ?
|
|
1846
|
+
var x, y;
|
|
1847
|
+
const f = (x = t.modelValue) == null ? void 0 : x.value;
|
|
1848
|
+
return (y = t.multiple) != null && y.value ? N(f) ? f : [] : N(f) ? void 0 : f;
|
|
1852
1849
|
},
|
|
1853
|
-
set: (
|
|
1854
|
-
var
|
|
1855
|
-
if ((
|
|
1850
|
+
set: (f) => {
|
|
1851
|
+
var x, y, v;
|
|
1852
|
+
if ((x = t.multiple) != null && x.value && !N(f)) {
|
|
1856
1853
|
console.warn("Attempting to set non-array value in selector w/ multiple=true");
|
|
1857
1854
|
return;
|
|
1858
|
-
} else if (!((y = t.multiple) != null && y.value) &&
|
|
1855
|
+
} else if (!((y = t.multiple) != null && y.value) && N(f)) {
|
|
1859
1856
|
console.warn("Attempting to set array value in selector w/ multiple=false");
|
|
1860
1857
|
return;
|
|
1861
1858
|
}
|
|
1862
|
-
r("update:modelValue", (v = t.multiple) != null && v.value ?
|
|
1859
|
+
r("update:modelValue", (v = t.multiple) != null && v.value ? f || [] : f);
|
|
1863
1860
|
}
|
|
1864
|
-
}), d = (
|
|
1861
|
+
}), d = (f) => N(f);
|
|
1865
1862
|
return {
|
|
1866
|
-
selectedValue:
|
|
1863
|
+
selectedValue: n,
|
|
1867
1864
|
hiddenSelectedItemCount: o,
|
|
1868
1865
|
isArrayValue: d,
|
|
1869
|
-
isMultiItemArrayValue: (
|
|
1870
|
-
firstItem: (
|
|
1866
|
+
isMultiItemArrayValue: (f) => N(f) && f.length > 1,
|
|
1867
|
+
firstItem: (f) => d(f) ? f[0] : f
|
|
1871
1868
|
};
|
|
1872
1869
|
}
|
|
1873
|
-
const zl = (e) => (
|
|
1870
|
+
const zl = (e) => (Ot("data-v-89e77cae"), e = e(), Lt(), e), Ol = /* @__PURE__ */ zl(() => /* @__PURE__ */ p("div", { class: "swoosher relative top-0 bg-blue-500/50" }, null, -1)), Ll = [
|
|
1874
1871
|
Ol
|
|
1875
1872
|
], Ml = /* @__PURE__ */ P({
|
|
1876
1873
|
__name: "Bar",
|
|
@@ -1878,7 +1875,7 @@ const zl = (e) => (zt("data-v-89e77cae"), e = e(), Ot(), e), Ol = /* @__PURE__ *
|
|
|
1878
1875
|
loading: { type: Boolean }
|
|
1879
1876
|
},
|
|
1880
1877
|
setup(e) {
|
|
1881
|
-
return (t, r) => (a(),
|
|
1878
|
+
return (t, r) => (a(), m("div", {
|
|
1882
1879
|
class: b([
|
|
1883
1880
|
"relative w-full h-1 bg-blue-500/30 text-xs text-foreground-on-primary overflow-hidden rounded-xl",
|
|
1884
1881
|
e.loading ? "opacity-100" : "opacity-0"
|
|
@@ -1886,18 +1883,18 @@ const zl = (e) => (zt("data-v-89e77cae"), e = e(), Ot(), e), Ol = /* @__PURE__ *
|
|
|
1886
1883
|
}, Ll, 2));
|
|
1887
1884
|
}
|
|
1888
1885
|
});
|
|
1889
|
-
const
|
|
1886
|
+
const Qe = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), Al = { class: "flex items-center justify-between w-full" }, _l = { class: "block truncate grow text-left text-xs sm:text-sm" }, Pl = { class: "pointer-events-none shrink-0 ml-1 flex items-center space-x-2" }, jl = {
|
|
1890
1887
|
key: 1,
|
|
1891
1888
|
class: "text-4xl text-danger opacity-50 h-4 w-4 leading-6"
|
|
1892
1889
|
}, Tl = ["disabled"], Fl = {
|
|
1893
1890
|
key: 0,
|
|
1894
1891
|
class: "flex flex-col mx-1 mb-1"
|
|
1895
|
-
}, Rl = /* @__PURE__ */
|
|
1892
|
+
}, Rl = /* @__PURE__ */ p("span", { class: "sr-only label text-foreground" }, "Search", -1), Dl = { class: "relative" }, El = { class: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2" }, Ul = ["placeholder"], ql = {
|
|
1896
1893
|
key: 0,
|
|
1897
1894
|
class: "px-1"
|
|
1898
|
-
}, Wl = { key: 1 }, Hl = /* @__PURE__ */
|
|
1895
|
+
}, Wl = { key: 1 }, Hl = /* @__PURE__ */ p("div", { class: "text-foreground-2 text-center" }, "Nothing found 🤷♂️", -1), Kl = {
|
|
1899
1896
|
class: /* @__PURE__ */ b(["block truncate"])
|
|
1900
|
-
}, Gl = ["id"],
|
|
1897
|
+
}, Gl = ["id"], wt = /* @__PURE__ */ P({
|
|
1901
1898
|
__name: "Base",
|
|
1902
1899
|
props: {
|
|
1903
1900
|
multiple: {
|
|
@@ -2067,41 +2064,41 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2067
2064
|
},
|
|
2068
2065
|
emits: ["update:modelValue"],
|
|
2069
2066
|
setup(e, { expose: t, emit: r }) {
|
|
2070
|
-
const s = (C) => je(C), o = r,
|
|
2071
|
-
validateOnMount:
|
|
2072
|
-
validateOnValueUpdate:
|
|
2073
|
-
initialValue:
|
|
2074
|
-
}), i =
|
|
2067
|
+
const s = (C) => je(C), o = r, n = e, { value: d, errorMessage: h } = Ie(n.name, n.rules, {
|
|
2068
|
+
validateOnMount: n.validateOnMount,
|
|
2069
|
+
validateOnValueUpdate: n.validateOnValueUpdate,
|
|
2070
|
+
initialValue: n.modelValue
|
|
2071
|
+
}), i = ms(), f = O(null), x = O(null), y = O(null), v = O(""), g = O([]), u = O(!1), S = O(1), k = O(ze()), $ = hs(
|
|
2075
2072
|
c(() => {
|
|
2076
2073
|
var C;
|
|
2077
2074
|
return (C = y.value) == null ? void 0 : C.el;
|
|
2078
2075
|
}),
|
|
2079
2076
|
{ windowResize: !0, windowScroll: !0, immediate: !0 }
|
|
2080
2077
|
);
|
|
2081
|
-
|
|
2078
|
+
vs(
|
|
2082
2079
|
c(() => {
|
|
2083
2080
|
var C;
|
|
2084
|
-
return (C =
|
|
2081
|
+
return (C = x.value) == null ? void 0 : C.el;
|
|
2085
2082
|
}),
|
|
2086
2083
|
([{ isIntersecting: C }]) => {
|
|
2087
|
-
C &&
|
|
2084
|
+
C && n.mountMenuOnBody && $.update();
|
|
2088
2085
|
}
|
|
2089
2086
|
);
|
|
2090
|
-
const B = c(() => n
|
|
2091
|
-
const C =
|
|
2092
|
-
return !C || !n
|
|
2093
|
-
}),
|
|
2094
|
-
() => w.value ? `${n
|
|
2087
|
+
const B = c(() => l(n.label) || l(n.name)), T = c(() => {
|
|
2088
|
+
const C = h.value;
|
|
2089
|
+
return !C || !l(n.useLabelInErrors) ? C : C.replace("Value", B.value);
|
|
2090
|
+
}), A = c(() => T.value || l(n.help)), w = c(() => !!A.value), U = c(
|
|
2091
|
+
() => w.value ? `${l(n.name)}-${k.value}` : void 0
|
|
2095
2092
|
), q = c(
|
|
2096
|
-
() =>
|
|
2093
|
+
() => h.value ? "text-danger" : "text-foreground-2"
|
|
2097
2094
|
), E = c(
|
|
2098
|
-
() =>
|
|
2095
|
+
() => n.buttonStyle !== "simple" && n.clearable && !n.disabled
|
|
2099
2096
|
), Le = c(() => {
|
|
2100
2097
|
const C = ["relative flex group"];
|
|
2101
|
-
return
|
|
2098
|
+
return h.value ? (C.push("hover:shadow rounded-md"), C.push("text-danger-darker focus:border-danger focus:ring-danger"), n.buttonStyle !== "simple" && C.push("outline outline-2 outline-danger")) : n.buttonStyle !== "simple" && (C.push("hover:shadow rounded-md"), C.push("outline outline-2 outline-primary-muted")), n.fixedHeight && C.push("h-8"), C.join(" ");
|
|
2102
2099
|
}), re = c(() => {
|
|
2103
2100
|
const C = [];
|
|
2104
|
-
return
|
|
2101
|
+
return n.buttonStyle !== "simple" && C.push(
|
|
2105
2102
|
ce.value ? "bg-foundation-disabled text-foreground-disabled" : ""
|
|
2106
2103
|
), ce.value && C.push("cursor-not-allowed"), C.join(" ");
|
|
2107
2104
|
}), Me = c(() => {
|
|
@@ -2114,81 +2111,81 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2114
2111
|
];
|
|
2115
2112
|
return ce.value || (C.push(
|
|
2116
2113
|
"hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"
|
|
2117
|
-
),
|
|
2118
|
-
}),
|
|
2114
|
+
), n.buttonStyle === "tinted" ? C.push("bg-outline-3") : C.push("bg-primary-muted")), C.join(" ");
|
|
2115
|
+
}), Ae = c(() => {
|
|
2119
2116
|
const C = [
|
|
2120
2117
|
"relative z-[2]",
|
|
2121
2118
|
"normal rounded-md cursor-pointer transition truncate flex-1",
|
|
2122
2119
|
"flex items-center",
|
|
2123
2120
|
re.value
|
|
2124
2121
|
];
|
|
2125
|
-
return
|
|
2122
|
+
return n.buttonStyle !== "simple" && (C.push("py-2 px-3"), ce.value || (n.buttonStyle === "tinted" ? C.push("bg-foundation-page text-foreground") : C.push("bg-foundation text-foreground"))), E.value && he.value && C.push("rounded-r-none"), C.join(" ");
|
|
2126
2123
|
}), me = c(
|
|
2127
|
-
() => !!(
|
|
2128
|
-
), Y = c(() => me.value &&
|
|
2129
|
-
() =>
|
|
2124
|
+
() => !!(n.search && (n.filterPredicate || n.getSearchResults))
|
|
2125
|
+
), Y = c(() => me.value && n.getSearchResults), ce = c(
|
|
2126
|
+
() => n.disabled || !n.items.length && !Y.value
|
|
2130
2127
|
), X = c({
|
|
2131
2128
|
get: () => {
|
|
2132
2129
|
const C = d.value;
|
|
2133
|
-
return
|
|
2130
|
+
return n.multiple ? N(C) ? C : [] : N(C) ? void 0 : C;
|
|
2134
2131
|
},
|
|
2135
2132
|
set: (C) => {
|
|
2136
|
-
if (
|
|
2133
|
+
if (n.multiple && !N(C)) {
|
|
2137
2134
|
console.warn("Attempting to set non-array value in selector w/ multiple=true");
|
|
2138
2135
|
return;
|
|
2139
|
-
} else if (!
|
|
2136
|
+
} else if (!n.multiple && N(C)) {
|
|
2140
2137
|
console.warn("Attempting to set array value in selector w/ multiple=false");
|
|
2141
2138
|
return;
|
|
2142
2139
|
}
|
|
2143
2140
|
let H;
|
|
2144
|
-
if (
|
|
2141
|
+
if (n.multiple)
|
|
2145
2142
|
H = C || [];
|
|
2146
2143
|
else {
|
|
2147
2144
|
const W = d.value;
|
|
2148
|
-
H =
|
|
2145
|
+
H = n.allowUnset && W && C && j(W) === j(C) ? void 0 : C;
|
|
2149
2146
|
}
|
|
2150
|
-
|
|
2147
|
+
n.fullyControlValue ? o("update:modelValue", H) : d.value = H, S.value += 1;
|
|
2151
2148
|
}
|
|
2152
|
-
}), he = c(() =>
|
|
2153
|
-
|
|
2149
|
+
}), he = c(() => n.multiple && N(X.value) ? X.value.length !== 0 : !!X.value), _e = () => {
|
|
2150
|
+
n.multiple ? X.value = [] : X.value = void 0;
|
|
2154
2151
|
}, Pe = c(() => {
|
|
2155
2152
|
const C = v.value;
|
|
2156
|
-
return !me.value || !(C != null && C.length) ? g.value :
|
|
2153
|
+
return !me.value || !(C != null && C.length) ? g.value : n.filterPredicate ? g.value.filter(
|
|
2157
2154
|
(H) => {
|
|
2158
2155
|
var W;
|
|
2159
|
-
return ((W =
|
|
2156
|
+
return ((W = n.filterPredicate) == null ? void 0 : W.call(n, H, C)) || !1;
|
|
2160
2157
|
}
|
|
2161
2158
|
) : g.value;
|
|
2162
2159
|
}), xe = c(() => {
|
|
2163
2160
|
const C = [
|
|
2164
2161
|
"rounded-md bg-foundation-2 py-1 label label--light outline outline-2 outline-primary-muted focus:outline-none shadow mt-1 "
|
|
2165
2162
|
];
|
|
2166
|
-
return
|
|
2167
|
-
}),
|
|
2163
|
+
return n.mountMenuOnBody ? C.push("fixed z-50") : C.push("absolute top-[100%] w-full z-10"), C.join(" ");
|
|
2164
|
+
}), _ = c(() => {
|
|
2168
2165
|
const C = {};
|
|
2169
|
-
if (
|
|
2166
|
+
if (n.mountMenuOnBody) {
|
|
2170
2167
|
const H = $.top.value, W = $.left.value, J = $.width.value, te = $.height.value;
|
|
2171
2168
|
C.top = `${H + te}px`, C.left = `${W}px`, C.width = `${J}px`;
|
|
2172
2169
|
}
|
|
2173
2170
|
return C;
|
|
2174
|
-
}), F = (C) => JSON.stringify(C), j = (C) => s(C) ? C[
|
|
2175
|
-
if (!(!Y.value || !
|
|
2171
|
+
}), F = (C) => JSON.stringify(C), j = (C) => s(C) ? C[n.by || "id"] : C, Z = async () => {
|
|
2172
|
+
if (!(!Y.value || !n.getSearchResults)) {
|
|
2176
2173
|
u.value = !0;
|
|
2177
2174
|
try {
|
|
2178
|
-
g.value = await
|
|
2175
|
+
g.value = await n.getSearchResults(v.value);
|
|
2179
2176
|
} finally {
|
|
2180
2177
|
u.value = !1;
|
|
2181
2178
|
}
|
|
2182
2179
|
}
|
|
2183
2180
|
}, ee = He(Z, 1e3), ke = (C) => {
|
|
2184
|
-
const { active: H, disabled: W } = C || {}, { hideCheckmarks: J } =
|
|
2181
|
+
const { active: H, disabled: W } = C || {}, { hideCheckmarks: J } = n, te = [
|
|
2185
2182
|
"relative transition cursor-pointer select-none py-1.5 pl-3",
|
|
2186
2183
|
J ? "" : "pr-9"
|
|
2187
2184
|
];
|
|
2188
2185
|
return W ? te.push("opacity-50 cursor-not-allowed") : te.push(H ? "text-primary" : "text-foreground"), te.join(" ");
|
|
2189
2186
|
};
|
|
2190
2187
|
return fe(
|
|
2191
|
-
() =>
|
|
2188
|
+
() => n.items,
|
|
2192
2189
|
(C) => {
|
|
2193
2190
|
g.value = C.slice();
|
|
2194
2191
|
},
|
|
@@ -2196,9 +2193,9 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2196
2193
|
), fe(v, () => {
|
|
2197
2194
|
Y.value && ee();
|
|
2198
2195
|
}), ae(() => {
|
|
2199
|
-
Y.value && !
|
|
2200
|
-
}), t({ triggerSearch: Z }), (C, H) => (a(),
|
|
2201
|
-
(a(),
|
|
2196
|
+
Y.value && !n.items.length && Z();
|
|
2197
|
+
}), t({ triggerSearch: Z }), (C, H) => (a(), m("div", null, [
|
|
2198
|
+
(a(), L(l(ws), {
|
|
2202
2199
|
key: S.value,
|
|
2203
2200
|
modelValue: X.value,
|
|
2204
2201
|
"onUpdate:modelValue": H[4] || (H[4] = (W) => X.value = W),
|
|
@@ -2208,27 +2205,27 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2208
2205
|
disabled: ce.value,
|
|
2209
2206
|
as: "div"
|
|
2210
2207
|
}, {
|
|
2211
|
-
default:
|
|
2212
|
-
z(
|
|
2208
|
+
default: M(() => [
|
|
2209
|
+
z(l(Cs), {
|
|
2213
2210
|
class: b(["block label text-foreground-2 mb-2", { "sr-only": !e.showLabel }])
|
|
2214
2211
|
}, {
|
|
2215
|
-
default:
|
|
2212
|
+
default: M(() => [
|
|
2216
2213
|
R(V(e.label), 1)
|
|
2217
2214
|
]),
|
|
2218
2215
|
_: 1
|
|
2219
2216
|
}, 8, ["class"]),
|
|
2220
|
-
|
|
2217
|
+
p("div", {
|
|
2221
2218
|
class: b(Le.value)
|
|
2222
2219
|
}, [
|
|
2223
|
-
z(
|
|
2220
|
+
z(l($s), {
|
|
2224
2221
|
ref_key: "listboxButton",
|
|
2225
2222
|
ref: y,
|
|
2226
|
-
class: b(
|
|
2223
|
+
class: b(Ae.value)
|
|
2227
2224
|
}, {
|
|
2228
|
-
default:
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
!X.value ||
|
|
2225
|
+
default: M(({ open: W }) => [
|
|
2226
|
+
p("div", Al, [
|
|
2227
|
+
p("div", _l, [
|
|
2228
|
+
!X.value || l(N)(X.value) && !X.value.length ? D(C.$slots, "nothing-selected", { key: 0 }, () => [
|
|
2232
2229
|
R(V(e.placeholder ? e.placeholder : e.label), 1)
|
|
2233
2230
|
]) : D(C.$slots, "something-selected", {
|
|
2234
2231
|
key: 1,
|
|
@@ -2237,17 +2234,17 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2237
2234
|
R(V(F(X.value)), 1)
|
|
2238
2235
|
])
|
|
2239
2236
|
]),
|
|
2240
|
-
|
|
2241
|
-
T.value ? (a(),
|
|
2237
|
+
p("div", Pl, [
|
|
2238
|
+
T.value ? (a(), L(l(Et), {
|
|
2242
2239
|
key: 0,
|
|
2243
2240
|
class: "h-4 w-4 text-danger",
|
|
2244
2241
|
"aria-hidden": "true"
|
|
2245
|
-
})) : e.showRequired ? (a(),
|
|
2246
|
-
W ? (a(),
|
|
2242
|
+
})) : e.showRequired ? (a(), m("div", jl, " * ")) : I("", !0),
|
|
2243
|
+
W ? (a(), L(l(dt), {
|
|
2247
2244
|
key: 2,
|
|
2248
2245
|
class: "h-4 w-4 text-foreground",
|
|
2249
2246
|
"aria-hidden": "true"
|
|
2250
|
-
})) : (a(),
|
|
2247
|
+
})) : (a(), L(l(Ut), {
|
|
2251
2248
|
key: 3,
|
|
2252
2249
|
class: "h-4 w-4 text-foreground",
|
|
2253
2250
|
"aria-hidden": "true"
|
|
@@ -2257,47 +2254,47 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2257
2254
|
]),
|
|
2258
2255
|
_: 3
|
|
2259
2256
|
}, 8, ["class"]),
|
|
2260
|
-
E.value ? be((a(),
|
|
2257
|
+
E.value ? be((a(), m("button", {
|
|
2261
2258
|
key: 0,
|
|
2262
2259
|
class: b(Me.value),
|
|
2263
2260
|
disabled: e.disabled,
|
|
2264
|
-
onClick: H[0] || (H[0] = (W) =>
|
|
2261
|
+
onClick: H[0] || (H[0] = (W) => _e())
|
|
2265
2262
|
}, [
|
|
2266
|
-
z(
|
|
2263
|
+
z(l(Ke), { class: "w-3 h-3" })
|
|
2267
2264
|
], 10, Tl)), [
|
|
2268
|
-
[
|
|
2265
|
+
[l(vt), "Clear"]
|
|
2269
2266
|
]) : I("", !0),
|
|
2270
|
-
|
|
2267
|
+
l(i) ? (a(), L(Ee, {
|
|
2271
2268
|
key: 1,
|
|
2272
2269
|
"leave-active-class": "transition ease-in duration-100",
|
|
2273
2270
|
"leave-from-class": "opacity-100",
|
|
2274
2271
|
"leave-to-class": "opacity-0"
|
|
2275
2272
|
}, {
|
|
2276
|
-
default:
|
|
2277
|
-
(a(),
|
|
2273
|
+
default: M(() => [
|
|
2274
|
+
(a(), L(Mt, {
|
|
2278
2275
|
to: "body",
|
|
2279
2276
|
disabled: !e.mountMenuOnBody
|
|
2280
2277
|
}, [
|
|
2281
|
-
z(
|
|
2278
|
+
z(l(Is), {
|
|
2282
2279
|
ref_key: "menuEl",
|
|
2283
|
-
ref:
|
|
2280
|
+
ref: x,
|
|
2284
2281
|
class: b(xe.value),
|
|
2285
|
-
style: ne(
|
|
2282
|
+
style: ne(_.value),
|
|
2286
2283
|
onFocus: H[3] || (H[3] = (W) => {
|
|
2287
2284
|
var J;
|
|
2288
|
-
return (J =
|
|
2285
|
+
return (J = f.value) == null ? void 0 : J.focus();
|
|
2289
2286
|
})
|
|
2290
2287
|
}, {
|
|
2291
|
-
default:
|
|
2292
|
-
me.value ? (a(),
|
|
2288
|
+
default: M(() => [
|
|
2289
|
+
me.value ? (a(), m("label", Fl, [
|
|
2293
2290
|
Rl,
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
z(
|
|
2291
|
+
p("div", Dl, [
|
|
2292
|
+
p("div", El, [
|
|
2293
|
+
z(l(qt), { class: "h-5 w-5 text-foreground" })
|
|
2297
2294
|
]),
|
|
2298
|
-
be(
|
|
2295
|
+
be(p("input", {
|
|
2299
2296
|
ref_key: "searchInput",
|
|
2300
|
-
ref:
|
|
2297
|
+
ref: f,
|
|
2301
2298
|
"onUpdate:modelValue": H[1] || (H[1] = (W) => v.value = W),
|
|
2302
2299
|
type: "text",
|
|
2303
2300
|
class: "pl-9 w-full border-0 bg-foundation-page rounded placeholder:font-normal normal placeholder:text-foreground-2 focus:outline-none focus:ring-1 focus:border-outline-1 focus:ring-outline-1",
|
|
@@ -2309,30 +2306,30 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2309
2306
|
])
|
|
2310
2307
|
])
|
|
2311
2308
|
])) : I("", !0),
|
|
2312
|
-
|
|
2309
|
+
p("div", {
|
|
2313
2310
|
class: b(["overflow-auto simple-scrollbar", [me.value ? "max-h-52" : "max-h-40"]])
|
|
2314
2311
|
}, [
|
|
2315
|
-
Y.value && u.value ? (a(),
|
|
2316
|
-
z(
|
|
2317
|
-
])) : Y.value && !g.value.length ? (a(),
|
|
2312
|
+
Y.value && u.value ? (a(), m("div", ql, [
|
|
2313
|
+
z(Qe, { loading: !0 })
|
|
2314
|
+
])) : Y.value && !g.value.length ? (a(), m("div", Wl, [
|
|
2318
2315
|
D(C.$slots, "nothing-found", {}, () => [
|
|
2319
2316
|
Hl
|
|
2320
2317
|
])
|
|
2321
2318
|
])) : I("", !0),
|
|
2322
|
-
!Y.value || !u.value ? (a(!0),
|
|
2319
|
+
!Y.value || !u.value ? (a(!0), m(K, { key: 2 }, G(Pe.value, (W) => {
|
|
2323
2320
|
var J;
|
|
2324
|
-
return a(),
|
|
2321
|
+
return a(), L(l(Ss), {
|
|
2325
2322
|
key: j(W),
|
|
2326
2323
|
value: W,
|
|
2327
2324
|
disabled: ((J = e.disabledItemPredicate) == null ? void 0 : J.call(e, W)) || !1
|
|
2328
2325
|
}, {
|
|
2329
|
-
default:
|
|
2326
|
+
default: M(({
|
|
2330
2327
|
active: te,
|
|
2331
2328
|
selected: Ye
|
|
2332
2329
|
}) => {
|
|
2333
2330
|
var et, tt;
|
|
2334
2331
|
return [
|
|
2335
|
-
|
|
2332
|
+
p("li", {
|
|
2336
2333
|
class: b(
|
|
2337
2334
|
ke({
|
|
2338
2335
|
active: te,
|
|
@@ -2340,7 +2337,7 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2340
2337
|
})
|
|
2341
2338
|
)
|
|
2342
2339
|
}, [
|
|
2343
|
-
|
|
2340
|
+
p("span", Kl, [
|
|
2344
2341
|
D(C.$slots, "option", {
|
|
2345
2342
|
item: W,
|
|
2346
2343
|
active: te,
|
|
@@ -2350,14 +2347,14 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2350
2347
|
R(V(F(W)), 1)
|
|
2351
2348
|
])
|
|
2352
2349
|
]),
|
|
2353
|
-
!e.hideCheckmarks && Ye ? (a(),
|
|
2350
|
+
!e.hideCheckmarks && Ye ? (a(), m("span", {
|
|
2354
2351
|
key: 0,
|
|
2355
2352
|
class: b([
|
|
2356
2353
|
te ? "text-primary" : "text-foreground",
|
|
2357
2354
|
"absolute inset-y-0 right-0 flex items-center pr-4"
|
|
2358
2355
|
])
|
|
2359
2356
|
}, [
|
|
2360
|
-
z(
|
|
2357
|
+
z(l(ft), {
|
|
2361
2358
|
class: "h-5 w-5",
|
|
2362
2359
|
"aria-hidden": "true"
|
|
2363
2360
|
})
|
|
@@ -2380,11 +2377,11 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2380
2377
|
]),
|
|
2381
2378
|
_: 3
|
|
2382
2379
|
}, 8, ["modelValue", "name", "multiple", "by", "disabled"])),
|
|
2383
|
-
U.value ? (a(),
|
|
2380
|
+
U.value ? (a(), m("p", {
|
|
2384
2381
|
key: 0,
|
|
2385
2382
|
id: U.value,
|
|
2386
2383
|
class: b(["mt-2 text-xs sm:text-sm", q.value])
|
|
2387
|
-
}, V(
|
|
2384
|
+
}, V(A.value), 11, Gl)) : I("", !0)
|
|
2388
2385
|
]));
|
|
2389
2386
|
}
|
|
2390
2387
|
}), Xl = /* @__PURE__ */ P({
|
|
@@ -2393,12 +2390,12 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2393
2390
|
sourceApp: null
|
|
2394
2391
|
},
|
|
2395
2392
|
setup(e) {
|
|
2396
|
-
return (t, r) => (a(),
|
|
2393
|
+
return (t, r) => (a(), L(Xe, {
|
|
2397
2394
|
"color-classes": "text-foreground-on-primary",
|
|
2398
2395
|
rounded: "",
|
|
2399
2396
|
style: ne({ backgroundColor: e.sourceApp.bgColor })
|
|
2400
2397
|
}, {
|
|
2401
|
-
default:
|
|
2398
|
+
default: M(() => [
|
|
2402
2399
|
R(V(e.sourceApp.short), 1)
|
|
2403
2400
|
]),
|
|
2404
2401
|
_: 1
|
|
@@ -2407,10 +2404,10 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2407
2404
|
}), Zl = {
|
|
2408
2405
|
key: 0,
|
|
2409
2406
|
class: "text-foreground-2 normal"
|
|
2410
|
-
},
|
|
2407
|
+
}, Nl = {
|
|
2411
2408
|
key: 1,
|
|
2412
2409
|
class: "flex items-center"
|
|
2413
|
-
},
|
|
2410
|
+
}, Ql = { class: "truncate" }, Jl = { class: "flex items-center" }, Yl = { class: "truncate" }, _o = /* @__PURE__ */ P({
|
|
2414
2411
|
__name: "SourceApps",
|
|
2415
2412
|
props: {
|
|
2416
2413
|
/**
|
|
@@ -2476,72 +2473,72 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2476
2473
|
},
|
|
2477
2474
|
emits: ["update:modelValue"],
|
|
2478
2475
|
setup(e, { emit: t }) {
|
|
2479
|
-
const r = t, s = e, o =
|
|
2476
|
+
const r = t, s = e, o = O(null), n = O(null), { selectedValue: d, hiddenSelectedItemCount: h, isMultiItemArrayValue: i, firstItem: f } = kt({
|
|
2480
2477
|
props: le(s),
|
|
2481
2478
|
emit: r,
|
|
2482
|
-
dynamicVisibility: { elementToWatchForChanges: o, itemContainer:
|
|
2483
|
-
}),
|
|
2484
|
-
return (y, v) => (a(),
|
|
2485
|
-
modelValue:
|
|
2479
|
+
dynamicVisibility: { elementToWatchForChanges: o, itemContainer: n }
|
|
2480
|
+
}), x = (y, v) => y.name.toLocaleLowerCase().includes(v.toLocaleLowerCase());
|
|
2481
|
+
return (y, v) => (a(), L(wt, {
|
|
2482
|
+
modelValue: l(d),
|
|
2486
2483
|
"onUpdate:modelValue": v[0] || (v[0] = (g) => Be(d) ? d.value = g : null),
|
|
2487
2484
|
multiple: e.multiple,
|
|
2488
|
-
items: e.items ??
|
|
2485
|
+
items: e.items ?? l(us),
|
|
2489
2486
|
search: e.search,
|
|
2490
2487
|
"search-placeholder": e.searchPlaceholder,
|
|
2491
2488
|
label: e.label,
|
|
2492
2489
|
"show-label": e.showLabel,
|
|
2493
2490
|
name: e.name || "sourceApps",
|
|
2494
|
-
"filter-predicate":
|
|
2491
|
+
"filter-predicate": x,
|
|
2495
2492
|
clearable: e.clearable,
|
|
2496
2493
|
help: e.help,
|
|
2497
2494
|
by: "name"
|
|
2498
2495
|
}, {
|
|
2499
|
-
"nothing-selected":
|
|
2500
|
-
e.selectorPlaceholder ? (a(),
|
|
2496
|
+
"nothing-selected": M(() => [
|
|
2497
|
+
e.selectorPlaceholder ? (a(), m(K, { key: 0 }, [
|
|
2501
2498
|
R(V(e.selectorPlaceholder), 1)
|
|
2502
|
-
], 64)) : (a(),
|
|
2499
|
+
], 64)) : (a(), m(K, { key: 1 }, [
|
|
2503
2500
|
R(V(e.multiple ? "Select apps" : "Select an app"), 1)
|
|
2504
2501
|
], 64))
|
|
2505
2502
|
]),
|
|
2506
|
-
"something-selected":
|
|
2507
|
-
|
|
2503
|
+
"something-selected": M(({ value: g }) => [
|
|
2504
|
+
l(i)(g) ? (a(), m("div", {
|
|
2508
2505
|
key: 0,
|
|
2509
2506
|
ref_key: "elementToWatchForChanges",
|
|
2510
2507
|
ref: o,
|
|
2511
2508
|
class: "flex items-center space-x-0.5 h-5"
|
|
2512
2509
|
}, [
|
|
2513
|
-
|
|
2510
|
+
p("div", {
|
|
2514
2511
|
ref_key: "itemContainer",
|
|
2515
|
-
ref:
|
|
2512
|
+
ref: n,
|
|
2516
2513
|
class: "flex flex-wrap overflow-hidden space-x-0.5 h-5"
|
|
2517
2514
|
}, [
|
|
2518
|
-
(a(!0),
|
|
2515
|
+
(a(!0), m(K, null, G(g, (u) => (a(), L(Xl, {
|
|
2519
2516
|
key: u.name,
|
|
2520
2517
|
"source-app": u
|
|
2521
2518
|
}, null, 8, ["source-app"]))), 128))
|
|
2522
2519
|
], 512),
|
|
2523
|
-
|
|
2524
|
-
], 512)) : (a(),
|
|
2525
|
-
|
|
2520
|
+
l(h) > 0 ? (a(), m("div", Zl, " +" + V(l(h)), 1)) : I("", !0)
|
|
2521
|
+
], 512)) : (a(), m("div", Nl, [
|
|
2522
|
+
p("div", {
|
|
2526
2523
|
class: "h-2 w-2 rounded-full mr-2",
|
|
2527
|
-
style: ne({ backgroundColor:
|
|
2524
|
+
style: ne({ backgroundColor: l(f)(g).bgColor })
|
|
2528
2525
|
}, null, 4),
|
|
2529
|
-
|
|
2526
|
+
p("span", Ql, V(l(f)(g).name), 1)
|
|
2530
2527
|
]))
|
|
2531
2528
|
]),
|
|
2532
|
-
option:
|
|
2533
|
-
|
|
2534
|
-
|
|
2529
|
+
option: M(({ item: g }) => [
|
|
2530
|
+
p("div", Jl, [
|
|
2531
|
+
p("div", {
|
|
2535
2532
|
class: "h-2 w-2 rounded-full mr-2",
|
|
2536
2533
|
style: ne({ backgroundColor: g.bgColor })
|
|
2537
2534
|
}, null, 4),
|
|
2538
|
-
|
|
2535
|
+
p("span", Yl, V(g.name), 1)
|
|
2539
2536
|
])
|
|
2540
2537
|
]),
|
|
2541
2538
|
_: 1
|
|
2542
2539
|
}, 8, ["modelValue", "multiple", "items", "search", "search-placeholder", "label", "show-label", "name", "clearable", "help"]));
|
|
2543
2540
|
}
|
|
2544
|
-
}), ea = { class: "flex flex-wrap gap-1.5 text-xs" },
|
|
2541
|
+
}), ea = { class: "flex flex-wrap gap-1.5 text-xs" }, Po = /* @__PURE__ */ P({
|
|
2545
2542
|
__name: "Badges",
|
|
2546
2543
|
props: {
|
|
2547
2544
|
items: null,
|
|
@@ -2555,15 +2552,15 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2555
2552
|
},
|
|
2556
2553
|
emits: ["update:modelValue"],
|
|
2557
2554
|
setup(e, { emit: t }) {
|
|
2558
|
-
const r = t, s = e, { selectedValue: o, isArrayValue:
|
|
2555
|
+
const r = t, s = e, { selectedValue: o, isArrayValue: n } = kt({
|
|
2559
2556
|
props: le(s),
|
|
2560
2557
|
emit: r
|
|
2561
|
-
}), d = (
|
|
2562
|
-
|
|
2558
|
+
}), d = (h) => {
|
|
2559
|
+
n(o.value) ? o.value = o.value.filter((i) => i.id !== h.id) : o.value = void 0;
|
|
2563
2560
|
};
|
|
2564
|
-
return (
|
|
2565
|
-
modelValue:
|
|
2566
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
2561
|
+
return (h, i) => (a(), L(wt, {
|
|
2562
|
+
modelValue: l(o),
|
|
2563
|
+
"onUpdate:modelValue": i[0] || (i[0] = (f) => Be(o) ? o.value = f : null),
|
|
2567
2564
|
multiple: e.multiple,
|
|
2568
2565
|
items: e.items,
|
|
2569
2566
|
label: e.label,
|
|
@@ -2572,32 +2569,32 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2572
2569
|
rules: e.rules,
|
|
2573
2570
|
by: e.by
|
|
2574
2571
|
}, {
|
|
2575
|
-
"something-selected":
|
|
2576
|
-
|
|
2577
|
-
(a(!0),
|
|
2578
|
-
key:
|
|
2572
|
+
"something-selected": M(({ value: f }) => [
|
|
2573
|
+
p("ul", ea, [
|
|
2574
|
+
(a(!0), m(K, null, G(l(n)(f) ? f : [f], (x) => (a(), m("li", {
|
|
2575
|
+
key: x[e.by]
|
|
2579
2576
|
}, [
|
|
2580
2577
|
z(Xe, {
|
|
2581
2578
|
size: "lg",
|
|
2582
2579
|
"clickable-icon": !0,
|
|
2583
|
-
"icon-left":
|
|
2584
|
-
onClickIcon: pe((y) => d(
|
|
2580
|
+
"icon-left": l(Ke),
|
|
2581
|
+
onClickIcon: pe((y) => d(x), ["stop"])
|
|
2585
2582
|
}, {
|
|
2586
|
-
default:
|
|
2587
|
-
R(V(
|
|
2583
|
+
default: M(() => [
|
|
2584
|
+
R(V(x.text), 1)
|
|
2588
2585
|
]),
|
|
2589
2586
|
_: 2
|
|
2590
2587
|
}, 1032, ["icon-left", "onClickIcon"])
|
|
2591
2588
|
]))), 128))
|
|
2592
2589
|
])
|
|
2593
2590
|
]),
|
|
2594
|
-
option:
|
|
2595
|
-
R(V(
|
|
2591
|
+
option: M(({ item: f }) => [
|
|
2592
|
+
R(V(f.text), 1)
|
|
2596
2593
|
]),
|
|
2597
2594
|
_: 1
|
|
2598
2595
|
}, 8, ["modelValue", "multiple", "items", "label", "name", "help", "rules", "by"]));
|
|
2599
2596
|
}
|
|
2600
|
-
}), ta = { class: "flex items-center" }, sa = { class: "absolute inset-0 flex items-center gap-2 px-1 text-white" },
|
|
2597
|
+
}), ta = { class: "flex items-center" }, sa = { class: "absolute inset-0 flex items-center gap-2 px-1 text-white" }, jo = /* @__PURE__ */ P({
|
|
2601
2598
|
__name: "Switch",
|
|
2602
2599
|
props: {
|
|
2603
2600
|
modelValue: { type: Boolean }
|
|
@@ -2605,18 +2602,18 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2605
2602
|
emits: ["update:modelValue"],
|
|
2606
2603
|
setup(e) {
|
|
2607
2604
|
const t = it(e, "modelValue");
|
|
2608
|
-
return (r, s) => (a(),
|
|
2609
|
-
z(
|
|
2605
|
+
return (r, s) => (a(), m("div", ta, [
|
|
2606
|
+
z(l(Bs), {
|
|
2610
2607
|
modelValue: t.value,
|
|
2611
2608
|
"onUpdate:modelValue": s[0] || (s[0] = (o) => t.value = o),
|
|
2612
2609
|
class: b(["relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary", { "bg-primary": t.value, "bg-primary-muted": !t.value }])
|
|
2613
2610
|
}, {
|
|
2614
|
-
default:
|
|
2615
|
-
|
|
2616
|
-
z(
|
|
2617
|
-
z(
|
|
2611
|
+
default: M(() => [
|
|
2612
|
+
p("div", sa, [
|
|
2613
|
+
z(l(ft), { class: "h-5 w-5 drop-shadow-md" }),
|
|
2614
|
+
z(l(Ke), { class: "h-5 w-5 drop-shadow-md" })
|
|
2618
2615
|
]),
|
|
2619
|
-
|
|
2616
|
+
p("span", {
|
|
2620
2617
|
class: b(["scale-95 pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200", { "translate-x-5": t.value, "translate-x-0": !t.value }])
|
|
2621
2618
|
}, null, 2)
|
|
2622
2619
|
]),
|
|
@@ -2624,7 +2621,7 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2624
2621
|
}, 8, ["modelValue", "class"])
|
|
2625
2622
|
]));
|
|
2626
2623
|
}
|
|
2627
|
-
}), na = { class: "relative group bg-foundation-page p-2 rounded-lg pr-12" }, la = { class: "absolute inset-0 right-2 flex justify-end items-center" },
|
|
2624
|
+
}), na = { class: "relative group bg-foundation-page p-2 rounded-lg pr-12" }, la = { class: "absolute inset-0 right-2 flex justify-end items-center" }, To = /* @__PURE__ */ P({
|
|
2628
2625
|
__name: "ClipboardInput",
|
|
2629
2626
|
props: {
|
|
2630
2627
|
value: null,
|
|
@@ -2633,19 +2630,23 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2633
2630
|
},
|
|
2634
2631
|
emits: ["copy"],
|
|
2635
2632
|
setup(e, { emit: t }) {
|
|
2636
|
-
const r = e, s = t, { copy: o } =
|
|
2637
|
-
r.value && (await o(r.value), s("copy", r.value))
|
|
2633
|
+
const r = e, s = t, { copy: o } = gs({ legacy: !0 }), n = O(!1), d = async () => {
|
|
2634
|
+
r.value && (await o(r.value), n.value = !0, s("copy", r.value), setTimeout(() => {
|
|
2635
|
+
n.value = !1;
|
|
2636
|
+
}, 2e3));
|
|
2637
|
+
}, h = (i) => {
|
|
2638
|
+
const f = i.target, x = window.getSelection();
|
|
2639
|
+
if (x) {
|
|
2640
|
+
const y = document.createRange();
|
|
2641
|
+
y.selectNodeContents(f), x.removeAllRanges(), x.addRange(y);
|
|
2642
|
+
}
|
|
2638
2643
|
};
|
|
2639
|
-
return (
|
|
2640
|
-
e.isMultiline ? (a(),
|
|
2644
|
+
return (i, f) => (a(), m("div", na, [
|
|
2645
|
+
e.isMultiline ? (a(), m("div", {
|
|
2641
2646
|
key: 0,
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
"model-value": e.value,
|
|
2646
|
-
class: "relative z-10 text-sm text-foreground font-mono",
|
|
2647
|
-
rows: e.rows
|
|
2648
|
-
}, null, 8, ["model-value", "rows"])) : (a(), O(n(xl), {
|
|
2647
|
+
class: "relative z-10 text-xs sm:text-sm text-foreground font-mono break-all p-2 pl-3 max-h-[4.8rem] simple-scrollbar overflow-y-auto",
|
|
2648
|
+
onKeypress: f[0] || (f[0] = (x) => l(gt)(h))
|
|
2649
|
+
}, V(e.value), 33)) : (a(), L(l(xl), {
|
|
2649
2650
|
key: 1,
|
|
2650
2651
|
color: "transparent",
|
|
2651
2652
|
name: "contentInput",
|
|
@@ -2653,33 +2654,33 @@ const Ne = /* @__PURE__ */ Oe(Ml, [["__scopeId", "data-v-89e77cae"]]), _l = { cl
|
|
|
2653
2654
|
"model-value": e.value,
|
|
2654
2655
|
class: "relative z-10 text-sm text-foreground font-mono"
|
|
2655
2656
|
}, null, 8, ["model-value"])),
|
|
2656
|
-
|
|
2657
|
-
z(
|
|
2657
|
+
p("div", la, [
|
|
2658
|
+
z(l(oe), {
|
|
2658
2659
|
color: "invert",
|
|
2659
2660
|
size: "sm",
|
|
2660
|
-
"icon-left": n(
|
|
2661
|
+
"icon-left": n.value ? l(Qt) : l(Jt),
|
|
2661
2662
|
"hide-text": "",
|
|
2662
|
-
onClick:
|
|
2663
|
+
onClick: d
|
|
2663
2664
|
}, null, 8, ["icon-left"])
|
|
2664
2665
|
])
|
|
2665
2666
|
]));
|
|
2666
2667
|
}
|
|
2667
2668
|
});
|
|
2668
2669
|
var $e = /* @__PURE__ */ ((e) => (e.CtrlOrCmd = "cmd-or-ctrl", e.AltOrOpt = "alt-or-opt", e.Shift = "shift", e))($e || {});
|
|
2669
|
-
const Fe =
|
|
2670
|
+
const Fe = cs(), aa = {
|
|
2670
2671
|
"cmd-or-ctrl": Fe === Te.Mac ? "Cmd" : "Ctrl",
|
|
2671
2672
|
"alt-or-opt": Fe === Te.Mac ? "Opt" : "Alt",
|
|
2672
2673
|
shift: "Shift"
|
|
2673
2674
|
};
|
|
2674
|
-
function
|
|
2675
|
+
function Fo(e) {
|
|
2675
2676
|
const t = (r) => Object.values($e).includes(r);
|
|
2676
2677
|
return e.map((r) => t(r) ? aa[r] : r).join("+");
|
|
2677
2678
|
}
|
|
2678
|
-
function
|
|
2679
|
-
|
|
2679
|
+
function Ro(e, ...t) {
|
|
2680
|
+
bs(
|
|
2680
2681
|
t[0],
|
|
2681
2682
|
(r) => {
|
|
2682
|
-
const s = r.getModifierState("Alt"), o = Fe === Te.Mac ? r.getModifierState("Meta") : r.getModifierState("Control"),
|
|
2683
|
+
const s = r.getModifierState("Alt"), o = Fe === Te.Mac ? r.getModifierState("Meta") : r.getModifierState("Control"), n = r.getModifierState("Shift");
|
|
2683
2684
|
for (const d of e)
|
|
2684
2685
|
switch (d) {
|
|
2685
2686
|
case $e.CtrlOrCmd:
|
|
@@ -2691,7 +2692,7 @@ function Fo(e, ...t) {
|
|
|
2691
2692
|
return;
|
|
2692
2693
|
break;
|
|
2693
2694
|
case $e.Shift:
|
|
2694
|
-
if (!
|
|
2695
|
+
if (!n)
|
|
2695
2696
|
return;
|
|
2696
2697
|
break;
|
|
2697
2698
|
}
|
|
@@ -2700,17 +2701,17 @@ function Fo(e, ...t) {
|
|
|
2700
2701
|
t[2]
|
|
2701
2702
|
);
|
|
2702
2703
|
}
|
|
2703
|
-
function
|
|
2704
|
-
const t = (e == null ? void 0 : e.model) ||
|
|
2704
|
+
function Do(e) {
|
|
2705
|
+
const t = (e == null ? void 0 : e.model) || O(), r = c({
|
|
2705
2706
|
get: () => !!t.value,
|
|
2706
2707
|
set: (s) => t.value = s ? !0 : void 0
|
|
2707
2708
|
});
|
|
2708
2709
|
return { model: t, isChecked: r };
|
|
2709
2710
|
}
|
|
2710
|
-
const oa = /* @__PURE__ */
|
|
2711
|
+
const oa = /* @__PURE__ */ p("div", { class: "fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity backdrop-blur-xs" }, null, -1), ra = { class: "fixed inset-0 z-10 h-[100dvh] w-screen" }, ia = { class: "flex justify-center items-center h-full w-full p-4 sm:p-0" }, ua = {
|
|
2711
2712
|
key: 0,
|
|
2712
|
-
class: "flex items-center justify-start rounded-t-lg shrink-0 min-h-[4rem] py-2 px-4 sm:px-8 truncate text-
|
|
2713
|
-
}, ca = { class: "w-full truncate pr-12" },
|
|
2713
|
+
class: "flex items-center justify-start rounded-t-lg shrink-0 min-h-[2rem] sm:min-h-[4rem] py-2 px-4 sm:px-8 truncate text-lg sm:text-2xl font-bold"
|
|
2714
|
+
}, ca = { class: "w-full truncate pr-12" }, Eo = /* @__PURE__ */ P({
|
|
2714
2715
|
__name: "Dialog",
|
|
2715
2716
|
props: {
|
|
2716
2717
|
open: { type: Boolean },
|
|
@@ -2723,7 +2724,7 @@ const oa = /* @__PURE__ */ f("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2723
2724
|
},
|
|
2724
2725
|
emits: ["update:open", "fully-closed"],
|
|
2725
2726
|
setup(e, { emit: t }) {
|
|
2726
|
-
const r = t, s = e, o = We(),
|
|
2727
|
+
const r = t, s = e, o = We(), n = O(!1), d = O(!0), h = c(() => !!s.onSubmit), i = c(() => s.buttons || o.buttons), f = c(() => s.title || o.header), x = c({
|
|
2727
2728
|
get: () => s.open,
|
|
2728
2729
|
set: (S) => r("update:open", S)
|
|
2729
2730
|
}), y = c(() => {
|
|
@@ -2740,26 +2741,26 @@ const oa = /* @__PURE__ */ f("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2740
2741
|
return 1e4;
|
|
2741
2742
|
}
|
|
2742
2743
|
}), v = c(() => {
|
|
2743
|
-
const S = ["w-full", "sm:w-full sm:max-w-
|
|
2744
|
+
const S = ["w-full", "sm:w-full sm:max-w-2xl"];
|
|
2744
2745
|
return y.value >= 1 && S.push("md:max-w-2xl"), y.value >= 2 && S.push("lg:max-w-4xl"), y.value >= 3 && S.push("xl:max-w-6xl"), y.value >= 4 && S.push("2xl:max-w-7xl"), S.join(" ");
|
|
2745
2746
|
}), g = () => {
|
|
2746
|
-
s.preventCloseOnClickOutside || (
|
|
2747
|
+
s.preventCloseOnClickOutside || (x.value = !1);
|
|
2747
2748
|
}, u = ut((S) => {
|
|
2748
|
-
const
|
|
2749
|
-
|
|
2749
|
+
const k = S.target, { scrollTop: $, offsetHeight: B, scrollHeight: T } = k;
|
|
2750
|
+
n.value = $ > 0, d.value = $ + B >= T;
|
|
2750
2751
|
}, 60);
|
|
2751
|
-
return (S,
|
|
2752
|
+
return (S, k) => (a(), L(l(ht), {
|
|
2752
2753
|
as: "template",
|
|
2753
|
-
show:
|
|
2754
|
+
show: x.value
|
|
2754
2755
|
}, {
|
|
2755
|
-
default:
|
|
2756
|
-
z(
|
|
2756
|
+
default: M(() => [
|
|
2757
|
+
z(l(Vs), {
|
|
2757
2758
|
as: "div",
|
|
2758
2759
|
class: "relative z-40",
|
|
2759
2760
|
onClose: g
|
|
2760
2761
|
}, {
|
|
2761
|
-
default:
|
|
2762
|
-
z(
|
|
2762
|
+
default: M(() => [
|
|
2763
|
+
z(l(at), {
|
|
2763
2764
|
as: "template",
|
|
2764
2765
|
enter: "ease-out duration-300",
|
|
2765
2766
|
"enter-from": "opacity-0",
|
|
@@ -2768,14 +2769,14 @@ const oa = /* @__PURE__ */ f("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2768
2769
|
"leave-from": "opacity-100",
|
|
2769
2770
|
"leave-to": "opacity-0"
|
|
2770
2771
|
}, {
|
|
2771
|
-
default:
|
|
2772
|
+
default: M(() => [
|
|
2772
2773
|
oa
|
|
2773
2774
|
]),
|
|
2774
2775
|
_: 1
|
|
2775
2776
|
}),
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
z(
|
|
2777
|
+
p("div", ra, [
|
|
2778
|
+
p("div", ia, [
|
|
2779
|
+
z(l(at), {
|
|
2779
2780
|
as: "template",
|
|
2780
2781
|
enter: "ease-out duration-300",
|
|
2781
2782
|
"enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
@@ -2783,54 +2784,54 @@ const oa = /* @__PURE__ */ f("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2783
2784
|
leave: "ease-in duration-200",
|
|
2784
2785
|
"leave-from": "opacity-100 translate-y-0 sm:scale-100",
|
|
2785
2786
|
"leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
2786
|
-
onAfterLeave:
|
|
2787
|
+
onAfterLeave: k[2] || (k[2] = ($) => S.$emit("fully-closed"))
|
|
2787
2788
|
}, {
|
|
2788
|
-
default:
|
|
2789
|
-
z(
|
|
2789
|
+
default: M(() => [
|
|
2790
|
+
z(l(zs), {
|
|
2790
2791
|
class: b([
|
|
2791
2792
|
"transform rounded-lg text-foreground overflow-hidden bg-foundation text-left shadow-xl transition-all flex flex-col max-h-[90dvh]",
|
|
2792
2793
|
v.value
|
|
2793
2794
|
]),
|
|
2794
|
-
as:
|
|
2795
|
+
as: h.value ? "form" : "div",
|
|
2795
2796
|
onSubmit: pe(e.onSubmit, ["prevent"])
|
|
2796
2797
|
}, {
|
|
2797
|
-
default:
|
|
2798
|
-
|
|
2799
|
-
class: b(
|
|
2798
|
+
default: M(() => [
|
|
2799
|
+
p("div", {
|
|
2800
|
+
class: b(n.value && "relative z-20 shadow-lg")
|
|
2800
2801
|
}, [
|
|
2801
|
-
|
|
2802
|
-
|
|
2802
|
+
f.value ? (a(), m("div", ua, [
|
|
2803
|
+
p("div", ca, [
|
|
2803
2804
|
R(V(e.title) + " ", 1),
|
|
2804
2805
|
D(S.$slots, "header")
|
|
2805
2806
|
])
|
|
2806
2807
|
])) : I("", !0)
|
|
2807
2808
|
], 2),
|
|
2808
|
-
e.hideCloser ? I("", !0) : (a(),
|
|
2809
|
+
e.hideCloser ? I("", !0) : (a(), m("button", {
|
|
2809
2810
|
key: 0,
|
|
2810
|
-
class: b(["absolute z-20
|
|
2811
|
-
onClick:
|
|
2811
|
+
class: b(["absolute z-20 bg-foundation rounded-full p-1", f.value ? "top-2 right-3 sm:top-4" : "right-4 top-3"]),
|
|
2812
|
+
onClick: k[0] || (k[0] = ($) => x.value = !1)
|
|
2812
2813
|
}, [
|
|
2813
|
-
z(
|
|
2814
|
+
z(l(Yt), { class: "h-5 sm:h-6 w-5 sm:w-6" })
|
|
2814
2815
|
], 2)),
|
|
2815
|
-
|
|
2816
|
-
class: b(["flex-1 simple-scrollbar overflow-y-auto",
|
|
2817
|
-
onScroll:
|
|
2818
|
-
(...$) =>
|
|
2816
|
+
p("div", {
|
|
2817
|
+
class: b(["flex-1 simple-scrollbar overflow-y-auto", f.value ? "p-3 sm:py-6 sm:px-8" : "p-10"]),
|
|
2818
|
+
onScroll: k[1] || (k[1] = //@ts-ignore
|
|
2819
|
+
(...$) => l(u) && l(u)(...$))
|
|
2819
2820
|
}, [
|
|
2820
2821
|
D(S.$slots, "default", {}, () => [
|
|
2821
2822
|
R("Put your content here!")
|
|
2822
2823
|
])
|
|
2823
2824
|
], 34),
|
|
2824
|
-
i.value ? (a(),
|
|
2825
|
+
i.value ? (a(), m("div", {
|
|
2825
2826
|
key: 1,
|
|
2826
|
-
class: b(["flex px-4 py-2 sm:py-4 sm:px-6 gap-2 shrink-0", !d.value && "shadow-t"])
|
|
2827
|
+
class: b(["relative z-50 flex px-4 py-2 sm:py-4 sm:px-6 gap-2 shrink-0 bg-foundation", !d.value && "shadow-t"])
|
|
2827
2828
|
}, [
|
|
2828
|
-
e.buttons ? (a(!0),
|
|
2829
|
+
e.buttons ? (a(!0), m(K, { key: 0 }, G(e.buttons, ($, B) => (a(), L(l(oe), ie({ key: B }, $.props, {
|
|
2829
2830
|
disabled: $.disabled,
|
|
2830
2831
|
type: $.submit && "submit",
|
|
2831
2832
|
onClick: $.onClick
|
|
2832
2833
|
}), {
|
|
2833
|
-
default:
|
|
2834
|
+
default: M(() => [
|
|
2834
2835
|
R(V($.text), 1)
|
|
2835
2836
|
]),
|
|
2836
2837
|
_: 2
|
|
@@ -2851,7 +2852,7 @@ const oa = /* @__PURE__ */ f("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2851
2852
|
_: 3
|
|
2852
2853
|
}, 8, ["show"]));
|
|
2853
2854
|
}
|
|
2854
|
-
}), da = { class: "h-4 sm:h-5 h-4 sm:w-5 empty:h-0 empty:w-0" },
|
|
2855
|
+
}), da = { class: "h-4 sm:h-5 h-4 sm:w-5 empty:h-0 empty:w-0" }, Uo = /* @__PURE__ */ P({
|
|
2855
2856
|
__name: "DialogSection",
|
|
2856
2857
|
props: {
|
|
2857
2858
|
title: String,
|
|
@@ -2863,10 +2864,14 @@ const oa = /* @__PURE__ */ f("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2863
2864
|
default: "default"
|
|
2864
2865
|
},
|
|
2865
2866
|
button: Object,
|
|
2866
|
-
alwaysOpen: Boolean
|
|
2867
|
+
alwaysOpen: Boolean,
|
|
2868
|
+
lazyLoad: {
|
|
2869
|
+
type: Boolean,
|
|
2870
|
+
default: !1
|
|
2871
|
+
}
|
|
2867
2872
|
},
|
|
2868
2873
|
setup(e) {
|
|
2869
|
-
const t = e, r =
|
|
2874
|
+
const t = e, r = O(null), s = O(0), o = O(!1), n = c(() => {
|
|
2870
2875
|
const i = [];
|
|
2871
2876
|
return !t.button && !t.alwaysOpen && i.push("cursor-pointer", "hover:bg-foundation"), o.value && i.push("bg-foundation"), i;
|
|
2872
2877
|
}), d = c(() => {
|
|
@@ -2884,58 +2889,58 @@ const oa = /* @__PURE__ */ f("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2884
2889
|
default:
|
|
2885
2890
|
return "text-foreground";
|
|
2886
2891
|
}
|
|
2887
|
-
}),
|
|
2892
|
+
}), h = async () => {
|
|
2888
2893
|
var i;
|
|
2889
|
-
o.value = !o.value, o.value && (s.value = (((i =
|
|
2894
|
+
o.value = !o.value, o.value && (await At(), s.value = (((i = l(r)) == null ? void 0 : i.scrollHeight) || 0) + 64);
|
|
2890
2895
|
};
|
|
2891
|
-
return (i,
|
|
2892
|
-
var
|
|
2893
|
-
return a(),
|
|
2896
|
+
return (i, f) => {
|
|
2897
|
+
var x, y;
|
|
2898
|
+
return a(), m("div", {
|
|
2894
2899
|
class: b(["flex flex-col border-primary-muted", {
|
|
2895
2900
|
"border-t": e.borderT,
|
|
2896
2901
|
"border-b": e.borderB,
|
|
2897
2902
|
"relative z-10": o.value
|
|
2898
2903
|
}])
|
|
2899
2904
|
}, [
|
|
2900
|
-
|
|
2901
|
-
class: ["flex justify-between items-center gap-4 sm:gap-8 py-3 sm:py-4 px-2",
|
|
2905
|
+
p("div", ie({
|
|
2906
|
+
class: ["flex justify-between items-center gap-4 sm:gap-8 py-3 sm:py-4 px-2", n.value],
|
|
2902
2907
|
tabindex: "0"
|
|
2903
2908
|
}, st(
|
|
2904
2909
|
!e.button && !e.alwaysOpen ? {
|
|
2905
|
-
click:
|
|
2906
|
-
keypress:
|
|
2910
|
+
click: h,
|
|
2911
|
+
keypress: l(gt)(h)
|
|
2907
2912
|
} : {},
|
|
2908
2913
|
!0
|
|
2909
2914
|
)), [
|
|
2910
|
-
|
|
2915
|
+
p("div", {
|
|
2911
2916
|
class: b(["text-sm sm:text-base font-bold flex items-center gap-1 sm:gap-2 select-none", d.value])
|
|
2912
2917
|
}, [
|
|
2913
|
-
|
|
2918
|
+
p("div", da, [
|
|
2914
2919
|
D(i.$slots, "icon")
|
|
2915
2920
|
]),
|
|
2916
|
-
|
|
2921
|
+
p("span", null, V(e.title), 1)
|
|
2917
2922
|
], 2),
|
|
2918
|
-
|
|
2919
|
-
!e.button && !e.alwaysOpen ? (a(),
|
|
2923
|
+
p("div", null, [
|
|
2924
|
+
!e.button && !e.alwaysOpen ? (a(), L(l(es), {
|
|
2920
2925
|
key: 0,
|
|
2921
2926
|
class: b(["w-4 h-4 sm:w-5 sm:h-5 transition-all duration-400", o.value && "rotate-180"])
|
|
2922
2927
|
}, null, 8, ["class"])) : I("", !0),
|
|
2923
|
-
e.button ? (a(),
|
|
2928
|
+
e.button ? (a(), L(l(oe), ie({
|
|
2924
2929
|
key: 1,
|
|
2925
2930
|
size: "sm",
|
|
2926
2931
|
to: e.button.expandContent ? void 0 : e.button.to,
|
|
2927
2932
|
color: e.button.expandContent && o.value ? "invert" : e.button.color,
|
|
2928
2933
|
"icon-right": e.button.expandContent && o.value ? void 0 : e.button.iconRight,
|
|
2929
|
-
onClick: (
|
|
2930
|
-
}, st((y = e.button) != null && y.expandContent ? { click:
|
|
2931
|
-
default:
|
|
2934
|
+
onClick: (x = e.button) == null ? void 0 : x.onClick
|
|
2935
|
+
}, st((y = e.button) != null && y.expandContent ? { click: h } : {})), {
|
|
2936
|
+
default: M(() => [
|
|
2932
2937
|
R(V(e.button.expandContent && o.value ? "Cancel" : e.button.text), 1)
|
|
2933
2938
|
]),
|
|
2934
2939
|
_: 1
|
|
2935
2940
|
}, 16, ["to", "color", "icon-right", "onClick"])) : I("", !0)
|
|
2936
2941
|
])
|
|
2937
2942
|
], 16),
|
|
2938
|
-
|
|
2943
|
+
p("div", {
|
|
2939
2944
|
class: b(["transition-all duration-700 overflow-hidden", [
|
|
2940
2945
|
e.allowOverflow && o.value ? "!overflow-visible" : "",
|
|
2941
2946
|
o.value ? "mb-3 mt-1" : "",
|
|
@@ -2945,7 +2950,19 @@ const oa = /* @__PURE__ */ f("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2945
2950
|
e.alwaysOpen ? "max-height: none;" : `max-height: ${o.value ? s.value + "px" : "0px"}`
|
|
2946
2951
|
)
|
|
2947
2952
|
}, [
|
|
2948
|
-
|
|
2953
|
+
t.lazyLoad ? (a(), m(K, { key: 0 }, [
|
|
2954
|
+
o.value || t.alwaysOpen ? (a(), m("div", {
|
|
2955
|
+
key: 0,
|
|
2956
|
+
ref_key: "content",
|
|
2957
|
+
ref: r,
|
|
2958
|
+
class: "rounded-md text-sm pb-3 px-2 mt-1"
|
|
2959
|
+
}, [
|
|
2960
|
+
D(i.$slots, "default", {}, () => [
|
|
2961
|
+
R("Panel contents")
|
|
2962
|
+
])
|
|
2963
|
+
], 512)) : I("", !0)
|
|
2964
|
+
], 64)) : (a(), m("div", {
|
|
2965
|
+
key: 1,
|
|
2949
2966
|
ref_key: "content",
|
|
2950
2967
|
ref: r,
|
|
2951
2968
|
class: "rounded-md text-sm pb-3 px-2 mt-1"
|
|
@@ -2953,12 +2970,12 @@ const oa = /* @__PURE__ */ f("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2953
2970
|
D(i.$slots, "default", {}, () => [
|
|
2954
2971
|
R("Panel contents")
|
|
2955
2972
|
])
|
|
2956
|
-
], 512)
|
|
2973
|
+
], 512))
|
|
2957
2974
|
], 6)
|
|
2958
2975
|
], 2);
|
|
2959
2976
|
};
|
|
2960
2977
|
}
|
|
2961
|
-
}), fa = { class: "inline-flex items-center space-x-2" }, pa = { class: "label-light" },
|
|
2978
|
+
}), fa = { class: "inline-flex items-center space-x-2" }, pa = { class: "label-light" }, qo = /* @__PURE__ */ P({
|
|
2962
2979
|
__name: "Disclosure",
|
|
2963
2980
|
props: {
|
|
2964
2981
|
title: null,
|
|
@@ -3012,31 +3029,31 @@ const oa = /* @__PURE__ */ f("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
3012
3029
|
}
|
|
3013
3030
|
return o.join(" ");
|
|
3014
3031
|
});
|
|
3015
|
-
return (o,
|
|
3016
|
-
z(
|
|
3017
|
-
default:
|
|
3018
|
-
z(
|
|
3032
|
+
return (o, n) => (a(), m("div", null, [
|
|
3033
|
+
z(l(Os), null, {
|
|
3034
|
+
default: M(({ open: d }) => [
|
|
3035
|
+
z(l(Ls), {
|
|
3019
3036
|
class: b(r.value)
|
|
3020
3037
|
}, {
|
|
3021
|
-
default:
|
|
3022
|
-
|
|
3023
|
-
e.icon ? (a(),
|
|
3038
|
+
default: M(() => [
|
|
3039
|
+
p("div", fa, [
|
|
3040
|
+
e.icon ? (a(), L(Q(e.icon), {
|
|
3024
3041
|
key: 0,
|
|
3025
3042
|
class: "h-5 w-5"
|
|
3026
3043
|
})) : I("", !0),
|
|
3027
|
-
|
|
3044
|
+
p("span", null, V(e.title), 1)
|
|
3028
3045
|
]),
|
|
3029
|
-
z(
|
|
3046
|
+
z(l(dt), {
|
|
3030
3047
|
class: b([d ? "" : "rotate-180 transform", "h-5 w-5"])
|
|
3031
3048
|
}, null, 8, ["class"])
|
|
3032
3049
|
]),
|
|
3033
3050
|
_: 2
|
|
3034
3051
|
}, 1032, ["class"]),
|
|
3035
|
-
z(
|
|
3052
|
+
z(l(Ms), {
|
|
3036
3053
|
class: b(s.value)
|
|
3037
3054
|
}, {
|
|
3038
|
-
default:
|
|
3039
|
-
|
|
3055
|
+
default: M(() => [
|
|
3056
|
+
p("div", pa, [
|
|
3040
3057
|
D(o.$slots, "default", {}, () => [
|
|
3041
3058
|
R("Panel contents")
|
|
3042
3059
|
])
|
|
@@ -3051,7 +3068,7 @@ const oa = /* @__PURE__ */ f("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
3051
3068
|
}
|
|
3052
3069
|
});
|
|
3053
3070
|
var de = /* @__PURE__ */ ((e) => (e.Grid = "grid", e.List = "list", e))(de || {});
|
|
3054
|
-
const ma = { class: "relative flex bg-foundation rounded-md" }, ha = { class: "relative z-10 flex gap-1 items-center p-1 rounded-l" }, va = { class: "relative z-10 flex gap-1 items-center p-1 rounded-r" },
|
|
3071
|
+
const ma = { class: "relative flex bg-foundation rounded-md" }, ha = { class: "relative z-10 flex gap-1 items-center p-1 rounded-l" }, va = { class: "relative z-10 flex gap-1 items-center p-1 rounded-r" }, Wo = /* @__PURE__ */ P({
|
|
3055
3072
|
__name: "GridListToggle",
|
|
3056
3073
|
props: {
|
|
3057
3074
|
modelValue: null
|
|
@@ -3061,30 +3078,30 @@ const ma = { class: "relative flex bg-foundation rounded-md" }, ha = { class: "r
|
|
|
3061
3078
|
const r = t, s = e, o = c({
|
|
3062
3079
|
get: () => s.modelValue || de.Grid,
|
|
3063
3080
|
set: (d) => r("update:modelValue", d)
|
|
3064
|
-
}),
|
|
3081
|
+
}), n = (d) => {
|
|
3065
3082
|
r("click", d);
|
|
3066
|
-
const
|
|
3067
|
-
o.value =
|
|
3083
|
+
const h = o.value === de.Grid ? de.List : de.Grid;
|
|
3084
|
+
o.value = h;
|
|
3068
3085
|
};
|
|
3069
|
-
return (d,
|
|
3086
|
+
return (d, h) => (a(), m("button", {
|
|
3070
3087
|
class: "max-w-max transition flex justify-center items-center gap-2 outline-none select-none h-8 text-foreground border-2 bg-foundation border-foundation-2 rounded-md hover:ring-2 active:scale-[0.97] grow",
|
|
3071
|
-
onClick:
|
|
3088
|
+
onClick: n
|
|
3072
3089
|
}, [
|
|
3073
|
-
|
|
3074
|
-
|
|
3090
|
+
p("div", ma, [
|
|
3091
|
+
p("div", {
|
|
3075
3092
|
class: b(["absolute -top-[2px] -left-[2px] transition", {
|
|
3076
|
-
"translate-x-7": o.value !==
|
|
3093
|
+
"translate-x-7": o.value !== l(de).Grid
|
|
3077
3094
|
}])
|
|
3078
3095
|
}, [
|
|
3079
|
-
|
|
3080
|
-
class: b([o.value !==
|
|
3096
|
+
p("div", {
|
|
3097
|
+
class: b([o.value !== l(de).Grid ? "rounded-r-md" : "rounded-l-md", "w-8 h-8 bg-primary-muted shadow-inner transition"])
|
|
3081
3098
|
}, null, 2)
|
|
3082
3099
|
], 2),
|
|
3083
|
-
|
|
3084
|
-
z(
|
|
3100
|
+
p("div", ha, [
|
|
3101
|
+
z(l(Wt), { class: "h-5 w-5" })
|
|
3085
3102
|
]),
|
|
3086
|
-
|
|
3087
|
-
z(
|
|
3103
|
+
p("div", va, [
|
|
3104
|
+
z(l(Ht), { class: "h-5 w-5" })
|
|
3088
3105
|
])
|
|
3089
3106
|
])
|
|
3090
3107
|
]));
|
|
@@ -3101,7 +3118,7 @@ function ba(e, t) {
|
|
|
3101
3118
|
} = t || {}, o = r ? s === 0 ? ut(e, r) : He(e, r) : e;
|
|
3102
3119
|
ae(() => window.addEventListener("resize", o)), Ue(() => window.removeEventListener("resize", o));
|
|
3103
3120
|
}
|
|
3104
|
-
function
|
|
3121
|
+
function Ho(e) {
|
|
3105
3122
|
ae(() => {
|
|
3106
3123
|
window.addEventListener("beforeunload", e);
|
|
3107
3124
|
}), Ue(() => {
|
|
@@ -3109,35 +3126,35 @@ function Wo(e) {
|
|
|
3109
3126
|
});
|
|
3110
3127
|
}
|
|
3111
3128
|
function ya(e) {
|
|
3112
|
-
const { el: t, defaultDirection: r } = e, s =
|
|
3129
|
+
const { el: t, defaultDirection: r } = e, s = O(
|
|
3113
3130
|
ge(r) ? 1 : r
|
|
3114
3131
|
/* Right */
|
|
3115
3132
|
), o = c(() => {
|
|
3116
|
-
const d =
|
|
3133
|
+
const d = l(e.stopUpdatesBelowWidth);
|
|
3117
3134
|
if (!ge(d))
|
|
3118
3135
|
return d;
|
|
3119
|
-
const
|
|
3120
|
-
return
|
|
3121
|
-
}),
|
|
3136
|
+
const h = l(t);
|
|
3137
|
+
return h != null && h.offsetWidth ? h.offsetWidth * 2 : void 0;
|
|
3138
|
+
}), n = () => {
|
|
3122
3139
|
if (!Ge)
|
|
3123
3140
|
return;
|
|
3124
|
-
const d =
|
|
3141
|
+
const d = l(t);
|
|
3125
3142
|
if (!d)
|
|
3126
3143
|
return;
|
|
3127
|
-
const
|
|
3128
|
-
i &&
|
|
3144
|
+
const h = d.getBoundingClientRect(), i = h.x + h.width > window.innerWidth, f = h.x < 0;
|
|
3145
|
+
i && f || !ge(o.value) && window.innerWidth < o.value || (i ? s.value = 0 : f && (s.value = 1));
|
|
3129
3146
|
};
|
|
3130
|
-
return ba(() =>
|
|
3131
|
-
() =>
|
|
3147
|
+
return ba(() => n()), fe(
|
|
3148
|
+
() => l(t),
|
|
3132
3149
|
(d) => {
|
|
3133
|
-
d &&
|
|
3150
|
+
d && n();
|
|
3134
3151
|
}
|
|
3135
3152
|
), {
|
|
3136
3153
|
direction: c(() => s.value),
|
|
3137
|
-
recalculateDirection:
|
|
3154
|
+
recalculateDirection: n
|
|
3138
3155
|
};
|
|
3139
3156
|
}
|
|
3140
|
-
const xa = ["disabled", "onClick"],
|
|
3157
|
+
const xa = ["disabled", "onClick"], Ko = /* @__PURE__ */ P({
|
|
3141
3158
|
__name: "Menu",
|
|
3142
3159
|
props: {
|
|
3143
3160
|
open: { type: Boolean },
|
|
@@ -3145,48 +3162,48 @@ const xa = ["disabled", "onClick"], Ho = /* @__PURE__ */ P({
|
|
|
3145
3162
|
},
|
|
3146
3163
|
emits: ["update:open", "chosen"],
|
|
3147
3164
|
setup(e, { emit: t }) {
|
|
3148
|
-
const r = t, s = e, o =
|
|
3165
|
+
const r = t, s = e, o = O(null), { direction: n } = ya({
|
|
3149
3166
|
el: c(() => {
|
|
3150
3167
|
var g;
|
|
3151
3168
|
return ((g = o.value) == null ? void 0 : g.el) || null;
|
|
3152
3169
|
}),
|
|
3153
3170
|
defaultDirection: Re.Left,
|
|
3154
3171
|
stopUpdatesBelowWidth: 300
|
|
3155
|
-
}), d =
|
|
3172
|
+
}), d = O(null), h = O(!1), i = c({
|
|
3156
3173
|
get: () => s.open || !1,
|
|
3157
3174
|
set: (g) => r("update:open", g)
|
|
3158
|
-
}),
|
|
3159
|
-
const { active: u, disabled: S, color:
|
|
3175
|
+
}), f = (g) => {
|
|
3176
|
+
const { active: u, disabled: S, color: k } = g, $ = [
|
|
3160
3177
|
"group flex gap-3 w-full items-center rounded-md px-2 py-1.5 text-sm"
|
|
3161
3178
|
];
|
|
3162
|
-
return u && !
|
|
3163
|
-
},
|
|
3179
|
+
return u && !k ? $.push("bg-foundation-focus text-foreground") : S ? $.push("text-foreground-disabled") : k === "danger" && u ? $.push("text-foreground-on-primary bg-danger") : k === "danger" && !u ? $.push("text-danger") : k === "info" && u ? $.push("text-foreground-on-primary bg-info") : k === "info" && !u ? $.push("text-info") : $.push("text-foreground"), $.join(" ");
|
|
3180
|
+
}, x = (g, u) => {
|
|
3164
3181
|
r("chosen", { item: g, event: u });
|
|
3165
3182
|
}, y = () => {
|
|
3166
3183
|
var g;
|
|
3167
3184
|
return (g = d.value) == null ? void 0 : g.el.click();
|
|
3168
3185
|
}, v = (g) => {
|
|
3169
3186
|
const u = !!g;
|
|
3170
|
-
return
|
|
3187
|
+
return h.value = u, u;
|
|
3171
3188
|
};
|
|
3172
|
-
return fe(
|
|
3189
|
+
return fe(h, (g, u) => {
|
|
3173
3190
|
g !== u && (i.value = g);
|
|
3174
3191
|
}), fe(i, (g) => {
|
|
3175
|
-
(g && !
|
|
3176
|
-
}), (g, u) => (a(),
|
|
3192
|
+
(g && !h.value || !g && h.value) && y();
|
|
3193
|
+
}), (g, u) => (a(), L(l(As), {
|
|
3177
3194
|
as: "div",
|
|
3178
3195
|
class: "relative inline-block"
|
|
3179
3196
|
}, {
|
|
3180
|
-
default:
|
|
3181
|
-
|
|
3182
|
-
z(
|
|
3197
|
+
default: M(({ open: S }) => [
|
|
3198
|
+
p("div", null, [
|
|
3199
|
+
z(l(_s), {
|
|
3183
3200
|
ref_key: "menuButton",
|
|
3184
3201
|
ref: d,
|
|
3185
3202
|
class: "hidden",
|
|
3186
3203
|
onClick: u[0] || (u[0] = pe(() => {
|
|
3187
3204
|
}, ["stop", "prevent"]))
|
|
3188
3205
|
}, null, 512),
|
|
3189
|
-
|
|
3206
|
+
p("div", {
|
|
3190
3207
|
class: b(S ? "pointer-events-none" : "")
|
|
3191
3208
|
}, [
|
|
3192
3209
|
D(g.$slots, "default", {
|
|
@@ -3203,33 +3220,33 @@ const xa = ["disabled", "onClick"], Ho = /* @__PURE__ */ P({
|
|
|
3203
3220
|
"leave-from-class": "transform scale-100 opacity-100",
|
|
3204
3221
|
"leave-to-class": "transform scale-95 opacity-0"
|
|
3205
3222
|
}, {
|
|
3206
|
-
default:
|
|
3207
|
-
z(
|
|
3223
|
+
default: M(() => [
|
|
3224
|
+
z(l(Ps), {
|
|
3208
3225
|
ref_key: "menuItems",
|
|
3209
3226
|
ref: o,
|
|
3210
3227
|
class: b([
|
|
3211
3228
|
"absolute mt-2 w-48 origin-top-right divide-y divide-outline-3 rounded-md bg-foundation shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-40",
|
|
3212
|
-
n
|
|
3229
|
+
l(n) === l(Re).Left ? "right-0" : ""
|
|
3213
3230
|
])
|
|
3214
3231
|
}, {
|
|
3215
|
-
default:
|
|
3216
|
-
(a(!0),
|
|
3232
|
+
default: M(() => [
|
|
3233
|
+
(a(!0), m(K, null, G(e.items, (k, $) => (a(), m("div", {
|
|
3217
3234
|
key: $,
|
|
3218
3235
|
class: "p-1"
|
|
3219
3236
|
}, [
|
|
3220
|
-
(a(!0),
|
|
3237
|
+
(a(!0), m(K, null, G(k, (B) => (a(), L(l(js), {
|
|
3221
3238
|
key: B.id,
|
|
3222
3239
|
disabled: B.disabled,
|
|
3223
3240
|
color: B.color
|
|
3224
3241
|
}, {
|
|
3225
|
-
default:
|
|
3226
|
-
be((a(),
|
|
3227
|
-
|
|
3228
|
-
class: b(
|
|
3229
|
-
disabled:
|
|
3230
|
-
onClick: (w) =>
|
|
3242
|
+
default: M(({ active: T, disabled: A }) => [
|
|
3243
|
+
be((a(), m("span", null, [
|
|
3244
|
+
p("button", {
|
|
3245
|
+
class: b(f({ active: T, disabled: A, color: B.color })),
|
|
3246
|
+
disabled: A,
|
|
3247
|
+
onClick: (w) => x(B, w)
|
|
3231
3248
|
}, [
|
|
3232
|
-
B.icon ? (a(),
|
|
3249
|
+
B.icon ? (a(), L(Q(B.icon), {
|
|
3233
3250
|
key: 0,
|
|
3234
3251
|
class: "h-5 w-5"
|
|
3235
3252
|
})) : I("", !0),
|
|
@@ -3238,7 +3255,7 @@ const xa = ["disabled", "onClick"], Ho = /* @__PURE__ */ P({
|
|
|
3238
3255
|
])
|
|
3239
3256
|
], 10, xa)
|
|
3240
3257
|
])), [
|
|
3241
|
-
[
|
|
3258
|
+
[l(vt), B.disabled && B.disabledTooltip]
|
|
3242
3259
|
])
|
|
3243
3260
|
]),
|
|
3244
3261
|
_: 2
|
|
@@ -3254,33 +3271,33 @@ const xa = ["disabled", "onClick"], Ho = /* @__PURE__ */ P({
|
|
|
3254
3271
|
_: 3
|
|
3255
3272
|
}));
|
|
3256
3273
|
}
|
|
3257
|
-
}), ka = { class: "flex flex-col
|
|
3274
|
+
}), ka = { class: "flex flex-col gap-y-0 sm:gap-y-4" }, wa = { class: "flex gap-x-6" }, Go = /* @__PURE__ */ P({
|
|
3258
3275
|
__name: "Tabs",
|
|
3259
3276
|
props: {
|
|
3260
3277
|
items: null
|
|
3261
3278
|
},
|
|
3262
3279
|
setup(e) {
|
|
3263
|
-
const t = e, r =
|
|
3264
|
-
r.value =
|
|
3280
|
+
const t = e, r = O(null), s = c(() => r.value && t.items.find((n) => n.id === r.value) || t.items[0]), o = (n) => {
|
|
3281
|
+
r.value = n.id;
|
|
3265
3282
|
};
|
|
3266
|
-
return (
|
|
3267
|
-
|
|
3268
|
-
(a(!0),
|
|
3269
|
-
key:
|
|
3283
|
+
return (n, d) => (a(), m("div", ka, [
|
|
3284
|
+
p("div", wa, [
|
|
3285
|
+
(a(!0), m(K, null, G(e.items, (h) => (a(), L(oe, {
|
|
3286
|
+
key: h.id,
|
|
3270
3287
|
link: "",
|
|
3271
|
-
color: s.value.id ===
|
|
3272
|
-
onClick: (i) => o(
|
|
3288
|
+
color: s.value.id === h.id ? "default" : "secondary",
|
|
3289
|
+
onClick: (i) => o(h)
|
|
3273
3290
|
}, {
|
|
3274
|
-
default:
|
|
3275
|
-
R(V(
|
|
3291
|
+
default: M(() => [
|
|
3292
|
+
R(V(h.title), 1)
|
|
3276
3293
|
]),
|
|
3277
3294
|
_: 2
|
|
3278
3295
|
}, 1032, ["color", "onClick"]))), 128))
|
|
3279
3296
|
]),
|
|
3280
|
-
D(
|
|
3297
|
+
D(n.$slots, "default", { activeItem: s.value })
|
|
3281
3298
|
]));
|
|
3282
3299
|
}
|
|
3283
|
-
}), Ca = { class: "text-foreground" }, $a = { class: "w-full text-sm overflow-x-auto overflow-y-visible simple-scrollbar" }, Ia = ["onClick", "onKeypress"], Sa = /* @__PURE__ */
|
|
3300
|
+
}), Ca = { class: "text-foreground" }, $a = { class: "w-full text-sm overflow-x-auto overflow-y-visible simple-scrollbar" }, Ia = ["onClick", "onKeypress"], Sa = /* @__PURE__ */ p("div", { class: "text-gray-900 font-medium order-1" }, "Placeholder", -1), Ba = { class: "absolute right-1.5 gap-1 flex items-center p-0" }, Xo = /* @__PURE__ */ P({
|
|
3284
3301
|
__name: "Table",
|
|
3285
3302
|
props: {
|
|
3286
3303
|
items: null,
|
|
@@ -3292,61 +3309,61 @@ const xa = ["disabled", "onClick"], Ho = /* @__PURE__ */ P({
|
|
|
3292
3309
|
setup(e) {
|
|
3293
3310
|
const t = e, r = c(() => {
|
|
3294
3311
|
const d = (t.buttons || []).length;
|
|
3295
|
-
let
|
|
3296
|
-
return d > 0 && (
|
|
3312
|
+
let h = 16;
|
|
3313
|
+
return d > 0 && (h = 48 + (d - 1) * 42), `${h}px`;
|
|
3297
3314
|
}), s = (d) => {
|
|
3298
|
-
var
|
|
3299
|
-
return ((
|
|
3300
|
-
}, o = (d,
|
|
3315
|
+
var h;
|
|
3316
|
+
return ((h = t.columns.find((i) => i.id === d)) == null ? void 0 : h.classes) || "";
|
|
3317
|
+
}, o = (d, h) => {
|
|
3301
3318
|
const i = s(d);
|
|
3302
|
-
return
|
|
3303
|
-
},
|
|
3304
|
-
var
|
|
3305
|
-
(
|
|
3319
|
+
return h === 0 ? `bg-transparent py-3 pr-5 px-1 ${i}` : `lg:p-0 px-1 my-2 ${i}`;
|
|
3320
|
+
}, n = (d) => {
|
|
3321
|
+
var h;
|
|
3322
|
+
(h = t.onRowClick) == null || h.call(t, d);
|
|
3306
3323
|
};
|
|
3307
|
-
return (d,
|
|
3308
|
-
|
|
3309
|
-
e.items.length > 0 ? (a(),
|
|
3324
|
+
return (d, h) => (a(), m("div", Ca, [
|
|
3325
|
+
p("div", $a, [
|
|
3326
|
+
e.items.length > 0 ? (a(), m("div", {
|
|
3310
3327
|
key: 0,
|
|
3311
3328
|
class: "grid z-10 grid-cols-12 items-center gap-6 font-semibold bg-foundation rounded-t-lg w-full border-b border-outline-3 pb-2 pt-4 px-4 min-w-[900px]",
|
|
3312
3329
|
style: ne({ paddingRight: r.value })
|
|
3313
3330
|
}, [
|
|
3314
|
-
(a(!0),
|
|
3331
|
+
(a(!0), m(K, null, G(e.columns, (i) => (a(), m("div", {
|
|
3315
3332
|
key: i.id,
|
|
3316
3333
|
class: b([s(i.id), "capitalize"])
|
|
3317
3334
|
}, V(i.header), 3))), 128))
|
|
3318
3335
|
], 4)) : I("", !0),
|
|
3319
|
-
|
|
3336
|
+
p("div", {
|
|
3320
3337
|
class: b(["divide-y divide-outline-3 h-full overflow-visible", { "pb-32": e.overflowCells }])
|
|
3321
3338
|
}, [
|
|
3322
|
-
(a(!0),
|
|
3339
|
+
(a(!0), m(K, null, G(e.items, (i) => (a(), m("div", {
|
|
3323
3340
|
key: i.id,
|
|
3324
3341
|
class: b(["relative grid grid-cols-12 items-center gap-6 px-4 py-1 min-w-[900px] bg-foundation", { "cursor-pointer hover:bg-primary-muted": !!e.onRowClick }]),
|
|
3325
3342
|
style: ne({ paddingRight: r.value }),
|
|
3326
3343
|
tabindex: "0",
|
|
3327
|
-
onClick: (
|
|
3328
|
-
onKeypress: (
|
|
3344
|
+
onClick: (f) => n(i),
|
|
3345
|
+
onKeypress: (f) => n(i)
|
|
3329
3346
|
}, [
|
|
3330
|
-
(a(!0),
|
|
3331
|
-
key:
|
|
3332
|
-
class: b(o(
|
|
3347
|
+
(a(!0), m(K, null, G(e.columns, (f, x) => (a(), m("div", {
|
|
3348
|
+
key: f.id,
|
|
3349
|
+
class: b(o(f.id, x)),
|
|
3333
3350
|
tabindex: "0"
|
|
3334
3351
|
}, [
|
|
3335
|
-
D(d.$slots,
|
|
3352
|
+
D(d.$slots, f.id, { item: i }, () => [
|
|
3336
3353
|
Sa
|
|
3337
3354
|
])
|
|
3338
3355
|
], 2))), 128)),
|
|
3339
|
-
|
|
3340
|
-
(a(!0),
|
|
3341
|
-
key:
|
|
3356
|
+
p("div", Ba, [
|
|
3357
|
+
(a(!0), m(K, null, G(e.buttons, (f) => (a(), m("div", {
|
|
3358
|
+
key: f.label
|
|
3342
3359
|
}, [
|
|
3343
|
-
z(
|
|
3344
|
-
"icon-left":
|
|
3360
|
+
z(l(oe), {
|
|
3361
|
+
"icon-left": f.icon,
|
|
3345
3362
|
size: "sm",
|
|
3346
3363
|
color: "secondary",
|
|
3347
3364
|
"hide-text": "",
|
|
3348
|
-
class: b(
|
|
3349
|
-
onClick: pe((
|
|
3365
|
+
class: b(f.class),
|
|
3366
|
+
onClick: pe((x) => f.action(i), ["stop"])
|
|
3350
3367
|
}, null, 8, ["icon-left", "class", "onClick"])
|
|
3351
3368
|
]))), 128))
|
|
3352
3369
|
])
|
|
@@ -3355,7 +3372,7 @@ const xa = ["disabled", "onClick"], Ho = /* @__PURE__ */ P({
|
|
|
3355
3372
|
])
|
|
3356
3373
|
]));
|
|
3357
3374
|
}
|
|
3358
|
-
}), Va = { class: "w-full flex flex-col items-center my-2 space-y-2 mt-4" }, za = { class: "inline-flex items-center space-x-1" }, Oa = /* @__PURE__ */
|
|
3375
|
+
}), Va = { class: "w-full flex flex-col items-center my-2 space-y-2 mt-4" }, za = { class: "inline-flex items-center space-x-1" }, Oa = /* @__PURE__ */ p("span", { class: "text-foreground-2" }, "That's it, you've loaded everything!", -1), La = { class: "w-full flex flex-col items-center my-2 space-y-2 mt-4" }, Ma = { class: "inline-flex items-center space-x-1" }, Aa = /* @__PURE__ */ p("span", { class: "text-foreground-2" }, "An error occurred while loading", -1), Zo = /* @__PURE__ */ P({
|
|
3359
3376
|
__name: "InfiniteLoading",
|
|
3360
3377
|
props: {
|
|
3361
3378
|
settings: null,
|
|
@@ -3363,44 +3380,44 @@ const xa = ["disabled", "onClick"], Ho = /* @__PURE__ */ P({
|
|
|
3363
3380
|
},
|
|
3364
3381
|
emits: ["infinite"],
|
|
3365
3382
|
setup(e) {
|
|
3366
|
-
const t =
|
|
3383
|
+
const t = O(null), r = O(!1);
|
|
3367
3384
|
return Ge && ae(() => {
|
|
3368
3385
|
const s = setInterval(() => {
|
|
3369
3386
|
var o;
|
|
3370
3387
|
(o = t.value) != null && o.isConnected && (r.value = !0, clearInterval(s));
|
|
3371
3388
|
}, 200);
|
|
3372
|
-
}), (s, o) => (a(),
|
|
3389
|
+
}), (s, o) => (a(), m("div", {
|
|
3373
3390
|
ref_key: "wrapper",
|
|
3374
3391
|
ref: t
|
|
3375
3392
|
}, [
|
|
3376
|
-
r.value ? (a(),
|
|
3377
|
-
onInfinite: o[0] || (o[0] = (
|
|
3393
|
+
r.value ? (a(), L(l(Ds), ie({ key: 0 }, s.$props.settings || {}, {
|
|
3394
|
+
onInfinite: o[0] || (o[0] = (n) => s.$emit("infinite", n))
|
|
3378
3395
|
}), {
|
|
3379
|
-
spinner:
|
|
3380
|
-
z(
|
|
3396
|
+
spinner: M(() => [
|
|
3397
|
+
z(Qe, {
|
|
3381
3398
|
loading: !0,
|
|
3382
3399
|
class: "my-2"
|
|
3383
3400
|
})
|
|
3384
3401
|
]),
|
|
3385
|
-
complete:
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
z(
|
|
3402
|
+
complete: M(() => [
|
|
3403
|
+
p("div", Va, [
|
|
3404
|
+
p("div", za, [
|
|
3405
|
+
z(l(ts), { class: "w-5 h-5 text-success" }),
|
|
3389
3406
|
Oa
|
|
3390
3407
|
])
|
|
3391
3408
|
])
|
|
3392
3409
|
]),
|
|
3393
|
-
error:
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
z(
|
|
3397
|
-
|
|
3410
|
+
error: M(({ retry: n }) => [
|
|
3411
|
+
p("div", La, [
|
|
3412
|
+
p("div", Ma, [
|
|
3413
|
+
z(l(ss), { class: "w-5 h-5 text-danger" }),
|
|
3414
|
+
Aa
|
|
3398
3415
|
]),
|
|
3399
|
-
e.allowRetry ? (a(),
|
|
3416
|
+
e.allowRetry ? (a(), L(oe, {
|
|
3400
3417
|
key: 0,
|
|
3401
|
-
onClick:
|
|
3418
|
+
onClick: n
|
|
3402
3419
|
}, {
|
|
3403
|
-
default:
|
|
3420
|
+
default: M(() => [
|
|
3404
3421
|
R("Retry")
|
|
3405
3422
|
]),
|
|
3406
3423
|
_: 2
|
|
@@ -3411,10 +3428,10 @@ const xa = ["disabled", "onClick"], Ho = /* @__PURE__ */ P({
|
|
|
3411
3428
|
}, 16)) : I("", !0)
|
|
3412
3429
|
], 512));
|
|
3413
3430
|
}
|
|
3414
|
-
}),
|
|
3431
|
+
}), _a = { class: "relative group" }, Pa = {
|
|
3415
3432
|
key: 0,
|
|
3416
3433
|
class: "absolute -inset-1 bg-blue-300 dark:bg-blue-500 opacity-5 dark:opacity-0 rounded-md blur-sm group-hover:opacity-60 dark:group-hover:opacity-30 transition duration-500"
|
|
3417
|
-
},
|
|
3434
|
+
}, No = /* @__PURE__ */ P({
|
|
3418
3435
|
__name: "Panel",
|
|
3419
3436
|
props: {
|
|
3420
3437
|
/**
|
|
@@ -3454,45 +3471,45 @@ const xa = ["disabled", "onClick"], Ho = /* @__PURE__ */ P({
|
|
|
3454
3471
|
setup(e, { emit: t }) {
|
|
3455
3472
|
const r = t, s = e, o = c(
|
|
3456
3473
|
() => s.customPadding ? "" : "px-4 py-4 sm:px-6"
|
|
3457
|
-
),
|
|
3474
|
+
), n = c(
|
|
3458
3475
|
() => s.customPadding ? "" : "px-4 py-4 sm:p-6"
|
|
3459
3476
|
), d = c(() => {
|
|
3460
|
-
const
|
|
3461
|
-
return s.noShadow ||
|
|
3477
|
+
const h = ["rounded-lg"];
|
|
3478
|
+
return s.noShadow || h.push("shadow"), s.ring && h.push("ring-outline-2 hover:ring-2"), s.panelClasses && h.push(s.panelClasses), h.join(" ");
|
|
3462
3479
|
});
|
|
3463
|
-
return (
|
|
3464
|
-
e.fancyGlow ? (a(),
|
|
3465
|
-
(a(),
|
|
3480
|
+
return (h, i) => (a(), m("div", _a, [
|
|
3481
|
+
e.fancyGlow ? (a(), m("div", Pa)) : I("", !0),
|
|
3482
|
+
(a(), L(Q(e.form ? "form" : "div"), {
|
|
3466
3483
|
class: b([
|
|
3467
3484
|
"relative divide-outline-3 bg-foundation text-foreground flex flex-col divide-y overflow-hidden",
|
|
3468
3485
|
d.value
|
|
3469
3486
|
]),
|
|
3470
|
-
onSubmit: i[0] || (i[0] = (
|
|
3487
|
+
onSubmit: i[0] || (i[0] = (f) => r("submit", f))
|
|
3471
3488
|
}, {
|
|
3472
|
-
default:
|
|
3473
|
-
|
|
3489
|
+
default: M(() => [
|
|
3490
|
+
h.$slots.header ? (a(), m("div", {
|
|
3474
3491
|
key: 0,
|
|
3475
3492
|
class: b(o.value)
|
|
3476
3493
|
}, [
|
|
3477
|
-
D(
|
|
3494
|
+
D(h.$slots, "header")
|
|
3478
3495
|
], 2)) : I("", !0),
|
|
3479
|
-
|
|
3480
|
-
class: b(["grow",
|
|
3496
|
+
p("div", {
|
|
3497
|
+
class: b(["grow", n.value])
|
|
3481
3498
|
}, [
|
|
3482
|
-
D(
|
|
3499
|
+
D(h.$slots, "default")
|
|
3483
3500
|
], 2),
|
|
3484
|
-
|
|
3501
|
+
h.$slots.footer ? (a(), m("div", {
|
|
3485
3502
|
key: 1,
|
|
3486
3503
|
class: b(o.value)
|
|
3487
3504
|
}, [
|
|
3488
|
-
D(
|
|
3505
|
+
D(h.$slots, "footer")
|
|
3489
3506
|
], 2)) : I("", !0)
|
|
3490
3507
|
]),
|
|
3491
3508
|
_: 3
|
|
3492
3509
|
}, 40, ["class"]))
|
|
3493
3510
|
]));
|
|
3494
3511
|
}
|
|
3495
|
-
}), ja = { class: "flex-shrink-0" }, Ta = /* @__PURE__ */
|
|
3512
|
+
}), ja = { class: "flex-shrink-0" }, Ta = /* @__PURE__ */ p("span", { class: "sr-only" }, "Dismiss", -1), Qo = /* @__PURE__ */ P({
|
|
3496
3513
|
__name: "Alert",
|
|
3497
3514
|
props: {
|
|
3498
3515
|
color: { default: "success" },
|
|
@@ -3508,16 +3525,16 @@ const xa = ["disabled", "onClick"], Ho = /* @__PURE__ */ P({
|
|
|
3508
3525
|
return t.customIcon;
|
|
3509
3526
|
switch (t.color) {
|
|
3510
3527
|
case "info":
|
|
3511
|
-
return
|
|
3528
|
+
return os;
|
|
3512
3529
|
case "warning":
|
|
3513
3530
|
return Ve;
|
|
3514
3531
|
case "danger":
|
|
3515
|
-
return
|
|
3532
|
+
return as;
|
|
3516
3533
|
case "success":
|
|
3517
3534
|
default:
|
|
3518
3535
|
return mt;
|
|
3519
3536
|
}
|
|
3520
|
-
}),
|
|
3537
|
+
}), n = c(() => {
|
|
3521
3538
|
const u = [];
|
|
3522
3539
|
switch (t.size) {
|
|
3523
3540
|
case "xs":
|
|
@@ -3525,7 +3542,7 @@ const xa = ["disabled", "onClick"], Ho = /* @__PURE__ */ P({
|
|
|
3525
3542
|
break;
|
|
3526
3543
|
case "default":
|
|
3527
3544
|
default:
|
|
3528
|
-
u.push(s.value ? "p-4" : "p-2");
|
|
3545
|
+
u.push(s.value ? "p-3 sm:p-4" : "p-2");
|
|
3529
3546
|
break;
|
|
3530
3547
|
}
|
|
3531
3548
|
switch (t.color) {
|
|
@@ -3558,7 +3575,7 @@ const xa = ["disabled", "onClick"], Ho = /* @__PURE__ */ P({
|
|
|
3558
3575
|
break;
|
|
3559
3576
|
}
|
|
3560
3577
|
return u.join(" ");
|
|
3561
|
-
}),
|
|
3578
|
+
}), h = c(() => {
|
|
3562
3579
|
const u = ["grow"];
|
|
3563
3580
|
switch (s.value || u.push("flex items-center space-x-2"), t.size) {
|
|
3564
3581
|
case "xs":
|
|
@@ -3578,15 +3595,15 @@ const xa = ["disabled", "onClick"], Ho = /* @__PURE__ */ P({
|
|
|
3578
3595
|
break;
|
|
3579
3596
|
case "default":
|
|
3580
3597
|
default:
|
|
3581
|
-
u.push("mt-2 text-sm");
|
|
3598
|
+
u.push("mt-1 sm:mt-2 text-xs sm:text-sm");
|
|
3582
3599
|
break;
|
|
3583
3600
|
}
|
|
3584
3601
|
return u.join(" ");
|
|
3585
|
-
}),
|
|
3586
|
-
var
|
|
3602
|
+
}), f = c(() => {
|
|
3603
|
+
var k;
|
|
3587
3604
|
const u = ["flex"];
|
|
3588
3605
|
s.value || u.push("grow justify-end");
|
|
3589
|
-
const S = s.value && ((
|
|
3606
|
+
const S = s.value && ((k = t.actions) == null ? void 0 : k.length);
|
|
3590
3607
|
switch (t.size) {
|
|
3591
3608
|
case "xs":
|
|
3592
3609
|
u.push("space-x-1"), S && u.push("mt-1");
|
|
@@ -3597,7 +3614,7 @@ const xa = ["disabled", "onClick"], Ho = /* @__PURE__ */ P({
|
|
|
3597
3614
|
break;
|
|
3598
3615
|
}
|
|
3599
3616
|
return u.join(" ");
|
|
3600
|
-
}),
|
|
3617
|
+
}), x = c(() => {
|
|
3601
3618
|
const u = [];
|
|
3602
3619
|
switch (t.color) {
|
|
3603
3620
|
case "success":
|
|
@@ -3666,29 +3683,29 @@ const xa = ["disabled", "onClick"], Ho = /* @__PURE__ */ P({
|
|
|
3666
3683
|
return "sm";
|
|
3667
3684
|
}
|
|
3668
3685
|
});
|
|
3669
|
-
return (u, S) => (a(),
|
|
3670
|
-
class: b(["rounded-md", [
|
|
3686
|
+
return (u, S) => (a(), m("div", {
|
|
3687
|
+
class: b(["rounded-md", [n.value, x.value]])
|
|
3671
3688
|
}, [
|
|
3672
|
-
|
|
3689
|
+
p("div", {
|
|
3673
3690
|
class: b(["flex", d.value])
|
|
3674
3691
|
}, [
|
|
3675
|
-
|
|
3676
|
-
(a(),
|
|
3692
|
+
p("div", ja, [
|
|
3693
|
+
(a(), L(Q(o.value), {
|
|
3677
3694
|
class: b(y.value),
|
|
3678
3695
|
"aria-hidden": "true"
|
|
3679
3696
|
}, null, 8, ["class"]))
|
|
3680
3697
|
]),
|
|
3681
|
-
|
|
3682
|
-
class: b(
|
|
3698
|
+
p("div", {
|
|
3699
|
+
class: b(h.value)
|
|
3683
3700
|
}, [
|
|
3684
|
-
|
|
3701
|
+
p("h3", {
|
|
3685
3702
|
class: b(["text-sm", [s.value ? "font-medium" : ""]])
|
|
3686
3703
|
}, [
|
|
3687
3704
|
D(u.$slots, "title", {}, () => [
|
|
3688
3705
|
R("Title")
|
|
3689
3706
|
])
|
|
3690
3707
|
], 2),
|
|
3691
|
-
s.value ? (a(),
|
|
3708
|
+
s.value ? (a(), m("div", {
|
|
3692
3709
|
key: 0,
|
|
3693
3710
|
class: b(i.value)
|
|
3694
3711
|
}, [
|
|
@@ -3696,35 +3713,35 @@ const xa = ["disabled", "onClick"], Ho = /* @__PURE__ */ P({
|
|
|
3696
3713
|
R(" Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid pariatur, ipsum similique veniam. ")
|
|
3697
3714
|
])
|
|
3698
3715
|
], 2)) : I("", !0),
|
|
3699
|
-
|
|
3700
|
-
class: b(
|
|
3716
|
+
p("div", {
|
|
3717
|
+
class: b(f.value)
|
|
3701
3718
|
}, [
|
|
3702
|
-
(a(!0),
|
|
3719
|
+
(a(!0), m(K, null, G(e.actions || [], (k, $) => (a(), L(oe, {
|
|
3703
3720
|
key: $,
|
|
3704
3721
|
color: e.color,
|
|
3705
3722
|
size: g.value,
|
|
3706
|
-
to:
|
|
3707
|
-
external:
|
|
3708
|
-
onClick: (B) =>
|
|
3723
|
+
to: k.url,
|
|
3724
|
+
external: k.externalUrl || !1,
|
|
3725
|
+
onClick: (B) => k.onClick || l(Tt)
|
|
3709
3726
|
}, {
|
|
3710
|
-
default:
|
|
3711
|
-
R(V(
|
|
3727
|
+
default: M(() => [
|
|
3728
|
+
R(V(k.title), 1)
|
|
3712
3729
|
]),
|
|
3713
3730
|
_: 2
|
|
3714
3731
|
}, 1032, ["color", "size", "to", "external", "onClick"]))), 128))
|
|
3715
3732
|
], 2)
|
|
3716
3733
|
], 2),
|
|
3717
|
-
e.withDismiss ? (a(),
|
|
3734
|
+
e.withDismiss ? (a(), m("div", {
|
|
3718
3735
|
key: 0,
|
|
3719
3736
|
class: b(["flex", [s.value ? "items-start" : "items-center"]])
|
|
3720
3737
|
}, [
|
|
3721
|
-
|
|
3738
|
+
p("button", {
|
|
3722
3739
|
type: "button",
|
|
3723
3740
|
class: b(["inline-flex rounded-md focus:outline-none focus:ring-2", v.value]),
|
|
3724
|
-
onClick: S[0] || (S[0] = (
|
|
3741
|
+
onClick: S[0] || (S[0] = (k) => u.$emit("dismiss"))
|
|
3725
3742
|
}, [
|
|
3726
3743
|
Ta,
|
|
3727
|
-
z(
|
|
3744
|
+
z(l(ye), {
|
|
3728
3745
|
class: "h-5 w-5",
|
|
3729
3746
|
"aria-hidden": "true"
|
|
3730
3747
|
})
|
|
@@ -3734,41 +3751,41 @@ const xa = ["disabled", "onClick"], Ho = /* @__PURE__ */ P({
|
|
|
3734
3751
|
], 2));
|
|
3735
3752
|
}
|
|
3736
3753
|
});
|
|
3737
|
-
function
|
|
3754
|
+
function Jo(e) {
|
|
3738
3755
|
var u, S;
|
|
3739
|
-
const { get: t, initialState: r, readOptions: s, set: o, asyncRead:
|
|
3740
|
-
const
|
|
3741
|
-
return
|
|
3742
|
-
} : t, y =
|
|
3756
|
+
const { get: t, initialState: r, readOptions: s, set: o, asyncRead: n = !0, debugging: d } = e, h = d == null ? void 0 : d.log, i = () => (new Error("Trace:").stack || "").substring(7), f = ((S = (u = e.debugging) == null ? void 0 : u.log) == null ? void 0 : S.logger) || console.debug, x = h && !h.writesOnly ? () => {
|
|
3757
|
+
const k = t();
|
|
3758
|
+
return f(`debugging: '${h.name}' read`, k, i()), k;
|
|
3759
|
+
} : t, y = h && !h.readsOnly ? (k) => (f(`debugging: '${h.name}' written to`, k, i()), o(k)) : o, v = n ? ys(x, r, s) : c(x), g = c(() => v.value);
|
|
3743
3760
|
return g.update = y, g;
|
|
3744
3761
|
}
|
|
3745
3762
|
const Fa = /* @__PURE__ */ P({
|
|
3746
3763
|
__name: "ContextManager",
|
|
3747
3764
|
setup(e, { expose: t }) {
|
|
3748
|
-
const s =
|
|
3765
|
+
const s = _t().provides, o = Object.getOwnPropertySymbols(s).find(
|
|
3749
3766
|
(v) => v.description === "ComboboxContext"
|
|
3750
3767
|
);
|
|
3751
3768
|
o || console.error("FormTagsContextManager ctx key not found!");
|
|
3752
|
-
const
|
|
3753
|
-
return
|
|
3754
|
-
|
|
3769
|
+
const n = Pt(o || "__undefined");
|
|
3770
|
+
return n || console.error("FormTagsContextManager ctx not found!"), t({ goUp: () => {
|
|
3771
|
+
n == null || n.goToOption(1);
|
|
3755
3772
|
}, goDown: () => {
|
|
3756
|
-
|
|
3773
|
+
n == null || n.goToOption(2);
|
|
3757
3774
|
}, open: () => {
|
|
3758
|
-
|
|
3775
|
+
n && n.openCombobox();
|
|
3759
3776
|
}, close: () => {
|
|
3760
|
-
|
|
3777
|
+
n == null || n.closeCombobox();
|
|
3761
3778
|
}, selectActive: () => {
|
|
3762
|
-
|
|
3763
|
-
}, isOpen: () => (
|
|
3779
|
+
n == null || n.selectActiveOption();
|
|
3780
|
+
}, isOpen: () => (n == null ? void 0 : n.comboboxState.value) === 0 }), (v, g) => D(v.$slots, "default");
|
|
3764
3781
|
}
|
|
3765
|
-
}), Ra = ["for"], Da = ["disabled", "placeholder", "onKeydown"], Ea = /* @__PURE__ */
|
|
3782
|
+
}), Ra = ["for"], Da = ["disabled", "placeholder", "onKeydown"], Ea = /* @__PURE__ */ p("span", { class: "text-xs sr-only" }, "Clear input", -1), Ua = { key: 1 }, qa = /* @__PURE__ */ p("div", { class: "text-foreground-2 text-center" }, [
|
|
3766
3783
|
/* @__PURE__ */ R(" Press "),
|
|
3767
|
-
/* @__PURE__ */
|
|
3784
|
+
/* @__PURE__ */ p("strong", null, "Enter"),
|
|
3768
3785
|
/* @__PURE__ */ R(" to create tag ⚡ ")
|
|
3769
3786
|
], -1), Wa = [
|
|
3770
3787
|
qa
|
|
3771
|
-
], Ha = ["id"],
|
|
3788
|
+
], Ha = ["id"], Yo = /* @__PURE__ */ P({
|
|
3772
3789
|
__name: "Tags",
|
|
3773
3790
|
props: {
|
|
3774
3791
|
name: null,
|
|
@@ -3792,34 +3809,34 @@ const Fa = /* @__PURE__ */ P({
|
|
|
3792
3809
|
},
|
|
3793
3810
|
emits: ["update:modelValue", "change", "clear"],
|
|
3794
3811
|
setup(e, { expose: t, emit: r }) {
|
|
3795
|
-
const s = (
|
|
3812
|
+
const s = (_) => _.type === "input", o = r, n = e, d = O(null), { focused: h } = xs(d), i = O(
|
|
3796
3813
|
null
|
|
3797
3814
|
), {
|
|
3798
|
-
coreInputClasses:
|
|
3799
|
-
coreClasses:
|
|
3815
|
+
coreInputClasses: f,
|
|
3816
|
+
coreClasses: x,
|
|
3800
3817
|
labelClasses: y,
|
|
3801
3818
|
title: v,
|
|
3802
3819
|
helpTip: g,
|
|
3803
3820
|
helpTipId: u,
|
|
3804
3821
|
hideHelpTip: S,
|
|
3805
|
-
helpTipClasses:
|
|
3822
|
+
helpTipClasses: k,
|
|
3806
3823
|
errorMessage: $,
|
|
3807
3824
|
clear: B,
|
|
3808
3825
|
value: T
|
|
3809
3826
|
} = Ze({
|
|
3810
|
-
props: le(
|
|
3827
|
+
props: le(n),
|
|
3811
3828
|
emit: o,
|
|
3812
3829
|
inputEl: d
|
|
3813
3830
|
// options: {
|
|
3814
3831
|
// customClear: () => (selectedItems.value = [])
|
|
3815
3832
|
// }
|
|
3816
|
-
}),
|
|
3833
|
+
}), A = O([]), w = O(!1), U = O(!1), q = O(""), E = c({
|
|
3817
3834
|
get: () => T.value || [],
|
|
3818
|
-
set: (
|
|
3819
|
-
T.value =
|
|
3835
|
+
set: (_) => {
|
|
3836
|
+
T.value = Ft(_).filter((F) => !!F.length);
|
|
3820
3837
|
}
|
|
3821
3838
|
}), Le = c(() => {
|
|
3822
|
-
switch (
|
|
3839
|
+
switch (n.size) {
|
|
3823
3840
|
case "sm":
|
|
3824
3841
|
return "h-6";
|
|
3825
3842
|
case "lg":
|
|
@@ -3830,62 +3847,62 @@ const Fa = /* @__PURE__ */ P({
|
|
|
3830
3847
|
default:
|
|
3831
3848
|
return "h-8";
|
|
3832
3849
|
}
|
|
3833
|
-
}), re = c(() =>
|
|
3834
|
-
const
|
|
3835
|
-
|
|
3836
|
-
|
|
3850
|
+
}), re = c(() => n.showClear && !!E.value.length), Me = c(() => {
|
|
3851
|
+
const _ = [
|
|
3852
|
+
x.value,
|
|
3853
|
+
n.disabled ? "cursor-not-allowed !bg-foundation-disabled !text-disabled-muted" : ""
|
|
3837
3854
|
];
|
|
3838
|
-
return re.value && ($.value ||
|
|
3839
|
-
}),
|
|
3840
|
-
if (
|
|
3855
|
+
return re.value && ($.value || n.showRequired) ? _.push("pr-14") : (re.value || $.value || n.showRequired) && _.push("pr-8"), $.value ? (_.push("border-2 border-danger text-danger-darker"), h.value && _.push("ring-1 ring-danger")) : (_.push("border-2 border-transparent"), h.value && _.push("ring-2 ring-outline-2")), _.join(" ");
|
|
3856
|
+
}), Ae = (_) => {
|
|
3857
|
+
if (n.disabled)
|
|
3841
3858
|
return;
|
|
3842
|
-
const F = E.value.indexOf(
|
|
3859
|
+
const F = E.value.indexOf(_);
|
|
3843
3860
|
if (F !== -1) {
|
|
3844
3861
|
const j = E.value.slice();
|
|
3845
3862
|
j.splice(F, 1), E.value = j;
|
|
3846
3863
|
}
|
|
3847
3864
|
}, me = () => {
|
|
3848
|
-
var
|
|
3849
|
-
(
|
|
3850
|
-
}, Y = (
|
|
3851
|
-
if (
|
|
3865
|
+
var _;
|
|
3866
|
+
(_ = d.value) == null || _.blur(), U.value = !1;
|
|
3867
|
+
}, Y = (_) => {
|
|
3868
|
+
if (_.key !== "Backspace" || q.value.length)
|
|
3852
3869
|
return;
|
|
3853
3870
|
const F = E.value.slice();
|
|
3854
3871
|
F.pop(), E.value = F, U.value = !1;
|
|
3855
3872
|
}, ce = () => {
|
|
3856
|
-
var
|
|
3857
|
-
(
|
|
3873
|
+
var _, F, j;
|
|
3874
|
+
(_ = i.value) != null && _.isOpen() ? (F = i.value) == null || F.goUp() : (j = i.value) == null || j.open();
|
|
3858
3875
|
}, X = () => {
|
|
3859
|
-
var
|
|
3860
|
-
(
|
|
3876
|
+
var _, F, j;
|
|
3877
|
+
(_ = i.value) != null && _.isOpen() ? (F = i.value) == null || F.goDown() : (j = i.value) == null || j.open();
|
|
3861
3878
|
}, he = async () => {
|
|
3862
|
-
|
|
3863
|
-
|
|
3879
|
+
n.getAutocompleteItems && (w.value = !0, A.value = await Promise.resolve(
|
|
3880
|
+
n.getAutocompleteItems(q.value)
|
|
3864
3881
|
), w.value = !1);
|
|
3865
|
-
},
|
|
3866
|
-
w.value = !0,
|
|
3867
|
-
}, xe = (
|
|
3882
|
+
}, _e = He(he, 1e3), Pe = () => {
|
|
3883
|
+
w.value = !0, _e();
|
|
3884
|
+
}, xe = (_, F) => {
|
|
3868
3885
|
var Z, ee;
|
|
3869
|
-
if (s(
|
|
3886
|
+
if (s(_) ? _.data === " " || _.data === "," || _.data === ";" : !0) {
|
|
3870
3887
|
let ke = !1;
|
|
3871
|
-
if ((Z = i.value) != null && Z.isOpen() &&
|
|
3888
|
+
if ((Z = i.value) != null && Z.isOpen() && A.value.length && !F)
|
|
3872
3889
|
(ee = i.value) == null || ee.selectActive(), ke = !0;
|
|
3873
3890
|
else {
|
|
3874
|
-
const C = q.value.trim().substring(0, q.value.length - (s(
|
|
3891
|
+
const C = q.value.trim().substring(0, q.value.length - (s(_) ? 1 : 0)), H = E.value.includes(C);
|
|
3875
3892
|
C.length > 0 && !H && (E.value = [...E.value, C], ke = !0);
|
|
3876
3893
|
}
|
|
3877
3894
|
ke && (q.value = "", U.value = !1);
|
|
3878
3895
|
} else
|
|
3879
3896
|
U.value = !!q.value.length;
|
|
3880
3897
|
};
|
|
3881
|
-
return fe(U, (
|
|
3898
|
+
return fe(U, (_, F) => {
|
|
3882
3899
|
var j, Z;
|
|
3883
|
-
|
|
3900
|
+
_ && !F ? n.getAutocompleteItems && ((j = i.value) == null || j.open()) : !_ && F && ((Z = i.value) == null || Z.close());
|
|
3884
3901
|
}), fe(q, () => {
|
|
3885
3902
|
Pe();
|
|
3886
3903
|
}), ae(() => {
|
|
3887
3904
|
he();
|
|
3888
|
-
}), t({ resolveAutocompleteItems: he }), (
|
|
3905
|
+
}), t({ resolveAutocompleteItems: he }), (_, F) => (a(), L(l(Ts), {
|
|
3889
3906
|
modelValue: E.value,
|
|
3890
3907
|
"onUpdate:modelValue": F[5] || (F[5] = (j) => E.value = j),
|
|
3891
3908
|
as: "div",
|
|
@@ -3893,39 +3910,39 @@ const Fa = /* @__PURE__ */ P({
|
|
|
3893
3910
|
clearable: "",
|
|
3894
3911
|
class: b([e.wrapperClasses])
|
|
3895
3912
|
}, {
|
|
3896
|
-
default:
|
|
3913
|
+
default: M(() => [
|
|
3897
3914
|
z(Fa, {
|
|
3898
3915
|
ref_key: "ctxManager",
|
|
3899
3916
|
ref: i
|
|
3900
3917
|
}, {
|
|
3901
|
-
default:
|
|
3902
|
-
|
|
3918
|
+
default: M(() => [
|
|
3919
|
+
p("label", {
|
|
3903
3920
|
for: e.name,
|
|
3904
|
-
class: b(
|
|
3921
|
+
class: b(l(y))
|
|
3905
3922
|
}, [
|
|
3906
|
-
|
|
3923
|
+
p("span", null, V(l(v)), 1)
|
|
3907
3924
|
], 10, Ra),
|
|
3908
|
-
|
|
3925
|
+
p("div", {
|
|
3909
3926
|
class: b(["relative flex flex-wrap items-center space-x-1 px-2 py-1", Me.value])
|
|
3910
3927
|
}, [
|
|
3911
|
-
(a(!0),
|
|
3928
|
+
(a(!0), m(K, null, G(E.value, (j) => (a(), L(Xe, {
|
|
3912
3929
|
key: j,
|
|
3913
|
-
"icon-left": e.disabled ? void 0 :
|
|
3930
|
+
"icon-left": e.disabled ? void 0 : l(ye),
|
|
3914
3931
|
"clickable-icon": "",
|
|
3915
3932
|
size: "lg",
|
|
3916
|
-
onClickIcon: () =>
|
|
3933
|
+
onClickIcon: () => Ae(j)
|
|
3917
3934
|
}, {
|
|
3918
|
-
default:
|
|
3935
|
+
default: M(() => [
|
|
3919
3936
|
R(V(j), 1)
|
|
3920
3937
|
]),
|
|
3921
3938
|
_: 2
|
|
3922
3939
|
}, 1032, ["icon-left", "onClickIcon"]))), 128)),
|
|
3923
|
-
be(
|
|
3940
|
+
be(p("input", {
|
|
3924
3941
|
ref_key: "inputEl",
|
|
3925
3942
|
ref: d,
|
|
3926
3943
|
"onUpdate:modelValue": F[0] || (F[0] = (j) => q.value = j),
|
|
3927
3944
|
disabled: e.disabled,
|
|
3928
|
-
class: b(["bg-transparent grow shrink border-0 focus:ring-0 p-0", [
|
|
3945
|
+
class: b(["bg-transparent grow shrink border-0 focus:ring-0 p-0", [l(f), Le.value]]),
|
|
3929
3946
|
style: { "flex-basis": "70px", "min-width": "70px" },
|
|
3930
3947
|
placeholder: E.value.length ? void 0 : e.placeholder,
|
|
3931
3948
|
onInput: xe,
|
|
@@ -3941,74 +3958,74 @@ const Fa = /* @__PURE__ */ P({
|
|
|
3941
3958
|
}, null, 42, Da), [
|
|
3942
3959
|
[qe, q.value]
|
|
3943
3960
|
]),
|
|
3944
|
-
re.value ? (a(),
|
|
3961
|
+
re.value ? (a(), m("a", {
|
|
3945
3962
|
key: 0,
|
|
3946
3963
|
title: "Clear input",
|
|
3947
3964
|
class: "absolute top-2 right-0 flex items-center pr-2 cursor-pointer",
|
|
3948
3965
|
onClick: F[3] || (F[3] = //@ts-ignore
|
|
3949
|
-
(...j) =>
|
|
3966
|
+
(...j) => l(B) && l(B)(...j)),
|
|
3950
3967
|
onKeydown: F[4] || (F[4] = //@ts-ignore
|
|
3951
|
-
(...j) =>
|
|
3968
|
+
(...j) => l(B) && l(B)(...j))
|
|
3952
3969
|
}, [
|
|
3953
3970
|
Ea,
|
|
3954
|
-
z(
|
|
3971
|
+
z(l(ye), {
|
|
3955
3972
|
class: "h-5 w-5 text-foreground",
|
|
3956
3973
|
"aria-hidden": "true"
|
|
3957
3974
|
})
|
|
3958
3975
|
], 32)) : I("", !0),
|
|
3959
|
-
|
|
3976
|
+
l($) ? (a(), m("div", {
|
|
3960
3977
|
key: 1,
|
|
3961
3978
|
class: b([
|
|
3962
3979
|
"pointer-events-none absolute top-[10px] right-0 flex items-center",
|
|
3963
3980
|
re.value ? "pr-8" : "pr-2"
|
|
3964
3981
|
])
|
|
3965
3982
|
}, [
|
|
3966
|
-
z(
|
|
3983
|
+
z(l(Ve), {
|
|
3967
3984
|
class: "h-4 w-4 text-danger",
|
|
3968
3985
|
"aria-hidden": "true"
|
|
3969
3986
|
})
|
|
3970
3987
|
], 2)) : I("", !0),
|
|
3971
|
-
e.showRequired && !
|
|
3988
|
+
e.showRequired && !l($) ? (a(), m("div", {
|
|
3972
3989
|
key: 2,
|
|
3973
3990
|
class: b(["pointer-events-none absolute top-[2px] text-4xl right-0 flex items-center text-danger opacity-50", re.value ? "pr-8" : "pr-2"])
|
|
3974
3991
|
}, " * ", 2)) : I("", !0)
|
|
3975
3992
|
], 2),
|
|
3976
|
-
z(
|
|
3993
|
+
z(l(ht), {
|
|
3977
3994
|
leave: "transition ease-in duration-100",
|
|
3978
3995
|
"leave-from": "opacity-100",
|
|
3979
3996
|
"leave-to": "opacity-0",
|
|
3980
3997
|
class: "relative px-0.5"
|
|
3981
3998
|
}, {
|
|
3982
|
-
default:
|
|
3983
|
-
z(
|
|
3984
|
-
default:
|
|
3985
|
-
w.value ? (a(),
|
|
3999
|
+
default: M(() => [
|
|
4000
|
+
z(l(Fs), { class: "absolute top-1 max-h-60 w-full overflow-auto simple-scrollbar rounded-md bg-foundation-2 py-1 shadow label label--light outline outline-2 outline-primary-muted focus:outline-none" }, {
|
|
4001
|
+
default: M(() => [
|
|
4002
|
+
w.value ? (a(), m("div", {
|
|
3986
4003
|
key: 0,
|
|
3987
|
-
class: b(["px-1",
|
|
4004
|
+
class: b(["px-1", A.value.length ? "mb-1" : ""])
|
|
3988
4005
|
}, [
|
|
3989
|
-
z(
|
|
4006
|
+
z(Qe, { loading: !0 })
|
|
3990
4007
|
], 2)) : I("", !0),
|
|
3991
|
-
!
|
|
3992
|
-
|
|
4008
|
+
!A.value.length && !w.value ? (a(), m("div", Ua, Wa)) : I("", !0),
|
|
4009
|
+
A.value.length ? (a(!0), m(K, { key: 2 }, G(A.value, (j) => (a(), L(l(Rs), {
|
|
3993
4010
|
key: j,
|
|
3994
4011
|
as: "template",
|
|
3995
4012
|
value: j
|
|
3996
4013
|
}, {
|
|
3997
|
-
default:
|
|
3998
|
-
|
|
4014
|
+
default: M(({ selected: Z, active: ee }) => [
|
|
4015
|
+
p("li", {
|
|
3999
4016
|
class: b(["relative cursor-pointer select-none py-1.5 pl-3", {
|
|
4000
4017
|
"text-primary": ee,
|
|
4001
4018
|
"text-foreground": !ee
|
|
4002
4019
|
}])
|
|
4003
4020
|
}, [
|
|
4004
|
-
|
|
4021
|
+
p("span", {
|
|
4005
4022
|
class: b(["block truncate", { "font-medium": Z, "font-normal": !Z }])
|
|
4006
4023
|
}, V(j), 3),
|
|
4007
|
-
Z ? (a(),
|
|
4024
|
+
Z ? (a(), m("span", {
|
|
4008
4025
|
key: 0,
|
|
4009
4026
|
class: b(["absolute inset-y-0 right-0 flex items-center pr-4", { "text-primary": ee, "text-foreground": !ee }])
|
|
4010
4027
|
}, [
|
|
4011
|
-
z(
|
|
4028
|
+
z(l(pt), {
|
|
4012
4029
|
class: "h-5 w-5",
|
|
4013
4030
|
"aria-hidden": "true"
|
|
4014
4031
|
})
|
|
@@ -4023,11 +4040,11 @@ const Fa = /* @__PURE__ */ P({
|
|
|
4023
4040
|
]),
|
|
4024
4041
|
_: 1
|
|
4025
4042
|
}),
|
|
4026
|
-
|
|
4043
|
+
l(u) && !l(S) ? (a(), m("p", {
|
|
4027
4044
|
key: 0,
|
|
4028
|
-
id:
|
|
4029
|
-
class: b(
|
|
4030
|
-
}, V(
|
|
4045
|
+
id: l(u),
|
|
4046
|
+
class: b(l(k))
|
|
4047
|
+
}, V(l(g)), 11, Ha)) : I("", !0)
|
|
4031
4048
|
]),
|
|
4032
4049
|
_: 1
|
|
4033
4050
|
}, 512)
|
|
@@ -4036,7 +4053,7 @@ const Fa = /* @__PURE__ */ P({
|
|
|
4036
4053
|
}, 8, ["modelValue", "class"]));
|
|
4037
4054
|
}
|
|
4038
4055
|
});
|
|
4039
|
-
function
|
|
4056
|
+
function Ct(e) {
|
|
4040
4057
|
const { props: t } = e, r = c(() => {
|
|
4041
4058
|
var i;
|
|
4042
4059
|
switch ((i = t.size) == null ? void 0 : i.value) {
|
|
@@ -4094,7 +4111,7 @@ function wt(e) {
|
|
|
4094
4111
|
default:
|
|
4095
4112
|
return "text-sm";
|
|
4096
4113
|
}
|
|
4097
|
-
}),
|
|
4114
|
+
}), n = c(() => {
|
|
4098
4115
|
var i;
|
|
4099
4116
|
switch ((i = t.size) == null ? void 0 : i.value) {
|
|
4100
4117
|
case "xs":
|
|
@@ -4116,7 +4133,7 @@ function wt(e) {
|
|
|
4116
4133
|
}), d = c(
|
|
4117
4134
|
() => `${s.value} ${r.value} ${o.value}`
|
|
4118
4135
|
);
|
|
4119
|
-
return { heightClasses: r, widthClasses: s, sizeClasses: d, iconClasses:
|
|
4136
|
+
return { heightClasses: r, widthClasses: s, sizeClasses: d, iconClasses: n };
|
|
4120
4137
|
}
|
|
4121
4138
|
const Ka = {
|
|
4122
4139
|
key: 1,
|
|
@@ -4132,41 +4149,41 @@ const Ka = {
|
|
|
4132
4149
|
noBg: { type: Boolean }
|
|
4133
4150
|
},
|
|
4134
4151
|
setup(e) {
|
|
4135
|
-
const t = e, { sizeClasses: r, iconClasses: s } =
|
|
4152
|
+
const t = e, { sizeClasses: r, iconClasses: s } = Ct({ props: le(t) }), o = c(() => {
|
|
4136
4153
|
var v, g, u;
|
|
4137
4154
|
if (!((v = t.user) != null && v.name.length))
|
|
4138
4155
|
return;
|
|
4139
|
-
const
|
|
4140
|
-
return t.size === "sm" || t.size === "xs" ?
|
|
4141
|
-
}),
|
|
4142
|
-
return (
|
|
4156
|
+
const f = t.user.name.split(" "), x = ((g = f[0]) == null ? void 0 : g[0]) || "", y = ((u = f[1]) == null ? void 0 : u[0]) || "";
|
|
4157
|
+
return t.size === "sm" || t.size === "xs" ? x : x + y;
|
|
4158
|
+
}), n = c(() => t.noBorder ? "" : "border-2 border-foundation"), d = c(() => t.noBg ? "" : "bg-primary"), h = c(() => t.hoverEffect ? "hover:border-primary focus:border-primary active:scale-95" : ""), i = c(() => t.active ? "border-primary" : "");
|
|
4159
|
+
return (f, x) => (a(), m("div", {
|
|
4143
4160
|
class: b([
|
|
4144
4161
|
"text-foreground-on-primary flex shrink-0 items-center justify-center overflow-hidden rounded-full font-semibold uppercase transition",
|
|
4145
|
-
|
|
4162
|
+
l(r),
|
|
4146
4163
|
d.value,
|
|
4147
|
-
|
|
4148
|
-
|
|
4164
|
+
n.value,
|
|
4165
|
+
h.value,
|
|
4149
4166
|
i.value
|
|
4150
4167
|
])
|
|
4151
4168
|
}, [
|
|
4152
|
-
D(
|
|
4169
|
+
D(f.$slots, "default", {}, () => {
|
|
4153
4170
|
var y;
|
|
4154
4171
|
return [
|
|
4155
|
-
(y = e.user) != null && y.avatar ? (a(),
|
|
4172
|
+
(y = e.user) != null && y.avatar ? (a(), m("div", {
|
|
4156
4173
|
key: 0,
|
|
4157
4174
|
class: "h-full w-full bg-cover bg-center bg-no-repeat",
|
|
4158
4175
|
style: ne({ backgroundImage: `url('${e.user.avatar}')` })
|
|
4159
|
-
}, null, 4)) : o.value ? (a(),
|
|
4160
|
-
z(
|
|
4161
|
-
class: b(
|
|
4176
|
+
}, null, 4)) : o.value ? (a(), m("div", Ka, V(o.value), 1)) : (a(), m("div", Ga, [
|
|
4177
|
+
z(l(Kt), {
|
|
4178
|
+
class: b(l(s))
|
|
4162
4179
|
}, null, 8, ["class"])
|
|
4163
4180
|
]))
|
|
4164
4181
|
];
|
|
4165
4182
|
}),
|
|
4166
|
-
D(
|
|
4183
|
+
D(f.$slots, "absolute-anchor")
|
|
4167
4184
|
], 2));
|
|
4168
4185
|
}
|
|
4169
|
-
}),
|
|
4186
|
+
}), er = /* @__PURE__ */ P({
|
|
4170
4187
|
__name: "AvatarGroup",
|
|
4171
4188
|
props: {
|
|
4172
4189
|
users: { default: () => [] },
|
|
@@ -4175,38 +4192,38 @@ const Ka = {
|
|
|
4175
4192
|
maxCount: { default: void 0 }
|
|
4176
4193
|
},
|
|
4177
4194
|
setup(e) {
|
|
4178
|
-
const t = e, r =
|
|
4195
|
+
const t = e, r = O(null), s = O(null), { hiddenItemCount: o } = xt({
|
|
4179
4196
|
elementToWatchForChanges: r,
|
|
4180
4197
|
itemContainer: s,
|
|
4181
4198
|
trackResize: !0,
|
|
4182
4199
|
trackMutations: !0
|
|
4183
|
-
}), { heightClasses:
|
|
4200
|
+
}), { heightClasses: n } = Ct({ props: le(t) }), d = c(() => t.maxCount ? Math.max(t.users.length - t.maxCount, 0) : 0), h = c(
|
|
4184
4201
|
() => o.value + d.value
|
|
4185
4202
|
), i = c(
|
|
4186
4203
|
() => t.maxCount ? t.users.slice(0, t.maxCount) : t.users
|
|
4187
4204
|
);
|
|
4188
|
-
return (
|
|
4205
|
+
return (f, x) => (a(), m("div", {
|
|
4189
4206
|
ref_key: "elementToWatchForChanges",
|
|
4190
4207
|
ref: r,
|
|
4191
4208
|
class: b(`flex ${e.overlap ? "-space-x-2" : ""}`)
|
|
4192
4209
|
}, [
|
|
4193
|
-
|
|
4210
|
+
p("div", {
|
|
4194
4211
|
ref_key: "itemContainer",
|
|
4195
4212
|
ref: s,
|
|
4196
|
-
class: b(`flex flex-wrap overflow-hidden ${e.overlap ? "-space-x-2 " : ""} ${n
|
|
4213
|
+
class: b(`flex flex-wrap overflow-hidden ${e.overlap ? "-space-x-2 " : ""} ${l(n)}`)
|
|
4197
4214
|
}, [
|
|
4198
|
-
(a(!0),
|
|
4215
|
+
(a(!0), m(K, null, G(i.value, (y, v) => (a(), L(De, {
|
|
4199
4216
|
key: y.id || v,
|
|
4200
4217
|
user: y,
|
|
4201
4218
|
size: e.size
|
|
4202
4219
|
}, null, 8, ["user", "size"]))), 128))
|
|
4203
4220
|
], 2),
|
|
4204
|
-
|
|
4221
|
+
h.value ? (a(), L(De, {
|
|
4205
4222
|
key: 0,
|
|
4206
4223
|
size: e.size
|
|
4207
4224
|
}, {
|
|
4208
|
-
default:
|
|
4209
|
-
R(" +" + V(
|
|
4225
|
+
default: M(() => [
|
|
4226
|
+
R(" +" + V(h.value), 1)
|
|
4210
4227
|
]),
|
|
4211
4228
|
_: 1
|
|
4212
4229
|
}, 8, ["size"])) : I("", !0)
|
|
@@ -4234,17 +4251,17 @@ const Ka = {
|
|
|
4234
4251
|
}
|
|
4235
4252
|
return s.join(" ");
|
|
4236
4253
|
});
|
|
4237
|
-
return (s, o) => (a(),
|
|
4254
|
+
return (s, o) => (a(), L(l(ct), {
|
|
4238
4255
|
class: b(r.value)
|
|
4239
4256
|
}, null, 8, ["class"]));
|
|
4240
4257
|
}
|
|
4241
|
-
}), Za = { class: "flex flex-col items-center space-y-2" },
|
|
4258
|
+
}), Za = { class: "flex flex-col items-center space-y-2" }, Na = {
|
|
4242
4259
|
key: 1,
|
|
4243
4260
|
class: "relative group"
|
|
4244
|
-
},
|
|
4261
|
+
}, Qa = { class: "opacity-0 transition-all absolute group-hover:opacity-100 inset-0 flex items-end justify-center bottom-4" }, Ja = {
|
|
4245
4262
|
key: 2,
|
|
4246
4263
|
class: "w-full text-center text-danger text-sm"
|
|
4247
|
-
},
|
|
4264
|
+
}, tr = /* @__PURE__ */ P({
|
|
4248
4265
|
__name: "AvatarEditable",
|
|
4249
4266
|
props: nt({
|
|
4250
4267
|
modelValue: null,
|
|
@@ -4260,49 +4277,49 @@ const Ka = {
|
|
|
4260
4277
|
}),
|
|
4261
4278
|
emits: nt(["save", "update:modelValue"], ["update:editMode"]),
|
|
4262
4279
|
setup(e, { expose: t, emit: r }) {
|
|
4263
|
-
const s =
|
|
4280
|
+
const s = jt({
|
|
4264
4281
|
loader: () => import("./AvatarEditor-ce4e7960.js"),
|
|
4265
4282
|
loadingComponent: Xa,
|
|
4266
4283
|
delay: 100
|
|
4267
|
-
}), o = r,
|
|
4268
|
-
validateOnMount:
|
|
4269
|
-
validateOnValueUpdate:
|
|
4270
|
-
initialValue:
|
|
4271
|
-
}), i = it(e, "editMode", { local: !0 }),
|
|
4284
|
+
}), o = r, n = e, { value: d, errorMessage: h } = Ie(n.name, n.rules, {
|
|
4285
|
+
validateOnMount: n.validateOnMount,
|
|
4286
|
+
validateOnValueUpdate: n.validateOnValueUpdate,
|
|
4287
|
+
initialValue: n.modelValue || void 0
|
|
4288
|
+
}), i = it(e, "editMode", { local: !0 }), f = c(
|
|
4272
4289
|
() => ({
|
|
4273
4290
|
avatar: d.value,
|
|
4274
|
-
name:
|
|
4291
|
+
name: n.placeholder
|
|
4275
4292
|
})
|
|
4276
|
-
),
|
|
4293
|
+
), x = (g) => {
|
|
4277
4294
|
d.value = g, o("save", g);
|
|
4278
4295
|
};
|
|
4279
|
-
return t({ open: () => i.value = !0, close: () => i.value = !1 }), (g, u) => (a(),
|
|
4280
|
-
i.value ? (a(),
|
|
4296
|
+
return t({ open: () => i.value = !0, close: () => i.value = !1 }), (g, u) => (a(), m("div", Za, [
|
|
4297
|
+
i.value ? (a(), L(l(s), {
|
|
4281
4298
|
key: 0,
|
|
4282
|
-
user:
|
|
4299
|
+
user: f.value,
|
|
4283
4300
|
disabled: e.disabled,
|
|
4284
4301
|
size: e.size,
|
|
4285
4302
|
onCancel: u[0] || (u[0] = (S) => i.value = !1),
|
|
4286
|
-
onSave:
|
|
4287
|
-
}, null, 8, ["user", "disabled", "size"])) : (a(),
|
|
4303
|
+
onSave: x
|
|
4304
|
+
}, null, 8, ["user", "disabled", "size"])) : (a(), m("div", Na, [
|
|
4288
4305
|
z(De, {
|
|
4289
|
-
user:
|
|
4306
|
+
user: f.value,
|
|
4290
4307
|
size: e.size
|
|
4291
4308
|
}, null, 8, ["user", "size"]),
|
|
4292
|
-
|
|
4309
|
+
p("div", Qa, [
|
|
4293
4310
|
z(oe, {
|
|
4294
4311
|
disabled: e.disabled,
|
|
4295
4312
|
color: "secondary",
|
|
4296
4313
|
onClick: u[1] || (u[1] = (S) => i.value = !0)
|
|
4297
4314
|
}, {
|
|
4298
|
-
default:
|
|
4315
|
+
default: M(() => [
|
|
4299
4316
|
R(" Change ")
|
|
4300
4317
|
]),
|
|
4301
4318
|
_: 1
|
|
4302
4319
|
}, 8, ["disabled"])
|
|
4303
4320
|
])
|
|
4304
4321
|
])),
|
|
4305
|
-
|
|
4322
|
+
l(h) ? (a(), m("div", Ja, V(l(h)), 1)) : I("", !0)
|
|
4306
4323
|
]));
|
|
4307
4324
|
}
|
|
4308
4325
|
});
|
|
@@ -4329,12 +4346,12 @@ class so extends ue {
|
|
|
4329
4346
|
se(so, "defaultMessage", "Operation not supported in current (server or client) environment");
|
|
4330
4347
|
var Je = /* @__PURE__ */ ((e) => (e.AnyAudio = "audio/*", e.AnyVideo = "video/*", e.AnyImage = "image/*", e))(Je || {});
|
|
4331
4348
|
function no(e, t) {
|
|
4332
|
-
const r =
|
|
4349
|
+
const r = Rt(
|
|
4333
4350
|
Object.values(Je),
|
|
4334
4351
|
t
|
|
4335
4352
|
);
|
|
4336
|
-
for (const
|
|
4337
|
-
switch (
|
|
4353
|
+
for (const n of r)
|
|
4354
|
+
switch (n) {
|
|
4338
4355
|
case "audio/*":
|
|
4339
4356
|
if (e.type.startsWith("audio"))
|
|
4340
4357
|
return !0;
|
|
@@ -4348,13 +4365,13 @@ function no(e, t) {
|
|
|
4348
4365
|
return !0;
|
|
4349
4366
|
break;
|
|
4350
4367
|
}
|
|
4351
|
-
const s =
|
|
4368
|
+
const s = Dt(t, r), o = lo(e.name);
|
|
4352
4369
|
if (!o)
|
|
4353
|
-
return new
|
|
4354
|
-
for (const
|
|
4355
|
-
if (
|
|
4370
|
+
return new $t();
|
|
4371
|
+
for (const n of s)
|
|
4372
|
+
if (n.toLowerCase() === o.toLowerCase())
|
|
4356
4373
|
return !0;
|
|
4357
|
-
return new
|
|
4374
|
+
return new It();
|
|
4358
4375
|
}
|
|
4359
4376
|
function lo(e) {
|
|
4360
4377
|
const t = e.split(".").pop() || null;
|
|
@@ -4364,7 +4381,7 @@ function ao(e) {
|
|
|
4364
4381
|
return e.startsWith(".") || Object.values(Je).includes(e);
|
|
4365
4382
|
}
|
|
4366
4383
|
function rt(e) {
|
|
4367
|
-
const t = (
|
|
4384
|
+
const t = (n) => parseFloat(n.toFixed(2)).toString();
|
|
4368
4385
|
if (e < 1024)
|
|
4369
4386
|
return `${e}bytes`;
|
|
4370
4387
|
const r = e / 1024;
|
|
@@ -4383,14 +4400,14 @@ function oo(e) {
|
|
|
4383
4400
|
size: e.size,
|
|
4384
4401
|
type: e.type
|
|
4385
4402
|
};
|
|
4386
|
-
return
|
|
4387
|
-
}
|
|
4388
|
-
class Ct extends ue {
|
|
4403
|
+
return ds(JSON.stringify(t));
|
|
4389
4404
|
}
|
|
4390
|
-
se(Ct, "defaultMessage", "The selected file has a missing extension");
|
|
4391
4405
|
class $t extends ue {
|
|
4392
4406
|
}
|
|
4393
|
-
se($t, "defaultMessage", "The selected file
|
|
4407
|
+
se($t, "defaultMessage", "The selected file has a missing extension");
|
|
4408
|
+
class It extends ue {
|
|
4409
|
+
}
|
|
4410
|
+
se(It, "defaultMessage", "The selected file type is forbidden");
|
|
4394
4411
|
var ro = /* @__PURE__ */ ((e) => (e[e.Success = 1] = "Success", e[e.Failure = 2] = "Failure", e))(ro || {});
|
|
4395
4412
|
function io(e) {
|
|
4396
4413
|
if (!e)
|
|
@@ -4399,17 +4416,17 @@ function io(e) {
|
|
|
4399
4416
|
return t.length ? t : void 0;
|
|
4400
4417
|
}
|
|
4401
4418
|
function uo(e) {
|
|
4402
|
-
const { disabled: t, accept: r, multiple: s, sizeLimit: o, countLimit:
|
|
4403
|
-
const
|
|
4419
|
+
const { disabled: t, accept: r, multiple: s, sizeLimit: o, countLimit: n } = e, d = c(() => io(l(r))), h = (i) => {
|
|
4420
|
+
const f = [], x = d.value;
|
|
4404
4421
|
for (const y of i) {
|
|
4405
|
-
const v = oo(y), g =
|
|
4406
|
-
if (!
|
|
4407
|
-
if (g &&
|
|
4422
|
+
const v = oo(y), g = l(s) ? l(n) : 1;
|
|
4423
|
+
if (!f.find((u) => u.id === v)) {
|
|
4424
|
+
if (g && f.length >= g)
|
|
4408
4425
|
break;
|
|
4409
|
-
if (
|
|
4410
|
-
const u = no(y,
|
|
4426
|
+
if (x) {
|
|
4427
|
+
const u = no(y, x);
|
|
4411
4428
|
if (u instanceof Error) {
|
|
4412
|
-
|
|
4429
|
+
f.push({
|
|
4413
4430
|
file: y,
|
|
4414
4431
|
id: v,
|
|
4415
4432
|
error: u
|
|
@@ -4417,37 +4434,37 @@ function uo(e) {
|
|
|
4417
4434
|
continue;
|
|
4418
4435
|
}
|
|
4419
4436
|
}
|
|
4420
|
-
if (y.size >
|
|
4421
|
-
|
|
4437
|
+
if (y.size > l(o)) {
|
|
4438
|
+
f.push({
|
|
4422
4439
|
file: y,
|
|
4423
4440
|
id: v,
|
|
4424
|
-
error: new
|
|
4441
|
+
error: new St(
|
|
4425
4442
|
`The selected file's size (${rt(
|
|
4426
4443
|
y.size
|
|
4427
|
-
)}) is too big (over ${rt(
|
|
4444
|
+
)}) is too big (over ${rt(l(o))})`
|
|
4428
4445
|
)
|
|
4429
4446
|
});
|
|
4430
4447
|
continue;
|
|
4431
4448
|
}
|
|
4432
|
-
|
|
4449
|
+
f.push({ file: y, id: v, error: null });
|
|
4433
4450
|
}
|
|
4434
4451
|
}
|
|
4435
|
-
return
|
|
4452
|
+
return f;
|
|
4436
4453
|
};
|
|
4437
4454
|
return {
|
|
4438
4455
|
/**
|
|
4439
4456
|
* Validate incoming files and build UploadableFileItem structs out of them
|
|
4440
4457
|
*/
|
|
4441
4458
|
buildUploadableFiles: (i) => {
|
|
4442
|
-
if (!
|
|
4443
|
-
return
|
|
4459
|
+
if (!l(t || !1))
|
|
4460
|
+
return h(i);
|
|
4444
4461
|
}
|
|
4445
4462
|
};
|
|
4446
4463
|
}
|
|
4447
|
-
class
|
|
4464
|
+
class St extends ue {
|
|
4448
4465
|
}
|
|
4449
|
-
se(
|
|
4450
|
-
const co = ["accept", "multiple"],
|
|
4466
|
+
se(St, "defaultMessage", "The selected file's size is too large");
|
|
4467
|
+
const co = ["accept", "multiple"], sr = /* @__PURE__ */ P({
|
|
4451
4468
|
__name: "Zone",
|
|
4452
4469
|
props: {
|
|
4453
4470
|
accept: null,
|
|
@@ -4458,18 +4475,18 @@ const co = ["accept", "multiple"], tr = /* @__PURE__ */ P({
|
|
|
4458
4475
|
},
|
|
4459
4476
|
emits: ["files-selected"],
|
|
4460
4477
|
setup(e, { expose: t, emit: r }) {
|
|
4461
|
-
const s = r, o = e,
|
|
4478
|
+
const s = r, o = e, n = O(null), d = O(null), { buildUploadableFiles: h } = uo({
|
|
4462
4479
|
sizeLimit: c(() => o.sizeLimit),
|
|
4463
4480
|
countLimit: c(() => o.countLimit),
|
|
4464
4481
|
accept: c(() => o.accept),
|
|
4465
4482
|
multiple: c(() => o.multiple),
|
|
4466
4483
|
disabled: c(() => o.disabled)
|
|
4467
4484
|
}), i = (v) => {
|
|
4468
|
-
const g =
|
|
4485
|
+
const g = h(v);
|
|
4469
4486
|
g != null && g.length && s("files-selected", { files: g });
|
|
4470
|
-
}, { isOverDropZone:
|
|
4487
|
+
}, { isOverDropZone: f } = ks(n, (v) => {
|
|
4471
4488
|
v != null && v.length && i(v);
|
|
4472
|
-
}),
|
|
4489
|
+
}), x = () => {
|
|
4473
4490
|
const v = d.value;
|
|
4474
4491
|
if (!v)
|
|
4475
4492
|
return;
|
|
@@ -4481,17 +4498,17 @@ const co = ["accept", "multiple"], tr = /* @__PURE__ */ P({
|
|
|
4481
4498
|
};
|
|
4482
4499
|
return t({
|
|
4483
4500
|
triggerPicker: y
|
|
4484
|
-
}), (v, g) => (a(),
|
|
4501
|
+
}), (v, g) => (a(), m("div", {
|
|
4485
4502
|
ref_key: "fileUploadZone",
|
|
4486
|
-
ref:
|
|
4503
|
+
ref: n,
|
|
4487
4504
|
class: "file-upload-zone"
|
|
4488
4505
|
}, [
|
|
4489
4506
|
D(v.$slots, "default", {
|
|
4490
|
-
isDraggingFiles:
|
|
4507
|
+
isDraggingFiles: l(f),
|
|
4491
4508
|
openFilePicker: y,
|
|
4492
4509
|
activatorOn: { click: y }
|
|
4493
4510
|
}),
|
|
4494
|
-
|
|
4511
|
+
p("input", {
|
|
4495
4512
|
ref_key: "fileInput",
|
|
4496
4513
|
ref: d,
|
|
4497
4514
|
type: "file",
|
|
@@ -4500,7 +4517,7 @@ const co = ["accept", "multiple"], tr = /* @__PURE__ */ P({
|
|
|
4500
4517
|
multiple: e.multiple,
|
|
4501
4518
|
onClick: g[0] || (g[0] = pe(() => {
|
|
4502
4519
|
}, ["stop"])),
|
|
4503
|
-
onChange:
|
|
4520
|
+
onChange: x
|
|
4504
4521
|
}, null, 40, co)
|
|
4505
4522
|
], 512));
|
|
4506
4523
|
}
|
|
@@ -4511,37 +4528,37 @@ export {
|
|
|
4511
4528
|
Qo as CommonAlert,
|
|
4512
4529
|
Vo as CommonAnimationInstructional,
|
|
4513
4530
|
Xe as CommonBadge,
|
|
4514
|
-
|
|
4531
|
+
Qe as CommonLoadingBar,
|
|
4515
4532
|
Xa as CommonLoadingIcon,
|
|
4516
4533
|
Bo as CommonStepsBullet,
|
|
4517
4534
|
So as CommonStepsNumber,
|
|
4518
|
-
|
|
4535
|
+
Us as CommonTextLink,
|
|
4519
4536
|
to as ComposableInvokedOutOfScopeError,
|
|
4520
4537
|
oe as FormButton,
|
|
4521
4538
|
zo as FormCardButton,
|
|
4522
4539
|
Oo as FormCheckbox,
|
|
4523
|
-
|
|
4524
|
-
|
|
4540
|
+
To as FormClipboardInput,
|
|
4541
|
+
sr as FormFileUploadZone,
|
|
4525
4542
|
Lo as FormRadio,
|
|
4526
|
-
|
|
4527
|
-
|
|
4543
|
+
Po as FormSelectBadges,
|
|
4544
|
+
wt as FormSelectBase,
|
|
4528
4545
|
_o as FormSelectSourceApps,
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4546
|
+
jo as FormSwitch,
|
|
4547
|
+
Yo as FormTags,
|
|
4548
|
+
Mo as FormTextArea,
|
|
4532
4549
|
xl as FormTextInput,
|
|
4533
4550
|
Io as GlobalToastRenderer,
|
|
4534
4551
|
de as GridListToggleValue,
|
|
4535
4552
|
Re as HorizontalDirection,
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4553
|
+
Zo as InfiniteLoading,
|
|
4554
|
+
Eo as LayoutDialog,
|
|
4555
|
+
Uo as LayoutDialogSection,
|
|
4556
|
+
qo as LayoutDisclosure,
|
|
4557
|
+
Wo as LayoutGridListToggle,
|
|
4558
|
+
Ko as LayoutMenu,
|
|
4559
|
+
No as LayoutPanel,
|
|
4560
|
+
Xo as LayoutTable,
|
|
4561
|
+
Go as LayoutTabs,
|
|
4545
4562
|
Ya as LogicError,
|
|
4546
4563
|
$e as ModifierKeys,
|
|
4547
4564
|
Xl as SourceAppBadge,
|
|
@@ -4552,20 +4569,20 @@ export {
|
|
|
4552
4569
|
Je as UniqueFileTypeSpecifier,
|
|
4553
4570
|
so as UnsupportedEnvironmentError,
|
|
4554
4571
|
De as UserAvatar,
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4572
|
+
tr as UserAvatarEditable,
|
|
4573
|
+
er as UserAvatarGroup,
|
|
4574
|
+
Ao as ValidationHelpers,
|
|
4558
4575
|
Fe as clientOs,
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4576
|
+
Fo as getKeyboardShortcutTitle,
|
|
4577
|
+
gt as keyboardClick,
|
|
4578
|
+
Ro as onKeyboardShortcut,
|
|
4562
4579
|
rt as prettyFileSize,
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4580
|
+
Do as useFormCheckboxModel,
|
|
4581
|
+
kt as useFormSelectChildInternals,
|
|
4582
|
+
Ho as useOnBeforeWindowUnload,
|
|
4566
4583
|
ya as useResponsiveHorizontalDirectionCalculation,
|
|
4567
4584
|
ba as useWindowResizeHandler,
|
|
4568
|
-
|
|
4569
|
-
|
|
4585
|
+
xt as useWrappingContainerHiddenCount,
|
|
4586
|
+
Jo as writableAsyncComputed
|
|
4570
4587
|
};
|
|
4571
4588
|
//# sourceMappingURL=lib.js.map
|