vicdev-ui-lib 1.0.0 → 1.0.2

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,14 +1,14 @@
1
- import { jsx as e, jsxs as s, Fragment as O } from "react/jsx-runtime";
2
- import { createContext as X, useState as k, useContext as Y, useEffect as K, useRef as G } from "react";
3
- import { AnimatePresence as q, motion as T } from "framer-motion";
4
- import { X as E, AlertTriangle as H, Info as J, XCircle as Q, CheckCircle as ee, EyeOff as R, Eye as I, Search as re, FileText as z, Upload as te, Check as ne, File as U, Loader2 as oe, AlertCircle as ae, Download as _, Image as se } from "lucide-react";
5
- import { createPortal as ie } from "react-dom";
6
- import { DataTable as le } from "primereact/datatable";
7
- import { Column as ce } from "primereact/column";
8
- const j = {
1
+ import { jsx as e, jsxs as s, Fragment as z } from "react/jsx-runtime";
2
+ import { createContext as K, useState as C, useEffect as E, useContext as Y, useMemo as V, useRef as G } from "react";
3
+ import { AnimatePresence as Q, motion as j } from "framer-motion";
4
+ import { X as P, AlertTriangle as X, Info as ee, XCircle as te, CheckCircle as re, EyeOff as O, Eye as R, Search as ne, FileText as M, Upload as oe, Check as ae, File as _, Loader2 as se, AlertCircle as ie, Download as W, Image as le } from "lucide-react";
5
+ import { createPortal as ce } from "react-dom";
6
+ import { DataTable as de } from "primereact/datatable";
7
+ import { Column as ue } from "primereact/column";
8
+ const D = {
9
9
  primary: "#0f172a",
10
10
  primaryForeground: "#f8fafc",
11
- secondary: "#f1f5f9",
11
+ secondary: "#7ba63f",
12
12
  secondaryForeground: "#0f172a",
13
13
  accent: "#f1f5f9",
14
14
  accentForeground: "#0f172a",
@@ -27,87 +27,140 @@ const j = {
27
27
  popoverForeground: "#0f172a",
28
28
  radio: "#e2e8f0",
29
29
  radioForeground: "#0f172a"
30
- }, de = {
31
- colors: j,
30
+ }, me = {
31
+ colors: D,
32
32
  name: "default",
33
33
  description: "Tema por defecto de vicdev-ui-lib"
34
34
  };
35
- function Re(r) {
35
+ function We(t) {
36
36
  return {
37
37
  colors: {
38
- ...j,
39
- ...r
38
+ ...D,
39
+ ...t
40
40
  },
41
41
  name: "custom"
42
42
  };
43
43
  }
44
- function Ie(r) {
45
- const { colors: t } = r;
44
+ function fe(t) {
45
+ const { colors: r } = t;
46
46
  return `:root {
47
- ${Object.entries(t).map(([n, o]) => ` --${n.replace(/([A-Z])/g, "-$1").toLowerCase()}: ${o};`).join(`
47
+ ${Object.entries(r).map(([n, a]) => ` --${n.replace(/([A-Z])/g, "-$1").toLowerCase()}: ${a};`).join(`
48
48
  `)}
49
49
  }`;
50
50
  }
51
- const Z = X(void 0);
52
- function Ue({ theme: r = de, children: t }) {
53
- const [a, n] = k(r), o = {
54
- theme: a,
55
- setTheme: n
51
+ const q = K(void 0);
52
+ function pe({
53
+ theme: t = me,
54
+ children: r,
55
+ injectCSS: o = !0
56
+ }) {
57
+ const [n, a] = C(t);
58
+ E(() => {
59
+ if (o && typeof document < "u") {
60
+ let c = document.getElementById("vicdev-ui-theme-variables");
61
+ return c || (c = document.createElement("style"), c.id = "vicdev-ui-theme-variables", document.head.appendChild(c)), c.textContent = fe(n), () => {
62
+ };
63
+ }
64
+ }, [n, o]), E(() => {
65
+ a(t);
66
+ }, [t]);
67
+ const i = {
68
+ theme: n,
69
+ setTheme: a
56
70
  };
57
- return /* @__PURE__ */ e(Z.Provider, { value: o, children: t });
71
+ return /* @__PURE__ */ e(q.Provider, { value: i, children: r });
72
+ }
73
+ function Ze() {
74
+ return Y(q);
75
+ }
76
+ const J = K(void 0);
77
+ function He({
78
+ config: t = {},
79
+ children: r
80
+ }) {
81
+ const o = V(() => ({
82
+ theme: t.theme,
83
+ injectCSS: t.injectCSS ?? !0,
84
+ modalZIndex: t.modalZIndex ?? 0,
85
+ toastZIndex: t.toastZIndex ?? 0,
86
+ animationDuration: t.animationDuration ?? 300,
87
+ enableAnimations: t.enableAnimations ?? !0,
88
+ components: {
89
+ modal: {
90
+ defaultSize: t.components?.modal?.defaultSize ?? "lg"
91
+ },
92
+ button: {
93
+ defaultVariant: t.components?.button?.defaultVariant ?? "primary"
94
+ },
95
+ toast: {
96
+ defaultDuration: t.components?.toast?.defaultDuration ?? 3e3,
97
+ position: t.components?.toast?.position ?? "top-right"
98
+ }
99
+ }
100
+ }), [t]), n = V(() => ({
101
+ config: o,
102
+ updateConfig: (a) => {
103
+ console.warn("updateConfig: Esta funcionalidad está en desarrollo");
104
+ }
105
+ }), [o]);
106
+ return /* @__PURE__ */ e(J.Provider, { value: n, children: /* @__PURE__ */ e(
107
+ pe,
108
+ {
109
+ theme: t.theme,
110
+ injectCSS: t.injectCSS,
111
+ children: r
112
+ }
113
+ ) });
58
114
  }
59
- function _e() {
60
- const r = Y(Z);
61
- if (r === void 0)
62
- throw new Error("useTheme debe ser usado dentro de un ThemeProvider");
63
- return r;
115
+ function he() {
116
+ return Y(J);
64
117
  }
65
- function ue(r) {
66
- const t = { ...j, ...r };
118
+ function ge(t) {
119
+ const r = { ...D, ...t };
67
120
  return {
68
121
  primary: {
69
- DEFAULT: t.primary,
70
- foreground: t.primaryForeground
122
+ DEFAULT: r.primary,
123
+ foreground: r.primaryForeground
71
124
  },
72
125
  secondary: {
73
- DEFAULT: t.secondary,
74
- foreground: t.secondaryForeground
126
+ DEFAULT: r.secondary,
127
+ foreground: r.secondaryForeground
75
128
  },
76
129
  accent: {
77
- DEFAULT: t.accent,
78
- foreground: t.accentForeground
130
+ DEFAULT: r.accent,
131
+ foreground: r.accentForeground
79
132
  },
80
133
  destructive: {
81
- DEFAULT: t.destructive,
82
- foreground: t.destructiveForeground
134
+ DEFAULT: r.destructive,
135
+ foreground: r.destructiveForeground
83
136
  },
84
- background: t.background,
85
- foreground: t.foreground,
137
+ background: r.background,
138
+ foreground: r.foreground,
86
139
  card: {
87
- DEFAULT: t.card,
88
- foreground: t.cardForeground
140
+ DEFAULT: r.card,
141
+ foreground: r.cardForeground
89
142
  },
90
- border: t.border,
91
- input: t.input,
92
- ring: t.ring,
143
+ border: r.border,
144
+ input: r.input,
145
+ ring: r.ring,
93
146
  muted: {
94
- DEFAULT: t.muted,
95
- foreground: t.mutedForeground
147
+ DEFAULT: r.muted,
148
+ foreground: r.mutedForeground
96
149
  },
97
150
  popover: {
98
- DEFAULT: t.popover,
99
- foreground: t.popoverForeground
151
+ DEFAULT: r.popover,
152
+ foreground: r.popoverForeground
100
153
  },
101
154
  radio: {
102
- DEFAULT: t.radio,
103
- foreground: t.radioForeground
155
+ DEFAULT: r.radio,
156
+ foreground: r.radioForeground
104
157
  }
105
158
  };
106
159
  }
107
- function Ve(r) {
160
+ function Ke(t) {
108
161
  return {
109
162
  extend: {
110
- colors: ue(r),
163
+ colors: ge(t),
111
164
  borderRadius: {
112
165
  lg: "var(--radius)",
113
166
  md: "calc(var(--radius) - 2px)",
@@ -116,76 +169,76 @@ function Ve(r) {
116
169
  }
117
170
  };
118
171
  }
119
- function me(r) {
120
- const t = { ...j, ...r };
172
+ function be(t) {
173
+ const r = { ...D, ...t };
121
174
  return `@theme {
122
- ${Object.entries(t).map(([n, o]) => ` --color-${n.replace(/([A-Z])/g, "-$1").toLowerCase()}: ${o};`).join(`
175
+ ${Object.entries(r).map(([n, a]) => ` --color-${n.replace(/([A-Z])/g, "-$1").toLowerCase()}: ${a};`).join(`
123
176
  `)}
124
177
 
125
178
  /* Border radius */
126
179
  --radius: 0.5rem;
127
180
  }`;
128
181
  }
129
- function fe(r) {
130
- const t = { ...j, ...r };
182
+ function xe(t) {
183
+ const r = { ...D, ...t };
131
184
  return `:root {
132
- ${Object.entries(t).map(([n]) => {
133
- const o = n.replace(/([A-Z])/g, "-$1").toLowerCase(), i = `color-${o}`;
134
- return ` --${o}: var(--${i});`;
185
+ ${Object.entries(r).map(([n]) => {
186
+ const a = n.replace(/([A-Z])/g, "-$1").toLowerCase(), i = `color-${a}`;
187
+ return ` --${a}: var(--${i});`;
135
188
  }).join(`
136
189
  `)}
137
190
  }`;
138
191
  }
139
- function We(r) {
140
- const t = me(r), a = fe(r);
141
- return `${t}
192
+ function Ye(t) {
193
+ const r = be(t), o = xe(t);
194
+ return `${r}
142
195
 
143
- ${a}`;
196
+ ${o}`;
144
197
  }
145
- const V = {
198
+ const Z = {
146
199
  primary: "bg-primary text-primary-foreground hover:bg-primary/90 font-bold shadow-lg",
147
200
  secondary: "bg-white border-2 border-border/20 text-foreground hover:border-border/40 hover:bg-card shadow-sm",
148
201
  accent: "bg-gradient-to-r from-accent to-accent/90 text-accent-foreground hover:shadow-lg",
149
202
  danger: "bg-destructive text-destructive-foreground hover:bg-destructive/90 border-0 shadow-lg hover:shadow-destructive/25",
150
- outline: "border-2 border-border/30 text-foreground hover:bg-card hover:border-border/50",
203
+ outline: "border-1 border-border/30 text-foreground hover:bg-card hover:border-border/50 shadow-sm",
151
204
  ghost: "text-foreground hover:bg-card hover:text-primary",
152
205
  success: "bg-green-500 text-white hover:bg-green-600 hover:shadow-green-400/20"
153
206
  }, B = ({
154
- onClick: r,
155
- icon: t,
156
- label: a,
207
+ onClick: t,
208
+ icon: r,
209
+ label: o,
157
210
  variant: n = "primary",
158
- type: o = "button",
211
+ type: a = "button",
159
212
  className: i = "",
160
- disabled: d = !1,
161
- children: c,
213
+ disabled: c = !1,
214
+ children: d,
162
215
  ...u
163
216
  }) => /* @__PURE__ */ s(
164
217
  "button",
165
218
  {
166
- onClick: r,
167
- type: o,
168
- disabled: d,
219
+ onClick: t,
220
+ type: a,
221
+ disabled: c,
169
222
  className: `
170
223
  flex items-center justify-center px-4 py-3 rounded-xl font-semibold text-sm
171
224
  transition-all duration-300 hover:scale-[1.02] active:scale-[0.98] group
172
- disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100
173
- ${V[n] ?? V.primary} ${i}
225
+ disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 cursor-pointer hover:shadow-lg
226
+ ${Z[n] ?? Z.primary} ${i}
174
227
  `,
175
228
  ...u,
176
229
  children: [
177
- t && /* @__PURE__ */ e(
178
- t,
230
+ r && /* @__PURE__ */ e(
231
+ r,
179
232
  {
180
233
  size: 20,
181
- className: `${a ? "mr-2" : ""} ${d ? "" : "group-hover:rotate-12"} transition-transform duration-300`
234
+ className: `${o ? "mr-2" : ""} ${c ? "" : "group-hover:rotate-12"} transition-transform duration-300`
182
235
  }
183
236
  ),
184
- a,
185
- c
237
+ o,
238
+ d
186
239
  ]
187
240
  }
188
- ), W = {
241
+ ), H = {
189
242
  sm: "max-w-sm",
190
243
  md: "max-w-md",
191
244
  lg: "max-w-2xl",
@@ -193,93 +246,110 @@ const V = {
193
246
  full: "max-w-[90vw]",
194
247
  fullscreen: "w-[95vw] h-[95vh]"
195
248
  };
196
- function pe({
197
- isOpen: r,
198
- onClose: t,
199
- title: a = "",
249
+ function ye({
250
+ isOpen: t,
251
+ onClose: r,
252
+ title: o = "",
200
253
  tamaño: n = "lg",
201
- children: o,
254
+ children: a,
202
255
  canClose: i = !0
203
- // Por defecto se puede cerrar
204
256
  }) {
205
- const d = /* @__PURE__ */ e(q, { children: r && /* @__PURE__ */ s(O, { children: [
206
- /* @__PURE__ */ e(
207
- T.div,
208
- {
209
- initial: { opacity: 0 },
210
- animate: { opacity: 1 },
211
- exit: { opacity: 0 },
212
- className: "fixed inset-0 z-[99998]"
213
- }
214
- ),
215
- /* @__PURE__ */ e(
216
- T.div,
217
- {
218
- initial: { opacity: 0 },
219
- animate: { opacity: 1 },
220
- exit: { opacity: 0 },
221
- className: `fixed inset-0 z-[99999] bg-black/60 backdrop-blur-sm flex items-center justify-center ${n === "fullscreen" ? "p-2" : "p-4"} ${i ? "" : "cursor-not-allowed"}`,
222
- onClick: i ? t : (c) => c.stopPropagation(),
223
- children: /* @__PURE__ */ s(
224
- T.div,
225
- {
226
- initial: { opacity: 0, scale: 0.95, y: 20 },
227
- animate: { opacity: 1, scale: 1, y: 0 },
228
- exit: { opacity: 0, scale: 0.95, y: 20 },
229
- transition: { type: "spring", damping: 20, stiffness: 300 },
230
- className: `
231
- bg-background shadow-2xl w-full overflow-hidden relative border border-border/50
232
- ${n === "fullscreen" ? "rounded-none h-[95vh]" : "rounded-2xl max-h-[95vh]"}
233
- ${W[n] || W.md}
234
- `,
235
- onClick: (c) => c.stopPropagation(),
236
- children: [
237
- /* @__PURE__ */ s("div", { className: "bg-gradient-to-r from-primary to-secondary p-4 flex justify-between items-center sticky top-0 z-10 border-b border-primary-foreground/20", children: [
238
- /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
239
- /* @__PURE__ */ e("div", { className: "w-8 h-8 bg-primary-foreground/20 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-4 h-4 bg-primary-foreground rounded-full" }) }),
240
- /* @__PURE__ */ e("h2", { className: "text-lg font-bold text-primary-foreground", children: a })
241
- ] }),
242
- i ? /* @__PURE__ */ e(
243
- "button",
244
- {
245
- onClick: t,
246
- className: "text-primary-foreground hover:text-primary-foreground/80 hover:bg-primary-foreground/10 p-2 rounded-lg transition-all duration-200",
247
- children: /* @__PURE__ */ e(E, { size: 24 })
248
- }
249
- ) : /* @__PURE__ */ e("div", { className: "w-10 h-10 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-5 h-5 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin" }) })
257
+ const c = he(), d = c ? c.config.modalZIndex + 99999 : 99999;
258
+ E(() => {
259
+ if (t) {
260
+ const m = window.scrollY;
261
+ return document.body.style.position = "fixed", document.body.style.top = `-${m}px`, document.body.style.width = "100%", document.body.style.overflow = "hidden", () => {
262
+ const p = document.body.style.top;
263
+ document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", document.body.style.overflow = "", p && window.scrollTo(0, parseInt(p || "0") * -1);
264
+ };
265
+ }
266
+ }, [t]);
267
+ const u = /* @__PURE__ */ e(Q, { children: t && /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(
268
+ j.div,
269
+ {
270
+ initial: { opacity: 0 },
271
+ animate: { opacity: 1 },
272
+ exit: { opacity: 0 },
273
+ className: "fixed inset-0 bg-black/60 backdrop-blur-xs flex items-center justify-center p-4",
274
+ onClick: i ? r : (m) => m.stopPropagation(),
275
+ style: {
276
+ position: "fixed",
277
+ top: 0,
278
+ left: 0,
279
+ right: 0,
280
+ bottom: 0,
281
+ margin: 0,
282
+ padding: n === "fullscreen" ? "0.5rem" : "1rem",
283
+ zIndex: d
284
+ },
285
+ children: /* @__PURE__ */ s(
286
+ j.div,
287
+ {
288
+ initial: { opacity: 0, scale: 0.95, y: 20 },
289
+ animate: { opacity: 1, scale: 1, y: 0 },
290
+ exit: { opacity: 0, scale: 0.95, y: 20 },
291
+ transition: { type: "spring", damping: 20, stiffness: 300 },
292
+ className: `
293
+ bg-background shadow-2xl w-full overflow-hidden relative border border-border/50
294
+ ${n === "fullscreen" ? "rounded-none h-[95vh]" : "rounded-2xl max-h-[95vh]"}
295
+ ${H[n] || H.md}
296
+ `,
297
+ onClick: (m) => m.stopPropagation(),
298
+ style: {
299
+ maxHeight: "95vh",
300
+ display: "flex",
301
+ flexDirection: "column"
302
+ },
303
+ children: [
304
+ /* @__PURE__ */ s("div", { className: "bg-linear-to-r from-primary to-secondary p-4 flex justify-between items-center sticky top-0 z-10 border-b border-primary-foreground/20", children: [
305
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
306
+ /* @__PURE__ */ e("div", { className: "w-8 h-8 bg-primary-foreground/20 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-4 h-4 bg-primary-foreground rounded-full" }) }),
307
+ /* @__PURE__ */ e("h2", { className: "text-lg font-bold text-primary-foreground", children: o })
250
308
  ] }),
251
- /* @__PURE__ */ e(
252
- "div",
309
+ i ? /* @__PURE__ */ e(
310
+ "button",
253
311
  {
254
- className: `overflow-y-auto bg-gradient-to-b from-background to-card/30 ${n === "fullscreen" ? "p-8 h-[calc(95vh-100px)]" : "p-6 max-h-[calc(95vh-100px)]"}`,
255
- children: o
312
+ onClick: r,
313
+ className: "text-primary-foreground hover:text-primary-foreground/80 hover:bg-primary-foreground/10 p-2 rounded-lg transition-all duration-200",
314
+ children: /* @__PURE__ */ e(P, { size: 24 })
256
315
  }
257
- )
258
- ]
259
- }
260
- )
261
- }
262
- )
263
- ] }) });
264
- return typeof window < "u" ? ie(d, document.body) : d;
316
+ ) : /* @__PURE__ */ e("div", { className: "w-10 h-10 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-5 h-5 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin" }) })
317
+ ] }),
318
+ /* @__PURE__ */ e(
319
+ "div",
320
+ {
321
+ className: `overflow-y-auto bg-linear-to-b from-background to-card/30 ${n === "fullscreen" ? "p-8 flex-1" : "p-6 flex-1"}`,
322
+ style: {
323
+ maxHeight: "calc(95vh - 80px)",
324
+ minHeight: 0
325
+ },
326
+ children: a
327
+ }
328
+ )
329
+ ]
330
+ }
331
+ )
332
+ }
333
+ ) }) });
334
+ return typeof window < "u" ? ce(u, document.body) : u;
265
335
  }
