@iaclinical/components 1.0.30 → 1.0.31

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,15 +1,15 @@
1
- import { defineComponent as Y, computed as r, createElementBlock as l, openBlock as s, normalizeClass as c, createElementVNode as a, createCommentVNode as x, renderSlot as I, toDisplayString as $, createBlock as ee, unref as Fe, normalizeStyle as G, ref as F, onMounted as Ce, onUnmounted as Me, watch as pe, createTextVNode as q, withModifiers as K, createVNode as J, withDirectives as ce, Fragment as E, renderList as H, vModelSelect as $e, Teleport as be, Transition as re, withCtx as le, nextTick as fe, resolveDynamicComponent as ve, vModelText as Re } from "vue";
2
- import { Icon as Pe } from "@iconify/vue";
3
- const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
1
+ import { defineComponent as N, computed as o, createElementBlock as a, openBlock as l, normalizeClass as c, createElementVNode as s, createCommentVNode as f, renderSlot as O, toDisplayString as $, createBlock as le, unref as Re, normalizeStyle as X, ref as q, onMounted as Te, onUnmounted as Se, watch as de, createTextVNode as Y, withModifiers as J, createVNode as Q, withDirectives as ve, Fragment as K, renderList as G, vModelSelect as De, withKeys as Ve, Teleport as me, Transition as ie, withCtx as re, nextTick as be, resolveDynamicComponent as ge, vModelText as Ee } from "vue";
2
+ import { Icon as Ye } from "@iconify/vue";
3
+ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
4
4
  key: 1,
5
5
  class: "text-base sm:text-lg font-bold text-primary-50 font-poppins whitespace-nowrap"
