@sector.siit/mlz-components 1.0.0 → 1.0.2
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 +133 -15
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.stories.d.ts +2 -3
- package/dist/components/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/Icons/Check.d.ts +3 -0
- package/dist/components/Icons/Check.d.ts.map +1 -0
- package/dist/components/Input/Input.d.ts +21 -0
- package/dist/components/Input/Input.d.ts.map +1 -0
- package/dist/components/Input/Input.stories.d.ts +85 -0
- package/dist/components/Input/Input.stories.d.ts.map +1 -0
- package/dist/components/Input/index.d.ts +3 -0
- package/dist/components/Input/index.d.ts.map +1 -0
- package/dist/components/NewInput/Input.d.ts +23 -0
- package/dist/components/NewInput/Input.d.ts.map +1 -0
- package/dist/components/NewInput/NewInput.stories.d.ts +12 -0
- package/dist/components/NewInput/NewInput.stories.d.ts.map +1 -0
- package/dist/components/NewInput/index.d.ts +2 -0
- package/dist/components/NewInput/index.d.ts.map +1 -0
- package/dist/components/UserCard/UserCard.d.ts +8 -0
- package/dist/components/UserCard/UserCard.d.ts.map +1 -0
- package/dist/components/UserCard/UserCard.stories.d.ts +7 -0
- package/dist/components/UserCard/UserCard.stories.d.ts.map +1 -0
- package/dist/components/UserCard/index.d.ts +3 -0
- package/dist/components/UserCard/index.d.ts.map +1 -0
- package/dist/index.d.ts +35 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +138 -28
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +139 -27
- package/dist/index.js.map +1 -1
- package/package.json +74 -81
package/README.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
Una librería moderna de componentes React con Tailwind CSS y variables CSS customizables.
|
|
4
4
|
|
|
5
|
+
<!-- Badges -->
|
|
6
|
+
[](https://github.com/sector-siit/mlz-components/actions/workflows/ci-cd.yml)
|
|
7
|
+
[](https://github.com/sector-siit/mlz-components/actions/workflows/build.yml)
|
|
8
|
+
[](https://www.npmjs.com/package/@sector.siit/mlz-components)
|
|
9
|
+
[](https://www.npmjs.com/package/@sector.siit/mlz-components)
|
|
10
|
+
[](https://bundlephobia.com/package/@sector.siit/mlz-components)
|
|
11
|
+
|
|
12
|
+
[](https://www.typescriptlang.org/)
|
|
13
|
+
[](https://sector-siit.github.io/mlz-components/)
|
|
14
|
+
[](https://github.com/sector-siit/mlz-components/blob/main/LICENSE)
|
|
15
|
+
[](https://github.com/sector-siit/mlz-components/graphs/contributors)
|
|
16
|
+
[](https://github.com/sector-siit/mlz-components/stargazers)
|
|
17
|
+
|
|
18
|
+
[](https://github.com/sector-siit/mlz-components/releases)
|
|
19
|
+
[](https://www.npmjs.com/package/@sector.siit/mlz-components)
|
|
20
|
+
[](#-componentes)
|
|
21
|
+
[](https://github.com/sector-siit/mlz-components)
|
|
22
|
+
[](https://github.com/sector-siit/mlz-components/commits/main)
|
|
23
|
+
|
|
5
24
|
## 🚀 Características
|
|
6
25
|
|
|
7
26
|
- ⚛️ **React 18** - Componentes modernos con TypeScript
|
|
@@ -98,7 +117,7 @@ Un componente de botón versatil con múltiples variantes y tamaños.
|
|
|
98
117
|
|
|
99
118
|
| Prop | Tipo | Default | Descripción |
|
|
100
119
|
|------|------|---------|-------------|
|
|
101
|
-
| `variant` | `'primary' \| 'secondary' \| 'outline' \| 'ghost'` | `'primary'` | Variante visual del botón |
|
|
120
|
+
| `variant` | `'primary' \| 'secondary' \| 'outline-solid' \| 'ghost'` | `'primary'` | Variante visual del botón |
|
|
102
121
|
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Tamaño del botón |
|
|
103
122
|
| `children` | `React.ReactNode` | - | Contenido del botón |
|
|
104
123
|
| `disabled` | `boolean` | `false` | Estado deshabilitado |
|
|
@@ -122,6 +141,50 @@ Un componente de botón versatil con múltiples variantes y tamaños.
|
|
|
122
141
|
<Button disabled>Deshabilitado</Button>
|
|
123
142
|
```
|
|
124
143
|
|
|
144
|
+
### Input
|
|
145
|
+
|
|
146
|
+
Componente de input con validación, estados y personalización completa.
|
|
147
|
+
|
|
148
|
+
#### Props
|
|
149
|
+
|
|
150
|
+
| Prop | Tipo | Default | Descripción |
|
|
151
|
+
|------|------|---------|-------------|
|
|
152
|
+
| `variant` | `'default' \| 'error' \| 'success'` | `'default'` | Estado visual del input |
|
|
153
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Tamaño del input |
|
|
154
|
+
| `label` | `string` | - | Texto del label |
|
|
155
|
+
| `helperText` | `string` | - | Texto de ayuda |
|
|
156
|
+
| `errorText` | `string` | - | Texto de error (sobrescribe helperText) |
|
|
157
|
+
| `fullWidth` | `boolean` | `false` | Si el input ocupa todo el ancho |
|
|
158
|
+
|
|
159
|
+
#### Ejemplos
|
|
160
|
+
|
|
161
|
+
```tsx
|
|
162
|
+
// Básico
|
|
163
|
+
<Input placeholder="Ingresa tu nombre" />
|
|
164
|
+
|
|
165
|
+
// Con label y ayuda
|
|
166
|
+
<Input
|
|
167
|
+
label="Email"
|
|
168
|
+
placeholder="usuario@ejemplo.com"
|
|
169
|
+
helperText="Te enviaremos notificaciones aquí"
|
|
170
|
+
/>
|
|
171
|
+
|
|
172
|
+
// Con error
|
|
173
|
+
<Input
|
|
174
|
+
label="Password"
|
|
175
|
+
type="password"
|
|
176
|
+
variant="error"
|
|
177
|
+
errorText="La contraseña debe tener al menos 8 caracteres"
|
|
178
|
+
/>
|
|
179
|
+
|
|
180
|
+
// Tamaños
|
|
181
|
+
<Input size="sm" placeholder="Input pequeño" />
|
|
182
|
+
<Input size="lg" placeholder="Input grande" />
|
|
183
|
+
|
|
184
|
+
// Ancho completo
|
|
185
|
+
<Input fullWidth placeholder="Ocupa todo el ancho" />
|
|
186
|
+
```
|
|
187
|
+
|
|
125
188
|
## 🛠️ Desarrollo
|
|
126
189
|
|
|
127
190
|
```bash
|
|
@@ -141,17 +204,50 @@ npm run lint
|
|
|
141
204
|
npm run typecheck
|
|
142
205
|
```
|
|
143
206
|
|
|
144
|
-
## 🚀
|
|
207
|
+
## 🚀 CI/CD & Deployments
|
|
145
208
|
|
|
146
|
-
El proyecto incluye
|
|
209
|
+
El proyecto incluye un sistema completo de CI/CD automatizado:
|
|
147
210
|
|
|
148
|
-
|
|
149
|
-
2. **Despliegue de Storybook a GitHub Pages** en cada push a main
|
|
211
|
+
### 📦 Releases Automáticos
|
|
150
212
|
|
|
151
|
-
|
|
213
|
+
#### Production Releases (main)
|
|
214
|
+
- **Trigger**: Push a `main` con cambio de versión en `package.json`
|
|
215
|
+
- **Outputs**:
|
|
216
|
+
- 📦 NPM package publicado
|
|
217
|
+
- 📚 Storybook actualizado en GitHub Pages
|
|
218
|
+
- 🚀 GitHub Release con changelog
|
|
219
|
+
- 🏷️ Git tag automático
|
|
152
220
|
|
|
153
|
-
|
|
154
|
-
|
|
221
|
+
#### Release Candidates (develop)
|
|
222
|
+
- **Trigger**: Cualquier push a `develop`
|
|
223
|
+
- **Outputs**:
|
|
224
|
+
- 🧪 NPM package con tag `@rc`
|
|
225
|
+
- 📋 GitHub Prerelease
|
|
226
|
+
- 📊 Assets descargables (build + storybook)
|
|
227
|
+
|
|
228
|
+
### 🎯 Instalación de Versiones
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# Última versión estable
|
|
232
|
+
npm install @sector.siit/mlz-components
|
|
233
|
+
|
|
234
|
+
# Última release candidate
|
|
235
|
+
npm install @sector.siit/mlz-components@rc
|
|
236
|
+
|
|
237
|
+
# Versión específica de RC
|
|
238
|
+
npm install @sector.siit/mlz-components@1.0.0-rc.202508071430
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### ⚡ Quick Releases
|
|
242
|
+
|
|
243
|
+
Para cambios solo de documentación, el sistema detecta automáticamente y ejecuta un pipeline optimizado de ~2 minutos.
|
|
244
|
+
|
|
245
|
+
### 📋 Configuración Requerida
|
|
246
|
+
|
|
247
|
+
1. **NPM Token**: Agregar `NPM_TOKEN` a GitHub Secrets
|
|
248
|
+
2. **GitHub Pages**: Habilitar en configuración del repositorio
|
|
249
|
+
|
|
250
|
+
Ver [documentación completa de CI/CD](./docs/CI-CD.md) para más detalles.
|
|
155
251
|
|
|
156
252
|
## 📄 Licencia
|
|
157
253
|
|
|
@@ -195,12 +291,34 @@ git push origin main # 🚀 Publica a NPM + GitHub Release
|
|
|
195
291
|
4. Push a tu rama (`git push origin feature/AmazingFeature`)
|
|
196
292
|
5. Abre un Pull Request hacia `develop`
|
|
197
293
|
|
|
294
|
+
### 📋 Guías de Contribución
|
|
295
|
+
|
|
296
|
+
- [🛠️ Developer Guide](./docs/DEVELOPER.md) - Guía completa para desarrolladores
|
|
297
|
+
- [🚀 CI/CD Documentation](./docs/CI-CD.md) - Sistema de deployments automatizados
|
|
298
|
+
|
|
299
|
+
## 👥 Contributors
|
|
300
|
+
|
|
301
|
+
¡Gracias a todas las personas que han contribuido a este proyecto!
|
|
302
|
+
|
|
303
|
+
<!-- CONTRIBUTORS:START -->
|
|
304
|
+
<!-- CONTRIBUTORS:END -->
|
|
305
|
+
|
|
306
|
+
### 📊 Estadísticas de Contribuciones
|
|
307
|
+
|
|
308
|
+
Para ver estadísticas detalladas de contribuciones, consulta [CONTRIBUTORS_STATS.md](./docs/CONTRIBUTORS_STATS.md).
|
|
309
|
+
|
|
198
310
|
## 📈 Roadmap
|
|
199
311
|
|
|
200
|
-
- [
|
|
201
|
-
- [
|
|
202
|
-
- [
|
|
203
|
-
- [
|
|
204
|
-
- [
|
|
205
|
-
- [ ]
|
|
206
|
-
- [ ]
|
|
312
|
+
- [x] ✅ Componente Button con variantes y tamaños
|
|
313
|
+
- [x] ✅ Componente Input con validación y estados
|
|
314
|
+
- [x] ✅ Sistema de CI/CD automatizado
|
|
315
|
+
- [x] ✅ Release Candidates con NPM
|
|
316
|
+
- [x] ✅ Documentación completa con Storybook
|
|
317
|
+
- [ ] 🔄 Componente Card
|
|
318
|
+
- [ ] 🔄 Componente Modal
|
|
319
|
+
- [ ] 🔄 Componente Dropdown
|
|
320
|
+
- [ ] 🔄 Sistema de themes predefinidos
|
|
321
|
+
- [ ] 🔄 Componentes de formulario avanzados
|
|
322
|
+
- [ ] 🔄 Componentes de navegación
|
|
323
|
+
- [ ] 🔄 Componente DatePicker
|
|
324
|
+
- [ ] 🔄 Componente DataTable
|
|
@@ -7,7 +7,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
7
7
|
/**
|
|
8
8
|
* Variante del botón
|
|
9
9
|
*/
|
|
10
|
-
variant?: 'primary' | 'secondary' | 'outline' | 'ghost';
|
|
10
|
+
variant?: 'primary' | 'secondary' | 'outline-solid' | 'ghost';
|
|
11
11
|
/**
|
|
12
12
|
* Tamaño del botón
|
|
13
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAChF;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAChF;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,eAAe,GAAG,OAAO,CAAC;IAC9D;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAeD,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA4BxC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from
|
|
2
|
-
import { Button } from
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Button } from "./Button";
|
|
3
3
|
declare const meta: Meta<typeof Button>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Primary: Story;
|
|
7
7
|
export declare const Secondary: Story;
|
|
8
|
-
export declare const Outline: Story;
|
|
9
8
|
export declare const Ghost: Story;
|
|
10
9
|
export declare const Small: Story;
|
|
11
10
|
export declare const Medium: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAiC7B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAKpB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAkBzB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAgC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Check.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/Check.tsx"],"names":[],"mappings":";AAAA,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAU7D,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
3
|
+
/** Variante visual del input */
|
|
4
|
+
variant?: "default" | "error" | "success";
|
|
5
|
+
/** Tamaño del input */
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
/** Si el input tiene un label */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Texto de ayuda debajo del input */
|
|
10
|
+
helperText?: string;
|
|
11
|
+
/** Texto de error */
|
|
12
|
+
errorText?: string;
|
|
13
|
+
/** Si el input es de ancho completo */
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Componente Input básico con diferentes variantes y tamaños
|
|
18
|
+
*/
|
|
19
|
+
export declare const Input: React.FC<InputProps>;
|
|
20
|
+
export default Input;
|
|
21
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";AAAA,MAAM,WAAW,UAChB,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACjE,gCAAgC;IAChC,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAC1C,uBAAuB;IACvB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAyHtC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").FC<import("./Input").InputProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
tags: string[];
|
|
15
|
+
argTypes: {
|
|
16
|
+
variant: {
|
|
17
|
+
control: {
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
options: string[];
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
size: {
|
|
24
|
+
control: {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
options: string[];
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
label: {
|
|
31
|
+
control: {
|
|
32
|
+
type: string;
|
|
33
|
+
};
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
placeholder: {
|
|
37
|
+
control: {
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
helperText: {
|
|
43
|
+
control: {
|
|
44
|
+
type: string;
|
|
45
|
+
};
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
errorText: {
|
|
49
|
+
control: {
|
|
50
|
+
type: string;
|
|
51
|
+
};
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
fullWidth: {
|
|
55
|
+
control: {
|
|
56
|
+
type: string;
|
|
57
|
+
};
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
disabled: {
|
|
61
|
+
control: {
|
|
62
|
+
type: string;
|
|
63
|
+
};
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
export default meta;
|
|
69
|
+
type Story = StoryObj<typeof meta>;
|
|
70
|
+
export declare const Default: Story;
|
|
71
|
+
export declare const WithLabel: Story;
|
|
72
|
+
export declare const WithHelperText: Story;
|
|
73
|
+
export declare const WithError: Story;
|
|
74
|
+
export declare const Success: Story;
|
|
75
|
+
export declare const Small: Story;
|
|
76
|
+
export declare const Medium: Story;
|
|
77
|
+
export declare const Large: Story;
|
|
78
|
+
export declare const Disabled: Story;
|
|
79
|
+
export declare const FullWidth: Story;
|
|
80
|
+
export declare const Password: Story;
|
|
81
|
+
export declare const Email: Story;
|
|
82
|
+
export declare const Number: Story;
|
|
83
|
+
export declare const AllVariants: Story;
|
|
84
|
+
export declare const AllSizes: Story;
|
|
85
|
+
//# sourceMappingURL=Input.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDoB,CAAC;AAE/B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAGnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAGF,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC;AAGF,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAMpB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAQpB,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,KAyBzB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,KAuBtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
errorText?: string;
|
|
4
|
+
hasError?: boolean;
|
|
5
|
+
helperText?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
fullWidth?: boolean;
|
|
10
|
+
containerProps: ContainerProp;
|
|
11
|
+
labelProps: LabelProp;
|
|
12
|
+
helperTextProps: HelperTextProp;
|
|
13
|
+
checkedIcon?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
interface ContainerProp extends React.HTMLAttributes<HTMLDivElement> {
|
|
16
|
+
}
|
|
17
|
+
interface LabelProp extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
18
|
+
}
|
|
19
|
+
interface HelperTextProp extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
20
|
+
}
|
|
21
|
+
export declare const Input: React.FC<InputProps>;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/NewInput/Input.tsx"],"names":[],"mappings":";AAEA,MAAM,WAAW,UAChB,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,aAAa,CAAC;IAC9B,UAAU,EAAE,SAAS,CAAC;IACtB,eAAe,EAAE,cAAc,CAAC;IAChC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,UAAU,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAEvE,UAAU,SAAU,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;CAAG;AAE1E,UAAU,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC;CAAG;AAyB9E,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAoCtC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Input } from "./Input";
|
|
3
|
+
declare const meta: Meta<typeof Input>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Input>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithError: Story;
|
|
8
|
+
export declare const WithHelperText: Story;
|
|
9
|
+
export declare const WithLabel: Story;
|
|
10
|
+
export declare const WithPlaceholder: Story;
|
|
11
|
+
export declare const FullWidth: Story;
|
|
12
|
+
//# sourceMappingURL=NewInput.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NewInput.stories.d.ts","sourceRoot":"","sources":["../../../src/components/NewInput/NewInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAG5B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AAEpC,eAAO,MAAM,OAAO,EAAE,KAqBrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAK5B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAK7B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAiBvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NewInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface UserCardProps {
|
|
2
|
+
name: string;
|
|
3
|
+
email: string;
|
|
4
|
+
changeUser: () => void;
|
|
5
|
+
editUser: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function UserCard({ name, email, changeUser, editUser }: UserCardProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=UserCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserCard.d.ts","sourceRoot":"","sources":["../../../src/components/UserCard/UserCard.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,aAAa,2CAa5E"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { type UserCardProps } from "./UserCard";
|
|
3
|
+
declare const meta: Meta<UserCardProps>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<UserCardProps>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
//# sourceMappingURL=UserCard.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserCard.stories.d.ts","sourceRoot":"","sources":["../../../src/components/UserCard/UserCard.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE1D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,aAAa,CAU7B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/UserCard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,48 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React$1 from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
4
|
|
|
3
|
-
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
6
|
/**
|
|
5
7
|
* Contenido del botón
|
|
6
8
|
*/
|
|
7
|
-
children: React.ReactNode;
|
|
9
|
+
children: React$1.ReactNode;
|
|
8
10
|
/**
|
|
9
11
|
* Variante del botón
|
|
10
12
|
*/
|
|
11
|
-
variant?: 'primary' | 'secondary' | 'outline' | 'ghost';
|
|
13
|
+
variant?: 'primary' | 'secondary' | 'outline-solid' | 'ghost';
|
|
12
14
|
/**
|
|
13
15
|
* Tamaño del botón
|
|
14
16
|
*/
|
|
15
17
|
size?: 'sm' | 'md' | 'lg';
|
|
16
18
|
}
|
|
17
|
-
declare const Button: React.FC<ButtonProps>;
|
|
19
|
+
declare const Button: React$1.FC<ButtonProps>;
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
22
|
+
/** Variante visual del input */
|
|
23
|
+
variant?: "default" | "error" | "success";
|
|
24
|
+
/** Tamaño del input */
|
|
25
|
+
size?: "sm" | "md" | "lg";
|
|
26
|
+
/** Si el input tiene un label */
|
|
27
|
+
label?: string;
|
|
28
|
+
/** Texto de ayuda debajo del input */
|
|
29
|
+
helperText?: string;
|
|
30
|
+
/** Texto de error */
|
|
31
|
+
errorText?: string;
|
|
32
|
+
/** Si el input es de ancho completo */
|
|
33
|
+
fullWidth?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Componente Input básico con diferentes variantes y tamaños
|
|
37
|
+
*/
|
|
38
|
+
declare const Input: React.FC<InputProps>;
|
|
39
|
+
|
|
40
|
+
interface UserCardProps {
|
|
41
|
+
name: string;
|
|
42
|
+
email: string;
|
|
43
|
+
changeUser: () => void;
|
|
44
|
+
editUser: () => void;
|
|
45
|
+
}
|
|
46
|
+
declare function UserCard({ name, email, changeUser, editUser }: UserCardProps): react_jsx_runtime.JSX.Element;
|
|
47
|
+
|
|
48
|
+
export { Button, type ButtonProps, Input, type InputProps, UserCard, type UserCardProps };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,CAAC;AAGtB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,CAAC;AAGtB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC"}
|