@imj_media/ui 1.0.41 → 1.0.43

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 CHANGED
@@ -1,297 +1,665 @@
1
- # @imj_media/ui
1
+ # 🎨 @imj_media/ui
2
2
 
3
- Paquete de componentes de UI para React (TypeScript + ES Modules).
3
+ Biblioteca de componentes UI moderna y accesible para React, construida con TypeScript y Tailwind CSS.
4
4
 
5
- ## Instalación
5
+ ## 📦 Instalación
6
6
 
7
7
  ```bash
8
8
  npm install @imj_media/ui
9
+ # o
10
+ yarn add @imj_media/ui
11
+ # o
12
+ pnpm add @imj_media/ui
13
+ ```
14
+
15
+ ## 🚀 Uso Básico
9
16
 
10
- pnpm i @imj_media/ui
17
+ ```tsx
18
+ import { Button, Input, Modal } from '@imj_media/ui'
19
+ import '@imj_media/ui/index.css'
11
20
 
21
+ function App() {
22
+ return (
23
+ <div>
24
+ <Button variant="button" color="blue">
25
+ Hola Mundo
26
+ </Button>
27
+ <Input label="Email" placeholder="tu@email.com" />
28
+ </div>
29
+ )
30
+ }
12
31
  ```
13
32
 
33
+ ## 🎯 Características Principales
14
34
 
35
+ - **TypeScript First**: Tipos completamente tipados para una mejor experiencia de desarrollo
36
+ - **Tailwind CSS**: Sistema de diseño consistente y personalizable
37
+ - **Accesibilidad**: Componentes construidos siguiendo las mejores prácticas de a11y
38
+ - **Responsive**: Diseño adaptable a todos los tamaños de pantalla
39
+ - **Tema Personalizable**: Sistema de colores y estilos fácilmente configurable
40
+ - **Storybook**: Documentación interactiva de todos los componentes
15
41
 
16
- ## Uso básico
42
+ ## 🏗️ Estructura del Paquete
17
43
 
44
+ ```
45
+ src/
46
+ ├── modules/ # Componentes principales
47
+ ├── shared/ # Utilidades y tipos compartidos
48
+ │ ├── types/ # Definiciones de tipos TypeScript
49
+ │ ├── utils/ # Funciones utilitarias
50
+ │ ├── styles/ # Estilos CSS y variables
51
+ │ ├── hooks/ # Hooks personalizados
52
+ │ └── assets/ # Recursos estáticos
53
+ └── index.ts # Punto de entrada principal
54
+ ```
55
+
56
+ ## 🧩 Componentes Disponibles
57
+
58
+ ### 🎨 Componentes de Navegación
59
+
60
+ #### Accordion
18
61
  ```tsx
19
- import { Button, Modal, Chip, Drawer, Icon, Toast, Toaster } from '@imj_media/ui';
62
+ import { Accordion } from '@imj_media/ui'
20
63
 
21
- function App() {
22
- const [open, setOpen] = React.useState(false);
23
- const [drawerOpen, setDrawerOpen] = React.useState(false);
64
+ <Accordion>
65
+ <Accordion.Item title="Sección 1">
66
+ Contenido de la sección 1
67
+ </Accordion.Item>
68
+ </Accordion>
69
+ ```
24
70
 
25
- return (
26
- <>
27
- <Button onClick={() => setOpen(true)}>Abrir modal</Button>
28
- <Button onClick={() => setDrawerOpen(true)}>Abrir drawer</Button>
29
-
30
- <Modal isOpen={open} onClose={() => setOpen(false)} title="Título del modal">
31
- <p>Contenido del modal</p>
32
- </Modal>
33
-
34
- <Drawer isOpen={drawerOpen} onClose={() => setDrawerOpen(false)} title="Mi Drawer">
35
- <p>Contenido del drawer</p>
36
- </Drawer>
37
-
38
- <Toaster />
39
- </>
40
- );
41
- }
71
+ #### Breadcrumbs
72
+ ```tsx
73
+ import { Breadcrumbs } from '@imj_media/ui'
74
+
75
+ <Breadcrumbs
76
+ items={[
77
+ { label: 'Inicio', href: '/' },
78
+ { label: 'Productos', href: '/productos' }
79
+ ]}
80
+ />
81
+ ```
82
+
83
+ #### Drawer
84
+ ```tsx
85
+ import { Drawer } from '@imj_media/ui'
86
+
87
+ <Drawer isOpen={isOpen} onClose={() => setIsOpen(false)}>
88
+ Contenido del drawer
89
+ </Drawer>
42
90
  ```
