@iaclinical/components 1.0.3 → 1.0.4

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.
@@ -1,8 +1,8 @@
1
- import { defineComponent as T, computed as g, createElementBlock as l, openBlock as s, normalizeClass as k, createElementVNode as o, createCommentVNode as f, renderSlot as w, toDisplayString as x, createBlock as P, Teleport as W, createVNode as H, Transition as K, withCtx as q, withModifiers as S, createTextVNode as F, ref as j, normalizeStyle as I, watch as X, withDirectives as Y, vModelText as Z, Fragment as L, renderList as O, nextTick as ee, resolveDynamicComponent as te } from "vue";
2
- const se = { class: "flex items-center gap-4" }, le = {
1
+ import { defineComponent as L, computed as g, createElementBlock as o, openBlock as s, normalizeClass as v, createElementVNode as a, createCommentVNode as f, renderSlot as $, toDisplayString as C, createBlock as P, Teleport as X, createVNode as G, Transition as Q, withCtx as U, withModifiers as I, createTextVNode as K, ref as V, normalizeStyle as W, onMounted as ee, onUnmounted as te, watch as Y, nextTick as J, Fragment as E, renderList as A, resolveDynamicComponent as Z, withDirectives as se, vModelText as oe } from "vue";
2
+ const le = { class: "flex items-center gap-4" }, ae = {
3
3
  key: 1,
4
4
  class: "text-lg font-bold text-primary-50 font-poppins"
5
- }, oe = { class: "flex-1 flex justify-center" }, ae = { class: "flex items-center gap-3" }, ne = /* @__PURE__ */ T({
5
+ }, ne = { class: "flex-1 flex justify-center" }, re = { class: "flex items-center gap-3" }, ie = /* @__PURE__ */ L({
6
6
  __name: "AppBar",
7
7
  props: {
8
8
  title: { default: "" },
@@ -13,43 +13,43 @@ const se = { class: "flex items-center gap-4" }, le = {
13
13
  height: { default: "md" }
14
14
  },
15
15
  emits: ["toggle-menu"],
16
- setup(e, { emit: h }) {
17
- const t = e, d = h, r = g(() => {
18
- const i = "flex items-center justify-between px-6 z-50", n = {
16
+ setup(t, { emit: y }) {
17
+ const e = t, u = y, n = g(() => {
18
+ const d = "flex items-center justify-between px-6 z-50", r = {
19
19
  default: "bg-primary-700 text-primary-50",
20
20
  dark: "bg-secondary-900 text-white",
21
21
  light: "bg-white text-secondary-900 border-b border-secondary-200"
22
- }, u = {
22
+ }, c = {
23
23
  sm: "h-12",
24
24
  md: "h-14",
25
25
  lg: "h-16"
26
- }, a = t.sticky ? "sticky top-0" : "", b = t.shadow ? "shadow-md" : "";
26
+ }, i = e.sticky ? "sticky top-0" : "", x = e.shadow ? "shadow-md" : "";
27
27
  return [
28
+ d,
29
+ r[e.variant],
30
+ c[e.height],
28
31
  i,
29
- n[t.variant],
30
- u[t.height],
31
- a,
32
- b
32
+ x
33
33
  ].join(" ");
34
34
  });
35
- return (i, n) => (s(), l("header", {
36
- class: k(r.value)
35
+ return (d, r) => (s(), o("header", {
36
+ class: v(n.value)
37
37
  }, [
38
- o("div", se, [
39
- e.showMenuButton ? (s(), l("button", {
38
+ a("div", le, [
39
+ t.showMenuButton ? (s(), o("button", {
40
40
  key: 0,
41
- onClick: n[0] || (n[0] = (u) => d("toggle-menu")),
41
+ onClick: r[0] || (r[0] = (c) => u("toggle-menu")),
42
42
  class: "p-2 hover:bg-primary-600 rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
43
43
  "aria-label": "Toggle menu"
44
- }, [...n[1] || (n[1] = [
45
- o("svg", {
44
+ }, [...r[1] || (r[1] = [
45
+ a("svg", {
46
46
  class: "w-6 h-6 text-primary-50",
47
47
  fill: "none",
48
48
  stroke: "currentColor",
49
49
  viewBox: "0 0 24 24",
50
50
  xmlns: "http://www.w3.org/2000/svg"
51
51
  }, [
52
- o("path", {
52
+ a("path", {
53
53
  "stroke-linecap": "round",
54
54
  "stroke-linejoin": "round",
55
55
  "stroke-width": "2",
@@ -57,26 +57,26 @@ const se = { class: "flex items-center gap-4" }, le = {
57
57
  })
58
58
  ], -1)
59
59
  ])])) : f("", !0),
60
- e.title ? (s(), l("div", le, x(e.title), 1)) : f("", !0),
61
- w(i.$slots, "left", {}, void 0, !0)
60
+ t.title ? (s(), o("div", ae, C(t.title), 1)) : f("", !0),
61
+ $(d.$slots, "left", {}, void 0, !0)
62
62
  ]),
63
- o("div", oe, [
64
- w(i.$slots, "center", {}, void 0, !0)
63
+ a("div", ne, [
64
+ $(d.$slots, "center", {}, void 0, !0)
65
65
  ]),
66
- o("div", ae, [
67
- w(i.$slots, "right", {}, void 0, !0)
66
+ a("div", re, [
67
+ $(d.$slots, "right", {}, void 0, !0)
68
68
  ])
69
69
  ], 2));
70
70
  }
71
- }), A = (e, h) => {
72
- const t = e.__vccOpts || e;
73
- for (const [d, r] of h)
74
- t[d] = r;
75
- return t;
76
- }, Ot = /* @__PURE__ */ A(ne, [["__scopeId", "data-v-8c81fc6d"]]), re = ["type", "disabled", "aria-label"], ie = {
71
+ }), R = (t, y) => {
72
+ const e = t.__vccOpts || t;
73
+ for (const [u, n] of y)
74
+ e[u] = n;
75
+ return e;
76
+ }, Et = /* @__PURE__ */ R(ie, [["__scopeId", "data-v-8c81fc6d"]]), de = ["type", "disabled", "aria-label"], ue = {
77
77
  key: 0,
78
78
  class: "absolute top-0 right-0 inline-flex items-center justify-center px-1.5 py-0.5 text-xs font-bold leading-none text-white transform translate-x-1/2 -translate-y-1/2 bg-danger-600 rounded-full min-w-[1.25rem]"
79
- }, Ft = /* @__PURE__ */ T({
79
+ }, Ht = /* @__PURE__ */ L({
80
80
  __name: "Button",
81
81
  props: {
82
82
  variant: { default: "primary" },
@@ -88,20 +88,20 @@ const se = { class: "flex items-center gap-4" }, le = {
88
88
  ariaLabel: { default: "" }
89
89
  },
90
90
  emits: ["click"],
91
- setup(e, { emit: h }) {
92
- const t = e, d = h, r = g(() => t.variant === "icon"), i = g(() => t.badge > 99 ? "99+" : t.badge.toString()), n = g(() => {
93
- const a = "inline-flex items-center justify-center font-semibold tracking-wide transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", b = {
91
+ setup(t, { emit: y }) {
92
+ const e = t, u = y, n = g(() => e.variant === "icon"), d = g(() => e.badge > 99 ? "99+" : e.badge.toString()), r = g(() => {
93
+ const i = "inline-flex items-center justify-center font-semibold tracking-wide transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", x = {
94
94
  primary: "bg-primary-500 text-white hover:bg-primary-600 active:bg-primary-700 focus-visible:ring-primary-700",
95
95
  secondary: "bg-secondary-200 text-secondary-900 hover:bg-secondary-300 focus-visible:ring-secondary-500",
96
96
  outline: "border border-secondary-300 bg-transparent hover:bg-secondary-100 focus-visible:ring-secondary-500",
97
97
  ghost: "hover:bg-secondary-100 focus-visible:ring-secondary-500",
98
98
  danger: "bg-danger-600 text-white hover:bg-danger-700 focus-visible:ring-danger-600",
99
99
  icon: "hover:bg-secondary-100 focus-visible:ring-secondary-500 relative"
100
- }, v = {
101
- sm: r.value ? "p-1.5" : "h-8 px-3 text-sm",
102
- md: r.value ? "p-2" : "h-10 px-4 text-base",
103
- lg: r.value ? "p-3" : "h-12 px-6 text-lg"
104
- }, V = {
100
+ }, m = {
101
+ sm: n.value ? "p-1.5" : "h-8 px-3 text-sm",
102
+ md: n.value ? "p-2" : "h-10 px-4 text-base",
103
+ lg: n.value ? "p-3" : "h-12 px-6 text-lg"
104
+ }, j = {
105
105
  full: "rounded-full",
106
106
  xl: "rounded-2xl",
107
107
  lg: "rounded-xl",
@@ -109,72 +109,72 @@ const se = { class: "flex items-center gap-4" }, le = {
109
109
  sm: "rounded-md",
110
110
  none: "rounded-none"
111
111
  };
112
- return `${a} ${b[t.variant]} ${v[t.size]} ${V[t.radius]}`;
113
- }), u = (a) => {
114
- t.disabled || d("click", a);
112
+ return `${i} ${x[e.variant]} ${m[e.size]} ${j[e.radius]}`;
113
+ }), c = (i) => {
114
+ e.disabled || u("click", i);
115
115
  };
116
- return (a, b) => (s(), l("button", {
117
- class: k(n.value),
118
- type: e.type,
119
- disabled: e.disabled,
120
- onClick: u,
121
- "aria-label": e.ariaLabel
116
+ return (i, x) => (s(), o("button", {
117
+ class: v(r.value),
118
+ type: t.type,
119
+ disabled: t.disabled,
120
+ onClick: c,
121
+ "aria-label": t.ariaLabel
122
122
  }, [
123
- w(a.$slots, "default"),
124
- r.value && e.badge && e.badge > 0 ? (s(), l("span", ie, x(i.value), 1)) : f("", !0)
125
- ], 10, re));
123
+ $(i.$slots, "default"),
124
+ n.value && t.badge && t.badge > 0 ? (s(), o("span", ue, C(d.value), 1)) : f("", !0)
125
+ ], 10, de));
126
126
  }
127
- }), de = {
127
+ }), ce = {
128
128
  key: 0,
129
129
  class: "border-b border-gray-100 px-6 py-4"
130
- }, ue = { class: "px-6 py-4" }, ce = {
130
+ }, fe = { class: "px-6 py-4" }, pe = {
131
131
  key: 1,
132
132
  class: "border-t border-gray-100 px-6 py-4 bg-gray-50"
133
- }, At = /* @__PURE__ */ T({
133
+ }, Ft = /* @__PURE__ */ L({
134
134
  __name: "Card",
135
135
  props: {
136
136
  shadow: { default: "md" },
137
137
  rounded: { default: "lg" },
138
138
  bordered: { type: Boolean, default: !1 }
139
139
  },
140
- setup(e) {
141
- const h = e, t = {
140
+ setup(t) {
141
+ const y = t, e = {
142
142
  none: "",
143
143
  sm: "shadow-sm",
144
144
  md: "shadow",
145
145
  lg: "shadow-lg",
146
146
  xl: "shadow-xl"
147
- }, d = {
147
+ }, u = {
148
148
  none: "rounded-none",
149
149
  sm: "rounded-sm",
150
150
  md: "rounded-md",
151
151
  lg: "rounded-lg",
152
152
  xl: "rounded-xl",
153
153
  full: "rounded-full"
154
- }, r = g(() => [
154
+ }, n = g(() => [
155
155
  "w-full bg-white",
156
- t[h.shadow],
157
- d[h.rounded],
158
- h.bordered ? "border border-gray-200" : ""
156
+ e[y.shadow],
157
+ u[y.rounded],
158
+ y.bordered ? "border border-gray-200" : ""
159
159
  ]);
160
- return (i, n) => (s(), l("div", {
161
- class: k(r.value)
160
+ return (d, r) => (s(), o("div", {
161
+ class: v(n.value)
162
162
  }, [
163
- i.$slots.header ? (s(), l("div", de, [
164
- w(i.$slots, "header")
163
+ d.$slots.header ? (s(), o("div", ce, [
164
+ $(d.$slots, "header")
165
165
  ])) : f("", !0),
166
- o("div", ue, [
167
- w(i.$slots, "default")
166
+ a("div", fe, [
167
+ $(d.$slots, "default")
168
168
  ]),
169
- i.$slots.footer ? (s(), l("div", ce, [
170
- w(i.$slots, "footer")
169
+ d.$slots.footer ? (s(), o("div", pe, [
170
+ $(d.$slots, "footer")
171
171
  ])) : f("", !0)
172
172
  ], 2));
173
173
  }
174
- }), fe = { class: "flex items-center justify-between border-b border-gray-100 px-8 py-6" }, pe = { class: "text-xl font-semibold text-gray-900" }, ge = { class: "px-8 py-6" }, he = {
174
+ }), ge = { class: "flex items-center justify-between border-b border-gray-100 px-8 py-6" }, he = { class: "text-xl font-semibold text-gray-900" }, be = { class: "px-8 py-6" }, ve = {
175
175
  key: 0,
176
176
  class: "border-t border-gray-100 px-8 py-6 bg-gray-50"
177
- }, be = /* @__PURE__ */ T({
177
+ }, ye = /* @__PURE__ */ L({
178
178
  __name: "Dialog",
179
179
  props: {
180
180
  modelValue: { type: Boolean, default: !1 },
@@ -182,47 +182,47 @@ const se = { class: "flex items-center gap-4" }, le = {
182
182
  closeOnBackdrop: { type: Boolean, default: !0 }
183
183
  },
184
184
  emits: ["update:modelValue"],
185
- setup(e, { emit: h }) {
186
- const t = e, d = h, r = g({
187
- get: () => t.modelValue,
188
- set: (u) => d("update:modelValue", u)
189
- }), i = () => {
190
- r.value = !1;
191
- }, n = () => {
192
- t.closeOnBackdrop && i();
185
+ setup(t, { emit: y }) {
186
+ const e = t, u = y, n = g({
187
+ get: () => e.modelValue,
188
+ set: (c) => u("update:modelValue", c)
189
+ }), d = () => {
190
+ n.value = !1;
191
+ }, r = () => {
192
+ e.closeOnBackdrop && d();
193
193
  };
194
- return (u, a) => (s(), P(W, { to: "body" }, [
195
- H(K, { name: "dialog" }, {
196
- default: q(() => [
197
- r.value ? (s(), l("div", {
194
+ return (c, i) => (s(), P(X, { to: "body" }, [
195
+ G(Q, { name: "dialog" }, {
196
+ default: U(() => [
197
+ n.value ? (s(), o("div", {
198
198
  key: 0,
199
199
  class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
200
- onClick: n
200
+ onClick: r
201
201
  }, [
202
- o("div", {
202
+ a("div", {
203
203
  class: "relative w-full max-w-2xl rounded-lg bg-white shadow-xl",
204
- onClick: a[0] || (a[0] = S(() => {
204
+ onClick: i[0] || (i[0] = I(() => {
205
205
  }, ["stop"]))
206
206
  }, [
207
- o("div", fe, [
208
- o("h2", pe, [
209
- w(u.$slots, "title", {}, () => [
210
- F(x(e.title), 1)
207
+ a("div", ge, [
208
+ a("h2", he, [
209
+ $(c.$slots, "title", {}, () => [
210
+ K(C(t.title), 1)
211
211
  ], !0)
212
212
  ]),
213
- o("button", {
213
+ a("button", {
214
214
  type: "button",
215
215
  class: "inline-flex items-center justify-center rounded-md p-1 text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
216
216
  "aria-label": "Cerrar diálogo",
217
- onClick: i
218
- }, [...a[1] || (a[1] = [
219
- o("svg", {
217
+ onClick: d
218
+ }, [...i[1] || (i[1] = [
219
+ a("svg", {
220
220
  class: "h-6 w-6",
221
221
  fill: "none",
222
222
  stroke: "currentColor",
223
223
  viewBox: "0 0 24 24"
224
224
  }, [
225
- o("path", {
225
+ a("path", {
226
226
  "stroke-linecap": "round",
227
227
  "stroke-linejoin": "round",
228
228
  "stroke-width": "2",
@@ -231,11 +231,11 @@ const se = { class: "flex items-center gap-4" }, le = {
231
231
  ], -1)
232
232
  ])])
233
233
  ]),
234
- o("div", ge, [
235
- w(u.$slots, "default", {}, void 0, !0)
234
+ a("div", be, [
235
+ $(c.$slots, "default", {}, void 0, !0)
236
236
  ]),
237
- u.$slots.footer ? (s(), l("div", he, [
238
- w(u.$slots, "footer", {}, void 0, !0)
237
+ c.$slots.footer ? (s(), o("div", ve, [
238
+ $(c.$slots, "footer", {}, void 0, !0)
239
239
  ])) : f("", !0)
240
240
  ])
241
241
  ])) : f("", !0)
@@ -244,19 +244,19 @@ const se = { class: "flex items-center gap-4" }, le = {
244
244
  })
245
245
  ]));
246
246
  }
247
- }), Nt = /* @__PURE__ */ A(be, [["__scopeId", "data-v-091e8739"]]), ve = ["accept", "multiple", "disabled"], xe = { class: "flex flex-col items-center justify-center gap-4 text-center" }, ye = { class: "w-32 h-32 flex items-center justify-center" }, me = ["src", "alt"], ke = {
247
+ }), Wt = /* @__PURE__ */ R(ye, [["__scopeId", "data-v-091e8739"]]), xe = ["accept", "multiple", "disabled"], me = { class: "flex flex-col items-center justify-center gap-4 text-center" }, ke = { class: "w-32 h-32 flex items-center justify-center" }, we = ["src", "alt"], $e = {
248
248
  key: 1,
249
249
  class: "w-full h-full text-gray-400",
250
250
  fill: "none",
251
251
  stroke: "currentColor",
252
252
  viewBox: "0 0 24 24"
253
- }, we = { class: "text-center" }, Ce = { class: "text-base font-medium text-gray-700" }, $e = { class: "text-primary-700" }, _e = { class: "flex items-center gap-3 flex-1 min-w-0" }, Be = { class: "flex-1 min-w-0" }, Te = { class: "text-sm font-medium text-gray-900 truncate" }, Ve = { class: "text-xs text-gray-500" }, je = {
253
+ }, Ce = { class: "text-center" }, Be = { class: "text-base font-medium text-gray-700" }, _e = { class: "text-primary-700" }, Te = { class: "flex items-center gap-3 flex-1 min-w-0" }, Me = { class: "flex-1 min-w-0" }, ze = { class: "text-sm font-medium text-gray-900 truncate" }, Ve = { class: "text-xs text-gray-500" }, je = {
254
254
  key: 1,
255
255
  class: "text-xs text-gray-500 mt-2"
256
- }, ze = {
256
+ }, Le = {
257
257
  key: 2,
258
258
  class: "text-sm text-danger-500 mt-2"
259
- }, qt = /* @__PURE__ */ T({
259
+ }, At = /* @__PURE__ */ L({
260
260
  __name: "FileUpload",
261
261
  props: {
262
262
  modelValue: { default: null },
@@ -271,67 +271,67 @@ const se = { class: "flex items-center gap-4" }, le = {
271
271
  maxSize: { default: void 0 }
272
272
  },
273
273
  emits: ["update:modelValue", "change", "error"],
274
- setup(e, { emit: h }) {
275
- const t = e, d = h, r = j(null), i = j(!1), n = j(t.modelValue), u = j(""), a = () => {
276
- var C;
277
- (C = r.value) == null || C.click();
278
- }, b = () => {
279
- t.disabled || a();
280
- }, v = (C) => {
281
- t.disabled || (i.value = !0);
282
- }, V = () => {
283
- i.value = !1;
284
- }, z = (C) => {
285
- if (u.value = "", t.maxSize && C.size > t.maxSize) {
286
- const m = (t.maxSize / 1048576).toFixed(2);
287
- return u.value = `El archivo excede el tamaño máximo de ${m}MB`, d("error", u.value), !1;
274
+ setup(t, { emit: y }) {
275
+ const e = t, u = y, n = V(null), d = V(!1), r = V(e.modelValue), c = V(""), i = () => {
276
+ var B;
277
+ (B = n.value) == null || B.click();
278
+ }, x = () => {
279
+ e.disabled || i();
280
+ }, m = (B) => {
281
+ e.disabled || (d.value = !0);
282
+ }, j = () => {
283
+ d.value = !1;
284
+ }, D = (B) => {
285
+ if (c.value = "", e.maxSize && B.size > e.maxSize) {
286
+ const b = (e.maxSize / 1048576).toFixed(2);
287
+ return c.value = `El archivo excede el tamaño máximo de ${b}MB`, u("error", c.value), !1;
288
288
  }
289
289
  return !0;
290
- }, $ = (C) => {
291
- var B;
292
- const _ = (B = C.target.files) == null ? void 0 : B[0];
293
- _ && z(_) && (n.value = _, d("update:modelValue", _), d("change", _));
294
- }, M = (C) => {
295
- var _;
296
- i.value = !1;
297
- const m = (_ = C.dataTransfer) == null ? void 0 : _.files[0];
298
- m && z(m) && (n.value = m, d("update:modelValue", m), d("change", m));
299
- }, N = () => {
300
- n.value = null, u.value = "", r.value && (r.value.value = ""), d("update:modelValue", null), d("change", null);
301
- }, E = (C) => {
302
- if (C === 0) return "0 Bytes";
303
- const m = 1024, _ = ["Bytes", "KB", "MB", "GB"], B = Math.floor(Math.log(C) / Math.log(m));
304
- return Math.round(C / Math.pow(m, B) * 100) / 100 + " " + _[B];
290
+ }, _ = (B) => {
291
+ var S;
292
+ const T = (S = B.target.files) == null ? void 0 : S[0];
293
+ T && D(T) && (r.value = T, u("update:modelValue", T), u("change", T));
294
+ }, O = (B) => {
295
+ var T;
296
+ d.value = !1;
297
+ const b = (T = B.dataTransfer) == null ? void 0 : T.files[0];
298
+ b && D(b) && (r.value = b, u("update:modelValue", b), u("change", b));
299
+ }, H = () => {
300
+ r.value = null, c.value = "", n.value && (n.value.value = ""), u("update:modelValue", null), u("change", null);
301
+ }, F = (B) => {
302
+ if (B === 0) return "0 Bytes";
303
+ const b = 1024, T = ["Bytes", "KB", "MB", "GB"], S = Math.floor(Math.log(B) / Math.log(b));
304
+ return Math.round(B / Math.pow(b, S) * 100) / 100 + " " + T[S];
305
305
  };
306
- return (C, m) => (s(), l("div", {
307
- class: k(["relative border-2 border-dashed rounded-lg p-8 transition-colors", [
308
- i.value ? "border-primary-700 bg-primary-50" : "border-gray-300 bg-white hover:border-primary-500",
309
- e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
306
+ return (B, b) => (s(), o("div", {
307
+ class: v(["relative border-2 border-dashed rounded-lg p-8 transition-colors", [
308
+ d.value ? "border-primary-700 bg-primary-50" : "border-gray-300 bg-white hover:border-primary-500",
309
+ t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
310
310
  ]]),
311
- onClick: b,
312
- onDragover: S(v, ["prevent"]),
313
- onDragleave: S(V, ["prevent"]),
314
- onDrop: S(M, ["prevent"])
311
+ onClick: x,
312
+ onDragover: I(m, ["prevent"]),
313
+ onDragleave: I(j, ["prevent"]),
314
+ onDrop: I(O, ["prevent"])
315
315
  }, [
316
- o("input", {
316
+ a("input", {
317
317
  ref_key: "fileInput",
318
- ref: r,
318
+ ref: n,
319
319
  type: "file",
320
- accept: e.accept,
321
- multiple: e.multiple,
322
- disabled: e.disabled,
320
+ accept: t.accept,
321
+ multiple: t.multiple,
322
+ disabled: t.disabled,
323
323
  class: "hidden",
324
- onChange: $
325
- }, null, 40, ve),
326
- o("div", xe, [
327
- o("div", ye, [
328
- e.illustration ? (s(), l("img", {
324
+ onChange: _
325
+ }, null, 40, xe),
326
+ a("div", me, [
327
+ a("div", ke, [
328
+ t.illustration ? (s(), o("img", {
329
329
  key: 0,
330
- src: e.illustration,
331
- alt: e.illustrationAlt,
330
+ src: t.illustration,
331
+ alt: t.illustrationAlt,
332
332
  class: "max-w-full max-h-full object-contain"
333
- }, null, 8, me)) : (s(), l("svg", ke, [...m[1] || (m[1] = [
334
- o("path", {
333
+ }, null, 8, we)) : (s(), o("svg", $e, [...b[1] || (b[1] = [
334
+ a("path", {
335
335
  "stroke-linecap": "round",
336
336
  "stroke-linejoin": "round",
337
337
  "stroke-width": "1.5",
@@ -339,48 +339,48 @@ const se = { class: "flex items-center gap-4" }, le = {
339
339
  }, null, -1)
340
340
  ])]))
341
341
  ]),
342
- o("div", we, [
343
- o("p", Ce, [
344
- F(x(e.mainText) + " ", 1),
345
- o("span", $e, x(e.linkText), 1)
342
+ a("div", Ce, [
343
+ a("p", Be, [
344
+ K(C(t.mainText) + " ", 1),
345
+ a("span", _e, C(t.linkText), 1)
346
346
  ])
347
347
  ]),
348
- n.value ? (s(), l("div", {
348
+ r.value ? (s(), o("div", {
349
349
  key: 0,
350
350
  class: "w-full max-w-md bg-gray-50 rounded-lg p-4 flex items-center justify-between",
351
- onClick: m[0] || (m[0] = S(() => {
351
+ onClick: b[0] || (b[0] = I(() => {
352
352
  }, ["stop"]))
353
353
  }, [
354
- o("div", _e, [
355
- m[2] || (m[2] = o("svg", {
354
+ a("div", Te, [
355
+ b[2] || (b[2] = a("svg", {
356
356
  class: "w-6 h-6 text-gray-600 flex-shrink-0",
357
357
  fill: "none",
358
358
  stroke: "currentColor",
359
359
  viewBox: "0 0 24 24"
360
360
  }, [
361
- o("path", {
361
+ a("path", {
362
362
  "stroke-linecap": "round",
363
363
  "stroke-linejoin": "round",
364
364
  "stroke-width": "2",
365
365
  d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
366
366
  })
367
367
  ], -1)),
368
- o("div", Be, [
369
- o("p", Te, x(n.value.name), 1),
370
- o("p", Ve, x(E(n.value.size)), 1)
368
+ a("div", Me, [
369
+ a("p", ze, C(r.value.name), 1),
370
+ a("p", Ve, C(F(r.value.size)), 1)
371
371
  ])
372
372
  ]),
373
- e.disabled ? f("", !0) : (s(), l("button", {
373
+ t.disabled ? f("", !0) : (s(), o("button", {
374
374
  key: 0,
375
- onClick: S(N, ["stop"]),
375
+ onClick: I(H, ["stop"]),
376
376
  class: "ml-3 text-gray-400 hover:text-danger-500 transition-colors"
377
- }, [...m[3] || (m[3] = [
378
- o("svg", {
377
+ }, [...b[3] || (b[3] = [
378
+ a("svg", {
379
379
  class: "w-5 h-5",
380
380
  fill: "currentColor",
381
381
  viewBox: "0 0 20 20"
382
382
  }, [
383
- o("path", {
383
+ a("path", {
384
384
  "fill-rule": "evenodd",
385
385
  d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
386
386
  "clip-rule": "evenodd"
@@ -388,15 +388,15 @@ const se = { class: "flex items-center gap-4" }, le = {
388
388
  ], -1)
389
389
  ])]))
390
390
  ])) : f("", !0),
391
- e.helperText ? (s(), l("p", je, x(e.helperText), 1)) : f("", !0),
392
- u.value ? (s(), l("p", ze, x(u.value), 1)) : f("", !0)
391
+ t.helperText ? (s(), o("p", je, C(t.helperText), 1)) : f("", !0),
392
+ c.value ? (s(), o("p", Le, C(c.value), 1)) : f("", !0)
393
393
  ])
394
394
  ], 34));
395
395
  }
396
- }), Me = ["stroke-width"], Se = {
396
+ }), Se = ["stroke-width"], De = {
397
397
  class: "w-full h-full rounded-lg overflow-hidden",
398
398
  style: { "background-color": "#f7f7f7" }
399
- }, Le = /* @__PURE__ */ T({
399
+ }, Oe = /* @__PURE__ */ L({
400
400
  __name: "Loader",
401
401
  props: {
402
402
  type: { default: "circular" },
@@ -406,128 +406,351 @@ const se = { class: "flex items-center gap-4" }, le = {
406
406
  strokeWidth: { default: 4 },
407
407
  progress: { default: void 0 }
408
408
  },
409
- setup(e) {
410
- const h = e, t = {
409
+ setup(t) {
410
+ const y = t, e = {
411
411
  primary: "text-primary-700",
412
412
  secondary: "text-secondary-500",
413
413
  success: "text-success-500",
414
414
  warning: "text-warning-500",
415
415
  danger: "text-danger-500",
416
416
  info: "text-info-500"
417
- }, d = {
417
+ }, u = {
418
418
  primary: "bg-primary-700",
419
419
  secondary: "bg-secondary-500",
420
420
  success: "bg-success-500",
421
421
  warning: "bg-warning-500",
422
422
  danger: "bg-danger-500",
423
423
  info: "bg-info-500"
424
- }, r = g(() => [t[h.color]]), i = g(() => [d[h.color]]);
425
- return (n, u) => e.type === "circular" ? (s(), l("div", {
424
+ }, n = g(() => [e[y.color]]), d = g(() => [u[y.color]]);
425
+ return (r, c) => t.type === "circular" ? (s(), o("div", {
426
426
  key: 0,
427
- class: k(r.value)
427
+ class: v(n.value)
428
428
  }, [
429
- (s(), l("svg", {
429
+ (s(), o("svg", {
430
430
  class: "animate-spin",
431
- style: I({ width: e.size, height: e.size }),
431
+ style: W({ width: t.size, height: t.size }),
432
432
  viewBox: "0 0 24 24"
433
433
  }, [
434
- o("circle", {
434
+ a("circle", {
435
435
  class: "opacity-25",
436
436
  cx: "12",
437
437
  cy: "12",
438
438
  r: "10",
439
439
  stroke: "currentColor",
440
- "stroke-width": e.strokeWidth,
440
+ "stroke-width": t.strokeWidth,
441
441
  fill: "none"
442
- }, null, 8, Me),
443
- u[0] || (u[0] = o("path", {
442
+ }, null, 8, Se),
443
+ c[0] || (c[0] = a("path", {
444
444
  class: "opacity-75",
445
445
  fill: "currentColor",
446
446
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
447
447
  }, null, -1))
448
448
  ], 4))
449
- ], 2)) : e.type === "linear" ? (s(), l("div", {
449
+ ], 2)) : t.type === "linear" ? (s(), o("div", {
450
450
  key: 1,
451
451
  class: "w-full",
452
- style: I({ height: e.height })
452
+ style: W({ height: t.height })
453
453
  }, [
454
- o("div", Se, [
455
- o("div", {
456
- class: k([i.value, "h-full rounded-lg animate-linear-loader"]),
457
- style: I({ width: e.progress ? `${e.progress}%` : void 0 })
454
+ a("div", De, [
455
+ a("div", {
456
+ class: v([d.value, "h-full rounded-lg animate-linear-loader"]),
457
+ style: W({ width: t.progress ? `${t.progress}%` : void 0 })
458
458
  }, null, 6)
459
459
  ])
460
460
  ], 4)) : f("", !0);
461
461
  }
462
- }), Et = /* @__PURE__ */ A(Le, [["__scopeId", "data-v-8df4ec38"]]), De = ["for"], Ie = {
462
+ }), Kt = /* @__PURE__ */ R(Oe, [["__scopeId", "data-v-8df4ec38"]]), Ie = ["disabled", "aria-expanded"], Ee = ["disabled", "onClick"], He = {
463
463
  key: 0,
464
- class: "text-danger-600"
465
- }, Oe = { class: "relative" }, Fe = ["id", "disabled", "aria-expanded"], Ae = {
464
+ class: "flex-shrink-0"
465
+ }, Fe = ["innerHTML"], We = { class: "flex-1 min-w-0 mr-2" }, Ae = { class: "flex flex-col items-start" }, Ke = ["title"], Re = ["title"], Ne = {
466
+ key: 1,
467
+ class: "flex-shrink-0"
468
+ }, qe = {
466
469
  key: 0,
467
- class: "flex items-center gap-3 flex-1"
468
- }, Ne = {
470
+ class: "text-xs text-secondary-400 font-mono whitespace-nowrap"
471
+ }, Pe = { key: 1 }, Ue = {
472
+ key: 2,
473
+ class: "w-4 h-4 ml-2 flex-shrink-0",
474
+ fill: "none",
475
+ stroke: "currentColor",
476
+ viewBox: "0 0 24 24"
477
+ }, Ge = /* @__PURE__ */ L({
478
+ __name: "Menu",
479
+ props: {
480
+ items: { default: () => [] },
481
+ triggerText: { default: "Menu" },
482
+ showChevron: { type: Boolean, default: !0 },
483
+ position: { default: "bottom-start" },
484
+ align: { default: "start" },
485
+ offset: { default: () => ({ x: 0, y: 4 }) },
486
+ width: { default: "auto" },
487
+ maxHeight: { default: "400px" },
488
+ closeOnClick: { type: Boolean, default: !0 },
489
+ disabled: { type: Boolean, default: !1 },
490
+ fullWidth: { type: Boolean, default: !1 },
491
+ overlay: { type: Boolean, default: !1 },
492
+ teleport: { type: Boolean, default: !0 },
493
+ zIndex: { default: 50 }
494
+ },
495
+ emits: ["open", "close", "select"],
496
+ setup(t, { emit: y }) {
497
+ const e = t, u = y, n = V(!1), d = V(null), r = V(null), c = V({}), i = g(() => [
498
+ "inline-flex items-center justify-center px-4 py-2 text-sm font-medium",
499
+ "bg-white border border-secondary-300 rounded-md",
500
+ "hover:bg-secondary-50 focus:outline-none focus:ring-2 focus:ring-primary-500",
501
+ "disabled:opacity-50 disabled:cursor-not-allowed",
502
+ "transition-colors"
503
+ ].join(" ")), x = g(() => [...[
504
+ "fixed bg-white rounded-lg shadow-lg border border-secondary-200",
505
+ "flex flex-col",
506
+ "focus:outline-none"
507
+ ], `z-${e.zIndex}`].join(" ")), m = g(() => "px-4 py-3 border-b border-secondary-200 bg-secondary-50"), j = g(() => "px-4 py-3 border-t border-secondary-200 bg-secondary-50"), D = g(() => "py-1 overflow-y-auto flex-1 min-h-0"), _ = g(() => "my-1 border-t border-secondary-200"), O = g(() => "px-4 py-2 text-xs font-semibold text-secondary-500 uppercase tracking-wider"), H = (l) => {
508
+ const w = [
509
+ "w-full flex items-center gap-3 px-4 py-2 text-sm text-left",
510
+ "transition-colors focus:outline-none",
511
+ "disabled:opacity-50 disabled:cursor-not-allowed"
512
+ ], p = l.variant || "default", N = {
513
+ default: "text-secondary-700 hover:bg-secondary-50 focus:bg-secondary-50",
514
+ danger: "text-danger-600 hover:bg-danger-50 focus:bg-danger-50",
515
+ success: "text-success-600 hover:bg-success-50 focus:bg-success-50",
516
+ warning: "text-warning-600 hover:bg-warning-50 focus:bg-warning-50"
517
+ };
518
+ return [...w, N[p]].join(" ");
519
+ }, F = () => {
520
+ e.disabled || (n.value ? b() : B());
521
+ }, B = () => {
522
+ n.value = !0, u("open"), J(() => {
523
+ k(), document.addEventListener("click", S), document.addEventListener("keydown", q);
524
+ });
525
+ }, b = () => {
526
+ n.value = !1, u("close"), document.removeEventListener("click", S), document.removeEventListener("keydown", q);
527
+ }, T = (l) => {
528
+ l.disabled || (l.action && l.action(), u("select", l), e.closeOnClick && !l.children && b());
529
+ }, S = (l) => {
530
+ const w = l.target;
531
+ d.value && !d.value.contains(w) && r.value && !r.value.contains(w) && b();
532
+ }, q = (l) => {
533
+ l.key === "Escape" && b();
534
+ }, h = (l) => {
535
+ (l.key === "Enter" || l.key === " ") && (l.preventDefault(), F());
536
+ }, k = () => {
537
+ if (!d.value || !r.value) return;
538
+ const l = d.value.getBoundingClientRect(), w = r.value.getBoundingClientRect(), p = window.innerWidth, N = window.innerHeight;
539
+ let M = 0, z = 0;
540
+ switch (e.position) {
541
+ case "bottom-start":
542
+ M = l.bottom + e.offset.y, z = l.left + e.offset.x;
543
+ break;
544
+ case "bottom-end":
545
+ M = l.bottom + e.offset.y, z = l.right - w.width + e.offset.x;
546
+ break;
547
+ case "top-start":
548
+ M = l.top - w.height - e.offset.y, z = l.left + e.offset.x;
549
+ break;
550
+ case "top-end":
551
+ M = l.top - w.height - e.offset.y, z = l.right - w.width + e.offset.x;
552
+ break;
553
+ case "right-start":
554
+ M = l.top + e.offset.y, z = l.right + e.offset.x;
555
+ break;
556
+ case "right-end":
557
+ M = l.bottom - w.height + e.offset.y, z = l.right + e.offset.x;
558
+ break;
559
+ case "left-start":
560
+ M = l.top + e.offset.y, z = l.left - w.width - e.offset.x;
561
+ break;
562
+ case "left-end":
563
+ M = l.bottom - w.height + e.offset.y, z = l.left - w.width - e.offset.x;
564
+ break;
565
+ }
566
+ z + w.width > p && (z = p - w.width - 8), z < 8 && (z = 8), M + w.height > N && (M = N - w.height - 8), M < 8 && (M = 8), c.value = {
567
+ top: `${M}px`,
568
+ left: `${z}px`,
569
+ width: e.width === "auto" ? `${Math.max(l.width, 240)}px` : e.width,
570
+ maxHeight: e.maxHeight,
571
+ minWidth: "240px"
572
+ };
573
+ };
574
+ return ee(() => {
575
+ window.addEventListener("scroll", k, !0), window.addEventListener("resize", k);
576
+ }), te(() => {
577
+ window.removeEventListener("scroll", k, !0), window.removeEventListener("resize", k), document.removeEventListener("click", S), document.removeEventListener("keydown", q);
578
+ }), Y(() => e.items, () => {
579
+ n.value && J(k);
580
+ }, { deep: !0 }), (l, w) => (s(), o("div", {
581
+ class: v(["menu-wrapper", { "w-full": t.fullWidth }])
582
+ }, [
583
+ a("div", {
584
+ ref_key: "triggerRef",
585
+ ref: d
586
+ }, [
587
+ $(l.$slots, "trigger", {
588
+ isOpen: n.value,
589
+ toggle: F
590
+ }, () => [
591
+ a("button", {
592
+ type: "button",
593
+ class: v(i.value),
594
+ disabled: t.disabled,
595
+ onClick: F,
596
+ onKeydown: h,
597
+ tabindex: 0,
598
+ role: "button",
599
+ "aria-expanded": n.value,
600
+ "aria-haspopup": !0
601
+ }, [
602
+ $(l.$slots, "trigger-content", {}, () => [
603
+ K(C(t.triggerText), 1)
604
+ ], !0),
605
+ t.showChevron ? (s(), o("svg", {
606
+ key: 0,
607
+ class: v(["w-4 h-4 ml-2 transition-transform", n.value ? "rotate-180" : ""]),
608
+ fill: "none",
609
+ stroke: "currentColor",
610
+ viewBox: "0 0 24 24"
611
+ }, [...w[1] || (w[1] = [
612
+ a("path", {
613
+ "stroke-linecap": "round",
614
+ "stroke-linejoin": "round",
615
+ "stroke-width": "2",
616
+ d: "M19 9l-7 7-7-7"
617
+ }, null, -1)
618
+ ])], 2)) : f("", !0)
619
+ ], 42, Ie)
620
+ ], !0)
621
+ ], 512),
622
+ (s(), P(X, { to: "body" }, [
623
+ n.value ? (s(), o("div", {
624
+ key: 0,
625
+ ref_key: "menuRef",
626
+ ref: r,
627
+ class: v(x.value),
628
+ style: W(c.value),
629
+ onClick: w[0] || (w[0] = I(() => {
630
+ }, ["stop"]))
631
+ }, [
632
+ l.$slots.header ? (s(), o("div", {
633
+ key: 0,
634
+ class: v(m.value)
635
+ }, [
636
+ $(l.$slots, "header", { close: b }, void 0, !0)
637
+ ], 2)) : f("", !0),
638
+ a("div", {
639
+ class: v(D.value)
640
+ }, [
641
+ $(l.$slots, "default", {
642
+ close: b,
643
+ isOpen: n.value
644
+ }, () => [
645
+ (s(!0), o(E, null, A(t.items, (p, N) => (s(), o(E, {
646
+ key: p.id || N
647
+ }, [
648
+ p.type === "divider" ? (s(), o("div", {
649
+ key: 0,
650
+ class: v(_.value)
651
+ }, null, 2)) : p.type === "header" ? (s(), o("div", {
652
+ key: 1,
653
+ class: v(O.value)
654
+ }, C(p.label), 3)) : (s(), o("button", {
655
+ key: 2,
656
+ type: "button",
657
+ class: v(H(p)),
658
+ disabled: p.disabled,
659
+ onClick: (M) => T(p)
660
+ }, [
661
+ p.icon || l.$slots[`icon-${p.id}`] ? (s(), o("span", He, [
662
+ $(l.$slots, `icon-${p.id}`, { item: p }, () => [
663
+ typeof p.icon != "string" ? (s(), P(Z(p.icon), {
664
+ key: 0,
665
+ class: "w-5 h-5"
666
+ })) : (s(), o("span", {
667
+ key: 1,
668
+ innerHTML: p.icon,
669
+ class: "w-5 h-5 inline-block"
670
+ }, null, 8, Fe))
671
+ ], !0)
672
+ ])) : f("", !0),
673
+ a("div", We, [
674
+ $(l.$slots, `item-${p.id}`, {
675
+ item: p,
676
+ close: b
677
+ }, () => [
678
+ a("div", Ae, [
679
+ a("span", {
680
+ class: "truncate w-full",
681
+ title: p.label
682
+ }, C(p.label), 9, Ke),
683
+ p.description ? (s(), o("span", {
684
+ key: 0,
685
+ class: "text-xs text-secondary-500 truncate w-full",
686
+ title: p.description
687
+ }, C(p.description), 9, Re)) : f("", !0)
688
+ ])
689
+ ], !0)
690
+ ]),
691
+ p.suffix || p.shortcut || l.$slots[`suffix-${p.id}`] ? (s(), o("span", Ne, [
692
+ $(l.$slots, `suffix-${p.id}`, { item: p }, () => [
693
+ p.shortcut ? (s(), o("span", qe, C(p.shortcut), 1)) : p.suffix ? (s(), o("span", Pe, C(p.suffix), 1)) : f("", !0)
694
+ ], !0)
695
+ ])) : f("", !0),
696
+ p.children && p.children.length > 0 ? (s(), o("svg", Ue, [...w[2] || (w[2] = [
697
+ a("path", {
698
+ "stroke-linecap": "round",
699
+ "stroke-linejoin": "round",
700
+ "stroke-width": "2",
701
+ d: "M9 5l7 7-7 7"
702
+ }, null, -1)
703
+ ])])) : f("", !0)
704
+ ], 10, Ee))
705
+ ], 64))), 128))
706
+ ], !0)
707
+ ], 2),
708
+ l.$slots.footer ? (s(), o("div", {
709
+ key: 1,
710
+ class: v(j.value)
711
+ }, [
712
+ $(l.$slots, "footer", { close: b }, void 0, !0)
713
+ ], 2)) : f("", !0)
714
+ ], 6)) : f("", !0),
715
+ n.value && t.overlay ? (s(), o("div", {
716
+ key: 1,
717
+ class: "fixed inset-0 bg-black/20 z-40",
718
+ onClick: b
719
+ })) : f("", !0)
720
+ ]))
721
+ ], 2));
722
+ }
723
+ }), Rt = /* @__PURE__ */ R(Ge, [["__scopeId", "data-v-e155a86b"]]), Qe = ["for"], Je = {
469
724
  key: 0,
470
- class: "w-8 h-8 rounded-full overflow-hidden bg-primary-50 flex-shrink-0"
471
- }, qe = ["src", "alt"], Ee = {
472
- key: 1,
473
- class: "w-8 h-8 rounded-full bg-primary-700 flex items-center justify-center flex-shrink-0 font-bold text-white text-sm"
474
- }, He = { class: "flex flex-col items-start flex-1 min-w-0" }, Ke = {
475
- key: 1,
476
- class: "flex-1 text-left truncate"
477
- }, Pe = {
725
+ class: "text-danger-600"
726
+ }, Xe = { class: "relative" }, Ye = ["id", "disabled", "aria-expanded"], Ze = { class: "flex-1 text-left truncate" }, et = {
478
727
  key: 0,
479
728
  class: "p-2 border-b border-secondary-200"
480
- }, We = ["placeholder"], Ue = { class: "max-h-64 overflow-y-auto" }, Ge = {
729
+ }, tt = ["placeholder"], st = { class: "max-h-64 overflow-y-auto" }, ot = {
481
730
  key: 0,
482
731
  class: "px-4 py-3 text-sm text-secondary-500 text-center"
483
- }, Qe = ["onClick"], Je = {
484
- key: 0,
485
- class: "flex items-center gap-3 w-full"
486
- }, Re = {
487
- key: 0,
488
- class: "w-10 h-10 rounded-full overflow-hidden bg-primary-50 flex-shrink-0"
489
- }, Xe = ["src", "alt"], Ye = {
490
- key: 1,
491
- class: "w-10 h-10 rounded-full bg-primary-700 flex items-center justify-center flex-shrink-0 font-bold text-white"
492
- }, Ze = { class: "flex flex-col items-start flex-1 min-w-0" }, et = { class: "text-sm font-semibold text-secondary-900 truncate w-full" }, tt = {
493
- key: 0,
494
- class: "text-xs text-secondary-600 truncate w-full"
495
- }, st = {
496
- key: 1,
497
- class: "text-xs text-secondary-500 truncate w-full"
498
- }, lt = {
499
- key: 2,
500
- class: "w-5 h-5 text-primary-600 flex-shrink-0",
501
- fill: "none",
502
- stroke: "currentColor",
503
- viewBox: "0 0 24 24",
504
- xmlns: "http://www.w3.org/2000/svg"
505
- }, ot = {
506
- key: 1,
507
- class: "flex items-center justify-between w-full"
508
- }, at = { class: "truncate" }, nt = {
732
+ }, lt = ["onClick"], at = { class: "flex items-center justify-between w-full" }, nt = { class: "truncate" }, rt = {
509
733
  key: 0,
510
734
  class: "w-5 h-5 text-primary-600 flex-shrink-0 ml-2",
511
735
  fill: "none",
512
736
  stroke: "currentColor",
513
737
  viewBox: "0 0 24 24",
514
738
  xmlns: "http://www.w3.org/2000/svg"
515
- }, rt = {
739
+ }, it = {
516
740
  key: 0,
517
741
  class: "border-t border-secondary-200 my-1"
518
- }, it = ["onClick"], dt = ["innerHTML"], ut = {
742
+ }, dt = ["onClick"], ut = ["innerHTML"], ct = {
519
743
  key: 1,
520
744
  class: "mt-1 text-sm text-danger-600"
521
- }, ct = {
745
+ }, ft = {
522
746
  key: 2,
523
747
  class: "mt-1 text-sm text-secondary-600"
524
- }, ft = /* @__PURE__ */ T({
748
+ }, pt = /* @__PURE__ */ L({
525
749
  __name: "Select",
526
750
  props: {
527
751
  modelValue: { default: null },
528
752
  options: { default: () => [] },
529
753
  actionItems: { default: () => [] },
530
- mode: { default: "normal" },
531
754
  label: { default: "" },
532
755
  placeholder: { default: "Seleccionar..." },
533
756
  size: { default: "md" },
@@ -543,208 +766,167 @@ const se = { class: "flex items-center gap-4" }, le = {
543
766
  menuPosition: { default: "bottom" }
544
767
  },
545
768
  emits: ["update:modelValue", "change", "action"],
546
- setup(e, { emit: h }) {
547
- const t = e, d = h, r = j(!1), i = j(""), n = j(null), u = g(
769
+ setup(t, { emit: y }) {
770
+ const e = t, u = y, n = V(!1), d = V(""), r = V(null), c = g(
548
771
  () => `select-${Math.random().toString(36).substr(2, 9)}`
549
- ), a = g(() => t.options.find((c) => c.value === t.modelValue) || null), b = g(() => {
550
- if (!t.searchable || !i.value)
551
- return t.options;
552
- const c = i.value.toLowerCase();
553
- return t.options.filter((y) => {
554
- var p, D;
555
- return y.label.toLowerCase().includes(c) || ((p = y.subtitle) == null ? void 0 : p.toLowerCase().includes(c)) || ((D = y.description) == null ? void 0 : D.toLowerCase().includes(c));
556
- });
557
- }), v = g(() => "block text-sm font-semibold text-secondary-700 mb-1"), V = g(() => {
558
- const c = "w-full flex items-center justify-between gap-2 border rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 disabled:opacity-50 disabled:cursor-not-allowed", y = {
772
+ ), i = g(() => e.options.find((h) => h.value === e.modelValue) || null), x = g(() => {
773
+ if (!e.searchable || !d.value)
774
+ return e.options;
775
+ const h = d.value.toLowerCase();
776
+ return e.options.filter((k) => k.label.toLowerCase().includes(h));
777
+ }), m = g(() => "block text-sm font-semibold text-secondary-700 mb-1"), j = g(() => {
778
+ const h = "w-full flex items-center justify-between gap-2 border rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 disabled:opacity-50 disabled:cursor-not-allowed", k = {
559
779
  sm: "px-3 py-1.5 text-sm",
560
780
  md: "px-4 py-2 text-base",
561
781
  lg: "px-5 py-3 text-lg"
562
- }, p = {
782
+ }, l = {
563
783
  default: "bg-white border-secondary-300 hover:border-secondary-400",
564
784
  outline: "bg-transparent border-secondary-300 hover:border-primary-500",
565
785
  filled: "bg-secondary-100 border-transparent hover:bg-secondary-200"
566
- }, D = t.mode === "menu" ? "bg-primary-700 border-primary-700 hover:bg-primary-600" : "", R = t.error ? "border-danger-600 focus:ring-danger-500" : "";
786
+ }, w = e.error ? "border-danger-600 focus:ring-danger-500" : "";
567
787
  return [
568
- c,
569
- y[t.size],
570
- D || p[t.variant],
571
- R
788
+ h,
789
+ k[e.size],
790
+ l[e.variant],
791
+ w
572
792
  ].join(" ");
573
- }), z = g(() => t.mode === "menu" ? "text-white" : "text-secondary-900"), $ = g(() => t.mode === "menu" ? "text-primary-100" : "text-secondary-600"), M = g(() => t.mode === "menu" ? "text-white" : "text-secondary-600"), N = g(() => `absolute ${t.menuPosition === "top" ? "bottom-full mb-1" : "top-full mt-1"} left-0 right-0 bg-white rounded-lg shadow-lg border border-secondary-200 z-50 overflow-hidden`), E = (c) => {
574
- const y = "w-full px-4 py-2 text-left hover:bg-primary-50 transition-colors focus:outline-none focus:bg-primary-50 disabled:opacity-50 disabled:cursor-not-allowed", p = m(c) ? "bg-primary-50" : "";
575
- return [y, p].join(" ");
576
- }, C = (c) => {
577
- const y = "w-full px-4 py-2 text-left text-sm font-semibold transition-colors focus:outline-none flex items-center gap-3";
578
- return c.variant === "danger" ? `${y} text-danger-600 hover:bg-danger-50 focus:bg-danger-50` : `${y} text-secondary-700 hover:bg-secondary-50 focus:bg-secondary-50`;
579
- }, m = (c) => c.value === t.modelValue, _ = () => {
580
- t.disabled || (r.value = !r.value, r.value && t.searchable && ee(() => {
581
- var c;
582
- (c = n.value) == null || c.focus();
793
+ }), D = g(() => `absolute ${e.menuPosition === "top" ? "bottom-full mb-1" : "top-full mt-1"} left-0 right-0 bg-white rounded-lg shadow-lg border border-secondary-200 z-50 overflow-hidden`), _ = (h) => {
794
+ const k = "w-full px-4 py-2 text-left hover:bg-primary-50 transition-colors focus:outline-none focus:bg-primary-50 disabled:opacity-50 disabled:cursor-not-allowed", l = H(h) ? "bg-primary-50" : "";
795
+ return [k, l].join(" ");
796
+ }, O = (h) => {
797
+ const k = "w-full px-4 py-2 text-left text-sm font-semibold transition-colors focus:outline-none flex items-center gap-3";
798
+ return h.variant === "danger" ? `${k} text-danger-600 hover:bg-danger-50 focus:bg-danger-50` : `${k} text-secondary-700 hover:bg-secondary-50 focus:bg-secondary-50`;
799
+ }, H = (h) => h.value === e.modelValue, F = () => {
800
+ e.disabled || (n.value = !n.value, n.value && e.searchable && J(() => {
801
+ var h;
802
+ (h = r.value) == null || h.focus();
583
803
  }));
584
804
  }, B = () => {
585
- r.value = !1, i.value = "";
586
- }, U = (c) => {
587
- c.disabled || (d("update:modelValue", c.value), d("change", c), B());
588
- }, G = (c) => {
589
- c.action && c.action(), d("action", c), B();
590
- }, Q = (c) => {
591
- const y = c.relatedTarget;
592
- y && y.closest(".select-wrapper") || setTimeout(() => {
805
+ n.value = !1, d.value = "";
806
+ }, b = (h) => {
807
+ h.disabled || (u("update:modelValue", h.value), u("change", h), B());
808
+ }, T = (h) => {
809
+ h.action && h.action(), u("action", h), B();
810
+ }, S = (h) => {
811
+ const k = h.relatedTarget;
812
+ k && k.closest(".select-wrapper") || setTimeout(() => {
593
813
  B();
594
814
  }, 200);
595
- }, J = (c) => {
596
- c.key === "Escape" ? B() : (c.key === "Enter" || c.key === " ") && (c.preventDefault(), _());
815
+ }, q = (h) => {
816
+ h.key === "Escape" ? B() : (h.key === "Enter" || h.key === " ") && (h.preventDefault(), F());
597
817
  };
598
- return X(r, (c) => {
599
- c && (i.value = "");
600
- }), (c, y) => (s(), l("div", {
601
- class: k(["select-wrapper", { "w-full": e.fullWidth }])
818
+ return Y(n, (h) => {
819
+ h && (d.value = "");
820
+ }), (h, k) => (s(), o("div", {
821
+ class: v(["select-wrapper", { "w-full": t.fullWidth }])
602
822
  }, [
603
- e.label ? (s(), l("label", {
823
+ t.label ? (s(), o("label", {
604
824
  key: 0,
605
- for: u.value,
606
- class: k(v.value)
825
+ for: c.value,
826
+ class: v(m.value)
607
827
  }, [
608
- F(x(e.label) + " ", 1),
609
- e.required ? (s(), l("span", Ie, "*")) : f("", !0)
610
- ], 10, De)) : f("", !0),
611
- o("div", Oe, [
612
- o("button", {
613
- id: u.value,
828
+ K(C(t.label) + " ", 1),
829
+ t.required ? (s(), o("span", Je, "*")) : f("", !0)
830
+ ], 10, Qe)) : f("", !0),
831
+ a("div", Xe, [
832
+ a("button", {
833
+ id: c.value,
614
834
  type: "button",
615
- class: k(V.value),
616
- disabled: e.disabled,
617
- "aria-expanded": r.value,
835
+ class: v(j.value),
836
+ disabled: t.disabled,
837
+ "aria-expanded": n.value,
618
838
  "aria-haspopup": !0,
619
- onClick: _,
620
- onBlur: Q,
621
- onKeydown: J
839
+ onClick: F,
840
+ onBlur: S,
841
+ onKeydown: q
622
842
  }, [
623
- e.mode === "menu" && a.value ? (s(), l("div", Ae, [
624
- a.value.avatar ? (s(), l("div", Ne, [
625
- o("img", {
626
- src: a.value.avatar,
627
- alt: a.value.label,
628
- class: "w-full h-full object-cover"
629
- }, null, 8, qe)
630
- ])) : a.value.initials ? (s(), l("div", Ee, x(a.value.initials), 1)) : f("", !0),
631
- o("div", He, [
632
- o("span", {
633
- class: k(["text-sm font-semibold truncate w-full", z.value])
634
- }, x(a.value.label), 3),
635
- a.value.subtitle ? (s(), l("span", {
636
- key: 0,
637
- class: k(["text-xs truncate w-full", $.value])
638
- }, x(a.value.subtitle), 3)) : f("", !0)
639
- ])
640
- ])) : (s(), l("span", Ke, x(a.value ? a.value.label : e.placeholder), 1)),
641
- (s(), l("svg", {
642
- class: k(["w-5 h-5 flex-shrink-0 transition-transform", [r.value ? "rotate-180" : "", M.value]]),
843
+ a("span", Ze, C(i.value ? i.value.label : t.placeholder), 1),
844
+ (s(), o("svg", {
845
+ class: v(["w-5 h-5 flex-shrink-0 transition-transform text-secondary-600", n.value ? "rotate-180" : ""]),
643
846
  fill: "none",
644
847
  stroke: "currentColor",
645
848
  viewBox: "0 0 24 24",
646
849
  xmlns: "http://www.w3.org/2000/svg"
647
- }, [...y[3] || (y[3] = [
648
- o("path", {
850
+ }, [...k[3] || (k[3] = [
851
+ a("path", {
649
852
  "stroke-linecap": "round",
650
853
  "stroke-linejoin": "round",
651
854
  "stroke-width": "2",
652
855
  d: "M19 9l-7 7-7-7"
653
856
  }, null, -1)
654
857
  ])], 2))
655
- ], 42, Fe),
656
- r.value ? (s(), l("div", {
858
+ ], 42, Ye),
859
+ n.value ? (s(), o("div", {
657
860
  key: 0,
658
- class: k(N.value),
659
- onClick: y[2] || (y[2] = S(() => {
861
+ class: v(D.value),
862
+ onClick: k[2] || (k[2] = I(() => {
660
863
  }, ["stop"]))
661
864
  }, [
662
- e.searchable ? (s(), l("div", Pe, [
663
- Y(o("input", {
865
+ t.searchable ? (s(), o("div", et, [
866
+ se(a("input", {
664
867
  ref_key: "searchInput",
665
- ref: n,
666
- "onUpdate:modelValue": y[0] || (y[0] = (p) => i.value = p),
868
+ ref: r,
869
+ "onUpdate:modelValue": k[0] || (k[0] = (l) => d.value = l),
667
870
  type: "text",
668
871
  class: "w-full px-3 py-2 text-sm border border-secondary-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500",
669
- placeholder: e.searchPlaceholder,
670
- onKeydown: y[1] || (y[1] = S(() => {
872
+ placeholder: t.searchPlaceholder,
873
+ onKeydown: k[1] || (k[1] = I(() => {
671
874
  }, ["stop"]))
672
- }, null, 40, We), [
673
- [Z, i.value]
875
+ }, null, 40, tt), [
876
+ [oe, d.value]
674
877
  ])
675
878
  ])) : f("", !0),
676
- o("div", Ue, [
677
- b.value.length === 0 ? (s(), l("div", Ge, x(e.emptyText), 1)) : (s(), l(L, { key: 1 }, [
678
- (s(!0), l(L, null, O(b.value, (p) => (s(), l("button", {
679
- key: p.value,
879
+ a("div", st, [
880
+ x.value.length === 0 ? (s(), o("div", ot, C(t.emptyText), 1)) : (s(), o(E, { key: 1 }, [
881
+ (s(!0), o(E, null, A(x.value, (l) => (s(), o("button", {
882
+ key: l.value,
680
883
  type: "button",
681
- class: k(E(p)),
682
- onClick: (D) => U(p)
884
+ class: v(_(l)),
885
+ onClick: (w) => b(l)
683
886
  }, [
684
- e.mode === "menu" ? (s(), l("div", Je, [
685
- p.avatar ? (s(), l("div", Re, [
686
- o("img", {
687
- src: p.avatar,
688
- alt: p.label,
689
- class: "w-full h-full object-cover"
690
- }, null, 8, Xe)
691
- ])) : p.initials ? (s(), l("div", Ye, x(p.initials), 1)) : f("", !0),
692
- o("div", Ze, [
693
- o("span", et, x(p.label), 1),
694
- p.subtitle ? (s(), l("span", tt, x(p.subtitle), 1)) : f("", !0),
695
- p.description ? (s(), l("span", st, x(p.description), 1)) : f("", !0)
696
- ]),
697
- m(p) ? (s(), l("svg", lt, [...y[4] || (y[4] = [
698
- o("path", {
887
+ a("div", at, [
888
+ a("span", nt, C(l.label), 1),
889
+ H(l) ? (s(), o("svg", rt, [...k[4] || (k[4] = [
890
+ a("path", {
699
891
  "stroke-linecap": "round",
700
892
  "stroke-linejoin": "round",
701
893
  "stroke-width": "2",
702
894
  d: "M5 13l4 4L19 7"
703
895
  }, null, -1)
704
896
  ])])) : f("", !0)
705
- ])) : (s(), l("div", ot, [
706
- o("span", at, x(p.label), 1),
707
- m(p) ? (s(), l("svg", nt, [...y[5] || (y[5] = [
708
- o("path", {
709
- "stroke-linecap": "round",
710
- "stroke-linejoin": "round",
711
- "stroke-width": "2",
712
- d: "M5 13l4 4L19 7"
713
- }, null, -1)
714
- ])])) : f("", !0)
715
- ]))
716
- ], 10, Qe))), 128)),
717
- e.actionItems.length > 0 ? (s(), l("div", rt)) : f("", !0),
718
- (s(!0), l(L, null, O(e.actionItems, (p) => (s(), l("button", {
719
- key: p.id,
897
+ ])
898
+ ], 10, lt))), 128)),
899
+ t.actionItems.length > 0 ? (s(), o("div", it)) : f("", !0),
900
+ (s(!0), o(E, null, A(t.actionItems, (l) => (s(), o("button", {
901
+ key: l.id,
720
902
  type: "button",
721
- class: k(C(p)),
722
- onClick: (D) => G(p)
903
+ class: v(O(l)),
904
+ onClick: (w) => T(l)
723
905
  }, [
724
- p.icon ? (s(), l("svg", {
906
+ l.icon ? (s(), o("svg", {
725
907
  key: 0,
726
908
  class: "w-4 h-4 flex-shrink-0",
727
909
  fill: "none",
728
910
  stroke: "currentColor",
729
911
  viewBox: "0 0 24 24",
730
912
  xmlns: "http://www.w3.org/2000/svg",
731
- innerHTML: p.icon
732
- }, null, 8, dt)) : f("", !0),
733
- F(" " + x(p.label), 1)
734
- ], 10, it))), 128))
913
+ innerHTML: l.icon
914
+ }, null, 8, ut)) : f("", !0),
915
+ K(" " + C(l.label), 1)
916
+ ], 10, dt))), 128))
735
917
  ], 64))
736
918
  ])
737
919
  ], 2)) : f("", !0)
738
920
  ]),
739
- e.error ? (s(), l("p", ut, x(e.error), 1)) : e.helperText ? (s(), l("p", ct, x(e.helperText), 1)) : f("", !0),
740
- r.value ? (s(), l("div", {
921
+ t.error ? (s(), o("p", ct, C(t.error), 1)) : t.helperText ? (s(), o("p", ft, C(t.helperText), 1)) : f("", !0),
922
+ n.value ? (s(), o("div", {
741
923
  key: 3,
742
924
  onClick: B,
743
925
  class: "fixed inset-0 z-40"
744
926
  })) : f("", !0)
745
927
  ], 2));
746
928
  }
747
- }), Ht = /* @__PURE__ */ A(ft, [["__scopeId", "data-v-5644cc74"]]), pt = /* @__PURE__ */ T({
929
+ }), Nt = /* @__PURE__ */ R(pt, [["__scopeId", "data-v-f016a03c"]]), gt = /* @__PURE__ */ L({
748
930
  __name: "Sidebar",
749
931
  props: {
750
932
  modelValue: { type: Boolean, default: !1 },
@@ -759,63 +941,63 @@ const se = { class: "flex items-center gap-4" }, le = {
759
941
  padding: { default: "md" }
760
942
  },
761
943
  emits: ["update:modelValue", "close", "open"],
762
- setup(e, { emit: h }) {
763
- const t = e, d = h, r = g({
764
- get: () => t.modelValue,
765
- set: ($) => d("update:modelValue", $)
766
- }), i = () => {
767
- t.persistent || (r.value = !1, d("close"));
768
- }, n = g(() => t.position === "left" ? "slide-right" : "slide-left"), u = g(() => {
769
- const $ = "fixed top-0 h-full z-50 flex flex-col", M = t.position === "left" ? "left-0" : "right-0", N = t.shadow ? t.position === "left" ? "shadow-[2px_0_8px_rgba(0,0,0,0.1)]" : "shadow-[-2px_0_8px_rgba(0,0,0,0.1)]" : "";
770
- return [$, M, N].filter(Boolean).join(" ");
771
- }), a = g(() => ({
772
- width: t.width,
773
- backgroundColor: t.backgroundColor,
774
- top: t.overlayTop,
775
- height: t.overlayTop !== "0" ? `calc(100vh - ${t.overlayTop})` : "100vh"
776
- })), b = {
944
+ setup(t, { emit: y }) {
945
+ const e = t, u = y, n = g({
946
+ get: () => e.modelValue,
947
+ set: (_) => u("update:modelValue", _)
948
+ }), d = () => {
949
+ e.persistent || (n.value = !1, u("close"));
950
+ }, r = g(() => e.position === "left" ? "slide-right" : "slide-left"), c = g(() => {
951
+ const _ = "fixed top-0 h-full z-50 flex flex-col", O = e.position === "left" ? "left-0" : "right-0", H = e.shadow ? e.position === "left" ? "shadow-[2px_0_8px_rgba(0,0,0,0.1)]" : "shadow-[-2px_0_8px_rgba(0,0,0,0.1)]" : "";
952
+ return [_, O, H].filter(Boolean).join(" ");
953
+ }), i = g(() => ({
954
+ width: e.width,
955
+ backgroundColor: e.backgroundColor,
956
+ top: e.overlayTop,
957
+ height: e.overlayTop !== "0" ? `calc(100vh - ${e.overlayTop})` : "100vh"
958
+ })), x = {
777
959
  none: "",
778
960
  sm: "p-2",
779
961
  md: "p-4",
780
962
  lg: "p-6"
781
- }, v = g(() => `flex items-center justify-between border-b border-gray-200 ${b[t.padding]}`), V = g(() => `flex-1 overflow-y-auto ${b[t.padding]}`), z = g(() => `border-t border-gray-200 ${b[t.padding]}`);
782
- return ($, M) => (s(), P(W, { to: "body" }, [
783
- H(K, { name: "fade" }, {
784
- default: q(() => [
785
- r.value && e.overlay ? (s(), l("div", {
963
+ }, m = g(() => `flex items-center justify-between border-b border-gray-200 ${x[e.padding]}`), j = g(() => `flex-1 overflow-y-auto ${x[e.padding]}`), D = g(() => `border-t border-gray-200 ${x[e.padding]}`);
964
+ return (_, O) => (s(), P(X, { to: "body" }, [
965
+ G(Q, { name: "fade" }, {
966
+ default: U(() => [
967
+ n.value && t.overlay ? (s(), o("div", {
786
968
  key: 0,
787
- onClick: i,
969
+ onClick: d,
788
970
  class: "fixed inset-0 bg-black/50 z-40",
789
- style: I({ top: e.overlayTop })
971
+ style: W({ top: t.overlayTop })
790
972
  }, null, 4)) : f("", !0)
791
973
  ]),
792
974
  _: 1
793
975
  }),
794
- H(K, { name: n.value }, {
795
- default: q(() => [
796
- r.value ? (s(), l("aside", {
976
+ G(Q, { name: r.value }, {
977
+ default: U(() => [
978
+ n.value ? (s(), o("aside", {
797
979
  key: 0,
798
- class: k(u.value),
799
- style: I(a.value)
980
+ class: v(c.value),
981
+ style: W(i.value)
800
982
  }, [
801
- $.$slots.header ? (s(), l("div", {
983
+ _.$slots.header ? (s(), o("div", {
802
984
  key: 0,
803
- class: k(v.value)
985
+ class: v(m.value)
804
986
  }, [
805
- w($.$slots, "header", {}, void 0, !0),
806
- e.closable ? (s(), l("button", {
987
+ $(_.$slots, "header", {}, void 0, !0),
988
+ t.closable ? (s(), o("button", {
807
989
  key: 0,
808
- onClick: i,
990
+ onClick: d,
809
991
  class: "p-2 hover:bg-gray-100 rounded-md transition-colors",
810
992
  "aria-label": "Cerrar menú"
811
- }, [...M[0] || (M[0] = [
812
- o("svg", {
993
+ }, [...O[0] || (O[0] = [
994
+ a("svg", {
813
995
  class: "w-5 h-5",
814
996
  fill: "none",
815
997
  stroke: "currentColor",
816
998
  viewBox: "0 0 24 24"
817
999
  }, [
818
- o("path", {
1000
+ a("path", {
819
1001
  "stroke-linecap": "round",
820
1002
  "stroke-linejoin": "round",
821
1003
  "stroke-width": "2",
@@ -824,16 +1006,16 @@ const se = { class: "flex items-center gap-4" }, le = {
824
1006
  ], -1)
825
1007
  ])])) : f("", !0)
826
1008
  ], 2)) : f("", !0),
827
- o("div", {
828
- class: k(V.value)
1009
+ a("div", {
1010
+ class: v(j.value)
829
1011
  }, [
830
- w($.$slots, "default", {}, void 0, !0)
1012
+ $(_.$slots, "default", {}, void 0, !0)
831
1013
  ], 2),
832
- $.$slots.footer ? (s(), l("div", {
1014
+ _.$slots.footer ? (s(), o("div", {
833
1015
  key: 1,
834
- class: k(z.value)
1016
+ class: v(D.value)
835
1017
  }, [
836
- w($.$slots, "footer", {}, void 0, !0)
1018
+ $(_.$slots, "footer", {}, void 0, !0)
837
1019
  ], 2)) : f("", !0)
838
1020
  ], 6)) : f("", !0)
839
1021
  ]),
@@ -841,123 +1023,123 @@ const se = { class: "flex items-center gap-4" }, le = {
841
1023
  }, 8, ["name"])
842
1024
  ]));
843
1025
  }
844
- }), Kt = /* @__PURE__ */ A(pt, [["__scopeId", "data-v-fffb0e44"]]), gt = { class: "w-full overflow-x-auto" }, ht = { class: "w-full border-collapse" }, bt = { class: "w-full" }, vt = { class: "bg-white border-b border-gray-100 w-full" }, xt = ["onClick"], yt = { class: "flex items-center gap-2" }, mt = {
1026
+ }), qt = /* @__PURE__ */ R(gt, [["__scopeId", "data-v-fffb0e44"]]), ht = { class: "w-full overflow-x-auto" }, bt = { class: "w-full border-collapse" }, vt = { class: "w-full" }, yt = { class: "bg-white border-b border-gray-100 w-full" }, xt = ["onClick"], mt = { class: "flex items-center gap-2" }, kt = {
845
1027
  key: 0,
846
1028
  class: "text-xs text-gray-400"
847
- }, kt = { key: 0 }, wt = { key: 1 }, Ct = { class: "w-full" }, $t = {
1029
+ }, wt = { key: 0 }, $t = { key: 1 }, Ct = { class: "w-full" }, Bt = {
848
1030
  key: 0,
849
1031
  class: "flex items-center justify-center py-12 text-gray-400"
850
1032
  }, _t = {
851
1033
  key: 1,
852
1034
  class: "w-full px-6 py-4 bg-white"
853
- }, Bt = /* @__PURE__ */ T({
1035
+ }, Tt = /* @__PURE__ */ L({
854
1036
  __name: "Table",
855
1037
  props: {
856
1038
  columns: {},
857
1039
  data: {}
858
1040
  },
859
- setup(e) {
860
- const h = e, t = j(null), d = j("asc"), r = (n) => {
861
- t.value === n ? d.value = d.value === "asc" ? "desc" : "asc" : (t.value = n, d.value = "asc");
862
- }, i = g(() => {
863
- if (!t.value)
864
- return h.data;
865
- const n = [...h.data];
866
- return n.sort((u, a) => {
867
- const b = u[t.value], v = a[t.value];
868
- return typeof b == "string" && typeof v == "string" ? d.value === "asc" ? b.localeCompare(v) : v.localeCompare(b) : typeof b == "number" && typeof v == "number" ? d.value === "asc" ? b - v : v - b : 0;
869
- }), n;
1041
+ setup(t) {
1042
+ const y = t, e = V(null), u = V("asc"), n = (r) => {
1043
+ e.value === r ? u.value = u.value === "asc" ? "desc" : "asc" : (e.value = r, u.value = "asc");
1044
+ }, d = g(() => {
1045
+ if (!e.value)
1046
+ return y.data;
1047
+ const r = [...y.data];
1048
+ return r.sort((c, i) => {
1049
+ const x = c[e.value], m = i[e.value];
1050
+ return typeof x == "string" && typeof m == "string" ? u.value === "asc" ? x.localeCompare(m) : m.localeCompare(x) : typeof x == "number" && typeof m == "number" ? u.value === "asc" ? x - m : m - x : 0;
1051
+ }), r;
870
1052
  });
871
- return (n, u) => (s(), l("div", gt, [
872
- o("table", ht, [
873
- o("thead", bt, [
874
- o("tr", vt, [
875
- (s(!0), l(L, null, O(e.columns, (a) => (s(), l("th", {
876
- key: a.key,
877
- style: I(a.width ? { width: a.width } : {}),
878
- class: k([
1053
+ return (r, c) => (s(), o("div", ht, [
1054
+ a("table", bt, [
1055
+ a("thead", vt, [
1056
+ a("tr", yt, [
1057
+ (s(!0), o(E, null, A(t.columns, (i) => (s(), o("th", {
1058
+ key: i.key,
1059
+ style: W(i.width ? { width: i.width } : {}),
1060
+ class: v([
879
1061
  "px-8 py-4 text-left text-base font-semibold text-gray-900 border-0",
880
- a.sortable ? "cursor-pointer hover:text-primary-700 select-none transition-colors" : ""
1062
+ i.sortable ? "cursor-pointer hover:text-primary-700 select-none transition-colors" : ""
881
1063
  ]),
882
- onClick: (b) => a.sortable && r(a.key)
1064
+ onClick: (x) => i.sortable && n(i.key)
883
1065
  }, [
884
- o("div", yt, [
885
- o("span", null, x(a.label), 1),
886
- a.sortable ? (s(), l("span", mt, [
887
- t.value !== a.key ? (s(), l("span", kt, "⇅")) : (s(), l("span", wt, x(d.value === "asc" ? "↑" : "↓"), 1))
1066
+ a("div", mt, [
1067
+ a("span", null, C(i.label), 1),
1068
+ i.sortable ? (s(), o("span", kt, [
1069
+ e.value !== i.key ? (s(), o("span", wt, "⇅")) : (s(), o("span", $t, C(u.value === "asc" ? "↑" : "↓"), 1))
888
1070
  ])) : f("", !0)
889
1071
  ])
890
1072
  ], 14, xt))), 128))
891
1073
  ])
892
1074
  ]),
893
- o("tbody", Ct, [
894
- (s(!0), l(L, null, O(i.value, (a, b) => (s(), l("tr", {
895
- key: b,
1075
+ a("tbody", Ct, [
1076
+ (s(!0), o(E, null, A(d.value, (i, x) => (s(), o("tr", {
1077
+ key: x,
896
1078
  class: "w-full hover:bg-gray-50 transition-colors"
897
1079
  }, [
898
- (s(!0), l(L, null, O(e.columns, (v) => (s(), l("td", {
899
- key: `${b}-${v.key}`,
1080
+ (s(!0), o(E, null, A(t.columns, (m) => (s(), o("td", {
1081
+ key: `${x}-${m.key}`,
900
1082
  class: "px-8 py-4 text-base text-gray-700 border-0"
901
1083
  }, [
902
- w(n.$slots, `cell-${v.key}`, {
903
- value: a[v.key],
904
- row: a
1084
+ $(r.$slots, `cell-${m.key}`, {
1085
+ value: i[m.key],
1086
+ row: i
905
1087
  }, () => [
906
- F(x(a[v.key]), 1)
1088
+ K(C(i[m.key]), 1)
907
1089
  ], !0)
908
1090
  ]))), 128))
909
1091
  ]))), 128))
910
1092
  ])
911
1093
  ]),
912
- i.value.length === 0 ? (s(), l("div", $t, [
913
- w(n.$slots, "empty", {}, () => [
914
- u[0] || (u[0] = F("No hay datos disponibles", -1))
1094
+ d.value.length === 0 ? (s(), o("div", Bt, [
1095
+ $(r.$slots, "empty", {}, () => [
1096
+ c[0] || (c[0] = K("No hay datos disponibles", -1))
915
1097
  ], !0)
916
1098
  ])) : f("", !0),
917
- n.$slots.footer ? (s(), l("div", _t, [
918
- w(n.$slots, "footer", {}, void 0, !0)
1099
+ r.$slots.footer ? (s(), o("div", _t, [
1100
+ $(r.$slots, "footer", {}, void 0, !0)
919
1101
  ])) : f("", !0)
920
1102
  ]));
921
1103
  }
922
- }), Pt = /* @__PURE__ */ A(Bt, [["__scopeId", "data-v-6b3ff0a8"]]), Tt = { class: "w-full" }, Vt = {
1104
+ }), Pt = /* @__PURE__ */ R(Tt, [["__scopeId", "data-v-6b3ff0a8"]]), Mt = { class: "w-full" }, zt = {
923
1105
  class: "flex border-b border-gray-100",
924
1106
  role: "tablist"
925
- }, jt = ["aria-selected", "onClick"], zt = { role: "tabpanel" }, Mt = "relative px-6 py-3 text-base font-semibold tracking-wide transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary-500", St = "text-primary-700 border-b-4 border-primary-700", Lt = "text-gray-600 border-b-4 border-transparent hover:text-gray-800", Wt = /* @__PURE__ */ T({
1107
+ }, Vt = ["aria-selected", "onClick"], jt = { role: "tabpanel" }, Lt = "relative px-6 py-3 text-base font-semibold tracking-wide transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary-500", St = "text-primary-700 border-b-4 border-primary-700", Dt = "text-gray-600 border-b-4 border-transparent hover:text-gray-800", Ut = /* @__PURE__ */ L({
926
1108
  __name: "Tabs",
927
1109
  props: {
928
1110
  modelValue: {},
929
1111
  tabs: {}
930
1112
  },
931
1113
  emits: ["update:modelValue"],
932
- setup(e, { emit: h }) {
933
- const t = e, d = h, r = (a) => t.modelValue === a, i = (a) => {
934
- r(a) || d("update:modelValue", a);
935
- }, n = g(() => t.modelValue), u = g(
936
- () => t.tabs.find((a) => a.value === n.value)
1114
+ setup(t, { emit: y }) {
1115
+ const e = t, u = y, n = (i) => e.modelValue === i, d = (i) => {
1116
+ n(i) || u("update:modelValue", i);
1117
+ }, r = g(() => e.modelValue), c = g(
1118
+ () => e.tabs.find((i) => i.value === r.value)
937
1119
  );
938
- return (a, b) => (s(), l("div", Tt, [
939
- o("div", Vt, [
940
- (s(!0), l(L, null, O(e.tabs, (v) => (s(), l("button", {
941
- key: v.value,
1120
+ return (i, x) => (s(), o("div", Mt, [
1121
+ a("div", zt, [
1122
+ (s(!0), o(E, null, A(t.tabs, (m) => (s(), o("button", {
1123
+ key: m.value,
942
1124
  type: "button",
943
- class: k([
944
- Mt,
945
- r(v.value) ? St : Lt
1125
+ class: v([
1126
+ Lt,
1127
+ n(m.value) ? St : Dt
946
1128
  ]),
947
- "aria-selected": r(v.value),
1129
+ "aria-selected": n(m.value),
948
1130
  role: "tab",
949
- onClick: (V) => i(v.value)
950
- }, x(v.label), 11, jt))), 128))
1131
+ onClick: (j) => d(m.value)
1132
+ }, C(m.label), 11, Vt))), 128))
951
1133
  ]),
952
- o("div", zt, [
953
- w(a.$slots, n.value, {
954
- active: n.value,
955
- tab: u.value
1134
+ a("div", jt, [
1135
+ $(i.$slots, r.value, {
1136
+ active: r.value,
1137
+ tab: c.value
956
1138
  })
957
1139
  ])
958
1140
  ]));
959
1141
  }
960
- }), Dt = "font-sans", Ut = /* @__PURE__ */ T({
1142
+ }), Ot = "font-sans", Gt = /* @__PURE__ */ L({
961
1143
  __name: "Text",
962
1144
  props: {
963
1145
  variant: { default: "body1" },
@@ -968,8 +1150,8 @@ const se = { class: "flex items-center gap-4" }, le = {
968
1150
  truncate: { type: Boolean, default: !1 },
969
1151
  weight: {}
970
1152
  },
971
- setup(e) {
972
- const h = {
1153
+ setup(t) {
1154
+ const y = {
973
1155
  h1: "text-[40px] leading-[57px] tracking-[0px] font-extrabold",
974
1156
  h2: "text-[40px] leading-[57px] tracking-[0px] font-bold",
975
1157
  h3: "text-[28px] leading-[39px] tracking-[0px] font-extrabold",
@@ -989,7 +1171,7 @@ const se = { class: "flex items-center gap-4" }, le = {
989
1171
  button3: "text-[12px] leading-[18px] tracking-[1.25px] font-bold",
990
1172
  caption: "text-[12px] leading-[18px] tracking-[0.4px] font-normal",
991
1173
  overline: "text-[10px] leading-[15px] tracking-[1.5px] font-medium"
992
- }, t = {
1174
+ }, e = {
993
1175
  h1: "h1",
994
1176
  h2: "h2",
995
1177
  h3: "h3",
@@ -1009,12 +1191,12 @@ const se = { class: "flex items-center gap-4" }, le = {
1009
1191
  button3: "span",
1010
1192
  caption: "span",
1011
1193
  overline: "span"
1012
- }, d = {
1194
+ }, u = {
1013
1195
  left: "text-left",
1014
1196
  center: "text-center",
1015
1197
  right: "text-right",
1016
1198
  justify: "text-justify"
1017
- }, r = {
1199
+ }, n = {
1018
1200
  default: "text-secondary-900",
1019
1201
  muted: "text-secondary-600",
1020
1202
  primary: "text-primary-600",
@@ -1022,44 +1204,45 @@ const se = { class: "flex items-center gap-4" }, le = {
1022
1204
  danger: "text-danger-600",
1023
1205
  success: "text-success-600",
1024
1206
  warning: "text-warning-600"
1025
- }, i = {
1207
+ }, d = {
1026
1208
  light: "font-light",
1027
1209
  normal: "font-normal",
1028
1210
  medium: "font-medium",
1029
1211
  semibold: "font-semibold",
1030
1212
  bold: "font-bold",
1031
1213
  extrabold: "font-extrabold"
1032
- }, n = e, u = g(() => n.variant), a = g(() => n.color), b = g(() => n.align), v = g(() => n.as || t[u.value] || "span"), V = g(() => n.weight ? i[n.weight] : "");
1033
- return (z, $) => (s(), P(te(v.value), {
1034
- class: k([
1035
- Dt,
1036
- h[u.value],
1037
- r[a.value],
1038
- d[b.value],
1039
- V.value,
1214
+ }, r = t, c = g(() => r.variant), i = g(() => r.color), x = g(() => r.align), m = g(() => r.as || e[c.value] || "span"), j = g(() => r.weight ? d[r.weight] : "");
1215
+ return (D, _) => (s(), P(Z(m.value), {
1216
+ class: v([
1217
+ Ot,
1218
+ y[c.value],
1219
+ n[i.value],
1220
+ u[x.value],
1221
+ j.value,
1040
1222
  {
1041
- uppercase: e.uppercase || u.value === "overline",
1042
- truncate: e.truncate
1223
+ uppercase: t.uppercase || c.value === "overline",
1224
+ truncate: t.truncate
1043
1225
  }
1044
1226
  ])
1045
1227
  }, {
1046
- default: q(() => [
1047
- w(z.$slots, "default")
1228
+ default: U(() => [
1229
+ $(D.$slots, "default")
1048
1230
  ]),
1049
1231
  _: 3
1050
1232
  }, 8, ["class"]));
1051
1233
  }
1052
1234
  });
1053
1235
  export {
1054
- Ot as AppBar,
1055
- Ft as Button,
1056
- At as Card,
1057
- Nt as Dialog,
1058
- qt as FileUpload,
1059
- Et as Loader,
1060
- Ht as Select,
1061
- Kt as Sidebar,
1236
+ Et as AppBar,
1237
+ Ht as Button,
1238
+ Ft as Card,
1239
+ Wt as Dialog,
1240
+ At as FileUpload,
1241
+ Kt as Loader,
1242
+ Rt as Menu,
1243
+ Nt as Select,
1244
+ qt as Sidebar,
1062
1245
  Pt as Table,
1063
- Wt as Tabs,
1064
- Ut as Text
1246
+ Ut as Tabs,
1247
+ Gt as Text
1065
1248
  };