@speckle/ui-components 2.16.0 → 2.16.1-alpha10

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.
Files changed (35) hide show
  1. package/dist/AvatarEditor-594c4e0d.js +193 -0
  2. package/dist/AvatarEditor-594c4e0d.js.map +1 -0
  3. package/dist/AvatarEditor-92ea4e16.cjs +2 -0
  4. package/dist/AvatarEditor-92ea4e16.cjs.map +1 -0
  5. package/dist/components/common/loading/Icon.vue.d.ts +24 -0
  6. package/dist/components/form/Switch.vue.d.ts +6 -0
  7. package/dist/components/form/Tags.vue.d.ts +147 -0
  8. package/dist/components/form/TextArea.vue.d.ts +6 -0
  9. package/dist/components/form/TextInput.vue.d.ts +1 -1
  10. package/dist/components/form/file-upload/Zone.vue.d.ts +62 -0
  11. package/dist/components/form/select/Badges.vue.d.ts +64 -0
  12. package/dist/components/form/select/Base.vue.d.ts +375 -333
  13. package/dist/components/form/select/SourceApps.vue.d.ts +13 -0
  14. package/dist/components/form/tags/ContextManager.vue.d.ts +16 -0
  15. package/dist/components/layout/Table.vue.d.ts +68 -0
  16. package/dist/components/user/Avatar.vue.d.ts +59 -0
  17. package/dist/components/user/AvatarEditable.vue.d.ts +67 -0
  18. package/dist/components/user/AvatarEditor.vue.d.ts +26 -0
  19. package/dist/components/user/AvatarGroup.vue.d.ts +44 -0
  20. package/dist/composables/form/fileUpload.d.ts +63 -0
  21. package/dist/composables/form/textInput.d.ts +9 -5
  22. package/dist/composables/user/avatar.d.ts +19 -0
  23. package/dist/helpers/common/error.d.ts +28 -0
  24. package/dist/helpers/common/validation.d.ts +2 -0
  25. package/dist/helpers/form/file.d.ts +41 -0
  26. package/dist/lib.cjs +2 -1
  27. package/dist/lib.cjs.map +1 -0
  28. package/dist/lib.d.ts +14 -2
  29. package/dist/lib.js +2191 -1206
  30. package/dist/lib.js.map +1 -0
  31. package/dist/stories/helpers/avatar.d.ts +1 -0
  32. package/package.json +3 -2
  33. package/tailwind.config.cjs +11 -0
  34. package/tsconfig.json +1 -1
  35. package/vite.config.ts +6 -1
