corekit-ui 0.2.42 → 0.2.43

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
@@ -36,6 +36,8 @@ import { TouchEventHandler } from 'react';
36
36
  import { TransitionEventHandler } from 'react';
37
37
  import { UIEventHandler } from 'react';
38
38
  import { WheelEventHandler } from 'react';
39
+ import { WorkBook } from 'xlsx-js-style';
40
+ import { xlsxJsStyle } from 'xlsx-js-style';
39
41
 
40
42
  declare type AccionFila<TData> = {
41
43
  /** Identificador único de la acción */
@@ -385,13 +387,11 @@ export declare const Boton: ForwardRefExoticComponent<Omit<BotonProps, "ref"> &
385
387
  export declare type BotonProps = {
386
388
  /** Estilo visual del botón */
387
389
  variant?: 'solid' | 'bordered' | 'ghost' | 'light' | 'light-active' | 'faded' | 'shadow' | 'outline' | 'muted' | 'contrast';
388
- /** Activa una animación de resorte suave al hacer clic @default false */
389
- animationTap?: boolean;
390
390
  /** Color temático del botón */
391
391
  color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info';
392
- /** Tamaño del botón: xs (32px), sm (36px), md (44px), lg (52px) */
392
+ /** Alto del botón: xs (28px), sm (32px), md (36px), lg (40px) */
393
393
  size?: 'xs' | 'sm' | 'md' | 'lg';
394
- /** Radio de borde */
394
+ /** Radio de esquina: none (0), sm (6px), md (8px), lg (12px), full (píldora) */
395
395
  radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
396
396
  /** Ancho completo del contenedor */
397
397
  fullWidth?: boolean;
@@ -405,7 +405,7 @@ export declare type BotonProps = {
405
405
  isIconOnly?: boolean;
406
406
  /** Deshabilita el efecto ripple */
407
407
  disableRipple?: boolean;
408
- /** Deshabilita animaciones (tap scale, etc) */
408
+ /** Deja el botón estático: sin transiciones de hover/estado. El ripple se controla aparte con `disableRipple`. @default false */
409
409
  disableAnimation?: boolean;
410
410
  /** Color personalizado (cualquier valor CSS: hex, rgb, hsl, etc) */
411
411
  customColor?: string;
@@ -659,6 +659,13 @@ export declare function combinar(...validadores: ValidadorCampo[]): ValidadorCam
659
659
  */
660
660
  export declare type CondicionCampo = string | string[] | ((valor: string) => boolean);
661
661
 
662
+ export declare function construirFilasReporte<TRow extends Record<string, unknown>>({ filasProcesadas, campos, identificadores, }: Omit<OpcionesReporte<TRow>, 'nombreArchivo'>): {
663
+ columnas: string[];
664
+ filas: FilaReporte[];
665
+ };
666
+
667
+ export declare function construirLibro<TRow extends Record<string, unknown>>(XLSX: XlsxStyle, opciones: Omit<OpcionesReporte<TRow>, 'nombreArchivo'>): WorkBook | null;
668
+
662
669
  /**
663
670
  * ContextMenu
664
671
  *
@@ -719,6 +726,8 @@ export declare type ControlVolumenProps = {
719
726
  */
720
727
  export declare function correoElectronico(mensaje?: string): ValidadorCampo;
721
728
 
729
+ export declare function descargarReporte<TRow extends Record<string, unknown>>(opciones: OpcionesReporte<TRow>): Promise<boolean>;
730
+
722
731
  export declare const Drawer: ForwardRefExoticComponent<DrawerProps & RefAttributes<HTMLDivElement>>;
723
732
 
724
733
  /**
@@ -1344,6 +1353,15 @@ export declare type FilaProcesada<TRow extends Record<string, unknown>> = {
1344
1353
  valida: boolean;
1345
1354
  };
1346
1355
 
1356
+ export declare type FilaReporte = {
1357
+ fila: number;
1358
+ identificadores: string[];
1359
+ errores: number;
1360
+ advertencias: number;
1361
+ estado: string;
1362
+ detalle: string;
1363
+ };
1364
+
1347
1365
  export declare type FileErrorKind = 'network' | 'too-large' | 'invalid-type' | 'duplicate';
1348
1366
 
1349
1367
  export declare type FileKind = 'image' | 'pdf' | 'excel' | 'archive' | 'generic';
@@ -3335,6 +3353,9 @@ export declare function no(validador: ValidadorCampo, mensaje: string): Validado
3335
3353
  */
3336
3354
  export declare function noFechaFutura(mensaje?: string): ValidadorCampo;
3337
3355
 
3356
+ /** Nombre del archivo del reporte a partir del nombre original. */
3357
+ export declare function nombreReporte(nombreArchivo?: string): string;
3358
+
3338
3359
  /** Normaliza un nombre de columna: trim + minúsculas + sin acentos */
3339
3360
  export declare const normClave: (s: string) => string;
3340
3361
 
@@ -3380,6 +3401,13 @@ export declare type OpcionesLectura = {
3380
3401
  nombreHoja?: string;
3381
3402
  };
3382
3403
 
3404
+ export declare type OpcionesReporte<TRow extends Record<string, unknown>> = {
3405
+ filasProcesadas: FilaProcesada<TRow>[];
3406
+ campos: CampoImport<TRow>[];
3407
+ identificadores?: string[];
3408
+ nombreArchivo?: string;
3409
+ };
3410
+
3383
3411
  /**
3384
3412
  * @fileoverview Funciones utilitarias para el componente Select
3385
3413
  * @module Select/funciones
@@ -5955,4 +5983,6 @@ declare type WrapperProps = {
5955
5983
  devolverObjeto?: boolean;
5956
5984
  };
5957
5985
 
5986
+ declare type XlsxStyle = xlsxJsStyle;
5987
+
5958
5988
  export { }