@iaclinical/components 1.0.2 → 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 B, computed as v, createElementBlock as s, openBlock as t, normalizeClass as k, createElementVNode as a, createCommentVNode as p, renderSlot as $, toDisplayString as x, createBlock as E, Teleport as Q, createVNode as J, Transition as R, withCtx as H, withModifiers as j, createTextVNode as S, ref as T, normalizeStyle as F, watch as X, withDirectives as Y, vModelText as Z, Fragment as z, renderList as L, 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
- }, ae = { class: "flex-1 flex justify-center" }, oe = { class: "flex items-center gap-3" }, ne = /* @__PURE__ */ B({
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,35 +13,35 @@ 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 l = e, u = h, r = v(() => {
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
- }, d = {
22
+ }, c = {
23
23
  sm: "h-12",
24
24
  md: "h-14",
25
25
  lg: "h-16"
26
- }, o = l.sticky ? "sticky top-0" : "", m = l.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[l.variant],
30
- d[l.height],
31
- o,
32
- m
32
+ x
33
33
  ].join(" ");
34
34
  });
35
- return (i, n) => (t(), s("header", {
36
- class: k(r.value)
35
+ return (d, r) => (s(), o("header", {
36
+ class: v(n.value)
37
37
  }, [
38
- a("div", se, [
39
- e.showMenuButton ? (t(), s("button", {
38
+ a("div", le, [
39
+ t.showMenuButton ? (s(), o("button", {
40
40
  key: 0,
41
- onClick: n[0] || (n[0] = (d) => u("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] = [
44
+ }, [...r[1] || (r[1] = [
45
45
  a("svg", {
46
46
  class: "w-6 h-6 text-primary-50",
47
47
  fill: "none",
@@ -56,27 +56,27 @@ const se = { class: "flex items-center gap-4" }, le = {
56
56
  d: "M4 6h16M4 12h16M4 18h16"
57
57
  })
58
58
  ], -1)
59
- ])])) : p("", !0),
60
- e.title ? (t(), s("div", le, x(e.title), 1)) : p("", !0),
61
- $(i.$slots, "left", {}, void 0, !0)
59
+ ])])) : f("", !0),
60
+ t.title ? (s(), o("div", ae, C(t.title), 1)) : f("", !0),
61
+ $(d.$slots, "left", {}, void 0, !0)
62
62
  ]),
63
- a("div", ae, [
64
- $(i.$slots, "center", {}, void 0, !0)
63
+ a("div", ne, [
64
+ $(d.$slots, "center", {}, void 0, !0)
65
65
  ]),
66
- a("div", oe, [
67
- $(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
- }), I = (e, h) => {
72
- const l = e.__vccOpts || e;
73
- for (const [u, r] of h)
74
- l[u] = r;
75
- return l;
76
- }, It = /* @__PURE__ */ I(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
- }, Ot = /* @__PURE__ */ B({
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 l = e, u = h, r = v(() => l.variant === "icon"), i = v(() => l.badge > 99 ? "99+" : l.badge.toString()), n = v(() => {
93
- const o = "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", m = {
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
- }, b = {
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,36 +109,36 @@ const se = { class: "flex items-center gap-4" }, le = {
109
109
  sm: "rounded-md",
110
110
  none: "rounded-none"
111
111
  };
112
- return `${o} ${m[l.variant]} ${b[l.size]} ${V[l.radius]}`;
113
- }), d = (o) => {
114
- l.disabled || u("click", o);
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 (o, m) => (t(), s("button", {
117
- class: k(n.value),
118
- type: e.type,
119
- disabled: e.disabled,
120
- onClick: d,
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
- $(o.$slots, "default"),
124
- r.value && e.badge && e.badge > 0 ? (t(), s("span", ie, x(i.value), 1)) : p("", !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
- }, ce = { class: "px-6 py-4" }, ue = {
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
- }, Ft = /* @__PURE__ */ B({
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, l = {
140
+ setup(t) {
141
+ const y = t, e = {
142
142
  none: "",
143
143
  sm: "shadow-sm",
144
144
  md: "shadow",
@@ -151,30 +151,30 @@ const se = { class: "flex items-center gap-4" }, le = {
151
151
  lg: "rounded-lg",
152
152
  xl: "rounded-xl",
153
153
  full: "rounded-full"
154
- }, r = v(() => [
154
+ }, n = g(() => [
155
155
  "w-full bg-white",
156
- l[h.shadow],
157
- u[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) => (t(), s("div", {
161
- class: k(r.value)
160
+ return (d, r) => (s(), o("div", {
161
+ class: v(n.value)
162
162
  }, [
163
- i.$slots.header ? (t(), s("div", de, [
164
- $(i.$slots, "header")
165
- ])) : p("", !0),
166
- a("div", ce, [
167
- $(i.$slots, "default")
163
+ d.$slots.header ? (s(), o("div", ce, [
164
+ $(d.$slots, "header")
165
+ ])) : f("", !0),
166
+ a("div", fe, [
167
+ $(d.$slots, "default")
168
168
  ]),
169
- i.$slots.footer ? (t(), s("div", ue, [
170
- $(i.$slots, "footer")
171
- ])) : p("", !0)
169
+ d.$slots.footer ? (s(), o("div", pe, [
170
+ $(d.$slots, "footer")
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" }, xe = { class: "px-8 py-6" }, ge = {
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
- }, he = /* @__PURE__ */ B({
177
+ }, ye = /* @__PURE__ */ L({
178
178
  __name: "Dialog",
179
179
  props: {
180
180
  modelValue: { type: Boolean, default: !1 },
@@ -182,40 +182,40 @@ 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 l = e, u = h, r = v({
187
- get: () => l.modelValue,
188
- set: (d) => u("update:modelValue", d)
189
- }), i = () => {
190
- r.value = !1;
191
- }, n = () => {
192
- l.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 (d, o) => (t(), E(Q, { to: "body" }, [
195
- J(R, { name: "dialog" }, {
196
- default: H(() => [
197
- r.value ? (t(), s("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
202
  a("div", {
203
203
  class: "relative w-full max-w-2xl rounded-lg bg-white shadow-xl",
204
- onClick: o[0] || (o[0] = j(() => {
204
+ onClick: i[0] || (i[0] = I(() => {
205
205
  }, ["stop"]))
206
206
  }, [
207
- a("div", fe, [
208
- a("h2", pe, [
209
- $(d.$slots, "title", {}, () => [
210
- S(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
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
- }, [...o[1] || (o[1] = [
217
+ onClick: d
218
+ }, [...i[1] || (i[1] = [
219
219
  a("svg", {
220
220
  class: "h-6 w-6",
221
221
  fill: "none",
@@ -231,32 +231,32 @@ const se = { class: "flex items-center gap-4" }, le = {
231
231
  ], -1)
232
232
  ])])
233
233
  ]),
234
- a("div", xe, [
235
- $(d.$slots, "default", {}, void 0, !0)
234
+ a("div", be, [
235
+ $(c.$slots, "default", {}, void 0, !0)
236
236
  ]),
237
- d.$slots.footer ? (t(), s("div", ge, [
238
- $(d.$slots, "footer", {}, void 0, !0)
239
- ])) : p("", !0)
237
+ c.$slots.footer ? (s(), o("div", ve, [
238
+ $(c.$slots, "footer", {}, void 0, !0)
239
+ ])) : f("", !0)
240
240
  ])
241
- ])) : p("", !0)
241
+ ])) : f("", !0)
242
242
  ]),
243
243
  _: 3
244
244
  })
245
245
  ]));
246
246
  }
247
- }), At = /* @__PURE__ */ I(he, [["__scopeId", "data-v-091e8739"]]), be = ["accept", "multiple", "disabled"], ve = { 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" }, $e = { class: "text-base font-medium text-gray-700" }, Ce = { 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
- }, Nt = /* @__PURE__ */ B({
259
+ }, At = /* @__PURE__ */ L({
260
260
  __name: "FileUpload",
261
261
  props: {
262
262
  modelValue: { default: null },
@@ -271,66 +271,66 @@ 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 l = e, u = h, r = T(null), i = T(!1), n = T(l.modelValue), d = T(""), o = () => {
276
- var w;
277
- (w = r.value) == null || w.click();
278
- }, m = () => {
279
- l.disabled || o();
280
- }, b = (w) => {
281
- l.disabled || (i.value = !0);
282
- }, V = () => {
283
- i.value = !1;
284
- }, M = (w) => {
285
- if (d.value = "", l.maxSize && w.size > l.maxSize) {
286
- const y = (l.maxSize / 1048576).toFixed(2);
287
- return d.value = `El archivo excede el tamaño máximo de ${y}MB`, u("error", d.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
- }, O = (w) => {
291
- var _;
292
- const C = (_ = w.target.files) == null ? void 0 : _[0];
293
- C && M(C) && (n.value = C, u("update:modelValue", C), u("change", C));
294
- }, A = (w) => {
295
- var C;
296
- i.value = !1;
297
- const y = (C = w.dataTransfer) == null ? void 0 : C.files[0];
298
- y && M(y) && (n.value = y, u("update:modelValue", y), u("change", y));
299
- }, N = () => {
300
- n.value = null, d.value = "", r.value && (r.value.value = ""), u("update:modelValue", null), u("change", null);
301
- }, q = (w) => {
302
- if (w === 0) return "0 Bytes";
303
- const y = 1024, C = ["Bytes", "KB", "MB", "GB"], _ = Math.floor(Math.log(w) / Math.log(y));
304
- return Math.round(w / Math.pow(y, _) * 100) / 100 + " " + C[_];
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 (w, y) => (t(), s("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: m,
312
- onDragover: j(b, ["prevent"]),
313
- onDragleave: j(V, ["prevent"]),
314
- onDrop: j(A, ["prevent"])
311
+ onClick: x,
312
+ onDragover: I(m, ["prevent"]),
313
+ onDragleave: I(j, ["prevent"]),
314
+ onDrop: I(O, ["prevent"])
315
315
  }, [
316
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: O
325
- }, null, 40, be),
326
- a("div", ve, [
327
- a("div", ye, [
328
- e.illustration ? (t(), s("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)) : (t(), s("svg", ke, [...y[1] || (y[1] = [
333
+ }, null, 8, we)) : (s(), o("svg", $e, [...b[1] || (b[1] = [
334
334
  a("path", {
335
335
  "stroke-linecap": "round",
336
336
  "stroke-linejoin": "round",
@@ -339,20 +339,20 @@ const se = { class: "flex items-center gap-4" }, le = {
339
339
  }, null, -1)
340
340
  ])]))
341
341
  ]),
342
- a("div", we, [
343
- a("p", $e, [
344
- S(x(e.mainText) + " ", 1),
345
- a("span", Ce, 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 ? (t(), s("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: y[0] || (y[0] = j(() => {
351
+ onClick: b[0] || (b[0] = I(() => {
352
352
  }, ["stop"]))
353
353
  }, [
354
- a("div", _e, [
355
- y[2] || (y[2] = a("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",
@@ -365,16 +365,16 @@ const se = { class: "flex items-center gap-4" }, le = {
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
- a("div", Be, [
369
- a("p", Te, x(n.value.name), 1),
370
- a("p", Ve, x(q(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 ? p("", !0) : (t(), s("button", {
373
+ t.disabled ? f("", !0) : (s(), o("button", {
374
374
  key: 0,
375
- onClick: j(N, ["stop"]),
375
+ onClick: I(H, ["stop"]),
376
376
  class: "ml-3 text-gray-400 hover:text-danger-500 transition-colors"
377
- }, [...y[3] || (y[3] = [
377
+ }, [...b[3] || (b[3] = [
378
378
  a("svg", {
379
379
  class: "w-5 h-5",
380
380
  fill: "currentColor",
@@ -387,16 +387,16 @@ const se = { class: "flex items-center gap-4" }, le = {
387
387
  })
388
388
  ], -1)
389
389
  ])]))
390
- ])) : p("", !0),
391
- e.helperText ? (t(), s("p", je, x(e.helperText), 1)) : p("", !0),
392
- d.value ? (t(), s("p", ze, x(d.value), 1)) : p("", !0)
390
+ ])) : 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"], De = {
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__ */ B({
399
+ }, Oe = /* @__PURE__ */ L({
400
400
  __name: "Loader",
401
401
  props: {
402
402
  type: { default: "circular" },
@@ -406,8 +406,8 @@ 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, l = {
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",
@@ -421,14 +421,14 @@ const se = { class: "flex items-center gap-4" }, le = {
421
421
  warning: "bg-warning-500",
422
422
  danger: "bg-danger-500",
423
423
  info: "bg-info-500"
424
- }, r = v(() => [l[h.color]]), i = v(() => [u[h.color]]);
425
- return (n, d) => e.type === "circular" ? (t(), s("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
- (t(), s("svg", {
429
+ (s(), o("svg", {
430
430
  class: "animate-spin",
431
- style: F({ 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
434
  a("circle", {
@@ -437,97 +437,320 @@ const se = { class: "flex items-center gap-4" }, le = {
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
- d[0] || (d[0] = a("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" ? (t(), s("div", {
449
+ ], 2)) : t.type === "linear" ? (s(), o("div", {
450
450
  key: 1,
451
451
  class: "w-full",
452
- style: F({ height: e.height })
452
+ style: W({ height: t.height })
453
453
  }, [
454
454
  a("div", De, [
455
455
  a("div", {
456
- class: k([i.value, "h-full rounded-lg animate-linear-loader"]),
457
- style: F({ width: e.progress ? `${e.progress}%` : void 0 })
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
- ], 4)) : p("", !0);
460
+ ], 4)) : f("", !0);
461
461
  }
462
- }), qt = /* @__PURE__ */ I(Le, [["__scopeId", "data-v-8df4ec38"]]), Se = ["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
- }, at = {
506
- key: 1,
507
- class: "flex items-center justify-between w-full"
508
- }, ot = { 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"], ct = {
742
+ }, dt = ["onClick"], ut = ["innerHTML"], ct = {
519
743
  key: 1,
520
744
  class: "mt-1 text-sm text-danger-600"
521
- }, ut = {
745
+ }, ft = {
522
746
  key: 2,
523
747
  class: "mt-1 text-sm text-secondary-600"
524
- }, ft = /* @__PURE__ */ B({
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,108 +766,88 @@ 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 l = e, u = h, r = T(!1), i = T(""), n = T(null), d = v(
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
- ), o = v(() => l.options.find((c) => c.value === l.modelValue) || null), m = v(() => {
550
- if (!l.searchable || !i.value)
551
- return l.options;
552
- const c = i.value.toLowerCase();
553
- return l.options.filter((g) => {
554
- var f, D;
555
- return g.label.toLowerCase().includes(c) || ((f = g.subtitle) == null ? void 0 : f.toLowerCase().includes(c)) || ((D = g.description) == null ? void 0 : D.toLowerCase().includes(c));
556
- });
557
- }), b = v(() => "block text-sm font-semibold text-secondary-700 mb-1"), V = v(() => {
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", g = {
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
- }, f = {
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 = l.mode === "menu" ? "bg-primary-700 border-primary-700 hover:bg-primary-600" : "", G = l.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
- g[l.size],
570
- D || f[l.variant],
571
- G
788
+ h,
789
+ k[e.size],
790
+ l[e.variant],
791
+ w
572
792
  ].join(" ");
573
- }), M = v(() => l.mode === "menu" ? "text-white" : "text-secondary-900"), O = v(() => l.mode === "menu" ? "text-primary-100" : "text-secondary-600"), A = v(() => l.mode === "menu" ? "text-white" : "text-secondary-600"), N = v(() => `absolute ${l.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`), q = (c) => {
574
- const g = "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", f = y(c) ? "bg-primary-50" : "";
575
- return [g, f].join(" ");
576
- }, w = (c) => {
577
- const g = "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" ? `${g} text-danger-600 hover:bg-danger-50 focus:bg-danger-50` : `${g} text-secondary-700 hover:bg-secondary-50 focus:bg-secondary-50`;
579
- }, y = (c) => c.value === l.modelValue, C = () => {
580
- l.disabled || (r.value = !r.value, r.value && l.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
- }, _ = () => {
585
- r.value = !1, i.value = "";
586
- }, K = (c) => {
587
- c.disabled || (u("update:modelValue", c.value), u("change", c), _());
588
- }, P = (c) => {
589
- c.action && c.action(), u("action", c), _();
590
- }, W = (c) => {
591
- const g = c.relatedTarget;
592
- g && g.closest(".select-wrapper") || setTimeout(() => {
593
- _();
804
+ }, B = () => {
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(() => {
813
+ B();
594
814
  }, 200);
595
- }, U = (c) => {
596
- c.key === "Escape" ? _() : (c.key === "Enter" || c.key === " ") && (c.preventDefault(), C());
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, g) => (t(), s("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 ? (t(), s("label", {
823
+ t.label ? (s(), o("label", {
604
824
  key: 0,
605
- for: d.value,
606
- class: k(b.value)
825
+ for: c.value,
826
+ class: v(m.value)
607
827
  }, [
608
- S(x(e.label) + " ", 1),
609
- e.required ? (t(), s("span", Ie, "*")) : p("", !0)
610
- ], 10, Se)) : p("", !0),
611
- a("div", Oe, [
828
+ K(C(t.label) + " ", 1),
829
+ t.required ? (s(), o("span", Je, "*")) : f("", !0)
830
+ ], 10, Qe)) : f("", !0),
831
+ a("div", Xe, [
612
832
  a("button", {
613
- id: d.value,
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: C,
620
- onBlur: W,
621
- onKeydown: U
839
+ onClick: F,
840
+ onBlur: S,
841
+ onKeydown: q
622
842
  }, [
623
- e.mode === "menu" && o.value ? (t(), s("div", Ae, [
624
- o.value.avatar ? (t(), s("div", Ne, [
625
- a("img", {
626
- src: o.value.avatar,
627
- alt: o.value.label,
628
- class: "w-full h-full object-cover"
629
- }, null, 8, qe)
630
- ])) : o.value.initials ? (t(), s("div", Ee, x(o.value.initials), 1)) : p("", !0),
631
- a("div", He, [
632
- a("span", {
633
- class: k(["text-sm font-semibold truncate w-full", M.value])
634
- }, x(o.value.label), 3),
635
- o.value.subtitle ? (t(), s("span", {
636
- key: 0,
637
- class: k(["text-xs truncate w-full", O.value])
638
- }, x(o.value.subtitle), 3)) : p("", !0)
639
- ])
640
- ])) : (t(), s("span", Ke, x(o.value ? o.value.label : e.placeholder), 1)),
641
- (t(), s("svg", {
642
- class: k(["w-5 h-5 flex-shrink-0 transition-transform", [r.value ? "rotate-180" : "", A.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
- }, [...g[3] || (g[3] = [
850
+ }, [...k[3] || (k[3] = [
648
851
  a("path", {
649
852
  "stroke-linecap": "round",
650
853
  "stroke-linejoin": "round",
@@ -652,215 +855,291 @@ const se = { class: "flex items-center gap-4" }, le = {
652
855
  d: "M19 9l-7 7-7-7"
653
856
  }, null, -1)
654
857
  ])], 2))
655
- ], 42, Fe),
656
- r.value ? (t(), s("div", {
858
+ ], 42, Ye),
859
+ n.value ? (s(), o("div", {
657
860
  key: 0,
658
- class: k(N.value),
659
- onClick: g[2] || (g[2] = j(() => {
861
+ class: v(D.value),
862
+ onClick: k[2] || (k[2] = I(() => {
660
863
  }, ["stop"]))
661
864
  }, [
662
- e.searchable ? (t(), s("div", Pe, [
663
- Y(a("input", {
865
+ t.searchable ? (s(), o("div", et, [
866
+ se(a("input", {
664
867
  ref_key: "searchInput",
665
- ref: n,
666
- "onUpdate:modelValue": g[0] || (g[0] = (f) => i.value = f),
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: g[1] || (g[1] = j(() => {
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
- ])) : p("", !0),
676
- a("div", Ue, [
677
- m.value.length === 0 ? (t(), s("div", Ge, x(e.emptyText), 1)) : (t(), s(z, { key: 1 }, [
678
- (t(!0), s(z, null, L(m.value, (f) => (t(), s("button", {
679
- key: f.value,
878
+ ])) : f("", !0),
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(q(f)),
682
- onClick: (D) => K(f)
884
+ class: v(_(l)),
885
+ onClick: (w) => b(l)
683
886
  }, [
684
- e.mode === "menu" ? (t(), s("div", Je, [
685
- f.avatar ? (t(), s("div", Re, [
686
- a("img", {
687
- src: f.avatar,
688
- alt: f.label,
689
- class: "w-full h-full object-cover"
690
- }, null, 8, Xe)
691
- ])) : f.initials ? (t(), s("div", Ye, x(f.initials), 1)) : p("", !0),
692
- a("div", Ze, [
693
- a("span", et, x(f.label), 1),
694
- f.subtitle ? (t(), s("span", tt, x(f.subtitle), 1)) : p("", !0),
695
- f.description ? (t(), s("span", st, x(f.description), 1)) : p("", !0)
696
- ]),
697
- y(f) ? (t(), s("svg", lt, [...g[4] || (g[4] = [
887
+ a("div", at, [
888
+ a("span", nt, C(l.label), 1),
889
+ H(l) ? (s(), o("svg", rt, [...k[4] || (k[4] = [
698
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
- ])])) : p("", !0)
705
- ])) : (t(), s("div", at, [
706
- a("span", ot, x(f.label), 1),
707
- y(f) ? (t(), s("svg", nt, [...g[5] || (g[5] = [
708
- a("path", {
709
- "stroke-linecap": "round",
710
- "stroke-linejoin": "round",
711
- "stroke-width": "2",
712
- d: "M5 13l4 4L19 7"
713
- }, null, -1)
714
- ])])) : p("", !0)
715
- ]))
716
- ], 10, Qe))), 128)),
717
- e.actionItems.length > 0 ? (t(), s("div", rt)) : p("", !0),
718
- (t(!0), s(z, null, L(e.actionItems, (f) => (t(), s("button", {
719
- key: f.id,
896
+ ])])) : f("", !0)
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(w(f)),
722
- onClick: (D) => P(f)
903
+ class: v(O(l)),
904
+ onClick: (w) => T(l)
723
905
  }, [
724
- f.icon ? (t(), s("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: f.icon
732
- }, null, 8, dt)) : p("", !0),
733
- S(" " + x(f.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
- ], 2)) : p("", !0)
919
+ ], 2)) : f("", !0)
738
920
  ]),
739
- e.error ? (t(), s("p", ct, x(e.error), 1)) : e.helperText ? (t(), s("p", ut, x(e.helperText), 1)) : p("", !0),
740
- r.value ? (t(), s("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
- onClick: _,
924
+ onClick: B,
743
925
  class: "fixed inset-0 z-40"
744
- })) : p("", !0)
926
+ })) : f("", !0)
745
927
  ], 2));
746
928
  }
747
- }), Et = /* @__PURE__ */ I(ft, [["__scopeId", "data-v-5644cc74"]]), pt = { class: "w-full overflow-x-auto" }, xt = { class: "w-full border-collapse" }, gt = { class: "w-full" }, ht = { class: "bg-white border-b border-gray-100 w-full" }, bt = ["onClick"], vt = { class: "flex items-center gap-2" }, yt = {
929
+ }), Nt = /* @__PURE__ */ R(pt, [["__scopeId", "data-v-f016a03c"]]), gt = /* @__PURE__ */ L({
930
+ __name: "Sidebar",
931
+ props: {
932
+ modelValue: { type: Boolean, default: !1 },
933
+ position: { default: "left" },
934
+ width: { default: "16rem" },
935
+ overlay: { type: Boolean, default: !0 },
936
+ overlayTop: { default: "0" },
937
+ closable: { type: Boolean, default: !0 },
938
+ persistent: { type: Boolean, default: !1 },
939
+ backgroundColor: { default: "white" },
940
+ shadow: { type: Boolean, default: !0 },
941
+ padding: { default: "md" }
942
+ },
943
+ emits: ["update:modelValue", "close", "open"],
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 = {
959
+ none: "",
960
+ sm: "p-2",
961
+ md: "p-4",
962
+ lg: "p-6"
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", {
968
+ key: 0,
969
+ onClick: d,
970
+ class: "fixed inset-0 bg-black/50 z-40",
971
+ style: W({ top: t.overlayTop })
972
+ }, null, 4)) : f("", !0)
973
+ ]),
974
+ _: 1
975
+ }),
976
+ G(Q, { name: r.value }, {
977
+ default: U(() => [
978
+ n.value ? (s(), o("aside", {
979
+ key: 0,
980
+ class: v(c.value),
981
+ style: W(i.value)
982
+ }, [
983
+ _.$slots.header ? (s(), o("div", {
984
+ key: 0,
985
+ class: v(m.value)
986
+ }, [
987
+ $(_.$slots, "header", {}, void 0, !0),
988
+ t.closable ? (s(), o("button", {
989
+ key: 0,
990
+ onClick: d,
991
+ class: "p-2 hover:bg-gray-100 rounded-md transition-colors",
992
+ "aria-label": "Cerrar menú"
993
+ }, [...O[0] || (O[0] = [
994
+ a("svg", {
995
+ class: "w-5 h-5",
996
+ fill: "none",
997
+ stroke: "currentColor",
998
+ viewBox: "0 0 24 24"
999
+ }, [
1000
+ a("path", {
1001
+ "stroke-linecap": "round",
1002
+ "stroke-linejoin": "round",
1003
+ "stroke-width": "2",
1004
+ d: "M6 18L18 6M6 6l12 12"
1005
+ })
1006
+ ], -1)
1007
+ ])])) : f("", !0)
1008
+ ], 2)) : f("", !0),
1009
+ a("div", {
1010
+ class: v(j.value)
1011
+ }, [
1012
+ $(_.$slots, "default", {}, void 0, !0)
1013
+ ], 2),
1014
+ _.$slots.footer ? (s(), o("div", {
1015
+ key: 1,
1016
+ class: v(D.value)
1017
+ }, [
1018
+ $(_.$slots, "footer", {}, void 0, !0)
1019
+ ], 2)) : f("", !0)
1020
+ ], 6)) : f("", !0)
1021
+ ]),
1022
+ _: 3
1023
+ }, 8, ["name"])
1024
+ ]));
1025
+ }
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 = {
748
1027
  key: 0,
749
1028
  class: "text-xs text-gray-400"
750
- }, mt = { key: 0 }, kt = { key: 1 }, wt = { class: "w-full" }, $t = {
1029
+ }, wt = { key: 0 }, $t = { key: 1 }, Ct = { class: "w-full" }, Bt = {
751
1030
  key: 0,
752
1031
  class: "flex items-center justify-center py-12 text-gray-400"
753
- }, Ct = {
1032
+ }, _t = {
754
1033
  key: 1,
755
1034
  class: "w-full px-6 py-4 bg-white"
756
- }, _t = /* @__PURE__ */ B({
1035
+ }, Tt = /* @__PURE__ */ L({
757
1036
  __name: "Table",
758
1037
  props: {
759
1038
  columns: {},
760
1039
  data: {}
761
1040
  },
762
- setup(e) {
763
- const h = e, l = T(null), u = T("asc"), r = (n) => {
764
- l.value === n ? u.value = u.value === "asc" ? "desc" : "asc" : (l.value = n, u.value = "asc");
765
- }, i = v(() => {
766
- if (!l.value)
767
- return h.data;
768
- const n = [...h.data];
769
- return n.sort((d, o) => {
770
- const m = d[l.value], b = o[l.value];
771
- return typeof m == "string" && typeof b == "string" ? u.value === "asc" ? m.localeCompare(b) : b.localeCompare(m) : typeof m == "number" && typeof b == "number" ? u.value === "asc" ? m - b : b - m : 0;
772
- }), 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;
773
1052
  });
774
- return (n, d) => (t(), s("div", pt, [
775
- a("table", xt, [
776
- a("thead", gt, [
777
- a("tr", ht, [
778
- (t(!0), s(z, null, L(e.columns, (o) => (t(), s("th", {
779
- key: o.key,
780
- style: F(o.width ? { width: o.width } : {}),
781
- 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([
782
1061
  "px-8 py-4 text-left text-base font-semibold text-gray-900 border-0",
783
- o.sortable ? "cursor-pointer hover:text-primary-700 select-none transition-colors" : ""
1062
+ i.sortable ? "cursor-pointer hover:text-primary-700 select-none transition-colors" : ""
784
1063
  ]),
785
- onClick: (m) => o.sortable && r(o.key)
1064
+ onClick: (x) => i.sortable && n(i.key)
786
1065
  }, [
787
- a("div", vt, [
788
- a("span", null, x(o.label), 1),
789
- o.sortable ? (t(), s("span", yt, [
790
- l.value !== o.key ? (t(), s("span", mt, "⇅")) : (t(), s("span", kt, x(u.value === "asc" ? "↑" : "↓"), 1))
791
- ])) : p("", !0)
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))
1070
+ ])) : f("", !0)
792
1071
  ])
793
- ], 14, bt))), 128))
1072
+ ], 14, xt))), 128))
794
1073
  ])
795
1074
  ]),
796
- a("tbody", wt, [
797
- (t(!0), s(z, null, L(i.value, (o, m) => (t(), s("tr", {
798
- key: m,
1075
+ a("tbody", Ct, [
1076
+ (s(!0), o(E, null, A(d.value, (i, x) => (s(), o("tr", {
1077
+ key: x,
799
1078
  class: "w-full hover:bg-gray-50 transition-colors"
800
1079
  }, [
801
- (t(!0), s(z, null, L(e.columns, (b) => (t(), s("td", {
802
- key: `${m}-${b.key}`,
1080
+ (s(!0), o(E, null, A(t.columns, (m) => (s(), o("td", {
1081
+ key: `${x}-${m.key}`,
803
1082
  class: "px-8 py-4 text-base text-gray-700 border-0"
804
1083
  }, [
805
- $(n.$slots, `cell-${b.key}`, {
806
- value: o[b.key],
807
- row: o
1084
+ $(r.$slots, `cell-${m.key}`, {
1085
+ value: i[m.key],
1086
+ row: i
808
1087
  }, () => [
809
- S(x(o[b.key]), 1)
1088
+ K(C(i[m.key]), 1)
810
1089
  ], !0)
811
1090
  ]))), 128))
812
1091
  ]))), 128))
813
1092
  ])
814
1093
  ]),
815
- i.value.length === 0 ? (t(), s("div", $t, [
816
- $(n.$slots, "empty", {}, () => [
817
- d[0] || (d[0] = S("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))
818
1097
  ], !0)
819
- ])) : p("", !0),
820
- n.$slots.footer ? (t(), s("div", Ct, [
821
- $(n.$slots, "footer", {}, void 0, !0)
822
- ])) : p("", !0)
1098
+ ])) : f("", !0),
1099
+ r.$slots.footer ? (s(), o("div", _t, [
1100
+ $(r.$slots, "footer", {}, void 0, !0)
1101
+ ])) : f("", !0)
823
1102
  ]));
824
1103
  }
825
- }), Ht = /* @__PURE__ */ I(_t, [["__scopeId", "data-v-6b3ff0a8"]]), Bt = { class: "w-full" }, Tt = {
1104
+ }), Pt = /* @__PURE__ */ R(Tt, [["__scopeId", "data-v-6b3ff0a8"]]), Mt = { class: "w-full" }, zt = {
826
1105
  class: "flex border-b border-gray-100",
827
1106
  role: "tablist"
828
- }, Vt = ["aria-selected", "onClick"], jt = { role: "tabpanel" }, zt = "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", Mt = "text-primary-700 border-b-4 border-primary-700", Dt = "text-gray-600 border-b-4 border-transparent hover:text-gray-800", Kt = /* @__PURE__ */ B({
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({
829
1108
  __name: "Tabs",
830
1109
  props: {
831
1110
  modelValue: {},
832
1111
  tabs: {}
833
1112
  },
834
1113
  emits: ["update:modelValue"],
835
- setup(e, { emit: h }) {
836
- const l = e, u = h, r = (o) => l.modelValue === o, i = (o) => {
837
- r(o) || u("update:modelValue", o);
838
- }, n = v(() => l.modelValue), d = v(
839
- () => l.tabs.find((o) => o.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)
840
1119
  );
841
- return (o, m) => (t(), s("div", Bt, [
842
- a("div", Tt, [
843
- (t(!0), s(z, null, L(e.tabs, (b) => (t(), s("button", {
844
- key: b.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,
845
1124
  type: "button",
846
- class: k([
847
- zt,
848
- r(b.value) ? Mt : Dt
1125
+ class: v([
1126
+ Lt,
1127
+ n(m.value) ? St : Dt
849
1128
  ]),
850
- "aria-selected": r(b.value),
1129
+ "aria-selected": n(m.value),
851
1130
  role: "tab",
852
- onClick: (V) => i(b.value)
853
- }, x(b.label), 11, Vt))), 128))
1131
+ onClick: (j) => d(m.value)
1132
+ }, C(m.label), 11, Vt))), 128))
854
1133
  ]),
855
1134
  a("div", jt, [
856
- $(o.$slots, n.value, {
857
- active: n.value,
858
- tab: d.value
1135
+ $(i.$slots, r.value, {
1136
+ active: r.value,
1137
+ tab: c.value
859
1138
  })
860
1139
  ])
861
1140
  ]));
862
1141
  }
863
- }), Lt = "font-sans", Pt = /* @__PURE__ */ B({
1142
+ }), Ot = "font-sans", Gt = /* @__PURE__ */ L({
864
1143
  __name: "Text",
865
1144
  props: {
866
1145
  variant: { default: "body1" },
@@ -871,8 +1150,8 @@ const se = { class: "flex items-center gap-4" }, le = {
871
1150
  truncate: { type: Boolean, default: !1 },
872
1151
  weight: {}
873
1152
  },
874
- setup(e) {
875
- const h = {
1153
+ setup(t) {
1154
+ const y = {
876
1155
  h1: "text-[40px] leading-[57px] tracking-[0px] font-extrabold",
877
1156
  h2: "text-[40px] leading-[57px] tracking-[0px] font-bold",
878
1157
  h3: "text-[28px] leading-[39px] tracking-[0px] font-extrabold",
@@ -892,7 +1171,7 @@ const se = { class: "flex items-center gap-4" }, le = {
892
1171
  button3: "text-[12px] leading-[18px] tracking-[1.25px] font-bold",
893
1172
  caption: "text-[12px] leading-[18px] tracking-[0.4px] font-normal",
894
1173
  overline: "text-[10px] leading-[15px] tracking-[1.5px] font-medium"
895
- }, l = {
1174
+ }, e = {
896
1175
  h1: "h1",
897
1176
  h2: "h2",
898
1177
  h3: "h3",
@@ -917,7 +1196,7 @@ const se = { class: "flex items-center gap-4" }, le = {
917
1196
  center: "text-center",
918
1197
  right: "text-right",
919
1198
  justify: "text-justify"
920
- }, r = {
1199
+ }, n = {
921
1200
  default: "text-secondary-900",
922
1201
  muted: "text-secondary-600",
923
1202
  primary: "text-primary-600",
@@ -925,43 +1204,45 @@ const se = { class: "flex items-center gap-4" }, le = {
925
1204
  danger: "text-danger-600",
926
1205
  success: "text-success-600",
927
1206
  warning: "text-warning-600"
928
- }, i = {
1207
+ }, d = {
929
1208
  light: "font-light",
930
1209
  normal: "font-normal",
931
1210
  medium: "font-medium",
932
1211
  semibold: "font-semibold",
933
1212
  bold: "font-bold",
934
1213
  extrabold: "font-extrabold"
935
- }, n = e, d = v(() => n.variant), o = v(() => n.color), m = v(() => n.align), b = v(() => n.as || l[d.value] || "span"), V = v(() => n.weight ? i[n.weight] : "");
936
- return (M, O) => (t(), E(te(b.value), {
937
- class: k([
938
- Lt,
939
- h[d.value],
940
- r[o.value],
941
- u[m.value],
942
- 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,
943
1222
  {
944
- uppercase: e.uppercase || d.value === "overline",
945
- truncate: e.truncate
1223
+ uppercase: t.uppercase || c.value === "overline",
1224
+ truncate: t.truncate
946
1225
  }
947
1226
  ])
948
1227
  }, {
949
- default: H(() => [
950
- $(M.$slots, "default")
1228
+ default: U(() => [
1229
+ $(D.$slots, "default")
951
1230
  ]),
952
1231
  _: 3
953
1232
  }, 8, ["class"]));
954
1233
  }
955
1234
  });
956
1235
  export {
957
- It as AppBar,
958
- Ot as Button,
1236
+ Et as AppBar,
1237
+ Ht as Button,
959
1238
  Ft as Card,
960
- At as Dialog,
961
- Nt as FileUpload,
962
- qt as Loader,
963
- Et as Select,
964
- Ht as Table,
965
- Kt as Tabs,
966
- Pt as Text
1239
+ Wt as Dialog,
1240
+ At as FileUpload,
1241
+ Kt as Loader,
1242
+ Rt as Menu,
1243
+ Nt as Select,
1244
+ qt as Sidebar,
1245
+ Pt as Table,
1246
+ Ut as Tabs,
1247
+ Gt as Text
967
1248
  };