package/dist/lib.js CHANGED
@@ -1,19 +1,22 @@
1
- import { defineComponent as A, resolveDynamicComponent as H, computed as r, openBlock as a, createBlock as L, normalizeClass as k, withCtx as _, createCommentVNode as I, renderSlot as z, createTextVNode as M, createElementBlock as m, createElementVNode as i, createVNode as P, Transition as ge, unref as l, toDisplayString as B, toRefs as ae, Fragment as W, renderList as G, ref as O, onMounted as Y, mergeProps as oe, withDirectives as ne, isRef as ve, vModelText as Ae, useSlots as be, vModelDynamic as Xe, pushScopeId as Ne, popScopeId as Je, watch as le, withModifiers as ye, normalizeStyle as fe, onBeforeUnmount as Me } from "vue";
2
- import { isObjectLike as Le, clamp as je, isString as ie, isUndefined as Q, isArray as q, debounce as ze, throttle as Qe, noop as Ye } from "lodash";
3
- import { ArrowPathIcon as Ze, ChevronUpIcon as De, ChevronDownIcon as et, XMarkIcon as tt, MagnifyingGlassIcon as st, CheckIcon as nt, Bars3Icon as lt, Squares2X2Icon as at } from "@heroicons/vue/24/solid";
4
- import { CheckCircleIcon as ot, XCircleIcon as rt, ExclamationCircleIcon as it, InformationCircleIcon as ut, XMarkIcon as ct, CheckIcon as dt, ExclamationTriangleIcon as ft } from "@heroicons/vue/24/outline";
5
- import { XMarkIcon as ue, CheckIcon as pt, CheckCircleIcon as Te, ExclamationCircleIcon as xe, EnvelopeIcon as ht, KeyIcon as mt, XCircleIcon as gt, InformationCircleIcon as vt } from "@heroicons/vue/20/solid";
6
- import { useField as ke } from "vee-validate";
7
- import { nanoid as Ce } from "nanoid";
8
- import { isNullOrUndefined as bt, SourceApps as yt, getClientOperatingSystem as xt, OperatingSystem as pe } from "@speckle/shared";
9
- import { useResizeObserver as kt, useMutationObserver as Ct, onKeyDown as wt, isClient as we, computedAsync as $t } from "@vueuse/core";
10
- import { Listbox as St, ListboxLabel as It, ListboxButton as Bt, ListboxOptions as _t, ListboxOption as Pt, TransitionRoot as Lt, Dialog as jt, TransitionChild as Ve, DialogPanel as Vt, Disclosure as Ot, DisclosureButton as At, DisclosurePanel as Mt, Menu as zt, MenuButton as Dt, MenuItems as Tt, MenuItem as Rt } from "@headlessui/vue";
11
- import { directive as Re } from "vue-tippy";
12
- import Ft from "v3-infinite-loading";
13
- const Et = {
1
+ var bt = Object.defineProperty;
2
+ var yt = (e, t, s) => t in e ? bt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var Q = (e, t, s) => (yt(e, typeof t != "symbol" ? t + "" : t, s), s);
4
+ import { defineComponent as A, resolveDynamicComponent as Z, computed as u, openBlock as a, createBlock as P, normalizeClass as x, withCtx as _, createCommentVNode as S, renderSlot as R, createTextVNode as M, createElementBlock as p, createElementVNode as v, createVNode as V, Transition as Ae, unref as n, toDisplayString as L, toRefs as N, Fragment as D, renderList as q, ref as O, onMounted as se, mergeProps as ye, withDirectives as de, isRef as $e, vModelText as Me, useSlots as Te, vModelDynamic as xt, pushScopeId as kt, popScopeId as wt, watch as te, withModifiers as le, normalizeStyle as fe, useModel as Je, onBeforeUnmount as Ye, getCurrentInstance as Ct, inject as $t, withKeys as ie, mergeModels as Ge, defineAsyncComponent as It } from "vue";
5
+ import { isObjectLike as _e, clamp as Xe, isArray as X, isString as Ce, isUndefined as ce, debounce as Fe, throttle as et, noop as St, uniq as Bt, intersection as Vt, difference as Lt } from "lodash";
6
+ import { ArrowPathIcon as tt, ExclamationCircleIcon as _t, ChevronUpIcon as st, ChevronDownIcon as zt, XMarkIcon as Re, MagnifyingGlassIcon as Pt, CheckIcon as lt, Bars3Icon as jt, Squares2X2Icon as Ot, UserCircleIcon as At } from "@heroicons/vue/24/solid";
7
+ import { CheckCircleIcon as Mt, XCircleIcon as Tt, ExclamationCircleIcon as Ft, InformationCircleIcon as Rt, XMarkIcon as Et, CheckIcon as Ut, ExclamationTriangleIcon as Dt } from "@heroicons/vue/24/outline";
8
+ import { XMarkIcon as pe, CheckIcon as nt, CheckCircleIcon as at, ExclamationCircleIcon as Ie, EnvelopeIcon as Wt, KeyIcon as qt, XCircleIcon as Ht, InformationCircleIcon as Kt } from "@heroicons/vue/20/solid";
9
+ import { useField as Se } from "vee-validate";
10
+ import { nanoid as Ee } from "nanoid";
11
+ import { isNullOrUndefined as Gt, SourceApps as Xt, getClientOperatingSystem as Zt, OperatingSystem as ze, md5 as Qt } from "@speckle/shared";
12
+ import { useResizeObserver as Nt, useMutationObserver as Jt, onKeyDown as Yt, isClient as Ue, computedAsync as es, useFocus as ts, useDropZone as ss } from "@vueuse/core";
13
+ import { Listbox as ls, ListboxLabel as ns, ListboxButton as as, ListboxOptions as os, ListboxOption as rs, Switch as is, TransitionRoot as ot, Dialog as us, TransitionChild as Ze, DialogPanel as cs, Disclosure as ds, DisclosureButton as fs, DisclosurePanel as ps, Menu as hs, MenuButton as ms, MenuItems as vs, MenuItem as gs, Combobox as bs, ComboboxOptions as ys, ComboboxOption as xs } from "@headlessui/vue";
14
+ import { directive as rt } from "vue-tippy";
15
+ import ks from "v3-infinite-loading";
16
+ const ws = {
14
17
  key: 2,
15
18
  style: { margin: "0 !important", width: "0.01px" }
16
- }, Wt = /* @__PURE__ */ A({
19
+ }, Cs = /* @__PURE__ */ A({
17
20
  __name: "Button",
18
21
  props: {
19
22
  /**
@@ -140,114 +143,114 @@ const Et = {
140
143
  }
141
144
  },
142
145
  emits: ["click"],
143
- setup(e, { emit: n }) {
144
- const t = e, s = H("NuxtLink"), o = H("RouterLink"), c = r(() => t.linkComponent ? t.linkComponent : t.external ? "a" : Le(s) ? s : Le(o) ? o : "a"), d = r(() => {
145
- if (!t.to)
146
- return t.submit ? "submit" : "button";
147
- }), f = r(() => t.disabled || t.loading), x = r(() => t.loading ? Ze : t.iconLeft), p = r(() => {
146
+ setup(e, { emit: t }) {
147
+ const s = e, l = Z("NuxtLink"), o = Z("RouterLink"), r = u(() => s.linkComponent ? s.linkComponent : s.external ? "a" : _e(l) ? l : _e(o) ? o : "a"), d = u(() => {
148
+ if (!s.to)
149
+ return s.submit ? "submit" : "button";
150
+ }), i = u(() => s.disabled || s.loading), f = u(() => s.loading ? tt : s.iconLeft), c = u(() => {
148
151
  const g = [];
149
- if (g.push("border-2"), f.value)
152
+ if (g.push("border-2"), i.value)
150
153
  g.push(
151
- t.outlined ? "border-foreground-disabled" : "bg-foundation-disabled border-transparent"
154
+ s.outlined ? "border-foreground-disabled" : "bg-foundation-disabled border-transparent"
152
155
  );
153
156
  else
154
- switch (t.color) {
157
+ switch (s.color) {
155
158
  case "invert":
156
159
  g.push(
157
- t.outlined ? "border-foundation dark:border-foreground" : "bg-foundation dark:bg-foreground border-transparent"
160
+ s.outlined ? "border-foundation dark:border-foreground" : "bg-foundation dark:bg-foreground border-transparent"
158
161
  );
159
162
  break;
160
163
  case "card":
161
164
  g.push(
162
- t.outlined ? "border-foundation-2 shadow" : "bg-foundation-2 dark:bg-foundation-2 border-foundation shadow"
165
+ s.outlined ? "border-foundation-2 shadow" : "bg-foundation-2 dark:bg-foundation-2 border-foundation shadow"
163
166
  );
164
167
  break;
165
168
  case "danger":
166
- g.push(t.outlined ? "border-danger" : "bg-danger border-danger");
169
+ g.push(s.outlined ? "border-danger" : "bg-danger border-danger");
167
170
  break;
168
171
  case "secondary":
169
172
  g.push(
170
- t.outlined ? "border-foundation" : "bg-foundation border-foundation-2"
173
+ s.outlined ? "border-foundation" : "bg-foundation border-foundation-2"
171
174
  );
172
175
  break;
173
176
  case "warning":
174
- g.push(t.outlined ? "border-warning" : "bg-warning border-warning");
177
+ g.push(s.outlined ? "border-warning" : "bg-warning border-warning");
175
178
  break;
176
179
  case "info":
177
- g.push(t.outlined ? "border-info" : "bg-info border-info");
180
+ g.push(s.outlined ? "border-info" : "bg-info border-info");
178
181
  break;
179
182
  case "success":
180
- g.push(t.outlined ? "border-success" : "bg-success border-success");
183
+ g.push(s.outlined ? "border-success" : "bg-success border-success");
181
184
  break;
182
185
  case "default":
183
186
  default:
184
187
  g.push(
185
- t.outlined ? "border-primary hover:border-primary-focus" : "bg-primary hover:bg-primary-focus border-transparent"
188
+ s.outlined ? "border-primary hover:border-primary-focus" : "bg-primary hover:bg-primary-focus border-transparent"
186
189
  );
187
190
  break;
188
191
  }
189
192
  return g.join(" ");
190
- }), b = r(() => {
193
+ }), C = u(() => {
191
194
  const g = [];
192
- if (!t.text && !t.link)
193
- if (f.value)
195
+ if (!s.text && !s.link)
196
+ if (i.value)
194
197
  g.push(
195
- (t.outlined, "text-foreground-disabled")
198
+ (s.outlined, "text-foreground-disabled")
196
199
  );
197
200
  else
198
- switch (t.color) {
201
+ switch (s.color) {
199
202
  case "invert":
200
203
  g.push(
201
- t.outlined ? "text-foundation dark:text-foreground" : "text-primary"
204
+ s.outlined ? "text-foundation dark:text-foreground" : "text-primary"
202
205
  );
203
206
  break;
204
207
  case "card":
205
- g.push((t.outlined, "text-foreground"));
208
+ g.push((s.outlined, "text-foreground"));
206
209
  break;
207
210
  case "danger":
208
211
  g.push(
209
- t.outlined ? "text-danger" : "text-foundation dark:text-foreground"
212
+ s.outlined ? "text-danger" : "text-foundation dark:text-foreground"
210
213
  );
211
214
  break;
212
215
  case "warning":
213
216
  g.push(
214
- t.outlined ? "text-warning" : "text-foundation dark:text-foreground"
217
+ s.outlined ? "text-warning" : "text-foundation dark:text-foreground"
215
218
  );
216
219
  break;
217
220
  case "info":
218
221
  g.push(
219
- t.outlined ? "text-info" : "text-foundation dark:text-foreground"
222
+ s.outlined ? "text-info" : "text-foundation dark:text-foreground"
220
223
  );
221
224
  break;
222
225
  case "success":
223
226
  g.push(
224
- t.outlined ? "text-success" : "text-foundation dark:text-foreground"
227
+ s.outlined ? "text-success" : "text-foundation dark:text-foreground"
225
228
  );
226
229
  break;
227
230
  case "secondary":
228
231
  g.push(
229
- (t.outlined, "text-foreground hover:text-primary")
232
+ (s.outlined, "text-foreground hover:text-primary")
230
233
  );
231
234
  break;
232
235
  case "default":
233
236
  default:
234
237
  g.push(
235
- t.outlined ? "text-primary hover:text-primary-focus" : "text-foundation dark:text-foreground"
238
+ s.outlined ? "text-primary hover:text-primary-focus" : "text-foundation dark:text-foreground"
236
239
  );
237
240
  break;
238
241
  }
239
242
  else
240
- f.value ? g.push("text-foreground-disabled") : t.color === "invert" ? g.push(
243
+ i.value ? g.push("text-foreground-disabled") : s.color === "invert" ? g.push(
241
244
  "text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"
242
- ) : t.color === "secondary" ? g.push("text-foreground-2 hover:text-primary-focus") : t.color === "success" ? g.push("text-success") : t.color === "warning" ? g.push("text-warning") : t.color === "info" ? g.push("text-info") : t.color === "danger" ? g.push("text-danger") : g.push("text-primary hover:text-primary-focus");
245
+ ) : s.color === "secondary" ? g.push("text-foreground-2 hover:text-primary-focus") : s.color === "success" ? g.push("text-success") : s.color === "warning" ? g.push("text-warning") : s.color === "info" ? g.push("text-info") : s.color === "danger" ? g.push("text-danger") : g.push("text-primary hover:text-primary-focus");
243
246
  return g.join(" ");
244
- }), y = r(() => {
247
+ }), b = u(() => {
245
248
  const g = [];
246
- return g.push(t.rounded ? "rounded-full" : "rounded-md"), g.join(" ");
247
- }), h = r(() => {
249
+ return g.push(s.rounded ? "rounded-full" : "rounded-md"), g.join(" ");
250
+ }), h = u(() => {
248
251
  const g = [];
249
- if (!f.value)
250
- switch (t.color) {
252
+ if (!i.value)
253
+ switch (s.color) {
251
254
  case "invert":
252
255
  g.push("hover:ring-4 ring-white/50");
253
256
  break;
@@ -269,8 +272,8 @@ const Et = {
269
272
  break;
270
273
  }
271
274
  return g.join(" ");
272
- }), C = r(() => {
273
- switch (t.size) {
275
+ }), k = u(() => {
276
+ switch (s.size) {
274
277
  case "xs":
275
278
  return "h-5 text-xs font-medium xxx-tracking-wide";
276
279
  case "sm":
@@ -283,8 +286,8 @@ const Et = {
283
286
  case "base":
284
287
  return "h-8 text-base font-medium xxx-tracking-wide";
285
288
  }
286
- }), u = r(() => {
287
- switch (t.size) {
289
+ }), m = u(() => {
290
+ switch (s.size) {
288
291
  case "xs":
289
292
  return "px-1";
290
293
  case "sm":
@@ -297,30 +300,30 @@ const Et = {
297
300
  case "base":
298
301
  return "px-3";
299
302
  }
300
- }), j = r(() => {
303
+ }), z = u(() => {
301
304
  const g = [];
302
- return t.fullWidth && g.push("w-full"), f.value && g.push("cursor-not-allowed"), g.join(" ");
303
- }), v = r(() => {
305
+ return s.fullWidth && g.push("w-full"), i.value && g.push("cursor-not-allowed"), g.join(" ");
306
+ }), w = u(() => {
304
307
  const g = [];
305
- return !f.value && !t.link && !t.text && g.push("active:scale-[0.97]"), !f.value && t.link && g.push(
308
+ return !i.value && !s.link && !s.text && g.push("active:scale-[0.97]"), !i.value && s.link && g.push(
306
309
  "underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"
307
310
  ), g.join(" ");
308
- }), w = r(() => {
309
- const g = t.link || t.text;
311
+ }), $ = u(() => {
312
+ const g = s.link || s.text;
310
313
  return [
311
314
  "transition inline-flex justify-center items-center space-x-2 outline-none select-none",
312
- j.value,
315
+ z.value,
316
+ k.value,
313
317
  C.value,
314
- b.value,
315
- g ? "" : p.value,
316
- g ? "" : y.value,
318
+ g ? "" : c.value,
319
+ g ? "" : b.value,
317
320
  g ? "" : h.value,
318
- t.link ? "" : u.value,
319
- v.value
321
+ s.link ? "" : m.value,
322
+ w.value
320
323
  ].join(" ");
321
- }), S = r(() => {
324
+ }), j = u(() => {
322
325
  const g = [""];
323
- switch (t.loading && g.push("animate-spin"), t.size) {
326
+ switch (s.loading && g.push("animate-spin"), s.size) {
324
327
  case "xs":
325
328
  g.push("h-3 w-3");
326
329
  break;
@@ -339,46 +342,46 @@ const Et = {
339
342
  break;
340
343
  }
341
344
  return g.join(" ");
342
- }), R = (g) => {
343
- if (f.value) {
345
+ }), E = (g) => {
346
+ if (i.value) {
344
347
  g.preventDefault(), g.stopPropagation(), g.stopImmediatePropagation();
345
348
  return;
346
349
  }
347
- n("click", g);
350
+ t("click", g);
348
351
  };
349
- return (g, T) => (a(), L(H(e.to ? c.value : "button"), {
352
+ return (g, T) => (a(), P(Z(e.to ? r.value : "button"), {
350
353
  href: e.to,
351
354
  to: e.to,
352
355
  type: d.value,
353
356
  external: e.external,
354
- class: k(w.value),
355
- disabled: f.value,
357
+ class: x($.value),
358
+ disabled: i.value,
356
359
  role: "button",
357
- onClick: R
360
+ onClick: E
358
361
  }, {
359
362
  default: _(() => [
360
- x.value ? (a(), L(H(x.value), {
363
+ f.value ? (a(), P(Z(f.value), {
361
364
  key: 0,
362
- class: k(`${S.value} ${e.hideText ? "" : "mr-2"}`)
363
- }, null, 8, ["class"])) : I("", !0),
364
- e.hideText ? (a(), m("div", Et, "   ")) : z(g.$slots, "default", { key: 1 }, () => [
365
+ class: x(`${j.value} ${e.hideText ? "" : "mr-2"}`)
366
+ }, null, 8, ["class"])) : S("", !0),
367
+ e.hideText ? (a(), p("div", ws, "   ")) : R(g.$slots, "default", { key: 1 }, () => [
365
368
  M("Button")
366
369
  ], !0),
367
- e.iconRight || !e.loading ? (a(), L(H(e.iconRight), {
370
+ e.iconRight || !e.loading ? (a(), P(Z(e.iconRight), {
368
371
  key: 3,
369
- class: k(`${S.value} ${e.hideText ? "" : "ml-2"}`)
370
- }, null, 8, ["class"])) : I("", !0)
372
+ class: x(`${j.value} ${e.hideText ? "" : "ml-2"}`)
373
+ }, null, 8, ["class"])) : S("", !0)
371
374
  ]),
372
375
  _: 3
373
376
  }, 8, ["href", "to", "type", "external", "class", "disabled"]));
374
377
  }
375
378
  });
376
- const Fe = (e, n) => {
377
- const t = e.__vccOpts || e;
378
- for (const [s, o] of n)
379
- t[s] = o;
380
- return t;
381
- }, re = /* @__PURE__ */ Fe(Wt, [["__scopeId", "data-v-38aa371e"]]), Ut = /* @__PURE__ */ A({
379
+ const it = (e, t) => {
380
+ const s = e.__vccOpts || e;
381
+ for (const [l, o] of t)
382
+ s[l] = o;
383
+ return s;
384
+ }, ne = /* @__PURE__ */ it(Cs, [["__scopeId", "data-v-38aa371e"]]), $s = /* @__PURE__ */ A({
382
385
  __name: "Link",
383
386
  props: {
384
387
  to: {
@@ -427,15 +430,15 @@ const Fe = (e, n) => {
427
430
  }
428
431
  },
429
432
  emits: ["click"],
430
- setup(e, { emit: n }) {
431
- const t = e, s = (o) => {
432
- if (t.disabled) {
433
+ setup(e, { emit: t }) {
434
+ const s = e, l = (o) => {
435
+ if (s.disabled) {
433
436
  o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation();
434
437
  return;
435
438
  }
436
- n("click", o);
439
+ t("click", o);
437
440
  };
438
- return (o, c) => (a(), L(re, {
441
+ return (o, r) => (a(), P(ne, {
439
442
  link: "",
440
443
  to: e.to,
441
444
  external: e.external,
@@ -446,10 +449,10 @@ const Fe = (e, n) => {
446
449
  "icon-right": e.iconRight,
447
450
  "hide-text": e.hideText,
448
451
  role: "link",
449
- onClickCapture: s
452
+ onClickCapture: l
450
453
  }, {
451
454
  default: _(() => [
452
- z(o.$slots, "default", {}, () => [
455
+ R(o.$slots, "default", {}, () => [
453
456
  M("Link")
454
457
  ])
455
458
  ]),
@@ -457,43 +460,43 @@ const Fe = (e, n) => {
457
460
  }, 8, ["to", "external", "disabled", "size", "foreground-link", "icon-left", "icon-right", "hide-text"]));
458
461
  }
459
462
  });
460
- var ee = /* @__PURE__ */ ((e) => (e[e.Success = 0] = "Success", e[e.Warning = 1] = "Warning", e[e.Danger = 2] = "Danger", e[e.Info = 3] = "Info", e))(ee || {});
461
- const qt = {
463
+ var ve = /* @__PURE__ */ ((e) => (e[e.Success = 0] = "Success", e[e.Warning = 1] = "Warning", e[e.Danger = 2] = "Danger", e[e.Info = 3] = "Info", e))(ve || {});
464
+ const Is = {
462
465
  "aria-live": "assertive",
463
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"
464
- }, Ht = { class: "flex w-full flex-col items-center space-y-4 sm:items-end" }, Gt = {
467
+ }, Ss = { class: "flex w-full flex-col items-center space-y-4 sm:items-end" }, Bs = {
465
468
  key: 0,
466
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"
467
- }, Kt = { class: "p-4" }, Xt = { class: "flex items-start" }, Nt = { class: "flex-shrink-0" }, Jt = { class: "ml-2 w-0 flex-1 flex flex-col" }, Qt = {
470
+ }, Vs = { class: "p-4" }, Ls = { class: "flex items-start" }, _s = { class: "flex-shrink-0" }, zs = { class: "ml-2 w-0 flex-1 flex flex-col" }, Ps = {
468
471
  key: 0,
469
472
  class: "text-foreground font-bold"
470
- }, Yt = {
473
+ }, js = {
471
474
  key: 1,
472
475
  class: "label label--light text-foreground-2"
473
- }, Zt = {
476
+ }, Os = {
474
477
  key: 2,
475
478
  class: "flex justify-start mt-2"
476
- }, es = /* @__PURE__ */ i("span", { class: "sr-only" }, "Close", -1), xl = /* @__PURE__ */ A({
479
+ }, As = /* @__PURE__ */ v("span", { class: "sr-only" }, "Close", -1), za = /* @__PURE__ */ A({
477
480
  __name: "ToastRenderer",
478
481
  props: {
479
482
  notification: null
480
483
  },
481
484
  emits: ["update:notification"],
482
- setup(e, { emit: n }) {
483
- const t = e, s = r(
485
+ setup(e, { emit: t }) {
486
+ const s = e, l = u(
484
487
  () => {
485
- var d, f;
486
- return !((d = t.notification) != null && d.description) && !((f = t.notification) != null && f.cta);
488
+ var d, i;
489
+ return !((d = s.notification) != null && d.description) && !((i = s.notification) != null && i.cta);
487
490
  }
488
491
  ), o = () => {
489
- n("update:notification", null);
490
- }, c = (d) => {
491
- var f, x, p;
492
- (p = (x = (f = t.notification) == null ? void 0 : f.cta) == null ? void 0 : x.onClick) == null || p.call(x, d), o();
492
+ t("update:notification", null);
493
+ }, r = (d) => {
494
+ var i, f, c;
495
+ (c = (f = (i = s.notification) == null ? void 0 : i.cta) == null ? void 0 : f.onClick) == null || c.call(f, d), o();
493
496
  };
494
- return (d, f) => (a(), m("div", qt, [
495
- i("div", Ht, [
496
- P(ge, {
497
+ return (d, i) => (a(), p("div", Is, [
498
+ v("div", Ss, [
499
+ V(Ae, {
497
500
  "enter-active-class": "transform ease-out duration-300 transition",
498
501
  "enter-from-class": "translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",
499
502
  "enter-to-class": "translate-y-0 opacity-100 sm:translate-x-0",
@@ -502,55 +505,55 @@ const qt = {
502
505
  "leave-to-class": "opacity-0"
503
506
  }, {
504
507
  default: _(() => [
505
- e.notification ? (a(), m("div", Gt, [
506
- i("div", Kt, [
507
- i("div", Xt, [
508
- i("div", Nt, [
509
- e.notification.type === l(ee).Success ? (a(), L(l(ot), {
508
+ e.notification ? (a(), p("div", Bs, [
509
+ v("div", Vs, [
510
+ v("div", Ls, [
511
+ v("div", _s, [
512
+ e.notification.type === n(ve).Success ? (a(), P(n(Mt), {
510
513
  key: 0,
511
514
  class: "h-6 w-6 text-success",
512
515
  "aria-hidden": "true"
513
- })) : e.notification.type === l(ee).Danger ? (a(), L(l(rt), {
516
+ })) : e.notification.type === n(ve).Danger ? (a(), P(n(Tt), {
514
517
  key: 1,
515
518
  class: "h-6 w-6 text-danger",
516
519
  "aria-hidden": "true"
517
- })) : e.notification.type === l(ee).Warning ? (a(), L(l(it), {
520
+ })) : e.notification.type === n(ve).Warning ? (a(), P(n(Ft), {
518
521
  key: 2,
519
522
  class: "h-6 w-6 text-warning",
520
523
  "aria-hidden": "true"
521
- })) : e.notification.type === l(ee).Info ? (a(), L(l(ut), {
524
+ })) : e.notification.type === n(ve).Info ? (a(), P(n(Rt), {
522
525
  key: 3,
523
526
  class: "h-6 w-6 text-info",
524
527
  "aria-hidden": "true"
525
- })) : I("", !0)
528
+ })) : S("", !0)
526
529
  ]),
527
- i("div", Jt, [
528
- e.notification.title ? (a(), m("p", Qt, B(e.notification.title), 1)) : I("", !0),
529
- e.notification.description ? (a(), m("p", Yt, B(e.notification.description), 1)) : I("", !0),
530
- e.notification.cta ? (a(), m("div", Zt, [
531
- P(Ut, {
530
+ v("div", zs, [
531
+ e.notification.title ? (a(), p("p", Ps, L(e.notification.title), 1)) : S("", !0),
532
+ e.notification.description ? (a(), p("p", js, L(e.notification.description), 1)) : S("", !0),
533
+ e.notification.cta ? (a(), p("div", Os, [
534
+ V($s, {
532
535
  to: e.notification.cta.url,
533
536
  class: "label",
534
537
  primary: "",
535
- onClick: c
538
+ onClick: r
536
539
  }, {
537
540
  default: _(() => [
538
- M(B(e.notification.cta.title), 1)
541
+ M(L(e.notification.cta.title), 1)
539
542
  ]),
540
543
  _: 1
541
544
  }, 8, ["to"])
542
- ])) : I("", !0)
545
+ ])) : S("", !0)
543
546
  ]),
544
- i("div", {
545
- class: k(["ml-4 flex flex-shrink-0", { "self-center": s.value }])
547
+ v("div", {
548
+ class: x(["ml-4 flex flex-shrink-0", { "self-center": l.value }])
546
549
  }, [
547
- i("button", {
550
+ v("button", {
548
551
  type: "button",
549
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",
550
553
  onClick: o
551
554
  }, [
552
- es,
553
- P(l(ue), {
555
+ As,
556
+ V(n(pe), {
554
557
  class: "h-6 w-6",
555
558
  "aria-hidden": "true"
556
559
  })
@@ -558,20 +561,20 @@ const qt = {
558
561
  ], 2)
559
562
  ])
560
563
  ])
561
- ])) : I("", !0)
564
+ ])) : S("", !0)
562
565
  ]),
563
566
  _: 1
564
567
  })
565
568
  ])
566
569
  ]));
567
570
  }
568
- }), ts = /* @__PURE__ */ i("circle", {
571
+ }), Ms = /* @__PURE__ */ v("circle", {
569
572
  cx: "4",
570
573
  cy: "4",
571
574
  r: "3"
572
- }, null, -1), ss = [
573
- ts
574
- ], ns = /* @__PURE__ */ A({
575
+ }, null, -1), Ts = [
576
+ Ms
577
+ ], De = /* @__PURE__ */ A({
575
578
  __name: "Badge",
576
579
  props: {
577
580
  size: null,
@@ -583,119 +586,119 @@ const qt = {
583
586
  clickableIcon: { type: Boolean }
584
587
  },
585
588
  emits: ["click-icon"],
586
- setup(e, { emit: n }) {
587
- const t = e, s = r(
588
- () => t.colorClasses || "bg-blue-100 text-blue-800"
589
- ), o = r(
590
- () => t.dotIconColorClasses || "text-blue-400"
591
- ), c = r(() => {
592
- const p = [
589
+ setup(e, { emit: t }) {
590
+ const s = e, l = u(
591
+ () => s.colorClasses || "bg-blue-100 text-blue-800"
592
+ ), o = u(
593
+ () => s.dotIconColorClasses || "text-blue-400"
594
+ ), r = u(() => {
595
+ const c = [
593
596
  "inline-flex items-center",
594
- s.value,
595
- t.size === "lg" ? "px-3 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
597
+ l.value,
598
+ s.size === "lg" ? "px-3 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
596
599
  ];
597
- return t.rounded ? (p.push("rounded"), p.push(
598
- t.size === "lg" ? "px-2 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
599
- )) : (p.push("rounded-full"), p.push(
600
- t.size === "lg" ? "px-2.5 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
601
- )), p.join(" ");
602
- }), d = r(() => {
603
- const p = [
600
+ return s.rounded ? (c.push("rounded"), c.push(
601
+ s.size === "lg" ? "px-2 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
602
+ )) : (c.push("rounded-full"), c.push(
603
+ s.size === "lg" ? "px-2.5 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
604
+ )), c.join(" ");
605
+ }), d = u(() => {
606
+ const c = [
604
607
  "mt-0.5 ml-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full focus:outline-none"
605
608
  ];
606
- return t.clickableIcon ? p.push("cursor-pointer") : p.push("cursor-default"), p.join(" ");
607
- }), f = r(() => [
609
+ return s.clickableIcon ? c.push("cursor-pointer") : c.push("cursor-default"), c.join(" ");
610
+ }), i = u(() => [
608
611
  "-ml-0.5 mr-1.5 h-2 w-2",
609
612
  o.value
610
- ].join(" ")), x = (p) => {
611
- if (!t.clickableIcon) {
612
- p.stopPropagation(), p.stopImmediatePropagation(), p.preventDefault();
613
+ ].join(" ")), f = (c) => {
614
+ if (!s.clickableIcon) {
615
+ c.stopPropagation(), c.stopImmediatePropagation(), c.preventDefault();
613
616
  return;
614
617
  }
615
- n("click-icon", p);
618
+ t("click-icon", c);
616
619
  };
617
- return (p, b) => (a(), m("span", {
618
- class: k(c.value)
620
+ return (c, C) => (a(), p("span", {
621
+ class: x(r.value)
619
622
  }, [
620
- e.dot ? (a(), m("svg", {
623
+ e.dot ? (a(), p("svg", {
621
624
  key: 0,
622
- class: k(f.value),
625
+ class: x(i.value),
623
626
  fill: "currentColor",
624
627
  viewBox: "0 0 8 8"
625
- }, ss, 2)) : I("", !0),
626
- z(p.$slots, "default", {}, () => [
628
+ }, Ts, 2)) : S("", !0),
629
+ R(c.$slots, "default", {}, () => [
627
630
  M("Badge")
628
631
  ]),
629
- e.iconLeft ? (a(), m("button", {
632
+ e.iconLeft ? (a(), p("button", {
630
633
  key: 1,
631
- class: k(d.value),
632
- onClick: b[0] || (b[0] = (y) => x(y))
634
+ class: x(d.value),
635
+ onClick: C[0] || (C[0] = (b) => f(b))
633
636
  }, [
634
- (a(), L(H(e.iconLeft), {
635
- class: k(["h-4 w-4", o.value])
637
+ (a(), P(Z(e.iconLeft), {
638
+ class: x(["h-4 w-4", o.value])
636
639
  }, null, 8, ["class"]))
637
- ], 2)) : I("", !0)
640
+ ], 2)) : S("", !0)
638
641
  ], 2));
639
642
  }
640
643
  });
641
- let Oe = [];
642
- function ls(e) {
643
- Oe = Oe ? e : e.slice();
644
+ let Qe = [];
645
+ function Fs(e) {
646
+ Qe = Qe ? e : e.slice();
644
647
  }
645
- var te = /* @__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))(te || {});
646
- function Ee(e) {
648
+ var ge = /* @__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))(ge || {});
649
+ function ut(e) {
647
650
  const {
648
651
  props: {
649
- modelValue: n,
650
- steps: t,
651
- orientation: s,
652
+ modelValue: t,
653
+ steps: s,
654
+ orientation: l,
652
655
  goVerticalBelow: o,
653
- nonInteractive: c,
656
+ nonInteractive: r,
654
657
  stepsPadding: d
655
658
  },
656
- emit: f
657
- } = e, x = r(
658
- () => (s == null ? void 0 : s.value) === "vertical" ? "vertical" : "horizontal"
659
- ), p = r({
660
- get: () => je((n == null ? void 0 : n.value) || 0, -1, t.value.length),
661
- set: (v) => f("update:modelValue", je(v, 0, t.value.length))
662
- }), b = (v) => `${v + 1}`, y = (v) => v === p.value, h = (v) => v < p.value, C = (v, w) => {
663
- var R;
664
- if (c != null && c.value) {
665
- w == null || w.preventDefault(), w == null || w.stopPropagation(), w == null || w.stopImmediatePropagation();
659
+ emit: i
660
+ } = e, f = u(
661
+ () => (l == null ? void 0 : l.value) === "vertical" ? "vertical" : "horizontal"
662
+ ), c = u({
663
+ get: () => Xe((t == null ? void 0 : t.value) || 0, -1, s.value.length),
664
+ set: (w) => i("update:modelValue", Xe(w, 0, s.value.length))
665
+ }), C = (w) => `${w + 1}`, b = (w) => w === c.value, h = (w) => w < c.value, k = (w, $) => {
666
+ var E;
667
+ if (r != null && r.value) {
668
+ $ == null || $.preventDefault(), $ == null || $.stopPropagation(), $ == null || $.stopImmediatePropagation();
666
669
  return;
667
670
  }
668
- p.value = v;
669
- const S = t.value[p.value];
670
- (R = S == null ? void 0 : S.onClick) == null || R.call(S);
671
- }, u = r(() => {
672
- const v = ["flex"];
673
- let w, S;
674
- return (d == null ? void 0 : d.value) === "xs" ? (w = "space-x-2", S = "space-y-1") : (d == null ? void 0 : d.value) === "sm" ? (w = "space-x-4", S = "space-y-1") : (w = "space-x-8", S = "space-y-4"), v.push("flex"), x.value === "vertical" || o != null && o.value ? (v.push(`flex-col ${S} justify-center`), (o == null ? void 0 : o.value) === te.sm ? v.push(
675
- `sm:flex-row sm:space-y-0 sm:justify-start sm:${w} sm:items-center`
676
- ) : (o == null ? void 0 : o.value) === te.md ? v.push(
677
- `md:flex-row md:space-y-0 md:justify-start md:${w} md:items-center`
678
- ) : (o == null ? void 0 : o.value) === te.lg ? v.push(
679
- `lg:flex-row lg:space-y-0 lg:justify-start lg:${w} lg:items-center`
680
- ) : (o == null ? void 0 : o.value) === te.xl && v.push(
681
- `xl:flex-row xl:space-y-0 xl:justify-start xl:${w} xl:items-center`
682
- )) : v.push(`flex-row ${w} items-center`), v.join(" ");
683
- }), j = r(() => {
684
- const v = ["flex items-center"];
685
- return c != null && c.value || v.push("cursor-pointer"), v.join(" ");
671
+ c.value = w;
672
+ const j = s.value[c.value];
673
+ (E = j == null ? void 0 : j.onClick) == null || E.call(j);
674
+ }, m = u(() => {
675
+ const w = ["flex"];
676
+ let $, j;
677
+ return (d == null ? void 0 : d.value) === "xs" ? ($ = "space-x-2", j = "space-y-1") : (d == null ? void 0 : d.value) === "sm" ? ($ = "space-x-4", j = "space-y-1") : ($ = "space-x-8", j = "space-y-4"), w.push("flex"), f.value === "vertical" || o != null && o.value ? (w.push(`flex-col ${j} justify-center`), (o == null ? void 0 : o.value) === ge.sm ? w.push(
678
+ `sm:flex-row sm:space-y-0 sm:justify-start sm:${$} sm:items-center`
679
+ ) : (o == null ? void 0 : o.value) === ge.md ? w.push(
680
+ `md:flex-row md:space-y-0 md:justify-start md:${$} md:items-center`
681
+ ) : (o == null ? void 0 : o.value) === ge.lg ? w.push(
682
+ `lg:flex-row lg:space-y-0 lg:justify-start lg:${$} lg:items-center`
683
+ ) : (o == null ? void 0 : o.value) === ge.xl && w.push(
684
+ `xl:flex-row xl:space-y-0 xl:justify-start xl:${$} xl:items-center`
685
+ )) : w.push(`flex-row ${$} items-center`), w.join(" ");
686
+ }), z = u(() => {
687
+ const w = ["flex items-center"];
688
+ return r != null && r.value || w.push("cursor-pointer"), w.join(" ");
686
689
  });
687
690
  return {
688
- value: p,
689
- isCurrentStep: y,
691
+ value: c,
692
+ isCurrentStep: b,
690
693
  isFinishedStep: h,
691
- switchStep: C,
692
- getStepDisplayValue: b,
693
- listClasses: u,
694
- linkClasses: j,
695
- orientation: x
694
+ switchStep: k,
695
+ getStepDisplayValue: C,
696
+ listClasses: m,
697
+ linkClasses: z,
698
+ orientation: f
696
699
  };
697
700
  }
698
- ls([
701
+ Fs([
699
702
  "sm:space-x-8",
700
703
  "md:space-x-8",
701
704
  "lg:space-x-8",
@@ -709,16 +712,16 @@ ls([
709
712
  "lg:space-x-4",
710
713
  "xl:space-x-4"
711
714
  ]);
712
- const as = ["aria-label"], os = ["href", "onClick"], rs = { class: "flex space-x-3 items-center text-primary-focus normal font-medium leading-5" }, is = { class: "shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center" }, us = { class: "flex flex-col" }, cs = {
715
+ const Rs = ["aria-label"], Es = ["href", "onClick"], Us = { class: "flex space-x-3 items-center text-primary-focus normal font-medium leading-5" }, Ds = { class: "shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center" }, Ws = { class: "flex flex-col" }, qs = {
713
716
  key: 0,
714
717
  class: "label label--light text-foreground"
715
- }, ds = ["href", "onClick"], fs = { class: "flex space-x-3 items-center text-primary-focus normal font-medium leading-5" }, ps = { class: "shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center" }, hs = { class: "flex flex-col" }, ms = {
718
+ }, Hs = ["href", "onClick"], Ks = { class: "flex space-x-3 items-center text-primary-focus normal font-medium leading-5" }, Gs = { class: "shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center" }, Xs = { class: "flex flex-col" }, Zs = {
716
719
  key: 0,
717
720
  class: "label label--light text-foreground"
718
- }, gs = ["href", "onClick"], vs = { class: "flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5" }, bs = { class: "shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center" }, ys = { class: "flex flex-col" }, xs = {
721
+ }, Qs = ["href", "onClick"], Ns = { class: "flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5" }, Js = { class: "shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center" }, Ys = { class: "flex flex-col" }, el = {
719
722
  key: 0,
720
723
  class: "label label--light"
721
- }, kl = /* @__PURE__ */ A({
724
+ }, Pa = /* @__PURE__ */ A({
722
725
  __name: "Number",
723
726
  props: {
724
727
  ariaLabel: null,
@@ -730,94 +733,94 @@ const as = ["aria-label"], os = ["href", "onClick"], rs = { class: "flex space-x
730
733
  stepsPadding: null
731
734
  },
732
735
  emits: ["update:modelValue"],
733
- setup(e, { emit: n }) {
734
- const t = e, {
735
- isCurrentStep: s,
736
+ setup(e, { emit: t }) {
737
+ const s = e, {
738
+ isCurrentStep: l,
736
739
  isFinishedStep: o,
737
- switchStep: c,
740
+ switchStep: r,
738
741
  getStepDisplayValue: d,
739
- listClasses: f,
740
- linkClasses: x
741
- } = Ee({
742
- props: ae(t),
743
- emit: n
742
+ listClasses: i,
743
+ linkClasses: f
744
+ } = ut({
745
+ props: N(s),
746
+ emit: t
744
747
  });
745
- return (p, b) => (a(), m("nav", {
748
+ return (c, C) => (a(), p("nav", {
746
749
  class: "flex justify-center",
747
750
  "aria-label": e.ariaLabel || "Progress steps"
748
751
  }, [
749
- i("ol", {
750
- class: k(l(f))
752
+ v("ol", {
753
+ class: x(n(i))
751
754
  }, [
752
- (a(!0), m(W, null, G(e.steps, (y, h) => (a(), m("li", {
753
- key: y.name
755
+ (a(!0), p(D, null, q(e.steps, (b, h) => (a(), p("li", {
756
+ key: b.name
754
757
  }, [
755
- l(o)(h) ? (a(), m("a", {
758
+ n(o)(h) ? (a(), p("a", {
756
759
  key: 0,
757
- href: y.href,
758
- class: k(l(x)),
759
- onClick: (C) => l(c)(h, C)
760
+ href: b.href,
761
+ class: x(n(f)),
762
+ onClick: (k) => n(r)(h, k)
760
763
  }, [
761
- i("div", rs, [
762
- i("div", is, [
763
- P(l(pt), { class: "w-5 h-5" })
764
+ v("div", Us, [
765
+ v("div", Ds, [
766
+ V(n(nt), { class: "w-5 h-5" })
764
767
  ]),
765
- i("div", us, [
766
- i("div", null, B(y.name), 1),
767
- y.description ? (a(), m("div", cs, B(y.description), 1)) : I("", !0)
768
+ v("div", Ws, [
769
+ v("div", null, L(b.name), 1),
770
+ b.description ? (a(), p("div", qs, L(b.description), 1)) : S("", !0)
768
771
  ])
769
772
  ])
770
- ], 10, os)) : l(s)(h) ? (a(), m("a", {
773
+ ], 10, Es)) : n(l)(h) ? (a(), p("a", {
771
774
  key: 1,
772
- href: y.href,
773
- class: k(l(x)),
775
+ href: b.href,
776
+ class: x(n(f)),
774
777
  "aria-current": "step",
775
- onClick: (C) => l(c)(h, C)
778
+ onClick: (k) => n(r)(h, k)
776
779
  }, [
777
- i("div", fs, [
778
- i("div", ps, B(l(d)(h)), 1),
779
- i("div", hs, [
780
- i("div", null, B(y.name), 1),
781
- y.description ? (a(), m("div", ms, B(y.description), 1)) : I("", !0)
780
+ v("div", Ks, [
781
+ v("div", Gs, L(n(d)(h)), 1),
782
+ v("div", Xs, [
783
+ v("div", null, L(b.name), 1),
784
+ b.description ? (a(), p("div", Zs, L(b.description), 1)) : S("", !0)
782
785
  ])
783
786
  ])
784
- ], 10, ds)) : (a(), m("a", {
787
+ ], 10, Hs)) : (a(), p("a", {
785
788
  key: 2,
786
- href: y.href,
787
- class: k(l(x)),
788
- onClick: (C) => l(c)(h, C)
789
+ href: b.href,
790
+ class: x(n(f)),
791
+ onClick: (k) => n(r)(h, k)
789
792
  }, [
790
- i("div", vs, [
791
- i("div", bs, B(l(d)(h)), 1),
792
- i("div", ys, [
793
- i("div", null, B(y.name), 1),
794
- y.description ? (a(), m("div", xs, B(y.description), 1)) : I("", !0)
793
+ v("div", Ns, [
794
+ v("div", Js, L(n(d)(h)), 1),
795
+ v("div", Ys, [
796
+ v("div", null, L(b.name), 1),
797
+ b.description ? (a(), p("div", el, L(b.description), 1)) : S("", !0)
795
798
  ])
796
799
  ])
797
- ], 10, gs))
800
+ ], 10, Qs))
798
801
  ]))), 128))
799
802
  ], 2)
800
- ], 8, as));
803
+ ], 8, Rs));
801
804
  }
802
- }), ks = ["aria-label"], Cs = ["href", "onClick"], ws = { class: "relative flex h-5 w-5 flex-shrink-0 items-center justify-center" }, $s = {
805
+ }), tl = ["aria-label"], sl = ["href", "onClick"], ll = { class: "relative flex h-5 w-5 flex-shrink-0 items-center justify-center" }, nl = {
803
806
  key: 0,
804
807
  class: "h-3 w-3 rounded-full bg-foreground-2"
805
- }, Ss = ["href", "onClick"], Is = {
808
+ }, al = ["href", "onClick"], ol = {
806
809
  class: "relative flex h-5 w-5 flex-shrink-0 items-center justify-center",
807
810
  "aria-hidden": "true"
808
- }, Bs = {
811
+ }, rl = {
809
812
  key: 0,
810
813
  class: "h-3 w-3 rounded-full bg-foreground"
811
- }, _s = /* @__PURE__ */ i("span", { class: "absolute h-4 w-4 rounded-full bg-outline-2" }, null, -1), Ps = /* @__PURE__ */ i("span", { class: "relative block h-2 w-2 rounded-full bg-primary-focus" }, null, -1), Ls = ["href", "onClick"], js = {
814
+ }, il = /* @__PURE__ */ v("span", { class: "absolute h-4 w-4 rounded-full bg-outline-2" }, null, -1), ul = /* @__PURE__ */ v("span", { class: "relative block h-2 w-2 rounded-full bg-primary-focus" }, null, -1), cl = ["href", "onClick"], dl = {
812
815
  class: "relative flex h-5 w-5 flex-shrink-0 items-center justify-center",
813
816
  "aria-hidden": "true"
814
- }, Vs = {
817
+ }, fl = {
815
818
  key: 0,
816
819
  class: "h-3 w-3 rounded-full bg-foreground-2"
817
- }, Os = {
820
+ }, pl = {
818
821
  key: 1,
819
822
  class: "h-4 w-4 rounded-full bg-foreground-disabled"
820
- }, Cl = /* @__PURE__ */ A({
823
+ }, ja = /* @__PURE__ */ A({
821
824
  __name: "Bullet",
822
825
  props: {
823
826
  ariaLabel: null,
@@ -830,117 +833,117 @@ const as = ["aria-label"], os = ["href", "onClick"], rs = { class: "flex space-x
830
833
  stepsPadding: null
831
834
  },
832
835
  emits: ["update:modelValue"],
833
- setup(e, { emit: n }) {
834
- const t = e, { isCurrentStep: s, isFinishedStep: o, switchStep: c, listClasses: d, linkClasses: f } = Ee({
835
- props: ae(t),
836
- emit: n
837
- }), x = r(() => {
838
- const b = ["h6 font-medium leading-7"];
839
- let y;
840
- return t.stepsPadding === "xs" ? y = "ml-1" : t.stepsPadding === "sm" ? y = "ml-2" : y = "ml-3", b.push(y), t.basic && b.push("sr-only"), b.join(" ");
841
- }), p = r(() => {
842
- const b = [];
843
- return t.basic && b.push("basic"), b.join(" ");
836
+ setup(e, { emit: t }) {
837
+ const s = e, { isCurrentStep: l, isFinishedStep: o, switchStep: r, listClasses: d, linkClasses: i } = ut({
838
+ props: N(s),
839
+ emit: t
840
+ }), f = u(() => {
841
+ const C = ["h6 font-medium leading-7"];
842
+ let b;
843
+ return s.stepsPadding === "xs" ? b = "ml-1" : s.stepsPadding === "sm" ? b = "ml-2" : b = "ml-3", C.push(b), s.basic && C.push("sr-only"), C.join(" ");
844
+ }), c = u(() => {
845
+ const C = [];
846
+ return s.basic && C.push("basic"), C.join(" ");
844
847
  });
845
- return (b, y) => (a(), m("nav", {
848
+ return (C, b) => (a(), p("nav", {
846
849
  class: "flex justify-center",
847
850
  "aria-label": e.ariaLabel || "Progress steps"
848
851
  }, [
849
- i("ol", {
850
- class: k([l(d), p.value])
852
+ v("ol", {
853
+ class: x([n(d), c.value])
851
854
  }, [
852
- (a(!0), m(W, null, G(e.steps, (h, C) => (a(), m("li", {
855
+ (a(!0), p(D, null, q(e.steps, (h, k) => (a(), p("li", {
853
856
  key: h.name
854
857
  }, [
855
- l(o)(C) ? (a(), m("a", {
858
+ n(o)(k) ? (a(), p("a", {
856
859
  key: 0,
857
860
  href: h.href,
858
- class: k(l(f)),
859
- onClick: (u) => l(c)(C, u)
861
+ class: x(n(i)),
862
+ onClick: (m) => n(r)(k, m)
860
863
  }, [
861
- i("span", ws, [
862
- e.basic ? (a(), m("span", $s)) : (a(), L(l(Te), {
864
+ v("span", ll, [
865
+ e.basic ? (a(), p("span", nl)) : (a(), P(n(at), {
863
866
  key: 1,
864
867
  class: "h-full w-full text-primary",
865
868
  "aria-hidden": "true"
866
869
  }))
867
870
  ]),
868
- i("span", {
869
- class: k(["text-foreground", x.value])
870
- }, B(h.name), 3)
871
- ], 10, Cs)) : l(s)(C) ? (a(), m("a", {
871
+ v("span", {
872
+ class: x(["text-foreground", f.value])
873
+ }, L(h.name), 3)
874
+ ], 10, sl)) : n(l)(k) ? (a(), p("a", {
872
875
  key: 1,
873
876
  href: h.href,
874
- class: k(l(f)),
877
+ class: x(n(i)),
875
878
  "aria-current": "step",
876
- onClick: (u) => l(c)(C, u)
879
+ onClick: (m) => n(r)(k, m)
877
880
  }, [
878
- i("span", Is, [
879
- e.basic ? (a(), m("span", Bs)) : (a(), m(W, { key: 1 }, [
880
- _s,
881
- Ps
881
+ v("span", ol, [
882
+ e.basic ? (a(), p("span", rl)) : (a(), p(D, { key: 1 }, [
883
+ il,
884
+ ul
882
885
  ], 64))
883
886
  ]),
884
- i("span", {
885
- class: k(["text-primary-focus", x.value])
886
- }, B(h.name), 3)
887
- ], 10, Ss)) : (a(), m("a", {
887
+ v("span", {
888
+ class: x(["text-primary-focus", f.value])
889
+ }, L(h.name), 3)
890
+ ], 10, al)) : (a(), p("a", {
888
891
  key: 2,
889
892
  href: h.href,
890
- class: k(l(f)),
891
- onClick: (u) => l(c)(C, u)
893
+ class: x(n(i)),
894
+ onClick: (m) => n(r)(k, m)
892
895
  }, [
893
- i("div", js, [
894
- e.basic ? (a(), m("span", Vs)) : (a(), m("div", Os))
896
+ v("div", dl, [
897
+ e.basic ? (a(), p("span", fl)) : (a(), p("div", pl))
895
898
  ]),
896
- i("p", {
897
- class: k(["text-foreground-disabled", x.value])
898
- }, B(h.name), 3)
899
- ], 10, Ls))
899
+ v("p", {
900
+ class: x(["text-foreground-disabled", f.value])
901
+ }, L(h.name), 3)
902
+ ], 10, cl))
900
903
  ]))), 128))
901
904
  ], 2)
902
- ], 8, ks));
905
+ ], 8, tl));
903
906
  }
904
- }), As = ["disabled"], wl = /* @__PURE__ */ A({
907
+ }), hl = ["disabled"], Oa = /* @__PURE__ */ A({
905
908
  __name: "CardButton",
906
909
  props: {
907
910
  disabled: { type: Boolean },
908
911
  modelValue: { type: Boolean }
909
912
  },
910
913
  emits: ["update:modelValue", "click"],
911
- setup(e, { emit: n }) {
912
- const t = e, s = r(() => {
913
- const c = [
914
+ setup(e, { emit: t }) {
915
+ const s = e, l = u(() => {
916
+ const r = [
914
917
  "h-20 bg-foundation-2 inline-flex justify-center items-center outline-none",
915
918
  "normal px-16 py-5 shadow rounded transition active:scale-95"
916
919
  ];
917
- return t.disabled ? c.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed") : (c.push(
918
- t.modelValue ? "bg-primary-focus text-foreground-on-primary" : "bg-foundation text-foreground"
919
- ), c.push("ring-outline-2 hover:ring-4")), c.join(" ");
920
- }), o = (c) => {
921
- if (t.disabled) {
922
- c.preventDefault(), c.stopPropagation(), c.stopImmediatePropagation();
920
+ return s.disabled ? r.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed") : (r.push(
921
+ s.modelValue ? "bg-primary-focus text-foreground-on-primary" : "bg-foundation text-foreground"
922
+ ), r.push("ring-outline-2 hover:ring-4")), r.join(" ");
923
+ }), o = (r) => {
924
+ if (s.disabled) {
925
+ r.preventDefault(), r.stopPropagation(), r.stopImmediatePropagation();
923
926
  return;
924
927
  }
925
- n("update:modelValue", !t.modelValue), n("click", c);
928
+ t("update:modelValue", !s.modelValue), t("click", r);
926
929
  };
927
- return (c, d) => (a(), m("button", {
928
- class: k(s.value),
930
+ return (r, d) => (a(), p("button", {
931
+ class: x(l.value),
929
932
  disabled: e.disabled,
930
933
  onClick: o
931
934
  }, [
932
- z(c.$slots, "default", {}, () => [
935
+ R(r.$slots, "default", {}, () => [
933
936
  M("Text")
934
937
  ])
935
- ], 10, As));
938
+ ], 10, hl));
936
939
  }
937
- }), Ms = { class: "relative flex items-start" }, zs = { class: "flex h-6 items-center" }, Ds = ["id", "checked", "aria-describedby", "name", "disabled", "value"], Ts = {
940
+ }), ml = { class: "relative flex items-start" }, vl = { class: "flex h-6 items-center" }, gl = ["id", "checked", "aria-describedby", "name", "disabled", "value"], bl = {
938
941
  class: "ml-2 text-sm",
939
942
  style: { "padding-top": "2px" }
940
- }, Rs = ["for"], Fs = {
943
+ }, yl = ["for"], xl = {
941
944
  key: 0,
942
945
  class: "text-danger ml-1"
943
- }, Es = ["id"], $l = /* @__PURE__ */ A({
946
+ }, kl = ["id"], Aa = /* @__PURE__ */ A({
944
947
  inheritAttrs: !1,
945
948
  __name: "Checkbox",
946
949
  props: {
@@ -1029,108 +1032,110 @@ const as = ["aria-label"], os = ["href", "onClick"], rs = { class: "flex space-x
1029
1032
  },
1030
1033
  emits: ["update:modelValue"],
1031
1034
  setup(e) {
1032
- const n = e, t = (v) => `${v}-${Ce()}`, s = r(() => n.value || n.name), {
1035
+ const t = e, s = (w) => `${w}-${Ee()}`, l = u(() => t.value || t.name), {
1033
1036
  checked: o,
1034
- errorMessage: c,
1037
+ errorMessage: r,
1035
1038
  handleChange: d,
1036
- value: f
1037
- } = ke(n.name, n.rules, {
1038
- validateOnMount: n.validateOnMount,
1039
+ value: i
1040
+ } = Se(t.name, t.rules, {
1041
+ validateOnMount: t.validateOnMount,
1039
1042
  type: "checkbox",
1040
- checkedValue: s,
1041
- initialValue: n.modelValue || void 0
1042
- }), x = r(() => n.label || n.name), p = r(() => c.value ? "border-danger-lighter" : "border-foreground-4 "), b = r(() => n.description || c.value), y = r(() => `${n.name}-description`), h = r(() => {
1043
- const v = [];
1044
- return n.inlineDescription ? v.push("inline ml-2") : v.push("block"), c.value ? v.push("text-danger") : v.push("text-foreground-2"), v.join(" ");
1045
- }), C = O(t("checkbox")), u = r(() => n.id || C.value), j = (v) => {
1046
- n.disabled || d(v);
1043
+ checkedValue: l,
1044
+ initialValue: t.modelValue || void 0
1045
+ }), f = u(() => t.label || t.name), c = u(() => r.value ? "border-danger-lighter" : "border-foreground-4 "), C = u(() => t.description || r.value), b = u(() => `${t.name}-description`), h = u(() => {
1046
+ const w = [];
1047
+ return t.inlineDescription ? w.push("inline ml-2") : w.push("block"), r.value ? w.push("text-danger") : w.push("text-foreground-2"), w.join(" ");
1048
+ }), k = O(s("checkbox")), m = u(() => t.id || k.value), z = (w) => {
1049
+ t.disabled || d(w);
1047
1050
  };
1048
- return Y(() => {
1049
- const v = n.modelValue, w = f.value, S = Array.isArray(v) ? v.includes(n.value) : v === n.value, R = Array.isArray(w) ? w.includes(n.value) : w === n.value;
1050
- S !== R && d(v);
1051
- }), (v, w) => (a(), m("div", Ms, [
1052
- i("div", zs, [
1053
- i("input", oe({
1054
- id: u.value,
1055
- checked: l(o),
1056
- "aria-describedby": y.value,
1051
+ return se(() => {
1052
+ const w = t.modelValue, $ = i.value, j = Array.isArray(w) ? w.includes(t.value) : w === t.value, E = Array.isArray($) ? $.includes(t.value) : $ === t.value;
1053
+ j !== E && d(w);
1054
+ }), (w, $) => (a(), p("div", ml, [
1055
+ v("div", vl, [
1056
+ v("input", ye({
1057
+ id: m.value,
1058
+ checked: n(o),
1059
+ "aria-describedby": b.value,
1057
1060
  name: e.name,
1058
1061
  disabled: e.disabled,
1059
- value: s.value,
1062
+ value: l.value,
1060
1063
  type: "checkbox",
1061
- class: ["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2", p.value]
1062
- }, v.$attrs, { onChange: j }), null, 16, Ds)
1064
+ class: ["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2", c.value]
1065
+ }, w.$attrs, { onChange: z }), null, 16, gl)
1063
1066
  ]),
1064
- i("div", Ts, [
1065
- i("label", {
1066
- for: u.value,
1067
- class: k(["font-medium text-foreground", { "sr-only": e.hideLabel }])
1067
+ v("div", bl, [
1068
+ v("label", {
1069
+ for: m.value,
1070
+ class: x(["font-medium text-foreground", { "sr-only": e.hideLabel }])
1068
1071
  }, [
1069
- i("span", null, B(x.value), 1),
1070
- e.showRequired ? (a(), m("span", Fs, "*")) : I("", !0)
1071
- ], 10, Rs),
1072
- b.value ? (a(), m("p", {
1072
+ v("span", null, L(f.value), 1),
1073
+ e.showRequired ? (a(), p("span", xl, "*")) : S("", !0)
1074
+ ], 10, yl),
1075
+ C.value ? (a(), p("p", {
1073
1076
  key: 0,
1074
- id: y.value,
1075
- class: k(h.value)
1076
- }, B(b.value), 11, Es)) : I("", !0)
1077
+ id: b.value,
1078
+ class: x(h.value)
1079
+ }, L(C.value), 11, kl)) : S("", !0)
1077
1080
  ])
1078
1081
  ]));
1079
1082
  }
1080
1083
  });
1081
1084
  function We(e) {
1082
- const { props: n, inputEl: t, emit: s } = e, { value: o, errorMessage: c } = ke(n.name, n.rules, {
1083
- validateOnMount: l(n.validateOnMount),
1084
- validateOnValueUpdate: l(n.validateOnValueUpdate),
1085
- initialValue: l(n.modelValue) || void 0
1086
- }), d = r(() => {
1087
- const S = ["block label text-foreground-2 mb-2"];
1088
- return l(n.showLabel) || S.push("sr-only"), S.join(" ");
1089
- }), f = r(() => {
1090
- const S = [
1091
- "block w-full rounded focus:outline-none text-foreground transition-all",
1092
- "disabled:cursor-not-allowed disabled:bg-foundation-disabled disabled:text-disabled-muted",
1093
- "placeholder:text-foreground-2"
1085
+ const { props: t, inputEl: s, emit: l, options: o } = e, { value: r, errorMessage: d } = Se(t.name, t.rules, {
1086
+ validateOnMount: n(t.validateOnMount),
1087
+ validateOnValueUpdate: n(t.validateOnValueUpdate),
1088
+ initialValue: n(t.modelValue) || void 0
1089
+ }), i = u(() => {
1090
+ const g = ["block label text-foreground-2 mb-2"];
1091
+ return n(t.showLabel) || g.push("sr-only"), g.join(" ");
1092
+ }), f = u(() => [
1093
+ "focus:outline-none disabled:cursor-not-allowed disabled:bg-foundation-disabled",
1094
+ "disabled:text-disabled-muted placeholder:text-foreground-2",
1095
+ "rounded"
1096
+ ].join(" ")), c = u(() => {
1097
+ const g = [
1098
+ "block w-full text-foreground transition-all",
1099
+ f.value
1094
1100
  ];
1095
- return c.value ? S.push(
1096
- "border-2 border-danger text-danger-darker focus:border-danger focus:ring-danger"
1097
- ) : S.push("border-0 focus:ring-2 focus:ring-outline-2"), l(n.color) === "foundation" ? S.push("bg-foundation shadow-sm hover:shadow") : S.push("bg-foundation-page"), S.join(" ");
1098
- }), x = O(Ce()), p = r(() => l(n.label) || l(n.name)), b = r(() => {
1099
- const S = c.value;
1100
- return !S || !l(n.useLabelInErrors) ? S : S.replace("Value", p.value);
1101
- }), y = r(
1102
- () => b.value && l(n.hideErrorMessage)
1103
- ), h = r(() => b.value || l(n.help)), C = r(() => !!h.value), u = r(
1104
- () => C.value ? `${l(n.name)}-${x.value}` : void 0
1105
- ), j = r(() => {
1106
- const S = ["mt-2 text-sm"];
1107
- return S.push(c.value ? "text-danger" : "text-foreground-2"), S.join(" ");
1108
- }), v = () => {
1109
- var S;
1110
- (S = t.value) == null || S.focus();
1111
- }, w = () => {
1112
- o.value = "", s("change", { value: "" }), s("clear");
1101
+ return d.value ? g.push(
1102
+ "focus:border-danger focus:ring-danger border-2 border-danger text-danger-darker"
1103
+ ) : g.push("border-0 focus:ring-2 focus:ring-outline-2"), n(t.color) === "foundation" ? g.push("bg-foundation shadow-sm hover:shadow") : g.push("bg-foundation-page"), g.join(" ");
1104
+ }), C = O(Ee()), b = u(() => n(t.label) || n(t.name)), h = u(() => {
1105
+ const g = d.value;
1106
+ return !g || !n(t.useLabelInErrors) ? g : g.replace("Value", b.value);
1107
+ }), k = u(
1108
+ () => h.value && n(t.hideErrorMessage)
1109
+ ), m = u(() => h.value || n(t.help)), z = u(() => !!m.value), w = u(
1110
+ () => z.value ? `${n(t.name)}-${C.value}` : void 0
1111
+ ), $ = u(() => {
1112
+ const g = ["mt-2 text-sm"];
1113
+ return g.push(d.value ? "text-danger" : "text-foreground-2"), g.join(" ");
1114
+ }), j = () => {
1115
+ var g;
1116
+ (g = s.value) == null || g.focus();
1117
+ }, E = () => {
1118
+ var g;
1119
+ r.value = X(r.value) ? [] : "", (g = o == null ? void 0 : o.customClear) == null || g.call(o), l("change", { value: r.value }), l("clear");
1113
1120
  };
1114
- return Y(() => {
1115
- l(n.autoFocus) && v();
1121
+ return se(() => {
1122
+ n(t.autoFocus) && j();
1116
1123
  }), {
1117
- coreClasses: f,
1118
- title: p,
1119
- value: o,
1120
- helpTipId: u,
1121
- helpTipClasses: j,
1122
- helpTip: h,
1123
- hideHelpTip: y,
1124
- errorMessage: b,
1125
- clear: w,
1126
- focus: v,
1127
- labelClasses: d
1124
+ coreInputClasses: f,
1125
+ coreClasses: c,
1126
+ title: b,
1127
+ value: r,
1128
+ helpTipId: w,
1129
+ helpTipClasses: $,
1130
+ helpTip: m,
1131
+ hideHelpTip: k,
1132
+ errorMessage: h,
1133
+ clear: E,
1134
+ focus: j,
1135
+ labelClasses: i
1128
1136
  };
1129
1137
  }
1130
- const Ws = ["for"], Us = { class: "relative" }, qs = ["id", "name", "placeholder", "disabled", "aria-invalid", "aria-describedby"], Hs = /* @__PURE__ */ i("span", { class: "text-xs sr-only" }, "Clear input", -1), Gs = {
1131
- key: 2,
1132
- class: "pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"
1133
- }, Ks = ["id"], Sl = /* @__PURE__ */ A({
1138
+ const wl = ["for"], Cl = { class: "relative" }, $l = ["id", "name", "placeholder", "disabled", "aria-invalid", "aria-describedby"], Il = /* @__PURE__ */ v("span", { class: "text-xs sr-only" }, "Clear input", -1), Sl = ["id"], Ma = /* @__PURE__ */ A({
1134
1139
  __name: "TextArea",
1135
1140
  props: {
1136
1141
  name: null,
@@ -1148,99 +1153,105 @@ const Ws = ["for"], Us = { class: "relative" }, qs = ["id", "name", "placeholder
1148
1153
  showClear: { type: Boolean },
1149
1154
  fullWidth: { type: Boolean },
1150
1155
  showRequired: { type: Boolean },
1151
- color: { default: "page" }
1156
+ color: { default: "page" },
1157
+ textareaClasses: null
1152
1158
  },
1153
1159
  emits: ["update:modelValue", "change", "input", "clear"],
1154
- setup(e, { expose: n, emit: t }) {
1155
- const s = e, o = O(null), {
1156
- coreClasses: c,
1160
+ setup(e, { expose: t, emit: s }) {
1161
+ const l = e, o = O(null), {
1162
+ coreClasses: r,
1157
1163
  title: d,
1158
- value: f,
1159
- helpTipId: x,
1160
- helpTipClasses: p,
1161
- helpTip: b,
1162
- errorMessage: y,
1164
+ value: i,
1165
+ helpTipId: f,
1166
+ helpTipClasses: c,
1167
+ helpTip: C,
1168
+ errorMessage: b,
1163
1169
  labelClasses: h,
1164
- clear: C,
1165
- focus: u
1170
+ clear: k,
1171
+ focus: m
1166
1172
  } = We({
1167
- props: ae(s),
1168
- emit: t,
1173
+ props: N(l),
1174
+ emit: s,
1169
1175
  inputEl: o
1170
- }), j = r(() => {
1171
- const v = ["pl-2"];
1172
- return s.showClear && y.value ? v.push("pr-12") : (s.showClear || y.value) && v.push("pr-8"), v.join(" ");
1176
+ }), z = u(() => {
1177
+ const w = ["pl-2"];
1178
+ return l.showClear && b.value ? w.push("pr-12") : (l.showClear || b.value) && w.push("pr-8"), w.join(" ");
1173
1179
  });
1174
- return n({ focus: u }), (v, w) => (a(), m("div", {
1175
- class: k([e.fullWidth ? "w-full" : ""])
1180
+ return t({ focus: m }), (w, $) => (a(), p("div", {
1181
+ class: x([e.fullWidth ? "w-full" : ""])
1176
1182
  }, [
1177
- i("label", {
1183
+ v("label", {
1178
1184
  for: e.name,
1179
- class: k(l(h))
1185
+ class: x(n(h))
1180
1186
  }, [
1181
- i("span", null, B(l(d)), 1)
1182
- ], 10, Ws),
1183
- i("div", Us, [
1184
- ne(i("textarea", oe({
1187
+ v("span", null, L(n(d)), 1)
1188
+ ], 10, wl),
1189
+ v("div", Cl, [
1190
+ de(v("textarea", ye({
1185
1191
  id: e.name,
1186
1192
  ref_key: "inputElement",
1187
1193
  ref: o,
1188
- "onUpdate:modelValue": w[0] || (w[0] = (S) => ve(f) ? f.value = S : null),
1194
+ "onUpdate:modelValue": $[0] || ($[0] = (j) => $e(i) ? i.value = j : null),
1189
1195
  name: e.name,
1190
- class: [l(c), j.value, "min-h-[4rem]"],
1196
+ class: [
1197
+ n(r),
1198
+ z.value,
1199
+ e.textareaClasses || "",
1200
+ "min-h-[4rem] simple-scrollbar"
1201
+ ],
1191
1202
  placeholder: e.placeholder,
1192
1203
  disabled: e.disabled,
1193
- "aria-invalid": l(y) ? "true" : "false",
1194
- "aria-describedby": l(x)
1195
- }, v.$attrs, {
1196
- onChange: w[1] || (w[1] = (S) => v.$emit("change", { event: S, value: l(f) })),
1197
- onInput: w[2] || (w[2] = (S) => v.$emit("input", { event: S, value: l(f) }))
1198
- }), null, 16, qs), [
1199
- [Ae, l(f)]
1204
+ "aria-invalid": n(b) ? "true" : "false",
1205
+ "aria-describedby": n(f)
1206
+ }, w.$attrs, {
1207
+ onChange: $[1] || ($[1] = (j) => w.$emit("change", { event: j, value: n(i) })),
1208
+ onInput: $[2] || ($[2] = (j) => w.$emit("input", { event: j, value: n(i) }))
1209
+ }), null, 16, $l), [
1210
+ [Me, n(i)]
1200
1211
  ]),
1201
- e.showClear ? (a(), m("a", {
1212
+ e.showClear ? (a(), p("a", {
1202
1213
  key: 0,
1203
1214
  title: "Clear input",
1204
1215
  class: "absolute top-2 right-0 flex items-center pr-2 cursor-pointer",
1205
- onClick: w[3] || (w[3] = //@ts-ignore
1206
- (...S) => l(C) && l(C)(...S)),
1207
- onKeydown: w[4] || (w[4] = //@ts-ignore
1208
- (...S) => l(C) && l(C)(...S))
1216
+ onClick: $[3] || ($[3] = //@ts-ignore
1217
+ (...j) => n(k) && n(k)(...j)),
1218
+ onKeydown: $[4] || ($[4] = //@ts-ignore
1219
+ (...j) => n(k) && n(k)(...j))
1209
1220
  }, [
1210
- Hs,
1211
- P(l(ue), {
1221
+ Il,
1222
+ V(n(pe), {
1212
1223
  class: "h-5 w-5 text-foreground",
1213
1224
  "aria-hidden": "true"
1214
1225
  })
1215
- ], 32)) : I("", !0),
1216
- l(y) ? (a(), m("div", {
1226
+ ], 32)) : S("", !0),
1227
+ n(b) ? (a(), p("div", {
1217
1228
  key: 1,
1218
- class: k([
1219
- "pointer-events-none absolute inset-y-0 right-0 flex items-center",
1229
+ class: x([
1230
+ "pointer-events-none absolute inset-y-0 right-0 flex items-start mt-2",
1220
1231
  e.showClear ? "pr-8" : "pr-2"
1221
1232
  ])
1222
1233
  }, [
1223
- P(l(xe), {
1234
+ V(n(Ie), {
1224
1235
  class: "h-4 w-4 text-danger",
1225
1236
  "aria-hidden": "true"
1226
1237
  })
1227
- ], 2)) : I("", !0),
1228
- e.showRequired && !l(y) ? (a(), m("div", Gs, " * ")) : I("", !0)
1238
+ ], 2)) : S("", !0),
1239
+ e.showRequired && !n(b) ? (a(), p("div", {
1240
+ key: 2,
1241
+ class: x(["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"]])
1242
+ }, " * ", 2)) : S("", !0)
1229
1243
  ]),
1230
- l(x) ? (a(), m("p", {
1244
+ n(f) ? (a(), p("p", {
1231
1245
  key: 0,
1232
- id: l(x),
1233
- class: k(l(p))
1234
- }, B(l(b)), 11, Ks)) : I("", !0)
1246
+ id: n(f),
1247
+ class: x(n(c))
1248
+ }, L(n(C)), 11, Sl)) : S("", !0)
1235
1249
  ], 2));
1236
1250
  }
1237
- }), Xs = ["for"], Ns = { class: "relative" }, Js = {
1251
+ }), Bl = ["for"], Vl = { class: "relative" }, Ll = {
1238
1252
  key: 0,
1239
1253
  class: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"
1240
- }, Qs = ["id", "type", "name", "placeholder", "disabled", "aria-invalid", "aria-describedby"], Ys = /* @__PURE__ */ i("span", { class: "text-xs sr-only" }, "Clear input", -1), Zs = {
1241
- key: 2,
1242
- class: "pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"
1243
- }, en = ["id"], Il = /* @__PURE__ */ A({
1254
+ }, _l = ["id", "type", "name", "placeholder", "disabled", "aria-invalid", "aria-describedby"], zl = /* @__PURE__ */ v("span", { class: "text-xs sr-only" }, "Clear input", -1), Pl = ["id"], Ta = /* @__PURE__ */ A({
1244
1255
  inheritAttrs: !1,
1245
1256
  __name: "TextInput",
1246
1257
  props: {
@@ -1376,33 +1387,33 @@ const Ws = ["for"], Us = { class: "relative" }, qs = ["id", "name", "placeholder
1376
1387
  }
1377
1388
  },
1378
1389
  emits: ["update:modelValue", "change", "input", "clear", "focusin", "focusout"],
1379
- setup(e, { expose: n, emit: t }) {
1380
- const s = e, o = be(), c = O(null), {
1390
+ setup(e, { expose: t, emit: s }) {
1391
+ const l = e, o = Te(), r = O(null), {
1381
1392
  coreClasses: d,
1382
- title: f,
1383
- value: x,
1384
- helpTipId: p,
1385
- helpTipClasses: b,
1386
- helpTip: y,
1393
+ title: i,
1394
+ value: f,
1395
+ helpTipId: c,
1396
+ helpTipClasses: C,
1397
+ helpTip: b,
1387
1398
  hideHelpTip: h,
1388
- errorMessage: C,
1389
- clear: u,
1390
- focus: j,
1391
- labelClasses: v
1399
+ errorMessage: k,
1400
+ clear: m,
1401
+ focus: z,
1402
+ labelClasses: w
1392
1403
  } = We({
1393
- props: ae(s),
1394
- emit: t,
1395
- inputEl: c
1396
- }), w = r(() => {
1404
+ props: N(l),
1405
+ emit: s,
1406
+ inputEl: r
1407
+ }), $ = u(() => {
1397
1408
  const T = ["h-5 w-5"];
1398
- return C.value ? T.push("text-danger") : T.push("text-foreground-2"), T.join(" ");
1399
- }), S = r(
1400
- () => ["email", "password"].includes(s.type) || s.customIcon
1401
- ), R = r(() => {
1409
+ return k.value ? T.push("text-danger") : T.push("text-foreground-2"), T.join(" ");
1410
+ }), j = u(
1411
+ () => ["email", "password"].includes(l.type) || l.customIcon
1412
+ ), E = u(() => {
1402
1413
  const T = [];
1403
- return S.value ? T.push("pl-8") : T.push("pl-2"), o["input-right"] || (C.value || s.showClear) && (C.value && s.showClear ? T.push("pr-12") : T.push("pr-8")), T.join(" ");
1404
- }), g = r(() => {
1405
- switch (s.size) {
1414
+ return j.value ? T.push("pl-8") : T.push("pl-2"), o["input-right"] || (k.value || l.showClear) && (k.value && l.showClear ? T.push("pr-12") : T.push("pr-8")), T.join(" ");
1415
+ }), g = u(() => {
1416
+ switch (l.size) {
1406
1417
  case "sm":
1407
1418
  return "h-6";
1408
1419
  case "lg":
@@ -1414,197 +1425,205 @@ const Ws = ["for"], Us = { class: "relative" }, qs = ["id", "name", "placeholder
1414
1425
  return "h-8";
1415
1426
  }
1416
1427
  });
1417
- return n({ focus: j }), (T, E) => (a(), m("div", {
1418
- class: k([e.fullWidth ? "w-full" : "", e.wrapperClasses])
1428
+ return t({ focus: z }), (T, U) => (a(), p("div", {
1429
+ class: x([e.fullWidth ? "w-full" : "", e.wrapperClasses])
1419
1430
  }, [
1420
- i("label", {
1431
+ v("label", {
1421
1432
  for: e.name,
1422
- class: k(l(v))
1433
+ class: x(n(w))
1423
1434
  }, [
1424
- i("span", null, B(l(f)), 1)
1425
- ], 10, Xs),
1426
- i("div", Ns, [
1427
- S.value ? (a(), m("div", Js, [
1428
- e.customIcon ? (a(), L(H(e.customIcon), {
1435
+ v("span", null, L(n(i)), 1)
1436
+ ], 10, Bl),
1437
+ v("div", Vl, [
1438
+ j.value ? (a(), p("div", Ll, [
1439
+ e.customIcon ? (a(), P(Z(e.customIcon), {
1429
1440
  key: 0,
1430
- class: k(w.value),
1441
+ class: x($.value),
1431
1442
  "aria-hidden": "true"
1432
- }, null, 8, ["class"])) : e.type === "email" ? (a(), L(l(ht), {
1443
+ }, null, 8, ["class"])) : e.type === "email" ? (a(), P(n(Wt), {
1433
1444
  key: 1,
1434
- class: k(w.value),
1445
+ class: x($.value),
1435
1446
  "aria-hidden": "true"
1436
- }, null, 8, ["class"])) : e.type === "password" ? (a(), L(l(mt), {
1447
+ }, null, 8, ["class"])) : e.type === "password" ? (a(), P(n(qt), {
1437
1448
  key: 2,
1438
- class: k(w.value),
1449
+ class: x($.value),
1439
1450
  "aria-hidden": "true"
1440
- }, null, 8, ["class"])) : I("", !0)
1441
- ])) : I("", !0),
1442
- ne(i("input", oe({
1451
+ }, null, 8, ["class"])) : S("", !0)
1452
+ ])) : S("", !0),
1453
+ de(v("input", ye({
1443
1454
  id: e.name,
1444
1455
  ref_key: "inputElement",
1445
- ref: c,
1446
- "onUpdate:modelValue": E[0] || (E[0] = (F) => ve(x) ? x.value = F : null),
1456
+ ref: r,
1457
+ "onUpdate:modelValue": U[0] || (U[0] = (F) => $e(f) ? f.value = F : null),
1447
1458
  type: e.type,
1448
1459
  name: e.name,
1449
- class: [l(d), R.value, g.value, e.inputClasses || ""],
1460
+ class: [n(d), E.value, g.value, e.inputClasses || ""],
1450
1461
  placeholder: e.placeholder,
1451
1462
  disabled: e.disabled,
1452
- "aria-invalid": l(C) ? "true" : "false",
1453
- "aria-describedby": l(p),
1463
+ "aria-invalid": n(k) ? "true" : "false",
1464
+ "aria-describedby": n(c),
1454
1465
  role: "textbox"
1455
1466
  }, T.$attrs, {
1456
- onChange: E[1] || (E[1] = (F) => T.$emit("change", { event: F, value: l(x) })),
1457
- onInput: E[2] || (E[2] = (F) => T.$emit("input", { event: F, value: l(x) }))
1458
- }), null, 16, Qs), [
1459
- [Xe, l(x)]
1467
+ onChange: U[1] || (U[1] = (F) => T.$emit("change", { event: F, value: n(f) })),
1468
+ onInput: U[2] || (U[2] = (F) => T.$emit("input", { event: F, value: n(f) }))
1469
+ }), null, 16, _l), [
1470
+ [xt, n(f)]
1460
1471
  ]),
1461
- z(T.$slots, "input-right", {}, () => [
1462
- e.showClear ? (a(), m("a", {
1472
+ R(T.$slots, "input-right", {}, () => [
1473
+ e.showClear ? (a(), p("a", {
1463
1474
  key: 0,
1464
1475
  title: "Clear input",
1465
1476
  class: "absolute inset-y-0 right-0 flex items-center pr-2 cursor-pointer",
1466
- onClick: E[3] || (E[3] = //@ts-ignore
1467
- (...F) => l(u) && l(u)(...F)),
1468
- onKeydown: E[4] || (E[4] = //@ts-ignore
1469
- (...F) => l(u) && l(u)(...F))
1477
+ onClick: U[3] || (U[3] = //@ts-ignore
1478
+ (...F) => n(m) && n(m)(...F)),
1479
+ onKeydown: U[4] || (U[4] = //@ts-ignore
1480
+ (...F) => n(m) && n(m)(...F))
1470
1481
  }, [
1471
- Ys,
1472
- P(l(ue), {
1482
+ zl,
1483
+ V(n(pe), {
1473
1484
  class: "h-5 w-5 text-foreground",
1474
1485
  "aria-hidden": "true"
1475
1486
  })
1476
- ], 32)) : I("", !0),
1477
- l(C) ? (a(), m("div", {
1487
+ ], 32)) : S("", !0),
1488
+ n(k) ? (a(), p("div", {
1478
1489
  key: 1,
1479
- class: k([
1490
+ class: x([
1480
1491
  "pointer-events-none absolute inset-y-0 right-0 flex items-center",
1481
1492
  e.showClear ? "pr-8" : "pr-2"
1482
1493
  ])
1483
1494
  }, [
1484
- P(l(xe), {
1495
+ V(n(Ie), {
1485
1496
  class: "h-4 w-4 text-danger",
1486
1497
  "aria-hidden": "true"
1487
1498
  })
1488
- ], 2)) : I("", !0),
1489
- e.showRequired && !l(C) ? (a(), m("div", Zs, " * ")) : I("", !0)
1499
+ ], 2)) : S("", !0),
1500
+ e.showRequired && !n(k) ? (a(), p("div", {
1501
+ key: 2,
1502
+ class: x(["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"]])
1503
+ }, " * ", 2)) : S("", !0)
1490
1504
  ])
1491
1505
  ]),
1492
- l(p) && !l(h) ? (a(), m("p", {
1506
+ n(c) && !n(h) ? (a(), p("p", {
1493
1507
  key: 0,
1494
- id: l(p),
1495
- class: k(l(b))
1496
- }, B(l(y)), 11, en)) : I("", !0)
1508
+ id: n(c),
1509
+ class: x(n(C))
1510
+ }, L(n(b)), 11, Pl)) : S("", !0)
1497
1511
  ], 2));
1498
1512
  }
1499
- }), tn = /^https?:\/\//, $e = /^[\w-_.+]+@[\w-_.+]+$/, sn = (e) => (e || "").match($e) ? !0 : "Value should be a valid e-mail address", nn = (e) => (e || "").split(",").map((s) => s.trim()).every((s) => s.match($e)) || "Value should be one or multiple comma-delimited e-mail addresses", ln = (e) => (ie(e) && (e = e.trim()), e ? !0 : "Value is required"), an = (e, n) => (t, s) => t === s.form[e] ? !0 : `Value must be the same as in field '${n || e}'`, on = (e) => (n) => {
1500
- const { minLength: t, maxLength: s } = e;
1501
- return n = bt(n) ? "" : n, ie(n) ? !Q(t) && n.length < t ? `Value needs to be at least ${t} characters long` : !Q(s) && n.length > s ? `Value needs to be no more than ${s} characters long` : !0 : "Value should be a text string";
1502
- }, rn = (e) => (n) => {
1503
- const { match: t, message: s } = e;
1504
- return ie(n) ? t ? ie(t) ? n.includes(t) ? !0 : s : t.test(n) ? !0 : s : !0 : "Value should be a text string";
1505
- }, Bl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1513
+ }), ct = /^https?:\/\//, qe = /^[\w-_.+]+@[\w-_.+]+$/, jl = (e) => (e || "").match(qe) ? !0 : "Value should be a valid e-mail address", Ol = (e) => (e || "").split(",").map((l) => l.trim()).every((l) => l.match(qe)) || "Value should be one or multiple comma-delimited e-mail addresses", Al = (e) => (Ce(e) && (e = e.trim()), e ? !0 : "Value is required"), Ml = (e, t) => (s, l) => s === l.form[e] ? !0 : `Value must be the same as in field '${t || e}'`, Tl = (e) => (t) => {
1514
+ const { minLength: s, maxLength: l } = e;
1515
+ return t = Gt(t) ? "" : t, Ce(t) ? !ce(s) && t.length < s ? `Value needs to be at least ${s} characters long` : !ce(l) && t.length > l ? `Value needs to be no more than ${l} characters long` : !0 : "Value should be a text string";
1516
+ }, Fl = (e) => (t) => {
1517
+ const { match: s, message: l } = e;
1518
+ return Ce(t) ? s ? Ce(s) ? t.includes(s) ? !0 : l : s.test(t) ? !0 : l : !0 : "Value should be a text string";
1519
+ }, Rl = (e) => ct.test(e) ? !0 : "Value is not a valid URL", El = (e) => Array.isArray(e) && e.length > 0 ? !0 : "Value should have at least a single item selected", Fa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1506
1520
  __proto__: null,
1507
- VALID_EMAIL: $e,
1508
- VALID_HTTP_URL: tn,
1509
- isEmail: sn,
1510
- isOneOrMultipleEmails: nn,
1511
- isRequired: ln,
1512
- isSameAs: an,
1513
- isStringOfLength: on,
1514
- stringContains: rn
1521
+ VALID_EMAIL: qe,
1522
+ VALID_HTTP_URL: ct,
1523
+ isEmail: jl,
1524
+ isItemSelected: El,
1525
+ isOneOrMultipleEmails: Ol,
1526
+ isRequired: Al,
1527
+ isSameAs: Ml,
1528
+ isStringOfLength: Tl,
1529
+ isUrl: Rl,
1530
+ stringContains: Fl
1515
1531
  }, Symbol.toStringTag, { value: "Module" }));
1516
- function un(e) {
1532
+ function dt(e) {
1517
1533
  const {
1518
- skipCalculation: n,
1519
- elementToWatchForChanges: t,
1520
- itemContainer: s,
1534
+ skipCalculation: t,
1535
+ elementToWatchForChanges: s,
1536
+ itemContainer: l,
1521
1537
  trackResize: o = !1,
1522
- trackMutations: c = !0
1523
- } = e || {}, d = O(0), f = () => {
1524
- const x = s.value;
1525
- if (n != null && n.value || !x)
1538
+ trackMutations: r = !0
1539
+ } = e || {}, d = O(0), i = () => {
1540
+ const f = l.value;
1541
+ if (t != null && t.value || !f)
1526
1542
  return;
1527
- const p = x.children;
1528
- let b = 0, y = 0, h;
1529
- for (const C of p) {
1530
- const u = C.offsetTop;
1531
- Q(h) ? (h = u, b += 1) : u === h && (b += 1), y += 1;
1543
+ const c = f.children;
1544
+ let C = 0, b = 0, h;
1545
+ for (const k of c) {
1546
+ const m = k.offsetTop;
1547
+ ce(h) ? (h = m, C += 1) : m === h && (C += 1), b += 1;
1532
1548
  }
1533
- d.value = y - b;
1549
+ d.value = b - C;
1534
1550
  };
1535
- return o && kt(t, f), c && Ct(t, f, {
1551
+ return o && Nt(s, i), r && Jt(s, i, {
1536
1552
  childList: !0,
1537
1553
  subtree: !0
1538
1554
  }), {
1539
1555
  hiddenItemCount: d
1540
1556
  };
1541
1557
  }
1542
- function cn(e) {
1543
- const { props: n, emit: t, dynamicVisibility: s } = e;
1558
+ function ft(e) {
1559
+ const { props: t, emit: s, dynamicVisibility: l } = e;
1544
1560
  let o;
1545
- if (s) {
1546
- const { elementToWatchForChanges: p, itemContainer: b } = s;
1547
- o = un({
1548
- skipCalculation: r(() => {
1561
+ if (l) {
1562
+ const { elementToWatchForChanges: c, itemContainer: C } = l;
1563
+ o = dt({
1564
+ skipCalculation: u(() => {
1549
1565
  var h;
1550
- return !((h = n.multiple) != null && h.value);
1566
+ return !((h = t.multiple) != null && h.value);
1551
1567
  }),
1552
- elementToWatchForChanges: p,
1553
- itemContainer: b
1568
+ elementToWatchForChanges: c,
1569
+ itemContainer: C
1554
1570
  }).hiddenItemCount;
1555
1571
  } else
1556
1572
  o = O(0);
1557
- const c = r({
1573
+ const r = u({
1558
1574
  get: () => {
1559
- var b, y;
1560
- const p = (b = n.modelValue) == null ? void 0 : b.value;
1561
- return (y = n.multiple) != null && y.value ? q(p) ? p : [] : q(p) ? void 0 : p;
1575
+ var C, b;
1576
+ const c = (C = t.modelValue) == null ? void 0 : C.value;
1577
+ return (b = t.multiple) != null && b.value ? X(c) ? c : [] : X(c) ? void 0 : c;
1562
1578
  },
1563
- set: (p) => {
1564
- var b, y, h;
1565
- if ((b = n.multiple) != null && b.value && !q(p)) {
1579
+ set: (c) => {
1580
+ var C, b, h;
1581
+ if ((C = t.multiple) != null && C.value && !X(c)) {
1566
1582
  console.warn("Attempting to set non-array value in selector w/ multiple=true");
1567
1583
  return;
1568
- } else if (!((y = n.multiple) != null && y.value) && q(p)) {
1584
+ } else if (!((b = t.multiple) != null && b.value) && X(c)) {
1569
1585
  console.warn("Attempting to set array value in selector w/ multiple=false");
1570
1586
  return;
1571
1587
  }
1572
- t("update:modelValue", (h = n.multiple) != null && h.value ? p || [] : p);
1588
+ s("update:modelValue", (h = t.multiple) != null && h.value ? c || [] : c);
1573
1589
  }
1574
- }), d = (p) => q(p);
1590
+ }), d = (c) => X(c);
1575
1591
  return {
1576
- selectedValue: c,
1592
+ selectedValue: r,
1577
1593
  hiddenSelectedItemCount: o,
1578
1594
  isArrayValue: d,
1579
- isMultiItemArrayValue: (p) => q(p) && p.length > 1,
1580
- firstItem: (p) => d(p) ? p[0] : p
1595
+ isMultiItemArrayValue: (c) => X(c) && c.length > 1,
1596
+ firstItem: (c) => d(c) ? c[0] : c
1581
1597
  };
1582
1598
  }
1583
- const dn = (e) => (Ne("data-v-60cf597b"), e = e(), Je(), e), fn = /* @__PURE__ */ dn(() => /* @__PURE__ */ i("div", { class: "swoosher relative top-0 bg-blue-500/50" }, null, -1)), pn = [
1584
- fn
1585
- ], hn = /* @__PURE__ */ A({
1599
+ const Ul = (e) => (kt("data-v-60cf597b"), e = e(), wt(), e), Dl = /* @__PURE__ */ Ul(() => /* @__PURE__ */ v("div", { class: "swoosher relative top-0 bg-blue-500/50" }, null, -1)), Wl = [
1600
+ Dl
1601
+ ], ql = /* @__PURE__ */ A({
1586
1602
  __name: "Bar",
1587
1603
  props: {
1588
1604
  loading: { type: Boolean }
1589
1605
  },
1590
1606
  setup(e) {
1591
- return (n, t) => (a(), m("div", {
1592
- class: k([
1607
+ return (t, s) => (a(), p("div", {
1608
+ class: x([
1593
1609
  "relative w-full h-1 bg-blue-500/30 text-xs text-foreground-on-primary overflow-hidden rounded-xl",
1594
1610
  e.loading ? "opacity-100" : "opacity-0"
1595
1611
  ])
1596
- }, pn, 2));
1612
+ }, Wl, 2));
1597
1613
  }
1598
1614
  });
1599
- const Ue = /* @__PURE__ */ Fe(hn, [["__scopeId", "data-v-60cf597b"]]), mn = { class: "flex items-center justify-between w-full" }, gn = { class: "block truncate grow text-left" }, vn = { class: "pointer-events-none shrink-0 ml-1 flex items-center" }, bn = ["disabled"], yn = {
1615
+ const He = /* @__PURE__ */ it(ql, [["__scopeId", "data-v-60cf597b"]]), Hl = { class: "flex items-center justify-between w-full" }, Kl = { class: "block truncate grow text-left" }, Gl = { class: "pointer-events-none shrink-0 ml-1 flex items-center space-x-2" }, Xl = {
1616
+ key: 1,
1617
+ class: "text-4xl text-danger opacity-50 h-4 w-4 leading-6"
1618
+ }, Zl = ["disabled"], Ql = {
1600
1619
  key: 0,
1601
1620
  class: "flex flex-col mx-1 mb-1"
1602
- }, xn = /* @__PURE__ */ i("span", { class: "sr-only label text-foreground" }, "Search", -1), kn = { class: "relative" }, Cn = { class: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2" }, wn = ["placeholder"], $n = {
1621
+ }, Nl = /* @__PURE__ */ v("span", { class: "sr-only label text-foreground" }, "Search", -1), Jl = { class: "relative" }, Yl = { class: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2" }, en = ["placeholder"], tn = {
1603
1622
  key: 0,
1604
1623
  class: "px-1"
1605
- }, Sn = { key: 1 }, In = /* @__PURE__ */ i("div", { class: "text-foreground-2 text-center" }, "Nothing found 🤷‍♂️", -1), Bn = {
1606
- class: /* @__PURE__ */ k(["block truncate"])
1607
- }, _n = ["id"], Pn = /* @__PURE__ */ A({
1624
+ }, sn = { key: 1 }, ln = /* @__PURE__ */ v("div", { class: "text-foreground-2 text-center" }, "Nothing found 🤷‍♂️", -1), nn = {
1625
+ class: /* @__PURE__ */ x(["block truncate"])
1626
+ }, an = ["id"], pt = /* @__PURE__ */ A({
1608
1627
  __name: "Base",
1609
1628
  props: {
1610
1629
  multiple: {
@@ -1663,6 +1682,12 @@ const Ue = /* @__PURE__ */ Fe(hn, [["__scopeId", "data-v-60cf597b"]]), mn = { cl
1663
1682
  type: String,
1664
1683
  required: !0
1665
1684
  },
1685
+ /**
1686
+ * Optional text that replaces the label as the placeholder when set.
1687
+ */
1688
+ placeholder: {
1689
+ type: String
1690
+ },
1666
1691
  /**
1667
1692
  * Whether to show the label visually
1668
1693
  */
@@ -1749,157 +1774,169 @@ const Ue = /* @__PURE__ */ Fe(hn, [["__scopeId", "data-v-60cf597b"]]), mn = { cl
1749
1774
  fullyControlValue: {
1750
1775
  type: Boolean,
1751
1776
  default: !1
1777
+ },
1778
+ /**
1779
+ * Whether to show the red "required" asterisk
1780
+ */
1781
+ showRequired: {
1782
+ type: Boolean,
1783
+ default: !1
1752
1784
  }
1753
1785
  },
1754
1786
  emits: ["update:modelValue"],
1755
- setup(e, { expose: n, emit: t }) {
1756
- const s = e, { value: o, errorMessage: c } = ke(s.name, s.rules, {
1757
- validateOnMount: s.validateOnMount,
1758
- validateOnValueUpdate: s.validateOnValueUpdate,
1759
- initialValue: s.modelValue
1760
- }), d = O(null), f = O(""), x = O([]), p = O(!1), b = O(1), y = O(Ce()), h = r(() => l(s.label) || l(s.name)), C = r(() => {
1761
- const $ = c.value;
1762
- return !$ || !l(s.useLabelInErrors) ? $ : $.replace("Value", h.value);
1763
- }), u = r(() => C.value || l(s.help)), j = r(() => !!u.value), v = r(
1764
- () => j.value ? `${l(s.name)}-${y.value}` : void 0
1765
- ), w = r(
1766
- () => c.value ? "text-danger" : "text-foreground-2"
1767
- ), S = r(
1768
- () => s.buttonStyle !== "simple" && s.clearable && !s.disabled
1769
- ), R = r(() => {
1770
- const $ = ["relative flex group"];
1771
- return s.buttonStyle !== "simple" && ($.push("hover:shadow rounded-md"), $.push("outline outline-2 outline-primary-muted")), s.fixedHeight && $.push("h-8"), $.join(" ");
1772
- }), g = r(() => {
1773
- const $ = [];
1774
- return s.buttonStyle !== "simple" && $.push(
1775
- Z.value ? "bg-foundation-disabled text-foreground-disabled" : ""
1776
- ), Z.value && $.push("cursor-not-allowed"), $.join(" ");
1777
- }), T = r(() => {
1778
- const $ = [
1787
+ setup(e, { expose: t, emit: s }) {
1788
+ const l = e, o = (y) => _e(y), { value: r, errorMessage: d } = Se(l.name, l.rules, {
1789
+ validateOnMount: l.validateOnMount,
1790
+ validateOnValueUpdate: l.validateOnValueUpdate,
1791
+ initialValue: l.modelValue
1792
+ }), i = O(null), f = O(""), c = O([]), C = O(!1), b = O(1), h = O(Ee()), k = u(() => n(l.label) || n(l.name)), m = u(() => {
1793
+ const y = d.value;
1794
+ return !y || !n(l.useLabelInErrors) ? y : y.replace("Value", k.value);
1795
+ }), z = u(() => m.value || n(l.help)), w = u(() => !!z.value), $ = u(
1796
+ () => w.value ? `${n(l.name)}-${h.value}` : void 0
1797
+ ), j = u(
1798
+ () => d.value ? "text-danger" : "text-foreground-2"
1799
+ ), E = u(
1800
+ () => l.buttonStyle !== "simple" && l.clearable && !l.disabled
1801
+ ), g = u(() => {
1802
+ const y = ["relative flex group"];
1803
+ return d.value ? (y.push("hover:shadow rounded-md"), y.push("text-danger-darker focus:border-danger focus:ring-danger"), l.buttonStyle !== "simple" && y.push("outline outline-2 outline-danger")) : l.buttonStyle !== "simple" && (y.push("hover:shadow rounded-md"), y.push("outline outline-2 outline-primary-muted")), l.fixedHeight && y.push("h-8"), y.join(" ");
1804
+ }), T = u(() => {
1805
+ const y = [];
1806
+ return l.buttonStyle !== "simple" && y.push(
1807
+ Y.value ? "bg-foundation-disabled text-foreground-disabled" : ""
1808
+ ), Y.value && y.push("cursor-not-allowed"), y.join(" ");
1809
+ }), U = u(() => {
1810
+ const y = [
1779
1811
  "relative z-[1]",
1780
1812
  "flex items-center justify-center text-center shrink-0",
1781
1813
  "rounded-r-md overflow-hidden transition-all",
1782
1814
  "text-foreground",
1783
- Se.value ? `w-6 ${g.value}` : "w-0"
1815
+ xe.value ? `w-6 ${T.value}` : "w-0"
1784
1816
  ];
1785
- return Z.value || ($.push(
1817
+ return Y.value || (y.push(
1786
1818
  "hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"
1787
- ), s.buttonStyle === "tinted" ? $.push("bg-outline-3") : $.push("bg-primary-muted")), $.join(" ");
1788
- }), E = r(() => {
1789
- const $ = [
1819
+ ), l.buttonStyle === "tinted" ? y.push("bg-outline-3") : y.push("bg-primary-muted")), y.join(" ");
1820
+ }), F = u(() => {
1821
+ const y = [
1790
1822
  "relative z-[2]",
1791
1823
  "normal rounded-md cursor-pointer transition truncate flex-1",
1792
1824
  "flex items-center",
1793
- g.value
1825
+ T.value
1794
1826
  ];
1795
- return s.buttonStyle !== "simple" && ($.push("py-2 px-3"), Z.value || (s.buttonStyle === "tinted" ? $.push("bg-foundation-page text-foreground") : $.push("bg-foundation text-foreground"))), S.value && Se.value && $.push("rounded-r-none"), $.join(" ");
1796
- }), F = r(
1797
- () => !!(s.search && (s.filterPredicate || s.getSearchResults))
1798
- ), X = r(() => F.value && s.getSearchResults), Z = r(
1799
- () => s.disabled || !s.items.length && !X.value
1800
- ), U = r({
1827
+ return l.buttonStyle !== "simple" && (y.push("py-2 px-3"), Y.value || (l.buttonStyle === "tinted" ? y.push("bg-foundation-page text-foreground") : y.push("bg-foundation text-foreground"))), E.value && xe.value && y.push("rounded-r-none"), y.join(" ");
1828
+ }), ae = u(
1829
+ () => !!(l.search && (l.filterPredicate || l.getSearchResults))
1830
+ ), G = u(() => ae.value && l.getSearchResults), Y = u(
1831
+ () => l.disabled || !l.items.length && !G.value
1832
+ ), K = u({
1801
1833
  get: () => {
1802
- const $ = o.value;
1803
- return s.multiple ? q($) ? $ : [] : q($) ? void 0 : $;
1834
+ const y = r.value;
1835
+ return l.multiple ? X(y) ? y : [] : X(y) ? void 0 : y;
1804
1836
  },
1805
- set: ($) => {
1806
- if (s.multiple && !q($)) {
1837
+ set: (y) => {
1838
+ if (l.multiple && !X(y)) {
1807
1839
  console.warn("Attempting to set non-array value in selector w/ multiple=true");
1808
1840
  return;
1809
- } else if (!s.multiple && q($)) {
1841
+ } else if (!l.multiple && X(y)) {
1810
1842
  console.warn("Attempting to set array value in selector w/ multiple=false");
1811
1843
  return;
1812
1844
  }
1813
- let D;
1814
- if (s.multiple)
1815
- D = $ || [];
1845
+ let B;
1846
+ if (l.multiple)
1847
+ B = y || [];
1816
1848
  else {
1817
- const V = o.value;
1818
- D = s.allowUnset && V && $ && ce(V) === ce($) ? void 0 : $;
1849
+ const I = r.value;
1850
+ B = l.allowUnset && I && y && ee(I) === ee(y) ? void 0 : y;
1819
1851
  }
1820
- s.fullyControlValue ? t("update:modelValue", D) : o.value = D, b.value += 1;
1852
+ l.fullyControlValue ? s("update:modelValue", B) : r.value = B, b.value += 1;
1821
1853
  }
1822
- }), Se = r(() => s.multiple ? U.value.length !== 0 : !!U.value), qe = () => {
1823
- s.multiple ? U.value = [] : U.value = void 0;
1824
- }, He = r(() => {
1825
- const $ = f.value;
1826
- return !F.value || !($ != null && $.length) ? x.value : s.filterPredicate ? x.value.filter(
1827
- (D) => {
1828
- var V;
1829
- return ((V = s.filterPredicate) == null ? void 0 : V.call(s, D, $)) || !1;
1854
+ }), xe = u(() => l.multiple && X(K.value) ? K.value.length !== 0 : !!K.value), Be = () => {
1855
+ l.multiple ? K.value = [] : K.value = void 0;
1856
+ }, Ve = u(() => {
1857
+ const y = f.value;
1858
+ return !ae.value || !(y != null && y.length) ? c.value : l.filterPredicate ? c.value.filter(
1859
+ (B) => {
1860
+ var I;
1861
+ return ((I = l.filterPredicate) == null ? void 0 : I.call(l, B, y)) || !1;
1830
1862
  }
1831
- ) : x.value;
1832
- }), Ie = ($) => JSON.stringify($), ce = ($) => s.by ? $[s.by] : $, de = async () => {
1833
- if (!(!X.value || !s.getSearchResults)) {
1834
- p.value = !0;
1863
+ ) : c.value;
1864
+ }), ke = (y) => JSON.stringify(y), ee = (y) => o(y) ? y[l.by || "id"] : y, he = async () => {
1865
+ if (!(!G.value || !l.getSearchResults)) {
1866
+ C.value = !0;
1835
1867
  try {
1836
- x.value = await s.getSearchResults(f.value);
1868
+ c.value = await l.getSearchResults(f.value);
1837
1869
  } finally {
1838
- p.value = !1;
1870
+ C.value = !1;
1839
1871
  }
1840
1872
  }
1841
- }, Ge = ze(de, 1e3), Ke = ($) => {
1842
- const { active: D, disabled: V } = $ || {}, { hideCheckmarks: K } = s, N = [
1873
+ }, Le = Fe(he, 1e3), me = (y) => {
1874
+ const { active: B, disabled: I } = y || {}, { hideCheckmarks: W } = l, H = [
1843
1875
  "relative transition cursor-pointer select-none py-1.5 pl-3",
1844
- K ? "" : "pr-9"
1876
+ W ? "" : "pr-9"
1845
1877
  ];
1846
- return V ? N.push("opacity-50 cursor-not-allowed") : N.push(D ? "text-primary" : "text-foreground"), N.join(" ");
1878
+ return I ? H.push("opacity-50 cursor-not-allowed") : H.push(B ? "text-primary" : "text-foreground"), H.join(" ");
1847
1879
  };
1848
- return le(
1849
- () => s.items,
1850
- ($) => {
1851
- x.value = $.slice();
1880
+ return te(
1881
+ () => l.items,
1882
+ (y) => {
1883
+ c.value = y.slice();
1852
1884
  },
1853
1885
  { immediate: !0 }
1854
- ), le(f, () => {
1855
- X.value && Ge();
1856
- }), Y(() => {
1857
- X.value && !s.items.length && de();
1858
- }), n({ triggerSearch: de }), ($, D) => (a(), m("div", null, [
1859
- (a(), L(l(St), {
1886
+ ), te(f, () => {
1887
+ G.value && Le();
1888
+ }), se(() => {
1889
+ G.value && !l.items.length && he();
1890
+ }), t({ triggerSearch: he }), (y, B) => (a(), p("div", null, [
1891
+ (a(), P(n(ls), {
1860
1892
  key: b.value,
1861
- modelValue: U.value,
1862
- "onUpdate:modelValue": D[4] || (D[4] = (V) => U.value = V),
1893
+ modelValue: K.value,
1894
+ "onUpdate:modelValue": B[4] || (B[4] = (I) => K.value = I),
1863
1895
  name: e.name,
1864
1896
  multiple: e.multiple,
1865
1897
  by: e.by,
1866
- disabled: Z.value,
1898
+ disabled: Y.value,
1867
1899
  as: "div"
1868
1900
  }, {
1869
1901
  default: _(() => [
1870
- P(l(It), {
1871
- class: k(["block label text-foreground-2 mb-2", { "sr-only": !e.showLabel }])
1902
+ V(n(ns), {
1903
+ class: x(["block label text-foreground-2 mb-2", { "sr-only": !e.showLabel }])
1872
1904
  }, {
1873
1905
  default: _(() => [
1874
- M(B(e.label), 1)
1906
+ M(L(e.label), 1)
1875
1907
  ]),
1876
1908
  _: 1
1877
1909
  }, 8, ["class"]),
1878
- i("div", {
1879
- class: k(R.value)
1910
+ v("div", {
1911
+ class: x(g.value)
1880
1912
  }, [
1881
- P(l(Bt), {
1882
- class: k(E.value)
1913
+ V(n(as), {
1914
+ class: x(F.value)
1883
1915
  }, {
1884
- default: _(({ open: V }) => [
1885
- i("div", mn, [
1886
- i("div", gn, [
1887
- !U.value || l(q)(U.value) && !U.value.length ? z($.$slots, "nothing-selected", { key: 0 }, () => [
1888
- M(B(e.label), 1)
1889
- ]) : z($.$slots, "something-selected", {
1916
+ default: _(({ open: I }) => [
1917
+ v("div", Hl, [
1918
+ v("div", Kl, [
1919
+ !K.value || n(X)(K.value) && !K.value.length ? R(y.$slots, "nothing-selected", { key: 0 }, () => [
1920
+ M(L(e.placeholder ? e.placeholder : e.label), 1)
1921
+ ]) : R(y.$slots, "something-selected", {
1890
1922
  key: 1,
1891
- value: U.value
1923
+ value: K.value
1892
1924
  }, () => [
1893
- M(B(Ie(U.value)), 1)
1925
+ M(L(ke(K.value)), 1)
1894
1926
  ])
1895
1927
  ]),
1896
- i("div", vn, [
1897
- V ? (a(), L(l(De), {
1928
+ v("div", Gl, [
1929
+ m.value ? (a(), P(n(_t), {
1898
1930
  key: 0,
1931
+ class: "h-4 w-4 text-danger",
1932
+ "aria-hidden": "true"
1933
+ })) : e.showRequired ? (a(), p("div", Xl, " * ")) : S("", !0),
1934
+ I ? (a(), P(n(st), {
1935
+ key: 2,
1899
1936
  class: "h-4 w-4 text-foreground",
1900
1937
  "aria-hidden": "true"
1901
- })) : (a(), L(l(et), {
1902
- key: 1,
1938
+ })) : (a(), P(n(zt), {
1939
+ key: 3,
1903
1940
  class: "h-4 w-4 text-foreground",
1904
1941
  "aria-hidden": "true"
1905
1942
  }))
@@ -1908,106 +1945,106 @@ const Ue = /* @__PURE__ */ Fe(hn, [["__scopeId", "data-v-60cf597b"]]), mn = { cl
1908
1945
  ]),
1909
1946
  _: 3
1910
1947
  }, 8, ["class"]),
1911
- S.value ? ne((a(), m("button", {
1948
+ E.value ? de((a(), p("button", {
1912
1949
  key: 0,
1913
- class: k(T.value),
1950
+ class: x(U.value),
1914
1951
  disabled: e.disabled,
1915
- onClick: D[0] || (D[0] = (V) => qe())
1952
+ onClick: B[0] || (B[0] = (I) => Be())
1916
1953
  }, [
1917
- P(l(tt), { class: "w-3 h-3" })
1918
- ], 10, bn)), [
1919
- [l(Re), "Clear"]
1920
- ]) : I("", !0),
1921
- P(ge, {
1954
+ V(n(Re), { class: "w-3 h-3" })
1955
+ ], 10, Zl)), [
1956
+ [n(rt), "Clear"]
1957
+ ]) : S("", !0),
1958
+ V(Ae, {
1922
1959
  "leave-active-class": "transition ease-in duration-100",
1923
1960
  "leave-from-class": "opacity-100",
1924
1961
  "leave-to-class": "opacity-0"
1925
1962
  }, {
1926
1963
  default: _(() => [
1927
- P(l(_t), {
1964
+ V(n(os), {
1928
1965
  class: "absolute top-[100%] z-10 mt-1 w-full rounded-md bg-foundation-2 py-1 label label--light outline outline-2 outline-primary-muted focus:outline-none shadow",
1929
- onFocus: D[3] || (D[3] = (V) => {
1930
- var K;
1931
- return (K = d.value) == null ? void 0 : K.focus();
1966
+ onFocus: B[3] || (B[3] = (I) => {
1967
+ var W;
1968
+ return (W = i.value) == null ? void 0 : W.focus();
1932
1969
  })
1933
1970
  }, {
1934
1971
  default: _(() => [
1935
- F.value ? (a(), m("label", yn, [
1936
- xn,
1937
- i("div", kn, [
1938
- i("div", Cn, [
1939
- P(l(st), { class: "h-5 w-5 text-foreground" })
1972
+ ae.value ? (a(), p("label", Ql, [
1973
+ Nl,
1974
+ v("div", Jl, [
1975
+ v("div", Yl, [
1976
+ V(n(Pt), { class: "h-5 w-5 text-foreground" })
1940
1977
  ]),
1941
- ne(i("input", {
1978
+ de(v("input", {
1942
1979
  ref_key: "searchInput",
1943
- ref: d,
1944
- "onUpdate:modelValue": D[1] || (D[1] = (V) => f.value = V),
1980
+ ref: i,
1981
+ "onUpdate:modelValue": B[1] || (B[1] = (I) => f.value = I),
1945
1982
  type: "text",
1946
1983
  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",
1947
1984
  placeholder: e.searchPlaceholder,
1948
- onKeydown: D[2] || (D[2] = ye(() => {
1985
+ onKeydown: B[2] || (B[2] = le(() => {
1949
1986
  }, ["stop"]))
1950
- }, null, 40, wn), [
1951
- [Ae, f.value]
1987
+ }, null, 40, en), [
1988
+ [Me, f.value]
1952
1989
  ])
1953
1990
  ])
1954
- ])) : I("", !0),
1955
- i("div", {
1956
- class: k(["overflow-auto simple-scrollbar", [F.value ? "max-h-52" : "max-h-60"]])
1991
+ ])) : S("", !0),
1992
+ v("div", {
1993
+ class: x(["overflow-auto simple-scrollbar", [ae.value ? "max-h-52" : "max-h-60"]])
1957
1994
  }, [
1958
- X.value && p.value ? (a(), m("div", $n, [
1959
- P(Ue, { loading: !0 })
1960
- ])) : X.value && !x.value.length ? (a(), m("div", Sn, [
1961
- z($.$slots, "nothing-found", {}, () => [
1962
- In
1995
+ G.value && C.value ? (a(), p("div", tn, [
1996
+ V(He, { loading: !0 })
1997
+ ])) : G.value && !c.value.length ? (a(), p("div", sn, [
1998
+ R(y.$slots, "nothing-found", {}, () => [
1999
+ ln
1963
2000
  ])
1964
- ])) : I("", !0),
1965
- !X.value || !p.value ? (a(!0), m(W, { key: 2 }, G(He.value, (V) => {
1966
- var K;
1967
- return a(), L(l(Pt), {
1968
- key: ce(V),
1969
- value: V,
1970
- disabled: ((K = e.disabledItemPredicate) == null ? void 0 : K.call(e, V)) || !1
2001
+ ])) : S("", !0),
2002
+ !G.value || !C.value ? (a(!0), p(D, { key: 2 }, q(Ve.value, (I) => {
2003
+ var W;
2004
+ return a(), P(n(rs), {
2005
+ key: ee(I),
2006
+ value: I,
2007
+ disabled: ((W = e.disabledItemPredicate) == null ? void 0 : W.call(e, I)) || !1
1971
2008
  }, {
1972
- default: _(({ active: N, selected: Be }) => {
1973
- var _e, Pe;
2009
+ default: _(({ active: H, selected: oe }) => {
2010
+ var re, we;
1974
2011
  return [
1975
- i("li", {
1976
- class: k(
1977
- Ke({
1978
- active: N,
1979
- disabled: ((_e = e.disabledItemPredicate) == null ? void 0 : _e.call(e, V)) || !1
2012
+ v("li", {
2013
+ class: x(
2014
+ me({
2015
+ active: H,
2016
+ disabled: ((re = e.disabledItemPredicate) == null ? void 0 : re.call(e, I)) || !1
1980
2017
  })
1981
2018
  )
1982
2019
  }, [
1983
- i("span", Bn, [
1984
- z($.$slots, "option", {
1985
- item: V,
1986
- active: N,
1987
- selected: Be,
1988
- disabled: ((Pe = e.disabledItemPredicate) == null ? void 0 : Pe.call(e, V)) || !1
2020
+ v("span", nn, [
2021
+ R(y.$slots, "option", {
2022
+ item: I,
2023
+ active: H,
2024
+ selected: oe,
2025
+ disabled: ((we = e.disabledItemPredicate) == null ? void 0 : we.call(e, I)) || !1
1989
2026
  }, () => [
1990
- M(B(Ie(V)), 1)
2027
+ M(L(ke(I)), 1)
1991
2028
  ])
1992
2029
  ]),
1993
- !e.hideCheckmarks && Be ? (a(), m("span", {
2030
+ !e.hideCheckmarks && oe ? (a(), p("span", {
1994
2031
  key: 0,
1995
- class: k([
1996
- N ? "text-primary" : "text-foreground",
2032
+ class: x([
2033
+ H ? "text-primary" : "text-foreground",
1997
2034
  "absolute inset-y-0 right-0 flex items-center pr-4"
1998
2035
  ])
1999
2036
  }, [
2000
- P(l(nt), {
2037
+ V(n(lt), {
2001
2038
  class: "h-5 w-5",
2002
2039
  "aria-hidden": "true"
2003
2040
  })
2004
- ], 2)) : I("", !0)
2041
+ ], 2)) : S("", !0)
2005
2042
  ], 2)
2006
2043
  ];
2007
2044
  }),
2008
2045
  _: 2
2009
2046
  }, 1032, ["value", "disabled"]);
2010
- }), 128)) : I("", !0)
2047
+ }), 128)) : S("", !0)
2011
2048
  ], 2)
2012
2049
  ]),
2013
2050
  _: 3
@@ -2019,37 +2056,37 @@ const Ue = /* @__PURE__ */ Fe(hn, [["__scopeId", "data-v-60cf597b"]]), mn = { cl
2019
2056
  ]),
2020
2057
  _: 3
2021
2058
  }, 8, ["modelValue", "name", "multiple", "by", "disabled"])),
2022
- v.value ? (a(), m("p", {
2059
+ $.value ? (a(), p("p", {
2023
2060
  key: 0,
2024
- id: v.value,
2025
- class: k(["mt-2 text-sm", w.value])
2026
- }, B(u.value), 11, _n)) : I("", !0)
2061
+ id: $.value,
2062
+ class: x(["mt-2 text-sm", j.value])
2063
+ }, L(z.value), 11, an)) : S("", !0)
2027
2064
  ]));
2028
2065
  }
2029
- }), Ln = /* @__PURE__ */ A({
2066
+ }), on = /* @__PURE__ */ A({
2030
2067
  __name: "SourceAppBadge",
2031
2068
  props: {
2032
2069
  sourceApp: null
2033
2070
  },
2034
2071
  setup(e) {
2035
- return (n, t) => (a(), L(ns, {
2072
+ return (t, s) => (a(), P(De, {
2036
2073
  "color-classes": "text-foreground-on-primary",
2037
2074
  rounded: "",
2038
2075
  style: fe({ backgroundColor: e.sourceApp.bgColor })
2039
2076
  }, {
2040
2077
  default: _(() => [
2041
- M(B(e.sourceApp.short), 1)
2078
+ M(L(e.sourceApp.short), 1)
2042
2079
  ]),
2043
2080
  _: 1
2044
2081
  }, 8, ["style"]));
2045
2082
  }
2046
- }), jn = {
2083
+ }), rn = {
2047
2084
  key: 0,
2048
2085
  class: "text-foreground-2 normal"
2049
- }, Vn = {
2086
+ }, un = {
2050
2087
  key: 1,
2051
2088
  class: "flex items-center"
2052
- }, On = { class: "truncate" }, An = { class: "flex items-center" }, Mn = { class: "truncate" }, _l = /* @__PURE__ */ A({
2089
+ }, cn = { class: "truncate" }, dn = { class: "flex items-center" }, fn = { class: "truncate" }, Ra = /* @__PURE__ */ A({
2053
2090
  __name: "SourceApps",
2054
2091
  props: {
2055
2092
  /**
@@ -2105,129 +2142,217 @@ const Ue = /* @__PURE__ */ Fe(hn, [["__scopeId", "data-v-60cf597b"]]), mn = { cl
2105
2142
  items: {
2106
2143
  type: Array,
2107
2144
  default: void 0
2145
+ },
2146
+ clearable: {
2147
+ type: Boolean
2148
+ },
2149
+ help: {
2150
+ type: String
2108
2151
  }
2109
2152
  },
2110
2153
  emits: ["update:modelValue"],
2111
- setup(e, { emit: n }) {
2112
- const t = e, s = O(null), o = O(null), { selectedValue: c, hiddenSelectedItemCount: d, isMultiItemArrayValue: f, firstItem: x } = cn({
2113
- props: ae(t),
2114
- emit: n,
2115
- dynamicVisibility: { elementToWatchForChanges: s, itemContainer: o }
2116
- }), p = (b, y) => b.name.toLocaleLowerCase().includes(y.toLocaleLowerCase());
2117
- return (b, y) => (a(), L(Pn, {
2118
- modelValue: l(c),
2119
- "onUpdate:modelValue": y[0] || (y[0] = (h) => ve(c) ? c.value = h : null),
2154
+ setup(e, { emit: t }) {
2155
+ const s = e, l = O(null), o = O(null), { selectedValue: r, hiddenSelectedItemCount: d, isMultiItemArrayValue: i, firstItem: f } = ft({
2156
+ props: N(s),
2157
+ emit: t,
2158
+ dynamicVisibility: { elementToWatchForChanges: l, itemContainer: o }
2159
+ }), c = (C, b) => C.name.toLocaleLowerCase().includes(b.toLocaleLowerCase());
2160
+ return (C, b) => (a(), P(pt, {
2161
+ modelValue: n(r),
2162
+ "onUpdate:modelValue": b[0] || (b[0] = (h) => $e(r) ? r.value = h : null),
2120
2163
  multiple: e.multiple,
2121
- items: e.items ?? l(yt),
2164
+ items: e.items ?? n(Xt),
2122
2165
  search: e.search,
2123
2166
  "search-placeholder": e.searchPlaceholder,
2124
2167
  label: e.label,
2125
2168
  "show-label": e.showLabel,
2126
2169
  name: e.name || "sourceApps",
2127
- "filter-predicate": p,
2170
+ "filter-predicate": c,
2171
+ clearable: e.clearable,
2172
+ help: e.help,
2128
2173
  by: "name"
2129
2174
  }, {
2130
2175
  "nothing-selected": _(() => [
2131
- e.selectorPlaceholder ? (a(), m(W, { key: 0 }, [
2132
- M(B(e.selectorPlaceholder), 1)
2133
- ], 64)) : (a(), m(W, { key: 1 }, [
2134
- M(B(e.multiple ? "Select apps" : "Select an app"), 1)
2176
+ e.selectorPlaceholder ? (a(), p(D, { key: 0 }, [
2177
+ M(L(e.selectorPlaceholder), 1)
2178
+ ], 64)) : (a(), p(D, { key: 1 }, [
2179
+ M(L(e.multiple ? "Select apps" : "Select an app"), 1)
2135
2180
  ], 64))
2136
2181
  ]),
2137
2182
  "something-selected": _(({ value: h }) => [
2138
- l(f)(h) ? (a(), m("div", {
2183
+ n(i)(h) ? (a(), p("div", {
2139
2184
  key: 0,
2140
2185
  ref_key: "elementToWatchForChanges",
2141
- ref: s,
2186
+ ref: l,
2142
2187
  class: "flex items-center space-x-0.5 h-5"
2143
2188
  }, [
2144
- i("div", {
2189
+ v("div", {
2145
2190
  ref_key: "itemContainer",
2146
2191
  ref: o,
2147
2192
  class: "flex flex-wrap overflow-hidden space-x-0.5 h-5"
2148
2193
  }, [
2149
- (a(!0), m(W, null, G(h, (C) => (a(), L(Ln, {
2150
- key: C.name,
2151
- "source-app": C
2194
+ (a(!0), p(D, null, q(h, (k) => (a(), P(on, {
2195
+ key: k.name,
2196
+ "source-app": k
2152
2197
  }, null, 8, ["source-app"]))), 128))
2153
2198
  ], 512),
2154
- l(d) > 0 ? (a(), m("div", jn, " +" + B(l(d)), 1)) : I("", !0)
2155
- ], 512)) : (a(), m("div", Vn, [
2156
- i("div", {
2199
+ n(d) > 0 ? (a(), p("div", rn, " +" + L(n(d)), 1)) : S("", !0)
2200
+ ], 512)) : (a(), p("div", un, [
2201
+ v("div", {
2157
2202
  class: "h-2 w-2 rounded-full mr-2",
2158
- style: fe({ backgroundColor: l(x)(h).bgColor })
2203
+ style: fe({ backgroundColor: n(f)(h).bgColor })
2159
2204
  }, null, 4),
2160
- i("span", On, B(l(x)(h).name), 1)
2205
+ v("span", cn, L(n(f)(h).name), 1)
2161
2206
  ]))
2162
2207
  ]),
2163
2208
  option: _(({ item: h }) => [
2164
- i("div", An, [
2165
- i("div", {
2209
+ v("div", dn, [
2210
+ v("div", {
2166
2211
  class: "h-2 w-2 rounded-full mr-2",
2167
2212
  style: fe({ backgroundColor: h.bgColor })
2168
2213
  }, null, 4),
2169
- i("span", Mn, B(h.name), 1)
2214
+ v("span", fn, L(h.name), 1)
2170
2215
  ])
2171
2216
  ]),
2172
2217
  _: 1
2173
- }, 8, ["modelValue", "multiple", "items", "search", "search-placeholder", "label", "show-label", "name"]));
2218
+ }, 8, ["modelValue", "multiple", "items", "search", "search-placeholder", "label", "show-label", "name", "clearable", "help"]));
2219
+ }
2220
+ }), pn = { class: "flex flex-wrap gap-1.5 text-xs" }, Ea = /* @__PURE__ */ A({
2221
+ __name: "Badges",
2222
+ props: {
2223
+ items: null,
2224
+ label: null,
2225
+ name: null,
2226
+ help: null,
2227
+ modelValue: null,
2228
+ multiple: { type: Boolean },
2229
+ rules: null,
2230
+ by: null
2231
+ },
2232
+ emits: ["update:modelValue"],
2233
+ setup(e, { emit: t }) {
2234
+ const s = e, { selectedValue: l, isArrayValue: o } = ft({
2235
+ props: N(s),
2236
+ emit: t
2237
+ }), r = (d) => {
2238
+ o(l.value) ? l.value = l.value.filter((i) => i.id !== d.id) : l.value = void 0;
2239
+ };
2240
+ return (d, i) => (a(), P(pt, {
2241
+ modelValue: n(l),
2242
+ "onUpdate:modelValue": i[0] || (i[0] = (f) => $e(l) ? l.value = f : null),
2243
+ multiple: e.multiple,
2244
+ items: e.items,
2245
+ label: e.label,
2246
+ name: e.name,
2247
+ help: e.help,
2248
+ rules: e.rules,
2249
+ by: e.by
2250
+ }, {
2251
+ "something-selected": _(({ value: f }) => [
2252
+ v("ul", pn, [
2253
+ (a(!0), p(D, null, q(n(o)(f) ? f : [f], (c) => (a(), p("li", {
2254
+ key: c[e.by]
2255
+ }, [
2256
+ V(De, {
2257
+ size: "lg",
2258
+ "clickable-icon": !0,
2259
+ "icon-left": n(Re),
2260
+ onClickIcon: le((C) => r(c), ["stop"])
2261
+ }, {
2262
+ default: _(() => [
2263
+ M(L(c.text), 1)
2264
+ ]),
2265
+ _: 2
2266
+ }, 1032, ["icon-left", "onClickIcon"])
2267
+ ]))), 128))
2268
+ ])
2269
+ ]),
2270
+ option: _(({ item: f }) => [
2271
+ M(L(f.text), 1)
2272
+ ]),
2273
+ _: 1
2274
+ }, 8, ["modelValue", "multiple", "items", "label", "name", "help", "rules", "by"]));
2275
+ }
2276
+ }), hn = { class: "flex items-center" }, mn = { class: "absolute inset-0 flex items-center gap-2 px-1 text-white" }, Ua = /* @__PURE__ */ A({
2277
+ __name: "Switch",
2278
+ props: {
2279
+ modelValue: { type: Boolean }
2280
+ },
2281
+ emits: ["update:modelValue"],
2282
+ setup(e) {
2283
+ const t = Je(e, "modelValue");
2284
+ return (s, l) => (a(), p("div", hn, [
2285
+ V(n(is), {
2286
+ modelValue: t.value,
2287
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => t.value = o),
2288
+ class: x(["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 }])
2289
+ }, {
2290
+ default: _(() => [
2291
+ v("div", mn, [
2292
+ V(n(lt), { class: "h-5 w-5 drop-shadow-md" }),
2293
+ V(n(Re), { class: "h-5 w-5 drop-shadow-md" })
2294
+ ]),
2295
+ v("span", {
2296
+ class: x(["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 }])
2297
+ }, null, 2)
2298
+ ]),
2299
+ _: 1
2300
+ }, 8, ["modelValue", "class"])
2301
+ ]));
2174
2302
  }
2175
2303
  });
2176
- var se = /* @__PURE__ */ ((e) => (e.CtrlOrCmd = "cmd-or-ctrl", e.AltOrOpt = "alt-or-opt", e.Shift = "shift", e))(se || {});
2177
- const he = xt(), zn = {
2304
+ var be = /* @__PURE__ */ ((e) => (e.CtrlOrCmd = "cmd-or-ctrl", e.AltOrOpt = "alt-or-opt", e.Shift = "shift", e))(be || {});
2305
+ const Pe = Zt(), vn = {
2178
2306
  [
2179
2307
  "cmd-or-ctrl"
2180
2308
  /* CtrlOrCmd */
2181
- ]: he === pe.Mac ? "Cmd" : "Ctrl",
2309
+ ]: Pe === ze.Mac ? "Cmd" : "Ctrl",
2182
2310
  [
2183
2311
  "alt-or-opt"
2184
2312
  /* AltOrOpt */
2185
- ]: he === pe.Mac ? "Opt" : "Alt",
2313
+ ]: Pe === ze.Mac ? "Opt" : "Alt",
2186
2314
  shift: "Shift"
2187
2315
  };
2188
- function Pl(e) {
2189
- const n = (t) => Object.values(se).includes(t);
2190
- return e.map((t) => n(t) ? zn[t] : t).join("+");
2316
+ function Da(e) {
2317
+ const t = (s) => Object.values(be).includes(s);
2318
+ return e.map((s) => t(s) ? vn[s] : s).join("+");
2191
2319
  }
2192
- function Ll(e, ...n) {
2193
- wt(
2194
- n[0],
2195
- (t) => {
2196
- const s = t.getModifierState("Alt"), o = he === pe.Mac ? t.getModifierState("Meta") : t.getModifierState("Control"), c = t.getModifierState("Shift");
2320
+ function Wa(e, ...t) {
2321
+ Yt(
2322
+ t[0],
2323
+ (s) => {
2324
+ const l = s.getModifierState("Alt"), o = Pe === ze.Mac ? s.getModifierState("Meta") : s.getModifierState("Control"), r = s.getModifierState("Shift");
2197
2325
  for (const d of e)
2198
2326
  switch (d) {
2199
- case se.CtrlOrCmd:
2327
+ case be.CtrlOrCmd:
2200
2328
  if (!o)
2201
2329
  return;
2202
2330
  break;
2203
- case se.AltOrOpt:
2204
- if (!s)
2331
+ case be.AltOrOpt:
2332
+ if (!l)
2205
2333
  return;
2206
2334
  break;
2207
- case se.Shift:
2208
- if (!c)
2335
+ case be.Shift:
2336
+ if (!r)
2209
2337
  return;
2210
2338
  break;
2211
2339
  }
2212
- n[1](t);
2340
+ t[1](s);
2213
2341
  },
2214
- n[2]
2342
+ t[2]
2215
2343
  );
2216
2344
  }
2217
- function jl(e) {
2218
- const n = (e == null ? void 0 : e.model) || O(), t = r({
2219
- get: () => !!n.value,
2220
- set: (s) => n.value = s ? !0 : void 0
2345
+ function qa(e) {
2346
+ const t = (e == null ? void 0 : e.model) || O(), s = u({
2347
+ get: () => !!t.value,
2348
+ set: (l) => t.value = l ? !0 : void 0
2221
2349
  });
2222
- return { model: n, isChecked: t };
2350
+ return { model: t, isChecked: s };
2223
2351
  }
2224
- const Dn = /* @__PURE__ */ i("div", { class: "fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity" }, null, -1), Tn = { class: "fixed inset-0 z-10 overflow-y-auto" }, Rn = { class: "flex min-h-full justify-center p-4 text-center items-center sm:p-0" }, Fn = {
2352
+ const gn = /* @__PURE__ */ v("div", { class: "fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity backdrop-blur-xs" }, null, -1), bn = { class: "fixed inset-0 z-10 h-screen w-screen" }, yn = { class: "flex justify-center items-center h-full w-full p-4 sm:p-0" }, xn = {
2225
2353
  key: 0,
2226
- class: "flex items-center justify-center shadow p-4 relative z-10 bg-foundation rounded-t-lg"
2227
- }, En = { class: "text-2xl font-bold" }, Wn = { class: "p-4 sm:p-6" }, Un = {
2228
- key: 2,
2229
- class: "flex p-4 sm:px-6 sm:py-5 border-t gap-2 border-outline-3"
2230
- }, Vl = /* @__PURE__ */ A({
2354
+ class: "flex items-center justify-start rounded-t-lg shrink-0 h-16 px-8"
2355
+ }, kn = { class: "text-2xl font-bold" }, Ha = /* @__PURE__ */ A({
2231
2356
  __name: "Dialog",
2232
2357
  props: {
2233
2358
  open: { type: Boolean },
@@ -2239,12 +2364,12 @@ const Dn = /* @__PURE__ */ i("div", { class: "fixed inset-0 bg-neutral-100/70 da
2239
2364
  onSubmit: { type: Function }
2240
2365
  },
2241
2366
  emits: ["update:open", "fully-closed"],
2242
- setup(e, { emit: n }) {
2243
- const t = e, s = be(), o = r(() => !!t.onSubmit), c = r(() => t.buttons || s.buttons), d = r({
2244
- get: () => t.open,
2245
- set: (b) => n("update:open", b)
2246
- }), f = r(() => {
2247
- switch (t.maxWidth) {
2367
+ setup(e, { emit: t }) {
2368
+ const s = e, l = Te(), o = O(!1), r = O(!1), d = u(() => !!s.onSubmit), i = u(() => s.buttons || l.buttons), f = u({
2369
+ get: () => s.open,
2370
+ set: (k) => t("update:open", k)
2371
+ }), c = u(() => {
2372
+ switch (s.maxWidth) {
2248
2373
  case "sm":
2249
2374
  return 0;
2250
2375
  case "md":
@@ -2256,24 +2381,27 @@ const Dn = /* @__PURE__ */ i("div", { class: "fixed inset-0 bg-neutral-100/70 da
2256
2381
  default:
2257
2382
  return 1e4;
2258
2383
  }
2259
- }), x = r(() => {
2260
- const b = ["w-full", "sm:my-8 sm:w-full sm:max-w-xl"];
2261
- return !t.title && !c.value && b.push("px-4 pt-4 pb-4", "sm:p-6"), f.value >= 1 && b.push("md:max-w-2xl"), f.value >= 2 && b.push("lg:max-w-4xl"), f.value >= 3 && b.push("xl:max-w-6xl"), f.value >= 4 && b.push("2xl:max-w-7xl"), b.join(" ");
2262
- }), p = () => {
2263
- t.preventCloseOnClickOutside || (d.value = !1);
2264
- };
2265
- return (b, y) => (a(), L(l(Lt), {
2384
+ }), C = u(() => {
2385
+ const k = ["w-full", "sm:my-8 sm:w-full sm:max-w-xl"];
2386
+ return c.value >= 1 && k.push("max-w-2xl"), c.value >= 2 && k.push("max-w-4xl"), c.value >= 3 && k.push("max-w-6xl"), c.value >= 4 && k.push("max-w-7xl"), k.join(" ");
2387
+ }), b = () => {
2388
+ s.preventCloseOnClickOutside || (f.value = !1);
2389
+ }, h = et((k) => {
2390
+ const m = k.target, { scrollTop: z, offsetHeight: w, scrollHeight: $ } = m;
2391
+ o.value = z > 0, r.value = z + w >= $;
2392
+ }, 60);
2393
+ return (k, m) => (a(), P(n(ot), {
2266
2394
  as: "template",
2267
- show: d.value
2395
+ show: f.value
2268
2396
  }, {
2269
2397
  default: _(() => [
2270
- P(l(jt), {
2398
+ V(n(us), {
2271
2399
  as: "div",
2272
2400
  class: "relative z-40",
2273
- onClose: p
2401
+ onClose: b
2274
2402
  }, {
2275
2403
  default: _(() => [
2276
- P(l(Ve), {
2404
+ V(n(Ze), {
2277
2405
  as: "template",
2278
2406
  enter: "ease-out duration-300",
2279
2407
  "enter-from": "opacity-0",
@@ -2283,13 +2411,13 @@ const Dn = /* @__PURE__ */ i("div", { class: "fixed inset-0 bg-neutral-100/70 da
2283
2411
  "leave-to": "opacity-0"
2284
2412
  }, {
2285
2413
  default: _(() => [
2286
- Dn
2414
+ gn
2287
2415
  ]),
2288
2416
  _: 1
2289
2417
  }),
2290
- i("div", Tn, [
2291
- i("div", Rn, [
2292
- P(l(Ve), {
2418
+ v("div", bn, [
2419
+ v("div", yn, [
2420
+ V(n(Ze), {
2293
2421
  as: "template",
2294
2422
  enter: "ease-out duration-300",
2295
2423
  "enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
@@ -2297,43 +2425,54 @@ const Dn = /* @__PURE__ */ i("div", { class: "fixed inset-0 bg-neutral-100/70 da
2297
2425
  leave: "ease-in duration-200",
2298
2426
  "leave-from": "opacity-100 translate-y-0 sm:scale-100",
2299
2427
  "leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
2300
- onAfterLeave: y[1] || (y[1] = (h) => b.$emit("fully-closed"))
2428
+ onAfterLeave: m[2] || (m[2] = (z) => k.$emit("fully-closed"))
2301
2429
  }, {
2302
2430
  default: _(() => [
2303
- P(l(Vt), {
2304
- class: k([
2305
- "transform rounded-lg bg-foundation text-left shadow-xl transition-all",
2306
- x.value
2431
+ V(n(cs), {
2432
+ class: x([
2433
+ "transform rounded-lg text-foreground overflow-hidden bg-foundation text-left shadow-xl transition-all flex flex-col max-h-[90vh]",
2434
+ C.value
2307
2435
  ]),
2308
- as: o.value ? "form" : "div",
2309
- onSubmit: ye(e.onSubmit, ["prevent"])
2436
+ as: d.value ? "form" : "div",
2437
+ onSubmit: le(e.onSubmit, ["prevent"])
2310
2438
  }, {
2311
2439
  default: _(() => [
2312
- e.title ? (a(), m("div", Fn, [
2313
- i("h4", En, B(e.title), 1)
2314
- ])) : I("", !0),
2315
- e.hideCloser ? I("", !0) : (a(), m("button", {
2316
- key: 1,
2317
- class: "absolute z-20 top-5 right-4 text-foreground",
2318
- onClick: y[0] || (y[0] = (h) => d.value = !1)
2440
+ v("div", {
2441
+ class: x(o.value && "relative z-10 shadow-lg")
2442
+ }, [
2443
+ e.title ? (a(), p("div", xn, [
2444
+ v("h4", kn, L(e.title), 1)
2445
+ ])) : S("", !0)
2446
+ ], 2),
2447
+ e.hideCloser ? S("", !0) : (a(), p("button", {
2448
+ key: 0,
2449
+ class: x(["absolute z-20 right-4 bg-foundation rounded-full p-1", e.title ? "top-4" : "top-3"]),
2450
+ onClick: m[0] || (m[0] = (z) => f.value = !1)
2451
+ }, [
2452
+ V(n(Et), { class: "h-6 w-6" })
2453
+ ], 2)),
2454
+ v("div", {
2455
+ class: x(["flex-1 simple-scrollbar overflow-y-auto bg-white dark:bg-foundation", e.title ? "py-6 px-8" : "p-10"]),
2456
+ onScroll: m[1] || (m[1] = //@ts-ignore
2457
+ (...z) => n(h) && n(h)(...z))
2319
2458
  }, [
2320
- P(l(ct), { class: "h-6 w-6" })
2321
- ])),
2322
- i("div", Wn, [
2323
- z(b.$slots, "default", {}, () => [
2459
+ R(k.$slots, "default", {}, () => [
2324
2460
  M("Put your content here!")
2325
2461
  ])
2326
- ]),
2327
- c.value ? (a(), m("div", Un, [
2328
- e.buttons ? (a(!0), m(W, { key: 0 }, G(e.buttons, (h, C) => (a(), L(l(re), oe({ key: C }, h.props, {
2329
- onClick: h.onClick
2462
+ ], 34),
2463
+ i.value ? (a(), p("div", {
2464
+ key: 1,
2465
+ class: x(["flex p-4 sm:px-6 gap-2 shrink-0", !r.value && "shadow-t"])
2466
+ }, [
2467
+ e.buttons ? (a(!0), p(D, { key: 0 }, q(e.buttons, (z, w) => (a(), P(n(ne), ye({ key: w }, z.props, {
2468
+ onClick: z.onClick
2330
2469
  }), {
2331
2470
  default: _(() => [
2332
- M(B(h.text), 1)
2471
+ M(L(z.text), 1)
2333
2472
  ]),
2334
2473
  _: 2
2335
- }, 1040, ["onClick"]))), 128)) : z(b.$slots, "buttons", { key: 1 })
2336
- ])) : I("", !0)
2474
+ }, 1040, ["onClick"]))), 128)) : R(k.$slots, "buttons", { key: 1 })
2475
+ ], 2)) : S("", !0)
2337
2476
  ]),
2338
2477
  _: 3
2339
2478
  }, 8, ["class", "as", "onSubmit"])
@@ -2349,7 +2488,7 @@ const Dn = /* @__PURE__ */ i("div", { class: "fixed inset-0 bg-neutral-100/70 da
2349
2488
  _: 3
2350
2489
  }, 8, ["show"]));
2351
2490
  }
2352
- }), qn = { class: "inline-flex items-center space-x-2" }, Hn = { class: "label-light" }, Ol = /* @__PURE__ */ A({
2491
+ }), wn = { class: "inline-flex items-center space-x-2" }, Cn = { class: "label-light" }, Ka = /* @__PURE__ */ A({
2353
2492
  __name: "Disclosure",
2354
2493
  props: {
2355
2494
  title: null,
@@ -2357,12 +2496,12 @@ const Dn = /* @__PURE__ */ i("div", { class: "fixed inset-0 bg-neutral-100/70 da
2357
2496
  color: { default: "default" }
2358
2497
  },
2359
2498
  setup(e) {
2360
- const n = e, t = r(() => {
2499
+ const t = e, s = u(() => {
2361
2500
  const o = [
2362
2501
  "pr-3 h-10 w-full flex items-center justify-between border-l-2 px-2 rounded transition",
2363
2502
  "ring-1 font-medium"
2364
2503
  ];
2365
- switch (n.color) {
2504
+ switch (t.color) {
2366
2505
  case "warning":
2367
2506
  o.push(
2368
2507
  "border-warning text-warning ring-warning-lighter hover:ring-warning"
@@ -2384,9 +2523,9 @@ const Dn = /* @__PURE__ */ i("div", { class: "fixed inset-0 bg-neutral-100/70 da
2384
2523
  break;
2385
2524
  }
2386
2525
  return o.join(" ");
2387
- }), s = r(() => {
2526
+ }), l = u(() => {
2388
2527
  const o = ["mt-4 px-3 py-1 border-x "];
2389
- switch (n.color) {
2528
+ switch (t.color) {
2390
2529
  case "warning":
2391
2530
  o.push("border-warning-lighter");
2392
2531
  break;
@@ -2403,32 +2542,32 @@ const Dn = /* @__PURE__ */ i("div", { class: "fixed inset-0 bg-neutral-100/70 da
2403
2542
  }
2404
2543
  return o.join(" ");
2405
2544
  });
2406
- return (o, c) => (a(), m("div", null, [
2407
- P(l(Ot), null, {
2545
+ return (o, r) => (a(), p("div", null, [
2546
+ V(n(ds), null, {
2408
2547
  default: _(({ open: d }) => [
2409
- P(l(At), {
2410
- class: k(t.value)
2548
+ V(n(fs), {
2549
+ class: x(s.value)
2411
2550
  }, {
2412
2551
  default: _(() => [
2413
- i("div", qn, [
2414
- e.icon ? (a(), L(H(e.icon), {
2552
+ v("div", wn, [
2553
+ e.icon ? (a(), P(Z(e.icon), {
2415
2554
  key: 0,
2416
2555
  class: "h-4 w-4"
2417
- })) : I("", !0),
2418
- i("span", null, B(e.title), 1)
2556
+ })) : S("", !0),
2557
+ v("span", null, L(e.title), 1)
2419
2558
  ]),
2420
- P(l(De), {
2421
- class: k([d ? "" : "rotate-180 transform", "h-5 w-5"])
2559
+ V(n(st), {
2560
+ class: x([d ? "" : "rotate-180 transform", "h-5 w-5"])
2422
2561
  }, null, 8, ["class"])
2423
2562
  ]),
2424
2563
  _: 2
2425
2564
  }, 1032, ["class"]),
2426
- P(l(Mt), {
2427
- class: k(s.value)
2565
+ V(n(ps), {
2566
+ class: x(l.value)
2428
2567
  }, {
2429
2568
  default: _(() => [
2430
- i("div", Hn, [
2431
- z(o.$slots, "default", {}, () => [
2569
+ v("div", Cn, [
2570
+ R(o.$slots, "default", {}, () => [
2432
2571
  M("Panel contents")
2433
2572
  ])
2434
2573
  ])
@@ -2441,136 +2580,136 @@ const Dn = /* @__PURE__ */ i("div", { class: "fixed inset-0 bg-neutral-100/70 da
2441
2580
  ]));
2442
2581
  }
2443
2582
  });
2444
- var J = /* @__PURE__ */ ((e) => (e.Grid = "grid", e.List = "list", e))(J || {});
2445
- const Al = /* @__PURE__ */ A({
2583
+ var ue = /* @__PURE__ */ ((e) => (e.Grid = "grid", e.List = "list", e))(ue || {});
2584
+ const Ga = /* @__PURE__ */ A({
2446
2585
  __name: "GridListToggle",
2447
2586
  props: {
2448
2587
  modelValue: null
2449
2588
  },
2450
2589
  emits: ["click", "update:modelValue"],
2451
- setup(e, { emit: n }) {
2452
- const t = e, s = r({
2453
- get: () => t.modelValue || J.Grid,
2454
- set: (d) => n("update:modelValue", d)
2455
- }), o = r(
2456
- () => s.value === J.Grid ? lt : at
2457
- ), c = (d) => {
2458
- n("click", d);
2459
- const f = s.value === J.Grid ? J.List : J.Grid;
2460
- s.value = f;
2590
+ setup(e, { emit: t }) {
2591
+ const s = e, l = u({
2592
+ get: () => s.modelValue || ue.Grid,
2593
+ set: (d) => t("update:modelValue", d)
2594
+ }), o = u(
2595
+ () => l.value === ue.Grid ? jt : Ot
2596
+ ), r = (d) => {
2597
+ t("click", d);
2598
+ const i = l.value === ue.Grid ? ue.List : ue.Grid;
2599
+ l.value = i;
2461
2600
  };
2462
- return (d, f) => (a(), m("button", {
2601
+ return (d, i) => (a(), p("button", {
2463
2602
  class: "flex items-center justify-center rounded bg-foundation h-8 w-8 shadow cursor-pointer text-foreground",
2464
- onClick: c
2603
+ onClick: r
2465
2604
  }, [
2466
- (a(), L(H(o.value), { class: "h-6 w-6" }))
2605
+ (a(), P(Z(o.value), { class: "h-6 w-6" }))
2467
2606
  ]));
2468
2607
  }
2469
2608
  });
2470
- var Gn = /* @__PURE__ */ ((e) => (e[e.Throttle = 0] = "Throttle", e[e.Debounce = 1] = "Debounce", e))(Gn || {}), me = /* @__PURE__ */ ((e) => (e[e.Left = 0] = "Left", e[e.Right = 1] = "Right", e))(me || {});
2471
- function Kn(e, n) {
2472
- if (!we)
2609
+ var $n = /* @__PURE__ */ ((e) => (e[e.Throttle = 0] = "Throttle", e[e.Debounce = 1] = "Debounce", e))($n || {}), je = /* @__PURE__ */ ((e) => (e[e.Left = 0] = "Left", e[e.Right = 1] = "Right", e))(je || {});
2610
+ function In(e, t) {
2611
+ if (!Ue)
2473
2612
  return;
2474
2613
  const {
2475
- wait: t = 100,
2476
- throttleOrDebounce: s = 0
2614
+ wait: s = 100,
2615
+ throttleOrDebounce: l = 0
2477
2616
  /* Throttle */
2478
- } = n || {}, o = t ? s === 0 ? Qe(e, t) : ze(e, t) : e;
2479
- Y(() => window.addEventListener("resize", o)), Me(() => window.removeEventListener("resize", o));
2617
+ } = t || {}, o = s ? l === 0 ? et(e, s) : Fe(e, s) : e;
2618
+ se(() => window.addEventListener("resize", o)), Ye(() => window.removeEventListener("resize", o));
2480
2619
  }
2481
- function Ml(e) {
2482
- Y(() => {
2620
+ function Xa(e) {
2621
+ se(() => {
2483
2622
  window.addEventListener("beforeunload", e);
2484
- }), Me(() => {
2623
+ }), Ye(() => {
2485
2624
  window.removeEventListener("beforeunload", e);
2486
2625
  });
2487
2626
  }
2488
- function Xn(e) {
2489
- const { el: n, defaultDirection: t } = e, s = O(
2490
- Q(t) ? 1 : t
2627
+ function Sn(e) {
2628
+ const { el: t, defaultDirection: s } = e, l = O(
2629
+ ce(s) ? 1 : s
2491
2630
  /* Right */
2492
- ), o = r(() => {
2493
- const d = l(e.stopUpdatesBelowWidth);
2494
- if (!Q(d))
2631
+ ), o = u(() => {
2632
+ const d = n(e.stopUpdatesBelowWidth);
2633
+ if (!ce(d))
2495
2634
  return d;
2496
- const f = l(n);
2497
- return f != null && f.offsetWidth ? f.offsetWidth * 2 : void 0;
2498
- }), c = () => {
2499
- if (!we)
2635
+ const i = n(t);
2636
+ return i != null && i.offsetWidth ? i.offsetWidth * 2 : void 0;
2637
+ }), r = () => {
2638
+ if (!Ue)
2500
2639
  return;
2501
- const d = l(n);
2640
+ const d = n(t);
2502
2641
  if (!d)
2503
2642
  return;
2504
- const f = d.getBoundingClientRect(), x = f.x + f.width > window.innerWidth, p = f.x < 0;
2505
- x && p || !Q(o.value) && window.innerWidth < o.value || (x ? s.value = 0 : p && (s.value = 1));
2643
+ const i = d.getBoundingClientRect(), f = i.x + i.width > window.innerWidth, c = i.x < 0;
2644
+ f && c || !ce(o.value) && window.innerWidth < o.value || (f ? l.value = 0 : c && (l.value = 1));
2506
2645
  };
2507
- return Kn(() => c()), le(
2508
- () => l(n),
2646
+ return In(() => r()), te(
2647
+ () => n(t),
2509
2648
  (d) => {
2510
- d && c();
2649
+ d && r();
2511
2650
  }
2512
2651
  ), {
2513
- direction: r(() => s.value),
2514
- recalculateDirection: c
2652
+ direction: u(() => l.value),
2653
+ recalculateDirection: r
2515
2654
  };
2516
2655
  }
2517
- const Nn = ["disabled", "onClick"], zl = /* @__PURE__ */ A({
2656
+ const Bn = ["disabled", "onClick"], Za = /* @__PURE__ */ A({
2518
2657
  __name: "Menu",
2519
2658
  props: {
2520
2659
  open: { type: Boolean },
2521
2660
  items: null
2522
2661
  },
2523
2662
  emits: ["update:open", "chosen"],
2524
- setup(e, { emit: n }) {
2525
- const t = e, s = O(null), { direction: o } = Xn({
2526
- el: r(() => {
2663
+ setup(e, { emit: t }) {
2664
+ const s = e, l = O(null), { direction: o } = Sn({
2665
+ el: u(() => {
2527
2666
  var h;
2528
- return ((h = s.value) == null ? void 0 : h.el) || null;
2667
+ return ((h = l.value) == null ? void 0 : h.el) || null;
2529
2668
  }),
2530
- defaultDirection: me.Left,
2669
+ defaultDirection: je.Left,
2531
2670
  stopUpdatesBelowWidth: 300
2532
- }), c = O(null), d = O(!1), f = r({
2533
- get: () => t.open || !1,
2534
- set: (h) => n("update:open", h)
2535
- }), x = (h) => {
2536
- const { active: C, disabled: u } = h, j = ["group flex w-full items-center rounded-md px-2 py-2 text-sm"];
2537
- return C ? j.push("bg-primary text-foreground-on-primary") : u ? j.push("text-foreground-disabled") : j.push("text-foreground"), j.join(" ");
2538
- }, p = (h, C) => {
2539
- n("chosen", { item: h, event: C });
2540
- }, b = () => {
2671
+ }), r = O(null), d = O(!1), i = u({
2672
+ get: () => s.open || !1,
2673
+ set: (h) => t("update:open", h)
2674
+ }), f = (h) => {
2675
+ const { active: k, disabled: m } = h, z = ["group flex w-full items-center rounded-md px-2 py-2 text-sm"];
2676
+ return k ? z.push("bg-primary text-foreground-on-primary") : m ? z.push("text-foreground-disabled") : z.push("text-foreground"), z.join(" ");
2677
+ }, c = (h, k) => {
2678
+ t("chosen", { item: h, event: k });
2679
+ }, C = () => {
2541
2680
  var h;
2542
- return (h = c.value) == null ? void 0 : h.el.click();
2543
- }, y = (h) => {
2544
- const C = !!h;
2545
- return d.value = C, C;
2681
+ return (h = r.value) == null ? void 0 : h.el.click();
2682
+ }, b = (h) => {
2683
+ const k = !!h;
2684
+ return d.value = k, k;
2546
2685
  };
2547
- return le(d, (h, C) => {
2548
- h !== C && (f.value = h);
2549
- }), le(f, (h) => {
2550
- (h && !d.value || !h && d.value) && b();
2551
- }), (h, C) => (a(), L(l(zt), {
2686
+ return te(d, (h, k) => {
2687
+ h !== k && (i.value = h);
2688
+ }), te(i, (h) => {
2689
+ (h && !d.value || !h && d.value) && C();
2690
+ }), (h, k) => (a(), P(n(hs), {
2552
2691
  as: "div",
2553
2692
  class: "relative inline-block"
2554
2693
  }, {
2555
- default: _(({ open: u }) => [
2556
- i("div", null, [
2557
- P(l(Dt), {
2694
+ default: _(({ open: m }) => [
2695
+ v("div", null, [
2696
+ V(n(ms), {
2558
2697
  ref_key: "menuButton",
2559
- ref: c,
2698
+ ref: r,
2560
2699
  class: "hidden",
2561
- onClick: C[0] || (C[0] = ye(() => {
2700
+ onClick: k[0] || (k[0] = le(() => {
2562
2701
  }, ["stop", "prevent"]))
2563
2702
  }, null, 512),
2564
- i("div", {
2565
- class: k(u ? "pointer-events-none" : "")
2703
+ v("div", {
2704
+ class: x(m ? "pointer-events-none" : "")
2566
2705
  }, [
2567
- z(h.$slots, "default", {
2568
- toggle: b,
2569
- open: y(u)
2706
+ R(h.$slots, "default", {
2707
+ toggle: C,
2708
+ open: b(m)
2570
2709
  })
2571
2710
  ], 2)
2572
2711
  ]),
2573
- P(ge, {
2712
+ V(Ae, {
2574
2713
  "enter-active-class": "transition duration-100 ease-out",
2575
2714
  "enter-from-class": "transform scale-95 opacity-0",
2576
2715
  "enter-to-class": "transform scale-100 opacity-100",
@@ -2579,36 +2718,36 @@ const Nn = ["disabled", "onClick"], zl = /* @__PURE__ */ A({
2579
2718
  "leave-to-class": "transform scale-95 opacity-0"
2580
2719
  }, {
2581
2720
  default: _(() => [
2582
- P(l(Tt), {
2721
+ V(n(vs), {
2583
2722
  ref_key: "menuItems",
2584
- ref: s,
2585
- class: k([
2723
+ ref: l,
2724
+ class: x([
2586
2725
  "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",
2587
- l(o) === l(me).Left ? "right-0" : ""
2726
+ n(o) === n(je).Left ? "right-0" : ""
2588
2727
  ])
2589
2728
  }, {
2590
2729
  default: _(() => [
2591
- (a(!0), m(W, null, G(e.items, (j, v) => (a(), m("div", {
2592
- key: v,
2730
+ (a(!0), p(D, null, q(e.items, (z, w) => (a(), p("div", {
2731
+ key: w,
2593
2732
  class: "px-1 py-1"
2594
2733
  }, [
2595
- (a(!0), m(W, null, G(j, (w) => (a(), L(l(Rt), {
2596
- key: w.id,
2597
- disabled: w.disabled
2734
+ (a(!0), p(D, null, q(z, ($) => (a(), P(n(gs), {
2735
+ key: $.id,
2736
+ disabled: $.disabled
2598
2737
  }, {
2599
- default: _(({ active: S, disabled: R }) => [
2600
- ne((a(), m("span", null, [
2601
- i("button", {
2602
- class: k(x({ active: S, disabled: R })),
2603
- disabled: R,
2604
- onClick: (g) => p(w, g)
2738
+ default: _(({ active: j, disabled: E }) => [
2739
+ de((a(), p("span", null, [
2740
+ v("button", {
2741
+ class: x(f({ active: j, disabled: E })),
2742
+ disabled: E,
2743
+ onClick: (g) => c($, g)
2605
2744
  }, [
2606
- z(h.$slots, "item", { item: w }, () => [
2607
- M(B(w.title), 1)
2745
+ R(h.$slots, "item", { item: $ }, () => [
2746
+ M(L($.title), 1)
2608
2747
  ])
2609
- ], 10, Nn)
2748
+ ], 10, Bn)
2610
2749
  ])), [
2611
- [l(Re), w.disabled && w.disabledTooltip]
2750
+ [n(rt), $.disabled && $.disabledTooltip]
2612
2751
  ])
2613
2752
  ]),
2614
2753
  _: 2
@@ -2624,33 +2763,108 @@ const Nn = ["disabled", "onClick"], zl = /* @__PURE__ */ A({
2624
2763
  _: 3
2625
2764
  }));
2626
2765
  }
2627
- }), Jn = { class: "flex flex-col space-y-4" }, Qn = { class: "flex space-x-6" }, Dl = /* @__PURE__ */ A({
2766
+ }), Vn = { class: "flex flex-col space-y-4" }, Ln = { class: "flex space-x-6" }, Qa = /* @__PURE__ */ A({
2628
2767
  __name: "Tabs",
2629
2768
  props: {
2630
2769
  items: null
2631
2770
  },
2632
2771
  setup(e) {
2633
- const n = e, t = O(null), s = r(() => t.value && n.items.find((c) => c.id === t.value) || n.items[0]), o = (c) => {
2634
- t.value = c.id;
2772
+ const t = e, s = O(null), l = u(() => s.value && t.items.find((r) => r.id === s.value) || t.items[0]), o = (r) => {
2773
+ s.value = r.id;
2635
2774
  };
2636
- return (c, d) => (a(), m("div", Jn, [
2637
- i("div", Qn, [
2638
- (a(!0), m(W, null, G(e.items, (f) => (a(), L(re, {
2639
- key: f.id,
2775
+ return (r, d) => (a(), p("div", Vn, [
2776
+ v("div", Ln, [
2777
+ (a(!0), p(D, null, q(e.items, (i) => (a(), P(ne, {
2778
+ key: i.id,
2640
2779
  link: "",
2641
- color: s.value.id === f.id ? "default" : "secondary",
2642
- onClick: (x) => o(f)
2780
+ color: l.value.id === i.id ? "default" : "secondary",
2781
+ onClick: (f) => o(i)
2643
2782
  }, {
2644
2783
  default: _(() => [
2645
- M(B(f.title), 1)
2784
+ M(L(i.title), 1)
2646
2785
  ]),
2647
2786
  _: 2
2648
2787
  }, 1032, ["color", "onClick"]))), 128))
2649
2788
  ]),
2650
- z(c.$slots, "default", { activeItem: s.value })
2789
+ R(r.$slots, "default", { activeItem: l.value })
2651
2790
  ]));
2652
2791
  }
2653
- }), Yn = { class: "w-full flex flex-col items-center my-2 space-y-2 mt-4" }, Zn = { class: "inline-flex items-center space-x-1" }, el = /* @__PURE__ */ i("span", { class: "text-foreground-2" }, "That's it, you've loaded everything!", -1), tl = { class: "w-full flex flex-col items-center my-2 space-y-2 mt-4" }, sl = { class: "inline-flex items-center space-x-1" }, nl = /* @__PURE__ */ i("span", { class: "text-foreground-2" }, "An error occurred while loading", -1), Tl = /* @__PURE__ */ A({
2792
+ }), _n = { class: "text-foreground" }, zn = { class: "w-full text-sm overflow-x-auto overflow-y-visible simple-scrollbar" }, Pn = ["onClick", "onKeypress"], jn = /* @__PURE__ */ v("div", { class: "text-gray-900 font-medium order-1" }, "Placeholder", -1), On = { class: "absolute right-1.5 gap-1 flex items-center p-0" }, Na = /* @__PURE__ */ A({
2793
+ __name: "Table",
2794
+ props: {
2795
+ items: null,
2796
+ buttons: null,
2797
+ columns: null,
2798
+ overflowCells: { type: Boolean },
2799
+ onRowClick: { type: Function }
2800
+ },
2801
+ setup(e) {
2802
+ const t = e, s = u(() => {
2803
+ const d = (t.buttons || []).length;
2804
+ let i = 16;
2805
+ return d > 0 && (i = 48 + (d - 1) * 42), `${i}px`;
2806
+ }), l = (d) => {
2807
+ var i;
2808
+ return ((i = t.columns.find((f) => f.id === d)) == null ? void 0 : i.classes) || "";
2809
+ }, o = (d, i) => {
2810
+ const f = l(d);
2811
+ return i === 0 ? `bg-transparent py-3 pr-5 px-1 ${f}` : `lg:p-0 px-1 ${f}`;
2812
+ }, r = (d) => {
2813
+ var i;
2814
+ (i = t.onRowClick) == null || i.call(t, d);
2815
+ };
2816
+ return (d, i) => (a(), p("div", _n, [
2817
+ v("div", zn, [
2818
+ e.items.length > 0 ? (a(), p("div", {
2819
+ key: 0,
2820
+ 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]",
2821
+ style: fe({ paddingRight: s.value })
2822
+ }, [
2823
+ (a(!0), p(D, null, q(e.columns, (f) => (a(), p("div", {
2824
+ key: f.id,
2825
+ class: x([l(f.id), "capitalize"])
2826
+ }, L(f.header), 3))), 128))
2827
+ ], 4)) : S("", !0),
2828
+ v("div", {
2829
+ class: x(["divide-y divide-outline-3 h-full overflow-visible", { "pb-32": e.overflowCells }])
2830
+ }, [
2831
+ (a(!0), p(D, null, q(e.items, (f) => (a(), p("div", {
2832
+ key: f.id,
2833
+ class: x(["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 }]),
2834
+ style: fe({ paddingRight: s.value }),
2835
+ tabindex: "0",
2836
+ onClick: (c) => r(f),
2837
+ onKeypress: (c) => r(f)
2838
+ }, [
2839
+ (a(!0), p(D, null, q(e.columns, (c, C) => (a(), p("div", {
2840
+ key: c.id,
2841
+ class: x(o(c.id, C)),
2842
+ tabindex: "0"
2843
+ }, [
2844
+ R(d.$slots, c.id, { item: f }, () => [
2845
+ jn
2846
+ ])
2847
+ ], 2))), 128)),
2848
+ v("div", On, [
2849
+ (a(!0), p(D, null, q(e.buttons, (c) => (a(), p("div", {
2850
+ key: c.label
2851
+ }, [
2852
+ V(n(ne), {
2853
+ "icon-left": c.icon,
2854
+ size: "sm",
2855
+ color: "secondary",
2856
+ "hide-text": "",
2857
+ class: x(c.class),
2858
+ onClick: le((C) => c.action(f), ["stop"])
2859
+ }, null, 8, ["icon-left", "class", "onClick"])
2860
+ ]))), 128))
2861
+ ])
2862
+ ], 46, Pn))), 128))
2863
+ ], 2)
2864
+ ])
2865
+ ]));
2866
+ }
2867
+ }), An = { class: "w-full flex flex-col items-center my-2 space-y-2 mt-4" }, Mn = { class: "inline-flex items-center space-x-1" }, Tn = /* @__PURE__ */ v("span", { class: "text-foreground-2" }, "That's it, you've loaded everything!", -1), Fn = { class: "w-full flex flex-col items-center my-2 space-y-2 mt-4" }, Rn = { class: "inline-flex items-center space-x-1" }, En = /* @__PURE__ */ v("span", { class: "text-foreground-2" }, "An error occurred while loading", -1), Ja = /* @__PURE__ */ A({
2654
2868
  __name: "InfiniteLoading",
2655
2869
  props: {
2656
2870
  settings: null,
@@ -2658,58 +2872,58 @@ const Nn = ["disabled", "onClick"], zl = /* @__PURE__ */ A({
2658
2872
  },
2659
2873
  emits: ["infinite"],
2660
2874
  setup(e) {
2661
- const n = O(null), t = O(!1);
2662
- return we && Y(() => {
2663
- const s = setInterval(() => {
2875
+ const t = O(null), s = O(!1);
2876
+ return Ue && se(() => {
2877
+ const l = setInterval(() => {
2664
2878
  var o;
2665
- (o = n.value) != null && o.isConnected && (t.value = !0, clearInterval(s));
2879
+ (o = t.value) != null && o.isConnected && (s.value = !0, clearInterval(l));
2666
2880
  }, 200);
2667
- }), (s, o) => (a(), m("div", {
2881
+ }), (l, o) => (a(), p("div", {
2668
2882
  ref_key: "wrapper",
2669
- ref: n
2883
+ ref: t
2670
2884
  }, [
2671
- t.value ? (a(), L(l(Ft), oe({ key: 0 }, s.$props.settings || {}, {
2672
- onInfinite: o[0] || (o[0] = (c) => s.$emit("infinite", c))
2885
+ s.value ? (a(), P(n(ks), ye({ key: 0 }, l.$props.settings || {}, {
2886
+ onInfinite: o[0] || (o[0] = (r) => l.$emit("infinite", r))
2673
2887
  }), {
2674
2888
  spinner: _(() => [
2675
- P(Ue, {
2889
+ V(He, {
2676
2890
  loading: !0,
2677
2891
  class: "my-2"
2678
2892
  })
2679
2893
  ]),
2680
2894
  complete: _(() => [
2681
- i("div", Yn, [
2682
- i("div", Zn, [
2683
- P(l(dt), { class: "w-5 h-5 text-success" }),
2684
- el
2895
+ v("div", An, [
2896
+ v("div", Mn, [
2897
+ V(n(Ut), { class: "w-5 h-5 text-success" }),
2898
+ Tn
2685
2899
  ])
2686
2900
  ])
2687
2901
  ]),
2688
- error: _(({ retry: c }) => [
2689
- i("div", tl, [
2690
- i("div", sl, [
2691
- P(l(ft), { class: "w-5 h-5 text-danger" }),
2692
- nl
2902
+ error: _(({ retry: r }) => [
2903
+ v("div", Fn, [
2904
+ v("div", Rn, [
2905
+ V(n(Dt), { class: "w-5 h-5 text-danger" }),
2906
+ En
2693
2907
  ]),
2694
- e.allowRetry ? (a(), L(re, {
2908
+ e.allowRetry ? (a(), P(ne, {
2695
2909
  key: 0,
2696
- onClick: c
2910
+ onClick: r
2697
2911
  }, {
2698
2912
  default: _(() => [
2699
2913
  M("Retry")
2700
2914
  ]),
2701
2915
  _: 2
2702
- }, 1032, ["onClick"])) : I("", !0)
2916
+ }, 1032, ["onClick"])) : S("", !0)
2703
2917
  ])
2704
2918
  ]),
2705
2919
  _: 1
2706
- }, 16)) : I("", !0)
2920
+ }, 16)) : S("", !0)
2707
2921
  ], 512));
2708
2922
  }
2709
- }), ll = { class: "relative group" }, al = {
2923
+ }), Un = { class: "relative group" }, Dn = {
2710
2924
  key: 0,
2711
2925
  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"
2712
- }, Rl = /* @__PURE__ */ A({
2926
+ }, Ya = /* @__PURE__ */ A({
2713
2927
  __name: "Panel",
2714
2928
  props: {
2715
2929
  /**
@@ -2746,48 +2960,48 @@ const Nn = ["disabled", "onClick"], zl = /* @__PURE__ */ A({
2746
2960
  }
2747
2961
  },
2748
2962
  emits: ["submit"],
2749
- setup(e, { emit: n }) {
2750
- const t = e, s = r(
2751
- () => t.customPadding ? "" : "px-4 py-4 sm:px-6"
2752
- ), o = r(
2753
- () => t.customPadding ? "" : "px-4 py-4 sm:p-6"
2754
- ), c = r(() => {
2963
+ setup(e, { emit: t }) {
2964
+ const s = e, l = u(
2965
+ () => s.customPadding ? "" : "px-4 py-4 sm:px-6"
2966
+ ), o = u(
2967
+ () => s.customPadding ? "" : "px-4 py-4 sm:p-6"
2968
+ ), r = u(() => {
2755
2969
  const d = ["rounded-lg"];
2756
- return t.noShadow || d.push("shadow"), t.ring && d.push("ring-outline-2 hover:ring-2"), t.panelClasses && d.push(t.panelClasses), d.join(" ");
2970
+ return s.noShadow || d.push("shadow"), s.ring && d.push("ring-outline-2 hover:ring-2"), s.panelClasses && d.push(s.panelClasses), d.join(" ");
2757
2971
  });
2758
- return (d, f) => (a(), m("div", ll, [
2759
- e.fancyGlow ? (a(), m("div", al)) : I("", !0),
2760
- (a(), L(H(e.form ? "form" : "div"), {
2761
- class: k([
2972
+ return (d, i) => (a(), p("div", Un, [
2973
+ e.fancyGlow ? (a(), p("div", Dn)) : S("", !0),
2974
+ (a(), P(Z(e.form ? "form" : "div"), {
2975
+ class: x([
2762
2976
  "relative divide-outline-3 bg-foundation text-foreground flex flex-col divide-y overflow-hidden",
2763
- c.value
2977
+ r.value
2764
2978
  ]),
2765
- onSubmit: f[0] || (f[0] = (x) => n("submit", x))
2979
+ onSubmit: i[0] || (i[0] = (f) => t("submit", f))
2766
2980
  }, {
2767
2981
  default: _(() => [
2768
- d.$slots.header ? (a(), m("div", {
2982
+ d.$slots.header ? (a(), p("div", {
2769
2983
  key: 0,
2770
- class: k(s.value)
2984
+ class: x(l.value)
2771
2985
  }, [
2772
- z(d.$slots, "header")
2773
- ], 2)) : I("", !0),
2774
- i("div", {
2775
- class: k(["grow", o.value])
2986
+ R(d.$slots, "header")
2987
+ ], 2)) : S("", !0),
2988
+ v("div", {
2989
+ class: x(["grow", o.value])
2776
2990
  }, [
2777
- z(d.$slots, "default")
2991
+ R(d.$slots, "default")
2778
2992
  ], 2),
2779
- d.$slots.footer ? (a(), m("div", {
2993
+ d.$slots.footer ? (a(), p("div", {
2780
2994
  key: 1,
2781
- class: k(s.value)
2995
+ class: x(l.value)
2782
2996
  }, [
2783
- z(d.$slots, "footer")
2784
- ], 2)) : I("", !0)
2997
+ R(d.$slots, "footer")
2998
+ ], 2)) : S("", !0)
2785
2999
  ]),
2786
3000
  _: 3
2787
3001
  }, 40, ["class"]))
2788
3002
  ]));
2789
3003
  }
2790
- }), ol = { class: "flex-shrink-0" }, rl = /* @__PURE__ */ i("span", { class: "sr-only" }, "Dismiss", -1), Fl = /* @__PURE__ */ A({
3004
+ }), Wn = { class: "flex-shrink-0" }, qn = /* @__PURE__ */ v("span", { class: "sr-only" }, "Dismiss", -1), eo = /* @__PURE__ */ A({
2791
3005
  __name: "Alert",
2792
3006
  props: {
2793
3007
  color: { default: "success" },
@@ -2798,162 +3012,162 @@ const Nn = ["disabled", "onClick"], zl = /* @__PURE__ */ A({
2798
3012
  },
2799
3013
  emits: ["dismiss"],
2800
3014
  setup(e) {
2801
- const n = e, t = be(), s = r(() => !!t.description), o = r(() => {
2802
- if (n.customIcon)
2803
- return n.customIcon;
2804
- switch (n.color) {
3015
+ const t = e, s = Te(), l = u(() => !!s.description), o = u(() => {
3016
+ if (t.customIcon)
3017
+ return t.customIcon;
3018
+ switch (t.color) {
2805
3019
  case "info":
2806
- return vt;
3020
+ return Kt;
2807
3021
  case "warning":
2808
- return xe;
3022
+ return Ie;
2809
3023
  case "danger":
2810
- return gt;
3024
+ return Ht;
2811
3025
  case "success":
2812
3026
  default:
2813
- return Te;
3027
+ return at;
2814
3028
  }
2815
- }), c = r(() => {
2816
- const u = [];
2817
- switch (n.size) {
3029
+ }), r = u(() => {
3030
+ const m = [];
3031
+ switch (t.size) {
2818
3032
  case "xs":
2819
- u.push("p-1");
3033
+ m.push("p-1");
2820
3034
  break;
2821
3035
  case "default":
2822
3036
  default:
2823
- u.push(s.value ? "p-4" : "p-2");
3037
+ m.push(l.value ? "p-4" : "p-2");
2824
3038
  break;
2825
3039
  }
2826
- switch (n.color) {
3040
+ switch (t.color) {
2827
3041
  case "success":
2828
- u.push("bg-success-lighter border-l-4 border-success");
3042
+ m.push("bg-success-lighter border-l-4 border-success");
2829
3043
  break;
2830
3044
  case "info":
2831
- u.push("bg-info-lighter border-l-4 border-info");
3045
+ m.push("bg-info-lighter border-l-4 border-info");
2832
3046
  break;
2833
3047
  case "danger":
2834
- u.push("bg-danger-lighter border-l-4 border-danger");
3048
+ m.push("bg-danger-lighter border-l-4 border-danger");
2835
3049
  break;
2836
3050
  case "warning":
2837
- u.push("bg-warning-lighter border-l-4 border-warning");
3051
+ m.push("bg-warning-lighter border-l-4 border-warning");
2838
3052
  break;
2839
3053
  }
2840
- return u.join(" ");
2841
- }), d = r(() => {
2842
- const u = [];
2843
- if (s.value)
2844
- u.push("");
3054
+ return m.join(" ");
3055
+ }), d = u(() => {
3056
+ const m = [];
3057
+ if (l.value)
3058
+ m.push("");
2845
3059
  else
2846
- switch (u.push("items-center"), n.size) {
3060
+ switch (m.push("items-center"), t.size) {
2847
3061
  case "xs":
2848
- u.push("space-x-1");
3062
+ m.push("space-x-1");
2849
3063
  break;
2850
3064
  case "default":
2851
3065
  default:
2852
- u.push("space-x-2");
3066
+ m.push("space-x-2");
2853
3067
  break;
2854
3068
  }
2855
- return u.join(" ");
2856
- }), f = r(() => {
2857
- const u = ["grow"];
2858
- switch (s.value || u.push("flex items-center space-x-2"), n.size) {
3069
+ return m.join(" ");
3070
+ }), i = u(() => {
3071
+ const m = ["grow"];
3072
+ switch (l.value || m.push("flex items-center space-x-2"), t.size) {
2859
3073
  case "xs":
2860
- u.push("ml-1");
3074
+ m.push("ml-1");
2861
3075
  break;
2862
3076
  case "default":
2863
3077
  default:
2864
- u.push("ml-3");
3078
+ m.push("ml-3");
2865
3079
  break;
2866
3080
  }
2867
- return u.join(" ");
2868
- }), x = r(() => {
2869
- const u = [];
2870
- switch (n.size) {
3081
+ return m.join(" ");
3082
+ }), f = u(() => {
3083
+ const m = [];
3084
+ switch (t.size) {
2871
3085
  case "xs":
2872
- u.push("text-xs");
3086
+ m.push("text-xs");
2873
3087
  break;
2874
3088
  case "default":
2875
3089
  default:
2876
- u.push("mt-2 text-sm");
3090
+ m.push("mt-2 text-sm");
2877
3091
  break;
2878
3092
  }
2879
- return u.join(" ");
2880
- }), p = r(() => {
2881
- var v;
2882
- const u = ["flex"];
2883
- s.value || u.push("grow justify-end");
2884
- const j = s.value && ((v = n.actions) == null ? void 0 : v.length);
2885
- switch (n.size) {
3093
+ return m.join(" ");
3094
+ }), c = u(() => {
3095
+ var w;
3096
+ const m = ["flex"];
3097
+ l.value || m.push("grow justify-end");
3098
+ const z = l.value && ((w = t.actions) == null ? void 0 : w.length);
3099
+ switch (t.size) {
2886
3100
  case "xs":
2887
- u.push("space-x-1"), j && u.push("mt-1");
3101
+ m.push("space-x-1"), z && m.push("mt-1");
2888
3102
  break;
2889
3103
  case "default":
2890
3104
  default:
2891
- u.push("space-x-2"), j && u.push("mt-4");
3105
+ m.push("space-x-2"), z && m.push("mt-4");
2892
3106
  break;
2893
3107
  }
2894
- return u.join(" ");
2895
- }), b = r(() => {
2896
- const u = [];
2897
- switch (n.color) {
3108
+ return m.join(" ");
3109
+ }), C = u(() => {
3110
+ const m = [];
3111
+ switch (t.color) {
2898
3112
  case "success":
2899
- u.push("text-success-darker");
3113
+ m.push("text-success-darker");
2900
3114
  break;
2901
3115
  case "info":
2902
- u.push("text-info-darker");
3116
+ m.push("text-info-darker");
2903
3117
  break;
2904
3118
  case "danger":
2905
- u.push("text-danger-darker");
3119
+ m.push("text-danger-darker");
2906
3120
  break;
2907
3121
  case "warning":
2908
- u.push("text-warning-darker");
3122
+ m.push("text-warning-darker");
2909
3123
  break;
2910
3124
  }
2911
- return u.join(" ");
2912
- }), y = r(() => {
2913
- const u = [];
2914
- switch (n.size) {
3125
+ return m.join(" ");
3126
+ }), b = u(() => {
3127
+ const m = [];
3128
+ switch (t.size) {
2915
3129
  case "xs":
2916
- u.push("h-4 w-4"), u.push(s.value ? "mt-0.5" : "");
3130
+ m.push("h-4 w-4"), m.push(l.value ? "mt-0.5" : "");
2917
3131
  break;
2918
3132
  case "default":
2919
3133
  default:
2920
- u.push("h-5 w-5");
3134
+ m.push("h-5 w-5");
2921
3135
  break;
2922
3136
  }
2923
- switch (n.color) {
3137
+ switch (t.color) {
2924
3138
  case "success":
2925
- u.push("text-success");
3139
+ m.push("text-success");
2926
3140
  break;
2927
3141
  case "info":
2928
- u.push("text-info");
3142
+ m.push("text-info");
2929
3143
  break;
2930
3144
  case "danger":
2931
- u.push("text-danger");
3145
+ m.push("text-danger");
2932
3146
  break;
2933
3147
  case "warning":
2934
- u.push("text-warning");
3148
+ m.push("text-warning");
2935
3149
  break;
2936
3150
  }
2937
- return u.join(" ");
2938
- }), h = r(() => {
2939
- const u = [];
2940
- switch (n.color) {
3151
+ return m.join(" ");
3152
+ }), h = u(() => {
3153
+ const m = [];
3154
+ switch (t.color) {
2941
3155
  case "success":
2942
- u.push("bg-success-lighter ring-success");
3156
+ m.push("bg-success-lighter ring-success");
2943
3157
  break;
2944
3158
  case "info":
2945
- u.push("bg-info-lighter ring-info");
3159
+ m.push("bg-info-lighter ring-info");
2946
3160
  break;
2947
3161
  case "danger":
2948
- u.push("bg-danger-lighter ring-danger");
3162
+ m.push("bg-danger-lighter ring-danger");
2949
3163
  break;
2950
3164
  case "warning":
2951
- u.push("bg-warning-lighter ring-warning");
3165
+ m.push("bg-warning-lighter ring-warning");
2952
3166
  break;
2953
3167
  }
2954
- return u.join(" ");
2955
- }), C = r(() => {
2956
- switch (n.size) {
3168
+ return m.join(" ");
3169
+ }), k = u(() => {
3170
+ switch (t.size) {
2957
3171
  case "xs":
2958
3172
  return "xs";
2959
3173
  case "default":
@@ -2961,120 +3175,891 @@ const Nn = ["disabled", "onClick"], zl = /* @__PURE__ */ A({
2961
3175
  return "sm";
2962
3176
  }
2963
3177
  });
2964
- return (u, j) => (a(), m("div", {
2965
- class: k(["rounded-md", [c.value, b.value]])
3178
+ return (m, z) => (a(), p("div", {
3179
+ class: x(["rounded-md", [r.value, C.value]])
2966
3180
  }, [
2967
- i("div", {
2968
- class: k(["flex", d.value])
3181
+ v("div", {
3182
+ class: x(["flex", d.value])
2969
3183
  }, [
2970
- i("div", ol, [
2971
- (a(), L(H(o.value), {
2972
- class: k(y.value),
3184
+ v("div", Wn, [
3185
+ (a(), P(Z(o.value), {
3186
+ class: x(b.value),
2973
3187
  "aria-hidden": "true"
2974
3188
  }, null, 8, ["class"]))
2975
3189
  ]),
2976
- i("div", {
2977
- class: k(f.value)
3190
+ v("div", {
3191
+ class: x(i.value)
2978
3192
  }, [
2979
- i("h3", {
2980
- class: k(["text-sm", [s.value ? "font-medium" : ""]])
3193
+ v("h3", {
3194
+ class: x(["text-sm", [l.value ? "font-medium" : ""]])
2981
3195
  }, [
2982
- z(u.$slots, "title", {}, () => [
3196
+ R(m.$slots, "title", {}, () => [
2983
3197
  M("Title")
2984
3198
  ])
2985
3199
  ], 2),
2986
- s.value ? (a(), m("div", {
3200
+ l.value ? (a(), p("div", {
2987
3201
  key: 0,
2988
- class: k(x.value)
3202
+ class: x(f.value)
2989
3203
  }, [
2990
- z(u.$slots, "description", {}, () => [
3204
+ R(m.$slots, "description", {}, () => [
2991
3205
  M(" Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid pariatur, ipsum similique veniam. ")
2992
3206
  ])
2993
- ], 2)) : I("", !0),
2994
- i("div", {
2995
- class: k(p.value)
3207
+ ], 2)) : S("", !0),
3208
+ v("div", {
3209
+ class: x(c.value)
2996
3210
  }, [
2997
- (a(!0), m(W, null, G(e.actions || [], (v, w) => (a(), L(re, {
2998
- key: w,
3211
+ (a(!0), p(D, null, q(e.actions || [], (w, $) => (a(), P(ne, {
3212
+ key: $,
2999
3213
  color: e.color,
3000
- size: C.value,
3001
- to: v.url,
3002
- external: v.externalUrl || !1,
3003
- onClick: (S) => v.onClick || l(Ye)
3214
+ size: k.value,
3215
+ to: w.url,
3216
+ external: w.externalUrl || !1,
3217
+ onClick: (j) => w.onClick || n(St)
3004
3218
  }, {
3005
3219
  default: _(() => [
3006
- M(B(v.title), 1)
3220
+ M(L(w.title), 1)
3007
3221
  ]),
3008
3222
  _: 2
3009
3223
  }, 1032, ["color", "size", "to", "external", "onClick"]))), 128))
3010
3224
  ], 2)
3011
3225
  ], 2),
3012
- e.withDismiss ? (a(), m("div", {
3226
+ e.withDismiss ? (a(), p("div", {
3013
3227
  key: 0,
3014
- class: k(["flex", [s.value ? "items-start" : "items-center"]])
3228
+ class: x(["flex", [l.value ? "items-start" : "items-center"]])
3015
3229
  }, [
3016
- i("button", {
3230
+ v("button", {
3017
3231
  type: "button",
3018
- class: k(["inline-flex rounded-md focus:outline-none focus:ring-2", h.value]),
3019
- onClick: j[0] || (j[0] = (v) => u.$emit("dismiss"))
3232
+ class: x(["inline-flex rounded-md focus:outline-none focus:ring-2", h.value]),
3233
+ onClick: z[0] || (z[0] = (w) => m.$emit("dismiss"))
3020
3234
  }, [
3021
- rl,
3022
- P(l(ue), {
3235
+ qn,
3236
+ V(n(pe), {
3023
3237
  class: "h-5 w-5",
3024
3238
  "aria-hidden": "true"
3025
3239
  })
3026
3240
  ], 2)
3027
- ], 2)) : I("", !0)
3241
+ ], 2)) : S("", !0)
3028
3242
  ], 2)
3029
3243
  ], 2));
3030
3244
  }
3031
3245
  });
3032
- function El(e) {
3033
- var u, j;
3034
- const { get: n, initialState: t, readOptions: s, set: o, asyncRead: c = !0, debugging: d } = e, f = d == null ? void 0 : d.log, x = () => (new Error("Trace:").stack || "").substring(7), p = ((j = (u = e.debugging) == null ? void 0 : u.log) == null ? void 0 : j.logger) || console.debug, b = f && !f.writesOnly ? () => {
3035
- const v = n();
3036
- return p(`debugging: '${f.name}' read`, v, x()), v;
3037
- } : n, y = f && !f.readsOnly ? (v) => (p(`debugging: '${f.name}' written to`, v, x()), o(v)) : o, h = c ? $t(b, t, s) : r(b), C = r(() => h.value);
3038
- return C.update = y, C;
3246
+ function to(e) {
3247
+ var m, z;
3248
+ const { get: t, initialState: s, readOptions: l, set: o, asyncRead: r = !0, debugging: d } = e, i = d == null ? void 0 : d.log, f = () => (new Error("Trace:").stack || "").substring(7), c = ((z = (m = e.debugging) == null ? void 0 : m.log) == null ? void 0 : z.logger) || console.debug, C = i && !i.writesOnly ? () => {
3249
+ const w = t();
3250
+ return c(`debugging: '${i.name}' read`, w, f()), w;
3251
+ } : t, b = i && !i.readsOnly ? (w) => (c(`debugging: '${i.name}' written to`, w, f()), o(w)) : o, h = r ? es(C, s, l) : u(C), k = u(() => h.value);
3252
+ return k.update = b, k;
3039
3253
  }
3254
+ const Hn = /* @__PURE__ */ A({
3255
+ __name: "ContextManager",
3256
+ setup(e, { expose: t }) {
3257
+ const l = Ct().provides, o = Object.getOwnPropertySymbols(l).find(
3258
+ (h) => h.description === "ComboboxContext"
3259
+ );
3260
+ o || console.error("FormTagsContextManager ctx key not found!");
3261
+ const r = $t(o || "__undefined");
3262
+ return r || console.error("FormTagsContextManager ctx not found!"), t({ goUp: () => {
3263
+ r == null || r.goToOption(1);
3264
+ }, goDown: () => {
3265
+ r == null || r.goToOption(2);
3266
+ }, open: () => {
3267
+ r && r.openCombobox();
3268
+ }, close: () => {
3269
+ r == null || r.closeCombobox();
3270
+ }, selectActive: () => {
3271
+ r == null || r.selectActiveOption();
3272
+ }, isOpen: () => (r == null ? void 0 : r.comboboxState.value) === 0 }), (h, k) => R(h.$slots, "default");
3273
+ }
3274
+ }), Kn = ["for"], Gn = ["disabled", "placeholder", "onKeydown"], Xn = /* @__PURE__ */ v("span", { class: "text-xs sr-only" }, "Clear input", -1), Zn = { key: 1 }, Qn = /* @__PURE__ */ v("div", { class: "text-foreground-2 text-center" }, [
3275
+ /* @__PURE__ */ M(" Press "),
3276
+ /* @__PURE__ */ v("strong", null, "Enter"),
3277
+ /* @__PURE__ */ M(" to create tag ⚡ ")
3278
+ ], -1), Nn = [
3279
+ Qn
3280
+ ], Jn = ["id"], so = /* @__PURE__ */ A({
3281
+ __name: "Tags",
3282
+ props: {
3283
+ name: null,
3284
+ help: null,
3285
+ label: null,
3286
+ showLabel: { type: Boolean },
3287
+ rules: null,
3288
+ validateOnMount: { type: Boolean },
3289
+ validateOnValueUpdate: { type: Boolean },
3290
+ autoFocus: { type: Boolean },
3291
+ showClear: { type: Boolean },
3292
+ showRequired: { type: Boolean },
3293
+ color: { default: "page" },
3294
+ wrapperClasses: null,
3295
+ size: { default: "base" },
3296
+ placeholder: null,
3297
+ disabled: { type: Boolean },
3298
+ useLabelInErrors: { type: Boolean, default: !0 },
3299
+ getAutocompleteItems: { type: Function },
3300
+ modelValue: null
3301
+ },
3302
+ emits: ["update:modelValue", "change", "clear"],
3303
+ setup(e, { expose: t, emit: s }) {
3304
+ const l = e, o = (y) => y.type === "input", r = O(null), { focused: d } = ts(r), i = O(
3305
+ null
3306
+ ), {
3307
+ coreInputClasses: f,
3308
+ coreClasses: c,
3309
+ labelClasses: C,
3310
+ title: b,
3311
+ helpTip: h,
3312
+ helpTipId: k,
3313
+ hideHelpTip: m,
3314
+ helpTipClasses: z,
3315
+ errorMessage: w,
3316
+ clear: $,
3317
+ value: j
3318
+ } = We({
3319
+ props: N(l),
3320
+ emit: s,
3321
+ inputEl: r
3322
+ // options: {
3323
+ // customClear: () => (selectedItems.value = [])
3324
+ // }
3325
+ }), E = O([]), g = O(!1), T = O(!1), U = O(""), F = u({
3326
+ get: () => j.value || [],
3327
+ set: (y) => {
3328
+ j.value = Bt(y).filter((B) => !!B.length);
3329
+ }
3330
+ }), ae = u(() => {
3331
+ switch (l.size) {
3332
+ case "sm":
3333
+ return "h-6";
3334
+ case "lg":
3335
+ return "h-10";
3336
+ case "xl":
3337
+ return "h-14";
3338
+ case "base":
3339
+ default:
3340
+ return "h-8";
3341
+ }
3342
+ }), G = u(() => l.showClear && !!F.value.length), Y = u(() => {
3343
+ const y = [
3344
+ c.value,
3345
+ l.disabled ? "cursor-not-allowed !bg-foundation-disabled !text-disabled-muted" : ""
3346
+ ];
3347
+ return G.value && (w.value || l.showRequired) ? y.push("pr-14") : (G.value || w.value || l.showRequired) && y.push("pr-8"), w.value ? (y.push("border-2 border-danger text-danger-darker"), d.value && y.push("ring-1 ring-danger")) : (y.push("border-2 border-transparent"), d.value && y.push("ring-2 ring-outline-2")), y.join(" ");
3348
+ }), K = (y) => {
3349
+ if (l.disabled)
3350
+ return;
3351
+ const B = F.value.indexOf(y);
3352
+ if (B !== -1) {
3353
+ const I = F.value.slice();
3354
+ I.splice(B, 1), F.value = I;
3355
+ }
3356
+ }, xe = () => {
3357
+ var y;
3358
+ (y = r.value) == null || y.blur(), T.value = !1;
3359
+ }, Be = (y) => {
3360
+ if (y.key !== "Backspace" || U.value.length)
3361
+ return;
3362
+ const B = F.value.slice();
3363
+ B.pop(), F.value = B, T.value = !1;
3364
+ }, Ve = () => {
3365
+ var y, B, I;
3366
+ (y = i.value) != null && y.isOpen() ? (B = i.value) == null || B.goUp() : (I = i.value) == null || I.open();
3367
+ }, ke = () => {
3368
+ var y, B, I;
3369
+ (y = i.value) != null && y.isOpen() ? (B = i.value) == null || B.goDown() : (I = i.value) == null || I.open();
3370
+ }, ee = async () => {
3371
+ l.getAutocompleteItems && (g.value = !0, E.value = await Promise.resolve(
3372
+ l.getAutocompleteItems(U.value)
3373
+ ), g.value = !1);
3374
+ }, he = Fe(ee, 1e3), Le = () => {
3375
+ g.value = !0, he();
3376
+ }, me = (y, B) => {
3377
+ var W, H;
3378
+ if (o(y) ? y.data === " " || y.data === "," || y.data === ";" : !0) {
3379
+ let oe = !1;
3380
+ if ((W = i.value) != null && W.isOpen() && E.value.length && !B)
3381
+ (H = i.value) == null || H.selectActive(), oe = !0;
3382
+ else {
3383
+ const re = U.value.trim().substring(0, U.value.length - (o(y) ? 1 : 0)), we = F.value.includes(re);
3384
+ re.length > 0 && !we && (F.value = [...F.value, re], oe = !0);
3385
+ }
3386
+ oe && (U.value = "", T.value = !1);
3387
+ } else
3388
+ T.value = !!U.value.length;
3389
+ };
3390
+ return te(T, (y, B) => {
3391
+ var I, W;
3392
+ y && !B ? l.getAutocompleteItems && ((I = i.value) == null || I.open()) : !y && B && ((W = i.value) == null || W.close());
3393
+ }), te(U, () => {
3394
+ Le();
3395
+ }), se(() => {
3396
+ ee();
3397
+ }), t({ resolveAutocompleteItems: ee }), (y, B) => (a(), P(n(bs), {
3398
+ modelValue: F.value,
3399
+ "onUpdate:modelValue": B[5] || (B[5] = (I) => F.value = I),
3400
+ as: "div",
3401
+ multiple: "",
3402
+ clearable: "",
3403
+ class: x([e.wrapperClasses])
3404
+ }, {
3405
+ default: _(() => [
3406
+ V(Hn, {
3407
+ ref_key: "ctxManager",
3408
+ ref: i
3409
+ }, {
3410
+ default: _(() => [
3411
+ v("label", {
3412
+ for: e.name,
3413
+ class: x(n(C))
3414
+ }, [
3415
+ v("span", null, L(n(b)), 1)
3416
+ ], 10, Kn),
3417
+ v("div", {
3418
+ class: x(["relative flex flex-wrap items-center space-x-1 px-2 py-1", Y.value])
3419
+ }, [
3420
+ (a(!0), p(D, null, q(F.value, (I) => (a(), P(De, {
3421
+ key: I,
3422
+ "icon-left": e.disabled ? void 0 : n(pe),
3423
+ "clickable-icon": "",
3424
+ size: "lg",
3425
+ onClickIcon: () => K(I)
3426
+ }, {
3427
+ default: _(() => [
3428
+ M(L(I), 1)
3429
+ ]),
3430
+ _: 2
3431
+ }, 1032, ["icon-left", "onClickIcon"]))), 128)),
3432
+ de(v("input", {
3433
+ ref_key: "inputEl",
3434
+ ref: r,
3435
+ "onUpdate:modelValue": B[0] || (B[0] = (I) => U.value = I),
3436
+ disabled: e.disabled,
3437
+ class: x(["bg-transparent grow shrink border-0 focus:ring-0 p-0", [n(f), ae.value]]),
3438
+ style: { "flex-basis": "70px", "min-width": "70px" },
3439
+ placeholder: F.value.length ? void 0 : e.placeholder,
3440
+ onInput: me,
3441
+ onKeydown: [
3442
+ ie(xe, ["escape"]),
3443
+ B[1] || (B[1] = ie(le((I) => me(I, !0), ["stop", "prevent"]), ["enter"])),
3444
+ ie(me, ["tab"]),
3445
+ ie(Be, ["backspace"]),
3446
+ ie(Ve, ["arrow-up"]),
3447
+ ie(ke, ["arrow-down"])
3448
+ ],
3449
+ onBlur: B[2] || (B[2] = (I) => T.value = !1)
3450
+ }, null, 42, Gn), [
3451
+ [Me, U.value]
3452
+ ]),
3453
+ G.value ? (a(), p("a", {
3454
+ key: 0,
3455
+ title: "Clear input",
3456
+ class: "absolute top-2 right-0 flex items-center pr-2 cursor-pointer",
3457
+ onClick: B[3] || (B[3] = //@ts-ignore
3458
+ (...I) => n($) && n($)(...I)),
3459
+ onKeydown: B[4] || (B[4] = //@ts-ignore
3460
+ (...I) => n($) && n($)(...I))
3461
+ }, [
3462
+ Xn,
3463
+ V(n(pe), {
3464
+ class: "h-5 w-5 text-foreground",
3465
+ "aria-hidden": "true"
3466
+ })
3467
+ ], 32)) : S("", !0),
3468
+ n(w) ? (a(), p("div", {
3469
+ key: 1,
3470
+ class: x([
3471
+ "pointer-events-none absolute top-[10px] right-0 flex items-center",
3472
+ G.value ? "pr-8" : "pr-2"
3473
+ ])
3474
+ }, [
3475
+ V(n(Ie), {
3476
+ class: "h-4 w-4 text-danger",
3477
+ "aria-hidden": "true"
3478
+ })
3479
+ ], 2)) : S("", !0),
3480
+ e.showRequired && !n(w) ? (a(), p("div", {
3481
+ key: 2,
3482
+ class: x(["pointer-events-none absolute top-[2px] text-4xl right-0 flex items-center text-danger opacity-50", G.value ? "pr-8" : "pr-2"])
3483
+ }, " * ", 2)) : S("", !0)
3484
+ ], 2),
3485
+ V(n(ot), {
3486
+ leave: "transition ease-in duration-100",
3487
+ "leave-from": "opacity-100",
3488
+ "leave-to": "opacity-0",
3489
+ class: "relative px-0.5"
3490
+ }, {
3491
+ default: _(() => [
3492
+ V(n(ys), { 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" }, {
3493
+ default: _(() => [
3494
+ g.value ? (a(), p("div", {
3495
+ key: 0,
3496
+ class: x(["px-1", E.value.length ? "mb-1" : ""])
3497
+ }, [
3498
+ V(He, { loading: !0 })
3499
+ ], 2)) : S("", !0),
3500
+ !E.value.length && !g.value ? (a(), p("div", Zn, Nn)) : S("", !0),
3501
+ E.value.length ? (a(!0), p(D, { key: 2 }, q(E.value, (I) => (a(), P(n(xs), {
3502
+ key: I,
3503
+ as: "template",
3504
+ value: I
3505
+ }, {
3506
+ default: _(({ selected: W, active: H }) => [
3507
+ v("li", {
3508
+ class: x(["relative cursor-pointer select-none py-1.5 pl-3", {
3509
+ "text-primary": H,
3510
+ "text-foreground": !H
3511
+ }])
3512
+ }, [
3513
+ v("span", {
3514
+ class: x(["block truncate", { "font-medium": W, "font-normal": !W }])
3515
+ }, L(I), 3),
3516
+ W ? (a(), p("span", {
3517
+ key: 0,
3518
+ class: x(["absolute inset-y-0 right-0 flex items-center pr-4", { "text-primary": H, "text-foreground": !H }])
3519
+ }, [
3520
+ V(n(nt), {
3521
+ class: "h-5 w-5",
3522
+ "aria-hidden": "true"
3523
+ })
3524
+ ], 2)) : S("", !0)
3525
+ ], 2)
3526
+ ]),
3527
+ _: 2
3528
+ }, 1032, ["value"]))), 128)) : S("", !0)
3529
+ ]),
3530
+ _: 1
3531
+ })
3532
+ ]),
3533
+ _: 1
3534
+ }),
3535
+ n(k) && !n(m) ? (a(), p("p", {
3536
+ key: 0,
3537
+ id: n(k),
3538
+ class: x(n(z))
3539
+ }, L(n(h)), 11, Jn)) : S("", !0)
3540
+ ]),
3541
+ _: 1
3542
+ }, 512)
3543
+ ]),
3544
+ _: 1
3545
+ }, 8, ["modelValue", "class"]));
3546
+ }
3547
+ });
3548
+ function ht(e) {
3549
+ const { props: t } = e, s = u(() => {
3550
+ var f;
3551
+ switch ((f = t.size) == null ? void 0 : f.value) {
3552
+ case "xs":
3553
+ return "h-5";
3554
+ case "sm":
3555
+ return "h-6";
3556
+ case "lg":
3557
+ return "h-10";
3558
+ case "xl":
3559
+ return "h-14";
3560
+ case "editable":
3561
+ return "h-60";
3562
+ case "base":
3563
+ default:
3564
+ return "h-8";
3565
+ }
3566
+ }), l = u(() => {
3567
+ var f;
3568
+ switch ((f = t.size) == null ? void 0 : f.value) {
3569
+ case "xs":
3570
+ return "w-5";
3571
+ case "sm":
3572
+ return "w-6";
3573
+ case "lg":
3574
+ return "w-10";
3575
+ case "xl":
3576
+ return "w-14";
3577
+ case "editable":
3578
+ return "w-60";
3579
+ case "base":
3580
+ default:
3581
+ return "w-8";
3582
+ }
3583
+ }), o = u(() => {
3584
+ var f;
3585
+ switch ((f = t.size) == null ? void 0 : f.value) {
3586
+ case "xs":
3587
+ return "text-tiny";
3588
+ case "sm":
3589
+ return "text-xs";
3590
+ case "lg":
3591
+ return "text-md";
3592
+ case "xl":
3593
+ return "text-2xl";
3594
+ case "editable":
3595
+ return "h1";
3596
+ case "base":
3597
+ default:
3598
+ return "text-sm";
3599
+ }
3600
+ }), r = u(() => {
3601
+ var f;
3602
+ switch ((f = t.size) == null ? void 0 : f.value) {
3603
+ case "xs":
3604
+ return "w-3 h-3";
3605
+ case "sm":
3606
+ return "w-3 h-3";
3607
+ case "lg":
3608
+ return "w-5 h-5";
3609
+ case "xl":
3610
+ return "w-8 h-8";
3611
+ case "editable":
3612
+ return "w-20 h-20";
3613
+ case "base":
3614
+ default:
3615
+ return "w-4 h-4";
3616
+ }
3617
+ }), d = u(
3618
+ () => `${l.value} ${s.value} ${o.value}`
3619
+ );
3620
+ return { heightClasses: s, widthClasses: l, sizeClasses: d, iconClasses: r };
3621
+ }
3622
+ const Yn = {
3623
+ key: 1,
3624
+ class: "flex h-full w-full select-none items-center justify-center"
3625
+ }, ea = { key: 2 }, Oe = /* @__PURE__ */ A({
3626
+ __name: "Avatar",
3627
+ props: {
3628
+ user: { default: null },
3629
+ size: { default: "base" },
3630
+ hoverEffect: { type: Boolean, default: !1 },
3631
+ active: { type: Boolean },
3632
+ noBorder: { type: Boolean },
3633
+ noBg: { type: Boolean }
3634
+ },
3635
+ setup(e) {
3636
+ const t = e, { sizeClasses: s, iconClasses: l } = ht({ props: N(t) }), o = u(() => {
3637
+ var h, k, m;
3638
+ if (!((h = t.user) != null && h.name.length))
3639
+ return;
3640
+ const c = t.user.name.split(" "), C = ((k = c[0]) == null ? void 0 : k[0]) || "", b = ((m = c[1]) == null ? void 0 : m[0]) || "";
3641
+ return t.size === "sm" || t.size === "xs" ? C : C + b;
3642
+ }), r = u(() => t.noBorder ? "" : "border-2 border-foundation"), d = u(() => t.noBg ? "" : "bg-primary"), i = u(() => t.hoverEffect ? "hover:border-primary focus:border-primary active:scale-95" : ""), f = u(() => t.active ? "border-primary" : "");
3643
+ return (c, C) => (a(), p("div", {
3644
+ class: x([
3645
+ "text-foreground-on-primary flex shrink-0 items-center justify-center overflow-hidden rounded-full font-semibold uppercase transition",
3646
+ n(s),
3647
+ d.value,
3648
+ r.value,
3649
+ i.value,
3650
+ f.value
3651
+ ])
3652
+ }, [
3653
+ R(c.$slots, "default", {}, () => {
3654
+ var b;
3655
+ return [
3656
+ (b = e.user) != null && b.avatar ? (a(), p("div", {
3657
+ key: 0,
3658
+ class: "h-full w-full bg-cover bg-center bg-no-repeat",
3659
+ style: fe({ backgroundImage: `url('${e.user.avatar}')` })
3660
+ }, null, 4)) : o.value ? (a(), p("div", Yn, L(o.value), 1)) : (a(), p("div", ea, [
3661
+ V(n(At), {
3662
+ class: x(n(l))
3663
+ }, null, 8, ["class"])
3664
+ ]))
3665
+ ];
3666
+ }),
3667
+ R(c.$slots, "absolute-anchor")
3668
+ ], 2));
3669
+ }
3670
+ }), lo = /* @__PURE__ */ A({
3671
+ __name: "AvatarGroup",
3672
+ props: {
3673
+ users: { default: () => [] },
3674
+ overlap: { type: Boolean, default: !0 },
3675
+ size: { default: "base" },
3676
+ maxCount: { default: void 0 }
3677
+ },
3678
+ setup(e) {
3679
+ const t = e, s = O(null), l = O(null), { hiddenItemCount: o } = dt({
3680
+ elementToWatchForChanges: s,
3681
+ itemContainer: l,
3682
+ trackResize: !0,
3683
+ trackMutations: !0
3684
+ }), { heightClasses: r } = ht({ props: N(t) }), d = u(() => t.maxCount ? Math.max(t.users.length - t.maxCount, 0) : 0), i = u(
3685
+ () => o.value + d.value
3686
+ ), f = u(
3687
+ () => t.maxCount ? t.users.slice(0, t.maxCount) : t.users
3688
+ );
3689
+ return (c, C) => (a(), p("div", {
3690
+ ref_key: "elementToWatchForChanges",
3691
+ ref: s,
3692
+ class: x(`flex ${e.overlap ? "-space-x-2" : ""}`)
3693
+ }, [
3694
+ v("div", {
3695
+ ref_key: "itemContainer",
3696
+ ref: l,
3697
+ class: x(`flex flex-wrap overflow-hidden ${e.overlap ? "-space-x-2 " : ""} ${n(r)}`)
3698
+ }, [
3699
+ (a(!0), p(D, null, q(f.value, (b, h) => (a(), P(Oe, {
3700
+ key: b.id || h,
3701
+ user: b,
3702
+ size: e.size
3703
+ }, null, 8, ["user", "size"]))), 128))
3704
+ ], 2),
3705
+ i.value ? (a(), P(Oe, {
3706
+ key: 0,
3707
+ size: e.size
3708
+ }, {
3709
+ default: _(() => [
3710
+ M(" +" + L(i.value), 1)
3711
+ ]),
3712
+ _: 1
3713
+ }, 8, ["size"])) : S("", !0)
3714
+ ], 2));
3715
+ }
3716
+ }), ta = /* @__PURE__ */ A({
3717
+ __name: "Icon",
3718
+ props: {
3719
+ loading: { type: Boolean, default: !0 },
3720
+ size: { default: "base" }
3721
+ },
3722
+ setup(e) {
3723
+ const t = e, s = u(() => {
3724
+ const l = ["text-primary transition-all animate-spin"];
3725
+ switch (l.push(t.loading ? "opacity-100" : "opacity-0"), t.size) {
3726
+ case "base":
3727
+ l.push("h-8 w-8");
3728
+ break;
3729
+ case "sm":
3730
+ l.push("h-5 w-5");
3731
+ break;
3732
+ case "lg":
3733
+ l.push("h-12 w-12");
3734
+ break;
3735
+ }
3736
+ return l.join(" ");
3737
+ });
3738
+ return (l, o) => (a(), P(n(tt), {
3739
+ class: x(s.value)
3740
+ }, null, 8, ["class"]));
3741
+ }
3742
+ }), sa = { class: "flex flex-col items-center space-y-2" }, la = {
3743
+ key: 1,
3744
+ class: "relative group"
3745
+ }, na = { class: "opacity-0 transition-all absolute group-hover:opacity-100 inset-0 flex items-end justify-center bottom-4" }, aa = {
3746
+ key: 2,
3747
+ class: "w-full text-center text-danger text-sm"
3748
+ }, no = /* @__PURE__ */ A({
3749
+ __name: "AvatarEditable",
3750
+ props: Ge({
3751
+ modelValue: null,
3752
+ placeholder: null,
3753
+ name: null,
3754
+ rules: null,
3755
+ validateOnMount: { type: Boolean },
3756
+ validateOnValueUpdate: { type: Boolean },
3757
+ disabled: { type: Boolean }
3758
+ }, {
3759
+ editMode: { type: Boolean, local: !0 }
3760
+ }),
3761
+ emits: Ge(["save", "update:modelValue"], ["update:editMode"]),
3762
+ setup(e, { expose: t, emit: s }) {
3763
+ const l = e, o = It({
3764
+ loader: () => import("./AvatarEditor-594c4e0d.js"),
3765
+ loadingComponent: ta,
3766
+ delay: 100
3767
+ }), { value: r, errorMessage: d } = Se(l.name, l.rules, {
3768
+ validateOnMount: l.validateOnMount,
3769
+ validateOnValueUpdate: l.validateOnValueUpdate,
3770
+ initialValue: l.modelValue || void 0
3771
+ }), i = Je(e, "editMode", { local: !0 }), f = u(
3772
+ () => ({
3773
+ avatar: r.value,
3774
+ name: l.placeholder
3775
+ })
3776
+ ), c = (h) => {
3777
+ r.value = h, s("save", h);
3778
+ };
3779
+ return t({ open: () => i.value = !0, close: () => i.value = !1 }), (h, k) => (a(), p("div", sa, [
3780
+ i.value ? (a(), P(n(o), {
3781
+ key: 0,
3782
+ user: f.value,
3783
+ disabled: e.disabled,
3784
+ onCancel: k[0] || (k[0] = (m) => i.value = !1),
3785
+ onSave: c
3786
+ }, null, 8, ["user", "disabled"])) : (a(), p("div", la, [
3787
+ V(Oe, {
3788
+ user: f.value,
3789
+ size: "editable"
3790
+ }, null, 8, ["user"]),
3791
+ v("div", na, [
3792
+ V(ne, {
3793
+ disabled: e.disabled,
3794
+ color: "secondary",
3795
+ onClick: k[1] || (k[1] = (m) => i.value = !0)
3796
+ }, {
3797
+ default: _(() => [
3798
+ M(" Change ")
3799
+ ]),
3800
+ _: 1
3801
+ }, 8, ["disabled"])
3802
+ ])
3803
+ ])),
3804
+ n(d) ? (a(), p("div", aa, L(n(d)), 1)) : S("", !0)
3805
+ ]));
3806
+ }
3807
+ });
3808
+ class J extends Error {
3809
+ constructor(t, s) {
3810
+ t || (t = new.target.defaultMessage), super(t, s);
3811
+ }
3812
+ }
3813
+ /**
3814
+ * Default message if none is passed
3815
+ */
3816
+ Q(J, "defaultMessage", "Unexpected error occurred");
3817
+ class oa extends J {
3818
+ }
3819
+ Q(oa, "defaultMessage", "An unexpected logic error occurred!");
3820
+ class ra extends J {
3821
+ }
3822
+ Q(ra, "defaultMessage", "Attempting to access an uninitialized resource");
3823
+ class ia extends J {
3824
+ }
3825
+ Q(ia, "defaultMessage", "getCurrentInstance() returned null. Method must be called at the top of a setup function");
3826
+ class ua extends J {
3827
+ }
3828
+ Q(ua, "defaultMessage", "Operation not supported in current (server or client) environment");
3829
+ var Ke = /* @__PURE__ */ ((e) => (e.AnyAudio = "audio/*", e.AnyVideo = "video/*", e.AnyImage = "image/*", e))(Ke || {});
3830
+ function ca(e, t) {
3831
+ const s = Vt(
3832
+ Object.values(Ke),
3833
+ t
3834
+ );
3835
+ for (const r of s)
3836
+ switch (r) {
3837
+ case "audio/*":
3838
+ if (e.type.startsWith("audio"))
3839
+ return !0;
3840
+ break;
3841
+ case "image/*":
3842
+ if (e.type.startsWith("image"))
3843
+ return !0;
3844
+ break;
3845
+ case "video/*":
3846
+ if (e.type.startsWith("video"))
3847
+ return !0;
3848
+ break;
3849
+ }
3850
+ const l = Lt(t, s), o = da(e.name);
3851
+ if (!o)
3852
+ return new mt();
3853
+ for (const r of l)
3854
+ if (r.toLowerCase() === o.toLowerCase())
3855
+ return !0;
3856
+ return new vt();
3857
+ }
3858
+ function da(e) {
3859
+ const t = e.split(".").pop() || null;
3860
+ return t ? `.${t}` : null;
3861
+ }
3862
+ function fa(e) {
3863
+ return e.startsWith(".") || Object.values(Ke).includes(e);
3864
+ }
3865
+ function Ne(e) {
3866
+ const t = (r) => parseFloat(r.toFixed(2)).toString();
3867
+ if (e < 1024)
3868
+ return `${e}bytes`;
3869
+ const s = e / 1024;
3870
+ if (s < 1024)
3871
+ return `${t(s)}KB`;
3872
+ const l = s / 1024;
3873
+ if (l < 1024)
3874
+ return `${t(l)}MB`;
3875
+ const o = l / 1024;
3876
+ return `${t(o)}GB`;
3877
+ }
3878
+ function pa(e) {
3879
+ const t = {
3880
+ name: e.name,
3881
+ lastModified: e.lastModified,
3882
+ size: e.size,
3883
+ type: e.type
3884
+ };
3885
+ return Qt(JSON.stringify(t));
3886
+ }
3887
+ class mt extends J {
3888
+ }
3889
+ Q(mt, "defaultMessage", "The selected file has a missing extension");
3890
+ class vt extends J {
3891
+ }
3892
+ Q(vt, "defaultMessage", "The selected file type is forbidden");
3893
+ var ha = /* @__PURE__ */ ((e) => (e[e.Success = 1] = "Success", e[e.Failure = 2] = "Failure", e))(ha || {});
3894
+ function ma(e) {
3895
+ if (!e)
3896
+ return;
3897
+ const t = e.split(",").map((s) => fa(s) ? s : null).filter((s) => s !== null);
3898
+ return t.length ? t : void 0;
3899
+ }
3900
+ function va(e) {
3901
+ const { disabled: t, accept: s, multiple: l, sizeLimit: o, countLimit: r } = e, d = u(() => ma(n(s))), i = (f) => {
3902
+ const c = [], C = d.value;
3903
+ for (const b of f) {
3904
+ const h = pa(b), k = n(l) ? n(r) : 1;
3905
+ if (!c.find((m) => m.id === h)) {
3906
+ if (k && c.length >= k)
3907
+ break;
3908
+ if (C) {
3909
+ const m = ca(b, C);
3910
+ if (m instanceof Error) {
3911
+ c.push({
3912
+ file: b,
3913
+ id: h,
3914
+ error: m
3915
+ });
3916
+ continue;
3917
+ }
3918
+ }
3919
+ if (b.size > n(o)) {
3920
+ c.push({
3921
+ file: b,
3922
+ id: h,
3923
+ error: new gt(
3924
+ `The selected file's size (${Ne(
3925
+ b.size
3926
+ )}) is too big (over ${Ne(n(o))})`
3927
+ )
3928
+ });
3929
+ continue;
3930
+ }
3931
+ c.push({ file: b, id: h, error: null });
3932
+ }
3933
+ }
3934
+ return c;
3935
+ };
3936
+ return {
3937
+ /**
3938
+ * Validate incoming files and build UploadableFileItem structs out of them
3939
+ */
3940
+ buildUploadableFiles: (f) => {
3941
+ if (!n(t || !1))
3942
+ return i(f);
3943
+ }
3944
+ };
3945
+ }
3946
+ class gt extends J {
3947
+ }
3948
+ Q(gt, "defaultMessage", "The selected file's size is too large");
3949
+ const ga = ["accept", "multiple"], ao = /* @__PURE__ */ A({
3950
+ __name: "Zone",
3951
+ props: {
3952
+ accept: null,
3953
+ multiple: { type: Boolean },
3954
+ sizeLimit: { default: 1024 * 1024 * 100 },
3955
+ countLimit: null,
3956
+ disabled: { type: Boolean }
3957
+ },
3958
+ emits: ["files-selected"],
3959
+ setup(e, { expose: t, emit: s }) {
3960
+ const l = e, o = O(null), r = O(null), { buildUploadableFiles: d } = va({
3961
+ sizeLimit: u(() => l.sizeLimit),
3962
+ countLimit: u(() => l.countLimit),
3963
+ accept: u(() => l.accept),
3964
+ multiple: u(() => l.multiple),
3965
+ disabled: u(() => l.disabled)
3966
+ }), i = (b) => {
3967
+ const h = d(b);
3968
+ h != null && h.length && s("files-selected", { files: h });
3969
+ }, { isOverDropZone: f } = ss(o, (b) => {
3970
+ b != null && b.length && i(b);
3971
+ }), c = () => {
3972
+ const b = r.value;
3973
+ if (!b)
3974
+ return;
3975
+ const h = [...b.files || []];
3976
+ b.value = "", h.length && i(h);
3977
+ }, C = () => {
3978
+ var b;
3979
+ (b = r.value) == null || b.click();
3980
+ };
3981
+ return t({
3982
+ triggerPicker: C
3983
+ }), (b, h) => (a(), p("div", {
3984
+ ref_key: "fileUploadZone",
3985
+ ref: o,
3986
+ class: "file-upload-zone"
3987
+ }, [
3988
+ R(b.$slots, "default", {
3989
+ isDraggingFiles: n(f),
3990
+ openFilePicker: C,
3991
+ activatorOn: { click: C }
3992
+ }),
3993
+ v("input", {
3994
+ ref_key: "fileInput",
3995
+ ref: r,
3996
+ type: "file",
3997
+ class: "hidden",
3998
+ accept: e.accept,
3999
+ multiple: e.multiple,
4000
+ onClick: h[0] || (h[0] = le(() => {
4001
+ }, ["stop"])),
4002
+ onChange: c
4003
+ }, null, 40, ga)
4004
+ ], 512));
4005
+ }
4006
+ });
3040
4007
  export {
3041
- Fl as CommonAlert,
3042
- ns as CommonBadge,
3043
- Ue as CommonLoadingBar,
3044
- Cl as CommonStepsBullet,
3045
- kl as CommonStepsNumber,
3046
- Ut as CommonTextLink,
3047
- re as FormButton,
3048
- wl as FormCardButton,
3049
- $l as FormCheckbox,
3050
- Pn as FormSelectBase,
3051
- _l as FormSelectSourceApps,
3052
- Sl as FormTextArea,
3053
- Il as FormTextInput,
3054
- xl as GlobalToastRenderer,
3055
- J as GridListToggleValue,
3056
- me as HorizontalDirection,
3057
- Tl as InfiniteLoading,
3058
- Vl as LayoutDialog,
3059
- Ol as LayoutDisclosure,
3060
- Al as LayoutGridListToggle,
3061
- zl as LayoutMenu,
3062
- Rl as LayoutPanel,
3063
- Dl as LayoutTabs,
3064
- se as ModifierKeys,
3065
- Ln as SourceAppBadge,
3066
- te as TailwindBreakpoints,
3067
- Gn as ThrottleOrDebounce,
3068
- ee as ToastNotificationType,
3069
- Bl as ValidationHelpers,
3070
- he as clientOs,
3071
- Pl as getKeyboardShortcutTitle,
3072
- Ll as onKeyboardShortcut,
3073
- jl as useFormCheckboxModel,
3074
- cn as useFormSelectChildInternals,
3075
- Ml as useOnBeforeWindowUnload,
3076
- Xn as useResponsiveHorizontalDirectionCalculation,
3077
- Kn as useWindowResizeHandler,
3078
- un as useWrappingContainerHiddenCount,
3079
- El as writableAsyncComputed
4008
+ J as BaseError,
4009
+ ha as BlobUploadStatus,
4010
+ eo as CommonAlert,
4011
+ De as CommonBadge,
4012
+ He as CommonLoadingBar,
4013
+ ta as CommonLoadingIcon,
4014
+ ja as CommonStepsBullet,
4015
+ Pa as CommonStepsNumber,
4016
+ $s as CommonTextLink,
4017
+ ia as ComposableInvokedOutOfScopeError,
4018
+ ne as FormButton,
4019
+ Oa as FormCardButton,
4020
+ Aa as FormCheckbox,
4021
+ ao as FormFileUploadZone,
4022
+ Ea as FormSelectBadges,
4023
+ pt as FormSelectBase,
4024
+ Ra as FormSelectSourceApps,
4025
+ Ua as FormSwitch,
4026
+ so as FormTags,
4027
+ Ma as FormTextArea,
4028
+ Ta as FormTextInput,
4029
+ za as GlobalToastRenderer,
4030
+ ue as GridListToggleValue,
4031
+ je as HorizontalDirection,
4032
+ Ja as InfiniteLoading,
4033
+ Ha as LayoutDialog,
4034
+ Ka as LayoutDisclosure,
4035
+ Ga as LayoutGridListToggle,
4036
+ Za as LayoutMenu,
4037
+ Ya as LayoutPanel,
4038
+ Na as LayoutTable,
4039
+ Qa as LayoutTabs,
4040
+ oa as LogicError,
4041
+ be as ModifierKeys,
4042
+ on as SourceAppBadge,
4043
+ ge as TailwindBreakpoints,
4044
+ $n as ThrottleOrDebounce,
4045
+ ve as ToastNotificationType,
4046
+ ra as UninitializedResourceAccessError,
4047
+ Ke as UniqueFileTypeSpecifier,
4048
+ ua as UnsupportedEnvironmentError,
4049
+ Oe as UserAvatar,
4050
+ no as UserAvatarEditable,
4051
+ lo as UserAvatarGroup,
4052
+ Fa as ValidationHelpers,
4053
+ Pe as clientOs,
4054
+ Da as getKeyboardShortcutTitle,
4055
+ Wa as onKeyboardShortcut,
4056
+ Ne as prettyFileSize,
4057
+ qa as useFormCheckboxModel,
4058
+ ft as useFormSelectChildInternals,
4059
+ Xa as useOnBeforeWindowUnload,
4060
+ Sn as useResponsiveHorizontalDirectionCalculation,
4061
+ In as useWindowResizeHandler,
4062
+ dt as useWrappingContainerHiddenCount,
4063
+ to as writableAsyncComputed
3080
4064
  };
4065
+ //# sourceMappingURL=lib.js.map