@ghentcdh/ui 0.8.3 → 0.8.5

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/index.mjs CHANGED
@@ -1,44 +1,45 @@
1
- import { defineComponent as w, computed as v, openBlock as a, createBlock as y, resolveDynamicComponent as ne, normalizeClass as $, createCommentVNode as k, createElementBlock as p, createElementVNode as u, toDisplayString as h, unref as g, Fragment as x, renderList as P, mergeProps as B, resolveComponent as ue, withCtx as L, createTextVNode as z, ref as S, watch as X, onMounted as ke, renderSlot as M, createVNode as V, withDirectives as Y, vModelCheckbox as _e, normalizeStyle as G, useAttrs as Ve, getCurrentInstance as Ae, camelize as Ie, toHandlerKey as ae, withModifiers as ce, nextTick as $e, onUnmounted as Oe, normalizeProps as ee, guardReactiveProps as te, Transition as De, useModel as E, mergeModels as O, onBeforeUnmount as Re, vModelDynamic as Te, vModelText as Ce, useSlots as xe, toRef as we } from "vue";
1
+ import { defineComponent as k, computed as v, openBlock as r, createBlock as w, resolveDynamicComponent as ne, normalizeClass as C, createCommentVNode as _, createElementBlock as f, createElementVNode as u, toDisplayString as h, unref as g, Fragment as L, renderList as P, mergeProps as B, resolveComponent as ce, withCtx as S, createTextVNode as E, ref as x, watch as q, onUnmounted as _e, onMounted as Ce, withModifiers as le, renderSlot as M, createVNode as V, withDirectives as Y, vModelCheckbox as $e, normalizeStyle as X, useAttrs as Oe, getCurrentInstance as Ie, camelize as De, toHandlerKey as re, nextTick as xe, normalizeProps as ee, guardReactiveProps as te, Transition as Re, useModel as F, mergeModels as I, onBeforeUnmount as Te, vModelDynamic as Ee, vModelText as Le, useSlots as Se, toRef as we } from "vue";
2
2
  import { RouterLink as ze } from "vue-router";
3
3
  import { v4 as de } from "uuid";
4
- import { LinkIcon as Ne, DocumentTextIcon as je, EyeIcon as qe, CheckIcon as Ee, LanguageIcon as Fe, ChevronDoubleRightIcon as Ue, ChevronDoubleLeftIcon as Ke, ChevronUpIcon as He, ChevronDownIcon as We, ChevronLeftIcon as Ge, ChevronRightIcon as Xe, Bars3Icon as Ze, PaperClipIcon as Je, PlusCircleIcon as Qe, XMarkIcon as Ye, FunnelIcon as et, BarsArrowUpIcon as tt, BarsArrowDownIcon as ot, TrashIcon as st, PencilSquareIcon as nt } from "@heroicons/vue/24/outline";
5
- import lt from "@tiptap/starter-kit";
6
- import { useEditor as at, EditorContent as rt } from "@tiptap/vue-3";
7
- import { Markdown as it } from "tiptap-markdown";
8
- import { ChevronDownIcon as ut, ChevronRightIcon as ct } from "@heroicons/vue/24/solid";
4
+ import { LinkIcon as Ne, DocumentTextIcon as qe, EyeIcon as je, CheckIcon as Fe, LanguageIcon as Ke, ChevronDoubleRightIcon as Ue, ChevronDoubleLeftIcon as He, ChevronUpIcon as We, ChevronDownIcon as Ge, ChevronLeftIcon as Xe, ChevronRightIcon as Ze, Bars3Icon as Je, PaperClipIcon as Qe, PlusCircleIcon as Ye, XMarkIcon as et, FunnelIcon as tt, BarsArrowUpIcon as ot, BarsArrowDownIcon as st, TrashIcon as nt, PencilSquareIcon as lt } from "@heroicons/vue/24/outline";
5
+ import at from "@tiptap/starter-kit";
6
+ import { useEditor as rt, EditorContent as it } from "@tiptap/vue-3";
7
+ import { Markdown as ut } from "tiptap-markdown";
8
+ import { ChevronDownIcon as ct, ChevronRightIcon as dt } from "@heroicons/vue/24/solid";
9
9
  var T = /* @__PURE__ */ ((e) => (e.Edit = "Edit", e.Delete = "Delete", e.BarsArrowDown = "BarsArrowDown", e.BarsArrowUp = "BarsArrowUp", e.Funnel = "Funnel", e.Close = "Close", e.Plus = "Plus", e.PaperClip = "PaperClip", e.Hamburger = "Hamburger", e.ChevronRight = "ChevronRight", e.ChevronLeft = "ChevronLeft", e.ChevronDown = "ChevronDown", e.ChevronUp = "ChevronUp", e.DblChevronLeft = "DblChevronLeft", e.DblChevronRight = "DblChevronRight", e.Language = "Language", e.Check = "Check", e.View = "View", e.Text = "Text", e.Link = "Link", e))(T || {});
