corekit-ui 0.1.20 → 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 +45 -42
  2. package/dist/corekit-ui.css +1 -1
  3. package/dist/index.d.ts +4231 -21
  4. package/dist/index.js +5476 -4929
  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 +24 -10
  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
package/package.json CHANGED
@@ -1,29 +1,42 @@
1
1
  {
2
2
  "name": "corekit-ui",
3
- "version": "0.1.20",
4
- "description": "CoreKit UI Component Library",
5
- "author": "Soluciones PC",
3
+ "version": "0.1.24",
4
+ "description": "CoreKit UI - Una biblioteca de componentes React moderna, accesible y de alto rendimiento para aplicaciones empresariales.",
5
+ "author": "Soluciones PC <info@pcsoluciones.com.co>",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
8
  "private": false,
9
- "homepage": "https://corekit-ui.yoursite.com",
9
+ "homepage": "https://soluciones-pc.github.io/corekit-ui/",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/soluciones-pc/corekit-ui.git"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/soluciones-pc/corekit-ui/issues"
16
+ },
10
17
  "keywords": [
11
18
  "react",
12
19
  "components",
13
20
  "ui",
14
21
  "design-system",
15
22
  "typescript",
16
- "css-variables",
23
+ "css-modules",
17
24
  "accessible",
18
- "enterprise"
25
+ "enterprise",
26
+ "voice-recognition",
27
+ "digital-signature",
28
+ "vite",
29
+ "react-19"
19
30
  ],
20
31
  "engines": {
21
- "node": ">=18.0.0"
32
+ "node": ">=18.0.0",
33
+ "pnpm": ">=9.0.0"
22
34
  },
23
35
  "files": [
24
36
  "dist",
25
37
  "README.md",
26
- "CHANGELOG.md"
38
+ "CHANGELOG.md",
39
+ "LICENSE"
27
40
  ],
28
41
  "main": "./dist/index.umd.cjs",
29
42
  "module": "./dist/index.js",
@@ -57,8 +70,7 @@
57
70
  "@uidotdev/usehooks": "^2.4.1",
58
71
  "class-variance-authority": "^0.7.1",
59
72
  "clsx": "^2.1.1",
60
- "nanoid": "^5.1.6",
61
- "zustand": "^5.0.1"
73
+ "nanoid": "^5.1.6"
62
74
  },
