@speckle/ui-components 2.16.1-alpha1 → 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.
package/dist/lib.js CHANGED
@@ -1,19 +1,22 @@
1
- import { defineComponent as j, resolveDynamicComponent as G, computed as c, openBlock as a, createBlock as L, normalizeClass as x, withCtx as _, createCommentVNode as I, renderSlot as z, createTextVNode as A, createElementBlock as p, createElementVNode as d, createVNode as V, Transition as be, unref as n, toDisplayString as B, toRefs as Y, Fragment as T, renderList as U, ref as M, onMounted as Z, mergeProps as ie, withDirectives as ae, isRef as de, vModelText as Me, useSlots as ye, vModelDynamic as et, pushScopeId as tt, popScopeId as st, watch as oe, withModifiers as ue, normalizeStyle as re, useModel as lt, onBeforeUnmount as ze } from "vue";
2
- import { isObjectLike as Pe, clamp as je, isString as ce, isUndefined as Q, isArray as H, debounce as Re, throttle as nt, noop as at } from "lodash";
3
- import { ArrowPathIcon as ot, ExclamationCircleIcon as rt, ChevronUpIcon as De, ChevronDownIcon as it, XMarkIcon as xe, MagnifyingGlassIcon as ut, CheckIcon as Te, Bars3Icon as ct, Squares2X2Icon as dt } from "@heroicons/vue/24/solid";
4
- import { CheckCircleIcon as ft, XCircleIcon as pt, ExclamationCircleIcon as ht, InformationCircleIcon as mt, XMarkIcon as gt, CheckIcon as vt, ExclamationTriangleIcon as bt } from "@heroicons/vue/24/outline";
5
- import { XMarkIcon as fe, CheckIcon as yt, CheckCircleIcon as Fe, ExclamationCircleIcon as ke, EnvelopeIcon as xt, KeyIcon as kt, XCircleIcon as wt, InformationCircleIcon as Ct } from "@heroicons/vue/20/solid";
6
- import { useField as we } from "vee-validate";
7
- import { nanoid as Ce } from "nanoid";
8
- import { isNullOrUndefined as $t, SourceApps as St, getClientOperatingSystem as It, OperatingSystem as me } from "@speckle/shared";
9
- import { useResizeObserver as Bt, useMutationObserver as _t, onKeyDown as Vt, isClient as $e, computedAsync as Lt } from "@vueuse/core";
10
- import { Listbox as Pt, ListboxLabel as jt, ListboxButton as Ot, ListboxOptions as At, ListboxOption as Mt, Switch as zt, TransitionRoot as Rt, Dialog as Dt, TransitionChild as Oe, DialogPanel as Tt, Disclosure as Ft, DisclosureButton as Et, DisclosurePanel as Ut, Menu as Wt, MenuButton as qt, MenuItems as Ht, MenuItem as Gt } from "@headlessui/vue";
11
- import { directive as Ee } from "vue-tippy";
12
- import Kt from "v3-infinite-loading";
13
- const Xt = {
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
- }, Nt = /* @__PURE__ */ j({
19
+ }, Cs = /* @__PURE__ */ A({
17
20
  __name: "Button",
18
21
  props: {
19
22
  /**
@@ -140,137 +143,137 @@ const Xt = {
140
143
  }
141
144
  },
142
145
  emits: ["click"],
143
- setup(e, { emit: l }) {
144
- const t = e, s = G("NuxtLink"), o = G("RouterLink"), f = c(() => t.linkComponent ? t.linkComponent : t.external ? "a" : Pe(s) ? s : Pe(o) ? o : "a"), i = c(() => {
145
- if (!t.to)
146
- return t.submit ? "submit" : "button";
147
- }), r = c(() => t.disabled || t.loading), m = c(() => t.loading ? ot : t.iconLeft), u = c(() => {
148
- const v = [];
149
- if (v.push("border-2"), r.value)
150
- v.push(
151
- t.outlined ? "border-foreground-disabled" : "bg-foundation-disabled border-transparent"
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(() => {
151
+ const g = [];
152
+ if (g.push("border-2"), i.value)
153
+ g.push(
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
- v.push(
157
- t.outlined ? "border-foundation dark:border-foreground" : "bg-foundation dark:bg-foreground border-transparent"
159
+ g.push(
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
- v.push(
162
- t.outlined ? "border-foundation-2 shadow" : "bg-foundation-2 dark:bg-foundation-2 border-foundation shadow"
164
+ g.push(
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
- v.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
- v.push(
170
- t.outlined ? "border-foundation" : "bg-foundation border-foundation-2"
172
+ g.push(
173
+ s.outlined ? "border-foundation" : "bg-foundation border-foundation-2"
171
174
  );
172
175
  break;
173
176
  case "warning":
174
- v.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
- v.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
- v.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
- v.push(
185
- t.outlined ? "border-primary hover:border-primary-focus" : "bg-primary hover:bg-primary-focus border-transparent"
187
+ g.push(
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
- return v.join(" ");
190
- }), y = c(() => {
191
- const v = [];
192
- if (!t.text && !t.link)
193
- if (r.value)
194
- v.push(
195
- (t.outlined, "text-foreground-disabled")
192
+ return g.join(" ");
193
+ }), C = u(() => {
194
+ const g = [];
195
+ if (!s.text && !s.link)
196
+ if (i.value)
197
+ g.push(
198
+ (s.outlined, "text-foreground-disabled")
196
199
  );
197
200
  else
198
- switch (t.color) {
201
+ switch (s.color) {
199
202
  case "invert":
200
- v.push(
201
- t.outlined ? "text-foundation dark:text-foreground" : "text-primary"
203
+ g.push(
204
+ s.outlined ? "text-foundation dark:text-foreground" : "text-primary"
202
205
  );
203
206
  break;
204
207
  case "card":
205
- v.push((t.outlined, "text-foreground"));
208
+ g.push((s.outlined, "text-foreground"));
206
209
  break;
207
210
  case "danger":
208
- v.push(
209
- t.outlined ? "text-danger" : "text-foundation dark:text-foreground"
211
+ g.push(
212
+ s.outlined ? "text-danger" : "text-foundation dark:text-foreground"
210
213
  );
211
214
  break;
212
215
  case "warning":
213
- v.push(
214
- t.outlined ? "text-warning" : "text-foundation dark:text-foreground"
216
+ g.push(
217
+ s.outlined ? "text-warning" : "text-foundation dark:text-foreground"
215
218
  );
216
219
  break;
217
220
  case "info":
218
- v.push(
219
- t.outlined ? "text-info" : "text-foundation dark:text-foreground"
221
+ g.push(
222
+ s.outlined ? "text-info" : "text-foundation dark:text-foreground"
220
223
  );
221
224
  break;
222
225
  case "success":
223
- v.push(
224
- t.outlined ? "text-success" : "text-foundation dark:text-foreground"
226
+ g.push(
227
+ s.outlined ? "text-success" : "text-foundation dark:text-foreground"
225
228
  );
226
229
  break;
227
230
  case "secondary":
228
- v.push(
229
- (t.outlined, "text-foreground hover:text-primary")
231
+ g.push(
232
+ (s.outlined, "text-foreground hover:text-primary")
230
233
  );
231
234
  break;
232
235
  case "default":
233
236
  default:
234
- v.push(
235
- t.outlined ? "text-primary hover:text-primary-focus" : "text-foundation dark:text-foreground"
237
+ g.push(
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
- r.value ? v.push("text-foreground-disabled") : t.color === "invert" ? v.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" ? v.push("text-foreground-2 hover:text-primary-focus") : t.color === "success" ? v.push("text-success") : t.color === "warning" ? v.push("text-warning") : t.color === "info" ? v.push("text-info") : t.color === "danger" ? v.push("text-danger") : v.push("text-primary hover:text-primary-focus");
243
- return v.join(" ");
244
- }), k = c(() => {
245
- const v = [];
246
- return v.push(t.rounded ? "rounded-full" : "rounded-md"), v.join(" ");
247
- }), g = c(() => {
248
- const v = [];
249
- if (!r.value)
250
- switch (t.color) {
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");
246
+ return g.join(" ");
247
+ }), b = u(() => {
248
+ const g = [];
249
+ return g.push(s.rounded ? "rounded-full" : "rounded-md"), g.join(" ");
250
+ }), h = u(() => {
251
+ const g = [];
252
+ if (!i.value)
253
+ switch (s.color) {
251
254
  case "invert":
252
- v.push("hover:ring-4 ring-white/50");
255
+ g.push("hover:ring-4 ring-white/50");
253
256
  break;
254
257
  case "danger":
255
- v.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");
258
+ g.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");
256
259
  break;
257
260
  case "warning":
258
- v.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");
261
+ g.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");
259
262
  break;
260
263
  case "info":
261
- v.push("hover:ring-4 ring-info-lighter dark:ring-info-darker");
264
+ g.push("hover:ring-4 ring-info-lighter dark:ring-info-darker");
262
265
  break;
263
266
  case "success":
264
- v.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");
267
+ g.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");
265
268
  break;
266
269
  case "default":
267
270
  default:
268
- v.push("hover:ring-2");
271
+ g.push("hover:ring-2");
269
272
  break;
270
273
  }
271
- return v.join(" ");
272
- }), w = c(() => {
273
- switch (t.size) {
274
+ return g.join(" ");
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 Xt = {
283
286
  case "base":
284
287
  return "h-8 text-base font-medium xxx-tracking-wide";
285
288
  }
286
- }), h = c(() => {
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,88 +300,88 @@ const Xt = {
297
300
  case "base":
298
301
  return "px-3";
299
302
  }
300
- }), P = c(() => {
301
- const v = [];
302
- return t.fullWidth && v.push("w-full"), r.value && v.push("cursor-not-allowed"), v.join(" ");
303
- }), b = c(() => {
304
- const v = [];
305
- return !r.value && !t.link && !t.text && v.push("active:scale-[0.97]"), !r.value && t.link && v.push(
303
+ }), z = u(() => {
304
+ const g = [];
305
+ return s.fullWidth && g.push("w-full"), i.value && g.push("cursor-not-allowed"), g.join(" ");
306
+ }), w = u(() => {
307
+ const g = [];
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
- ), v.join(" ");
308
- }), $ = c(() => {
309
- const v = t.link || t.text;
310
+ ), g.join(" ");
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
- P.value,
313
- w.value,
314
- y.value,
315
- v ? "" : u.value,
316
- v ? "" : k.value,
317
- v ? "" : g.value,
318
- t.link ? "" : h.value,
319
- b.value
315
+ z.value,
316
+ k.value,
317
+ C.value,
318
+ g ? "" : c.value,
319
+ g ? "" : b.value,
320
+ g ? "" : h.value,
321
+ s.link ? "" : m.value,
322
+ w.value
320
323
  ].join(" ");
321
- }), S = c(() => {
322
- const v = [""];
323
- switch (t.loading && v.push("animate-spin"), t.size) {
324
+ }), j = u(() => {
325
+ const g = [""];
326
+ switch (s.loading && g.push("animate-spin"), s.size) {
324
327
  case "xs":
325
- v.push("h-3 w-3");
328
+ g.push("h-3 w-3");
326
329
  break;
327
330
  case "sm":
328
- v.push("h-4 w-4");
331
+ g.push("h-4 w-4");
329
332
  break;
330
333
  case "lg":
331
- v.push("h-6 w-6");
334
+ g.push("h-6 w-6");
332
335
  break;
333
336
  case "xl":
334
- v.push("h-8 w-8");
337
+ g.push("h-8 w-8");
335
338
  break;
336
339
  case "base":
337
340
  default:
338
- v.push("h-5 w-5");
341
+ g.push("h-5 w-5");
339
342
  break;
340
343
  }
341
- return v.join(" ");
342
- }), F = (v) => {
343
- if (r.value) {
344
- v.preventDefault(), v.stopPropagation(), v.stopImmediatePropagation();
344
+ return g.join(" ");
345
+ }), E = (g) => {
346
+ if (i.value) {
347
+ g.preventDefault(), g.stopPropagation(), g.stopImmediatePropagation();
345
348
  return;
346
349
  }
347
- l("click", v);
350
+ t("click", g);
348
351
  };
349
- return (v, D) => (a(), L(G(e.to ? f.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
- type: i.value,
355
+ type: d.value,
353
356
  external: e.external,
354
357
  class: x($.value),
355
- disabled: r.value,
358
+ disabled: i.value,
356
359
  role: "button",
357
- onClick: F
360
+ onClick: E
358
361
  }, {
359
362
  default: _(() => [
360
- m.value ? (a(), L(G(m.value), {
363
+ f.value ? (a(), P(Z(f.value), {
361
364
  key: 0,
362
- class: x(`${S.value} ${e.hideText ? "" : "mr-2"}`)
363
- }, null, 8, ["class"])) : I("", !0),
364
- e.hideText ? (a(), p("div", Xt, "   ")) : z(v.$slots, "default", { key: 1 }, () => [
365
- A("Button")
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 }, () => [
368
+ M("Button")
366
369
  ], !0),
367
- e.iconRight || !e.loading ? (a(), L(G(e.iconRight), {
370
+ e.iconRight || !e.loading ? (a(), P(Z(e.iconRight), {
368
371
  key: 3,
369
- class: x(`${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 Ue = (e, l) => {
377
- const t = e.__vccOpts || e;
378
- for (const [s, o] of l)
379
- t[s] = o;
380
- return t;
381
- }, ee = /* @__PURE__ */ Ue(Nt, [["__scopeId", "data-v-38aa371e"]]), Jt = /* @__PURE__ */ j({
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 Ue = (e, l) => {
427
430
  }
428
431
  },
429
432
  emits: ["click"],
430
- setup(e, { emit: l }) {
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
- l("click", o);
439
+ t("click", o);
437
440
  };
438
- return (o, f) => (a(), L(ee, {
441
+ return (o, r) => (a(), P(ne, {
439
442
  link: "",
440
443
  to: e.to,
441
444
  external: e.external,
@@ -446,54 +449,54 @@ const Ue = (e, l) => {
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", {}, () => [
453
- A("Link")
455
+ R(o.$slots, "default", {}, () => [
456
+ M("Link")
454
457
  ])
455
458
  ]),
456
459
  _: 3
457
460
  }, 8, ["to", "external", "disabled", "size", "foreground-link", "icon-left", "icon-right", "hide-text"]));
458
461
  }
459
462
  });
460
- var se = /* @__PURE__ */ ((e) => (e[e.Success = 0] = "Success", e[e.Warning = 1] = "Warning", e[e.Danger = 2] = "Danger", e[e.Info = 3] = "Info", e))(se || {});
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
- }, Yt = { class: "flex w-full flex-col items-center space-y-4 sm:items-end" }, Zt = {
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
- }, es = { class: "p-4" }, ts = { class: "flex items-start" }, ss = { class: "flex-shrink-0" }, ls = { class: "ml-2 w-0 flex-1 flex flex-col" }, ns = {
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
- }, as = {
473
+ }, js = {
471
474
  key: 1,
472
475
  class: "label label--light text-foreground-2"
473
- }, os = {
476
+ }, Os = {
474
477
  key: 2,
475
478
  class: "flex justify-start mt-2"
476
- }, rs = /* @__PURE__ */ d("span", { class: "sr-only" }, "Close", -1), An = /* @__PURE__ */ j({
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: l }) {
483
- const t = e, s = c(
485
+ setup(e, { emit: t }) {
486
+ const s = e, l = u(
484
487
  () => {
485
- var i, r;
486
- return !((i = t.notification) != null && i.description) && !((r = t.notification) != null && r.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
- l("update:notification", null);
490
- }, f = (i) => {
491
- var r, m, u;
492
- (u = (m = (r = t.notification) == null ? void 0 : r.cta) == null ? void 0 : m.onClick) == null || u.call(m, i), 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 (i, r) => (a(), p("div", Qt, [
495
- d("div", Yt, [
496
- V(be, {
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(), p("div", Zt, [
506
- d("div", es, [
507
- d("div", ts, [
508
- d("div", ss, [
509
- e.notification.type === n(se).Success ? (a(), L(n(ft), {
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 === n(se).Danger ? (a(), L(n(pt), {
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 === n(se).Warning ? (a(), L(n(ht), {
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 === n(se).Info ? (a(), L(n(mt), {
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
- d("div", ls, [
528
- e.notification.title ? (a(), p("p", ns, B(e.notification.title), 1)) : I("", !0),
529
- e.notification.description ? (a(), p("p", as, B(e.notification.description), 1)) : I("", !0),
530
- e.notification.cta ? (a(), p("div", os, [
531
- V(Jt, {
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: f
538
+ onClick: r
536
539
  }, {
537
540
  default: _(() => [
538
- A(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
- d("div", {
545
- class: x(["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
- d("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
- rs,
553
- V(n(fe), {
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
- }), is = /* @__PURE__ */ d("circle", {
571
+ }), Ms = /* @__PURE__ */ v("circle", {
569
572
  cx: "4",
570
573
  cy: "4",
571
574
  r: "3"
572
- }, null, -1), us = [
573
- is
574
- ], We = /* @__PURE__ */ j({
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: l }) {
587
- const t = e, s = c(
588
- () => t.colorClasses || "bg-blue-100 text-blue-800"
589
- ), o = c(
590
- () => t.dotIconColorClasses || "text-blue-400"
591
- ), f = c(() => {
592
- const u = [
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 ? (u.push("rounded"), u.push(
598
- t.size === "lg" ? "px-2 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
599
- )) : (u.push("rounded-full"), u.push(
600
- t.size === "lg" ? "px-2.5 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
601
- )), u.join(" ");
602
- }), i = c(() => {
603
- const u = [
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 ? u.push("cursor-pointer") : u.push("cursor-default"), u.join(" ");
607
- }), r = c(() => [
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(" ")), m = (u) => {
611
- if (!t.clickableIcon) {
612
- u.stopPropagation(), u.stopImmediatePropagation(), u.preventDefault();
613
+ ].join(" ")), f = (c) => {
614
+ if (!s.clickableIcon) {
615
+ c.stopPropagation(), c.stopImmediatePropagation(), c.preventDefault();
613
616
  return;
614
617
  }
615
- l("click-icon", u);
618
+ t("click-icon", c);
616
619
  };
617
- return (u, y) => (a(), p("span", {
618
- class: x(f.value)
620
+ return (c, C) => (a(), p("span", {
621
+ class: x(r.value)
619
622
  }, [
620
623
  e.dot ? (a(), p("svg", {
621
624
  key: 0,
622
- class: x(r.value),
625
+ class: x(i.value),
623
626
  fill: "currentColor",
624
627
  viewBox: "0 0 8 8"
625
- }, us, 2)) : I("", !0),
626
- z(u.$slots, "default", {}, () => [
627
- A("Badge")
628
+ }, Ts, 2)) : S("", !0),
629
+ R(c.$slots, "default", {}, () => [
630
+ M("Badge")
628
631
  ]),
629
632
  e.iconLeft ? (a(), p("button", {
630
633
  key: 1,
631
- class: x(i.value),
632
- onClick: y[0] || (y[0] = (k) => m(k))
634
+ class: x(d.value),
635
+ onClick: C[0] || (C[0] = (b) => f(b))
633
636
  }, [
634
- (a(), L(G(e.iconLeft), {
637
+ (a(), P(Z(e.iconLeft), {
635
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 Ae = [];
642
- function cs(e) {
643
- Ae = Ae ? e : e.slice();
644
+ let Qe = [];
645
+ function Fs(e) {
646
+ Qe = Qe ? e : e.slice();
644
647
  }
645
- var le = /* @__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))(le || {});
646
- function qe(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: l,
650
- steps: t,
651
- orientation: s,
652
+ modelValue: t,
653
+ steps: s,
654
+ orientation: l,
652
655
  goVerticalBelow: o,
653
- nonInteractive: f,
654
- stepsPadding: i
655
- },
656
- emit: r
657
- } = e, m = c(
658
- () => (s == null ? void 0 : s.value) === "vertical" ? "vertical" : "horizontal"
659
- ), u = c({
660
- get: () => je((l == null ? void 0 : l.value) || 0, -1, t.value.length),
661
- set: (b) => r("update:modelValue", je(b, 0, t.value.length))
662
- }), y = (b) => `${b + 1}`, k = (b) => b === u.value, g = (b) => b < u.value, w = (b, $) => {
663
- var F;
664
- if (f != null && f.value) {
656
+ nonInteractive: r,
657
+ stepsPadding: d
658
+ },
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) {
665
668
  $ == null || $.preventDefault(), $ == null || $.stopPropagation(), $ == null || $.stopImmediatePropagation();
666
669
  return;
667
670
  }
668
- u.value = b;
669
- const S = t.value[u.value];
670
- (F = S == null ? void 0 : S.onClick) == null || F.call(S);
671
- }, h = c(() => {
672
- const b = ["flex"];
673
- let $, S;
674
- return (i == null ? void 0 : i.value) === "xs" ? ($ = "space-x-2", S = "space-y-1") : (i == null ? void 0 : i.value) === "sm" ? ($ = "space-x-4", S = "space-y-1") : ($ = "space-x-8", S = "space-y-4"), b.push("flex"), m.value === "vertical" || o != null && o.value ? (b.push(`flex-col ${S} justify-center`), (o == null ? void 0 : o.value) === le.sm ? b.push(
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(
675
678
  `sm:flex-row sm:space-y-0 sm:justify-start sm:${$} sm:items-center`
676
- ) : (o == null ? void 0 : o.value) === le.md ? b.push(
679
+ ) : (o == null ? void 0 : o.value) === ge.md ? w.push(
677
680
  `md:flex-row md:space-y-0 md:justify-start md:${$} md:items-center`
678
- ) : (o == null ? void 0 : o.value) === le.lg ? b.push(
681
+ ) : (o == null ? void 0 : o.value) === ge.lg ? w.push(
679
682
  `lg:flex-row lg:space-y-0 lg:justify-start lg:${$} lg:items-center`
680
- ) : (o == null ? void 0 : o.value) === le.xl && b.push(
683
+ ) : (o == null ? void 0 : o.value) === ge.xl && w.push(
681
684
  `xl:flex-row xl:space-y-0 xl:justify-start xl:${$} xl:items-center`
682
- )) : b.push(`flex-row ${$} items-center`), b.join(" ");
683
- }), P = c(() => {
684
- const b = ["flex items-center"];
685
- return f != null && f.value || b.push("cursor-pointer"), b.join(" ");
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: u,
689
- isCurrentStep: k,
690
- isFinishedStep: g,
691
- switchStep: w,
692
- getStepDisplayValue: y,
693
- listClasses: h,
694
- linkClasses: P,
695
- orientation: m
691
+ value: c,
692
+ isCurrentStep: b,
693
+ isFinishedStep: h,
694
+ switchStep: k,
695
+ getStepDisplayValue: C,
696
+ listClasses: m,
697
+ linkClasses: z,
698
+ orientation: f
696
699
  };
697
700
  }
698
- cs([
701
+ Fs([
699
702
  "sm:space-x-8",
700
703
  "md:space-x-8",
701
704
  "lg:space-x-8",
@@ -709,16 +712,16 @@ cs([
709
712
  "lg:space-x-4",
710
713
  "xl:space-x-4"
711
714
  ]);
712
- const ds = ["aria-label"], fs = ["href", "onClick"], ps = { class: "flex space-x-3 items-center text-primary-focus normal font-medium leading-5" }, hs = { class: "shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center" }, ms = { class: "flex flex-col" }, gs = {
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
- }, vs = ["href", "onClick"], bs = { class: "flex space-x-3 items-center text-primary-focus normal font-medium leading-5" }, ys = { 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" }, ks = {
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
- }, ws = ["href", "onClick"], Cs = { class: "flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5" }, $s = { class: "shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center" }, Ss = { class: "flex flex-col" }, Is = {
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
- }, Mn = /* @__PURE__ */ j({
724
+ }, Pa = /* @__PURE__ */ A({
722
725
  __name: "Number",
723
726
  props: {
724
727
  ariaLabel: null,
@@ -730,94 +733,94 @@ const ds = ["aria-label"], fs = ["href", "onClick"], ps = { class: "flex space-x
730
733
  stepsPadding: null
731
734
  },
732
735
  emits: ["update:modelValue"],
733
- setup(e, { emit: l }) {
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: f,
738
- getStepDisplayValue: i,
739
- listClasses: r,
740
- linkClasses: m
741
- } = qe({
742
- props: Y(t),
743
- emit: l
740
+ switchStep: r,
741
+ getStepDisplayValue: d,
742
+ listClasses: i,
743
+ linkClasses: f
744
+ } = ut({
745
+ props: N(s),
746
+ emit: t
744
747
  });
745
- return (u, y) => (a(), p("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
- d("ol", {
750
- class: x(n(r))
752
+ v("ol", {
753
+ class: x(n(i))
751
754
  }, [
752
- (a(!0), p(T, null, U(e.steps, (k, g) => (a(), p("li", {
753
- key: k.name
755
+ (a(!0), p(D, null, q(e.steps, (b, h) => (a(), p("li", {
756
+ key: b.name
754
757
  }, [
755
- n(o)(g) ? (a(), p("a", {
758
+ n(o)(h) ? (a(), p("a", {
756
759
  key: 0,
757
- href: k.href,
758
- class: x(n(m)),
759
- onClick: (w) => n(f)(g, w)
760
+ href: b.href,
761
+ class: x(n(f)),
762
+ onClick: (k) => n(r)(h, k)
760
763
  }, [
761
- d("div", ps, [
762
- d("div", hs, [
763
- V(n(yt), { 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
- d("div", ms, [
766
- d("div", null, B(k.name), 1),
767
- k.description ? (a(), p("div", gs, B(k.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, fs)) : n(s)(g) ? (a(), p("a", {
773
+ ], 10, Es)) : n(l)(h) ? (a(), p("a", {
771
774
  key: 1,
772
- href: k.href,
773
- class: x(n(m)),
775
+ href: b.href,
776
+ class: x(n(f)),
774
777
  "aria-current": "step",
775
- onClick: (w) => n(f)(g, w)
778
+ onClick: (k) => n(r)(h, k)
776
779
  }, [
777
- d("div", bs, [
778
- d("div", ys, B(n(i)(g)), 1),
779
- d("div", xs, [
780
- d("div", null, B(k.name), 1),
781
- k.description ? (a(), p("div", ks, B(k.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, vs)) : (a(), p("a", {
787
+ ], 10, Hs)) : (a(), p("a", {
785
788
  key: 2,
786
- href: k.href,
787
- class: x(n(m)),
788
- onClick: (w) => n(f)(g, w)
789
+ href: b.href,
790
+ class: x(n(f)),
791
+ onClick: (k) => n(r)(h, k)
789
792
  }, [
790
- d("div", Cs, [
791
- d("div", $s, B(n(i)(g)), 1),
792
- d("div", Ss, [
793
- d("div", null, B(k.name), 1),
794
- k.description ? (a(), p("div", Is, B(k.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, ws))
800
+ ], 10, Qs))
798
801
  ]))), 128))
799
802
  ], 2)
800
- ], 8, ds));
803
+ ], 8, Rs));
801
804
  }
802
- }), Bs = ["aria-label"], _s = ["href", "onClick"], Vs = { class: "relative flex h-5 w-5 flex-shrink-0 items-center justify-center" }, Ls = {
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
- }, Ps = ["href", "onClick"], js = {
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
- }, Os = {
811
+ }, rl = {
809
812
  key: 0,
810
813
  class: "h-3 w-3 rounded-full bg-foreground"
811
- }, As = /* @__PURE__ */ d("span", { class: "absolute h-4 w-4 rounded-full bg-outline-2" }, null, -1), Ms = /* @__PURE__ */ d("span", { class: "relative block h-2 w-2 rounded-full bg-primary-focus" }, null, -1), zs = ["href", "onClick"], Rs = {
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
- }, Ds = {
817
+ }, fl = {
815
818
  key: 0,
816
819
  class: "h-3 w-3 rounded-full bg-foreground-2"
817
- }, Ts = {
820
+ }, pl = {
818
821
  key: 1,
819
822
  class: "h-4 w-4 rounded-full bg-foreground-disabled"
820
- }, zn = /* @__PURE__ */ j({
823
+ }, ja = /* @__PURE__ */ A({
821
824
  __name: "Bullet",
822
825
  props: {
823
826
  ariaLabel: null,
@@ -830,117 +833,117 @@ const ds = ["aria-label"], fs = ["href", "onClick"], ps = { class: "flex space-x
830
833
  stepsPadding: null
831
834
  },
832
835
  emits: ["update:modelValue"],
833
- setup(e, { emit: l }) {
834
- const t = e, { isCurrentStep: s, isFinishedStep: o, switchStep: f, listClasses: i, linkClasses: r } = qe({
835
- props: Y(t),
836
- emit: l
837
- }), m = c(() => {
838
- const y = ["h6 font-medium leading-7"];
839
- let k;
840
- return t.stepsPadding === "xs" ? k = "ml-1" : t.stepsPadding === "sm" ? k = "ml-2" : k = "ml-3", y.push(k), t.basic && y.push("sr-only"), y.join(" ");
841
- }), u = c(() => {
842
- const y = [];
843
- return t.basic && y.push("basic"), y.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 (y, k) => (a(), p("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
- d("ol", {
850
- class: x([n(i), u.value])
852
+ v("ol", {
853
+ class: x([n(d), c.value])
851
854
  }, [
852
- (a(!0), p(T, null, U(e.steps, (g, w) => (a(), p("li", {
853
- key: g.name
855
+ (a(!0), p(D, null, q(e.steps, (h, k) => (a(), p("li", {
856
+ key: h.name
854
857
  }, [
855
- n(o)(w) ? (a(), p("a", {
858
+ n(o)(k) ? (a(), p("a", {
856
859
  key: 0,
857
- href: g.href,
858
- class: x(n(r)),
859
- onClick: (h) => n(f)(w, h)
860
+ href: h.href,
861
+ class: x(n(i)),
862
+ onClick: (m) => n(r)(k, m)
860
863
  }, [
861
- d("span", Vs, [
862
- e.basic ? (a(), p("span", Ls)) : (a(), L(n(Fe), {
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
- d("span", {
869
- class: x(["text-foreground", m.value])
870
- }, B(g.name), 3)
871
- ], 10, _s)) : n(s)(w) ? (a(), p("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
- href: g.href,
874
- class: x(n(r)),
876
+ href: h.href,
877
+ class: x(n(i)),
875
878
  "aria-current": "step",
876
- onClick: (h) => n(f)(w, h)
879
+ onClick: (m) => n(r)(k, m)
877
880
  }, [
878
- d("span", js, [
879
- e.basic ? (a(), p("span", Os)) : (a(), p(T, { key: 1 }, [
880
- As,
881
- Ms
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
- d("span", {
885
- class: x(["text-primary-focus", m.value])
886
- }, B(g.name), 3)
887
- ], 10, Ps)) : (a(), p("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
- href: g.href,
890
- class: x(n(r)),
891
- onClick: (h) => n(f)(w, h)
892
+ href: h.href,
893
+ class: x(n(i)),
894
+ onClick: (m) => n(r)(k, m)
892
895
  }, [
893
- d("div", Rs, [
894
- e.basic ? (a(), p("span", Ds)) : (a(), p("div", Ts))
896
+ v("div", dl, [
897
+ e.basic ? (a(), p("span", fl)) : (a(), p("div", pl))
895
898
  ]),
896
- d("p", {
897
- class: x(["text-foreground-disabled", m.value])
898
- }, B(g.name), 3)
899
- ], 10, zs))
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, Bs));
905
+ ], 8, tl));
903
906
  }
904
- }), Fs = ["disabled"], Rn = /* @__PURE__ */ j({
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: l }) {
912
- const t = e, s = c(() => {
913
- const f = [
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 ? f.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed") : (f.push(
918
- t.modelValue ? "bg-primary-focus text-foreground-on-primary" : "bg-foundation text-foreground"
919
- ), f.push("ring-outline-2 hover:ring-4")), f.join(" ");
920
- }), o = (f) => {
921
- if (t.disabled) {
922
- f.preventDefault(), f.stopPropagation(), f.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
- l("update:modelValue", !t.modelValue), l("click", f);
928
+ t("update:modelValue", !s.modelValue), t("click", r);
926
929
  };
927
- return (f, i) => (a(), p("button", {
928
- class: x(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(f.$slots, "default", {}, () => [
933
- A("Text")
935
+ R(r.$slots, "default", {}, () => [
936
+ M("Text")
934
937
  ])
935
- ], 10, Fs));
938
+ ], 10, hl));
936
939
  }
937
- }), Es = { class: "relative flex items-start" }, Us = { class: "flex h-6 items-center" }, Ws = ["id", "checked", "aria-describedby", "name", "disabled", "value"], qs = {
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
- }, Hs = ["for"], Gs = {
943
+ }, yl = ["for"], xl = {
941
944
  key: 0,
942
945
  class: "text-danger ml-1"
943
- }, Ks = ["id"], Dn = /* @__PURE__ */ j({
946
+ }, kl = ["id"], Aa = /* @__PURE__ */ A({
944
947
  inheritAttrs: !1,
945
948
  __name: "Checkbox",
946
949
  props: {
@@ -1029,108 +1032,110 @@ const ds = ["aria-label"], fs = ["href", "onClick"], ps = { class: "flex space-x
1029
1032
  },
1030
1033
  emits: ["update:modelValue"],
1031
1034
  setup(e) {
1032
- const l = e, t = (b) => `${b}-${Ce()}`, s = c(() => l.value || l.name), {
1035
+ const t = e, s = (w) => `${w}-${Ee()}`, l = u(() => t.value || t.name), {
1033
1036
  checked: o,
1034
- errorMessage: f,
1035
- handleChange: i,
1036
- value: r
1037
- } = we(l.name, l.rules, {
1038
- validateOnMount: l.validateOnMount,
1037
+ errorMessage: r,
1038
+ handleChange: d,
1039
+ value: i
1040
+ } = Se(t.name, t.rules, {
1041
+ validateOnMount: t.validateOnMount,
1039
1042
  type: "checkbox",
1040
- checkedValue: s,
1041
- initialValue: l.modelValue || void 0
1042
- }), m = c(() => l.label || l.name), u = c(() => f.value ? "border-danger-lighter" : "border-foreground-4 "), y = c(() => l.description || f.value), k = c(() => `${l.name}-description`), g = c(() => {
1043
- const b = [];
1044
- return l.inlineDescription ? b.push("inline ml-2") : b.push("block"), f.value ? b.push("text-danger") : b.push("text-foreground-2"), b.join(" ");
1045
- }), w = M(t("checkbox")), h = c(() => l.id || w.value), P = (b) => {
1046
- l.disabled || i(b);
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 Z(() => {
1049
- const b = l.modelValue, $ = r.value, S = Array.isArray(b) ? b.includes(l.value) : b === l.value, F = Array.isArray($) ? $.includes(l.value) : $ === l.value;
1050
- S !== F && i(b);
1051
- }), (b, $) => (a(), p("div", Es, [
1052
- d("div", Us, [
1053
- d("input", ie({
1054
- id: h.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,
1055
1058
  checked: n(o),
1056
- "aria-describedby": k.value,
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", u.value]
1062
- }, b.$attrs, { onChange: P }), null, 16, Ws)
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
- d("div", qs, [
1065
- d("label", {
1066
- for: h.value,
1067
+ v("div", bl, [
1068
+ v("label", {
1069
+ for: m.value,
1067
1070
  class: x(["font-medium text-foreground", { "sr-only": e.hideLabel }])
1068
1071
  }, [
1069
- d("span", null, B(m.value), 1),
1070
- e.showRequired ? (a(), p("span", Gs, "*")) : I("", !0)
1071
- ], 10, Hs),
1072
- y.value ? (a(), p("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: k.value,
1075
- class: x(g.value)
1076
- }, B(y.value), 11, Ks)) : 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
- function He(e) {
1082
- const { props: l, inputEl: t, emit: s } = e, { value: o, errorMessage: f } = we(l.name, l.rules, {
1083
- validateOnMount: n(l.validateOnMount),
1084
- validateOnValueUpdate: n(l.validateOnValueUpdate),
1085
- initialValue: n(l.modelValue) || void 0
1086
- }), i = c(() => {
1087
- const S = ["block label text-foreground-2 mb-2"];
1088
- return n(l.showLabel) || S.push("sr-only"), S.join(" ");
1089
- }), r = c(() => {
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"
1084
+ function We(e) {
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 f.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"), n(l.color) === "foundation" ? S.push("bg-foundation shadow-sm hover:shadow") : S.push("bg-foundation-page"), S.join(" ");
1098
- }), m = M(Ce()), u = c(() => n(l.label) || n(l.name)), y = c(() => {
1099
- const S = f.value;
1100
- return !S || !n(l.useLabelInErrors) ? S : S.replace("Value", u.value);
1101
- }), k = c(
1102
- () => y.value && n(l.hideErrorMessage)
1103
- ), g = c(() => y.value || n(l.help)), w = c(() => !!g.value), h = c(
1104
- () => w.value ? `${n(l.name)}-${m.value}` : void 0
1105
- ), P = c(() => {
1106
- const S = ["mt-2 text-sm"];
1107
- return S.push(f.value ? "text-danger" : "text-foreground-2"), S.join(" ");
1108
- }), b = () => {
1109
- var S;
1110
- (S = t.value) == null || S.focus();
1111
- }, $ = () => {
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 Z(() => {
1115
- n(l.autoFocus) && b();
1121
+ return se(() => {
1122
+ n(t.autoFocus) && j();
1116
1123
  }), {
1117
- coreClasses: r,
1118
- title: u,
1119
- value: o,
1120
- helpTipId: h,
1121
- helpTipClasses: P,
1122
- helpTip: g,
1124
+ coreInputClasses: f,
1125
+ coreClasses: c,
1126
+ title: b,
1127
+ value: r,
1128
+ helpTipId: w,
1129
+ helpTipClasses: $,
1130
+ helpTip: m,
1123
1131
  hideHelpTip: k,
1124
- errorMessage: y,
1125
- clear: $,
1126
- focus: b,
1132
+ errorMessage: h,
1133
+ clear: E,
1134
+ focus: j,
1127
1135
  labelClasses: i
1128
1136
  };
1129
1137
  }
1130
- const Xs = ["for"], Ns = { class: "relative" }, Js = ["id", "name", "placeholder", "disabled", "aria-invalid", "aria-describedby"], Qs = /* @__PURE__ */ d("span", { class: "text-xs sr-only" }, "Clear input", -1), Ys = {
1131
- key: 2,
1132
- class: "pointer-events-none absolute inset-y-0 mt-0.5 text-4xl right-0 flex items-start pr-2 text-danger opacity-50"
1133
- }, Zs = ["id"], Tn = /* @__PURE__ */ j({
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 Xs = ["for"], Ns = { class: "relative" }, Js = ["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: l, emit: t }) {
1155
- const s = e, o = M(null), {
1156
- coreClasses: f,
1157
- title: i,
1158
- value: r,
1159
- helpTipId: m,
1160
- helpTipClasses: u,
1161
- helpTip: y,
1162
- errorMessage: k,
1163
- labelClasses: g,
1164
- clear: w,
1165
- focus: h
1166
- } = He({
1167
- props: Y(s),
1168
- emit: t,
1160
+ setup(e, { expose: t, emit: s }) {
1161
+ const l = e, o = O(null), {
1162
+ coreClasses: r,
1163
+ title: d,
1164
+ value: i,
1165
+ helpTipId: f,
1166
+ helpTipClasses: c,
1167
+ helpTip: C,
1168
+ errorMessage: b,
1169
+ labelClasses: h,
1170
+ clear: k,
1171
+ focus: m
1172
+ } = We({
1173
+ props: N(l),
1174
+ emit: s,
1169
1175
  inputEl: o
1170
- }), P = c(() => {
1171
- const b = ["pl-2"];
1172
- return s.showClear && k.value ? b.push("pr-12") : (s.showClear || k.value) && b.push("pr-8"), b.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 l({ focus: h }), (b, $) => (a(), p("div", {
1180
+ return t({ focus: m }), (w, $) => (a(), p("div", {
1175
1181
  class: x([e.fullWidth ? "w-full" : ""])
1176
1182
  }, [
1177
- d("label", {
1183
+ v("label", {
1178
1184
  for: e.name,
1179
- class: x(n(g))
1185
+ class: x(n(h))
1180
1186
  }, [
1181
- d("span", null, B(n(i)), 1)
1182
- ], 10, Xs),
1183
- d("div", Ns, [
1184
- ae(d("textarea", ie({
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": $[0] || ($[0] = (S) => de(r) ? r.value = S : null),
1194
+ "onUpdate:modelValue": $[0] || ($[0] = (j) => $e(i) ? i.value = j : null),
1189
1195
  name: e.name,
1190
- class: [n(f), P.value, "min-h-[4rem] simple-scrollbar"],
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": n(k) ? "true" : "false",
1194
- "aria-describedby": n(m)
1195
- }, b.$attrs, {
1196
- onChange: $[1] || ($[1] = (S) => b.$emit("change", { event: S, value: n(r) })),
1197
- onInput: $[2] || ($[2] = (S) => b.$emit("input", { event: S, value: n(r) }))
1198
- }), null, 16, Js), [
1199
- [Me, n(r)]
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
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
1216
  onClick: $[3] || ($[3] = //@ts-ignore
1206
- (...S) => n(w) && n(w)(...S)),
1217
+ (...j) => n(k) && n(k)(...j)),
1207
1218
  onKeydown: $[4] || ($[4] = //@ts-ignore
1208
- (...S) => n(w) && n(w)(...S))
1219
+ (...j) => n(k) && n(k)(...j))
1209
1220
  }, [
1210
- Qs,
1211
- V(n(fe), {
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
- n(k) ? (a(), p("div", {
1226
+ ], 32)) : S("", !0),
1227
+ n(b) ? (a(), p("div", {
1217
1228
  key: 1,
1218
1229
  class: x([
1219
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
- V(n(ke), {
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 && !n(k) ? (a(), p("div", Ys, " * ")) : 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
- n(m) ? (a(), p("p", {
1244
+ n(f) ? (a(), p("p", {
1231
1245
  key: 0,
1232
- id: n(m),
1233
- class: x(n(u))
1234
- }, B(n(y)), 11, Zs)) : 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
- }), el = ["for"], tl = { class: "relative" }, sl = {
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
- }, ll = ["id", "type", "name", "placeholder", "disabled", "aria-invalid", "aria-describedby"], nl = /* @__PURE__ */ d("span", { class: "text-xs sr-only" }, "Clear input", -1), al = {
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
- }, ol = ["id"], Fn = /* @__PURE__ */ j({
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 Xs = ["for"], Ns = { class: "relative" }, Js = ["id", "name", "placeholder
1376
1387
  }
1377
1388
  },
1378
1389
  emits: ["update:modelValue", "change", "input", "clear", "focusin", "focusout"],
1379
- setup(e, { expose: l, emit: t }) {
1380
- const s = e, o = ye(), f = M(null), {
1381
- coreClasses: i,
1382
- title: r,
1383
- value: m,
1384
- helpTipId: u,
1385
- helpTipClasses: y,
1386
- helpTip: k,
1387
- hideHelpTip: g,
1388
- errorMessage: w,
1389
- clear: h,
1390
- focus: P,
1391
- labelClasses: b
1392
- } = He({
1393
- props: Y(s),
1394
- emit: t,
1395
- inputEl: f
1396
- }), $ = c(() => {
1397
- const D = ["h-5 w-5"];
1398
- return w.value ? D.push("text-danger") : D.push("text-foreground-2"), D.join(" ");
1399
- }), S = c(
1400
- () => ["email", "password"].includes(s.type) || s.customIcon
1401
- ), F = c(() => {
1402
- const D = [];
1403
- return S.value ? D.push("pl-8") : D.push("pl-2"), o["input-right"] || (w.value || s.showClear) && (w.value && s.showClear ? D.push("pr-12") : D.push("pr-8")), D.join(" ");
1404
- }), v = c(() => {
1405
- switch (s.size) {
1390
+ setup(e, { expose: t, emit: s }) {
1391
+ const l = e, o = Te(), r = O(null), {
1392
+ coreClasses: d,
1393
+ title: i,
1394
+ value: f,
1395
+ helpTipId: c,
1396
+ helpTipClasses: C,
1397
+ helpTip: b,
1398
+ hideHelpTip: h,
1399
+ errorMessage: k,
1400
+ clear: m,
1401
+ focus: z,
1402
+ labelClasses: w
1403
+ } = We({
1404
+ props: N(l),
1405
+ emit: s,
1406
+ inputEl: r
1407
+ }), $ = u(() => {
1408
+ const T = ["h-5 w-5"];
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(() => {
1413
+ const T = [];
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,202 +1425,205 @@ const Xs = ["for"], Ns = { class: "relative" }, Js = ["id", "name", "placeholder
1414
1425
  return "h-8";
1415
1426
  }
1416
1427
  });
1417
- return l({ focus: P }), (D, W) => (a(), p("div", {
1428
+ return t({ focus: z }), (T, U) => (a(), p("div", {
1418
1429
  class: x([e.fullWidth ? "w-full" : "", e.wrapperClasses])
1419
1430
  }, [
1420
- d("label", {
1431
+ v("label", {
1421
1432
  for: e.name,
1422
- class: x(n(b))
1433
+ class: x(n(w))
1423
1434
  }, [
1424
- d("span", null, B(n(r)), 1)
1425
- ], 10, el),
1426
- d("div", tl, [
1427
- S.value ? (a(), p("div", sl, [
1428
- e.customIcon ? (a(), L(G(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
1441
  class: x($.value),
1431
1442
  "aria-hidden": "true"
1432
- }, null, 8, ["class"])) : e.type === "email" ? (a(), L(n(xt), {
1443
+ }, null, 8, ["class"])) : e.type === "email" ? (a(), P(n(Wt), {
1433
1444
  key: 1,
1434
1445
  class: x($.value),
1435
1446
  "aria-hidden": "true"
1436
- }, null, 8, ["class"])) : e.type === "password" ? (a(), L(n(kt), {
1447
+ }, null, 8, ["class"])) : e.type === "password" ? (a(), P(n(qt), {
1437
1448
  key: 2,
1438
1449
  class: x($.value),
1439
1450
  "aria-hidden": "true"
1440
- }, null, 8, ["class"])) : I("", !0)
1441
- ])) : I("", !0),
1442
- ae(d("input", ie({
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: f,
1446
- "onUpdate:modelValue": W[0] || (W[0] = (E) => de(m) ? m.value = E : 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: [n(i), F.value, v.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": n(w) ? "true" : "false",
1453
- "aria-describedby": n(u),
1463
+ "aria-invalid": n(k) ? "true" : "false",
1464
+ "aria-describedby": n(c),
1454
1465
  role: "textbox"
1455
- }, D.$attrs, {
1456
- onChange: W[1] || (W[1] = (E) => D.$emit("change", { event: E, value: n(m) })),
1457
- onInput: W[2] || (W[2] = (E) => D.$emit("input", { event: E, value: n(m) }))
1458
- }), null, 16, ll), [
1459
- [et, n(m)]
1466
+ }, T.$attrs, {
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(D.$slots, "input-right", {}, () => [
1472
+ R(T.$slots, "input-right", {}, () => [
1462
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: W[3] || (W[3] = //@ts-ignore
1467
- (...E) => n(h) && n(h)(...E)),
1468
- onKeydown: W[4] || (W[4] = //@ts-ignore
1469
- (...E) => n(h) && n(h)(...E))
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
- nl,
1472
- V(n(fe), {
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
- n(w) ? (a(), p("div", {
1487
+ ], 32)) : S("", !0),
1488
+ n(k) ? (a(), p("div", {
1478
1489
  key: 1,
1479
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
- V(n(ke), {
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 && !n(w) ? (a(), p("div", al, " * ")) : 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
- n(u) && !n(g) ? (a(), p("p", {
1506
+ n(c) && !n(h) ? (a(), p("p", {
1493
1507
  key: 0,
1494
- id: n(u),
1495
- class: x(n(y))
1496
- }, B(n(k)), 11, ol)) : 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
- }), Ge = /^https?:\/\//, Se = /^[\w-_.+]+@[\w-_.+]+$/, rl = (e) => (e || "").match(Se) ? !0 : "Value should be a valid e-mail address", il = (e) => (e || "").split(",").map((s) => s.trim()).every((s) => s.match(Se)) || "Value should be one or multiple comma-delimited e-mail addresses", ul = (e) => (ce(e) && (e = e.trim()), e ? !0 : "Value is required"), cl = (e, l) => (t, s) => t === s.form[e] ? !0 : `Value must be the same as in field '${l || e}'`, dl = (e) => (l) => {
1500
- const { minLength: t, maxLength: s } = e;
1501
- return l = $t(l) ? "" : l, ce(l) ? !Q(t) && l.length < t ? `Value needs to be at least ${t} characters long` : !Q(s) && l.length > s ? `Value needs to be no more than ${s} characters long` : !0 : "Value should be a text string";
1502
- }, fl = (e) => (l) => {
1503
- const { match: t, message: s } = e;
1504
- return ce(l) ? t ? ce(t) ? l.includes(t) ? !0 : s : t.test(l) ? !0 : s : !0 : "Value should be a text string";
1505
- }, pl = (e) => Ge.test(e) ? !0 : "Value is not a valid URL", hl = (e) => Array.isArray(e) && e.length > 0 ? !0 : "Value should have at least a single item selected", En = /* @__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: Se,
1508
- VALID_HTTP_URL: Ge,
1509
- isEmail: rl,
1510
- isItemSelected: hl,
1511
- isOneOrMultipleEmails: il,
1512
- isRequired: ul,
1513
- isSameAs: cl,
1514
- isStringOfLength: dl,
1515
- isUrl: pl,
1516
- stringContains: fl
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
1517
1531
  }, Symbol.toStringTag, { value: "Module" }));
1518
- function ml(e) {
1532
+ function dt(e) {
1519
1533
  const {
1520
- skipCalculation: l,
1521
- elementToWatchForChanges: t,
1522
- itemContainer: s,
1534
+ skipCalculation: t,
1535
+ elementToWatchForChanges: s,
1536
+ itemContainer: l,
1523
1537
  trackResize: o = !1,
1524
- trackMutations: f = !0
1525
- } = e || {}, i = M(0), r = () => {
1526
- const m = s.value;
1527
- if (l != null && l.value || !m)
1538
+ trackMutations: r = !0
1539
+ } = e || {}, d = O(0), i = () => {
1540
+ const f = l.value;
1541
+ if (t != null && t.value || !f)
1528
1542
  return;
1529
- const u = m.children;
1530
- let y = 0, k = 0, g;
1531
- for (const w of u) {
1532
- const h = w.offsetTop;
1533
- Q(g) ? (g = h, y += 1) : h === g && (y += 1), k += 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;
1534
1548
  }
1535
- i.value = k - y;
1549
+ d.value = b - C;
1536
1550
  };
1537
- return o && Bt(t, r), f && _t(t, r, {
1551
+ return o && Nt(s, i), r && Jt(s, i, {
1538
1552
  childList: !0,
1539
1553
  subtree: !0
1540
1554
  }), {
1541
- hiddenItemCount: i
1555
+ hiddenItemCount: d
1542
1556
  };
1543
1557
  }
1544
- function Ke(e) {
1545
- const { props: l, emit: t, dynamicVisibility: s } = e;
1558
+ function ft(e) {
1559
+ const { props: t, emit: s, dynamicVisibility: l } = e;
1546
1560
  let o;
1547
- if (s) {
1548
- const { elementToWatchForChanges: u, itemContainer: y } = s;
1549
- o = ml({
1550
- skipCalculation: c(() => {
1551
- var g;
1552
- return !((g = l.multiple) != null && g.value);
1561
+ if (l) {
1562
+ const { elementToWatchForChanges: c, itemContainer: C } = l;
1563
+ o = dt({
1564
+ skipCalculation: u(() => {
1565
+ var h;
1566
+ return !((h = t.multiple) != null && h.value);
1553
1567
  }),
1554
- elementToWatchForChanges: u,
1555
- itemContainer: y
1568
+ elementToWatchForChanges: c,
1569
+ itemContainer: C
1556
1570
  }).hiddenItemCount;
1557
1571
  } else
1558
- o = M(0);
1559
- const f = c({
1572
+ o = O(0);
1573
+ const r = u({
1560
1574
  get: () => {
1561
- var y, k;
1562
- const u = (y = l.modelValue) == null ? void 0 : y.value;
1563
- return (k = l.multiple) != null && k.value ? H(u) ? u : [] : H(u) ? void 0 : u;
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;
1564
1578
  },
1565
- set: (u) => {
1566
- var y, k, g;
1567
- if ((y = l.multiple) != null && y.value && !H(u)) {
1579
+ set: (c) => {
1580
+ var C, b, h;
1581
+ if ((C = t.multiple) != null && C.value && !X(c)) {
1568
1582
  console.warn("Attempting to set non-array value in selector w/ multiple=true");
1569
1583
  return;
1570
- } else if (!((k = l.multiple) != null && k.value) && H(u)) {
1584
+ } else if (!((b = t.multiple) != null && b.value) && X(c)) {
1571
1585
  console.warn("Attempting to set array value in selector w/ multiple=false");
1572
1586
  return;
1573
1587
  }
1574
- t("update:modelValue", (g = l.multiple) != null && g.value ? u || [] : u);
1588
+ s("update:modelValue", (h = t.multiple) != null && h.value ? c || [] : c);
1575
1589
  }
1576
- }), i = (u) => H(u);
1590
+ }), d = (c) => X(c);
1577
1591
  return {
1578
- selectedValue: f,
1592
+ selectedValue: r,
1579
1593
  hiddenSelectedItemCount: o,
1580
- isArrayValue: i,
1581
- isMultiItemArrayValue: (u) => H(u) && u.length > 1,
1582
- firstItem: (u) => i(u) ? u[0] : u
1594
+ isArrayValue: d,
1595
+ isMultiItemArrayValue: (c) => X(c) && c.length > 1,
1596
+ firstItem: (c) => d(c) ? c[0] : c
1583
1597
  };
1584
1598
  }
1585
- const gl = (e) => (tt("data-v-60cf597b"), e = e(), st(), e), vl = /* @__PURE__ */ gl(() => /* @__PURE__ */ d("div", { class: "swoosher relative top-0 bg-blue-500/50" }, null, -1)), bl = [
1586
- vl
1587
- ], yl = /* @__PURE__ */ j({
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({
1588
1602
  __name: "Bar",
1589
1603
  props: {
1590
1604
  loading: { type: Boolean }
1591
1605
  },
1592
1606
  setup(e) {
1593
- return (l, t) => (a(), p("div", {
1607
+ return (t, s) => (a(), p("div", {
1594
1608
  class: x([
1595
1609
  "relative w-full h-1 bg-blue-500/30 text-xs text-foreground-on-primary overflow-hidden rounded-xl",
1596
1610
  e.loading ? "opacity-100" : "opacity-0"
1597
1611
  ])
1598
- }, bl, 2));
1612
+ }, Wl, 2));
1599
1613
  }
1600
1614
  });
1601
- const Xe = /* @__PURE__ */ Ue(yl, [["__scopeId", "data-v-60cf597b"]]), xl = { class: "flex items-center justify-between w-full" }, kl = { class: "block truncate grow text-left" }, wl = { class: "pointer-events-none shrink-0 ml-1 flex items-center space-x-2" }, Cl = {
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 = {
1602
1616
  key: 1,
1603
1617
  class: "text-4xl text-danger opacity-50 h-4 w-4 leading-6"
1604
- }, $l = ["disabled"], Sl = {
1618
+ }, Zl = ["disabled"], Ql = {
1605
1619
  key: 0,
1606
1620
  class: "flex flex-col mx-1 mb-1"
1607
- }, Il = /* @__PURE__ */ d("span", { class: "sr-only label text-foreground" }, "Search", -1), Bl = { class: "relative" }, _l = { class: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2" }, Vl = ["placeholder"], Ll = {
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 = {
1608
1622
  key: 0,
1609
1623
  class: "px-1"
1610
- }, Pl = { key: 1 }, jl = /* @__PURE__ */ d("div", { class: "text-foreground-2 text-center" }, "Nothing found 🤷‍♂️", -1), Ol = {
1624
+ }, sn = { key: 1 }, ln = /* @__PURE__ */ v("div", { class: "text-foreground-2 text-center" }, "Nothing found 🤷‍♂️", -1), nn = {
1611
1625
  class: /* @__PURE__ */ x(["block truncate"])
1612
- }, Al = ["id"], Ne = /* @__PURE__ */ j({
1626
+ }, an = ["id"], pt = /* @__PURE__ */ A({
1613
1627
  __name: "Base",
1614
1628
  props: {
1615
1629
  multiple: {
@@ -1770,158 +1784,158 @@ const Xe = /* @__PURE__ */ Ue(yl, [["__scopeId", "data-v-60cf597b"]]), xl = { cl
1770
1784
  }
1771
1785
  },
1772
1786
  emits: ["update:modelValue"],
1773
- setup(e, { expose: l, emit: t }) {
1774
- const s = e, { value: o, errorMessage: f } = we(s.name, s.rules, {
1775
- validateOnMount: s.validateOnMount,
1776
- validateOnValueUpdate: s.validateOnValueUpdate,
1777
- initialValue: s.modelValue
1778
- }), i = M(null), r = M(""), m = M([]), u = M(!1), y = M(1), k = M(Ce()), g = c(() => n(s.label) || n(s.name)), w = c(() => {
1779
- const C = f.value;
1780
- return !C || !n(s.useLabelInErrors) ? C : C.replace("Value", g.value);
1781
- }), h = c(() => w.value || n(s.help)), P = c(() => !!h.value), b = c(
1782
- () => P.value ? `${n(s.name)}-${k.value}` : void 0
1783
- ), $ = c(
1784
- () => f.value ? "text-danger" : "text-foreground-2"
1785
- ), S = c(
1786
- () => s.buttonStyle !== "simple" && s.clearable && !s.disabled
1787
- ), F = c(() => {
1788
- const C = ["relative flex group"];
1789
- return f.value ? (C.push("hover:shadow rounded-md"), C.push("text-danger-darker focus:border-danger focus:ring-danger"), s.buttonStyle !== "simple" && C.push("outline outline-2 outline-danger")) : s.buttonStyle !== "simple" && (C.push("hover:shadow rounded-md"), C.push("outline outline-2 outline-primary-muted")), s.fixedHeight && C.push("h-8"), C.join(" ");
1790
- }), v = c(() => {
1791
- const C = [];
1792
- return s.buttonStyle !== "simple" && C.push(
1793
- te.value ? "bg-foundation-disabled text-foreground-disabled" : ""
1794
- ), te.value && C.push("cursor-not-allowed"), C.join(" ");
1795
- }), D = c(() => {
1796
- const C = [
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 = [
1797
1811
  "relative z-[1]",
1798
1812
  "flex items-center justify-center text-center shrink-0",
1799
1813
  "rounded-r-md overflow-hidden transition-all",
1800
1814
  "text-foreground",
1801
- Ie.value ? `w-6 ${v.value}` : "w-0"
1815
+ xe.value ? `w-6 ${T.value}` : "w-0"
1802
1816
  ];
1803
- return te.value || (C.push(
1817
+ return Y.value || (y.push(
1804
1818
  "hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"
1805
- ), s.buttonStyle === "tinted" ? C.push("bg-outline-3") : C.push("bg-primary-muted")), C.join(" ");
1806
- }), W = c(() => {
1807
- const C = [
1819
+ ), l.buttonStyle === "tinted" ? y.push("bg-outline-3") : y.push("bg-primary-muted")), y.join(" ");
1820
+ }), F = u(() => {
1821
+ const y = [
1808
1822
  "relative z-[2]",
1809
1823
  "normal rounded-md cursor-pointer transition truncate flex-1",
1810
1824
  "flex items-center",
1811
- v.value
1825
+ T.value
1812
1826
  ];
1813
- return s.buttonStyle !== "simple" && (C.push("py-2 px-3"), te.value || (s.buttonStyle === "tinted" ? C.push("bg-foundation-page text-foreground") : C.push("bg-foundation text-foreground"))), S.value && Ie.value && C.push("rounded-r-none"), C.join(" ");
1814
- }), E = c(
1815
- () => !!(s.search && (s.filterPredicate || s.getSearchResults))
1816
- ), X = c(() => E.value && s.getSearchResults), te = c(
1817
- () => s.disabled || !s.items.length && !X.value
1818
- ), q = c({
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({
1819
1833
  get: () => {
1820
- const C = o.value;
1821
- return s.multiple ? H(C) ? C : [] : H(C) ? void 0 : C;
1834
+ const y = r.value;
1835
+ return l.multiple ? X(y) ? y : [] : X(y) ? void 0 : y;
1822
1836
  },
1823
- set: (C) => {
1824
- if (s.multiple && !H(C)) {
1837
+ set: (y) => {
1838
+ if (l.multiple && !X(y)) {
1825
1839
  console.warn("Attempting to set non-array value in selector w/ multiple=true");
1826
1840
  return;
1827
- } else if (!s.multiple && H(C)) {
1841
+ } else if (!l.multiple && X(y)) {
1828
1842
  console.warn("Attempting to set array value in selector w/ multiple=false");
1829
1843
  return;
1830
1844
  }
1831
- let R;
1832
- if (s.multiple)
1833
- R = C || [];
1845
+ let B;
1846
+ if (l.multiple)
1847
+ B = y || [];
1834
1848
  else {
1835
- const O = o.value;
1836
- R = s.allowUnset && O && C && pe(O) === pe(C) ? void 0 : C;
1849
+ const I = r.value;
1850
+ B = l.allowUnset && I && y && ee(I) === ee(y) ? void 0 : y;
1837
1851
  }
1838
- s.fullyControlValue ? t("update:modelValue", R) : o.value = R, y.value += 1;
1852
+ l.fullyControlValue ? s("update:modelValue", B) : r.value = B, b.value += 1;
1839
1853
  }
1840
- }), Ie = c(() => s.multiple ? q.value.length !== 0 : !!q.value), Je = () => {
1841
- s.multiple ? q.value = [] : q.value = void 0;
1842
- }, Qe = c(() => {
1843
- const C = r.value;
1844
- return !E.value || !(C != null && C.length) ? m.value : s.filterPredicate ? m.value.filter(
1845
- (R) => {
1846
- var O;
1847
- return ((O = s.filterPredicate) == null ? void 0 : O.call(s, R, C)) || !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;
1848
1862
  }
1849
- ) : m.value;
1850
- }), Be = (C) => JSON.stringify(C), pe = (C) => s.by ? C[s.by] : C, he = async () => {
1851
- if (!(!X.value || !s.getSearchResults)) {
1852
- u.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;
1853
1867
  try {
1854
- m.value = await s.getSearchResults(r.value);
1868
+ c.value = await l.getSearchResults(f.value);
1855
1869
  } finally {
1856
- u.value = !1;
1870
+ C.value = !1;
1857
1871
  }
1858
1872
  }
1859
- }, Ye = Re(he, 1e3), Ze = (C) => {
1860
- const { active: R, disabled: O } = C || {}, { hideCheckmarks: K } = s, N = [
1873
+ }, Le = Fe(he, 1e3), me = (y) => {
1874
+ const { active: B, disabled: I } = y || {}, { hideCheckmarks: W } = l, H = [
1861
1875
  "relative transition cursor-pointer select-none py-1.5 pl-3",
1862
- K ? "" : "pr-9"
1876
+ W ? "" : "pr-9"
1863
1877
  ];
1864
- return O ? N.push("opacity-50 cursor-not-allowed") : N.push(R ? "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(" ");
1865
1879
  };
1866
- return oe(
1867
- () => s.items,
1868
- (C) => {
1869
- m.value = C.slice();
1880
+ return te(
1881
+ () => l.items,
1882
+ (y) => {
1883
+ c.value = y.slice();
1870
1884
  },
1871
1885
  { immediate: !0 }
1872
- ), oe(r, () => {
1873
- X.value && Ye();
1874
- }), Z(() => {
1875
- X.value && !s.items.length && he();
1876
- }), l({ triggerSearch: he }), (C, R) => (a(), p("div", null, [
1877
- (a(), L(n(Pt), {
1878
- key: y.value,
1879
- modelValue: q.value,
1880
- "onUpdate:modelValue": R[4] || (R[4] = (O) => q.value = O),
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), {
1892
+ key: b.value,
1893
+ modelValue: K.value,
1894
+ "onUpdate:modelValue": B[4] || (B[4] = (I) => K.value = I),
1881
1895
  name: e.name,
1882
1896
  multiple: e.multiple,
1883
1897
  by: e.by,
1884
- disabled: te.value,
1898
+ disabled: Y.value,
1885
1899
  as: "div"
1886
1900
  }, {
1887
1901
  default: _(() => [
1888
- V(n(jt), {
1902
+ V(n(ns), {
1889
1903
  class: x(["block label text-foreground-2 mb-2", { "sr-only": !e.showLabel }])
1890
1904
  }, {
1891
1905
  default: _(() => [
1892
- A(B(e.label), 1)
1906
+ M(L(e.label), 1)
1893
1907
  ]),
1894
1908
  _: 1
1895
1909
  }, 8, ["class"]),
1896
- d("div", {
1897
- class: x(F.value)
1910
+ v("div", {
1911
+ class: x(g.value)
1898
1912
  }, [
1899
- V(n(Ot), {
1900
- class: x(W.value)
1913
+ V(n(as), {
1914
+ class: x(F.value)
1901
1915
  }, {
1902
- default: _(({ open: O }) => [
1903
- d("div", xl, [
1904
- d("div", kl, [
1905
- !q.value || n(H)(q.value) && !q.value.length ? z(C.$slots, "nothing-selected", { key: 0 }, () => [
1906
- A(B(e.placeholder ? e.placeholder : e.label), 1)
1907
- ]) : z(C.$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", {
1908
1922
  key: 1,
1909
- value: q.value
1923
+ value: K.value
1910
1924
  }, () => [
1911
- A(B(Be(q.value)), 1)
1925
+ M(L(ke(K.value)), 1)
1912
1926
  ])
1913
1927
  ]),
1914
- d("div", wl, [
1915
- w.value ? (a(), L(n(rt), {
1928
+ v("div", Gl, [
1929
+ m.value ? (a(), P(n(_t), {
1916
1930
  key: 0,
1917
1931
  class: "h-4 w-4 text-danger",
1918
1932
  "aria-hidden": "true"
1919
- })) : e.showRequired ? (a(), p("div", Cl, " * ")) : I("", !0),
1920
- O ? (a(), L(n(De), {
1933
+ })) : e.showRequired ? (a(), p("div", Xl, " * ")) : S("", !0),
1934
+ I ? (a(), P(n(st), {
1921
1935
  key: 2,
1922
1936
  class: "h-4 w-4 text-foreground",
1923
1937
  "aria-hidden": "true"
1924
- })) : (a(), L(n(it), {
1938
+ })) : (a(), P(n(zt), {
1925
1939
  key: 3,
1926
1940
  class: "h-4 w-4 text-foreground",
1927
1941
  "aria-hidden": "true"
@@ -1931,106 +1945,106 @@ const Xe = /* @__PURE__ */ Ue(yl, [["__scopeId", "data-v-60cf597b"]]), xl = { cl
1931
1945
  ]),
1932
1946
  _: 3
1933
1947
  }, 8, ["class"]),
1934
- S.value ? ae((a(), p("button", {
1948
+ E.value ? de((a(), p("button", {
1935
1949
  key: 0,
1936
- class: x(D.value),
1950
+ class: x(U.value),
1937
1951
  disabled: e.disabled,
1938
- onClick: R[0] || (R[0] = (O) => Je())
1952
+ onClick: B[0] || (B[0] = (I) => Be())
1939
1953
  }, [
1940
- V(n(xe), { class: "w-3 h-3" })
1941
- ], 10, $l)), [
1942
- [n(Ee), "Clear"]
1943
- ]) : I("", !0),
1944
- V(be, {
1954
+ V(n(Re), { class: "w-3 h-3" })
1955
+ ], 10, Zl)), [
1956
+ [n(rt), "Clear"]
1957
+ ]) : S("", !0),
1958
+ V(Ae, {
1945
1959
  "leave-active-class": "transition ease-in duration-100",
1946
1960
  "leave-from-class": "opacity-100",
1947
1961
  "leave-to-class": "opacity-0"
1948
1962
  }, {
1949
1963
  default: _(() => [
1950
- V(n(At), {
1964
+ V(n(os), {
1951
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",
1952
- onFocus: R[3] || (R[3] = (O) => {
1953
- var K;
1954
- return (K = i.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();
1955
1969
  })
1956
1970
  }, {
1957
1971
  default: _(() => [
1958
- E.value ? (a(), p("label", Sl, [
1959
- Il,
1960
- d("div", Bl, [
1961
- d("div", _l, [
1962
- V(n(ut), { 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" })
1963
1977
  ]),
1964
- ae(d("input", {
1978
+ de(v("input", {
1965
1979
  ref_key: "searchInput",
1966
1980
  ref: i,
1967
- "onUpdate:modelValue": R[1] || (R[1] = (O) => r.value = O),
1981
+ "onUpdate:modelValue": B[1] || (B[1] = (I) => f.value = I),
1968
1982
  type: "text",
1969
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",
1970
1984
  placeholder: e.searchPlaceholder,
1971
- onKeydown: R[2] || (R[2] = ue(() => {
1985
+ onKeydown: B[2] || (B[2] = le(() => {
1972
1986
  }, ["stop"]))
1973
- }, null, 40, Vl), [
1974
- [Me, r.value]
1987
+ }, null, 40, en), [
1988
+ [Me, f.value]
1975
1989
  ])
1976
1990
  ])
1977
- ])) : I("", !0),
1978
- d("div", {
1979
- class: x(["overflow-auto simple-scrollbar", [E.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"]])
1980
1994
  }, [
1981
- X.value && u.value ? (a(), p("div", Ll, [
1982
- V(Xe, { loading: !0 })
1983
- ])) : X.value && !m.value.length ? (a(), p("div", Pl, [
1984
- z(C.$slots, "nothing-found", {}, () => [
1985
- jl
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
1986
2000
  ])
1987
- ])) : I("", !0),
1988
- !X.value || !u.value ? (a(!0), p(T, { key: 2 }, U(Qe.value, (O) => {
1989
- var K;
1990
- return a(), L(n(Mt), {
1991
- key: pe(O),
1992
- value: O,
1993
- disabled: ((K = e.disabledItemPredicate) == null ? void 0 : K.call(e, O)) || !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
1994
2008
  }, {
1995
- default: _(({ active: N, selected: _e }) => {
1996
- var Ve, Le;
2009
+ default: _(({ active: H, selected: oe }) => {
2010
+ var re, we;
1997
2011
  return [
1998
- d("li", {
2012
+ v("li", {
1999
2013
  class: x(
2000
- Ze({
2001
- active: N,
2002
- disabled: ((Ve = e.disabledItemPredicate) == null ? void 0 : Ve.call(e, O)) || !1
2014
+ me({
2015
+ active: H,
2016
+ disabled: ((re = e.disabledItemPredicate) == null ? void 0 : re.call(e, I)) || !1
2003
2017
  })
2004
2018
  )
2005
2019
  }, [
2006
- d("span", Ol, [
2007
- z(C.$slots, "option", {
2008
- item: O,
2009
- active: N,
2010
- selected: _e,
2011
- disabled: ((Le = e.disabledItemPredicate) == null ? void 0 : Le.call(e, O)) || !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
2012
2026
  }, () => [
2013
- A(B(Be(O)), 1)
2027
+ M(L(ke(I)), 1)
2014
2028
  ])
2015
2029
  ]),
2016
- !e.hideCheckmarks && _e ? (a(), p("span", {
2030
+ !e.hideCheckmarks && oe ? (a(), p("span", {
2017
2031
  key: 0,
2018
2032
  class: x([
2019
- N ? "text-primary" : "text-foreground",
2033
+ H ? "text-primary" : "text-foreground",
2020
2034
  "absolute inset-y-0 right-0 flex items-center pr-4"
2021
2035
  ])
2022
2036
  }, [
2023
- V(n(Te), {
2037
+ V(n(lt), {
2024
2038
  class: "h-5 w-5",
2025
2039
  "aria-hidden": "true"
2026
2040
  })
2027
- ], 2)) : I("", !0)
2041
+ ], 2)) : S("", !0)
2028
2042
  ], 2)
2029
2043
  ];
2030
2044
  }),
2031
2045
  _: 2
2032
2046
  }, 1032, ["value", "disabled"]);
2033
- }), 128)) : I("", !0)
2047
+ }), 128)) : S("", !0)
2034
2048
  ], 2)
2035
2049
  ]),
2036
2050
  _: 3
@@ -2042,37 +2056,37 @@ const Xe = /* @__PURE__ */ Ue(yl, [["__scopeId", "data-v-60cf597b"]]), xl = { cl
2042
2056
  ]),
2043
2057
  _: 3
2044
2058
  }, 8, ["modelValue", "name", "multiple", "by", "disabled"])),
2045
- b.value ? (a(), p("p", {
2059
+ $.value ? (a(), p("p", {
2046
2060
  key: 0,
2047
- id: b.value,
2048
- class: x(["mt-2 text-sm", $.value])
2049
- }, B(h.value), 11, Al)) : I("", !0)
2061
+ id: $.value,
2062
+ class: x(["mt-2 text-sm", j.value])
2063
+ }, L(z.value), 11, an)) : S("", !0)
2050
2064
  ]));
2051
2065
  }
2052
- }), Ml = /* @__PURE__ */ j({
2066
+ }), on = /* @__PURE__ */ A({
2053
2067
  __name: "SourceAppBadge",
2054
2068
  props: {
2055
2069
  sourceApp: null
2056
2070
  },
2057
2071
  setup(e) {
2058
- return (l, t) => (a(), L(We, {
2072
+ return (t, s) => (a(), P(De, {
2059
2073
  "color-classes": "text-foreground-on-primary",
2060
2074
  rounded: "",
2061
- style: re({ backgroundColor: e.sourceApp.bgColor })
2075
+ style: fe({ backgroundColor: e.sourceApp.bgColor })
2062
2076
  }, {
2063
2077
  default: _(() => [
2064
- A(B(e.sourceApp.short), 1)
2078
+ M(L(e.sourceApp.short), 1)
2065
2079
  ]),
2066
2080
  _: 1
2067
2081
  }, 8, ["style"]));
2068
2082
  }
2069
- }), zl = {
2083
+ }), rn = {
2070
2084
  key: 0,
2071
2085
  class: "text-foreground-2 normal"
2072
- }, Rl = {
2086
+ }, un = {
2073
2087
  key: 1,
2074
2088
  class: "flex items-center"
2075
- }, Dl = { class: "truncate" }, Tl = { class: "flex items-center" }, Fl = { class: "truncate" }, Un = /* @__PURE__ */ j({
2089
+ }, cn = { class: "truncate" }, dn = { class: "flex items-center" }, fn = { class: "truncate" }, Ra = /* @__PURE__ */ A({
2076
2090
  __name: "SourceApps",
2077
2091
  props: {
2078
2092
  /**
@@ -2128,74 +2142,82 @@ const Xe = /* @__PURE__ */ Ue(yl, [["__scopeId", "data-v-60cf597b"]]), xl = { cl
2128
2142
  items: {
2129
2143
  type: Array,
2130
2144
  default: void 0
2145
+ },
2146
+ clearable: {
2147
+ type: Boolean
2148
+ },
2149
+ help: {
2150
+ type: String
2131
2151
  }
2132
2152
  },
2133
2153
  emits: ["update:modelValue"],
2134
- setup(e, { emit: l }) {
2135
- const t = e, s = M(null), o = M(null), { selectedValue: f, hiddenSelectedItemCount: i, isMultiItemArrayValue: r, firstItem: m } = Ke({
2136
- props: Y(t),
2137
- emit: l,
2138
- dynamicVisibility: { elementToWatchForChanges: s, itemContainer: o }
2139
- }), u = (y, k) => y.name.toLocaleLowerCase().includes(k.toLocaleLowerCase());
2140
- return (y, k) => (a(), L(Ne, {
2141
- modelValue: n(f),
2142
- "onUpdate:modelValue": k[0] || (k[0] = (g) => de(f) ? f.value = g : 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),
2143
2163
  multiple: e.multiple,
2144
- items: e.items ?? n(St),
2164
+ items: e.items ?? n(Xt),
2145
2165
  search: e.search,
2146
2166
  "search-placeholder": e.searchPlaceholder,
2147
2167
  label: e.label,
2148
2168
  "show-label": e.showLabel,
2149
2169
  name: e.name || "sourceApps",
2150
- "filter-predicate": u,
2170
+ "filter-predicate": c,
2171
+ clearable: e.clearable,
2172
+ help: e.help,
2151
2173
  by: "name"
2152
2174
  }, {
2153
2175
  "nothing-selected": _(() => [
2154
- e.selectorPlaceholder ? (a(), p(T, { key: 0 }, [
2155
- A(B(e.selectorPlaceholder), 1)
2156
- ], 64)) : (a(), p(T, { key: 1 }, [
2157
- A(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)
2158
2180
  ], 64))
2159
2181
  ]),
2160
- "something-selected": _(({ value: g }) => [
2161
- n(r)(g) ? (a(), p("div", {
2182
+ "something-selected": _(({ value: h }) => [
2183
+ n(i)(h) ? (a(), p("div", {
2162
2184
  key: 0,
2163
2185
  ref_key: "elementToWatchForChanges",
2164
- ref: s,
2186
+ ref: l,
2165
2187
  class: "flex items-center space-x-0.5 h-5"
2166
2188
  }, [
2167
- d("div", {
2189
+ v("div", {
2168
2190
  ref_key: "itemContainer",
2169
2191
  ref: o,
2170
2192
  class: "flex flex-wrap overflow-hidden space-x-0.5 h-5"
2171
2193
  }, [
2172
- (a(!0), p(T, null, U(g, (w) => (a(), L(Ml, {
2173
- key: w.name,
2174
- "source-app": w
2194
+ (a(!0), p(D, null, q(h, (k) => (a(), P(on, {
2195
+ key: k.name,
2196
+ "source-app": k
2175
2197
  }, null, 8, ["source-app"]))), 128))
2176
2198
  ], 512),
2177
- n(i) > 0 ? (a(), p("div", zl, " +" + B(n(i)), 1)) : I("", !0)
2178
- ], 512)) : (a(), p("div", Rl, [
2179
- d("div", {
2199
+ n(d) > 0 ? (a(), p("div", rn, " +" + L(n(d)), 1)) : S("", !0)
2200
+ ], 512)) : (a(), p("div", un, [
2201
+ v("div", {
2180
2202
  class: "h-2 w-2 rounded-full mr-2",
2181
- style: re({ backgroundColor: n(m)(g).bgColor })
2203
+ style: fe({ backgroundColor: n(f)(h).bgColor })
2182
2204
  }, null, 4),
2183
- d("span", Dl, B(n(m)(g).name), 1)
2205
+ v("span", cn, L(n(f)(h).name), 1)
2184
2206
  ]))
2185
2207
  ]),
2186
- option: _(({ item: g }) => [
2187
- d("div", Tl, [
2188
- d("div", {
2208
+ option: _(({ item: h }) => [
2209
+ v("div", dn, [
2210
+ v("div", {
2189
2211
  class: "h-2 w-2 rounded-full mr-2",
2190
- style: re({ backgroundColor: g.bgColor })
2212
+ style: fe({ backgroundColor: h.bgColor })
2191
2213
  }, null, 4),
2192
- d("span", Fl, B(g.name), 1)
2214
+ v("span", fn, L(h.name), 1)
2193
2215
  ])
2194
2216
  ]),
2195
2217
  _: 1
2196
- }, 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"]));
2197
2219
  }
2198
- }), El = { class: "flex flex-wrap gap-1.5 text-xs" }, Wn = /* @__PURE__ */ j({
2220
+ }), pn = { class: "flex flex-wrap gap-1.5 text-xs" }, Ea = /* @__PURE__ */ A({
2199
2221
  __name: "Badges",
2200
2222
  props: {
2201
2223
  items: null,
@@ -2208,16 +2230,16 @@ const Xe = /* @__PURE__ */ Ue(yl, [["__scopeId", "data-v-60cf597b"]]), xl = { cl
2208
2230
  by: null
2209
2231
  },
2210
2232
  emits: ["update:modelValue"],
2211
- setup(e, { emit: l }) {
2212
- const t = e, { selectedValue: s, isArrayValue: o } = Ke({
2213
- props: Y(t),
2214
- emit: l
2215
- }), f = (i) => {
2216
- o(s.value) ? s.value = s.value.filter((r) => r.id !== i.id) : s.value = void 0;
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;
2217
2239
  };
2218
- return (i, r) => (a(), L(Ne, {
2219
- modelValue: n(s),
2220
- "onUpdate:modelValue": r[0] || (r[0] = (m) => de(s) ? s.value = m : null),
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),
2221
2243
  multiple: e.multiple,
2222
2244
  items: e.items,
2223
2245
  label: e.label,
@@ -2226,52 +2248,52 @@ const Xe = /* @__PURE__ */ Ue(yl, [["__scopeId", "data-v-60cf597b"]]), xl = { cl
2226
2248
  rules: e.rules,
2227
2249
  by: e.by
2228
2250
  }, {
2229
- "something-selected": _(({ value: m }) => [
2230
- d("ul", El, [
2231
- (a(!0), p(T, null, U(n(o)(m) ? m : [m], (u) => (a(), p("li", {
2232
- key: u[e.by]
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]
2233
2255
  }, [
2234
- V(We, {
2256
+ V(De, {
2235
2257
  size: "lg",
2236
2258
  "clickable-icon": !0,
2237
- "icon-left": n(xe),
2238
- onClickIcon: ue((y) => f(u), ["stop"])
2259
+ "icon-left": n(Re),
2260
+ onClickIcon: le((C) => r(c), ["stop"])
2239
2261
  }, {
2240
2262
  default: _(() => [
2241
- A(B(u.text), 1)
2263
+ M(L(c.text), 1)
2242
2264
  ]),
2243
2265
  _: 2
2244
2266
  }, 1032, ["icon-left", "onClickIcon"])
2245
2267
  ]))), 128))
2246
2268
  ])
2247
2269
  ]),
2248
- option: _(({ item: m }) => [
2249
- A(B(m.text), 1)
2270
+ option: _(({ item: f }) => [
2271
+ M(L(f.text), 1)
2250
2272
  ]),
2251
2273
  _: 1
2252
2274
  }, 8, ["modelValue", "multiple", "items", "label", "name", "help", "rules", "by"]));
2253
2275
  }
2254
- }), Ul = { class: "flex items-center" }, Wl = { class: "absolute inset-0 flex items-center gap-2 px-1 text-white" }, qn = /* @__PURE__ */ j({
2276
+ }), hn = { class: "flex items-center" }, mn = { class: "absolute inset-0 flex items-center gap-2 px-1 text-white" }, Ua = /* @__PURE__ */ A({
2255
2277
  __name: "Switch",
2256
2278
  props: {
2257
2279
  modelValue: { type: Boolean }
2258
2280
  },
2259
2281
  emits: ["update:modelValue"],
2260
2282
  setup(e) {
2261
- const l = lt(e, "modelValue");
2262
- return (t, s) => (a(), p("div", Ul, [
2263
- V(n(zt), {
2264
- modelValue: l.value,
2265
- "onUpdate:modelValue": s[0] || (s[0] = (o) => l.value = o),
2266
- 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": l.value, "bg-primary-muted": !l.value }])
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 }])
2267
2289
  }, {
2268
2290
  default: _(() => [
2269
- d("div", Wl, [
2270
- V(n(Te), { class: "h-5 w-5 drop-shadow-md" }),
2271
- V(n(xe), { class: "h-5 w-5 drop-shadow-md" })
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" })
2272
2294
  ]),
2273
- d("span", {
2274
- 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": l.value, "translate-x-0": !l.value }])
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 }])
2275
2297
  }, null, 2)
2276
2298
  ]),
2277
2299
  _: 1
@@ -2279,61 +2301,58 @@ const Xe = /* @__PURE__ */ Ue(yl, [["__scopeId", "data-v-60cf597b"]]), xl = { cl
2279
2301
  ]));
2280
2302
  }
2281
2303
  });
2282
- var ne = /* @__PURE__ */ ((e) => (e.CtrlOrCmd = "cmd-or-ctrl", e.AltOrOpt = "alt-or-opt", e.Shift = "shift", e))(ne || {});
2283
- const ge = It(), ql = {
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 = {
2284
2306
  [
2285
2307
  "cmd-or-ctrl"
2286
2308
  /* CtrlOrCmd */
2287
- ]: ge === me.Mac ? "Cmd" : "Ctrl",
2309
+ ]: Pe === ze.Mac ? "Cmd" : "Ctrl",
2288
2310
  [
2289
2311
  "alt-or-opt"
2290
2312
  /* AltOrOpt */
2291
- ]: ge === me.Mac ? "Opt" : "Alt",
2313
+ ]: Pe === ze.Mac ? "Opt" : "Alt",
2292
2314
  shift: "Shift"
2293
2315
  };
2294
- function Hn(e) {
2295
- const l = (t) => Object.values(ne).includes(t);
2296
- return e.map((t) => l(t) ? ql[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("+");
2297
2319
  }
2298
- function Gn(e, ...l) {
2299
- Vt(
2300
- l[0],
2301
- (t) => {
2302
- const s = t.getModifierState("Alt"), o = ge === me.Mac ? t.getModifierState("Meta") : t.getModifierState("Control"), f = t.getModifierState("Shift");
2303
- for (const i of e)
2304
- switch (i) {
2305
- case ne.CtrlOrCmd:
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");
2325
+ for (const d of e)
2326
+ switch (d) {
2327
+ case be.CtrlOrCmd:
2306
2328
  if (!o)
2307
2329
  return;
2308
2330
  break;
2309
- case ne.AltOrOpt:
2310
- if (!s)
2331
+ case be.AltOrOpt:
2332
+ if (!l)
2311
2333
  return;
2312
2334
  break;
2313
- case ne.Shift:
2314
- if (!f)
2335
+ case be.Shift:
2336
+ if (!r)
2315
2337
  return;
2316
2338
  break;
2317
2339
  }
2318
- l[1](t);
2340
+ t[1](s);
2319
2341
  },
2320
- l[2]
2342
+ t[2]
2321
2343
  );
2322
2344
  }
2323
- function Kn(e) {
2324
- const l = (e == null ? void 0 : e.model) || M(), t = c({
2325
- get: () => !!l.value,
2326
- set: (s) => l.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
2327
2349
  });
2328
- return { model: l, isChecked: t };
2350
+ return { model: t, isChecked: s };
2329
2351
  }
2330
- const Hl = /* @__PURE__ */ d("div", { class: "fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity" }, null, -1), Gl = { class: "fixed inset-0 z-10 overflow-y-auto" }, Kl = { class: "flex min-h-full justify-center p-4 text-center items-center sm:p-0" }, Xl = {
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 = {
2331
2353
  key: 0,
2332
- class: "flex items-center justify-center shadow p-4 relative z-10 bg-foundation rounded-t-lg"
2333
- }, Nl = { class: "text-2xl font-bold" }, Jl = { class: "p-4 sm:p-6" }, Ql = {
2334
- key: 2,
2335
- class: "flex p-4 sm:px-6 sm:py-5 border-t gap-2 border-outline-3"
2336
- }, Xn = /* @__PURE__ */ j({
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({
2337
2356
  __name: "Dialog",
2338
2357
  props: {
2339
2358
  open: { type: Boolean },
@@ -2345,12 +2364,12 @@ const Hl = /* @__PURE__ */ d("div", { class: "fixed inset-0 bg-neutral-100/70 da
2345
2364
  onSubmit: { type: Function }
2346
2365
  },
2347
2366
  emits: ["update:open", "fully-closed"],
2348
- setup(e, { emit: l }) {
2349
- const t = e, s = ye(), o = c(() => !!t.onSubmit), f = c(() => t.buttons || s.buttons), i = c({
2350
- get: () => t.open,
2351
- set: (y) => l("update:open", y)
2352
- }), r = c(() => {
2353
- 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) {
2354
2373
  case "sm":
2355
2374
  return 0;
2356
2375
  case "md":
@@ -2362,24 +2381,27 @@ const Hl = /* @__PURE__ */ d("div", { class: "fixed inset-0 bg-neutral-100/70 da
2362
2381
  default:
2363
2382
  return 1e4;
2364
2383
  }
2365
- }), m = c(() => {
2366
- const y = ["w-full", "sm:my-8 sm:w-full sm:max-w-xl"];
2367
- return !t.title && !f.value && y.push("px-4 pt-4 pb-4", "sm:p-6"), r.value >= 1 && y.push("md:max-w-2xl"), r.value >= 2 && y.push("lg:max-w-4xl"), r.value >= 3 && y.push("xl:max-w-6xl"), r.value >= 4 && y.push("2xl:max-w-7xl"), y.join(" ");
2368
- }), u = () => {
2369
- t.preventCloseOnClickOutside || (i.value = !1);
2370
- };
2371
- return (y, k) => (a(), L(n(Rt), {
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), {
2372
2394
  as: "template",
2373
- show: i.value
2395
+ show: f.value
2374
2396
  }, {
2375
2397
  default: _(() => [
2376
- V(n(Dt), {
2398
+ V(n(us), {
2377
2399
  as: "div",
2378
2400
  class: "relative z-40",
2379
- onClose: u
2401
+ onClose: b
2380
2402
  }, {
2381
2403
  default: _(() => [
2382
- V(n(Oe), {
2404
+ V(n(Ze), {
2383
2405
  as: "template",
2384
2406
  enter: "ease-out duration-300",
2385
2407
  "enter-from": "opacity-0",
@@ -2389,13 +2411,13 @@ const Hl = /* @__PURE__ */ d("div", { class: "fixed inset-0 bg-neutral-100/70 da
2389
2411
  "leave-to": "opacity-0"
2390
2412
  }, {
2391
2413
  default: _(() => [
2392
- Hl
2414
+ gn
2393
2415
  ]),
2394
2416
  _: 1
2395
2417
  }),
2396
- d("div", Gl, [
2397
- d("div", Kl, [
2398
- V(n(Oe), {
2418
+ v("div", bn, [
2419
+ v("div", yn, [
2420
+ V(n(Ze), {
2399
2421
  as: "template",
2400
2422
  enter: "ease-out duration-300",
2401
2423
  "enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
@@ -2403,43 +2425,54 @@ const Hl = /* @__PURE__ */ d("div", { class: "fixed inset-0 bg-neutral-100/70 da
2403
2425
  leave: "ease-in duration-200",
2404
2426
  "leave-from": "opacity-100 translate-y-0 sm:scale-100",
2405
2427
  "leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
2406
- onAfterLeave: k[1] || (k[1] = (g) => y.$emit("fully-closed"))
2428
+ onAfterLeave: m[2] || (m[2] = (z) => k.$emit("fully-closed"))
2407
2429
  }, {
2408
2430
  default: _(() => [
2409
- V(n(Tt), {
2431
+ V(n(cs), {
2410
2432
  class: x([
2411
- "transform rounded-lg bg-foundation text-left shadow-xl transition-all",
2412
- m.value
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
2413
2435
  ]),
2414
- as: o.value ? "form" : "div",
2415
- onSubmit: ue(e.onSubmit, ["prevent"])
2436
+ as: d.value ? "form" : "div",
2437
+ onSubmit: le(e.onSubmit, ["prevent"])
2416
2438
  }, {
2417
2439
  default: _(() => [
2418
- e.title ? (a(), p("div", Xl, [
2419
- d("h4", Nl, B(e.title), 1)
2420
- ])) : I("", !0),
2421
- e.hideCloser ? I("", !0) : (a(), p("button", {
2422
- key: 1,
2423
- class: "absolute z-20 top-5 right-4 text-foreground",
2424
- onClick: k[0] || (k[0] = (g) => i.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)
2425
2451
  }, [
2426
- V(n(gt), { class: "h-6 w-6" })
2427
- ])),
2428
- d("div", Jl, [
2429
- z(y.$slots, "default", {}, () => [
2430
- A("Put your content here!")
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))
2458
+ }, [
2459
+ R(k.$slots, "default", {}, () => [
2460
+ M("Put your content here!")
2431
2461
  ])
2432
- ]),
2433
- f.value ? (a(), p("div", Ql, [
2434
- e.buttons ? (a(!0), p(T, { key: 0 }, U(e.buttons, (g, w) => (a(), L(n(ee), ie({ key: w }, g.props, {
2435
- onClick: g.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
2436
2469
  }), {
2437
2470
  default: _(() => [
2438
- A(B(g.text), 1)
2471
+ M(L(z.text), 1)
2439
2472
  ]),
2440
2473
  _: 2
2441
- }, 1040, ["onClick"]))), 128)) : z(y.$slots, "buttons", { key: 1 })
2442
- ])) : I("", !0)
2474
+ }, 1040, ["onClick"]))), 128)) : R(k.$slots, "buttons", { key: 1 })
2475
+ ], 2)) : S("", !0)
2443
2476
  ]),
2444
2477
  _: 3
2445
2478
  }, 8, ["class", "as", "onSubmit"])
@@ -2455,7 +2488,7 @@ const Hl = /* @__PURE__ */ d("div", { class: "fixed inset-0 bg-neutral-100/70 da
2455
2488
  _: 3
2456
2489
  }, 8, ["show"]));
2457
2490
  }
2458
- }), Yl = { class: "inline-flex items-center space-x-2" }, Zl = { class: "label-light" }, Nn = /* @__PURE__ */ j({
2491
+ }), wn = { class: "inline-flex items-center space-x-2" }, Cn = { class: "label-light" }, Ka = /* @__PURE__ */ A({
2459
2492
  __name: "Disclosure",
2460
2493
  props: {
2461
2494
  title: null,
@@ -2463,12 +2496,12 @@ const Hl = /* @__PURE__ */ d("div", { class: "fixed inset-0 bg-neutral-100/70 da
2463
2496
  color: { default: "default" }
2464
2497
  },
2465
2498
  setup(e) {
2466
- const l = e, t = c(() => {
2499
+ const t = e, s = u(() => {
2467
2500
  const o = [
2468
2501
  "pr-3 h-10 w-full flex items-center justify-between border-l-2 px-2 rounded transition",
2469
2502
  "ring-1 font-medium"
2470
2503
  ];
2471
- switch (l.color) {
2504
+ switch (t.color) {
2472
2505
  case "warning":
2473
2506
  o.push(
2474
2507
  "border-warning text-warning ring-warning-lighter hover:ring-warning"
@@ -2490,9 +2523,9 @@ const Hl = /* @__PURE__ */ d("div", { class: "fixed inset-0 bg-neutral-100/70 da
2490
2523
  break;
2491
2524
  }
2492
2525
  return o.join(" ");
2493
- }), s = c(() => {
2526
+ }), l = u(() => {
2494
2527
  const o = ["mt-4 px-3 py-1 border-x "];
2495
- switch (l.color) {
2528
+ switch (t.color) {
2496
2529
  case "warning":
2497
2530
  o.push("border-warning-lighter");
2498
2531
  break;
@@ -2509,33 +2542,33 @@ const Hl = /* @__PURE__ */ d("div", { class: "fixed inset-0 bg-neutral-100/70 da
2509
2542
  }
2510
2543
  return o.join(" ");
2511
2544
  });
2512
- return (o, f) => (a(), p("div", null, [
2513
- V(n(Ft), null, {
2514
- default: _(({ open: i }) => [
2515
- V(n(Et), {
2516
- class: x(t.value)
2545
+ return (o, r) => (a(), p("div", null, [
2546
+ V(n(ds), null, {
2547
+ default: _(({ open: d }) => [
2548
+ V(n(fs), {
2549
+ class: x(s.value)
2517
2550
  }, {
2518
2551
  default: _(() => [
2519
- d("div", Yl, [
2520
- e.icon ? (a(), L(G(e.icon), {
2552
+ v("div", wn, [
2553
+ e.icon ? (a(), P(Z(e.icon), {
2521
2554
  key: 0,
2522
2555
  class: "h-4 w-4"
2523
- })) : I("", !0),
2524
- d("span", null, B(e.title), 1)
2556
+ })) : S("", !0),
2557
+ v("span", null, L(e.title), 1)
2525
2558
  ]),
2526
- V(n(De), {
2527
- class: x([i ? "" : "rotate-180 transform", "h-5 w-5"])
2559
+ V(n(st), {
2560
+ class: x([d ? "" : "rotate-180 transform", "h-5 w-5"])
2528
2561
  }, null, 8, ["class"])
2529
2562
  ]),
2530
2563
  _: 2
2531
2564
  }, 1032, ["class"]),
2532
- V(n(Ut), {
2533
- class: x(s.value)
2565
+ V(n(ps), {
2566
+ class: x(l.value)
2534
2567
  }, {
2535
2568
  default: _(() => [
2536
- d("div", Zl, [
2537
- z(o.$slots, "default", {}, () => [
2538
- A("Panel contents")
2569
+ v("div", Cn, [
2570
+ R(o.$slots, "default", {}, () => [
2571
+ M("Panel contents")
2539
2572
  ])
2540
2573
  ])
2541
2574
  ]),
@@ -2547,136 +2580,136 @@ const Hl = /* @__PURE__ */ d("div", { class: "fixed inset-0 bg-neutral-100/70 da
2547
2580
  ]));
2548
2581
  }
2549
2582
  });
2550
- var J = /* @__PURE__ */ ((e) => (e.Grid = "grid", e.List = "list", e))(J || {});
2551
- const Jn = /* @__PURE__ */ j({
2583
+ var ue = /* @__PURE__ */ ((e) => (e.Grid = "grid", e.List = "list", e))(ue || {});
2584
+ const Ga = /* @__PURE__ */ A({
2552
2585
  __name: "GridListToggle",
2553
2586
  props: {
2554
2587
  modelValue: null
2555
2588
  },
2556
2589
  emits: ["click", "update:modelValue"],
2557
- setup(e, { emit: l }) {
2558
- const t = e, s = c({
2559
- get: () => t.modelValue || J.Grid,
2560
- set: (i) => l("update:modelValue", i)
2561
- }), o = c(
2562
- () => s.value === J.Grid ? ct : dt
2563
- ), f = (i) => {
2564
- l("click", i);
2565
- const r = s.value === J.Grid ? J.List : J.Grid;
2566
- s.value = r;
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;
2567
2600
  };
2568
- return (i, r) => (a(), p("button", {
2601
+ return (d, i) => (a(), p("button", {
2569
2602
  class: "flex items-center justify-center rounded bg-foundation h-8 w-8 shadow cursor-pointer text-foreground",
2570
- onClick: f
2603
+ onClick: r
2571
2604
  }, [
2572
- (a(), L(G(o.value), { class: "h-6 w-6" }))
2605
+ (a(), P(Z(o.value), { class: "h-6 w-6" }))
2573
2606
  ]));
2574
2607
  }
2575
2608
  });
2576
- var en = /* @__PURE__ */ ((e) => (e[e.Throttle = 0] = "Throttle", e[e.Debounce = 1] = "Debounce", e))(en || {}), ve = /* @__PURE__ */ ((e) => (e[e.Left = 0] = "Left", e[e.Right = 1] = "Right", e))(ve || {});
2577
- function tn(e, l) {
2578
- if (!$e)
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)
2579
2612
  return;
2580
2613
  const {
2581
- wait: t = 100,
2582
- throttleOrDebounce: s = 0
2614
+ wait: s = 100,
2615
+ throttleOrDebounce: l = 0
2583
2616
  /* Throttle */
2584
- } = l || {}, o = t ? s === 0 ? nt(e, t) : Re(e, t) : e;
2585
- Z(() => window.addEventListener("resize", o)), ze(() => 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));
2586
2619
  }
2587
- function Qn(e) {
2588
- Z(() => {
2620
+ function Xa(e) {
2621
+ se(() => {
2589
2622
  window.addEventListener("beforeunload", e);
2590
- }), ze(() => {
2623
+ }), Ye(() => {
2591
2624
  window.removeEventListener("beforeunload", e);
2592
2625
  });
2593
2626
  }
2594
- function sn(e) {
2595
- const { el: l, defaultDirection: t } = e, s = M(
2596
- Q(t) ? 1 : t
2627
+ function Sn(e) {
2628
+ const { el: t, defaultDirection: s } = e, l = O(
2629
+ ce(s) ? 1 : s
2597
2630
  /* Right */
2598
- ), o = c(() => {
2599
- const i = n(e.stopUpdatesBelowWidth);
2600
- if (!Q(i))
2601
- return i;
2602
- const r = n(l);
2603
- return r != null && r.offsetWidth ? r.offsetWidth * 2 : void 0;
2604
- }), f = () => {
2605
- if (!$e)
2631
+ ), o = u(() => {
2632
+ const d = n(e.stopUpdatesBelowWidth);
2633
+ if (!ce(d))
2634
+ return d;
2635
+ const i = n(t);
2636
+ return i != null && i.offsetWidth ? i.offsetWidth * 2 : void 0;
2637
+ }), r = () => {
2638
+ if (!Ue)
2606
2639
  return;
2607
- const i = n(l);
2608
- if (!i)
2640
+ const d = n(t);
2641
+ if (!d)
2609
2642
  return;
2610
- const r = i.getBoundingClientRect(), m = r.x + r.width > window.innerWidth, u = r.x < 0;
2611
- m && u || !Q(o.value) && window.innerWidth < o.value || (m ? s.value = 0 : u && (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));
2612
2645
  };
2613
- return tn(() => f()), oe(
2614
- () => n(l),
2615
- (i) => {
2616
- i && f();
2646
+ return In(() => r()), te(
2647
+ () => n(t),
2648
+ (d) => {
2649
+ d && r();
2617
2650
  }
2618
2651
  ), {
2619
- direction: c(() => s.value),
2620
- recalculateDirection: f
2652
+ direction: u(() => l.value),
2653
+ recalculateDirection: r
2621
2654
  };
2622
2655
  }
2623
- const ln = ["disabled", "onClick"], Yn = /* @__PURE__ */ j({
2656
+ const Bn = ["disabled", "onClick"], Za = /* @__PURE__ */ A({
2624
2657
  __name: "Menu",
2625
2658
  props: {
2626
2659
  open: { type: Boolean },
2627
2660
  items: null
2628
2661
  },
2629
2662
  emits: ["update:open", "chosen"],
2630
- setup(e, { emit: l }) {
2631
- const t = e, s = M(null), { direction: o } = sn({
2632
- el: c(() => {
2633
- var g;
2634
- return ((g = s.value) == null ? void 0 : g.el) || null;
2663
+ setup(e, { emit: t }) {
2664
+ const s = e, l = O(null), { direction: o } = Sn({
2665
+ el: u(() => {
2666
+ var h;
2667
+ return ((h = l.value) == null ? void 0 : h.el) || null;
2635
2668
  }),
2636
- defaultDirection: ve.Left,
2669
+ defaultDirection: je.Left,
2637
2670
  stopUpdatesBelowWidth: 300
2638
- }), f = M(null), i = M(!1), r = c({
2639
- get: () => t.open || !1,
2640
- set: (g) => l("update:open", g)
2641
- }), m = (g) => {
2642
- const { active: w, disabled: h } = g, P = ["group flex w-full items-center rounded-md px-2 py-2 text-sm"];
2643
- return w ? P.push("bg-primary text-foreground-on-primary") : h ? P.push("text-foreground-disabled") : P.push("text-foreground"), P.join(" ");
2644
- }, u = (g, w) => {
2645
- l("chosen", { item: g, event: w });
2646
- }, y = () => {
2647
- var g;
2648
- return (g = f.value) == null ? void 0 : g.el.click();
2649
- }, k = (g) => {
2650
- const w = !!g;
2651
- return i.value = w, w;
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 = () => {
2680
+ var h;
2681
+ return (h = r.value) == null ? void 0 : h.el.click();
2682
+ }, b = (h) => {
2683
+ const k = !!h;
2684
+ return d.value = k, k;
2652
2685
  };
2653
- return oe(i, (g, w) => {
2654
- g !== w && (r.value = g);
2655
- }), oe(r, (g) => {
2656
- (g && !i.value || !g && i.value) && y();
2657
- }), (g, w) => (a(), L(n(Wt), {
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), {
2658
2691
  as: "div",
2659
2692
  class: "relative inline-block"
2660
2693
  }, {
2661
- default: _(({ open: h }) => [
2662
- d("div", null, [
2663
- V(n(qt), {
2694
+ default: _(({ open: m }) => [
2695
+ v("div", null, [
2696
+ V(n(ms), {
2664
2697
  ref_key: "menuButton",
2665
- ref: f,
2698
+ ref: r,
2666
2699
  class: "hidden",
2667
- onClick: w[0] || (w[0] = ue(() => {
2700
+ onClick: k[0] || (k[0] = le(() => {
2668
2701
  }, ["stop", "prevent"]))
2669
2702
  }, null, 512),
2670
- d("div", {
2671
- class: x(h ? "pointer-events-none" : "")
2703
+ v("div", {
2704
+ class: x(m ? "pointer-events-none" : "")
2672
2705
  }, [
2673
- z(g.$slots, "default", {
2674
- toggle: y,
2675
- open: k(h)
2706
+ R(h.$slots, "default", {
2707
+ toggle: C,
2708
+ open: b(m)
2676
2709
  })
2677
2710
  ], 2)
2678
2711
  ]),
2679
- V(be, {
2712
+ V(Ae, {
2680
2713
  "enter-active-class": "transition duration-100 ease-out",
2681
2714
  "enter-from-class": "transform scale-95 opacity-0",
2682
2715
  "enter-to-class": "transform scale-100 opacity-100",
@@ -2685,36 +2718,36 @@ const ln = ["disabled", "onClick"], Yn = /* @__PURE__ */ j({
2685
2718
  "leave-to-class": "transform scale-95 opacity-0"
2686
2719
  }, {
2687
2720
  default: _(() => [
2688
- V(n(Ht), {
2721
+ V(n(vs), {
2689
2722
  ref_key: "menuItems",
2690
- ref: s,
2723
+ ref: l,
2691
2724
  class: x([
2692
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",
2693
- n(o) === n(ve).Left ? "right-0" : ""
2726
+ n(o) === n(je).Left ? "right-0" : ""
2694
2727
  ])
2695
2728
  }, {
2696
2729
  default: _(() => [
2697
- (a(!0), p(T, null, U(e.items, (P, b) => (a(), p("div", {
2698
- key: b,
2730
+ (a(!0), p(D, null, q(e.items, (z, w) => (a(), p("div", {
2731
+ key: w,
2699
2732
  class: "px-1 py-1"
2700
2733
  }, [
2701
- (a(!0), p(T, null, U(P, ($) => (a(), L(n(Gt), {
2734
+ (a(!0), p(D, null, q(z, ($) => (a(), P(n(gs), {
2702
2735
  key: $.id,
2703
2736
  disabled: $.disabled
2704
2737
  }, {
2705
- default: _(({ active: S, disabled: F }) => [
2706
- ae((a(), p("span", null, [
2707
- d("button", {
2708
- class: x(m({ active: S, disabled: F })),
2709
- disabled: F,
2710
- onClick: (v) => u($, v)
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)
2711
2744
  }, [
2712
- z(g.$slots, "item", { item: $ }, () => [
2713
- A(B($.title), 1)
2745
+ R(h.$slots, "item", { item: $ }, () => [
2746
+ M(L($.title), 1)
2714
2747
  ])
2715
- ], 10, ln)
2748
+ ], 10, Bn)
2716
2749
  ])), [
2717
- [n(Ee), $.disabled && $.disabledTooltip]
2750
+ [n(rt), $.disabled && $.disabledTooltip]
2718
2751
  ])
2719
2752
  ]),
2720
2753
  _: 2
@@ -2730,33 +2763,33 @@ const ln = ["disabled", "onClick"], Yn = /* @__PURE__ */ j({
2730
2763
  _: 3
2731
2764
  }));
2732
2765
  }
2733
- }), nn = { class: "flex flex-col space-y-4" }, an = { class: "flex space-x-6" }, Zn = /* @__PURE__ */ j({
2766
+ }), Vn = { class: "flex flex-col space-y-4" }, Ln = { class: "flex space-x-6" }, Qa = /* @__PURE__ */ A({
2734
2767
  __name: "Tabs",
2735
2768
  props: {
2736
2769
  items: null
2737
2770
  },
2738
2771
  setup(e) {
2739
- const l = e, t = M(null), s = c(() => t.value && l.items.find((f) => f.id === t.value) || l.items[0]), o = (f) => {
2740
- t.value = f.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;
2741
2774
  };
2742
- return (f, i) => (a(), p("div", nn, [
2743
- d("div", an, [
2744
- (a(!0), p(T, null, U(e.items, (r) => (a(), L(ee, {
2745
- key: r.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,
2746
2779
  link: "",
2747
- color: s.value.id === r.id ? "default" : "secondary",
2748
- onClick: (m) => o(r)
2780
+ color: l.value.id === i.id ? "default" : "secondary",
2781
+ onClick: (f) => o(i)
2749
2782
  }, {
2750
2783
  default: _(() => [
2751
- A(B(r.title), 1)
2784
+ M(L(i.title), 1)
2752
2785
  ]),
2753
2786
  _: 2
2754
2787
  }, 1032, ["color", "onClick"]))), 128))
2755
2788
  ]),
2756
- z(f.$slots, "default", { activeItem: s.value })
2789
+ R(r.$slots, "default", { activeItem: l.value })
2757
2790
  ]));
2758
2791
  }
2759
- }), on = { class: "text-foreground" }, rn = { class: "w-full text-sm overflow-x-auto overflow-y-visible simple-scrollbar" }, un = ["onClick", "onKeypress"], cn = /* @__PURE__ */ d("div", { class: "text-gray-900 font-medium order-1" }, "Placeholder", -1), dn = { class: "absolute right-1.5 gap-1 flex items-center p-0" }, ea = /* @__PURE__ */ j({
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({
2760
2793
  __name: "Table",
2761
2794
  props: {
2762
2795
  items: null,
@@ -2766,72 +2799,72 @@ const ln = ["disabled", "onClick"], Yn = /* @__PURE__ */ j({
2766
2799
  onRowClick: { type: Function }
2767
2800
  },
2768
2801
  setup(e) {
2769
- const l = e, t = c(() => {
2770
- const i = (l.buttons || []).length;
2771
- let r = 16;
2772
- return i > 0 && (r = 48 + (i - 1) * 42), `${r}px`;
2773
- }), s = (i) => {
2774
- var r;
2775
- return ((r = l.columns.find((m) => m.id === i)) == null ? void 0 : r.classes) || "";
2776
- }, o = (i, r) => {
2777
- const m = s(i);
2778
- return r === 0 ? `bg-transparent py-3 pr-5 px-1 ${m}` : `lg:p-0 px-1 ${m}`;
2779
- }, f = (i) => {
2780
- var r;
2781
- (r = l.onRowClick) == null || r.call(l, i);
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);
2782
2815
  };
2783
- return (i, r) => (a(), p("div", on, [
2784
- d("div", rn, [
2816
+ return (d, i) => (a(), p("div", _n, [
2817
+ v("div", zn, [
2785
2818
  e.items.length > 0 ? (a(), p("div", {
2786
2819
  key: 0,
2787
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]",
2788
- style: re({ paddingRight: t.value })
2821
+ style: fe({ paddingRight: s.value })
2789
2822
  }, [
2790
- (a(!0), p(T, null, U(e.columns, (m) => (a(), p("div", {
2791
- key: m.id,
2792
- class: x([s(m.id), "capitalize"])
2793
- }, B(m.header), 3))), 128))
2794
- ], 4)) : I("", !0),
2795
- d("div", {
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", {
2796
2829
  class: x(["divide-y divide-outline-3 h-full overflow-visible", { "pb-32": e.overflowCells }])
2797
2830
  }, [
2798
- (a(!0), p(T, null, U(e.items, (m) => (a(), p("div", {
2799
- key: m.id,
2831
+ (a(!0), p(D, null, q(e.items, (f) => (a(), p("div", {
2832
+ key: f.id,
2800
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 }]),
2801
- style: re({ paddingRight: t.value }),
2834
+ style: fe({ paddingRight: s.value }),
2802
2835
  tabindex: "0",
2803
- onClick: (u) => f(m),
2804
- onKeypress: (u) => f(m)
2836
+ onClick: (c) => r(f),
2837
+ onKeypress: (c) => r(f)
2805
2838
  }, [
2806
- (a(!0), p(T, null, U(e.columns, (u, y) => (a(), p("div", {
2807
- key: u.id,
2808
- class: x(o(u.id, y)),
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)),
2809
2842
  tabindex: "0"
2810
2843
  }, [
2811
- z(i.$slots, u.id, { item: m }, () => [
2812
- cn
2844
+ R(d.$slots, c.id, { item: f }, () => [
2845
+ jn
2813
2846
  ])
2814
2847
  ], 2))), 128)),
2815
- d("div", dn, [
2816
- (a(!0), p(T, null, U(e.buttons, (u) => (a(), p("div", {
2817
- key: u.label
2848
+ v("div", On, [
2849
+ (a(!0), p(D, null, q(e.buttons, (c) => (a(), p("div", {
2850
+ key: c.label
2818
2851
  }, [
2819
- V(n(ee), {
2820
- "icon-left": u.icon,
2852
+ V(n(ne), {
2853
+ "icon-left": c.icon,
2821
2854
  size: "sm",
2822
2855
  color: "secondary",
2823
2856
  "hide-text": "",
2824
- class: x(u.class),
2825
- onClick: ue((y) => u.action(m), ["stop"])
2857
+ class: x(c.class),
2858
+ onClick: le((C) => c.action(f), ["stop"])
2826
2859
  }, null, 8, ["icon-left", "class", "onClick"])
2827
2860
  ]))), 128))
2828
2861
  ])
2829
- ], 46, un))), 128))
2862
+ ], 46, Pn))), 128))
2830
2863
  ], 2)
2831
2864
  ])
2832
2865
  ]));
2833
2866
  }
2834
- }), fn = { class: "w-full flex flex-col items-center my-2 space-y-2 mt-4" }, pn = { class: "inline-flex items-center space-x-1" }, hn = /* @__PURE__ */ d("span", { class: "text-foreground-2" }, "That's it, you've loaded everything!", -1), mn = { class: "w-full flex flex-col items-center my-2 space-y-2 mt-4" }, gn = { class: "inline-flex items-center space-x-1" }, vn = /* @__PURE__ */ d("span", { class: "text-foreground-2" }, "An error occurred while loading", -1), ta = /* @__PURE__ */ j({
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({
2835
2868
  __name: "InfiniteLoading",
2836
2869
  props: {
2837
2870
  settings: null,
@@ -2839,58 +2872,58 @@ const ln = ["disabled", "onClick"], Yn = /* @__PURE__ */ j({
2839
2872
  },
2840
2873
  emits: ["infinite"],
2841
2874
  setup(e) {
2842
- const l = M(null), t = M(!1);
2843
- return $e && Z(() => {
2844
- const s = setInterval(() => {
2875
+ const t = O(null), s = O(!1);
2876
+ return Ue && se(() => {
2877
+ const l = setInterval(() => {
2845
2878
  var o;
2846
- (o = l.value) != null && o.isConnected && (t.value = !0, clearInterval(s));
2879
+ (o = t.value) != null && o.isConnected && (s.value = !0, clearInterval(l));
2847
2880
  }, 200);
2848
- }), (s, o) => (a(), p("div", {
2881
+ }), (l, o) => (a(), p("div", {
2849
2882
  ref_key: "wrapper",
2850
- ref: l
2883
+ ref: t
2851
2884
  }, [
2852
- t.value ? (a(), L(n(Kt), ie({ key: 0 }, s.$props.settings || {}, {
2853
- onInfinite: o[0] || (o[0] = (f) => s.$emit("infinite", f))
2885
+ s.value ? (a(), P(n(ks), ye({ key: 0 }, l.$props.settings || {}, {
2886
+ onInfinite: o[0] || (o[0] = (r) => l.$emit("infinite", r))
2854
2887
  }), {
2855
2888
  spinner: _(() => [
2856
- V(Xe, {
2889
+ V(He, {
2857
2890
  loading: !0,
2858
2891
  class: "my-2"
2859
2892
  })
2860
2893
  ]),
2861
2894
  complete: _(() => [
2862
- d("div", fn, [
2863
- d("div", pn, [
2864
- V(n(vt), { class: "w-5 h-5 text-success" }),
2865
- hn
2895
+ v("div", An, [
2896
+ v("div", Mn, [
2897
+ V(n(Ut), { class: "w-5 h-5 text-success" }),
2898
+ Tn
2866
2899
  ])
2867
2900
  ])
2868
2901
  ]),
2869
- error: _(({ retry: f }) => [
2870
- d("div", mn, [
2871
- d("div", gn, [
2872
- V(n(bt), { class: "w-5 h-5 text-danger" }),
2873
- vn
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
2874
2907
  ]),
2875
- e.allowRetry ? (a(), L(ee, {
2908
+ e.allowRetry ? (a(), P(ne, {
2876
2909
  key: 0,
2877
- onClick: f
2910
+ onClick: r
2878
2911
  }, {
2879
2912
  default: _(() => [
2880
- A("Retry")
2913
+ M("Retry")
2881
2914
  ]),
2882
2915
  _: 2
2883
- }, 1032, ["onClick"])) : I("", !0)
2916
+ }, 1032, ["onClick"])) : S("", !0)
2884
2917
  ])
2885
2918
  ]),
2886
2919
  _: 1
2887
- }, 16)) : I("", !0)
2920
+ }, 16)) : S("", !0)
2888
2921
  ], 512));
2889
2922
  }
2890
- }), bn = { class: "relative group" }, yn = {
2923
+ }), Un = { class: "relative group" }, Dn = {
2891
2924
  key: 0,
2892
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"
2893
- }, sa = /* @__PURE__ */ j({
2926
+ }, Ya = /* @__PURE__ */ A({
2894
2927
  __name: "Panel",
2895
2928
  props: {
2896
2929
  /**
@@ -2927,48 +2960,48 @@ const ln = ["disabled", "onClick"], Yn = /* @__PURE__ */ j({
2927
2960
  }
2928
2961
  },
2929
2962
  emits: ["submit"],
2930
- setup(e, { emit: l }) {
2931
- const t = e, s = c(
2932
- () => t.customPadding ? "" : "px-4 py-4 sm:px-6"
2933
- ), o = c(
2934
- () => t.customPadding ? "" : "px-4 py-4 sm:p-6"
2935
- ), f = c(() => {
2936
- const i = ["rounded-lg"];
2937
- return t.noShadow || i.push("shadow"), t.ring && i.push("ring-outline-2 hover:ring-2"), t.panelClasses && i.push(t.panelClasses), i.join(" ");
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(() => {
2969
+ const d = ["rounded-lg"];
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(" ");
2938
2971
  });
2939
- return (i, r) => (a(), p("div", bn, [
2940
- e.fancyGlow ? (a(), p("div", yn)) : I("", !0),
2941
- (a(), L(G(e.form ? "form" : "div"), {
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"), {
2942
2975
  class: x([
2943
2976
  "relative divide-outline-3 bg-foundation text-foreground flex flex-col divide-y overflow-hidden",
2944
- f.value
2977
+ r.value
2945
2978
  ]),
2946
- onSubmit: r[0] || (r[0] = (m) => l("submit", m))
2979
+ onSubmit: i[0] || (i[0] = (f) => t("submit", f))
2947
2980
  }, {
2948
2981
  default: _(() => [
2949
- i.$slots.header ? (a(), p("div", {
2982
+ d.$slots.header ? (a(), p("div", {
2950
2983
  key: 0,
2951
- class: x(s.value)
2984
+ class: x(l.value)
2952
2985
  }, [
2953
- z(i.$slots, "header")
2954
- ], 2)) : I("", !0),
2955
- d("div", {
2986
+ R(d.$slots, "header")
2987
+ ], 2)) : S("", !0),
2988
+ v("div", {
2956
2989
  class: x(["grow", o.value])
2957
2990
  }, [
2958
- z(i.$slots, "default")
2991
+ R(d.$slots, "default")
2959
2992
  ], 2),
2960
- i.$slots.footer ? (a(), p("div", {
2993
+ d.$slots.footer ? (a(), p("div", {
2961
2994
  key: 1,
2962
- class: x(s.value)
2995
+ class: x(l.value)
2963
2996
  }, [
2964
- z(i.$slots, "footer")
2965
- ], 2)) : I("", !0)
2997
+ R(d.$slots, "footer")
2998
+ ], 2)) : S("", !0)
2966
2999
  ]),
2967
3000
  _: 3
2968
3001
  }, 40, ["class"]))
2969
3002
  ]));
2970
3003
  }
2971
- }), xn = { class: "flex-shrink-0" }, kn = /* @__PURE__ */ d("span", { class: "sr-only" }, "Dismiss", -1), la = /* @__PURE__ */ j({
3004
+ }), Wn = { class: "flex-shrink-0" }, qn = /* @__PURE__ */ v("span", { class: "sr-only" }, "Dismiss", -1), eo = /* @__PURE__ */ A({
2972
3005
  __name: "Alert",
2973
3006
  props: {
2974
3007
  color: { default: "success" },
@@ -2979,162 +3012,162 @@ const ln = ["disabled", "onClick"], Yn = /* @__PURE__ */ j({
2979
3012
  },
2980
3013
  emits: ["dismiss"],
2981
3014
  setup(e) {
2982
- const l = e, t = ye(), s = c(() => !!t.description), o = c(() => {
2983
- if (l.customIcon)
2984
- return l.customIcon;
2985
- switch (l.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) {
2986
3019
  case "info":
2987
- return Ct;
3020
+ return Kt;
2988
3021
  case "warning":
2989
- return ke;
3022
+ return Ie;
2990
3023
  case "danger":
2991
- return wt;
3024
+ return Ht;
2992
3025
  case "success":
2993
3026
  default:
2994
- return Fe;
3027
+ return at;
2995
3028
  }
2996
- }), f = c(() => {
2997
- const h = [];
2998
- switch (l.size) {
3029
+ }), r = u(() => {
3030
+ const m = [];
3031
+ switch (t.size) {
2999
3032
  case "xs":
3000
- h.push("p-1");
3033
+ m.push("p-1");
3001
3034
  break;
3002
3035
  case "default":
3003
3036
  default:
3004
- h.push(s.value ? "p-4" : "p-2");
3037
+ m.push(l.value ? "p-4" : "p-2");
3005
3038
  break;
3006
3039
  }
3007
- switch (l.color) {
3040
+ switch (t.color) {
3008
3041
  case "success":
3009
- h.push("bg-success-lighter border-l-4 border-success");
3042
+ m.push("bg-success-lighter border-l-4 border-success");
3010
3043
  break;
3011
3044
  case "info":
3012
- h.push("bg-info-lighter border-l-4 border-info");
3045
+ m.push("bg-info-lighter border-l-4 border-info");
3013
3046
  break;
3014
3047
  case "danger":
3015
- h.push("bg-danger-lighter border-l-4 border-danger");
3048
+ m.push("bg-danger-lighter border-l-4 border-danger");
3016
3049
  break;
3017
3050
  case "warning":
3018
- h.push("bg-warning-lighter border-l-4 border-warning");
3051
+ m.push("bg-warning-lighter border-l-4 border-warning");
3019
3052
  break;
3020
3053
  }
3021
- return h.join(" ");
3022
- }), i = c(() => {
3023
- const h = [];
3024
- if (s.value)
3025
- h.push("");
3054
+ return m.join(" ");
3055
+ }), d = u(() => {
3056
+ const m = [];
3057
+ if (l.value)
3058
+ m.push("");
3026
3059
  else
3027
- switch (h.push("items-center"), l.size) {
3060
+ switch (m.push("items-center"), t.size) {
3028
3061
  case "xs":
3029
- h.push("space-x-1");
3062
+ m.push("space-x-1");
3030
3063
  break;
3031
3064
  case "default":
3032
3065
  default:
3033
- h.push("space-x-2");
3066
+ m.push("space-x-2");
3034
3067
  break;
3035
3068
  }
3036
- return h.join(" ");
3037
- }), r = c(() => {
3038
- const h = ["grow"];
3039
- switch (s.value || h.push("flex items-center space-x-2"), l.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) {
3040
3073
  case "xs":
3041
- h.push("ml-1");
3074
+ m.push("ml-1");
3042
3075
  break;
3043
3076
  case "default":
3044
3077
  default:
3045
- h.push("ml-3");
3078
+ m.push("ml-3");
3046
3079
  break;
3047
3080
  }
3048
- return h.join(" ");
3049
- }), m = c(() => {
3050
- const h = [];
3051
- switch (l.size) {
3081
+ return m.join(" ");
3082
+ }), f = u(() => {
3083
+ const m = [];
3084
+ switch (t.size) {
3052
3085
  case "xs":
3053
- h.push("text-xs");
3086
+ m.push("text-xs");
3054
3087
  break;
3055
3088
  case "default":
3056
3089
  default:
3057
- h.push("mt-2 text-sm");
3090
+ m.push("mt-2 text-sm");
3058
3091
  break;
3059
3092
  }
3060
- return h.join(" ");
3061
- }), u = c(() => {
3062
- var b;
3063
- const h = ["flex"];
3064
- s.value || h.push("grow justify-end");
3065
- const P = s.value && ((b = l.actions) == null ? void 0 : b.length);
3066
- switch (l.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) {
3067
3100
  case "xs":
3068
- h.push("space-x-1"), P && h.push("mt-1");
3101
+ m.push("space-x-1"), z && m.push("mt-1");
3069
3102
  break;
3070
3103
  case "default":
3071
3104
  default:
3072
- h.push("space-x-2"), P && h.push("mt-4");
3105
+ m.push("space-x-2"), z && m.push("mt-4");
3073
3106
  break;
3074
3107
  }
3075
- return h.join(" ");
3076
- }), y = c(() => {
3077
- const h = [];
3078
- switch (l.color) {
3108
+ return m.join(" ");
3109
+ }), C = u(() => {
3110
+ const m = [];
3111
+ switch (t.color) {
3079
3112
  case "success":
3080
- h.push("text-success-darker");
3113
+ m.push("text-success-darker");
3081
3114
  break;
3082
3115
  case "info":
3083
- h.push("text-info-darker");
3116
+ m.push("text-info-darker");
3084
3117
  break;
3085
3118
  case "danger":
3086
- h.push("text-danger-darker");
3119
+ m.push("text-danger-darker");
3087
3120
  break;
3088
3121
  case "warning":
3089
- h.push("text-warning-darker");
3122
+ m.push("text-warning-darker");
3090
3123
  break;
3091
3124
  }
3092
- return h.join(" ");
3093
- }), k = c(() => {
3094
- const h = [];
3095
- switch (l.size) {
3125
+ return m.join(" ");
3126
+ }), b = u(() => {
3127
+ const m = [];
3128
+ switch (t.size) {
3096
3129
  case "xs":
3097
- h.push("h-4 w-4"), h.push(s.value ? "mt-0.5" : "");
3130
+ m.push("h-4 w-4"), m.push(l.value ? "mt-0.5" : "");
3098
3131
  break;
3099
3132
  case "default":
3100
3133
  default:
3101
- h.push("h-5 w-5");
3134
+ m.push("h-5 w-5");
3102
3135
  break;
3103
3136
  }
3104
- switch (l.color) {
3137
+ switch (t.color) {
3105
3138
  case "success":
3106
- h.push("text-success");
3139
+ m.push("text-success");
3107
3140
  break;
3108
3141
  case "info":
3109
- h.push("text-info");
3142
+ m.push("text-info");
3110
3143
  break;
3111
3144
  case "danger":
3112
- h.push("text-danger");
3145
+ m.push("text-danger");
3113
3146
  break;
3114
3147
  case "warning":
3115
- h.push("text-warning");
3148
+ m.push("text-warning");
3116
3149
  break;
3117
3150
  }
3118
- return h.join(" ");
3119
- }), g = c(() => {
3120
- const h = [];
3121
- switch (l.color) {
3151
+ return m.join(" ");
3152
+ }), h = u(() => {
3153
+ const m = [];
3154
+ switch (t.color) {
3122
3155
  case "success":
3123
- h.push("bg-success-lighter ring-success");
3156
+ m.push("bg-success-lighter ring-success");
3124
3157
  break;
3125
3158
  case "info":
3126
- h.push("bg-info-lighter ring-info");
3159
+ m.push("bg-info-lighter ring-info");
3127
3160
  break;
3128
3161
  case "danger":
3129
- h.push("bg-danger-lighter ring-danger");
3162
+ m.push("bg-danger-lighter ring-danger");
3130
3163
  break;
3131
3164
  case "warning":
3132
- h.push("bg-warning-lighter ring-warning");
3165
+ m.push("bg-warning-lighter ring-warning");
3133
3166
  break;
3134
3167
  }
3135
- return h.join(" ");
3136
- }), w = c(() => {
3137
- switch (l.size) {
3168
+ return m.join(" ");
3169
+ }), k = u(() => {
3170
+ switch (t.size) {
3138
3171
  case "xs":
3139
3172
  return "xs";
3140
3173
  case "default":
@@ -3142,49 +3175,49 @@ const ln = ["disabled", "onClick"], Yn = /* @__PURE__ */ j({
3142
3175
  return "sm";
3143
3176
  }
3144
3177
  });
3145
- return (h, P) => (a(), p("div", {
3146
- class: x(["rounded-md", [f.value, y.value]])
3178
+ return (m, z) => (a(), p("div", {
3179
+ class: x(["rounded-md", [r.value, C.value]])
3147
3180
  }, [
3148
- d("div", {
3149
- class: x(["flex", i.value])
3181
+ v("div", {
3182
+ class: x(["flex", d.value])
3150
3183
  }, [
3151
- d("div", xn, [
3152
- (a(), L(G(o.value), {
3153
- class: x(k.value),
3184
+ v("div", Wn, [
3185
+ (a(), P(Z(o.value), {
3186
+ class: x(b.value),
3154
3187
  "aria-hidden": "true"
3155
3188
  }, null, 8, ["class"]))
3156
3189
  ]),
3157
- d("div", {
3158
- class: x(r.value)
3190
+ v("div", {
3191
+ class: x(i.value)
3159
3192
  }, [
3160
- d("h3", {
3161
- class: x(["text-sm", [s.value ? "font-medium" : ""]])
3193
+ v("h3", {
3194
+ class: x(["text-sm", [l.value ? "font-medium" : ""]])
3162
3195
  }, [
3163
- z(h.$slots, "title", {}, () => [
3164
- A("Title")
3196
+ R(m.$slots, "title", {}, () => [
3197
+ M("Title")
3165
3198
  ])
3166
3199
  ], 2),
3167
- s.value ? (a(), p("div", {
3200
+ l.value ? (a(), p("div", {
3168
3201
  key: 0,
3169
- class: x(m.value)
3202
+ class: x(f.value)
3170
3203
  }, [
3171
- z(h.$slots, "description", {}, () => [
3172
- A(" Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid pariatur, ipsum similique veniam. ")
3204
+ R(m.$slots, "description", {}, () => [
3205
+ M(" Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid pariatur, ipsum similique veniam. ")
3173
3206
  ])
3174
- ], 2)) : I("", !0),
3175
- d("div", {
3176
- class: x(u.value)
3207
+ ], 2)) : S("", !0),
3208
+ v("div", {
3209
+ class: x(c.value)
3177
3210
  }, [
3178
- (a(!0), p(T, null, U(e.actions || [], (b, $) => (a(), L(ee, {
3211
+ (a(!0), p(D, null, q(e.actions || [], (w, $) => (a(), P(ne, {
3179
3212
  key: $,
3180
3213
  color: e.color,
3181
- size: w.value,
3182
- to: b.url,
3183
- external: b.externalUrl || !1,
3184
- onClick: (S) => b.onClick || n(at)
3214
+ size: k.value,
3215
+ to: w.url,
3216
+ external: w.externalUrl || !1,
3217
+ onClick: (j) => w.onClick || n(St)
3185
3218
  }, {
3186
3219
  default: _(() => [
3187
- A(B(b.title), 1)
3220
+ M(L(w.title), 1)
3188
3221
  ]),
3189
3222
  _: 2
3190
3223
  }, 1032, ["color", "size", "to", "external", "onClick"]))), 128))
@@ -3192,74 +3225,841 @@ const ln = ["disabled", "onClick"], Yn = /* @__PURE__ */ j({
3192
3225
  ], 2),
3193
3226
  e.withDismiss ? (a(), p("div", {
3194
3227
  key: 0,
3195
- class: x(["flex", [s.value ? "items-start" : "items-center"]])
3228
+ class: x(["flex", [l.value ? "items-start" : "items-center"]])
3196
3229
  }, [
3197
- d("button", {
3230
+ v("button", {
3198
3231
  type: "button",
3199
- class: x(["inline-flex rounded-md focus:outline-none focus:ring-2", g.value]),
3200
- onClick: P[0] || (P[0] = (b) => h.$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"))
3201
3234
  }, [
3202
- kn,
3203
- V(n(fe), {
3235
+ qn,
3236
+ V(n(pe), {
3204
3237
  class: "h-5 w-5",
3205
3238
  "aria-hidden": "true"
3206
3239
  })
3207
3240
  ], 2)
3208
- ], 2)) : I("", !0)
3241
+ ], 2)) : S("", !0)
3209
3242
  ], 2)
3210
3243
  ], 2));
3211
3244
  }
3212
3245
  });
3213
- function na(e) {
3214
- var h, P;
3215
- const { get: l, initialState: t, readOptions: s, set: o, asyncRead: f = !0, debugging: i } = e, r = i == null ? void 0 : i.log, m = () => (new Error("Trace:").stack || "").substring(7), u = ((P = (h = e.debugging) == null ? void 0 : h.log) == null ? void 0 : P.logger) || console.debug, y = r && !r.writesOnly ? () => {
3216
- const b = l();
3217
- return u(`debugging: '${r.name}' read`, b, m()), b;
3218
- } : l, k = r && !r.readsOnly ? (b) => (u(`debugging: '${r.name}' written to`, b, m()), o(b)) : o, g = f ? Lt(y, t, s) : c(y), w = c(() => g.value);
3219
- return w.update = k, w;
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;
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 {
3220
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
+ });
3221
4007
  export {
3222
- la as CommonAlert,
3223
- We as CommonBadge,
3224
- Xe as CommonLoadingBar,
3225
- zn as CommonStepsBullet,
3226
- Mn as CommonStepsNumber,
3227
- Jt as CommonTextLink,
3228
- ee as FormButton,
3229
- Rn as FormCardButton,
3230
- Dn as FormCheckbox,
3231
- Wn as FormSelectBadges,
3232
- Ne as FormSelectBase,
3233
- Un as FormSelectSourceApps,
3234
- qn as FormSwitch,
3235
- Tn as FormTextArea,
3236
- Fn as FormTextInput,
3237
- An as GlobalToastRenderer,
3238
- J as GridListToggleValue,
3239
- ve as HorizontalDirection,
3240
- ta as InfiniteLoading,
3241
- Xn as LayoutDialog,
3242
- Nn as LayoutDisclosure,
3243
- Jn as LayoutGridListToggle,
3244
- Yn as LayoutMenu,
3245
- sa as LayoutPanel,
3246
- ea as LayoutTable,
3247
- Zn as LayoutTabs,
3248
- ne as ModifierKeys,
3249
- Ml as SourceAppBadge,
3250
- le as TailwindBreakpoints,
3251
- en as ThrottleOrDebounce,
3252
- se as ToastNotificationType,
3253
- En as ValidationHelpers,
3254
- ge as clientOs,
3255
- Hn as getKeyboardShortcutTitle,
3256
- Gn as onKeyboardShortcut,
3257
- Kn as useFormCheckboxModel,
3258
- Ke as useFormSelectChildInternals,
3259
- Qn as useOnBeforeWindowUnload,
3260
- sn as useResponsiveHorizontalDirectionCalculation,
3261
- tn as useWindowResizeHandler,
3262
- ml as useWrappingContainerHiddenCount,
3263
- na 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
3264
4064
  };
3265
4065
  //# sourceMappingURL=lib.js.map