vx-vue 1.1.0 → 1.2.0

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