43
91
 
44
- ## Componentes disponibles
92
+ #### Modal
93
+ ```tsx
94
+ import { Modal } from '@imj_media/ui'
45
95
 
46
- ### Button
96
+ <Modal isOpen={isOpen} onClose={() => setIsOpen(false)} size="md">
97
+ <Modal.Header title="Título del Modal" />
98
+ <Modal.Body>
99
+ Contenido del modal
100
+ </Modal.Body>
101
+ <Modal.Footer>
102
+ <Button onClick={onCancel}>Cancelar</Button>
103
+ <Button onClick={onSuccess}>Confirmar</Button>
104
+ </Modal.Footer>
105
+ </Modal>
106
+ ```
47
107
 
108
+ #### Popup
48
109
  ```tsx
110
+ import { Popup } from '@imj_media/ui'
111
+
112
+ <Popup
113
+ trigger={<Button>Abrir Popup</Button>}
114
+ content="Contenido del popup"
115
+ position="top"
116
+ />
117
+ ```
118
+
119
+ ### 🎯 Componentes de Formulario
120
+
121
+ #### Button
122
+ ```tsx
123
+ import { Button } from '@imj_media/ui'
124
+
49
125
  <Button
50
- variant="contained"
51
- color="primary"
126
+ variant="button"
127
+ color="blue"
52
128
  size="md"
53
- rounded="md"
54
- icon="CheckOutlined"
55
- onClick={() => alert('¡Click!')}
129
+ icon="check"
130
+ onClick={handleClick}
56
131
  >
57
- Botón con icono
132
+ Botón Principal
58
133
  </Button>
59
134
  ```
60
135
 
61
- **Props:**
62
- - `variant`: `"contained" | "outlined" | "text" | "link" | "ghost" | "white"` (default: `"contained"`)
63
- - `color`: `"primary" | "secondary" | "danger" | "success" | "warning" | "info" | "alert" | "gray"` (default: `"primary"`)
64
- - `size`: `"clear" | "minimal" | "xs" | "sm" | "md" | "lg"` (default: `"md"`)
65
- - `rounded`: `"none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full"` (default: `"md"`)
66
- - `icon`: `IconType | React.ReactElement` (opcional)
67
- - `colorIcon`: `string` (color del icono)
68
- - `fullWidth`: `boolean` (default: `false`)
69
- - `clickable`: `boolean` (opcional)
70
- - `disabled`: `boolean`
71
- - `onClick`: `() => void`
72
- - `className`: `string`
73
- - `children`: `React.ReactNode`
136
+ **Variantes disponibles:**
137
+ - `button`: Botón estándar con fondo
138
+ - `text`: Botón de texto sin fondo
139
+ - `outlined`: Botón con borde
140
+ - `soft`: Botón con fondo suave
141
+ - `icon`: Botón solo con icono
142
+
143
+ **Colores disponibles:**
144
+ - `blue`, `green`, `orange`, `red`
145
+ - `white`, `black`, `neutral`
146
+ - `yellow`, `blue-dark`, `blue-light`
147
+ - `transparent`
74
148
 
75
- ### Modal
149
+ **Tamaños disponibles:**
150
+ - `xs`, `sm`, `md`, `lg`, `xl`, `2xl`
76
151
 
