@ghentcdh/ui 0.8.3 → 0.8.6

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