corekit-ui 0.1.21 → 0.1.24

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.
Files changed (118) hide show
  1. package/README.md +41 -39
  2. package/dist/corekit-ui.css +1 -1
  3. package/dist/index.d.ts +4231 -21
  4. package/dist/index.js +5649 -5149
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.umd.cjs +6 -6
  7. package/dist/index.umd.cjs.map +1 -1
  8. package/package.json +143 -132
  9. package/dist/animations/Transiciones.d.ts +0 -9
  10. package/dist/animations/index.d.ts +0 -1
  11. package/dist/badge/Badge.d.ts +0 -3
  12. package/dist/badge/index.d.ts +0 -2
  13. package/dist/badge/types.d.ts +0 -62
  14. package/dist/boton/Boton.d.ts +0 -2
  15. package/dist/boton/index.d.ts +0 -2
  16. package/dist/boton/typesButton.d.ts +0 -35
  17. package/dist/checkbox/Checkbox.d.ts +0 -25
  18. package/dist/checkbox/CheckboxContext.d.ts +0 -3
  19. package/dist/checkbox/CheckboxGroup.d.ts +0 -11
  20. package/dist/checkbox/index.d.ts +0 -4
  21. package/dist/checkbox/types.d.ts +0 -108
  22. package/dist/drawer/Drawer.d.ts +0 -2
  23. package/dist/drawer/index.d.ts +0 -2
  24. package/dist/drawer/types.d.ts +0 -140
  25. package/dist/dropdown/ContextMenu.d.ts +0 -12
  26. package/dist/dropdown/DropdownContext.d.ts +0 -29
  27. package/dist/dropdown/DropdownMenu.d.ts +0 -3
  28. package/dist/dropdown/MenuItem.d.ts +0 -8
  29. package/dist/dropdown/Submenu.d.ts +0 -23
  30. package/dist/dropdown/index.d.ts +0 -11
  31. package/dist/dropdown/types.d.ts +0 -168
  32. package/dist/firma_manual/FirmaManual.d.ts +0 -3
  33. package/dist/firma_manual/Iconografia.d.ts +0 -16
  34. package/dist/firma_manual/TypesFirma.d.ts +0 -22
  35. package/dist/firma_manual/index.d.ts +0 -2
  36. package/dist/firma_manual/useFirmaLogica.d.ts +0 -10
  37. package/dist/hablar_escuchar/BadgeVoz.d.ts +0 -6
  38. package/dist/hablar_escuchar/Iconografia.d.ts +0 -10
  39. package/dist/hablar_escuchar/index.d.ts +0 -3
  40. package/dist/hablar_escuchar/useReconocimientoVoz.d.ts +0 -21
  41. package/dist/input_date/InputDate.d.ts +0 -342
  42. package/dist/input_date/funciones.d.ts +0 -27
  43. package/dist/input_date/index.d.ts +0 -3
  44. package/dist/input_date/types.d.ts +0 -70
  45. package/dist/input_numeric/Iconografia.d.ts +0 -5
  46. package/dist/input_numeric/InputNumeric.d.ts +0 -353
  47. package/dist/input_numeric/funciones.d.ts +0 -64
  48. package/dist/input_numeric/index.d.ts +0 -3
  49. package/dist/input_numeric/types.d.ts +0 -96
  50. package/dist/input_text/Iconografia.d.ts +0 -9
  51. package/dist/input_text/InputText.d.ts +0 -347
  52. package/dist/input_text/index.d.ts +0 -2
  53. package/dist/input_text/types.d.ts +0 -77
  54. package/dist/input_types_compartidos/index.d.ts +0 -1
  55. package/dist/input_types_compartidos/types.d.ts +0 -11
  56. package/dist/modal/Modal.d.ts +0 -2
  57. package/dist/modal/index.d.ts +0 -2
  58. package/dist/modal/types.d.ts +0 -115
  59. package/dist/modal_stack/ModalStack.d.ts +0 -14
  60. package/dist/modal_stack/index.d.ts +0 -2
  61. package/dist/panel_filtros/Iconografia.d.ts +0 -5
  62. package/dist/panel_filtros/PanelFiltros.d.ts +0 -49
  63. package/dist/panel_filtros/index.d.ts +0 -3
  64. package/dist/radio/Radio.d.ts +0 -16
  65. package/dist/radio/RadioContext.d.ts +0 -3
  66. package/dist/radio/RadioGroup.d.ts +0 -11
  67. package/dist/radio/index.d.ts +0 -3
  68. package/dist/radio/types.d.ts +0 -195
  69. package/dist/select/Iconografia.d.ts +0 -10
  70. package/dist/select/Select.d.ts +0 -42
  71. package/dist/select/SelectBase.d.ts +0 -17
  72. package/dist/select/SelectNativo.d.ts +0 -57
  73. package/dist/select/Types.d.ts +0 -629
  74. package/dist/select/funciones.d.ts +0 -244
  75. package/dist/select/index.d.ts +0 -4
  76. package/dist/tabla_datos/TablaDatos.d.ts +0 -80
  77. package/dist/tabla_datos/components/Iconografia.d.ts +0 -17
  78. package/dist/tabla_datos/components/TablaCards.d.ts +0 -1
  79. package/dist/tabla_datos/components/TablaEscritorio.d.ts +0 -1
  80. package/dist/tabla_datos/components/configuraciones/ConfigColumnas.d.ts +0 -1
  81. package/dist/tabla_datos/components/configuraciones/ConfigEncabezado.d.ts +0 -6
  82. package/dist/tabla_datos/components/configuraciones/ConfigFilas.d.ts +0 -1
  83. package/dist/tabla_datos/components/configuraciones/ConfigOpciones.d.ts +0 -6
  84. package/dist/tabla_datos/components/configuraciones/MenuConfiguraciones.d.ts +0 -1
  85. package/dist/tabla_datos/components/skeletons/SkeletonCargando.d.ts +0 -4
  86. package/dist/tabla_datos/components/skeletons/SkeletonCargandoCards.d.ts +0 -2
  87. package/dist/tabla_datos/components/tabla/BarraHerramientas.d.ts +0 -1
  88. package/dist/tabla_datos/components/tabla/BarraSeleccion.d.ts +0 -9
  89. package/dist/tabla_datos/components/tabla/Paginacion.d.ts +0 -1
  90. package/dist/tabla_datos/components/tabla/SinDatos.d.ts +0 -1
  91. package/dist/tabla_datos/components/tabla/tabla_cards/AccionesCards.d.ts +0 -3
  92. package/dist/tabla_datos/components/tabla/tabla_cards/ContenidoCards.d.ts +0 -3
  93. package/dist/tabla_datos/components/tabla/tabla_cards/EncabezadoCards.d.ts +0 -3
  94. package/dist/tabla_datos/constantes/ConstGenerales.d.ts +0 -18
  95. package/dist/tabla_datos/context/ContextTypes.d.ts +0 -23
  96. package/dist/tabla_datos/context/TablaDatosContext.d.ts +0 -3
  97. package/dist/tabla_datos/context/hooks.d.ts +0 -10
  98. package/dist/tabla_datos/hooks/useClickOutside.d.ts +0 -8
  99. package/dist/tabla_datos/hooks/useEscapeKey.d.ts +0 -1
  100. package/dist/tabla_datos/hooks/usePopoverPosition.d.ts +0 -15
  101. package/dist/tabla_datos/hooks/useScrollLock.d.ts +0 -1
  102. package/dist/tabla_datos/index.d.ts +0 -5
  103. package/dist/tabla_datos/types/TablaTypes.d.ts +0 -85
  104. package/dist/tabla_datos/types/tanstack-table.d.ts +0 -8
  105. package/dist/tabla_datos/utils/FuncionesColumnas.d.ts +0 -9
  106. package/dist/tabla_datos/utils/FuncionesPaginacion.d.ts +0 -12
  107. package/dist/tabla_datos/utils/FuncionesTabla.d.ts +0 -54
  108. package/dist/text_area/Iconografia.d.ts +0 -6
  109. package/dist/text_area/TextArea.d.ts +0 -333
  110. package/dist/text_area/index.d.ts +0 -2
  111. package/dist/text_area/types.d.ts +0 -76
  112. package/dist/texts/Texts.d.ts +0 -19
  113. package/dist/toggle/Toggle.d.ts +0 -21
  114. package/dist/toggle/index.d.ts +0 -2
  115. package/dist/toggle/types.d.ts +0 -90
  116. package/dist/tooltip/Tooltip.d.ts +0 -2
  117. package/dist/tooltip/index.d.ts +0 -2
  118. package/dist/tooltip/types.d.ts +0 -83
