corekit-ui 0.1.9 → 0.1.12

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.
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { AnimationEventHandler } from 'react';
2
2
  import { AriaRole } from 'react';
3
- import { ClassProp } from 'class-variance-authority/types';
4
3
  import { ClipboardEventHandler } from 'react';
4
+ import { Column } from '@tanstack/react-table';
5
5
  import { ColumnDef } from '@tanstack/react-table';
6
+ import { ColumnOrderState } from '@tanstack/react-table';
6
7
  import { ComponentPropsWithRef } from 'react';
7
8
  import { CompositionEventHandler } from 'react';
8
9
  import { CSSProperties } from 'react';
@@ -23,12 +24,12 @@ import { ReactEventHandler } from 'react';
23
24
  import { ReactNode } from 'react';
24
25
  import { RefAttributes } from 'react';
25
26
  import { SVGProps } from 'react';
27
+ import { Table } from '@tanstack/react-table';
26
28
  import { TextareaHTMLAttributes } from 'react';
27
29
  import { ToggleEventHandler } from 'react';
28
30
  import { TouchEventHandler } from 'react';
29
31
  import { TransitionEventHandler } from 'react';
30
32
  import { UIEventHandler } from 'react';
31
- import { VariantProps } from 'class-variance-authority';
32
33
  import { WheelEventHandler } from 'react';
33
34
 