152
+ #### ButtonGroup
77
153
  ```tsx
78
- <Modal
79
- isOpen={isOpen}
80
- onClose={() => setOpen(false)}
154
+ import { ButtonGroup } from '@imj_media/ui'
155
+
156
+ <ButtonGroup>
157
+ <Button variant="outlined">Izquierda</Button>
158
+ <Button variant="outlined">Centro</Button>
159
+ <Button variant="outlined">Derecha</Button>
160
+ </ButtonGroup>
161
+ ```
162
+
163
+ #### Input
164
+ ```tsx
165
+ import { Input } from '@imj_media/ui'
166
+
167
+ <Input
168
+ label="Email"
169
+ placeholder="tu@email.com"
81
170
  size="md"
82
- showCloseButton={true}
83
- disableEscapeClose={false}
84
- disableOutsideTab={false}
85
- closeAtCorner={true}
86
- >
87
- <Modal.Header>
88
- <h2>Título del modal</h2>
89
- </Modal.Header>
90
- <Modal.Body>
91
- <p>Contenido del modal</p>
92
- </Modal.Body>
93
- <Modal.Footer>
94
- <Button onClick={() => setOpen(false)}>Cerrar</Button>
95
- </Modal.Footer>
96
- </Modal>
171
+ color="blue"
172
+ leftSlot="mail"
173
+ error="Email inválido"
174
+ helperText="Ingresa tu email corporativo"
175
+ />
97
176
  ```
98
177
 
99
- **Props:**
100
- - `isOpen`: `boolean` (controla si el modal está abierto)
101
- - `onClose`: `() => void` (callback para cerrar)
102
- - `children`: `React.ReactNode`
103
- - `size`: `"sm" | "md" | "lg" | "xl" | "full"` (default: `"md"`)
104
- - `showCloseButton`: `boolean` (default: `true`)
105
- - `disableEscapeClose`: `boolean` (default: `false`)
106
- - `disableOutsideTab`: `boolean` (default: `false`)
107
- - `closeAtCorner`: `boolean` (default: `true`)
178
+ **Características:**
179
+ - Soporte para slots izquierdo y derecho
180
+ - Validación de errores
181
+ - Texto de ayuda
182
+ - Auto-redimensionamiento
183
+ - Diferentes tamaños y colores
108
184
 
109
- **Componentes compuestos:**
185
+ #### Textarea
186
+ ```tsx
187
+ import { Textarea } from '@imj_media/ui'
110
188
 
111
- - `Modal.Header`: Header del modal con botón de cerrar opcional
112
- - `showCloseButton`: `boolean` (opcional, hereda del modal padre)
113
- - `closeAtCorner`: `boolean` (opcional, hereda del modal padre)
114
- - `children`: `React.ReactNode`
189
+ <Textarea
190
+ label="Descripción"
191
+ placeholder="Describe tu proyecto..."
192
+ rows={4}
193
+ maxLength={500}
194
+ />
195
+ ```
115
196
 
116
- - `Modal.Body`: Contenido principal del modal
117
- - `children`: `React.ReactNode`
197
+ #### Switch
198
+ ```tsx
199
+ import { Switch } from '@imj_media/ui'
118
200
 
119
- - `Modal.Footer`: Pie del modal para acciones
120
- - `children`: `React.ReactNode`
201
+ <Switch
202
+ checked={isEnabled}
203
+ onChange={setIsEnabled}
204
+ label="Habilitar notificaciones"
205
+ />
206
+ ```
121
207
 
122
- ### Chip
208
+ #### RadioButton
209
+ ```tsx
210
+ import { RadioButton } from '@imj_media/ui'
211
+
212
+ <RadioButton
213
+ name="tipo"
214
+ value="personal"
215
+ checked={tipo === 'personal'}
216
+ onChange={(value) => setTipo(value)}
217
+ label="Proyecto Personal"
218
+ />
219
+ ```
220
+
221
+ #### DatePicker
222
+ ```tsx
223
+ import { DatePicker } from '@imj_media/ui'
224
+
225
+ <DatePicker
226
+ value={selectedDate}
227
+ onChange={setSelectedDate}
228
+ placeholder="Selecciona una fecha"
229
+ format="DD/MM/YYYY"
230
+ />
231
+ ```
232
+
233
+ ### 🎨 Componentes de Visualización
234
+
235
+ #### Badge
236
+ ```tsx
237
+ import { Badge } from '@imj_media/ui'
238
+
239
+ <Badge color="green" size="md">
240
+ Activo
241
+ </Badge>
242
+ ```
123
243
 
