corekit-ui 0.1.16 → 0.1.20
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/checkbox/Checkbox.d.ts +1 -0
- package/dist/checkbox/CheckboxGroup.d.ts +11 -2
- package/dist/checkbox/types.d.ts +53 -2
- package/dist/corekit-ui.css +1 -1
- package/dist/dropdown/ContextMenu.d.ts +12 -0
- package/dist/dropdown/DropdownContext.d.ts +29 -0
- package/dist/dropdown/DropdownMenu.d.ts +3 -0
- package/dist/dropdown/MenuItem.d.ts +8 -0
- package/dist/dropdown/Submenu.d.ts +23 -0
- package/dist/dropdown/index.d.ts +11 -0
- package/dist/dropdown/types.d.ts +168 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5634 -4902
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +6 -6
- package/dist/index.umd.cjs.map +1 -1
- package/dist/select/funciones.d.ts +15 -0
- package/dist/tabla_datos/types/tanstack-table.d.ts +7 -5
- package/dist/tabla_datos/utils/FuncionesTabla.d.ts +24 -0
- package/package.json +23 -24
|
@@ -91,6 +91,19 @@ export declare function estaDeshabilitada<T>(opcion: T): boolean;
|
|
|
91
91
|
* ```
|
|
92
92
|
*/
|
|
93
93
|
export declare function estaSeleccionada<T>(opcion: T, valorActual: T | T[] | null, esMultiple: boolean, claveValor: string): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Normaliza un texto eliminando tildes/diacríticos.
|
|
96
|
+
* Útil para búsquedas que ignoren acentos.
|
|
97
|
+
* @param texto - Texto a normalizar
|
|
98
|
+
* @returns Texto sin tildes
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```ts
|
|
102
|
+
* normalizarTexto('Confirmación') // 'confirmacion'
|
|
103
|
+
* normalizarTexto('México') // 'mexico'
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
export declare function normalizarTexto(texto: string): string;
|
|
94
107
|
/**
|
|
95
108
|
* Filtra las opciones según el texto de búsqueda
|
|
96
109
|
* @template T - Tipo de las opciones
|
|
@@ -104,6 +117,8 @@ export declare function estaSeleccionada<T>(opcion: T, valorActual: T | T[] | nu
|
|
|
104
117
|
* ```ts
|
|
105
118
|
* const frutas = ['Manzana', 'Mandarina', 'Pera'];
|
|
106
119
|
* filtrarOpciones(frutas, 'man', 'label') // ['Manzana', 'Mandarina']
|
|
120
|
+
* // También funciona sin tildes:
|
|
121
|
+
* filtrarOpciones(['Confirmación', 'Otro'], 'confirmacion', 'label') // ['Confirmación']
|
|
107
122
|
* ```
|
|
108
123
|
*/
|
|
109
124
|
export declare function filtrarOpciones<T>(opciones: T[], textoBusqueda: string, claveLabel: string, funcionFiltro?: (opcion: T, busqueda: string) => boolean): T[];
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { RowData } from '@tanstack/react-table';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
declare module '@tanstack/react-table' {
|
|
5
|
+
interface ColumnMeta<TData extends RowData, TValue> {
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -28,3 +28,27 @@ export declare function obtenerTextoFiltros(filtros: FiltrosAplicadosType[], tot
|
|
|
28
28
|
* Capitaliza la primera letra de una cadena de texto
|
|
29
29
|
*/
|
|
30
30
|
export declare function capitalizarPrimeraLetra(str: string): string;
|
|
31
|
+
/**
|
|
32
|
+
* Normaliza un texto eliminando tildes/diacríticos.
|
|
33
|
+
* Útil para búsquedas que ignoren acentos.
|
|
34
|
+
* @param texto - Texto a normalizar
|
|
35
|
+
* @returns Texto sin tildes en minúsculas
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* normalizarTexto('Confirmación') // 'confirmacion'
|
|
40
|
+
* normalizarTexto('México') // 'mexico'
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare function normalizarTexto(texto: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* Función de filtro global personalizada que ignora tildes/acentos.
|
|
46
|
+
* Compatible con @tanstack/react-table globalFilterFn.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* // En useReactTable:
|
|
51
|
+
* globalFilterFn: filtroGlobalSinTildes
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export declare function filtroGlobalSinTildes<TData>(row: Row<TData>, columnId: string, filterValue: string): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "corekit-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"description": "CoreKit UI Component Library",
|
|
5
5
|
"author": "Soluciones PC",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,28 +45,6 @@
|
|
|
45
45
|
"access": "public",
|
|
46
46
|
"registry": "https://registry.npmjs.org/"
|
|
47
47
|
},
|
|
48
|
-
"scripts": {
|
|
49
|
-
"dev": "vite --port 3000",
|
|
50
|
-
"build": "vite build",
|
|
51
|
-
"clean": "rimraf dist",
|
|
52
|
-
"prebuild": "pnpm clean",
|
|
53
|
-
"storybook": "storybook dev -p 6006",
|
|
54
|
-
"build:storybook": "storybook build",
|
|
55
|
-
"typecheck": "tsc --noEmit",
|
|
56
|
-
"lint": "eslint . --fix",
|
|
57
|
-
"lint:css": "stylelint \"src/**/*.{css,scss}\" --fix",
|
|
58
|
-
"format": "prettier --write .",
|
|
59
|
-
"test": "vitest run",
|
|
60
|
-
"test:watch": "vitest",
|
|
61
|
-
"test:ui": "vitest --ui",
|
|
62
|
-
"check": "pnpm typecheck && pnpm lint && pnpm lint:css && pnpm test",
|
|
63
|
-
"gen": "plop",
|
|
64
|
-
"prepublishOnly": "pnpm check && pnpm build",
|
|
65
|
-
"release:patch": "pnpm version patch && pnpm publish",
|
|
66
|
-
"release:minor": "pnpm version minor && pnpm publish",
|
|
67
|
-
"release:major": "pnpm version major && pnpm publish",
|
|
68
|
-
"release:dry": "pnpm publish --dry-run"
|
|
69
|
-
},
|
|
70
48
|
"peerDependencies": {
|
|
71
49
|
"react": "^18.3.0 || ^19.0.0",
|
|
72
50
|
"react-dom": "^18.3.0 || ^19.0.0"
|
|
@@ -126,5 +104,26 @@
|
|
|
126
104
|
"vite": "^6.0.3",
|
|
127
105
|
"vite-plugin-dts": "^4.5.4",
|
|
128
106
|
"vitest": "^2.1.8"
|
|
107
|
+
},
|
|
108
|
+
"scripts": {
|
|
109
|
+
"dev": "vite --port 3000",
|
|
110
|
+
"build": "vite build",
|
|
111
|
+
"clean": "rimraf dist",
|
|
112
|
+
"prebuild": "pnpm clean",
|
|
113
|
+
"storybook": "storybook dev -p 6006",
|
|
114
|
+
"build:storybook": "storybook build",
|
|
115
|
+
"typecheck": "tsc --noEmit",
|
|
116
|
+
"lint": "eslint . --fix",
|
|
117
|
+
"lint:css": "stylelint \"src/**/*.{css,scss}\" --fix",
|
|
118
|
+
"format": "prettier --write .",
|
|
119
|
+
"test": "vitest run",
|
|
120
|
+
"test:watch": "vitest",
|
|
121
|
+
"test:ui": "vitest --ui",
|
|
122
|
+
"check": "pnpm typecheck && pnpm lint && pnpm lint:css && pnpm test",
|
|
123
|
+
"gen": "plop",
|
|
124
|
+
"release:patch": "pnpm version patch && pnpm publish",
|
|
125
|
+
"release:minor": "pnpm version minor && pnpm publish",
|
|
126
|
+
"release:major": "pnpm version major && pnpm publish",
|
|
127
|
+
"release:dry": "pnpm publish --dry-run"
|
|
129
128
|
}
|
|
130
|
-
}
|
|
129
|
+
}
|