6
- }, qe = { class: "flex flex-1 justify-center items-center min-w-0" }, Ne = {
6
+ }, Ke = { class: "flex flex-1 justify-center items-center min-w-0" }, Ue = {
7
7
  key: 0,
8
8
  class: "text-base sm:text-lg font-bold text-primary-50 font-poppins truncate"
9
- }, We = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
9
+ }, Je = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ge = {
10
10
  key: 0,
11
11
  class: "text-base sm:text-lg font-bold text-primary-50 font-poppins whitespace-nowrap"
12
- }, Ke = /* @__PURE__ */ Y({
12
+ }, Qe = /* @__PURE__ */ N({
13
13
  __name: "AppBar",
14
14
  props: {
15
15
  title: { default: "" },
@@ -17,76 +17,96 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
17
17
  showMenuButton: { type: Boolean, default: !0 },
18
18
  variant: { default: "default" },
19
19
  sticky: { type: Boolean, default: !0 },
20
+ mode: { default: "sticky" },
20
21
  shadow: { type: Boolean, default: !1 },
21
- height: { default: "md" }
22
+ elevation: { default: 0 },
23
+ height: { default: "md" },
24
+ density: { default: "normal" }
22
25
  },
23
26
  emits: ["toggle-menu"],
24
27
  setup(t, { emit: m }) {
25
- const e = t, b = m, n = r(() => {
26
- const u = "flex flex-row items-center justify-between gap-2 sm:gap-4 px-3 sm:px-6 z-50 w-full", d = {
28
+ const e = t, u = m, r = o(() => {
29
+ const p = "flex flex-row items-center justify-between gap-2 sm:gap-4 px-3 sm:px-6 z-50 w-full", v = {
27
30
  default: "bg-primary-700 text-primary-50",
28
31
  dark: "bg-secondary-900 text-white",
29
32
  light: "bg-white text-secondary-900 border-b border-secondary-200"
30
- }, i = {
33
+ }, n = {
31
34
  sm: "h-12",
32
35
  md: "h-14",
33
36
  lg: "h-16"
34
- }, w = e.sticky ? "sticky top-0" : "", y = e.shadow ? "shadow-md" : "";
37
+ }, b = {
38
+ 0: "",
39
+ 1: "shadow-sm",
40
+ 2: "shadow",
41
+ 3: "shadow-md",
42
+ 4: "shadow-lg",
43
+ 5: "shadow-xl"
44
+ }, M = {
45
+ compact: "gap-1",
46
+ normal: "gap-2 sm:gap-4",
47
+ prominent: "gap-3 sm:gap-6 px-6 sm:px-8"
48
+ }, k = e.sticky ? e.mode === "fixed" ? "fixed top-0 inset-x-0" : "sticky top-0 inset-x-0" : "", g = e.shadow ? "shadow-md" : b[Math.min(e.elevation, 5)];
35
49
  return [
36
- u,
37
- d[e.variant],
38
- i[e.height],
39
- w,
40
- y
50
+ p.replace("gap-2 sm:gap-4", M[e.density]),
51
+ v[e.variant],
52
+ n[e.height],
53
+ k,
54
+ g
41
55
  ].join(" ");
42
56
  });
43
- return (u, d) => (s(), l("header", {
44
- class: c(n.value)
57
+ return (p, v) => (l(), a("header", {
58
+ class: c(r.value)
45
59
  }, [
46
- a("div", Ye, [
47
- t.showMenuButton ? (s(), l("button", {
60
+ s("div", Ne, [
61
+ t.showMenuButton ? (l(), a("button", {
48
62
  key: 0,
49
- onClick: d[0] || (d[0] = (i) => b("toggle-menu")),
63
+ onClick: v[0] || (v[0] = (n) => u("toggle-menu")),
50
64
  class: "p-1.5 sm:p-2 hover:bg-primary-600 rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
51
65
  "aria-label": "Toggle menu"
52
- }, [...d[1] || (d[1] = [
53
- a("svg", {
66
+ }, [...v[1] || (v[1] = [
67
+ s("svg", {
54
68
  class: "w-5 h-5 sm:w-6 sm:h-6 text-primary-50",
55
69
  fill: "none",
56
70
  stroke: "currentColor",
57
71
  viewBox: "0 0 24 24",
58
72
  xmlns: "http://www.w3.org/2000/svg"
59
73
  }, [
60
- a("path", {
74
+ s("path", {
61
75
  "stroke-linecap": "round",
62
76
  "stroke-linejoin": "round",
63
77
  "stroke-width": "2",
64
78
  d: "M4 6h16M4 12h16M4 18h16"
65
79
  })
66
80
  ], -1)
67
- ])])) : x("", !0),
68
- t.title && t.titlePosition === "left" ? (s(), l("div", Ee, $(t.title), 1)) : x("", !0),
69
- I(u.$slots, "left", {}, void 0, !0)
81
+ ])])) : f("", !0),
82
+ t.title && t.titlePosition === "left" ? (l(), a("div", He, $(t.title), 1)) : f("", !0),
83
+ O(p.$slots, "left", {}, void 0, !0)
70
84
  ]),
71
- a("div", qe, [
72
- t.title && t.titlePosition === "center" ? (s(), l("div", Ne, $(t.title), 1)) : x("", !0),
73
- I(u.$slots, "center", {}, void 0, !0)
85
+ s("div", Ke, [
86
+ t.title && t.titlePosition === "center" ? (l(), a("div", Ue, $(t.title), 1)) : f("", !0),
87
+ O(p.$slots, "center", {}, void 0, !0)
74
88
  ]),
75
- a("div", We, [
76
- t.title && t.titlePosition === "right" ? (s(), l("div", He, $(t.title), 1)) : x("", !0),
77
- I(u.$slots, "right", {}, void 0, !0)
89
+ s("div", Je, [
90
+ t.title && t.titlePosition === "right" ? (l(), a("div", Ge, $(t.title), 1)) : f("", !0),
91
+ O(p.$slots, "right", {}, void 0, !0)
78
92
  ])
79
93
  ], 2));
80
94
  }
81
- }), U = (t, m) => {
95
+ }), Z = (t, m) => {
82
96
  const e = t.__vccOpts || t;
83
- for (const [b, n] of m)
84
- e[b] = n;
97
+ for (const [u, r] of m)
98
+ e[u] = r;
85
99
  return e;
86
- }, Sl = /* @__PURE__ */ U(Ke, [["__scopeId", "data-v-c5861315"]]), Ue = ["type", "disabled", "aria-label"], Je = {
100
+ }, Ua = /* @__PURE__ */ Z(Qe, [["__scopeId", "data-v-d279b85c"]]), Ze = ["type", "disabled", "aria-label"], Xe = {
87
101
  key: 0,
102
+ class: "w-4 h-4 animate-spin mr-2",
103
+ xmlns: "http://www.w3.org/2000/svg",
104
+ fill: "none",
105
+ viewBox: "0 0 24 24"
106
+ }, _e = {
107
+ key: 1,
88
108
  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]"
89
- }, Tl = /* @__PURE__ */ Y({
109
+ }, Ja = /* @__PURE__ */ N({
90
110
  __name: "Button",
91
111
  props: {
92
112
  variant: { default: "primary" },
@@ -94,6 +114,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
94
114
  radius: { default: "full" },
95
115
  type: { default: "button" },
96
116
  disabled: { type: Boolean, default: !1 },
117
+ loading: { type: Boolean, default: !1 },
97
118
  badge: { default: 0 },
98
119
  ariaLabel: { default: "" },
99
120
  textColor: { default: void 0 },
@@ -101,8 +122,8 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
101
122
  },
102
123
  emits: ["click"],
103
124
  setup(t, { emit: m }) {
104
- const e = t, b = m, n = r(() => e.variant === "icon"), u = r(() => e.badge > 99 ? "99+" : e.badge.toString()), d = r(() => {
105
- const w = "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", y = {
125
+ const e = t, u = m, r = o(() => e.variant === "icon"), p = o(() => e.badge > 99 ? "99+" : e.badge.toString()), v = o(() => {
126
+ const b = "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 = {
106
127
  primary: "bg-primary-500 text-white hover:bg-primary-600 active:bg-primary-700 focus-visible:ring-primary-700",
107
128
  secondary: "bg-secondary-200 text-secondary-900 hover:bg-secondary-300 hover:text-secondary-800 focus-visible:ring-secondary-500",
108
129
  outline: "border border-secondary-300 bg-transparent hover:bg-secondary-100 focus-visible:ring-secondary-500",
@@ -110,37 +131,52 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
110
131
  danger: "bg-danger-600 text-white hover:bg-danger-700 focus-visible:ring-danger-600",
111
132
  icon: "hover:bg-secondary-100 focus-visible:ring-secondary-500 relative",
112
133
  text: "bg-transparent border-0 focus-visible:ring-0 focus-visible:ring-offset-0"
113
- }, h = {
114
- sm: n.value ? "p-1.5" : "h-8 px-3 text-sm",
115
- md: n.value ? "p-2" : "h-10 px-4 text-base",
116
- lg: n.value ? "p-3" : "h-12 px-6 text-lg"
117
- }, M = {
134
+ }, k = {
135
+ sm: r.value ? "p-1.5" : "h-8 px-3 text-sm",
136
+ md: r.value ? "p-2" : "h-10 px-4 text-base",
137
+ lg: r.value ? "p-3" : "h-12 px-6 text-lg"
138
+ }, g = {
118
139
  full: "rounded-full",
119
140
  xl: "rounded-2xl",
120
141
  lg: "rounded-xl",
121
142
  md: "rounded-lg",
122
143
  sm: "rounded-md",
123
144
  none: "rounded-none"
124
- }, B = e.textColor ? e.textColor : "", S = r(() => {
125
- var A, L;
126
- return e.textColorHover ? e.textColorHover : (A = e.textColor) != null && A.includes("white") || (L = e.textColor) != null && L.includes("50") ? "hover:text-black" : "";
145
+ }, y = e.textColor ? e.textColor : "", T = o(() => {
146
+ var L, A;
147
+ return e.textColorHover ? e.textColorHover : (L = e.textColor) != null && L.includes("white") || (A = e.textColor) != null && A.includes("50") ? "hover:text-black" : "";
127
148
  });
128
- return `${w} ${y[e.variant]} ${h[e.size]} ${M[e.radius]} ${B} ${S.value}`;
129
- }), i = (w) => {
130
- e.disabled || b("click", w);
149
+ return `${b} ${M[e.variant]} ${k[e.size]} ${g[e.radius]} ${y} ${T.value}`;
150
+ }), n = (b) => {
151
+ e.disabled || u("click", b);
131
152
  };
132
- return (w, y) => (s(), l("button", {
133
- class: c(d.value),
153
+ return (b, M) => (l(), a("button", {
154
+ class: c(v.value),
134
155
  type: t.type,
135
- disabled: t.disabled,
136
- onClick: i,
156
+ disabled: t.disabled || t.loading,
157
+ onClick: n,
137
158
  "aria-label": t.ariaLabel
138
159
  }, [
139
- I(w.$slots, "default"),
140
- n.value && t.badge && t.badge > 0 ? (s(), l("span", Je, $(u.value), 1)) : x("", !0)
141
- ], 10, Ue));
160
+ t.loading ? (l(), a("svg", Xe, [...M[0] || (M[0] = [
161
+ s("circle", {
162
+ class: "opacity-25",
163
+ cx: "12",
164
+ cy: "12",
165
+ r: "10",
166
+ stroke: "currentColor",
167
+ "stroke-width": "4"
168
+ }, null, -1),
169
+ s("path", {
170
+ class: "opacity-75",
171
+ fill: "currentColor",
172
+ 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"
173
+ }, null, -1)
174
+ ])])) : f("", !0),
175
+ O(b.$slots, "default"),
176
+ r.value && t.badge && t.badge > 0 ? (l(), a("span", _e, $(p.value), 1)) : f("", !0)
177
+ ], 10, Ze));
142
178
  }
143
- }), Ge = /* @__PURE__ */ Y({
179
+ }), et = /* @__PURE__ */ N({
144
180
  __name: "Icon",
145
181
  props: {
146
182
  name: {},
@@ -159,63 +195,69 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
159
195
  lg: "24px",
160
196
  xl: "30px",
161
197
  "2xl": "36px"
162
- }, b = (i, w) => {
163
- const y = i.replace(/_/g, "-");
164
- switch (w) {
198
+ }, u = (n, b) => {
199
+ const M = n.replace(/_/g, "-");
200
+ switch (b) {
165
201
  case "filled":
166
- return `material-symbols:${y}`;
202
+ return `material-symbols:${M}`;
167
203
  case "outlined":
168
- return `ic:outline-${y}`;
204
+ return `ic:outline-${M}`;
169
205
  case "rounded":
170
- return `ic:round-${y}`;
206
+ return `ic:round-${M}`;
171
207
  case "sharp":
172
- return `ic:sharp-${y}`;
208
+ return `ic:sharp-${M}`;
173
209
  case "two-tone":
174
- return `ic:twotone-${y}`;
210
+ return `ic:twotone-${M}`;
175
211
  default:
176
- return `material-symbols:${y}`;
212
+ return `material-symbols:${M}`;
177
213
  }
178
- }, n = r(() => b(m.name, m.variant)), u = r(() => {
179
- const i = [
214
+ }, r = o(() => u(m.name, m.variant)), p = o(() => {
215
+ const n = [
180
216
  "inline-flex items-center justify-center select-none",
181
217
  "transition-transform duration-200"
182
218
  ];
183
- return m.color && (m.color.startsWith("text-") || m.color.startsWith("fill-")) && i.push(m.color), m.spin && i.push("animate-spin"), i.join(" ");
184
- }), d = r(() => {
185
- const i = {};
186
- if (e[m.size] ? (i.fontSize = e[m.size], i.width = e[m.size], i.height = e[m.size]) : (i.fontSize = m.size, i.width = m.size, i.height = m.size), m.color && !m.color.startsWith("text-") && !m.color.startsWith("fill-") && (i.color = m.color), m.rotate !== 0) {
187
- const w = `rotate(${m.rotate}deg)`;
188
- i.transform = w;
219
+ return m.color && (m.color.startsWith("text-") || m.color.startsWith("fill-")) && n.push(m.color), m.spin && n.push("animate-spin"), n.join(" ");
220
+ }), v = o(() => {
221
+ const n = {};
222
+ if (e[m.size] ? (n.fontSize = e[m.size], n.width = e[m.size], n.height = e[m.size]) : (n.fontSize = m.size, n.width = m.size, n.height = m.size), m.color && !m.color.startsWith("text-") && !m.color.startsWith("fill-") && (n.color = m.color), m.rotate !== 0) {
223
+ const b = `rotate(${m.rotate}deg)`;
224
+ n.transform = b;
189
225
  }
190
- return i;
226
+ return n;
191
227
  });
192
- return (i, w) => (s(), ee(Fe(Pe), {
193
- icon: n.value,
194
- class: c(u.value),
195
- style: G(d.value),
228
+ return (n, b) => (l(), le(Re(Ye), {
229
+ icon: r.value,
230
+ class: c(p.value),
231
+ style: X(v.value),
196
232
  "aria-label": t.ariaLabel,
197
233
  role: t.ariaLabel ? "img" : void 0
198
234
  }, null, 8, ["icon", "class", "style", "aria-label", "role"]));
199
235
  }
200
- }), X = /* @__PURE__ */ U(Ge, [["__scopeId", "data-v-5f982e5c"]]), Qe = {
236
+ }), ee = /* @__PURE__ */ Z(et, [["__scopeId", "data-v-5f982e5c"]]), tt = {
201
237
  key: 0,
202
238
  class: "relative"
203
- }, Ze = ["for"], Xe = {
239
+ }, lt = ["for"], at = {
204
240
  key: 0,
205
241
  class: "text-danger-600"
206
- }, et = ["id", "disabled", "placeholder", "value", "required"], tt = ["disabled"], st = {
242
+ }, st = ["id", "disabled", "placeholder", "value", "required"], ot = ["disabled"], rt = {
207
243
  key: 1,
208
- class: "space-y-2"
209
- }, lt = {
244
+ class: "relative"
245
+ }, nt = ["for"], it = {
210
246
  key: 0,
211
247
  class: "text-danger-600"
212
- }, at = { class: "grid grid-cols-1 md:grid-cols-2 gap-2" }, ot = ["disabled", "placeholder", "value", "required"], rt = ["disabled"], nt = ["disabled", "placeholder", "value", "required"], it = ["disabled"], dt = {
248
+ }, dt = ["id", "disabled", "placeholder", "value", "required"], ut = ["disabled"], ct = {
213
249
  key: 2,
214
- class: "mt-1 text-sm text-danger-600"
215
- }, ut = {
250
+ class: "space-y-2"
251
+ }, ft = {
252
+ key: 0,
253
+ class: "text-danger-600"
254
+ }, pt = { class: "grid grid-cols-1 md:grid-cols-2 gap-2" }, vt = ["disabled", "placeholder", "value", "required"], bt = ["disabled"], mt = ["disabled", "placeholder", "value", "required"], gt = ["disabled"], yt = {
216
255
  key: 3,
256
+ class: "mt-1 text-sm text-danger-600"
257
+ }, ht = {
258
+ key: 4,
217
259
  class: "mt-1 text-sm text-secondary-600"
218
- }, ct = { class: "flex items-center justify-between mb-4" }, ft = { class: "flex items-center space-x-2" }, pt = ["value"], bt = ["value"], vt = { class: "grid grid-cols-7 gap-1 mb-2" }, gt = { class: "grid grid-cols-7 gap-1" }, yt = ["disabled", "onClick"], mt = { class: "flex justify-end space-x-2 mt-4 pt-4 border-t border-secondary-100" }, ht = ["disabled"], xt = /* @__PURE__ */ Y({
260
+ }, xt = { class: "flex items-center justify-between mb-4" }, wt = { class: "flex items-center space-x-2" }, kt = ["value"], Ct = ["value"], $t = { class: "grid grid-cols-7 gap-1 mb-2" }, Bt = { class: "grid grid-cols-7 gap-1" }, Mt = ["disabled", "onClick"], zt = { class: "flex justify-end space-x-2 mt-4 pt-4 border-t border-secondary-100" }, Dt = ["disabled"], Vt = /* @__PURE__ */ N({
219
261
  __name: "Calendar",
220
262
  props: {
221
263
  modelValue: {},
@@ -239,11 +281,15 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
239
281
  maxDate: {},
240
282
  disabledDates: {},
241
283
  dateFormat: { default: "DD/MM/YYYY" },
242
- bordered: { type: Boolean, default: !0 }
284
+ bordered: { type: Boolean, default: !0 },
285
+ locale: { default: "es" },
286
+ showWeekNumbers: { type: Boolean, default: !1 },
287
+ firstDayOfWeek: { default: 1 },
288
+ yearsPerRow: { default: 4 }
243
289
  },
244
- emits: ["update:modelValue", "date-select", "range-select"],
290
+ emits: ["update:modelValue", "date-select", "range-select", "multiple-select"],
245
291
  setup(t, { emit: m }) {
246
- const e = t, b = m, n = F(!1), u = F(null), d = F((/* @__PURE__ */ new Date()).getMonth()), i = F((/* @__PURE__ */ new Date()).getFullYear()), w = F(`calendar-${Math.random().toString(36).substr(2, 9)}`), y = F(null), h = F(null), M = [
292
+ const e = t, u = q([]), r = m, p = q(!1), v = q(null), n = q((/* @__PURE__ */ new Date()).getMonth()), b = q((/* @__PURE__ */ new Date()).getFullYear()), M = q(`calendar-${Math.random().toString(36).substr(2, 9)}`), k = q(null), g = q(null), y = [
247
293
  "Enero",
248
294
  "Febrero",
249
295
  "Marzo",
@@ -256,44 +302,44 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
256
302
  "Octubre",
257
303
  "Noviembre",
258
304
  "Diciembre"
259
- ], B = ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"], S = r(() => ({ sm: "xs", md: "sm", lg: "md" })[e.size] || "sm"), A = r(() => {
260
- const k = (/* @__PURE__ */ new Date()).getFullYear(), z = [];
261
- for (let T = k - 100; T <= k + 10; T++)
262
- z.push(T);
263
- return z;
264
- }), L = r(() => "ds-label"), _ = r(() => e.bordered ? "border border-neutral-300" : ""), V = r(() => {
265
- const k = "w-full rounded-md transition-colors focus:outline-none focus:ring-2 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer", z = {
305
+ ], T = ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"], L = o(() => ({ sm: "xs", md: "sm", lg: "md" })[e.size] || "sm"), A = o(() => {
306
+ const w = (/* @__PURE__ */ new Date()).getFullYear(), D = [];
307
+ for (let S = w - 100; S <= w + 10; S++)
308
+ D.push(S);
309
+ return D;
310
+ }), F = o(() => "ds-label"), W = o(() => e.bordered ? "border border-neutral-300" : ""), I = o(() => {
311
+ const w = "w-full rounded-md transition-colors focus:outline-none focus:ring-2 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer", D = {
266
312
  sm: "px-3 py-1.5 pr-10 text-sm",
267
313
  md: "px-4 py-2 pr-10 text-base",
268
314
  lg: "px-5 py-3 pr-12 text-lg"
269
- }, T = {
315
+ }, S = {
270
316
  primary: "focus:ring-primary-500",
271
317
  secondary: "focus:ring-secondary-500"
272
- }, P = {
318
+ }, E = {
273
319
  default: "bg-white",
274
320
  filled: "bg-secondary-100",
275
321
  outlined: "bg-transparent"
276
- }, Q = e.error ? "border-danger-600 focus:ring-danger-500" : "";
277
- return `${k} ${z[e.size]} ${P[e.variant]} ${T[e.color]} ${Q}`;
278
- }), f = r(() => `transition-colors text-[#565656] hover:text-[#565656] opacity-80 hover:opacity-100 ${e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`), v = r(() => "min-w-80 max-w-sm"), O = r(() => `p-2 rounded-md transition-colors ${{
322
+ }, _ = e.error ? "border-danger-600 focus:ring-danger-500" : "";
323
+ return `${w} ${D[e.size]} ${E[e.variant]} ${S[e.color]} ${_}`;
324
+ }), B = o(() => `transition-colors text-[#565656] hover:text-[#565656] opacity-80 hover:opacity-100 ${e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`), V = o(() => "min-w-80 max-w-sm"), P = o(() => `p-2 rounded-md transition-colors ${{
279
325
  primary: "text-primary-600 hover:text-primary-700 hover:bg-primary-50",
280
326
  secondary: "text-secondary-600 hover:text-secondary-700 hover:bg-secondary-50"
281
- }[e.color]}`), C = r(() => `px-2 py-1 text-sm border border-secondary-300 rounded-md focus:outline-none focus:ring-1 ${{
327
+ }[e.color]}`), j = o(() => `px-2 py-1 text-sm border border-secondary-300 rounded-md focus:outline-none focus:ring-1 ${{
282
328
  primary: "focus:border-primary-500 focus:ring-primary-500",
283
329
  secondary: "focus:border-secondary-500 focus:ring-secondary-500"
284
- }[e.color]}`), j = r(() => `px-3 py-1.5 text-sm text-white rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-1 disabled:opacity-50 disabled:cursor-not-allowed ${{
330
+ }[e.color]}`), h = o(() => `px-3 py-1.5 text-sm text-white rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-1 disabled:opacity-50 disabled:cursor-not-allowed ${{
285
331
  primary: "bg-primary-600 hover:bg-primary-700 focus:ring-primary-500",
286
332
  secondary: "bg-secondary-600 hover:bg-secondary-700 focus:ring-secondary-500"
287
- }[e.color]}`), p = r(() => `px-3 py-1.5 text-sm border border-secondary-300 rounded-md transition-colors focus:outline-none ${{
333
+ }[e.color]}`), d = o(() => `px-3 py-1.5 text-sm border border-secondary-300 rounded-md transition-colors focus:outline-none ${{
288
334
  primary: "text-primary-600 hover:text-primary-700 hover:bg-primary-50",
289
335
  secondary: "text-secondary-600 hover:text-secondary-700 hover:bg-secondary-50"
290
- }[e.color]}`), o = r(() => e.mode === "single" && e.modelValue && e.modelValue instanceof Date ? N(e.modelValue) : ""), g = r(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue && e.modelValue.start ? N(e.modelValue.start) : ""), D = r(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "end" in e.modelValue && e.modelValue.end ? N(e.modelValue.end) : ""), Z = r(() => e.mode === "single" ? y.value !== null : y.value !== null && h.value !== null && h.value >= y.value);
291
- r(() => e.mode === "range" && y.value && h.value ? h.value < y.value : !1);
292
- const R = r(() => {
293
- const k = new Date(i.value, d.value, 1), z = new Date(i.value, d.value + 1, 0), T = k.getDay(), P = z.getDate(), Q = [], te = new Date(i.value, d.value - 1, 0);
294
- for (let W = T - 1; W >= 0; W--) {
295
- const se = new Date(i.value, d.value - 1, te.getDate() - W);
296
- Q.push({
336
+ }[e.color]}`), C = o(() => e.mode === "single" && e.modelValue && e.modelValue instanceof Date ? H(e.modelValue) : ""), i = o(() => e.mode === "multiple" && Array.isArray(e.modelValue) && e.modelValue.length > 0 ? e.modelValue.length === 1 ? H(e.modelValue[0]) : `${e.modelValue.length} fechas seleccionadas` : ""), z = o(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue && e.modelValue.start ? H(e.modelValue.start) : ""), x = o(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "end" in e.modelValue && e.modelValue.end ? H(e.modelValue.end) : ""), te = o(() => e.mode === "single" ? k.value !== null : e.mode === "multiple" ? u.value.length > 0 : k.value !== null && g.value !== null && g.value >= k.value);
337
+ o(() => e.mode === "range" && k.value && g.value ? g.value < k.value : !1);
338
+ const R = o(() => {
339
+ const w = new Date(b.value, n.value, 1), D = new Date(b.value, n.value + 1, 0), S = w.getDay(), E = D.getDate(), _ = [], ae = new Date(b.value, n.value - 1, 0);
340
+ for (let U = S - 1; U >= 0; U--) {
341
+ const se = new Date(b.value, n.value - 1, ae.getDate() - U);
342
+ _.push({
297
343
  day: se.getDate(),
298
344
  date: se,
299
345
  isCurrentMonth: !1,
@@ -301,58 +347,58 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
301
347
  key: `prev-${se.getDate()}`
302
348
  });
303
349
  }
304
- for (let W = 1; W <= P; W++) {
305
- const se = new Date(i.value, d.value, W);
306
- Q.push({
307
- day: W,
350
+ for (let U = 1; U <= E; U++) {
351
+ const se = new Date(b.value, n.value, U);
352
+ _.push({
353
+ day: U,
308
354
  date: se,
309
355
  isCurrentMonth: !0,
310
356
  disabled: !1,
311
- key: `current-${W}`
357
+ key: `current-${U}`
312
358
  });
313
359
  }
314
- const Ae = 42 - Q.length;
315
- for (let W = 1; W <= Ae; W++) {
316
- const se = new Date(i.value, d.value + 1, W);
317
- Q.push({
318
- day: W,
360
+ const Pe = 42 - _.length;
361
+ for (let U = 1; U <= Pe; U++) {
362
+ const se = new Date(b.value, n.value + 1, U);
363
+ _.push({
364
+ day: U,
319
365
  date: se,
320
366
  isCurrentMonth: !1,
321
367
  disabled: !1,
322
- key: `next-${W}`
368
+ key: `next-${U}`
323
369
  });
324
370
  }
325
- return Q;
326
- }), N = (k) => {
327
- const z = k.getDate().toString().padStart(2, "0"), T = (k.getMonth() + 1).toString().padStart(2, "0"), P = k.getFullYear();
371
+ return _;
372
+ }), H = (w) => {
373
+ const D = w.getDate().toString().padStart(2, "0"), S = (w.getMonth() + 1).toString().padStart(2, "0"), E = w.getFullYear();
328
374
  switch (e.dateFormat) {
329
375
  case "MM/DD/YYYY":
330
- return `${T}/${z}/${P}`;
376
+ return `${S}/${D}/${E}`;
331
377
  case "YYYY-MM-DD":
332
- return `${P}-${T}-${z}`;
378
+ return `${E}-${S}-${D}`;
333
379
  case "DD/MM/YYYY":
334
380
  default:
335
- return `${z}/${T}/${P}`;
381
+ return `${D}/${S}/${E}`;
336
382
  }
337
- }, ge = (k) => {
338
- var T;
339
- const z = new Date(k.getFullYear(), k.getMonth(), k.getDate());
383
+ }, ye = (w) => {
384
+ var S;
385
+ const D = new Date(w.getFullYear(), w.getMonth(), w.getDate());
340
386
  if (e.minDate) {
341
- const P = new Date(e.minDate.getFullYear(), e.minDate.getMonth(), e.minDate.getDate());
342
- if (z < P) return !0;
387
+ const E = new Date(e.minDate.getFullYear(), e.minDate.getMonth(), e.minDate.getDate());
388
+ if (D < E) return !0;
343
389
  }
344
390
  if (e.maxDate) {
345
- const P = new Date(e.maxDate.getFullYear(), e.maxDate.getMonth(), e.maxDate.getDate());
346
- if (z > P) return !0;
391
+ const E = new Date(e.maxDate.getFullYear(), e.maxDate.getMonth(), e.maxDate.getDate());
392
+ if (D > E) return !0;
347
393
  }
348
- return !!((T = e.disabledDates) != null && T.some(
349
- (P) => P.toDateString() === k.toDateString()
394
+ return !!((S = e.disabledDates) != null && S.some(
395
+ (E) => E.toDateString() === w.toDateString()
350
396
  ));
351
- }, Be = (k) => {
352
- const z = "w-8 h-8 text-sm rounded-md transition-colors focus:outline-none";
353
- if (k.disabled || ge(k.date))
354
- return `${z} text-secondary-400 cursor-not-allowed`;
355
- const T = ze(k.date), P = De(k.date), Q = Ve(k.date), te = {
397
+ }, Ie = (w) => {
398
+ const D = "w-8 h-8 text-sm rounded-md transition-colors focus:outline-none";
399
+ if (w.disabled || ye(w.date))
400
+ return `${D} text-secondary-400 cursor-not-allowed`;
401
+ const S = je(w.date), E = Le(w.date), _ = Oe(w.date), ae = {
356
402
  primary: {
357
403
  selected: "bg-primary-600 text-white",
358
404
  inRange: "bg-primary-100 text-primary-900",
@@ -368,381 +414,479 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
368
414
  otherMonth: "text-secondary-400 hover:bg-secondary-50 hover:text-secondary-600"
369
415
  }
370
416
  };
371
- return T ? `${z} ${te[e.color].selected}` : P ? `${z} ${te[e.color].inRange}` : Q ? `${z} ${te[e.color].today}` : k.isCurrentMonth ? `${z} ${te[e.color].default}` : `${z} ${te[e.color].otherMonth}`;
372
- }, ze = (k) => e.mode === "single" ? y.value ? ae(k, y.value) : !1 : !!(y.value && ae(k, y.value)) || !!(h.value && ae(k, h.value)), De = (k) => {
373
- if (e.mode !== "range" || !y.value || !h.value)
417
+ return S ? `${D} ${ae[e.color].selected}` : E ? `${D} ${ae[e.color].inRange}` : _ ? `${D} ${ae[e.color].today}` : w.isCurrentMonth ? `${D} ${ae[e.color].default}` : `${D} ${ae[e.color].otherMonth}`;
418
+ }, je = (w) => e.mode === "single" ? k.value ? oe(w, k.value) : !1 : e.mode === "multiple" ? u.value.some((D) => oe(w, D)) : !!(k.value && oe(w, k.value)) || !!(g.value && oe(w, g.value)), Le = (w) => {
419
+ if (e.mode !== "range" || !k.value || !g.value)
374
420
  return !1;
375
- const z = y.value, T = h.value;
376
- return k > z && k < T;
377
- }, Ve = (k) => ae(k, /* @__PURE__ */ new Date()), ae = (k, z) => k.toDateString() === z.toDateString(), Se = () => {
378
- e.disabled || n.value || oe();
379
- }, Te = () => {
380
- e.disabled || n.value || oe();
381
- }, Ie = () => {
382
- e.disabled || xe();
383
- }, ye = (k) => {
384
- e.disabled || (ne(k), n.value || oe());
385
- }, me = (k) => {
386
- e.disabled || (ne(k), n.value || oe());
387
- }, he = (k) => {
388
- e.disabled || (ne(k), xe());
389
- }, ne = (k) => {
390
- u.value = k;
421
+ const D = k.value, S = g.value;
422
+ return w > D && w < S;
423
+ }, Oe = (w) => oe(w, /* @__PURE__ */ new Date()), oe = (w, D) => w.toDateString() === D.toDateString(), he = () => {
424
+ e.disabled || p.value || ne();
391
425
  }, xe = () => {
392
- e.disabled || (n.value = !n.value, n.value && de());
393
- }, oe = () => {
394
- e.disabled || (n.value = !0, de());
395
- }, ie = () => {
396
- n.value = !1, u.value = null;
397
- }, de = () => {
398
- e.mode === "single" ? (y.value = e.modelValue instanceof Date ? e.modelValue : null, h.value = null) : e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue ? (y.value = e.modelValue.start, h.value = e.modelValue.end) : (y.value = null, h.value = null);
399
- }, je = (k) => {
400
- e.mode === "single" ? (y.value = k, h.value = null) : u.value === "start" || !y.value ? (y.value = k, h.value = null, u.value = "end") : (u.value === "end" || !h.value) && (k < y.value ? (h.value = y.value, y.value = k) : h.value = k, u.value = null);
401
- }, Le = () => {
426
+ e.disabled || p.value || ne();
427
+ }, we = () => {
428
+ e.disabled || Be();
429
+ }, ke = (w) => {
430
+ e.disabled || (ue(w), p.value || ne());
431
+ }, Ce = (w) => {
432
+ e.disabled || (ue(w), p.value || ne());
433
+ }, $e = (w) => {
434
+ e.disabled || (ue(w), Be());
435
+ }, ue = (w) => {
436
+ v.value = w;
437
+ }, Be = () => {
438
+ e.disabled || (p.value = !p.value, p.value && fe());
439
+ }, ne = () => {
440
+ e.disabled || (p.value = !0, fe());
441
+ }, ce = () => {
442
+ p.value = !1, v.value = null;
443
+ }, fe = () => {
444
+ e.mode === "single" ? (k.value = e.modelValue instanceof Date ? e.modelValue : null, g.value = null) : e.mode === "multiple" ? u.value = Array.isArray(e.modelValue) ? [...e.modelValue] : [] : e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue ? (k.value = e.modelValue.start, g.value = e.modelValue.end) : (k.value = null, g.value = null);
445
+ }, Ae = (w) => {
446
+ if (e.mode === "single")
447
+ k.value = w, g.value = null;
448
+ else if (e.mode === "multiple") {
449
+ const D = u.value.findIndex((S) => oe(S, w));
450
+ D >= 0 ? u.value.splice(D, 1) : u.value.push(w);
451
+ } else
452
+ v.value === "start" || !k.value ? (k.value = w, g.value = null, v.value = "end") : (v.value === "end" || !g.value) && (w < k.value ? (g.value = k.value, k.value = w) : g.value = w, v.value = null);
453
+ }, Fe = () => {
402
454
  if (e.mode === "single")
403
- b("update:modelValue", y.value), y.value && b("date-select", y.value);
404
- else {
405
- const k = { start: y.value, end: h.value };
406
- b("update:modelValue", k), b("range-select", k);
455
+ r("update:modelValue", k.value), k.value && r("date-select", k.value);
456
+ else if (e.mode === "multiple") {
457
+ const w = [...u.value].sort((D, S) => D.getTime() - S.getTime());
458
+ r("update:modelValue", w), r("multiple-select", w);
459
+ } else {
460
+ const w = { start: k.value, end: g.value };
461
+ r("update:modelValue", w), r("range-select", w);
407
462
  }
408
- ie();
409
- }, Oe = () => {
410
- d.value === 0 ? (d.value = 11, i.value--) : d.value--;
411
- }, _e = () => {
412
- d.value === 11 ? (d.value = 0, i.value++) : d.value++;
413
- }, ke = () => {
414
- }, ue = F(), we = (k) => {
415
- ue.value && !ue.value.contains(k.target) && ie();
463
+ ce();
464
+ }, We = () => {
465
+ n.value === 0 ? (n.value = 11, b.value--) : n.value--;
466
+ }, qe = () => {
467
+ n.value === 11 ? (n.value = 0, b.value++) : n.value++;
468
+ }, Me = () => {
469
+ }, pe = q(), ze = (w) => {
470
+ pe.value && !pe.value.contains(w.target) && ce();
416
471
  };
417
- return Ce(() => {
418
- document.addEventListener("click", we);
419
- }), Me(() => {
420
- document.removeEventListener("click", we);
421
- }), pe(() => e.modelValue, (k) => {
422
- n.value || de();
423
- }, { deep: !0 }), (k, z) => (s(), l("div", {
472
+ return Te(() => {
473
+ document.addEventListener("click", ze);
474
+ }), Se(() => {
475
+ document.removeEventListener("click", ze);
476
+ }), de(() => e.modelValue, (w) => {
477
+ p.value || fe();
478
+ }, { deep: !0 }), (w, D) => (l(), a("div", {
424
479
  ref_key: "calendarWrapperRef",
425
- ref: ue,
480
+ ref: pe,
426
481
  class: "calendar-wrapper"
427
482
  }, [
428
- t.mode === "single" ? (s(), l("div", Qe, [
429
- t.label && t.showLabel ? (s(), l("label", {
483
+ t.mode === "single" ? (l(), a("div", tt, [
484
+ t.label && t.showLabel ? (l(), a("label", {
430
485
  key: 0,
431
- for: w.value,
432
- class: c(L.value)
486
+ for: M.value,
487
+ class: c(F.value)
433
488
  }, [
434
- q($(t.label) + " ", 1),
435
- t.required ? (s(), l("span", Xe, "*")) : x("", !0)
436
- ], 10, Ze)) : x("", !0),
437
- a("div", {
438
- class: c(["relative rounded-md", _.value])
489
+ Y($(t.label) + " ", 1),
490
+ t.required ? (l(), a("span", at, "*")) : f("", !0)
491
+ ], 10, lt)) : f("", !0),
492
+ s("div", {
493
+ class: c(["relative rounded-md", W.value])
439
494
  }, [
440
- a("input", {
441
- id: w.value,
442
- class: c(V.value),
495
+ s("input", {
496
+ id: M.value,
497
+ class: c(I.value),
443
498
  type: "text",
444
499
  disabled: t.disabled,
445
500
  placeholder: t.placeholder || "Seleccionar fecha",
446
- value: o.value,
501
+ value: C.value,
502
+ required: t.required,
503
+ readonly: !0,
504
+ onClick: he,
505
+ onFocus: xe
506
+ }, null, 42, st),
507
+ s("button", {
508
+ type: "button",
509
+ class: c(["absolute right-3 top-1/2 -translate-y-1/2", B.value]),
510
+ onClick: J(we, ["stop"]),
511
+ disabled: t.disabled
512
+ }, [
513
+ Q(ee, {
514
+ name: t.iconName,
515
+ size: L.value
516
+ }, null, 8, ["name", "size"])
517
+ ], 10, ot)
518
+ ], 2)
519
+ ])) : t.mode === "multiple" ? (l(), a("div", rt, [
520
+ t.label && t.showLabel ? (l(), a("label", {
521
+ key: 0,
522
+ for: M.value,
523
+ class: c(F.value)
524
+ }, [
525
+ Y($(t.label) + " ", 1),
526
+ t.required ? (l(), a("span", it, "*")) : f("", !0)
527
+ ], 10, nt)) : f("", !0),
528
+ s("div", {
529
+ class: c(["relative rounded-md", W.value])
530
+ }, [
531
+ s("input", {
532
+ id: M.value,
533
+ class: c(I.value),
534
+ type: "text",
535
+ disabled: t.disabled,
536
+ placeholder: t.placeholder || "Seleccionar fechas",
537
+ value: i.value,
447
538
  required: t.required,
448
539
  readonly: !0,
449
- onClick: Se,
450
- onFocus: Te
451
- }, null, 42, et),
452
- a("button", {
540
+ onClick: he,
541
+ onFocus: xe
542
+ }, null, 42, dt),
543
+ s("button", {
453
544
  type: "button",
454
- class: c(["absolute right-3 top-1/2 -translate-y-1/2", f.value]),
455
- onClick: K(Ie, ["stop"]),
545
+ class: c(["absolute right-3 top-1/2 -translate-y-1/2", B.value]),
546
+ onClick: J(we, ["stop"]),
456
547
  disabled: t.disabled
457
548
  }, [
458
- J(X, {
549
+ Q(ee, {
459
550
  name: t.iconName,
460
- size: S.value
551
+ size: L.value
461
552
  }, null, 8, ["name", "size"])
462
- ], 10, tt)
553
+ ], 10, ut)
463
554
  ], 2)
464
- ])) : (s(), l("div", st, [
465
- t.label && t.showLabel ? (s(), l("label", {
555
+ ])) : (l(), a("div", ct, [
556
+ t.label && t.showLabel ? (l(), a("label", {
466
557
  key: 0,
467
- class: c(L.value)
558
+ class: c(F.value)
468
559
  }, [
469
- q($(t.label) + " ", 1),
470
- t.required ? (s(), l("span", lt, "*")) : x("", !0)
471
- ], 2)) : x("", !0),
472
- a("div", at, [
473
- a("div", {
474
- class: c(["relative rounded-md", _.value])
560
+ Y($(t.label) + " ", 1),
561
+ t.required ? (l(), a("span", ft, "*")) : f("", !0)
562
+ ], 2)) : f("", !0),
563
+ s("div", pt, [
564
+ s("div", {
565
+ class: c(["relative rounded-md", W.value])
475
566
  }, [
476
- a("input", {
477
- class: c(V.value),
567
+ s("input", {
568
+ class: c(I.value),
478
569
  type: "text",
479
570
  disabled: t.disabled,
480
571
  placeholder: t.startPlaceholder || "Fecha desde",
481
- value: g.value,
572
+ value: z.value,
482
573
  required: t.required,
483
574
  readonly: !0,
484
- onClick: z[0] || (z[0] = () => ye("start")),
485
- onFocus: z[1] || (z[1] = () => me("start"))
486
- }, null, 42, ot),
487
- a("button", {
575
+ onClick: D[0] || (D[0] = () => ke("start")),
576
+ onFocus: D[1] || (D[1] = () => Ce("start"))
577
+ }, null, 42, vt),
578
+ s("button", {
488
579
  type: "button",
489
- class: c(["absolute right-3 top-1/2 -translate-y-1/2", f.value]),
490
- onClick: z[2] || (z[2] = K(() => he("start"), ["stop"])),
580
+ class: c(["absolute right-3 top-1/2 -translate-y-1/2", B.value]),
581
+ onClick: D[2] || (D[2] = J(() => $e("start"), ["stop"])),
491
582
  disabled: t.disabled
492
583
  }, [
493
- J(X, {
584
+ Q(ee, {
494
585
  name: t.startIconName,
495
- size: S.value
586
+ size: L.value
496
587
  }, null, 8, ["name", "size"])
497
- ], 10, rt)
588
+ ], 10, bt)
498
589
  ], 2),
499
- a("div", {
500
- class: c(["relative rounded-md", _.value])
590
+ s("div", {
591
+ class: c(["relative rounded-md", W.value])
501
592
  }, [
502
- a("input", {
503
- class: c(V.value),
593
+ s("input", {
594
+ class: c(I.value),
504
595
  type: "text",
505
596
  disabled: t.disabled,
506
597
  placeholder: t.endPlaceholder || "Fecha hasta",
507
- value: D.value,
598
+ value: x.value,
508
599
  required: t.required,
509
600
  readonly: !0,
510
- onClick: z[3] || (z[3] = () => ye("end")),
511
- onFocus: z[4] || (z[4] = () => me("end"))
512
- }, null, 42, nt),
513
- a("button", {
601
+ onClick: D[3] || (D[3] = () => ke("end")),
602
+ onFocus: D[4] || (D[4] = () => Ce("end"))
603
+ }, null, 42, mt),
604
+ s("button", {
514
605
  type: "button",
515
- class: c(["absolute right-3 top-1/2 -translate-y-1/2", f.value]),
516
- onClick: z[5] || (z[5] = K(() => he("end"), ["stop"])),
606
+ class: c(["absolute right-3 top-1/2 -translate-y-1/2", B.value]),
607
+ onClick: D[5] || (D[5] = J(() => $e("end"), ["stop"])),
517
608
  disabled: t.disabled
518
609
  }, [
519
- J(X, {
610
+ Q(ee, {
520
611
  name: t.endIconName,
521
- size: S.value
612
+ size: L.value
522
613
  }, null, 8, ["name", "size"])
523
- ], 10, it)
614
+ ], 10, gt)
524
615
  ], 2)
525
616
  ])
526
617
  ])),
527
- t.error ? (s(), l("p", dt, $(t.error), 1)) : t.helperText ? (s(), l("p", ut, $(t.helperText), 1)) : x("", !0),
528
- n.value ? (s(), l("div", {
529
- key: 4,
530
- class: c(["absolute top-full mt-1 left-0 bg-white rounded-lg shadow-lg border border-secondary-200 z-50 overflow-hidden p-4", v.value]),
531
- onClick: z[8] || (z[8] = K(() => {
618
+ t.error ? (l(), a("p", yt, $(t.error), 1)) : t.helperText ? (l(), a("p", ht, $(t.helperText), 1)) : f("", !0),
619
+ p.value ? (l(), a("div", {
620
+ key: 5,
621
+ class: c(["absolute top-full mt-1 left-0 bg-white rounded-lg shadow-lg border border-secondary-200 z-50 overflow-hidden p-4", V.value]),
622
+ onClick: D[8] || (D[8] = J(() => {
532
623
  }, ["stop"]))
533
624
  }, [
534
- a("div", ct, [
535
- a("button", {
625
+ s("div", xt, [
626
+ s("button", {
536
627
  type: "button",
537
- onClick: Oe,
538
- class: c(O.value)
628
+ onClick: We,
629
+ class: c(P.value)
539
630
  }, [
540
- J(X, {
631
+ Q(ee, {
541
632
  name: "chevron-left",
542
633
  size: "sm"
543
634
  })
544
635
  ], 2),
545
- a("div", ft, [
546
- ce(a("select", {
547
- "onUpdate:modelValue": z[6] || (z[6] = (T) => d.value = T),
548
- class: c(C.value),
549
- onChange: ke
636
+ s("div", wt, [
637
+ ve(s("select", {
638
+ "onUpdate:modelValue": D[6] || (D[6] = (S) => n.value = S),
639
+ class: c(j.value),
640
+ onChange: Me
550
641
  }, [
551
- (s(), l(E, null, H(M, (T, P) => a("option", {
552
- key: P,
553
- value: P
554
- }, $(T), 9, pt)), 64))
642
+ (l(), a(K, null, G(y, (S, E) => s("option", {
643
+ key: E,
644
+ value: E
645
+ }, $(S), 9, kt)), 64))
555
646
  ], 34), [
556
- [$e, d.value]
647
+ [De, n.value]
557
648
  ]),
558
- ce(a("select", {
559
- "onUpdate:modelValue": z[7] || (z[7] = (T) => i.value = T),
560
- class: c(C.value),
561
- onChange: ke
649
+ ve(s("select", {
650
+ "onUpdate:modelValue": D[7] || (D[7] = (S) => b.value = S),
651
+ class: c(j.value),
652
+ onChange: Me
562
653
  }, [
563
- (s(!0), l(E, null, H(A.value, (T) => (s(), l("option", {
564
- key: T,
565
- value: T
566
- }, $(T), 9, bt))), 128))
654
+ (l(!0), a(K, null, G(A.value, (S) => (l(), a("option", {
655
+ key: S,
656
+ value: S
657
+ }, $(S), 9, Ct))), 128))
567
658
  ], 34), [
568
- [$e, i.value]
659
+ [De, b.value]
569
660
  ])
570
661
  ]),
571
- a("button", {
662
+ s("button", {
572
663
  type: "button",
573
- onClick: _e,
574
- class: c(O.value)
664
+ onClick: qe,
665
+ class: c(P.value)
575
666
  }, [
576
- J(X, {
667
+ Q(ee, {
577
668
  name: "chevron-right",
578
669
  size: "sm"
579
670
  })
580
671
  ], 2)
581
672
  ]),
582
- a("div", vt, [
583
- (s(), l(E, null, H(B, (T) => a("div", {
584
- key: T,
673
+ s("div", $t, [
674
+ (l(), a(K, null, G(T, (S) => s("div", {
675
+ key: S,
585
676
  class: "text-center text-sm font-medium text-secondary-600 py-2"
586
- }, $(T), 1)), 64))
677
+ }, $(S), 1)), 64))
587
678
  ]),
588
- a("div", gt, [
589
- (s(!0), l(E, null, H(R.value, (T) => (s(), l("button", {
590
- key: T.key,
679
+ s("div", Bt, [
680
+ (l(!0), a(K, null, G(R.value, (S) => (l(), a("button", {
681
+ key: S.key,
591
682
  type: "button",
592
- class: c(Be(T)),
593
- disabled: T.disabled || ge(T.date),
594
- onClick: (P) => je(T.date)
595
- }, $(T.day), 11, yt))), 128))
683
+ class: c(Ie(S)),
684
+ disabled: S.disabled || ye(S.date),
685
+ onClick: (E) => Ae(S.date)
686
+ }, $(S.day), 11, Mt))), 128))
596
687
  ]),
597
- a("div", mt, [
598
- a("button", {
688
+ s("div", zt, [
689
+ s("button", {
599
690
  type: "button",
600
- class: c(p.value),
601
- onClick: ie
691
+ class: c(d.value),
692
+ onClick: ce
602
693
  }, " Cancelar ", 2),
603
- a("button", {
694
+ s("button", {
604
695
  type: "button",
605
- class: c(j.value),
606
- onClick: Le,
607
- disabled: !Z.value
608
- }, " Confirmar ", 10, ht)
696
+ class: c(h.value),
697
+ onClick: Fe,
698
+ disabled: !te.value
699
+ }, " Confirmar ", 10, Dt)
609
700
  ])
610
- ], 2)) : x("", !0)
701
+ ], 2)) : f("", !0)
611
702
  ], 512));
612
703
  }
613
- }), Il = /* @__PURE__ */ U(xt, [["__scopeId", "data-v-aac22628"]]), kt = {
704
+ }), Ga = /* @__PURE__ */ Z(Vt, [["__scopeId", "data-v-97dc04bb"]]), Tt = ["role", "tabindex"], St = {
614
705
  key: 0,
615
706
  class: "border-b border-gray-100 px-6 py-4"
616
- }, wt = { class: "px-6 py-4" }, $t = {
707
+ }, It = { class: "px-6 py-4" }, jt = {
617
708
  key: 1,
618
709
  class: "border-t border-gray-100 px-6 py-4 bg-gray-50"
619
- }, jl = /* @__PURE__ */ Y({
710
+ }, Qa = /* @__PURE__ */ N({
620
711
  __name: "Card",
621
712
  props: {
622
713
  shadow: { default: "md" },
623
714
  rounded: { default: "lg" },
624
- bordered: { type: Boolean, default: !1 }
715
+ bordered: { type: Boolean, default: !1 },
716
+ hoverable: { type: Boolean, default: !1 },
717
+ clickable: { type: Boolean, default: !1 },
718
+ disabled: { type: Boolean, default: !1 }
625
719
  },
626
- setup(t) {
627
- const m = t, e = {
720
+ emits: ["click"],
721
+ setup(t, { emit: m }) {
722
+ const e = t, u = m, r = {
628
723
  none: "",
629
724
  sm: "shadow-sm",
630
725
  md: "shadow",
631
726
  lg: "shadow-lg",
632
727
  xl: "shadow-xl"
633
- }, b = {
728
+ }, p = {
634
729
  none: "rounded-none",
635
730
  sm: "rounded-sm",
636
731
  md: "rounded-md",
637
732
  lg: "rounded-lg",
638
733
  xl: "rounded-xl",
639
734
  full: "rounded-full"
640
- }, n = r(() => [
735
+ }, v = o(() => [
641
736
  "w-full bg-white",
642
- e[m.shadow],
643
- b[m.rounded],
644
- m.bordered ? "border border-gray-200" : ""
645
- ]);
646
- return (u, d) => (s(), l("div", {
647
- class: c(n.value)
737
+ r[e.shadow],
738
+ p[e.rounded],
739
+ e.bordered ? "border border-gray-200" : "",
740
+ e.hoverable || e.clickable ? "transition-all duration-200" : "",
741
+ e.hoverable ? "hover:shadow-lg" : "",
742
+ e.clickable && !e.disabled ? "cursor-pointer hover:shadow-lg" : "",
743
+ e.clickable && e.disabled ? "opacity-50 cursor-not-allowed" : ""
744
+ ]), n = (b) => {
745
+ !e.disabled && e.clickable && u("click", b);
746
+ };
747
+ return (b, M) => (l(), a("div", {
748
+ class: c(v.value),
749
+ role: t.clickable ? "button" : void 0,
750
+ tabindex: t.clickable ? 0 : void 0,
751
+ onClick: n,
752
+ onKeydown: [
753
+ Ve(n, ["enter"]),
754
+ Ve(n, ["space"])
755
+ ]
648
756
  }, [
649
- u.$slots.header ? (s(), l("div", kt, [
650
- I(u.$slots, "header")
651
- ])) : x("", !0),
652
- a("div", wt, [
653
- I(u.$slots, "default")
757
+ b.$slots.header ? (l(), a("div", St, [
758
+ O(b.$slots, "header")
759
+ ])) : f("", !0),
760
+ s("div", It, [
761
+ O(b.$slots, "default")
654
762
  ]),
655
- u.$slots.footer ? (s(), l("div", $t, [
656
- I(u.$slots, "footer")
657
- ])) : x("", !0)
658
- ], 2));
763
+ b.$slots.footer ? (l(), a("div", jt, [
764
+ O(b.$slots, "footer")
765
+ ])) : f("", !0)
766
+ ], 42, Tt));
659
767
  }
660
- }), Ct = { class: "flex items-center justify-between border-b border-gray-100/60 px-8 py-6" }, Mt = { class: "text-xl font-semibold text-gray-900" }, Bt = { class: "px-8 py-6" }, zt = {
768
+ }), Lt = { class: "flex items-center justify-between border-b border-gray-100/60 px-8 py-6" }, Ot = { class: "text-xl font-semibold text-gray-900" }, At = ["disabled"], Ft = { class: "px-8 py-6" }, Wt = {
661
769
  key: 0,
662
- class: "border-t border-gray-100 px-8 py-6 bg-gray-50"
663
- }, Dt = /* @__PURE__ */ Y({
770
+ class: "absolute inset-0 flex items-center justify-center bg-white/50 rounded-lg"
771
+ }, qt = /* @__PURE__ */ N({
664
772
  __name: "Dialog",
665
773
  props: {
666
774
  modelValue: { type: Boolean, default: !1 },
667
775
  title: { default: "Diálogo" },
668
- closeOnBackdrop: { type: Boolean, default: !0 }
776
+ size: { default: "md" },
777
+ closeOnBackdrop: { type: Boolean, default: !0 },
778
+ loading: { type: Boolean, default: !1 }
669
779
  },
670
780
  emits: ["update:modelValue", "close"],
671
781
  setup(t, { emit: m }) {
672
- const e = t, b = m, n = r({
782
+ const e = t, u = m, r = o({
673
783
  get: () => e.modelValue,
674
- set: (i) => b("update:modelValue", i)
675
- }), u = () => {
676
- n.value = !1, b("close");
677
- }, d = () => {
678
- e.closeOnBackdrop && u();
784
+ set: (b) => u("update:modelValue", b)
785
+ }), p = o(() => ({
786
+ sm: "sm:max-w-sm",
787
+ md: "sm:max-w-lg md:max-w-2xl",
788
+ lg: "sm:max-w-2xl md:max-w-4xl",
789
+ xl: "sm:max-w-4xl md:max-w-6xl"
790
+ })[e.size]), v = () => {
791
+ e.loading || (r.value = !1, u("close"));
792
+ }, n = () => {
793
+ e.closeOnBackdrop && !e.loading && v();
679
794
  };
680
- return (i, w) => (s(), ee(be, { to: "body" }, [
681
- J(re, { name: "dialog" }, {
682
- default: le(() => [
683
- n.value ? (s(), l("div", {
795
+ return (b, M) => (l(), le(me, { to: "body" }, [
796
+ Q(ie, { name: "dialog" }, {
797
+ default: re(() => [
798
+ r.value ? (l(), a("div", {
684
799
  key: 0,
685
800
  class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 px-4",
686
- onClick: d
801
+ onClick: n
687
802
  }, [
688
- a("div", {
689
- class: "relative w-full rounded-lg bg-white shadow-xl sm:max-w-lg md:max-w-2xl",
690
- onClick: w[0] || (w[0] = K(() => {
803
+ s("div", {
804
+ class: c(["relative w-full rounded-lg bg-white shadow-xl", p.value]),
805
+ onClick: M[0] || (M[0] = J(() => {
691
806
  }, ["stop"]))
692
807
  }, [
693
- a("div", Ct, [
694
- a("h2", Mt, [
695
- I(i.$slots, "title", {}, () => [
696
- q($(t.title), 1)
808
+ s("div", Lt, [
809
+ s("h2", Ot, [
810
+ O(b.$slots, "title", {}, () => [
811
+ Y($(t.title), 1)
697
812
  ], !0)
698
813
  ]),
699
- a("button", {
814
+ s("button", {
700
815
  type: "button",
701
816
  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",
702
817
  "aria-label": "Cerrar diálogo",
703
- onClick: u
704
- }, [...w[1] || (w[1] = [
705
- a("svg", {
818
+ disabled: t.loading,
819
+ onClick: v
820
+ }, [...M[1] || (M[1] = [
821
+ s("svg", {
706
822
  class: "h-6 w-6",
707
823
  fill: "none",
708
824
  stroke: "currentColor",
709
825
  viewBox: "0 0 24 24"
710
826
  }, [
711
- a("path", {
827
+ s("path", {
712
828
  "stroke-linecap": "round",
713
829
  "stroke-linejoin": "round",
714
830
  "stroke-width": "2",
715
831
  d: "M6 18L18 6M6 6l12 12"
716
832
  })
717
833
  ], -1)
718
- ])])
834
+ ])], 8, At)
719
835
  ]),
720
- a("div", Bt, [
721
- I(i.$slots, "default", {}, void 0, !0)
836
+ s("div", Ft, [
837
+ O(b.$slots, "default", {}, void 0, !0)
722
838
  ]),
723
- i.$slots.footer ? (s(), l("div", zt, [
724
- I(i.$slots, "footer", {}, void 0, !0)
725
- ])) : x("", !0)
726
- ])
727
- ])) : x("", !0)
839
+ t.loading ? (l(), a("div", Wt, [...M[2] || (M[2] = [
840
+ s("div", { class: "flex items-center gap-2 text-primary-600" }, [
841
+ s("svg", {
842
+ class: "w-5 h-5 animate-spin",
843
+ xmlns: "http://www.w3.org/2000/svg",
844
+ fill: "none",
845
+ viewBox: "0 0 24 24"
846
+ }, [
847
+ s("circle", {
848
+ class: "opacity-25",
849
+ cx: "12",
850
+ cy: "12",
851
+ r: "10",
852
+ stroke: "currentColor",
853
+ "stroke-width": "4"
854
+ }),
855
+ s("path", {
856
+ class: "opacity-75",
857
+ fill: "currentColor",
858
+ 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"
859
+ })
860
+ ]),
861
+ s("span", { class: "text-sm font-medium" }, "Cargando...")
862
+ ], -1)
863
+ ])])) : f("", !0),
864
+ b.$slots.footer ? (l(), a("div", {
865
+ key: 1,
866
+ class: c(["border-t border-gray-100 px-8 py-6 bg-gray-50", { "opacity-50 pointer-events-none": t.loading }])
867
+ }, [
868
+ O(b.$slots, "footer", {}, void 0, !0)
869
+ ], 2)) : f("", !0)
870
+ ], 2)
871
+ ])) : f("", !0)
728
872
  ]),
729
873
  _: 3
730
874
  })
731
875
  ]));
732
876
  }
733
- }), Ll = /* @__PURE__ */ U(Dt, [["__scopeId", "data-v-37e19754"]]), Vt = ["accept", "multiple", "disabled"], St = { class: "flex flex-col items-center justify-center gap-4 text-center" }, Tt = ["src", "alt"], It = {
877
+ }), Za = /* @__PURE__ */ Z(qt, [["__scopeId", "data-v-a54fab7f"]]), Pt = ["accept", "multiple", "disabled"], Rt = { class: "flex flex-col items-center justify-center gap-4 text-center" }, Et = ["src", "alt"], Yt = {
734
878
  key: 1,
735
879
  class: "w-full h-full text-gray-400",
736
880
  fill: "none",
737
881
  stroke: "currentColor",
738
882
  viewBox: "0 0 24 24"
739
- }, jt = { class: "text-center" }, Lt = { class: "text-base font-medium text-gray-700" }, Ot = { class: "text-primary-700" }, _t = { class: "flex items-center gap-3 flex-1 min-w-0" }, At = { class: "flex-1 min-w-0" }, Ft = { class: "text-sm font-medium text-gray-900 truncate" }, Rt = { class: "text-xs text-gray-500" }, Pt = {
883
+ }, Nt = { class: "text-center" }, Ht = { class: "text-base font-medium text-gray-700" }, Kt = { class: "text-primary-700" }, Ut = { class: "flex items-center gap-3 flex-1 min-w-0" }, Jt = { class: "flex-1 min-w-0" }, Gt = { class: "text-sm font-medium text-gray-900 truncate" }, Qt = { class: "text-xs text-gray-500" }, Zt = {
740
884
  key: 1,
741
885
  class: "text-xs text-gray-500 mt-2"
742
- }, Yt = {
886
+ }, Xt = {
743
887
  key: 2,
744
888
  class: "text-sm text-danger-500 mt-2"
745
- }, Ol = /* @__PURE__ */ Y({
889
+ }, Xa = /* @__PURE__ */ N({
746
890
  __name: "FileUpload",
747
891
  props: {
748
892
  modelValue: { default: null },
@@ -755,77 +899,83 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
755
899
  mainText: { default: "Suelta aquí un archivo o" },
756
900
  linkText: { default: "selecciónalo desde tu equipo" },
757
901
  helperText: { default: "" },
758
- maxSize: { default: void 0 }
902
+ maxSize: { default: void 0 },
903
+ autoUpload: { type: Boolean, default: !1 },
904
+ uploadUrl: { default: void 0 },
905
+ uploadMethod: { default: "POST" },
906
+ showFileList: { type: Boolean, default: !0 },
907
+ directory: { type: Boolean, default: !1 },
908
+ progress: { default: 0 }
759
909
  },
760
910
  emits: ["update:modelValue", "change", "error"],
761
911
  setup(t, { emit: m }) {
762
- const e = t, b = m, n = F(null), u = F(!1), d = F(e.modelValue), i = F(""), w = r(() => ({
912
+ const e = t, u = m, r = q(null), p = q(!1), v = q(e.modelValue), n = q(""), b = o(() => ({
763
913
  sm: "w-20 h-20",
764
914
  md: "w-32 h-32",
765
915
  lg: "w-48 h-48",
766
916
  xl: "w-64 h-64"
767
- })[e.illustrationSize]), y = () => {
768
- var f;
769
- (f = n.value) == null || f.click();
770
- }, h = () => {
771
- e.disabled || y();
772
- }, M = (f) => {
773
- e.disabled || (u.value = !0);
774
- }, B = () => {
775
- u.value = !1;
776
- }, S = (f) => {
777
- if (i.value = "", e.maxSize && f.size > e.maxSize) {
778
- const v = (e.maxSize / 1048576).toFixed(2);
779
- return i.value = `El archivo excede el tamaño máximo de ${v}MB`, b("error", i.value), !1;
917
+ })[e.illustrationSize]), M = () => {
918
+ var I;
919
+ (I = r.value) == null || I.click();
920
+ }, k = () => {
921
+ e.disabled || M();
922
+ }, g = (I) => {
923
+ e.disabled || (p.value = !0);
924
+ }, y = () => {
925
+ p.value = !1;
926
+ }, T = (I) => {
927
+ if (n.value = "", e.maxSize && I.size > e.maxSize) {
928
+ const B = (e.maxSize / 1048576).toFixed(2);
929
+ return n.value = `El archivo excede el tamaño máximo de ${B}MB`, u("error", n.value), !1;
780
930
  }
781
931
  return !0;
782
- }, A = (f) => {
783
- var C;
784
- const O = (C = f.target.files) == null ? void 0 : C[0];
785
- O && S(O) && (d.value = O, b("update:modelValue", O), b("change", O));
786
- }, L = (f) => {
787
- var O;
788
- u.value = !1;
789
- const v = (O = f.dataTransfer) == null ? void 0 : O.files[0];
790
- v && S(v) && (d.value = v, b("update:modelValue", v), b("change", v));
791
- }, _ = () => {
792
- d.value = null, i.value = "", n.value && (n.value.value = ""), b("update:modelValue", null), b("change", null);
793
- }, V = (f) => {
794
- if (f === 0) return "0 Bytes";
795
- const v = 1024, O = ["Bytes", "KB", "MB", "GB"], C = Math.floor(Math.log(f) / Math.log(v));
796
- return Math.round(f / Math.pow(v, C) * 100) / 100 + " " + O[C];
932
+ }, L = (I) => {
933
+ var P;
934
+ const V = (P = I.target.files) == null ? void 0 : P[0];
935
+ V && T(V) && (v.value = V, u("update:modelValue", V), u("change", V));
936
+ }, A = (I) => {
937
+ var V;
938
+ p.value = !1;
939
+ const B = (V = I.dataTransfer) == null ? void 0 : V.files[0];
940
+ B && T(B) && (v.value = B, u("update:modelValue", B), u("change", B));
941
+ }, F = () => {
942
+ v.value = null, n.value = "", r.value && (r.value.value = ""), u("update:modelValue", null), u("change", null);
943
+ }, W = (I) => {
944
+ if (I === 0) return "0 Bytes";
945
+ const B = 1024, V = ["Bytes", "KB", "MB", "GB"], P = Math.floor(Math.log(I) / Math.log(B));
946
+ return Math.round(I / Math.pow(B, P) * 100) / 100 + " " + V[P];
797
947
  };
798
- return (f, v) => (s(), l("div", {
948
+ return (I, B) => (l(), a("div", {
799
949
  class: c(["relative border-2 border-dashed rounded-lg p-8 transition-colors", [
800
- u.value ? "border-primary-700 bg-primary-50" : "border-gray-300 bg-white hover:border-primary-500",
950
+ p.value ? "border-primary-700 bg-primary-50" : "border-gray-300 bg-white hover:border-primary-500",
801
951
  t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
802
952
  ]]),
803
- onClick: h,
804
- onDragover: K(M, ["prevent"]),
805
- onDragleave: K(B, ["prevent"]),
806
- onDrop: K(L, ["prevent"])
953
+ onClick: k,
954
+ onDragover: J(g, ["prevent"]),
955
+ onDragleave: J(y, ["prevent"]),
956
+ onDrop: J(A, ["prevent"])
807
957
  }, [
808
- a("input", {
958
+ s("input", {
809
959
  ref_key: "fileInput",
810
- ref: n,
960
+ ref: r,
811
961
  type: "file",
812
962
  accept: t.accept,
813
963
  multiple: t.multiple,
814
964
  disabled: t.disabled,
815
965
  class: "hidden",
816
- onChange: A
817
- }, null, 40, Vt),
818
- a("div", St, [
819
- a("div", {
820
- class: c([w.value, "flex items-center justify-center"])
966
+ onChange: L
967
+ }, null, 40, Pt),
968
+ s("div", Rt, [
969
+ s("div", {
970
+ class: c([b.value, "flex items-center justify-center"])
821
971
  }, [
822
- t.illustration ? (s(), l("img", {
972
+ t.illustration ? (l(), a("img", {
823
973
  key: 0,
824
974
  src: t.illustration,
825
975
  alt: t.illustrationAlt,
826
976
  class: "max-w-full max-h-full object-contain"
827
- }, null, 8, Tt)) : (s(), l("svg", It, [...v[1] || (v[1] = [
828
- a("path", {
977
+ }, null, 8, Et)) : (l(), a("svg", Yt, [...B[1] || (B[1] = [
978
+ s("path", {
829
979
  "stroke-linecap": "round",
830
980
  "stroke-linejoin": "round",
831
981
  "stroke-width": "1.5",
@@ -833,73 +983,82 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
833
983
  }, null, -1)
834
984
  ])]))
835
985
  ], 2),
836
- a("div", jt, [
837
- a("p", Lt, [
838
- q($(t.mainText) + " ", 1),
839
- a("span", Ot, $(t.linkText), 1)
986
+ s("div", Nt, [
987
+ s("p", Ht, [
988
+ Y($(t.mainText) + " ", 1),
989
+ s("span", Kt, $(t.linkText), 1)
840
990
  ])
841
991
  ]),
842
- d.value ? (s(), l("div", {
992
+ v.value ? (l(), a("div", {
843
993
  key: 0,
844
994
  class: "w-full max-w-md bg-gray-50 rounded-lg p-4 flex items-center justify-between",
845
- onClick: v[0] || (v[0] = K(() => {
995
+ onClick: B[0] || (B[0] = J(() => {
846
996
  }, ["stop"]))
847
997
  }, [
848
- a("div", _t, [
849
- v[2] || (v[2] = a("svg", {
998
+ s("div", Ut, [
999
+ B[2] || (B[2] = s("svg", {
850
1000
  class: "w-6 h-6 text-gray-600 flex-shrink-0",
851
1001
  fill: "none",
852
1002
  stroke: "currentColor",
853
1003
  viewBox: "0 0 24 24"
854
1004
  }, [
855
- a("path", {
1005
+ s("path", {
856
1006
  "stroke-linecap": "round",
857
1007
  "stroke-linejoin": "round",
858
1008
  "stroke-width": "2",
859
1009
  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"
860
1010
  })
861
1011
  ], -1)),
862
- a("div", At, [
863
- a("p", Ft, $(d.value.name), 1),
864
- a("p", Rt, $(V(d.value.size)), 1)
1012
+ s("div", Jt, [
1013
+ s("p", Gt, $(v.value.name), 1),
1014
+ s("p", Qt, $(W(v.value.size)), 1)
865
1015
  ])
866
1016
  ]),
867
- t.disabled ? x("", !0) : (s(), l("button", {
1017
+ t.disabled ? f("", !0) : (l(), a("button", {
868
1018
  key: 0,
869
- onClick: K(_, ["stop"]),
1019
+ onClick: J(F, ["stop"]),
870
1020
  class: "ml-3 text-gray-400 hover:text-danger-500 transition-colors"
871
- }, [...v[3] || (v[3] = [
872
- a("svg", {
1021
+ }, [...B[3] || (B[3] = [
1022
+ s("svg", {
873
1023
  class: "w-5 h-5",
874
1024
  fill: "currentColor",
875
1025
  viewBox: "0 0 20 20"
876
1026
  }, [
877
- a("path", {
1027
+ s("path", {
878
1028
  "fill-rule": "evenodd",
879
1029
  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",
880
1030
  "clip-rule": "evenodd"
881
1031
  })
882
1032
  ], -1)
883
1033
  ])]))
884
- ])) : x("", !0),
885
- t.helperText ? (s(), l("p", Pt, $(t.helperText), 1)) : x("", !0),
886
- i.value ? (s(), l("p", Yt, $(i.value), 1)) : x("", !0)
1034
+ ])) : f("", !0),
1035
+ t.helperText ? (l(), a("p", Zt, $(t.helperText), 1)) : f("", !0),
1036
+ n.value ? (l(), a("p", Xt, $(n.value), 1)) : f("", !0)
887
1037
  ])
888
1038
  ], 34));
889
1039
  }
890
- }), Et = { class: "input-wrapper" }, qt = ["for"], Nt = {
1040
+ }), _t = { class: "input-wrapper" }, el = ["for"], tl = {
891
1041
  key: 0,
892
1042
  class: "text-danger-600"
893
- }, Wt = { class: "relative" }, Ht = ["id", "type", "disabled", "placeholder", "value", "required", "readonly"], Kt = {
1043
+ }, ll = { class: "relative flex items-center" }, al = {
894
1044
  key: 0,
1045
+ class: "absolute left-3 text-secondary-500 text-sm"
1046
+ }, sl = ["id", "type", "disabled", "placeholder", "value", "required", "readonly"], ol = {
1047
+ key: 1,
1048
+ class: "absolute right-3 flex items-center gap-2"
1049
+ }, rl = {
1050
+ key: 1,
1051
+ class: "text-secondary-500 text-sm"
1052
+ }, nl = {
1053
+ key: 2,
895
1054
  class: "absolute right-3 top-1/2 -translate-y-1/2 text-danger-600"
896
- }, Ut = {
1055
+ }, il = {
897
1056
  key: 1,
898
1057
  class: "mt-1 text-sm text-danger-600"
899
- }, Jt = {
1058
+ }, dl = {
900
1059
  key: 2,
901
1060
  class: "mt-1 text-sm text-secondary-600"
902
- }, Gt = /* @__PURE__ */ Y({
1061
+ }, ul = /* @__PURE__ */ N({
903
1062
  __name: "Input",
904
1063
  props: {
905
1064
  modelValue: { default: "" },
@@ -912,74 +1071,103 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
912
1071
  required: { type: Boolean, default: !1 },
913
1072
  placeholder: {},
914
1073
  error: {},
915
- helperText: {}
1074
+ helperText: {},
1075
+ clearable: { type: Boolean, default: !1 },
1076
+ prefix: { default: void 0 },
1077
+ suffix: { default: void 0 }
916
1078
  },
917
- emits: ["update:modelValue", "blur", "focus"],
1079
+ emits: ["update:modelValue", "blur", "focus", "clear"],
918
1080
  setup(t, { emit: m }) {
919
- const e = t, b = m, n = F(`input-${Math.random().toString(36).substr(2, 9)}`), u = r(() => "ds-label"), d = r(() => {
920
- const h = "w-full rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50", M = {
1081
+ const e = t, u = m, r = q(`input-${Math.random().toString(36).substr(2, 9)}`), p = o(() => "ds-label"), v = o(() => {
1082
+ const g = "w-full rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50", y = {
921
1083
  sm: "h-8 px-3 text-sm",
922
1084
  md: "h-10 px-4 text-base",
923
1085
  lg: "h-12 px-5 text-lg"
924
- }, B = {
1086
+ }, T = {
925
1087
  default: "border border-secondary-300 bg-white focus:border-primary-500 focus:ring-primary-500",
926
1088
  filled: "border-0 bg-secondary-100 focus:bg-white focus:ring-primary-500",
927
1089
  outlined: "border-2 border-secondary-300 bg-transparent focus:border-primary-500 focus:ring-primary-500"
928
- }, S = e.error ? "border-danger-500 focus:border-danger-500 focus:ring-danger-500 pr-10" : "";
929
- return `${h} ${M[e.size]} ${B[e.variant]} ${S}`;
930
- }), i = (h) => {
931
- const M = h.target;
932
- b("update:modelValue", M.value);
933
- }, w = (h) => {
934
- b("blur", h);
935
- }, y = (h) => {
936
- b("focus", h);
1090
+ }, L = e.error ? "border-danger-500 focus:border-danger-500 focus:ring-danger-500 pr-10" : "";
1091
+ return `${g} ${y[e.size]} ${T[e.variant]} ${L}`;
1092
+ }), n = (g) => {
1093
+ const y = g.target;
1094
+ u("update:modelValue", y.value);
1095
+ }, b = (g) => {
1096
+ u("blur", g);
1097
+ }, M = (g) => {
1098
+ u("focus", g);
1099
+ }, k = () => {
1100
+ u("update:modelValue", ""), u("clear");
937
1101
  };
938
- return (h, M) => (s(), l("div", Et, [
939
- t.label ? (s(), l("label", {
1102
+ return (g, y) => (l(), a("div", _t, [
1103
+ t.label ? (l(), a("label", {
940
1104
  key: 0,
941
- for: n.value,
942
- class: c(u.value)
1105
+ for: r.value,
1106
+ class: c(p.value)
943
1107
  }, [
944
- q($(t.label) + " ", 1),
945
- t.required ? (s(), l("span", Nt, "*")) : x("", !0)
946
- ], 10, qt)) : x("", !0),
947
- a("div", Wt, [
948
- a("input", {
949
- id: n.value,
950
- class: c(d.value),
1108
+ Y($(t.label) + " ", 1),
1109
+ t.required ? (l(), a("span", tl, "*")) : f("", !0)
1110
+ ], 10, el)) : f("", !0),
1111
+ s("div", ll, [
1112
+ t.prefix ? (l(), a("span", al, $(t.prefix), 1)) : f("", !0),
1113
+ s("input", {
1114
+ id: r.value,
1115
+ class: c([v.value, t.prefix ? "pl-9" : ""]),
951
1116
  type: t.type,
952
1117
  disabled: t.disabled,
953
1118
  placeholder: t.placeholder,
954
1119
  value: t.modelValue,
955
1120
  required: t.required,
956
1121
  readonly: t.readonly,
957
- onInput: i,
958
- onBlur: w,
959
- onFocus: y
960
- }, null, 42, Ht),
961
- t.error ? (s(), l("span", Kt, [...M[0] || (M[0] = [
962
- a("svg", {
1122
+ onInput: n,
1123
+ onBlur: b,
1124
+ onFocus: M
1125
+ }, null, 42, sl),
1126
+ t.clearable || t.suffix ? (l(), a("div", ol, [
1127
+ t.clearable && t.modelValue ? (l(), a("button", {
1128
+ key: 0,
1129
+ type: "button",
1130
+ class: "text-secondary-400 hover:text-secondary-600 transition-colors",
1131
+ "aria-label": "Limpiar",
1132
+ onClick: k
1133
+ }, [...y[0] || (y[0] = [
1134
+ s("svg", {
1135
+ xmlns: "http://www.w3.org/2000/svg",
1136
+ class: "h-4 w-4",
1137
+ viewBox: "0 0 20 20",
1138
+ fill: "currentColor"
1139
+ }, [
1140
+ s("path", {
1141
+ "fill-rule": "evenodd",
1142
+ 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",
1143
+ "clip-rule": "evenodd"
1144
+ })
1145
+ ], -1)
1146
+ ])])) : f("", !0),
1147
+ t.suffix && !t.clearable ? (l(), a("span", rl, $(t.suffix), 1)) : f("", !0)
1148
+ ])) : f("", !0),
1149
+ t.error && !t.suffix && !t.clearable ? (l(), a("span", nl, [...y[1] || (y[1] = [
1150
+ s("svg", {
963
1151
  xmlns: "http://www.w3.org/2000/svg",
964
1152
  class: "h-5 w-5",
965
1153
  viewBox: "0 0 20 20",
966
1154
  fill: "currentColor"
967
1155
  }, [
968
- a("path", {
1156
+ s("path", {
969
1157
  "fill-rule": "evenodd",
970
1158
  d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",
971
1159
  "clip-rule": "evenodd"
972
1160
  })
973
1161
  ], -1)
974
- ])])) : x("", !0)
1162
+ ])])) : f("", !0)
975
1163
  ]),
976
- t.error ? (s(), l("p", Ut, $(t.error), 1)) : t.helperText ? (s(), l("p", Jt, $(t.helperText), 1)) : x("", !0)
1164
+ t.error ? (l(), a("p", il, $(t.error), 1)) : t.helperText ? (l(), a("p", dl, $(t.helperText), 1)) : f("", !0)
977
1165
  ]));
978
1166
  }
979
- }), _l = /* @__PURE__ */ U(Gt, [["__scopeId", "data-v-fac43d65"]]), Qt = ["stroke-width"], Zt = {
1167
+ }), _a = /* @__PURE__ */ Z(ul, [["__scopeId", "data-v-b46f9fad"]]), cl = ["stroke-width"], fl = {
980
1168
  class: "w-full h-full rounded-lg overflow-hidden",
981
1169
  style: { "background-color": "#f7f7f7" }
982
- }, Xt = /* @__PURE__ */ Y({
1170
+ }, pl = /* @__PURE__ */ N({
983
1171
  __name: "Loader",
984
1172
  props: {
985
1173
  type: { default: "circular" },
@@ -997,24 +1185,24 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
997
1185
  warning: "text-warning-500",
998
1186
  danger: "text-danger-500",
999
1187
  info: "text-info-500"
1000
- }, b = {
1188
+ }, u = {
1001
1189
  primary: "bg-primary-700",
1002
1190
  secondary: "bg-secondary-500",
1003
1191
  success: "bg-success-500",
1004
1192
  warning: "bg-warning-500",
1005
1193
  danger: "bg-danger-500",
1006
1194
  info: "bg-info-500"
1007
- }, n = r(() => [e[m.color]]), u = r(() => [b[m.color]]);
1008
- return (d, i) => t.type === "circular" ? (s(), l("div", {
1195
+ }, r = o(() => [e[m.color]]), p = o(() => [u[m.color]]);
1196
+ return (v, n) => t.type === "circular" ? (l(), a("div", {
1009
1197
  key: 0,
1010
- class: c(n.value)
1198
+ class: c(r.value)
1011
1199
  }, [
1012
- (s(), l("svg", {
1200
+ (l(), a("svg", {
1013
1201
  class: "animate-spin",
1014
- style: G({ width: t.size, height: t.size }),
1202
+ style: X({ width: t.size, height: t.size }),
1015
1203
  viewBox: "0 0 24 24"
1016
1204
  }, [
1017
- a("circle", {
1205
+ s("circle", {
1018
1206
  class: "opacity-25",
1019
1207
  cx: "12",
1020
1208
  cy: "12",
@@ -1022,42 +1210,42 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
1022
1210
  stroke: "currentColor",
1023
1211
  "stroke-width": t.strokeWidth,
1024
1212
  fill: "none"
1025
- }, null, 8, Qt),
1026
- i[0] || (i[0] = a("path", {
1213
+ }, null, 8, cl),
1214
+ n[0] || (n[0] = s("path", {
1027
1215
  class: "opacity-75",
1028
1216
  fill: "currentColor",
1029
1217
  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"
1030
1218
  }, null, -1))
1031
1219
  ], 4))
1032
- ], 2)) : t.type === "linear" ? (s(), l("div", {
1220
+ ], 2)) : t.type === "linear" ? (l(), a("div", {
1033
1221
  key: 1,
1034
1222
  class: "w-full",
1035
- style: G({ height: t.height })
1223
+ style: X({ height: t.height })
1036
1224
  }, [
1037
- a("div", Zt, [
1038
- a("div", {
1039
- class: c([[u.value, { "animate-linear-loader": t.progress === void 0 }], "h-full rounded-lg"]),
1040
- style: G({ width: t.progress !== void 0 ? `${Math.min(Math.max(t.progress, 0), 100)}%` : "100%" })
1225
+ s("div", fl, [
1226
+ s("div", {
1227
+ class: c([[p.value, { "animate-linear-loader": t.progress === void 0 }], "h-full rounded-lg"]),
1228
+ style: X({ width: t.progress !== void 0 ? `${Math.min(Math.max(t.progress, 0), 100)}%` : "100%" })
1041
1229
  }, null, 6)
1042
1230
  ])
1043
- ], 4)) : x("", !0);
1231
+ ], 4)) : f("", !0);
1044
1232
  }
1045
- }), Al = /* @__PURE__ */ U(Xt, [["__scopeId", "data-v-f369fb46"]]), es = ["disabled", "aria-expanded"], ts = ["disabled", "onClick"], ss = {
1233
+ }), es = /* @__PURE__ */ Z(pl, [["__scopeId", "data-v-f369fb46"]]), vl = ["disabled", "aria-expanded"], bl = ["disabled", "onClick"], ml = {
1046
1234
  key: 0,
1047
1235
  class: "flex-shrink-0"
1048
- }, ls = ["innerHTML"], as = { class: "flex-1 min-w-0 mr-2" }, os = { class: "flex flex-col items-start" }, rs = ["title"], ns = ["title"], is = {
1236
+ }, gl = ["innerHTML"], yl = { class: "flex-1 min-w-0 mr-2" }, hl = { class: "flex flex-col items-start" }, xl = ["title"], wl = ["title"], kl = {
1049
1237
  key: 1,
1050
1238
  class: "flex-shrink-0"
1051
- }, ds = {
1239
+ }, Cl = {
1052
1240
  key: 0,
1053
1241
  class: "text-xs text-secondary-400 font-mono whitespace-nowrap"
1054
- }, us = { key: 1 }, cs = {
1242
+ }, $l = { key: 1 }, Bl = {
1055
1243
  key: 2,
1056
1244
  class: "w-4 h-4 ml-2 flex-shrink-0",
1057
1245
  fill: "none",
1058
1246
  stroke: "currentColor",
1059
1247
  viewBox: "0 0 24 24"
1060
- }, fs = /* @__PURE__ */ Y({
1248
+ }, Ml = /* @__PURE__ */ N({
1061
1249
  __name: "Menu",
1062
1250
  props: {
1063
1251
  items: { default: () => [] },
@@ -1073,264 +1261,279 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
1073
1261
  fullWidth: { type: Boolean, default: !1 },
1074
1262
  overlay: { type: Boolean, default: !1 },
1075
1263
  teleport: { type: Boolean, default: !0 },
1076
- zIndex: { default: 50 }
1264
+ zIndex: { default: 50 },
1265
+ size: { default: "md" },
1266
+ closeOnSelect: { type: Boolean, default: !0 },
1267
+ openDelay: { default: 0 },
1268
+ closeDelay: { default: 100 }
1077
1269
  },
1078
1270
  emits: ["open", "close", "select"],
1079
1271
  setup(t, { emit: m }) {
1080
- const e = t, b = m, n = F(!1), u = F(null), d = F(null), i = F({}), w = r(() => [
1272
+ let e = null, u = null;
1273
+ const r = t, p = m, v = q(!1), n = q(null), b = q(null), M = q({}), k = o(() => [
1081
1274
  "inline-flex items-center justify-center px-4 py-2 text-sm font-medium",
1082
1275
  "bg-white border border-secondary-300 rounded-md text-secondary-700",
1083
1276
  "hover:bg-secondary-100 hover:text-secondary-900 hover:border-secondary-400",
1084
1277
  "focus:outline-none focus:ring-2 focus:ring-primary-500",
1085
1278
  "disabled:opacity-50 disabled:cursor-not-allowed",
1086
1279
  "transition-all duration-200"
1087
- ].join(" ")), y = r(() => [...[
1280
+ ].join(" ")), g = o(() => [...[
1088
1281
  "fixed bg-white rounded-lg shadow-lg border border-secondary-200",
1089
1282
  "flex flex-col",
1090
1283
  "focus:outline-none"
1091
- ], `z-${e.zIndex}`].join(" ")), h = r(() => "px-4 py-3 border-b border-secondary-200 bg-secondary-50"), M = r(() => "px-4 py-3 border-t border-secondary-200 bg-secondary-50"), B = r(() => "py-1 overflow-y-auto flex-1 min-h-0"), S = r(() => "my-1 border-t border-secondary-200"), A = r(() => "px-4 py-2 text-xs font-semibold text-secondary-500 uppercase tracking-wider"), L = (o) => {
1092
- const g = [
1284
+ ], `z-${r.zIndex}`].join(" ")), y = o(() => "px-4 py-3 border-b border-secondary-200 bg-secondary-50"), T = o(() => "px-4 py-3 border-t border-secondary-200 bg-secondary-50"), L = o(() => "py-1 overflow-y-auto flex-1 min-h-0"), A = o(() => "my-1 border-t border-secondary-200"), F = o(() => "px-4 py-2 text-xs font-semibold text-secondary-500 uppercase tracking-wider"), W = (i) => {
1285
+ const z = [
1093
1286
  "w-full flex items-center gap-3 px-4 py-2.5 text-sm text-left",
1094
1287
  "transition-all duration-150 focus:outline-none cursor-pointer",
1095
1288
  "disabled:opacity-50 disabled:cursor-not-allowed"
1096
- ], D = o.variant || "default", Z = {
1289
+ ], x = i.variant || "default", te = {
1097
1290
  default: "text-secondary-700 hover:bg-secondary-100 hover:text-secondary-900 focus:bg-secondary-100",
1098
1291
  danger: "text-danger-600 hover:bg-danger-100 hover:text-danger-700 focus:bg-danger-100",
1099
1292
  success: "text-success-600 hover:bg-success-100 hover:text-success-700 focus:bg-success-100",
1100
1293
  warning: "text-warning-600 hover:bg-warning-100 hover:text-warning-700 focus:bg-warning-100"
1101
1294
  };
1102
1295
  let R = "";
1103
- return o.color && (R = o.color, (o.color.includes("white") || o.color.includes("50")) && (R += " hover:text-black")), [...g, R || Z[D]].join(" ");
1104
- }, _ = () => {
1105
- e.disabled || (n.value ? f() : V());
1106
- }, V = () => {
1107
- n.value = !0, b("open"), fe(() => {
1108
- p(), document.addEventListener("click", O), document.addEventListener("keydown", C);
1296
+ return i.color && (R = i.color, (i.color.includes("white") || i.color.includes("50")) && (R += " hover:text-black")), [...z, R || te[x]].join(" ");
1297
+ }, I = () => {
1298
+ r.disabled || (v.value ? V() : (u && clearTimeout(u), e = setTimeout(() => {
1299
+ B();
1300
+ }, r.openDelay)));
1301
+ }, B = () => {
1302
+ v.value = !0, p("open"), be(() => {
1303
+ C(), document.addEventListener("click", j), document.addEventListener("keydown", h);
1109
1304
  });
1110
- }, f = () => {
1111
- n.value = !1, b("close"), document.removeEventListener("click", O), document.removeEventListener("keydown", C);
1112
- }, v = (o) => {
1113
- o.disabled || (o.action && o.action(), b("select", o), e.closeOnClick && !o.children && f());
1114
- }, O = (o) => {
1115
- const g = o.target;
1116
- u.value && !u.value.contains(g) && d.value && !d.value.contains(g) && f();
1117
- }, C = (o) => {
1118
- o.key === "Escape" && f();
1119
- }, j = (o) => {
1120
- (o.key === "Enter" || o.key === " ") && (o.preventDefault(), _());
1121
- }, p = () => {
1122
- if (!u.value || !d.value) return;
1123
- const o = u.value.getBoundingClientRect(), g = d.value.getBoundingClientRect(), D = window.innerWidth, Z = window.innerHeight;
1124
- let R = 0, N = 0;
1125
- switch (e.position) {
1305
+ }, V = () => {
1306
+ e && clearTimeout(e), u = setTimeout(() => {
1307
+ v.value = !1, p("close"), document.removeEventListener("click", j), document.removeEventListener("keydown", h);
1308
+ }, r.closeDelay);
1309
+ }, P = (i) => {
1310
+ i.disabled || (i.action && i.action(), p("select", i), (r.closeOnClick || r.closeOnSelect) && !i.children && V());
1311
+ }, j = (i) => {
1312
+ const z = i.target;
1313
+ n.value && !n.value.contains(z) && b.value && !b.value.contains(z) && V();
1314
+ }, h = (i) => {
1315
+ i.key === "Escape" && V();
1316
+ }, d = (i) => {
1317
+ (i.key === "Enter" || i.key === " ") && (i.preventDefault(), I());
1318
+ }, C = () => {
1319
+ if (!n.value || !b.value) return;
1320
+ const i = n.value.getBoundingClientRect(), z = b.value.getBoundingClientRect(), x = window.innerWidth, te = window.innerHeight;
1321
+ let R = 0, H = 0;
1322
+ switch (r.position) {
1126
1323
  case "bottom-start":
1127
- R = o.bottom + e.offset.y, N = o.left + e.offset.x;
1324
+ R = i.bottom + r.offset.y, H = i.left + r.offset.x;
1128
1325
  break;
1129
1326
  case "bottom-end":
1130
- R = o.bottom + e.offset.y, N = o.right - g.width + e.offset.x;
1327
+ R = i.bottom + r.offset.y, H = i.right - z.width + r.offset.x;
1131
1328
  break;
1132
1329
  case "top-start":
1133
- R = o.top - g.height - e.offset.y, N = o.left + e.offset.x;
1330
+ R = i.top - z.height - r.offset.y, H = i.left + r.offset.x;
1134
1331
  break;
1135
1332
  case "top-end":
1136
- R = o.top - g.height - e.offset.y, N = o.right - g.width + e.offset.x;
1333
+ R = i.top - z.height - r.offset.y, H = i.right - z.width + r.offset.x;
1137
1334
  break;
1138
1335
  case "right-start":
1139
- R = o.top + e.offset.y, N = o.right + e.offset.x;
1336
+ R = i.top + r.offset.y, H = i.right + r.offset.x;
1140
1337
  break;
1141
1338
  case "right-end":
1142
- R = o.bottom - g.height + e.offset.y, N = o.right + e.offset.x;
1339
+ R = i.bottom - z.height + r.offset.y, H = i.right + r.offset.x;
1143
1340
  break;
1144
1341
  case "left-start":
1145
- R = o.top + e.offset.y, N = o.left - g.width - e.offset.x;
1342
+ R = i.top + r.offset.y, H = i.left - z.width - r.offset.x;
1146
1343
  break;
1147
1344
  case "left-end":
1148
- R = o.bottom - g.height + e.offset.y, N = o.left - g.width - e.offset.x;
1345
+ R = i.bottom - z.height + r.offset.y, H = i.left - z.width - r.offset.x;
1149
1346
  break;
1150
1347
  }
1151
- N + g.width > D && (N = D - g.width - 8), N < 8 && (N = 8), R + g.height > Z && (R = Z - g.height - 8), R < 8 && (R = 8), i.value = {
1348
+ H + z.width > x && (H = x - z.width - 8), H < 8 && (H = 8), R + z.height > te && (R = te - z.height - 8), R < 8 && (R = 8), M.value = {
1152
1349
  top: `${R}px`,
1153
- left: `${N}px`,
1154
- width: e.width === "auto" ? `${Math.max(o.width, 240)}px` : e.width,
1155
- maxHeight: e.maxHeight,
1350
+ left: `${H}px`,
1351
+ width: r.width === "auto" ? `${Math.max(i.width, 240)}px` : r.width,
1352
+ maxHeight: r.maxHeight,
1156
1353
  minWidth: "240px"
1157
1354
  };
1158
1355
  };
1159
- return Ce(() => {
1160
- window.addEventListener("scroll", p, !0), window.addEventListener("resize", p);
1161
- }), Me(() => {
1162
- window.removeEventListener("scroll", p, !0), window.removeEventListener("resize", p), document.removeEventListener("click", O), document.removeEventListener("keydown", C);
1163
- }), pe(() => e.items, () => {
1164
- n.value && fe(p);
1165
- }, { deep: !0 }), (o, g) => (s(), l("div", {
1356
+ return Te(() => {
1357
+ window.addEventListener("scroll", C, !0), window.addEventListener("resize", C);
1358
+ }), Se(() => {
1359
+ window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C), document.removeEventListener("click", j), document.removeEventListener("keydown", h);
1360
+ }), de(() => r.items, () => {
1361
+ v.value && be(C);
1362
+ }, { deep: !0 }), (i, z) => (l(), a("div", {
1166
1363
  class: c(["menu-wrapper", { "w-full": t.fullWidth }])
1167
1364
  }, [
1168
- a("div", {
1365
+ s("div", {
1169
1366
  ref_key: "triggerRef",
1170
- ref: u
1367
+ ref: n
1171
1368
  }, [
1172
- I(o.$slots, "trigger", {
1173
- isOpen: n.value,
1174
- toggle: _
1369
+ O(i.$slots, "trigger", {
1370
+ isOpen: v.value,
1371
+ toggle: I
1175
1372
  }, () => [
1176
- a("button", {
1373
+ s("button", {
1177
1374
  type: "button",
1178
- class: c(w.value),
1375
+ class: c(k.value),
1179
1376
  disabled: t.disabled,
1180
- onClick: _,
1181
- onKeydown: j,
1377
+ onClick: I,
1378
+ onKeydown: d,
1182
1379
  tabindex: 0,
1183
1380
  role: "button",
1184
- "aria-expanded": n.value,
1381
+ "aria-expanded": v.value,
1185
1382
  "aria-haspopup": !0
1186
1383
  }, [
1187
- I(o.$slots, "trigger-content", {}, () => [
1188
- q($(t.triggerText), 1)
1384
+ O(i.$slots, "trigger-content", {}, () => [
1385
+ Y($(t.triggerText), 1)
1189
1386
  ], !0),
1190
- t.showChevron ? (s(), l("svg", {
1387
+ t.showChevron ? (l(), a("svg", {
1191
1388
  key: 0,
1192
- class: c(["w-4 h-4 ml-2 transition-transform", n.value ? "rotate-180" : ""]),
1389
+ class: c(["w-4 h-4 ml-2 transition-transform", v.value ? "rotate-180" : ""]),
1193
1390
  fill: "none",
1194
1391
  stroke: "currentColor",
1195
1392
  viewBox: "0 0 24 24"
1196
- }, [...g[1] || (g[1] = [
1197
- a("path", {
1393
+ }, [...z[1] || (z[1] = [
1394
+ s("path", {
1198
1395
  "stroke-linecap": "round",
1199
1396
  "stroke-linejoin": "round",
1200
1397
  "stroke-width": "2",
1201
1398
  d: "M19 9l-7 7-7-7"
1202
1399
  }, null, -1)
1203
- ])], 2)) : x("", !0)
1204
- ], 42, es)
1400
+ ])], 2)) : f("", !0)
1401
+ ], 42, vl)
1205
1402
  ], !0)
1206
1403
  ], 512),
1207
- (s(), ee(be, { to: "body" }, [
1208
- n.value ? (s(), l("div", {
1404
+ (l(), le(me, { to: "body" }, [
1405
+ v.value ? (l(), a("div", {
1209
1406
  key: 0,
1210
1407
  ref_key: "menuRef",
1211
- ref: d,
1212
- class: c(y.value),
1213
- style: G(i.value),
1214
- onClick: g[0] || (g[0] = K(() => {
1408
+ ref: b,
1409
+ class: c(g.value),
1410
+ style: X(M.value),
1411
+ onClick: z[0] || (z[0] = J(() => {
1215
1412
  }, ["stop"]))
1216
1413
  }, [
1217
- o.$slots.header ? (s(), l("div", {
1414
+ i.$slots.header ? (l(), a("div", {
1218
1415
  key: 0,
1219
- class: c(h.value)
1416
+ class: c(y.value)
1220
1417
  }, [
1221
- I(o.$slots, "header", { close: f }, void 0, !0)
1222
- ], 2)) : x("", !0),
1223
- a("div", {
1224
- class: c(B.value)
1418
+ O(i.$slots, "header", { close: V }, void 0, !0)
1419
+ ], 2)) : f("", !0),
1420
+ s("div", {
1421
+ class: c(L.value)
1225
1422
  }, [
1226
- I(o.$slots, "default", {
1227
- close: f,
1228
- isOpen: n.value
1423
+ O(i.$slots, "default", {
1424
+ close: V,
1425
+ isOpen: v.value
1229
1426
  }, () => [
1230
- (s(!0), l(E, null, H(t.items, (D, Z) => (s(), l(E, {
1231
- key: D.id || Z
1427
+ (l(!0), a(K, null, G(t.items, (x, te) => (l(), a(K, {
1428
+ key: x.id || te
1232
1429
  }, [
1233
- D.type === "divider" ? (s(), l("div", {
1430
+ x.type === "divider" ? (l(), a("div", {
1234
1431
  key: 0,
1235
- class: c(S.value)
1236
- }, null, 2)) : D.type === "header" ? (s(), l("div", {
1237
- key: 1,
1238
1432
  class: c(A.value)
1239
- }, $(D.label), 3)) : (s(), l("button", {
1433
+ }, null, 2)) : x.type === "header" ? (l(), a("div", {
1434
+ key: 1,
1435
+ class: c(F.value)
1436
+ }, $(x.label), 3)) : (l(), a("button", {
1240
1437
  key: 2,
1241
1438
  type: "button",
1242
- class: c(L(D)),
1243
- disabled: D.disabled,
1244
- onClick: (R) => v(D)
1439
+ class: c(W(x)),
1440
+ disabled: x.disabled,
1441
+ onClick: (R) => P(x)
1245
1442
  }, [
1246
- D.icon || o.$slots[`icon-${D.id}`] ? (s(), l("span", ss, [
1247
- I(o.$slots, `icon-${D.id}`, { item: D }, () => [
1248
- typeof D.icon != "string" ? (s(), ee(ve(D.icon), {
1443
+ x.icon || i.$slots[`icon-${x.id}`] ? (l(), a("span", ml, [
1444
+ O(i.$slots, `icon-${x.id}`, { item: x }, () => [
1445
+ typeof x.icon != "string" ? (l(), le(ge(x.icon), {
1249
1446
  key: 0,
1250
1447
  class: "w-5 h-5"
1251
- })) : (s(), l("span", {
1448
+ })) : (l(), a("span", {
1252
1449
  key: 1,
1253
- innerHTML: D.icon,
1450
+ innerHTML: x.icon,
1254
1451
  class: "w-5 h-5 inline-block"
1255
- }, null, 8, ls))
1452
+ }, null, 8, gl))
1256
1453
  ], !0)
1257
- ])) : x("", !0),
1258
- a("div", as, [
1259
- I(o.$slots, `item-${D.id}`, {
1260
- item: D,
1261
- close: f
1454
+ ])) : f("", !0),
1455
+ s("div", yl, [
1456
+ O(i.$slots, `item-${x.id}`, {
1457
+ item: x,
1458
+ close: V
1262
1459
  }, () => [
1263
- a("div", os, [
1264
- a("span", {
1460
+ s("div", hl, [
1461
+ s("span", {
1265
1462
  class: "truncate w-full",
1266
- title: D.label
1267
- }, $(D.label), 9, rs),
1268
- D.description ? (s(), l("span", {
1463
+ title: x.label
1464
+ }, $(x.label), 9, xl),
1465
+ x.description ? (l(), a("span", {
1269
1466
  key: 0,
1270
1467
  class: "text-xs text-secondary-500 truncate w-full",
1271
- title: D.description
1272
- }, $(D.description), 9, ns)) : x("", !0)
1468
+ title: x.description
1469
+ }, $(x.description), 9, wl)) : f("", !0)
1273
1470
  ])
1274
1471
  ], !0)
1275
1472
  ]),
1276
- D.suffix || D.shortcut || o.$slots[`suffix-${D.id}`] ? (s(), l("span", is, [
1277
- I(o.$slots, `suffix-${D.id}`, { item: D }, () => [
1278
- D.shortcut ? (s(), l("span", ds, $(D.shortcut), 1)) : D.suffix ? (s(), l("span", us, $(D.suffix), 1)) : x("", !0)
1473
+ x.suffix || x.shortcut || i.$slots[`suffix-${x.id}`] ? (l(), a("span", kl, [
1474
+ O(i.$slots, `suffix-${x.id}`, { item: x }, () => [
1475
+ x.shortcut ? (l(), a("span", Cl, $(x.shortcut), 1)) : x.suffix ? (l(), a("span", $l, $(x.suffix), 1)) : f("", !0)
1279
1476
  ], !0)
1280
- ])) : x("", !0),
1281
- D.children && D.children.length > 0 ? (s(), l("svg", cs, [...g[2] || (g[2] = [
1282
- a("path", {
1477
+ ])) : f("", !0),
1478
+ x.children && x.children.length > 0 ? (l(), a("svg", Bl, [...z[2] || (z[2] = [
1479
+ s("path", {
1283
1480
  "stroke-linecap": "round",
1284
1481
  "stroke-linejoin": "round",
1285
1482
  "stroke-width": "2",
1286
1483
  d: "M9 5l7 7-7 7"
1287
1484
  }, null, -1)
1288
- ])])) : x("", !0)
1289
- ], 10, ts))
1485
+ ])])) : f("", !0)
1486
+ ], 10, bl))
1290
1487
  ], 64))), 128))
1291
1488
  ], !0)
1292
1489
  ], 2),
1293
- o.$slots.footer ? (s(), l("div", {
1490
+ i.$slots.footer ? (l(), a("div", {
1294
1491
  key: 1,
1295
- class: c(M.value)
1492
+ class: c(T.value)
1296
1493
  }, [
1297
- I(o.$slots, "footer", { close: f }, void 0, !0)
1298
- ], 2)) : x("", !0)
1299
- ], 6)) : x("", !0),
1300
- n.value && t.overlay ? (s(), l("div", {
1494
+ O(i.$slots, "footer", { close: V }, void 0, !0)
1495
+ ], 2)) : f("", !0)
1496
+ ], 6)) : f("", !0),
1497
+ v.value && t.overlay ? (l(), a("div", {
1301
1498
  key: 1,
1302
1499
  class: "fixed inset-0 bg-black/20 z-40",
1303
- onClick: f
1304
- })) : x("", !0)
1500
+ onClick: V
1501
+ })) : f("", !0)
1305
1502
  ]))
1306
1503
  ], 2));
1307
1504
  }
1308
- }), Fl = /* @__PURE__ */ U(fs, [["__scopeId", "data-v-61176297"]]), ps = ["for"], bs = {
1505
+ }), ts = /* @__PURE__ */ Z(Ml, [["__scopeId", "data-v-2120dee6"]]), zl = ["for"], Dl = {
1309
1506
  key: 0,
1310
1507
  class: "text-danger-600"
1311
- }, vs = ["id", "disabled", "aria-expanded"], gs = { class: "flex-1 text-left truncate" }, ys = {
1508
+ }, Vl = ["id", "disabled", "aria-expanded"], Tl = { class: "flex-1 text-left truncate" }, Sl = {
1312
1509
  key: 0,
1510
+ class: "flex items-center justify-center gap-2 p-6 text-secondary-600"
1511
+ }, Il = {
1512
+ key: 1,
1313
1513
  class: "p-2 border-b border-secondary-200"
1314
- }, ms = ["placeholder"], hs = { class: "max-h-64 overflow-y-auto" }, xs = {
1514
+ }, jl = ["placeholder"], Ll = {
1515
+ key: 2,
1516
+ class: "max-h-64 overflow-y-auto"
1517
+ }, Ol = {
1315
1518
  key: 0,
1316
1519
  class: "px-4 py-3 text-sm text-secondary-500 text-center"
1317
- }, ks = ["onClick"], ws = { class: "flex items-center justify-between w-full" }, $s = { class: "truncate" }, Cs = {
1520
+ }, Al = ["onClick"], Fl = { class: "flex items-center justify-between w-full" }, Wl = { class: "truncate" }, ql = {
1318
1521
  key: 0,
1319
1522
  class: "w-5 h-5 text-primary-600 flex-shrink-0 ml-2",
1320
1523
  fill: "none",
1321
1524
  stroke: "currentColor",
1322
1525
  viewBox: "0 0 24 24",
1323
1526
  xmlns: "http://www.w3.org/2000/svg"
1324
- }, Ms = {
1527
+ }, Pl = {
1325
1528
  key: 0,
1326
1529
  class: "border-t border-secondary-200 my-1"
1327
- }, Bs = ["onClick"], zs = ["innerHTML"], Ds = {
1530
+ }, Rl = ["onClick"], El = ["innerHTML"], Yl = {
1328
1531
  key: 1,
1329
1532
  class: "mt-1 text-sm text-danger-600"
1330
- }, Vs = {
1533
+ }, Nl = {
1331
1534
  key: 2,
1332
1535
  class: "mt-1 text-sm text-secondary-600"
1333
- }, Ss = /* @__PURE__ */ Y({
1536
+ }, Hl = /* @__PURE__ */ N({
1334
1537
  __name: "Select",
1335
1538
  props: {
1336
1539
  modelValue: { default: null },
@@ -1341,6 +1544,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
1341
1544
  size: { default: "md" },
1342
1545
  variant: { default: "default" },
1343
1546
  disabled: { type: Boolean, default: !1 },
1547
+ loading: { type: Boolean, default: !1 },
1344
1548
  required: { type: Boolean, default: !1 },
1345
1549
  searchable: { type: Boolean, default: !1 },
1346
1550
  searchPlaceholder: { default: "Buscar..." },
@@ -1353,171 +1557,193 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
1353
1557
  },
1354
1558
  emits: ["update:modelValue", "change", "action"],
1355
1559
  setup(t, { emit: m }) {
1356
- const e = t, b = m, n = F(!1), u = F(""), d = F(null), i = r(
1560
+ const e = t, u = m, r = q(!1), p = q(""), v = q(null), n = o(
1357
1561
  () => `select-${Math.random().toString(36).substr(2, 9)}`
1358
- ), w = r(() => e.options.find((p) => p.value === e.modelValue) || null), y = r(() => {
1359
- if (!e.searchable || !u.value)
1562
+ ), b = o(() => e.options.find((h) => h.value === e.modelValue) || null), M = o(() => {
1563
+ if (!e.searchable || !p.value)
1360
1564
  return e.options;
1361
- const p = u.value.toLowerCase();
1362
- return e.options.filter((o) => o.label.toLowerCase().includes(p));
1363
- }), h = r(() => "ds-label"), M = r(() => e.bordered ? "border border-neutral-300 rounded-md" : "rounded-md"), B = r(() => {
1364
- const p = "w-full rounded-md flex items-center justify-between gap-2 transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 disabled:opacity-50 disabled:cursor-not-allowed", o = {
1565
+ const h = p.value.toLowerCase();
1566
+ return e.options.filter((d) => d.label.toLowerCase().includes(h));
1567
+ }), k = o(() => "ds-label"), g = o(() => e.bordered ? "border border-neutral-300 rounded-md" : "rounded-md"), y = o(() => {
1568
+ const h = "w-full rounded-md flex items-center justify-between gap-2 transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 disabled:opacity-50 disabled:cursor-not-allowed", d = {
1365
1569
  sm: "px-3 py-1.5 text-sm",
1366
1570
  md: "px-4 py-2 text-base",
1367
1571
  lg: "px-5 py-3 text-lg"
1368
- }, g = {
1572
+ }, C = {
1369
1573
  default: "bg-white",
1370
1574
  outline: "bg-transparent",
1371
1575
  filled: "bg-secondary-100"
1372
- }, D = e.error ? "border-danger-600 focus:ring-danger-500" : "";
1576
+ }, i = e.error ? "border-danger-600 focus:ring-danger-500" : "";
1373
1577
  return [
1374
- p,
1375
- o[e.size],
1376
- g[e.variant],
1377
- D
1578
+ h,
1579
+ d[e.size],
1580
+ C[e.variant],
1581
+ i
1378
1582
  ].join(" ");
1379
- }), S = r(() => `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`), A = (p) => {
1380
- const o = "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", g = _(p) ? "bg-primary-50" : "";
1381
- return [o, g].join(" ");
1382
- }, L = (p) => {
1383
- const o = "w-full px-4 py-2 text-left text-sm font-semibold transition-colors focus:outline-none flex items-center gap-3";
1384
- return p.variant === "danger" ? `${o} text-danger-600 hover:bg-danger-50 focus:bg-danger-50` : `${o} text-secondary-700 hover:bg-secondary-50 focus:bg-secondary-50`;
1385
- }, _ = (p) => p.value === e.modelValue, V = () => {
1386
- e.disabled || (n.value = !n.value, n.value && e.searchable && fe(() => {
1387
- var p;
1388
- (p = d.value) == null || p.focus();
1583
+ }), T = o(() => `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`), L = (h) => {
1584
+ const d = "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", C = F(h) ? "bg-primary-50" : "";
1585
+ return [d, C].join(" ");
1586
+ }, A = (h) => {
1587
+ const d = "w-full px-4 py-2 text-left text-sm font-semibold transition-colors focus:outline-none flex items-center gap-3";
1588
+ return h.variant === "danger" ? `${d} text-danger-600 hover:bg-danger-50 focus:bg-danger-50` : `${d} text-secondary-700 hover:bg-secondary-50 focus:bg-secondary-50`;
1589
+ }, F = (h) => h.value === e.modelValue, W = () => {
1590
+ e.disabled || e.loading || (r.value = !r.value, r.value && e.searchable && be(() => {
1591
+ var h;
1592
+ (h = v.value) == null || h.focus();
1389
1593
  }));
1390
- }, f = () => {
1391
- n.value = !1, u.value = "";
1392
- }, v = (p) => {
1393
- p.disabled || (b("update:modelValue", p.value), b("change", p), f());
1394
- }, O = (p) => {
1395
- p.action && p.action(), b("action", p), f();
1396
- }, C = (p) => {
1397
- const o = p.relatedTarget;
1398
- o && o.closest(".select-wrapper") || setTimeout(() => {
1399
- f();
1594
+ }, I = () => {
1595
+ r.value = !1, p.value = "";
1596
+ }, B = (h) => {
1597
+ h.disabled || (u("update:modelValue", h.value), u("change", h), I());
1598
+ }, V = (h) => {
1599
+ h.action && h.action(), u("action", h), I();
1600
+ }, P = (h) => {
1601
+ const d = h.relatedTarget;
1602
+ d && d.closest(".select-wrapper") || setTimeout(() => {
1603
+ I();
1400
1604
  }, 200);
1401
- }, j = (p) => {
1402
- p.key === "Escape" ? f() : (p.key === "Enter" || p.key === " ") && (p.preventDefault(), V());
1605
+ }, j = (h) => {
1606
+ h.key === "Escape" ? I() : (h.key === "Enter" || h.key === " ") && (h.preventDefault(), W());
1403
1607
  };
1404
- return pe(n, (p) => {
1405
- p && (u.value = "");
1406
- }), (p, o) => (s(), l("div", {
1608
+ return de(r, (h) => {
1609
+ h && (p.value = "");
1610
+ }), (h, d) => (l(), a("div", {
1407
1611
  class: c(["select-wrapper", { "w-full": t.fullWidth }])
1408
1612
  }, [
1409
- t.label ? (s(), l("label", {
1613
+ t.label ? (l(), a("label", {
1410
1614
  key: 0,
1411
- for: i.value,
1412
- class: c(h.value)
1615
+ for: n.value,
1616
+ class: c(k.value)
1413
1617
  }, [
1414
- q($(t.label) + " ", 1),
1415
- t.required ? (s(), l("span", bs, "*")) : x("", !0)
1416
- ], 10, ps)) : x("", !0),
1417
- a("div", {
1418
- class: c(["relative", M.value])
1618
+ Y($(t.label) + " ", 1),
1619
+ t.required ? (l(), a("span", Dl, "*")) : f("", !0)
1620
+ ], 10, zl)) : f("", !0),
1621
+ s("div", {
1622
+ class: c(["relative", g.value])
1419
1623
  }, [
1420
- a("button", {
1421
- id: i.value,
1624
+ s("button", {
1625
+ id: n.value,
1422
1626
  type: "button",
1423
- class: c(B.value),
1627
+ class: c(y.value),
1424
1628
  disabled: t.disabled,
1425
- "aria-expanded": n.value,
1629
+ "aria-expanded": r.value,
1426
1630
  "aria-haspopup": !0,
1427
- onClick: V,
1428
- onBlur: C,
1631
+ onClick: W,
1632
+ onBlur: P,
1429
1633
  onKeydown: j
1430
1634
  }, [
1431
- a("span", gs, $(w.value ? w.value.label : t.placeholder), 1),
1432
- (s(), l("svg", {
1433
- class: c(["w-5 h-5 flex-shrink-0 transition-transform text-[#565656] opacity-80", n.value ? "rotate-180" : ""]),
1635
+ s("span", Tl, $(b.value ? b.value.label : t.placeholder), 1),
1636
+ (l(), a("svg", {
1637
+ class: c(["w-5 h-5 flex-shrink-0 transition-transform text-[#565656] opacity-80", r.value ? "rotate-180" : ""]),
1434
1638
  fill: "none",
1435
1639
  stroke: "currentColor",
1436
1640
  viewBox: "0 0 24 24",
1437
1641
  xmlns: "http://www.w3.org/2000/svg"
1438
- }, [...o[3] || (o[3] = [
1439
- a("path", {
1642
+ }, [...d[3] || (d[3] = [
1643
+ s("path", {
1440
1644
  "stroke-linecap": "round",
1441
1645
  "stroke-linejoin": "round",
1442
1646
  "stroke-width": "2",
1443
1647
  d: "M19 9l-7 7-7-7"
1444
1648
  }, null, -1)
1445
1649
  ])], 2))
1446
- ], 42, vs),
1447
- n.value ? (s(), l("div", {
1650
+ ], 42, Vl),
1651
+ r.value ? (l(), a("div", {
1448
1652
  key: 0,
1449
- class: c(S.value),
1450
- onClick: o[2] || (o[2] = K(() => {
1653
+ class: c(T.value),
1654
+ onClick: d[2] || (d[2] = J(() => {
1451
1655
  }, ["stop"]))
1452
1656
  }, [
1453
- t.searchable ? (s(), l("div", ys, [
1454
- ce(a("input", {
1657
+ t.loading ? (l(), a("div", Sl, [...d[4] || (d[4] = [
1658
+ s("svg", {
1659
+ class: "w-5 h-5 animate-spin",
1660
+ xmlns: "http://www.w3.org/2000/svg",
1661
+ fill: "none",
1662
+ viewBox: "0 0 24 24"
1663
+ }, [
1664
+ s("circle", {
1665
+ class: "opacity-25",
1666
+ cx: "12",
1667
+ cy: "12",
1668
+ r: "10",
1669
+ stroke: "currentColor",
1670
+ "stroke-width": "4"
1671
+ }),
1672
+ s("path", {
1673
+ class: "opacity-75",
1674
+ fill: "currentColor",
1675
+ 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"
1676
+ })
1677
+ ], -1),
1678
+ s("span", null, "Cargando...", -1)
1679
+ ])])) : t.searchable ? (l(), a("div", Il, [
1680
+ ve(s("input", {
1455
1681
  ref_key: "searchInput",
1456
- ref: d,
1457
- "onUpdate:modelValue": o[0] || (o[0] = (g) => u.value = g),
1682
+ ref: v,
1683
+ "onUpdate:modelValue": d[0] || (d[0] = (C) => p.value = C),
1458
1684
  type: "text",
1459
1685
  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",
1460
1686
  placeholder: t.searchPlaceholder,
1461
- onKeydown: o[1] || (o[1] = K(() => {
1687
+ onKeydown: d[1] || (d[1] = J(() => {
1462
1688
  }, ["stop"]))
1463
- }, null, 40, ms), [
1464
- [Re, u.value]
1689
+ }, null, 40, jl), [
1690
+ [Ee, p.value]
1465
1691
  ])
1466
- ])) : x("", !0),
1467
- a("div", hs, [
1468
- y.value.length === 0 ? (s(), l("div", xs, $(t.emptyText), 1)) : (s(), l(E, { key: 1 }, [
1469
- (s(!0), l(E, null, H(y.value, (g) => (s(), l("button", {
1470
- key: g.value,
1692
+ ])) : f("", !0),
1693
+ t.loading ? f("", !0) : (l(), a("div", Ll, [
1694
+ M.value.length === 0 ? (l(), a("div", Ol, $(t.emptyText), 1)) : (l(), a(K, { key: 1 }, [
1695
+ (l(!0), a(K, null, G(M.value, (C) => (l(), a("button", {
1696
+ key: C.value,
1471
1697
  type: "button",
1472
- class: c(A(g)),
1473
- onClick: (D) => v(g)
1698
+ class: c(L(C)),
1699
+ onClick: (i) => B(C)
1474
1700
  }, [
1475
- a("div", ws, [
1476
- a("span", $s, $(g.label), 1),
1477
- _(g) ? (s(), l("svg", Cs, [...o[4] || (o[4] = [
1478
- a("path", {
1701
+ s("div", Fl, [
1702
+ s("span", Wl, $(C.label), 1),
1703
+ F(C) ? (l(), a("svg", ql, [...d[5] || (d[5] = [
1704
+ s("path", {
1479
1705
  "stroke-linecap": "round",
1480
1706
  "stroke-linejoin": "round",
1481
1707
  "stroke-width": "2",
1482
1708
  d: "M5 13l4 4L19 7"
1483
1709
  }, null, -1)
1484
- ])])) : x("", !0)
1710
+ ])])) : f("", !0)
1485
1711
  ])
1486
- ], 10, ks))), 128)),
1487
- t.actionItems.length > 0 ? (s(), l("div", Ms)) : x("", !0),
1488
- (s(!0), l(E, null, H(t.actionItems, (g) => (s(), l("button", {
1489
- key: g.id,
1712
+ ], 10, Al))), 128)),
1713
+ t.actionItems.length > 0 ? (l(), a("div", Pl)) : f("", !0),
1714
+ (l(!0), a(K, null, G(t.actionItems, (C) => (l(), a("button", {
1715
+ key: C.id,
1490
1716
  type: "button",
1491
- class: c(L(g)),
1492
- onClick: (D) => O(g)
1717
+ class: c(A(C)),
1718
+ onClick: (i) => V(C)
1493
1719
  }, [
1494
- g.icon ? (s(), l("svg", {
1720
+ C.icon ? (l(), a("svg", {
1495
1721
  key: 0,
1496
1722
  class: "w-4 h-4 flex-shrink-0",
1497
1723
  fill: "none",
1498
1724
  stroke: "currentColor",
1499
1725
  viewBox: "0 0 24 24",
1500
1726
  xmlns: "http://www.w3.org/2000/svg",
1501
- innerHTML: g.icon
1502
- }, null, 8, zs)) : x("", !0),
1503
- q(" " + $(g.label), 1)
1504
- ], 10, Bs))), 128))
1727
+ innerHTML: C.icon
1728
+ }, null, 8, El)) : f("", !0),
1729
+ Y(" " + $(C.label), 1)
1730
+ ], 10, Rl))), 128))
1505
1731
  ], 64))
1506
- ])
1507
- ], 2)) : x("", !0)
1732
+ ]))
1733
+ ], 2)) : f("", !0)
1508
1734
  ], 2),
1509
- t.error ? (s(), l("p", Ds, $(t.error), 1)) : t.helperText ? (s(), l("p", Vs, $(t.helperText), 1)) : x("", !0),
1510
- n.value ? (s(), l("div", {
1735
+ t.error ? (l(), a("p", Yl, $(t.error), 1)) : t.helperText ? (l(), a("p", Nl, $(t.helperText), 1)) : f("", !0),
1736
+ r.value ? (l(), a("div", {
1511
1737
  key: 3,
1512
- onClick: f,
1738
+ onClick: I,
1513
1739
  class: "fixed inset-0 z-40"
1514
- })) : x("", !0)
1740
+ })) : f("", !0)
1515
1741
  ], 2));
1516
1742
  }
1517
- }), Rl = /* @__PURE__ */ U(Ss, [["__scopeId", "data-v-4b6dade4"]]), Ts = {
1743
+ }), ls = /* @__PURE__ */ Z(Hl, [["__scopeId", "data-v-9886e097"]]), Kl = ["title"], Ul = {
1518
1744
  key: 0,
1519
1745
  class: "space-y-1"
1520
- }, Is = ["href", "onClick", "aria-current"], js = /* @__PURE__ */ Y({
1746
+ }, Jl = ["href", "onClick", "aria-current"], Gl = { key: 2 }, Ql = /* @__PURE__ */ N({
1521
1747
  __name: "Sidebar",
1522
1748
  props: {
1523
1749
  modelValue: { type: Boolean, default: !1 },
@@ -1532,146 +1758,184 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
1532
1758
  padding: { default: "md" },
1533
1759
  items: { default: () => [] },
1534
1760
  activeItem: { default: null },
1535
- keepOpen: { type: Boolean, default: !1 }
1761
+ keepOpen: { type: Boolean, default: !1 },
1762
+ collapsible: { type: Boolean, default: !1 },
1763
+ collapsed: { type: Boolean, default: !1 },
1764
+ mini: { type: Boolean, default: !1 },
1765
+ miniWidth: { default: "5rem" },
1766
+ bordered: { type: Boolean, default: !1 },
1767
+ scrimOpacity: { default: 0.5 }
1536
1768
  },
1537
- emits: ["update:modelValue", "update:activeItem", "close", "open", "itemClick"],
1769
+ emits: ["update:modelValue", "update:activeItem", "update:collapsed", "close", "open", "itemClick", "toggleCollapse"],
1538
1770
  setup(t, { emit: m }) {
1539
- const e = t, b = m, n = r({
1771
+ const e = t, u = q(e.collapsed), r = o(() => e.mini || u.value), p = m, v = o({
1540
1772
  get: () => e.modelValue,
1541
- set: (V) => b("update:modelValue", V)
1542
- }), u = () => {
1543
- !e.persistent && !e.keepOpen && (n.value = !1, b("close"));
1544
- }, d = (V, f) => {
1545
- f.id && b("update:activeItem", f.id), f.onClick && (V.preventDefault(), f.onClick(f)), b("itemClick", f), !e.keepOpen && !e.persistent && u();
1546
- }, i = (V) => V.active !== void 0 ? V.active : e.activeItem && V.id ? e.activeItem === V.id : !1, w = (V) => {
1547
- const f = "flex items-center gap-3 px-4 py-3 rounded-lg transition-all duration-200 text-sm font-medium", v = i(V) ? "bg-primary-100 text-primary-700 border-l-4 border-primary-600" : "text-gray-700 hover:bg-gray-100 hover:text-gray-900";
1548
- return `${f} ${v}`;
1549
- }, y = (V) => {
1550
- const f = "w-5 h-5 flex-shrink-0", v = i(V) ? "text-primary-600" : "text-gray-500";
1551
- return `${f} ${v}`;
1552
- }, h = r(() => e.position === "left" ? "slide-right" : "slide-left"), M = r(() => {
1553
- const V = "fixed top-0 h-full z-50 flex flex-col w-full max-w-full sm:max-w-none", f = e.position === "left" ? "left-0" : "right-0", v = 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)]" : "";
1554
- return [V, f, v].filter(Boolean).join(" ");
1555
- }), B = r(() => ({
1556
- // Base fluid width; respect custom width as max constraint
1773
+ set: (j) => p("update:modelValue", j)
1774
+ }), n = (j = !1) => {
1775
+ const h = e.keepOpen && !j;
1776
+ !e.persistent && !h && (v.value = !1, p("close"));
1777
+ }, b = () => {
1778
+ u.value = !u.value, p("update:collapsed", u.value), p("toggleCollapse");
1779
+ };
1780
+ de(
1781
+ () => e.collapsed,
1782
+ (j) => {
1783
+ u.value = j;
1784
+ },
1785
+ { immediate: !0 }
1786
+ );
1787
+ const M = (j, h) => {
1788
+ h.id && p("update:activeItem", h.id), h.onClick && (j.preventDefault(), h.onClick(h)), p("itemClick", h), !e.keepOpen && !e.persistent && n();
1789
+ }, k = (j) => j.active !== void 0 ? j.active : e.activeItem && j.id ? e.activeItem === j.id : !1, g = (j) => {
1790
+ const h = r.value ? "flex items-center justify-center p-3 rounded-lg transition-all duration-200" : "flex items-center gap-3 px-4 py-3 rounded-lg transition-all duration-200 text-sm font-medium", d = k(j) ? r.value ? "bg-primary-100 text-primary-700" : "bg-primary-100 text-primary-700 border-l-4 border-primary-600" : "text-gray-700 hover:bg-gray-100 hover:text-gray-900";
1791
+ return `${h} ${d}`;
1792
+ }, y = (j) => {
1793
+ const h = "w-5 h-5 flex-shrink-0", d = k(j) ? "text-primary-600" : "text-gray-500";
1794
+ return `${h} ${d}`;
1795
+ }, T = o(() => e.position === "left" ? "slide-right" : "slide-left"), L = o(() => {
1796
+ const j = "fixed top-0 h-full z-50 flex flex-col w-full max-w-full sm:max-w-none transition-all duration-300", h = e.position === "left" ? "left-0" : "right-0", d = 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)]" : "", C = e.bordered ? "border-r border-gray-200" : "";
1797
+ return [j, h, d, C].filter(Boolean).join(" ");
1798
+ }), A = o(() => ({
1557
1799
  width: "100%",
1558
- maxWidth: e.width,
1800
+ maxWidth: e.mini || u.value ? e.miniWidth : e.width,
1559
1801
  backgroundColor: e.backgroundColor,
1560
1802
  top: e.overlayTop,
1561
1803
  height: e.overlayTop !== "0" ? `calc(100vh - ${e.overlayTop})` : "100vh"
1562
- })), S = {
1804
+ })), F = {
1563
1805
  none: "",
1564
1806
  sm: "p-2",
1565
1807
  md: "p-4",
1566
1808
  lg: "p-6"
1567
- }, A = r(() => `flex items-center justify-between border-b border-gray-200 ${S[e.padding]}`), L = r(() => `flex-1 overflow-y-auto ${S[e.padding]}`), _ = r(() => `border-t border-gray-200 ${S[e.padding]}`);
1568
- return (V, f) => (s(), ee(be, { to: "body" }, [
1569
- J(re, { name: "fade" }, {
1570
- default: le(() => [
1571
- n.value && t.overlay && !t.keepOpen ? (s(), l("div", {
1809
+ }, W = o(() => `flex items-center justify-between border-b border-gray-200 ${r.value ? "p-2" : F[e.padding]}`), I = o(() => r.value ? "flex gap-1 items-center" : "flex gap-2 items-center"), B = o(() => r.value ? "p-1.5 hover:bg-gray-100 rounded-md transition-colors" : "p-2 hover:bg-gray-100 rounded-md transition-colors"), V = o(() => `flex-1 overflow-y-auto ${F[e.padding]}`), P = o(() => `border-t border-gray-200 ${F[e.padding]}`);
1810
+ return (j, h) => (l(), le(me, { to: "body" }, [
1811
+ Q(ie, { name: "fade" }, {
1812
+ default: re(() => [
1813
+ v.value && t.overlay && !t.keepOpen ? (l(), a("div", {
1572
1814
  key: 0,
1573
- onClick: u,
1574
- class: "fixed inset-0 bg-black/50 z-40",
1575
- style: G({ top: t.overlayTop })
1576
- }, null, 4)) : x("", !0)
1815
+ onClick: h[0] || (h[0] = (d) => n()),
1816
+ class: "fixed inset-0 z-40",
1817
+ style: X({ top: t.overlayTop, backgroundColor: `rgba(0, 0, 0, ${t.scrimOpacity || 0.5})` })
1818
+ }, null, 4)) : f("", !0)
1577
1819
  ]),
1578
1820
  _: 1
1579
1821
  }),
1580
- J(re, { name: h.value }, {
1581
- default: le(() => [
1582
- n.value ? (s(), l("aside", {
1822
+ Q(ie, { name: T.value }, {
1823
+ default: re(() => [
1824
+ v.value ? (l(), a("aside", {
1583
1825
  key: 0,
1584
- class: c(M.value),
1585
- style: G(B.value)
1826
+ class: c(L.value),
1827
+ style: X(A.value)
1586
1828
  }, [
1587
- V.$slots.header ? (s(), l("div", {
1829
+ j.$slots.header ? (l(), a("div", {
1588
1830
  key: 0,
1589
- class: c(A.value)
1831
+ class: c(W.value)
1590
1832
  }, [
1591
- I(V.$slots, "header", {}, void 0, !0),
1592
- t.closable ? (s(), l("button", {
1593
- key: 0,
1594
- onClick: u,
1595
- class: "p-2 hover:bg-gray-100 rounded-md transition-colors",
1596
- "aria-label": "Cerrar menú"
1597
- }, [...f[0] || (f[0] = [
1598
- a("svg", {
1599
- class: "w-5 h-5",
1600
- fill: "none",
1601
- stroke: "currentColor",
1602
- viewBox: "0 0 24 24"
1603
- }, [
1604
- a("path", {
1605
- "stroke-linecap": "round",
1606
- "stroke-linejoin": "round",
1607
- "stroke-width": "2",
1608
- d: "M6 18L18 6M6 6l12 12"
1609
- })
1610
- ], -1)
1611
- ])])) : x("", !0)
1612
- ], 2)) : x("", !0),
1613
- a("div", {
1614
- class: c(L.value)
1833
+ O(j.$slots, "header", {}, void 0, !0),
1834
+ s("div", {
1835
+ class: c(I.value)
1836
+ }, [
1837
+ t.collapsible ? (l(), a("button", {
1838
+ key: 0,
1839
+ onClick: b,
1840
+ class: c(B.value),
1841
+ title: u.value ? "Expandir" : "Contraer",
1842
+ "aria-label": "Toggle sidebar collapse"
1843
+ }, [...h[2] || (h[2] = [
1844
+ s("svg", {
1845
+ class: "w-5 h-5",
1846
+ fill: "none",
1847
+ stroke: "currentColor",
1848
+ viewBox: "0 0 24 24"
1849
+ }, [
1850
+ s("path", {
1851
+ "stroke-linecap": "round",
1852
+ "stroke-linejoin": "round",
1853
+ "stroke-width": "2",
1854
+ d: "M15 19l-7-7 7-7"
1855
+ })
1856
+ ], -1)
1857
+ ])], 10, Kl)) : f("", !0),
1858
+ t.closable ? (l(), a("button", {
1859
+ key: 1,
1860
+ onClick: h[1] || (h[1] = (d) => n(!0)),
1861
+ class: c(B.value),
1862
+ "aria-label": "Cerrar menú"
1863
+ }, [...h[3] || (h[3] = [
1864
+ s("svg", {
1865
+ class: "w-5 h-5",
1866
+ fill: "none",
1867
+ stroke: "currentColor",
1868
+ viewBox: "0 0 24 24"
1869
+ }, [
1870
+ s("path", {
1871
+ "stroke-linecap": "round",
1872
+ "stroke-linejoin": "round",
1873
+ "stroke-width": "2",
1874
+ d: "M6 18L18 6M6 6l12 12"
1875
+ })
1876
+ ], -1)
1877
+ ])], 2)) : f("", !0)
1878
+ ], 2)
1879
+ ], 2)) : f("", !0),
1880
+ s("div", {
1881
+ class: c(V.value)
1615
1882
  }, [
1616
- t.items && t.items.length ? (s(), l("nav", Ts, [
1617
- (s(!0), l(E, null, H(t.items, (v) => (s(), l("a", {
1618
- key: v.id || v.label,
1619
- href: v.href,
1620
- onClick: (O) => d(O, v),
1621
- class: c(w(v)),
1622
- "aria-current": i(v) ? "page" : void 0
1883
+ t.items && t.items.length ? (l(), a("nav", Ul, [
1884
+ (l(!0), a(K, null, G(t.items, (d) => (l(), a("a", {
1885
+ key: d.id || d.label,
1886
+ href: d.href,
1887
+ onClick: (C) => M(C, d),
1888
+ class: c(g(d)),
1889
+ "aria-current": k(d) ? "page" : void 0
1623
1890
  }, [
1624
- v.icon && typeof v.icon == "string" ? (s(), ee(X, {
1891
+ d.icon && typeof d.icon == "string" ? (l(), le(ee, {
1625
1892
  key: 0,
1626
- name: v.icon,
1893
+ name: d.icon,
1627
1894
  size: "md",
1628
- class: c(y(v))
1629
- }, null, 8, ["name", "class"])) : v.icon ? (s(), ee(ve(v.icon), {
1895
+ class: c(y(d))
1896
+ }, null, 8, ["name", "class"])) : d.icon ? (l(), le(ge(d.icon), {
1630
1897
  key: 1,
1631
- class: c(y(v))
1632
- }, null, 8, ["class"])) : x("", !0),
1633
- a("span", null, $(v.label), 1)
1634
- ], 10, Is))), 128))
1635
- ])) : x("", !0),
1636
- I(V.$slots, "default", {}, void 0, !0)
1898
+ class: c(y(d))
1899
+ }, null, 8, ["class"])) : f("", !0),
1900
+ r.value ? f("", !0) : (l(), a("span", Gl, $(d.label), 1))
1901
+ ], 10, Jl))), 128))
1902
+ ])) : f("", !0),
1903
+ O(j.$slots, "default", {}, void 0, !0)
1637
1904
  ], 2),
1638
- V.$slots.footer ? (s(), l("div", {
1905
+ j.$slots.footer ? (l(), a("div", {
1639
1906
  key: 1,
1640
- class: c(_.value)
1907
+ class: c(P.value)
1641
1908
  }, [
1642
- I(V.$slots, "footer", {}, void 0, !0)
1643
- ], 2)) : x("", !0)
1644
- ], 6)) : x("", !0)
1909
+ O(j.$slots, "footer", {}, void 0, !0)
1910
+ ], 2)) : f("", !0)
1911
+ ], 6)) : f("", !0)
1645
1912
  ]),
1646
1913
  _: 3
1647
1914
  }, 8, ["name"])
1648
1915
  ]));
1649
1916
  }
1650
- }), Pl = /* @__PURE__ */ U(js, [["__scopeId", "data-v-1ca72eea"]]), Ls = { class: "w-full space-y-4" }, Os = { class: "flex flex-col gap-3 md:hidden" }, _s = {
1917
+ }), as = /* @__PURE__ */ Z(Ql, [["__scopeId", "data-v-e9c1eec7"]]), Zl = { class: "w-full space-y-4" }, Xl = { class: "flex flex-col gap-3 md:hidden" }, _l = {
1651
1918
  key: 0,
1652
1919
  class: "flex items-center gap-2 px-1 text-sm text-gray-600"
1653
- }, As = ["checked", "indeterminate"], Fs = {
1920
+ }, ea = ["checked", "indeterminate"], ta = {
1654
1921
  key: 0,
1655
1922
  class: "flex items-center gap-2 pb-2"
1656
- }, Rs = ["checked", "onChange", "aria-label"], Ps = { class: "text-[11px] uppercase tracking-wide text-gray-400" }, Ys = { class: "text-sm text-gray-700" }, Es = {
1923
+ }, la = ["checked", "onChange", "aria-label"], aa = { class: "text-[11px] uppercase tracking-wide text-gray-400" }, sa = { class: "text-sm text-gray-700" }, oa = {
1657
1924
  key: 1,
1658
1925
  class: "rounded-lg border border-dashed border-gray-200 bg-white p-4 text-gray-400 text-center"
1659
- }, qs = { class: "hidden md:block w-full overflow-x-auto" }, Ns = { class: "w-full border-collapse" }, Ws = { class: "w-full" }, Hs = {
1926
+ }, ra = { class: "hidden md:block w-full overflow-x-auto" }, na = { class: "w-full border-collapse" }, ia = { class: "w-full" }, da = {
1660
1927
  key: 0,
1661
1928
  class: "px-3 py-3 text-left text-xs font-semibold text-gray-700 border-l border-gray-100 first:border-l-0 w-10"
1662
- }, Ks = ["checked", "indeterminate"], Us = ["onClick"], Js = { class: "flex items-center gap-2" }, Gs = {
1929
+ }, ua = ["checked", "indeterminate"], ca = ["onClick"], fa = { class: "flex items-center gap-2" }, pa = {
1663
1930
  key: 0,
1664
1931
  class: "text-xs text-gray-400"
1665
- }, Qs = { key: 0 }, Zs = { key: 1 }, Xs = { class: "w-full" }, el = {
1666
- key: 0,
1667
- class: "px-3 py-3 text-xs text-gray-600 border-l border-gray-100 first:border-l-0 w-10"
1668
- }, tl = ["checked", "onChange", "aria-label"], sl = {
1932
+ }, va = { key: 0 }, ba = { key: 1 }, ma = { class: "w-full" }, ga = ["checked", "onChange", "aria-label"], ya = {
1669
1933
  key: 0,
1670
1934
  class: "flex items-center justify-center py-12 text-gray-400"
1671
- }, ll = {
1935
+ }, ha = {
1672
1936
  key: 0,
1673
1937
  class: "w-full px-6 py-4 bg-white"
1674
- }, al = /* @__PURE__ */ Y({
1938
+ }, xa = /* @__PURE__ */ N({
1675
1939
  __name: "Table",
1676
1940
  props: {
1677
1941
  columns: {},
@@ -1682,222 +1946,254 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
1682
1946
  rowClass: { default: void 0 },
1683
1947
  selectable: { type: Boolean, default: !1 },
1684
1948
  selectedKeys: { default: () => [] },
1685
- rowKey: { default: "id" }
1949
+ rowKey: { default: "id" },
1950
+ striped: { type: Boolean, default: !1 },
1951
+ density: { default: "normal" },
1952
+ hover: { type: Boolean, default: !0 }
1686
1953
  },
1687
1954
  emits: ["update:selectedKeys"],
1688
1955
  setup(t, { emit: m }) {
1689
- const e = t, b = m, n = F(null), u = F("asc"), d = (C) => {
1690
- n.value === C ? u.value = u.value === "asc" ? "desc" : "asc" : (n.value = C, u.value = "asc");
1691
- }, i = r(() => {
1956
+ const e = t, u = o(() => ({
1957
+ compact: "py-1.5",
1958
+ normal: "py-3",
1959
+ spacious: "py-5"
1960
+ })[e.density]), r = o(() => e.striped), p = o(() => e.hover), v = m, n = q(null), b = q("asc"), M = (d) => {
1961
+ n.value === d ? b.value = b.value === "asc" ? "desc" : "asc" : (n.value = d, b.value = "asc");
1962
+ }, k = o(() => {
1692
1963
  if (!n.value)
1693
1964
  return e.data;
1694
- const C = [...e.data];
1695
- return C.sort((j, p) => {
1696
- const o = j[n.value], g = p[n.value];
1697
- return typeof o == "string" && typeof g == "string" ? u.value === "asc" ? o.localeCompare(g) : g.localeCompare(o) : typeof o == "number" && typeof g == "number" ? u.value === "asc" ? o - g : g - o : 0;
1698
- }), C;
1699
- }), w = r(() => e.columns.filter((C) => !C.hideOnMobile)), y = r(() => e.selectable), h = r({
1965
+ const d = [...e.data];
1966
+ return d.sort((C, i) => {
1967
+ const z = C[n.value], x = i[n.value];
1968
+ return typeof z == "string" && typeof x == "string" ? b.value === "asc" ? z.localeCompare(x) : x.localeCompare(z) : typeof z == "number" && typeof x == "number" ? b.value === "asc" ? z - x : x - z : 0;
1969
+ }), d;
1970
+ }), g = o(() => e.columns.filter((d) => !d.hideOnMobile)), y = o(() => e.selectable), T = o({
1700
1971
  get: () => e.selectedKeys || [],
1701
- set: (C) => b("update:selectedKeys", C)
1702
- }), M = (C, j) => {
1703
- const p = e.rowKey;
1704
- return (p && C ? C[p] : void 0) ?? j;
1705
- }, B = r(() => i.value.map((C, j) => M(C, j))), S = r(() => B.value.length > 0 && B.value.every((C) => h.value.includes(C))), A = r(() => !S.value && h.value.length > 0), L = (C) => {
1706
- y.value && (h.value = C ? [...B.value] : []);
1707
- }, _ = (C, j) => {
1708
- const p = M(C, j);
1709
- return h.value.includes(p);
1710
- }, V = (C, j, p) => {
1972
+ set: (d) => v("update:selectedKeys", d)
1973
+ }), L = (d, C) => {
1974
+ const i = e.rowKey;
1975
+ return (i && d ? d[i] : void 0) ?? C;
1976
+ }, A = o(() => k.value.map((d, C) => L(d, C))), F = o(() => A.value.length > 0 && A.value.every((d) => T.value.includes(d))), W = o(() => !F.value && T.value.length > 0), I = (d) => {
1977
+ y.value && (T.value = d ? [...A.value] : []);
1978
+ }, B = (d, C) => {
1979
+ const i = L(d, C);
1980
+ return T.value.includes(i);
1981
+ }, V = (d, C, i) => {
1711
1982
  if (!y.value) return;
1712
- const o = M(C, j), g = new Set(h.value);
1713
- p ? g.add(o) : g.delete(o), h.value = Array.from(g);
1714
- }, f = (C) => {
1715
- const j = C.target;
1716
- return !!(j != null && j.checked);
1717
- }, v = (C) => {
1718
- L(f(C));
1719
- }, O = (C, j, p) => {
1720
- V(C, j, f(p));
1983
+ const z = L(d, C), x = new Set(T.value);
1984
+ i ? x.add(z) : x.delete(z), T.value = Array.from(x);
1985
+ }, P = (d) => {
1986
+ const C = d.target;
1987
+ return !!(C != null && C.checked);
1988
+ }, j = (d) => {
1989
+ I(P(d));
1990
+ }, h = (d, C, i) => {
1991
+ V(d, C, P(i));
1721
1992
  };
1722
- return (C, j) => (s(), l("div", Ls, [
1723
- a("div", Os, [
1724
- y.value ? (s(), l("div", _s, [
1725
- a("input", {
1993
+ return (d, C) => (l(), a("div", Zl, [
1994
+ s("div", Xl, [
1995
+ y.value ? (l(), a("div", _l, [
1996
+ s("input", {
1726
1997
  type: "checkbox",
1727
1998
  class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500",
1728
- checked: S.value,
1729
- indeterminate: A.value,
1730
- onChange: v,
1999
+ checked: F.value,
2000
+ indeterminate: W.value,
2001
+ onChange: j,
1731
2002
  "aria-label": "Seleccionar todas las filas"
1732
- }, null, 40, As),
1733
- j[0] || (j[0] = a("span", null, "Seleccionar todas", -1))
1734
- ])) : x("", !0),
1735
- (s(!0), l(E, null, H(i.value, (p, o) => (s(), l("div", {
1736
- key: `card-${o}`,
2003
+ }, null, 40, ea),
2004
+ C[0] || (C[0] = s("span", null, "Seleccionar todas", -1))
2005
+ ])) : f("", !0),
2006
+ (l(!0), a(K, null, G(k.value, (i, z) => (l(), a("div", {
2007
+ key: `card-${z}`,
1737
2008
  class: "rounded-lg border border-gray-200 bg-white p-4 shadow-sm"
1738
2009
  }, [
1739
- y.value ? (s(), l("div", Fs, [
1740
- a("input", {
2010
+ y.value ? (l(), a("div", ta, [
2011
+ s("input", {
1741
2012
  type: "checkbox",
1742
2013
  class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500",
1743
- checked: _(p, o),
1744
- onChange: (g) => O(p, o, g),
1745
- "aria-label": `Seleccionar fila ${o + 1}`
1746
- }, null, 40, Rs),
1747
- j[1] || (j[1] = a("span", { class: "text-sm text-gray-700" }, "Seleccionar fila", -1))
1748
- ])) : x("", !0),
1749
- (s(!0), l(E, null, H(w.value, (g) => (s(), l("div", {
1750
- key: `card-${o}-${g.key}`,
2014
+ checked: B(i, z),
2015
+ onChange: (x) => h(i, z, x),
2016
+ "aria-label": `Seleccionar fila ${z + 1}`
2017
+ }, null, 40, la),
2018
+ C[1] || (C[1] = s("span", { class: "text-sm text-gray-700" }, "Seleccionar fila", -1))
2019
+ ])) : f("", !0),
2020
+ (l(!0), a(K, null, G(g.value, (x) => (l(), a("div", {
2021
+ key: `card-${z}-${x.key}`,
1751
2022
  class: "flex flex-col gap-1 py-1"
1752
2023
  }, [
1753
- a("span", Ps, $(g.label), 1),
1754
- a("span", Ys, [
1755
- I(C.$slots, `cell-${g.key}`, {
1756
- value: p[g.key],
1757
- row: p
2024
+ s("span", aa, $(x.label), 1),
2025
+ s("span", sa, [
2026
+ O(d.$slots, `cell-${x.key}`, {
2027
+ value: i[x.key],
2028
+ row: i
1758
2029
  }, () => [
1759
- q($(p[g.key]), 1)
2030
+ Y($(i[x.key]), 1)
1760
2031
  ], !0)
1761
2032
  ])
1762
2033
  ]))), 128))
1763
2034
  ]))), 128)),
1764
- i.value.length === 0 ? (s(), l("div", Es, [
1765
- I(C.$slots, "empty", {}, () => [
1766
- j[2] || (j[2] = q("No hay datos disponibles", -1))
2035
+ k.value.length === 0 ? (l(), a("div", oa, [
2036
+ O(d.$slots, "empty", {}, () => [
2037
+ C[2] || (C[2] = Y("No hay datos disponibles", -1))
1767
2038
  ], !0)
1768
- ])) : x("", !0)
2039
+ ])) : f("", !0)
1769
2040
  ]),
1770
- a("div", qs, [
1771
- a("table", Ns, [
1772
- a("thead", Ws, [
1773
- a("tr", {
2041
+ s("div", ra, [
2042
+ s("table", na, [
2043
+ s("thead", ia, [
2044
+ s("tr", {
1774
2045
  class: c([
1775
2046
  "w-full",
1776
2047
  e.headerClass || "bg-neutral-50 border-b border-gray-100"
1777
2048
  ])
1778
2049
  }, [
1779
- y.value ? (s(), l("th", Hs, [
1780
- a("input", {
2050
+ y.value ? (l(), a("th", da, [
2051
+ s("input", {
1781
2052
  type: "checkbox",
1782
2053
  class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500",
1783
- checked: S.value,
1784
- indeterminate: A.value,
1785
- onChange: v,
2054
+ checked: F.value,
2055
+ indeterminate: W.value,
2056
+ onChange: j,
1786
2057
  "aria-label": "Seleccionar todas las filas"
1787
- }, null, 40, Ks)
1788
- ])) : x("", !0),
1789
- (s(!0), l(E, null, H(t.columns, (p) => (s(), l("th", {
1790
- key: p.key,
1791
- style: G(p.width ? { width: p.width } : {}),
2058
+ }, null, 40, ua)
2059
+ ])) : f("", !0),
2060
+ (l(!0), a(K, null, G(t.columns, (i) => (l(), a("th", {
2061
+ key: i.key,
2062
+ style: X(i.width ? { width: i.width } : {}),
1792
2063
  class: c([
1793
2064
  "px-4 py-3 text-left text-xs font-semibold text-gray-700 border-l border-gray-100 first:border-l-0",
1794
- p.sortable ? "cursor-pointer hover:text-primary-600 select-none transition-colors" : "",
2065
+ i.sortable ? "cursor-pointer hover:text-primary-600 select-none transition-colors" : "",
1795
2066
  e.headerCellClass
1796
2067
  ]),
1797
- onClick: (o) => p.sortable && d(p.key)
2068
+ onClick: (z) => i.sortable && M(i.key)
1798
2069
  }, [
1799
- a("div", Js, [
1800
- a("span", null, $(p.label), 1),
1801
- p.sortable ? (s(), l("span", Gs, [
1802
- n.value !== p.key ? (s(), l("span", Qs, "⇅")) : (s(), l("span", Zs, $(u.value === "asc" ? "↑" : "↓"), 1))
1803
- ])) : x("", !0)
2070
+ s("div", fa, [
2071
+ s("span", null, $(i.label), 1),
2072
+ i.sortable ? (l(), a("span", pa, [
2073
+ n.value !== i.key ? (l(), a("span", va, "⇅")) : (l(), a("span", ba, $(b.value === "asc" ? "↑" : "↓"), 1))
2074
+ ])) : f("", !0)
1804
2075
  ])
1805
- ], 14, Us))), 128))
2076
+ ], 14, ca))), 128))
1806
2077
  ], 2)
1807
2078
  ]),
1808
- a("tbody", Xs, [
1809
- (s(!0), l(E, null, H(i.value, (p, o) => (s(), l("tr", {
1810
- key: o,
2079
+ s("tbody", ma, [
2080
+ (l(!0), a(K, null, G(k.value, (i, z) => (l(), a("tr", {
2081
+ key: z,
1811
2082
  class: c([
1812
- "w-full border-b border-gray-200 hover:bg-gray-50 transition-colors",
1813
- e.rowClass
2083
+ "w-full border-b border-gray-200 transition-colors",
2084
+ r.value && z % 2 === 1 ? "bg-gray-50" : "",
2085
+ p.value ? "hover:bg-blue-50" : "",
2086
+ e.rowClass,
2087
+ u.value
1814
2088
  ])
1815
2089
  }, [
1816
- y.value ? (s(), l("td", el, [
1817
- a("input", {
2090
+ y.value ? (l(), a("td", {
2091
+ key: 0,
2092
+ class: c(["px-3 text-xs text-gray-600 border-l border-gray-100 first:border-l-0 w-10", u.value])
2093
+ }, [
2094
+ s("input", {
1818
2095
  type: "checkbox",
1819
2096
  class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500",
1820
- checked: _(p, o),
1821
- onChange: (g) => O(p, o, g),
1822
- "aria-label": `Seleccionar fila ${o + 1}`
1823
- }, null, 40, tl)
1824
- ])) : x("", !0),
1825
- (s(!0), l(E, null, H(t.columns, (g) => (s(), l("td", {
1826
- key: `${o}-${g.key}`,
2097
+ checked: B(i, z),
2098
+ onChange: (x) => h(i, z, x),
2099
+ "aria-label": `Seleccionar fila ${z + 1}`
2100
+ }, null, 40, ga)
2101
+ ], 2)) : f("", !0),
2102
+ (l(!0), a(K, null, G(t.columns, (x) => (l(), a("td", {
2103
+ key: `${z}-${x.key}`,
1827
2104
  class: c([
1828
- "px-4 py-3 text-xs text-gray-600 border-l border-gray-100 first:border-l-0",
1829
- e.cellClass
2105
+ "px-4 text-xs text-gray-600 border-l border-gray-100 first:border-l-0",
2106
+ e.cellClass,
2107
+ u.value
1830
2108
  ])
1831
2109
  }, [
1832
- I(C.$slots, `cell-${g.key}`, {
1833
- value: p[g.key],
1834
- row: p
2110
+ O(d.$slots, `cell-${x.key}`, {
2111
+ value: i[x.key],
2112
+ row: i
1835
2113
  }, () => [
1836
- q($(p[g.key]), 1)
2114
+ Y($(i[x.key]), 1)
1837
2115
  ], !0)
1838
2116
  ], 2))), 128))
1839
2117
  ], 2))), 128))
1840
2118
  ])
1841
2119
  ]),
1842
- i.value.length === 0 ? (s(), l("div", sl, [
1843
- I(C.$slots, "empty", {}, () => [
1844
- j[3] || (j[3] = q("No hay datos disponibles", -1))
2120
+ k.value.length === 0 ? (l(), a("div", ya, [
2121
+ O(d.$slots, "empty", {}, () => [
2122
+ C[3] || (C[3] = Y("No hay datos disponibles", -1))
1845
2123
  ], !0)
1846
- ])) : x("", !0)
2124
+ ])) : f("", !0)
1847
2125
  ]),
1848
- C.$slots.footer ? (s(), l("div", ll, [
1849
- I(C.$slots, "footer", {}, void 0, !0)
1850
- ])) : x("", !0)
2126
+ d.$slots.footer ? (l(), a("div", ha, [
2127
+ O(d.$slots, "footer", {}, void 0, !0)
2128
+ ])) : f("", !0)
1851
2129
  ]));
1852
2130
  }
1853
- }), Yl = /* @__PURE__ */ U(al, [["__scopeId", "data-v-48077898"]]), ol = { class: "tabs-wrapper" }, rl = {
1854
- class: "tabs-container",
1855
- role: "tablist"
1856
- }, nl = ["aria-selected", "onClick"], il = "relative w-full sm:w-auto text-left sm:text-center px-4 sm:px-6 py-3 text-base tracking-wide transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary-500 border-b-3", dl = "text-primary-600 border-primary-600 font-semibold", ul = "hover:text-secondary-700 border-transparent font-normal", cl = /* @__PURE__ */ Y({
2131
+ }), ss = /* @__PURE__ */ Z(xa, [["__scopeId", "data-v-6e6c27e1"]]), wa = { class: "tabs-wrapper" }, ka = ["aria-selected", "onClick"], Ca = "relative w-full sm:w-auto text-left sm:text-center px-4 sm:px-6 py-3 text-base tracking-wide transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary-500", $a = /* @__PURE__ */ N({
1857
2132
  __name: "Tabs",
1858
2133
  props: {
1859
2134
  modelValue: {},
1860
2135
  tabs: {},
1861
2136
  headerClass: {},
1862
- contentClass: {}
2137
+ contentClass: {},
2138
+ variant: { default: "default" }
1863
2139
  },
1864
2140
  emits: ["update:modelValue"],
1865
2141
  setup(t, { emit: m }) {
1866
- const e = t, b = m, n = (w) => e.modelValue === w, u = (w) => {
1867
- n(w) || b("update:modelValue", w);
1868
- }, d = r(() => e.modelValue), i = r(
1869
- () => e.tabs.find((w) => w.value === d.value)
2142
+ const e = t, u = m, r = o(() => ({
2143
+ default: "border-b-3",
2144
+ bordered: "border border-secondary-200 rounded-t-lg",
2145
+ pill: "rounded-full bg-secondary-100 mx-1"
2146
+ })[e.variant]), p = o(() => ({
2147
+ default: "border-b border-gray-200",
2148
+ bordered: "gap-0",
2149
+ pill: "gap-2 bg-white p-1 rounded-full border border-secondary-200"
2150
+ })[e.variant]), v = o(() => ({
2151
+ default: "text-primary-600 border-primary-600 font-semibold",
2152
+ bordered: "text-primary-600 border-primary-600 bg-primary-50 font-semibold",
2153
+ pill: "text-white bg-primary-600 font-semibold"
2154
+ })[e.variant]), n = o(() => ({
2155
+ default: "hover:text-secondary-700 border-transparent font-normal",
2156
+ bordered: "text-secondary-600 hover:text-primary-600 font-normal",
2157
+ pill: "text-secondary-600 hover:text-secondary-900 font-normal"
2158
+ })[e.variant]), b = (y) => e.modelValue === y, M = (y) => {
2159
+ b(y) || u("update:modelValue", y);
2160
+ }, k = o(() => e.modelValue), g = o(
2161
+ () => e.tabs.find((y) => y.value === k.value)
1870
2162
  );
1871
- return (w, y) => (s(), l("div", ol, [
1872
- a("div", {
2163
+ return (y, T) => (l(), a("div", wa, [
2164
+ s("div", {
1873
2165
  class: c(["tabs-header", t.headerClass])
1874
2166
  }, [
1875
- a("div", rl, [
1876
- (s(!0), l(E, null, H(t.tabs, (h) => (s(), l("button", {
1877
- key: h.value,
2167
+ s("div", {
2168
+ class: c(["tabs-container", p.value]),
2169
+ role: "tablist"
2170
+ }, [
2171
+ (l(!0), a(K, null, G(t.tabs, (L) => (l(), a("button", {
2172
+ key: L.value,
1878
2173
  type: "button",
1879
2174
  class: c([
1880
- il,
1881
- n(h.value) ? dl : ul
2175
+ Ca,
2176
+ r.value,
2177
+ b(L.value) ? v.value : n.value
1882
2178
  ]),
1883
- "aria-selected": n(h.value),
2179
+ "aria-selected": b(L.value),
1884
2180
  role: "tab",
1885
- onClick: (M) => u(h.value)
1886
- }, $(h.label), 11, nl))), 128))
1887
- ])
2181
+ onClick: (A) => M(L.value)
2182
+ }, $(L.label), 11, ka))), 128))
2183
+ ], 2)
1888
2184
  ], 2),
1889
- a("div", {
2185
+ s("div", {
1890
2186
  class: c(["tabs-content", t.contentClass]),
1891
2187
  role: "tabpanel"
1892
2188
  }, [
1893
- I(w.$slots, d.value, {
1894
- active: d.value,
1895
- tab: i.value
2189
+ O(y.$slots, k.value, {
2190
+ active: k.value,
2191
+ tab: g.value
1896
2192
  }, void 0, !0)
1897
2193
  ], 2)
1898
2194
  ]));
1899
2195
  }
1900
- }), El = /* @__PURE__ */ U(cl, [["__scopeId", "data-v-c7c56f28"]]), fl = "font-sans", ql = /* @__PURE__ */ Y({
2196
+ }), os = /* @__PURE__ */ Z($a, [["__scopeId", "data-v-fd5e2425"]]), Ba = "font-sans", rs = /* @__PURE__ */ N({
1901
2197
  __name: "Text",
1902
2198
  props: {
1903
2199
  variant: { default: "body1" },
@@ -1949,12 +2245,12 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
1949
2245
  button3: "span",
1950
2246
  caption: "span",
1951
2247
  overline: "span"
1952
- }, b = {
2248
+ }, u = {
1953
2249
  left: "text-left",
1954
2250
  center: "text-center",
1955
2251
  right: "text-right",
1956
2252
  justify: "text-justify"
1957
- }, n = {
2253
+ }, r = {
1958
2254
  default: "text-secondary-900",
1959
2255
  muted: "text-secondary-600",
1960
2256
  primary: "text-primary-600",
@@ -1962,52 +2258,52 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
1962
2258
  danger: "text-danger-600",
1963
2259
  success: "text-success-600",
1964
2260
  warning: "text-warning-600"
1965
- }, u = {
2261
+ }, p = {
1966
2262
  light: "font-light",
1967
2263
  normal: "font-normal",
1968
2264
  medium: "font-medium",
1969
2265
  semibold: "font-semibold",
1970
2266
  bold: "font-bold",
1971
2267
  extrabold: "font-extrabold"
1972
- }, d = t, i = r(() => d.variant), w = r(() => d.align), y = r(() => d.as || e[i.value] || "span"), h = r(() => d.color && d.color.startsWith("#")), M = r(() => h.value ? "" : n[d.color] || n.default), B = r(() => h.value ? { color: d.color } : {}), S = r(() => d.weight ? { fontWeight: {
2268
+ }, v = t, n = o(() => v.variant), b = o(() => v.align), M = o(() => v.as || e[n.value] || "span"), k = o(() => v.color && v.color.startsWith("#")), g = o(() => k.value ? "" : r[v.color] || r.default), y = o(() => k.value ? { color: v.color } : {}), T = o(() => v.weight ? { fontWeight: {
1973
2269
  light: 300,
1974
2270
  normal: 400,
1975
2271
  medium: 500,
1976
2272
  semibold: 600,
1977
2273
  bold: 700,
1978
2274
  extrabold: 800
1979
- }[d.weight] } : {}), A = r(() => d.weight ? u[d.weight] : "");
1980
- return (L, _) => (s(), ee(ve(y.value), {
2275
+ }[v.weight] } : {}), L = o(() => v.weight ? p[v.weight] : "");
2276
+ return (A, F) => (l(), le(ge(M.value), {
1981
2277
  class: c([
1982
- fl,
1983
- m[i.value],
1984
- M.value,
1985
- b[w.value],
1986
- A.value,
2278
+ Ba,
2279
+ m[n.value],
2280
+ g.value,
2281
+ u[b.value],
2282
+ L.value,
1987
2283
  {
1988
- uppercase: t.uppercase || i.value === "overline",
2284
+ uppercase: t.uppercase || n.value === "overline",
1989
2285
  truncate: t.truncate
1990
2286
  }
1991
2287
  ]),
1992
- style: G([B.value, S.value])
2288
+ style: X([y.value, T.value])
1993
2289
  }, {
1994
- default: le(() => [
1995
- I(L.$slots, "default")
2290
+ default: re(() => [
2291
+ O(A.$slots, "default")
1996
2292
  ]),
1997
2293
  _: 3
1998
2294
  }, 8, ["class", "style"]));
1999
2295
  }
2000
- }), pl = { class: "w-full flex items-center justify-between gap-3 py-2" }, bl = {
2296
+ }), Ma = { class: "w-full flex items-center justify-between gap-3 py-2" }, za = {
2001
2297
  key: 0,
2002
2298
  class: "text-xs text-secondary-600"
2003
- }, vl = { key: 0 }, gl = {
2299
+ }, Da = { key: 0 }, Va = {
2004
2300
  class: "ml-auto inline-flex items-center gap-1",
2005
2301
  role: "navigation",
2006
2302
  "aria-label": "Pagination"
2007
- }, yl = ["disabled"], ml = {
2303
+ }, Ta = ["disabled"], Sa = {
2008
2304
  key: 0,
2009
2305
  class: "h-8 min-w-8 px-2 inline-flex items-center justify-center text-secondary-500"
2010
- }, hl = ["aria-label", "onClick"], xl = ["disabled"], kl = /* @__PURE__ */ Y({
2306
+ }, Ia = ["aria-label", "onClick"], ja = ["disabled"], La = /* @__PURE__ */ N({
2011
2307
  __name: "Pagination",
2012
2308
  props: {
2013
2309
  modelValue: { default: 1 },
@@ -2021,121 +2317,143 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
2021
2317
  },
2022
2318
  emits: ["update:modelValue", "change"],
2023
2319
  setup(t, { emit: m }) {
2024
- const e = t, b = m, n = r(() => {
2025
- const M = Math.ceil(e.totalItems / e.pageSize);
2026
- return M > 0 ? M : 1;
2027
- }), u = r(() => {
2028
- const M = Number(e.modelValue || 1);
2029
- return M < 1 ? 1 : M > n.value ? n.value : M;
2030
- }), d = r(() => e.totalItems === 0 ? 0 : (u.value - 1) * e.pageSize + 1), i = r(() => Math.min(u.value * e.pageSize, e.totalItems)), w = r(() => `Mostrando ${d.value} a ${i.value} de ${e.totalItems}`), y = r(() => {
2031
- const M = n.value, B = Math.max(3, e.maxPages), S = u.value;
2032
- if (M <= B)
2033
- return Array.from({ length: M }, (f, v) => v + 1);
2034
- const A = Math.floor(B / 2);
2035
- let L = Math.max(1, S - A), _ = Math.min(M, L + B - 1);
2036
- L = Math.max(1, Math.min(L, _ - B + 1));
2037
- const V = [];
2038
- L > 1 && (V.push(1), L > 2 && V.push("…"));
2039
- for (let f = L; f <= _; f++)
2040
- V.push(f);
2041
- return _ < M && (_ < M - 1 && V.push("…"), V.push(M)), V;
2320
+ const e = t, u = m, r = o(() => {
2321
+ const g = Math.ceil(e.totalItems / e.pageSize);
2322
+ return g > 0 ? g : 1;
2323
+ }), p = o(() => {
2324
+ const g = Number(e.modelValue || 1);
2325
+ return g < 1 ? 1 : g > r.value ? r.value : g;
2326
+ }), v = o(() => e.totalItems === 0 ? 0 : (p.value - 1) * e.pageSize + 1), n = o(() => Math.min(p.value * e.pageSize, e.totalItems)), b = o(() => `Mostrando ${v.value} a ${n.value} de ${e.totalItems}`), M = o(() => {
2327
+ const g = r.value, y = Math.max(3, e.maxPages), T = p.value;
2328
+ if (g <= y)
2329
+ return Array.from({ length: g }, (I, B) => B + 1);
2330
+ const L = Math.floor(y / 2);
2331
+ let A = Math.max(1, T - L), F = Math.min(g, A + y - 1);
2332
+ A = Math.max(1, Math.min(A, F - y + 1));
2333
+ const W = [];
2334
+ A > 1 && (W.push(1), A > 2 && W.push("…"));
2335
+ for (let I = A; I <= F; I++)
2336
+ W.push(I);
2337
+ return F < g && (F < g - 1 && W.push("…"), W.push(g)), W;
2042
2338
  });
2043
- function h(M) {
2044
- const B = Math.max(1, Math.min(M, n.value));
2045
- B !== u.value && (b("update:modelValue", B), b("change", B));
2339
+ function k(g) {
2340
+ const y = Math.max(1, Math.min(g, r.value));
2341
+ y !== p.value && (u("update:modelValue", y), u("change", y));
2046
2342
  }
2047
- return (M, B) => (s(), l("div", pl, [
2048
- t.showSummary ? (s(), l("div", bl, [
2049
- I(M.$slots, "summary", {
2050
- start: d.value,
2051
- end: i.value,
2343
+ return (g, y) => (l(), a("div", Ma, [
2344
+ t.showSummary ? (l(), a("div", za, [
2345
+ O(g.$slots, "summary", {
2346
+ start: v.value,
2347
+ end: n.value,
2052
2348
  total: t.totalItems
2053
2349
  }, () => [
2054
- q($(w.value), 1),
2055
- t.itemLabel ? (s(), l("span", vl, $(t.itemLabel), 1)) : x("", !0)
2350
+ Y($(b.value), 1),
2351
+ t.itemLabel ? (l(), a("span", Da, $(t.itemLabel), 1)) : f("", !0)
2056
2352
  ], !0)
2057
- ])) : x("", !0),
2058
- a("nav", gl, [
2059
- a("button", {
2353
+ ])) : f("", !0),
2354
+ s("nav", Va, [
2355
+ s("button", {
2060
2356
  type: "button",
2061
2357
  class: "h-8 px-3 rounded-full text-sm font-semibold text-secondary-700 hover:bg-secondary-100 disabled:opacity-50 disabled:cursor-not-allowed",
2062
- disabled: u.value <= 1,
2063
- onClick: B[0] || (B[0] = (S) => h(u.value - 1)),
2358
+ disabled: p.value <= 1,
2359
+ onClick: y[0] || (y[0] = (T) => k(p.value - 1)),
2064
2360
  "aria-label": "Anterior"
2065
- }, $(t.previousText), 9, yl),
2066
- (s(!0), l(E, null, H(y.value, (S, A) => (s(), l(E, {
2067
- key: `page-${A}-${S}`
2361
+ }, $(t.previousText), 9, Ta),
2362
+ (l(!0), a(K, null, G(M.value, (T, L) => (l(), a(K, {
2363
+ key: `page-${L}-${T}`
2068
2364
  }, [
2069
- S === "…" ? (s(), l("span", ml, " … ")) : (s(), l("button", {
2365
+ T === "…" ? (l(), a("span", Sa, " … ")) : (l(), a("button", {
2070
2366
  key: 1,
2071
2367
  type: "button",
2072
- "aria-label": `Página ${S}`,
2368
+ "aria-label": `Página ${T}`,
2073
2369
  class: c([
2074
2370
  "h-8 min-w-8 px-3 rounded-full text-sm font-semibold transition-colors",
2075
- S === u.value ? "bg-primary-500 text-white" : "text-secondary-700 hover:bg-secondary-100"
2371
+ T === p.value ? "bg-primary-500 text-white" : "text-secondary-700 hover:bg-secondary-100"
2076
2372
  ]),
2077
- onClick: (L) => h(S)
2078
- }, $(S), 11, hl))
2373
+ onClick: (A) => k(T)
2374
+ }, $(T), 11, Ia))
2079
2375
  ], 64))), 128)),
2080
- a("button", {
2376
+ s("button", {
2081
2377
  type: "button",
2082
2378
  class: "h-8 px-3 rounded-full text-sm font-semibold text-secondary-700 hover:bg-secondary-100 disabled:opacity-50 disabled:cursor-not-allowed",
2083
- disabled: u.value >= n.value,
2084
- onClick: B[1] || (B[1] = (S) => h(u.value + 1)),
2379
+ disabled: p.value >= r.value,
2380
+ onClick: y[1] || (y[1] = (T) => k(p.value + 1)),
2085
2381
  "aria-label": "Siguiente"
2086
- }, $(t.nextText), 9, xl)
2382
+ }, $(t.nextText), 9, ja)
2087
2383
  ])
2088
2384
  ]));
2089
2385
  }
2090
- }), Nl = /* @__PURE__ */ U(kl, [["__scopeId", "data-v-87417cc4"]]), Wl = /* @__PURE__ */ Y({
2386
+ }), ns = /* @__PURE__ */ Z(La, [["__scopeId", "data-v-87417cc4"]]), is = /* @__PURE__ */ N({
2091
2387
  __name: "Tooltip",
2092
2388
  props: {
2093
2389
  content: { default: "" },
2094
2390
  position: { default: "top" },
2095
2391
  backgroundColor: { default: "bg-gray-900" },
2096
2392
  textColor: { default: "text-white" },
2097
- size: { default: "md" }
2393
+ size: { default: "md" },
2394
+ trigger: { default: "hover" },
2395
+ openDelay: { default: 0 },
2396
+ closeDelay: { default: 100 }
2098
2397
  },
2099
2398
  setup(t) {
2100
- const m = t, e = F(!1), b = {
2399
+ const m = t, e = q(!1);
2400
+ let u = null, r = null;
2401
+ const p = () => {
2402
+ m.trigger === "hover" && (clearTimeout(r), u = setTimeout(() => {
2403
+ e.value = !0;
2404
+ }, m.openDelay));
2405
+ }, v = () => {
2406
+ m.trigger === "hover" && (clearTimeout(u), r = setTimeout(() => {
2407
+ e.value = !1;
2408
+ }, m.closeDelay));
2409
+ }, n = () => {
2410
+ m.trigger === "click" && (e.value = !e.value);
2411
+ }, b = () => {
2412
+ m.trigger === "focus" && (e.value = !0);
2413
+ }, M = () => {
2414
+ m.trigger === "focus" && (e.value = !1);
2415
+ }, k = {
2101
2416
  sm: "px-2 py-1 text-xs",
2102
2417
  md: "px-3 py-2 text-sm",
2103
2418
  lg: "px-4 py-3 text-base"
2104
- }, n = {
2419
+ }, g = {
2105
2420
  // Deja un pequeño espacio entre el activador y el tooltip
2106
2421
  top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
2107
2422
  bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
2108
2423
  left: "right-full top-1/2 -translate-y-1/2 mr-2",
2109
2424
  right: "left-full top-1/2 -translate-y-1/2 ml-2"
2110
- }, u = r(() => `absolute w-0 h-0 border-solid border-4 border-transparent ${{
2425
+ }, y = o(() => `absolute w-0 h-0 border-solid border-4 border-transparent ${{
2111
2426
  top: "bottom-[-8px] rotate-180 left-1/2 -translate-x-1/2",
2112
2427
  bottom: "top-[-8px] rotate-180 left-1/2 -translate-x-1/2",
2113
2428
  left: "right-[-8px] rotate-180 top-1/2 -translate-y-1/2",
2114
2429
  right: "left-[-8px] rotate-180 top-1/2 -translate-y-1/2"
2115
- }[m.position]}`), d = r(() => ({
2430
+ }[m.position]}`), T = o(() => ({
2116
2431
  "bg-gray-900": "#111827",
2117
2432
  "bg-primary-500": "#0ea5e9",
2118
2433
  "bg-green-600": "#16a34a",
2119
2434
  "bg-yellow-600": "#ca8a04",
2120
2435
  "bg-danger-600": "#dc2626"
2121
- })[m.backgroundColor] || "#111827"), i = r(() => ({
2436
+ })[m.backgroundColor] || "#111827"), L = o(() => ({
2122
2437
  // Orden: top, right, bottom, left
2123
- top: `transparent transparent ${d.value} transparent`,
2438
+ top: `transparent transparent ${T.value} transparent`,
2124
2439
  // tooltip arriba → flecha apunta hacia abajo (borde inferior coloreado)
2125
- bottom: `${d.value} transparent transparent transparent`,
2440
+ bottom: `${T.value} transparent transparent transparent`,
2126
2441
  // tooltip abajo → flecha apunta hacia arriba (borde superior coloreado)
2127
- left: `transparent ${d.value} transparent transparent`,
2442
+ left: `transparent ${T.value} transparent transparent`,
2128
2443
  // tooltip a la izquierda → flecha apunta hacia la derecha (borde derecho coloreado)
2129
- right: `transparent transparent transparent ${d.value}`
2444
+ right: `transparent transparent transparent ${T.value}`
2130
2445
  // tooltip a la derecha → flecha apunta hacia la izquierda (borde izquierdo coloreado)
2131
- })[m.position]), w = r(() => `absolute ${n[m.position]} ${m.textColor} ${b[m.size]} rounded-md shadow-lg whitespace-nowrap z-50`);
2132
- return (y, h) => (s(), l("div", {
2446
+ })[m.position]), A = o(() => `absolute ${g[m.position]} ${m.textColor} ${k[m.size]} rounded-md shadow-lg whitespace-nowrap z-50`);
2447
+ return (F, W) => (l(), a("div", {
2133
2448
  class: "relative inline-flex",
2134
- onMouseenter: h[0] || (h[0] = (M) => e.value = !0),
2135
- onMouseleave: h[1] || (h[1] = (M) => e.value = !1)
2449
+ onMouseenter: p,
2450
+ onMouseleave: v,
2451
+ onClick: n,
2452
+ onFocus: b,
2453
+ onBlur: M
2136
2454
  }, [
2137
- I(y.$slots, "default"),
2138
- J(re, {
2455
+ O(F.$slots, "default"),
2456
+ Q(ie, {
2139
2457
  "enter-active-class": "transition-opacity duration-200",
2140
2458
  "enter-from-class": "opacity-0",
2141
2459
  "enter-to-class": "opacity-100",
@@ -2143,27 +2461,27 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
2143
2461
  "leave-from-class": "opacity-100",
2144
2462
  "leave-to-class": "opacity-0"
2145
2463
  }, {
2146
- default: le(() => [
2147
- e.value ? (s(), l("div", {
2464
+ default: re(() => [
2465
+ e.value ? (l(), a("div", {
2148
2466
  key: 0,
2149
- class: c(w.value),
2150
- style: G({ backgroundColor: d.value }),
2467
+ class: c(A.value),
2468
+ style: X({ backgroundColor: T.value }),
2151
2469
  role: "tooltip"
2152
2470
  }, [
2153
- I(y.$slots, "content", {}, () => [
2154
- q($(t.content), 1)
2471
+ O(F.$slots, "content", {}, () => [
2472
+ Y($(t.content), 1)
2155
2473
  ]),
2156
- a("div", {
2157
- class: c(u.value),
2158
- style: G({ borderColor: i.value })
2474
+ s("div", {
2475
+ class: c(y.value),
2476
+ style: X({ borderColor: L.value })
2159
2477
  }, null, 6)
2160
- ], 6)) : x("", !0)
2478
+ ], 6)) : f("", !0)
2161
2479
  ]),
2162
2480
  _: 3
2163
2481
  })
2164
2482
  ], 32));
2165
2483
  }
2166
- }), wl = { class: "truncate" }, $l = ["aria-label", "disabled"], Hl = /* @__PURE__ */ Y({
2484
+ }), Oa = { class: "truncate" }, Aa = ["aria-label", "disabled"], ds = /* @__PURE__ */ N({
2167
2485
  __name: "Chip",
2168
2486
  props: {
2169
2487
  label: { default: "" },
@@ -2177,10 +2495,10 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
2177
2495
  },
2178
2496
  emits: ["click", "close"],
2179
2497
  setup(t, { emit: m }) {
2180
- const e = t, b = m, n = r(() => !!e.icon), u = r(() => e.icon || ""), d = {
2498
+ const e = t, u = m, r = o(() => !!e.icon), p = o(() => e.icon || ""), v = {
2181
2499
  sm: "h-7 text-xs px-3 gap-1.5 font-semibold leading-none",
2182
2500
  md: "h-8 text-sm px-3.5 gap-2 font-semibold leading-none"
2183
- }, i = {
2501
+ }, n = {
2184
2502
  default: {
2185
2503
  filled: "bg-gray-100 text-gray-800 border border-gray-200",
2186
2504
  outlined: "bg-white text-gray-800 border border-gray-300",
@@ -2216,130 +2534,174 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
2216
2534
  outlined: "bg-white text-sky-700 border border-sky-300",
2217
2535
  tonal: "bg-sky-50 text-sky-700 border border-sky-100"
2218
2536
  }
2219
- }, w = r(() => {
2220
- const B = i[e.color] ?? i.default, S = B[e.variant] ?? B.filled;
2537
+ }, b = o(() => {
2538
+ const y = n[e.color] ?? n.default, T = y[e.variant] ?? y.filled;
2221
2539
  return [
2222
2540
  "inline-flex items-center select-none",
2223
2541
  "transition-colors duration-150",
2224
2542
  "max-w-full",
2225
- d[e.size],
2543
+ v[e.size],
2226
2544
  "rounded-full",
2227
2545
  e.disabled ? "opacity-60 cursor-not-allowed" : "cursor-default",
2228
- S
2546
+ T
2229
2547
  ].join(" ");
2230
- }), y = r(() => "text-current flex items-center"), h = () => {
2231
- e.disabled || b("close");
2232
- }, M = () => {
2233
- e.disabled || b("click");
2548
+ }), M = o(() => "text-current flex items-center"), k = () => {
2549
+ e.disabled || u("close");
2550
+ }, g = () => {
2551
+ e.disabled || u("click");
2234
2552
  };
2235
- return (B, S) => (s(), l("div", {
2236
- class: c(w.value),
2553
+ return (y, T) => (l(), a("div", {
2554
+ class: c(b.value),
2237
2555
  role: "status",
2238
- onClick: M
2556
+ onClick: g
2239
2557
  }, [
2240
- n.value ? (s(), l("span", {
2558
+ r.value ? (l(), a("span", {
2241
2559
  key: 0,
2242
- class: c(y.value)
2560
+ class: c(M.value)
2243
2561
  }, [
2244
- J(X, {
2245
- name: u.value,
2562
+ Q(ee, {
2563
+ name: p.value,
2246
2564
  size: "sm"
2247
2565
  }, null, 8, ["name"])
2248
- ], 2)) : x("", !0),
2249
- a("span", wl, [
2250
- I(B.$slots, "default", {}, () => [
2251
- q($(t.label), 1)
2566
+ ], 2)) : f("", !0),
2567
+ s("span", Oa, [
2568
+ O(y.$slots, "default", {}, () => [
2569
+ Y($(t.label), 1)
2252
2570
  ])
2253
2571
  ]),
2254
- t.closable ? (s(), l("button", {
2572
+ t.closable ? (l(), a("button", {
2255
2573
  key: 1,
2256
2574
  type: "button",
2257
2575
  class: "shrink-0 rounded-full p-1 hover:bg-black/5 focus:outline-none focus:ring-2 focus:ring-primary-500",
2258
2576
  "aria-label": t.closeAriaLabel,
2259
- onClick: K(h, ["stop"]),
2577
+ onClick: J(k, ["stop"]),
2260
2578
  disabled: t.disabled
2261
2579
  }, [
2262
- J(X, {
2580
+ Q(ee, {
2263
2581
  name: "close",
2264
2582
  size: "sm"
2265
2583
  })
2266
- ], 8, $l)) : x("", !0)
2584
+ ], 8, Aa)) : f("", !0)
2267
2585
  ], 2));
2268
2586
  }
2269
- }), Cl = ["data-node-id"], Ml = { class: "shrink-0 size-12 rounded-full bg-[var(--neutrales/fondo-general-claro,#f7f7f7)] grid place-items-center" }, Bl = {
2587
+ }), Fa = ["data-node-id"], Wa = {
2588
+ key: 0,
2589
+ class: "shrink-0 size-12 rounded-full bg-[var(--neutrales/fondo-general-claro,#f7f7f7)] grid place-items-center"
2590
+ }, qa = {
2591
+ key: 0,
2592
+ xmlns: "http://www.w3.org/2000/svg",
2593
+ width: "24",
2594
+ height: "24",
2595
+ viewBox: "0 0 24 24",
2596
+ fill: "none",
2597
+ stroke: "#0064ff",
2598
+ "stroke-width": "2",
2599
+ "stroke-linecap": "round",
2600
+ "stroke-linejoin": "round"
2601
+ }, Pa = {
2602
+ key: 1,
2603
+ xmlns: "http://www.w3.org/2000/svg",
2604
+ width: "24",
2605
+ height: "24",
2606
+ viewBox: "0 0 24 24",
2607
+ fill: "none",
2608
+ stroke: "#ff600a",
2609
+ "stroke-width": "2",
2610
+ "stroke-linecap": "round",
2611
+ "stroke-linejoin": "round"
2612
+ }, Ra = {
2613
+ key: 2,
2614
+ xmlns: "http://www.w3.org/2000/svg",
2615
+ width: "24",
2616
+ height: "24",
2617
+ viewBox: "0 0 24 24",
2618
+ fill: "none",
2619
+ stroke: "#3ac29e",
2620
+ "stroke-width": "2",
2621
+ "stroke-linecap": "round",
2622
+ "stroke-linejoin": "round"
2623
+ }, Ea = {
2624
+ key: 3,
2625
+ xmlns: "http://www.w3.org/2000/svg",
2626
+ width: "24",
2627
+ height: "24",
2628
+ viewBox: "0 0 24 24",
2629
+ fill: "none",
2630
+ stroke: "#ff4235",
2631
+ "stroke-width": "2",
2632
+ "stroke-linecap": "round",
2633
+ "stroke-linejoin": "round"
2634
+ }, Ya = {
2270
2635
  key: 1,
2271
2636
  class: "flex flex-wrap items-center justify-end gap-2 px-6 pb-6 pt-4"
2272
- }, Kl = /* @__PURE__ */ Y({
2637
+ }, us = /* @__PURE__ */ N({
2273
2638
  __name: "Alert",
2274
2639
  props: {
2275
- variant: {},
2640
+ variant: { default: "info" },
2276
2641
  title: {},
2277
2642
  description: {},
2278
- closable: { type: Boolean },
2279
- multiline: { type: Boolean },
2280
- actions: { type: Boolean },
2281
- nodeId: {},
2282
- stackOn: {}
2643
+ closable: { type: Boolean, default: !1 },
2644
+ multiline: { type: Boolean, default: !1 },
2645
+ actions: { type: Boolean, default: !1 },
2646
+ showIcon: { type: Boolean, default: !0 },
2647
+ nodeId: { default: void 0 },
2648
+ stackOn: { default: void 0 }
2283
2649
  },
2284
2650
  emits: ["close", "accept", "cancel"],
2285
2651
  setup(t, { emit: m }) {
2286
- const e = m, b = t, n = r(() => b.variant ?? "info"), u = r(() => b.multiline ?? !1), d = r(() => b.actions ?? !1), i = r(() => b.nodeId ?? void 0), w = () => e("close"), y = r(() => !!b.title), h = r(() => b.title ?? ""), M = r(() => b.description ?? ""), B = r(() => {
2287
- switch (n.value) {
2652
+ const e = m, u = t, r = o(() => u.variant), p = o(() => u.multiline), v = o(() => u.actions), n = o(() => u.nodeId), b = o(() => u.showIcon), M = () => e("close"), k = o(() => !!u.title), g = o(() => u.title ?? ""), y = o(() => u.description ?? ""), T = o(() => {
2653
+ switch (r.value) {
2288
2654
  case "info":
2289
2655
  return {
2290
2656
  border: "border-[var(--semantica/info,#0064ff)]",
2291
- bg: "bg-[#faf9fd] outline outline-1 outline-[rgba(105,78,214,0.4)]",
2292
- icon: "text-[#0064ff]"
2657
+ bg: "bg-[#faf9fd] outline outline-1 outline-[rgba(105,78,214,0.4)]"
2293
2658
  };
2294
2659
  case "warning":
2295
2660
  return {
2296
2661
  border: "border-[var(--semantica/warning,#ff9100)]",
2297
- bg: "bg-[#fffcfa] outline outline-1 outline-[rgba(255,96,10,0.3)]",
2298
- icon: "text-[#ff600a]"
2662
+ bg: "bg-[#fffcfa] outline outline-1 outline-[rgba(255,96,10,0.3)]"
2299
2663
  };
2300
2664
  case "success":
2301
2665
  return {
2302
2666
  border: "border-[var(--semantica/succes,#00b45e)]",
2303
- bg: "bg-[#f7fbf9] outline outline-1 outline-[rgba(0,135,68,0.5)]",
2304
- icon: "text-[#3ac29e]"
2667
+ bg: "bg-[#f7fbf9] outline outline-1 outline-[rgba(0,135,68,0.5)]"
2305
2668
  };
2306
2669
  case "error":
2307
2670
  return {
2308
2671
  border: "border-[var(--semantica/error,#ff4235)]",
2309
- bg: "bg-[#fdf7f9] outline outline-1 outline-[rgba(214,0,64,0.5)]",
2310
- icon: "text-[#ff4235]"
2672
+ bg: "bg-[#fdf7f9] outline outline-1 outline-[rgba(214,0,64,0.5)]"
2311
2673
  };
2312
2674
  }
2313
- }), S = r(() => "bg-[var(--color-primario/700,#269ea4)]"), A = r(() => {
2314
- const f = "flex w-full items-start gap-4 flex-col";
2315
- if (!b.stackOn) return `${f} sm:flex-row sm:items-center`;
2316
- const v = b.stackOn, O = `${v}:flex-row ${v}:items-center`;
2317
- return `${f} ${O}`;
2318
- }), L = r(() => {
2319
- if (!b.stackOn) return "flex-col sm:flex-row items-start sm:items-center";
2320
- const f = b.stackOn;
2321
- return `flex-col ${f}:flex-row items-start ${f}:items-center`;
2322
- }), _ = r(() => {
2323
- if (!b.stackOn) return "flex-col sm:flex-row sm:items-center w-full";
2324
- const f = b.stackOn;
2325
- return `flex-col ${f}:flex-row ${f}:items-center w-full`;
2326
- }), V = r(() => b.stackOn ? `self-start ${b.stackOn}:self-auto` : "self-start sm:self-auto");
2327
- return (f, v) => (s(), l("div", {
2675
+ }), L = o(() => "bg-[var(--color-primario/700,#269ea4)]"), A = o(() => {
2676
+ const B = "flex w-full items-start gap-4 flex-col";
2677
+ if (!u.stackOn) return `${B} sm:flex-row sm:items-center`;
2678
+ const V = u.stackOn, P = `${V}:flex-row ${V}:items-center`;
2679
+ return `${B} ${P}`;
2680
+ }), F = o(() => {
2681
+ if (!u.stackOn) return "flex-col sm:flex-row items-start sm:items-center";
2682
+ const B = u.stackOn;
2683
+ return `flex-col ${B}:flex-row items-start ${B}:items-center`;
2684
+ }), W = o(() => {
2685
+ if (!u.stackOn) return "flex-col sm:flex-row sm:items-center w-full";
2686
+ const B = u.stackOn;
2687
+ return `flex-col ${B}:flex-row ${B}:items-center w-full`;
2688
+ }), I = o(() => u.stackOn ? `self-start ${u.stackOn}:self-auto` : "self-start sm:self-auto");
2689
+ return (B, V) => (l(), a("div", {
2328
2690
  class: c(["relative w-full rounded-xl border", [
2329
- B.value.border,
2330
- B.value.bg
2691
+ T.value.border,
2692
+ T.value.bg
2331
2693
  ]]),
2332
2694
  role: "alert",
2333
- "data-node-id": i.value
2695
+ "data-node-id": n.value
2334
2696
  }, [
2335
- t.closable ? (s(), l("button", {
2697
+ t.closable ? (l(), a("button", {
2336
2698
  key: 0,
2337
2699
  type: "button",
2338
2700
  class: "absolute top-3 right-3 text-[color:var(--neutrales/texto-principal,#565656)]/70 hover:opacity-100 opacity-70",
2339
2701
  "aria-label": "Cerrar",
2340
- onClick: w
2341
- }, [...v[2] || (v[2] = [
2342
- a("svg", {
2702
+ onClick: M
2703
+ }, [...V[2] || (V[2] = [
2704
+ s("svg", {
2343
2705
  xmlns: "http://www.w3.org/2000/svg",
2344
2706
  width: "18",
2345
2707
  height: "18",
@@ -2350,188 +2712,140 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Ee = {
2350
2712
  "stroke-linecap": "round",
2351
2713
  "stroke-linejoin": "round"
2352
2714
  }, [
2353
- a("line", {
2715
+ s("line", {
2354
2716
  x1: "18",
2355
2717
  y1: "6",
2356
2718
  x2: "6",
2357
2719
  y2: "18"
2358
2720
  }),
2359
- a("line", {
2721
+ s("line", {
2360
2722
  x1: "6",
2361
2723
  y1: "6",
2362
2724
  x2: "18",
2363
2725
  y2: "18"
2364
2726
  })
2365
2727
  ], -1)
2366
- ])])) : x("", !0),
2367
- a("div", {
2368
- class: c(["p-6", { "pb-0": d.value }])
2728
+ ])])) : f("", !0),
2729
+ s("div", {
2730
+ class: c(["p-6", { "pb-0": v.value }])
2369
2731
  }, [
2370
- a("div", {
2732
+ s("div", {
2371
2733
  class: c(A.value)
2372
2734
  }, [
2373
- a("div", Ml, [
2374
- n.value === "info" ? (s(), l("svg", {
2375
- key: 0,
2376
- xmlns: "http://www.w3.org/2000/svg",
2377
- width: "24",
2378
- height: "24",
2379
- viewBox: "0 0 24 24",
2380
- fill: "none",
2381
- class: c(B.value.icon),
2382
- stroke: "currentColor",
2383
- "stroke-width": "2",
2384
- "stroke-linecap": "round",
2385
- "stroke-linejoin": "round"
2386
- }, [...v[3] || (v[3] = [
2387
- a("circle", {
2735
+ b.value ? (l(), a("div", Wa, [
2736
+ r.value === "info" ? (l(), a("svg", qa, [...V[3] || (V[3] = [
2737
+ s("circle", {
2388
2738
  cx: "12",
2389
2739
  cy: "12",
2390
2740
  r: "10"
2391
2741
  }, null, -1),
2392
- a("line", {
2742
+ s("line", {
2393
2743
  x1: "12",
2394
2744
  y1: "16",
2395
2745
  x2: "12",
2396
2746
  y2: "12"
2397
2747
  }, null, -1),
2398
- a("line", {
2748
+ s("line", {
2399
2749
  x1: "12",
2400
2750
  y1: "8",
2401
2751
  x2: "12",
2402
2752
  y2: "8"
2403
2753
  }, null, -1)
2404
- ])], 2)) : n.value === "warning" ? (s(), l("svg", {
2405
- key: 1,
2406
- xmlns: "http://www.w3.org/2000/svg",
2407
- width: "24",
2408
- height: "24",
2409
- viewBox: "0 0 24 24",
2410
- fill: "none",
2411
- class: c(B.value.icon),
2412
- stroke: "currentColor",
2413
- "stroke-width": "2",
2414
- "stroke-linecap": "round",
2415
- "stroke-linejoin": "round"
2416
- }, [...v[4] || (v[4] = [
2417
- a("path", { d: "M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z" }, null, -1),
2418
- a("line", {
2754
+ ])])) : r.value === "warning" ? (l(), a("svg", Pa, [...V[4] || (V[4] = [
2755
+ s("path", { d: "M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z" }, null, -1),
2756
+ s("line", {
2419
2757
  x1: "12",
2420
2758
  y1: "9",
2421
2759
  x2: "12",
2422
2760
  y2: "13"
2423
2761
  }, null, -1),
2424
- a("line", {
2762
+ s("line", {
2425
2763
  x1: "12",
2426
2764
  y1: "17",
2427
2765
  x2: "12",
2428
2766
  y2: "17"
2429
2767
  }, null, -1)
2430
- ])], 2)) : n.value === "success" ? (s(), l("svg", {
2431
- key: 2,
2432
- xmlns: "http://www.w3.org/2000/svg",
2433
- width: "24",
2434
- height: "24",
2435
- viewBox: "0 0 24 24",
2436
- fill: "none",
2437
- class: c(B.value.icon),
2438
- stroke: "currentColor",
2439
- "stroke-width": "2",
2440
- "stroke-linecap": "round",
2441
- "stroke-linejoin": "round"
2442
- }, [...v[5] || (v[5] = [
2443
- a("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }, null, -1),
2444
- a("polyline", { points: "22 4 12 14.01 9 11.01" }, null, -1)
2445
- ])], 2)) : (s(), l("svg", {
2446
- key: 3,
2447
- xmlns: "http://www.w3.org/2000/svg",
2448
- width: "24",
2449
- height: "24",
2450
- viewBox: "0 0 24 24",
2451
- fill: "none",
2452
- class: c(B.value.icon),
2453
- stroke: "currentColor",
2454
- "stroke-width": "2",
2455
- "stroke-linecap": "round",
2456
- "stroke-linejoin": "round"
2457
- }, [...v[6] || (v[6] = [
2458
- a("polygon", { points: "7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" }, null, -1),
2459
- a("line", {
2768
+ ])])) : r.value === "success" ? (l(), a("svg", Ra, [...V[5] || (V[5] = [
2769
+ s("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }, null, -1),
2770
+ s("polyline", { points: "22 4 12 14.01 9 11.01" }, null, -1)
2771
+ ])])) : (l(), a("svg", Ea, [...V[6] || (V[6] = [
2772
+ s("polygon", { points: "7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" }, null, -1),
2773
+ s("line", {
2460
2774
  x1: "12",
2461
2775
  y1: "8",
2462
2776
  x2: "12",
2463
2777
  y2: "12"
2464
2778
  }, null, -1),
2465
- a("line", {
2779
+ s("line", {
2466
2780
  x1: "12",
2467
2781
  y1: "16",
2468
2782
  x2: "12",
2469
2783
  y2: "16"
2470
2784
  }, null, -1)
2471
- ])], 2))
2472
- ]),
2473
- a("div", {
2474
- class: c(["flex-1 flex gap-4 text-[14px]", [L.value, t.closable ? "pr-6" : "", { "whitespace-nowrap": !u.value, "whitespace-pre-wrap": u.value }]])
2785
+ ])]))
2786
+ ])) : f("", !0),
2787
+ s("div", {
2788
+ class: c(["flex-1 flex gap-4 text-[14px]", [F.value, t.closable ? "pr-6" : "", { "whitespace-nowrap": !p.value, "whitespace-pre-wrap": p.value }]])
2475
2789
  }, [
2476
- a("div", {
2477
- class: c(["flex flex-1 gap-3 items-start", _.value])
2790
+ s("div", {
2791
+ class: c(["flex flex-1 gap-3 items-start", W.value])
2478
2792
  }, [
2479
- y.value ? (s(), l("div", {
2793
+ k.value ? (l(), a("div", {
2480
2794
  key: 0,
2481
- class: c(["tracking-[0.1px] text-[color:var(--neutrales/texto-principal,#565656)] font-medium", V.value])
2482
- }, $(h.value), 3)) : x("", !0),
2483
- a("div", {
2484
- class: c(["flex-1 tracking-[0.25px] text-[color:var(--neutrales/texto-principal,#565656)]", { "overflow-hidden overflow-ellipsis": !u.value }])
2795
+ class: c(["tracking-[0.1px] text-[color:var(--neutrales/texto-principal,#565656)] font-medium", I.value])
2796
+ }, $(g.value), 3)) : f("", !0),
2797
+ s("div", {
2798
+ class: c(["flex-1 tracking-[0.25px] text-[color:var(--neutrales/texto-principal,#565656)]", { "overflow-hidden overflow-ellipsis": !p.value }])
2485
2799
  }, [
2486
- I(f.$slots, "description", {}, () => [
2487
- q($(M.value), 1)
2800
+ O(B.$slots, "description", {}, () => [
2801
+ Y($(y.value), 1)
2488
2802
  ])
2489
2803
  ], 2)
2490
2804
  ], 2)
2491
2805
  ], 2)
2492
2806
  ], 2)
2493
2807
  ], 2),
2494
- d.value ? (s(), l("div", Bl, [
2495
- a("button", {
2808
+ v.value ? (l(), a("div", Ya, [
2809
+ s("button", {
2496
2810
  type: "button",
2497
2811
  class: "px-3 py-1.5 rounded-lg text-sm tracking-[0.25px] font-semibold text-[color:var(--neutrales/texto-principal,#565656)]",
2498
- onClick: v[0] || (v[0] = (O) => f.$emit("cancel"))
2812
+ onClick: V[0] || (V[0] = (P) => B.$emit("cancel"))
2499
2813
  }, [
2500
- I(f.$slots, "cancel", {}, () => [
2501
- v[7] || (v[7] = q("Cancelar", -1))
2814
+ O(B.$slots, "cancel", {}, () => [
2815
+ V[7] || (V[7] = Y("Cancelar", -1))
2502
2816
  ])
2503
2817
  ]),
2504
- a("button", {
2818
+ s("button", {
2505
2819
  type: "button",
2506
- class: c(["px-3 py-1.5 rounded-lg text-sm tracking-[0.25px] font-semibold text-white", S.value]),
2507
- onClick: v[1] || (v[1] = (O) => f.$emit("accept"))
2820
+ class: c(["px-3 py-1.5 rounded-lg text-sm tracking-[0.25px] font-semibold text-white", L.value]),
2821
+ onClick: V[1] || (V[1] = (P) => B.$emit("accept"))
2508
2822
  }, [
2509
- I(f.$slots, "accept", {}, () => [
2510
- v[8] || (v[8] = q("Aceptar", -1))
2823
+ O(B.$slots, "accept", {}, () => [
2824
+ V[8] || (V[8] = Y("Aceptar", -1))
2511
2825
  ])
2512
2826
  ], 2)
2513
- ])) : x("", !0)
2514
- ], 10, Cl));
2827
+ ])) : f("", !0)
2828
+ ], 10, Fa));
2515
2829
  }
2516
2830
  });
2517
2831
  export {
2518
- Kl as Alert,
2519
- Sl as AppBar,
2520
- Tl as Button,
2521
- Il as Calendar,
2522
- jl as Card,
2523
- Hl as Chip,
2524
- Ll as Dialog,
2525
- Ol as FileUpload,
2526
- X as Icon,
2527
- _l as Input,
2528
- Al as Loader,
2529
- Fl as Menu,
2530
- Nl as Pagination,
2531
- Rl as Select,
2532
- Pl as Sidebar,
2533
- Yl as Table,
2534
- El as Tabs,
2535
- ql as Text,
2536
- Wl as Tooltip
2832
+ us as Alert,
2833
+ Ua as AppBar,
2834
+ Ja as Button,
2835
+ Ga as Calendar,
2836
+ Qa as Card,
2837
+ ds as Chip,
2838
+ Za as Dialog,
2839
+ Xa as FileUpload,
2840
+ ee as Icon,
2841
+ _a as Input,
2842
+ es as Loader,
2843
+ ts as Menu,
2844
+ ns as Pagination,
2845
+ ls as Select,
2846
+ as as Sidebar,
2847
+ ss as Table,
2848
+ os as Tabs,
2849
+ rs as Text,
2850
+ is as Tooltip
2537
2851
  };