244
+ #### Chip
124
245
  ```tsx
246
+ import { Chip } from '@imj_media/ui'
247
+
125
248
  <Chip
126
- label="Etiqueta"
127
- variant="contained"
128
- color="primary"
249
+ color="blue"
129
250
  size="md"
130
- rounded="full"
131
- badge={false}
132
- onClick={() => console.log('Chip clickeado')}
251
+ onDelete={() => handleDelete()}
252
+ >
253
+ Etiqueta
254
+ </Chip>
255
+ ```
256
+
257
+ #### Avatar
258
+ ```tsx
259
+ import { Avatar } from '@imj_media/ui'
260
+
261
+ <Avatar
262
+ src="/avatar.jpg"
263
+ alt="Usuario"
264
+ size="md"
265
+ fallback="U"
266
+ />
267
+ ```
268
+
269
+ #### Logo
270
+ ```tsx
271
+ import { Logo } from '@imj_media/ui'
272
+
273
+ <Logo
274
+ src="/logo.svg"
275
+ alt="IMJ Media"
276
+ size="lg"
133
277
  />
134
278
  ```
135
279
 
136
- **Props:**
137
- - `label`: `string` (texto del chip)
138
- - `variant`: `"contained" | "outlined" | "text" | "link" | "ghost" | "white"` (default: `"contained"`)
139
- - `color`: `"primary" | "secondary" | "danger" | "success" | "warning" | "info" | "alert" | "gray"` (default: `"primary"`)
140
- - `size`: `"clear" | "minimal" | "xs" | "sm" | "md" | "lg"` (default: `"md"`)
141
- - `rounded`: `"full" | "md"` (default: `"full"`)
142
- - `badge`: `boolean` (default: `false`)
143
- - `disabled`: `boolean`
144
- - `onClick`: `() => void`
145
- - `className`: `string`
280
+ #### Picture
281
+ ```tsx
282
+ import { Picture } from '@imj_media/ui'
146
283
 
147
- ### Drawer
284
+ <Picture
285
+ src="/image.jpg"
286
+ alt="Descripción"
287
+ size="lg"
288
+ fallback="/placeholder.jpg"
289
+ />
290
+ ```
148
291
 
292
+ #### Visual
149
293
  ```tsx
150
- <Drawer
151
- isOpen={isOpen}
152
- onClose={() => setOpen(false)}
153
- title="Título del drawer"
294
+ import { Visual } from '@imj_media/ui'
295
+
296
+ <Visual
297
+ type="icon"
298
+ name="star"
299
+ size="lg"
300
+ color="yellow"
301
+ />
302
+ ```
303
+
304
+ ### 📊 Componentes de Datos
305
+
306
+ #### Lists
307
+ ```tsx
308
+ import { Lists } from '@imj_media/ui'
309
+
310
+ <Lists>
311
+ <Lists.Item>Elemento 1</Lists.Item>
312
+ <Lists.Item>Elemento 2</Lists.Item>
313
+ <Lists.Item>Elemento 3</Lists.Item>
314
+ </Lists>
315
+ ```
316
+
317
+ #### Pagination
318
+ ```tsx
319
+ import { Pagination } from '@imj_media/ui'
320
+
321
+ <Pagination
322
+ currentPage={currentPage}
323
+ totalPages={totalPages}
324
+ onPageChange={setCurrentPage}
325
+ showFirstLast={true}
326
+ />
327
+ ```
328
+
329
+ #### ProgressBar
330
+ ```tsx
331
+ import { ProgressBar } from '@imj_media/ui'
332
+
333
+ <ProgressBar
334
+ value={75}
335
+ max={100}
336
+ color="blue"
154
337
  size="md"
155
- position="right"
156
- showCloseButton={true}
157
- disableEscapeClose={false}
158
- disableOutsideTab={false}
338
+ showLabel={true}
339
+ />
340
+ ```
341
+
342
+ #### Stepper
343
+ ```tsx
344
+ import { Stepper } from '@imj_media/ui'
345
+
346
+ <Stepper
347
+ steps={[
348
+ { label: 'Paso 1', status: 'completed' },
349
+ { label: 'Paso 2', status: 'active' },
350
+ { label: 'Paso 3', status: 'pending' }
351
+ ]}
352
+ currentStep={1}
353
+ />
354
+ ```
355
+
356
+ **Estados disponibles:**
357
+ - `completed`: Paso completado
358
+ - `active`: Paso actual
359
+ - `pending`: Paso pendiente
360
+
361
+ ### 🔔 Componentes de Notificación
362
+
363
+ #### Alert
364
+ ```tsx
365
+ import { Alert } from '@imj_media/ui'
366
+
367
+ <Alert
368
+ type="info"
369
+ title="Información"
370
+ description="Este es un mensaje informativo"
371
+ closable={true}
372
+ onClose={() => handleClose()}
373
+ />
374
+ ```
375
+
376
+ #### Toast
377
+ ```tsx
378
+ import { Toast } from '@imj_media/ui'
379
+
380
+ <Toast
381
+ type="success"
382
+ title="Éxito"
383
+ description="Operación completada"
384
+ duration={5000}
385
+ position="top-right"
386
+ />
387
+ ```
388
+
389
+ #### Tooltip
390
+ ```tsx
391
+ import { Tooltip } from '@imj_media/ui'
392
+
393
+ <Tooltip
394
+ content="Información adicional"
395
+ position="top"
396
+ alignment="center"
397
+ color="blue"
159
398
  >
160
- <p>Contenido del drawer</p>
161
- </Drawer>
399
+ <Button>Hover me</Button>
400
+ </Tooltip>
162
401
  ```
