@directo-ui/web 1.3.0 → 1.4.0

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,45 +1,16 @@
1
- import { createContext as e, forwardRef as t, useCallback as n, useContext as r, useEffect as i, useId as a, useMemo as o, useRef as s, useState as c } from "react";
2
- import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
3
- import * as f from "@radix-ui/react-tabs";
4
- import * as p from "@radix-ui/react-select";
5
- import { CaretDown as m, CaretLeft as h, CaretRight as g, Check as _, CheckCircle as v, Info as y, MagnifyingGlass as b, SquaresFour as x, Tray as S, Warning as C, WarningCircle as w, X as T } from "phosphor-react";
6
- import * as E from "@radix-ui/react-dialog";
7
- import * as D from "@radix-ui/react-checkbox";
8
- import * as O from "@radix-ui/react-radio-group";
9
- import * as k from "@radix-ui/react-switch";
10
- import * as A from "@radix-ui/react-tooltip";
11
- import * as j from "@radix-ui/react-dropdown-menu";
12
- //#region src/components/Button.tsx
13
- var M = t(function({ variant: e = "primary", size: t = "md", disabled: n = !1, loading: r = !1, fullWidth: i = !1, leftIcon: a, rightIcon: o, children: s, type: c = "button", className: l = "", ...f }, p) {
14
- return /* @__PURE__ */ d("button", {
15
- ...f,
16
- ref: p,
17
- type: c,
18
- disabled: n || r,
19
- "aria-busy": r || void 0,
20
- "data-variant": e,
21
- "data-size": t,
22
- "data-full-width": i || void 0,
23
- className: `ds-button ${l}`.trim(),
24
- children: [
25
- r ? /* @__PURE__ */ u("span", {
26
- className: "ds-spinner",
27
- "data-size": "sm",
28
- "aria-hidden": "true"
29
- }) : a && /* @__PURE__ */ u("span", {
30
- className: "ds-button-icon",
31
- "aria-hidden": "true",
32
- children: a
33
- }),
34
- s,
35
- o && !r && /* @__PURE__ */ u("span", {
36
- className: "ds-button-icon",
37
- "aria-hidden": "true",
38
- children: o
39
- })
40
- ]
41
- });
42
- }), N = /* @__PURE__ */ d("svg", {
1
+ import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./ChipGroup-DkJz118c.js";
2
+ import { createContext as c, forwardRef as l, useCallback as u, useContext as d, useEffect as f, useId as p, useMemo as m, useRef as h, useState as g } from "react";
3
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
4
+ import * as b from "@radix-ui/react-select";
5
+ import { CaretDown as x, CaretLeft as S, CaretRight as C, Check as w, CheckCircle as T, Info as E, MagnifyingGlass as D, SquaresFour as O, Tray as k, Warning as A, WarningCircle as j, X as M } from "phosphor-react";
6
+ import * as N from "@radix-ui/react-dialog";
7
+ import * as P from "@radix-ui/react-checkbox";
8
+ import * as F from "@radix-ui/react-radio-group";
9
+ import * as I from "@radix-ui/react-switch";
10
+ import * as L from "@radix-ui/react-tooltip";
11
+ import * as R from "@radix-ui/react-dropdown-menu";
12
+ //#region src/components/IconButton.tsx
13
+ var z = /* @__PURE__ */ y("svg", {
43
14
  width: "20",
44
15
  height: "20",
45
16
  viewBox: "0 0 24 24",
@@ -48,13 +19,13 @@ var M = t(function({ variant: e = "primary", size: t = "md", disabled: n = !1, l
48
19
  strokeWidth: "2",
49
20
  strokeLinecap: "round",
50
21
  strokeLinejoin: "round",
51
- children: [/* @__PURE__ */ u("path", { d: "M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z" }), /* @__PURE__ */ u("circle", {
22
+ children: [/* @__PURE__ */ v("path", { d: "M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z" }), /* @__PURE__ */ v("circle", {
52
23
  cx: "12",
53
24
  cy: "10",
54
25
  r: "3"
55
26
  })]
56
- }), P = t(function({ variant: e = "primary", size: t = "md", disabled: n = !1, icon: r, ariaLabel: i, type: a = "button", className: o = "", children: s, ...c }, l) {
57
- return /* @__PURE__ */ u("button", {
27
+ }), B = l(function({ variant: e = "primary", size: t = "md", disabled: n = !1, icon: r, ariaLabel: i, type: a = "button", className: o = "", children: s, ...c }, l) {
28
+ return /* @__PURE__ */ v("button", {
58
29
  ...c,
59
30
  ref: l,
60
31
  type: a,
@@ -63,12 +34,12 @@ var M = t(function({ variant: e = "primary", size: t = "md", disabled: n = !1, l
63
34
  "data-variant": e,
64
35
  "data-size": t,
65
36
  "aria-label": i ?? c["aria-label"] ?? "Acción",
66
- children: /* @__PURE__ */ u("span", {
37
+ children: /* @__PURE__ */ v("span", {
67
38
  "aria-hidden": "true",
68
- children: r ?? s ?? N
39
+ children: r ?? s ?? z
69
40
  })
70
41
  });
71
- }), F = {
42
+ }), V = {
72
43
  default: {
73
44
  background: "var(--ds-color-neutral-800)",
74
45
  handle: "var(--ds-color-primary-500)",
@@ -90,67 +61,67 @@ var M = t(function({ variant: e = "primary", size: t = "md", disabled: n = !1, l
90
61
  label: "Desactivar mi sesión"
91
62
  }
92
63
  };
93
- function I({ variant: e = "default", disabled: t = !1, label: n, onComplete: r }) {
94
- let [a, o] = c(0), [l, f] = c(!1), [p, m] = c(!1), h = s(null), g = s(0), _ = s(0), v = s(null), y = s(!1), b = F[e] ?? F.default, x = n ?? b.label, S = () => Math.max(0, (h.current?.clientWidth ?? 64) - 64);
64
+ function H({ variant: e = "default", disabled: t = !1, label: n, onComplete: r }) {
65
+ let [i, a] = g(0), [o, s] = g(!1), [c, l] = g(!1), u = h(null), d = h(0), p = h(0), m = h(null), _ = h(!1), b = V[e] ?? V.default, x = n ?? b.label, S = () => Math.max(0, (u.current?.clientWidth ?? 64) - 64);
95
66
  function C() {
96
- t || y.current || (y.current = !0, m(!0), o(S()), r?.());
67
+ t || _.current || (_.current = !0, l(!0), a(S()), r?.());
97
68
  }
98
69
  function w() {
99
- v.current = null, f(!1), y.current || (_.current = 0, o(0));
70
+ m.current = null, s(!1), _.current || (p.current = 0, a(0));
100
71
  }
101
- return i(() => {
102
- if (!p) return;
72
+ return f(() => {
73
+ if (!c) return;
103
74
  let e = setTimeout(() => {
104
- y.current = !1, _.current = 0, o(0), m(!1);
75
+ _.current = !1, p.current = 0, a(0), l(!1);
105
76
  }, 1500);
106
77
  return () => clearTimeout(e);
107
- }, [p]), /* @__PURE__ */ d("div", {
108
- ref: h,
78
+ }, [c]), /* @__PURE__ */ y("div", {
79
+ ref: u,
109
80
  className: "ds-slide",
110
81
  style: {
111
82
  background: b.background,
112
83
  opacity: t ? .5 : 1
113
84
  },
114
85
  children: [
115
- /* @__PURE__ */ u("span", {
86
+ /* @__PURE__ */ v("span", {
116
87
  className: "ds-slide-progress",
117
88
  "aria-hidden": "true",
118
- style: { width: p ? "100%" : a ? `${a + 56}px` : 0 }
89
+ style: { width: c ? "100%" : i ? `${i + 56}px` : 0 }
119
90
  }),
120
- /* @__PURE__ */ u("button", {
91
+ /* @__PURE__ */ v("button", {
121
92
  type: "button",
122
93
  "aria-label": x,
123
94
  title: "Desliza o pulsa Enter para confirmar",
124
95
  className: "ds-slide-handle",
125
- disabled: t || p,
96
+ disabled: t || c,
126
97
  style: {
127
98
  background: b.handle,
128
- transform: `translateX(${a}px)`,
129
- transition: l ? "none" : void 0
99
+ transform: `translateX(${i}px)`,
100
+ transition: o ? "none" : void 0
130
101
  },
131
102
  onClick: (e) => {
132
103
  e.detail === 0 && C();
133
104
  },
134
105
  onPointerDown: (e) => {
135
- t || y.current || e.button !== 0 || (v.current = e.pointerId, g.current = e.clientX, _.current = 0, o(0), f(!0), e.currentTarget.setPointerCapture(e.pointerId));
106
+ t || _.current || e.button !== 0 || (m.current = e.pointerId, d.current = e.clientX, p.current = 0, a(0), s(!0), e.currentTarget.setPointerCapture(e.pointerId));
136
107
  },
137
108
  onPointerMove: (e) => {
138
- v.current !== e.pointerId || t || y.current || (_.current = Math.max(0, Math.min(S(), e.clientX - g.current)), o(_.current));
109
+ m.current !== e.pointerId || t || _.current || (p.current = Math.max(0, Math.min(S(), e.clientX - d.current)), a(p.current));
139
110
  },
140
111
  onPointerUp: (e) => {
141
- if (v.current === e.pointerId) {
112
+ if (m.current === e.pointerId) {
142
113
  if (t) {
143
114
  w();
144
115
  return;
145
116
  }
146
- v.current = null, f(!1), S() > 0 && _.current >= S() * .7 ? C() : (_.current = 0, o(0)), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId);
117
+ m.current = null, s(!1), S() > 0 && p.current >= S() * .7 ? C() : (p.current = 0, a(0)), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId);
147
118
  }
148
119
  },
149
120
  onPointerCancel: w,
150
121
  onLostPointerCapture: () => {
151
- v.current !== null && w();
122
+ m.current !== null && w();
152
123
  },
153
- children: /* @__PURE__ */ u("svg", {
124
+ children: /* @__PURE__ */ v("svg", {
154
125
  "aria-hidden": "true",
155
126
  width: "24",
156
127
  height: "24",
@@ -158,110 +129,76 @@ function I({ variant: e = "default", disabled: t = !1, label: n, onComplete: r }
158
129
  fill: "none",
159
130
  stroke: "currentColor",
160
131
  strokeWidth: "2",
161
- children: /* @__PURE__ */ u("path", { d: "M5 12h14M12 5l7 7-7 7" })
132
+ children: /* @__PURE__ */ v("path", { d: "M5 12h14M12 5l7 7-7 7" })
162
133
  })
163
134
  }),
164
- /* @__PURE__ */ u("span", {
135
+ /* @__PURE__ */ v("span", {
165
136
  className: "ds-slide-label",
166
137
  "aria-hidden": "true",
167
- style: { opacity: p ? 0 : Math.max(0, 1 - a / 140) },
138
+ style: { opacity: c ? 0 : Math.max(0, 1 - i / 140) },
168
139
  children: x
169
140
  }),
170
- /* @__PURE__ */ u("span", {
141
+ /* @__PURE__ */ v("span", {
171
142
  role: "status",
172
143
  className: "ds-slide-status",
173
- children: p ? "Confirmado" : ""
144
+ children: c ? "Confirmado" : ""
174
145
  })
175
146
  ]
176
147
  });
177
148
  }
178
149
  //#endregion
179
- //#region src/components/Tabs.tsx
180
- function L({ defaultValue: e, value: t, onValueChange: n, orientation: r = "horizontal", children: i }) {
181
- return /* @__PURE__ */ u(f.Root, {
182
- className: "ds-tabs",
183
- defaultValue: e,
184
- value: t,
185
- onValueChange: n,
186
- orientation: r,
187
- children: i
188
- });
189
- }
190
- function R({ variant: e = "default", children: t }) {
191
- return /* @__PURE__ */ u(f.List, {
192
- className: "ds-tabs-list",
193
- "data-variant": e,
194
- children: t
195
- });
196
- }
197
- function z({ value: e, disabled: t, children: n }) {
198
- return /* @__PURE__ */ u(f.Trigger, {
199
- value: e,
200
- disabled: t,
201
- className: "ds-tab",
202
- children: n
203
- });
204
- }
205
- function B({ value: e, children: t }) {
206
- return /* @__PURE__ */ u(f.Content, {
207
- value: e,
208
- className: "ds-tab-panel",
209
- children: t
210
- });
211
- }
212
- //#endregion
213
150
  //#region src/components/Select.tsx
214
- function V({ value: e, onValueChange: t, placeholder: n = "Seleccionar…", disabled: r, children: i, id: o, ariaLabel: s, label: c, supportingText: l, error: f = !1, ...h }) {
215
- let g = a(), _ = o ?? g, v = `${_}-hint`, y = /* @__PURE__ */ d(p.Root, {
216
- ...h,
151
+ function U({ value: e, onValueChange: t, placeholder: n = "Seleccionar…", disabled: r, children: i, id: a, ariaLabel: o, label: s, supportingText: c, error: l = !1, ...u }) {
152
+ let d = p(), f = a ?? d, m = `${f}-hint`, h = /* @__PURE__ */ y(b.Root, {
153
+ ...u,
217
154
  value: e,
218
155
  onValueChange: t,
219
156
  disabled: r,
220
- children: [/* @__PURE__ */ d(p.Trigger, {
221
- id: _,
222
- "aria-label": c ? void 0 : s,
223
- "aria-invalid": f || void 0,
224
- "aria-describedby": l ? v : void 0,
157
+ children: [/* @__PURE__ */ y(b.Trigger, {
158
+ id: f,
159
+ "aria-label": s ? void 0 : o,
160
+ "aria-invalid": l || void 0,
161
+ "aria-describedby": c ? m : void 0,
225
162
  className: "ds-select-trigger",
226
- children: [/* @__PURE__ */ u(p.Value, { placeholder: n }), /* @__PURE__ */ u(p.Icon, { children: /* @__PURE__ */ u(m, {
163
+ children: [/* @__PURE__ */ v(b.Value, { placeholder: n }), /* @__PURE__ */ v(b.Icon, { children: /* @__PURE__ */ v(x, {
227
164
  size: 16,
228
165
  "aria-hidden": "true"
229
166
  }) })]
230
- }), /* @__PURE__ */ u(p.Portal, { children: /* @__PURE__ */ u(p.Content, {
167
+ }), /* @__PURE__ */ v(b.Portal, { children: /* @__PURE__ */ v(b.Content, {
231
168
  position: "popper",
232
169
  sideOffset: 6,
233
170
  className: "ds-select-content",
234
- children: /* @__PURE__ */ u(p.Viewport, {
171
+ children: /* @__PURE__ */ v(b.Viewport, {
235
172
  className: "ds-select-viewport",
236
173
  children: i
237
174
  })
238
175
  }) })]
239
176
  });
240
- return !c && !l ? y : /* @__PURE__ */ d("div", {
177
+ return !s && !c ? h : /* @__PURE__ */ y("div", {
241
178
  className: "ds-input",
242
- "data-error": f,
179
+ "data-error": l,
243
180
  "data-disabled": r,
244
181
  children: [
245
- c && /* @__PURE__ */ u("label", {
246
- htmlFor: _,
247
- children: c
182
+ s && /* @__PURE__ */ v("label", {
183
+ htmlFor: f,
184
+ children: s
248
185
  }),
249
- y,
250
- l && /* @__PURE__ */ u("small", {
251
- id: v,
252
- children: l
186
+ h,
187
+ c && /* @__PURE__ */ v("small", {
188
+ id: m,
189
+ children: c
253
190
  })
254
191
  ]
255
192
  });
256
193
  }
257
- function H({ value: e, disabled: t, children: n }) {
258
- return /* @__PURE__ */ d(p.Item, {
194
+ function ee({ value: e, disabled: t, children: n }) {
195
+ return /* @__PURE__ */ y(b.Item, {
259
196
  value: e,
260
197
  disabled: t,
261
198
  className: "ds-select-item",
262
- children: [/* @__PURE__ */ u(p.ItemText, { children: n }), /* @__PURE__ */ u(p.ItemIndicator, {
199
+ children: [/* @__PURE__ */ v(b.ItemText, { children: n }), /* @__PURE__ */ v(b.ItemIndicator, {
263
200
  className: "ds-select-check",
264
- children: /* @__PURE__ */ u(_, {
201
+ children: /* @__PURE__ */ v(w, {
265
202
  size: 16,
266
203
  "aria-hidden": "true"
267
204
  })
@@ -269,103 +206,120 @@ function H({ value: e, disabled: t, children: n }) {
269
206
  });
270
207
  }
271
208
  //#endregion
209
+ //#region src/components/CloseButton.tsx
210
+ var W = "M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z", G = l(function({ label: e = "Cerrar", size: t = "md", type: n = "button", className: r, ...i }, a) {
211
+ return /* @__PURE__ */ v("button", {
212
+ "aria-label": e,
213
+ ...i,
214
+ ref: a,
215
+ type: n,
216
+ "data-size": t,
217
+ className: ["ds-close-button", r].filter(Boolean).join(" "),
218
+ children: /* @__PURE__ */ v("svg", {
219
+ viewBox: "0 0 256 256",
220
+ fill: "currentColor",
221
+ "aria-hidden": "true",
222
+ focusable: "false",
223
+ children: /* @__PURE__ */ v("path", { d: W })
224
+ })
225
+ });
226
+ });
227
+ //#endregion
272
228
  //#region src/components/Dialog.tsx
273
- function ee({ open: e, onOpenChange: t, children: n, ...r }) {
274
- return /* @__PURE__ */ u(E.Root, {
229
+ function te({ open: e, onOpenChange: t, children: n, ...r }) {
230
+ return /* @__PURE__ */ v(N.Root, {
275
231
  ...r,
276
232
  open: e,
277
233
  onOpenChange: t,
278
234
  children: n
279
235
  });
280
236
  }
281
- function te({ children: e, asChild: t }) {
282
- return t ? /* @__PURE__ */ u(E.Trigger, {
237
+ function ne({ children: e, asChild: n }) {
238
+ return n ? /* @__PURE__ */ v(N.Trigger, {
283
239
  asChild: !0,
284
240
  children: e
285
- }) : /* @__PURE__ */ u(E.Trigger, {
286
- className: "ds-button",
287
- "data-variant": "primary",
288
- "data-size": "md",
289
- children: e
241
+ }) : /* @__PURE__ */ v(N.Trigger, {
242
+ asChild: !0,
243
+ children: /* @__PURE__ */ v(t, { children: e })
290
244
  });
291
245
  }
292
- function ne({ children: e, className: t = "", size: n = "md", showClose: r = !0, ...i }) {
293
- return /* @__PURE__ */ d(E.Portal, { children: [/* @__PURE__ */ u(E.Overlay, { className: "ds-modal-overlay" }), /* @__PURE__ */ d(E.Content, {
246
+ function re({ children: e, className: t = "", size: n = "md", showClose: r = !0, ...i }) {
247
+ return /* @__PURE__ */ y(N.Portal, { children: [/* @__PURE__ */ v(N.Overlay, { className: "ds-modal-overlay" }), /* @__PURE__ */ y(N.Content, {
294
248
  ...i,
295
249
  "data-size": n,
296
250
  className: `ds-modal-content ${t}`.trim(),
297
- children: [e, r && /* @__PURE__ */ u(E.Close, {
298
- "aria-label": "Cerrar diálogo",
299
- className: "ds-modal-close",
300
- children: /* @__PURE__ */ u(T, {
301
- size: 18,
302
- "aria-hidden": "true"
251
+ children: [e, r && /* @__PURE__ */ v(N.Close, {
252
+ asChild: !0,
253
+ children: /* @__PURE__ */ v(G, {
254
+ className: "ds-modal-close",
255
+ size: "md",
256
+ label: "Cerrar diálogo"
303
257
  })
304
258
  })]
305
259
  })] });
306
260
  }
307
- function re({ children: e }) {
308
- return /* @__PURE__ */ u("div", {
261
+ function ie({ children: e }) {
262
+ return /* @__PURE__ */ v("div", {
309
263
  className: "ds-modal-header",
310
264
  children: e
311
265
  });
312
266
  }
313
- function ie({ children: e }) {
314
- return /* @__PURE__ */ u(E.Title, {
267
+ function ae({ children: e }) {
268
+ return /* @__PURE__ */ v(N.Title, {
315
269
  className: "ds-modal-title",
316
270
  children: e
317
271
  });
318
272
  }
319
- function ae({ children: e }) {
320
- return /* @__PURE__ */ u(E.Description, {
273
+ function oe({ children: e }) {
274
+ return /* @__PURE__ */ v(N.Description, {
321
275
  className: "ds-modal-description",
322
276
  children: e
323
277
  });
324
278
  }
325
- function oe({ children: e }) {
326
- return /* @__PURE__ */ u("div", {
279
+ function se({ children: e }) {
280
+ return /* @__PURE__ */ v("div", {
327
281
  className: "ds-modal-body",
328
282
  children: e
329
283
  });
330
284
  }
331
- function se({ children: e }) {
332
- return /* @__PURE__ */ u("div", {
285
+ function ce({ children: e }) {
286
+ return /* @__PURE__ */ v("div", {
333
287
  className: "ds-modal-footer",
334
288
  children: e
335
289
  });
336
290
  }
337
- function ce({ children: e }) {
338
- return /* @__PURE__ */ u(E.Close, {
291
+ function le({ children: e }) {
292
+ return /* @__PURE__ */ v(N.Close, {
339
293
  asChild: !0,
340
294
  children: e
341
295
  });
342
296
  }
343
297
  //#endregion
344
298
  //#region src/components/Checkbox.tsx
345
- function le({ checked: e, onCheckedChange: t, disabled: n, label: r, id: i, ...o }) {
346
- let s = a(), c = i ?? s;
347
- return /* @__PURE__ */ d("label", {
348
- htmlFor: c,
299
+ function ue({ checked: e, onCheckedChange: t, disabled: n, label: r, id: i, ...a }) {
300
+ let o = p(), s = i ?? o;
301
+ return /* @__PURE__ */ y("label", {
302
+ htmlFor: s,
349
303
  className: "ds-react-choice",
350
- children: [/* @__PURE__ */ u(D.Root, {
351
- ...o,
352
- id: c,
304
+ children: [/* @__PURE__ */ v(P.Root, {
305
+ ...a,
306
+ id: s,
353
307
  checked: e,
354
308
  onCheckedChange: t,
355
309
  disabled: n,
356
310
  className: "ds-react-checkbox",
357
- children: /* @__PURE__ */ u(D.Indicator, { children: /* @__PURE__ */ u(_, {
311
+ children: /* @__PURE__ */ v(P.Indicator, { children: /* @__PURE__ */ v(w, {
358
312
  size: 14,
359
313
  weight: "bold",
360
314
  "aria-hidden": "true"
361
315
  }) })
362
- }), r && /* @__PURE__ */ u("span", { children: r })]
316
+ }), r && /* @__PURE__ */ v("span", { children: r })]
363
317
  });
364
318
  }
365
319
  //#endregion
366
320
  //#region src/components/RadioGroup.tsx
367
- function ue({ value: e, defaultValue: t, name: n, onValueChange: r, disabled: i, ariaLabel: a, orientation: o = "vertical", children: s }) {
368
- return /* @__PURE__ */ u(O.Root, {
321
+ function de({ value: e, defaultValue: t, name: n, onValueChange: r, disabled: i, ariaLabel: a, orientation: o = "vertical", children: s }) {
322
+ return /* @__PURE__ */ v(F.Root, {
369
323
  value: e,
370
324
  defaultValue: t,
371
325
  name: n,
@@ -377,127 +331,123 @@ function ue({ value: e, defaultValue: t, name: n, onValueChange: r, disabled: i,
377
331
  children: s
378
332
  });
379
333
  }
380
- function de({ value: e, disabled: t, label: n, id: r }) {
381
- let i = a(), o = r ?? i;
382
- return /* @__PURE__ */ d("label", {
383
- htmlFor: o,
334
+ function fe({ value: e, disabled: t, label: n, id: r }) {
335
+ let i = p(), a = r ?? i;
336
+ return /* @__PURE__ */ y("label", {
337
+ htmlFor: a,
384
338
  className: "ds-react-choice",
385
- children: [/* @__PURE__ */ u(O.Item, {
386
- id: o,
339
+ children: [/* @__PURE__ */ v(F.Item, {
340
+ id: a,
387
341
  value: e,
388
342
  disabled: t,
389
343
  className: "ds-react-radio",
390
- children: /* @__PURE__ */ u(O.Indicator, { className: "ds-react-radio-indicator" })
391
- }), n && /* @__PURE__ */ u("span", { children: n })]
344
+ children: /* @__PURE__ */ v(F.Indicator, { className: "ds-react-radio-indicator" })
345
+ }), n && /* @__PURE__ */ v("span", { children: n })]
392
346
  });
393
347
  }
394
348
  //#endregion
395
349
  //#region src/components/Switch.tsx
396
- function fe({ checked: e, onCheckedChange: t, disabled: n, label: r, id: i, ...o }) {
397
- let s = a(), c = i ?? s;
398
- return /* @__PURE__ */ d("label", {
399
- htmlFor: c,
350
+ function pe({ checked: e, onCheckedChange: t, disabled: n, label: r, id: i, ...a }) {
351
+ let o = p(), s = i ?? o;
352
+ return /* @__PURE__ */ y("label", {
353
+ htmlFor: s,
400
354
  className: "ds-react-choice",
401
- children: [/* @__PURE__ */ u(k.Root, {
402
- ...o,
403
- id: c,
355
+ children: [/* @__PURE__ */ v(I.Root, {
356
+ ...a,
357
+ id: s,
404
358
  checked: e,
405
359
  onCheckedChange: t,
406
360
  disabled: n,
407
361
  className: "ds-react-switch",
408
- children: /* @__PURE__ */ u(k.Thumb, { className: "ds-react-switch-thumb" })
409
- }), r && /* @__PURE__ */ u("span", { children: r })]
362
+ children: /* @__PURE__ */ v(I.Thumb, { className: "ds-react-switch-thumb" })
363
+ }), r && /* @__PURE__ */ v("span", { children: r })]
410
364
  });
411
365
  }
412
366
  //#endregion
413
367
  //#region src/components/Alert.tsx
414
- var pe = {
415
- info: /* @__PURE__ */ u(y, { weight: "fill" }),
416
- success: /* @__PURE__ */ u(v, { weight: "fill" }),
417
- warning: /* @__PURE__ */ u(C, { weight: "fill" }),
418
- error: /* @__PURE__ */ u(w, { weight: "fill" })
368
+ var me = {
369
+ info: /* @__PURE__ */ v(E, { weight: "fill" }),
370
+ success: /* @__PURE__ */ v(T, { weight: "fill" }),
371
+ warning: /* @__PURE__ */ v(A, { weight: "fill" }),
372
+ error: /* @__PURE__ */ v(j, { weight: "fill" })
419
373
  };
420
- function me({ variant: e = "info", title: t, description: n, dismissible: r = !1, icon: i, actions: a, onClose: o, children: s }) {
421
- let [l, f] = c(!0);
422
- return l ? /* @__PURE__ */ d("div", {
374
+ function he({ variant: e = "info", title: t, description: n, dismissible: r = !1, icon: i, actions: a, onClose: o, children: s }) {
375
+ let [c, l] = g(!0);
376
+ return c ? /* @__PURE__ */ y("div", {
423
377
  className: "ds-alert",
424
378
  "data-variant": e,
425
379
  role: e === "error" ? "alert" : "status",
426
380
  children: [
427
- /* @__PURE__ */ u("span", {
381
+ /* @__PURE__ */ v("span", {
428
382
  className: "ds-alert-icon",
429
383
  "aria-hidden": "true",
430
- children: i ?? pe[e]
384
+ children: i ?? me[e]
431
385
  }),
432
- /* @__PURE__ */ d("div", {
386
+ /* @__PURE__ */ y("div", {
433
387
  className: "ds-alert-content",
434
388
  children: [
435
- /* @__PURE__ */ u("p", {
389
+ /* @__PURE__ */ v("p", {
436
390
  className: "ds-alert-title",
437
391
  children: t
438
392
  }),
439
- n && /* @__PURE__ */ u("div", {
393
+ n && /* @__PURE__ */ v("div", {
440
394
  className: "ds-alert-description",
441
395
  children: n
442
396
  }),
443
397
  s,
444
- a && /* @__PURE__ */ u("div", {
398
+ a && /* @__PURE__ */ v("div", {
445
399
  className: "ds-alert-actions",
446
400
  children: a
447
401
  })
448
402
  ]
449
403
  }),
450
- r && /* @__PURE__ */ u("button", {
451
- type: "button",
404
+ r && /* @__PURE__ */ v(G, {
452
405
  className: "ds-alert-close",
453
- "aria-label": "Cerrar alerta",
406
+ size: "sm",
407
+ label: "Cerrar alerta",
454
408
  onClick: () => {
455
- f(!1), o?.();
456
- },
457
- children: /* @__PURE__ */ u(T, {
458
- size: 16,
459
- "aria-hidden": "true"
460
- })
409
+ l(!1), o?.();
410
+ }
461
411
  })
462
412
  ]
463
413
  }) : null;
464
414
  }
465
415
  //#endregion
466
416
  //#region src/components/Avatar.tsx
467
- var he = {
417
+ var ge = {
468
418
  online: "En línea",
469
419
  offline: "Desconectado",
470
420
  away: "Ausente",
471
421
  busy: "Ocupado"
472
422
  };
473
- function ge(e) {
423
+ function _e(e) {
474
424
  return (e ?? "").trim().split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e.charAt(0).toUpperCase()).join("") || "?";
475
425
  }
476
- function _e({ src: e, alt: t, size: n = "md", fallback: r, status: i, shape: a = "circle" }) {
477
- let [o, s] = c(), l = !e || o === e, f = [t || r || "Usuario", i ? he[i] : null].filter(Boolean).join(", ");
478
- return /* @__PURE__ */ d("span", {
426
+ function ve({ src: e, alt: t, size: n = "md", fallback: r, status: i, shape: a = "circle" }) {
427
+ let [o, s] = g(), c = !e || o === e, l = [t || r || "Usuario", i ? ge[i] : null].filter(Boolean).join(", ");
428
+ return /* @__PURE__ */ y("span", {
479
429
  className: "ds-avatar",
480
430
  "data-size": n,
481
431
  "data-shape": a,
482
432
  role: "img",
483
- "aria-label": f,
484
- children: [l ? /* @__PURE__ */ u("span", {
433
+ "aria-label": l,
434
+ children: [c ? /* @__PURE__ */ v("span", {
485
435
  className: "ds-avatar-fallback",
486
436
  "aria-hidden": "true",
487
- children: r || ge(t)
488
- }) : /* @__PURE__ */ u("img", {
437
+ children: r || _e(t)
438
+ }) : /* @__PURE__ */ v("img", {
489
439
  src: e,
490
440
  alt: "",
491
441
  onError: () => s(e)
492
- }), i && /* @__PURE__ */ u("span", {
442
+ }), i && /* @__PURE__ */ v("span", {
493
443
  className: "ds-avatar-status",
494
444
  "data-status": i,
495
445
  "aria-hidden": "true"
496
446
  })]
497
447
  });
498
448
  }
499
- function ve({ children: e, label: t }) {
500
- return /* @__PURE__ */ u("span", {
449
+ function ye({ children: e, label: t }) {
450
+ return /* @__PURE__ */ v("span", {
501
451
  className: "ds-avatar-group",
502
452
  role: "group",
503
453
  "aria-label": t,
@@ -506,23 +456,23 @@ function ve({ children: e, label: t }) {
506
456
  }
507
457
  //#endregion
508
458
  //#region src/components/Badge.tsx
509
- function ye({ variant: e = "primary", size: t = "md", dot: n = !1, removable: r = !1, removeLabel: i = "Quitar etiqueta", onRemove: a, children: o }) {
510
- return /* @__PURE__ */ d("span", {
459
+ function be({ variant: e = "primary", size: t = "md", dot: n = !1, removable: r = !1, removeLabel: i = "Quitar etiqueta", onRemove: a, children: o }) {
460
+ return /* @__PURE__ */ y("span", {
511
461
  className: "ds-badge",
512
462
  "data-variant": e,
513
463
  "data-size": t,
514
464
  children: [
515
- n && /* @__PURE__ */ u("span", {
465
+ n && /* @__PURE__ */ v("span", {
516
466
  className: "ds-badge-dot",
517
467
  "aria-hidden": "true"
518
468
  }),
519
469
  o,
520
- r && a && /* @__PURE__ */ u("button", {
470
+ r && a && /* @__PURE__ */ v("button", {
521
471
  type: "button",
522
472
  className: "ds-badge-remove",
523
473
  onClick: a,
524
474
  "aria-label": i,
525
- children: /* @__PURE__ */ u(T, {
475
+ children: /* @__PURE__ */ v(M, {
526
476
  size: 12,
527
477
  weight: "bold",
528
478
  "aria-hidden": "true"
@@ -533,8 +483,8 @@ function ye({ variant: e = "primary", size: t = "md", dot: n = !1, removable: r
533
483
  }
534
484
  //#endregion
535
485
  //#region src/components/Card.tsx
536
- function be({ variant: e = "default", padding: t = "md", selected: n = !1, onClick: r, header: i, title: a, description: o, footer: s, className: c = "", children: l }) {
537
- return /* @__PURE__ */ d("div", {
486
+ function xe({ variant: e = "default", padding: t = "md", selected: n = !1, onClick: r, header: i, title: a, description: o, footer: s, className: c = "", children: l }) {
487
+ return /* @__PURE__ */ y("div", {
538
488
  className: `ds-card ${c}`.trim(),
539
489
  "data-variant": e,
540
490
  "data-padding": t,
@@ -550,25 +500,25 @@ function be({ variant: e = "default", padding: t = "md", selected: n = !1, onCli
550
500
  r && e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r());
551
501
  } : void 0,
552
502
  children: [
553
- i && /* @__PURE__ */ u("div", {
503
+ i && /* @__PURE__ */ v("div", {
554
504
  className: "ds-card-header",
555
505
  children: i
556
506
  }),
557
- (a || o) && /* @__PURE__ */ d("div", {
507
+ (a || o) && /* @__PURE__ */ y("div", {
558
508
  className: "ds-card-header",
559
- children: [a && /* @__PURE__ */ u("h3", {
509
+ children: [a && /* @__PURE__ */ v("h3", {
560
510
  className: "ds-card-title",
561
511
  children: a
562
- }), o && /* @__PURE__ */ u("p", {
512
+ }), o && /* @__PURE__ */ v("p", {
563
513
  className: "ds-card-description",
564
514
  children: o
565
515
  })]
566
516
  }),
567
- l !== void 0 && /* @__PURE__ */ u("div", {
517
+ l !== void 0 && /* @__PURE__ */ v("div", {
568
518
  className: "ds-card-content",
569
519
  children: l
570
520
  }),
571
- s && /* @__PURE__ */ u("div", {
521
+ s && /* @__PURE__ */ v("div", {
572
522
  className: "ds-card-footer",
573
523
  children: s
574
524
  })
@@ -577,59 +527,59 @@ function be({ variant: e = "default", padding: t = "md", selected: n = !1, onCli
577
527
  }
578
528
  //#endregion
579
529
  //#region src/components/Tooltip.tsx
580
- function xe({ content: e, position: t = "top", delay: n = 300, children: r }) {
581
- return /* @__PURE__ */ u(A.Provider, {
530
+ function Se({ content: e, position: t = "top", delay: n = 300, children: r }) {
531
+ return /* @__PURE__ */ v(L.Provider, {
582
532
  delayDuration: n,
583
- children: /* @__PURE__ */ d(A.Root, { children: [/* @__PURE__ */ u(A.Trigger, {
533
+ children: /* @__PURE__ */ y(L.Root, { children: [/* @__PURE__ */ v(L.Trigger, {
584
534
  asChild: !0,
585
535
  children: r
586
- }), /* @__PURE__ */ u(A.Portal, { children: /* @__PURE__ */ d(A.Content, {
536
+ }), /* @__PURE__ */ v(L.Portal, { children: /* @__PURE__ */ y(L.Content, {
587
537
  side: t,
588
538
  sideOffset: 8,
589
539
  className: "ds-tooltip",
590
- children: [e, /* @__PURE__ */ u(A.Arrow, { className: "ds-tooltip-arrow" })]
540
+ children: [e, /* @__PURE__ */ v(L.Arrow, { className: "ds-tooltip-arrow" })]
591
541
  }) })] })
592
542
  });
593
543
  }
594
544
  //#endregion
595
545
  //#region src/components/Loading.tsx
596
- function Se({ variant: e = "spinner", size: t = "md", label: n, progress: r }) {
597
- return e === "spinner" ? /* @__PURE__ */ u(U, {
546
+ function Ce({ variant: e = "spinner", size: t = "md", label: n, progress: r }) {
547
+ return e === "spinner" ? /* @__PURE__ */ v(K, {
598
548
  size: t,
599
549
  label: n,
600
550
  showLabel: !!n
601
- }) : e === "dots" ? /* @__PURE__ */ u("span", {
551
+ }) : e === "dots" ? /* @__PURE__ */ v("span", {
602
552
  className: "ds-loading",
603
553
  role: "status",
604
554
  "aria-label": n || "Cargando",
605
- children: /* @__PURE__ */ d("span", {
555
+ children: /* @__PURE__ */ y("span", {
606
556
  className: "ds-loading-dots",
607
557
  "aria-hidden": "true",
608
558
  children: [
609
- /* @__PURE__ */ u("span", {}),
610
- /* @__PURE__ */ u("span", {}),
611
- /* @__PURE__ */ u("span", {})
559
+ /* @__PURE__ */ v("span", {}),
560
+ /* @__PURE__ */ v("span", {}),
561
+ /* @__PURE__ */ v("span", {})
612
562
  ]
613
563
  })
614
- }) : e === "skeleton" ? /* @__PURE__ */ u(W, { label: n }) : /* @__PURE__ */ u(G, {
564
+ }) : e === "skeleton" ? /* @__PURE__ */ v(q, { label: n }) : /* @__PURE__ */ v(we, {
615
565
  value: r ?? 0,
616
566
  label: n
617
567
  });
618
568
  }
619
- function U({ size: e = "md", label: t = "Cargando", showLabel: n = !1 }) {
620
- return /* @__PURE__ */ d("span", {
569
+ function K({ size: e = "md", label: t = "Cargando", showLabel: n = !1 }) {
570
+ return /* @__PURE__ */ y("span", {
621
571
  className: "ds-loading",
622
572
  role: "status",
623
573
  "aria-label": n ? void 0 : t,
624
- children: [/* @__PURE__ */ u("span", {
574
+ children: [/* @__PURE__ */ v("span", {
625
575
  className: "ds-spinner",
626
576
  "data-size": e,
627
577
  "aria-hidden": "true"
628
- }), n && /* @__PURE__ */ u("span", { children: t })]
578
+ }), n && /* @__PURE__ */ v("span", { children: t })]
629
579
  });
630
580
  }
631
- function W({ lines: e = 3, avatar: t = !1, label: n = "Cargando contenido" }) {
632
- return /* @__PURE__ */ d("div", {
581
+ function q({ lines: e = 3, avatar: t = !1, label: n = "Cargando contenido" }) {
582
+ return /* @__PURE__ */ y("div", {
633
583
  role: "status",
634
584
  "aria-label": n,
635
585
  style: t ? {
@@ -637,19 +587,19 @@ function W({ lines: e = 3, avatar: t = !1, label: n = "Cargando contenido" }) {
637
587
  gap: 12,
638
588
  alignItems: "flex-start"
639
589
  } : void 0,
640
- children: [t && /* @__PURE__ */ u("span", {
590
+ children: [t && /* @__PURE__ */ v("span", {
641
591
  className: "ds-skeleton-circle",
642
592
  "aria-hidden": "true"
643
- }), /* @__PURE__ */ u("span", {
593
+ }), /* @__PURE__ */ v("span", {
644
594
  className: "ds-skeleton",
645
595
  "aria-hidden": "true",
646
- children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ u("span", {}, t))
596
+ children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ v("span", {}, t))
647
597
  })]
648
598
  });
649
599
  }
650
- function G({ value: e = 0, max: t = 100, label: n, showValue: r = !0, size: i = "md", variant: a = "primary", indeterminate: o = !1 }) {
600
+ function we({ value: e = 0, max: t = 100, label: n, showValue: r = !0, size: i = "md", variant: a = "primary", indeterminate: o = !1 }) {
651
601
  let s = t > 0 ? t : 100, c = Math.round(Math.min(100, Math.max(0, (Number.isFinite(e) ? e : 0) / s * 100)));
652
- return /* @__PURE__ */ d("div", {
602
+ return /* @__PURE__ */ y("div", {
653
603
  className: "ds-progress",
654
604
  "data-size": i,
655
605
  "data-variant": a,
@@ -659,13 +609,13 @@ function G({ value: e = 0, max: t = 100, label: n, showValue: r = !0, size: i =
659
609
  "aria-valuemin": 0,
660
610
  "aria-valuemax": 100,
661
611
  "aria-valuenow": o ? void 0 : c,
662
- children: [n && /* @__PURE__ */ d("span", {
612
+ children: [n && /* @__PURE__ */ y("span", {
663
613
  className: "ds-progress-header",
664
- children: [/* @__PURE__ */ u("span", { children: n }), r && !o && /* @__PURE__ */ d("span", { children: [c, "%"] })]
665
- }), /* @__PURE__ */ u("span", {
614
+ children: [/* @__PURE__ */ v("span", { children: n }), r && !o && /* @__PURE__ */ y("span", { children: [c, "%"] })]
615
+ }), /* @__PURE__ */ v("span", {
666
616
  className: "ds-progress-track",
667
617
  "aria-hidden": "true",
668
- children: /* @__PURE__ */ u("span", {
618
+ children: /* @__PURE__ */ v("span", {
669
619
  className: "ds-progress-value",
670
620
  style: { width: `${c}%` }
671
621
  })
@@ -674,25 +624,25 @@ function G({ value: e = 0, max: t = 100, label: n, showValue: r = !0, size: i =
674
624
  }
675
625
  //#endregion
676
626
  //#region src/components/EmptyState.tsx
677
- var Ce = {
678
- default: /* @__PURE__ */ u(x, {}),
679
- "no-data": /* @__PURE__ */ u(S, {}),
680
- error: /* @__PURE__ */ u(w, {}),
681
- "no-results": /* @__PURE__ */ u(b, {})
627
+ var Te = {
628
+ default: /* @__PURE__ */ v(O, {}),
629
+ "no-data": /* @__PURE__ */ v(k, {}),
630
+ error: /* @__PURE__ */ v(j, {}),
631
+ "no-results": /* @__PURE__ */ v(D, {})
682
632
  };
683
- function we({ variant: e = "default", title: t, description: n, action: r, icon: i }) {
684
- return /* @__PURE__ */ d("div", {
633
+ function Ee({ variant: e = "default", title: t, description: n, action: r, icon: i }) {
634
+ return /* @__PURE__ */ y("div", {
685
635
  className: "ds-empty-state",
686
636
  "data-variant": e,
687
637
  children: [
688
- /* @__PURE__ */ u("div", {
638
+ /* @__PURE__ */ v("div", {
689
639
  className: "ds-empty-state-icon",
690
640
  "aria-hidden": "true",
691
- children: i ?? Ce[e]
641
+ children: i ?? Te[e]
692
642
  }),
693
- /* @__PURE__ */ u("h3", { children: t }),
694
- n && /* @__PURE__ */ u("p", { children: n }),
695
- r && /* @__PURE__ */ u("div", {
643
+ /* @__PURE__ */ v("h3", { children: t }),
644
+ n && /* @__PURE__ */ v("p", { children: n }),
645
+ r && /* @__PURE__ */ v("div", {
696
646
  className: "ds-empty-state-action",
697
647
  children: r
698
648
  })
@@ -701,32 +651,32 @@ function we({ variant: e = "default", title: t, description: n, action: r, icon:
701
651
  }
702
652
  //#endregion
703
653
  //#region src/components/BottomSheet.tsx
704
- function Te({ isOpen: e, onClose: t, title: n, children: r }) {
705
- return /* @__PURE__ */ u(E.Root, {
654
+ function De({ isOpen: e, onClose: t, title: n, children: r }) {
655
+ return /* @__PURE__ */ v(N.Root, {
706
656
  open: e,
707
657
  onOpenChange: (e) => {
708
658
  e || t();
709
659
  },
710
- children: /* @__PURE__ */ d(E.Portal, { children: [/* @__PURE__ */ u(E.Overlay, { className: "ds-sheet-overlay" }), /* @__PURE__ */ d(E.Content, {
660
+ children: /* @__PURE__ */ y(N.Portal, { children: [/* @__PURE__ */ v(N.Overlay, { className: "ds-sheet-overlay" }), /* @__PURE__ */ y(N.Content, {
711
661
  className: "ds-sheet",
712
662
  "aria-describedby": void 0,
713
663
  children: [
714
- /* @__PURE__ */ u("div", {
664
+ /* @__PURE__ */ v("div", {
715
665
  className: "ds-sheet-handle",
716
666
  "aria-hidden": "true"
717
667
  }),
718
- /* @__PURE__ */ d("header", {
668
+ /* @__PURE__ */ y("header", {
719
669
  className: "ds-sheet-header",
720
- children: [/* @__PURE__ */ u(E.Title, { children: n ?? "Información" }), /* @__PURE__ */ u(E.Close, {
721
- "aria-label": "Cerrar panel",
722
- className: "ds-sheet-close",
723
- children: /* @__PURE__ */ u(T, {
724
- size: 20,
725
- "aria-hidden": "true"
670
+ children: [/* @__PURE__ */ v(N.Title, { children: n ?? "Información" }), /* @__PURE__ */ v(N.Close, {
671
+ asChild: !0,
672
+ children: /* @__PURE__ */ v(G, {
673
+ className: "ds-sheet-close",
674
+ size: "lg",
675
+ label: "Cerrar panel"
726
676
  })
727
677
  })]
728
678
  }),
729
- /* @__PURE__ */ u("div", {
679
+ /* @__PURE__ */ v("div", {
730
680
  className: "ds-sheet-body",
731
681
  children: r
732
682
  })
@@ -736,30 +686,30 @@ function Te({ isOpen: e, onClose: t, title: n, children: r }) {
736
686
  }
737
687
  //#endregion
738
688
  //#region src/components/Dropdown.tsx
739
- function Ee({ trigger: e, items: t, onSelect: n, label: r, align: i = "start" }) {
740
- return /* @__PURE__ */ d(j.Root, { children: [/* @__PURE__ */ u(j.Trigger, {
689
+ function Oe({ trigger: e, items: t, onSelect: n, label: r, align: i = "start" }) {
690
+ return /* @__PURE__ */ y(R.Root, { children: [/* @__PURE__ */ v(R.Trigger, {
741
691
  asChild: !0,
742
692
  children: e
743
- }), /* @__PURE__ */ u(j.Portal, { children: /* @__PURE__ */ d(j.Content, {
693
+ }), /* @__PURE__ */ v(R.Portal, { children: /* @__PURE__ */ y(R.Content, {
744
694
  sideOffset: 6,
745
695
  align: i,
746
696
  className: "ds-dropdown",
747
- children: [r && /* @__PURE__ */ u(j.Label, {
697
+ children: [r && /* @__PURE__ */ v(R.Label, {
748
698
  className: "ds-dropdown-label",
749
699
  children: r
750
- }), t.map((e) => e.divider ? /* @__PURE__ */ u(j.Separator, { className: "ds-dropdown-separator" }, e.id) : /* @__PURE__ */ d(j.Item, {
700
+ }), t.map((e) => e.divider ? /* @__PURE__ */ v(R.Separator, { className: "ds-dropdown-separator" }, e.id) : /* @__PURE__ */ y(R.Item, {
751
701
  disabled: e.disabled,
752
702
  onSelect: () => n(e.id),
753
703
  className: "ds-dropdown-item",
754
704
  "data-variant": e.danger ? "danger" : void 0,
755
705
  children: [
756
- e.icon && /* @__PURE__ */ u("span", {
706
+ e.icon && /* @__PURE__ */ v("span", {
757
707
  className: "ds-dropdown-item-icon",
758
708
  "aria-hidden": "true",
759
709
  children: e.icon
760
710
  }),
761
711
  e.label,
762
- e.shortcut && /* @__PURE__ */ u("span", {
712
+ e.shortcut && /* @__PURE__ */ v("span", {
763
713
  className: "ds-dropdown-shortcut",
764
714
  children: e.shortcut
765
715
  })
@@ -769,102 +719,96 @@ function Ee({ trigger: e, items: t, onSelect: n, label: r, align: i = "start" })
769
719
  }
770
720
  //#endregion
771
721
  //#region src/components/TextField.tsx
772
- var K = t(function({ label: e, supportingText: t, error: n = !1, disabled: r = !1, size: i = "md", leftIcon: o, rightIcon: s, onChange: c, id: l, type: f = "text", required: p, "aria-describedby": m, ...h }, g) {
773
- let _ = a(), v = l ?? _, y = `${v}-hint`;
774
- return /* @__PURE__ */ d("div", {
722
+ var J = l(function({ label: e, supportingText: t, error: n = !1, disabled: r = !1, size: i = "md", leftIcon: o, rightIcon: s, onChange: c, id: l, type: u = "text", required: d, "aria-describedby": f, ...m }, h) {
723
+ let g = p(), _ = l ?? g, b = `${_}-hint`;
724
+ return /* @__PURE__ */ y("div", {
775
725
  className: "ds-input",
776
726
  "data-error": n,
777
727
  "data-disabled": r,
778
728
  "data-size": i,
779
729
  children: [
780
- e && /* @__PURE__ */ d("label", {
781
- htmlFor: v,
782
- children: [e, p && /* @__PURE__ */ u("span", {
783
- className: "ds-input-required",
784
- "aria-hidden": "true",
785
- children: "*"
786
- })]
730
+ e && /* @__PURE__ */ v(a, {
731
+ htmlFor: _,
732
+ required: d,
733
+ children: e
787
734
  }),
788
- /* @__PURE__ */ d("div", {
735
+ /* @__PURE__ */ y("div", {
789
736
  className: "ds-input-shell",
790
737
  children: [
791
- o && /* @__PURE__ */ u("span", {
738
+ o && /* @__PURE__ */ v("span", {
792
739
  "aria-hidden": "true",
793
740
  children: o
794
741
  }),
795
- /* @__PURE__ */ u("input", {
796
- ...h,
797
- ref: g,
798
- id: v,
799
- type: f,
742
+ /* @__PURE__ */ v("input", {
743
+ ...m,
744
+ ref: h,
745
+ id: _,
746
+ type: u,
800
747
  disabled: r,
801
- required: p,
748
+ required: d,
802
749
  "aria-invalid": n || void 0,
803
- "aria-describedby": [m, t ? y : null].filter(Boolean).join(" ") || void 0,
750
+ "aria-describedby": [f, t ? b : null].filter(Boolean).join(" ") || void 0,
804
751
  onChange: (e) => c?.(e.target.value)
805
752
  }),
806
- s && /* @__PURE__ */ u("span", {
753
+ s && /* @__PURE__ */ v("span", {
807
754
  "aria-hidden": "true",
808
755
  children: s
809
756
  })
810
757
  ]
811
758
  }),
812
- t && /* @__PURE__ */ u("small", {
813
- id: y,
759
+ t && /* @__PURE__ */ v("small", {
760
+ id: b,
814
761
  children: t
815
762
  })
816
763
  ]
817
764
  });
818
- }), De = t(function({ label: e, supportingText: t, error: n = !1, disabled: r = !1, showCount: i = !1, onChange: o, id: s, rows: l = 4, value: f, defaultValue: p, maxLength: m, required: h, "aria-describedby": g, ..._ }, v) {
819
- let y = a(), b = s ?? y, x = `${b}-hint`, [S, C] = c(String(p ?? "")), w = String(f ?? S).length;
820
- return /* @__PURE__ */ d("div", {
765
+ }), ke = l(function({ label: e, supportingText: t, error: n = !1, disabled: r = !1, showCount: i = !1, onChange: o, id: s, rows: c = 4, value: l, defaultValue: u, maxLength: d, required: f, "aria-describedby": m, ...h }, _) {
766
+ let b = p(), x = s ?? b, S = `${x}-hint`, [C, w] = g(String(u ?? "")), T = String(l ?? C).length;
767
+ return /* @__PURE__ */ y("div", {
821
768
  className: "ds-input",
822
769
  "data-multiline": "true",
823
770
  "data-error": n,
824
771
  "data-disabled": r,
825
772
  children: [
826
- e && /* @__PURE__ */ d("label", {
827
- htmlFor: b,
828
- children: [e, h && /* @__PURE__ */ u("span", {
829
- className: "ds-input-required",
830
- "aria-hidden": "true",
831
- children: "*"
832
- })]
773
+ e && /* @__PURE__ */ v(a, {
774
+ htmlFor: x,
775
+ required: f,
776
+ children: e
833
777
  }),
834
- /* @__PURE__ */ u("div", {
778
+ /* @__PURE__ */ v("div", {
835
779
  className: "ds-input-shell",
836
- children: /* @__PURE__ */ u("textarea", {
837
- ..._,
838
- ref: v,
839
- id: b,
840
- rows: l,
780
+ children: /* @__PURE__ */ v("textarea", {
781
+ ...h,
782
+ ref: _,
783
+ id: x,
784
+ rows: c,
841
785
  disabled: r,
842
- required: h,
843
- value: f,
844
- defaultValue: p,
845
- maxLength: m,
786
+ required: f,
787
+ value: l,
788
+ defaultValue: u,
789
+ maxLength: d,
846
790
  "aria-invalid": n || void 0,
847
- "aria-describedby": [g, t ? x : null].filter(Boolean).join(" ") || void 0,
791
+ "aria-describedby": [m, t ? S : null].filter(Boolean).join(" ") || void 0,
848
792
  onChange: (e) => {
849
- C(e.target.value), o?.(e.target.value);
793
+ w(e.target.value), o?.(e.target.value);
850
794
  }
851
795
  })
852
796
  }),
853
- (t || i && m) && /* @__PURE__ */ d("span", {
797
+ (t || i && d) && /* @__PURE__ */ y("span", {
854
798
  style: {
855
799
  display: "flex",
856
800
  gap: 12,
857
801
  justifyContent: "space-between"
858
802
  },
859
- children: [t ? /* @__PURE__ */ u("small", {
860
- id: x,
803
+ children: [t ? /* @__PURE__ */ v("small", {
804
+ id: S,
861
805
  children: t
862
- }) : /* @__PURE__ */ u("span", {}), i && m && /* @__PURE__ */ d("span", {
806
+ }) : /* @__PURE__ */ v("span", {}), i && d && /* @__PURE__ */ y("span", {
863
807
  className: "ds-input-counter",
864
808
  children: [
865
- w,
809
+ T,
866
810
  "/",
867
- m
811
+ d
868
812
  ]
869
813
  })]
870
814
  })
@@ -873,30 +817,30 @@ var K = t(function({ label: e, supportingText: t, error: n = !1, disabled: r = !
873
817
  });
874
818
  //#endregion
875
819
  //#region src/core/dates.ts
876
- function q(e) {
820
+ function Y(e) {
877
821
  return e instanceof Date && Number.isFinite(e.getTime());
878
822
  }
879
- function J(e) {
823
+ function X(e) {
880
824
  return `${e.getFullYear().toString().padStart(4, "0")}-${(e.getMonth() + 1).toString().padStart(2, "0")}-${e.getDate().toString().padStart(2, "0")}`;
881
825
  }
882
- function Oe(e) {
826
+ function Ae(e) {
883
827
  let t = new Date(e.getFullYear(), e.getMonth(), 1), n = (t.getDay() + 6) % 7;
884
828
  return Array.from({ length: 42 }, (e, r) => new Date(t.getFullYear(), t.getMonth(), 1 - n + r));
885
829
  }
886
- function Y(e, t) {
830
+ function Z(e, t) {
887
831
  return new Date(e.getFullYear(), e.getMonth(), e.getDate() + t);
888
832
  }
889
- function X(e, t) {
833
+ function Q(e, t) {
890
834
  let n = new Date(e.getFullYear(), e.getMonth() + t, 1), r = new Date(n.getFullYear(), n.getMonth() + 1, 0).getDate();
891
835
  return new Date(n.getFullYear(), n.getMonth(), Math.min(e.getDate(), r));
892
836
  }
893
- function Z(e, t, n) {
894
- let r = J(e);
895
- return (!q(t) || r >= J(t)) && (!q(n) || r <= J(n));
837
+ function je(e, t, n) {
838
+ let r = X(e);
839
+ return (!Y(t) || r >= X(t)) && (!Y(n) || r <= X(n));
896
840
  }
897
841
  //#endregion
898
842
  //#region src/components/DatePicker.tsx
899
- var ke = [
843
+ var Me = [
900
844
  "Lunes",
901
845
  "Martes",
902
846
  "Miércoles",
@@ -905,141 +849,143 @@ var ke = [
905
849
  "Sábado",
906
850
  "Domingo"
907
851
  ];
908
- function Ae({ value: e, defaultValue: t, onChange: r, placeholder: o = "Seleccionar fecha", disabled: l = !1, format: f = "dd/MM/yyyy", name: p, id: m, label: h, min: g, max: _ }) {
909
- let [v, y] = c(t), b = e ?? v, [x, S] = c(!1), [C, w] = c(() => q(b) ? b : /* @__PURE__ */ new Date()), [T, D] = c({
852
+ function Ne({ value: e, defaultValue: n, onChange: r, placeholder: i = "Seleccionar fecha", disabled: a = !1, format: o = "dd/MM/yyyy", name: s, id: c, label: l, min: d, max: m }) {
853
+ let [_, b] = g(n), x = e ?? _, [S, C] = g(!1), [w, T] = g(() => Y(x) ? x : /* @__PURE__ */ new Date()), [E, D] = g({
910
854
  left: 8,
911
855
  top: 8
912
- }), O = s(null), k = s(null), A = s(!1), j = a(), M = m ?? j, N = `${M}-calendar`, P = n(() => {
856
+ }), O = h(null), k = h(null), A = h(!1), j = p(), M = c ?? j, P = `${M}-calendar`, F = u(() => {
913
857
  let e = O.current?.getBoundingClientRect();
914
858
  e && D({
915
859
  left: Math.max(8, Math.min(e.left, window.innerWidth - 318)),
916
860
  top: Math.max(8, e.bottom + 360 < window.innerHeight ? e.bottom + 4 : e.top - 360)
917
861
  });
918
862
  }, []);
919
- i(() => {
920
- if (x) return window.addEventListener("resize", P), window.addEventListener("scroll", P, !0), () => {
921
- window.removeEventListener("resize", P), window.removeEventListener("scroll", P, !0);
863
+ f(() => {
864
+ if (S) return window.addEventListener("resize", F), window.addEventListener("scroll", F, !0), () => {
865
+ window.removeEventListener("resize", F), window.removeEventListener("scroll", F, !0);
922
866
  };
923
- }, [x, P]), i(() => {
924
- x && A.current && (k.current?.querySelector("[data-calendar-focus=\"true\"]")?.focus(), A.current = !1);
925
- }, [C, x]);
926
- function F(e) {
927
- return q(g) && J(e) < J(g) ? new Date(g.getFullYear(), g.getMonth(), g.getDate()) : q(_) && J(e) > J(_) ? new Date(_.getFullYear(), _.getMonth(), _.getDate()) : e;
867
+ }, [S, F]), f(() => {
868
+ S && A.current && (k.current?.querySelector("[data-calendar-focus=\"true\"]")?.focus(), A.current = !1);
869
+ }, [w, S]);
870
+ function I(e) {
871
+ return Y(d) && X(e) < X(d) ? new Date(d.getFullYear(), d.getMonth(), d.getDate()) : Y(m) && X(e) > X(m) ? new Date(m.getFullYear(), m.getMonth(), m.getDate()) : e;
928
872
  }
929
- let I = C.toLocaleDateString("es-PE", {
873
+ let L = w.toLocaleDateString("es-PE", {
930
874
  month: "long",
931
875
  year: "numeric"
932
- }), L = q(b) ? f === "yyyy-MM-dd" ? J(b) : `${String(b.getDate()).padStart(2, "0")}/${String(b.getMonth() + 1).padStart(2, "0")}/${b.getFullYear()}` : "", R = Oe(C), z = J(/* @__PURE__ */ new Date()), B = !q(g) || J(new Date(C.getFullYear(), C.getMonth(), 0)) >= J(g), V = !q(_) || J(new Date(C.getFullYear(), C.getMonth() + 1, 1)) <= J(_);
933
- function H(t) {
934
- !l && Z(t, g, _) && (e === void 0 && y(t), r?.(t), S(!1));
876
+ }), R = Y(x) ? o === "yyyy-MM-dd" ? X(x) : `${String(x.getDate()).padStart(2, "0")}/${String(x.getMonth() + 1).padStart(2, "0")}/${x.getFullYear()}` : "", z = Ae(w), B = X(/* @__PURE__ */ new Date()), V = !Y(d) || X(new Date(w.getFullYear(), w.getMonth(), 0)) >= X(d), H = !Y(m) || X(new Date(w.getFullYear(), w.getMonth() + 1, 1)) <= X(m);
877
+ function U(t) {
878
+ !a && je(t, d, m) && (e === void 0 && b(t), r?.(t), C(!1));
935
879
  }
936
- return /* @__PURE__ */ d("div", {
880
+ return /* @__PURE__ */ y("div", {
937
881
  className: "ds-date-field",
938
882
  children: [
939
- h && /* @__PURE__ */ u("label", {
883
+ l && /* @__PURE__ */ v("label", {
940
884
  htmlFor: M,
941
- children: h
885
+ children: l
942
886
  }),
943
- p && /* @__PURE__ */ u("input", {
887
+ s && /* @__PURE__ */ v("input", {
944
888
  type: "hidden",
945
- name: p,
946
- value: q(b) ? J(b) : "",
947
- disabled: l
889
+ name: s,
890
+ value: Y(x) ? X(x) : "",
891
+ disabled: a
948
892
  }),
949
- /* @__PURE__ */ d(E.Root, {
893
+ /* @__PURE__ */ y(N.Root, {
950
894
  modal: !1,
951
- open: x,
895
+ open: S,
952
896
  onOpenChange: (e) => {
953
- e && l || (e && (w(F(q(b) ? b : /* @__PURE__ */ new Date())), P()), S(e));
897
+ e && a || (e && (T(I(Y(x) ? x : /* @__PURE__ */ new Date())), F()), C(e));
954
898
  },
955
- children: [/* @__PURE__ */ u(E.Trigger, {
899
+ children: [/* @__PURE__ */ v(N.Trigger, {
956
900
  asChild: !0,
957
- children: /* @__PURE__ */ u("button", {
901
+ children: /* @__PURE__ */ v("button", {
958
902
  ref: O,
959
903
  id: M,
960
904
  type: "button",
961
- disabled: l,
962
- "aria-label": `${h ?? o}${L ? ": " + L : ""}`,
905
+ disabled: a,
906
+ "aria-label": `${l ?? i}${R ? ": " + R : ""}`,
963
907
  className: "ds-date-trigger",
964
- children: L || o
908
+ children: R || i
965
909
  })
966
- }), /* @__PURE__ */ u(E.Portal, { children: /* @__PURE__ */ d(E.Content, {
910
+ }), /* @__PURE__ */ v(N.Portal, { children: /* @__PURE__ */ y(N.Content, {
967
911
  ref: k,
968
912
  className: "ds-calendar",
969
- style: T,
970
- "aria-labelledby": N,
913
+ style: E,
914
+ "aria-labelledby": P,
971
915
  "aria-describedby": void 0,
972
916
  onOpenAutoFocus: (e) => {
973
917
  e.preventDefault(), k.current?.querySelector("[data-calendar-focus=\"true\"]")?.focus();
974
918
  },
975
919
  children: [
976
- /* @__PURE__ */ d("header", {
920
+ /* @__PURE__ */ y("header", {
977
921
  className: "ds-calendar-header",
978
922
  children: [
979
- /* @__PURE__ */ u("button", {
923
+ /* @__PURE__ */ v("button", {
980
924
  type: "button",
981
- disabled: l || !B,
925
+ disabled: a || !V,
982
926
  "aria-label": "Mes anterior",
983
- onClick: () => w(F(X(C, -1))),
927
+ onClick: () => T(I(Q(w, -1))),
984
928
  children: "‹"
985
929
  }),
986
- /* @__PURE__ */ u(E.Title, {
987
- id: N,
930
+ /* @__PURE__ */ v(N.Title, {
931
+ id: P,
988
932
  "aria-live": "polite",
989
- children: I
933
+ children: L
990
934
  }),
991
- /* @__PURE__ */ u("button", {
935
+ /* @__PURE__ */ v("button", {
992
936
  type: "button",
993
- disabled: l || !V,
937
+ disabled: a || !H,
994
938
  "aria-label": "Mes siguiente",
995
- onClick: () => w(F(X(C, 1))),
939
+ onClick: () => T(I(Q(w, 1))),
996
940
  children: "›"
997
941
  })
998
942
  ]
999
943
  }),
1000
- /* @__PURE__ */ d("table", {
944
+ /* @__PURE__ */ y("table", {
1001
945
  role: "grid",
1002
- "aria-labelledby": N,
946
+ "aria-labelledby": P,
1003
947
  className: "ds-calendar-grid",
1004
948
  onKeyDown: (e) => {
1005
949
  let t;
1006
- e.key === "ArrowRight" && (t = Y(C, 1)), e.key === "ArrowLeft" && (t = Y(C, -1)), e.key === "ArrowDown" && (t = Y(C, 7)), e.key === "ArrowUp" && (t = Y(C, -7)), e.key === "Home" && (t = Y(C, -((C.getDay() + 6) % 7))), e.key === "End" && (t = Y(C, 6 - (C.getDay() + 6) % 7)), e.key === "PageUp" && (t = X(C, e.shiftKey ? -12 : -1)), e.key === "PageDown" && (t = X(C, e.shiftKey ? 12 : 1)), t && (e.preventDefault(), A.current = !0, w(F(t)));
950
+ e.key === "ArrowRight" && (t = Z(w, 1)), e.key === "ArrowLeft" && (t = Z(w, -1)), e.key === "ArrowDown" && (t = Z(w, 7)), e.key === "ArrowUp" && (t = Z(w, -7)), e.key === "Home" && (t = Z(w, -((w.getDay() + 6) % 7))), e.key === "End" && (t = Z(w, 6 - (w.getDay() + 6) % 7)), e.key === "PageUp" && (t = Q(w, e.shiftKey ? -12 : -1)), e.key === "PageDown" && (t = Q(w, e.shiftKey ? 12 : 1)), t && (e.preventDefault(), A.current = !0, T(I(t)));
1007
951
  },
1008
- children: [/* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: ke.map((e) => /* @__PURE__ */ u("th", {
952
+ children: [/* @__PURE__ */ v("thead", { children: /* @__PURE__ */ v("tr", { children: Me.map((e) => /* @__PURE__ */ v("th", {
1009
953
  scope: "col",
1010
- children: /* @__PURE__ */ u("abbr", {
954
+ children: /* @__PURE__ */ v("abbr", {
1011
955
  title: e,
1012
956
  children: e.slice(0, 2)
1013
957
  })
1014
- }, e)) }) }), /* @__PURE__ */ u("tbody", { children: Array.from({ length: 6 }, (e, t) => /* @__PURE__ */ u("tr", { children: R.slice(t * 7, t * 7 + 7).map((e) => {
1015
- let t = J(e), n = t === J(C), r = q(b) && t === J(b);
1016
- return /* @__PURE__ */ u("td", {
958
+ }, e)) }) }), /* @__PURE__ */ v("tbody", { children: Array.from({ length: 6 }, (e, t) => /* @__PURE__ */ v("tr", { children: z.slice(t * 7, t * 7 + 7).map((e) => {
959
+ let t = X(e), n = t === X(w), r = Y(x) && t === X(x);
960
+ return /* @__PURE__ */ v("td", {
1017
961
  "aria-selected": r,
1018
- children: /* @__PURE__ */ u("button", {
962
+ children: /* @__PURE__ */ v("button", {
1019
963
  type: "button",
1020
964
  className: "ds-calendar-day",
1021
- "data-other-month": e.getMonth() !== C.getMonth(),
965
+ "data-other-month": e.getMonth() !== w.getMonth(),
1022
966
  "data-selected": r,
1023
967
  "data-calendar-focus": n,
1024
968
  tabIndex: n ? 0 : -1,
1025
- disabled: l || !Z(e, g, _),
969
+ disabled: a || !je(e, d, m),
1026
970
  "aria-label": e.toLocaleDateString("es-PE", {
1027
971
  weekday: "long",
1028
972
  day: "numeric",
1029
973
  month: "long",
1030
974
  year: "numeric"
1031
975
  }),
1032
- "aria-current": t === z ? "date" : void 0,
1033
- onClick: () => H(e),
976
+ "aria-current": t === B ? "date" : void 0,
977
+ onClick: () => U(e),
1034
978
  children: e.getDate()
1035
979
  })
1036
980
  }, t);
1037
981
  }) }, t)) })]
1038
982
  }),
1039
- /* @__PURE__ */ u(E.Close, {
1040
- className: "ds-button",
1041
- "aria-label": "Cerrar calendario",
1042
- children: "Cerrar"
983
+ /* @__PURE__ */ v(N.Close, {
984
+ asChild: !0,
985
+ children: /* @__PURE__ */ v(t, {
986
+ "aria-label": "Cerrar calendario",
987
+ children: "Cerrar"
988
+ })
1043
989
  })
1044
990
  ]
1045
991
  }) })]
@@ -1049,45 +995,49 @@ function Ae({ value: e, defaultValue: t, onChange: r, placeholder: o = "Seleccio
1049
995
  }
1050
996
  //#endregion
1051
997
  //#region src/components/Accordion.tsx
1052
- function je({ variant: e = "default", children: t }) {
1053
- return /* @__PURE__ */ u("div", {
998
+ function Pe({ variant: e = "default", children: t }) {
999
+ return /* @__PURE__ */ v("div", {
1054
1000
  className: "ds-accordion",
1055
1001
  "data-variant": e,
1056
1002
  children: t
1057
1003
  });
1058
1004
  }
1059
- function Me({ title: e, defaultOpen: t = !1, disabled: n = !1, name: r, children: i }) {
1060
- return /* @__PURE__ */ d("details", {
1005
+ function Fe({ title: e, defaultOpen: t = !1, disabled: n = !1, name: r, onOpenChange: i, children: a }) {
1006
+ return /* @__PURE__ */ y("details", {
1061
1007
  className: "ds-accordion-item",
1062
1008
  open: t || void 0,
1063
1009
  "aria-disabled": n || void 0,
1064
1010
  ...r ? { name: r } : {},
1065
1011
  onToggle: (e) => {
1066
- n && e.currentTarget.open && (e.currentTarget.open = !1);
1012
+ if (n && e.currentTarget.open) {
1013
+ e.currentTarget.open = !1;
1014
+ return;
1015
+ }
1016
+ i?.(e.currentTarget.open);
1067
1017
  },
1068
- children: [/* @__PURE__ */ u("summary", {
1018
+ children: [/* @__PURE__ */ v("summary", {
1069
1019
  className: "ds-accordion-trigger",
1070
1020
  tabIndex: n ? -1 : void 0,
1071
1021
  children: e
1072
- }), /* @__PURE__ */ u("div", {
1022
+ }), /* @__PURE__ */ v("div", {
1073
1023
  className: "ds-accordion-content",
1074
- children: i
1024
+ children: a
1075
1025
  })]
1076
1026
  });
1077
1027
  }
1078
1028
  //#endregion
1079
1029
  //#region src/components/Breadcrumb.tsx
1080
- function Ne({ items: e, separator: t = "chevron", label: n = "Ruta de navegación", renderLink: r }) {
1081
- return /* @__PURE__ */ u("nav", {
1030
+ function Ie({ items: e, separator: t = "chevron", label: n = "Ruta de navegación", renderLink: r }) {
1031
+ return /* @__PURE__ */ v("nav", {
1082
1032
  className: "ds-breadcrumb",
1083
1033
  "aria-label": n,
1084
1034
  "data-separator": t,
1085
- children: /* @__PURE__ */ u("ol", { children: e.map((t, n) => {
1035
+ children: /* @__PURE__ */ v("ol", { children: e.map((t, n) => {
1086
1036
  let i = n === e.length - 1;
1087
- return /* @__PURE__ */ u("li", { children: i || !t.href ? /* @__PURE__ */ u("span", {
1037
+ return /* @__PURE__ */ v("li", { children: i || !t.href ? /* @__PURE__ */ v("span", {
1088
1038
  "aria-current": i ? "page" : void 0,
1089
1039
  children: t.label
1090
- }) : r ? r(t) : /* @__PURE__ */ u("a", {
1040
+ }) : r ? r(t) : /* @__PURE__ */ v("a", {
1091
1041
  href: t.href,
1092
1042
  onClick: t.onClick,
1093
1043
  children: t.label
@@ -1097,7 +1047,7 @@ function Ne({ items: e, separator: t = "chevron", label: n = "Ruta de navegació
1097
1047
  }
1098
1048
  //#endregion
1099
1049
  //#region src/core/pagination.ts
1100
- function Q(e, t, n = 1) {
1050
+ function Le(e, t, n = 1) {
1101
1051
  let r = Math.max(1, Math.floor(t)), i = Math.min(Math.max(1, Math.floor(e)), r), a = 3 + n * 2;
1102
1052
  if (r <= a + 2) return Array.from({ length: r }, (e, t) => t + 1);
1103
1053
  let o = Math.max(i - n, 1), s = Math.min(i + n, r);
@@ -1119,45 +1069,45 @@ function Q(e, t, n = 1) {
1119
1069
  }
1120
1070
  //#endregion
1121
1071
  //#region src/components/Pagination.tsx
1122
- function Pe({ page: e, totalPages: t, onPageChange: n, siblings: r = 1, variant: i = "default", label: a = "Paginación" }) {
1072
+ function Re({ page: e, totalPages: t, onPageChange: n, siblings: r = 1, variant: i = "default", label: a = "Paginación" }) {
1123
1073
  let o = Math.max(1, t), s = (t) => {
1124
1074
  t >= 1 && t <= o && t !== e && n(t);
1125
1075
  };
1126
- return /* @__PURE__ */ u("nav", {
1076
+ return /* @__PURE__ */ v("nav", {
1127
1077
  className: "ds-pagination",
1128
1078
  "aria-label": a,
1129
1079
  "data-variant": i,
1130
- children: /* @__PURE__ */ d("ul", { children: [
1131
- /* @__PURE__ */ u("li", { children: /* @__PURE__ */ u("button", {
1080
+ children: /* @__PURE__ */ y("ul", { children: [
1081
+ /* @__PURE__ */ v("li", { children: /* @__PURE__ */ v("button", {
1132
1082
  type: "button",
1133
1083
  className: "ds-page",
1134
1084
  onClick: () => s(e - 1),
1135
1085
  disabled: e <= 1,
1136
1086
  "aria-label": "Página anterior",
1137
- children: /* @__PURE__ */ u(h, {
1087
+ children: /* @__PURE__ */ v(S, {
1138
1088
  size: 16,
1139
1089
  "aria-hidden": "true"
1140
1090
  })
1141
1091
  }) }),
1142
- Q(e, o, r).map((t) => typeof t == "number" ? /* @__PURE__ */ u("li", { children: /* @__PURE__ */ u("button", {
1092
+ Le(e, o, r).map((t) => typeof t == "number" ? /* @__PURE__ */ v("li", { children: /* @__PURE__ */ v("button", {
1143
1093
  type: "button",
1144
1094
  className: "ds-page",
1145
1095
  "aria-current": t === e ? "page" : void 0,
1146
1096
  "aria-label": `Página ${t}`,
1147
1097
  onClick: () => s(t),
1148
1098
  children: t
1149
- }) }, t) : /* @__PURE__ */ u("li", { children: /* @__PURE__ */ u("span", {
1099
+ }) }, t) : /* @__PURE__ */ v("li", { children: /* @__PURE__ */ v("span", {
1150
1100
  className: "ds-page-ellipsis",
1151
1101
  "aria-hidden": "true",
1152
1102
  children: "…"
1153
1103
  }) }, t)),
1154
- /* @__PURE__ */ u("li", { children: /* @__PURE__ */ u("button", {
1104
+ /* @__PURE__ */ v("li", { children: /* @__PURE__ */ v("button", {
1155
1105
  type: "button",
1156
1106
  className: "ds-page",
1157
1107
  onClick: () => s(e + 1),
1158
1108
  disabled: e >= o,
1159
1109
  "aria-label": "Página siguiente",
1160
- children: /* @__PURE__ */ u(g, {
1110
+ children: /* @__PURE__ */ v(C, {
1161
1111
  size: 16,
1162
1112
  "aria-hidden": "true"
1163
1113
  })
@@ -1167,13 +1117,13 @@ function Pe({ page: e, totalPages: t, onPageChange: n, siblings: r = 1, variant:
1167
1117
  }
1168
1118
  //#endregion
1169
1119
  //#region src/components/Divider.tsx
1170
- function Fe({ orientation: e = "horizontal", label: t }) {
1171
- return t ? /* @__PURE__ */ u("div", {
1120
+ function ze({ orientation: e = "horizontal", label: t }) {
1121
+ return t ? /* @__PURE__ */ v("div", {
1172
1122
  className: "ds-divider",
1173
1123
  role: "separator",
1174
1124
  "data-label": t,
1175
1125
  children: t
1176
- }) : /* @__PURE__ */ u("div", {
1126
+ }) : /* @__PURE__ */ v("div", {
1177
1127
  className: "ds-divider",
1178
1128
  role: "separator",
1179
1129
  "aria-orientation": e,
@@ -1182,100 +1132,94 @@ function Fe({ orientation: e = "horizontal", label: t }) {
1182
1132
  }
1183
1133
  //#endregion
1184
1134
  //#region src/core/toast.ts
1185
- var Ie = e(null);
1186
- function Le() {
1187
- let e = r(Ie);
1135
+ var Be = c(null);
1136
+ function Ve() {
1137
+ let e = d(Be);
1188
1138
  if (!e) throw Error("useToast debe usarse dentro de <ToastProvider>.");
1189
1139
  return e;
1190
1140
  }
1191
1141
  //#endregion
1192
1142
  //#region src/components/Toast.tsx
1193
- var Re = {
1194
- info: /* @__PURE__ */ u(y, { weight: "fill" }),
1195
- success: /* @__PURE__ */ u(v, { weight: "fill" }),
1196
- warning: /* @__PURE__ */ u(C, { weight: "fill" }),
1197
- error: /* @__PURE__ */ u(w, { weight: "fill" })
1143
+ var He = {
1144
+ info: /* @__PURE__ */ v(E, { weight: "fill" }),
1145
+ success: /* @__PURE__ */ v(T, { weight: "fill" }),
1146
+ warning: /* @__PURE__ */ v(A, { weight: "fill" }),
1147
+ error: /* @__PURE__ */ v(j, { weight: "fill" })
1198
1148
  };
1199
- function ze({ children: e, position: t = "bottom-right" }) {
1200
- let [r, a] = c([]), l = s(0), f = s(/* @__PURE__ */ new Map()), p = n((e) => {
1201
- clearTimeout(f.current.get(e)), f.current.delete(e), a((t) => t.map((t) => t.id === e ? {
1149
+ function Ue({ children: e, position: n = "bottom-right" }) {
1150
+ let [r, i] = g([]), a = h(0), o = h(/* @__PURE__ */ new Map()), s = u((e) => {
1151
+ clearTimeout(o.current.get(e)), o.current.delete(e), i((t) => t.map((t) => t.id === e ? {
1202
1152
  ...t,
1203
1153
  closing: !0
1204
- } : t)), setTimeout(() => a((t) => t.filter((t) => t.id !== e)), 180);
1205
- }, []), m = n((e) => {
1206
- let t = ++l.current;
1207
- a((n) => [...n.slice(-4), {
1154
+ } : t)), setTimeout(() => i((t) => t.filter((t) => t.id !== e)), 180);
1155
+ }, []), c = u((e) => {
1156
+ let t = ++a.current;
1157
+ i((n) => [...n.slice(-4), {
1208
1158
  variant: "info",
1209
1159
  ...e,
1210
1160
  id: t,
1211
1161
  closing: !1
1212
1162
  }]);
1213
1163
  let n = e.duration ?? 5e3;
1214
- return n > 0 && f.current.set(t, setTimeout(() => p(t), n)), t;
1215
- }, [p]);
1216
- i(() => {
1217
- let e = f.current;
1164
+ return n > 0 && o.current.set(t, setTimeout(() => s(t), n)), t;
1165
+ }, [s]);
1166
+ f(() => {
1167
+ let e = o.current;
1218
1168
  return () => {
1219
1169
  for (let t of e.values()) clearTimeout(t);
1220
1170
  };
1221
1171
  }, []);
1222
- let h = o(() => ({
1223
- toast: m,
1224
- dismiss: p
1225
- }), [m, p]);
1226
- return /* @__PURE__ */ d(Ie.Provider, {
1227
- value: h,
1228
- children: [e, /* @__PURE__ */ u("ol", {
1172
+ let l = m(() => ({
1173
+ toast: c,
1174
+ dismiss: s
1175
+ }), [c, s]);
1176
+ return /* @__PURE__ */ y(Be.Provider, {
1177
+ value: l,
1178
+ children: [e, /* @__PURE__ */ v("ol", {
1229
1179
  className: "ds-toaster",
1230
- "data-position": t,
1180
+ "data-position": n,
1231
1181
  "aria-label": "Notificaciones",
1232
- children: r.map((e) => /* @__PURE__ */ d("li", {
1182
+ children: r.map((e) => /* @__PURE__ */ y("li", {
1233
1183
  className: "ds-toast",
1234
1184
  "data-variant": e.variant,
1235
1185
  "data-state": e.closing ? "closing" : "open",
1236
1186
  role: e.variant === "error" ? "alert" : "status",
1237
1187
  "aria-atomic": "true",
1238
1188
  children: [
1239
- /* @__PURE__ */ u("span", {
1189
+ /* @__PURE__ */ v("span", {
1240
1190
  className: "ds-toast-icon",
1241
1191
  "aria-hidden": "true",
1242
- children: Re[e.variant ?? "info"]
1192
+ children: He[e.variant ?? "info"]
1243
1193
  }),
1244
- /* @__PURE__ */ d("div", {
1194
+ /* @__PURE__ */ y("div", {
1245
1195
  className: "ds-toast-content",
1246
1196
  children: [
1247
- /* @__PURE__ */ u("span", {
1197
+ /* @__PURE__ */ v("span", {
1248
1198
  className: "ds-toast-title",
1249
1199
  children: e.title
1250
1200
  }),
1251
- e.description && /* @__PURE__ */ u("p", {
1201
+ e.description && /* @__PURE__ */ v("p", {
1252
1202
  className: "ds-toast-description",
1253
1203
  children: e.description
1254
1204
  }),
1255
- e.action && /* @__PURE__ */ u("div", {
1205
+ e.action && /* @__PURE__ */ v("div", {
1256
1206
  className: "ds-toast-action",
1257
- children: /* @__PURE__ */ u("button", {
1258
- type: "button",
1259
- className: "ds-button",
1260
- "data-variant": "text",
1261
- "data-size": "xs",
1207
+ children: /* @__PURE__ */ v(t, {
1208
+ variant: "text",
1209
+ size: "xs",
1262
1210
  onClick: () => {
1263
- e.action?.onClick(), p(e.id);
1211
+ e.action?.onClick(), s(e.id);
1264
1212
  },
1265
1213
  children: e.action.label
1266
1214
  })
1267
1215
  })
1268
1216
  ]
1269
1217
  }),
1270
- /* @__PURE__ */ u("button", {
1271
- type: "button",
1218
+ /* @__PURE__ */ v(G, {
1272
1219
  className: "ds-toast-close",
1273
- "aria-label": "Cerrar notificación",
1274
- onClick: () => p(e.id),
1275
- children: /* @__PURE__ */ u(T, {
1276
- size: 14,
1277
- "aria-hidden": "true"
1278
- })
1220
+ size: "xs",
1221
+ label: "Cerrar notificación",
1222
+ onClick: () => s(e.id)
1279
1223
  })
1280
1224
  ]
1281
1225
  }, e.id))
@@ -1284,207 +1228,216 @@ function ze({ children: e, position: t = "bottom-right" }) {
1284
1228
  }
1285
1229
  //#endregion
1286
1230
  //#region src/components/DataTable.tsx
1287
- var Be = new Intl.Collator("es", {
1231
+ var We = new Intl.Collator("es", {
1288
1232
  numeric: !0,
1289
1233
  sensitivity: "base"
1290
- }), Ve = "a, button, input, select, textarea, label, [role=\"button\"], [contenteditable=\"true\"]";
1291
- function He({ caption: e, columns: t, rows: n, rowKey: r, loading: i = !1, loadingMessage: a = "Cargando registros…", emptyMessage: o = "No hay resultados.", pagination: s, sort: l, defaultSort: f, onSortChange: p, manualSort: m = !1, onRowClick: h, density: g = "comfortable", stickyHeader: _ = !1, id: v, className: y }) {
1292
- let [b, x] = c(f), S = l === void 0 ? b : l ?? void 0, C = t.find((e) => e.id === S?.id)?.sortValue, w = !m && C && S ? [...n].sort((e, t) => {
1293
- let n = C(e), r = C(t), i = typeof n == "number" && typeof r == "number" ? n - r : Be.compare(String(n), String(r));
1294
- return S.direction === "ascending" ? i : -i;
1295
- }) : n, T = s?.pageSize ? Math.max(1, Math.floor(s.pageSize)) : void 0, E = T ? Math.ceil(n.length / T) : s?.totalPages ?? 1, D = Math.min(Math.max(1, s?.page ?? 1), Math.max(1, E)), O = T ? w.slice((D - 1) * T, D * T) : w;
1296
- function k(e, t) {
1234
+ }), Ge = "a, button, input, select, textarea, label, [role=\"button\"], [contenteditable=\"true\"]";
1235
+ function Ke({ caption: e, columns: t, rows: n, rowKey: r, loading: i = !1, loadingMessage: a = "Cargando registros…", emptyMessage: o = "No hay resultados.", pagination: s, sort: c, defaultSort: l, onSortChange: u, manualSort: d = !1, onRowClick: f, density: p = "comfortable", stickyHeader: m = !1, variant: h = "default", rowMuted: _, summary: b, maxHeight: x, id: S, className: C }) {
1236
+ let [w, T] = g(l), E = c === void 0 ? w : c ?? void 0, D = t.find((e) => e.id === E?.id)?.sortValue, O = !d && D && E ? [...n].sort((e, t) => {
1237
+ let n = D(e), r = D(t), i = typeof n == "number" && typeof r == "number" ? n - r : We.compare(String(n), String(r));
1238
+ return E.direction === "ascending" ? i : -i;
1239
+ }) : n, k = s?.pageSize ? Math.max(1, Math.floor(s.pageSize)) : void 0, A = k ? Math.ceil(n.length / k) : s?.totalPages ?? 1, j = Math.min(Math.max(1, s?.page ?? 1), Math.max(1, A)), M = k ? O.slice((j - 1) * k, j * k) : O;
1240
+ function N(e, t) {
1297
1241
  let n = {
1298
1242
  id: e.id,
1299
1243
  direction: t === "ascending" ? "descending" : "ascending"
1300
1244
  };
1301
- x(n), p?.(n), T && D !== 1 && s?.onPageChange(1);
1245
+ T(n), u?.(n), k && j !== 1 && s?.onPageChange(1);
1302
1246
  }
1303
- function A(e, t) {
1304
- let n = t.target instanceof Element ? t.target.closest(Ve) : null;
1305
- n && t.currentTarget.contains(n) || h?.(e, t);
1247
+ function P(e, t) {
1248
+ let n = t.target instanceof Element ? t.target.closest(Ge) : null;
1249
+ n && t.currentTarget.contains(n) || f?.(e, t);
1306
1250
  }
1307
- return /* @__PURE__ */ d("div", {
1308
- id: v,
1309
- className: ["ds-data-table", y].filter(Boolean).join(" "),
1310
- "data-density": g,
1311
- "data-sticky-header": _ || void 0,
1312
- children: [/* @__PURE__ */ u("div", {
1313
- className: "ds-data-scroll",
1314
- role: "region",
1315
- "aria-label": e,
1316
- tabIndex: 0,
1317
- children: /* @__PURE__ */ d("table", {
1318
- "aria-busy": i,
1319
- children: [
1320
- /* @__PURE__ */ u("caption", { children: e }),
1321
- /* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: t.map((e) => {
1322
- let t = S?.id === e.id ? S.direction : void 0;
1323
- return /* @__PURE__ */ u("th", {
1324
- scope: "col",
1325
- "data-align": e.align,
1326
- "aria-sort": e.sortValue ? t : void 0,
1327
- children: e.sortValue ? /* @__PURE__ */ d("button", {
1328
- type: "button",
1329
- className: "ds-sort-button",
1330
- onClick: () => k(e, t),
1331
- children: [
1332
- e.label,
1333
- " ",
1334
- /* @__PURE__ */ u("span", {
1335
- "aria-hidden": "true",
1336
- children: t === "ascending" ? "↑" : t === "descending" ? "↓" : "↕"
1337
- })
1338
- ]
1339
- }) : e.label
1340
- }, e.id);
1341
- }) }) }),
1342
- /* @__PURE__ */ u("tbody", { children: i || !w.length ? /* @__PURE__ */ u("tr", { children: /* @__PURE__ */ u("td", {
1343
- colSpan: Math.max(1, t.length),
1344
- children: /* @__PURE__ */ u("span", {
1345
- role: "status",
1346
- children: i ? a : o
1347
- })
1348
- }) }) : O.map((e) => /* @__PURE__ */ u("tr", {
1349
- ...h ? {
1350
- tabIndex: 0,
1351
- "data-clickable": !0,
1352
- onClick: (t) => A(e, t),
1353
- onKeyDown: (t) => {
1354
- t.target !== t.currentTarget || t.key !== "Enter" && t.key !== " " || (t.preventDefault(), A(e, t));
1355
- }
1356
- } : {},
1357
- children: t.map((t) => /* @__PURE__ */ u("td", {
1358
- "data-align": t.align,
1359
- children: t.cell(e)
1360
- }, t.id))
1361
- }, r(e))) })
1362
- ]
1251
+ let F = typeof x == "number" ? `${x}px` : x;
1252
+ return /* @__PURE__ */ y("div", {
1253
+ id: S,
1254
+ className: ["ds-data-table", C].filter(Boolean).join(" "),
1255
+ "data-density": p,
1256
+ "data-variant": h === "default" ? void 0 : h,
1257
+ "data-sticky-header": m || x !== void 0 || void 0,
1258
+ "data-max-height": x !== void 0 || void 0,
1259
+ style: F ? { "--ds-table-max-height": F } : void 0,
1260
+ children: [
1261
+ /* @__PURE__ */ v("div", {
1262
+ className: "ds-data-scroll",
1263
+ role: "region",
1264
+ "aria-label": e,
1265
+ tabIndex: 0,
1266
+ children: /* @__PURE__ */ y("table", {
1267
+ "aria-busy": i,
1268
+ children: [
1269
+ /* @__PURE__ */ v("caption", { children: e }),
1270
+ /* @__PURE__ */ v("thead", { children: /* @__PURE__ */ v("tr", { children: t.map((e) => {
1271
+ let t = E?.id === e.id ? E.direction : void 0;
1272
+ return /* @__PURE__ */ v("th", {
1273
+ scope: "col",
1274
+ "data-align": e.align,
1275
+ "aria-sort": e.sortValue ? t : void 0,
1276
+ children: e.sortValue ? /* @__PURE__ */ y("button", {
1277
+ type: "button",
1278
+ className: "ds-sort-button",
1279
+ onClick: () => N(e, t),
1280
+ children: [
1281
+ e.label,
1282
+ " ",
1283
+ /* @__PURE__ */ v("span", {
1284
+ "aria-hidden": "true",
1285
+ children: t === "ascending" ? "↑" : t === "descending" ? "↓" : "↕"
1286
+ })
1287
+ ]
1288
+ }) : e.label
1289
+ }, e.id);
1290
+ }) }) }),
1291
+ /* @__PURE__ */ v("tbody", { children: i || !O.length ? /* @__PURE__ */ v("tr", { children: /* @__PURE__ */ v("td", {
1292
+ colSpan: Math.max(1, t.length),
1293
+ children: /* @__PURE__ */ v("span", {
1294
+ role: "status",
1295
+ children: i ? a : o
1296
+ })
1297
+ }) }) : M.map((e) => /* @__PURE__ */ v("tr", {
1298
+ "data-muted": _?.(e) || void 0,
1299
+ ...f ? {
1300
+ tabIndex: 0,
1301
+ "data-clickable": !0,
1302
+ onClick: (t) => P(e, t),
1303
+ onKeyDown: (t) => {
1304
+ t.target !== t.currentTarget || t.key !== "Enter" && t.key !== " " || (t.preventDefault(), P(e, t));
1305
+ }
1306
+ } : {},
1307
+ children: t.map((t) => /* @__PURE__ */ v("td", {
1308
+ "data-align": t.align,
1309
+ children: t.cell(e)
1310
+ }, t.id))
1311
+ }, r(e))) })
1312
+ ]
1313
+ })
1314
+ }),
1315
+ b && b.length > 0 && /* @__PURE__ */ v("div", {
1316
+ className: "ds-data-table-summary",
1317
+ children: b.map((e) => /* @__PURE__ */ y("span", { children: [
1318
+ e.label,
1319
+ " ",
1320
+ e.value
1321
+ ] }, e.label))
1322
+ }),
1323
+ s && A > 1 && /* @__PURE__ */ v(Re, {
1324
+ page: j,
1325
+ totalPages: A,
1326
+ onPageChange: s.onPageChange
1363
1327
  })
1364
- }), s && E > 1 && /* @__PURE__ */ u(Pe, {
1365
- page: D,
1366
- totalPages: E,
1367
- onPageChange: s.onPageChange
1368
- })]
1328
+ ]
1369
1329
  });
1370
1330
  }
1371
1331
  //#endregion
1372
1332
  //#region src/components/FilterBar.tsx
1373
- var Ue = (e) => `${e} resultado${e === 1 ? "" : "s"}`;
1374
- function We({ label: e = "Filtros", children: t, activeFilters: n = [], onFilterRemove: r, onClear: i, clearLabel: a = "Limpiar filtros", resultCount: o, resultLabel: s = Ue, onSubmit: c, actions: f, id: p, className: m }) {
1375
- let h = /* @__PURE__ */ d(l, { children: [
1376
- /* @__PURE__ */ u("div", {
1333
+ var qe = (e) => `${e} resultado${e === 1 ? "" : "s"}`;
1334
+ function Je({ label: e = "Filtros", children: n, activeFilters: i = [], onFilterRemove: a, onClear: o, clearLabel: s = "Limpiar filtros", resultCount: c, resultLabel: l = qe, onSubmit: u, actions: d, id: f, className: p }) {
1335
+ let m = /* @__PURE__ */ y(_, { children: [
1336
+ /* @__PURE__ */ v("div", {
1377
1337
  className: "ds-filter-fields",
1378
- children: t
1338
+ children: n
1379
1339
  }),
1380
- f && /* @__PURE__ */ u("div", {
1340
+ d && /* @__PURE__ */ v("div", {
1381
1341
  className: "ds-filter-actions",
1382
- children: f
1342
+ children: d
1383
1343
  }),
1384
- (n.length > 0 || o !== void 0) && /* @__PURE__ */ d("div", {
1344
+ (i.length > 0 || c !== void 0) && /* @__PURE__ */ y("div", {
1385
1345
  className: "ds-filter-active",
1386
1346
  children: [
1387
- o !== void 0 && /* @__PURE__ */ u("span", {
1347
+ c !== void 0 && /* @__PURE__ */ v("span", {
1388
1348
  className: "ds-filter-count",
1389
1349
  role: "status",
1390
- children: s(o)
1350
+ children: l(c)
1391
1351
  }),
1392
- n.map((e) => /* @__PURE__ */ d("button", {
1393
- className: "ds-filter-chip",
1394
- type: "button",
1352
+ i.map((e) => /* @__PURE__ */ v(r, {
1353
+ removable: !0,
1395
1354
  "aria-label": `Quitar filtro: ${e.label}`,
1396
1355
  onClick: () => {
1397
- e.onRemove?.(), r?.(e.id);
1356
+ e.onRemove?.(), a?.(e.id);
1398
1357
  },
1399
- children: [
1400
- e.label,
1401
- " ",
1402
- /* @__PURE__ */ u("span", {
1403
- "aria-hidden": "true",
1404
- children: "×"
1405
- })
1406
- ]
1358
+ children: e.label
1407
1359
  }, e.id)),
1408
- i && n.length > 0 && /* @__PURE__ */ u("button", {
1409
- className: "ds-button",
1410
- "data-variant": "text",
1411
- "data-size": "sm",
1412
- type: "button",
1413
- onClick: i,
1414
- children: a
1360
+ o && i.length > 0 && /* @__PURE__ */ v(t, {
1361
+ variant: "text",
1362
+ size: "sm",
1363
+ onClick: o,
1364
+ children: s
1415
1365
  })
1416
1366
  ]
1417
1367
  })
1418
- ] }), g = ["ds-filter-bar", m].filter(Boolean).join(" ");
1419
- return c ? /* @__PURE__ */ u("form", {
1420
- id: p,
1421
- className: g,
1368
+ ] }), h = ["ds-filter-bar", p].filter(Boolean).join(" ");
1369
+ return u ? /* @__PURE__ */ v("form", {
1370
+ id: f,
1371
+ className: h,
1422
1372
  role: "search",
1423
1373
  "aria-label": e,
1424
1374
  onSubmit: (e) => {
1425
- e.preventDefault(), c(new FormData(e.currentTarget), e);
1375
+ e.preventDefault(), u(new FormData(e.currentTarget), e);
1426
1376
  },
1427
- children: h
1428
- }) : /* @__PURE__ */ u("div", {
1429
- id: p,
1430
- className: g,
1377
+ children: m
1378
+ }) : /* @__PURE__ */ v("div", {
1379
+ id: f,
1380
+ className: h,
1431
1381
  role: "group",
1432
1382
  "aria-label": e,
1433
- children: h
1383
+ children: m
1434
1384
  });
1435
1385
  }
1436
1386
  //#endregion
1437
1387
  //#region src/components/Drawer.tsx
1438
- function Ge({ title: e, description: t, open: n, defaultOpen: r = !1, onOpenChange: i, side: a = "end", size: o = "md", trigger: l, footer: f, closeOnBackdrop: p = !0, closeOnEscape: m = !0, closeLabel: h = "Cerrar panel", className: g, children: _ }) {
1439
- let v = s(null), [y, b] = c(r), x = n ?? y;
1440
- return /* @__PURE__ */ d(E.Root, {
1388
+ function Ye({ title: e, description: t, open: n, defaultOpen: r = !1, onOpenChange: i, side: a = "end", size: o = "md", trigger: s, footer: c, closeOnBackdrop: l = !0, closeOnEscape: u = !0, closeLabel: d = "Cerrar panel", className: f, children: p }) {
1389
+ let m = h(null), [_, b] = g(r), x = n ?? _;
1390
+ return /* @__PURE__ */ y(N.Root, {
1441
1391
  open: x,
1442
1392
  onOpenChange: (e) => {
1443
1393
  b(e), i?.(e);
1444
1394
  },
1445
- children: [l && /* @__PURE__ */ u(E.Trigger, {
1395
+ children: [s && /* @__PURE__ */ v(N.Trigger, {
1446
1396
  asChild: !0,
1447
- children: l
1448
- }), /* @__PURE__ */ d(E.Portal, { children: [/* @__PURE__ */ u(E.Overlay, { className: "ds-drawer-overlay" }), /* @__PURE__ */ d(E.Content, {
1449
- className: ["ds-drawer", g].filter(Boolean).join(" "),
1397
+ children: s
1398
+ }), /* @__PURE__ */ y(N.Portal, { children: [/* @__PURE__ */ v(N.Overlay, { className: "ds-drawer-overlay" }), /* @__PURE__ */ y(N.Content, {
1399
+ className: ["ds-drawer", f].filter(Boolean).join(" "),
1450
1400
  "data-side": a,
1451
1401
  "data-size": o,
1452
1402
  ...t ? {} : { "aria-describedby": void 0 },
1453
1403
  onEscapeKeyDown: (e) => {
1454
- m || e.preventDefault();
1404
+ u || e.preventDefault();
1455
1405
  },
1456
1406
  onPointerDownOutside: (e) => {
1457
- p || e.preventDefault();
1407
+ l || e.preventDefault();
1458
1408
  },
1459
1409
  onInteractOutside: (e) => {
1460
- p || e.preventDefault();
1410
+ l || e.preventDefault();
1461
1411
  },
1462
1412
  onOpenAutoFocus: () => {
1463
1413
  let e = document.activeElement;
1464
- v.current = e instanceof HTMLElement && e !== document.body ? e : null;
1414
+ m.current = e instanceof HTMLElement && e !== document.body ? e : null;
1465
1415
  },
1466
1416
  onCloseAutoFocus: (e) => {
1467
- v.current?.isConnected && (e.preventDefault(), v.current.focus({ preventScroll: !0 }));
1417
+ m.current?.isConnected && (e.preventDefault(), m.current.focus({ preventScroll: !0 }));
1468
1418
  },
1469
1419
  children: [
1470
- /* @__PURE__ */ d("header", {
1420
+ /* @__PURE__ */ y("header", {
1471
1421
  className: "ds-drawer-header",
1472
- children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u(E.Title, { children: e }), t && /* @__PURE__ */ u(E.Description, {
1422
+ children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v(N.Title, { children: e }), t && /* @__PURE__ */ v(N.Description, {
1473
1423
  className: "ds-drawer-description",
1474
1424
  children: t
1475
- })] }), /* @__PURE__ */ u(E.Close, {
1476
- className: "ds-sheet-close",
1477
- "aria-label": h,
1478
- children: "×"
1425
+ })] }), /* @__PURE__ */ v(N.Close, {
1426
+ asChild: !0,
1427
+ children: /* @__PURE__ */ v(G, {
1428
+ className: "ds-sheet-close",
1429
+ size: "lg",
1430
+ label: d
1431
+ })
1479
1432
  })]
1480
1433
  }),
1481
- /* @__PURE__ */ u("div", {
1434
+ /* @__PURE__ */ v("div", {
1482
1435
  className: "ds-drawer-body",
1483
- children: _
1436
+ children: p
1484
1437
  }),
1485
- f && /* @__PURE__ */ u("footer", {
1438
+ c && /* @__PURE__ */ v("footer", {
1486
1439
  className: "ds-drawer-footer",
1487
- children: f
1440
+ children: c
1488
1441
  })
1489
1442
  ]
1490
1443
  })] })]
@@ -1502,16 +1455,16 @@ function $(e) {
1502
1455
  for (; n >= 1024 && r < t.length - 1;) n /= 1024, r++;
1503
1456
  return `${Number(n.toFixed(+(n < 10)))} ${t[r]}`;
1504
1457
  }
1505
- function Ke(e, t) {
1458
+ function Xe(e, t) {
1506
1459
  let n = t?.toLowerCase().split(",").map((e) => e.trim()).filter(Boolean) ?? [];
1507
1460
  if (!n.length) return !0;
1508
1461
  let r = e.type.toLowerCase(), i = e.name.toLowerCase();
1509
1462
  return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r === e);
1510
1463
  }
1511
- var qe = (e, t) => e.name === t.name && e.size === t.size && e.lastModified === t.lastModified;
1512
- function Je(e, t, n = {}) {
1464
+ var Ze = (e, t) => e.name === t.name && e.size === t.size && e.lastModified === t.lastModified;
1465
+ function Qe(e, t, n = {}) {
1513
1466
  let r = [], i = n.multiple ? [...e] : [], a = n.multiple ? n.maxFiles && n.maxFiles > 0 ? Math.floor(n.maxFiles) : Infinity : 1;
1514
- for (let e of t) if (!Ke(e, n.accept)) r.push({
1467
+ for (let e of t) if (!Xe(e, n.accept)) r.push({
1515
1468
  file: e,
1516
1469
  reason: "type",
1517
1470
  message: `${e.name}: formato no admitido.`
@@ -1521,7 +1474,7 @@ function Je(e, t, n = {}) {
1521
1474
  reason: "size",
1522
1475
  message: `${e.name}: supera el tamaño máximo (${$(n.maxBytes)}).`
1523
1476
  });
1524
- else if (i.some((t) => qe(t, e))) continue;
1477
+ else if (i.some((t) => Ze(t, e))) continue;
1525
1478
  else i.length >= a ? r.push({
1526
1479
  file: e,
1527
1480
  reason: "count",
@@ -1534,121 +1487,116 @@ function Je(e, t, n = {}) {
1534
1487
  }
1535
1488
  //#endregion
1536
1489
  //#region src/components/FileUpload.tsx
1537
- function Ye({ file: e }) {
1538
- let t = s(null);
1539
- return i(() => {
1490
+ function $e({ file: e }) {
1491
+ let t = h(null);
1492
+ return f(() => {
1540
1493
  if (!t.current) return;
1541
1494
  let n = URL.createObjectURL(e);
1542
1495
  return t.current.src = n, () => URL.revokeObjectURL(n);
1543
- }, [e]), e.type.startsWith("image/") ? /* @__PURE__ */ u("img", {
1496
+ }, [e]), e.type.startsWith("image/") ? /* @__PURE__ */ v("img", {
1544
1497
  ref: t,
1545
1498
  alt: ""
1546
1499
  }) : null;
1547
1500
  }
1548
- function Xe({ label: e, name: t, accept: n, multiple: r = !1, maxBytes: i, maxFiles: o, required: l, disabled: f = !1, supportingText: p, dropzone: m = !0, id: h, className: g, onFilesChange: _, onReject: v, onFileRemove: y }) {
1549
- let b = a(), x = h ?? b, S = s(null), [C, w] = c([]), [T, E] = c(""), [D, O] = c(!1);
1550
- function k(e) {
1501
+ function et({ label: e, name: n, accept: r, multiple: i = !1, maxBytes: o, maxFiles: s, required: c, disabled: l = !1, supportingText: u, dropzone: d = !0, id: f, className: m, onFilesChange: _, onReject: b, onFileRemove: x }) {
1502
+ let S = p(), C = f ?? S, w = h(null), [T, E] = g([]), [D, O] = g(""), [k, A] = g(!1);
1503
+ function j(e) {
1551
1504
  let t = new DataTransfer();
1552
- e.forEach((e) => t.items.add(e)), S.current && (S.current.files = t.files), w(e), (e.length !== C.length || e.some((e, t) => e !== C[t])) && _?.(e);
1505
+ e.forEach((e) => t.items.add(e)), w.current && (w.current.files = t.files), E(e), (e.length !== T.length || e.some((e, t) => e !== T[t])) && _?.(e);
1553
1506
  }
1554
- function A(e) {
1555
- let t = Je(C, e, {
1556
- accept: n,
1557
- maxBytes: i,
1558
- maxFiles: o,
1559
- multiple: r
1507
+ function M(e) {
1508
+ let t = Qe(T, e, {
1509
+ accept: r,
1510
+ maxBytes: o,
1511
+ maxFiles: s,
1512
+ multiple: i
1560
1513
  });
1561
- E(t.rejections.map((e) => e.message).join(" ")), k(t.files), t.rejections.length && v?.(t.rejections);
1514
+ O(t.rejections.map((e) => e.message).join(" ")), j(t.files), t.rejections.length && b?.(t.rejections);
1562
1515
  }
1563
- function j(e) {
1564
- m && !f && (e.preventDefault(), O(!1), A(Array.from(e.dataTransfer.files)));
1516
+ function N(e) {
1517
+ d && !l && (e.preventDefault(), A(!1), M(Array.from(e.dataTransfer.files)));
1565
1518
  }
1566
- let M = [p ? `${x}-hint` : "", `${x}-error`].filter(Boolean).join(" ");
1567
- return /* @__PURE__ */ d("div", {
1568
- className: ["ds-file-upload", g].filter(Boolean).join(" "),
1569
- "data-dragging": D || void 0,
1570
- "data-disabled": f || void 0,
1519
+ let P = [u ? `${C}-hint` : "", `${C}-error`].filter(Boolean).join(" ");
1520
+ return /* @__PURE__ */ y("div", {
1521
+ className: ["ds-file-upload", m].filter(Boolean).join(" "),
1522
+ "data-dragging": k || void 0,
1523
+ "data-disabled": l || void 0,
1571
1524
  onDragOver: (e) => {
1572
- m && !f && (e.preventDefault(), O(!0));
1525
+ d && !l && (e.preventDefault(), A(!0));
1573
1526
  },
1574
1527
  onDragLeave: (e) => {
1575
- e.currentTarget.contains(e.relatedTarget) || O(!1);
1528
+ e.currentTarget.contains(e.relatedTarget) || A(!1);
1576
1529
  },
1577
- onDrop: j,
1530
+ onDrop: N,
1578
1531
  children: [
1579
- /* @__PURE__ */ d("label", {
1580
- htmlFor: x,
1581
- children: [e, l && /* @__PURE__ */ u("span", {
1582
- className: "ds-input-required",
1583
- "aria-hidden": "true",
1584
- children: "*"
1585
- })]
1532
+ /* @__PURE__ */ v(a, {
1533
+ htmlFor: C,
1534
+ required: c,
1535
+ children: e
1586
1536
  }),
1587
- p && /* @__PURE__ */ u("small", {
1588
- id: `${x}-hint`,
1589
- children: p
1537
+ u && /* @__PURE__ */ v("small", {
1538
+ id: `${C}-hint`,
1539
+ children: u
1590
1540
  }),
1591
- /* @__PURE__ */ u("input", {
1592
- ref: S,
1593
- id: x,
1541
+ /* @__PURE__ */ v("input", {
1542
+ ref: w,
1543
+ id: C,
1594
1544
  type: "file",
1595
- name: t,
1596
- accept: n,
1597
- multiple: r,
1598
- required: l && !C.length,
1599
- disabled: f,
1600
- "aria-describedby": M,
1601
- "aria-invalid": T ? !0 : void 0,
1602
- onChange: (e) => A(Array.from(e.currentTarget.files ?? []))
1545
+ name: n,
1546
+ accept: r,
1547
+ multiple: i,
1548
+ required: c && !T.length,
1549
+ disabled: l,
1550
+ "aria-describedby": P,
1551
+ "aria-invalid": D ? !0 : void 0,
1552
+ onChange: (e) => M(Array.from(e.currentTarget.files ?? []))
1603
1553
  }),
1604
- /* @__PURE__ */ u("div", {
1605
- id: `${x}-error`,
1554
+ /* @__PURE__ */ v("div", {
1555
+ id: `${C}-error`,
1606
1556
  role: "status",
1607
- children: T
1557
+ children: D
1608
1558
  }),
1609
- !!C.length && /* @__PURE__ */ u("ul", { children: C.map((e, t) => /* @__PURE__ */ d("li", { children: [
1610
- /* @__PURE__ */ u(Ye, { file: e }),
1611
- /* @__PURE__ */ u("span", { children: e.name }),
1612
- /* @__PURE__ */ u("small", { children: $(e.size) }),
1613
- /* @__PURE__ */ u("button", {
1614
- className: "ds-button",
1615
- "data-variant": "text",
1616
- "data-size": "sm",
1617
- type: "button",
1559
+ !!T.length && /* @__PURE__ */ v("ul", { children: T.map((e, n) => /* @__PURE__ */ y("li", { children: [
1560
+ /* @__PURE__ */ v($e, { file: e }),
1561
+ /* @__PURE__ */ v("span", { children: e.name }),
1562
+ /* @__PURE__ */ v("small", { children: $(e.size) }),
1563
+ /* @__PURE__ */ v(t, {
1564
+ variant: "text",
1565
+ size: "sm",
1618
1566
  "aria-label": `Quitar ${e.name}`,
1619
- disabled: f,
1567
+ disabled: l,
1620
1568
  onClick: () => {
1621
- E(""), k(C.filter((e, n) => n !== t)), y?.(e), S.current?.focus();
1569
+ O(""), j(T.filter((e, t) => t !== n)), x?.(e), w.current?.focus();
1622
1570
  },
1623
1571
  children: "Quitar"
1624
1572
  })
1625
- ] }, `${e.name}-${e.lastModified}-${t}`)) })
1573
+ ] }, `${e.name}-${e.lastModified}-${n}`)) })
1626
1574
  ]
1627
1575
  });
1628
1576
  }
1629
1577
  //#endregion
1630
1578
  //#region src/components/Timeline.tsx
1631
- function Ze({ items: e, label: t = "Historial", emptyMessage: n = "Sin eventos registrados.", density: r = "comfortable", id: i, className: a }) {
1579
+ function tt({ items: e, label: t = "Historial", emptyMessage: n = "Sin eventos registrados.", density: r = "comfortable", id: i, className: a }) {
1632
1580
  let o = ["ds-timeline", a].filter(Boolean).join(" ");
1633
- return e.length ? /* @__PURE__ */ u("ol", {
1581
+ return e.length ? /* @__PURE__ */ v("ol", {
1634
1582
  id: i,
1635
1583
  className: o,
1636
1584
  "aria-label": t,
1637
1585
  "data-density": r,
1638
- children: e.map((e) => /* @__PURE__ */ d("li", {
1586
+ children: e.map((e) => /* @__PURE__ */ y("li", {
1639
1587
  "data-variant": e.variant && e.variant !== "default" ? e.variant : void 0,
1640
1588
  "aria-current": e.current ? "step" : void 0,
1641
1589
  children: [
1642
- /* @__PURE__ */ u("strong", { children: e.title }),
1643
- e.dateTime && /* @__PURE__ */ u("time", {
1590
+ /* @__PURE__ */ v("strong", { children: e.title }),
1591
+ e.dateTime && /* @__PURE__ */ v("time", {
1644
1592
  dateTime: e.dateTime,
1645
1593
  children: e.dateLabel ?? e.dateTime
1646
1594
  }),
1647
- e.actor && /* @__PURE__ */ u("span", { children: e.actor }),
1648
- e.description && /* @__PURE__ */ u("div", { children: e.description })
1595
+ e.actor && /* @__PURE__ */ v("span", { children: e.actor }),
1596
+ e.description && /* @__PURE__ */ v("div", { children: e.description })
1649
1597
  ]
1650
1598
  }, e.id))
1651
- }) : /* @__PURE__ */ u("p", {
1599
+ }) : /* @__PURE__ */ v("p", {
1652
1600
  id: i,
1653
1601
  className: o,
1654
1602
  "data-empty": "true",
@@ -1657,166 +1605,180 @@ function Ze({ items: e, label: t = "Historial", emptyMessage: n = "Sin eventos r
1657
1605
  }
1658
1606
  //#endregion
1659
1607
  //#region src/components/DateRangePicker.tsx
1660
- var Qe = {
1608
+ var nt = {
1661
1609
  start: "",
1662
1610
  end: ""
1663
- }, $e = (e) => !!e.start && !!e.end && e.start <= e.end;
1664
- function et({ label: e = "Rango de fechas", startLabel: t = "Desde", endLabel: n = "Hasta", value: r, defaultValue: i = Qe, onChange: o, onComplete: s, min: l, max: f, startName: p, endName: m, required: h, disabled: g, error: _, presets: v = [], id: y, className: b }) {
1665
- let x = a(), S = y ?? x, [C, w] = c(i), T = r ?? C, E = T.end && (!f || T.end < f) ? T.end : f, D = T.start && (!l || T.start > l) ? T.start : l, O = _ ?? (T.start && T.end && T.end < T.start ? "La fecha final no puede ser anterior a la inicial." : "");
1666
- function k(e) {
1667
- w(e), o?.(e), $e(e) && s?.(e);
1611
+ }, rt = (e) => !!e.start && !!e.end && e.start <= e.end;
1612
+ function it({ label: e = "Rango de fechas", startLabel: t = "Desde", endLabel: n = "Hasta", value: i, defaultValue: o = nt, onChange: s, onComplete: c, min: l, max: u, startName: d, endName: f, required: m, disabled: h, error: _, presets: b = [], id: x, className: S }) {
1613
+ let C = p(), w = x ?? C, [T, E] = g(o), D = i ?? T, O = D.end && (!u || D.end < u) ? D.end : u, k = D.start && (!l || D.start > l) ? D.start : l, A = _ ?? (D.start && D.end && D.end < D.start ? "La fecha final no puede ser anterior a la inicial." : "");
1614
+ function j(e) {
1615
+ E(e), s?.(e), rt(e) && c?.(e);
1668
1616
  }
1669
- return /* @__PURE__ */ d("fieldset", {
1670
- id: S,
1671
- className: ["ds-date-range", b].filter(Boolean).join(" "),
1672
- disabled: g,
1673
- "aria-describedby": O ? `${S}-error` : void 0,
1617
+ return /* @__PURE__ */ y("fieldset", {
1618
+ id: w,
1619
+ className: ["ds-date-range", S].filter(Boolean).join(" "),
1620
+ disabled: h,
1621
+ "aria-describedby": A ? `${w}-error` : void 0,
1674
1622
  children: [
1675
- /* @__PURE__ */ d("legend", { children: [e, h && /* @__PURE__ */ u("span", {
1676
- className: "ds-input-required",
1677
- "aria-hidden": "true",
1678
- children: "*"
1679
- })] }),
1680
- v.length > 0 && /* @__PURE__ */ u("div", {
1623
+ /* @__PURE__ */ v(a, {
1624
+ as: "legend",
1625
+ required: m,
1626
+ children: e
1627
+ }),
1628
+ b.length > 0 && /* @__PURE__ */ v("div", {
1681
1629
  className: "ds-date-range-presets",
1682
- children: v.map((e) => {
1683
- let t = e.range.start === T.start && e.range.end === T.end;
1684
- return /* @__PURE__ */ u("button", {
1685
- type: "button",
1686
- className: "ds-filter-chip",
1687
- "aria-pressed": t,
1688
- onClick: () => k(e.range),
1630
+ children: b.map((e) => {
1631
+ let t = e.range.start === D.start && e.range.end === D.end;
1632
+ return /* @__PURE__ */ v(r, {
1633
+ pressed: t,
1634
+ onClick: () => j(e.range),
1689
1635
  children: e.label
1690
1636
  }, e.label);
1691
1637
  })
1692
1638
  }),
1693
- /* @__PURE__ */ d("div", {
1639
+ /* @__PURE__ */ y("div", {
1694
1640
  className: "ds-date-range-fields",
1695
- children: [/* @__PURE__ */ u(K, {
1696
- id: `${S}-start`,
1641
+ children: [/* @__PURE__ */ v(J, {
1642
+ id: `${w}-start`,
1697
1643
  type: "date",
1698
1644
  label: t,
1699
- name: p,
1700
- value: T.start,
1645
+ name: d,
1646
+ value: D.start,
1701
1647
  min: l,
1702
- max: E,
1703
- required: h,
1704
- error: !!O,
1705
- onChange: (e) => k({
1706
- ...T,
1648
+ max: O,
1649
+ required: m,
1650
+ error: !!A,
1651
+ onChange: (e) => j({
1652
+ ...D,
1707
1653
  start: e
1708
1654
  })
1709
- }), /* @__PURE__ */ u(K, {
1710
- id: `${S}-end`,
1655
+ }), /* @__PURE__ */ v(J, {
1656
+ id: `${w}-end`,
1711
1657
  type: "date",
1712
1658
  label: n,
1713
- name: m,
1714
- value: T.end,
1715
- min: D,
1716
- max: f,
1717
- required: h,
1718
- error: !!O,
1719
- onChange: (e) => k({
1720
- ...T,
1659
+ name: f,
1660
+ value: D.end,
1661
+ min: k,
1662
+ max: u,
1663
+ required: m,
1664
+ error: !!A,
1665
+ onChange: (e) => j({
1666
+ ...D,
1721
1667
  end: e
1722
1668
  })
1723
1669
  })]
1724
1670
  }),
1725
- /* @__PURE__ */ u("p", {
1726
- id: `${S}-error`,
1671
+ /* @__PURE__ */ v("p", {
1672
+ id: `${w}-error`,
1727
1673
  className: "ds-date-range-error",
1728
1674
  role: "status",
1729
- children: O
1675
+ children: A
1730
1676
  })
1731
1677
  ]
1732
1678
  });
1733
1679
  }
1734
1680
  //#endregion
1735
1681
  //#region src/components/Autocomplete.tsx
1736
- function tt({ options: e, onSelect: t, onSearch: n, debounceMs: r = 250, minChars: o = 1, loading: f = !1, loadingText: p = "Buscando…", allowCustomValue: m = !0, invalidMessage: h = "Elige una opción de la lista.", onChange: g, onBlur: _, error: v, supportingText: y, ...b }) {
1737
- let x = a(), S = s(void 0), [C, w] = c(!1), T = [...new Set(e)];
1738
- i(() => () => clearTimeout(S.current), []);
1682
+ function at({ options: e, onSelect: t, onSearch: n, debounceMs: r = 250, minChars: i = 1, loading: a = !1, loadingText: o = "Buscando…", allowCustomValue: s = !0, invalidMessage: c = "Elige una opción de la lista.", onChange: l, onBlur: u, error: d, supportingText: m, ...b }) {
1683
+ let x = p(), S = h(void 0), [C, w] = g(!1), T = [...new Set(e)];
1684
+ f(() => () => clearTimeout(S.current), []);
1739
1685
  function E(e) {
1740
- if (w(!1), g?.(e), T.includes(e) && t?.(e), !n) return;
1686
+ if (w(!1), l?.(e), T.includes(e) && t?.(e), !n) return;
1741
1687
  clearTimeout(S.current);
1742
- let i = e.trim();
1743
- i.length >= o && (S.current = setTimeout(() => n(i), Math.max(0, r)));
1688
+ let a = e.trim();
1689
+ a.length >= i && (S.current = setTimeout(() => n(a), Math.max(0, r)));
1744
1690
  }
1745
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(K, {
1691
+ return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(J, {
1746
1692
  ...b,
1747
1693
  type: "text",
1748
1694
  list: x,
1749
1695
  autoComplete: "off",
1750
- "aria-busy": f || void 0,
1751
- error: v || C,
1752
- supportingText: C ? h : f ? p : y,
1696
+ "aria-busy": a || void 0,
1697
+ error: d || C,
1698
+ supportingText: C ? c : a ? o : m,
1753
1699
  onChange: E,
1754
1700
  onBlur: (e) => {
1755
1701
  let t = e.currentTarget.value;
1756
- m || w(!!t && !T.includes(t)), _?.(e);
1702
+ s || w(!!t && !T.includes(t)), u?.(e);
1757
1703
  }
1758
- }), /* @__PURE__ */ u("datalist", {
1704
+ }), /* @__PURE__ */ v("datalist", {
1759
1705
  id: x,
1760
- children: T.map((e) => /* @__PURE__ */ u("option", { value: e }, e))
1706
+ children: T.map((e) => /* @__PURE__ */ v("option", { value: e }, e))
1761
1707
  })] });
1762
1708
  }
1763
1709
  //#endregion
1764
1710
  //#region src/components/Sidebar.tsx
1765
- function nt({ groups: e, activeHref: t, label: n = "Navegación", onNavigate: r, header: i, footer: a, id: o, className: s }) {
1766
- let c = (e) => e.disabled ? /* @__PURE__ */ u("span", {
1711
+ function ot({ groups: e, activeHref: t, label: n = "Navegación", onNavigate: r, header: i, footer: a, id: o, className: s }) {
1712
+ let c = (e) => e.disabled ? /* @__PURE__ */ v("span", {
1767
1713
  className: "ds-sidebar-link",
1768
1714
  "aria-disabled": "true",
1769
- children: rt(e)
1770
- }) : /* @__PURE__ */ u("a", {
1715
+ children: st(e)
1716
+ }) : /* @__PURE__ */ v("a", {
1771
1717
  className: "ds-sidebar-link",
1772
1718
  href: e.href,
1773
1719
  "aria-current": t === e.href ? "page" : void 0,
1774
1720
  onClick: (t) => r?.(e, t),
1775
- children: rt(e)
1776
- }), l = (e) => /* @__PURE__ */ u("ul", { children: e.items.map((e) => /* @__PURE__ */ d("li", { children: [c(e), !!e.children?.length && /* @__PURE__ */ u("ul", { children: e.children.map((e) => /* @__PURE__ */ u("li", { children: c(e) }, e.href)) })] }, e.href)) });
1777
- return /* @__PURE__ */ d("nav", {
1721
+ children: st(e)
1722
+ }), l = (e) => /* @__PURE__ */ v("ul", { children: e.items.map((e) => /* @__PURE__ */ y("li", { children: [c(e), !!e.children?.length && /* @__PURE__ */ v("ul", { children: e.children.map((e) => /* @__PURE__ */ v("li", { children: c(e) }, e.href)) })] }, e.href)) });
1723
+ return /* @__PURE__ */ y("nav", {
1778
1724
  id: o,
1779
1725
  className: ["ds-sidebar", s].filter(Boolean).join(" "),
1780
1726
  "aria-label": n,
1781
1727
  children: [
1782
- i && /* @__PURE__ */ u("div", {
1728
+ i && /* @__PURE__ */ v("div", {
1783
1729
  className: "ds-sidebar-header",
1784
1730
  children: i
1785
1731
  }),
1786
- e.map((e) => e.collapsible ? /* @__PURE__ */ d("details", {
1732
+ e.map((e) => e.collapsible ? /* @__PURE__ */ y("details", {
1787
1733
  className: "ds-sidebar-group",
1788
1734
  open: e.defaultOpen ?? !0,
1789
- children: [/* @__PURE__ */ u("summary", { children: e.label }), l(e)]
1790
- }, e.label) : /* @__PURE__ */ d("section", {
1735
+ children: [/* @__PURE__ */ v("summary", { children: e.label }), l(e)]
1736
+ }, e.label) : /* @__PURE__ */ y("section", {
1791
1737
  className: "ds-sidebar-group",
1792
1738
  "aria-label": e.label,
1793
- children: [/* @__PURE__ */ u("p", { children: e.label }), l(e)]
1739
+ children: [/* @__PURE__ */ v("p", { children: e.label }), l(e)]
1794
1740
  }, e.label)),
1795
- a && /* @__PURE__ */ u("div", {
1741
+ a && /* @__PURE__ */ v("div", {
1796
1742
  className: "ds-sidebar-footer",
1797
1743
  children: a
1798
1744
  })
1799
1745
  ]
1800
1746
  });
1801
1747
  }
1802
- function rt(e) {
1803
- return /* @__PURE__ */ d(l, { children: [
1804
- e.icon && /* @__PURE__ */ u("span", {
1748
+ function st(e) {
1749
+ return /* @__PURE__ */ y(_, { children: [
1750
+ e.icon && /* @__PURE__ */ v("span", {
1805
1751
  className: "ds-sidebar-icon",
1806
1752
  "aria-hidden": "true",
1807
1753
  children: e.icon
1808
1754
  }),
1809
- /* @__PURE__ */ u("span", {
1755
+ /* @__PURE__ */ v("span", {
1810
1756
  className: "ds-sidebar-text",
1811
1757
  children: e.label
1812
1758
  }),
1813
- e.badge !== void 0 && e.badge !== "" && /* @__PURE__ */ u("span", {
1759
+ e.badge !== void 0 && e.badge !== "" && /* @__PURE__ */ v("span", {
1814
1760
  className: "ds-sidebar-badge",
1815
1761
  children: e.badge
1816
1762
  })
1817
1763
  ] });
1818
1764
  }
1819
1765
  //#endregion
1820
- export { je as Accordion, Me as AccordionItem, me as Alert, tt as Autocomplete, _e as Avatar, ve as AvatarGroup, ye as Badge, Te as BottomSheet, Ne as Breadcrumb, M as Button, be as Card, le as Checkbox, D as CheckboxPrimitive, He as DataTable, Ae as DatePicker, et as DateRangePicker, ee as Dialog, oe as DialogBody, ce as DialogClose, ne as DialogContent, ae as DialogDescription, se as DialogFooter, re as DialogHeader, E as DialogPrimitive, ie as DialogTitle, te as DialogTrigger, Fe as Divider, Ge as Drawer, Ee as Dropdown, we as EmptyState, Xe as FileUpload, We as FilterBar, P as IconButton, Se as Loading, Pe as Pagination, G as Progress, ue as RadioGroup, O as RadioGroupPrimitive, de as RadioItem, V as Select, H as SelectItem, p as SelectPrimitive, nt as Sidebar, W as Skeleton, I as SlidingButton, U as Spinner, fe as Switch, k as SwitchPrimitive, z as Tab, R as TabList, B as TabPanel, L as Tabs, K as TextField, De as Textarea, Ze as Timeline, ze as ToastProvider, xe as Tooltip, Ke as acceptsFile, $ as formatBytes, Q as paginationRange, Je as selectFiles, Le as useToast };
1766
+ //#region src/components/CellText.tsx
1767
+ function ct({ children: e, secondary: t, tone: n = "default", strike: r = !1, className: i }) {
1768
+ return /* @__PURE__ */ y("span", {
1769
+ className: ["ds-cell-text", i].filter(Boolean).join(" "),
1770
+ "data-tone": n === "default" ? void 0 : n,
1771
+ "data-strike": r || void 0,
1772
+ children: [/* @__PURE__ */ v("span", {
1773
+ className: "ds-cell-text-primary",
1774
+ children: e
1775
+ }), t != null && t !== "" && /* @__PURE__ */ v("span", {
1776
+ className: "ds-cell-text-secondary",
1777
+ children: t
1778
+ })]
1779
+ });
1780
+ }
1781
+ //#endregion
1782
+ export { Pe as Accordion, Fe as AccordionItem, he as Alert, at as Autocomplete, ve as Avatar, ye as AvatarGroup, be as Badge, De as BottomSheet, Ie as Breadcrumb, t as Button, xe as Card, ct as CellText, ue as Checkbox, P as CheckboxPrimitive, r as Chip, s as ChipGroup, G as CloseButton, Ke as DataTable, Ne as DatePicker, it as DateRangePicker, te as Dialog, se as DialogBody, le as DialogClose, re as DialogContent, oe as DialogDescription, ce as DialogFooter, ie as DialogHeader, N as DialogPrimitive, ae as DialogTitle, ne as DialogTrigger, ze as Divider, Ye as Drawer, Oe as Dropdown, Ee as EmptyState, a as FieldLabel, et as FileUpload, Je as FilterBar, B as IconButton, Ce as Loading, Re as Pagination, we as Progress, de as RadioGroup, F as RadioGroupPrimitive, fe as RadioItem, U as Select, ee as SelectItem, b as SelectPrimitive, ot as Sidebar, q as Skeleton, H as SlidingButton, K as Spinner, pe as Switch, I as SwitchPrimitive, n as Tab, e as TabList, i as TabPanel, o as Tabs, J as TextField, ke as Textarea, tt as Timeline, Ue as ToastProvider, Se as Tooltip, Xe as acceptsFile, W as closeIconPath, $ as formatBytes, Le as paginationRange, Qe as selectFiles, Ve as useToast };
1821
1783
 
1822
1784
  //# sourceMappingURL=figma-components-directo.js.map