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