163
402
 
164
- **Props:**
165
- - `isOpen`: `boolean` (controla si el drawer está abierto)
166
- - `onClose`: `() => void` (callback para cerrar)
167
- - `title`: `string` (opcional)
168
- - `children`: `React.ReactNode`
169
- - `size`: `"sm" | "md" | "lg"` (default: `"md"`)
170
- - `position`: `"left" | "right"` (default: `"right"`)
171
- - `showCloseButton`: `boolean` (default: `true`)
172
- - `disableEscapeClose`: `boolean` (default: `false`)
173
- - `disableOutsideTab`: `boolean` (default: `false`)
403
+ ### 🎭 Componentes de Layout
174
404
 
175
- ### Icon
405
+ #### Cards
406
+ ```tsx
407
+ import { Cards } from '@imj_media/ui'
408
+
409
+ <Cards>
410
+ <Cards.Header>
411
+ <Cards.Title>Título de la Tarjeta</Cards.Title>
412
+ <Cards.Subtitle>Subtítulo opcional</Cards.Subtitle>
413
+ </Cards.Header>
414
+ <Cards.Body>
415
+ Contenido de la tarjeta
416
+ </Cards.Body>
417
+ <Cards.Footer>
418
+ <Button>Acción</Button>
419
+ </Cards.Footer>
420
+ </Cards>
421
+ ```
176
422
 
423
+ #### Separator
177
424
  ```tsx
178
- <Icon
179
- name="CheckOutlined"
425
+ import { Separator } from '@imj_media/ui'
426
+
427
+ <Separator orientation="horizontal" />
428
+ <Separator orientation="vertical" />
429
+ ```
430
+
431
+ #### Tag
432
+ ```tsx
433
+ import { Tag } from '@imj_media/ui'
434
+
435
+ <Tag
436
+ color="blue"
180
437
  size="md"
181
- color="primary"
182
- fill="black"
183
- className="custom-icon"
438
+ closable={true}
439
+ onClose={() => handleClose()}
440
+ >
441
+ Etiqueta
442
+ </Tag>
443
+ ```
444
+
445
+ ### 🎨 Componentes de Iconos y Emojis
446
+
447
+ #### Icon
448
+ ```tsx
449
+ import { Icon } from '@imj_media/ui'
450
+
451
+ <Icon
452
+ name="star"
453
+ variant="fill"
454
+ size="lg"
455
+ color="yellow"
184
456
  />
185
457
  ```
186
458
 
