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