autocasting-ui-library-padimasso 1.0.3

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/README.md ADDED
@@ -0,0 +1,76 @@
1
+ # 🎨 AutoCasting UI Library
2
+
3
+ **UI Library oficial para el ecosistema de Auto Casting**
4
+ Construida con React, TailwindCSS, Storybook y Rollup.
5
+
6
+ ---
7
+
8
+ ## 🚀 ¿Qué incluye este repositorio?
9
+
10
+ - ⚛️ Componentes reutilizables en React
11
+ - 🎨 Estilos con TailwindCSS 4
12
+ - 📘 Documentación visual con Storybook
13
+ - 📦 Build listo para distribución vía NPM o uso local
14
+ - ✅ Soporte completo para TypeScript y tipado externo
15
+
16
+ ---
17
+
18
+ ## 🧰 Requisitos previos
19
+
20
+ Asegurate de tener instalado:
21
+
22
+ - Node.js **v22+** (instalación recomendada con [NVM](https://github.com/nvm-sh/nvm))
23
+ - npm **v10+**
24
+
25
+ > ⚠️ Otros entornos pueden fallar al compilar TailwindCSS v4.
26
+ > Se recomienda estrictamente usar `nvm` y Node 22.16.0 para desarrollo local.
27
+
28
+ ---
29
+
30
+ ## 📦 Instalación local y uso con Storybook
31
+
32
+ ```bash
33
+ git clone https://github.com/PadiMassoOrg/AutoCasting-UI-Library.git
34
+ cd AutoCasting-UI-Library
35
+
36
+ # Instalación de dependencias
37
+ npm install
38
+
39
+ # Iniciar Storybook (http://localhost:6006)
40
+ npm run storybook
41
+ ```
42
+
43
+ ---
44
+
45
+ ## 🛠️ Scripts disponibles
46
+
47
+ - npm run build (Compila la librería: Rollup + CSS (genera la carpeta dist/))
48
+ - npm run storybook (Levanta el entorno visual con Storybook)
49
+ - npm run lint (Ejecuta ESLint sobre los archivos fuente)
50
+ - npm run format (Formatea el código con Prettier)
51
+
52
+ ---
53
+
54
+ ## 🔁 Flujo de desarrollo diario
55
+
56
+ Para trabajar localmente en la librería y reflejar los cambios en tu frontend:
57
+
58
+ 1. Modificá o creá componentes en src/components.
59
+
60
+ 2. Corré el build para regenerar el output consumible:
61
+
62
+ ```bash
63
+ npm run build
64
+ ```
65
+
66
+ 3. En tu frontend, asegurate de importar el paquete local actualizado.
67
+
68
+ > Tip: Si tu frontend no refleja cambios, intentá borrar .turbo, .next, o reiniciar el dev server.
69
+
70
+ ---
71
+
72
+ ## 📚 Documentación extendida
73
+
74
+ Para más detalles sobre arquitectura, releases, convenciones y CI/CD, consultá:
75
+
76
+ 📖 [Documentación en Confluence](https://padimasso.atlassian.net/wiki/spaces/AC/pages/3047425/Auto+Casting+UI+Library)
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { ButtonProps } from './Button.types';
3
+ declare const Button: React.FC<ButtonProps>;
4
+ export default Button;
@@ -0,0 +1,13 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { clsx } from 'clsx';
3
+
4
+ const variantClasses = {
5
+ primary: 'bg-blue-600 hover:bg-blue-700 text-white',
6
+ secondary: 'bg-yellow-500 hover:bg-yellow-600 text-white',
7
+ danger: 'bg-red-600 hover:bg-red-700 text-white',
8
+ };
9
+ const Button = ({ children, variant = 'primary', className, ...props }) => {
10
+ return (jsx("button", { className: clsx('px-4 py-2 rounded-md font-semibold transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2', variantClasses[variant], className), ...props, children: children }));
11
+ };
12
+
13
+ export { Button as default };
@@ -0,0 +1,6 @@
1
+ import { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ export type ButtonVariant = 'primary' | 'secondary' | 'danger';
3
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
4
+ children: ReactNode;
5
+ variant?: ButtonVariant;
6
+ }
@@ -0,0 +1 @@
1
+ export { default as Button } from './Button';
@@ -0,0 +1,11 @@
1
+ import React, { ButtonHTMLAttributes, ReactNode } from 'react';
2
+
3
+ type ButtonVariant = 'primary' | 'secondary' | 'danger';
4
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
5
+ children: ReactNode;
6
+ variant?: ButtonVariant;
7
+ }
8
+
9
+ declare const Button: React.FC<ButtonProps>;
10
+
11
+ export { Button };
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export { default as Button } from './components/Button/Button.js';
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "autocasting-ui-library-padimasso",
3
+ "version": "1.0.3",
4
+ "description": "UI Library para el ecosistema de Auto Casting",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js"
11
+ },
12
+ "./dist/styles.css": "./dist/styles.css"
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "scripts": {
18
+ "build": "rollup -c && npm run build:css",
19
+ "build:css": "tailwindcss -i ./src/styles/tailwind.css -o ./dist/styles.css --minify",
20
+ "test": "echo \"Error: no test specified\" && exit 1",
21
+ "storybook": "storybook dev -p 6006",
22
+ "build-storybook": "storybook build",
23
+ "lint": "eslint src --ext .ts,.tsx",
24
+ "format": "prettier --write ."
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/PadiMassoOrg/AutoCasting-UI-Library.git"
29
+ },
30
+ "keywords": [],
31
+ "author": "",
32
+ "license": "ISC",
33
+ "bugs": {
34
+ "url": "https://github.com/PadiMassoOrg/AutoCasting-UI-Library/issues"
35
+ },
36
+ "homepage": "https://github.com/PadiMassoOrg/AutoCasting-UI-Library#readme",
37
+ "peerDependencies": {
38
+ "react": "^19.1.0",
39
+ "react-dom": "^19.1.0"
40
+ },
41
+ "devDependencies": {
42
+ "@rollup/plugin-commonjs": "^28.0.6",
43
+ "@rollup/plugin-node-resolve": "^16.0.1",
44
+ "@rollup/plugin-typescript": "^12.1.3",
45
+ "@storybook/addon-docs": "^9.0.12",
46
+ "@storybook/react-vite": "^9.0.12",
47
+ "@tailwindcss/postcss": "^4.1.10",
48
+ "@types/react": "^19.1.8",
49
+ "@types/react-dom": "^19.1.6",
50
+ "@typescript-eslint/eslint-plugin": "^8.34.1",
51
+ "@typescript-eslint/parser": "^8.34.1",
52
+ "autoprefixer": "^10.4.21",
53
+ "clsx": "^2.1.1",
54
+ "eslint": "^9.29.0",
55
+ "eslint-config-prettier": "^10.1.5",
56
+ "eslint-plugin-jsx-a11y": "^6.10.2",
57
+ "eslint-plugin-react": "^7.37.5",
58
+ "eslint-plugin-react-hooks": "^5.2.0",
59
+ "postcss": "^8.5.6",
60
+ "prettier": "^3.5.3",
61
+ "rollup": "^4.44.0",
62
+ "rollup-plugin-dts": "^6.2.1",
63
+ "rollup-plugin-peer-deps-external": "^2.2.4",
64
+ "storybook": "^9.0.12",
65
+ "tailwindcss": "^4.1.10",
66
+ "typescript": "^5.8.3",
67
+ "typescript-eslint": "^8.34.1",
68
+ "vite": "^6.3.5"
69
+ }
70
+ }