@iaclinical/components 1.0.3 → 1.0.5

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