34
35
  declare type AccionFila<TData> = {
@@ -71,6 +72,75 @@ declare type ActualizarTablaConfig = {
71
72
  */
72
73
  export declare function aplanarOpcionesAgrupadas<T>(opcionesAgrupadas: OpcionGrupo<T>[]): OpcionPlana<T>[];
73
74
 
75
+ export declare const Badge: default_2.FC<BadgeProps>;
76
+
77
+ export declare type BadgeColor = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'brand';
78
+
79
+ export declare type BadgeProps = {
80
+ /**
81
+ * Variante visual del badge
82
+ * @default 'solid'
83
+ */
84
+ variant?: BadgeVariant;
85
+ /**
86
+ * Color del badge
87
+ * @default 'default'
88
+ */
89
+ color?: BadgeColor;
90
+ /**
91
+ * Tamaño del badge
92
+ * @default 'md'
93
+ */
94
+ size?: BadgeSize;
95
+ /**
96
+ * Radio de bordes
97
+ * @default 'md'
98
+ */
99
+ radius?: BadgeRadius;
100
+ /**
101
+ * Contenido del badge
102
+ */
103
+ children: React.ReactNode;
104
+ /**
105
+ * Icono al inicio
106
+ */
107
+ startIcon?: React.ReactNode;
108
+ /**
109
+ * Icono al final
110
+ */
111
+ endIcon?: React.ReactNode;
112
+ /**
113
+ * Si tiene un punto de estado
114
+ */
115
+ dot?: boolean;
116
+ /**
117
+ * Si puede ser removido (muestra X)
118
+ */
119
+ dismissible?: boolean;
120
+ /**
121
+ * Callback al hacer click en eliminar
122
+ */
123
+ onDismiss?: () => void;
124
+ /**
125
+ * Color personalizado
126
+ */
127
+ customColor?: string;
128
+ /**
129
+ * Clase CSS adicional
130
+ */
131
+ className?: string;
132
+ /**
133
+ * Callback al hacer click
134
+ */
135
+ onClick?: () => void;
136
+ };
137
+
138
+ export declare type BadgeRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
139
+
140
+ export declare type BadgeSize = 'sm' | 'md' | 'lg';
141
+
142
+ export declare type BadgeVariant = 'solid' | 'subtle' | 'outline' | 'soft';
143
+
74
144
  export declare function BadgeVoz({ tipo, texto, size, estirar, }: {
75
145
  tipo: 'mic' | 'tts';
76
146
  texto: string;
@@ -78,6 +148,12 @@ export declare function BadgeVoz({ tipo, texto, size, estirar, }: {
78
148
  estirar?: boolean;
79
149
  }): JSX.Element;
80
150
 
151
+ /**
152
+ * Props base que comparten todos los modos del Select.
153
+ * Excluye las props que cambian según el tipo de dato.
154
+ */
155
+ declare type BaseSelectProps<T> = Omit<SelectProps<T>, 'options' | 'value' | 'onChange' | 'optionValueKey' | 'optionLabelKey'>;
156
+
81
157
  export declare const Boton: ({ variant, color, size, radius, fullWidth, isLoading, onlyLoading, isDisabled, isIconOnly, disableRipple, disableAnimation, customColor, spinner, spinnerPlacement, children, className, onClick, style, type, "aria-label": ariaLabel, ...props }: BotonProps) => JSX.Element;
82
158
 
83
159
  export declare type BotonProps = {
@@ -113,20 +189,26 @@ export declare type BotonProps = {
113
189
 
114
190
  export declare const Checkbox: default_2.ForwardRefExoticComponent<{
115
191
  children?: default_2.ReactNode;
192
+ label?: default_2.ReactNode;
193
+ hint?: default_2.ReactNode;
116
194
  isSelected?: boolean;
117
195
  isIndeterminate?: boolean;
118
196
  isDisabled?: boolean;
119
197
  isReadOnly?: boolean;
120
198
  size?: CheckboxSize;
121
199
  color?: CheckboxColor;
200
+ customColor?: string;
122
201
  radius?: CheckboxRadius;
202
+ variant?: CheckboxVariant;
123
203
  lineThrough?: boolean;
124
204
  onlyIcon?: boolean;
125
205
  disableAnimation?: boolean;
206
+ customCheckIcon?: default_2.ReactNode;
126
207
  onChange?: (isSelected: boolean) => void;
127
208
  className?: string;
128
209
  classNames?: CheckboxClassNames;
129
210
  value?: string;
211
+ name?: string;
130
212
  } & Omit<default_2.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> & default_2.RefAttributes<HTMLInputElement>>;
131
213
 
132
214
  declare type CheckboxClassNames = {
@@ -136,47 +218,65 @@ declare type CheckboxClassNames = {
136
218
  label?: string;
137
219
  };
138
220
 
139
- declare type CheckboxColor = 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
221
+ export declare type CheckboxColor = 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
140
222
 
141
- export declare const CheckboxGroup: default_2.FC<CheckboxGroupProps>;
223
+ export declare const CheckboxGroup: ({ label, children, description, errorMessage, isInvalid, orientation, className, value: controlledValue, defaultValue, onChange, isDisabled, isReadOnly, name, }: CheckboxGroupProps) => JSX.Element;
142
224
 
143
- declare type CheckboxGroupProps = {
144
- label?: string;
225
+ declare type CheckboxGroupContextValue = {
226
+ value: string[];
227
+ onChange: (value: string) => void;
228
+ isDisabled?: boolean;
229
+ isReadOnly?: boolean;
230
+ name?: string;
231
+ };
232
+
233
+ export declare type CheckboxGroupProps = {
234
+ label?: ReactNode;
145
235
  children: ReactNode;
146
- description?: string;
147
- errorMessage?: string;
236
+ description?: ReactNode;
237
+ errorMessage?: ReactNode;
148
238
  isInvalid?: boolean;
149
239
  orientation?: CheckboxOrientation;
150
240
  className?: string;
151
241
  value?: string[];
242
+ defaultValue?: string[];
152
243
  onChange?: (value: string[]) => void;
153
244
  isDisabled?: boolean;
154
245
  isReadOnly?: boolean;
246
+ name?: string;
155
247
  };
156
248
 
157
- declare type CheckboxOrientation = 'horizontal' | 'vertical';
249
+ export declare type CheckboxOrientation = 'horizontal' | 'vertical';
158
250
 
159
251
  export declare type CheckboxProps = {
160
252
  children?: ReactNode;
253
+ label?: ReactNode;
254
+ hint?: ReactNode;
161
255
  isSelected?: boolean;
162
256
  isIndeterminate?: boolean;
163
257
  isDisabled?: boolean;
164
258
  isReadOnly?: boolean;
165
259
  size?: CheckboxSize;
166
260
  color?: CheckboxColor;
261
+ customColor?: string;
167
262
  radius?: CheckboxRadius;
263
+ variant?: CheckboxVariant;
168
264
  lineThrough?: boolean;
169
265
  onlyIcon?: boolean;
170
266
  disableAnimation?: boolean;
267
+ customCheckIcon?: ReactNode;
171
268
  onChange?: (isSelected: boolean) => void;
172
269
  className?: string;
173
270
  classNames?: CheckboxClassNames;
174
271
  value?: string;
272
+ name?: string;
175
273
  } & Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'onChange'>;
176
274
 
177
- declare type CheckboxRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
275
+ export declare type CheckboxRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
276
+
277
+ export declare type CheckboxSize = 'sm' | 'md' | 'lg';
178
278
 
179
- declare type CheckboxSize = 'sm' | 'md' | 'lg';
279
+ export declare type CheckboxVariant = 'solid' | 'outline';
180
280
 
181
281
  export { ColumnDef }
182
282
 
@@ -187,6 +287,152 @@ declare type Control<TData> = {
187
287
  evento: (data: TData) => void;
188
288
  };
189
289
 
290
+ export declare const Drawer: ForwardRefExoticComponent<DrawerProps & RefAttributes<HTMLDivElement>>;
291
+
292
+ /**
293
+ * Intensidad del backdrop del drawer
294
+ * - 'transparente': Sin backdrop visible
295
+ * - 'sutil': Opacidad muy baja
296
+ * - 'normal': Opacidad estándar
297
+ * - 'intermedio': Opacidad alta
298
+ * - 'intenso': Opacidad máxima
299
+ */
300
+ export declare type DrawerBackdropVariant = 'transparente' | 'sutil' | 'normal' | 'intermedio' | 'intenso';
301
+
302
+ /**
303
+ * Posición del drawer en la pantalla
304
+ * - 'left': Aparece desde la izquierda (320px-800px)
305
+ * - 'right': Aparece desde la derecha (recomendado para menús)
306
+ * - 'top': Aparece desde arriba (320px-800px altura)
307
+ * - 'bottom': Aparece desde abajo (ideal para móviles)
308
+ */
309
+ export declare type DrawerPosition = 'left' | 'right' | 'top' | 'bottom';
310
+
311
+ export declare type DrawerProps = {
312
+ /**
313
+ * Si el drawer está abierto
314
+ * @example
315
+ * const [isOpen, setIsOpen] = useState(false);
316
+ * <Drawer isOpen={isOpen} onClose={() => setIsOpen(false)}>...</Drawer>
317
+ */
318
+ isOpen: boolean;
319
+ /**
320
+ * Callback cuando se cierra el drawer (Escape, backdrop click, botón X)
321
+ * @example
322
+ * onClose={() => setIsOpen(false)}
323
+ */
324
+ onClose: () => void;
325
+ /**
326
+ * Posición del drawer en la pantalla
327
+ * @default 'right'
328
+ * @example
329
+ * position="left" // Para menús laterales
330
+ */
331
+ position?: DrawerPosition;
332
+ /**
333
+ * Tamaño del drawer (ancho para left/right, alto para top/bottom)
334
+ * @default 'md'
335
+ * @example
336
+ * size="lg" // 640px de ancho
337
+ */
338
+ size?: DrawerSize;
339
+ /**
340
+ * Título del drawer
341
+ */
342
+ title?: string;
343
+ /**
344
+ * Si muestra el botón de cerrar (X) en esquina superior derecha
345
+ * @default true
346
+ */
347
+ showCloseButton?: boolean;
348
+ /**
349
+ * Si cierra al hacer click en el backdrop
350
+ * @default true
351
+ */
352
+ closeOnBackdropClick?: boolean;
353
+ /**
354
+ * Si cierra al presionar Escape
355
+ * @default true
356
+ */
357
+ closeOnEscape?: boolean;
358
+ /**
359
+ * Si previene el scroll del body cuando está abierto
360
+ * @default true
361
+ */
362
+ preventScroll?: boolean;
363
+ /**
364
+ * Contenido del header personalizado
365
+ */
366
+ header?: React.ReactNode;
367
+ /**
368
+ * Contenido del footer personalizado
369
+ */
370
+ footer?: React.ReactNode;
371
+ /**
372
+ * Contenido del drawer
373
+ */
374
+ children: React.ReactNode;
375
+ /**
376
+ * Clase CSS adicional
377
+ */
378
+ className?: string;
379
+ /**
380
+ * Clase CSS para el contenido
381
+ */
382
+ contentClassName?: string;
383
+ /**
384
+ * Estado de carga
385
+ * @default false
386
+ */
387
+ isLoading?: boolean;
388
+ /**
389
+ * Mensaje personalizado para el estado de carga
390
+ * @default 'Cargando...'
391
+ */
392
+ loadingMessage?: string;
393
+ /**
394
+ * Callback llamado cuando el drawer se abre
395
+ */
396
+ onOpen?: () => void;
397
+ /**
398
+ * Variante del backdrop
399
+ * @default 'normal'
400
+ */
401
+ backdropVariant?: DrawerBackdropVariant;
402
+ /**
403
+ * Radio de las esquinas del drawer
404
+ * @default 'none' para left/right, 'lg' para top/bottom
405
+ */
406
+ borderRadius?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
407
+ /**
408
+ * Si el drawer se puede redimensionar
409
+ * @default false
410
+ */
411
+ resizable?: boolean;
412
+ /**
413
+ * Contenedor donde renderizar el drawer (portal)
414
+ * - HTMLElement: renderiza en ese elemento
415
+ * - () => HTMLElement: función que retorna el elemento
416
+ * - undefined/null: renderiza directamente sin portal
417
+ */
418
+ getContainer?: HTMLElement | (() => HTMLElement) | null;
419
+ /**
420
+ * z-index del drawer
421
+ * @default var(--z-modal)
422
+ */
423
+ zIndex?: number;
424
+ };
425
+
426
+ /**
427
+ * Tamaño del drawer
428
+ * - 'sm': 320px (ideal para menús compactos)
429
+ * - 'md': 480px (default, balance perfecto)
430
+ * - 'lg': 640px (para contenido extenso)
431
+ * - 'xl': 800px (para dashboards)
432
+ * - 'full': 100% (ocupa toda la pantalla)
433
+ */
434
+ export declare type DrawerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
435
+
190
436
  /**
191
437
  * Verifica si las opciones están agrupadas
192
438
  * @template T - Tipo de las opciones
@@ -379,6 +625,16 @@ export declare function generarUsuariosPrueba(cantidad: number): Array<{
379
625
 
380
626
  export declare function GrabacionIcono(props: SVGProps<SVGSVGElement>): JSX.Element;
381
627
 
628
+ export declare const IconoCerrar: () => JSX.Element;
629
+
630
+ export declare const IconoDerecha: () => JSX.Element;
631
+
632
+ export declare const IconoFiltroAplicar: () => JSX.Element;
633
+
634
+ export declare const IconoFiltroLimpiar: () => JSX.Element;
635
+
636
+ export declare const IconoIzquierda: () => JSX.Element;
637
+
382
638
  export declare type InputColor = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
383
639
 
384
640
  export declare const InputDate: ForwardRefExoticComponent< {
@@ -1642,6 +1898,145 @@ export declare type InputVariant = 'bordered' | 'faded' | 'underlined' | 'ghost'
1642
1898
 
1643
1899
  export declare function MicrofonoIcono(props: SVGProps<SVGSVGElement>): JSX.Element;
1644
1900
 
1901
+ export declare const Modal: ForwardRefExoticComponent<ModalProps & RefAttributes<HTMLDivElement>>;
1902
+
1903
+ /**
1904
+ * Intensidad del backdrop del modal
1905
+ * - 'transparente': Sin backdrop visible
1906
+ * - 'sutil': Opacidad muy baja
1907
+ * - 'normal': Opacidad estándar
1908
+ * - 'intermedio': Opacidad alta
1909
+ * - 'intenso': Opacidad máxima
1910
+ */
1911
+ export declare type ModalBackdropVariant = 'transparente' | 'sutil' | 'normal' | 'intermedio' | 'intenso';
1912
+
1913
+ export declare type ModalProps = {
1914
+ /**
1915
+ * Si el modal está abierto
1916
+ * @example
1917
+ * const [isOpen, setIsOpen] = useState(false);
1918
+ * <Modal isOpen={isOpen} onClose={() => setIsOpen(false)}>...</Modal>
1919
+ */
1920
+ isOpen: boolean;
1921
+ /**
1922
+ * Callback cuando se cierra el modal (Escape, backdrop click, botón X)
1923
+ * @example
1924
+ * onClose={() => { console.log('Modal cerrado'); setIsOpen(false); }}
1925
+ */
1926
+ onClose: () => void;
1927
+ /**
1928
+ * Tamaño del modal (max-width)
1929
+ * @default 'md'
1930
+ * @example
1931
+ * size="formulario" // 1100px para formularios extensos
1932
+ */
1933
+ size?: ModalSize;
1934
+ /**
1935
+ * Título del modal
1936
+ */
1937
+ title?: string;
1938
+ /**
1939
+ * Icono del título (ReactNode, string o emoticon)
1940
+ * @default '📄' (cuando showIconTitle=true y titleIcon es undefined)
1941
+ */
1942
+ titleIcon?: React.ReactNode;
1943
+ /**
1944
+ * Si muestra el botón de volver (flecha '<')
1945
+ * @default true
1946
+ */
1947
+ showCloseButton?: boolean;
1948
+ /**
1949
+ * Si cierra al hacer click en el backdrop
1950
+ * @default true
1951
+ */
1952
+ closeOnBackdropClick?: boolean;
1953
+ /**
1954
+ * Si cierra al presionar Escape
1955
+ * @default true
1956
+ */
1957
+ closeOnEscape?: boolean;
1958
+ /**
1959
+ * Si previene el scroll del body cuando está abierto
1960
+ * @default true
1961
+ */
1962
+ preventScroll?: boolean;
1963
+ /**
1964
+ * Si está centrado verticalmente
1965
+ * @default true
1966
+ */
1967
+ isCentered?: boolean;
1968
+ /**
1969
+ * Contenido del header personalizado
1970
+ */
1971
+ header?: React.ReactNode;
1972
+ /**
1973
+ * Contenido del footer personalizado
1974
+ */
1975
+ footer?: React.ReactNode;
1976
+ /**
1977
+ * Contenido del modal
1978
+ */
1979
+ children: React.ReactNode;
1980
+ /**
1981
+ * Clase CSS adicional
1982
+ */
1983
+ className?: string;
1984
+ /**
1985
+ * Clase CSS para el contenido
1986
+ */
1987
+ contentClassName?: string;
1988
+ /**
1989
+ * Estado de carga
1990
+ * @default false
1991
+ */
1992
+ isLoading?: boolean;
1993
+ /**
1994
+ * Mensaje personalizado para el estado de carga
1995
+ * @default 'Cargando...'
1996
+ */
1997
+ loadingMessage?: string;
1998
+ /**
1999
+ * Variante del backdrop
2000
+ * @default 'normal'
2001
+ */
2002
+ backdropVariant?: ModalBackdropVariant;
2003
+ /**
2004
+ * Si muestra el icono al lado del título
2005
+ * @default true
2006
+ */
2007
+ showIconTitle?: boolean;
2008
+ /**
2009
+ * Callback cuando se abre el modal
2010
+ */
2011
+ onOpen?: () => void;
2012
+ };
2013
+
2014
+ /**
2015
+ * Tamaño del modal
2016
+ * - 'sm': 400px (alertas, confirmaciones)
2017
+ * - 'md': 560px (default, formularios básicos)
2018
+ * - 'lg': 720px (contenido extenso)
2019
+ * - 'xl': 960px (dashboards, tablas)
2020
+ * - 'formulario': 1100px (formularios complejos con múltiples columnas)
2021
+ * - 'full': 95% (ocupa casi toda la pantalla)
2022
+ */
2023
+ export declare type ModalSize = 'sm' | 'md' | 'lg' | 'xl' | 'formulario' | 'full';
2024
+
2025
+ export declare function ModalStack({ modals, onClose }: ModalStackProps): JSX.Element | null;
2026
+
2027
+ export declare type ModalStackItem = {
2028
+ id: string;
2029
+ title: string;
2030
+ titleIcon?: string;
2031
+ content: ReactNode;
2032
+ footer?: ReactNode;
2033
+ };
2034
+
2035
+ declare type ModalStackProps = {
2036
+ modals: ModalStackItem[];
2037
+ onClose: (id: string) => void;
2038
+ };
2039
+
1645
2040
  declare type NativeInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'color' | 'size' | 'onChange' | 'children' | 'type'>;
1646
2041
 
1647
2042
  declare type NativeInputProps_2 = Omit<InputHTMLAttributes<HTMLInputElement>, 'color' | 'size' | 'onChange' | 'children' | 'type' | 'value' | 'defaultValue' | 'min' | 'max' | 'step'>;
@@ -1699,17 +2094,17 @@ export declare function obtenerValorOpcion<T>(opcion: T, claveValor: string): st
1699
2094
  /**
1700
2095
  * Opción de grupo para categorización
1701
2096
  */
1702
- export declare interface OpcionGrupo<T> {
2097
+ export declare type OpcionGrupo<T> = {
1703
2098
  /** Nombre del grupo */
1704
2099
  grupo: string;
1705
2100
  /** Opciones dentro del grupo */
1706
2101
  opciones: T[];
1707
- }
2102
+ };
1708
2103
 
1709
2104
  /**
1710
2105
  * Opción plana con información de grupo
1711
2106
  */
1712
- export declare interface OpcionPlana<T> {
2107
+ export declare type OpcionPlana<T> = {
1713
2108
  /** Tipo: 'grupo' para encabezado, 'opcion' para ítem */
1714
2109
  tipo: 'grupo' | 'opcion';
1715
2110
  /** Datos de la opción (null si es encabezado de grupo) */
@@ -1718,7 +2113,57 @@ export declare interface OpcionPlana<T> {
1718
2113
  nombreGrupo?: string;
1719
2114
  /** Índice real en la lista plana */
1720
2115
  indice: number;
1721
- }
2116
+ };
2117
+
2118
+ export declare const PanelFiltros: ({ abierto, al_cerrar, al_aplicar, al_limpiar, titulo, backdropVariant, closeOnBackdropClick, allowBackdropInteraction, getContainer, children, }: PanelFiltrosProps) => JSX.Element | null;
2119
+
2120
+ export declare type PanelFiltrosProps = {
2121
+ /**
2122
+ * Si el panel está abierto
2123
+ */
2124
+ abierto: boolean;
2125
+ /**
2126
+ * Callback al cerrar el panel
2127
+ */
2128
+ al_cerrar: () => void;
2129
+ /**
2130
+ * Callback al aplicar filtros
2131
+ */
2132
+ al_aplicar: () => void;
2133
+ /**
2134
+ * Callback al limpiar filtros
2135
+ */
2136
+ al_limpiar: () => void;
2137
+ /**
2138
+ * Título del panel
2139
+ * @default 'Filtros'
2140
+ */
2141
+ titulo?: string;
2142
+ /**
2143
+ * Variante del backdrop
2144
+ * @default 'sutil'
2145
+ */
2146
+ backdropVariant?: 'transparente' | 'sutil' | 'normal' | 'intenso';
2147
+ /**
2148
+ * Cerrar al hacer click en el backdrop
2149
+ * @default true
2150
+ */
2151
+ closeOnBackdropClick?: boolean;
2152
+ /**
2153
+ * Permite interactuar con el contenido de fondo (backdrop transparente sin bloqueo)
2154
+ * @default false
2155
+ */
2156
+ allowBackdropInteraction?: boolean;
2157
+ /**
2158
+ * Contenedor donde renderizar el portal
2159
+ * @default document.body
2160
+ */
2161
+ getContainer?: HTMLElement | (() => HTMLElement) | null;
2162
+ /**
2163
+ * Contenido del panel (puede ser array para paginación)
2164
+ */
2165
+ children: ReactNode | ReactNode[];
2166
+ };
1722
2167
 
1723
2168
  /**
1724
2169
  * Parsea un string formateado y extrae el valor numérico
@@ -1753,23 +2198,190 @@ declare type Props = {
1753
2198
  idioma?: string;
1754
2199
  };
1755
2200
 
1756
- /**
1757
- * Redondea un número a una cantidad específica de decimales
1758
- * @param valor - Número a redondear
1759
- * @param decimales - Cantidad de decimales
1760
- * @returns Número redondeado
1761
- */
1762
- export declare function redondearDecimales(valor: number, decimales: number): number;
2201
+ export declare const Radio: default_2.NamedExoticComponent<{
2202
+ value: string;
2203
+ label?: string;
2204
+ description?: string;
2205
+ size?: RadioSize;
2206
+ color?: RadioColor;
2207
+ customColor?: string;
2208
+ variant?: RadioVariant;
2209
+ isDisabled?: boolean;
2210
+ isReadOnly?: boolean;
2211
+ isInvalid?: boolean;
2212
+ isRequired?: boolean;
2213
+ children?: default_2.ReactNode;
2214
+ className?: string;
2215
+ } & Omit<default_2.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & default_2.RefAttributes<HTMLInputElement>>;
1763
2216
 
1764
- /**
1765
- * Restringe un valor dentro de un rango mínimo y máximo
1766
- * @param valor - Valor a restringir
1767
- * @param min - Valor mínimo permitido
1768
- * @param max - Valor máximo permitido
1769
- * @returns El valor restringido dentro del rango
1770
- * @example
1771
- * restringirRango(150, 0, 100) // Retorna: 100
1772
- * restringirRango(-10, 0, 100) // Retorna: 0
2217
+ export declare type RadioColor = 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
2218
+
2219
+ export declare const RadioGroup: default_2.FC<RadioGroupProps>;
2220
+
2221
+ export declare type RadioGroupOrientation = 'vertical' | 'horizontal';
2222
+
2223
+ export declare type RadioGroupProps = {
2224
+ /**
2225
+ * Nombre del grupo (crítico para HTML)
2226
+ */
2227
+ name: string;
2228
+ /**
2229
+ * Valor seleccionado actual (modo controlado)
2230
+ */
2231
+ value?: string;
2232
+ /**
2233
+ * Valor por defecto (modo no controlado)
2234
+ */
2235
+ defaultValue?: string;
2236
+ /**
2237
+ * Callback cuando cambia la selección
2238
+ */
2239
+ onChange?: (value: string) => void;
2240
+ /**
2241
+ * Orientación del grupo
2242
+ * @default 'vertical'
2243
+ */
2244
+ orientation?: RadioGroupOrientation;
2245
+ /**
2246
+ * Label del grupo
2247
+ */
2248
+ label?: string;
2249
+ /**
2250
+ * Descripción del grupo
2251
+ */
2252
+ description?: string;
2253
+ /**
2254
+ * Si el grupo está deshabilitado
2255
+ */
2256
+ isDisabled?: boolean;
2257
+ /**
2258
+ * Si el grupo está en modo solo lectura
2259
+ */
2260
+ isReadOnly?: boolean;
2261
+ /**
2262
+ * Si el grupo es requerido
2263
+ */
2264
+ isRequired?: boolean;
2265
+ /**
2266
+ * Si el grupo tiene error de validación
2267
+ */
2268
+ isInvalid?: boolean;
2269
+ /**
2270
+ * Mensaje de error
2271
+ */
2272
+ errorMessage?: string;
2273
+ /**
2274
+ * Tamaño de los radio buttons
2275
+ */
2276
+ size?: RadioSize;
2277
+ /**
2278
+ * Color de los radio buttons
2279
+ */
2280
+ color?: RadioColor;
2281
+ /**
2282
+ * Color personalizado para todos los radios del grupo
2283
+ * Sobrescribe el color del tema si se especifica
2284
+ */
2285
+ customColor?: string;
2286
+ /**
2287
+ * Variante de los radio buttons
2288
+ */
2289
+ variant?: RadioVariant;
2290
+ /**
2291
+ * Alineación de los radios (horizontal)
2292
+ * @default 'flex-start'
2293
+ */
2294
+ justifyContent?: 'flex-start' | 'center' | 'flex-end';
2295
+ /**
2296
+ * Children (Radio components)
2297
+ */
2298
+ children: React.ReactNode;
2299
+ /**
2300
+ * Clase CSS adicional
2301
+ */
2302
+ className?: string;
2303
+ };
2304
+
2305
+ export declare type RadioProps = {
2306
+ /**
2307
+ * Valor del radio button
2308
+ */
2309
+ value: string;
2310
+ /**
2311
+ * Label del radio button
2312
+ */
2313
+ label?: string;
2314
+ /**
2315
+ * Descripción adicional (aparece debajo del label)
2316
+ */
2317
+ description?: string;
2318
+ /**
2319
+ * Tamaño del radio button
2320
+ * @default 'md'
2321
+ */
2322
+ size?: RadioSize;
2323
+ /**
2324
+ * Color del tema
2325
+ * @default 'primary'
2326
+ */
2327
+ color?: RadioColor;
2328
+ /**
2329
+ * Color personalizado (CSS color value)
2330
+ * Sobrescribe el color del tema si se especifica
2331
+ */
2332
+ customColor?: string;
2333
+ /**
2334
+ * Variante visual
2335
+ * @default 'default'
2336
+ */
2337
+ variant?: RadioVariant;
2338
+ /**
2339
+ * Si está deshabilitado
2340
+ */
2341
+ isDisabled?: boolean;
2342
+ /**
2343
+ * Si está en modo solo lectura
2344
+ */
2345
+ isReadOnly?: boolean;
2346
+ /**
2347
+ * Si tiene error de validación
2348
+ */
2349
+ isInvalid?: boolean;
2350
+ /**
2351
+ * Si es requerido
2352
+ */
2353
+ isRequired?: boolean;
2354
+ /**
2355
+ * Children (usado cuando no se pasa label)
2356
+ */
2357
+ children?: React.ReactNode;
2358
+ /**
2359
+ * Clase CSS adicional
2360
+ */
2361
+ className?: string;
2362
+ } & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'>;
2363
+
2364
+ export declare type RadioSize = 'sm' | 'md' | 'lg';
2365
+
2366
+ export declare type RadioVariant = 'default' | 'card';
2367
+
2368
+ /**
2369
+ * Redondea un número a una cantidad específica de decimales
2370
+ * @param valor - Número a redondear
2371
+ * @param decimales - Cantidad de decimales
2372
+ * @returns Número redondeado
2373
+ */
2374
+ export declare function redondearDecimales(valor: number, decimales: number): number;
2375
+
2376
+ /**
2377
+ * Restringe un valor dentro de un rango mínimo y máximo
2378
+ * @param valor - Valor a restringir
2379
+ * @param min - Valor mínimo permitido
2380
+ * @param max - Valor máximo permitido
2381
+ * @returns El valor restringido dentro del rango
2382
+ * @example
2383
+ * restringirRango(150, 0, 100) // Retorna: 100
2384
+ * restringirRango(-10, 0, 100) // Retorna: 0
1773
2385
  */
1774
2386
  export declare function restringirRango(valor: number, min?: number, max?: number): number;
1775
2387
 
@@ -1779,58 +2391,181 @@ export declare type ResultadoValidacion = {
1779
2391
  };
1780
2392
 
1781
2393
  /**
1782
- * Componente Select genérico con soporte para virtualización, búsqueda y selección múltiple.
2394
+ * Componente Select con discriminated unions y wrapper inteligente.
1783
2395
  *
1784
2396
  * @template T - Tipo de las opciones (string u objeto personalizado)
1785
2397
  *
1786
2398
  * @description
1787
- * Select implementa un patrón de "Hybrid Rendering":
1788
- * - En **desktop**: Usa un dropdown custom con Floating UI
1789
- * - En **móvil**: Usa el select nativo del SO (mejor UX táctil)
2399
+ * Este es el componente público que se debe usar en la aplicación.
2400
+ * Internamente delega el renderizado a SelectBase pero añade la capa
2401
+ * inteligente de conversión de tipos.
1790
2402
  *
1791
- * ### Características principales:
1792
- * - ✅ Virtualización para listas de +10,000 opciones
1793
- * - ✅ Búsqueda/filtrado con función personalizable
1794
- * - ✅ Selección simple o múltiple
1795
- * - ✅ Soporte para opciones agrupadas
1796
- * - ✅ Validación integrada
1797
- * - ✅ Navegación por teclado completa
1798
- * - ✅ Typeahead (búsqueda por tecla)
2403
+ * ### Ventajas de esta arquitectura:
2404
+ * - ✅ Separación de responsabilidades (Clean Architecture)
2405
+ * - ✅ SelectBase es 100% reutilizable
2406
+ * - ✅ Tipado estricto sin 'any'
2407
+ * - ✅ Fácil testing (puedes testear SelectBase aislado)
2408
+ * - ✅ Retrocompatibilidad total
2409
+ *
2410
+ * @see {@link SelectBase} para la implementación visual
2411
+ * @see {@link SmartSelectProps} para los tipos disponibles
2412
+ * @see {@link SelectRef} para métodos imperativos
2413
+ */
2414
+ export declare const Select: <T extends string | Record<string, unknown>>(props: SmartSelectProps<T> & {
2415
+ ref?: React.ForwardedRef<SelectRef>;
2416
+ }) => React.ReactElement;
2417
+
2418
+ /**
2419
+ * Props para Select con objetos múltiples (retorna objetos completos).
1799
2420
  *
1800
2421
  * @example
1801
2422
  * ```tsx
1802
- * // Básico con strings
1803
- * <Select options={['Opción 1', 'Opción 2']} />
2423
+ * <Select
2424
+ * options={usuarios}
2425
+ * value={usuariosSeleccionados}
2426
+ * optionValueKey="id"
2427
+ * devolverObjeto
2428
+ * isMultiple
2429
+ * onChange={(usuarios) => {
2430
+ * console.log(usuarios); // Usuario[]
2431
+ * }}
2432
+ * />
2433
+ * ```
2434
+ */
2435
+ declare type SelectMultiObjectFullProps<T> = BaseSelectProps<T> & WrapperProps & {
2436
+ options: T[];
2437
+ value?: T[];
2438
+ onChange?: (value: T[]) => void;
2439
+ optionValueKey: keyof T;
2440
+ optionLabelKey?: keyof T;
2441
+ devolverObjeto: true;
2442
+ isMultiple: true;
2443
+ };
2444
+
2445
+ /**
2446
+ * Props para Select con objetos en modo múltiple (retorna IDs).
1804
2447
  *
1805
- * // Con objetos
2448
+ * @example
2449
+ * ```tsx
1806
2450
  * <Select
1807
2451
  * options={usuarios}
1808
- * optionLabelKey="nombre"
2452
+ * value={['1', '2', '3']} // Array de IDs
1809
2453
  * optionValueKey="id"
2454
+ * isMultiple
2455
+ * onChange={(ids) => console.log(ids)} // ['1', '2', '3']
1810
2456
  * />
2457
+ * ```
2458
+ */
2459
+ declare type SelectMultiObjectIdProps<T> = BaseSelectProps<T> & WrapperProps & {
2460
+ options: T[];
2461
+ value?: Array<string | number>;
2462
+ onChange?: (value: Array<string | number>) => void;
2463
+ optionValueKey: keyof T;
2464
+ optionLabelKey?: keyof T;
2465
+ devolverObjeto?: false;
2466
+ isMultiple: true;
2467
+ };
2468
+
2469
+ /**
2470
+ * Props para Select con opciones de tipo string (modo múltiple).
1811
2471
  *
1812
- * // Multi-selección con búsqueda
2472
+ * @example
2473
+ * ```tsx
2474
+ * const colores = ['Rojo', 'Verde', 'Azul'];
1813
2475
  * <Select
1814
- * options={paises}
2476
+ * options={colores}
2477
+ * value={['Rojo', 'Verde']}
1815
2478
  * isMultiple
1816
- * isSearchable
1817
- * placeholder="Seleccione países..."
2479
+ * onChange={(seleccionados) => console.log(seleccionados)} // string[]
1818
2480
  * />
2481
+ * ```
2482
+ */
2483
+ declare type SelectMultiStringProps = BaseSelectProps<string> & WrapperProps & {
2484
+ options: string[];
2485
+ value?: string[];
2486
+ onChange?: (value: string[]) => void;
2487
+ optionValueKey?: never;
2488
+ optionLabelKey?: never;
2489
+ devolverObjeto?: never;
2490
+ isMultiple: true;
2491
+ };
2492
+
2493
+ /**
2494
+ * Props para Select con objetos (retorna objeto completo).
1819
2495
  *
1820
- * // Lista virtualizada
2496
+ * @description
2497
+ * Modo alternativo donde `onChange` devuelve el objeto completo en lugar del ID.
2498
+ * Útil cuando necesitas acceder a otras propiedades sin hacer búsquedas.
2499
+ *
2500
+ * @example
2501
+ * ```tsx
1821
2502
  * <Select
1822
- * options={listaGrande}
1823
- * isVirtualized
1824
- * estimatedOptionHeight={40}
2503
+ * options={usuarios}
2504
+ * value={usuarioSeleccionado} // Pasas el objeto
2505
+ * optionValueKey="id"
2506
+ * devolverObjeto // Activa este modo
2507
+ * onChange={(usuario) => {
2508
+ * console.log(usuario); // { id: '123', nombre: 'Ana', ... }
2509
+ * // Tienes acceso directo a todas las propiedades
2510
+ * }}
1825
2511
  * />
1826
2512
  * ```
2513
+ */
2514
+ declare type SelectObjectFullProps<T> = BaseSelectProps<T> & WrapperProps & {
2515
+ options: T[];
2516
+ /** Recibe el objeto completo */
2517
+ value?: T | null;
2518
+ /** Devuelve el objeto completo */
2519
+ onChange?: (value: T | null) => void;
2520
+ optionValueKey: keyof T;
2521
+ optionLabelKey?: keyof T;
2522
+ /** Debe ser true explícitamente */
2523
+ devolverObjeto: true;
2524
+ isMultiple?: false;
2525
+ };
2526
+
2527
+ /**
2528
+ * Props para Select con opciones de tipo objeto (retorna ID).
2529
+ *
2530
+ * @template T - Tipo del objeto de la opción
1827
2531
  *
1828
- * @see {@link SelectProps} para la lista completa de props
1829
- * @see {@link SelectRef} para los métodos imperativos disponibles
2532
+ * @description
2533
+ * Este es el modo más común para stores/APIs.
2534
+ * - El `value` que recibe es el ID (string | number)
2535
+ * - El `onChange` devuelve el ID
2536
+ * - `optionValueKey` es **obligatorio**
2537
+ *
2538
+ * @example
2539
+ * ```tsx
2540
+ * interface Usuario { id: string; nombre: string; email: string; }
2541
+ * const usuarios: Usuario[] = [...];
2542
+ *
2543
+ * <Select
2544
+ * options={usuarios}
2545
+ * value="123" // Pasas el ID
2546
+ * optionValueKey="id" // Obligatorio
2547
+ * optionLabelKey="nombre"
2548
+ * onChange={(id) => {
2549
+ * console.log(id); // '123' (string)
2550
+ * // Luego buscas el objeto si lo necesitas
2551
+ * }}
2552
+ * />
2553
+ * ```
1830
2554
  */
1831
- export declare const Select: <T = string>(props: SelectProps<T> & {
1832
- ref?: React.ForwardedRef<SelectRef>;
1833
- }) => React.ReactElement;
2555
+ declare type SelectObjectIdProps<T> = BaseSelectProps<T> & WrapperProps & {
2556
+ options: T[];
2557
+ /** Recibe el ID como string o number */
2558
+ value?: string | number | null;
2559
+ /** Devuelve el ID */
2560
+ onChange?: (value: string | number | null) => void;
2561
+ /** Obligatorio cuando son objetos */
2562
+ optionValueKey: keyof T;
2563
+ /** Opcional */
2564
+ optionLabelKey?: keyof T;
2565
+ /** Debe ser false o no definido */
2566
+ devolverObjeto?: false;
2567
+ isMultiple?: false;
2568
+ };
1834
2569
 
1835
2570
  /**
1836
2571
  * Tipo de opción del Select.
@@ -1861,14 +2596,14 @@ export declare type SelectOption<T = string> = T extends string ? string : T & {
1861
2596
  * Este estado se pasa a `renderOption` para permitir
1862
2597
  * estilos condicionales basados en la interacción.
1863
2598
  */
1864
- export declare interface SelectOptionState {
2599
+ export declare type SelectOptionState = {
1865
2600
  /** true si la opción está actualmente seleccionada */
1866
2601
  isSelected: boolean;
1867
2602
  /** true si la opción tiene el foco (hover o navegación por teclado) */
1868
2603
  isActive: boolean;
1869
2604
  /** true si la opción está deshabilitada */
1870
2605
  isDisabled: boolean;
1871
- }
2606
+ };
1872
2607
 
1873
2608
  /**
1874
2609
  * Props principales del componente Select.
@@ -1911,7 +2646,7 @@ export declare interface SelectOptionState {
1911
2646
  * />
1912
2647
  * ```
1913
2648
  */
1914
- export declare interface SelectProps<T = string> {
2649
+ export declare type SelectProps<T = string> = {
1915
2650
  /**
1916
2651
  * Lista de opciones disponibles para seleccionar.
1917
2652
  *
@@ -2192,6 +2927,40 @@ export declare interface SelectProps<T = string> {
2192
2927
  * @default false
2193
2928
  */
2194
2929
  isMultiple?: boolean;
2930
+ /**
2931
+ * Controla si se muestran todos los chips en modo multi-selección.
2932
+ *
2933
+ * - `true`: Renderiza todos los chips seleccionados, permitiendo que
2934
+ * el trigger crezca verticalmente con wrapping (múltiples líneas).
2935
+ * - `false`: Colapsa después de 2 chips y muestra contador "+N" (comportamiento default).
2936
+ *
2937
+ * Solo aplica cuando `isMultiple={true}`.
2938
+ *
2939
+ * @default false
2940
+ *
2941
+ * @example
2942
+ * ```tsx
2943
+ * // Mostrar solo 2 chips + contador (default)
2944
+ * <Select
2945
+ * options={opciones}
2946
+ * isMultiple
2947
+ * value={[opt1, opt2, opt3, opt4]}
2948
+ * />
2949
+ * // Renderiza: [Chip1] [Chip2] +2
2950
+ *
2951
+ * // Mostrar todos los chips (crece verticalmente)
2952
+ * <Select
2953
+ * options={opciones}
2954
+ * isMultiple
2955
+ * mostrarTodos
2956
+ * value={[opt1, opt2, opt3, opt4]}
2957
+ * />
2958
+ * // Renderiza:
2959
+ * // [Chip1] [Chip2] [Chip3]
2960
+ * // [Chip4]
2961
+ * ```
2962
+ */
2963
+ mostrarTodos?: boolean;
2195
2964
  /**
2196
2965
  * Habilita campo de búsqueda.
2197
2966
  *
@@ -2341,7 +3110,7 @@ export declare interface SelectProps<T = string> {
2341
3110
  * Por defecto se renderiza al final del `<body>`.
2342
3111
  */
2343
3112
  portalContainer?: HTMLElement | null;
2344
- }
3113
+ };
2345
3114
 
2346
3115
  /**
2347
3116
  * Métodos expuestos vía ref del componente Select.
@@ -2364,7 +3133,7 @@ export declare interface SelectProps<T = string> {
2364
3133
  * selectRef.current?.focus();
2365
3134
  * ```
2366
3135
  */
2367
- export declare interface SelectRef {
3136
+ export declare type SelectRef = {
2368
3137
  /** Enfoca el trigger del select */
2369
3138
  focus: () => void;
2370
3139
  /** Quita el focus del trigger */
@@ -2375,7 +3144,41 @@ export declare interface SelectRef {
2375
3144
  close: () => void;
2376
3145
  /** Limpia la selección (null en simple, [] en múltiple) */
2377
3146
  clear: () => void;
2378
- }
3147
+ };
3148
+
3149
+ /**
3150
+ * Props para Select con opciones de tipo string (modo simple).
3151
+ *
3152
+ * @description
3153
+ * Cuando las opciones son strings, no se necesitan optionValueKey ni optionLabelKey.
3154
+ * El onChange recibe directamente el string seleccionado o null.
3155
+ *
3156
+ * @example
3157
+ * ```tsx
3158
+ * const frutas = ['Manzana', 'Pera', 'Naranja'];
3159
+ * <Select
3160
+ * options={frutas}
3161
+ * value="Manzana"
3162
+ * onChange={(fruta) => console.log(fruta)} // 'Manzana' | null
3163
+ * />
3164
+ * ```
3165
+ */
3166
+ declare type SelectStringProps = BaseSelectProps<string> & WrapperProps & {
3167
+ /** Lista de strings */
3168
+ options: string[];
3169
+ /** Valor seleccionado actual */
3170
+ value?: string | null;
3171
+ /** Callback al cambiar selección */
3172
+ onChange?: (value: string | null) => void;
3173
+ /** No debe existir en modo string */
3174
+ optionValueKey?: never;
3175
+ /** No debe existir en modo string */
3176
+ optionLabelKey?: never;
3177
+ /** No aplica en modo string */
3178
+ devolverObjeto?: never;
3179
+ /** Debe ser false o no definido */
3180
+ isMultiple?: false;
3181
+ };
2379
3182
 
2380
3183
  declare type SinDatosProps = {
2381
3184
  alAgregarRegistro?: () => void;
@@ -2384,8 +3187,31 @@ declare type SinDatosProps = {
2384
3187
  etiquetaAccion?: string;
2385
3188
  };
2386
3189
 
3190
+ /**
3191
+ * Unión discriminada de todos los tipos posibles del Select.
3192
+ *
3193
+ * @description
3194
+ * TypeScript inferirá automáticamente qué interfaz usar según:
3195
+ * - El tipo de `options` (string[] vs objeto[])
3196
+ * - El valor de `isMultiple`
3197
+ * - El valor de `devolverObjeto`
3198
+ * - La presencia de `optionValueKey`
3199
+ *
3200
+ * Esto fuerza el uso correcto en tiempo de compilación.
3201
+ */
3202
+ declare type SmartSelectProps<T> = SelectStringProps | SelectMultiStringProps | SelectObjectIdProps<T> | SelectMultiObjectIdProps<T> | SelectObjectFullProps<T> | SelectMultiObjectFullProps<T>;
3203
+
2387
3204
  export declare function SonidoIcono(props: SVGProps<SVGSVGElement>): JSX.Element;
2388
3205
 
3206
+ export declare type TablaContextType<TData extends object = object> = {
3207
+ state: TablaState<TData>;
3208
+ todasLasColumnas: Column<TData, unknown>[];
3209
+ etiquetaColumna: (id: string) => string;
3210
+ restaurarConfiguracion: () => void;
3211
+ cambiarPageSize: (valor: number) => void;
3212
+ cambiarOrdenColumnas: (actualizador: ColumnOrderState | ((prev: ColumnOrderState) => ColumnOrderState)) => void;
3213
+ };
3214
+
2389
3215
  /**
2390
3216
  * Componente principal de tabla de datos
2391
3217
  *
@@ -2496,6 +3322,15 @@ export declare type TablaDatosProps<TData extends object> = {
2496
3322
  sinDatosProps?: SinDatosProps;
2497
3323
  };
2498
3324
 
3325
+ export declare type TablaState<TData extends object = object> = {
3326
+ ordenColumnas: ColumnOrderState;
3327
+ table: Table<TData>;
3328
+ columns: ColumnDef<TData>[];
3329
+ primerasColumnas: [string, string];
3330
+ inputBusqueda: string;
3331
+ setInputBusqueda: (valor: string) => void;
3332
+ } & Omit<TablaDatosProps<TData>, 'data' | 'columns' | 'primerasColumnas' | 'id'>;
3333
+
2499
3334
  export declare const TextArea: ForwardRefExoticComponent< {
2500
3335
  variant?: InputVariant;
2501
3336
  color?: InputColor;
@@ -2895,16 +3730,222 @@ export declare type TextAreaProps = {
2895
3730
  children?: ReactNode;
2896
3731
  } & NativeTextareaProps;
2897
3732
 
3733
+ declare type TipoTransicion = 'desvanecerDeslizar' | 'escalar';
3734
+
3735
+ export declare const Toggle: ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "onChange"> & {
3736
+ isSelected?: boolean;
3737
+ defaultSelected?: boolean;
3738
+ onChange?: (isSelected: boolean) => void;
3739
+ label?: string;
3740
+ description?: string;
3741
+ size?: ToggleSize;
3742
+ color?: ToggleColor;
3743
+ customColor?: string;
3744
+ isDisabled?: boolean;
3745
+ isReadOnly?: boolean;
3746
+ isInvalid?: boolean;
3747
+ isRequired?: boolean;
3748
+ showIcons?: boolean;
3749
+ variant?: ToggleVariant;
3750
+ labelPlacement?: "left" | "right";
3751
+ labelPosition?: "inline" | "top";
3752
+ justifyEnd?: boolean;
3753
+ children?: React.ReactNode;
3754
+ className?: string;
3755
+ } & RefAttributes<HTMLInputElement>>;
3756
+
3757
+ export declare type ToggleColor = 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
3758
+
3759
+ export declare type ToggleProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'onChange'> & {
3760
+ /**
3761
+ * Si el toggle está activado (modo controlado)
3762
+ */
3763
+ isSelected?: boolean;
3764
+ /**
3765
+ * Si está activado por defecto (modo no controlado)
3766
+ * @default false
3767
+ */
3768
+ defaultSelected?: boolean;
3769
+ /**
3770
+ * Callback cuando cambia el estado
3771
+ */
3772
+ onChange?: (isSelected: boolean) => void;
3773
+ /**
3774
+ * Label del toggle
3775
+ */
3776
+ label?: string;
3777
+ /**
3778
+ * Descripción adicional
3779
+ */
3780
+ description?: string;
3781
+ /**
3782
+ * Tamaño del toggle
3783
+ * @default 'md'
3784
+ */
3785
+ size?: ToggleSize;
3786
+ /**
3787
+ * Color del tema
3788
+ * @default 'primary'
3789
+ */
3790
+ color?: ToggleColor;
3791
+ /**
3792
+ * Color personalizado (CSS color value)
3793
+ * Sobrescribe el color del tema si se especifica
3794
+ */
3795
+ customColor?: string;
3796
+ /**
3797
+ * Si está deshabilitado
3798
+ */
3799
+ isDisabled?: boolean;
3800
+ /**
3801
+ * Si está en modo solo lectura
3802
+ */
3803
+ isReadOnly?: boolean;
3804
+ /**
3805
+ * Si tiene error de validación
3806
+ */
3807
+ isInvalid?: boolean;
3808
+ /**
3809
+ * Si es requerido
3810
+ */
3811
+ isRequired?: boolean;
3812
+ /**
3813
+ * Mostrar iconos de check/x dentro del toggle
3814
+ * @default false
3815
+ */
3816
+ showIcons?: boolean;
3817
+ /**
3818
+ * Variante del toggle
3819
+ * @default 'default'
3820
+ */
3821
+ variant?: ToggleVariant;
3822
+ /**
3823
+ * Posición del label horizontal
3824
+ * @default 'right'
3825
+ */
3826
+ labelPlacement?: 'left' | 'right';
3827
+ /**
3828
+ * Posición del label vertical
3829
+ * @default 'inline'
3830
+ */
3831
+ labelPosition?: 'inline' | 'top';
3832
+ /**
3833
+ * Alinear toggle al extremo en layouts (útil para Settings)
3834
+ * @default false
3835
+ */
3836
+ justifyEnd?: boolean;
3837
+ /**
3838
+ * Children (usado cuando no se pasa label)
3839
+ */
3840
+ children?: React.ReactNode;
3841
+ /**
3842
+ * Clase CSS adicional
3843
+ */
3844
+ className?: string;
3845
+ };
3846
+
3847
+ export declare type ToggleSize = 'sm' | 'md' | 'lg';
3848
+
3849
+ export declare type ToggleVariant = 'default' | 'moon';
3850
+
3851
+ export declare function Tooltip({ content, children, placement, variant, size, offset: offsetValue, delayShow, delayHide, isDisabled, showArrow, maxWidth, isInteractive, className, onOpen, onClose, isOpen: controlledIsOpen, onOpenChange, }: TooltipProps): JSX.Element;
3852
+
3853
+ export declare type TooltipPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
3854
+
3855
+ export declare type TooltipProps = {
3856
+ /**
3857
+ * Contenido del tooltip
3858
+ */
3859
+ content: React.ReactNode;
3860
+ /**
3861
+ * Elemento trigger (children)
3862
+ */
3863
+ children: React.ReactElement;
3864
+ /**
3865
+ * Posición del tooltip relativa al trigger
3866
+ * @default 'top'
3867
+ */
3868
+ placement?: TooltipPlacement;
3869
+ /**
3870
+ * Variante de color/estilo del tooltip
3871
+ * @default 'default'
3872
+ */
3873
+ variant?: TooltipVariant;
3874
+ /**
3875
+ * Tamaño del tooltip
3876
+ * @default 'md'
3877
+ */
3878
+ size?: TooltipSize;
3879
+ /**
3880
+ * Offset (distancia) desde el trigger en píxeles
3881
+ * @default 8
3882
+ */
3883
+ offset?: number;
3884
+ /**
3885
+ * Delay antes de mostrar el tooltip (ms)
3886
+ * @default 200
3887
+ */
3888
+ delayShow?: number;
3889
+ /**
3890
+ * Delay antes de ocultar el tooltip (ms)
3891
+ * @default 0
3892
+ */
3893
+ delayHide?: number;
3894
+ /**
3895
+ * Si el tooltip está deshabilitado
3896
+ * @default false
3897
+ */
3898
+ isDisabled?: boolean;
3899
+ /**
3900
+ * Si muestra la flecha apuntando al trigger
3901
+ * @default false
3902
+ */
3903
+ showArrow?: boolean;
3904
+ /**
3905
+ * Ancho máximo del tooltip (CSS)
3906
+ * @default '320px'
3907
+ */
3908
+ maxWidth?: string;
3909
+ /**
3910
+ * Si el tooltip es interactivo (se puede hacer hover sobre él)
3911
+ * @default false
3912
+ */
3913
+ isInteractive?: boolean;
3914
+ /**
3915
+ * Clase CSS adicional para el tooltip
3916
+ */
3917
+ className?: string;
3918
+ /**
3919
+ * Callback cuando se abre el tooltip
3920
+ */
3921
+ onOpen?: () => void;
3922
+ /**
3923
+ * Callback cuando se cierra el tooltip
3924
+ */
3925
+ onClose?: () => void;
3926
+ /**
3927
+ * Si el tooltip se controla manualmente
3928
+ */
3929
+ isOpen?: boolean;
3930
+ /**
3931
+ * Callback para cambiar el estado controlado
3932
+ */
3933
+ onOpenChange?: (isOpen: boolean) => void;
3934
+ };
3935
+
3936
+ export declare type TooltipSize = 'sm' | 'md' | 'lg';
3937
+
3938
+ export declare type TooltipVariant = 'default' | 'dark' | 'light' | 'brand' | 'success' | 'warning' | 'danger' | 'info';
3939
+
2898
3940
  export declare function Transicion({ mostrar, children, tipo, className, ...resto }: TransicionProps): JSX.Element | null;
2899
3941
 
2900
3942
  export declare type TransicionProps = {
2901
3943
  mostrar: boolean;
2902
3944
  children: default_2.ReactNode;
2903
- } & VariantProps<typeof transicionVariants> & Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
3945
+ tipo?: TipoTransicion;
3946
+ } & Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
2904
3947
 
2905
- declare const transicionVariants: (props?: ({
2906
- tipo?: "desvanecerDeslizar" | "escalar" | null | undefined;
2907
- } & ClassProp) | undefined) => string;
3948
+ export declare const useCheckboxGroupContext: () => CheckboxGroupContextValue | null;
2908
3949
 
2909
3950
  export declare function useReconocimientoVoz({ value, onChange, isDisabled, isReadOnly, onDictadoCompleto, idioma, }: Props): {
2910
3951
  puedeHablar: boolean;
@@ -2918,8 +3959,52 @@ export declare function useReconocimientoVoz({ value, onChange, isDisabled, isRe
2918
3959
  detenerDictado: () => void;
2919
3960
  };
2920
3961
 
3962
+ /**
3963
+ * Hook para acceder al contexto de TablaDatos con tipado genérico
3964
+ * @throws Error si se usa fuera de TablaDatosProvider
3965
+ */
3966
+ export declare function useTablaContext<TData extends object>(): TablaContextType<TData>;
3967
+
3968
+ /**
3969
+ * Hook para acceder al contexto de forma segura (puede ser null)
3970
+ */
3971
+ export declare function useTablaContextSafe<TData extends object>(): TablaContextType<TData> | null;
3972
+
2921
3973
  export declare type ValidationResult = boolean | string | {
2922
3974
  message?: string;
2923
3975
  } | null | undefined;
2924
3976
 
3977
+ /**
3978
+ * Props adicionales del wrapper inteligente.
3979
+ */
3980
+ declare type WrapperProps = {
3981
+ /**
3982
+ * Controla el formato del valor retornado en onChange.
3983
+ *
3984
+ * - `true`: Devuelve el objeto completo cuando se selecciona una opción
3985
+ * - `false`: Devuelve solo el ID/valor primitivo (string | number)
3986
+ *
3987
+ * @default false
3988
+ *
3989
+ * @example
3990
+ * ```tsx
3991
+ * // devolverObjeto={false} (default)
3992
+ * <Select
3993
+ * options={usuarios}
3994
+ * optionValueKey="id"
3995
+ * onChange={(valor) => console.log(valor)} // '123' (string)
3996
+ * />
3997
+ *
3998
+ * // devolverObjeto={true}
3999
+ * <Select
4000
+ * options={usuarios}
4001
+ * optionValueKey="id"
4002
+ * devolverObjeto
4003
+ * onChange={(valor) => console.log(valor)} // { id: '123', nombre: 'Ana' }
4004
+ * />
4005
+ * ```
4006
+ */
4007
+ devolverObjeto?: boolean;
4008
+ };
4009
+
2925
4010
  export { }