@@ -1,16 +0,0 @@
1
- import { default as React } from 'react';
2
- export declare const Radio: React.NamedExoticComponent<{
3
- value: string;
4
- label?: string;
5
- description?: string;
6
- size?: import('./types').RadioSize;
7
- color?: import('./types').RadioColor;
8
- customColor?: string;
9
- variant?: import('./types').RadioVariant;
10
- isDisabled?: boolean;
11
- isReadOnly?: boolean;
12
- isInvalid?: boolean;
13
- isRequired?: boolean;
14
- children?: React.ReactNode;
15
- className?: string;
16
- } & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & React.RefAttributes<HTMLInputElement>>;
@@ -1,3 +0,0 @@
1
- import { RadioGroupContextValue } from './types';
2
- export declare const RadioGroupContext: import('react').Context<RadioGroupContextValue | undefined>;
3
- export declare const useRadioGroupContext: () => RadioGroupContextValue | undefined;
@@ -1,11 +0,0 @@
1
- import { OptionBase, RadioGroupProps } from './types';
2
- /**
3
- * Componente RadioGroup genérico con soporte para opciones tipadas.
4
- * La coma <T,> es necesaria en arrow functions .tsx para que no se confunda con un tag HTML.
5
- *
6
- * @template T - Tipo de las opciones (string, number u objeto)
7
- */
8
- export declare const RadioGroup: {
9
- <T extends OptionBase>({ name, value, defaultValue, onChange, orientation, label, description, isDisabled, isReadOnly, isRequired, isInvalid, errorMessage, size, color, customColor, variant, justifyContent, children, className, options, optionValueKey, optionLabelKey, optionDisabledKey, optionDescriptionKey, }: RadioGroupProps<T>): import("react/jsx-runtime").JSX.Element;
10
- displayName: string;
11
- };
@@ -1,3 +0,0 @@
1
- export { Radio } from './Radio';
2
- export { RadioGroup } from './RadioGroup';
3
- export type { RadioProps, RadioGroupProps, RadioSize, RadioColor, RadioVariant, RadioGroupOrientation, OptionBase, } from './types';
@@ -1,195 +0,0 @@
1
- import { default as React } from 'react';
2
- export type RadioSize = 'sm' | 'md' | 'lg';
3
- export type RadioColor = 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
4
- export type RadioVariant = 'default' | 'card';
5
- export type RadioProps = {
6
- /**
7
- * Valor del radio button
8
- */
9
- value: string;
10
- /**
11
- * Label del radio button
12
- */
13
- label?: string;
14
- /**
15
- * Descripción adicional (aparece debajo del label)
16
- */
17
- description?: string;
18
- /**
19
- * Tamaño del radio button
20
- * @default 'md'
21
- */
22
- size?: RadioSize;
23
- /**
24
- * Color del tema
25
- * @default 'primary'
26
- */
27
- color?: RadioColor;
28
- /**
29
- * Color personalizado (CSS color value)
30
- * Sobrescribe el color del tema si se especifica
31
- */
32
- customColor?: string;
33
- /**
34
- * Variante visual
35
- * @default 'default'
36
- */
37
- variant?: RadioVariant;
38
- /**
39
- * Si está deshabilitado
40
- */
41
- isDisabled?: boolean;
42
- /**
43
- * Si está en modo solo lectura
44
- */
45
- isReadOnly?: boolean;
46
- /**
47
- * Si tiene error de validación
48
- */
49
- isInvalid?: boolean;
50
- /**
51
- * Si es requerido
52
- */
53
- isRequired?: boolean;
54
- /**
55
- * Children (usado cuando no se pasa label)
56
- */
57
- children?: React.ReactNode;
58
- /**
59
- * Clase CSS adicional
60
- */
61
- className?: string;
62
- } & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'>;
63
- export type RadioGroupOrientation = 'vertical' | 'horizontal';
64
- /**
65
- * Tipo auxiliar para opciones primitivas u objetos.
66
- * Usado como constraint para el genérico T en RadioGroupProps.
67
- */
68
- export type OptionBase = string | number | Record<string, unknown>;
69
- /**
70
- * Props del componente RadioGroup con soporte genérico.
71
- * @template T - Tipo de las opciones (string, number u objeto)
72
- */
73
- export type RadioGroupProps<T extends OptionBase = string> = {
74
- /**
75
- * Nombre del grupo (crítico para HTML)
76
- */
77
- name?: string;
78
- /**
79
- * Valor seleccionado actual (modo controlado)
80
- */
81
- value?: string | number;
82
- /**
83
- * Valor por defecto (modo no controlado)
84
- */
85
- defaultValue?: string | number;
86
- /**
87
- * Callback cuando cambia la selección
88
- */
89
- onChange?: (value: string) => void;
90
- /**
91
- * Orientación del grupo
92
- * @default 'vertical'
93
- */
94
- orientation?: RadioGroupOrientation;
95
- /**
96
- * Label del grupo
97
- */
98
- label?: string;
99
- /**
100
- * Descripción del grupo
101
- */
102
- description?: string;
103
- /**
104
- * Si el grupo está deshabilitado
105
- */
106
- isDisabled?: boolean;
107
- /**
108
- * Si el grupo está en modo solo lectura
109
- */
110
- isReadOnly?: boolean;
111
- /**
112
- * Si el grupo es requerido
113
- */
114
- isRequired?: boolean;
115
- /**
116
- * Si el grupo tiene error de validación
117
- */
118
- isInvalid?: boolean;
119
- /**
120
- * Mensaje de error
121
- */
122
- errorMessage?: string;
123
- /**
124
- * Tamaño de los radio buttons
125
- */
126
- size?: RadioSize;
127
- /**
128
- * Color de los radio buttons
129
- */
130
- color?: RadioColor;
131
- /**
132
- * Color personalizado para todos los radios del grupo
133
- * Sobrescribe el color del tema si se especifica
134
- */
135
- customColor?: string;
136
- /**
137
- * Variante de los radio buttons
138
- */
139
- variant?: RadioVariant;
140
- /**
141
- * Alineación de los radios (horizontal)
142
- * @default 'flex-start'
143
- */
144
- justifyContent?: 'flex-start' | 'center' | 'flex-end' | 'space-between';
145
- /**
146
- * Children (Radio components) - Usado como fallback si no se pasa options
147
- */
148
- children?: React.ReactNode;
149
- /**
150
- * Clase CSS adicional
151
- */
152
- className?: string;
153
- /**
154
- * Array de opciones. Puede ser strings, números u objetos.
155
- * Si se pasa options, se ignora children.
156
- */
157
- options?: T[];
158
- /**
159
- * Nombre de la propiedad del objeto para usar como VALOR (ej: 'id', 'codigo').
160
- * Solo acepta llaves que existan en el tipo T.
161
- * @default 'value'
162
- */
163
- optionValueKey?: keyof T;
164
- /**
165
- * Nombre de la propiedad del objeto para usar como ETIQUETA (ej: 'nombre', 'label').
166
- * Solo acepta llaves que existan en el tipo T.
167
- * @default 'label'
168
- */
169
- optionLabelKey?: keyof T;
170
- /**
171
- * Nombre de la propiedad para deshabilitar una opción específica.
172
- * Solo acepta llaves que existan en el tipo T.
173
- * @default 'isDisabled'
174
- */
175
- optionDisabledKey?: keyof T;
176
- /**
177
- * Nombre de la propiedad para descripción de una opción específica.
178
- * Solo acepta llaves que existan en el tipo T.
179
- * @default 'description'
180
- */
181
- optionDescriptionKey?: keyof T;
182
- };
183
- export type RadioGroupContextValue = {
184
- name?: string;
185
- value: string;
186
- onChange: (value: string) => void;
187
- size?: RadioSize;
188
- color?: RadioColor;
189
- customColor?: string;
190
- variant?: RadioVariant;
191
- isDisabled?: boolean;
192
- isReadOnly?: boolean;
193
- isInvalid?: boolean;
194
- isRequired?: boolean;
195
- };
@@ -1,10 +0,0 @@
1
- import { SVGProps } from 'react';
2
- type IconProps = SVGProps<SVGSVGElement> & {
3
- size?: number | string;
4
- };
5
- export declare const IconoChevronAbajo: ({ size, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
6
- export declare const IconoCerrar: ({ size, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
7
- export declare const IconoCheck: ({ size, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
8
- export declare const IconoBuscar: ({ size, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
9
- export declare const IconoSpinner: ({ size, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1,42 +0,0 @@
1
- import { SelectRef, SelectStringProps, SelectMultiStringProps, SelectObjectIdProps, SelectMultiObjectIdProps, SelectObjectFullProps, SelectMultiObjectFullProps, SmartSelectProps } from './Types';
2
- type SelectComponent = {
3
- (props: SelectStringProps & {
4
- ref?: React.Ref<SelectRef>;
5
- }): React.ReactElement;
6
- (props: SelectMultiStringProps & {
7
- ref?: React.Ref<SelectRef>;
8
- }): React.ReactElement;
9
- <T extends Record<string, unknown>>(props: SelectObjectIdProps<T> & {
10
- ref?: React.Ref<SelectRef>;
11
- }): React.ReactElement;
12
- <T extends Record<string, unknown>>(props: SelectMultiObjectIdProps<T> & {
13
- ref?: React.Ref<SelectRef>;
14
- }): React.ReactElement;
15
- <T extends Record<string, unknown>>(props: SelectObjectFullProps<T> & {
16
- ref?: React.Ref<SelectRef>;
17
- }): React.ReactElement;
18
- <T extends Record<string, unknown>>(props: SelectMultiObjectFullProps<T> & {
19
- ref?: React.Ref<SelectRef>;
20
- }): React.ReactElement;
21
- <T extends string | Record<string, unknown>>(props: SmartSelectProps<T> & {
22
- ref?: React.ForwardedRef<SelectRef>;
23
- }): React.ReactElement;
24
- };
25
- /**
26
- * Select con inferencia automática de tipos según las props.
27
- *
28
- * @example
29
- * ```tsx
30
- * // Strings
31
- * <Select options={['A', 'B']} onChange={(val) => {}} />
32
- *
33
- * // Objetos → retorna ID
34
- * <Select options={usuarios} optionValueKey="id" onChange={(id) => {}} />
35
- *
36
- * // Objetos → retorna objeto completo
37
- * <Select options={usuarios} optionValueKey="id" devolverObjeto onChange={(user) => {}} />
38
- * ```
39
- */
40
- declare const Select: SelectComponent;
41
- export { Select };
42
- export default Select;
@@ -1,17 +0,0 @@
1
- import { ForwardedRef, ReactElement } from 'react';
2
- import { SelectProps, SelectRef } from './Types';
3
- /**
4
- * SelectBase memoizado para evitar re-renders cuando las props no cambian.
5
- *
6
- * @description
7
- * React.memo realiza una comparación shallow de las props.
8
- * Si las props son iguales (por referencia), el componente no se re-renderiza.
9
- *
10
- * @performance
11
- * - Beneficio principal con listas grandes (+1000 opciones)
12
- * - Evita re-renders cuando el padre se actualiza pero las props del Select no cambian
13
- * - Especialmente útil en formularios con muchos campos
14
- */
15
- export declare const SelectBase: <T = string>(props: SelectProps<T> & {
16
- ref?: ForwardedRef<SelectRef>;
17
- }) => ReactElement;
@@ -1,57 +0,0 @@
1
- import { SelectProps } from './Types';
2
- /**
3
- * Props internas del SelectNativo.
4
- * Extiende SelectProps pero excluye features no soportadas por select nativo.
5
- *
6
- * @template T - Tipo de las opciones
7
- * @internal
8
- */
9
- type SelectNativoProps<T> = {
10
- /**
11
- * Indica si el campo está en estado inválido.
12
- * Calculado por el padre para consistencia.
13
- */
14
- esInvalido: boolean;
15
- /**
16
- * Indica si el campo está deshabilitado (incluye loading).
17
- * Calculado por el padre para consistencia.
18
- */
19
- estaDeshabilitadoReal: boolean;
20
- /**
21
- * Clases CSS del contenedor base ya calculadas.
22
- * El padre las calcula para mantener consistencia visual.
23
- */
24
- clasesBase: string;
25
- /**
26
- * Función que renderiza el valor mostrado.
27
- * Viene del padre para reutilizar la lógica de render.
28
- */
29
- renderizarValorMostrado: () => React.ReactNode;
30
- } & Omit<SelectProps<T>, 'isSearchable' | 'isMultiple' | 'isVirtualized'>;
31
- /**
32
- * Componente SelectNativo - Select nativo del SO con apariencia custom.
33
- *
34
- * Implementa el patrón "Ghost Select":
35
- * - El usuario ve el diseño personalizado de CoreKit UI
36
- * - Al hacer tap, el SO muestra su picker nativo
37
- * - La selección actualiza el estado del componente padre
38
- *
39
- * @template T - Tipo de las opciones (string u objeto)
40
- * @param props - Props del componente incluyendo datos del padre
41
- * @returns Elemento JSX con trigger visual y select nativo superpuesto
42
- *
43
- * @important
44
- * **API de callbacks**: `onChange` y `onValueChange` reciben el valor (`T`),
45
- * NO el evento nativo del select. Esto mantiene consistencia con el Select custom.
46
- *
47
- * @example
48
- * ```tsx
49
- * // El padre pasa el valor directamente:
50
- * onChange?.(opcionSeleccionada); // T, no Event
51
- * onValueChange?.(opcionSeleccionada); // T, no Event
52
- * ```
53
- *
54
- * @internal
55
- */
56
- export declare function SelectNativo<T>(props: SelectNativoProps<T>): import("react/jsx-runtime").JSX.Element;
57
- export default SelectNativo;