187
- **Props:**
188
- - `name`: `IconType` (nombre del icono)
189
- - `size`: `"minimal" | "clear" | "xs" | "sm" | "md" | "lg"` (default: `"md"`)
190
- - `color`: `string` (default: `"current"`)
191
- - `fill`: `string` (default: `"black"`)
192
- - `className`: `string`
193
- - `svgProps`: `object` (props adicionales para el SVG)
194
-
195
- **Iconos disponibles:**
196
-
197
- **Fill Icons:**
198
- - `YoutubeFill`, `InstagramFill`, `TwitterFill`, `TelegramFill`, `FacebookFill`, `WhatsappFill`, `LinkedinFill`
199
-
200
- **Outline Icons (selección):**
201
- - `CheckOutlined`, `XOutlined`, `PlusOutlined`, `MinusOutlined`, `SearchOutlined`, `EditOutlined`, `TrashOutlined`
202
- - `EyeOutlined`, `EyeSlashOutlined`, `LockOutlined`, `LockOpenOutlined`, `UserOutlined`, `SettingsOutlined`
203
- - `HomeOutlined`, `DashboardOutlined`, `CalendarOutlined`, `ClockOutlined`, `BellOutlined`, `MailOutlined`
204
- - `DownloadOutlined`, `UploadOutlined`, `SaveOutlined`, `RefreshOutlined`, `PlayOutlined`, `PauseOutlined`
205
- - `ArrowUpOutlined`, `ArrowDownOutlined`, `ArrowLeftOutlined`, `ArrowRightOutlined`
206
- - `ChevronUpOutlined`, `ChevronDownOutlined`, `ChevronLeftOutlined`, `ChevronRightOutlined`
207
- - `FilterOutlined`, `SortOutlined`, `SearchOutlined`, `InfoOutlined`, `WarningOutlined`, `ErrorOutlined`
208
- - Y muchos más...
209
-
210
- ### Toast
211
-
212
- ```tsx
213
- import { toast, Toaster } from '@imj_media/ui';
214
-
215
- // Mostrar toast
216
- toast.success('Operación exitosa');
217
- toast.error('Algo salió mal');
218
- toast.info('Información importante');
219
- toast.warning('Advertencia');
220
-
221
- // Toast con opciones personalizadas
222
- toast.show({
223
- message: 'Mensaje personalizado',
224
- type: 'success',
225
- title: 'Título opcional',
226
- duration: 5000,
227
- position: 'top-right',
228
- variant: 'contained',
229
- showCloseButton: true
230
- });
231
-
232
- // En tu componente
233
- function App() {
234
- return (
235
- <>
236
- <button onClick={() => toast.success('¡Hola!')}>
237
- Mostrar toast
238
- </button>
239
- <Toaster />
240
- </>
241
- );
459
+ **Variantes disponibles:**
460
+ - `outline`: Iconos con contorno
461
+ - `fill`: Iconos rellenos
462
+
463
+ #### Emoji
464
+ ```tsx
465
+ import { Emoji } from '@imj_media/ui'
466
+
467
+ <Emoji name="smile" size="lg" />
468
+ ```
469
+
470
+ ### 🎬 Componentes Especiales
471
+
472
+ #### StoryBox
473
+ ```tsx
474
+ import { StoryBox } from '@imj_media/ui'
475
+
476
+ <StoryBox
477
+ title="Historia del Usuario"
478
+ description="Como usuario, quiero..."
479
+ priority="high"
480
+ status="in-progress"
481
+ />
482
+ ```
483
+
484
+ #### Filters
485
+ ```tsx
486
+ import { Filters } from '@imj_media/ui'
487
+
488
+ <Filters
489
+ filters={[
490
+ { key: 'status', label: 'Estado', type: 'select' },
491
+ { key: 'priority', label: 'Prioridad', type: 'radio' }
492
+ ]}
493
+ onFilterChange={handleFilterChange}
494
+ />
495
+ ```
496
+
497
+ ## 🎨 Sistema de Colores
498
+
499
+ El paquete incluye un sistema de colores completo con variables CSS personalizables:
500
+
501
+ ```css
502
+ :root {
503
+ --ui-color-blue-50: #ebeef9;
504
+ --ui-color-blue-500: #3658c1;
505
+ --ui-color-blue-900: #172551;
506
+
507
+ --ui-color-green-50: #f0f9f0;
508
+ --ui-color-green-500: #039b59;
509
+ --ui-color-green-900: #014125;
510
+
511
+ --ui-color-red-50: #f9eae9;
512
+ --ui-color-red-500: #c62e1f;
513
+ --ui-color-red-900: #53130d;
514
+
515
+ --ui-color-orange-50: #fcf3e9;
516
+ --ui-color-orange-500: #dc8921;
517
+ --ui-color-orange-900: #5c3a0e;
518
+
519
+ --ui-color-yellow-50: #fcfbec;
520
+ --ui-color-yellow-500: #e1d63d;
521
+ --ui-color-yellow-900: #5f5a1a;
522
+
523
+ --ui-color-neutral-50: #f0f0f0;
524
+ --ui-color-neutral-500: #6b6b6b;
525
+ --ui-color-neutral-900: #2d2d2d;
242
526
  }