63
75
  "devDependencies": {
64
76
  "@eslint/js": "^9.14.0",
@@ -68,9 +80,11 @@
68
80
  "@storybook/addon-interactions": "^8.6.0",
69
81
  "@storybook/addon-themes": "^8.6.0",
70
82
  "@storybook/blocks": "^8.6.0",
83
+ "@storybook/manager-api": "^8.6.14",
71
84
  "@storybook/react": "^8.6.0",
72
85
  "@storybook/react-vite": "^8.6.0",
73
86
  "@storybook/test": "^8.6.0",
87
+ "@storybook/theming": "^8.6.14",
74
88
  "@testing-library/dom": "^10.4.0",
75
89
  "@testing-library/jest-dom": "^6.6.0",
76
90
  "@testing-library/react": "^16.1.0",
@@ -1,9 +0,0 @@
1
- import { default as React, HTMLAttributes } from 'react';
2
- type TipoTransicion = 'desvanecerDeslizar' | 'escalar';
3
- export type TransicionProps = {
4
- mostrar: boolean;
5
- children: React.ReactNode;
6
- tipo?: TipoTransicion;
7
- } & Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
8
- export declare function Transicion({ mostrar, children, tipo, className, ...resto }: TransicionProps): import("react/jsx-runtime").JSX.Element | null;
9
- export {};
@@ -1 +0,0 @@
1
- export * from './Transiciones';
@@ -1,3 +0,0 @@
1
- import { default as React } from 'react';
2
- import { BadgeProps } from './types';
3
- export declare const Badge: React.FC<BadgeProps>;
@@ -1,2 +0,0 @@
1
- export { Badge } from './Badge';
2
- export type { BadgeProps, BadgeVariant, BadgeColor, BadgeSize, BadgeRadius } from './types';
@@ -1,62 +0,0 @@
1
- export type BadgeVariant = 'solid' | 'subtle' | 'outline' | 'soft';
2
- export type BadgeColor = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'brand';
3
- export type BadgeSize = 'sm' | 'md' | 'lg';
4
- export type BadgeRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
5
- export type BadgeProps = {
6
- /**
7
- * Variante visual del badge
8
- * @default 'solid'
9
- */
10
- variant?: BadgeVariant;
11
- /**
12
- * Color del badge
13
- * @default 'default'
14
- */
15
- color?: BadgeColor;
16
- /**
17
- * Tamaño del badge
18
- * @default 'md'
19
- */
20
- size?: BadgeSize;
21
- /**
22
- * Radio de bordes
23
- * @default 'md'
24
- */
25
- radius?: BadgeRadius;
26
- /**
27
- * Contenido del badge
28
- */
29
- children: React.ReactNode;
30
- /**
31
- * Icono al inicio
32
- */
33
- startIcon?: React.ReactNode;
34
- /**
35
- * Icono al final
36
- */
37
- endIcon?: React.ReactNode;
38
- /**
39
- * Si tiene un punto de estado
40
- */
41
- dot?: boolean;
42
- /**
43
- * Si puede ser removido (muestra X)
44
- */
45
- dismissible?: boolean;
46
- /**
47
- * Callback al hacer click en eliminar
48
- */
49
- onDismiss?: () => void;
50
- /**
51
- * Color personalizado
52
- */
53
- customColor?: string;
54
- /**
55
- * Clase CSS adicional
56
- */
57
- className?: string;
58
- /**
59
- * Callback al hacer click
60
- */
61
- onClick?: () => void;
62
- };
@@ -1,2 +0,0 @@
1
- import { BotonProps } from './typesButton';
2
- export declare const Boton: import('react').ForwardRefExoticComponent<Omit<BotonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
@@ -1,2 +0,0 @@
1
- export { Boton } from './Boton';
2
- export type { BotonProps } from './typesButton';
@@ -1,35 +0,0 @@
1
- import { ComponentPropsWithRef, ReactNode } from 'react';
2
- export type BotonProps = {
3
- /** Estilo visual del botón */
4
- variant?: 'solid' | 'bordered' | 'ghost' | 'light' | 'faded' | 'shadow';
5
- /** Color temático del botón */
6
- color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
7
- /** Tamaño del botón */
8
- size?: 'sm' | 'md' | 'lg';
9
- /** Radio de borde del botón */
10
- radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
11
- /** Ancho completo del contenedor */
12
- fullWidth?: boolean;
13
- /** Estado de carga del botón */
14
- isLoading?: boolean;
15
- /** Si es true, solo muestra el spinner sin el texto (visibility: hidden) */
16
- onlyLoading?: boolean;
17
- /** Botón deshabilitado */
18
- isDisabled?: boolean;
19
- /** Solo muestra un icono sin texto */
20
- isIconOnly?: boolean;
21
- /** Deshabilita el efecto ripple */
22
- disableRipple?: boolean;
23
- /** Deshabilita animaciones */
24
- disableAnimation?: boolean;
25
- /** Color personalizado (CSS color value) */
26
- customColor?: string;
27
- /** Spinner personalizado */
28
- spinner?: ReactNode;
29
- /** Posición del spinner */
30
- spinnerPlacement?: 'start' | 'end';
31
- /** Lista de permisos del usuario actual */
32
- permisos?: string[];
33
- /** Permiso requerido para habilitar este botón */
34
- permiso?: string;
35
- } & ComponentPropsWithRef<'button'>;
@@ -1,25 +0,0 @@
1
- import { default as React } from 'react';
2
- export declare const Checkbox: React.ForwardRefExoticComponent<{
3
- children?: React.ReactNode;
4
- label?: React.ReactNode;
5
- hint?: React.ReactNode;
6
- isSelected?: boolean;
7
- isIndeterminate?: boolean;
8
- isDisabled?: boolean;
9
- isReadOnly?: boolean;
10
- isRequired?: boolean;
11
- size?: import('./types').CheckboxSize;
12
- color?: import('./types').CheckboxColor;
13
- customColor?: string;
14
- radius?: import('./types').CheckboxRadius;
15
- variant?: import('./types').CheckboxVariant;
16
- lineThrough?: boolean;
17
- onlyIcon?: boolean;
18
- disableAnimation?: boolean;
19
- customCheckIcon?: React.ReactNode;
20
- onChange?: (isSelected: boolean) => void;
21
- className?: string;
22
- classNames?: import('./types').CheckboxClassNames;
23
- value?: string;
24
- name?: string;
25
- } & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> & React.RefAttributes<HTMLInputElement>>;
@@ -1,3 +0,0 @@
1
- import { CheckboxGroupContextValue } from './types';
2
- export declare const CheckboxGroupContext: import('react').Context<CheckboxGroupContextValue | null>;
3
- export declare const useCheckboxGroupContext: () => CheckboxGroupContextValue | null;
@@ -1,11 +0,0 @@
1
- import { CheckboxGroupProps, CheckboxOptionBase } from './types';
2
- /**
3
- * Componente CheckboxGroup 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 CheckboxGroup: {
9
- <T extends CheckboxOptionBase>({ label, children, description, errorMessage, isInvalid, orientation, className, value: controlledValue, defaultValue, onChange, isDisabled, isReadOnly, isRequired, name, options, optionValueKey, optionLabelKey, optionDisabledKey, optionDescriptionKey, }: CheckboxGroupProps<T>): import("react/jsx-runtime").JSX.Element;
10
- displayName: string;
11
- };
@@ -1,4 +0,0 @@
1
- export { Checkbox } from './Checkbox';
2
- export { CheckboxGroup } from './CheckboxGroup';
3
- export { useCheckboxGroupContext } from './CheckboxContext';
4
- export type { CheckboxProps, CheckboxGroupProps, CheckboxSize, CheckboxColor, CheckboxRadius, CheckboxVariant, CheckboxOrientation, } from './types';
@@ -1,108 +0,0 @@
1
- import { InputHTMLAttributes, ReactNode } from 'react';
2
- export type CheckboxSize = 'sm' | 'md' | 'lg';
3
- export type CheckboxColor = 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
4
- export type CheckboxRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
5
- export type CheckboxOrientation = 'horizontal' | 'vertical';
6
- export type CheckboxVariant = 'solid' | 'outline';
7
- export type CheckboxClassNames = {
8
- base?: string;
9
- wrapper?: string;
10
- icon?: string;
11
- label?: string;
12
- };
13
- export type CheckboxProps = {
14
- children?: ReactNode;
15
- label?: ReactNode;
16
- hint?: ReactNode;
17
- isSelected?: boolean;
18
- isIndeterminate?: boolean;
19
- isDisabled?: boolean;
20
- isReadOnly?: boolean;
21
- isRequired?: boolean;
22
- size?: CheckboxSize;
23
- color?: CheckboxColor;
24
- customColor?: string;
25
- radius?: CheckboxRadius;
26
- variant?: CheckboxVariant;
27
- lineThrough?: boolean;
28
- onlyIcon?: boolean;
29
- disableAnimation?: boolean;
30
- customCheckIcon?: ReactNode;
31
- onChange?: (isSelected: boolean) => void;
32
- className?: string;
33
- classNames?: CheckboxClassNames;
34
- value?: string;
35
- name?: string;
36
- } & Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'onChange'>;
37
- export type CheckboxGroupContextValue = {
38
- value: string[];
39
- onChange: (value: string) => void;
40
- isDisabled?: boolean;
41
- isReadOnly?: boolean;
42
- isRequired?: boolean;
43
- name?: string;
44
- };
45
- /**
46
- * Tipo auxiliar para opciones primitivas u objetos.
47
- * Usado como constraint para el genérico T en CheckboxGroupProps.
48
- */
49
- export type CheckboxOptionBase = string | number | Record<string, unknown>;
50
- /**
51
- * Props del componente CheckboxGroup con soporte genérico.
52
- * @template T - Tipo de las opciones (string, number u objeto)
53
- */
54
- export type CheckboxGroupProps<T extends CheckboxOptionBase = string> = {
55
- /** Label del grupo */
56
- label?: ReactNode;
57
- /** Children (Checkbox individuales). Si se pasa `options`, children se ignora */
58
- children?: ReactNode;
59
- /** Descripción del grupo */
60
- description?: ReactNode;
61
- /** Mensaje de error */
62
- errorMessage?: ReactNode;
63
- /** Si el grupo tiene error de validación */
64
- isInvalid?: boolean;
65
- /** Orientación del grupo */
66
- orientation?: CheckboxOrientation;
67
- /** Clase CSS adicional */
68
- className?: string;
69
- /** Valores seleccionados (modo controlado) */
70
- value?: string[];
71
- /** Valores por defecto (modo no controlado) */
72
- defaultValue?: string[];
73
- /** Callback cuando cambian los valores seleccionados */
74
- onChange?: (value: string[]) => void;
75
- /** Si el grupo está deshabilitado */
76
- isDisabled?: boolean;
77
- /** Si el grupo está en modo solo lectura */
78
- isReadOnly?: boolean;
79
- /** Si el grupo es requerido */
80
- isRequired?: boolean;
81
- /** Nombre del grupo para formularios */
82
- name?: string;
83
- /**
84
- * Array de opciones para generar checkboxes automáticamente.
85
- * Puede ser un array de strings/numbers o un array de objetos.
86
- */
87
- options?: T[];
88
- /**
89
- * Campo del objeto a usar como valor único (key).
90
- * @default 'value'
91
- */
92
- optionValueKey?: keyof T;
93
- /**
94
- * Campo del objeto a usar como etiqueta visible.
95
- * @default 'label'
96
- */
97
- optionLabelKey?: keyof T;
98
- /**
99
- * Campo del objeto a usar para determinar si está deshabilitada.
100
- * @default 'isDisabled'
101
- */
102
- optionDisabledKey?: keyof T;
103
- /**
104
- * Campo del objeto a usar como descripción/hint.
105
- * @default 'description'
106
- */
107
- optionDescriptionKey?: keyof T;
108
- };
@@ -1,2 +0,0 @@
1
- import { DrawerProps } from './types';
2
- export declare const Drawer: import('react').ForwardRefExoticComponent<DrawerProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,2 +0,0 @@
1
- export { Drawer } from './Drawer';
2
- export type { DrawerProps, DrawerPosition, DrawerSize, DrawerBackdropVariant } from './types';
@@ -1,140 +0,0 @@
1
- /**
2
- * Posición del drawer en la pantalla
3
- * - 'left': Aparece desde la izquierda (320px-800px)
4
- * - 'right': Aparece desde la derecha (recomendado para menús)
5
- * - 'top': Aparece desde arriba (320px-800px altura)
6
- * - 'bottom': Aparece desde abajo (ideal para móviles)
7
- */
8
- export type DrawerPosition = 'left' | 'right' | 'top' | 'bottom';
9
- /**
10
- * Tamaño del drawer
11
- * - 'sm': 320px (ideal para menús compactos)
12
- * - 'md': 480px (default, balance perfecto)
13
- * - 'lg': 640px (para contenido extenso)
14
- * - 'xl': 800px (para dashboards)
15
- * - 'full': 100% (ocupa toda la pantalla)
16
- */
17
- export type DrawerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
18
- /**
19
- * Intensidad del backdrop del drawer
20
- * - 'transparente': Sin backdrop visible
21
- * - 'sutil': Opacidad muy baja
22
- * - 'normal': Opacidad estándar
23
- * - 'intermedio': Opacidad alta
24
- * - 'intenso': Opacidad máxima
25
- */
26
- export type DrawerBackdropVariant = 'transparente' | 'sutil' | 'normal' | 'intermedio' | 'intenso';
27
- export type DrawerProps = {
28
- /**
29
- * Si el drawer está abierto
30
- * @example
31
- * const [isOpen, setIsOpen] = useState(false);
32
- * <Drawer isOpen={isOpen} onClose={() => setIsOpen(false)}>...</Drawer>
33
- */
34
- isOpen: boolean;
35
- /**
36
- * Callback cuando se cierra el drawer (Escape, backdrop click, botón X)
37
- * @example
38
- * onClose={() => setIsOpen(false)}
39
- */
40
- onClose: () => void;
41
- /**
42
- * Posición del drawer en la pantalla
43
- * @default 'right'
44
- * @example
45
- * position="left" // Para menús laterales
46
- */
47
- position?: DrawerPosition;
48
- /**
49
- * Tamaño del drawer (ancho para left/right, alto para top/bottom)
50
- * @default 'md'
51
- * @example
52
- * size="lg" // 640px de ancho
53
- */
54
- size?: DrawerSize;
55
- /**
56
- * Título del drawer
57
- */
58
- title?: string;
59
- /**
60
- * Si muestra el botón de cerrar (X) en esquina superior derecha
61
- * @default true
62
- */
63
- showCloseButton?: boolean;
64
- /**
65
- * Si cierra al hacer click en el backdrop
66
- * @default true
67
- */
68
- closeOnBackdropClick?: boolean;
69
- /**
70
- * Si cierra al presionar Escape
71
- * @default true
72
- */
73
- closeOnEscape?: boolean;
74
- /**
75
- * Si previene el scroll del body cuando está abierto
76
- * @default true
77
- */
78
- preventScroll?: boolean;
79
- /**
80
- * Contenido del header personalizado
81
- */
82
- header?: React.ReactNode;
83
- /**
84
- * Contenido del footer personalizado
85
- */
86
- footer?: React.ReactNode;
87
- /**
88
- * Contenido del drawer
89
- */
90
- children: React.ReactNode;
91
- /**
92
- * Clase CSS adicional
93
- */
94
- className?: string;
95
- /**
96
- * Clase CSS para el contenido
97
- */
98
- contentClassName?: string;
99
- /**
100
- * Estado de carga
101
- * @default false
102
- */
103
- isLoading?: boolean;
104
- /**
105
- * Mensaje personalizado para el estado de carga
106
- * @default 'Cargando...'
107
- */
108
- loadingMessage?: string;
109
- /**
110
- * Callback llamado cuando el drawer se abre
111
- */
112
- onOpen?: () => void;
113
- /**
114
- * Variante del backdrop
115
- * @default 'normal'
116
- */
117
- backdropVariant?: DrawerBackdropVariant;
118
- /**
119
- * Radio de las esquinas del drawer
120
- * @default 'none' para left/right, 'lg' para top/bottom
121
- */
122
- borderRadius?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
123
- /**
124
- * Si el drawer se puede redimensionar
125
- * @default false
126
- */
127
- resizable?: boolean;
128
- /**
129
- * Contenedor donde renderizar el drawer (portal)
130
- * - HTMLElement: renderiza en ese elemento
131
- * - () => HTMLElement: función que retorna el elemento
132
- * - undefined/null: renderiza directamente sin portal
133
- */
134
- getContainer?: HTMLElement | (() => HTMLElement) | null;
135
- /**
136
- * z-index del drawer
137
- * @default var(--z-modal)
138
- */
139
- zIndex?: number;
140
- };
@@ -1,12 +0,0 @@
1
- import { ContextMenuRef } from './types';
2
- /**
3
- * ContextMenu
4
- *
5
- * Componente especializado para menús de clic derecho.
6
- * Implementado como un wrapper semántico sobre DropdownMenu.
7
- */
8
- export declare const ContextMenu: import('react').ForwardRefExoticComponent<Omit<import('./types').DropdownMenuProps, "children" | "placement" | "triggerAction"> & {
9
- children: React.ReactElement<React.HTMLAttributes<HTMLElement>>;
10
- isEnabled?: boolean;
11
- } & import('react').RefAttributes<ContextMenuRef>>;
12
- export default ContextMenu;
@@ -1,29 +0,0 @@
1
- import { DropdownMenuCheckboxItem, DropdownMenuItem, DropdownMenuItemBase, DropdownMenuProps, DropdownMenuRadioItem } from './types';
2
- export type DropdownContextValue = {
3
- radioValue?: string;
4
- onRadioChange?: (value: string) => void;
5
- cerrarMenu: () => void;
6
- closeOnSelect: boolean;
7
- size: 'sm' | 'md' | 'lg';
8
- variant: 'default' | 'elevated' | 'bordered' | 'glass';
9
- disableAnimation: boolean;
10
- classNames?: DropdownMenuProps['classNames'];
11
- portalContainer?: HTMLElement | null;
12
- zIndex?: number | string;
13
- };
14
- export declare const DropdownContext: import('react').Context<DropdownContextValue | null>;
15
- export declare const useDropdownContext: () => DropdownContextValue;
16
- export declare const tieneHijos: (item: DropdownMenuItem) => item is DropdownMenuItemBase & {
17
- children: DropdownMenuItem[];
18
- };
19
- export declare const esCheckbox: (item: DropdownMenuItem) => item is DropdownMenuCheckboxItem;
20
- export declare const esRadio: (item: DropdownMenuItem) => item is DropdownMenuRadioItem;
21
- export declare const esSeparador: (item: DropdownMenuItem) => item is {
22
- id: string;
23
- type: "separator";
24
- };
25
- export declare const esLabel: (item: DropdownMenuItem) => item is {
26
- id: string;
27
- type: "label";
28
- label: string;
29
- };
@@ -1,3 +0,0 @@
1
- import { DropdownMenuProps, DropdownMenuRef } from './types';
2
- export declare const DropdownMenu: import('react').ForwardRefExoticComponent<DropdownMenuProps & import('react').RefAttributes<DropdownMenuRef>>;
3
- export default DropdownMenu;
@@ -1,8 +0,0 @@
1
- import { DropdownMenuItem } from './types';
2
- export type MenuItemProps = {
3
- item: DropdownMenuItem;
4
- index: number;
5
- activeIndex: number | null;
6
- getItemProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
7
- };
8
- export declare const MenuItem: import('react').ForwardRefExoticComponent<MenuItemProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,23 +0,0 @@
1
- import { DropdownMenuItem, DropdownMenuItemBase } from './types';
2
- export type SubmenuProps = {
3
- item: DropdownMenuItemBase & {
4
- children: DropdownMenuItem[];
5
- };
6
- index: number;
7
- activeIndex: number | null;
8
- getItemProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
9
- };
10
- /**
11
- * Renderiza la lista de items del menú.
12
- * Extraído para ser reutilizado por el menú principal y submenús.
13
- */
14
- export declare const MenuList: {
15
- ({ items, activeIndex, getItemProps, listRef, }: {
16
- items: DropdownMenuItem[];
17
- activeIndex: number | null;
18
- getItemProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
19
- listRef: React.MutableRefObject<Array<HTMLElement | null>>;
20
- }): import("react/jsx-runtime").JSX.Element;
21
- displayName: string;
22
- };
23
- export declare const Submenu: import('react').ForwardRefExoticComponent<SubmenuProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,11 +0,0 @@
1
- /**
2
- * @fileoverview Exports del módulo dropdown
3
- * @module dropdown
4
- */
5
- export { DropdownMenu as default, DropdownMenu } from './DropdownMenu';
6
- export { ContextMenu } from './ContextMenu';
7
- export { MenuItem } from './MenuItem';
8
- export { Submenu, MenuList } from './Submenu';
9
- export { DropdownContext, tieneHijos, esCheckbox, esRadio, esSeparador, esLabel, useDropdownContext, } from './DropdownContext';
10
- export type { DropdownContextValue } from './DropdownContext';
11
- export type { DropdownMenuProps, DropdownMenuItem, DropdownMenuItemBase, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuLabel, DropdownMenuRef, DropdownMenuSize, DropdownMenuVariant, DropdownTriggerAction, ContextMenuProps, ContextMenuRef, } from './types';