266
- const Ke = ({
267
- isOpen: r,
268
- onClose: t,
269
- onConfirm: a,
336
+ const Ge = ({
337
+ isOpen: t,
338
+ onClose: r,
339
+ onConfirm: o,
270
340
  loading: n = !1,
271
- entidad: o
341
+ entidad: a
272
342
  }) => {
273
- if (!r) return null;
343
+ if (!t) return null;
274
344
  const {
275
345
  tipo: i = "elemento",
276
346
  // "categoría", "producto", etc.
277
- nombre: d = "",
278
- dependencias: c = 0,
347
+ nombre: c = "",
348
+ dependencias: d = 0,
279
349
  nombreDependencia: u = ""
280
- } = o || {};
350
+ } = a || {};
281
351
  return /* @__PURE__ */ e("div", { className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4", children: /* @__PURE__ */ s("div", { className: "bg-background rounded-2xl shadow-2xl max-w-md w-full p-6 transform transition-all", children: [
282
- /* @__PURE__ */ e("div", { className: "flex items-center justify-center w-16 h-16 mx-auto mb-4 bg-destructive/10 rounded-full", children: /* @__PURE__ */ e(H, { className: "w-8 h-8 text-destructive" }) }),
352
+ /* @__PURE__ */ e("div", { className: "flex items-center justify-center w-16 h-16 mx-auto mb-4 bg-destructive/10 rounded-full", children: /* @__PURE__ */ e(X, { className: "w-8 h-8 text-destructive" }) }),
283
353
  /* @__PURE__ */ s("h3", { className: "text-xl font-bold text-foreground text-center mb-2", children: [
284
354
  "¿Eliminar ",
285
355
  i,
@@ -292,13 +362,13 @@ const Ke = ({
292
362
  /* @__PURE__ */ s("strong", { children: [
293
363
  i,
294
364
  ' "',
295
- d,
365
+ c,
296
366
  '"'
297
367
  ] }),
298
- c > 0 && u ? /* @__PURE__ */ s(O, { children: [
368
+ d > 0 && u ? /* @__PURE__ */ s(z, { children: [
299
369
  " y afectará a ",
300
370
  /* @__PURE__ */ s("strong", { children: [
301
- c,
371
+ d,
302
372
  " ",
303
373
  u
304
374
  ] }),
@@ -311,7 +381,7 @@ const Ke = ({
311
381
  /* @__PURE__ */ e(
312
382
  "button",
313
383
  {
314
- onClick: () => t(!1),
384
+ onClick: () => r(!1),
315
385
  className: "flex-1 px-4 py-3 border border-border text-foreground rounded-xl hover:bg-card transition-colors",
316
386
  children: "Cancelar"
317
387
  }
@@ -319,7 +389,7 @@ const Ke = ({
319
389
  /* @__PURE__ */ e(
320
390
  "button",
321
391
  {
322
- onClick: a,
392
+ onClick: o,
323
393
  disabled: n,
324
394
  className: `flex-1 px-4 py-3 ${n ? "bg-destructive/70" : "bg-destructive hover:bg-destructive/90"} text-destructive-foreground rounded-xl transition-colors`,
325
395
  children: n ? "Cargando..." : "Eliminar"
@@ -327,45 +397,45 @@ const Ke = ({
327
397
  )
328
398
  ] })
329
399
  ] }) });
330
- }, ge = {
400
+ }, ve = {
331
401
  success: {
332
402
  container: "bg-primary/10 border-primary/30 text-primary",
333
- icon: ee
403
+ icon: re
334
404
  },
335
405
  error: {
336
406
  container: "bg-destructive/10 border-destructive/30 text-destructive",
337
- icon: Q
407
+ icon: te
338
408
  },
339
409
  info: {
340
410
  container: "bg-blue-500/10 border-blue-500/30 text-blue-600 dark:text-blue-400",
341
- icon: J
411
+ icon: ee
342
412
  },
343
413
  warning: {
344
414
  container: "bg-amber-500/10 border-amber-500/30 text-amber-700 dark:text-amber-400",
345
- icon: H
415
+ icon: X
346
416
  }
347
417
  };
348
- function Ge({
349
- message: r,
350
- variant: t = "info",
351
- open: a,
418
+ function Xe({
419
+ message: t,
420
+ variant: r = "info",
421
+ open: o,
352
422
  onClose: n,
353
- autoClose: o,
423
+ autoClose: a,
354
424
  className: i = ""
355
425
  }) {
356
- const { container: d, icon: c } = ge[t];
357
- return K(() => {
358
- if (!a || !o) return;
359
- const u = setTimeout(n, o);
426
+ const { container: c, icon: d } = ve[r];
427
+ return E(() => {
428
+ if (!o || !a) return;
429
+ const u = setTimeout(n, a);
360
430
  return () => clearTimeout(u);
361
- }, [a, o, n]), a ? /* @__PURE__ */ s(
431
+ }, [o, a, n]), o ? /* @__PURE__ */ s(
362
432
  "div",
363
433
  {
364
434
  role: "alert",
365
- className: `fixed top-20 right-4 z-[9999] max-w-md flex items-center gap-3 px-4 py-3 rounded-xl border shadow-xl shadow-black/10 dark:shadow-black/30 animate-in slide-in-from-top-5 fade-in duration-300 ${d} ${i}`,
435
+ className: `fixed top-20 right-4 z-[9999] max-w-md flex items-center gap-3 px-4 py-3 rounded-xl border shadow-xl shadow-black/10 dark:shadow-black/30 animate-in slide-in-from-top-5 fade-in duration-300 ${c} ${i}`,
366
436
  children: [
367
- /* @__PURE__ */ e(c, { className: "w-5 h-5 shrink-0", "aria-hidden": !0 }),
368
- /* @__PURE__ */ e("p", { className: "font-medium flex-1", children: r }),
437
+ /* @__PURE__ */ e(d, { className: "w-5 h-5 shrink-0", "aria-hidden": !0 }),
438
+ /* @__PURE__ */ e("p", { className: "font-medium flex-1", children: t }),
369
439
  /* @__PURE__ */ e(
370
440
  "button",
371
441
  {
@@ -373,47 +443,47 @@ function Ge({
373
443
  onClick: n,
374
444
  className: "shrink-0 p-1 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 transition-colors focus:outline-none focus:ring-2 focus:ring-ring",
375
445
  "aria-label": "Cerrar",
376
- children: /* @__PURE__ */ e(E, { className: "w-4 h-4" })
446
+ children: /* @__PURE__ */ e(P, { className: "w-4 h-4" })
377
447
  }
378
448
  )
379
449
  ]
380
450
  }
381
451
  ) : null;
382
452
  }
383
- const he = "No hay registros para mostrar.", be = 10, xe = [10, 25, 50];
384
- function ve({
385
- value: r,
386
- columns: t,
387
- dataKey: a,
388
- emptyMessage: n = he,
389
- loading: o = !1,
453
+ const we = "No hay registros para mostrar.", Ne = 10, Ce = [10, 25, 50];
454
+ function ke({
455
+ value: t,
456
+ columns: r,
457
+ dataKey: o,
458
+ emptyMessage: n = we,
459
+ loading: a = !1,
390
460
  paginator: i = !1,
391
- rows: d = be,
392
- rowsPerPageOptions: c = xe,
461
+ rows: c = Ne,
462
+ rowsPerPageOptions: d = Ce,
393
463
  size: u = "normal",
394
- stripedRows: f = !1,
395
- showGridlines: b = !1,
396
- className: p,
464
+ stripedRows: m = !1,
465
+ showGridlines: p = !1,
466
+ className: h,
397
467
  style: g
398
468
  }) {
399
- const x = t.filter((l) => !l.hidden);
400
- return /* @__PURE__ */ e("div", { className: `data-table-viva overflow-hidden rounded-lg border border-border bg-card ${p ?? ""}`.trim(), style: g, children: /* @__PURE__ */ e(
401
- le,
469
+ const x = r.filter((l) => !l.hidden);
470
+ return /* @__PURE__ */ e("div", { className: `data-table-viva overflow-hidden rounded-lg border border-border bg-card ${h ?? ""}`.trim(), style: g, children: /* @__PURE__ */ e(
471
+ de,
402
472
  {
403
- value: r,
404
- dataKey: a,
405
- loading: o,
473
+ value: t,
474
+ dataKey: o,
475
+ loading: a,
406
476
  emptyMessage: n,
407
477
  paginator: i,
408
- rows: d,
409
- rowsPerPageOptions: c,
478
+ rows: c,
479
+ rowsPerPageOptions: d,
410
480
  size: u,
411
- stripedRows: f,
412
- showGridlines: b,
481
+ stripedRows: m,
482
+ showGridlines: p,
413
483
  paginatorTemplate: "FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown",
414
484
  currentPageReportTemplate: "Mostrando {first} a {last} de {totalRecords} registros",
415
485
  children: x.map((l) => /* @__PURE__ */ e(
416
- ce,
486
+ ue,
417
487
  {
418
488
  field: l.field,
419
489
  header: l.header,
@@ -422,51 +492,51 @@ function ve({
422
492
  alignHeader: l.alignHeader,
423
493
  style: l.style,
424
494
  bodyClassName: l.bodyClassName,
425
- body: l.body ? (h) => l.body(h) : void 0
495
+ body: l.body ? (b) => l.body(b) : void 0
426
496
  },
427
497
  String(l.field)
428
498
  ))
429
499
  }
430
500
  ) });
431
501
  }
432
- function He(r) {
433
- return /* @__PURE__ */ e(ve, { ...r });
502
+ function qe(t) {
503
+ return /* @__PURE__ */ e(ke, { ...t });
434
504
  }
435
- const ye = "w-full px-4 py-3 border text-base border-input rounded-xl focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all bg-background shadow-sm", we = "w-full pl-4 pr-12 py-3 border text-base border-input rounded-xl focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all bg-background shadow-sm", Ne = "w-full px-4 pt-6 pb-2 border text-base border-input rounded-xl focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all bg-background shadow-sm", ke = "w-full pl-4 pr-12 pt-6 pb-2 border text-base border-input rounded-xl focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all bg-background shadow-sm";
436
- function Ze({
437
- label: r,
438
- id: t,
439
- name: a,
505
+ const $e = "w-full px-4 py-3 border text-base border-input rounded-xl focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all bg-background shadow-sm", Fe = "w-full pl-4 pr-12 py-3 border text-base border-input rounded-xl focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all bg-background shadow-sm", Te = "w-full px-4 pt-6 pb-2 border text-base border-input rounded-xl focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all bg-background shadow-sm", Ee = "w-full pl-4 pr-12 pt-6 pb-2 border text-base border-input rounded-xl focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all bg-background shadow-sm";
506
+ function Je({
507
+ label: t,
508
+ id: r,
509
+ name: o,
440
510
  type: n = "text",
441
- value: o = "",
511
+ value: a = "",
442
512
  onChange: i,
443
- onBlur: d,
444
- placeholder: c,
513
+ onBlur: c,
514
+ placeholder: d,
445
515
  required: u = !1,
446
- options: f = [],
447
- rows: b = 4,
448
- className: p = "",
516
+ options: m = [],
517
+ rows: p = 4,
518
+ className: h = "",
449
519
  floatingLabel: g = !1,
450
520
  helperText: x,
451
521
  disabled: l = !1,
452
- inputMode: h
522
+ inputMode: b
453
523
  }) {
454
- const [P, $] = k(!1), [v, C] = k(!1), y = G(null), L = g && (P || o !== "" && o !== void 0 && o !== null), m = n === "password", w = m && v ? "text" : n, S = () => {
455
- $(!0);
524
+ const [T, k] = C(!1), [y, $] = C(!1), v = G(null), L = g && (T || a !== "" && a !== void 0 && a !== null), f = n === "password", w = f && y ? "text" : n, I = () => {
525
+ k(!0);
456
526
  }, A = (N) => {
457
- $(!1), d?.(N);
458
- }, F = g ? m ? ke : Ne : m ? we : ye, M = () => {
459
- C(!v);
527
+ k(!1), c?.(N);
528
+ }, F = g ? f ? Ee : Te : f ? Fe : $e, U = () => {
529
+ $(!y);
460
530
  };
461
- return /* @__PURE__ */ s("div", { className: p, children: [
531
+ return /* @__PURE__ */ s("div", { className: h, children: [
462
532
  g ? /* @__PURE__ */ s("div", { className: "relative", children: [
463
- r && /* @__PURE__ */ s(
533
+ t && /* @__PURE__ */ s(
464
534
  "label",
465
535
  {
466
- htmlFor: t,
536
+ htmlFor: r,
467
537
  className: `absolute left-4 transition-all duration-200 pointer-events-none ${L ? "top-2 text-xs text-muted-foreground font-medium" : "top-1/2 -translate-y-1/2 text-base text-muted-foreground/70"}`,
468
538
  children: [
469
- r,
539
+ t,
470
540
  u && /* @__PURE__ */ e("span", { className: "text-destructive ml-1", children: "*" })
471
541
  ]
472
542
  }
@@ -474,72 +544,81 @@ function Ze({
474
544
  n === "textarea" ? /* @__PURE__ */ e(
475
545
  "textarea",
476
546
  {
477
- ref: y,
478
- id: t,
479
- name: a,
480
- value: o,
547
+ ref: v,
548
+ id: r,
549
+ name: o,
550
+ value: a,
481
551
  onChange: i,
482
- onFocus: S,
552
+ onFocus: I,
483
553
  onBlur: A,
484
- placeholder: L ? c : "",
485
- rows: b,
554
+ placeholder: L ? d : "",
555
+ rows: p,
486
556
  disabled: l,
487
557
  className: `${F} resize-none`
488
558
  }
489
559
  ) : n === "select" ? /* @__PURE__ */ s(
490
560
  "select",
491
561
  {
492
- ref: y,
493
- id: t,
494
- name: a,
495
- value: o,
562
+ ref: v,
563
+ id: r,
564
+ name: o,
565
+ value: a,
496
566
  onChange: i,
497
- onFocus: S,
567
+ onFocus: I,
498
568
  onBlur: A,
499
569
  disabled: l,
500
570
  className: F,
501
571
  children: [
502
572
  /* @__PURE__ */ e("option", { value: "", children: "Seleccionar opción" }),
503
- f.map((N) => /* @__PURE__ */ e("option", { value: N.value, children: N.label }, N.value))
573
+ m.map((N) => /* @__PURE__ */ e("option", { value: N.value, children: N.label }, N.value))
504
574
  ]
505
575
  }
506
- ) : /* @__PURE__ */ s("div", { className: "relative", children: [
576
+ ) : /* @__PURE__ */ s("div", { className: "relative", style: { position: "relative" }, children: [
507
577
  /* @__PURE__ */ e(
508
578
  "input",
509
579
  {
510
- ref: y,
580
+ ref: v,
511
581
  type: w,
512
- id: t,
513
- name: a,
514
- value: o,
582
+ id: r,
583
+ name: o,
584
+ value: a,
515
585
  onChange: i,
516
- onFocus: S,
586
+ onFocus: I,
517
587
  onBlur: A,
518
- placeholder: L ? c : "",
588
+ placeholder: L ? d : "",
519
589
  disabled: l,
520
- inputMode: h,
590
+ inputMode: b,
521
591
  className: F
522
592
  }
523
593
  ),
524
- m && /* @__PURE__ */ e(
594
+ f && /* @__PURE__ */ e(
525
595
  "button",
526
596
  {
527
597
  type: "button",
528
- onClick: M,
529
- className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors focus:outline-none focus:ring-2 focus:ring-ring rounded p-1",
530
- "aria-label": v ? "Ocultar contraseña" : "Mostrar contraseña",
531
- children: v ? /* @__PURE__ */ e(R, { className: "w-5 h-5" }) : /* @__PURE__ */ e(I, { className: "w-5 h-5" })
598
+ onClick: U,
599
+ className: "absolute text-muted-foreground hover:text-foreground transition-colors focus:outline-none focus:ring-2 focus:ring-ring rounded p-1 z-10",
600
+ style: {
601
+ position: "absolute",
602
+ right: "0.75rem",
603
+ top: "50%",
604
+ transform: "translateY(-50%)",
605
+ display: "flex",
606
+ alignItems: "center",
607
+ justifyContent: "center"
608
+ },
609
+ "aria-label": y ? "Ocultar contraseña" : "Mostrar contraseña",
610
+ children: y ? /* @__PURE__ */ e(O, { className: "w-5 h-5", style: { width: "1.25rem", height: "1.25rem" } }) : /* @__PURE__ */ e(R, { className: "w-5 h-5", style: { width: "1.25rem", height: "1.25rem" } })
532
611
  }
533
612
  )
534
613
  ] })
535
- ] }) : /* @__PURE__ */ s(O, { children: [
536
- r && /* @__PURE__ */ s(
614
+ ] }) : /* @__PURE__ */ s(z, { children: [
615
+ t && /* @__PURE__ */ s(
537
616
  "label",
538
617
  {
539
- htmlFor: t,
618
+ htmlFor: r,
540
619
  className: "block text-base font-semibold text-foreground mb-2",
541
620
  children: [
542
- r,
621
+ t,
543
622
  u && /* @__PURE__ */ e("span", { className: "text-destructive ml-1", children: "*" })
544
623
  ]
545
624
  }
@@ -547,134 +626,143 @@ function Ze({
547
626
  n === "textarea" ? /* @__PURE__ */ e(
548
627
  "textarea",
549
628
  {
550
- id: t,
551
- name: a,
552
- value: o,
629
+ id: r,
630
+ name: o,
631
+ value: a,
553
632
  onChange: i,
554
- placeholder: c,
555
- rows: b,
633
+ placeholder: d,
634
+ rows: p,
556
635
  disabled: l,
557
636
  className: `${F} resize-none`
558
637
  }
559
638
  ) : n === "select" ? /* @__PURE__ */ s(
560
639
  "select",
561
640
  {
562
- id: t,
563
- name: a,
564
- value: o,
641
+ id: r,
642
+ name: o,
643
+ value: a,
565
644
  onChange: i,
566
645
  disabled: l,
567
646
  className: F,
568
647
  children: [
569
648
  /* @__PURE__ */ e("option", { value: "", children: "Seleccionar opción" }),
570
- f.map((N) => /* @__PURE__ */ e("option", { value: N.value, children: N.label }, N.value))
649
+ m.map((N) => /* @__PURE__ */ e("option", { value: N.value, children: N.label }, N.value))
571
650
  ]
572
651
  }
573
- ) : /* @__PURE__ */ s("div", { className: "relative", children: [
652
+ ) : /* @__PURE__ */ s("div", { className: "relative", style: { position: "relative" }, children: [
574
653
  /* @__PURE__ */ e(
575
654
  "input",
576
655
  {
577
656
  type: w,
578
- id: t,
579
- name: a,
580
- value: o,
657
+ id: r,
658
+ name: o,
659
+ value: a,
581
660
  onChange: i,
582
- onFocus: S,
661
+ onFocus: I,
583
662
  onBlur: A,
584
- placeholder: c,
663
+ placeholder: d,
585
664
  disabled: l,
586
- inputMode: h,
665
+ inputMode: b,
587
666
  className: F
588
667
  }
589
668
  ),
590
- m && /* @__PURE__ */ e(
669
+ f && /* @__PURE__ */ e(
591
670
  "button",
592
671
  {
593
672
  type: "button",
594
- onClick: M,
595
- className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors focus:outline-none focus:ring-2 focus:ring-ring rounded p-1",
596
- "aria-label": v ? "Ocultar contraseña" : "Mostrar contraseña",
597
- children: v ? /* @__PURE__ */ e(R, { className: "w-5 h-5" }) : /* @__PURE__ */ e(I, { className: "w-5 h-5" })
673
+ onClick: U,
674
+ className: "absolute text-muted-foreground hover:text-foreground transition-colors focus:outline-none focus:ring-2 focus:ring-ring rounded p-1 z-10",
675
+ style: {
676
+ position: "absolute",
677
+ right: "0.75rem",
678
+ top: "50%",
679
+ transform: "translateY(-50%)",
680
+ display: "flex",
681
+ alignItems: "center",
682
+ justifyContent: "center"
683
+ },
684
+ "aria-label": y ? "Ocultar contraseña" : "Mostrar contraseña",
685
+ children: y ? /* @__PURE__ */ e(O, { className: "w-5 h-5", style: { width: "1.25rem", height: "1.25rem" } }) : /* @__PURE__ */ e(R, { className: "w-5 h-5", style: { width: "1.25rem", height: "1.25rem" } })
598
686
  }
599
687
  )
600
688
  ] })
601
689
  ] }),
602
- x && /* @__PURE__ */ e("p", { className: `mt-2 text-sm ${p?.includes("border-red-500") ? "text-destructive" : "text-muted-foreground"}`, children: x })
690
+ x && /* @__PURE__ */ e("p", { className: `mt-2 text-sm ${h?.includes("border-red-500") ? "text-destructive" : "text-muted-foreground"}`, children: x })
603
691
  ] });
604
692
  }
605
- function Xe({
606
- value: r,
607
- onChange: t,
608
- placeholder: a = "Buscar...",
693
+ function Qe({
694
+ value: t,
695
+ onChange: r,
696
+ placeholder: o = "Buscar...",
609
697
  className: n = ""
610
698
  }) {
611
699
  return /* @__PURE__ */ s("div", { className: `relative ${n}`, children: [
612
- /* @__PURE__ */ e(re, { className: "absolute left-4 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400" }),
700
+ /* @__PURE__ */ e(ne, { className: "absolute left-4 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400" }),
613
701
  /* @__PURE__ */ e(
614
702
  "input",
615
703
  {
616
704
  type: "text",
617
- value: r,
618
- onChange: (o) => t(o.target.value),
619
- placeholder: a,
705
+ value: t,
706
+ onChange: (a) => r(a.target.value),
707
+ placeholder: o,
620
708
  className: "w-full pl-12 pr-4 py-3 bg-white border-2 border-gray-200 rounded-xl focus:ring-2 focus:ring-uno focus:border-uno transition-all text-sm font-medium text-divisiones placeholder-gray-400"
621
709
  }
622
710
  ),
623
- r && /* @__PURE__ */ e(
711
+ t && /* @__PURE__ */ e(
624
712
  "button",
625
713
  {
626
- onClick: () => t(""),
714
+ onClick: () => r(""),
627
715
  className: "absolute right-4 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-divisiones transition-colors",
628
716
  type: "button",
629
- children: /* @__PURE__ */ e(E, { className: "w-4 h-4" })
717
+ children: /* @__PURE__ */ e(P, { className: "w-4 h-4" })
630
718
  }
631
719
  )
632
720
  ] });
633
721
  }
634
- function Ye({
635
- id: r,
636
- name: t,
637
- label: a,
722
+ function et({
723
+ id: t,
724
+ name: r,
725
+ label: o,
638
726
  accept: n = ".pdf,application/pdf",
639
- required: o = !1,
727
+ required: a = !1,
640
728
  helperText: i,
641
- onChange: d,
642
- error: c,
729
+ onChange: c,
730
+ error: d,
643
731
  disabled: u = !1,
644
- maxSizeMB: f = 10,
645
- currentFileName: b
732
+ maxSizeMB: m = 10,
733
+ currentFileName: p
646
734
  }) {
647
- const [p, g] = k(null), [x, l] = k(!1), h = G(null), P = (m) => {
648
- if (n.includes("pdf") && m.type !== "application/pdf")
735
+ const [h, g] = C(null), [x, l] = C(!1), b = G(null), T = (f) => {
736
+ if (n.includes("pdf") && f.type !== "application/pdf")
649
737
  return "El archivo debe ser un PDF";
650
- const w = f * 1024 * 1024;
651
- return m.size > w ? `El archivo no debe superar ${f}MB` : null;
652
- }, $ = (m) => {
653
- if (!m) {
654
- g(null), d(null);
738
+ const w = m * 1024 * 1024;
739
+ return f.size > w ? `El archivo no debe superar ${m}MB` : null;
740
+ }, k = (f) => {
741
+ if (!f) {
742
+ g(null), c(null);
655
743
  return;
656
744
  }
657
- if (P(m)) {
658
- d(null);
745
+ if (T(f)) {
746
+ c(null);
659
747
  return;
660
748
  }
661
- g(m), d(m);
662
- }, v = (m) => {
663
- const w = m.target.files?.[0] || null;
664
- $(w);
665
- }, C = (m) => {
666
- m.preventDefault(), m.stopPropagation(), m.type === "dragenter" || m.type === "dragover" ? l(!0) : m.type === "dragleave" && l(!1);
667
- }, y = (m) => {
668
- if (m.preventDefault(), m.stopPropagation(), l(!1), u) return;
669
- const w = m.dataTransfer.files?.[0];
670
- w && $(w);
671
- }, D = () => {
672
- g(null), d(null), h.current && (h.current.value = "");
749
+ g(f), c(f);
750
+ }, y = (f) => {
751
+ const w = f.target.files?.[0] || null;
752
+ k(w);
753
+ }, $ = (f) => {
754
+ f.preventDefault(), f.stopPropagation(), f.type === "dragenter" || f.type === "dragover" ? l(!0) : f.type === "dragleave" && l(!1);
755
+ }, v = (f) => {
756
+ if (f.preventDefault(), f.stopPropagation(), l(!1), u) return;
757
+ const w = f.dataTransfer.files?.[0];
758
+ w && k(w);
759
+ }, S = () => {
760
+ g(null), c(null), b.current && (b.current.value = "");
673
761
  };
674
762
  return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
675
- /* @__PURE__ */ s("label", { htmlFor: r, className: "block text-sm font-medium text-foreground", children: [
676
- a,
677
- o && /* @__PURE__ */ e("span", { className: "text-destructive ml-1", children: "*" })
763
+ /* @__PURE__ */ s("label", { htmlFor: t, className: "block text-sm font-medium text-foreground", children: [
764
+ o,
765
+ a && /* @__PURE__ */ e("span", { className: "text-destructive ml-1", children: "*" })
678
766
  ] }),
679
767
  /* @__PURE__ */ s(
680
768
  "div",
@@ -683,36 +771,36 @@ function Ye({
683
771
  relative border-2 border-dashed rounded-lg p-6 transition-all
684
772
  ${x ? "border-primary bg-primary/5" : "border-border"}
685
773
  ${u ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-primary/50"}
686
- ${c ? "border-destructive" : ""}
774
+ ${d ? "border-destructive" : ""}
687
775
  `,
688
- onDragEnter: C,
689
- onDragLeave: C,
690
- onDragOver: C,
691
- onDrop: y,
776
+ onDragEnter: $,
777
+ onDragLeave: $,
778
+ onDragOver: $,
779
+ onDrop: v,
692
780
  onClick: () => {
693
- u || h.current?.click();
781
+ u || b.current?.click();
694
782
  },
695
783
  children: [
696
784
  /* @__PURE__ */ e(
697
785
  "input",
698
786
  {
699
- ref: h,
700
- id: r,
701
- name: t,
787
+ ref: b,
788
+ id: t,
789
+ name: r,
702
790
  type: "file",
703
791
  accept: n,
704
- onChange: v,
792
+ onChange: y,
705
793
  disabled: u,
706
794
  className: "hidden"
707
795
  }
708
796
  ),
709
- p || b ? /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
797
+ h || p ? /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
710
798
  /* @__PURE__ */ s("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
711
- /* @__PURE__ */ e("div", { className: "p-2 rounded-lg bg-primary/10 flex-shrink-0", children: /* @__PURE__ */ e(z, { className: "w-5 h-5 text-primary" }) }),
799
+ /* @__PURE__ */ e("div", { className: "p-2 rounded-lg bg-primary/10 flex-shrink-0", children: /* @__PURE__ */ e(M, { className: "w-5 h-5 text-primary" }) }),
712
800
  /* @__PURE__ */ s("div", { className: "flex-1 min-w-0", children: [
713
- /* @__PURE__ */ e("p", { className: "text-sm font-medium text-foreground truncate", children: p?.name || b }),
714
- p && /* @__PURE__ */ s("p", { className: "text-xs text-muted-foreground", children: [
715
- (p.size / 1024 / 1024).toFixed(2),
801
+ /* @__PURE__ */ e("p", { className: "text-sm font-medium text-foreground truncate", children: h?.name || p }),
802
+ h && /* @__PURE__ */ s("p", { className: "text-xs text-muted-foreground", children: [
803
+ (h.size / 1024 / 1024).toFixed(2),
716
804
  " MB"
717
805
  ] })
718
806
  ] })
@@ -721,54 +809,54 @@ function Ye({
721
809
  "button",
722
810
  {
723
811
  type: "button",
724
- onClick: (m) => {
725
- m.stopPropagation(), D();
812
+ onClick: (f) => {
813
+ f.stopPropagation(), S();
726
814
  },
727
815
  className: "p-2 rounded-lg hover:bg-destructive/10 transition-colors flex-shrink-0",
728
- children: /* @__PURE__ */ e(E, { className: "w-4 h-4 text-destructive" })
816
+ children: /* @__PURE__ */ e(P, { className: "w-4 h-4 text-destructive" })
729
817
  }
730
818
  )
731
819
  ] }) : /* @__PURE__ */ s("div", { className: "text-center", children: [
732
- /* @__PURE__ */ e(te, { className: "mx-auto h-12 w-12 text-muted-foreground" }),
820
+ /* @__PURE__ */ e(oe, { className: "mx-auto h-12 w-12 text-muted-foreground" }),
733
821
  /* @__PURE__ */ s("div", { className: "mt-4", children: [
734
822
  /* @__PURE__ */ s("p", { className: "text-sm text-foreground", children: [
735
823
  "Arrastra y suelta tu archivo aquí, o",
736
824
  " ",
737
825
  /* @__PURE__ */ e("span", { className: "text-primary font-medium", children: "haz clic para seleccionar" })
738
826
  ] }),
739
- /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground mt-2", children: n.includes("pdf") ? `Archivos PDF (máx. ${f}MB)` : `Máximo ${f}MB` })
827
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground mt-2", children: n.includes("pdf") ? `Archivos PDF (máx. ${m}MB)` : `Máximo ${m}MB` })
740
828
  ] })
741
829
  ] })
742
830
  ]
743
831
  }
744
832
  ),
745
- i && !c && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: i }),
746
- c && /* @__PURE__ */ e("p", { className: "text-xs text-destructive", children: c })
833
+ i && !d && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: i }),
834
+ d && /* @__PURE__ */ e("p", { className: "text-xs text-destructive", children: d })
747
835
  ] });
748
836
  }
749
- function qe({
750
- label: r,
751
- id: t,
752
- options: a,
837
+ function tt({
838
+ label: t,
839
+ id: r,
840
+ options: o,
753
841
  selectedIds: n,
754
- onChange: o,
842
+ onChange: a,
755
843
  loading: i = !1,
756
- disabled: d = !1,
757
- loadingMessage: c = "Cargando...",
844
+ disabled: c = !1,
845
+ loadingMessage: d = "Cargando...",
758
846
  emptyMessage: u,
759
- renderLabel: f,
760
- helperText: b,
761
- itemName: p = "item",
847
+ renderLabel: m,
848
+ helperText: p,
849
+ itemName: h = "item",
762
850
  itemNamePlural: g,
763
851
  maxHeight: x = "max-h-60",
764
852
  headerAction: l,
765
- emptyAction: h,
766
- className: P = ""
853
+ emptyAction: b,
854
+ className: T = ""
767
855
  }) {
768
- const $ = g || `${p}s`, v = n.length, C = v > 0;
769
- return /* @__PURE__ */ s("div", { className: `space-y-2 ${P}`, children: [
856
+ const k = g || `${h}s`, y = n.length, $ = y > 0;
857
+ return /* @__PURE__ */ s("div", { className: `space-y-2 ${T}`, children: [
770
858
  /* @__PURE__ */ s("div", { className: l ? "flex items-center justify-between" : "", children: [
771
- /* @__PURE__ */ e("label", { htmlFor: t, className: "block text-sm font-medium text-foreground", children: r }),
859
+ /* @__PURE__ */ e("label", { htmlFor: r, className: "block text-sm font-medium text-foreground", children: t }),
772
860
  l && /* @__PURE__ */ e(
773
861
  B,
774
862
  {
@@ -777,26 +865,26 @@ function qe({
777
865
  icon: l.icon,
778
866
  label: l.label,
779
867
  onClick: l.onClick,
780
- disabled: d,
868
+ disabled: c,
781
869
  className: "text-xs"
782
870
  }
783
871
  )
784
872
  ] }),
785
- /* @__PURE__ */ e("div", { className: `${x} overflow-y-auto border border-border rounded-lg p-3 bg-background`, children: i ? /* @__PURE__ */ e("div", { className: "text-center py-4 text-muted-foreground", children: c }) : a.length === 0 ? /* @__PURE__ */ s("div", { className: "text-center py-4 space-y-3", children: [
873
+ /* @__PURE__ */ e("div", { className: `${x} overflow-y-auto border border-border rounded-lg p-3 bg-background`, children: i ? /* @__PURE__ */ e("div", { className: "text-center py-4 text-muted-foreground", children: d }) : o.length === 0 ? /* @__PURE__ */ s("div", { className: "text-center py-4 space-y-3", children: [
786
874
  u && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: u }),
787
- h && /* @__PURE__ */ e(
875
+ b && /* @__PURE__ */ e(
788
876
  B,
789
877
  {
790
878
  type: "button",
791
- variant: h.variant || "primary",
792
- icon: h.icon,
793
- label: h.label,
794
- onClick: h.onClick,
795
- disabled: d
879
+ variant: b.variant || "primary",
880
+ icon: b.icon,
881
+ label: b.label,
882
+ onClick: b.onClick,
883
+ disabled: c
796
884
  }
797
885
  )
798
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: a.map((y) => {
799
- const D = n.includes(y.id);
886
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: o.map((v) => {
887
+ const S = n.includes(v.id);
800
888
  return /* @__PURE__ */ s(
801
889
  "label",
802
890
  {
@@ -806,151 +894,154 @@ function qe({
806
894
  "input",
807
895
  {
808
896
  type: "checkbox",
809
- checked: D,
810
- onChange: () => o(y.id),
811
- disabled: d,
897
+ checked: S,
898
+ onChange: () => a(v.id),
899
+ disabled: c,
812
900
  className: "w-4 h-4 text-primary border-border rounded focus:ring-primary focus:ring-2"
813
901
  }
814
902
  ),
815
- /* @__PURE__ */ e("span", { className: "text-sm text-foreground", children: f(y) })
903
+ /* @__PURE__ */ e("span", { className: "text-sm text-foreground", children: m(v) })
816
904
  ]
817
905
  },
818
- y.id
906
+ v.id
819
907
  );
820
908
  }) }) }),
821
- b && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: b }),
822
- C && /* @__PURE__ */ s("p", { className: "text-xs text-primary", children: [
823
- v,
909
+ p && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: p }),
910
+ $ && /* @__PURE__ */ s("p", { className: "text-xs text-primary", children: [
911
+ y,
824
912
  " ",
825
- v === 1 ? p : $,
913
+ y === 1 ? h : k,
826
914
  " seleccionado",
827
- v !== 1 ? "s" : ""
915
+ y !== 1 ? "s" : ""
828
916
  ] })
829
917
  ] });
830
918
  }
831
- function Je({
832
- label: r,
833
- description: t,
834
- value: a,
919
+ function rt({
920
+ label: t,
921
+ description: r,
922
+ value: o,
835
923
  onChange: n,
836
- icon: o,
924
+ icon: a,
837
925
  disabled: i = !1,
838
- className: d = ""
926
+ className: c = ""
839
927
  }) {
840
- const c = !!a;
841
- return /* @__PURE__ */ s("div", { className: `flex items-center justify-between p-4 bg-background rounded-xl border border-border hover:bg-card transition-colors duration-200 ${i ? "opacity-50 cursor-not-allowed" : ""} ${d}`, children: [
928
+ const d = !!o;
929
+ return /* @__PURE__ */ s("div", { className: `flex items-center justify-between p-4 bg-background rounded-xl border border-border hover:bg-card transition-colors duration-200 ${i ? "opacity-50 cursor-not-allowed" : ""} ${c}`, children: [
842
930
  /* @__PURE__ */ s("div", { className: "flex items-center gap-3 flex-1", children: [
843
- o && /* @__PURE__ */ e("div", { className: "flex-shrink-0 w-10 h-10 bg-gradient-to-br from-primary/80 to-primary-foreground/20 rounded-lg flex items-center justify-center text-primary-foreground", children: o }),
931
+ a && /* @__PURE__ */ e("div", { className: "flex-shrink-0 w-10 h-10 bg-gradient-to-br from-primary/80 to-primary-foreground/20 rounded-lg flex items-center justify-center text-primary-foreground", children: a }),
844
932
  /* @__PURE__ */ s("div", { className: "flex-1", children: [
845
- /* @__PURE__ */ e("label", { className: "block text-sm font-semibold text-foreground mb-1", children: r }),
846
- t && /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: t })
933
+ /* @__PURE__ */ e("label", { className: "block text-sm font-semibold text-foreground mb-1 cursor-pointer", onClick: () => !i && n(!d), children: t }),
934
+ r && /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: r })
847
935
  ] })
848
936
  ] }),
849
937
  /* @__PURE__ */ e(
850
- T.button,
938
+ j.button,
851
939
  {
852
940
  type: "button",
853
- onClick: () => !i && n(!c),
941
+ onClick: () => !i && n(!d),
854
942
  disabled: i,
855
943
  className: `
856
944
  relative flex items-center w-14 h-8 rounded-full p-1 transition-colors duration-300
857
945
  focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary/50
858
946
  ${i ? "cursor-not-allowed" : "cursor-pointer"}
859
- ${c ? "bg-gradient-to-r from-green-500 to-green-600" : "bg-muted"}
947
+ ${d ? "bg-gradient-to-r from-green-500 to-green-600" : "bg-muted"}
860
948
  `,
861
949
  whileTap: i ? {} : { scale: 0.95 },
950
+ "aria-label": d ? "Desactivar" : "Activar",
951
+ "aria-checked": d,
952
+ role: "switch",
862
953
  children: /* @__PURE__ */ e(
863
- T.div,
954
+ j.div,
864
955
  {
865
956
  className: "w-6 h-6 bg-white rounded-full shadow-lg flex items-center justify-center",
866
957
  animate: {
867
- x: c ? 24 : 0
958
+ x: d ? 26 : 0
868
959
  },
869
960
  transition: {
870
961
  type: "spring",
871
962
  stiffness: 500,
872
963
  damping: 30
873
964
  },
874
- children: c ? /* @__PURE__ */ e(ne, { className: "w-4 h-4 text-green-600" }) : /* @__PURE__ */ e(E, { className: "w-4 h-4 text-muted-foreground" })
965
+ children: d ? /* @__PURE__ */ e(ae, { className: "w-4 h-4 text-green-600" }) : /* @__PURE__ */ e(P, { className: "w-4 h-4 text-muted-foreground" })
875
966
  }
876
967
  )
877
968
  }
878
969
  )
879
970
  ] });
880
971
  }
881
- const $e = (r) => {
882
- const t = typeof r == "string" ? parseFloat(r) : r;
972
+ const je = (t) => {
973
+ const r = typeof t == "string" ? parseFloat(t) : t;
883
974
  return new Intl.NumberFormat("es-CO", {
884
975
  style: "currency",
885
976
  currency: "COP",
886
977
  minimumFractionDigits: 0,
887
978
  maximumFractionDigits: 0
888
- }).format(t);
979
+ }).format(r);
889
980
  };
890
- function Qe({
891
- value: r,
892
- className: t = "",
893
- bold: a = !1,
981
+ function nt({
982
+ value: t,
983
+ className: r = "",
984
+ bold: o = !1,
894
985
  primary: n = !1,
895
- secondary: o = !1,
986
+ secondary: a = !1,
896
987
  success: i = !1,
897
- error: d = !1,
898
- size: c = "base",
988
+ error: c = !1,
989
+ size: d = "base",
899
990
  emptyText: u = "-"
900
991
  }) {
901
- if (r == null)
902
- return /* @__PURE__ */ e("span", { className: `text-muted-foreground ${t}`, children: u });
903
- const f = typeof r == "string" ? parseFloat(r) : r;
904
- if (isNaN(f))
905
- return /* @__PURE__ */ e("span", { className: `text-muted-foreground ${t}`, children: u });
906
- const b = $e(f), p = {
992
+ if (t == null)
993
+ return /* @__PURE__ */ e("span", { className: `text-muted-foreground ${r}`, children: u });
994
+ const m = typeof t == "string" ? parseFloat(t) : t;
995
+ if (isNaN(m))
996
+ return /* @__PURE__ */ e("span", { className: `text-muted-foreground ${r}`, children: u });
997
+ const p = je(m), h = {
907
998
  sm: "text-sm",
908
999
  base: "text-base",
909
1000
  lg: "text-lg",
910
1001
  xl: "text-xl",
911
1002
  "2xl": "text-2xl"
912
- }, g = n ? "text-primary" : o ? "text-secondary" : i ? "text-green-600 dark:text-green-400" : d ? "text-destructive" : "text-foreground", x = a ? "font-bold" : "font-normal";
1003
+ }, g = n ? "text-primary" : a ? "text-secondary" : i ? "text-green-600 dark:text-green-400" : c ? "text-destructive" : "text-foreground", x = o ? "font-bold" : "font-normal";
913
1004
  return /* @__PURE__ */ e(
914
1005
  "span",
915
1006
  {
916
- className: `${p[c]} ${g} ${x} ${t}`,
917
- children: b
1007
+ className: `${h[d]} ${g} ${x} ${r}`,
1008
+ children: p
918
1009
  }
919
1010
  );
920
1011
  }
921
- const Ce = {
1012
+ const Pe = {
922
1013
  small: { width: 60, height: 45 },
923
1014
  default: { width: 120, height: 90 },
924
1015
  large: { width: 180, height: 135 }
925
- }, Fe = {
1016
+ }, De = {
926
1017
  default: "/logo.png",
927
1018
  logo2: "/logo2.png",
928
1019
  white: "/logoW.png",
929
1020
  whiteNoBg: "/logoW_sin_bg.png"
930
- }, er = ({
931
- size: r = "default",
932
- variant: t = "whiteNoBg",
933
- src: a,
1021
+ }, ot = ({
1022
+ size: t = "default",
1023
+ variant: r = "whiteNoBg",
1024
+ src: o,
934
1025
  alt: n = "Logo de Buenity",
935
- className: o = "",
1026
+ className: a = "",
936
1027
  fondoColor: i = "transparent",
937
1028
  // valor por defecto: transparente
938
- animated: d = !1,
1029
+ animated: c = !1,
939
1030
  // animaciones desactivadas por defecto
940
- animationType: c = "fade",
1031
+ animationType: d = "fade",
941
1032
  animationDuration: u = 1
942
1033
  }) => {
943
- const { width: f, height: b } = Ce[r], p = a || Fe[t], x = (() => {
944
- if (!d) return {};
945
- const h = {
1034
+ const { width: m, height: p } = Pe[t], h = o || De[r], x = (() => {
1035
+ if (!c) return {};
1036
+ const b = {
946
1037
  initial: { opacity: 0 },
947
1038
  animate: { opacity: 1 },
948
1039
  transition: { duration: u }
949
1040
  };
950
- switch (c) {
1041
+ switch (d) {
951
1042
  case "fade":
952
1043
  return {
953
- ...h,
1044
+ ...b,
954
1045
  initial: { opacity: 0 },
955
1046
  animate: { opacity: 1 }
956
1047
  };
@@ -1001,109 +1092,109 @@ const Ce = {
1001
1092
  }
1002
1093
  };
1003
1094
  default:
1004
- return h;
1095
+ return b;
1005
1096
  }
1006
1097
  })(), l = {
1007
1098
  className: "flex items-center rounded-xl justify-center",
1008
1099
  style: { backgroundColor: i },
1009
- ...d ? x : {}
1100
+ ...c ? x : {}
1010
1101
  };
1011
- return d ? /* @__PURE__ */ e(T.div, { ...l, children: /* @__PURE__ */ e(
1102
+ return c ? /* @__PURE__ */ e(j.div, { ...l, children: /* @__PURE__ */ e(
1012
1103
  "img",
1013
1104
  {
1014
- src: p,
1015
- width: f,
1016
- height: b,
1105
+ src: h,
1106
+ width: m,
1107
+ height: p,
1017
1108
  alt: n,
1018
- className: `object-contain ${o}`
1109
+ className: `object-contain ${a}`
1019
1110
  }
1020
1111
  ) }) : /* @__PURE__ */ e("div", { ...l, children: /* @__PURE__ */ e(
1021
1112
  "img",
1022
1113
  {
1023
- src: p,
1024
- width: f,
1025
- height: b,
1114
+ src: h,
1115
+ width: m,
1116
+ height: p,
1026
1117
  alt: n,
1027
- className: `object-contain ${o}`
1118
+ className: `object-contain ${a}`
1028
1119
  }
1029
1120
  ) });
1030
1121
  };
1031
- function Te(r) {
1032
- const t = r.split("?")[0], a = t.match(/rp-(\d+)/i);
1033
- if (a) return `rp-${a[1]}`;
1034
- const n = t.split("/");
1122
+ function Se(t) {
1123
+ const r = t.split("?")[0], o = r.match(/rp-(\d+)/i);
1124
+ if (o) return `rp-${o[1]}`;
1125
+ const n = r.split("/");
1035
1126
  return (n[n.length - 1] || "").replace(/\.(pdf|jpg|jpeg|png|gif|webp)$/i, "") || "Soporte";
1036
1127
  }
1037
- function rr({
1038
- url: r,
1039
- isOpen: t,
1040
- onClose: a,
1128
+ function at({
1129
+ url: t,
1130
+ isOpen: r,
1131
+ onClose: o,
1041
1132
  displayName: n
1042
1133
  }) {
1043
- const [o, i] = k(!0), [d, c] = k(null), [u, f] = k("unknown");
1044
- K(() => {
1045
- if (!r) {
1046
- f("unknown"), i(!1);
1134
+ const [a, i] = C(!0), [c, d] = C(null), [u, m] = C("unknown");
1135
+ E(() => {
1136
+ if (!t) {
1137
+ m("unknown"), i(!1);
1047
1138
  return;
1048
1139
  }
1049
- const l = r.toLowerCase();
1050
- l.match(/\.(jpg|jpeg|png|gif|webp|svg|bmp)$/) ? f("image") : l.match(/\.pdf$/) || l.includes("application/pdf") ? f("pdf") : f("unknown"), i(!1), c(null);
1051
- }, [r]);
1052
- const b = () => {
1053
- c("Error al cargar la imagen"), i(!1);
1054
- }, p = () => {
1055
- if (!r) return;
1140
+ const l = t.toLowerCase();
1141
+ l.match(/\.(jpg|jpeg|png|gif|webp|svg|bmp)$/) ? m("image") : l.match(/\.pdf$/) || l.includes("application/pdf") ? m("pdf") : m("unknown"), i(!1), d(null);
1142
+ }, [t]);
1143
+ const p = () => {
1144
+ d("Error al cargar la imagen"), i(!1);
1145
+ }, h = () => {
1146
+ if (!t) return;
1056
1147
  const l = document.createElement("a");
1057
- l.href = r, l.download = g, l.target = "_blank", document.body.appendChild(l), l.click(), document.body.removeChild(l);
1058
- }, g = n ?? (r ? Te(r) : "Archivo"), x = () => {
1148
+ l.href = t, l.download = g, l.target = "_blank", document.body.appendChild(l), l.click(), document.body.removeChild(l);
1149
+ }, g = n ?? (t ? Se(t) : "Archivo"), x = () => {
1059
1150
  switch (u) {
1060
1151
  case "image":
1061
- return /* @__PURE__ */ e(se, { className: "w-6 h-6 text-primary" });
1152
+ return /* @__PURE__ */ e(le, { className: "w-6 h-6 text-primary" });
1062
1153
  case "pdf":
1063
- return /* @__PURE__ */ e(z, { className: "w-6 h-6 text-primary" });
1154
+ return /* @__PURE__ */ e(M, { className: "w-6 h-6 text-primary" });
1064
1155
  default:
1065
- return /* @__PURE__ */ e(U, { className: "w-6 h-6 text-primary" });
1156
+ return /* @__PURE__ */ e(_, { className: "w-6 h-6 text-primary" });
1066
1157
  }
1067
1158
  };
1068
- return t ? /* @__PURE__ */ e(
1069
- pe,
1159
+ return r ? /* @__PURE__ */ e(
1160
+ ye,
1070
1161
  {
1071
1162
  isOpen: !0,
1072
- onClose: a,
1163
+ onClose: o,
1073
1164
  title: g,
1074
1165
  tamaño: "fullscreen",
1075
1166
  canClose: !0,
1076
1167
  children: /* @__PURE__ */ e("div", { className: "flex flex-col h-full min-h-[90dvh]", children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-auto mt-4 bg-muted/30 rounded-xl p-4 min-h-[60vh]", children: [
1077
- !r && /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center min-h-[400px] text-muted-foreground", children: [
1078
- /* @__PURE__ */ e(U, { className: "w-12 h-12 mb-4 opacity-50" }),
1168
+ !t && /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center min-h-[400px] text-muted-foreground", children: [
1169
+ /* @__PURE__ */ e(_, { className: "w-12 h-12 mb-4 opacity-50" }),
1079
1170
  /* @__PURE__ */ e("p", { children: "No hay archivo para visualizar." })
1080
1171
  ] }),
1081
- r && o && /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center min-h-[400px] text-muted-foreground", children: [
1082
- /* @__PURE__ */ e(oe, { className: "w-12 h-12 text-primary animate-spin mb-4" }),
1172
+ t && a && /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center min-h-[400px] text-muted-foreground", children: [
1173
+ /* @__PURE__ */ e(se, { className: "w-12 h-12 text-primary animate-spin mb-4" }),
1083
1174
  /* @__PURE__ */ e("p", { children: "Cargando archivo..." })
1084
1175
  ] }),
1085
- r && d && /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center min-h-[400px] text-center", children: [
1086
- /* @__PURE__ */ e("div", { className: "w-16 h-16 bg-destructive/10 rounded-full flex items-center justify-center mx-auto mb-4", children: /* @__PURE__ */ e(ae, { className: "w-8 h-8 text-destructive" }) }),
1176
+ t && c && /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center min-h-[400px] text-center", children: [
1177
+ /* @__PURE__ */ e("div", { className: "w-16 h-16 bg-destructive/10 rounded-full flex items-center justify-center mx-auto mb-4", children: /* @__PURE__ */ e(ie, { className: "w-8 h-8 text-destructive" }) }),
1087
1178
  /* @__PURE__ */ e("h3", { className: "text-lg font-semibold text-foreground mb-2", children: "Error al cargar el archivo" }),
1088
- /* @__PURE__ */ e("p", { className: "text-muted-foreground mb-4", children: d }),
1179
+ /* @__PURE__ */ e("p", { className: "text-muted-foreground mb-4", children: c }),
1089
1180
  /* @__PURE__ */ e(
1090
1181
  B,
1091
1182
  {
1092
1183
  type: "button",
1093
1184
  variant: "primary",
1094
- icon: _,
1185
+ icon: W,
1095
1186
  label: "Intentar descargar",
1096
- onClick: p
1187
+ onClick: h
1097
1188
  }
1098
1189
  )
1099
1190
  ] }),
1100
- r && !o && !d && /* @__PURE__ */ s(O, { children: [
1191
+ t && !a && !c && /* @__PURE__ */ s(z, { children: [
1101
1192
  u === "image" && /* @__PURE__ */ e("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ e(
1102
1193
  "img",
1103
1194
  {
1104
- src: r,
1195
+ src: t,
1105
1196
  alt: g,
1106
- onError: b,
1197
+ onError: p,
1107
1198
  onLoad: () => i(!1),
1108
1199
  className: "max-w-full max-h-[75vh] object-contain rounded-lg shadow-lg border border-border"
1109
1200
  }
@@ -1111,7 +1202,7 @@ function rr({
1111
1202
  u === "pdf" && /* @__PURE__ */ e("div", { className: "flex items-center justify-center min-h-[82dvh] w-full", children: /* @__PURE__ */ e(
1112
1203
  "iframe",
1113
1204
  {
1114
- src: r,
1205
+ src: t,
1115
1206
  onLoad: () => i(!1),
1116
1207
  className: "w-full h-[75vh] rounded-lg shadow-lg bg-background border border-border",
1117
1208
  title: g
@@ -1126,9 +1217,9 @@ function rr({
1126
1217
  {
1127
1218
  type: "button",
1128
1219
  variant: "primary",
1129
- icon: _,
1220
+ icon: W,
1130
1221
  label: "Descargar archivo",
1131
- onClick: p
1222
+ onClick: h
1132
1223
  }
1133
1224
  )
1134
1225
  ] })
@@ -1137,47 +1228,47 @@ function rr({
1137
1228
  }
1138
1229
  ) : null;
1139
1230
  }
1140
- function tr({
1141
- url: r,
1142
- displayName: t,
1143
- icon: a,
1231
+ function st({
1232
+ url: t,
1233
+ displayName: r,
1234
+ icon: o,
1144
1235
  className: n = "inline-flex items-center gap-2 text-primary hover:text-primary/80 hover:underline font-medium"
1145
1236
  }) {
1146
- const o = r.startsWith("http") || r.startsWith("//") ? r : `${typeof window < "u" ? window.location.origin : ""}${r.startsWith("/") ? r : `/${r}`}`;
1237
+ const a = t.startsWith("http") || t.startsWith("//") ? t : `${typeof window < "u" ? window.location.origin : ""}${t.startsWith("/") ? t : `/${t}`}`;
1147
1238
  return /* @__PURE__ */ s(
1148
1239
  "a",
1149
1240
  {
1150
- href: o,
1241
+ href: a,
1151
1242
  target: "_blank",
1152
1243
  rel: "noopener noreferrer",
1153
1244
  className: n,
1154
1245
  children: [
1155
- a ?? /* @__PURE__ */ e(z, { className: "w-4 h-4 shrink-0" }),
1156
- t
1246
+ o ?? /* @__PURE__ */ e(M, { className: "w-4 h-4 shrink-0" }),
1247
+ r
1157
1248
  ]
1158
1249
  }
1159
1250
  );
1160
1251
  }
1161
- const Pe = {
1252
+ const Le = {
1162
1253
  sm: "h-4 w-4",
1163
1254
  md: "h-6 w-6",
1164
1255
  lg: "h-10 w-10",
1165
1256
  xl: "h-16 w-16"
1166
- }, Ee = {
1257
+ }, Ie = {
1167
1258
  primary: "text-primary",
1168
1259
  secondary: "text-secondary",
1169
1260
  muted: "text-muted-foreground",
1170
1261
  destructive: "text-destructive"
1171
1262
  };
1172
- function je({
1173
- size: r = "md",
1174
- variant: t = "muted",
1175
- className: a = ""
1263
+ function Ae({
1264
+ size: t = "md",
1265
+ variant: r = "muted",
1266
+ className: o = ""
1176
1267
  }) {
1177
1268
  return /* @__PURE__ */ s(
1178
1269
  "svg",
1179
1270
  {
1180
- className: `${Pe[r]} ${Ee[t]} animate-spin ${a}`,
1271
+ className: `${Le[t]} ${Ie[r]} animate-spin ${o}`,
1181
1272
  viewBox: "0 0 24 24",
1182
1273
  fill: "none",
1183
1274
  "aria-hidden": "true",
@@ -1207,45 +1298,47 @@ function je({
1207
1298
  }
1208
1299
  );
1209
1300
  }
1210
- function nr({
1211
- text: r = "Cargando datos...",
1212
- size: t = "lg",
1213
- variant: a = "muted",
1301
+ function it({
1302
+ text: t = "Cargando datos...",
1303
+ size: r = "lg",
1304
+ variant: o = "muted",
1214
1305
  className: n = "",
1215
- textClassName: o = ""
1306
+ textClassName: a = ""
1216
1307
  }) {
1217
1308
  return /* @__PURE__ */ e("div", { className: `w-full h-screen flex items-center justify-center p-6 ${n}`, children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-4", children: [
1218
- /* @__PURE__ */ e(je, { size: t, variant: a }),
1219
- r && /* @__PURE__ */ e("span", { className: `text-lg font-semibold text-muted-foreground ${o}`, children: r })
1309
+ /* @__PURE__ */ e(Ae, { size: r, variant: o }),
1310
+ t && /* @__PURE__ */ e("span", { className: `text-lg font-semibold text-muted-foreground ${a}`, children: t })
1220
1311
  ] }) });
1221
1312
  }
1222
1313
  export {
1223
1314
  B as ActionButton,
1224
- Qe as CurrencyDisplay,
1225
- He as DataTable,
1226
- Ke as DeleteConfirmModal,
1227
- tr as FileLink,
1228
- Ye as FileUpload,
1229
- rr as FileViewerModal,
1230
- Ze as FormField,
1231
- je as Loader,
1232
- nr as LoaderScreen,
1233
- er as Logo,
1234
- pe as Modal,
1235
- qe as MultiSelectCheckbox,
1236
- Xe as SearchBar,
1237
- Ue as ThemeProvider,
1238
- Ge as Toast,
1239
- Je as ToggleSwitch,
1240
- Re as createTheme,
1241
- j as defaultColors,
1242
- de as defaultTheme,
1243
- Ie as generateCSSVariables,
1244
- fe as generateCompatibilityVariables,
1245
- We as generateTailwindV4CSS,
1246
- me as generateTailwindV4Theme,
1247
- Te as getRpSoporteDisplayName,
1248
- ue as getTailwindColors,
1249
- Ve as getTailwindConfig,
1250
- _e as useTheme
1315
+ nt as CurrencyDisplay,
1316
+ qe as DataTable,
1317
+ Ge as DeleteConfirmModal,
1318
+ st as FileLink,
1319
+ et as FileUpload,
1320
+ at as FileViewerModal,
1321
+ Je as FormField,
1322
+ Ae as Loader,
1323
+ it as LoaderScreen,
1324
+ ot as Logo,
1325
+ ye as Modal,
1326
+ tt as MultiSelectCheckbox,
1327
+ Qe as SearchBar,
1328
+ pe as ThemeProvider,
1329
+ Xe as Toast,
1330
+ rt as ToggleSwitch,
1331
+ He as VicdevUIProvider,
1332
+ We as createTheme,
1333
+ D as defaultColors,
1334
+ me as defaultTheme,
1335
+ fe as generateCSSVariables,
1336
+ xe as generateCompatibilityVariables,
1337
+ Ye as generateTailwindV4CSS,
1338
+ be as generateTailwindV4Theme,
1339
+ Se as getRpSoporteDisplayName,
1340
+ ge as getTailwindColors,
1341
+ Ke as getTailwindConfig,
1342
+ Ze as useTheme,
1343
+ he as useVicdevUIConfig
1251
1344
  };