243
527
  ```
244
528
 
245
- **Métodos del toast:**
246
- - `toast.success(message, options?)`
247
- - `toast.error(message, options?)`
248
- - `toast.info(message, options?)`
249
- - `toast.warning(message, options?)`
250
- - `toast.show(options)`
251
- - `toast.dismiss(id)`
529
+ ## 🛠️ Utilidades
252
530
 
253
- **Opciones del toast:**
254
- - `message`: `string` (mensaje del toast)
255
- - `type`: `"success" | "danger" | "info" | "warning" | "gray"`
256
- - `title`: `string` (opcional)
257
- - `duration`: `number` (duración en ms, 0 = sin auto-cierre)
258
- - `position`: `"top-left" | "top-center" | "top-right" | "center-left" | "center" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right"` (default: `"top-right"`)
259
- - `variant`: `"contained" | "outlined" | "accent" | "minimal"` (default: `"contained"`)
260
- - `showCloseButton`: `boolean` (default: `true`)
531
+ ### Función `cn()`
532
+ Utilidad para combinar clases CSS de manera inteligente:
261
533
 
262
- **Configuración global:**
263
534
  ```tsx
264
- import { configure } from '@imj_media/ui';
535
+ import { cn } from '@imj_media/ui'
265
536
 
266
- configure({
267
- defaultDuration: 5000,
268
- maxToasts: 5,
269
- defaultPosition: 'top-right',
270
- animationDuration: 300,
271
- defaultVariant: 'contained'
272
- });
537
+ const className = cn(
538
+ 'base-class',
539
+ condition && 'conditional-class',
540
+ 'another-class'
541
+ )
273
542
  ```
274
543
 
275
- ## Tipos TypeScript
544
+ ## 📱 Responsive Design
545
+
546
+ Todos los componentes están diseñados para ser completamente responsivos:
547
+
548
+ - **Breakpoints**: xs, sm, md, lg, xl, 2xl
549
+ - **Mobile First**: Diseño optimizado para dispositivos móviles
550
+ - **Adaptive Layouts**: Componentes que se adaptan automáticamente
276
551
 
277
- Todos los componentes exportan sus props:
552
+ ## Accesibilidad
278
553
 
