corekit-ui 0.1.5 → 0.1.8

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/LICENSE CHANGED
@@ -5,7 +5,7 @@
5
5
  ```text
6
6
  MIT License
7
7
 
8
- Copyright (c) 2025 PC Soluciones en epidemiología y salud ocupacional
8
+ Copyright (c) 2026 PC Soluciones en epidemiología y salud ocupacional
9
9
 
10
10
  Permission is hereby granted, free of charge, to any person obtaining a copy
11
11
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,18 +1,18 @@
1
1
  # PC Soluciones – React Library Lab
2
2
 
3
- [![CI](https://github.com/<camidev43>/<proyecto-libreria>/actions/workflows/merge-jobs.yml/badge.svg)](https://github.com/<camidev43>/<proyecto-libreria>/actions/workflows/merge-jobs.yml)
4
- [![Storybook deploy](https://github.com/<camidev43>/<proyecto-libreria>/actions/workflows/pages.yml/badge.svg)](https://github.com/<camidev43>/<proyecto-libreria>/actions/workflows/pages.yml)
3
+ [![CI]()]()
4
+ [![Storybook deploy]()
5
5
  [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](#licencia)
6
6
 
7
- > Laboratorio para crear y validar una **librería de componentes React** de PC Soluciones en epidemiología y salud ocupacional.
8
- > Este proyecto sirve como **introducción** para testear funcionalidades, procesos de build/release, documentación y calidad, mientras aprendemos y definimos estándares.
7
+ > Repositorio para crear y validar una **librería de componentes React** de PC Soluciones en epidemiología y salud ocupacional.
8
+ > Este proyecto sirve para testear funcionalidades, procesos de build/release, documentación y calidad, mientras se prueba y define estándares.
9
9
 
10
10
  ---
11
11
 
12
12
  ## Demo & Docs
13
13
 
14
14
  - **Storybook (docs y ejemplos):**
15
- https://<camidev43>.github.io/<proyecto-libreria>/
15
+ https://<>.github.io/<>/
16
16
 
17
17
  ---
18
18
 
@@ -21,7 +21,7 @@
21
21
  - ⚡ **Vite** + **pnpm** → desarrollo y builds rápidos.
22
22
  - 🧩 **TypeScript** + **React 18/19** → DX moderna.
23
23
  - 🧪 **Vitest** + **Testing Library** → tests unitarios y de componentes.
24
- - 🎨 **CSS Modules** (y opción de Tailwind si se requiere más adelante).
24
+ - 🎨 **CSS Modules**.
25
25
  - 📚 **Storybook** → documentación interactiva de componentes.
26
26
  - ✅ **ESLint** + **Stylelint** + **Prettier** → estilo consistente y chequeos automáticos.
27
27
  - 🧰 **Husky + lint-staged** → calidad antes de cada commit.
@@ -29,9 +29,9 @@
29
29
 
30
30
  ---
31
31
 
32
- ## Objetivos del laboratorio
32
+ ## Objetivos de corekit-ui
33
33
 
34
- 1. Definir **estándares** de código, estilos y testing para la futura librería de la empresa.
34
+ 1. Definir **estándares** de código, estilos y testing para la librería de PC.
35
35
  2. Probar el **ciclo de vida completo**: scaffold → dev → test → docs → build → publish.
36
36
  3. Medir y ajustar **ergonomía DX** (scripts, tareas de VS Code, hooks, etc).
37
37
  4. Asegurar **tree-shaking** y empaquetado correcto para consumidores (apps web, microfronts, etc).
package/package.json CHANGED
@@ -1,132 +1,120 @@
1
- {
2
- "name": "corekit-ui",
3
- "homepage": "https://camidev43.github.io/proyecto-libreria/",
4
- "private": false,
5
- "version": "0.1.5",
6
- "type": "module",
7
- "files": [
8
- "dist"
9
- ],
10
- "main": "./dist/index.umd.cjs",
11
- "module": "./dist/index.js",
12
- "types": "./dist/index.d.ts",
13
- "sideEffects": [
14
- "**/*.css"
15
- ],
16
- "exports": {
17
- ".": {
18
- "import": "./dist/index.js",
19
- "require": "./dist/index.umd.cjs"
20
- }
21
- },
22
- "publishConfig": {
23
- "registry": "https://registry.npmjs.org/"
24
- },
25
- "peerDependencies": {
26
- "react": ">=18.2.0",
27
- "react-dom": ">=18.2.0"
28
- },
29
- "dependencies": {
30
- "@uidotdev/usehooks": "^2.4.1",
31
- "clsx": "^2.1.1",
32
- "lodash": "^4.17.21",
33
- "react-router-dom": "^7.8.0"
34
- },
35
- "devDependencies": {
36
- "@eslint/compat": "1.3.1",
37
- "@eslint/js": "9.32.0",
38
- "@mdx-js/react": "^3.0.1",
39
- "@storybook/addon-a11y": "^9.1.2",
40
- "@storybook/addon-docs": "9.1.2",
41
- "@storybook/addon-themes": "^9.1.2",
42
- "@storybook/addon-vitest": "9.1.2",
43
- "@storybook/builder-vite": "9.1.2",
44
- "@storybook/react": "9.1.2",
45
- "@storybook/react-vite": "9.1.2",
46
- "@storybook/test": "^8.6.14",
47
- "@testing-library/jest-dom": "^6",
48
- "@testing-library/react": "16.3.0",
49
- "@types/lodash": "4.17.20",
50
- "@types/react": "19.1.8",
51
- "@types/react-dom": "19.1.6",
52
- "@typescript-eslint/eslint-plugin": "8.39.1",
53
- "@typescript-eslint/parser": "8.39.1",
54
- "@vitejs/plugin-react": "4.7.0",
55
- "@vitest/browser": "^3.2.4",
56
- "@vitest/coverage-v8": "^3.2.4",
57
- "@yelo/rollup-node-external": "1.0.1",
58
- "alias-hq": "6.2.4",
59
- "eslint": "9.31.0",
60
- "eslint-config-prettier": "10.1.8",
61
- "eslint-import-resolver-typescript": "^4.4.4",
62
- "eslint-plugin-import": "2.32.0",
63
- "eslint-plugin-react": "7.37.5",
64
- "eslint-plugin-react-hooks": "5.2.0",
65
- "eslint-plugin-react-refresh": "0.4.20",
66
- "generate-react-cli": "8.4.9",
67
- "globals": "^16.3.0",
68
- "husky": "9.1.7",
69
- "is-ci": "4.1.0",
70
- "lint-staged": "16.1.2",
71
- "markdown-to-jsx": "^7.7.3",
72
- "npm-run-all2": "^8.0.4",
73
- "playwright": "^1.54.2",
74
- "postcss": "8.5.6",
75
- "postcss-preset-env": "10.2.4",
76
- "prettier": "3.3.3",
77
- "react": "19.1.0",
78
- "react-docgen-typescript": "2.4.0",
79
- "react-dom": "19.1.0",
80
- "rimraf": "^6.0.1",
81
- "storybook": "9.1.2",
82
- "stylelint": "16.23.1",
83
- "stylelint-config-standard": "39.0.0",
84
- "stylelint-order": "7.0.0",
85
- "typescript": "5.9.2",
86
- "vite": "7.1.0",
87
- "vite-plugin-css-injected-by-js": "^3.5.2",
88
- "vite-plugin-dts": "4.5.4",
89
- "vitest": "^3.2.4",
90
- "zustand": "^5.0.7"
91
- },
92
- "lint-staged": {
93
- "*.{js,jsx,ts,tsx}": [
94
- "eslint --fix"
95
- ],
96
- "*.{css,scss}": [
97
- "prettier --write",
98
- "stylelint --fix"
99
- ],
100
- "*.{json,md,mdx,html,yml,yaml}": [
101
- "prettier --write"
102
- ]
103
- },
104
- "scripts": {
105
- "dev": "vite --port 3000",
106
- "clean:lib": "rimraf dist",
107
- "build:lib": "vite build",
108
- "build": "npm-run-all2 -s clean:lib build:lib",
109
- "lint:code": "eslint . --ext .js,.jsx,.ts,.tsx --report-unused-disable-directives",
110
- "fix:code": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
111
- "lint:types": "tsc --pretty --noEmit",
112
- "lint:style": "stylelint \"src/**/*.{css,scss}\"",
113
- "fix:style": "stylelint \"src/**/*.{css,scss}\" --fix",
114
- "format": "prettier --cache --write .",
115
- "format:css": "prettier --write \"src/**/*.{css,scss}\"",
116
- "format:nocache": "prettier --write .",
117
- "format:check": "prettier --check .",
118
- "test": "npm-run-all2 -s test:unit test:sb:ci --",
119
- "test:unit": "vitest",
120
- "test:unit:ci": "vitest run --reporter=dot",
121
- "test:sb": "vitest --browser",
122
- "test:sb:ci": "vitest run --browser --reporter=dot",
123
- "test:ci": "npm-run-all2 -s test:unit:ci test:sb:ci",
124
- "preview": "vite preview",
125
- "start:docs": "storybook dev -p 6006",
126
- "build:docs": "storybook build",
127
- "generate:component": "npx generate-react-cli component",
128
- "check": "npm-run-all2 -s lint:code lint:style lint:types test:ci",
129
- "format:all": "npm-run-all2 -s format fix:style fix:code",
130
- "lint-staged": "lint-staged"
131
- }
132
- }
1
+ {
2
+ "name": "corekit-ui",
3
+ "description": "CoreKit UI Component Library - Enterprise Grade",
4
+ "version": "0.1.8",
5
+ "type": "module",
6
+ "private": false,
7
+ "homepage": "https://corekit-ui.yoursite.com",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "main": "./dist/index.umd.cjs",
12
+ "module": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "sideEffects": [
15
+ "**/*.css"
16
+ ],
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "import": "./dist/index.js",
21
+ "require": "./dist/index.umd.cjs"
22
+ }
23
+ },
24
+ "publishConfig": {
25
+ "registry": "https://registry.npmjs.org/"
26
+ },
27
+ "scripts": {
28
+ "dev": "vite --port 3000",
29
+ "build": "vite build",
30
+ "preview": "vite preview",
31
+ "storybook": "storybook dev -p 6006",
32
+ "build:storybook": "storybook build",
33
+ "lint": "eslint . --fix",
34
+ "lint:css": "stylelint \"src/**/*.{css,scss}\" --fix",
35
+ "typecheck": "tsc --noEmit",
36
+ "format": "prettier --write .",
37
+ "test": "vitest run",
38
+ "test:watch": "vitest",
39
+ "test:ui": "vitest --ui",
40
+ "test:coverage": "vitest run --coverage",
41
+ "check": "npm run typecheck && npm run lint && npm run lint:css && npm run test",
42
+ "prepare": "is-ci || husky",
43
+ "gen": "plop"
44
+ },
45
+ "peerDependencies": {
46
+ "react": "^18.3.0 || ^19.0.0",
47
+ "react-dom": "^18.3.0 || ^19.0.0"
48
+ },
49
+ "dependencies": {
50
+ "@floating-ui/react": "^0.27.16",
51
+ "@tanstack/react-router": "^1.139.7",
52
+ "@tanstack/react-table": "^8.21.3",
53
+ "@tanstack/react-virtual": "^3.13.12",
54
+ "@uidotdev/usehooks": "^2.4.1",
55
+ "class-variance-authority": "^0.7.1",
56
+ "clsx": "^2.1.1",
57
+ "nanoid": "^5.1.6",
58
+ "zustand": "^5.0.1"
59
+ },
60
+ "devDependencies": {
61
+ "@eslint/js": "^9.14.0",
62
+ "@storybook/addon-a11y": "^8.6.0",
63
+ "@storybook/addon-docs": "^8.6.0",
64
+ "@storybook/addon-essentials": "^8.6.0",
65
+ "@storybook/addon-interactions": "^8.6.0",
66
+ "@storybook/addon-themes": "^8.6.0",
67
+ "@storybook/blocks": "^8.6.0",
68
+ "@storybook/react": "^8.6.0",
69
+ "@storybook/react-vite": "^8.6.0",
70
+ "@storybook/test": "^8.6.0",
71
+ "@testing-library/dom": "^10.4.0",
72
+ "@testing-library/jest-dom": "^6.6.0",
73
+ "@testing-library/react": "^16.1.0",
74
+ "@types/react": "^19.0.0",
75
+ "@types/react-dom": "^19.0.0",
76
+ "@vitejs/plugin-react": "^4.3.4",
77
+ "@vitest/coverage-v8": "^2.1.8",
78
+ "@vitest/ui": "^2.1.8",
79
+ "eslint": "^9.17.0",
80
+ "eslint-config-prettier": "^9.1.0",
81
+ "eslint-import-resolver-typescript": "^3.7.0",
82
+ "eslint-plugin-import": "^2.31.0",
83
+ "eslint-plugin-react": "^7.37.2",
84
+ "eslint-plugin-react-hooks": "^5.1.0-rc.0",
85
+ "eslint-plugin-react-refresh": "^0.4.16",
86
+ "globals": "^15.14.0",
87
+ "husky": "^9.1.7",
88
+ "is-ci": "^3.0.1",
89
+ "jsdom": "^25.0.1",
90
+ "lint-staged": "^15.3.0",
91
+ "plop": "^4.0.1",
92
+ "postcss": "^8.4.49",
93
+ "postcss-preset-env": "^10.1.1",
94
+ "prettier": "^3.4.2",
95
+ "react": "^19.0.0",
96
+ "react-dom": "^19.0.0",
97
+ "storybook": "^8.6.0",
98
+ "stylelint": "^16.12.0",
99
+ "stylelint-config-standard": "^36.0.1",
100
+ "stylelint-order": "^6.0.4",
101
+ "typescript": "^5.9.3",
102
+ "typescript-eslint": "^8.18.0",
103
+ "vite": "^6.0.3",
104
+ "vite-plugin-dts": "^4.3.0",
105
+ "vitest": "^2.1.8"
106
+ },
107
+ "lint-staged": {
108
+ "*.{js,jsx,ts,tsx}": [
109
+ "eslint --fix",
110
+ "prettier --write"
111
+ ],
112
+ "*.{css,scss}": [
113
+ "stylelint --fix",
114
+ "prettier --write"
115
+ ],
116
+ "*.{json,md,mdx,html,yml,yaml}": [
117
+ "prettier --write"
118
+ ]
119
+ }
120
+ }
package/dist/index.d.ts DELETED
@@ -1,119 +0,0 @@
1
- import { ButtonHTMLAttributes } from 'react';
2
- import { ForwardRefExoticComponent } from 'react';
3
- import { ReactNode } from 'react';
4
- import { RefAttributes } from 'react';
5
-
6
- export declare const Boton: ForwardRefExoticComponent< {
7
- variant?: Variant;
8
- color?: Color;
9
- size?: Size;
10
- radius?: Radius;
11
- fullWidth?: boolean;
12
- isLoading?: boolean;
13
- isDisabled?: boolean;
14
- isIconOnly?: boolean;
15
- startContent?: ReactNode;
16
- endContent?: ReactNode;
17
- spinner?: ReactNode;
18
- spinnerPlacement?: SpinnerPlacement;
19
- disableRipple?: boolean;
20
- disableAnimation?: boolean;
21
- } & ButtonHTMLAttributes<HTMLButtonElement> & RefAttributes<HTMLButtonElement>>;
22
-
23
- declare type Color = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
24
-
25
- declare type Color_2 = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
26
-
27
- /**
28
- * FirmaManual - Componente para capturar una firma a mano o subir una imagen
29
- *
30
- * Props principales:
31
- * - `isOpen`: control booleano para abrir/ cerrar
32
- * - `onClose`: callback cuando el modal se cierra
33
- * - `onConfirm`: callback con data URL PNG al guardar
34
- *
35
- */
36
- export declare const FirmaManual: ForwardRefExoticComponent<Props & RefAttributes<FirmaManualRef>>;
37
-
38
- declare type FirmaManualRef = {
39
- /** Limpia el canvas (borrar todo) */
40
- limpiar: () => void;
41
- /** Obtiene la firma como data URL (PNG), o null si no hay firma */
42
- obtenerDatosFirma: () => string | null;
43
- /** Devuelve si el canvas está vacío */
44
- estaVacio: () => boolean;
45
- };
46
-
47
- declare type Props = {
48
- isOpen?: boolean;
49
- onClose?: () => void;
50
- onConfirm?: (signatureData: string) => void;
51
- titulo?: string;
52
- textoGuardar?: string;
53
- textoModificar?: string;
54
- textoDeshacer?: string;
55
- textoLimpiar?: string;
56
- textoAdjuntar?: string;
57
- ancho?: number;
58
- alto?: number;
59
- className?: string;
60
- textoConsentimiento?: string;
61
- mostrarBotonSubir?: boolean;
62
- cerrarAlGuardar?: boolean;
63
- };
64
-
65
- declare type Radius = 'none' | 'sm' | 'md' | 'lg' | 'full';
66
-
67
- declare type ResultadoValidacion = {
68
- invalido: boolean;
69
- mensaje?: string | null;
70
- };
71
-
72
- declare type Size = 'sm' | 'md' | 'lg';
73
-
74
- declare type SpinnerPlacement = 'start' | 'end';
75
-
76
- export declare const TextArea: ForwardRefExoticComponent<TextAreaProps & RefAttributes<HTMLTextAreaElement>>;
77
-
78
- declare type TextAreaProps = {
79
- children?: ReactNode;
80
- variant?: Variante;
81
- color?: Color_2;
82
- size?: 'sm' | 'md' | 'lg';
83
- radius?: 'none' | 'sm' | 'md' | 'lg';
84
- label?: ReactNode;
85
- labelPlacement?: 'inside' | 'outside';
86
- fullWidth?: boolean;
87
- value?: string;
88
- defaultValue?: string;
89
- placeholder?: string;
90
- startContent?: ReactNode;
91
- endContent?: ReactNode;
92
- isRequired?: boolean;
93
- isReadOnly?: boolean;
94
- isDisabled?: boolean;
95
- isClearable?: boolean;
96
- isInvalid?: boolean;
97
- validationState?: 'valid' | 'invalid';
98
- description?: ReactNode;
99
- errorMessage?: ReactNode | ((v: ResultadoValidacion) => ReactNode);
100
- validate?: (value: string) => string | {
101
- message?: string;
102
- } | true | null | undefined;
103
- minRows?: number;
104
- maxRows?: number;
105
- disableAutosize?: boolean;
106
- disableAnimation?: boolean;
107
- classNames?: Partial<Record<'base' | 'label' | 'inputWrapper' | 'headerWrapper' | 'innerWrapper' | 'input' | 'description' | 'errorMessage', string>>;
108
- id?: string;
109
- name?: string;
110
- rows?: number;
111
- onChange?: (value: string) => void;
112
- onClear?: () => void;
113
- };
114
-
115
- declare type Variant = 'solid' | 'bordered' | 'light' | 'faded' | 'ghost' | 'shadow';
116
-
117
- declare type Variante = 'flat' | 'bordered' | 'faded' | 'underlined' | 'light' | 'normal';
118
-
119
- export { }