vx-vue 0.9.2 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vxvue.es.js CHANGED
@@ -1,43 +1,43 @@
1
- import { useSlots as $e, ref as w, computed as D, onBeforeUpdate as Ce, openBlock as u, createElementBlock as v, Fragment as _, renderList as z, createBlock as N, resolveDynamicComponent as se, createElementVNode as r, useAttrs as U, normalizeClass as $, unref as M, renderSlot as B, getCurrentScope as Se, onScopeDispose as Me, watch as Z, onUpdated as Ve, mergeProps as j, withKeys as J, withModifiers as I, createCommentVNode as A, toDisplayString as V, createVNode as T, Transition as ie, withCtx as te, createTextVNode as W, nextTick as ce, toValue as fe, withDirectives as pe, vModelText as De, onMounted as de, pushScopeId as _e, popScopeId as Ae, resolveComponent as Be, vShow as Ie, toHandlers as re, normalizeStyle as Pe } from "vue";
2
- const Al = {
1
+ import { useSlots as Se, ref as w, computed as B, onBeforeUpdate as Ve, openBlock as u, createElementBlock as v, Fragment as P, renderList as F, createBlock as N, resolveDynamicComponent as se, createElementVNode as i, useAttrs as W, normalizeClass as $, unref as V, renderSlot as M, getCurrentScope as Me, onScopeDispose as De, watch as U, onUpdated as Ae, mergeProps as E, withKeys as Q, withModifiers as L, createCommentVNode as A, toDisplayString as D, createVNode as j, Transition as ie, withCtx as X, createTextVNode as Z, nextTick as de, toValue as fe, withDirectives as ge, vModelText as Be, onMounted as ce, normalizeStyle as be, pushScopeId as Pe, popScopeId as Ie, resolveComponent as Le, createSlots as Te, vShow as _e, toHandlers as re } from "vue";
2
+ const Ml = {
3
3
  __name: "accordion",
4
4
  props: { activeIndex: [Number, Array] },
5
5
  emits: ["update:activeIndex"],
6
- setup(e, { emit: c }) {
7
- const t = e, s = c, a = $e(), l = w([]), d = (h) => l.value.push(h), n = D(() => (l.value = [], a.default().reduce((h, m) => ((m.type.__name || m.type.name) === "accordion-panel" && h.push(m), h), []))), o = (h) => {
8
- if (Array.isArray(t.activeIndex)) {
9
- let m = [].concat(t.activeIndex), g = m.findIndex((y) => y === h);
10
- g === -1 ? s("update:activeIndex", [...m, h]) : (m.splice(g, 1), s("update:activeIndex", m));
6
+ setup(e, { emit: d }) {
7
+ const l = e, s = d, a = Se(), t = w([]), c = (h) => t.value.push(h), n = B(() => (t.value = [], a.default().reduce((h, f) => ((f.type.__name || f.type.name) === "accordion-panel" && h.push(f), h), []))), o = (h) => {
8
+ if (Array.isArray(l.activeIndex)) {
9
+ let f = [].concat(l.activeIndex), g = f.findIndex((y) => y === h);
10
+ g === -1 ? s("update:activeIndex", [...f, h]) : (f.splice(g, 1), s("update:activeIndex", f));
11
11
  } else
12
- s("update:activeIndex", h === t.activeIndex ? -1 : h);
13
- }, f = (h) => {
14
- if (h = ++h % n.value.length, !l.value[h].disabled) {
15
- o(h), l.value[h].focus();
12
+ s("update:activeIndex", h === l.activeIndex ? -1 : h);
13
+ }, m = (h) => {
14
+ if (h = ++h % n.value.length, !t.value[h].disabled) {
15
+ o(h), t.value[h].focus();
16
16
  return;
17
17
  }
18
- f(h);
19
- }, i = (h) => {
20
- if (h = (h || n.value.length) - 1, !l.value[h].disabled) {
21
- o(h), l.value[h].focus();
18
+ m(h);
19
+ }, r = (h) => {
20
+ if (h = (h || n.value.length) - 1, !t.value[h].disabled) {
21
+ o(h), t.value[h].focus();
22
22
  return;
23
23
  }
24
- i(h);
24
+ r(h);
25
25
  };
26
- return Ce(() => l.value = []), (h, m) => (u(!0), v(_, null, z(n.value, (g, y) => {
27
- var L;
26
+ return Ve(() => t.value = []), (h, f) => (u(!0), v(P, null, F(n.value, (g, y) => {
27
+ var T;
28
28
  return u(), N(se(g), {
29
29
  key: y,
30
- show: Array.isArray(e.activeIndex) ? ((L = e.activeIndex) == null ? void 0 : L.indexOf(y)) !== -1 : e.activeIndex === y,
31
- onSelect: (F) => o(y),
32
- onKeydown: (F) => f(y),
33
- onKeyup: (F) => i(y),
30
+ show: Array.isArray(e.activeIndex) ? ((T = e.activeIndex) == null ? void 0 : T.indexOf(y)) !== -1 : e.activeIndex === y,
31
+ onSelect: (_) => o(y),
32
+ onKeydown: (_) => m(y),
33
+ onKeyup: (_) => r(y),
34
34
  ref_for: !0,
35
- ref: d
35
+ ref: c
36
36
  }, null, 40, ["show", "onSelect", "onKeydown", "onKeyup"]);
37
37
  }), 128));
38
38
  }
39
39
  };
40
- function Le(e, c) {
40
+ function Fe(e, d) {
41
41
  return u(), v("svg", {
42
42
  xmlns: "http://www.w3.org/2000/svg",
43
43
  viewBox: "0 0 24 24",
@@ -45,14 +45,14 @@ function Le(e, c) {
45
45
  "aria-hidden": "true",
46
46
  "data-slot": "icon"
47
47
  }, [
48
- r("path", {
48
+ i("path", {
49
49
  "fill-rule": "evenodd",
50
50
  d: "M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",
51
51
  "clip-rule": "evenodd"
52
52
  })
53
53
  ]);
54
54
  }
55
- function le(e, c) {
55
+ function le(e, d) {
56
56
  return u(), v("svg", {
57
57
  xmlns: "http://www.w3.org/2000/svg",
58
58
  viewBox: "0 0 24 24",
@@ -60,14 +60,14 @@ function le(e, c) {
60
60
  "aria-hidden": "true",
61
61
  "data-slot": "icon"
62
62
  }, [
63
- r("path", {
63
+ i("path", {
64
64
  "fill-rule": "evenodd",
65
65
  d: "M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",
66
66
  "clip-rule": "evenodd"
67
67
  })
68
68
  ]);
69
69
  }
70
- function ee(e, c) {
70
+ function te(e, d) {
71
71
  return u(), v("svg", {
72
72
  xmlns: "http://www.w3.org/2000/svg",
73
73
  viewBox: "0 0 24 24",
@@ -75,14 +75,14 @@ function ee(e, c) {
75
75
  "aria-hidden": "true",
76
76
  "data-slot": "icon"
77
77
  }, [
78
- r("path", {
78
+ i("path", {
79
79
  "fill-rule": "evenodd",
80
80
  d: "M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",
81
81
  "clip-rule": "evenodd"
82
82
  })
83
83
  ]);
84
84
  }
85
- function Fe(e, c) {
85
+ function Oe(e, d) {
86
86
  return u(), v("svg", {
87
87
  xmlns: "http://www.w3.org/2000/svg",
88
88
  viewBox: "0 0 24 24",
@@ -90,14 +90,14 @@ function Fe(e, c) {
90
90
  "aria-hidden": "true",
91
91
  "data-slot": "icon"
92
92
  }, [
93
- r("path", {
93
+ i("path", {
94
94
  "fill-rule": "evenodd",
95
95
  d: "M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z",
96
96
  "clip-rule": "evenodd"
97
97
  })
98
98
  ]);
99
99
  }
100
- function Oe(e, c) {
100
+ function ze(e, d) {
101
101
  return u(), v("svg", {
102
102
  xmlns: "http://www.w3.org/2000/svg",
103
103
  viewBox: "0 0 24 24",
@@ -105,14 +105,14 @@ function Oe(e, c) {
105
105
  "aria-hidden": "true",
106
106
  "data-slot": "icon"
107
107
  }, [
108
- r("path", {
108
+ i("path", {
109
109
  "fill-rule": "evenodd",
110
110
  d: "M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z",
111
111
  "clip-rule": "evenodd"
112
112
  })
113
113
  ]);
114
114
  }
115
- function ze(e, c) {
115
+ function je(e, d) {
116
116
  return u(), v("svg", {
117
117
  xmlns: "http://www.w3.org/2000/svg",
118
118
  viewBox: "0 0 24 24",
@@ -120,14 +120,14 @@ function ze(e, c) {
120
120
  "aria-hidden": "true",
121
121
  "data-slot": "icon"
122
122
  }, [
123
- r("path", {
123
+ i("path", {
124
124
  "fill-rule": "evenodd",
125
125
  d: "M4.25 12a.75.75 0 0 1 .75-.75h14a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1-.75-.75Z",
126
126
  "clip-rule": "evenodd"
127
127
  })
128
128
  ]);
129
129
  }
130
- function Te(e, c) {
130
+ function Ee(e, d) {
131
131
  return u(), v("svg", {
132
132
  xmlns: "http://www.w3.org/2000/svg",
133
133
  viewBox: "0 0 24 24",
@@ -135,14 +135,14 @@ function Te(e, c) {
135
135
  "aria-hidden": "true",
136
136
  "data-slot": "icon"
137
137
  }, [
138
- r("path", {
138
+ i("path", {
139
139
  "fill-rule": "evenodd",
140
140
  d: "M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",
141
141
  "clip-rule": "evenodd"
142
142
  })
143
143
  ]);
144
144
  }
145
- function ge(e, c) {
145
+ function xe(e, d) {
146
146
  return u(), v("svg", {
147
147
  xmlns: "http://www.w3.org/2000/svg",
148
148
  viewBox: "0 0 24 24",
@@ -150,102 +150,133 @@ function ge(e, c) {
150
150
  "aria-hidden": "true",
151
151
  "data-slot": "icon"
152
152
  }, [
153
- r("path", {
153
+ i("path", {
154
154
  "fill-rule": "evenodd",
155
155
  d: "M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",
156
156
  "clip-rule": "evenodd"
157
157
  })
158
158
  ]);
159
159
  }
160
- const je = ["id", "disabled", "aria-expanded", "aria-controls"], Ne = ["aria-labelledby", "id"], Ye = { class: "overflow-hidden rounded-b" }, Bl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
160
+ const Ne = ["id", "disabled", "aria-expanded", "aria-controls"], Ye = ["aria-labelledby", "id"], Re = { class: "overflow-hidden rounded-b" }, Dl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
161
161
  __name: "accordion-panel",
162
162
  props: { show: Boolean, disabled: Boolean },
163
163
  emits: ["select", "keyup", "keydown"],
164
- setup(e, { expose: c, emit: t }) {
165
- const s = t, a = e, l = U(), d = w(null), n = Math.random().toString(20).substring(2, 8), o = (i) => {
164
+ setup(e, { expose: d, emit: l }) {
165
+ const s = l, a = e, t = W(), c = w(null), n = Math.random().toString(20).substring(2, 8), o = (r) => {
166
166
  if (!a.disabled) {
167
- const h = (/* @__PURE__ */ new Map([[40, "keydown"], [38, "keyup"]])).get(i.keyCode);
168
- h && (s(h), i.preventDefault());
167
+ const h = (/* @__PURE__ */ new Map([[40, "keydown"], [38, "keyup"]])).get(r.keyCode);
168
+ h && (s(h), r.preventDefault());
169
169
  }
170
170
  };
171
- return c({ focus: () => d.value.focus(), disabled: a.disabled }), (i, h) => (u(), v("div", null, [
172
- r("button", {
173
- onClick: h[0] || (h[0] = (m) => s("select")),
171
+ return d({ focus: () => c.value.focus(), disabled: a.disabled }), (r, h) => (u(), v("div", null, [
172
+ i("button", {
173
+ onClick: h[0] || (h[0] = (f) => s("select")),
174
174
  onKeydown: o,
175
175
  class: $([
176
176
  "flex items-center w-full space-x-2 px-4 py-2 ring-vxvue",
177
177
  e.show ? "rounded-t" : "rounded",
178
178
  e.disabled ? "bg-slate-300 text-slate-700" : "bg-vxvue hover:bg-vxvue-600 text-white",
179
- M(l).class
179
+ V(t).class
180
180
  ]),
181
- id: "ap-control-" + M(n),
181
+ id: "ap-control-" + V(n),
182
182
  disabled: e.disabled,
183
183
  "aria-expanded": e.show,
184
- "aria-controls": "ap-" + M(n),
184
+ "aria-controls": "ap-" + V(n),
185
185
  ref_key: "btn",
186
- ref: d,
186
+ ref: c,
187
187
  tabindex: "0"
188
188
  }, [
189
- e.disabled ? (u(), N(M(ge), {
189
+ e.disabled ? (u(), N(V(xe), {
190
190
  key: 0,
191
191
  class: "size-5"
192
- })) : (u(), N(M(ee), {
192
+ })) : (u(), N(V(te), {
193
193
  key: 1,
194
194
  class: $(["size-5 transform-gpu transition-transform duration-300", { "rotate-90": e.show }])
195
195
  }, null, 8, ["class"])),
196
- r("span", null, [
197
- B(i.$slots, "header")
196
+ i("span", null, [
197
+ M(r.$slots, "header")
198
198
  ])
199
- ], 42, je),
200
- r("div", {
199
+ ], 42, Ne),
200
+ i("div", {
201
201
  class: $(["grid transition-[grid-template-rows] duration-300 ease-in-out", e.show && !e.disabled ? "grid-rows-1" : "grid-rows-[repeat(1,minmax(0,0fr))]"]),
202
- "aria-labelledby": "ap-control-" + M(n),
203
- id: "ap-" + M(n)
202
+ "aria-labelledby": "ap-control-" + V(n),
203
+ id: "ap-" + V(n)
204
204
  }, [
205
- r("div", Ye, [
206
- B(i.$slots, "default")
205
+ i("div", Re, [
206
+ M(r.$slots, "default")
207
207
  ])
208
- ], 10, Ne)
208
+ ], 10, Ye)
209
209
  ]));
210
210
  }
211
- });
212
- function Ee(e) {
213
- return Se() ? (Me(e), !0) : !1;
211
+ }), We = ["viewBox"], He = ["cx", "cy", "r", "stroke-width"], Ue = ["cx", "cy", "r", "stroke-width", "stroke-dasharray"], ye = {
212
+ __name: "spinner",
213
+ props: { radius: { type: Number, default: 10 }, strokeWidth: { type: Number, default: 4 } },
214
+ setup(e) {
215
+ const d = e, l = B(() => d.radius + d.strokeWidth / 2), s = B(() => d.radius * 2 + d.strokeWidth), a = B(() => d.radius * Math.PI / 1.5);
216
+ return (t, c) => (u(), v("svg", {
217
+ class: "animate-spin",
218
+ xmlns: "http://www.w3.org/2000/svg",
219
+ fill: "none",
220
+ viewBox: "0 0 " + s.value + " " + s.value,
221
+ role: "progressbar"
222
+ }, [
223
+ i("circle", {
224
+ class: "opacity-35",
225
+ cx: l.value,
226
+ cy: l.value,
227
+ r: e.radius,
228
+ stroke: "currentColor",
229
+ "stroke-width": e.strokeWidth
230
+ }, null, 8, He),
231
+ i("circle", {
232
+ cx: l.value,
233
+ cy: l.value,
234
+ r: e.radius,
235
+ stroke: "currentColor",
236
+ "stroke-width": e.strokeWidth,
237
+ "stroke-dasharray": a.value + " " + e.radius * 100,
238
+ "stroke-linecap": "round"
239
+ }, null, 8, Ue)
240
+ ], 8, We));
241
+ }
242
+ };
243
+ function Ze(e) {
244
+ return Me() ? (De(e), !0) : !1;
214
245
  }
215
- function be(e) {
216
- return typeof e == "function" ? e() : M(e);
246
+ function we(e) {
247
+ return typeof e == "function" ? e() : V(e);
217
248
  }
218
- const xe = typeof window < "u" && typeof document < "u";
249
+ const ke = typeof window < "u" && typeof document < "u";
219
250
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
220
- const Re = Object.prototype.toString, We = (e) => Re.call(e) === "[object Object]", ae = () => {
221
- }, He = /* @__PURE__ */ Ue();
222
- function Ue() {
223
- var e, c;
224
- return xe && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(ad|hone|od)/.test(window.navigator.userAgent) || ((c = window == null ? void 0 : window.navigator) == null ? void 0 : c.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
251
+ const Ke = Object.prototype.toString, qe = (e) => Ke.call(e) === "[object Object]", ae = () => {
252
+ }, Ge = /* @__PURE__ */ Xe();
253
+ function Xe() {
254
+ var e, d;
255
+ return ke && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(ad|hone|od)/.test(window.navigator.userAgent) || ((d = window == null ? void 0 : window.navigator) == null ? void 0 : d.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
225
256
  }
226
- const Ze = /[YMDHhms]o|\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
227
- function Ke(e, c, t, s) {
257
+ const Je = /[YMDHhms]o|\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
258
+ function Qe(e, d, l, s) {
228
259
  let a = e < 12 ? "AM" : "PM";
229
- return s && (a = a.split("").reduce((l, d) => l += `${d}.`, "")), t ? a.toLowerCase() : a;
260
+ return s && (a = a.split("").reduce((t, c) => t += `${c}.`, "")), l ? a.toLowerCase() : a;
230
261
  }
231
262
  function q(e) {
232
- const c = ["th", "st", "nd", "rd"], t = e % 100;
233
- return e + (c[(t - 20) % 10] || c[t] || c[0]);
263
+ const d = ["th", "st", "nd", "rd"], l = e % 100;
264
+ return e + (d[(l - 20) % 10] || d[l] || d[0]);
234
265
  }
235
- function me(e, c, t = {}) {
266
+ function he(e, d, l = {}) {
236
267
  var s;
237
- const a = e.getFullYear(), l = e.getMonth(), d = e.getDate(), n = e.getHours(), o = e.getMinutes(), f = e.getSeconds(), i = e.getMilliseconds(), h = e.getDay(), m = (s = t.customMeridiem) != null ? s : Ke, g = {
268
+ const a = e.getFullYear(), t = e.getMonth(), c = e.getDate(), n = e.getHours(), o = e.getMinutes(), m = e.getSeconds(), r = e.getMilliseconds(), h = e.getDay(), f = (s = l.customMeridiem) != null ? s : Qe, g = {
238
269
  Yo: () => q(a),
239
270
  YY: () => String(a).slice(-2),
240
271
  YYYY: () => a,
241
- M: () => l + 1,
242
- Mo: () => q(l + 1),
243
- MM: () => `${l + 1}`.padStart(2, "0"),
244
- MMM: () => e.toLocaleDateString(t.locales, { month: "short" }),
245
- MMMM: () => e.toLocaleDateString(t.locales, { month: "long" }),
246
- D: () => String(d),
247
- Do: () => q(d),
248
- DD: () => `${d}`.padStart(2, "0"),
272
+ M: () => t + 1,
273
+ Mo: () => q(t + 1),
274
+ MM: () => `${t + 1}`.padStart(2, "0"),
275
+ MMM: () => e.toLocaleDateString(l.locales, { month: "short" }),
276
+ MMMM: () => e.toLocaleDateString(l.locales, { month: "long" }),
277
+ D: () => String(c),
278
+ Do: () => q(c),
279
+ DD: () => `${c}`.padStart(2, "0"),
249
280
  H: () => String(n),
250
281
  Ho: () => q(n),
251
282
  HH: () => `${n}`.padStart(2, "0"),
@@ -255,138 +286,115 @@ function me(e, c, t = {}) {
255
286
  m: () => String(o),
256
287
  mo: () => q(o),
257
288
  mm: () => `${o}`.padStart(2, "0"),
258
- s: () => String(f),
259
- so: () => q(f),
260
- ss: () => `${f}`.padStart(2, "0"),
261
- SSS: () => `${i}`.padStart(3, "0"),
289
+ s: () => String(m),
290
+ so: () => q(m),
291
+ ss: () => `${m}`.padStart(2, "0"),
292
+ SSS: () => `${r}`.padStart(3, "0"),
262
293
  d: () => h,
263
- dd: () => e.toLocaleDateString(t.locales, { weekday: "narrow" }),
264
- ddd: () => e.toLocaleDateString(t.locales, { weekday: "short" }),
265
- dddd: () => e.toLocaleDateString(t.locales, { weekday: "long" }),
266
- A: () => m(n, o),
267
- AA: () => m(n, o, !1, !0),
268
- a: () => m(n, o, !0),
269
- aa: () => m(n, o, !0, !0)
294
+ dd: () => e.toLocaleDateString(l.locales, { weekday: "narrow" }),
295
+ ddd: () => e.toLocaleDateString(l.locales, { weekday: "short" }),
296
+ dddd: () => e.toLocaleDateString(l.locales, { weekday: "long" }),
297
+ A: () => f(n, o),
298
+ AA: () => f(n, o, !1, !0),
299
+ a: () => f(n, o, !0),
300
+ aa: () => f(n, o, !0, !0)
270
301
  };
271
- return c.replace(Ze, (y, L) => {
272
- var F, O;
273
- return (O = L ?? ((F = g[y]) == null ? void 0 : F.call(g))) != null ? O : y;
302
+ return d.replace(Je, (y, T) => {
303
+ var _, O;
304
+ return (O = T ?? ((_ = g[y]) == null ? void 0 : _.call(g))) != null ? O : y;
274
305
  });
275
306
  }
276
- function Q(e) {
277
- var c;
278
- const t = be(e);
279
- return (c = t == null ? void 0 : t.$el) != null ? c : t;
307
+ function ee(e) {
308
+ var d;
309
+ const l = we(e);
310
+ return (d = l == null ? void 0 : l.$el) != null ? d : l;
280
311
  }
281
- const ye = xe ? window : void 0;
312
+ const $e = ke ? window : void 0;
282
313
  function ue(...e) {
283
- let c, t, s, a;
284
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, s, a] = e, c = ye) : [c, t, s, a] = e, !c)
314
+ let d, l, s, a;
315
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([l, s, a] = e, d = $e) : [d, l, s, a] = e, !d)
285
316
  return ae;
286
- Array.isArray(t) || (t = [t]), Array.isArray(s) || (s = [s]);
287
- const l = [], d = () => {
288
- l.forEach((i) => i()), l.length = 0;
289
- }, n = (i, h, m, g) => (i.addEventListener(h, m, g), () => i.removeEventListener(h, m, g)), o = Z(
290
- () => [Q(c), be(a)],
291
- ([i, h]) => {
292
- if (d(), !i)
317
+ Array.isArray(l) || (l = [l]), Array.isArray(s) || (s = [s]);
318
+ const t = [], c = () => {
319
+ t.forEach((r) => r()), t.length = 0;
320
+ }, n = (r, h, f, g) => (r.addEventListener(h, f, g), () => r.removeEventListener(h, f, g)), o = U(
321
+ () => [ee(d), we(a)],
322
+ ([r, h]) => {
323
+ if (c(), !r)
293
324
  return;
294
- const m = We(h) ? { ...h } : h;
295
- l.push(
296
- ...t.flatMap((g) => s.map((y) => n(i, g, y, m)))
325
+ const f = qe(h) ? { ...h } : h;
326
+ t.push(
327
+ ...l.flatMap((g) => s.map((y) => n(r, g, y, f)))
297
328
  );
298
329
  },
299
330
  { immediate: !0, flush: "post" }
300
- ), f = () => {
301
- o(), d();
331
+ ), m = () => {
332
+ o(), c();
302
333
  };
303
- return Ee(f), f;
334
+ return Ze(m), m;
304
335
  }
305
- let he = !1;
306
- function ve(e, c, t = {}) {
307
- const { window: s = ye, ignore: a = [], capture: l = !0, detectIframe: d = !1 } = t;
336
+ let pe = !1;
337
+ function ve(e, d, l = {}) {
338
+ const { window: s = $e, ignore: a = [], capture: t = !0, detectIframe: c = !1 } = l;
308
339
  if (!s)
309
340
  return ae;
310
- He && !he && (he = !0, Array.from(s.document.body.children).forEach((m) => m.addEventListener("click", ae)), s.document.documentElement.addEventListener("click", ae));
341
+ Ge && !pe && (pe = !0, Array.from(s.document.body.children).forEach((f) => f.addEventListener("click", ae)), s.document.documentElement.addEventListener("click", ae));
311
342
  let n = !0;
312
- const o = (m) => a.some((g) => {
343
+ const o = (f) => a.some((g) => {
313
344
  if (typeof g == "string")
314
- return Array.from(s.document.querySelectorAll(g)).some((y) => y === m.target || m.composedPath().includes(y));
345
+ return Array.from(s.document.querySelectorAll(g)).some((y) => y === f.target || f.composedPath().includes(y));
315
346
  {
316
- const y = Q(g);
317
- return y && (m.target === y || m.composedPath().includes(y));
347
+ const y = ee(g);
348
+ return y && (f.target === y || f.composedPath().includes(y));
318
349
  }
319
- }), i = [
320
- ue(s, "click", (m) => {
321
- const g = Q(e);
322
- if (!(!g || g === m.target || m.composedPath().includes(g))) {
323
- if (m.detail === 0 && (n = !o(m)), !n) {
350
+ }), r = [
351
+ ue(s, "click", (f) => {
352
+ const g = ee(e);
353
+ if (!(!g || g === f.target || f.composedPath().includes(g))) {
354
+ if (f.detail === 0 && (n = !o(f)), !n) {
324
355
  n = !0;
325
356
  return;
326
357
  }
327
- c(m);
358
+ d(f);
328
359
  }
329
- }, { passive: !0, capture: l }),
330
- ue(s, "pointerdown", (m) => {
331
- const g = Q(e);
332
- n = !o(m) && !!(g && !m.composedPath().includes(g));
360
+ }, { passive: !0, capture: t }),
361
+ ue(s, "pointerdown", (f) => {
362
+ const g = ee(e);
363
+ n = !o(f) && !!(g && !f.composedPath().includes(g));
333
364
  }, { passive: !0 }),
334
- d && ue(s, "blur", (m) => {
365
+ c && ue(s, "blur", (f) => {
335
366
  setTimeout(() => {
336
367
  var g;
337
- const y = Q(e);
338
- ((g = s.document.activeElement) == null ? void 0 : g.tagName) === "IFRAME" && !(y != null && y.contains(s.document.activeElement)) && c(m);
368
+ const y = ee(e);
369
+ ((g = s.document.activeElement) == null ? void 0 : g.tagName) === "IFRAME" && !(y != null && y.contains(s.document.activeElement)) && d(f);
339
370
  }, 0);
340
371
  })
341
372
  ].filter(Boolean);
342
- return () => i.forEach((m) => m());
373
+ return () => r.forEach((f) => f());
343
374
  }
344
- const qe = ["value", "onKeydown"], Ge = { class: "flex absolute inset-y-0 right-0 items-center pr-3 text-vxvue-700" }, Xe = {
345
- key: 0,
346
- class: "animate-spin size-5",
347
- xmlns: "http://www.w3.org/2000/svg",
348
- fill: "none",
349
- viewBox: "0 0 24 24"
350
- }, Je = /* @__PURE__ */ r("circle", {
351
- class: "opacity-25",
352
- cx: "12",
353
- cy: "12",
354
- r: "10",
355
- stroke: "currentColor",
356
- "stroke-width": "4"
357
- }, null, -1), Qe = /* @__PURE__ */ r("path", {
358
- class: "opacity-75",
359
- fill: "currentColor",
360
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
361
- }, null, -1), et = [
362
- Je,
363
- Qe
364
- ], Il = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
375
+ const et = ["value", "onKeydown"], tt = { class: "flex absolute inset-y-0 right-0 items-center pr-3 text-vxvue-700" }, lt = ["data-result-index"], Al = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
365
376
  __name: "autocomplete",
366
377
  props: {
367
378
  modelValue: { type: String, default: "" },
368
379
  search: { type: Function, required: !0 },
369
- baseClass: { type: String, default: "vxvue-autocomplete" },
370
380
  resultListClass: { type: String, default: "result-list" },
371
381
  resultItemClass: { type: String, default: "result-list-item" },
372
- inputClass: { type: String, default: "autocomplete-input" },
373
382
  getResultValue: { type: Function, default: (e) => e },
374
383
  autoSelect: Boolean
375
384
  },
376
385
  emits: ["update:modelValue", "blur", "submit"],
377
- setup(e, { emit: c }) {
378
- const t = c, s = e, a = U(), d = (/* @__PURE__ */ (() => {
386
+ setup(e, { emit: d }) {
387
+ const l = d, s = e, a = W(), c = (/* @__PURE__ */ (() => {
379
388
  let C = 0;
380
389
  return (S) => (S || "") + ++C;
381
- })())((a.id || "autocomplete") + "-"), n = w([]), o = w(-1), f = w(0), i = w(!1), h = w(!1), m = w("top-0 translate-y-12"), g = w(!0), y = w(null), L = w(null), F = w(null), O = D(
390
+ })())((a.id || "autocomplete") + "-"), n = w([]), o = w(-1), m = w(0), r = w(!1), h = w(!1), f = w("top-0 translate-y-12"), g = w(!0), y = w(null), T = w(null), _ = w(null), O = B(
382
391
  () => n.value.map((C, S) => ({
383
392
  id: (a.id || "autocomplete") + "-item-" + S,
384
- class: ["autocomplete-item", s.resultItemClass, { "bg-vxvue-700 text-white": o.value === S }],
385
- "data-result-index": S,
393
+ class: [s.resultItemClass, { "bg-vxvue-700 text-white": o.value === S }],
386
394
  role: "option",
387
395
  ...o.value === S ? { "aria-selected": "true" } : {}
388
396
  }))
389
- ), Y = D(() => ({
397
+ ), z = B(() => ({
390
398
  role: "combobox",
391
399
  autocomplete: "off",
392
400
  autocapitalize: "off",
@@ -394,117 +402,123 @@ const qe = ["value", "onKeydown"], Ge = { class: "flex absolute inset-y-0 right-
394
402
  spellcheck: "false",
395
403
  "aria-autocomplete": "list",
396
404
  "aria-haspopup": "listbox",
397
- "aria-owns": d,
398
- "aria-expanded": i.value ? "true" : "false",
405
+ "aria-owns": c,
406
+ "aria-expanded": r.value ? "true" : "false",
399
407
  "aria-activedescendant": o.value > -1 ? O.value[o.value].id : "",
400
408
  ...a
401
- })), G = D(() => ({
402
- id: d,
403
- class: ["autocomplete-list absolute min-w-full transform z-10", s.resultListClass, m.value],
409
+ })), G = B(() => ({
410
+ id: c,
411
+ class: ["absolute min-w-full transform z-10", s.resultListClass, f.value],
404
412
  role: "listbox"
405
- })), E = () => {
406
- o.value = -1, n.value = [], i.value = !1, g.value = !0;
413
+ })), R = () => {
414
+ o.value = -1, n.value = [], r.value = !1, g.value = !0;
407
415
  }, k = (C) => {
408
416
  const S = s.search(C);
409
417
  if (S instanceof Promise) {
410
- const H = ++f.value;
411
- h.value = !0, S.then((R) => {
412
- H === f.value && (n.value = R, h.value = !1, n.value.length ? (o.value = s.autoSelect ? 0 : -1, i.value = !0) : E());
418
+ const H = ++m.value;
419
+ h.value = !0, S.then((Y) => {
420
+ H === m.value && (n.value = Y, h.value = !1, n.value.length ? (o.value = s.autoSelect ? 0 : -1, r.value = !0) : R());
413
421
  });
414
422
  } else
415
- n.value = S, n.value.length === 0 ? E() : (o.value = s.autoSelect ? 0 : -1, i.value = !0);
423
+ n.value = S, n.value.length === 0 ? R() : (o.value = s.autoSelect ? 0 : -1, r.value = !0);
416
424
  }, p = () => {
417
425
  const C = n.value[o.value];
418
- return C && t("update:modelValue", s.getResultValue(C)), E(), C;
426
+ return C && l("update:modelValue", s.getResultValue(C)), R(), C;
419
427
  }, x = (C) => {
420
- t("update:modelValue", C), k(C);
421
- }, b = (C) => k(C.target.value), P = () => {
422
- E(), t("blur");
428
+ l("update:modelValue", C), k(C);
429
+ }, b = (C) => k(C.target.value), I = () => {
430
+ R(), l("blur");
423
431
  }, K = () => {
424
432
  const C = n.value.length;
425
433
  o.value = ((o.value - 1) % C + C) % C;
426
434
  }, ne = (C) => {
427
- i.value || b(C);
435
+ r.value || b(C);
428
436
  const S = n.value.length;
429
437
  o.value = ((o.value + 1) % S + S) % S;
430
- }, X = () => {
431
- E(), t("update:modelValue", "");
432
- }, oe = () => t("submit", p()), ke = (C) => {
438
+ }, J = () => {
439
+ R(), l("update:modelValue", "");
440
+ }, oe = () => l("submit", p()), Ce = (C) => {
433
441
  const S = C.target.closest("[data-result-index]");
434
- S && (o.value = parseInt(S.dataset.resultIndex, 10), t("submit", p()));
442
+ S && (o.value = parseInt(S.dataset.resultIndex, 10), l("submit", p()));
435
443
  };
436
- return ve(F, E), Ve(() => {
444
+ return ve(_, R), Ae(() => {
437
445
  if (y.value) {
438
- const C = L.value.getBoundingClientRect(), S = y.value.getBoundingClientRect();
439
- g.value && n.value.length && (g.value = !1, m.value = C.bottom + S.height > window.innerHeight && window.innerHeight - C.bottom < C.top && window.pageYOffset + C.top - S.height > 0 ? "bottom-0 -translate-y-12" : "top-0 translate-y-12");
446
+ const C = T.value.getBoundingClientRect(), S = y.value.getBoundingClientRect();
447
+ g.value && n.value.length && (g.value = !1, f.value = C.bottom + S.height > window.innerHeight && window.innerHeight - C.bottom < C.top && window.pageYOffset + C.top - S.height > 0 ? "bottom-0 -translate-y-12" : "top-0 translate-y-12");
440
448
  const H = y.value.querySelector('[data-result-index="' + o.value + '"]');
441
449
  if (H) {
442
- let R = H.getBoundingClientRect();
443
- R.top < S.top ? y.value.scrollTop -= S.top - R.top : R.bottom > S.bottom && (y.value.scrollTop += R.bottom - S.bottom);
450
+ let Y = H.getBoundingClientRect();
451
+ Y.top < S.top ? y.value.scrollTop -= S.top - Y.top : Y.bottom > S.bottom && (y.value.scrollTop += Y.bottom - S.bottom);
444
452
  }
445
453
  }
446
454
  }), (C, S) => (u(), v("div", {
447
455
  class: $(["inline-block relative", C.$attrs.class]),
448
456
  ref_key: "container",
449
- ref: F
457
+ ref: _
450
458
  }, [
451
- r("input", j({
459
+ i("input", E({
452
460
  ref_key: "input",
453
- ref: L,
461
+ ref: T,
454
462
  class: "block pr-10 w-full form-input focus:border-vxvue",
455
463
  value: e.modelValue
456
- }, Y.value, {
464
+ }, z.value, {
457
465
  onInput: S[0] || (S[0] = (H) => x(H.target.value)),
458
466
  onKeydown: [
459
- J(oe, ["enter"]),
460
- J(X, ["esc"]),
461
- J(p, ["tab"]),
462
- J(I(K, ["prevent"]), ["up"]),
463
- J(I(ne, ["prevent"]), ["down"])
467
+ Q(oe, ["enter"]),
468
+ Q(J, ["esc"]),
469
+ Q(p, ["tab"]),
470
+ Q(L(K, ["prevent"]), ["up"]),
471
+ Q(L(ne, ["prevent"]), ["down"])
464
472
  ],
465
473
  onFocus: b,
466
- onBlur: P
467
- }), null, 16, qe),
468
- r("span", Ge, [
469
- h.value ? (u(), v("svg", Xe, et)) : A("", !0)
474
+ onBlur: I
475
+ }), null, 16, et),
476
+ i("span", tt, [
477
+ h.value ? (u(), N(ye, {
478
+ key: 0,
479
+ class: "size-5"
480
+ })) : A("", !0)
470
481
  ]),
471
- n.value.length ? (u(), v("ul", j({
482
+ n.value.length ? (u(), v("div", E({
472
483
  key: 0,
473
484
  ref_key: "resultList",
474
485
  ref: y
475
486
  }, G.value, {
476
- onClick: ke,
477
- onMousedown: S[1] || (S[1] = I(() => {
487
+ onClick: Ce,
488
+ onMousedown: S[1] || (S[1] = L(() => {
478
489
  }, ["prevent"]))
479
490
  }), [
480
- (u(!0), v(_, null, z(n.value, (H, R) => B(C.$slots, "result", {
481
- result: H,
482
- props: O.value[R]
483
- }, () => [
484
- (u(), v("li", j({
485
- key: O.value[R].id
486
- }, O.value[R]), V(e.getResultValue(H)), 17))
487
- ])), 256))
491
+ (u(!0), v(P, null, F(n.value, (H, Y) => (u(), v("div", { "data-result-index": Y }, [
492
+ M(C.$slots, "result", {
493
+ result: H,
494
+ props: O.value[Y]
495
+ }, () => [
496
+ (u(), v("div", E({
497
+ key: O.value[Y].id,
498
+ ref_for: !0
499
+ }, O.value[Y]), D(e.getResultValue(H)), 17))
500
+ ])
501
+ ], 8, lt))), 256))
488
502
  ], 16)) : A("", !0)
489
503
  ], 2));
490
504
  }
491
- }), tt = {
505
+ }), at = {
492
506
  key: 0,
493
507
  class: "fixed inset-0 z-50 bg-black bg-opacity-50 backdrop-blur-sm",
494
508
  "aria-hidden": "true"
495
- }, lt = {
509
+ }, st = {
496
510
  key: 0,
497
511
  class: "overflow-y-auto fixed inset-0 z-50"
498
- }, at = { class: "flex justify-center items-center min-h-screen text-center sm:block sm:p-0" }, st = { key: 0 }, nt = /* @__PURE__ */ r("span", {
512
+ }, nt = { class: "flex justify-center items-center min-h-screen text-center sm:block sm:p-0" }, ot = { key: 0 }, rt = /* @__PURE__ */ i("span", {
499
513
  class: "hidden sm:inline-block sm:h-screen sm:align-middle",
500
514
  "aria-hidden": "true"
501
- }, "​", -1), ot = { class: "inline-block overflow-hidden text-left align-bottom bg-white rounded shadow-xl transition-all transform sm:my-8 sm:w-full sm:max-w-sm sm:align-middle lg:max-w-lg" }, rt = { class: "px-4 pb-4 mt-4 sm:px-6 sm:pb-6 sm:mt-5" }, ut = { class: "flex flex-row items-center" }, it = { class: "flex-shrink-0" }, ct = { class: "flex-grow text-center" }, dt = ["onClick"], Pl = {
515
+ }, "​", -1), ut = { class: "inline-block overflow-hidden text-left align-bottom bg-white rounded shadow-xl transition-all transform sm:my-8 sm:w-full sm:max-w-sm sm:align-middle lg:max-w-lg" }, it = { class: "px-4 pb-4 mt-4 sm:px-6 sm:pb-6 sm:mt-5" }, dt = { class: "flex flex-row items-center" }, ct = { class: "flex-shrink-0" }, vt = { class: "flex-grow text-center" }, mt = ["onClick"], Bl = {
502
516
  __name: "confirm",
503
517
  props: {
504
518
  buttons: {
505
519
  type: [Object, Array],
506
520
  default: { label: "Ok" },
507
- validator: (e) => Array.isArray(e) && e.length <= 2 && e.filter((c) => c.label !== "undefined" && c.value !== "undefined").length === e.length || e.label !== void 0 && e.value !== void 0
521
+ validator: (e) => Array.isArray(e) && e.length <= 2 && e.filter((d) => d.label !== "undefined" && d.value !== "undefined").length === e.length || e.label !== void 0 && e.value !== void 0
508
522
  },
509
523
  headerClass: {
510
524
  type: String,
@@ -515,51 +529,51 @@ const qe = ["value", "onKeydown"], Ge = { class: "flex absolute inset-y-0 right-
515
529
  default: "button"
516
530
  }
517
531
  },
518
- setup(e, { expose: c }) {
519
- const t = e, s = w(""), a = w(""), l = w(!1);
520
- let d = null, n = null;
521
- const o = D(() => Array.isArray(t.buttons) ? t.buttons : [t.buttons]), f = w(null), i = (m, g) => {
522
- l.value = !1, m.value !== void 0 ? m.value ? d() : n() : g ? n() : d();
532
+ setup(e, { expose: d }) {
533
+ const l = e, s = w(""), a = w(""), t = w(!1);
534
+ let c = null, n = null;
535
+ const o = B(() => Array.isArray(l.buttons) ? l.buttons : [l.buttons]), m = w(null), r = (f, g) => {
536
+ t.value = !1, f.value !== void 0 ? f.value ? c() : n() : g ? n() : c();
523
537
  };
524
- return c({ open: (m, g) => (s.value = m, a.value = g, l.value = !0, ce(() => f.value.firstElementChild.focus()), new Promise((y, L) => {
525
- d = y, n = L;
526
- })) }), (m, g) => (u(), v(_, null, [
527
- l.value ? (u(), v("div", tt)) : A("", !0),
528
- T(ie, { name: "appear" }, {
529
- default: te(() => [
530
- l.value ? (u(), v("div", lt, [
531
- r("div", at, [
532
- l.value ? (u(), v("div", st, [
533
- nt,
534
- r("div", ot, [
535
- s.value ? (u(), v("h3", {
538
+ return d({ open: (f, g) => (s.value = f, a.value = g, t.value = !0, de(() => m.value.firstElementChild.focus()), new Promise((y, T) => {
539
+ c = y, n = T;
540
+ })) }), (f, g) => (u(), v(P, null, [
541
+ t.value ? (u(), v("div", at)) : A("", !0),
542
+ j(ie, { name: "appear" }, {
543
+ default: X(() => [
544
+ t.value ? (u(), v("div", st, [
545
+ i("div", nt, [
546
+ t.value ? (u(), v("div", ot, [
547
+ rt,
548
+ i("div", ut, [
549
+ s.value || f.$slots.title ? (u(), v("h3", {
536
550
  key: 0,
537
551
  class: $(["py-4 pt-4 text-lg font-medium text-center sm:py-6", e.headerClass])
538
552
  }, [
539
- B(m.$slots, "title", { title: s.value }, () => [
540
- W(V(s.value), 1)
553
+ M(f.$slots, "title", {}, () => [
554
+ Z(D(s.value), 1)
541
555
  ])
542
556
  ], 2)) : A("", !0),
543
- r("div", rt, [
544
- r("div", ut, [
545
- r("div", it, [
546
- B(m.$slots, "icon")
557
+ i("div", it, [
558
+ i("div", dt, [
559
+ i("div", ct, [
560
+ M(f.$slots, "icon")
547
561
  ]),
548
- r("p", ct, [
549
- B(m.$slots, "default", { message: a.value }, () => [
550
- W(V(a.value), 1)
562
+ i("p", vt, [
563
+ M(f.$slots, "default", {}, () => [
564
+ Z(D(a.value), 1)
551
565
  ])
552
566
  ])
553
567
  ]),
554
- r("div", {
568
+ i("div", {
555
569
  class: "flex justify-center mt-5 space-x-2 sm:mt-6",
556
570
  ref_key: "buttonsContainer",
557
- ref: f
571
+ ref: m
558
572
  }, [
559
- (u(!0), v(_, null, z(o.value, (y, L) => (u(), v("button", {
573
+ (u(!0), v(P, null, F(o.value, (y, T) => (u(), v("button", {
560
574
  class: $([e.buttonClass, y.class]),
561
- onClick: I((F) => i(y, L), ["prevent"])
562
- }, V(y.label), 11, dt))), 256))
575
+ onClick: L((_) => r(y, T), ["prevent"])
576
+ }, D(y.label), 11, mt))), 256))
563
577
  ], 512)
564
578
  ])
565
579
  ])
@@ -572,117 +586,116 @@ const qe = ["value", "onKeydown"], Ge = { class: "flex absolute inset-y-0 right-
572
586
  ], 64));
573
587
  }
574
588
  };
575
- function vt(e, c) {
576
- const t = w(!1), s = fe(c);
577
- let a, l = s.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), d = [];
589
+ function ft(e, d) {
590
+ const l = w(!1), s = fe(d);
591
+ let a, t = s.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), c = [];
578
592
  if ((a = s.match(/\bd\b/gi)) && a.length === 1)
579
- l = l.replace("d", "(\\d{1,2})");
593
+ t = t.replace("d", "(\\d{1,2})");
580
594
  else if ((a = s.match(/\bdd\b/gi)) && a.length === 1)
581
- l = l.replace("dd", "(\\d{2})");
595
+ t = t.replace("dd", "(\\d{2})");
582
596
  else
583
- return { date: t };
584
- if (d.push({ srcPos: s.toLowerCase().indexOf("d"), destPos: 2 }), (a = s.match(/\bm\b/gi)) && a.length === 1)
585
- l = l.replace("m", "(\\d{1,2})");
597
+ return { date: l };
598
+ if (c.push({ srcPos: s.toLowerCase().indexOf("d"), destPos: 2 }), (a = s.match(/\bm\b/gi)) && a.length === 1)
599
+ t = t.replace("m", "(\\d{1,2})");
586
600
  else if ((a = s.match(/\bmm\b/gi)) && a.length === 1)
587
- l = l.replace("mm", "(\\d{2})");
601
+ t = t.replace("mm", "(\\d{2})");
588
602
  else
589
- return { date: t };
590
- if (d.push({ srcPos: s.toLowerCase().indexOf("m"), destPos: 1 }), (a = s.match(/\byyyy\b/gi)) && a.length === 1)
591
- l = l.replace("yyyy", "(\\d{4})");
603
+ return { date: l };
604
+ if (c.push({ srcPos: s.toLowerCase().indexOf("m"), destPos: 1 }), (a = s.match(/\byyyy\b/gi)) && a.length === 1)
605
+ t = t.replace("yyyy", "(\\d{4})");
592
606
  else
593
- return { date: t };
594
- if (d.push({ srcPos: s.toLowerCase().indexOf("y"), destPos: 0 }), !(a = fe(e).match(l)))
595
- return { date: t };
596
- a.shift(), d.sort((i, h) => i.srcPos < h.srcPos ? -1 : 1);
597
- let n = [], o, f;
607
+ return { date: l };
608
+ if (c.push({ srcPos: s.toLowerCase().indexOf("y"), destPos: 0 }), !(a = fe(e).match(t)))
609
+ return { date: l };
610
+ a.shift(), c.sort((r, h) => r.srcPos < h.srcPos ? -1 : 1);
611
+ let n = [], o, m;
598
612
  for (; o = a.shift(); )
599
- f = d.shift(), n[f.destPos] = o;
600
- return n = Date.parse(n.join("-")), n && (n = new Date(n), t.value = new Date(n.getFullYear(), n.getMonth(), n.getDate(), 0, 0, 0)), { date: t };
613
+ m = c.shift(), n[m.destPos] = o;
614
+ return n = Date.parse(n.join("-")), n && (n = new Date(n), l.value = new Date(n.getFullYear(), n.getMonth(), n.getDate(), 0, 0, 0)), { date: l };
601
615
  }
602
- const ft = { key: 0 }, mt = { class: "text-vxvue-700" }, ht = /* @__PURE__ */ r("svg", {
616
+ const ht = { key: 0 }, pt = { class: "text-vxvue-700" }, gt = /* @__PURE__ */ i("svg", {
603
617
  class: "size-2",
604
618
  stroke: "currentColor",
605
619
  fill: "none",
606
620
  viewBox: "0 0 8 8"
607
621
  }, [
608
- /* @__PURE__ */ r("path", {
622
+ /* @__PURE__ */ i("path", {
609
623
  "stroke-linecap": "round",
610
624
  "stroke-width": "1.5",
611
625
  d: "M1 1l6 6m0-6L1 7"
612
626
  })
613
- ], -1), pt = [
614
- ht
615
- ], gt = /* @__PURE__ */ r("svg", {
627
+ ], -1), bt = [
628
+ gt
629
+ ], xt = /* @__PURE__ */ i("svg", {
616
630
  xmlns: "http://www.w3.org/2000/svg",
617
631
  class: "size-6",
618
632
  fill: "none",
619
633
  viewBox: "0 0 24 24",
620
634
  stroke: "currentColor"
621
635
  }, [
622
- /* @__PURE__ */ r("path", {
636
+ /* @__PURE__ */ i("path", {
623
637
  "stroke-linecap": "round",
624
638
  "stroke-linejoin": "round",
625
639
  "stroke-width": "2",
626
640
  d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
627
641
  })
628
- ], -1), bt = [
629
- gt
630
- ], xt = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
642
+ ], -1), yt = [
643
+ xt
644
+ ], wt = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
631
645
  __name: "date-input",
632
646
  props: {
633
647
  outputFormat: { type: String, default: "YYYY-MM-DD" },
634
648
  inputFormat: { type: String, default: "YYYY-MM-DD" },
635
- showButton: { type: Boolean, default: !0 },
636
- locale: { type: String, default: "default" },
649
+ showToggle: { type: Boolean, default: !1 },
637
650
  modelValue: Date
638
651
  },
639
652
  emits: ["update:modelValue", "toggle-datepicker"],
640
- setup(e, { emit: c }) {
641
- const t = c, s = e, a = w(""), l = D(() => s.modelValue ? me(s.modelValue, s.outputFormat) : ""), d = D(() => {
642
- let n = Object.assign({}, U());
653
+ setup(e, { emit: d }) {
654
+ const l = d, s = e, a = w(""), t = B(() => s.modelValue ? he(s.modelValue, s.outputFormat) : ""), c = B(() => {
655
+ let n = Object.assign({}, W());
643
656
  return delete n.class, n;
644
657
  });
645
- return Z(() => s.modelValue, (n) => a.value = n ? me(n, s.outputFormat) : ""), (n, o) => (u(), v("div", {
658
+ return U(() => s.modelValue, (n) => a.value = n ? he(n, s.outputFormat) : ""), (n, o) => (u(), v("div", {
646
659
  class: $(["inline-block relative", n.$attrs.class])
647
660
  }, [
648
- l.value ? (u(), v("div", ft, [
649
- r("div", {
650
- class: $(["block flex items-center w-full form-input bg-vxvue-50", { "pr-10": e.showButton }])
661
+ t.value ? (u(), v("div", ht, [
662
+ i("div", {
663
+ class: $(["block flex items-center w-full form-input bg-vxvue-50", { "pr-10": e.showToggle }])
651
664
  }, [
652
- r("span", mt, V(l.value), 1),
653
- r("button", {
654
- onClick: o[0] || (o[0] = (f) => t("update:modelValue", null)),
665
+ i("span", pt, D(t.value), 1),
666
+ i("button", {
667
+ onClick: o[0] || (o[0] = (m) => l("update:modelValue", null)),
655
668
  class: "inline-flex flex-shrink-0 justify-center items-center ml-2 rounded-full focus:text-white focus:outline-none size-4 text-vxvue hover:bg-vxvue-100 hover:text-vue-700 focus:bg-vxvue-700"
656
- }, pt)
669
+ }, bt)
657
670
  ], 2)
658
- ])) : pe((u(), v("input", j({
671
+ ])) : ge((u(), v("input", E({
659
672
  key: 1,
660
673
  type: "text",
661
- class: ["block w-full form-input peer focus:border-vxvue", { "pr-10": e.showButton }],
662
- "onUpdate:modelValue": o[1] || (o[1] = (f) => a.value = f),
663
- onBlur: o[2] || (o[2] = (f) => {
664
- var i;
665
- return t("update:modelValue", ((i = M(vt)(a.value, s.inputFormat).date) == null ? void 0 : i.value) || null);
674
+ class: ["block w-full form-input peer focus:border-vxvue", { "pr-10": e.showToggle }],
675
+ "onUpdate:modelValue": o[1] || (o[1] = (m) => a.value = m),
676
+ onBlur: o[2] || (o[2] = (m) => {
677
+ var r;
678
+ return l("update:modelValue", ((r = V(ft)(a.value, s.inputFormat).date) == null ? void 0 : r.value) || null);
666
679
  }),
667
- onInput: o[3] || (o[3] = I(() => {
680
+ onInput: o[3] || (o[3] = L(() => {
668
681
  }, ["prevent"]))
669
- }, d.value), null, 16)), [
670
- [De, a.value]
682
+ }, c.value), null, 16)), [
683
+ [Be, a.value]
671
684
  ]),
672
- e.showButton ? (u(), v("button", {
685
+ e.showToggle ? (u(), v("button", {
673
686
  key: 2,
674
687
  class: "flex absolute inset-y-0 right-0 items-center px-2 text-vxvue-700 hover:text-vxvue",
675
688
  "aria-label": "datepicker-toggle",
676
- onClick: o[4] || (o[4] = I((f) => t("toggle-datepicker"), ["stop"])),
689
+ onClick: o[4] || (o[4] = L((m) => l("toggle-datepicker"), ["stop"])),
677
690
  ref: "toggleButton"
678
- }, bt, 512)) : A("", !0),
679
- B(n.$slots, "default")
691
+ }, yt, 512)) : A("", !0),
692
+ M(n.$slots, "default")
680
693
  ], 2));
681
694
  }
682
- }), yt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, wt = { class: "flex justify-between w-1/2" }, kt = { class: "flex justify-between w-1/2" }, $t = { class: "grid grid-cols-7 gap-0.5 p-0.5" }, Ct = ["disabled", "onClick"], St = { class: "flex justify-between items-center py-2 px-3 text-white bg-vxvue-700" }, Mt = { class: "grid grid-cols-2 gap-0.5 p-0.5" }, Vt = { class: "text-center hover:ring-2 text-vxvue-700 hover:ring-vxvue" }, Dt = ["onClick"], Ll = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
695
+ }), kt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, $t = { class: "flex justify-between w-1/2" }, Ct = { class: "flex justify-between w-1/2" }, St = { class: "grid grid-cols-7 gap-0.5 p-0.5" }, Vt = ["disabled", "onClick"], Mt = { class: "flex justify-between items-center py-2 px-3 text-white bg-vxvue-700" }, Dt = { class: "grid grid-cols-2 gap-0.5 p-0.5" }, At = { class: "text-center hover:ring-2 text-vxvue-700 hover:ring-vxvue" }, Bt = ["onClick"], Pl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
683
696
  __name: "datepicker",
684
697
  props: {
685
- modelValue: [Date, Boolean],
698
+ modelValue: Date,
686
699
  validFrom: Date,
687
700
  validUntil: Date,
688
701
  dayNames: { type: Array, default: () => "S M T W T F S".split(" ") },
@@ -691,159 +704,159 @@ const ft = { key: 0 }, mt = { class: "text-vxvue-700" }, ht = /* @__PURE__ */ r(
691
704
  hasInput: { type: Boolean, default: !0 }
692
705
  },
693
706
  emits: ["update:modelValue", "month-change", "year-change"],
694
- setup(e, { emit: c }) {
695
- const t = e, s = c, a = (() => {
707
+ setup(e, { emit: d }) {
708
+ const l = e, s = d, a = (() => {
696
709
  let p = /* @__PURE__ */ new Date();
697
710
  return new Date(p.getFullYear(), p.getMonth(), p.getDate());
698
- })(), l = w(new Date(a.getFullYear(), a.getMonth(), 1)), d = w(null), n = w(!t.hasInput), o = w("days"), f = w(0), i = w({ horiz: "left-0", vert: "top-0" }), h = w(null), m = w(null), g = w(null), y = D(() => t.hasInput ? { class: ["absolute", n.value ? "block" : "hidden"] } : {}), L = D(() => {
699
- const p = [], x = l.value.getFullYear(), b = l.value.getMonth(), P = new Date(x, b + 1, 0), K = new Date(x, b, 0).getDay() + 1 - t.startOfWeekIndex, ne = (6 + t.startOfWeekIndex - P.getDay()) % 7;
700
- for (let X = -K, oe = P.getDate() + ne; X < oe; ++X)
701
- p.push(new Date(x, b, X + 1));
711
+ })(), t = w(new Date(a.getFullYear(), a.getMonth(), 1)), c = w(null), n = w(!l.hasInput), o = w("days"), m = w(0), r = w({ horiz: "left-0", vert: "top-0" }), h = w(null), f = w(null), g = w(null), y = B(() => l.hasInput ? { class: ["absolute", n.value ? "block" : "hidden"] } : {}), T = B(() => {
712
+ const p = [], x = t.value.getFullYear(), b = t.value.getMonth(), I = new Date(x, b + 1, 0), K = new Date(x, b, 0).getDay() + 1 - l.startOfWeekIndex, ne = (6 + l.startOfWeekIndex - I.getDay()) % 7;
713
+ for (let J = -K, oe = I.getDate() + ne; J < oe; ++J)
714
+ p.push(new Date(x, b, J + 1));
702
715
  return p;
703
- }), F = D(() => t.startOfWeekIndex ? t.dayNames.slice(1).concat(t.dayNames[0]) : t.dayNames.slice());
704
- Z(() => t.modelValue, (p) => {
705
- p ? (d.value = new Date(p.getFullYear(), p.getMonth(), p.getDate()), l.value = new Date(d.value.getTime())) : (d.value = null, l.value = new Date(a.getTime())), l.value.setDate(1);
706
- }, { immediate: !0 }), Z(n, (p) => {
707
- p && t.hasInput && ce(() => {
708
- const x = h.value.$el.getBoundingClientRect(), b = m.value.getBoundingClientRect();
709
- i.value = {
710
- horiz: x.left + b.width > window.innerWidth ? "right-0" : "left-0",
716
+ }), _ = B(() => l.startOfWeekIndex ? l.dayNames.slice(1).concat(l.dayNames[0]) : l.dayNames);
717
+ U(() => l.modelValue, (p) => {
718
+ p ? (c.value = new Date(p.getFullYear(), p.getMonth(), p.getDate()), t.value = new Date(c.value.getTime())) : (c.value = null, t.value = new Date(a.getTime())), t.value.setDate(1);
719
+ }, { immediate: !0 }), U(n, (p) => {
720
+ p && l.hasInput && de(() => {
721
+ const x = h.value.$el.getBoundingClientRect(), b = f.value.getBoundingClientRect();
722
+ r.value = {
723
+ horiz: x.right - b.width < 0 ? "left-0" : "right-0",
711
724
  vert: x.bottom + b.height > window.innerHeight ? "bottom-0 -translate-y-12" : "top-0 translate-y-12"
712
725
  };
713
726
  });
714
- }), ve(m, () => {
727
+ }), ve(f, () => {
715
728
  n.value = !1, o.value = "days";
716
729
  }, { ignore: [g] });
717
730
  const O = (p) => {
718
- l.value = new Date(l.value.getFullYear(), p, 1), s("month-change", l.value);
719
- }, Y = (p) => {
720
- l.value = new Date(p, l.value.getMonth(), 1), s("year-change", l.value);
731
+ t.value = new Date(t.value.getFullYear(), p, 1), s("month-change", t.value);
732
+ }, z = (p) => {
733
+ t.value = new Date(p, t.value.getMonth(), 1), s("year-change", t.value);
721
734
  }, G = (p) => {
722
- n.value = !t.hasInput, d.value = p, s("update:modelValue", p);
723
- }, E = (p) => {
724
- d.value = p, s("update:modelValue", p);
735
+ n.value = !l.hasInput, c.value = p, s("update:modelValue", p);
736
+ }, R = (p) => {
737
+ c.value = p, s("update:modelValue", p);
725
738
  }, k = (p) => {
726
- const x = p.getMonth() !== l.value.getMonth(), b = d.value && p.getTime() === d.value.getTime(), P = p.getTime() === a.getTime(), K = t.validFrom && t.validFrom > p || t.validUntil && t.validUntil < p;
739
+ const x = p.getMonth() !== t.value.getMonth(), b = c.value && p.getTime() === c.value.getTime(), I = p.getTime() === a.getTime(), K = l.validFrom && l.validFrom > p || l.validUntil && l.validUntil < p;
727
740
  return [
728
- "py-2 px-3 rounded-sm block text-center",
741
+ "py-2 rounded-sm block text-center",
729
742
  {
730
- "text-vxvue-700": !K && !x && !P && !b,
743
+ "text-vxvue-700": !K && !x && !I && !b,
731
744
  "text-error": K && !x,
732
- "text-gray-400": x && !P && !b,
733
- "bg-gray-200": P && !b,
745
+ "text-gray-400": x && !I && !b,
746
+ "bg-gray-200": I && !b,
734
747
  "bg-vxvue-700 text-white": b,
735
748
  "hover:ring-2 hover:ring-vxvue": !K
736
749
  }
737
750
  ];
738
751
  };
739
- return de(() => {
752
+ return ce(() => {
740
753
  var p;
741
754
  return g.value = (p = h.value) == null ? void 0 : p.$refs.toggleButton;
742
755
  }), (p, x) => (u(), v("div", {
743
756
  class: $(["relative", p.$attrs.class])
744
757
  }, [
745
- e.hasInput ? (u(), N(xt, j({
758
+ e.hasInput ? (u(), N(wt, E({
746
759
  key: 0,
747
- modelValue: d.value,
760
+ modelValue: c.value,
761
+ "show-toggle": !0,
748
762
  onToggleDatepicker: x[0] || (x[0] = (b) => n.value = !n.value),
749
- "onUpdate:modelValue": E
763
+ "onUpdate:modelValue": R
750
764
  }, p.$attrs, {
751
765
  ref_key: "input",
752
766
  ref: h,
753
- class: "w-full",
754
- locale: e.locale
767
+ class: "w-full"
755
768
  }), {
756
- default: te(() => [
757
- B(p.$slots, "default")
769
+ default: X(() => [
770
+ M(p.$slots, "default")
758
771
  ]),
759
772
  _: 3
760
- }, 16, ["modelValue", "locale"])) : A("", !0),
761
- r("div", j({ class: "z-10 bg-white shadow-md min-w-80" }, y.value, {
773
+ }, 16, ["modelValue"])) : A("", !0),
774
+ i("div", E({ class: "overflow-hidden z-10 bg-white rounded shadow-md min-w-72 sm:min-w-80" }, y.value, {
762
775
  ref_key: "calendar",
763
- ref: m,
764
- class: [i.value.horiz, i.value.vert]
776
+ ref: f,
777
+ class: [r.value.horiz, r.value.vert]
765
778
  }), [
766
- o.value === "days" ? (u(), v(_, { key: 0 }, [
767
- r("div", yt, [
768
- r("div", wt, [
769
- r("button", {
770
- onClick: x[1] || (x[1] = I((b) => O(l.value.getMonth() - 1), ["stop"])),
779
+ o.value === "days" ? (u(), v(P, { key: 0 }, [
780
+ i("div", kt, [
781
+ i("div", $t, [
782
+ i("button", {
783
+ onClick: x[1] || (x[1] = L((b) => O(t.value.getMonth() - 1), ["stop"])),
771
784
  class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
772
785
  }, [
773
- T(M(le), { class: "size-6" })
786
+ j(V(le), { class: "size-6" })
774
787
  ]),
775
- r("span", null, V(l.value.toLocaleString(e.locale, { month: "long" })), 1),
776
- r("button", {
777
- onClick: x[2] || (x[2] = I((b) => O(l.value.getMonth() + 1), ["stop"])),
788
+ i("span", null, D(t.value.toLocaleString(e.locale, { month: "long" })), 1),
789
+ i("button", {
790
+ onClick: x[2] || (x[2] = L((b) => O(t.value.getMonth() + 1), ["stop"])),
778
791
  class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
779
792
  }, [
780
- T(M(ee), { class: "size-6" })
793
+ j(V(te), { class: "size-6" })
781
794
  ])
782
795
  ]),
783
- r("div", kt, [
784
- r("button", {
785
- onClick: x[3] || (x[3] = I((b) => Y(l.value.getFullYear() - 1), ["stop"])),
796
+ i("div", Ct, [
797
+ i("button", {
798
+ onClick: x[3] || (x[3] = L((b) => z(t.value.getFullYear() - 1), ["stop"])),
786
799
  class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
787
800
  }, [
788
- T(M(le), { class: "size-6" })
801
+ j(V(le), { class: "size-6" })
789
802
  ]),
790
- r("button", {
803
+ i("button", {
791
804
  class: "text-vxvue-100 hover:text-vxvue-50",
792
805
  onClick: x[4] || (x[4] = (b) => {
793
- o.value = "years", f.value = l.value.getFullYear();
806
+ o.value = "years", m.value = t.value.getFullYear();
794
807
  })
795
- }, V(l.value.getFullYear()), 1),
796
- r("button", {
797
- onClick: x[5] || (x[5] = I((b) => Y(l.value.getFullYear() + 1), ["stop"])),
808
+ }, D(t.value.getFullYear()), 1),
809
+ i("button", {
810
+ onClick: x[5] || (x[5] = L((b) => z(t.value.getFullYear() + 1), ["stop"])),
798
811
  class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
799
812
  }, [
800
- T(M(ee), { class: "size-6" })
813
+ j(V(te), { class: "size-6" })
801
814
  ])
802
815
  ])
803
816
  ]),
804
- r("div", $t, [
805
- (u(!0), v(_, null, z(F.value, (b, P) => (u(), v("div", {
817
+ i("div", St, [
818
+ (u(!0), v(P, null, F(_.value, (b, I) => (u(), v("div", {
806
819
  class: "py-2 text-center bg-gray-200",
807
- key: P
808
- }, V(b), 1))), 128)),
809
- (u(!0), v(_, null, z(L.value, (b) => (u(), v("button", {
820
+ key: I
821
+ }, D(b), 1))), 128)),
822
+ (u(!0), v(P, null, F(T.value, (b) => (u(), v("button", {
810
823
  class: $(k(b)),
811
824
  disabled: e.validFrom && e.validFrom > b || e.validUntil && e.validUntil < b,
812
- onClick: I((P) => e.validFrom && e.validFrom > b || e.validUntil && e.validUntil < b ? null : G(b), ["stop"])
813
- }, V(b.getDate()), 11, Ct))), 256))
825
+ onClick: L((I) => e.validFrom && e.validFrom > b || e.validUntil && e.validUntil < b ? null : G(b), ["stop"])
826
+ }, D(b.getDate()), 11, Vt))), 256))
814
827
  ])
815
828
  ], 64)) : A("", !0),
816
- o.value === "years" ? (u(), v(_, { key: 1 }, [
817
- r("div", St, [
818
- r("button", {
819
- onClick: x[6] || (x[6] = I((b) => f.value -= 10, ["stop"])),
829
+ o.value === "years" ? (u(), v(P, { key: 1 }, [
830
+ i("div", Mt, [
831
+ i("button", {
832
+ onClick: x[6] || (x[6] = L((b) => m.value -= 10, ["stop"])),
820
833
  class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
821
834
  }, [
822
- T(M(le), { class: "size-6" })
835
+ j(V(le), { class: "size-6" })
823
836
  ]),
824
- r("span", null, V(f.value) + " - " + V(f.value + 9), 1),
825
- r("button", {
826
- onClick: x[7] || (x[7] = I((b) => f.value += 10, ["stop"])),
837
+ i("span", null, D(m.value) + " - " + D(m.value + 9), 1),
838
+ i("button", {
839
+ onClick: x[7] || (x[7] = L((b) => m.value += 10, ["stop"])),
827
840
  class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
828
841
  }, [
829
- T(M(ee), { class: "size-6" })
842
+ j(V(te), { class: "size-6" })
830
843
  ])
831
844
  ]),
832
- r("div", Mt, [
833
- (u(), v(_, null, z(10, (b) => r("div", Vt, [
834
- r("button", {
845
+ i("div", Dt, [
846
+ (u(), v(P, null, F(10, (b) => i("div", At, [
847
+ i("button", {
835
848
  class: "py-2 px-3",
836
- onClick: I((P) => {
837
- Y(f.value + b - 1), o.value = "days";
849
+ onClick: L((I) => {
850
+ z(m.value + b - 1), o.value = "days";
838
851
  }, ["stop"])
839
- }, V(f.value + b - 1), 9, Dt)
852
+ }, D(m.value + b - 1), 9, Bt)
840
853
  ])), 64))
841
854
  ])
842
855
  ], 64)) : A("", !0)
843
856
  ], 16)
844
857
  ], 2));
845
858
  }
846
- }), _t = ["for"], At = ["id", "multiple", "accept"], Fl = {
859
+ }), Pt = ["for"], It = ["id", "multiple", "accept"], Il = {
847
860
  __name: "form-file-button",
848
861
  props: {
849
862
  modelValue: { type: Array },
@@ -853,107 +866,122 @@ const ft = { key: 0 }, mt = { class: "text-vxvue-700" }, ht = /* @__PURE__ */ r(
853
866
  id: { type: String, default: "form-file-button-" + Math.ceil(Math.random() * 1e3) }
854
867
  },
855
868
  emits: ["update:modelValue", "form-data"],
856
- setup(e, { emit: c }) {
857
- const t = c, s = e, a = (d) => {
869
+ setup(e, { emit: d }) {
870
+ const l = d, s = e, a = (c) => {
858
871
  const n = new FormData();
859
- for (let o of d)
872
+ for (let o of c)
860
873
  n.append(s.name, o, o.name);
861
874
  return n;
862
- }, l = (d) => {
863
- const n = d.target.files || d.dataTransfer.files;
875
+ }, t = (c) => {
876
+ const n = c.target.files || c.dataTransfer.files;
864
877
  if (n) {
865
878
  const o = [...n];
866
- t("update:modelValue", o), t("form-data", a(o));
879
+ l("update:modelValue", o), l("form-data", a(o));
867
880
  }
868
881
  };
869
- return (d, n) => (u(), v("label", { for: e.id }, [
870
- B(d.$slots, "default", {}, () => [
871
- W("Upload")
882
+ return (c, n) => (u(), v("label", { for: e.id }, [
883
+ M(c.$slots, "default", {}, () => [
884
+ Z("Upload")
872
885
  ]),
873
- r("input", {
886
+ i("input", {
874
887
  type: "file",
875
888
  id: e.id,
876
889
  multiple: e.multiple,
877
890
  accept: e.accept,
878
- onChange: l,
891
+ onChange: t,
879
892
  class: "hidden"
880
- }, null, 40, At)
881
- ], 8, _t));
893
+ }, null, 40, It)
894
+ ], 8, Pt));
882
895
  }
883
- }, Bt = ["value"], It = {
896
+ }, Lt = ["value"], Tt = {
884
897
  key: 0,
885
898
  disabled: "",
886
899
  value: ""
887
- }, Pt = ["value", "selected"], Lt = {
900
+ }, _t = ["value", "selected"], Ft = {
888
901
  __name: "form-select",
889
902
  props: { options: Array, modelValue: [String, Number], disabledLabel: String },
890
903
  emits: ["update:modelValue"],
891
- setup(e, { emit: c }) {
892
- const t = c;
893
- return (s, a) => (u(), v("select", j(s.$attrs, {
904
+ setup(e, { emit: d }) {
905
+ const l = d;
906
+ return (s, a) => (u(), v("select", E(s.$attrs, {
894
907
  value: e.modelValue,
895
908
  class: "form-select",
896
- onChange: a[0] || (a[0] = (l) => t("update:modelValue", l.target.value))
909
+ onChange: a[0] || (a[0] = (t) => l("update:modelValue", t.target.value))
897
910
  }), [
898
- e.disabledLabel ? (u(), v("option", It, V(e.disabledLabel), 1)) : A("", !0),
899
- (u(!0), v(_, null, z(e.options, (l) => (u(), v("option", {
900
- value: l.key !== void 0 ? l.key : l.label || l,
901
- selected: (l.key !== void 0 ? l.key : l.label || l) === e.modelValue
902
- }, V(l.label || l), 9, Pt))), 256))
903
- ], 16, Bt));
911
+ e.disabledLabel ? (u(), v("option", Tt, D(e.disabledLabel), 1)) : A("", !0),
912
+ (u(!0), v(P, null, F(e.options, (t) => (u(), v("option", {
913
+ value: t.key !== void 0 ? t.key : t.label || t,
914
+ selected: (t.key !== void 0 ? t.key : t.label || t) === e.modelValue
915
+ }, D(t.label || t), 9, _t))), 256))
916
+ ], 16, Lt));
904
917
  }
905
- }, Ft = ["aria-checked", "aria-label"], Ot = ["checked"], Ol = {
918
+ }, Ot = ["aria-checked", "aria-label"], zt = ["d"], jt = ["checked"], Ll = {
906
919
  __name: "form-switch",
907
- props: ["modelValue"],
920
+ props: { modelValue: Boolean },
908
921
  emits: ["update:modelValue"],
909
- setup(e, { emit: c }) {
910
- const t = c, s = D(() => {
911
- let l = Object.assign({}, U());
912
- return delete l.class, l;
913
- }), a = D(() => U().disabled || U().disabled === "");
914
- return (l, d) => (u(), v(_, null, [
915
- r("label", {
916
- class: $(l.$attrs.class),
917
- tabindex: "0"
922
+ setup(e, { emit: d }) {
923
+ const l = d, s = B(() => {
924
+ let t = Object.assign({}, W());
925
+ return delete t.class, t;
926
+ }), a = B(() => W().disabled || W().disabled === "");
927
+ return (t, c) => (u(), v("label", {
928
+ class: $(t.$attrs.class),
929
+ tabindex: "0"
930
+ }, [
931
+ i("span", {
932
+ role: "switch",
933
+ class: $([
934
+ "inline-flex relative flex-shrink-0 w-11 h-6 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out cursor-pointer focus:ring-2 focus:ring-offset-2 focus:outline-none focus:ring-vxvue",
935
+ a.value ? "bg-slate-200" : e.modelValue ? "bg-vxvue" : "bg-slate-300"
936
+ ]),
937
+ "aria-checked": e.modelValue,
938
+ "aria-label": t.$attrs["aria-label"]
918
939
  }, [
919
- r("span", {
920
- role: "switch",
940
+ i("span", {
941
+ "aria-hidden": "true",
921
942
  class: $([
922
- "inline-flex relative flex-shrink-0 w-11 h-6 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out cursor-pointer focus:ring-2 focus:ring-offset-2 focus:outline-none focus:ring-vxvue",
923
- a.value ? "bg-slate-200" : e.modelValue ? "bg-vxvue" : "bg-slate-300"
924
- ]),
925
- "aria-checked": !!e.modelValue,
926
- "aria-label": l.$attrs["aria-label"]
943
+ "block relative size-5 rounded-full ring-0 shadow transition duration-200 ease-in-out transform pointer-events-none",
944
+ e.modelValue ? "translate-x-5" : "translate-x-0",
945
+ a.value ? "bg-slate-100" : "bg-white"
946
+ ])
927
947
  }, [
928
- r("span", {
929
- "aria-hidden": "true",
930
- class: $([
931
- "inline-block size-5 rounded-full ring-0 shadow transition duration-200 ease-in-out transform pointer-events-none",
932
- e.modelValue ? "translate-x-5" : "translate-x-0",
933
- a.value ? "bg-slate-100" : "bg-white"
934
- ])
935
- }, null, 2),
936
- r("input", j(s.value, {
937
- checked: e.modelValue,
938
- class: "hidden",
939
- value: "1",
940
- type: "checkbox",
941
- onChange: d[0] || (d[0] = (n) => t("update:modelValue", n.target.checked))
942
- }), null, 16, Ot)
943
- ], 10, Ft)
944
- ], 2),
945
- B(l.$slots, "default")
946
- ], 64));
948
+ M(t.$slots, "handle", {}, () => [
949
+ (u(), v("svg", {
950
+ xmlns: "http://www.w3.org/2000/svg",
951
+ fill: "none",
952
+ viewBox: "0 0 24 24",
953
+ "stroke-width": "5",
954
+ stroke: "currentColor",
955
+ class: $(["absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 size-3", e.modelValue && !a.value ? "text-vxvue" : "text-slate-300"])
956
+ }, [
957
+ i("path", {
958
+ "stroke-linecap": "round",
959
+ "stroke-linejoin": "round",
960
+ d: e.modelValue ? "M12 18 V6" : "m18.5 12 c0 3.5 -3 6.5 -6.5 6.5 -3.5 0 -6.5 -3 -6.5 -6.5 0 -3.5 3 -6.5 6.5 -6.5 3.5 0 6.5 3 6.5 6.5z"
961
+ }, null, 8, zt)
962
+ ], 2))
963
+ ])
964
+ ], 2),
965
+ i("input", E(s.value, {
966
+ checked: e.modelValue,
967
+ class: "hidden",
968
+ value: "1",
969
+ type: "checkbox",
970
+ onChange: c[0] || (c[0] = (n) => l("update:modelValue", n.target.checked))
971
+ }), null, 16, jt)
972
+ ], 10, Ot),
973
+ M(t.$slots, "default")
974
+ ], 2));
947
975
  }
948
- }, we = (e, c) => {
949
- const t = e.__vccOpts || e;
950
- for (const [s, a] of c)
951
- t[s] = a;
952
- return t;
953
- }, zt = (e) => (_e("data-v-62f8007a"), e = e(), Ae(), e), Tt = {
976
+ }, me = (e, d) => {
977
+ const l = e.__vccOpts || e;
978
+ for (const [s, a] of d)
979
+ l[s] = a;
980
+ return l;
981
+ }, Et = (e) => (Pe("data-v-921b665d"), e = e(), Ie(), e), Nt = {
954
982
  "aria-live": "assertive",
955
983
  class: "flex fixed inset-0 z-50 items-start py-6 px-4 pointer-events-none sm:p-6"
956
- }, jt = { class: "flex flex-col items-center space-y-4 w-full" }, Nt = { class: "p-4" }, Yt = { class: "flex items-start" }, Et = { class: "flex-shrink-0" }, Rt = { class: "flex-1 pt-0.5 ml-3 w-0" }, Wt = { class: "font-bold" }, Ht = { class: "mt-1" }, Ut = { class: "flex flex-shrink-0 ml-4" }, Zt = /* @__PURE__ */ zt(() => /* @__PURE__ */ r("span", { class: "sr-only" }, "Close", -1)), Kt = /* @__PURE__ */ Object.assign({
984
+ }, Yt = { class: "flex flex-col items-center space-y-4 w-full" }, Rt = { class: "p-4" }, Wt = { class: "flex items-start" }, Ht = { class: "flex-shrink-0" }, Ut = { class: "flex-1 pt-0.5 ml-3 w-0" }, Zt = { class: "font-bold" }, Kt = { class: "mt-1" }, qt = { class: "flex flex-shrink-0 ml-4" }, Gt = /* @__PURE__ */ Et(() => /* @__PURE__ */ i("span", { class: "sr-only" }, "Close", -1)), Xt = /* @__PURE__ */ Object.assign({
957
985
  inheritAttrs: !1
958
986
  }, {
959
987
  __name: "message-toast",
@@ -961,51 +989,61 @@ const ft = { key: 0 }, mt = { class: "text-vxvue-700" }, ht = /* @__PURE__ */ r(
961
989
  title: String,
962
990
  message: [String, Array],
963
991
  timeout: { type: Number, default: 5e3 },
964
- active: { type: Boolean, default: !1 }
992
+ active: { type: Boolean, default: !1 },
993
+ showTimeoutProgress: { type: Boolean, default: !1 }
965
994
  },
966
995
  emits: ["timeout", "close"],
967
- setup(e, { emit: c }) {
968
- const t = e, s = c, a = w(null), l = D(() => typeof t.message == "string" ? [t.message] : t.message), d = () => {
969
- window.clearTimeout(a.value), t.active && t.timeout && (a.value = window.setTimeout(() => {
996
+ setup(e, { emit: d }) {
997
+ const l = e, s = d, a = B(() => typeof l.message == "string" ? [l.message] : l.message), t = w(0);
998
+ let c = null;
999
+ const n = () => {
1000
+ window.clearTimeout(c), t.value = 100, l.active && l.timeout && (c = window.setTimeout(() => {
970
1001
  s("timeout");
971
- }, t.timeout));
1002
+ }, l.timeout), window.setTimeout(() => t.value = 0, 0));
972
1003
  };
973
- return Z(() => t.active, d), de(d), (n, o) => (u(), v("div", Tt, [
974
- r("div", jt, [
975
- T(ie, { name: "messagetoast-fade" }, {
976
- default: te(() => [
1004
+ return U(() => l.active, n), ce(n), (o, m) => (u(), v("div", Nt, [
1005
+ i("div", Yt, [
1006
+ j(ie, { name: "messagetoast-fade" }, {
1007
+ default: X(() => [
977
1008
  e.active ? (u(), v("div", {
978
1009
  key: 0,
979
- class: $(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black ring-opacity-5 shadow-lg pointer-events-auto", n.$attrs.class])
1010
+ class: $(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black ring-opacity-5 shadow-lg pointer-events-auto", o.$attrs.class])
980
1011
  }, [
981
- r("div", Nt, [
982
- r("div", Yt, [
983
- r("div", Et, [
984
- B(n.$slots, "icon", {}, void 0, !0)
1012
+ i("div", Rt, [
1013
+ i("div", Wt, [
1014
+ i("div", Ht, [
1015
+ M(o.$slots, "icon", {}, void 0, !0)
985
1016
  ]),
986
- r("div", Rt, [
987
- r("p", Wt, [
988
- B(n.$slots, "title", {}, () => [
989
- W(V(e.title), 1)
990
- ], !0)
991
- ]),
992
- (u(!0), v(_, null, z(l.value, (f) => (u(), v("p", Ht, [
993
- B(n.$slots, "default", {}, () => [
994
- W(V(f), 1)
995
- ], !0)
996
- ]))), 256))
1017
+ i("div", Ut, [
1018
+ M(o.$slots, "title", {}, () => [
1019
+ i("div", Zt, D(e.title), 1)
1020
+ ], !0),
1021
+ M(o.$slots, "default", {}, () => [
1022
+ (u(!0), v(P, null, F(a.value, (r) => (u(), v("p", Kt, D(r), 1))), 256))
1023
+ ], !0)
997
1024
  ]),
998
- r("div", Ut, [
999
- r("button", {
1000
- onClick: o[0] || (o[0] = (f) => s("close")),
1025
+ i("div", qt, [
1026
+ i("button", {
1027
+ onClick: m[0] || (m[0] = (r) => s("close")),
1001
1028
  class: "inline-flex text-white bg-black bg-opacity-20 rounded-sm focus:ring-2 focus:outline-none hover:text-stone-200 focus:ring-stone-200"
1002
1029
  }, [
1003
- Zt,
1004
- T(M(ge), { class: "size-5" })
1030
+ Gt,
1031
+ j(V(xe), { class: "size-5" })
1005
1032
  ])
1006
1033
  ])
1007
1034
  ])
1008
- ])
1035
+ ]),
1036
+ e.showTimeoutProgress && e.timeout ? (u(), v("div", {
1037
+ key: 0,
1038
+ class: "h-1 bg-vxvue-alt ease-linear transition-all",
1039
+ style: be({
1040
+ width: t.value + "%",
1041
+ "transition-duration": e.timeout + "ms"
1042
+ }),
1043
+ role: "progressbar",
1044
+ "aria-hidden": "false",
1045
+ "aria-label": "notification timer"
1046
+ }, null, 4)) : A("", !0)
1009
1047
  ], 2)) : A("", !0)
1010
1048
  ]),
1011
1049
  _: 3
@@ -1013,14 +1051,14 @@ const ft = { key: 0 }, mt = { class: "text-vxvue-700" }, ht = /* @__PURE__ */ r(
1013
1051
  ])
1014
1052
  ]));
1015
1053
  }
1016
- }), zl = /* @__PURE__ */ we(Kt, [["__scopeId", "data-v-62f8007a"]]), qt = {
1054
+ }), Tl = /* @__PURE__ */ me(Xt, [["__scopeId", "data-v-921b665d"]]), Jt = {
1017
1055
  key: 0,
1018
1056
  class: "fixed inset-0 z-[9998] bg-white/50 backdrop-blur-sm",
1019
1057
  "aria-hidden": "true"
1020
- }, Gt = {
1058
+ }, Qt = {
1021
1059
  key: 0,
1022
1060
  class: "fixed inset-0 z-[9999]"
1023
- }, Xt = { class: "flex justify-center items-center h-screen" }, Tl = {
1061
+ }, el = { class: "flex justify-center items-center h-screen" }, _l = {
1024
1062
  __name: "modal",
1025
1063
  props: {
1026
1064
  show: Boolean,
@@ -1029,28 +1067,28 @@ const ft = { key: 0 }, mt = { class: "text-vxvue-700" }, ht = /* @__PURE__ */ r(
1029
1067
  contentClass: { type: String, default: "" }
1030
1068
  },
1031
1069
  emits: ["clicked-outside"],
1032
- setup(e, { emit: c }) {
1033
- const t = c, s = w(null);
1034
- return ve(s, () => t("clicked-outside")), (a, l) => (u(), v(_, null, [
1035
- e.show ? (u(), v("div", qt)) : A("", !0),
1036
- T(ie, { name: "appear" }, {
1037
- default: te(() => [
1038
- e.show ? (u(), v("div", Gt, [
1039
- r("div", Xt, [
1040
- r("div", {
1070
+ setup(e, { emit: d }) {
1071
+ const l = d, s = w(null);
1072
+ return ve(s, () => l("clicked-outside")), (a, t) => (u(), v(P, null, [
1073
+ e.show ? (u(), v("div", Jt)) : A("", !0),
1074
+ j(ie, { name: "appear" }, {
1075
+ default: X(() => [
1076
+ e.show ? (u(), v("div", Qt, [
1077
+ i("div", el, [
1078
+ i("div", {
1041
1079
  class: $(["overflow-hidden relative max-w-full bg-white rounded ring-1 ring-black ring-opacity-10 shadow-xl transition-all transform xl:max-w-screen-xl", e.containerClass]),
1042
1080
  ref_key: "container",
1043
1081
  ref: s
1044
1082
  }, [
1045
- r("div", {
1083
+ i("div", {
1046
1084
  class: $(e.headerClass)
1047
1085
  }, [
1048
- B(a.$slots, "title")
1086
+ M(a.$slots, "title")
1049
1087
  ], 2),
1050
- r("div", {
1088
+ i("div", {
1051
1089
  class: $(["overflow-y-auto h-full pb-4 mt-16", e.contentClass])
1052
1090
  }, [
1053
- B(a.$slots, "default")
1091
+ M(a.$slots, "default")
1054
1092
  ], 2)
1055
1093
  ], 2)
1056
1094
  ])
@@ -1060,7 +1098,7 @@ const ft = { key: 0 }, mt = { class: "text-vxvue-700" }, ht = /* @__PURE__ */ r(
1060
1098
  })
1061
1099
  ], 64));
1062
1100
  }
1063
- }, Jt = { class: "flex justify-between items-center px-4 sm:px-0" }, Qt = { class: "flex flex-1 -mt-px w-0" }, el = { class: "hidden md:flex md:-mt-px" }, tl = { class: "flex flex-1 justify-end -mt-px w-0" }, jl = {
1101
+ }, tl = { class: "flex justify-between items-center px-4 sm:px-0" }, ll = { class: "flex flex-1 -mt-px w-0" }, al = { class: "hidden md:flex md:-mt-px" }, sl = { class: "flex flex-1 justify-end -mt-px w-0" }, Fl = {
1064
1102
  __name: "pagination",
1065
1103
  props: {
1066
1104
  page: { type: Number, default: 1 },
@@ -1085,68 +1123,68 @@ const ft = { key: 0 }, mt = { class: "text-vxvue-700" }, ht = /* @__PURE__ */ r(
1085
1123
  }
1086
1124
  },
1087
1125
  emits: ["update:page"],
1088
- setup(e, { emit: c }) {
1089
- const t = c, s = e, a = w(Math.ceil(s.total / s.perPage)), l = w(null), d = D(() => (s.markerPosition === "above" ? "border-t-2 -mt-[2px]" : "border-b-2 -mb-[2px]") + " py-4"), n = D(() => {
1090
- let i = [1];
1126
+ setup(e, { emit: d }) {
1127
+ const l = d, s = e, a = w(Math.ceil(s.total / s.perPage)), t = w(null), c = B(() => (s.markerPosition === "above" ? "border-t-2 -mt-[2px]" : "border-b-2 -mb-[2px]") + " py-4"), n = B(() => {
1128
+ let r = [1];
1091
1129
  if (s.showAllPages || a.value <= 7) {
1092
1130
  for (let h = 2; h <= a.value; ++h)
1093
- i.push(h);
1094
- return i;
1131
+ r.push(h);
1132
+ return r;
1095
1133
  }
1096
- return l.value >= a.value ? i.push("dots", l.value - 2, l.value - 1) : l.value - 1 && l.value - 1 > 1 && (l.value > 1 && i.push("dots"), i.push(l.value - 1)), l.value > 1 && i.push(l.value), l.value + 1 < a.value && (i.push(l.value + 1), l.value <= 1 && i.push(l.value + 2), l.value + 2 < a.value && i.push("dots")), l.value < a.value && i.push(a.value), i;
1134
+ return t.value >= a.value ? r.push("dots", t.value - 2, t.value - 1) : t.value - 1 && t.value - 1 > 1 && (t.value > 1 && r.push("dots"), r.push(t.value - 1)), t.value > 1 && r.push(t.value), t.value + 1 < a.value && (r.push(t.value + 1), t.value <= 1 && r.push(t.value + 2), t.value + 2 < a.value && r.push("dots")), t.value < a.value && r.push(a.value), r;
1097
1135
  }), o = () => {
1098
- l.value > 1 && t("update:page", l.value - 1);
1099
- }, f = () => {
1100
- l.value < a.value && t("update:page", l.value + 1);
1136
+ t.value > 1 && l("update:page", t.value - 1);
1137
+ }, m = () => {
1138
+ t.value < a.value && l("update:page", t.value + 1);
1101
1139
  };
1102
- return Z(() => s.page, (i) => l.value = Math.min(Math.max(i, 1), a.value), { immediate: !0 }), Z(() => s.perPage, (i) => {
1103
- a.value = Math.ceil(s.total / s.perPage), t("update:page", 1);
1104
- }), Z(() => s.total, (i) => {
1105
- a.value = Math.ceil(s.total / s.perPage), l.value > a.value && t("update:page", 1);
1106
- }), (i, h) => (u(), v("nav", Jt, [
1107
- r("div", Qt, [
1140
+ return U(() => s.page, (r) => t.value = Math.min(Math.max(r, 1), a.value), { immediate: !0 }), U(() => s.perPage, (r) => {
1141
+ a.value = Math.ceil(s.total / s.perPage), l("update:page", 1);
1142
+ }), U(() => s.total, (r) => {
1143
+ a.value = Math.ceil(s.total / s.perPage), t.value > a.value && l("update:page", 1);
1144
+ }), (r, h) => (u(), v("nav", tl, [
1145
+ i("div", ll, [
1108
1146
  e.showNavButtons ? (u(), v("a", {
1109
1147
  key: 0,
1110
- onClick: I(o, ["prevent"]),
1148
+ onClick: L(o, ["prevent"]),
1111
1149
  href: "#",
1112
- class: $(["inline-flex items-center pr-1 text-sm font-medium text-gray-500 border-transparent hover:text-gray-700 hover:border-gray-300", [{ "cursor-default pointer-events-none": l.value <= 1 }, d.value]])
1150
+ class: $(["inline-flex items-center pr-1 text-sm font-medium text-gray-500 border-transparent hover:text-gray-700 hover:border-gray-300 !no-underline", [{ "cursor-default pointer-events-none": t.value <= 1 }, c.value]])
1113
1151
  }, [
1114
- T(M(le), { class: "size-5" }),
1115
- W(" " + V(e.prevText), 1)
1152
+ j(V(le), { class: "size-5" }),
1153
+ Z(" " + D(e.prevText), 1)
1116
1154
  ], 2)) : A("", !0)
1117
1155
  ]),
1118
- r("div", el, [
1119
- (u(!0), v(_, null, z(n.value, (m, g) => (u(), N(se(m !== "dots" ? "a" : "span"), {
1120
- onClick: I((y) => m !== "dots" ? t("update:page", m) : null, ["prevent"]),
1156
+ i("div", al, [
1157
+ (u(!0), v(P, null, F(n.value, (f, g) => (u(), N(se(f !== "dots" ? "a" : "span"), {
1158
+ onClick: L((y) => f !== "dots" ? l("update:page", f) : null, ["prevent"]),
1121
1159
  key: g,
1122
- href: m !== "dots" ? "#" : null,
1123
- class: $(["inline-flex items-center px-4 text-sm font-medium", [{
1124
- "border-vxvue-500 text-vxvue-700": m === l.value,
1125
- "border-transparent text-gray-500": m !== l.value,
1126
- "hover:text-gray-700 hover:border-gray-300": m !== "dots"
1127
- }, d.value]])
1160
+ href: f !== "dots" ? "#" : null,
1161
+ class: $(["inline-flex items-center px-4 text-sm font-medium !no-underline", [{
1162
+ "border-vxvue-500 text-vxvue-700": f === t.value,
1163
+ "border-transparent text-gray-500": f !== t.value,
1164
+ "hover:text-gray-700 hover:border-gray-300": f !== "dots"
1165
+ }, c.value]])
1128
1166
  }, {
1129
- default: te(() => [
1130
- W(V(m !== "dots" ? m : "..."), 1)
1167
+ default: X(() => [
1168
+ Z(D(f !== "dots" ? f : "..."), 1)
1131
1169
  ]),
1132
1170
  _: 2
1133
1171
  }, 1032, ["onClick", "href", "class"]))), 128))
1134
1172
  ]),
1135
- r("div", tl, [
1173
+ i("div", sl, [
1136
1174
  e.showNavButtons ? (u(), v("a", {
1137
1175
  key: 0,
1138
- onClick: I(f, ["prevent"]),
1176
+ onClick: L(m, ["prevent"]),
1139
1177
  href: "#",
1140
- class: $(["inline-flex items-center pl-1 text-sm font-medium text-gray-500 border-transparent hover:text-gray-700 hover:border-gray-300", [d.value, { "cursor-default pointer-events-none": l.value >= a.value }]])
1178
+ class: $(["inline-flex items-center pl-1 text-sm font-medium text-gray-500 border-transparent hover:text-gray-700 hover:border-gray-300 !no-underline", [c.value, { "cursor-default pointer-events-none": t.value >= a.value }]])
1141
1179
  }, [
1142
- W(V(e.nextText) + " ", 1),
1143
- T(M(ee), { class: "size-5" })
1180
+ Z(D(e.nextText) + " ", 1),
1181
+ j(V(te), { class: "size-5" })
1144
1182
  ], 2)) : A("", !0)
1145
1183
  ])
1146
1184
  ]));
1147
1185
  }
1148
1186
  };
1149
- function ll(e, c) {
1187
+ function nl(e, d) {
1150
1188
  return u(), v("svg", {
1151
1189
  xmlns: "http://www.w3.org/2000/svg",
1152
1190
  fill: "none",
@@ -1156,14 +1194,14 @@ function ll(e, c) {
1156
1194
  "aria-hidden": "true",
1157
1195
  "data-slot": "icon"
1158
1196
  }, [
1159
- r("path", {
1197
+ i("path", {
1160
1198
  "stroke-linecap": "round",
1161
1199
  "stroke-linejoin": "round",
1162
1200
  d: "M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"
1163
1201
  })
1164
1202
  ]);
1165
1203
  }
1166
- function al(e, c) {
1204
+ function ol(e, d) {
1167
1205
  return u(), v("svg", {
1168
1206
  xmlns: "http://www.w3.org/2000/svg",
1169
1207
  fill: "none",
@@ -1173,105 +1211,121 @@ function al(e, c) {
1173
1211
  "aria-hidden": "true",
1174
1212
  "data-slot": "icon"
1175
1213
  }, [
1176
- r("path", {
1214
+ i("path", {
1177
1215
  "stroke-linecap": "round",
1178
1216
  "stroke-linejoin": "round",
1179
1217
  d: "M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"
1180
1218
  }),
1181
- r("path", {
1219
+ i("path", {
1182
1220
  "stroke-linecap": "round",
1183
1221
  "stroke-linejoin": "round",
1184
1222
  d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
1185
1223
  })
1186
1224
  ]);
1187
1225
  }
1188
- const sl = ["value", "type"], Nl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1226
+ const rl = ["value", "type"], ul = ["disabled"], Ol = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1189
1227
  __name: "password-input",
1190
1228
  props: ["modelValue"],
1191
1229
  emits: ["update:modelValue"],
1192
- setup(e, { emit: c }) {
1193
- const t = c, s = w(!1), a = D(() => {
1194
- let l = Object.assign({}, U());
1195
- return delete l.class, l;
1230
+ setup(e, { emit: d }) {
1231
+ const l = d, s = w(!1), a = B(() => {
1232
+ let t = Object.assign({}, W());
1233
+ return delete t.class, t;
1196
1234
  });
1197
- return (l, d) => (u(), v("div", {
1198
- class: $("inline-block relative " + U().class)
1235
+ return (t, c) => (u(), v("div", {
1236
+ class: $("inline-block relative " + W().class)
1199
1237
  }, [
1200
- r("input", j({
1238
+ i("input", E({
1201
1239
  value: e.modelValue,
1202
1240
  type: s.value ? "text" : "password",
1203
- onInput: d[0] || (d[0] = (n) => t("update:modelValue", n.target.value))
1204
- }, a.value, { class: "block pr-12 w-full form-input peer" }), null, 16, sl),
1205
- r("button", {
1241
+ onInput: c[0] || (c[0] = (n) => l("update:modelValue", n.target.value))
1242
+ }, a.value, { class: "block pr-12 w-full form-input peer" }), null, 16, rl),
1243
+ i("button", {
1206
1244
  class: "flex absolute inset-y-0 right-0 items-center px-3 text-brand-700 hover:text-brand",
1207
1245
  "aria-label": "show-password-toggle",
1208
- onClick: d[1] || (d[1] = I((n) => s.value = !s.value, ["stop"]))
1246
+ disabled: W().disabled ?? !1,
1247
+ onClick: c[1] || (c[1] = L((n) => s.value = !s.value, ["stop"]))
1209
1248
  }, [
1210
- s.value ? (u(), N(M(ll), {
1249
+ s.value ? (u(), N(V(nl), {
1211
1250
  key: 0,
1212
1251
  class: "size-5"
1213
- })) : (u(), N(M(al), {
1252
+ })) : (u(), N(V(ol), {
1214
1253
  key: 1,
1215
1254
  class: "size-5"
1216
1255
  }))
1217
- ]),
1218
- B(l.$slots, "default")
1256
+ ], 8, ul)
1219
1257
  ], 2));
1220
1258
  }
1221
- }), nl = { class: "flex items-center pb-1" }, ol = ["id", "checked"], rl = ["for"], ul = { key: 1 }, il = ["href"], cl = {
1259
+ }), il = { class: "flex items-center pb-1" }, dl = {
1222
1260
  key: 0,
1223
1261
  class: "ml-6"
1224
- }, Yl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1262
+ }, zl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1225
1263
  __name: "simple-tree",
1226
- props: { branch: { type: Object, default: {} } },
1227
- emits: ["branch-selected", "expand"],
1228
- setup(e, { emit: c }) {
1229
- const t = e, s = c, a = w(!1);
1230
- return de(() => {
1231
- t.branch.current && s("expand", !0);
1232
- }), (l, d) => {
1233
- const n = Be("simple-tree", !0);
1264
+ props: {
1265
+ branch: { type: Object, default: {} },
1266
+ modelValue: { type: Object, default: null }
1267
+ },
1268
+ emits: ["update:modelValue", "expand"],
1269
+ setup(e, { emit: d }) {
1270
+ const l = e, s = d, a = w(!1);
1271
+ return ce(() => {
1272
+ l.branch === l.modelValue && s("expand", !0);
1273
+ }), (t, c) => {
1274
+ const n = Le("simple-tree", !0);
1234
1275
  return u(), v("div", {
1235
- class: $([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", l.$attrs.class])
1276
+ class: $([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", t.$attrs.class])
1236
1277
  }, [
1237
- r("div", nl, [
1238
- e.branch.branches && e.branch.branches.length ? (u(), v(_, { key: 0 }, [
1239
- r("input", {
1240
- type: "checkbox",
1241
- id: "branch-" + e.branch.id,
1242
- onClick: d[0] || (d[0] = (o) => a.value = !a.value),
1243
- checked: a.value,
1244
- class: "hidden"
1245
- }, null, 8, ol),
1246
- r("label", {
1247
- for: "branch-" + e.branch.id,
1248
- class: "mr-2"
1249
- }, [
1250
- (u(), N(se(a.value ? M(ze) : M(Te)), { class: "w-4 h-4 border" }))
1251
- ], 8, rl)
1252
- ], 64)) : A("", !0),
1253
- e.branch.current ? (u(), v("strong", ul, V(e.branch.label), 1)) : (u(), v("a", {
1278
+ i("div", il, [
1279
+ e.branch.branches && e.branch.branches.length ? (u(), v("button", {
1280
+ key: 0,
1281
+ onClick: c[0] || (c[0] = (o) => a.value = !a.value),
1282
+ class: "mr-2"
1283
+ }, [
1284
+ M(t.$slots, "toggle", {
1285
+ branch: e.branch,
1286
+ expanded: a.value
1287
+ }, () => [
1288
+ (u(), N(se(a.value ? V(je) : V(Ee)), { class: "p-1 text-white rounded-sm size-5 bg-vxvue-700 hover:bg-vxvue" }))
1289
+ ])
1290
+ ])) : A("", !0),
1291
+ e.branch === e.modelValue ? M(t.$slots, "label-selected", {
1292
+ key: 1,
1293
+ branch: e.branch
1294
+ }, () => [
1295
+ i("strong", null, D(e.branch.label), 1)
1296
+ ]) : (u(), v("button", {
1254
1297
  key: 2,
1255
- href: e.branch.path,
1256
- onClick: d[1] || (d[1] = I((o) => s("branch-selected", e.branch), ["prevent"]))
1257
- }, V(e.branch.label), 9, il))
1298
+ onClick: c[1] || (c[1] = (o) => s("update:modelValue", e.branch))
1299
+ }, [
1300
+ M(t.$slots, "label", { branch: e.branch }, () => [
1301
+ Z(D(e.branch.label), 1)
1302
+ ])
1303
+ ]))
1258
1304
  ]),
1259
- e.branch.branches && e.branch.branches.length ? pe((u(), v("ul", cl, [
1260
- (u(!0), v(_, null, z(e.branch.branches, (o) => (u(), N(n, {
1305
+ e.branch.branches && e.branch.branches.length ? ge((u(), v("div", dl, [
1306
+ (u(!0), v(P, null, F(e.branch.branches, (o) => (u(), N(n, {
1307
+ key: o.id || o.key || null,
1261
1308
  branch: o,
1262
- key: o.id,
1263
- onBranchSelected: d[2] || (d[2] = (f) => s("branch-selected", f)),
1264
- onExpand: d[3] || (d[3] = (f) => {
1265
- a.value = f, s("expand", f);
1309
+ "model-value": e.modelValue,
1310
+ "onUpdate:modelValue": c[2] || (c[2] = (m) => s("update:modelValue", m)),
1311
+ onExpand: c[3] || (c[3] = (m) => {
1312
+ a.value = m, s("expand", m);
1266
1313
  })
1267
- }, null, 8, ["branch"]))), 128))
1314
+ }, Te({ _: 2 }, [
1315
+ F(t.$slots, (m, r) => ({
1316
+ name: r,
1317
+ fn: X((h) => [
1318
+ M(t.$slots, r, E({ ref_for: !0 }, h))
1319
+ ])
1320
+ }))
1321
+ ]), 1032, ["branch", "model-value"]))), 128))
1268
1322
  ], 512)), [
1269
- [Ie, a.value]
1323
+ [_e, a.value]
1270
1324
  ]) : A("", !0)
1271
1325
  ], 2);
1272
1326
  };
1273
1327
  }
1274
- }), dl = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], vl = ["id"], fl = ["id", "aria-label"], El = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1328
+ }), cl = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], vl = ["id"], ml = ["id", "aria-label"], jl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1275
1329
  __name: "slider",
1276
1330
  props: {
1277
1331
  min: { type: Number, default: 0 },
@@ -1279,47 +1333,47 @@ const sl = ["value", "type"], Nl = /* @__PURE__ */ Object.assign({ inheritAttrs:
1279
1333
  vertical: Boolean,
1280
1334
  disabled: Boolean,
1281
1335
  modelValue: { type: [Number, Array], validator(e) {
1282
- return typeof e == "number" || e.every((c) => typeof c == "number");
1336
+ return typeof e == "number" || e.every((d) => typeof d == "number");
1283
1337
  } }
1284
1338
  },
1285
- emits: ["update:modelValue"],
1286
- setup(e, { emit: c }) {
1287
- const t = e, s = c, a = U(), l = { x: null, y: null }, d = { w: null, h: null };
1339
+ emits: ["update:modelValue", "dragStart", "dragStop"],
1340
+ setup(e, { emit: d }) {
1341
+ const l = e, s = d, a = W(), t = { x: null, y: null }, c = { w: null, h: null };
1288
1342
  let n = !1;
1289
- const o = w(null), f = w(0), i = D(() => {
1290
- const k = t.max, p = t.min;
1291
- return t.modelValue instanceof Array ? t.modelValue.map((x) => (Math.max(Math.min(x, k), p) - p) * 100 / (k - p)) : (Math.max(Math.min(t.modelValue, k), p) - p) * 100 / (k - p);
1292
- }), h = D(() => {
1293
- if (t.modelValue instanceof Array) {
1294
- const k = Math.min(...i.value) + "%", p = Math.max(...i.value) - Math.min(...i.value) + "%";
1295
- return t.vertical ? { bottom: k, height: p } : { left: k, width: p };
1343
+ const o = w(null), m = w(0), r = B(() => {
1344
+ const k = l.max, p = l.min;
1345
+ return l.modelValue instanceof Array ? l.modelValue.map((x) => (Math.max(Math.min(x, k), p) - p) * 100 / (k - p)) : (Math.max(Math.min(l.modelValue, k), p) - p) * 100 / (k - p);
1346
+ }), h = B(() => {
1347
+ if (l.modelValue instanceof Array) {
1348
+ const k = Math.min(...r.value) + "%", p = Math.max(...r.value) - Math.min(...r.value) + "%";
1349
+ return l.vertical ? { bottom: k, height: p } : { left: k, width: p };
1296
1350
  }
1297
- return t.vertical ? { bottom: 0, height: i.value + "%" } : { width: i.value + "%" };
1298
- }), m = w({
1299
- class: (t.vertical ? "left-0 -translate-x-1.5 translate-y-2.5" : "top-0 -translate-x-2.5 -translate-y-1.5") + " touch-none absolute size-5 rounded-full border-2 bg-white transition-colors duration-200 " + (t.disabled ? "" : " focus:ring-4 focus:outline-none border-vxvue cursor-grab hover:bg-vxvue focus:ring-vxvue/50"),
1351
+ return l.vertical ? { bottom: 0, height: r.value + "%" } : { width: r.value + "%" };
1352
+ }), f = w({
1353
+ class: (l.vertical ? "left-0 -translate-x-1.5 translate-y-2.5" : "top-0 -translate-x-2.5 -translate-y-1.5") + " touch-none absolute size-5 rounded-full border-2 bg-white transition-colors duration-200 " + (l.disabled ? "" : " focus:ring-4 focus:outline-none border-vxvue cursor-grab hover:bg-vxvue focus:ring-vxvue/50"),
1300
1354
  tabindex: 0
1301
1355
  }), g = (k) => {
1302
1356
  let p = parseFloat(k.toFixed(10));
1303
- if (p = Math.min(t.max, Math.max(t.min, p)), t.modelValue instanceof Array) {
1304
- let x = [...t.modelValue];
1305
- x[f.value] = p, s("update:modelValue", x);
1357
+ if (p = Math.min(l.max, Math.max(l.min, p)), l.modelValue instanceof Array) {
1358
+ let x = [...l.modelValue];
1359
+ x[m.value] = p, s("update:modelValue", x);
1306
1360
  } else
1307
1361
  s("update:modelValue", p);
1308
1362
  }, y = (k) => {
1309
- const { pageX: p, pageY: x } = k.touches ? k.touches[0] : k, b = t.vertical ? (-x + l.y) / d.h : (p - l.x) / d.w;
1310
- g(Math.floor((t.max - t.min) * b + t.min));
1311
- }, L = () => {
1312
- const { clientLeft: k, clientTop: p, scrollLeft: x, scrollTop: b } = document.documentElement, P = o.value.getBoundingClientRect();
1313
- l.x = P.left + x - k, l.y = P.bottom + b - p, d.w = o.value.offsetWidth, d.h = o.value.offsetHeight;
1314
- }, F = (k) => {
1363
+ const { pageX: p, pageY: x } = k.touches ? k.touches[0] : k, b = l.vertical ? (-x + t.y) / c.h : (p - t.x) / c.w;
1364
+ g(Math.floor((l.max - l.min) * b + l.min));
1365
+ }, T = () => {
1366
+ const { clientLeft: k, clientTop: p, scrollLeft: x, scrollTop: b } = document.documentElement, I = o.value.getBoundingClientRect();
1367
+ t.x = I.left + x - k, t.y = I.bottom + b - p, c.w = o.value.offsetWidth, c.h = o.value.offsetHeight;
1368
+ }, _ = (k) => {
1315
1369
  n && (k.preventDefault(), y(k));
1316
1370
  }, O = (k) => {
1317
- k.preventDefault(), k.currentTarget.focus(), L(), n = !0, document.addEventListener("mousemove", F), document.addEventListener("mouseup", Y);
1318
- }, Y = () => {
1319
- n && (n = !1, document.removeEventListener("mousemove", F), document.removeEventListener("mouseup", Y));
1371
+ k.preventDefault(), k.currentTarget.focus(), T(), n = !0, k.type === "mousedown" ? (document.addEventListener("mousemove", _), document.addEventListener("mouseup", z)) : (document.addEventListener("touchmove", _), document.addEventListener("touchend", z)), s("dragStart");
1372
+ }, z = (k) => {
1373
+ n && (n = !1, k.type === "mouseup" ? (document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", z)) : (document.removeEventListener("touchmove", _), document.removeEventListener("touchend", z)), setTimeout(() => s("dragStop"), 0));
1320
1374
  }, G = (k) => {
1321
1375
  k.keyCode >= 33 && k.keyCode <= 40 && k.preventDefault();
1322
- const p = t.modelValue[f.value] ?? t.modelValue;
1376
+ const p = l.modelValue[m.value] ?? l.modelValue;
1323
1377
  switch (k.keyCode) {
1324
1378
  case 37:
1325
1379
  case 40:
@@ -1330,81 +1384,81 @@ const sl = ["value", "type"], Nl = /* @__PURE__ */ Object.assign({ inheritAttrs:
1330
1384
  g(p + 1);
1331
1385
  break;
1332
1386
  case 33:
1333
- g(p + (t.max - t.min) / 10);
1387
+ g(p + (l.max - l.min) / 10);
1334
1388
  break;
1335
1389
  case 34:
1336
- g(p - (t.max - t.min) / 10);
1390
+ g(p - (l.max - l.min) / 10);
1337
1391
  break;
1338
1392
  case 36:
1339
- g(t.min);
1393
+ g(l.min);
1340
1394
  break;
1341
1395
  case 35:
1342
- g(t.max);
1396
+ g(l.max);
1343
1397
  }
1344
- }, E = (k) => {
1345
- L(), y(k);
1398
+ }, R = (k) => {
1399
+ T(), y(k);
1346
1400
  };
1347
- return (k, p) => (u(), v("div", j({
1401
+ return (k, p) => (u(), v("div", E({
1348
1402
  class: ["relative bg-slate-300", e.vertical ? "h-full w-2 rounded-t-full rounded-b-full" : "w-full h-2 rounded-r-full rounded-l-full"],
1349
1403
  ref_key: "track",
1350
1404
  ref: o,
1351
1405
  role: "slider",
1352
1406
  "aria-label": "slider-thumb",
1353
1407
  "aria-valuemin": e.min,
1354
- "aria-valuemax": t.max,
1408
+ "aria-valuemax": l.max,
1355
1409
  "aria-valuenow": e.modelValue[0] ?? e.modelValue,
1356
1410
  "aria-valuetext": e.modelValue
1357
1411
  }, re(e.disabled ? {} : {
1358
- click: E
1412
+ click: R
1359
1413
  }, !0)), [
1360
1414
  e.disabled ? A("", !0) : (u(), v("div", {
1361
1415
  key: 0,
1362
1416
  class: $(["absolute bg-vxvue", e.vertical ? "w-full rounded-t-full rounded-b-full" : "h-full rounded-r-full rounded-l-full"]),
1363
- style: Pe(h.value)
1417
+ style: be(h.value)
1364
1418
  }, null, 6)),
1365
- e.modelValue.length ? (u(!0), v(_, { key: 2 }, z(e.modelValue, (x, b) => (u(), v("button", j({
1366
- id: b ? null : M(a).id,
1367
- style: e.vertical ? { bottom: i.value[b] + "%" } : { left: i.value[b] + "%" },
1419
+ e.modelValue.length ? (u(!0), v(P, { key: 2 }, F(e.modelValue, (x, b) => (u(), v("button", E({
1420
+ id: b ? null : V(a).id,
1421
+ style: e.vertical ? { bottom: r.value[b] + "%" } : { left: r.value[b] + "%" },
1368
1422
  "aria-label": "slider-thumb-" + (b + 1)
1369
1423
  }, re(e.disabled ? {} : {
1370
- focus: () => f.value = b,
1424
+ focus: () => m.value = b,
1371
1425
  keydown: G,
1372
- mousedown: (P) => {
1373
- f.value = b, O(P);
1426
+ touchstart: (I) => {
1427
+ m.value = b, O(I);
1374
1428
  },
1375
- touchstart: (P) => {
1376
- f.value = b, O(P);
1429
+ mousedown: (I) => {
1430
+ m.value = b, O(I);
1377
1431
  },
1378
- touchmove: F,
1379
- touchend: Y
1380
- }, !0), m.value), null, 16, fl))), 256)) : (u(), v("button", j({
1432
+ touchend: z,
1433
+ mouseup: z
1434
+ }, !0), { ref_for: !0 }, f.value), null, 16, ml))), 256)) : (u(), v("button", E({
1381
1435
  key: 1,
1382
- id: M(a).id,
1383
- style: e.vertical ? { bottom: i.value + "%" } : { left: i.value + "%" },
1436
+ id: V(a).id,
1437
+ style: e.vertical ? { bottom: r.value + "%" } : { left: r.value + "%" },
1384
1438
  "aria-label": "slider-thumb"
1385
1439
  }, re(e.disabled ? {} : {
1386
- focus: () => f.value = 0,
1440
+ focus: () => m.value = 0,
1387
1441
  keydown: G,
1388
- mousedown: (x) => {
1389
- f.value = 0, O(x);
1390
- },
1391
1442
  touchstart: (x) => {
1392
- f.value = 0, O(x);
1443
+ m.value = 0, O(x);
1393
1444
  },
1394
- touchmove: F,
1395
- touchend: Y
1396
- }, !0), m.value), null, 16, vl))
1397
- ], 16, dl));
1445
+ mousedown: (x) => {
1446
+ m.value = 0, O(x);
1447
+ },
1448
+ touchend: z,
1449
+ mouseup: z
1450
+ }, !0), f.value), null, 16, vl))
1451
+ ], 16, cl));
1398
1452
  }
1399
- }), ml = { class: "text-white bg-slate-700" }, hl = ["onClick"], pl = { class: "flex items-center space-x-1" }, gl = {
1453
+ }), fl = { class: "text-white bg-vxvue-800" }, hl = ["onClick"], pl = { class: "flex items-center space-x-1" }, gl = {
1400
1454
  __name: "sortable",
1401
1455
  props: {
1402
1456
  columns: {
1403
1457
  type: Array,
1404
1458
  required: !0,
1405
1459
  validator: (e) => {
1406
- for (const c of e)
1407
- if (c.label === void 0 || c.prop === void 0)
1460
+ for (const d of e)
1461
+ if (d.label === void 0 || d.prop === void 0)
1408
1462
  return !1;
1409
1463
  return !0;
1410
1464
  }
@@ -1417,35 +1471,35 @@ const sl = ["value", "type"], Nl = /* @__PURE__ */ Object.assign({ inheritAttrs:
1417
1471
  keyProperty: { type: String, default: "key" }
1418
1472
  },
1419
1473
  emits: ["before-sort", "after-sort"],
1420
- setup(e, { emit: c }) {
1421
- const t = e, s = c, a = w(t.sortProp), l = w(t.sortDirection), d = D(() => {
1422
- let o = t.rows.slice();
1423
- const f = t.columns.find(({ prop: i }) => i === a.value);
1424
- return f && (l.value === "asc" && f.sortAscFunction ? o.sort(f.sortAscFunction) : l.value === "desc" && f.sortDescFunction ? o.sort(f.sortDescFunction) : o.sort((i, h) => i[a.value] < h[a.value] ? l.value === "asc" ? -1 : 1 : i[a.value] > h[a.value] ? l.value === "asc" ? 1 : -1 : 0)), o.slice(t.offset || 0, (t.offset || 0) + (t.count || o.length));
1474
+ setup(e, { emit: d }) {
1475
+ const l = e, s = d, a = w(l.sortProp), t = w(l.sortDirection), c = B(() => {
1476
+ let o = l.rows.slice();
1477
+ const m = l.columns.find(({ prop: r }) => r === a.value);
1478
+ return m && (t.value === "asc" && m.sortAscFunction ? o.sort(m.sortAscFunction) : t.value === "desc" && m.sortDescFunction ? o.sort(m.sortDescFunction) : o.sort((r, h) => r[a.value] < h[a.value] ? t.value === "asc" ? -1 : 1 : r[a.value] > h[a.value] ? t.value === "asc" ? 1 : -1 : 0)), o.slice(l.offset || 0, (l.offset || 0) + (l.count || o.length));
1425
1479
  }), n = (o) => {
1426
- s("before-sort", { prop: a.value, dir: l.value }), a.value === o ? l.value = l.value === "asc" ? "desc" : "asc" : (a.value = o, l.value = l.value || "asc"), ce(() => s("after-sort", { prop: a.value, dir: l.value }));
1480
+ s("before-sort", { prop: a.value, dir: t.value }), a.value === o ? t.value = t.value === "asc" ? "desc" : "asc" : (a.value = o, t.value = t.value || "asc"), de(() => s("after-sort", { prop: a.value, dir: t.value }));
1427
1481
  };
1428
- return (o, f) => (u(), v("table", {
1482
+ return (o, m) => (u(), v("table", {
1429
1483
  class: $(o.$attrs.class || "w-full divide-y divide-y-slate-900 table-fixed")
1430
1484
  }, [
1431
- r("thead", ml, [
1432
- r("tr", null, [
1433
- (u(!0), v(_, null, z(e.columns, (i) => (u(), v("th", {
1485
+ i("thead", fl, [
1486
+ i("tr", null, [
1487
+ (u(!0), v(P, null, F(e.columns, (r) => (u(), v("th", {
1434
1488
  scope: "col",
1435
1489
  class: $(["py-3 px-6 text-left", [
1436
- { "cursor-pointer": i.sortable, active: a.value === i.prop },
1437
- i.cssClass
1490
+ { "cursor-pointer": r.sortable, active: a.value === r.prop },
1491
+ r.cssClass
1438
1492
  ]]),
1439
- onClick: (h) => i.sortable ? n(i.prop) : null
1493
+ onClick: (h) => r.sortable ? n(r.prop) : null
1440
1494
  }, [
1441
- B(o.$slots, i.prop + "-header", {
1442
- column: i,
1443
- sortDir: l.value,
1495
+ M(o.$slots, r.prop + "-header", {
1496
+ column: r,
1497
+ sortDir: t.value,
1444
1498
  sortProp: a.value
1445
1499
  }, () => [
1446
- r("div", pl, [
1447
- r("span", null, V(i.label), 1),
1448
- i.sortable ? (u(), N(se(a.value !== i.prop ? M(Fe) : l.value === "asc" ? M(Le) : M(Oe)), {
1500
+ i("div", pl, [
1501
+ i("span", null, D(r.label), 1),
1502
+ r.sortable ? (u(), N(se(a.value !== r.prop ? V(Oe) : t.value === "asc" ? V(Fe) : V(ze)), {
1449
1503
  key: 0,
1450
1504
  class: "size-4"
1451
1505
  })) : A("", !0)
@@ -1454,135 +1508,106 @@ const sl = ["value", "type"], Nl = /* @__PURE__ */ Object.assign({ inheritAttrs:
1454
1508
  ], 10, hl))), 256))
1455
1509
  ])
1456
1510
  ]),
1457
- r("tbody", null, [
1458
- (u(!0), v(_, null, z(d.value, (i) => (u(), v("tr", {
1459
- key: i[e.keyProperty],
1460
- class: $(i.cssClass)
1511
+ i("tbody", null, [
1512
+ (u(!0), v(P, null, F(c.value, (r) => (u(), v("tr", {
1513
+ key: r[e.keyProperty],
1514
+ class: $(r.cssClass)
1461
1515
  }, [
1462
- (u(!0), v(_, null, z(e.columns, (h) => (u(), v("td", {
1516
+ (u(!0), v(P, null, F(e.columns, (h) => (u(), v("td", {
1463
1517
  class: $(["overflow-hidden py-3 px-6 whitespace-nowrap text-ellipsis", { active: a.value === h.prop }])
1464
1518
  }, [
1465
- B(o.$slots, h.prop, { row: i }, () => [
1466
- W(V(i[h.prop]), 1)
1519
+ M(o.$slots, h.prop, { row: r }, () => [
1520
+ Z(D(r[h.prop]), 1)
1467
1521
  ], !0)
1468
1522
  ], 2))), 256))
1469
1523
  ], 2))), 128))
1470
1524
  ])
1471
1525
  ], 2));
1472
1526
  }
1473
- }, Rl = /* @__PURE__ */ we(gl, [["__scopeId", "data-v-7ec18969"]]), bl = ["viewBox"], xl = ["cx", "cy", "r", "stroke-width"], yl = ["cx", "cy", "r", "stroke-width", "stroke-dasharray"], wl = {
1474
- __name: "spinner",
1475
- props: { radius: { type: Number, default: 10 }, strokeWidth: { type: Number, default: 4 } },
1476
- setup(e) {
1477
- const c = e, t = D(() => c.radius + c.strokeWidth / 2), s = D(() => c.radius * 2 + c.strokeWidth), a = D(() => c.radius * Math.PI / 1.5);
1478
- return (l, d) => (u(), v("svg", {
1479
- class: "animate-spin",
1480
- xmlns: "http://www.w3.org/2000/svg",
1481
- fill: "none",
1482
- viewBox: "0 0 " + s.value + " " + s.value,
1483
- role: "progressbar"
1484
- }, [
1485
- r("circle", {
1486
- class: "opacity-35",
1487
- cx: t.value,
1488
- cy: t.value,
1489
- r: e.radius,
1490
- stroke: "currentColor",
1491
- "stroke-width": e.strokeWidth
1492
- }, null, 8, xl),
1493
- r("circle", {
1494
- cx: t.value,
1495
- cy: t.value,
1496
- r: e.radius,
1497
- stroke: "currentColor",
1498
- "stroke-width": e.strokeWidth,
1499
- "stroke-dasharray": a.value + " " + e.radius * 100,
1500
- "stroke-linecap": "round"
1501
- }, null, 8, yl)
1502
- ], 8, bl));
1503
- }
1504
- }, kl = { class: "flex items-center space-x-2" }, $l = ["disabled"], Wl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1527
+ }, El = /* @__PURE__ */ me(gl, [["__scopeId", "data-v-6abd4b76"]]), bl = { class: "flex items-center space-x-2" }, xl = ["disabled"], yl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1505
1528
  __name: "submit-button",
1506
1529
  props: { busy: Boolean, spinnerClass: String, theme: String },
1507
1530
  emits: ["submit"],
1508
- setup(e, { emit: c }) {
1509
- const t = c;
1510
- return (s, a) => (u(), v("div", kl, [
1511
- r("button", {
1512
- class: $([s.$attrs.class || "button", e.theme || ""]),
1513
- disabled: e.busy,
1531
+ setup(e, { emit: d }) {
1532
+ const l = d;
1533
+ return (s, a) => (u(), v("div", bl, [
1534
+ i("button", {
1535
+ class: $([s.$attrs.class, e.theme]),
1536
+ disabled: s.$attrs.disabled || e.busy,
1514
1537
  type: "button",
1515
- onClick: a[0] || (a[0] = (l) => t("submit"))
1538
+ onClick: a[0] || (a[0] = (t) => l("submit"))
1516
1539
  }, [
1517
- B(s.$slots, "default")
1518
- ], 10, $l),
1519
- e.busy ? (u(), N(wl, {
1540
+ M(s.$slots, "default", {}, void 0, !0)
1541
+ ], 10, xl),
1542
+ e.busy ? (u(), N(ye, {
1520
1543
  key: 0,
1521
1544
  class: $(e.spinnerClass || ["size-5", { error: "text-error", success: "text-success", default: "text-vxvue" }[e.theme || "default"]])
1522
1545
  }, null, 8, ["class"])) : A("", !0)
1523
1546
  ]));
1524
1547
  }
1525
- }), Cl = { class: "sm:hidden" }, Sl = { class: "hidden sm:block" }, Ml = { class: "border-b border-gray-200" }, Vl = {
1548
+ }), Nl = /* @__PURE__ */ me(yl, [["__scopeId", "data-v-2eba6082"]]), wl = { class: "sm:hidden" }, kl = { class: "hidden sm:block" }, $l = { class: "border-b border-gray-200" }, Cl = {
1526
1549
  class: "flex -mb-px space-x-8",
1527
1550
  "aria-label": "Tabs"
1528
- }, Dl = ["onClick", "aria-current"], Hl = {
1551
+ }, Sl = ["onClick", "aria-current"], Yl = {
1529
1552
  __name: "tabs",
1530
1553
  props: {
1531
1554
  items: { type: Array, default: [] },
1532
1555
  activeIndex: { type: Number, default: 0 }
1533
1556
  },
1534
1557
  emits: ["update:active-index"],
1535
- setup(e, { emit: c }) {
1536
- const t = e, s = c, a = w(t.items[t.activeIndex] || {}), l = D(() => {
1558
+ setup(e, { emit: d }) {
1559
+ const l = e, s = d, a = w(l.items[l.activeIndex] || {}), t = B(() => {
1537
1560
  let n = [];
1538
- return t.items.forEach((o, f) => {
1539
- o.disabled || n.push({ label: o.name, key: f });
1561
+ return l.items.forEach((o, m) => {
1562
+ o.disabled || n.push({ label: o.name, key: m });
1540
1563
  }), n;
1541
1564
  });
1542
- Z(() => t.activeIndex, (n) => {
1543
- a.value = t.items[n] || {};
1565
+ U(() => l.activeIndex, (n) => {
1566
+ a.value = l.items[n] || {};
1544
1567
  });
1545
- const d = (n) => {
1546
- n.disabled || (a.value = n, s("update:active-index", t.items.indexOf(n)));
1568
+ const c = (n) => {
1569
+ n.disabled || (a.value = n, s("update:active-index", l.items.indexOf(n)));
1547
1570
  };
1548
- return (n, o) => (u(), v(_, null, [
1549
- r("div", Cl, [
1550
- T(Lt, {
1551
- options: l.value,
1571
+ return (n, o) => (u(), v(P, null, [
1572
+ i("div", wl, [
1573
+ j(Ft, {
1574
+ options: t.value,
1552
1575
  "model-value": e.activeIndex,
1553
- "onUpdate:modelValue": o[0] || (o[0] = (f) => s("update:activeIndex", f)),
1576
+ "onUpdate:modelValue": o[0] || (o[0] = (m) => s("update:activeIndex", m)),
1554
1577
  class: "w-full"
1555
1578
  }, null, 8, ["options", "model-value"])
1556
1579
  ]),
1557
- r("div", Sl, [
1558
- r("div", Ml, [
1559
- r("nav", Vl, [
1560
- (u(!0), v(_, null, z(e.items, (f) => (u(), v("a", {
1561
- key: f.name,
1580
+ i("div", kl, [
1581
+ i("div", $l, [
1582
+ i("nav", Cl, [
1583
+ (u(!0), v(P, null, F(e.items, (m) => (u(), v("a", {
1584
+ key: m.name,
1562
1585
  href: "#",
1563
- onClick: I((i) => d(f), ["prevent"]),
1586
+ onClick: L((r) => c(m), ["prevent"]),
1564
1587
  class: $([
1565
- a.value === f ? "border-vxvue-500 text-vxvue-600" : "border-transparent text-gray-900 hover:text-gray-700 hover:border-gray-300",
1566
- f.disabled ? "cursor-not-allowed text-gray-400 hover:border-transparent" : "",
1567
- "group inline-flex items-center py-4 px-1 border-b-4 font-medium"
1588
+ a.value === m ? "border-vxvue-500 text-vxvue-600" : "border-transparent text-gray-900 hover:text-gray-700 hover:border-gray-300",
1589
+ m.disabled ? "cursor-not-allowed text-gray-400 hover:border-transparent" : "",
1590
+ "group inline-flex items-center py-4 px-1 border-b-4 font-medium !no-underline"
1568
1591
  ]),
1569
- "aria-current": a.value === f ? "page" : void 0
1592
+ "aria-current": a.value === m ? "page" : void 0
1570
1593
  }, [
1571
- B(n.$slots, "icon", { tab: f }),
1572
- r("span", null, [
1573
- B(n.$slots, "default", { tab: f }, () => [
1574
- W(V(f.name), 1)
1594
+ M(n.$slots, "icon", { tab: m }),
1595
+ i("span", null, [
1596
+ M(n.$slots, "default", { tab: m }, () => [
1597
+ Z(D(m.name), 1)
1575
1598
  ])
1576
1599
  ]),
1577
- f.badge ? (u(), v("span", {
1578
- key: 0,
1579
- class: $([
1580
- a.value === f ? "bg-vxvue-50 text-vxvue-700" : "bg-gray-200 text-gray-900",
1581
- f.disabled ? "bg-gray-100 text-gray-400" : "",
1582
- "hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block"
1583
- ])
1584
- }, V(f.badge), 3)) : A("", !0)
1585
- ], 10, Dl))), 128))
1600
+ M(n.$slots, "badge", { tab: m }, () => [
1601
+ m.badge ? (u(), v("span", {
1602
+ key: 0,
1603
+ class: $([
1604
+ a.value === m ? "bg-vxvue-50 text-vxvue-700" : "bg-gray-200 text-gray-900",
1605
+ m.disabled ? "bg-gray-100 text-gray-400" : "",
1606
+ "hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block"
1607
+ ])
1608
+ }, D(m.badge), 3)) : A("", !0)
1609
+ ])
1610
+ ], 10, Sl))), 128))
1586
1611
  ])
1587
1612
  ])
1588
1613
  ])
@@ -1590,23 +1615,23 @@ const sl = ["value", "type"], Nl = /* @__PURE__ */ Object.assign({ inheritAttrs:
1590
1615
  }
1591
1616
  };
1592
1617
  export {
1593
- Al as Accordion,
1594
- Bl as AccordionPanel,
1595
- Il as Autocomplete,
1596
- Pl as Confirm,
1597
- xt as DateInput,
1598
- Ll as Datepicker,
1599
- Fl as FormFileButton,
1600
- Lt as FormSelect,
1601
- Ol as FormSwitch,
1602
- zl as MessageToast,
1603
- Tl as Modal,
1604
- jl as Pagination,
1605
- Nl as PasswordInput,
1606
- Yl as SimpleTree,
1607
- El as Slider,
1608
- Rl as Sortable,
1609
- wl as Spinner,
1610
- Wl as SubmitButton,
1611
- Hl as Tabs
1618
+ Ml as Accordion,
1619
+ Dl as AccordionPanel,
1620
+ Al as Autocomplete,
1621
+ Bl as Confirm,
1622
+ wt as DateInput,
1623
+ Pl as Datepicker,
1624
+ Il as FormFileButton,
1625
+ Ft as FormSelect,
1626
+ Ll as FormSwitch,
1627
+ Tl as MessageToast,
1628
+ _l as Modal,
1629
+ Fl as Pagination,
1630
+ Ol as PasswordInput,
1631
+ zl as SimpleTree,
1632
+ jl as Slider,
1633
+ El as Sortable,
1634
+ ye as Spinner,
1635
+ Nl as SubmitButton,
1636
+ Yl as Tabs
1612
1637
  };