279
- ```ts
280
- import type {
281
- IButtonProps,
282
- ModalProps,
283
- IChipProps,
284
- DrawerProps,
285
- IconProps,
286
- Toast,
287
- ToastOptions
288
- } from '@imj_media/ui';
554
+ Los componentes siguen las mejores prácticas de accesibilidad:
555
+
556
+ - **ARIA Labels**: Etiquetas descriptivas para lectores de pantalla
557
+ - **Keyboard Navigation**: Navegación completa por teclado
558
+ - **Focus Management**: Manejo inteligente del foco
559
+ - **Screen Reader Support**: Compatibilidad con lectores de pantalla
560
+
561
+ ## 🎨 Personalización
562
+
563
+ ### Variables CSS
564
+ Puedes personalizar el tema modificando las variables CSS:
565
+
566
+ ```css
567
+ :root {
568
+ --ui-color-blue-500: #your-custom-blue;
569
+ --ui-color-green-500: #your-custom-green;
570
+ }
289
571
  ```
290
572
 
291
- ## Estilos
573
+ ### Tailwind CSS
574
+ Todos los componentes utilizan Tailwind CSS y pueden ser personalizados a través de tu configuración:
575
+
576
+ ```js
577
+ // tailwind.config.js
578
+ module.exports = {
579
+ theme: {
580
+ extend: {
581
+ colors: {
582
+ 'custom-blue': '#1234567',
583
+ }
584
+ }
585
+ }
586
+ }
587
+ ```
588
+
589
+ ## 📚 Storybook
590
+
591
+ Para ver todos los componentes en acción y explorar sus variantes:
592
+
593
+ ```bash
594
+ npm run storybook
595
+ ```
596
+
597
+ Storybook incluye:
598
+ - **Documentación interactiva** de todos los componentes
599
+ - **Controles en tiempo real** para probar diferentes props
600
+ - **Ejemplos de uso** y mejores prácticas
601
+ - **Testing visual** de componentes
602
+
603
+ ## 🔧 Scripts Disponibles
604
+
605
+ ```json
606
+ {
607
+ "scripts": {
608
+ "build": "vite build",
609
+ "dev": "vite build --watch",
610
+ "storybook": "storybook dev -p 6006",
611
+ "build-storybook": "storybook build",
612
+ "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,scss,md}\"",
613
+ "format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css,scss,md}\""
614
+ }
615
+ }
616
+ ```
617
+
618
+ ## 📦 Dependencias
619
+
620
+ ### Peer Dependencies
621
+ - `react`: ^18.0.0
622
+ - `react-dom`: ^18.0.0
623
+
624
+ ### Dependencies Principales
625
+ - `class-variance-authority`: Sistema de variantes de componentes
626
+ - `clsx`: Utilidad para combinar clases CSS
627
+ - `tailwind-merge`: Fusión inteligente de clases Tailwind
628
+ - `tailwind-variants`: Sistema de variantes tipadas
629
+
630
+ ## 🚀 Roadmap
631
+
632
+ - [ ] Componente de Tabla avanzada
633
+ - [ ] Componente de Gráficos
634
+ - [ ] Componente de Calendario
635
+ - [ ] Componente de Drag & Drop
636
+ - [ ] Componente de Rich Text Editor
637
+ - [ ] Temas oscuros/claros
638
+ - [ ] Internacionalización (i18n)
639
+
640
+ ## 🤝 Contribuir
641
+
642
+ 1. Fork el proyecto
643
+ 2. Crea una rama para tu feature (`git checkout -b feature/AmazingFeature`)
644
+ 3. Commit tus cambios (`git commit -m 'Add some AmazingFeature'`)
645
+ 4. Push a la rama (`git push origin feature/AmazingFeature`)
646
+ 5. Abre un Pull Request
647
+
648
+ ## 📄 Licencia
649
+
650
+ Este proyecto está bajo la Licencia ISC. Ver el archivo `LICENSE` para más detalles.
651
+
652
+ ## 👥 Autores
653
+
654
+ - **Oscar Rubio - IMJ** - *Desarrollo inicial* - [oscar.rubio@imjmedia.com.mx](mailto:oscar.rubio@imjmedia.com.mx)
655
+
656
+ ## 🙏 Agradecimientos
292
657
 
293
- El paquete incluye estilos CSS que se importan automáticamente. Los componentes utilizan Tailwind CSS para el styling.
658
+ - [Tailwind CSS](https://tailwindcss.com/) por el sistema de diseño
659
+ - [React](https://reactjs.org/) por el framework
660
+ - [TypeScript](https://www.typescriptlang.org/) por el tipado estático
661
+ - [Storybook](https://storybook.js.org/) por la documentación interactiva
294
662
 
295
- ## Versión
663
+ ---
296
664
 
297
- Versión actual: **1.0.7**
665
+ **¿Necesitas ayuda?** Abre un issue en el repositorio o contacta al equipo de desarrollo.