10
- const dt = {
11
- Edit: nt,
12
- Delete: st,
13
- BarsArrowDown: ot,
14
- BarsArrowUp: tt,
15
- Funnel: et,
16
- Close: Ye,
17
- Plus: Qe,
18
- PaperClip: Je,
19
- Hamburger: Ze,
20
- ChevronRight: Xe,
21
- ChevronLeft: Ge,
22
- ChevronDown: We,
23
- ChevronUp: He,
24
- DblChevronLeft: Ke,
10
+ const pt = {
11
+ Edit: lt,
12
+ Delete: nt,
13
+ BarsArrowDown: st,
14
+ BarsArrowUp: ot,
15
+ Funnel: tt,
16
+ Close: et,
17
+ Plus: Ye,
18
+ PaperClip: Qe,
19
+ Hamburger: Je,
20
+ ChevronRight: Ze,
21
+ ChevronLeft: Xe,
22
+ ChevronDown: Ge,
23
+ ChevronUp: We,
24
+ DblChevronLeft: He,
25
25
  DblChevronRight: Ue,
26
- Language: Fe,
27
- Check: Ee,
28
- View: qe,
29
- Text: je,
26
+ Language: Ke,
27
+ Check: Fe,
28
+ View: je,
29
+ Text: qe,
30
30
  Link: Ne
31
- }, pt = {
31
+ }, ft = {
32
32
  icon: { type: [String, Object, Function] },
33
33
  size: { type: String }
34
- }, q = /* @__PURE__ */ w({
34
+ }, j = /* @__PURE__ */ k({
35
35
  __name: "icon",
36
- props: pt,
36
+ props: ft,
37
37
  setup(e) {
38
- const t = e, o = v(() => t.icon ? typeof t.icon == "string" ? dt[t.icon] : t.icon : null);
39
- return (n, l) => o.value ? (a(), y(ne(o.value), {
38
+ const t = e, o = v(() => t.icon ? typeof t.icon == "string" ? pt[t.icon] : t.icon : null);
39
+ return (n, l) => o.value ? (r(), w(ne(o.value), {
40
40
  key: 0,
41
- class: $([
41
+ "aria-hidden": "true",
42
+ class: C([
42
43
  {
43
44
  "w-full h-full": !n.size,
44
45
  "w-2 h-2": n.size === "xs",
@@ -47,12 +48,13 @@ const dt = {
47
48
  "w-8 h-8": n.size === "xl"
48
49
  }
49
50
  ])
50
- }, null, 8, ["class"])) : k("", !0);
51
+ }, null, 8, ["class"])) : _("", !0);
51
52
  }
52
- }), ft = { class: "dropdown dropdown-end" }, mt = {
53
+ }), mt = { class: "dropdown dropdown-end" }, bt = {
53
54
  tabindex: "0",
55
+ role: "menu",
54
56
  class: "menu dropdown-content bg-white z-1 mt-4 p-2 shadow-sm"
55
- }, bt = { class: "min-w-max flex-no-wrap text-black" }, pe = /* @__PURE__ */ w({
57
+ }, gt = { class: "min-w-max flex-no-wrap text-black" }, pe = /* @__PURE__ */ k({
56
58
  __name: "sub-menu",
57
59
  props: {
58
60
  label: {},
@@ -63,29 +65,30 @@ const dt = {
63
65
  disableArrow: { type: Boolean }
64
66
  },
65
67
  setup(e) {
66
- return (t, o) => (a(), p("div", ft, [
68
+ return (t, o) => (r(), f("div", mt, [
67
69
  u("div", {
68
70
  tabindex: "0",
69
71
  role: "button",
70
- class: $([e.btnClass, "btn btn-ghost text-right flex-nowrap flex"])
72
+ "aria-haspopup": "menu",
73
+ class: C([e.btnClass, "btn btn-ghost text-right flex-nowrap flex"])
71
74
  }, [
72
75
  u("span", null, h(e.label), 1),
73
- e.disableArrow ? k("", !0) : (a(), y(g(q), {
76
+ e.disableArrow ? _("", !0) : (r(), w(g(j), {
74
77
  key: 0,
75
78
  icon: g(T).ChevronDown,
76
79
  size: "sm"
77
80
  }, null, 8, ["icon"]))
78
81
  ], 2),
79
- u("ul", mt, [
80
- u("li", bt, [
81
- (a(!0), p(x, null, P(e.items, (n) => (a(), y(Le, B({
82
+ u("ul", bt, [
83
+ u("li", gt, [
84
+ (r(!0), f(L, null, P(e.items, (n) => (r(), w(Pe, B({
82
85
  key: n.label
83
86
  }, { ref_for: !0 }, n), null, 16))), 128))
84
87
  ])
85
88
  ])
86
89
  ]));
87
90
  }
88
- }), oe = "btn btn-ghost text-left justify-between min-w-max font-normal", Le = /* @__PURE__ */ w({
91
+ }), oe = "btn btn-ghost text-left justify-between min-w-max font-normal", Pe = /* @__PURE__ */ k({
89
92
  __name: "menu-item",
90
93
  props: {
91
94
  label: {},
@@ -94,7 +97,7 @@ const dt = {
94
97
  disabled: { type: Boolean, default: !1 }
95
98
  },
96
99
  setup(e) {
97
- const t = e, o = v(() => !t.disabled && t.action && "routerLink" in t.action), n = v(() => !t.disabled && t.action), l = v(() => t.items?.length), r = v(() => {
100
+ const t = e, o = v(() => !t.disabled && t.action && "routerLink" in t.action), n = v(() => !t.disabled && t.action), l = v(() => t.items?.length), a = v(() => {
98
101
  const d = t.action;
99
102
  return d && "routerLink" in d && "params" in d ? {
100
103
  name: d.routerLink,
@@ -103,32 +106,32 @@ const dt = {
103
106
  }), c = () => {
104
107
  t.action?.();
105
108
  };
106
- return (d, f) => {
107
- const i = ue("RouterLink");
108
- return l.value ? (a(), y(pe, B({ key: 0 }, t, { "btn-class": oe }), null, 16)) : o.value ? (a(), y(i, {
109
+ return (d, p) => {
110
+ const i = ce("RouterLink");
111
+ return l.value ? (r(), w(pe, B({ key: 0 }, t, { "btn-class": oe }), null, 16)) : o.value ? (r(), w(i, {
109
112
  key: 1,
110
- to: r.value,
111
- class: $(oe),
113
+ to: a.value,
114
+ class: C(oe),
112
115
  onClick: c
113
116
  }, {
114
- default: L(() => [
115
- z(h(e.label), 1)
117
+ default: S(() => [
118
+ E(h(e.label), 1)
116
119
  ]),
117
120
  _: 1
118
- }, 8, ["to"])) : n.value ? (a(), p("button", {
121
+ }, 8, ["to"])) : n.value ? (r(), f("button", {
119
122
  key: 2,
120
- class: $(oe),
123
+ class: C(oe),
121
124
  onClick: c
122
- }, h(e.label), 1)) : (a(), p("div", {
125
+ }, h(e.label), 1)) : (r(), f("div", {
123
126
  key: 3,
124
- class: $([oe, { "btn-disabled": e.disabled }])
127
+ class: C([oe, { "btn-disabled": e.disabled }])
125
128
  }, h(e.label), 3));
126
129
  };
127
130
  }
128
- }), gt = { class: "navbar bg-base-100 shadow-sm" }, vt = { class: "flex-1" }, ht = {
131
+ }), vt = { class: "navbar bg-base-100 shadow-sm" }, ht = { class: "flex-1" }, yt = {
129
132
  key: 0,
130
133
  class: "breadcrumbs text-sm"
131
- }, yt = { class: "flex grow justify-end px-2" }, wt = { class: "flex items-stretch" }, dn = /* @__PURE__ */ w({
134
+ }, wt = { class: "flex grow justify-end px-2" }, kt = { class: "flex items-stretch" }, hn = /* @__PURE__ */ k({
132
135
  __name: "menu",
133
136
  props: {
134
137
  menu: {},
@@ -136,34 +139,34 @@ const dt = {
136
139
  },
137
140
  setup(e) {
138
141
  return (t, o) => {
139
- const n = ue("RouterLink");
140
- return a(), p("nav", gt, [
141
- u("div", vt, [
142
- e.breadcrumbs ? (a(), p("div", ht, [
142
+ const n = ce("RouterLink");
143
+ return r(), f("nav", vt, [
144
+ u("div", ht, [
145
+ e.breadcrumbs ? (r(), f("div", yt, [
143
146
  u("ul", null, [
144
- (a(!0), p(x, null, P(e.breadcrumbs, (l) => (a(), p("li", {
147
+ (r(!0), f(L, null, P(e.breadcrumbs, (l) => (r(), f("li", {
145
148
  key: l.label
146
149
  }, [
147
- l.routerLink ? (a(), y(n, {
150
+ l.routerLink ? (r(), w(n, {
148
151
  key: 0,
149
152
  to: { name: l.routerLink, params: l.params },
150
153
  role: "navigation",
151
- "area-label": l.label
154
+ "aria-label": l.label
152
155
  }, {
153
- default: L(() => [
154
- z(h(l.label), 1)
156
+ default: S(() => [
157
+ E(h(l.label), 1)
155
158
  ]),
156
159
  _: 2
157
- }, 1032, ["to", "area-label"])) : (a(), p(x, { key: 1 }, [
158
- z(h(l.label), 1)
160
+ }, 1032, ["to", "aria-label"])) : (r(), f(L, { key: 1 }, [
161
+ E(h(l.label), 1)
159
162
  ], 64))
160
163
  ]))), 128))
161
164
  ])
162
- ])) : k("", !0)
165
+ ])) : _("", !0)
163
166
  ]),
164
- u("div", yt, [
165
- u("div", wt, [
166
- (a(!0), p(x, null, P(e.menu, (l) => (a(), y(Le, B({
167
+ u("div", wt, [
168
+ u("div", kt, [
169
+ (r(!0), f(L, null, P(e.menu, (l) => (r(), w(Pe, B({
167
170
  key: l.label
168
171
  }, { ref_for: !0 }, l), null, 16))), 128))
169
172
  ])
@@ -171,14 +174,14 @@ const dt = {
171
174
  ]);
172
175
  };
173
176
  }
174
- }), pn = /* @__PURE__ */ w({
177
+ }), yn = /* @__PURE__ */ k({
175
178
  __name: "dropdown",
176
179
  props: {
177
180
  items: {}
178
181
  },
179
182
  setup(e) {
180
- const t = S(!0);
181
- return (o, n) => (a(), y(pe, {
183
+ const t = x(!0);
184
+ return (o, n) => (r(), w(pe, {
182
185
  items: e.items,
183
186
  label: "test",
184
187
  open: t.value,
@@ -186,149 +189,204 @@ const dt = {
186
189
  "disable-arrow": !0
187
190
  }, null, 8, ["items", "open"]));
188
191
  }
189
- }), kt = { class: "font-bold" }, _t = { class: "pt-4" }, $t = { class: "flex justify-end gap-2 p-2 mt-2 border-t border-gray-300" }, Ct = /* @__PURE__ */ w({
192
+ }), _t = {
193
+ modalTitle: { type: String, required: !0 },
194
+ buttonLabel: { type: String },
195
+ buttonSaveLabel: { type: String },
196
+ data: { default: void 0 },
197
+ open: { type: Boolean, default: !1 },
198
+ disableClose: { type: Boolean, default: !1 },
199
+ width: { type: String, default: "sm" },
200
+ name: { type: String, required: !0 }
201
+ }, Ct = ["closeModal"], $t = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])', ke = (e) => Array.from(e.querySelectorAll($t)), xt = ({
202
+ containerRef: e,
203
+ isActive: t,
204
+ onEscape: o,
205
+ restoreFocus: n = !0
206
+ }) => {
207
+ let l = null;
208
+ const a = (p) => {
209
+ const i = e.value;
210
+ if (!i) return;
211
+ if (p.key === "Escape") {
212
+ o?.();
213
+ return;
214
+ }
215
+ if (p.key !== "Tab") return;
216
+ const s = ke(i);
217
+ if (s.length === 0) return;
218
+ const m = s[0], b = s[s.length - 1];
219
+ p.shiftKey ? document.activeElement === m && (p.preventDefault(), b.focus()) : document.activeElement === b && (p.preventDefault(), m.focus());
220
+ }, c = () => {
221
+ const p = e.value;
222
+ if (!p) return;
223
+ l = document.activeElement, document.addEventListener("keydown", a);
224
+ const i = ke(p);
225
+ i.length > 0 && i[0].focus();
226
+ }, d = () => {
227
+ document.removeEventListener("keydown", a), n && l && (l.focus(), l = null);
228
+ };
229
+ q(t, (p) => {
230
+ p ? c() : d();
231
+ }), _e(() => {
232
+ d();
233
+ });
234
+ }, Lt = {
235
+ xs: "max-w-xs w-[50VW]",
236
+ sm: "max-w-sm w-[50VW]",
237
+ lg: "max-w-2xl w-[80VW]",
238
+ xl: "max-w-[80VW] w-[80VW]"
239
+ }, St = {
240
+ xs: "btn-xs",
241
+ sm: "btn-sm",
242
+ lg: "btn-sm",
243
+ xl: "btn"
244
+ }, Pt = {
245
+ xs: "badge-xs text-xxs",
246
+ sm: "badge-sm text-xs",
247
+ lg: "badge-sm text-xs",
248
+ xl: "badge text-xs"
249
+ }, Mt = { class: "flex justify-end gap-2 p-2 mt-2 border-t border-gray-300" }, Bt = /* @__PURE__ */ k({
190
250
  __name: "modal",
191
- props: {
192
- modalTitle: {},
193
- buttonLabel: {},
194
- buttonSaveLabel: {},
195
- data: {},
196
- open: { type: Boolean, default: !1 },
197
- disableClose: { type: Boolean, default: !1 },
198
- width: { default: "sm" }
199
- },
200
- emits: ["closeModal"],
251
+ props: _t,
252
+ emits: Ct,
201
253
  setup(e, { expose: t, emit: o }) {
202
- const n = {
203
- xs: "max-w-xs w-[50VW]",
204
- sm: "max-w-sm w-[50VW]",
205
- lg: "max-w-2xl w-[80VW]",
206
- xl: "max-w-[80VW] w-[80VW]"
207
- }, l = e, r = `modal_${de()}`, c = o, d = () => {
208
- document.getElementById(r)?.showModal();
209
- }, f = () => {
210
- document.getElementById(r)?.close(), c("closeModal");
254
+ const n = e, l = `modal_${de()}`, a = `${l}_title`, c = `${l}_content`, d = x(null), p = x(!1), i = o, s = () => {
255
+ d.value?.showModal(), p.value = !0;
256
+ }, m = () => {
257
+ d.value?.close(), p.value = !1, i("closeModal");
258
+ }, b = () => {
259
+ n.disableClose || m();
211
260
  };
212
- return t({ closeModal: f, openModal: d }), X(
213
- () => l.open,
214
- (i, s, m) => {
215
- l.open ? d() : f();
261
+ return xt({
262
+ containerRef: d,
263
+ isActive: p,
264
+ onEscape: () => {
265
+ n.disableClose || m();
266
+ }
267
+ }), t({ closeModal: m, openModal: s }), q(
268
+ () => n.open,
269
+ () => {
270
+ n.open ? s() : m();
216
271
  }
217
- ), ke(() => {
218
- l.open && d();
219
- }), (i, s) => (a(), p("dialog", {
220
- id: r,
221
- class: "modal"
272
+ ), Ce(() => {
273
+ n.open && s();
274
+ }), (y, D) => (r(), f("dialog", {
275
+ ref_key: "dialogRef",
276
+ ref: d,
277
+ class: "modal",
278
+ role: "dialog",
279
+ "aria-modal": "true",
280
+ "aria-labelledby": a,
281
+ "aria-describedby": c,
282
+ onCancel: le(b, ["prevent"])
222
283
  }, [
223
284
  u("div", {
224
- class: $(["modal-box bg-white", n[e.width]])
285
+ class: C(["modal-box bg-white", g(Lt)[y.width]])
225
286
  }, [
226
- e.disableClose ? k("", !0) : (a(), p("button", {
287
+ y.disableClose ? _("", !0) : (r(), f("button", {
227
288
  key: 0,
228
289
  type: "button",
229
290
  class: "btn btn-sm btn-circle btn-ghost absolute right-2 top-2",
230
- onClick: f
291
+ "aria-label": "Close",
292
+ onClick: m
231
293
  }, " ✕ ")),
232
- u("h3", kt, h(e.modalTitle), 1),
233
- u("div", _t, [
234
- M(i.$slots, "content")
294
+ u("h3", {
295
+ id: a,
296
+ class: "font-bold"
297
+ }, h(y.modalTitle), 1),
298
+ u("div", {
299
+ id: c,
300
+ class: "pt-4"
301
+ }, [
302
+ M(y.$slots, "content")
235
303
  ]),
236
- u("div", $t, [
237
- M(i.$slots, "actions")
304
+ u("div", Mt, [
305
+ M(y.$slots, "actions")
238
306
  ])
239
307
  ], 2)
240
- ]));
308
+ ], 544));
241
309
  }
242
310
  });
243
- var fe = /* @__PURE__ */ ((e) => (e.button = "button", e.submit = "submit", e.reset = "reset", e))(fe || {}), Se = /* @__PURE__ */ ((e) => (e.a = "a", e.button = "button", e))(Se || {}), j = /* @__PURE__ */ ((e) => (e.blank = "blank", e.primary = "primary", e.secondary = "secondary", e.error = "error", e))(j || {});
244
- const xt = {
311
+ var fe = /* @__PURE__ */ ((e) => (e.button = "button", e.submit = "submit", e.reset = "reset", e))(fe || {}), Me = /* @__PURE__ */ ((e) => (e.a = "a", e.button = "button", e))(Me || {}), N = /* @__PURE__ */ ((e) => (e.blank = "blank", e.primary = "primary", e.secondary = "secondary", e.error = "error", e))(N || {});
312
+ const Vt = {
245
313
  blank: "btn-ghost",
246
314
  primary: "btn-primary",
247
315
  secondary: "btn-soft btn-primary",
248
316
  error: "btn-error"
249
- }, Lt = {
317
+ }, At = {
250
318
  blank: "badge-ghost",
251
319
  primary: "badge-primary",
252
320
  secondary: "badge-soft badge-primary",
253
321
  error: "badge-error"
254
- }, St = {
322
+ }, Ot = {
255
323
  href: { type: String },
256
324
  disabled: { type: Boolean, default: !1 },
257
325
  tooltip: { type: String },
258
- as: { type: String, default: Se.button },
326
+ as: { type: String, default: Me.button },
259
327
  icon: { type: [String, Object, Function] },
260
328
  type: { type: String, default: fe.button },
261
329
  outline: { type: Boolean, default: !1 },
262
- color: { type: String, default: j.primary },
330
+ color: { type: String, default: N.primary },
263
331
  size: { type: String, default: "sm" },
264
332
  square: { type: Boolean, default: !1 }
265
- }, Pt = ["click"], Mt = {
333
+ }, It = ["click"], Dt = {
266
334
  icon: { type: [String, Object, Function] },
267
335
  type: { type: String, default: fe.button },
268
336
  color: { type: String },
269
337
  disabled: { type: Boolean, default: !1 },
270
338
  size: { type: String, default: "sm" }
271
- }, Bt = ["click"], Vt = {
272
- xs: "btn-xs",
273
- sm: "btn-sm",
274
- lg: "btn-sm",
275
- xl: "btn"
276
- }, At = {
277
- xs: "badge-xs text-xxs",
278
- sm: "badge-sm text-xs",
279
- lg: "badge-sm text-xs",
280
- xl: "badge text-xs"
281
- }, N = /* @__PURE__ */ w({
339
+ }, Rt = ["click"], z = /* @__PURE__ */ k({
282
340
  __name: "btn",
283
- props: St,
284
- emits: Pt,
341
+ props: Ot,
342
+ emits: It,
285
343
  setup(e, { emit: t }) {
286
344
  const o = e, n = t;
287
- return (l, r) => (a(), y(ne(o.as), {
288
- class: $([
345
+ return (l, a) => (r(), w(ne(o.as), {
346
+ class: C([
289
347
  "btn p-1 flex justify-center flex-nowrap",
290
- g(xt)[o.color],
291
- g(Vt)[o.size],
348
+ g(Vt)[o.color],
349
+ g(St)[o.size],
292
350
  { "btn-outline": o.outline, "btn-square": o.square, tooltip: o.tooltip }
293
351
  ]),
294
352
  href: o.href,
295
353
  type: o.type,
296
354
  disabled: o.disabled,
297
355
  "data-tip": o.tooltip,
298
- onClick: r[0] || (r[0] = (c) => n("click"))
356
+ onClick: a[0] || (a[0] = (c) => n("click"))
299
357
  }, {
300
- default: L(() => [
301
- o.icon ? (a(), y(g(q), {
358
+ default: S(() => [
359
+ o.icon ? (r(), w(g(j), {
302
360
  key: 0,
303
361
  icon: o.icon,
304
362
  size: o.size
305
- }, null, 8, ["icon", "size"])) : k("", !0),
363
+ }, null, 8, ["icon", "size"])) : _("", !0),
306
364
  M(l.$slots, "default")
307
365
  ]),
308
366
  _: 3
309
367
  }, 8, ["class", "href", "type", "disabled", "data-tip"]));
310
368
  }
311
- }), It = ["type", "disabled"], fn = /* @__PURE__ */ w({
369
+ }), Tt = ["type", "disabled"], wn = /* @__PURE__ */ k({
312
370
  __name: "btn-badge",
313
- props: Mt,
314
- emits: Bt,
371
+ props: Dt,
372
+ emits: Rt,
315
373
  setup(e, { emit: t }) {
316
374
  const o = e, n = t;
317
- return (l, r) => (a(), p("button", {
318
- class: $(["badge gap-1", g(At)[o.size], g(Lt)[o.color]]),
375
+ return (l, a) => (r(), f("button", {
376
+ class: C(["badge gap-1", g(Pt)[o.size], g(At)[o.color]]),
319
377
  type: o.type,
320
378
  disabled: o.disabled,
321
- onClick: r[0] || (r[0] = (c) => n("click"))
379
+ onClick: a[0] || (a[0] = (c) => n("click"))
322
380
  }, [
323
381
  M(l.$slots, "default"),
324
- o.icon ? (a(), y(g(q), {
382
+ o.icon ? (r(), w(g(j), {
325
383
  key: 0,
326
384
  icon: o.icon,
327
385
  size: o.size
328
- }, null, 8, ["icon", "size"])) : k("", !0)
329
- ], 10, It));
386
+ }, null, 8, ["icon", "size"])) : _("", !0)
387
+ ], 10, Tt));
330
388
  }
331
- }), Ot = /* @__PURE__ */ w({
389
+ }), Et = /* @__PURE__ */ k({
332
390
  __name: "confirmModal",
333
391
  props: {
334
392
  title: {},
@@ -341,33 +399,35 @@ const xt = {
341
399
  const o = t, n = (l) => {
342
400
  o("closeModal", { confirmed: l });
343
401
  };
344
- return (l, r) => (a(), y(Ct, {
402
+ return (l, a) => (r(), w(Bt, {
345
403
  "modal-title": e.title,
346
404
  open: !0,
347
405
  "disable-close": !0
348
406
  }, {
349
- content: L(() => [
350
- z(h(e.message), 1)
407
+ content: S(() => [
408
+ E(h(e.message), 1)
351
409
  ]),
352
- actions: L(() => [
353
- V(g(N), {
354
- color: g(j).secondary,
410
+ actions: S(() => [
411
+ V(g(z), {
412
+ color: g(N).secondary,
355
413
  outline: !0,
356
- onClick: r[0] || (r[0] = (c) => n(!1))
414
+ "aria-label": e.cancelLabel,
415
+ onClick: a[0] || (a[0] = (c) => n(!1))
357
416
  }, {
358
- default: L(() => [
359
- z(h(e.cancelLabel), 1)
417
+ default: S(() => [
418
+ E(h(e.cancelLabel), 1)
360
419
  ]),
361
420
  _: 1
362
- }, 8, ["color"]),
363
- V(g(N), {
364
- onClick: r[1] || (r[1] = (c) => n(!0))
421
+ }, 8, ["color", "aria-label"]),
422
+ V(g(z), {
423
+ "aria-label": e.confirmLabel,
424
+ onClick: a[1] || (a[1] = (c) => n(!0))
365
425
  }, {
366
- default: L(() => [
367
- z(h(e.confirmLabel), 1)
426
+ default: S(() => [
427
+ E(h(e.confirmLabel), 1)
368
428
  ]),
369
429
  _: 1
370
- })
430
+ }, 8, ["aria-label"])
371
431
  ]),
372
432
  _: 1
373
433
  }, 8, ["modal-title"]));
@@ -375,12 +435,12 @@ const xt = {
375
435
  });
376
436
  class me {
377
437
  constructor() {
378
- this.showModal = S(!1), this.modals = [];
438
+ this.showModal = x(!1), this.modals = [];
379
439
  }
380
440
  openModal(t) {
381
441
  const o = t.props.onClose, n = de(), l = t;
382
- t.props.onClose = (r) => {
383
- o(r), this.closeModal(n);
442
+ t.props.onClose = (a) => {
443
+ o(a), this.closeModal(n);
384
444
  }, l.id = n, this.modals = [...this.modals, l], this.showModal.value = Date.now();
385
445
  }
386
446
  closeModal(t) {
@@ -388,7 +448,7 @@ class me {
388
448
  }
389
449
  static showConfirm(t) {
390
450
  this.getInstance().openModal({
391
- component: Ot,
451
+ component: Et,
392
452
  props: t
393
453
  });
394
454
  }
@@ -405,19 +465,19 @@ class me {
405
465
  this.modals = [], this.showModal.value = !1;
406
466
  }
407
467
  }
408
- const Dt = /* @__PURE__ */ w({
468
+ const zt = /* @__PURE__ */ k({
409
469
  __name: "modalWrapper",
410
470
  setup(e) {
411
471
  const t = me.getInstance(), o = v(() => t.showModal.value ? t.modals : []);
412
- return (n, l) => (a(!0), p(x, null, P(o.value, (r) => (a(), y(ne(r?.component), B({
413
- key: r.id,
472
+ return (n, l) => (r(!0), f(L, null, P(o.value, (a) => (r(), w(ne(a?.component), B({
473
+ key: a.id,
414
474
  ref_for: !0
415
- }, r?.props, {
475
+ }, a?.props, {
416
476
  open: !0,
417
- onCloseModal: r?.props?.onClose
477
+ onCloseModal: a?.props?.onClose
418
478
  }), null, 16, ["onCloseModal"]))), 128));
419
479
  }
420
- }), Rt = /* @__PURE__ */ w({
480
+ }), Nt = /* @__PURE__ */ k({
421
481
  __name: "notification-message",
422
482
  props: {
423
483
  message: {},
@@ -430,20 +490,20 @@ const Dt = /* @__PURE__ */ w({
430
490
  warning: "alert-warning",
431
491
  info: "alert-info"
432
492
  };
433
- return (o, n) => (a(), p("div", {
493
+ return (o, n) => (r(), f("div", {
434
494
  role: "alert",
435
- class: $(`alert ${t[e.type]} `)
495
+ class: C(`alert ${t[e.type]} `)
436
496
  }, [
437
497
  u("span", null, h(e.message), 1)
438
498
  ], 2));
439
499
  }
440
- }), Tt = 5e3;
500
+ }), qt = 5e3;
441
501
  class be {
442
502
  constructor() {
443
- this.notifications = S([]), this.addNotification = (t, o = "info") => {
503
+ this.notifications = x([]), this.addNotification = (t, o = "info") => {
444
504
  const n = {
445
505
  id: de(),
446
- duration: Tt,
506
+ duration: qt,
447
507
  message: t,
448
508
  type: o
449
509
  };
@@ -475,17 +535,17 @@ class be {
475
535
  this.getInstance().removeNotification(t);
476
536
  }
477
537
  }
478
- const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__ */ w({
538
+ const jt = { class: "toast toast-top toast-center z-[999]" }, Ft = /* @__PURE__ */ k({
479
539
  __name: "notifications",
480
540
  setup(e) {
481
541
  const t = be.getInstance();
482
- return (o, n) => (a(), p("div", zt, [
483
- (a(!0), p(x, null, P(g(t).notifications.value, (l) => (a(), y(Rt, B({
542
+ return (o, n) => (r(), f("div", jt, [
543
+ (r(!0), f(L, null, P(g(t).notifications.value, (l) => (r(), w(Nt, B({
484
544
  key: l.id
485
545
  }, { ref_for: !0 }, l), null, 16))), 128))
486
546
  ]));
487
547
  }
488
- }), jt = { class: "flex h-screen flex-col" }, qt = { class: "shrink-0" }, Et = { class: "navbar bg-primary text-primary-content w-full z-100" }, Ft = { class: "navbar-start" }, Ut = { class: "navbar-center" }, Kt = ["href"], Ht = { class: "navbar-end" }, Wt = { class: "drawer-content overflow-y-auto mb-2 mr-2 shadow-md" }, Gt = { class: "drawer-side h-full shadow-md" }, Xt = { class: "flex-grow overflow-y-auto" }, Zt = { class: "bg-base-200 p-4" }, mn = /* @__PURE__ */ w({
548
+ }), Kt = { class: "flex h-screen flex-col" }, Ut = { class: "shrink-0" }, Ht = { class: "navbar bg-primary text-primary-content w-full z-100" }, Wt = { class: "navbar-start" }, Gt = { class: "navbar-center" }, Xt = ["href"], Zt = { class: "navbar-end" }, Jt = { class: "drawer-content overflow-y-auto mb-2 mr-2 shadow-md" }, Qt = { class: "drawer-side h-full shadow-md" }, Yt = { class: "flex-grow overflow-y-auto" }, eo = { class: "bg-base-200 p-4" }, kn = /* @__PURE__ */ k({
489
549
  __name: "shell.component",
490
550
  props: {
491
551
  title: {},
@@ -496,7 +556,7 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
496
556
  },
497
557
  emits: ["logout"],
498
558
  setup(e, { emit: t }) {
499
- const n = e, l = S(!1), r = () => {
559
+ const n = e, l = x(!1), a = () => {
500
560
  l.value = !l.value;
501
561
  }, c = t, d = v(() => n.user ? {
502
562
  label: n.user.name,
@@ -509,36 +569,36 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
509
569
  }
510
570
  ]
511
571
  } : null);
512
- return (f, i) => (a(), p(x, null, [
513
- V(Nt),
514
- V(g(Dt)),
515
- u("div", jt, [
516
- u("header", qt, [
517
- u("nav", Et, [
518
- u("div", Ft, [
572
+ return (p, i) => (r(), f(L, null, [
573
+ V(Ft),
574
+ V(g(zt)),
575
+ u("div", Kt, [
576
+ u("header", Ut, [
577
+ u("nav", Ht, [
578
+ u("div", Wt, [
519
579
  u("button", {
520
580
  "aria-label": "open sidebar",
521
581
  class: "btn btn-square btn-ghost p-1",
522
- onClick: r
582
+ onClick: a
523
583
  }, [
524
- V(g(q), {
584
+ V(g(j), {
525
585
  icon: g(T).Hamburger
526
586
  }, null, 8, ["icon"])
527
587
  ])
528
588
  ]),
529
- u("div", Ut, [
589
+ u("div", Gt, [
530
590
  u("a", {
531
591
  class: "btn btn-ghost text-primary-content text-lg color-white",
532
592
  href: g("/")
533
- }, h(e.title), 9, Kt)
593
+ }, h(e.title), 9, Xt)
534
594
  ]),
535
- u("div", Ht, [
536
- d.value ? (a(), y(g(pe), B({ key: 0 }, d.value, { "btn-class": "" }), null, 16)) : k("", !0)
595
+ u("div", Zt, [
596
+ d.value ? (r(), w(g(pe), B({ key: 0 }, d.value, { "btn-class": "" }), null, 16)) : _("", !0)
537
597
  ])
538
598
  ])
539
599
  ]),
540
600
  u("div", {
541
- class: $(["drawer flex-1 overflow-hidden", { "drawer-open": l.value }])
601
+ class: C(["drawer flex-1 overflow-hidden", { "drawer-open": l.value }])
542
602
  }, [
543
603
  Y(u("input", {
544
604
  id: "app-drawer",
@@ -546,12 +606,12 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
546
606
  type: "checkbox",
547
607
  class: "drawer-toggle"
548
608
  }, null, 512), [
549
- [_e, l.value]
609
+ [$e, l.value]
550
610
  ]),
551
- u("main", Wt, [
552
- M(f.$slots, "default")
611
+ u("main", Jt, [
612
+ M(p.$slots, "default")
553
613
  ]),
554
- u("div", Gt, [
614
+ u("div", Qt, [
555
615
  i[1] || (i[1] = u("label", {
556
616
  for: "app-drawer",
557
617
  "aria-label": "close sidebar",
@@ -559,77 +619,77 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
559
619
  }, null, -1)),
560
620
  u("div", {
561
621
  class: "menu bg-base-100 h-full flex flex-col justify-between",
562
- style: G({ width: e.widthSidebar + "px" })
622
+ style: X({ width: e.widthSidebar + "px" })
563
623
  }, [
564
- u("ul", Xt, [
565
- (a(!0), p(x, null, P(e.menu, (s) => (a(), p("li", {
624
+ u("ul", Yt, [
625
+ (r(!0), f(L, null, P(e.menu, (s) => (r(), f("li", {
566
626
  key: s.label
567
627
  }, [
568
628
  V(g(ze), {
569
629
  to: { name: s.routerLink, params: s.params }
570
630
  }, {
571
- default: L(() => [
572
- z(h(s.label), 1)
631
+ default: S(() => [
632
+ E(h(s.label), 1)
573
633
  ]),
574
634
  _: 2
575
635
  }, 1032, ["to"])
576
636
  ]))), 128))
577
637
  ]),
578
- u("div", Zt, " version: " + h(e.version), 1)
638
+ u("div", eo, " version: " + h(e.version), 1)
579
639
  ], 4)
580
640
  ])
581
641
  ], 2)
582
642
  ])
583
643
  ], 64));
584
644
  }
585
- }), Jt = {
645
+ }), to = {
586
646
  currentPage: { type: Number, required: !0 },
587
647
  page: { type: Number, required: !0 },
588
648
  label: { type: String, required: !0 },
589
649
  neverActive: { type: Boolean, default: !1 },
590
650
  disabled: { type: Boolean, default: !1 }
591
- }, Qt = ["updatePage", "updatePageSize"], J = /* @__PURE__ */ w({
651
+ }, oo = ["updatePage", "updatePageSize"], J = /* @__PURE__ */ k({
592
652
  __name: "pagination-button.component",
593
- props: Jt,
594
- emits: Qt,
653
+ props: to,
654
+ emits: oo,
595
655
  setup(e, { emit: t }) {
596
656
  const o = e, n = t, l = v(
597
657
  () => o.neverActive ? !1 : o.page === o.currentPage
598
- ), r = v(() => o.neverActive ? j.blank : l.value ? j.primary : j.secondary), c = () => {
658
+ ), a = v(() => o.neverActive ? N.blank : l.value ? N.primary : N.secondary), c = () => {
599
659
  n("updatePage", o.page);
600
660
  };
601
- return (d, f) => (a(), y(g(N), {
661
+ return (d, p) => (r(), w(g(z), {
602
662
  disabled: d.disabled,
603
663
  square: !0,
604
664
  size: "xs",
605
- color: r.value,
606
- onClick: f[0] || (f[0] = (i) => c())
665
+ color: a.value,
666
+ onClick: p[0] || (p[0] = (i) => c())
607
667
  }, {
608
- default: L(() => [
609
- z(h(d.label), 1)
668
+ default: S(() => [
669
+ E(h(d.label), 1)
610
670
  ]),
611
671
  _: 1
612
672
  }, 8, ["disabled", "color"]));
613
673
  }
614
- }), Yt = {
674
+ }), so = {
615
675
  totalItems: { type: Number, default: 0 },
616
676
  itemsPerPage: { type: Number, default: 1 },
617
677
  currentPage: { type: Number, default: 1 }
618
- }, eo = ["updatePage", "updatePageSize"], to = { class: "flex gap-2" }, oo = { class: "flex flex-1 justify-center items-center" }, so = { class: "flex gap-1" }, no = { class: "text-sm" }, Q = 6, lo = /* @__PURE__ */ w({
678
+ }, no = ["updatePage", "updatePageSize"], lo = { class: "flex gap-2" }, ao = { class: "flex flex-1 justify-center items-center" }, ro = { class: "flex gap-1" }, io = { class: "text-sm" }, Q = 6, uo = /* @__PURE__ */ k({
619
679
  __name: "pagination.component",
620
- props: Yt,
621
- emits: eo,
680
+ props: so,
681
+ emits: no,
622
682
  setup(e, { emit: t }) {
623
683
  const o = e, n = t, l = v(() => {
624
684
  let s = Math.ceil(o.totalItems / o.itemsPerPage);
625
685
  return s < 1 ? 1 : s;
626
- }), r = Q / 2, c = v(() => {
686
+ }), a = Q / 2, c = v(() => {
627
687
  if (l.value <= Q)
628
688
  return {
629
689
  min: 1,
630
690
  max: l.value
631
691
  };
632
- let s = o.currentPage - r;
692
+ let s = o.currentPage - a;
633
693
  s <= 1 ? s = 1 : s + Q > l.value && (s = l.value - Q);
634
694
  let m = s + Q;
635
695
  return {
@@ -642,25 +702,25 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
642
702
  page: -10,
643
703
  disabled: !0,
644
704
  neverActive: !0
645
- }), f = v(() => {
705
+ }), p = v(() => {
646
706
  let s = l.value;
647
707
  s < 1 && (s = 1);
648
- const m = o.currentPage, b = [], { min: _, max: D } = c.value;
649
- return Array.from({ length: s }, (K, A) => {
650
- const C = A + 1;
651
- C !== 1 && C !== s && (C > D || C < _) || (C === s && s > 1 && D < s && b.push(d(m)), b.push({
652
- label: `${C}`,
708
+ const m = o.currentPage, b = [], { min: y, max: D } = c.value;
709
+ return Array.from({ length: s }, (H, A) => {
710
+ const $ = A + 1;
711
+ $ !== 1 && $ !== s && ($ > D || $ < y) || ($ === s && s > 1 && D < s && b.push(d(m)), b.push({
712
+ label: `${$}`,
653
713
  totalPages: s,
654
714
  currentPage: m,
655
- page: C
656
- }), C === 1 && s > 1 && _ > 1 && b.push(d(m)));
715
+ page: $
716
+ }), $ === 1 && s > 1 && y > 1 && b.push(d(m)));
657
717
  }), b;
658
718
  }), i = (s) => {
659
719
  n("updatePage", s);
660
720
  };
661
- return (s, m) => (a(), p("div", to, [
662
- u("div", oo, [
663
- u("div", so, [
721
+ return (s, m) => (r(), f("div", lo, [
722
+ u("div", ao, [
723
+ u("div", ro, [
664
724
  V(J, B(o, {
665
725
  page: 1,
666
726
  label: "<<",
@@ -677,7 +737,7 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
677
737
  disabled: s.currentPage === 1,
678
738
  onUpdatePage: i
679
739
  }), null, 16, ["page", "current-page", "disabled"]),
680
- (a(!0), p(x, null, P(f.value, (b) => (a(), y(J, B({
740
+ (r(!0), f(L, null, P(p.value, (b) => (r(), w(J, B({
681
741
  key: b.page,
682
742
  ref_for: !0
683
743
  }, b, { onUpdatePage: i }), null, 16))), 128)),
@@ -699,16 +759,16 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
699
759
  }), null, 16, ["page", "current-page", "disabled"])
700
760
  ])
701
761
  ]),
702
- u("div", no, " page " + h(s.currentPage) + " of " + h(l.value), 1)
762
+ u("div", io, " page " + h(s.currentPage) + " of " + h(l.value), 1)
703
763
  ]));
704
764
  }
705
- }), ao = {
765
+ }), co = {
706
766
  data: { type: Object, required: !0 },
707
767
  column: { type: Object, required: !0 },
708
768
  options: { type: Object }
709
- }, bn = /* @__PURE__ */ w({
769
+ }, _n = /* @__PURE__ */ k({
710
770
  __name: "text.cell",
711
- props: ao,
771
+ props: co,
712
772
  setup(e) {
713
773
  const t = e, o = v(() => {
714
774
  const n = t.data[t.column.id];
@@ -716,167 +776,167 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
716
776
  });
717
777
  return (n, l) => h(o.value);
718
778
  }
719
- }), ro = {
779
+ }), po = {
720
780
  column: { type: Object, required: !0 },
721
781
  sortColumn: { type: String },
722
782
  sortDirection: { type: String }
723
- }, io = ["sort"], uo = { class: "flex-grow pr-2" }, co = { class: "h-4 w-4" }, po = /* @__PURE__ */ w({
783
+ }, fo = ["sort"], mo = { class: "flex-grow pr-2" }, bo = { class: "h-4 w-4" }, go = /* @__PURE__ */ k({
724
784
  __name: "sort.header",
725
- props: ro,
726
- emits: io,
785
+ props: po,
786
+ emits: fo,
727
787
  setup(e, { emit: t }) {
728
788
  const o = e, n = t, l = v(
729
789
  () => o.sortDirection === "asc" ? T.BarsArrowUp : T.BarsArrowDown
730
- ), r = v(() => o.column.options?.sortId ?? o.column.id), c = () => {
731
- n("sort", r.value);
790
+ ), a = v(() => o.column.options?.sortId ?? o.column.id), c = () => {
791
+ n("sort", a.value);
732
792
  };
733
- return (d, f) => (a(), p("button", {
793
+ return (d, p) => (r(), f("button", {
734
794
  class: "flex items-center",
735
795
  onClick: c
736
796
  }, [
737
- u("span", uo, h(d.column.label), 1),
738
- u("div", co, [
739
- d.sortColumn === r.value ? (a(), y(g(q), {
797
+ u("span", mo, h(d.column.label), 1),
798
+ u("div", bo, [
799
+ d.sortColumn === a.value ? (r(), w(g(j), {
740
800
  key: 0,
741
801
  icon: l.value
742
- }, null, 8, ["icon"])) : k("", !0)
802
+ }, null, 8, ["icon"])) : _("", !0)
743
803
  ])
744
804
  ]));
745
805
  }
746
- }), fo = {
806
+ }), vo = {
747
807
  loading: { type: Boolean, default: !1 },
748
808
  actions: { type: Array },
749
809
  data: { type: Array },
750
810
  displayColumns: { type: Array, required: !0 },
751
811
  page: { type: Object },
752
812
  sort: { type: Object }
753
- }, mo = ["updatePage", "sort"], bo = { class: "table w-full" }, go = { key: 0 }, vo = ["colspan"], ho = ["ui-id"], yo = { class: "flex gap-2" }, gn = /* @__PURE__ */ w({
813
+ }, ho = ["updatePage", "sort"], yo = { class: "table w-full" }, wo = { key: 0 }, ko = ["colspan"], _o = ["ui-id"], Co = { class: "flex gap-2" }, Cn = /* @__PURE__ */ k({
754
814
  __name: "table.component",
755
- props: fo,
756
- emits: mo,
815
+ props: vo,
816
+ emits: ho,
757
817
  setup(e, { emit: t }) {
758
- const o = t, n = Ve(), l = v(() => "onEdit" in n), r = v(() => "onDelete" in n), c = (s) => {
818
+ const o = t, n = Oe(), l = v(() => "onEdit" in n), a = v(() => "onDelete" in n), c = (s) => {
759
819
  n.onEdit?.(s);
760
820
  }, d = (s) => {
761
821
  n.onDelete?.(s);
762
- }, f = (s) => {
822
+ }, p = (s) => {
763
823
  o("updatePage", s);
764
824
  }, i = (s) => {
765
825
  o("sort", s);
766
826
  };
767
- return (s, m) => (a(), p(x, null, [
768
- u("table", bo, [
827
+ return (s, m) => (r(), f(L, null, [
828
+ u("table", yo, [
769
829
  u("thead", null, [
770
830
  u("tr", null, [
771
- (a(!0), p(x, null, P(s.displayColumns, (b) => (a(), p("th", {
831
+ (r(!0), f(L, null, P(s.displayColumns, (b) => (r(), f("th", {
772
832
  key: b.scope
773
833
  }, [
774
- V(po, B({ column: b }, { ref_for: !0 }, s.sort, { onSort: i }), null, 16, ["column"])
834
+ V(go, B({ column: b }, { ref_for: !0 }, s.sort, { onSort: i }), null, 16, ["column"])
775
835
  ]))), 128)),
776
836
  m[0] || (m[0] = u("th", null, null, -1))
777
837
  ])
778
838
  ]),
779
839
  u("tbody", null, [
780
- s.loading ? (a(), p("tr", go, [
840
+ s.loading ? (r(), f("tr", wo, [
781
841
  u("td", {
782
842
  colspan: s.displayColumns.length + 1,
783
843
  class: "text-center"
784
844
  }, [...m[1] || (m[1] = [
785
845
  u("span", { class: "loading loading-bars loading-xs" }, null, -1)
786
- ])], 8, vo)
787
- ])) : k("", !0),
788
- (a(!0), p(x, null, P(s.data, (b) => (a(), p("tr", {
846
+ ])], 8, ko)
847
+ ])) : _("", !0),
848
+ (r(!0), f(L, null, P(s.data, (b) => (r(), f("tr", {
789
849
  key: b.id,
790
850
  "ui-id": `table_${b.id}`
791
851
  }, [
792
- (a(!0), p(x, null, P(s.displayColumns, (_) => (a(), p("td", {
793
- key: _.scope
852
+ (r(!0), f(L, null, P(s.displayColumns, (y) => (r(), f("td", {
853
+ key: y.scope
794
854
  }, [
795
- (a(), y(ne(_.component), B({ ref_for: !0 }, _, {
855
+ (r(), w(ne(y.component), B({ ref_for: !0 }, y, {
796
856
  data: b,
797
- column: _
857
+ column: y
798
858
  }), null, 16, ["data", "column"]))
799
859
  ]))), 128)),
800
860
  u("td", null, [
801
- u("span", yo, [
802
- (a(!0), p(x, null, P(s.actions, (_) => (a(), y(N, {
803
- "area-label": _.label,
804
- key: _.label,
805
- icon: _.icon,
861
+ u("span", Co, [
862
+ (r(!0), f(L, null, P(s.actions, (y) => (r(), w(z, {
863
+ key: y.label,
864
+ "aria-label": y.label,
865
+ icon: y.icon,
806
866
  outline: !0,
807
- onClick: (D) => _.action(b)
867
+ onClick: (D) => y.action(b)
808
868
  }, {
809
- default: L(() => [
810
- z(h(_.label), 1)
869
+ default: S(() => [
870
+ E(h(y.label), 1)
811
871
  ]),
812
872
  _: 2
813
- }, 1032, ["area-label", "icon", "onClick"]))), 128)),
814
- l.value ? (a(), y(N, {
873
+ }, 1032, ["aria-label", "icon", "onClick"]))), 128)),
874
+ l.value ? (r(), w(z, {
815
875
  key: 0,
816
- "area-label": "Edit",
876
+ "aria-label": "Edit",
817
877
  icon: g(T).Edit,
818
878
  outline: !0,
819
- onClick: (_) => c(b)
820
- }, null, 8, ["icon", "onClick"])) : k("", !0),
821
- r.value ? (a(), y(N, {
879
+ onClick: (y) => c(b)
880
+ }, null, 8, ["icon", "onClick"])) : _("", !0),
881
+ a.value ? (r(), w(z, {
822
882
  key: 1,
823
- "area-label": "Delete",
883
+ "aria-label": "Delete",
824
884
  icon: g(T).Delete,
825
885
  outline: !0,
826
- onClick: (_) => d(b)
827
- }, null, 8, ["icon", "onClick"])) : k("", !0)
886
+ onClick: (y) => d(b)
887
+ }, null, 8, ["icon", "onClick"])) : _("", !0)
828
888
  ])
829
889
  ])
830
- ], 8, ho))), 128))
890
+ ], 8, _o))), 128))
831
891
  ])
832
892
  ]),
833
- s.page ? (a(), y(lo, {
893
+ s.page ? (r(), w(uo, {
834
894
  key: 0,
835
895
  class: "border-gray-300 border-t pt-4 border-x-0 border-b-0",
836
896
  "total-items": s.page.count,
837
897
  "items-per-page": s.page.pageSize,
838
898
  "current-page": s.page.page,
839
- onUpdatePage: f
840
- }, null, 8, ["total-items", "items-per-page", "current-page"])) : k("", !0)
899
+ onUpdatePage: p
900
+ }, null, 8, ["total-items", "items-per-page", "current-page"])) : _("", !0)
841
901
  ], 64));
842
902
  }
843
- }), wo = (e, t) => {
903
+ }), $o = (e, t) => {
844
904
  const o = e.__vccOpts || e;
845
905
  for (const [n, l] of t)
846
906
  o[n] = l;
847
907
  return o;
848
- }, ko = {}, _o = { class: "card bg-base-100 shadow-sm" }, $o = { class: "card-body" }, Co = {
908
+ }, xo = {}, Lo = { class: "card bg-base-100 shadow-sm" }, So = { class: "card-body" }, Po = {
849
909
  key: 0,
850
910
  class: "card-title"
851
- }, xo = {
911
+ }, Mo = {
852
912
  key: 1,
853
913
  class: "card-actions justify-end"
854
914
  };
855
- function Lo(e, t) {
856
- return a(), p("div", _o, [
857
- u("div", $o, [
858
- e.$slots.title ? (a(), p("h2", Co, [
915
+ function Bo(e, t) {
916
+ return r(), f("div", Lo, [
917
+ u("div", So, [
918
+ e.$slots.title ? (r(), f("h2", Po, [
859
919
  M(e.$slots, "title")
860
- ])) : k("", !0),
920
+ ])) : _("", !0),
861
921
  u("p", null, [
862
922
  M(e.$slots, "default"),
863
923
  M(e.$slots, "content")
864
924
  ]),
865
- e.$slots.actions ? (a(), p("div", xo, [
925
+ e.$slots.actions ? (r(), f("div", Mo, [
866
926
  M(e.$slots, "actions")
867
- ])) : k("", !0)
927
+ ])) : _("", !0)
868
928
  ])
869
929
  ]);
870
930
  }
871
- const vn = /* @__PURE__ */ wo(ko, [["render", Lo]]), hn = (e, t) => {
931
+ const $n = /* @__PURE__ */ $o(xo, [["render", Bo]]), xn = (e, t) => {
872
932
  if (!e) return null;
873
933
  const o = (n) => {
874
934
  e.contains(n.target) || t();
875
935
  };
876
936
  return document.addEventListener("click", o), o;
877
- }, yn = (e) => {
937
+ }, Ln = (e) => {
878
938
  document.removeEventListener("click", e);
879
- }, wn = {
939
+ }, Sn = {
880
940
  beforeMount(e, t) {
881
941
  e.clickOutsideEvent = function(o) {
882
942
  e === o.target || e.contains(o.target) || t.value(o);
@@ -886,21 +946,21 @@ const vn = /* @__PURE__ */ wo(ko, [["render", Lo]]), hn = (e, t) => {
886
946
  document.removeEventListener("click", e.clickOutsideEvent);
887
947
  }
888
948
  };
889
- function So(e) {
949
+ function Vo(e) {
890
950
  return e.replace(/[:\s_-]+(.)/g, (t, o) => o.toUpperCase()).replace(/^[A-Z]/, (t) => t.toLowerCase());
891
951
  }
892
- function kn(e) {
893
- const t = Ae();
952
+ function Pn(e) {
953
+ const t = Ie();
894
954
  if (!t)
895
955
  return !1;
896
956
  const o = t.vnode.props;
897
957
  if (!o)
898
958
  return !1;
899
- const n = So(e), l = Ie(e);
959
+ const n = Vo(e), l = De(e);
900
960
  return [
901
- ae(e),
902
- ae(l),
903
- ae(n),
961
+ re(e),
962
+ re(l),
963
+ re(n),
904
964
  `on:${e}`,
905
965
  `on:${l}`,
906
966
  `on:${n}`
@@ -908,7 +968,7 @@ function kn(e) {
908
968
  (c) => !!o[c]
909
969
  );
910
970
  }
911
- const Po = ["select"], ge = {
971
+ const Ao = ["select"], ge = {
912
972
  options: { type: Array, required: !1 },
913
973
  isLoading: {
914
974
  type: Boolean,
@@ -949,7 +1009,7 @@ const Po = ["select"], ge = {
949
1009
  root: "flex flex-row gap-x-2",
950
1010
  item: "w-full"
951
1011
  }
952
- }, le = (e) => {
1012
+ }, ae = (e) => {
953
1013
  if (!e) return { ...se };
954
1014
  const t = { ...se };
955
1015
  for (const o of Object.keys(e)) {
@@ -957,7 +1017,7 @@ const Po = ["select"], ge = {
957
1017
  n && typeof n == "object" && (t[o] = { ...se[o], ...n });
958
1018
  }
959
1019
  return t;
960
- }, F = {
1020
+ }, K = {
961
1021
  id: { type: String },
962
1022
  placeholder: { type: String },
963
1023
  description: { type: String },
@@ -975,7 +1035,7 @@ const Po = ["select"], ge = {
975
1035
  },
976
1036
  width: { type: String, default: "w-48" }
977
1037
  }, ve = {
978
- ...F,
1038
+ ...K,
979
1039
  options: { type: Array, required: !0 },
980
1040
  /** Key to use as the display label when options are objects */
981
1041
  labelKey: { type: String, default: "label" },
@@ -984,16 +1044,16 @@ const Po = ["select"], ge = {
984
1044
  valueKey: { type: String, default: "value" },
985
1045
  /** add a new button next to the list*/
986
1046
  enableCreate: { type: Boolean, default: !1 }
987
- }, Mo = ["select", "clear", "close", "create"], Pe = {
1047
+ }, Oo = ["select", "clear", "close", "create"], Be = {
988
1048
  ...ge,
989
1049
  ...ve,
990
1050
  isOpen: { type: Boolean, default: !1 },
991
1051
  isActive: { type: Function, default: (e) => !1 }
992
- }, Bo = {
1052
+ }, Io = {
993
1053
  key: 1,
994
1054
  tabindex: "-1",
995
1055
  class: "pointer-events-none"
996
- }, Vo = ["data-index", "aria-selected", "onMousedown", "onMousemove"], Ao = ["innerHTML"], Io = {
1056
+ }, Do = ["data-index", "aria-selected", "onMousedown", "onMousemove"], Ro = ["innerHTML"], To = {
997
1057
  key: 0,
998
1058
  xmlns: "http://www.w3.org/2000/svg",
999
1059
  class: "h-4 w-4 shrink-0 opacity-80",
@@ -1002,7 +1062,7 @@ const Po = ["select"], ge = {
1002
1062
  stroke: "currentColor",
1003
1063
  "stroke-width": "2.5"
1004
1064
  };
1005
- function Oo(e, t) {
1065
+ function Eo(e, t) {
1006
1066
  if (!t) return e;
1007
1067
  const o = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1008
1068
  return e.replace(
@@ -1010,26 +1070,26 @@ function Oo(e, t) {
1010
1070
  '<mark class="bg-warning/40 text-inherit rounded-sm px-0.5">$1</mark>'
1011
1071
  );
1012
1072
  }
1013
- const Do = /* @__PURE__ */ w({
1073
+ const zo = /* @__PURE__ */ k({
1014
1074
  __name: "ListResults",
1015
1075
  props: ge,
1016
- emits: Po,
1076
+ emits: Ao,
1017
1077
  setup(e, { expose: t, emit: o }) {
1018
- const n = e, l = S(-1), r = S(), c = o;
1019
- X(
1078
+ const n = e, l = x(-1), a = x(), c = o;
1079
+ q(
1020
1080
  () => n.options,
1021
1081
  () => {
1022
1082
  l.value = -1;
1023
1083
  }
1024
1084
  );
1025
1085
  function d() {
1026
- $e(() => {
1027
- r.value?.querySelector(
1086
+ xe(() => {
1087
+ a.value?.querySelector(
1028
1088
  `[data-index="${l.value}"]`
1029
1089
  )?.scrollIntoView({ block: "nearest" });
1030
1090
  });
1031
1091
  }
1032
- function f(s) {
1092
+ function p(s) {
1033
1093
  const m = n.options?.length ?? 0;
1034
1094
  if (m)
1035
1095
  switch (s.key) {
@@ -1047,91 +1107,91 @@ const Do = /* @__PURE__ */ w({
1047
1107
  function i(s) {
1048
1108
  l.value = -1, c("select", s);
1049
1109
  }
1050
- return t({ handleKeydown: f }), (s, m) => (a(), p("ul", {
1110
+ return t({ handleKeydown: p }), (s, m) => (r(), f("ul", {
1051
1111
  ref_key: "listRef",
1052
- ref: r,
1112
+ ref: a,
1053
1113
  role: "listbox",
1054
1114
  class: "absolute z-50 w-full mt-1 bg-base-100 border border-base-300 rounded-box shadow-xl overflow-auto max-h-64 origin-top p-1"
1055
1115
  }, [
1056
- s.isLoading ? (a(), p(x, { key: 0 }, P(2, (b) => u("li", {
1116
+ s.isLoading ? (r(), f(L, { key: 0 }, P(2, (b) => u("li", {
1057
1117
  key: `skel-${b}`,
1058
1118
  class: "pointer-events-none px-3 py-2"
1059
1119
  }, [...m[0] || (m[0] = [
1060
1120
  u("div", { class: "flex items-center gap-3" }, [
1061
1121
  u("div", { class: "skeleton h-3 w-3/4 rounded" })
1062
1122
  ], -1)
1063
- ])])), 64)) : s.options.length === 0 ? (a(), p("li", Bo, [...m[1] || (m[1] = [
1123
+ ])])), 64)) : s.options.length === 0 ? (r(), f("li", Io, [...m[1] || (m[1] = [
1064
1124
  u("span", { class: "px-3 py-2 text-sm opacity-50 italic" }, " No results found ", -1)
1065
- ])])) : (a(!0), p(x, { key: 2 }, P(s.options, (b, _) => (a(), p("li", {
1125
+ ])])) : (r(!0), f(L, { key: 2 }, P(s.options, (b, y) => (r(), f("li", {
1066
1126
  key: b.value,
1067
- "data-index": _,
1127
+ "data-index": y,
1068
1128
  role: "option",
1069
- "aria-selected": _ === l.value,
1070
- onMousedown: ce((D) => i(b), ["prevent"]),
1071
- onMousemove: (D) => l.value = _
1129
+ "aria-selected": y === l.value,
1130
+ onMousedown: le((D) => i(b), ["prevent"]),
1131
+ onMousemove: (D) => l.value = y
1072
1132
  }, [
1073
1133
  u("a", {
1074
- class: $(["flex items-center justify-between gap-2 rounded-lg px-3 py-2 text-sm transition-colors duration-100", {
1075
- "active bg-secondary text-primary-content": _ === l.value,
1076
- "hover:bg-base-200": _ !== l.value
1134
+ class: C(["flex items-center justify-between gap-2 rounded-lg px-3 py-2 text-sm transition-colors duration-100", {
1135
+ "active bg-secondary text-primary-content": y === l.value,
1136
+ "hover:bg-base-200": y !== l.value
1077
1137
  }])
1078
1138
  }, [
1079
1139
  u("span", {
1080
1140
  class: "whitespace-nowrap",
1081
- innerHTML: Oo(b.label, s.query)
1082
- }, null, 8, Ao),
1083
- s.isActive(b) ? (a(), p("svg", Io, [...m[2] || (m[2] = [
1141
+ innerHTML: Eo(b.label, s.query)
1142
+ }, null, 8, Ro),
1143
+ s.isActive(b) ? (r(), f("svg", To, [...m[2] || (m[2] = [
1084
1144
  u("path", {
1085
1145
  "stroke-linecap": "round",
1086
1146
  "stroke-linejoin": "round",
1087
1147
  d: "M5 13l4 4L19 7"
1088
1148
  }, null, -1)
1089
- ])])) : k("", !0)
1149
+ ])])) : _("", !0)
1090
1150
  ], 2)
1091
- ], 40, Vo))), 128))
1151
+ ], 40, Do))), 128))
1092
1152
  ], 512));
1093
1153
  }
1094
- }), Me = ({ isTouched: e, errors: t }) => !!(e && t), Ro = (e, t, o, n) => t === void 0 || t !== void 0 && !e || !n && !o, U = (e, t) => [e, { "input-error": Me(t) }], To = { key: 0 }, Z = /* @__PURE__ */ w({
1154
+ }), Ve = ({ isTouched: e, errors: t }) => !!(e && t), No = (e, t, o, n) => t === void 0 || t !== void 0 && !e || !n && !o, U = (e, t) => [e, { "input-error": Ve(t) }], qo = { key: 0 }, Z = /* @__PURE__ */ k({
1095
1155
  __name: "ControlWrapper",
1096
- props: F,
1156
+ props: K,
1097
1157
  setup(e) {
1098
- const t = e, o = v(() => !Ro(
1158
+ const t = e, o = v(() => !No(
1099
1159
  t.visible,
1100
1160
  t.description,
1101
1161
  t.isFocused,
1102
1162
  !0
1103
- )), n = v(() => t.required), l = v(() => Me(t)), r = v(() => le(t.styles));
1104
- return (c, d) => (a(), p("fieldset", {
1105
- class: $(["fieldset", [c.width, r.value.control.wrapper]])
1163
+ )), n = v(() => t.required), l = v(() => Ve(t)), a = v(() => ae(t.styles));
1164
+ return (c, d) => (r(), f("fieldset", {
1165
+ class: C(["fieldset", [c.width, a.value.control.wrapper]])
1106
1166
  }, [
1107
1167
  u("legend", {
1108
- class: $(r.value.control.label)
1168
+ class: C(a.value.control.label)
1109
1169
  }, [
1110
- c.hideLabel ? k("", !0) : (a(), p(x, { key: 0 }, [
1170
+ c.hideLabel ? _("", !0) : (r(), f(L, { key: 0 }, [
1111
1171
  u("span", null, h(c.label), 1),
1112
- n.value ? (a(), p("span", To, "*")) : k("", !0)
1172
+ n.value ? (r(), f("span", qo, "*")) : _("", !0)
1113
1173
  ], 64)),
1114
- d[0] || (d[0] = z("   ", -1))
1174
+ d[0] || (d[0] = E("   ", -1))
1115
1175
  ], 2),
1116
1176
  M(c.$slots, "default"),
1117
1177
  u("p", {
1118
- class: $(["fieldset-label h-4", { "text-error": l.value }])
1178
+ class: C(["fieldset-label h-4", { "text-error": l.value }])
1119
1179
  }, h(l.value ? c.errors : o.value ? c.description : null), 3)
1120
1180
  ], 2));
1121
1181
  }
1122
- }), zo = { class: "flex items-center w-full" }, No = { class: "overflow-hidden w-full" }, jo = { class: "absolute inset-y-0 right-0 flex items-center pr-3 gap-1 pointer-events-none" }, qo = {
1182
+ }), jo = ["aria-label"], Fo = { class: "flex items-center w-full" }, Ko = { class: "overflow-hidden w-full" }, Uo = { class: "absolute inset-y-0 right-0 flex items-center pr-3 gap-1 pointer-events-none" }, Ho = {
1123
1183
  key: 0,
1124
1184
  class: "loading loading-spinner loading-xs text-primary pointer-events-none"
1125
- }, he = /* @__PURE__ */ w({
1185
+ }, he = /* @__PURE__ */ k({
1126
1186
  __name: "SelectWrapper",
1127
- props: Pe,
1128
- emits: Mo,
1187
+ props: Be,
1188
+ emits: Oo,
1129
1189
  setup(e, { emit: t }) {
1130
- const o = e, n = S(), l = S(), r = t, c = () => {
1131
- d(), r("clear");
1190
+ const o = e, n = x(), l = x(), a = t, c = () => {
1191
+ d(), a("clear");
1132
1192
  }, d = () => {
1133
- r("close");
1134
- }, f = (s) => {
1193
+ a("close");
1194
+ }, p = (s) => {
1135
1195
  if (s.key === "Escape") {
1136
1196
  d();
1137
1197
  return;
@@ -1140,33 +1200,35 @@ const Do = /* @__PURE__ */ w({
1140
1200
  }, i = (s) => {
1141
1201
  n.value && !n.value.contains(s.target) && d();
1142
1202
  };
1143
- return ke(() => {
1203
+ return Ce(() => {
1144
1204
  document.addEventListener("click", i);
1145
- }), Oe(() => {
1205
+ }), _e(() => {
1146
1206
  document.removeEventListener("click", i);
1147
- }), (s, m) => (a(), p("div", {
1207
+ }), (s, m) => (r(), f("div", {
1148
1208
  ref_key: "selectWrapperRef",
1149
- ref: n
1209
+ ref: n,
1210
+ "aria-label": s.id,
1211
+ role: "select"
1150
1212
  }, [
1151
1213
  V(Z, ee(te(o)), {
1152
- default: L(() => [
1153
- u("div", zo, [
1214
+ default: S(() => [
1215
+ u("div", Fo, [
1154
1216
  u("div", {
1155
1217
  class: "relative w-full",
1156
- onKeydown: f
1218
+ onKeydown: p
1157
1219
  }, [
1158
- u("div", No, [
1220
+ u("div", Ko, [
1159
1221
  M(s.$slots, "default")
1160
1222
  ]),
1161
- u("div", jo, [
1162
- s.isLoading && !s.label ? (a(), p("span", qo)) : k("", !0),
1163
- s.query && !s.isLoading ? (a(), p("button", {
1223
+ u("div", Uo, [
1224
+ s.isLoading && !s.label ? (r(), f("span", Ho)) : _("", !0),
1225
+ s.query && !s.isLoading ? (r(), f("button", {
1164
1226
  key: 1,
1165
1227
  type: "button",
1166
1228
  class: "pointer-events-auto btn btn-ghost btn-xs btn-circle opacity-60 hover:opacity-100",
1167
1229
  tabindex: "-1",
1168
1230
  "aria-label": "Clear",
1169
- onMousedown: ce(c, ["prevent"])
1231
+ onMousedown: le(c, ["prevent"])
1170
1232
  }, [...m[2] || (m[2] = [
1171
1233
  u("svg", {
1172
1234
  xmlns: "http://www.w3.org/2000/svg",
@@ -1182,10 +1244,10 @@ const Do = /* @__PURE__ */ w({
1182
1244
  d: "M6 18L18 6M6 6l12 12"
1183
1245
  })
1184
1246
  ], -1)
1185
- ])], 32)) : k("", !0),
1186
- (a(), p("svg", {
1247
+ ])], 32)) : _("", !0),
1248
+ (r(), f("svg", {
1187
1249
  xmlns: "http://www.w3.org/2000/svg",
1188
- class: $(["h-4 w-4 opacity-40 transition-transform duration-200", { "rotate-180": s.isOpen }]),
1250
+ class: C(["h-4 w-4 opacity-40 transition-transform duration-200", { "rotate-180": s.isOpen }]),
1189
1251
  fill: "none",
1190
1252
  viewBox: "0 0 24 24",
1191
1253
  stroke: "currentColor",
@@ -1198,7 +1260,7 @@ const Do = /* @__PURE__ */ w({
1198
1260
  }, null, -1)
1199
1261
  ])], 2))
1200
1262
  ]),
1201
- V(De, {
1263
+ V(Re, {
1202
1264
  "enter-active-class": "transition-all duration-150 ease-out",
1203
1265
  "enter-from-class": "opacity-0 -translate-y-1 scale-y-95",
1204
1266
  "enter-to-class": "opacity-100 translate-y-0 scale-y-100",
@@ -1206,8 +1268,8 @@ const Do = /* @__PURE__ */ w({
1206
1268
  "leave-from-class": "opacity-100 translate-y-0 scale-y-100",
1207
1269
  "leave-to-class": "opacity-0 -translate-y-1 scale-y-95"
1208
1270
  }, {
1209
- default: L(() => [
1210
- s.isOpen ? (a(), y(Do, {
1271
+ default: S(() => [
1272
+ s.isOpen ? (r(), w(zo, {
1211
1273
  key: 0,
1212
1274
  ref_key: "listResultsRef",
1213
1275
  ref: l,
@@ -1215,105 +1277,106 @@ const Do = /* @__PURE__ */ w({
1215
1277
  options: s.options,
1216
1278
  "is-loading": s.isLoading,
1217
1279
  "is-active": s.isActive,
1218
- onSelect: m[0] || (m[0] = (b) => r("select", b))
1219
- }, null, 8, ["query", "options", "is-loading", "is-active"])) : k("", !0)
1280
+ onSelect: m[0] || (m[0] = (b) => a("select", b))
1281
+ }, null, 8, ["query", "options", "is-loading", "is-active"])) : _("", !0)
1220
1282
  ]),
1221
1283
  _: 1
1222
1284
  })
1223
1285
  ], 32),
1224
- s.enableCreate ? (a(), y(N, {
1286
+ s.enableCreate ? (r(), w(z, {
1225
1287
  key: 0,
1226
1288
  icon: "Plus",
1227
1289
  color: "blank",
1228
1290
  size: "lg",
1229
1291
  tooltip: "Create new",
1230
- onClick: m[1] || (m[1] = (b) => r("create"))
1231
- })) : k("", !0)
1292
+ "aria-label": "create",
1293
+ onClick: m[1] || (m[1] = (b) => a("create"))
1294
+ })) : _("", !0)
1232
1295
  ])
1233
1296
  ]),
1234
1297
  _: 3
1235
1298
  }, 16)
1236
- ], 512));
1299
+ ], 8, jo));
1237
1300
  }
1238
- }), ie = (e, t) => {
1301
+ }), ue = (e, t) => {
1239
1302
  if (e)
1240
1303
  return typeof e == "object" ? e[t.labelKey] : e;
1241
- }, re = (e, t) => {
1304
+ }, ie = (e, t) => {
1242
1305
  if (e)
1243
1306
  return typeof e == "object" ? e[t.valueKey] : e;
1244
- }, Eo = (e) => {
1245
- const t = S([]), o = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), l = (s) => {
1307
+ }, Wo = (e) => {
1308
+ const t = x([]), o = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), l = (s) => {
1246
1309
  const m = [];
1247
1310
  o.clear(), n.clear(), s?.forEach((b) => {
1248
- const _ = {
1249
- value: re(b, e),
1250
- label: ie(b, e)
1311
+ const y = {
1312
+ value: ie(b, e),
1313
+ label: ue(b, e)
1251
1314
  };
1252
- o.set(_.value, b), m.push(_);
1315
+ o.set(y.value, b), m.push(y);
1253
1316
  }), t.value = m;
1254
- }, r = (s) => o.get(s.value);
1317
+ }, a = (s) => o.get(s.value);
1255
1318
  return {
1256
1319
  options: t,
1257
1320
  setOptions: l,
1258
- getOriginal: r,
1259
- getLabels: (...s) => s.map((m) => ie(m, e)),
1260
- getValues: (...s) => s.map((m) => re(m, e)),
1261
- getOption: (s) => n.get(re(s, e)),
1262
- getOriginals: (...s) => s.map(r).filter(Boolean)
1321
+ getOriginal: a,
1322
+ getLabels: (...s) => s.map((m) => ue(m, e)),
1323
+ getValues: (...s) => s.map((m) => ie(m, e)),
1324
+ getOption: (s) => n.get(ie(s, e)),
1325
+ getOriginals: (...s) => s.map(a).filter(Boolean)
1263
1326
  };
1264
- }, ye = (e) => Eo(e), Fo = ["aria-label"], _n = /* @__PURE__ */ w({
1327
+ }, ye = (e) => Wo(e), Go = ["aria-label"], Mn = /* @__PURE__ */ k({
1265
1328
  __name: "SelectComponent",
1266
- props: /* @__PURE__ */ O(ve, {
1329
+ props: /* @__PURE__ */ I(ve, {
1267
1330
  modelValue: {},
1268
1331
  modelModifiers: {}
1269
1332
  }),
1270
- emits: /* @__PURE__ */ O(["update:modelValue", "change", "clear", "focus", "blur"], ["update:modelValue"]),
1333
+ emits: /* @__PURE__ */ I(["update:modelValue", "change", "clear", "focus", "blur"], ["update:modelValue"]),
1271
1334
  setup(e, { emit: t }) {
1272
- const o = S(!1), n = e, l = t, r = E(e, "modelValue"), c = ye(n), { options: d } = c;
1273
- X(
1335
+ const o = x(!1), n = e, l = t, a = F(e, "modelValue"), c = ye(n), { options: d } = c;
1336
+ q(
1274
1337
  () => n.options,
1275
1338
  () => {
1276
1339
  c.setOptions(n.options);
1277
1340
  },
1278
1341
  { immediate: !0 }
1279
1342
  );
1280
- const f = (A) => {
1343
+ const p = (A) => {
1281
1344
  l("change", A);
1282
1345
  }, i = v(
1283
- () => r.value ? c.getLabels(r.value)[0] : ""
1284
- ), s = v(() => le(n.styles)), m = v(
1346
+ () => a.value ? c.getLabels(a.value)[0] : ""
1347
+ ), s = v(() => ae(n.styles)), m = v(
1285
1348
  () => U(s.value.control.select, n)
1286
1349
  ), b = (A) => {
1287
- const C = c.getOriginal(A);
1288
- r.value = C, f(C);
1289
- }, _ = () => {
1290
- o.value = !1, r.value = null, f(void 0);
1291
- }, D = (A) => c.getValues(r.value)?.[0] === A.value, K = () => {
1350
+ const $ = c.getOriginal(A);
1351
+ a.value = $, p($);
1352
+ }, y = () => {
1353
+ o.value = !1, a.value = null, p(void 0);
1354
+ }, D = (A) => c.getValues(a.value)?.[0] === A.value, H = () => {
1292
1355
  o.value = !1;
1293
1356
  };
1294
- return (A, C) => (a(), y(he, B(n, {
1357
+ return (A, $) => (r(), w(he, B(n, {
1295
1358
  options: g(d),
1296
1359
  disabled: !A.enabled,
1297
1360
  "is-open": o.value,
1298
1361
  query: i.value,
1299
1362
  "is-active": D,
1300
- onClose: K,
1363
+ onClose: H,
1301
1364
  onSelect: b,
1302
- onClear: _
1365
+ onClear: y
1303
1366
  }), {
1304
- default: L(() => [
1367
+ default: S(() => [
1305
1368
  u("button", {
1306
1369
  type: "button",
1307
- class: $(["truncate block text-left", [m.value, A.width]]),
1308
- onClick: C[0] || (C[0] = (R) => o.value = !0),
1370
+ class: C(["truncate block text-left", [m.value, A.width]]),
1309
1371
  "aria-label": A.id,
1310
- role: "combobox"
1311
- }, h(i.value ?? "Select value"), 11, Fo)
1372
+ role: "combobox",
1373
+ onClick: $[0] || ($[0] = (R) => o.value = !0)
1374
+ }, h(i.value ?? "Select value"), 11, Go)
1312
1375
  ]),
1313
1376
  _: 1
1314
1377
  }, 16, ["options", "disabled", "is-open", "query"]));
1315
1378
  }
1316
- }), Uo = {
1379
+ }), Xo = {
1317
1380
  ...ve,
1318
1381
  ...ge,
1319
1382
  /** v-model binding */
@@ -1346,15 +1409,15 @@ const Do = /* @__PURE__ */ w({
1346
1409
  default: !1
1347
1410
  }
1348
1411
  };
1349
- function Ko(e) {
1350
- const t = S([]), o = S(!1);
1351
- function n(r) {
1412
+ function Zo(e) {
1413
+ const t = x([]), o = x(!1);
1414
+ function n(a) {
1352
1415
  if (!e.options) {
1353
1416
  t.value = [];
1354
1417
  return;
1355
1418
  }
1356
- const c = r.toLowerCase(), d = c ? e.options.filter(
1357
- (f) => ie(f, e).toLowerCase().includes(c)
1419
+ const c = a.toLowerCase(), d = c ? e.options.filter(
1420
+ (p) => ue(p, e).toLowerCase().includes(c)
1358
1421
  ) : e.options;
1359
1422
  t.value = d.slice(0, e.maxResults);
1360
1423
  }
@@ -1363,13 +1426,13 @@ function Ko(e) {
1363
1426
  }
1364
1427
  return { results: t, isLoading: o, search: n, clear: l };
1365
1428
  }
1366
- function Ho(e) {
1367
- const t = S([]), o = S(!1);
1429
+ function Jo(e) {
1430
+ const t = x([]), o = x(!1);
1368
1431
  let n = null, l = null;
1369
- async function r(f) {
1432
+ async function a(p) {
1370
1433
  l && l.abort(), l = new AbortController(), o.value = !0;
1371
1434
  try {
1372
- const i = await e.fetchOptions(f, l.signal);
1435
+ const i = await e.fetchOptions(p, l.signal);
1373
1436
  t.value = (i || []).slice(0, e.maxResults);
1374
1437
  } catch (i) {
1375
1438
  i.name !== "AbortError" && (t.value = []);
@@ -1377,9 +1440,9 @@ function Ho(e) {
1377
1440
  o.value = !1;
1378
1441
  }
1379
1442
  }
1380
- function c(f) {
1443
+ function c(p) {
1381
1444
  n && clearTimeout(n), o.value = !0, n = setTimeout(() => {
1382
- r(f);
1445
+ a(p);
1383
1446
  }, e.debounceMs);
1384
1447
  }
1385
1448
  function d() {
@@ -1387,8 +1450,8 @@ function Ho(e) {
1387
1450
  }
1388
1451
  return { results: t, isLoading: o, search: c, clear: d };
1389
1452
  }
1390
- function Wo(e) {
1391
- const t = e.fetchOptions ? Ho(e) : Ko(e);
1453
+ function Qo(e) {
1454
+ const t = e.fetchOptions ? Jo(e) : Zo(e);
1392
1455
  function o(n) {
1393
1456
  t.search(n);
1394
1457
  }
@@ -1399,96 +1462,96 @@ function Wo(e) {
1399
1462
  clear: t.clear
1400
1463
  };
1401
1464
  }
1402
- const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"], $n = /* @__PURE__ */ w({
1465
+ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"], Bn = /* @__PURE__ */ k({
1403
1466
  __name: "AutoComplete",
1404
- props: Uo,
1467
+ props: Xo,
1405
1468
  emits: ["update:modelValue", "change", "clear", "focus", "blur"],
1406
1469
  setup(e, { emit: t }) {
1407
- const o = e, n = t, l = S(null), r = S(""), c = S(!1), d = Wo(o), { isLoading: f, triggerSearch: i, clear: s } = d, m = ye(o), { options: b } = m;
1408
- X(
1470
+ const o = e, n = t, l = x(null), a = x(""), c = x(!1), d = Qo(o), { isLoading: p, triggerSearch: i, clear: s } = d, m = ye(o), { options: b } = m;
1471
+ q(
1409
1472
  () => d.results.value,
1410
1473
  () => {
1411
1474
  m.setOptions(d.results.value);
1412
1475
  },
1413
1476
  { immediate: !0 }
1414
- ), X(
1477
+ ), q(
1415
1478
  () => o.modelValue,
1416
- (I) => {
1417
- if (I == null || I === "") {
1418
- r.value = "";
1479
+ (O) => {
1480
+ if (O == null || O === "") {
1481
+ a.value = "";
1419
1482
  return;
1420
1483
  }
1421
- const W = typeof I == "object" ? I[o.labelKey] : I;
1422
- W !== r.value && (r.value = W);
1484
+ const G = typeof O == "object" ? O[o.labelKey] : O;
1485
+ G !== a.value && (a.value = G);
1423
1486
  },
1424
1487
  { immediate: !0 }
1425
1488
  );
1426
- const _ = (I) => {
1427
- r.value = I.target.value, o.freeText ? n("update:modelValue", r.value) : n("update:modelValue", ""), i(r.value), c.value = !0;
1489
+ const y = (O) => {
1490
+ a.value = O.target.value, o.freeText ? n("update:modelValue", a.value) : n("update:modelValue", ""), i(a.value), c.value = !0;
1428
1491
  }, D = () => {
1429
- i(r.value), c.value = !0;
1492
+ i(a.value), c.value = !0;
1430
1493
  };
1431
- function K() {
1494
+ function H() {
1432
1495
  setTimeout(() => {
1433
- c.value = !1, o.freeText ? n("change", r.value) : o.modelValue || (r.value = "");
1496
+ c.value = !1, o.freeText ? n("change", a.value) : o.modelValue || (a.value = "");
1434
1497
  }, 150);
1435
1498
  }
1436
- const A = (I) => {
1437
- const W = m.getOriginal(I);
1438
- r.value = I.label, c.value = !1, n("update:modelValue", W), n("change", W);
1439
- }, C = () => {
1440
- r.value = "", s(), c.value = !1, n("update:modelValue", ""), n("clear"), $e(() => l.value?.focus());
1499
+ const A = (O) => {
1500
+ const G = m.getOriginal(O);
1501
+ a.value = O.label, c.value = !1, n("update:modelValue", G), n("change", G);
1502
+ }, $ = () => {
1503
+ a.value = "", s(), c.value = !1, n("update:modelValue", ""), n("clear"), xe(() => l.value?.focus());
1441
1504
  }, R = () => {
1442
1505
  c.value = !1;
1443
- }, H = v(() => le(o.styles)), Be = v(
1444
- () => U(H.value.control.select, o)
1506
+ }, W = v(() => ae(o.styles)), Ae = v(
1507
+ () => U(W.value.control.select, o)
1445
1508
  );
1446
- return (I, W) => (a(), y(he, B(o, {
1509
+ return (O, G) => (r(), w(he, B(o, {
1447
1510
  options: g(b),
1448
- "is-loading": g(f),
1511
+ "is-loading": g(p),
1449
1512
  "is-open": c.value,
1450
- query: r.value,
1513
+ query: a.value,
1451
1514
  onClose: R,
1452
1515
  onSelect: A,
1453
- onClear: C
1516
+ onClear: $
1454
1517
  }), {
1455
- default: L(() => [
1518
+ default: S(() => [
1456
1519
  u("input", {
1457
1520
  ref_key: "inputRef",
1458
1521
  ref: l,
1459
1522
  type: "text",
1460
1523
  role: "combobox",
1461
- "aria-label": I.id,
1524
+ "aria-label": O.id,
1462
1525
  "aria-expanded": c.value,
1463
1526
  "aria-autocomplete": "list",
1464
1527
  "aria-haspopup": "listbox",
1465
1528
  autocomplete: "off",
1466
1529
  autocorrect: "off",
1467
1530
  spellcheck: "false",
1468
- class: $([Be.value, "w-full"]),
1469
- value: r.value,
1470
- placeholder: I.placeholder,
1471
- disabled: !I.enabled,
1472
- onInput: _,
1531
+ class: C([Ae.value, "w-full"]),
1532
+ value: a.value,
1533
+ placeholder: O.placeholder,
1534
+ disabled: !O.enabled,
1535
+ onInput: y,
1473
1536
  onFocus: D,
1474
- onBlur: K
1475
- }, null, 42, Go)
1537
+ onBlur: H
1538
+ }, null, 42, Yo)
1476
1539
  ]),
1477
1540
  _: 1
1478
1541
  }, 16, ["options", "is-loading", "is-open", "query"]));
1479
1542
  }
1480
- }), Xo = ["aria-label"], Cn = /* @__PURE__ */ w({
1543
+ }), es = ["aria-label"], Vn = /* @__PURE__ */ k({
1481
1544
  __name: "MultiSelect",
1482
- props: /* @__PURE__ */ O(Pe, {
1545
+ props: /* @__PURE__ */ I(Be, {
1483
1546
  modelValue: {},
1484
1547
  modelModifiers: {}
1485
1548
  }),
1486
- emits: /* @__PURE__ */ O(["update:modelValue", "change", "clear", "focus", "blur"], ["update:modelValue"]),
1549
+ emits: /* @__PURE__ */ I(["update:modelValue", "change", "clear", "focus", "blur"], ["update:modelValue"]),
1487
1550
  setup(e, { emit: t }) {
1488
- const o = S(!1), n = e, l = t, r = E(e, "modelValue"), c = (C) => {
1489
- l("change", C);
1490
- }, d = ye(n), { options: f } = d;
1491
- X(
1551
+ const o = x(!1), n = e, l = t, a = F(e, "modelValue"), c = ($) => {
1552
+ l("change", $);
1553
+ }, d = ye(n), { options: p } = d;
1554
+ q(
1492
1555
  () => n.options,
1493
1556
  () => {
1494
1557
  d.setOptions(n.options);
@@ -1496,51 +1559,51 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
1496
1559
  { immediate: !0 }
1497
1560
  );
1498
1561
  const i = v(
1499
- () => r.value ? d.getLabels(...r.value).join(", ") : void 0
1562
+ () => a.value ? d.getLabels(...a.value).join(", ") : void 0
1500
1563
  ), s = v(
1501
- () => d.getValues(...r.value ?? [])
1502
- ), m = (C) => {
1503
- let R = r.value ?? [];
1504
- if (D(C))
1564
+ () => d.getValues(...a.value ?? [])
1565
+ ), m = ($) => {
1566
+ let R = a.value ?? [];
1567
+ if (D($))
1505
1568
  R = R.filter(
1506
- (H) => d.getOption(H) !== C.value
1569
+ (W) => d.getOption(W) !== $.value
1507
1570
  );
1508
1571
  else {
1509
- const H = d.getOriginal(C);
1510
- R.push(H);
1572
+ const W = d.getOriginal($);
1573
+ R.push(W);
1511
1574
  }
1512
- r.value = R, c(R);
1575
+ a.value = R, c(R);
1513
1576
  }, b = () => {
1514
- o.value = !1, r.value = [], c([]);
1515
- }, _ = () => {
1577
+ o.value = !1, a.value = [], c([]);
1578
+ }, y = () => {
1516
1579
  o.value = !1;
1517
- }, D = (C) => s.value?.includes(C.value) ?? !1, K = v(() => le(n.styles)), A = v(
1518
- () => U(K.value.control.select, n)
1580
+ }, D = ($) => s.value?.includes($.value) ?? !1, H = v(() => ae(n.styles)), A = v(
1581
+ () => U(H.value.control.select, n)
1519
1582
  );
1520
- return (C, R) => (a(), y(he, B(n, {
1521
- options: g(f),
1583
+ return ($, R) => (r(), w(he, B(n, {
1584
+ options: g(p),
1522
1585
  "is-open": o.value,
1523
- disabled: !C.enabled,
1586
+ disabled: !$.enabled,
1524
1587
  query: i.value,
1525
1588
  "is-active": D,
1526
- onClose: _,
1589
+ onClose: y,
1527
1590
  onSelect: m,
1528
1591
  onClear: b
1529
1592
  }), {
1530
- default: L(() => [
1593
+ default: S(() => [
1531
1594
  u("button", {
1532
1595
  type: "button",
1533
- class: $(["truncate block text-left", [A.value, C.width]]),
1534
- onClick: R[0] || (R[0] = (H) => o.value = !0),
1535
- "aria-label": C.id,
1536
- role: "combobox"
1537
- }, h(i.value ?? "Select value"), 11, Xo)
1596
+ class: C(["truncate block text-left", [A.value, $.width]]),
1597
+ "aria-label": $.id,
1598
+ role: "combobox",
1599
+ onClick: R[0] || (R[0] = (W) => o.value = !0)
1600
+ }, h(i.value ?? "Select value"), 11, es)
1538
1601
  ]),
1539
1602
  _: 1
1540
1603
  }, 16, ["options", "is-open", "disabled", "query"]));
1541
1604
  }
1542
- }), Zo = ["change"], Jo = {
1543
- ...F,
1605
+ }), ts = ["change"], os = {
1606
+ ...K,
1544
1607
  width: { type: String, default: "w-48" },
1545
1608
  minHeight: { type: String, default: "min-h-96" },
1546
1609
  actions: {
@@ -1558,18 +1621,18 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
1558
1621
  }
1559
1622
  ]
1560
1623
  }
1561
- }, Qo = ["aria-label"], Yo = { class: "flex items-center gap-1 px-3 py-2 border-b border-base-300 bg-base-200" }, es = ["title", "onClick"], ts = ["innerHTML"], os = { class: "card-body p-3" }, xn = /* @__PURE__ */ w({
1624
+ }, ss = ["aria-label"], ns = { class: "flex items-center gap-1 px-3 py-2 border-b border-base-300 bg-base-200" }, ls = ["title", "onClick"], as = ["innerHTML"], rs = { class: "card-body p-3" }, An = /* @__PURE__ */ k({
1562
1625
  __name: "Markdown",
1563
- props: /* @__PURE__ */ O(Jo, {
1626
+ props: /* @__PURE__ */ I(os, {
1564
1627
  modelValue: {},
1565
1628
  modelModifiers: {}
1566
1629
  }),
1567
- emits: /* @__PURE__ */ O(Zo, ["update:modelValue"]),
1630
+ emits: /* @__PURE__ */ I(ts, ["update:modelValue"]),
1568
1631
  setup(e, { emit: t }) {
1569
- const o = e, n = t, l = E(e, "modelValue"), r = at({
1632
+ const o = e, n = t, l = F(e, "modelValue"), a = rt({
1570
1633
  content: l.value ?? "",
1571
1634
  extensions: [
1572
- lt.configure({
1635
+ at.configure({
1573
1636
  heading: !1,
1574
1637
  blockquote: !1,
1575
1638
  bulletList: !1,
@@ -1580,7 +1643,7 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
1580
1643
  horizontalRule: !1,
1581
1644
  hardBreak: !1
1582
1645
  }),
1583
- it.configure({
1646
+ ut.configure({
1584
1647
  html: !1,
1585
1648
  transformPastedText: !0
1586
1649
  // parse markdown on paste
@@ -1590,284 +1653,292 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
1590
1653
  n("change", c.storage.markdown.getMarkdown());
1591
1654
  }
1592
1655
  });
1593
- return Re(() => {
1594
- r.value?.destroy();
1595
- }), (c, d) => (a(), y(Z, ee(te(o)), {
1596
- default: L(() => [
1656
+ return Te(() => {
1657
+ a.value?.destroy();
1658
+ }), (c, d) => (r(), w(Z, ee(te(o)), {
1659
+ default: S(() => [
1597
1660
  u("div", {
1598
- class: $([[c.minHeight], "card bg-base-100 border border-base-300 w-full"]),
1661
+ class: C([[c.minHeight], "card bg-base-100 border border-base-300 w-full"]),
1599
1662
  "aria-label": c.id,
1600
1663
  role: "textbox"
1601
1664
  }, [
1602
- u("div", Yo, [
1603
- (a(!0), p(x, null, P(c.actions, (f) => (a(), p("button", {
1604
- key: f.name,
1665
+ u("div", ns, [
1666
+ (r(!0), f(L, null, P(c.actions, (p) => (r(), f("button", {
1667
+ key: p.name,
1605
1668
  tabindex: "-1",
1606
1669
  type: "button",
1607
- class: $(["btn btn-sm btn-ghost", { "btn-active": g(r)?.isActive(f.name) }]),
1608
- title: f.label,
1609
- onClick: (i) => f.action(g(r))
1670
+ class: C(["btn btn-sm btn-ghost", { "btn-active": g(a)?.isActive(p.name) }]),
1671
+ title: p.label,
1672
+ onClick: (i) => p.action(g(a))
1610
1673
  }, [
1611
1674
  u("span", {
1612
- innerHTML: f.label
1613
- }, null, 8, ts)
1614
- ], 10, es))), 128))
1675
+ innerHTML: p.label
1676
+ }, null, 8, as)
1677
+ ], 10, ls))), 128))
1615
1678
  ]),
1616
- u("div", os, [
1617
- V(g(rt), {
1618
- editor: g(r),
1679
+ u("div", rs, [
1680
+ V(g(it), {
1681
+ editor: g(a),
1619
1682
  class: "prose prose-sm max-w-none h-full"
1620
1683
  }, null, 8, ["editor"])
1621
1684
  ])
1622
- ], 10, Qo)
1685
+ ], 10, ss)
1623
1686
  ]),
1624
1687
  _: 1
1625
1688
  }, 16));
1626
1689
  }
1627
- }), ss = {
1628
- ...F
1629
- }, ns = ["change", "focus", "blur"], ls = { class: "flex items-center justify-center h-full" }, as = { class: "fieldset-label" }, rs = ["aria-label", "disabled"], is = { class: "font-bold text-gray-500 text-sm" }, Ln = /* @__PURE__ */ w({
1690
+ }), is = {
1691
+ ...K
1692
+ }, us = ["change", "focus", "blur"], cs = { class: "flex items-center justify-center h-full" }, ds = { class: "fieldset-label" }, ps = ["aria-label", "disabled"], fs = { class: "font-bold text-gray-500 text-sm" }, On = /* @__PURE__ */ k({
1630
1693
  __name: "Checkbox",
1631
- props: /* @__PURE__ */ O(ss, {
1694
+ props: /* @__PURE__ */ I(is, {
1632
1695
  modelValue: {},
1633
1696
  modelModifiers: {}
1634
1697
  }),
1635
- emits: /* @__PURE__ */ O(ns, ["update:modelValue"]),
1698
+ emits: /* @__PURE__ */ I(us, ["update:modelValue"]),
1636
1699
  setup(e, { emit: t }) {
1637
- const o = e, n = t, l = E(e, "modelValue"), r = (i) => {
1700
+ const o = e, n = t, l = F(e, "modelValue"), a = (i) => {
1638
1701
  n("change", i);
1639
1702
  }, c = (i) => {
1640
1703
  n("focus", i);
1641
1704
  }, d = (i) => {
1642
1705
  n("blur", i);
1643
- }, f = v(
1706
+ }, p = v(
1644
1707
  () => U(o.styles.control.checkbox, o)
1645
1708
  );
1646
- return (i, s) => (a(), p("div", ls, [
1709
+ return (i, s) => (r(), f("div", cs, [
1647
1710
  V(Z, B(o, { "hide-label": !0 }), {
1648
- default: L(() => [
1649
- u("label", as, [
1711
+ default: S(() => [
1712
+ u("label", ds, [
1650
1713
  Y(u("input", {
1651
1714
  "onUpdate:modelValue": s[0] || (s[0] = (m) => l.value = m),
1652
1715
  "aria-label": i.id,
1653
1716
  role: "checkbox",
1654
1717
  type: "checkbox",
1655
- class: $(f.value),
1718
+ class: C(p.value),
1656
1719
  disabled: !i.enabled,
1657
- onChange: r,
1720
+ onChange: a,
1658
1721
  onFocus: c,
1659
1722
  onBlur: d
1660
- }, null, 42, rs), [
1661
- [_e, l.value]
1723
+ }, null, 42, ps), [
1724
+ [$e, l.value]
1662
1725
  ]),
1663
- u("span", is, h(i.label), 1)
1726
+ u("span", fs, h(i.label), 1)
1664
1727
  ])
1665
1728
  ]),
1666
1729
  _: 1
1667
1730
  }, 16)
1668
1731
  ]));
1669
1732
  }
1670
- }), us = {
1671
- ...F,
1733
+ }), ms = {
1734
+ ...K,
1672
1735
  type: { type: String, default: "text" }
1673
- }, cs = ["change", "focus", "blur"], ds = ["aria-label", "type", "disabled", "autofocus", "placeholder"], Sn = /* @__PURE__ */ w({
1736
+ }, bs = ["change", "focus", "blur"], gs = ["aria-label", "type", "disabled", "autofocus", "placeholder"], In = /* @__PURE__ */ k({
1674
1737
  __name: "Input",
1675
- props: /* @__PURE__ */ O(us, {
1738
+ props: /* @__PURE__ */ I(ms, {
1676
1739
  modelValue: {},
1677
1740
  modelModifiers: {}
1678
1741
  }),
1679
- emits: /* @__PURE__ */ O(cs, ["update:modelValue"]),
1742
+ emits: /* @__PURE__ */ I(bs, ["update:modelValue"]),
1680
1743
  setup(e, { emit: t }) {
1681
- const o = e, n = t, l = E(e, "modelValue"), r = (i) => {
1744
+ const o = e, n = t, l = F(e, "modelValue"), a = (i) => {
1682
1745
  n("change", i);
1683
1746
  }, c = (i) => {
1684
1747
  n("focus", i);
1685
1748
  }, d = (i) => {
1686
1749
  n("blur", i);
1687
- }, f = v(
1750
+ }, p = v(
1688
1751
  () => U(o.styles.control.input, o)
1689
1752
  );
1690
- return (i, s) => (a(), y(Z, ee(te(o)), {
1691
- default: L(() => [
1753
+ return (i, s) => (r(), w(Z, ee(te(o)), {
1754
+ default: S(() => [
1692
1755
  Y(u("input", {
1693
1756
  "onUpdate:modelValue": s[0] || (s[0] = (m) => l.value = m),
1694
1757
  "aria-label": i.id,
1695
1758
  autocomplete: "off",
1696
1759
  type: i.type,
1697
- class: $(["w-full", f.value]),
1760
+ class: C(["w-full", p.value]),
1698
1761
  disabled: !i.enabled,
1699
1762
  autofocus: i.isFocused,
1700
1763
  placeholder: i.placeholder,
1701
- onChange: r,
1764
+ onChange: a,
1702
1765
  onFocus: c,
1703
1766
  onBlur: d
1704
- }, null, 42, ds), [
1705
- [Te, l.value]
1767
+ }, null, 42, gs), [
1768
+ [Ee, l.value]
1706
1769
  ])
1707
1770
  ]),
1708
1771
  _: 1
1709
1772
  }, 16));
1710
1773
  }
1711
- }), ps = {
1712
- ...F,
1774
+ }), vs = {
1775
+ ...K,
1713
1776
  steps: { type: Number, default: 1 }
1714
- }, fs = ["change", "focus", "blur"], ms = ["aria-label", "disabled", "step", "autofocus", "placeholder"], Pn = /* @__PURE__ */ w({
1777
+ }, hs = ["change", "focus", "blur"], ys = ["aria-label", "disabled", "step", "autofocus", "placeholder"], Dn = /* @__PURE__ */ k({
1715
1778
  __name: "InputNumber",
1716
- props: /* @__PURE__ */ O(ps, {
1779
+ props: /* @__PURE__ */ I(vs, {
1717
1780
  modelValue: {},
1718
1781
  modelModifiers: {}
1719
1782
  }),
1720
- emits: /* @__PURE__ */ O(fs, ["update:modelValue"]),
1783
+ emits: /* @__PURE__ */ I(hs, ["update:modelValue"]),
1721
1784
  setup(e, { emit: t }) {
1722
- const o = e, n = t, l = E(e, "modelValue"), r = (i) => {
1785
+ const o = e, n = t, l = F(e, "modelValue"), a = (i) => {
1723
1786
  n("change", i);
1724
1787
  }, c = (i) => {
1725
1788
  n("focus", i);
1726
1789
  }, d = (i) => {
1727
1790
  n("blur", i);
1728
- }, f = v(
1791
+ }, p = v(
1729
1792
  () => U(o.styles.control.input, o)
1730
1793
  );
1731
- return (i, s) => (a(), y(Z, ee(te(o)), {
1732
- default: L(() => [
1794
+ return (i, s) => (r(), w(Z, ee(te(o)), {
1795
+ default: S(() => [
1733
1796
  Y(u("input", {
1734
1797
  "onUpdate:modelValue": s[0] || (s[0] = (m) => l.value = m),
1735
1798
  autocomplete: "off",
1736
1799
  "aria-label": i.id,
1737
1800
  type: "number",
1738
- class: $(["w-full", [f.value]]),
1801
+ class: C(["w-full", [p.value]]),
1739
1802
  disabled: !i.enabled,
1740
1803
  step: i.steps,
1741
1804
  autofocus: i.isFocused,
1742
1805
  placeholder: i.placeholder,
1743
- onChange: r,
1806
+ onChange: a,
1744
1807
  onFocus: c,
1745
1808
  onBlur: d
1746
- }, null, 42, ms), [
1747
- [Ce, l.value]
1809
+ }, null, 42, ys), [
1810
+ [Le, l.value]
1748
1811
  ])
1749
1812
  ]),
1750
1813
  _: 1
1751
1814
  }, 16));
1752
1815
  }
1753
- }), bs = {
1754
- ...F,
1816
+ }), ws = {
1817
+ ...K,
1755
1818
  rows: { type: Number, default: 4 }
1756
- }, gs = ["change", "focus", "blur"], vs = ["aria-label", "disabled", "rows", "autofocus", "placeholder"], Mn = /* @__PURE__ */ w({
1819
+ }, ks = ["change", "focus", "blur"], _s = ["aria-label", "disabled", "rows", "autofocus", "placeholder"], Rn = /* @__PURE__ */ k({
1757
1820
  __name: "Textarea",
1758
- props: /* @__PURE__ */ O(bs, {
1821
+ props: /* @__PURE__ */ I(ws, {
1759
1822
  modelValue: {},
1760
1823
  modelModifiers: {}
1761
1824
  }),
1762
- emits: /* @__PURE__ */ O(gs, ["update:modelValue"]),
1825
+ emits: /* @__PURE__ */ I(ks, ["update:modelValue"]),
1763
1826
  setup(e, { emit: t }) {
1764
- const o = e, n = t, l = E(e, "modelValue"), r = (i) => {
1827
+ const o = e, n = t, l = F(e, "modelValue"), a = (i) => {
1765
1828
  n("change", i);
1766
1829
  }, c = (i) => {
1767
1830
  n("focus", i);
1768
1831
  }, d = (i) => {
1769
1832
  n("blur", i);
1770
- }, f = v(
1833
+ }, p = v(
1771
1834
  () => U(o.styles.control.textarea, o)
1772
1835
  );
1773
- return (i, s) => (a(), y(Z, ee(te(o)), {
1774
- default: L(() => [
1836
+ return (i, s) => (r(), w(Z, ee(te(o)), {
1837
+ default: S(() => [
1775
1838
  Y(u("textarea", {
1776
1839
  "onUpdate:modelValue": s[0] || (s[0] = (m) => l.value = m),
1777
1840
  autocomplete: "off",
1778
1841
  type: "text",
1779
1842
  "aria-label": i.id,
1780
- class: $(["w-full", f.value]),
1843
+ class: C(["w-full", p.value]),
1781
1844
  disabled: !i.enabled,
1782
1845
  rows: i.rows,
1783
1846
  autofocus: i.isFocused,
1784
1847
  placeholder: i.placeholder,
1785
- onChange: r,
1848
+ onChange: a,
1786
1849
  onFocus: c,
1787
1850
  onBlur: d
1788
- }, null, 42, vs), [
1789
- [Ce, l.value]
1851
+ }, null, 42, _s), [
1852
+ [Le, l.value]
1790
1853
  ])
1791
1854
  ]),
1792
1855
  _: 1
1793
1856
  }, 16));
1794
1857
  }
1795
- }), hs = {
1858
+ }), Cs = {
1796
1859
  widthLeft: { type: Number, default: 200 },
1797
1860
  widthRight: { type: Number, default: 200 },
1798
1861
  initialLeftOpen: { type: Boolean, default: !0 },
1799
1862
  initialRightOpen: { type: Boolean, default: !0 }
1800
- }, ys = { class: "flex h-full overflow-hidden gap-2" }, ws = {
1863
+ }, $s = { class: "flex h-full overflow-hidden gap-2" }, xs = {
1801
1864
  key: 0,
1802
1865
  id: "drawer-left",
1803
1866
  class: "min-h-0 relative flex-shrink-0 bg-white overflow-visible flex"
1804
- }, ks = { class: "flex-1 overflow-y-auto bg-white" }, _s = {
1867
+ }, Ls = ["aria-expanded", "aria-label"], Ss = { class: "flex-1 overflow-y-auto bg-white" }, Ps = {
1805
1868
  key: 1,
1806
1869
  class: "min-h-0 relative flex-shrink-0 bg-white overflow-visible flex"
1807
- }, Bn = /* @__PURE__ */ w({
1870
+ }, Ms = ["aria-expanded", "aria-label"], Tn = /* @__PURE__ */ k({
1808
1871
  __name: "drawer",
1809
- props: hs,
1872
+ props: Cs,
1810
1873
  setup(e) {
1811
- const t = e, o = xe(), n = v(() => !!o["left-drawer"]), l = v(() => !!o["right-drawer"]), r = S({
1874
+ const t = e, o = Se(), n = v(() => !!o["left-drawer"]), l = v(() => !!o["right-drawer"]), a = x({
1812
1875
  left: t.initialLeftOpen,
1813
1876
  right: t.initialRightOpen
1814
1877
  }), c = (d) => {
1815
- r.value[d] = !r.value[d];
1878
+ a.value[d] = !a.value[d];
1816
1879
  };
1817
- return (d, f) => (a(), p("main", ys, [
1818
- n.value ? (a(), p("aside", ws, [
1880
+ return (d, p) => (r(), f("main", $s, [
1881
+ n.value ? (r(), f("aside", xs, [
1819
1882
  u("div", {
1820
- style: G({ width: r.value.left ? d.widthLeft + "px" : "0px" }),
1883
+ id: "drawer-left-panel",
1884
+ style: X({ width: a.value.left ? d.widthLeft + "px" : "0px" }),
1821
1885
  class: "h-full overflow-hidden bg-white shadow-sm transition-[width] duration-300 ease-in-out"
1822
1886
  }, [
1823
1887
  u("div", {
1824
- style: G({ width: d.widthLeft + "px" }),
1888
+ style: X({ width: d.widthLeft + "px" }),
1825
1889
  class: "h-full overflow-y-auto p-4"
1826
1890
  }, [
1827
1891
  M(d.$slots, "left-drawer")
1828
1892
  ], 4)
1829
1893
  ], 4),
1830
1894
  u("button", {
1895
+ "aria-expanded": a.value.left,
1896
+ "aria-controls": "drawer-left-panel",
1897
+ "aria-label": a.value.left ? "Collapse left panel" : "Expand left panel",
1831
1898
  class: "hover:bg-base-300 hover:text-base-content transition-colors cursor-pointer",
1832
- onClick: f[0] || (f[0] = (i) => c("left"))
1899
+ onClick: p[0] || (p[0] = (i) => c("left"))
1833
1900
  }, [
1834
- V(g(q), {
1901
+ V(g(j), {
1835
1902
  size: "lg",
1836
- icon: r.value.left ? g(T).ChevronLeft : g(T).ChevronRight
1903
+ icon: a.value.left ? g(T).ChevronLeft : g(T).ChevronRight
1837
1904
  }, null, 8, ["icon"])
1838
- ])
1839
- ])) : k("", !0),
1840
- u("div", ks, [
1905
+ ], 8, Ls)
1906
+ ])) : _("", !0),
1907
+ u("div", Ss, [
1841
1908
  M(d.$slots, "default")
1842
1909
  ]),
1843
- l.value ? (a(), p("aside", _s, [
1910
+ l.value ? (r(), f("aside", Ps, [
1844
1911
  u("button", {
1912
+ "aria-expanded": a.value.right,
1913
+ "aria-controls": "drawer-right-panel",
1914
+ "aria-label": a.value.right ? "Collapse right panel" : "Expand right panel",
1845
1915
  class: "hover:bg-base-300 hover:text-base-content transition-colors cursor-pointer",
1846
- onClick: f[1] || (f[1] = (i) => c("right"))
1916
+ onClick: p[1] || (p[1] = (i) => c("right"))
1847
1917
  }, [
1848
- V(g(q), {
1918
+ V(g(j), {
1849
1919
  size: "lg",
1850
- icon: r.value.right ? g(T).ChevronRight : g(T).ChevronLeft
1920
+ icon: a.value.right ? g(T).ChevronRight : g(T).ChevronLeft
1851
1921
  }, null, 8, ["icon"])
1852
- ]),
1922
+ ], 8, Ms),
1853
1923
  u("div", {
1854
- style: G({ width: r.value.right ? d.widthRight + "px" : "0px" }),
1924
+ id: "drawer-right-panel",
1925
+ style: X({ width: a.value.right ? d.widthRight + "px" : "0px" }),
1855
1926
  class: "h-full overflow-hidden bg-white shadow-sm transition-[width] duration-300 ease-in-out"
1856
1927
  }, [
1857
1928
  u("div", {
1858
- style: G({ width: d.widthRight + "px" }),
1929
+ style: X({ width: d.widthRight + "px" }),
1859
1930
  class: "h-full overflow-y-auto p-4"
1860
1931
  }, [
1861
1932
  M(d.$slots, "right-drawer")
1862
1933
  ], 4)
1863
1934
  ], 4)
1864
- ])) : k("", !0)
1935
+ ])) : _("", !0)
1865
1936
  ]));
1866
1937
  }
1867
- }), $s = { class: "ml-1" }, Cs = { class: "truncate flex-1 min-w-0 text-left" }, xs = {
1938
+ }), Bs = { class: "ml-1" }, Vs = { class: "truncate flex-1 min-w-0 text-left" }, As = {
1868
1939
  key: 0,
1869
1940
  class: "badge badge-ghost badge-sm flex-shrink-0"
1870
- }, Ls = /* @__PURE__ */ w({
1941
+ }, Os = /* @__PURE__ */ k({
1871
1942
  __name: "TreeItem",
1872
1943
  props: {
1873
1944
  active: {},
@@ -1878,58 +1949,58 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
1878
1949
  emits: ["toggle", "select"],
1879
1950
  setup(e, { emit: t }) {
1880
1951
  const o = e, n = t, l = v(() => o.active === o.node.id);
1881
- return (r, c) => {
1882
- const d = ue("TreeItem", !0);
1883
- return a(), p("li", $s, [
1952
+ return (a, c) => {
1953
+ const d = ce("TreeItem", !0);
1954
+ return r(), f("li", Bs, [
1884
1955
  u("div", {
1885
- class: $([
1956
+ class: C([
1886
1957
  `flex items-center gap-1 cursor-pointer rounded-md px-1 py-0.5
1887
1958
  hover:bg-gray-100`,
1888
1959
  l.value ? "text-primary" : ""
1889
1960
  ])
1890
1961
  }, [
1891
- (e.node?.children?.length ?? 0) > 0 ? (a(), p("span", {
1962
+ (e.node?.children?.length ?? 0) > 0 ? (r(), f("span", {
1892
1963
  key: 0,
1893
1964
  class: "flex items-center justify-center",
1894
- onClick: c[0] || (c[0] = (f) => n("toggle", e.node))
1965
+ onClick: c[0] || (c[0] = (p) => n("toggle", e.node))
1895
1966
  }, [
1896
- e.node.children && e.isExpanded(e.node.id) ? (a(), y(g(ut), {
1967
+ e.node.children && e.isExpanded(e.node.id) ? (r(), w(g(ct), {
1897
1968
  key: 0,
1898
1969
  class: "w-3 h-3"
1899
- })) : (a(), y(g(ct), {
1970
+ })) : (r(), w(g(dt), {
1900
1971
  key: 1,
1901
1972
  class: "w-3 h-3"
1902
1973
  }))
1903
- ])) : k("", !0),
1974
+ ])) : _("", !0),
1904
1975
  u("div", {
1905
1976
  class: "flex items-center gap-2 w-full min-w-0",
1906
- onClick: c[1] || (c[1] = (f) => n("select", e.node))
1977
+ onClick: c[1] || (c[1] = (p) => n("select", e.node))
1907
1978
  }, [
1908
- u("div", Cs, h(e.node.label), 1),
1909
- e.node.tag ? (a(), p("div", xs, h(e.node.tag), 1)) : k("", !0)
1979
+ u("div", Vs, h(e.node.label), 1),
1980
+ e.node.tag ? (r(), f("div", As, h(e.node.tag), 1)) : _("", !0)
1910
1981
  ])
1911
1982
  ], 2),
1912
- e.node.children && e.isExpanded(e.node.id) ? (a(), p("ul", {
1983
+ e.node.children && e.isExpanded(e.node.id) ? (r(), f("ul", {
1913
1984
  key: 0,
1914
- class: $([
1985
+ class: C([
1915
1986
  "ml-4 border-l pl-2",
1916
1987
  { "border-gray-200": !l.value, "border-primary": l.value }
1917
1988
  ])
1918
1989
  }, [
1919
- (a(!0), p(x, null, P(e.node.children, (f) => (a(), y(d, {
1920
- key: f.id,
1921
- node: f,
1990
+ (r(!0), f(L, null, P(e.node.children, (p) => (r(), w(d, {
1991
+ key: p.id,
1992
+ node: p,
1922
1993
  expanded: e.expanded,
1923
1994
  active: e.active,
1924
1995
  "is-expanded": e.isExpanded,
1925
1996
  onToggle: c[2] || (c[2] = (i) => n("toggle", i)),
1926
1997
  onSelect: c[3] || (c[3] = (i) => n("select", i))
1927
1998
  }, null, 8, ["node", "expanded", "active", "is-expanded"]))), 128))
1928
- ], 2)) : k("", !0)
1999
+ ], 2)) : _("", !0)
1929
2000
  ]);
1930
2001
  };
1931
2002
  }
1932
- }), Ss = { class: "select-none text-sm" }, Vn = /* @__PURE__ */ w({
2003
+ }), Is = { class: "select-none text-sm" }, En = /* @__PURE__ */ k({
1933
2004
  __name: "TreeView",
1934
2005
  props: {
1935
2006
  data: {},
@@ -1937,42 +2008,48 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
1937
2008
  },
1938
2009
  emits: ["select"],
1939
2010
  setup(e, { emit: t }) {
1940
- const o = e, n = t, l = S(/* @__PURE__ */ new Set()), r = (f) => {
1941
- const i = f.id;
1942
- if (!f.children || f.children.length === 0) {
1943
- n("select", f);
2011
+ const o = e, n = t, l = x(/* @__PURE__ */ new Set()), a = (p) => {
2012
+ const i = p.id;
2013
+ if (!p.children || p.children.length === 0) {
2014
+ n("select", p);
1944
2015
  return;
1945
2016
  }
1946
2017
  l.value.has(i) ? l.value.delete(i) : l.value.add(i);
1947
- }, c = (f) => {
1948
- n("select", f), l.value.add(f.id);
1949
- }, d = (f) => l.value.has(f);
1950
- return (f, i) => (a(), p("ul", Ss, [
1951
- (a(!0), p(x, null, P(o.data, (s) => (a(), y(Ls, {
2018
+ }, c = (p) => {
2019
+ n("select", p), l.value.add(p.id);
2020
+ }, d = (p) => l.value.has(p);
2021
+ return (p, i) => (r(), f("ul", Is, [
2022
+ (r(!0), f(L, null, P(o.data, (s) => (r(), w(Os, {
1952
2023
  key: s.id,
1953
2024
  node: s,
1954
2025
  expanded: l.value,
1955
2026
  active: e.active,
1956
2027
  "is-expanded": d,
1957
- onToggle: r,
2028
+ onToggle: a,
1958
2029
  onSelect: c
1959
2030
  }, null, 8, ["node", "expanded", "active"]))), 128))
1960
2031
  ]));
1961
2032
  }
1962
- }), Ps = {
2033
+ }), Ds = {
1963
2034
  key: 0,
2035
+ role: "status",
2036
+ "aria-live": "polite",
1964
2037
  class: "flex items-center justify-center h-20"
1965
- }, An = /* @__PURE__ */ w({
2038
+ }, zn = /* @__PURE__ */ k({
1966
2039
  __name: "loading",
1967
2040
  props: {
1968
2041
  loading: { type: Boolean }
1969
2042
  },
1970
2043
  setup(e) {
1971
- return (t, o) => e.loading ? (a(), p("div", Ps, [...o[0] || (o[0] = [
1972
- u("span", { class: "loading loading-bars loading-md text-primary" }, null, -1)
1973
- ])])) : k("", !0);
1974
- }
1975
- }), Ms = {
2044
+ return (t, o) => e.loading ? (r(), f("div", Ds, [...o[0] || (o[0] = [
2045
+ u("span", {
2046
+ "aria-hidden": "true",
2047
+ class: "loading loading-bars loading-md text-primary"
2048
+ }, null, -1),
2049
+ u("span", { class: "sr-only" }, "Loading...", -1)
2050
+ ])])) : _("", !0);
2051
+ }
2052
+ }), Rs = {
1976
2053
  title: { type: String, required: !0 },
1977
2054
  opened: { type: Boolean, default: !0 },
1978
2055
  heightFull: { type: Boolean, default: !1 },
@@ -1981,103 +2058,104 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
1981
2058
  type: Array,
1982
2059
  default: () => []
1983
2060
  }
1984
- }, Bs = ["checked"], Vs = { class: "collapse-title text-gray-500 text-xs font-medium" }, As = { class: "flex items-center justify-between" }, Is = {
2061
+ }, Ts = ["checked", "aria-label"], Es = { class: "collapse-title text-gray-500 text-xs font-medium" }, zs = { class: "flex items-center justify-between" }, Ns = {
1985
2062
  key: 0,
1986
2063
  class: "list bg-base-100"
1987
- }, Os = /* @__PURE__ */ w({
2064
+ }, qs = /* @__PURE__ */ k({
1988
2065
  __name: "Collapse",
1989
- props: Ms,
2066
+ props: Rs,
1990
2067
  setup(e) {
1991
- const t = xe(), o = e, n = S(o.opened), l = S(o.opened || o.disabled);
1992
- return (r, c) => (a(), p("div", {
1993
- class: $([
2068
+ const t = Se(), o = e, n = x(o.opened), l = x(o.opened || o.disabled);
2069
+ return (a, c) => (r(), f("div", {
2070
+ class: C([
1994
2071
  "collapse collapse-arrow bg-white w-full border border-gray-300",
1995
- r.heightFull ? "h-full" : "",
1996
- r.disabled ? "collapse-open" : "",
2072
+ a.heightFull ? "h-full" : "",
2073
+ a.disabled ? "collapse-open" : "",
1997
2074
  l.value ? "overflow-visible" : ""
1998
2075
  ])
1999
2076
  }, [
2000
- r.disabled ? k("", !0) : (a(), p("input", {
2077
+ a.disabled ? _("", !0) : (r(), f("input", {
2001
2078
  key: 0,
2002
2079
  type: "checkbox",
2003
2080
  checked: n.value,
2004
2081
  tabindex: "-1",
2082
+ "aria-label": "Toggle " + a.title,
2005
2083
  onChange: c[0] || (c[0] = (d) => l.value = d.target.checked)
2006
- }, null, 40, Bs)),
2007
- u("div", Vs, [
2008
- u("div", As, [
2009
- u("span", null, h(r.title), 1),
2010
- o.actions.length > 0 ? (a(), p("div", {
2084
+ }, null, 40, Ts)),
2085
+ u("div", Es, [
2086
+ u("div", zs, [
2087
+ u("span", null, h(a.title), 1),
2088
+ o.actions.length > 0 ? (r(), f("div", {
2011
2089
  key: 0,
2012
2090
  class: "relative z-10 flex gap-1",
2013
- onClick: c[1] || (c[1] = ce(() => {
2091
+ onClick: c[1] || (c[1] = le(() => {
2014
2092
  }, ["stop"]))
2015
2093
  }, [
2016
- (a(!0), p(x, null, P(o.actions, (d, f) => (a(), y(g(N), {
2017
- key: f,
2018
- color: g(j).blank,
2094
+ (r(!0), f(L, null, P(o.actions, (d, p) => (r(), w(g(z), {
2095
+ key: p,
2096
+ color: g(N).blank,
2019
2097
  size: "xs",
2020
2098
  icon: d.icon,
2021
2099
  tooltip: d.tooltip,
2022
2100
  disabled: d.disabled,
2023
2101
  onClick: d.onClick
2024
2102
  }, {
2025
- default: L(() => [
2026
- z(h(d.label), 1)
2103
+ default: S(() => [
2104
+ E(h(d.label), 1)
2027
2105
  ]),
2028
2106
  _: 2
2029
2107
  }, 1032, ["color", "icon", "tooltip", "disabled", "onClick"]))), 128))
2030
- ])) : k("", !0)
2108
+ ])) : _("", !0)
2031
2109
  ])
2032
2110
  ]),
2033
2111
  u("div", {
2034
- class: $(["collapse-content", g(t).list ? "p-0" : ""])
2112
+ class: C(["collapse-content", g(t).list ? "p-0" : ""])
2035
2113
  }, [
2036
- M(r.$slots, "default"),
2037
- g(t).list ? (a(), p("ul", Is, [
2038
- M(r.$slots, "list")
2039
- ])) : k("", !0)
2114
+ M(a.$slots, "default"),
2115
+ g(t).list ? (r(), f("ul", Ns, [
2116
+ M(a.$slots, "list")
2117
+ ])) : _("", !0)
2040
2118
  ], 2)
2041
2119
  ], 2));
2042
2120
  }
2043
- }), Ds = {
2121
+ }), js = {
2044
2122
  title: { type: String },
2045
2123
  label: { type: String },
2046
2124
  labelLink: { type: String },
2047
2125
  description: { type: String },
2048
2126
  descriptionLink: { type: String }
2049
- }, Rs = { class: "list-row" }, Ts = { class: "list-col-grow" }, zs = { key: 0 }, Ns = {
2127
+ }, Fs = { class: "list-row" }, Ks = { class: "list-col-grow" }, Us = { key: 0 }, Hs = {
2050
2128
  key: 1,
2051
2129
  class: "text-xs text-gray-600"
2052
- }, js = ["href"], qs = { key: 1 }, Es = {
2130
+ }, Ws = ["href"], Gs = { key: 1 }, Xs = {
2053
2131
  key: 0,
2054
2132
  class: "text-xs text-gray-500"
2055
- }, Fs = ["href"], Us = { key: 1 }, In = /* @__PURE__ */ w({
2133
+ }, Zs = ["href"], Js = { key: 1 }, Nn = /* @__PURE__ */ k({
2056
2134
  __name: "CollapseRow",
2057
- props: Ds,
2135
+ props: js,
2058
2136
  setup(e) {
2059
- return (t, o) => (a(), p("li", Rs, [
2060
- u("div", Ts, [
2061
- t.title ? (a(), p("div", zs, h(t.title), 1)) : k("", !0),
2062
- t.description || t.descriptionLink ? (a(), p("div", Ns, [
2063
- t.descriptionLink ? (a(), p("a", {
2137
+ return (t, o) => (r(), f("li", Fs, [
2138
+ u("div", Ks, [
2139
+ t.title ? (r(), f("div", Us, h(t.title), 1)) : _("", !0),
2140
+ t.description || t.descriptionLink ? (r(), f("div", Hs, [
2141
+ t.descriptionLink ? (r(), f("a", {
2064
2142
  key: 0,
2065
2143
  href: t.descriptionLink,
2066
2144
  target: "_blank"
2067
- }, h(t.description ?? t.descriptionLink), 9, js)) : (a(), p("span", qs, h(t.description), 1))
2068
- ])) : k("", !0)
2145
+ }, h(t.description ?? t.descriptionLink), 9, Ws)) : (r(), f("span", Gs, h(t.description), 1))
2146
+ ])) : _("", !0)
2069
2147
  ]),
2070
- t.label ? (a(), p("div", Es, [
2071
- t.labelLink ? (a(), p("a", {
2148
+ t.label ? (r(), f("div", Xs, [
2149
+ t.labelLink ? (r(), f("a", {
2072
2150
  key: 0,
2073
2151
  href: t.labelLink,
2074
2152
  target: "_blank"
2075
- }, h(t.label), 9, Fs)) : (a(), p("span", Us, h(t.label), 1))
2076
- ])) : k("", !0),
2153
+ }, h(t.label), 9, Zs)) : (r(), f("span", Js, h(t.label), 1))
2154
+ ])) : _("", !0),
2077
2155
  M(t.$slots, "default")
2078
2156
  ]));
2079
2157
  }
2080
- }), Ks = { class: "text-gray-800" }, On = /* @__PURE__ */ w({
2158
+ }), Qs = { class: "text-gray-800" }, qn = /* @__PURE__ */ k({
2081
2159
  __name: "alert",
2082
2160
  props: {
2083
2161
  message: {},
@@ -2090,15 +2168,15 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
2090
2168
  warning: "alert-warning",
2091
2169
  info: "alert-info"
2092
2170
  };
2093
- return (o, n) => (a(), p("div", {
2171
+ return (o, n) => (r(), f("div", {
2094
2172
  role: "alert",
2095
- class: $(`alert alert-soft ${t[e.type]} `)
2173
+ class: C(`alert alert-soft ${t[e.type]} `)
2096
2174
  }, [
2097
- u("span", Ks, h(e.message), 1),
2175
+ u("span", Qs, h(e.message), 1),
2098
2176
  M(o.$slots, "default")
2099
2177
  ], 2));
2100
2178
  }
2101
- }), Hs = {
2179
+ }), Ys = {
2102
2180
  title: { type: String, required: !0 },
2103
2181
  items: {
2104
2182
  type: Array,
@@ -2117,36 +2195,36 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
2117
2195
  default: void 0
2118
2196
  },
2119
2197
  opened: { type: Boolean, default: !0 }
2120
- }, Ws = ["update:modelValue"], Gs = (e, t, o, n) => {
2198
+ }, en = ["update:modelValue"], tn = (e, t, o, n) => {
2121
2199
  const l = v(
2122
2200
  () => e.value.map((s) => s[o.value])
2123
- ), r = (s) => t.value.includes(s), c = v(() => {
2201
+ ), a = (s) => t.value.includes(s), c = v(() => {
2124
2202
  const s = t.value.length;
2125
2203
  return s === 0 ? "None" : s === l.value.length ? "All" : `${s}`;
2126
2204
  });
2127
- return { isSelected: r, selectedLabel: c, selectAll: () => n("update:modelValue", [...l.value]), selectNone: () => n("update:modelValue", []), toggleItem: (s, m) => {
2205
+ return { isSelected: a, selectedLabel: c, selectAll: () => n("update:modelValue", [...l.value]), selectNone: () => n("update:modelValue", []), toggleItem: (s, m) => {
2128
2206
  m ? n("update:modelValue", [...t.value, s]) : n(
2129
2207
  "update:modelValue",
2130
2208
  t.value.filter((b) => b !== s)
2131
2209
  );
2132
2210
  } };
2133
- }, Xs = { class: "flex items-center justify-between mb-2" }, Zs = { class: "text-xs text-base-content/50" }, Js = { class: "flex gap-1" }, Qs = { class: "flex flex-col gap-1" }, Ys = ["checked", "onChange"], en = { class: "text-sm flex-1 select-none" }, tn = {
2211
+ }, on = { class: "flex items-center justify-between mb-2" }, sn = { class: "text-xs text-base-content/50" }, nn = { class: "flex gap-1" }, ln = { class: "flex flex-col gap-1" }, an = ["checked", "onChange"], rn = { class: "text-sm flex-1 select-none" }, un = {
2134
2212
  key: 1,
2135
2213
  class: "badge badge-sm badge-ghost"
2136
- }, Dn = /* @__PURE__ */ w({
2214
+ }, jn = /* @__PURE__ */ k({
2137
2215
  __name: "filter",
2138
- props: Hs,
2139
- emits: Ws,
2216
+ props: Ys,
2217
+ emits: en,
2140
2218
  setup(e, { emit: t }) {
2141
- const o = e, n = t, l = v(() => o.items ?? []), { isSelected: r, selectedLabel: c, selectAll: d, selectNone: f, toggleItem: i } = Gs(l, we(o, "modelValue"), we(o, "valueKey"), n);
2142
- return (s, m) => (a(), y(g(Os), {
2219
+ const o = e, n = t, l = v(() => o.items ?? []), { isSelected: a, selectedLabel: c, selectAll: d, selectNone: p, toggleItem: i } = tn(l, we(o, "modelValue"), we(o, "valueKey"), n);
2220
+ return (s, m) => (r(), w(g(qs), {
2143
2221
  title: s.title,
2144
2222
  opened: s.opened
2145
2223
  }, {
2146
- default: L(() => [
2147
- u("div", Xs, [
2148
- u("span", Zs, h(g(c)) + " of " + h(l.value.length) + " items ", 1),
2149
- u("div", Js, [
2224
+ default: S(() => [
2225
+ u("div", on, [
2226
+ u("span", sn, h(g(c)) + " of " + h(l.value.length) + " items ", 1),
2227
+ u("div", nn, [
2150
2228
  u("button", {
2151
2229
  class: "btn btn-ghost btn-xs",
2152
2230
  type: "button",
@@ -2159,31 +2237,31 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
2159
2237
  type: "button",
2160
2238
  tabindex: "-1",
2161
2239
  onClick: m[1] || (m[1] = //@ts-ignore
2162
- (...b) => g(f) && g(f)(...b))
2240
+ (...b) => g(p) && g(p)(...b))
2163
2241
  }, " None ")
2164
2242
  ])
2165
2243
  ]),
2166
- u("div", Qs, [
2167
- (a(!0), p(x, null, P(l.value, (b) => (a(), p("label", {
2244
+ u("div", ln, [
2245
+ (r(!0), f(L, null, P(l.value, (b) => (r(), f("label", {
2168
2246
  key: b[s.valueKey],
2169
- class: $(["flex items-center gap-3 px-2 py-1.5 rounded-lg cursor-pointer transition-colors hover:bg-base-200", { "bg-base-200/60": g(r)(b[s.valueKey]) }])
2247
+ class: C(["flex items-center gap-3 px-2 py-1.5 rounded-lg cursor-pointer transition-colors hover:bg-base-200", { "bg-base-200/60": g(a)(b[s.valueKey]) }])
2170
2248
  }, [
2171
2249
  u("input", {
2172
2250
  type: "checkbox",
2173
2251
  class: "checkbox checkbox-sm",
2174
- checked: g(r)(b[s.valueKey]),
2175
- onChange: (_) => g(i)(
2252
+ checked: g(a)(b[s.valueKey]),
2253
+ onChange: (y) => g(i)(
2176
2254
  b[s.valueKey],
2177
- _.target.checked
2255
+ y.target.checked
2178
2256
  )
2179
- }, null, 40, Ys),
2180
- s.colorKey && b[s.colorKey] ? (a(), p("span", {
2257
+ }, null, 40, an),
2258
+ s.colorKey && b[s.colorKey] ? (r(), f("span", {
2181
2259
  key: 0,
2182
2260
  class: "w-3 h-3 rounded-full shrink-0 ring-1 ring-black/10",
2183
- style: G({ backgroundColor: b[s.colorKey] })
2184
- }, null, 4)) : k("", !0),
2185
- u("span", en, h(b[s.labelKey]), 1),
2186
- b[s.countKey] > 0 ? (a(), p("span", tn, h(b[s.countKey]), 1)) : k("", !0)
2261
+ style: X({ backgroundColor: b[s.colorKey] })
2262
+ }, null, 4)) : _("", !0),
2263
+ u("span", rn, h(b[s.labelKey]), 1),
2264
+ b[s.countKey] > 0 ? (r(), f("span", un, h(b[s.countKey]), 1)) : _("", !0)
2187
2265
  ], 2))), 128))
2188
2266
  ])
2189
2267
  ]),
@@ -2192,63 +2270,66 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
2192
2270
  }
2193
2271
  });
2194
2272
  export {
2195
- On as Alert,
2196
- $n as Autocomplete,
2197
- At as BadgeSize,
2198
- N as Btn,
2199
- fn as BtnBadge,
2200
- Bt as BtnBadgeEmits,
2201
- Mt as BtnBadgeProperties,
2202
- Pt as BtnEmits,
2203
- St as BtnProperties,
2204
- Vt as ButtonSize,
2205
- Se as ButtonTag,
2273
+ qn as Alert,
2274
+ Bn as Autocomplete,
2275
+ Pt as BadgeSize,
2276
+ z as Btn,
2277
+ wn as BtnBadge,
2278
+ Rt as BtnBadgeEmits,
2279
+ Dt as BtnBadgeProperties,
2280
+ It as BtnEmits,
2281
+ Ot as BtnProperties,
2282
+ St as ButtonSize,
2283
+ Me as ButtonTag,
2206
2284
  fe as ButtonType,
2207
- vn as Card,
2208
- Ln as Checkbox,
2209
- wn as ClickOutside,
2210
- Os as Collapse,
2211
- In as CollapseRow,
2212
- j as Color,
2213
- Ot as ConfirmModal,
2285
+ $n as Card,
2286
+ On as Checkbox,
2287
+ Sn as ClickOutside,
2288
+ qs as Collapse,
2289
+ Nn as CollapseRow,
2290
+ N as Color,
2291
+ Et as ConfirmModal,
2214
2292
  Z as ControlWrapper,
2215
- Bn as Drawer,
2216
- pn as Dropdown,
2217
- Dn as Filter,
2218
- Ws as FilterEmits,
2219
- Hs as FilterProperties,
2220
- q as Icon,
2293
+ Tn as Drawer,
2294
+ yn as Dropdown,
2295
+ jn as Filter,
2296
+ en as FilterEmits,
2297
+ Ys as FilterProperties,
2298
+ j as Icon,
2221
2299
  T as IconEnum,
2222
- dt as IconMap,
2223
- pt as IconProperties,
2224
- Sn as Input,
2225
- Pn as InputNumber,
2226
- An as Loading,
2227
- xn as Markdown,
2228
- dn as Menu,
2229
- Ct as Modal,
2300
+ pt as IconMap,
2301
+ ft as IconProperties,
2302
+ In as Input,
2303
+ Dn as InputNumber,
2304
+ zn as Loading,
2305
+ An as Markdown,
2306
+ hn as Menu,
2307
+ Bt as Modal,
2308
+ Ct as ModalEmits,
2309
+ _t as ModalProperties,
2230
2310
  me as ModalService,
2231
- Dt as ModalWrapper,
2232
- Cn as MultiSelect,
2233
- Rt as NotificationMessage,
2311
+ Lt as ModalSize,
2312
+ zt as ModalWrapper,
2313
+ Vn as MultiSelect,
2314
+ Nt as NotificationMessage,
2234
2315
  be as NotificationService,
2235
- Nt as Notifications,
2236
- lo as PaginationComponent,
2237
- _n as SelectComponent,
2238
- mn as ShellComponent,
2316
+ Ft as Notifications,
2317
+ uo as PaginationComponent,
2318
+ Mn as SelectComponent,
2319
+ kn as ShellComponent,
2239
2320
  pe as SubMenu,
2240
- gn as Table,
2241
- gn as TableComponent,
2242
- bn as TextCell,
2243
- Mn as Textarea,
2244
- Vn as TreeView,
2245
- hn as addClickOutsideEventListener,
2321
+ Cn as Table,
2322
+ Cn as TableComponent,
2323
+ _n as TextCell,
2324
+ Rn as Textarea,
2325
+ En as TreeView,
2326
+ xn as addClickOutsideEventListener,
2246
2327
  U as buildInputStyle,
2247
- kn as hasCustomEventListener,
2248
- Ro as isDescriptionHidden,
2249
- le as mergeStyles,
2328
+ Pn as hasCustomEventListener,
2329
+ No as isDescriptionHidden,
2330
+ ae as mergeStyles,
2250
2331
  se as myStyles,
2251
- yn as removeClickOutsideEventListener,
2252
- Me as showErrors,
2253
- Gs as useFilter
2332
+ Ln as removeClickOutsideEventListener,
2333
+ Ve as showErrors,
2334
+ tn as useFilter
2254
2335
  };