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