anima-ds-nucleus 1.0.0

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.
Files changed (116) hide show
  1. package/LICENSE.md +20 -0
  2. package/README.md +109 -0
  3. package/dist/anima-ds.cjs.js +1332 -0
  4. package/dist/anima-ds.esm.js +88297 -0
  5. package/dist/vite.svg +1 -0
  6. package/package.json +76 -0
  7. package/src/assets/charly.png +0 -0
  8. package/src/components/Atoms/Alert/Alert.jsx +52 -0
  9. package/src/components/Atoms/Alert/Alert.stories.jsx +62 -0
  10. package/src/components/Atoms/Avatar/Avatar.jsx +60 -0
  11. package/src/components/Atoms/Avatar/Avatar.stories.jsx +61 -0
  12. package/src/components/Atoms/Badge/Badge.jsx +34 -0
  13. package/src/components/Atoms/Badge/Badge.stories.jsx +55 -0
  14. package/src/components/Atoms/Button/Button.jsx +281 -0
  15. package/src/components/Atoms/Button/Button.stories.jsx +365 -0
  16. package/src/components/Atoms/Divider/Divider.jsx +49 -0
  17. package/src/components/Atoms/Divider/Divider.stories.jsx +62 -0
  18. package/src/components/Atoms/Icon/Icon.jsx +361 -0
  19. package/src/components/Atoms/Icon/Icon.stories.jsx +115 -0
  20. package/src/components/Atoms/Label/Label.jsx +22 -0
  21. package/src/components/Atoms/Progress/Progress.jsx +49 -0
  22. package/src/components/Atoms/Progress/Progress.stories.jsx +88 -0
  23. package/src/components/Atoms/Radios/Radios.jsx +39 -0
  24. package/src/components/Atoms/Radios/Radios.stories.jsx +119 -0
  25. package/src/components/Atoms/Shadow/Shadow.stories.jsx +25 -0
  26. package/src/components/Atoms/Skeleton/Skeleton.jsx +50 -0
  27. package/src/components/Atoms/Skeleton/Skeleton.stories.jsx +55 -0
  28. package/src/components/Atoms/Spacing/Spacing.jsx +56 -0
  29. package/src/components/Atoms/Spacing/Spacing.stories.jsx +78 -0
  30. package/src/components/Atoms/Spinner/Spinner.jsx +47 -0
  31. package/src/components/Atoms/Spinner/Spinner.stories.jsx +56 -0
  32. package/src/components/Atoms/Toast/Toast.jsx +74 -0
  33. package/src/components/Atoms/Toast/Toast.stories.jsx +101 -0
  34. package/src/components/Atoms/Tooltip/Tooltip.jsx +49 -0
  35. package/src/components/Atoms/Tooltip/Tooltip.stories.jsx +58 -0
  36. package/src/components/Atoms/Typography/Typography.jsx +52 -0
  37. package/src/components/Atoms/Typography/Typography.stories.jsx +267 -0
  38. package/src/components/DataDisplay/AreaChart/AreaChart.jsx +95 -0
  39. package/src/components/DataDisplay/AreaChart/AreaChart.stories.jsx +51 -0
  40. package/src/components/DataDisplay/BarChart/BarChart.jsx +90 -0
  41. package/src/components/DataDisplay/BarChart/BarChart.stories.jsx +60 -0
  42. package/src/components/DataDisplay/Card/Card.jsx +31 -0
  43. package/src/components/DataDisplay/Card/Card.stories.jsx +50 -0
  44. package/src/components/DataDisplay/ColumnChart/ColumnChart.jsx +92 -0
  45. package/src/components/DataDisplay/ColumnChart/ColumnChart.stories.jsx +65 -0
  46. package/src/components/DataDisplay/DBGrid/DBGrid.jsx +138 -0
  47. package/src/components/DataDisplay/DBGrid/DBGrid.stories.jsx +126 -0
  48. package/src/components/DataDisplay/DonutChart/DonutChart.jsx +83 -0
  49. package/src/components/DataDisplay/DonutChart/DonutChart.stories.jsx +48 -0
  50. package/src/components/DataDisplay/EmptyState/EmptyState.jsx +30 -0
  51. package/src/components/DataDisplay/EmptyState/EmptyState.stories.jsx +42 -0
  52. package/src/components/DataDisplay/LineChart/LineChart.jsx +86 -0
  53. package/src/components/DataDisplay/LineChart/LineChart.stories.jsx +67 -0
  54. package/src/components/DataDisplay/List/List.jsx +30 -0
  55. package/src/components/DataDisplay/List/List.stories.jsx +59 -0
  56. package/src/components/DataDisplay/PieChart/PieChart.jsx +64 -0
  57. package/src/components/DataDisplay/PieChart/PieChart.stories.jsx +47 -0
  58. package/src/components/DataDisplay/StatCard/StatCard.jsx +55 -0
  59. package/src/components/DataDisplay/StatCard/StatCard.stories.jsx +59 -0
  60. package/src/components/DataDisplay/TagList/TagList.jsx +37 -0
  61. package/src/components/DataDisplay/TagList/TagList.stories.jsx +48 -0
  62. package/src/components/DataDisplay/Timeline/Timeline.jsx +41 -0
  63. package/src/components/DataDisplay/Timeline/Timeline.stories.jsx +64 -0
  64. package/src/components/Inputs/Checkbox/Checkbox.jsx +27 -0
  65. package/src/components/Inputs/Checkbox/Checkbox.stories.jsx +51 -0
  66. package/src/components/Inputs/DatePicker/DatePicker.jsx +55 -0
  67. package/src/components/Inputs/DatePicker/DatePicker.stories.jsx +52 -0
  68. package/src/components/Inputs/FileUpload/FileUpload.jsx +108 -0
  69. package/src/components/Inputs/FileUpload/FileUpload.stories.jsx +52 -0
  70. package/src/components/Inputs/Input/Input.jsx +50 -0
  71. package/src/components/Inputs/Input/Input.stories.jsx +63 -0
  72. package/src/components/Inputs/RadioButton/RadioButton.jsx +31 -0
  73. package/src/components/Inputs/RadioButton/RadioButton.stories.jsx +59 -0
  74. package/src/components/Inputs/Select/Select.jsx +59 -0
  75. package/src/components/Inputs/Select/Select.stories.jsx +66 -0
  76. package/src/components/Inputs/Switch/Switch.jsx +44 -0
  77. package/src/components/Inputs/Switch/Switch.stories.jsx +51 -0
  78. package/src/components/Inputs/Textarea/Textarea.jsx +51 -0
  79. package/src/components/Inputs/Textarea/Textarea.stories.jsx +65 -0
  80. package/src/components/Layout/Accordion/Accordion.jsx +58 -0
  81. package/src/components/Layout/Accordion/Accordion.stories.jsx +55 -0
  82. package/src/components/Layout/Breadcrumbs/Breadcrumbs.jsx +49 -0
  83. package/src/components/Layout/Breadcrumbs/Breadcrumbs.stories.jsx +44 -0
  84. package/src/components/Layout/Breakpoint/Breakpoint.jsx +35 -0
  85. package/src/components/Layout/Breakpoint/Breakpoint.stories.jsx +348 -0
  86. package/src/components/Layout/Drawer/Drawer.jsx +75 -0
  87. package/src/components/Layout/Drawer/Drawer.stories.jsx +77 -0
  88. package/src/components/Layout/Dropdown/Dropdown.jsx +83 -0
  89. package/src/components/Layout/Dropdown/Dropdown.stories.jsx +53 -0
  90. package/src/components/Layout/Grid/Grid.jsx +39 -0
  91. package/src/components/Layout/Grid/Grid.stories.jsx +546 -0
  92. package/src/components/Layout/Header/Header.jsx +50 -0
  93. package/src/components/Layout/Header/Header.stories.jsx +36 -0
  94. package/src/components/Layout/Layout/Layout.jsx +14 -0
  95. package/src/components/Layout/Layout/Layout.stories.jsx +34 -0
  96. package/src/components/Layout/Modal/Modal.jsx +78 -0
  97. package/src/components/Layout/Modal/Modal.stories.jsx +98 -0
  98. package/src/components/Layout/Pagination/Pagination.jsx +109 -0
  99. package/src/components/Layout/Pagination/Pagination.stories.jsx +62 -0
  100. package/src/components/Layout/Sidebar/Sidebar.jsx +57 -0
  101. package/src/components/Layout/Sidebar/Sidebar.stories.jsx +51 -0
  102. package/src/components/Layout/Stepper/Stepper.jsx +132 -0
  103. package/src/components/Layout/Stepper/Stepper.stories.jsx +78 -0
  104. package/src/components/Layout/Tabs/Tabs.jsx +63 -0
  105. package/src/components/Layout/Tabs/Tabs.stories.jsx +62 -0
  106. package/src/components/Views/ChangePasswordForm/ChangePasswordForm.jsx +125 -0
  107. package/src/components/Views/ChangePasswordForm/ChangePasswordForm.stories.jsx +55 -0
  108. package/src/components/Views/Chat/Chat.jsx +134 -0
  109. package/src/components/Views/Chat/Chat.stories.jsx +143 -0
  110. package/src/components/Views/LoginForm/LoginForm.jsx +98 -0
  111. package/src/components/Views/LoginForm/LoginForm.stories.jsx +55 -0
  112. package/src/i18n/config.js +209 -0
  113. package/src/index.js +60 -0
  114. package/src/main.jsx +510 -0
  115. package/src/providers/I18nProvider.jsx +13 -0
  116. package/src/style.css +721 -0
@@ -0,0 +1,546 @@
1
+ import { Grid } from './Grid';
2
+ import { Typography } from '../../Atoms/Typography/Typography';
3
+
4
+ const MOBILE_GRID_CONFIGS = [
5
+ {
6
+ columns: 2,
7
+ margin: '20px / 1.25rem',
8
+ gutter: '20px / 1.25rem',
9
+ },
10
+ {
11
+ columns: 3,
12
+ margin: '20px / 1.25rem',
13
+ gutter: '20px / 1.25rem',
14
+ },
15
+ {
16
+ columns: 4,
17
+ margin: '20px / 1.25rem',
18
+ gutter: '16px / 1rem',
19
+ },
20
+ {
21
+ columns: 8,
22
+ margin: '20px / 1.25rem',
23
+ gutter: '12px / 0.75rem',
24
+ },
25
+ ];
26
+
27
+ const DESKTOP_GRID_CONFIGS = [
28
+ {
29
+ columns: 2,
30
+ margin: '64px / 4rem',
31
+ gutter: '32px / 2rem',
32
+ },
33
+ {
34
+ columns: 3,
35
+ margin: '64px / 4rem',
36
+ gutter: '32px / 2rem',
37
+ },
38
+ {
39
+ columns: 4,
40
+ margin: '64px / 4rem', // Estandarizado: margin uniforme para layouts amplios
41
+ gutter: '32px / 2rem',
42
+ },
43
+ {
44
+ columns: 8,
45
+ margin: '32px / 2rem',
46
+ gutter: '24px / 1.5rem',
47
+ },
48
+ ];
49
+
50
+ const DESKTOP_LG_GRID_CONFIGS = [
51
+ {
52
+ columns: 12,
53
+ margin: '32px / 2rem',
54
+ gutter: '20px / 1.25rem',
55
+ },
56
+ {
57
+ columns: 16,
58
+ margin: '32px / 2rem',
59
+ gutter: '20px / 1.25rem',
60
+ },
61
+ ];
62
+
63
+ const GridItem = ({ children, index }) => (
64
+ <div className="bg-gray-100 rounded-lg p-4 border border-gray-200 flex items-center justify-center min-h-[80px]">
65
+ <Typography variant="body-sm" className="color-gray-700 text-center">
66
+ {children || `Item ${index + 1}`}
67
+ </Typography>
68
+ </div>
69
+ );
70
+
71
+ export default {
72
+ title: 'Layout/Grid',
73
+ component: Grid,
74
+ tags: ['autodocs'],
75
+ argTypes: {
76
+ columns: {
77
+ control: 'select',
78
+ options: [2, 3, 4, 8, 12, 16],
79
+ description: 'Número de columnas de la grilla',
80
+ },
81
+ variant: {
82
+ control: 'select',
83
+ options: ['mobile', 'desktop', 'desktop-lg'],
84
+ description: 'Variante de breakpoint para la grilla',
85
+ },
86
+ },
87
+ };
88
+
89
+ export const Playground = {
90
+ args: {
91
+ columns: 2,
92
+ children: (
93
+ <>
94
+ <GridItem>Item 1</GridItem>
95
+ <GridItem>Item 2</GridItem>
96
+ <GridItem>Item 3</GridItem>
97
+ <GridItem>Item 4</GridItem>
98
+ </>
99
+ ),
100
+ },
101
+ };
102
+
103
+ export const MobileGrids = {
104
+ render: () => (
105
+ <div className="space-y-12 p-6">
106
+ <div>
107
+ <Typography variant="h3" className="color-gray-900 mb-4">
108
+ Sistema de Grillas - Mobile
109
+ </Typography>
110
+ <Typography variant="body-md" className="color-gray-600 mb-6">
111
+ Configuraciones de grilla disponibles para dispositivos móviles (0-480px).
112
+ </Typography>
113
+ </div>
114
+
115
+ {MOBILE_GRID_CONFIGS.map((config) => (
116
+ <div key={config.columns} className="space-y-4">
117
+ <div className="bg-white rounded-lg border-2 border-gray-200 p-6 shadow-sm">
118
+ <div className="mb-4">
119
+ <Typography variant="h5" className="color-gray-900 mb-2">
120
+ {config.columns} Columnas
121
+ </Typography>
122
+ <div className="space-y-1 text-body-sm color-gray-600">
123
+ <div>
124
+ <strong>Margins:</strong> {config.margin}
125
+ </div>
126
+ <div>
127
+ <strong>Gutter:</strong> {config.gutter}
128
+ </div>
129
+ <div className="mt-3">
130
+ <code className="bg-gray-100 px-2 py-1 rounded color-gray-900">
131
+ .grid-mobile-{config.columns}
132
+ </code>
133
+ </div>
134
+ </div>
135
+ </div>
136
+
137
+ <div className="bg-gray-50 rounded-lg p-4 border border-gray-200">
138
+ <div className="mb-2 text-body-sm color-gray-600">
139
+ <strong>Nota:</strong> Esta grilla solo se aplica en viewports de 0px - 480px.
140
+ Ajusta el tamaño de la ventana o usa el selector de viewport de Storybook.
141
+ </div>
142
+ <Grid columns={config.columns} variant="mobile">
143
+ {Array.from({ length: config.columns }).map((_, i) => (
144
+ <GridItem key={i} index={i}>
145
+ Columna {i + 1}
146
+ </GridItem>
147
+ ))}
148
+ </Grid>
149
+ </div>
150
+ </div>
151
+ </div>
152
+ ))}
153
+ </div>
154
+ ),
155
+ };
156
+
157
+ export const DesktopGrids = {
158
+ render: () => (
159
+ <div className="space-y-12 p-6">
160
+ <div>
161
+ <Typography variant="h3" className="color-gray-900 mb-4">
162
+ Sistema de Grillas - Desktop (Small/Medium)
163
+ </Typography>
164
+ <Typography variant="body-md" className="color-gray-600 mb-6">
165
+ Configuraciones de grilla disponibles para desktop pequeño/mediano (769px - 1440px).
166
+ </Typography>
167
+ </div>
168
+
169
+ {DESKTOP_GRID_CONFIGS.map((config) => (
170
+ <div key={config.columns} className="space-y-4">
171
+ <div className="bg-white rounded-lg border-2 border-gray-200 p-6 shadow-sm">
172
+ <div className="mb-4">
173
+ <Typography variant="h5" className="color-gray-900 mb-2">
174
+ {config.columns} Columnas
175
+ </Typography>
176
+ <div className="space-y-1 text-body-sm color-gray-600">
177
+ <div>
178
+ <strong>Margins:</strong> {config.margin}
179
+ </div>
180
+ <div>
181
+ <strong>Gutter:</strong> {config.gutter}
182
+ </div>
183
+ <div className="mt-3">
184
+ <code className="bg-gray-100 px-2 py-1 rounded color-gray-900">
185
+ .grid-desktop-{config.columns}
186
+ </code>
187
+ </div>
188
+ </div>
189
+ </div>
190
+
191
+ <div className="bg-gray-50 rounded-lg p-4 border border-gray-200">
192
+ <div className="mb-2 text-body-sm color-gray-600">
193
+ <strong>Nota:</strong> Esta grilla solo se aplica en viewports de 769px - 1440px.
194
+ Ajusta el tamaño de la ventana o usa el selector de viewport de Storybook.
195
+ </div>
196
+ <Grid columns={config.columns} variant="desktop">
197
+ {Array.from({ length: config.columns }).map((_, i) => (
198
+ <GridItem key={i} index={i}>
199
+ Columna {i + 1}
200
+ </GridItem>
201
+ ))}
202
+ </Grid>
203
+ </div>
204
+ </div>
205
+ </div>
206
+ ))}
207
+ </div>
208
+ ),
209
+ };
210
+
211
+ export const DesktopLargeGrids = {
212
+ render: () => (
213
+ <div className="space-y-12 p-6">
214
+ <div>
215
+ <Typography variant="h3" className="color-gray-900 mb-4">
216
+ Sistema de Grillas - Desktop (Large)
217
+ </Typography>
218
+ <Typography variant="body-md" className="color-gray-600 mb-6">
219
+ Configuraciones de grilla disponibles para desktop grande (1441px+).
220
+ </Typography>
221
+ </div>
222
+
223
+ {DESKTOP_LG_GRID_CONFIGS.map((config) => (
224
+ <div key={config.columns} className="space-y-4">
225
+ <div className="bg-white rounded-lg border-2 border-gray-200 p-6 shadow-sm">
226
+ <div className="mb-4">
227
+ <Typography variant="h5" className="color-gray-900 mb-2">
228
+ {config.columns} Columnas
229
+ </Typography>
230
+ <div className="space-y-1 text-body-sm color-gray-600">
231
+ <div>
232
+ <strong>Margins:</strong> {config.margin}
233
+ </div>
234
+ <div>
235
+ <strong>Gutter:</strong> {config.gutter}
236
+ </div>
237
+ <div className="mt-3">
238
+ <code className="bg-gray-100 px-2 py-1 rounded color-gray-900">
239
+ .grid-desktop-lg-{config.columns}
240
+ </code>
241
+ </div>
242
+ </div>
243
+ </div>
244
+
245
+ <div className="bg-gray-50 rounded-lg p-4 border border-gray-200">
246
+ <div className="mb-2 text-body-sm color-gray-600">
247
+ <strong>Nota:</strong> Esta grilla solo se aplica en viewports de 1441px+.
248
+ Ajusta el tamaño de la ventana o usa el selector de viewport de Storybook.
249
+ </div>
250
+ <Grid columns={config.columns} variant="desktop-lg">
251
+ {Array.from({ length: config.columns }).map((_, i) => (
252
+ <GridItem key={i} index={i}>
253
+ Columna {i + 1}
254
+ </GridItem>
255
+ ))}
256
+ </Grid>
257
+ </div>
258
+ </div>
259
+ </div>
260
+ ))}
261
+ </div>
262
+ ),
263
+ };
264
+
265
+ export const GridSpecifications = {
266
+ render: () => (
267
+ <div className="space-y-6 p-6">
268
+ <div>
269
+ <Typography variant="h4" className="color-gray-900 mb-4">
270
+ Especificaciones de Grillas
271
+ </Typography>
272
+ <Typography variant="body-md" className="color-gray-600 mb-6">
273
+ Detalles técnicos de cada configuración de grilla por breakpoint.
274
+ </Typography>
275
+ </div>
276
+
277
+ <div className="space-y-8">
278
+ <div>
279
+ <Typography variant="h5" className="color-gray-900 mb-4">
280
+ Mobile (0-480px)
281
+ </Typography>
282
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
283
+ {MOBILE_GRID_CONFIGS.map((config) => (
284
+ <div
285
+ key={config.columns}
286
+ className="bg-white rounded-lg border border-gray-200 p-6 shadow-sm"
287
+ >
288
+ <Typography variant="h6" className="color-gray-900 mb-4">
289
+ {config.columns} Columnas
290
+ </Typography>
291
+ <div className="space-y-3">
292
+ <div className="flex justify-between items-center border-b border-gray-100 pb-2">
293
+ <Typography variant="body-sm" className="color-gray-600">
294
+ Columnas:
295
+ </Typography>
296
+ <Typography variant="body-sm" className="color-gray-900 font-medium">
297
+ {config.columns}
298
+ </Typography>
299
+ </div>
300
+ <div className="flex justify-between items-center border-b border-gray-100 pb-2">
301
+ <Typography variant="body-sm" className="color-gray-600">
302
+ Margins:
303
+ </Typography>
304
+ <Typography variant="body-sm" className="color-gray-900 font-medium">
305
+ {config.margin}
306
+ </Typography>
307
+ </div>
308
+ <div className="flex justify-between items-center border-b border-gray-100 pb-2">
309
+ <Typography variant="body-sm" className="color-gray-600">
310
+ Gutter:
311
+ </Typography>
312
+ <Typography variant="body-sm" className="color-gray-900 font-medium">
313
+ {config.gutter}
314
+ </Typography>
315
+ </div>
316
+ <div className="mt-4 pt-3 border-t border-gray-200">
317
+ <Typography variant="body-sm" className="color-gray-600 mb-2">
318
+ Clase CSS:
319
+ </Typography>
320
+ <code className="block bg-gray-100 p-3 rounded text-body-sm color-gray-900">
321
+ .grid-mobile-{config.columns}
322
+ </code>
323
+ </div>
324
+ </div>
325
+ </div>
326
+ ))}
327
+ </div>
328
+ </div>
329
+
330
+ <div>
331
+ <Typography variant="h5" className="color-gray-900 mb-4">
332
+ Desktop Small/Medium (769px - 1440px)
333
+ </Typography>
334
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
335
+ {DESKTOP_GRID_CONFIGS.map((config) => (
336
+ <div
337
+ key={config.columns}
338
+ className="bg-white rounded-lg border border-gray-200 p-6 shadow-sm"
339
+ >
340
+ <Typography variant="h6" className="color-gray-900 mb-4">
341
+ {config.columns} Columnas
342
+ </Typography>
343
+ <div className="space-y-3">
344
+ <div className="flex justify-between items-center border-b border-gray-100 pb-2">
345
+ <Typography variant="body-sm" className="color-gray-600">
346
+ Columnas:
347
+ </Typography>
348
+ <Typography variant="body-sm" className="color-gray-900 font-medium">
349
+ {config.columns}
350
+ </Typography>
351
+ </div>
352
+ <div className="flex justify-between items-center border-b border-gray-100 pb-2">
353
+ <Typography variant="body-sm" className="color-gray-600">
354
+ Margins:
355
+ </Typography>
356
+ <Typography variant="body-sm" className="color-gray-900 font-medium">
357
+ {config.margin}
358
+ </Typography>
359
+ </div>
360
+ <div className="flex justify-between items-center border-b border-gray-100 pb-2">
361
+ <Typography variant="body-sm" className="color-gray-600">
362
+ Gutter:
363
+ </Typography>
364
+ <Typography variant="body-sm" className="color-gray-900 font-medium">
365
+ {config.gutter}
366
+ </Typography>
367
+ </div>
368
+ <div className="mt-4 pt-3 border-t border-gray-200">
369
+ <Typography variant="body-sm" className="color-gray-600 mb-2">
370
+ Clase CSS:
371
+ </Typography>
372
+ <code className="block bg-gray-100 p-3 rounded text-body-sm color-gray-900">
373
+ .grid-desktop-{config.columns}
374
+ </code>
375
+ </div>
376
+ </div>
377
+ </div>
378
+ ))}
379
+ </div>
380
+ </div>
381
+
382
+ <div>
383
+ <Typography variant="h5" className="color-gray-900 mb-4">
384
+ Desktop Large (1441px+)
385
+ </Typography>
386
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
387
+ {DESKTOP_LG_GRID_CONFIGS.map((config) => (
388
+ <div
389
+ key={config.columns}
390
+ className="bg-white rounded-lg border border-gray-200 p-6 shadow-sm"
391
+ >
392
+ <Typography variant="h6" className="color-gray-900 mb-4">
393
+ {config.columns} Columnas
394
+ </Typography>
395
+ <div className="space-y-3">
396
+ <div className="flex justify-between items-center border-b border-gray-100 pb-2">
397
+ <Typography variant="body-sm" className="color-gray-600">
398
+ Columnas:
399
+ </Typography>
400
+ <Typography variant="body-sm" className="color-gray-900 font-medium">
401
+ {config.columns}
402
+ </Typography>
403
+ </div>
404
+ <div className="flex justify-between items-center border-b border-gray-100 pb-2">
405
+ <Typography variant="body-sm" className="color-gray-600">
406
+ Margins:
407
+ </Typography>
408
+ <Typography variant="body-sm" className="color-gray-900 font-medium">
409
+ {config.margin}
410
+ </Typography>
411
+ </div>
412
+ <div className="flex justify-between items-center border-b border-gray-100 pb-2">
413
+ <Typography variant="body-sm" className="color-gray-600">
414
+ Gutter:
415
+ </Typography>
416
+ <Typography variant="body-sm" className="color-gray-900 font-medium">
417
+ {config.gutter}
418
+ </Typography>
419
+ </div>
420
+ <div className="mt-4 pt-3 border-t border-gray-200">
421
+ <Typography variant="body-sm" className="color-gray-600 mb-2">
422
+ Clase CSS:
423
+ </Typography>
424
+ <code className="block bg-gray-100 p-3 rounded text-body-sm color-gray-900">
425
+ .grid-desktop-lg-{config.columns}
426
+ </code>
427
+ </div>
428
+ </div>
429
+ </div>
430
+ ))}
431
+ </div>
432
+ </div>
433
+ </div>
434
+ </div>
435
+ ),
436
+ };
437
+
438
+ export const CSSVariables = {
439
+ render: () => (
440
+ <div className="space-y-6 p-6">
441
+ <div>
442
+ <Typography variant="h4" className="color-gray-900 mb-4">
443
+ Variables CSS Disponibles
444
+ </Typography>
445
+ <Typography variant="body-md" className="color-gray-600 mb-6">
446
+ Variables CSS que puedes usar para personalizar las grillas.
447
+ </Typography>
448
+ </div>
449
+
450
+ <div className="space-y-6">
451
+ <div>
452
+ <Typography variant="h5" className="color-gray-900 mb-4">
453
+ Mobile
454
+ </Typography>
455
+ <div className="bg-gray-50 rounded-lg p-6 space-y-4">
456
+ {MOBILE_GRID_CONFIGS.map((config) => (
457
+ <div key={config.columns} className="bg-white rounded p-4 border border-gray-200">
458
+ <Typography variant="h6" className="color-gray-900 mb-3">
459
+ Grid Mobile {config.columns} Columnas
460
+ </Typography>
461
+ <code className="block text-body-sm color-gray-900 whitespace-pre">
462
+ {`--grid-mobile-${config.columns}-columns: ${config.columns};
463
+ --grid-mobile-${config.columns}-margin: ${config.margin.split(' / ')[1]};
464
+ --grid-mobile-${config.columns}-gutter: ${config.gutter.split(' / ')[1]};`}
465
+ </code>
466
+ </div>
467
+ ))}
468
+ </div>
469
+ </div>
470
+
471
+ <div>
472
+ <Typography variant="h5" className="color-gray-900 mb-4">
473
+ Desktop (Small/Medium)
474
+ </Typography>
475
+ <div className="bg-gray-50 rounded-lg p-6 space-y-4">
476
+ {DESKTOP_GRID_CONFIGS.map((config) => (
477
+ <div key={config.columns} className="bg-white rounded p-4 border border-gray-200">
478
+ <Typography variant="h6" className="color-gray-900 mb-3">
479
+ Grid Desktop {config.columns} Columnas
480
+ </Typography>
481
+ <code className="block text-body-sm color-gray-900 whitespace-pre">
482
+ {`--grid-desktop-${config.columns}-columns: ${config.columns};
483
+ --grid-desktop-${config.columns}-margin: ${config.margin.split(' / ')[1]};
484
+ --grid-desktop-${config.columns}-gutter: ${config.gutter.split(' / ')[1]};`}
485
+ </code>
486
+ </div>
487
+ ))}
488
+ </div>
489
+ </div>
490
+
491
+ <div>
492
+ <Typography variant="h5" className="color-gray-900 mb-4">
493
+ Desktop Large
494
+ </Typography>
495
+ <div className="bg-gray-50 rounded-lg p-6 space-y-4">
496
+ {DESKTOP_LG_GRID_CONFIGS.map((config) => (
497
+ <div key={config.columns} className="bg-white rounded p-4 border border-gray-200">
498
+ <Typography variant="h6" className="color-gray-900 mb-3">
499
+ Grid Desktop Large {config.columns} Columnas
500
+ </Typography>
501
+ <code className="block text-body-sm color-gray-900 whitespace-pre">
502
+ {`--grid-desktop-lg-${config.columns}-columns: ${config.columns};
503
+ --grid-desktop-lg-${config.columns}-margin: ${config.margin.split(' / ')[1]};
504
+ --grid-desktop-lg-${config.columns}-gutter: ${config.gutter.split(' / ')[1]};`}
505
+ </code>
506
+ </div>
507
+ ))}
508
+ </div>
509
+ </div>
510
+ </div>
511
+
512
+ <div className="bg-blue-50 rounded-lg p-6 border border-blue-200">
513
+ <Typography variant="h6" className="color-blue-900 mb-3">
514
+ Ejemplo de uso:
515
+ </Typography>
516
+ <code className="block bg-white p-4 rounded border border-blue-200 text-body-sm color-gray-900 whitespace-pre">
517
+ {`<Grid columns={2} variant="mobile">
518
+ <div>Item 1</div>
519
+ <div>Item 2</div>
520
+ </Grid>
521
+
522
+ <Grid columns={4} variant="desktop">
523
+ <div>Item 1</div>
524
+ <div>Item 2</div>
525
+ <div>Item 3</div>
526
+ <div>Item 4</div>
527
+ </Grid>
528
+
529
+ /* O usando las clases directamente */
530
+ <div className="grid-mobile-2">
531
+ <div>Item 1</div>
532
+ <div>Item 2</div>
533
+ </div>
534
+
535
+ <div className="grid-desktop-4">
536
+ <div>Item 1</div>
537
+ <div>Item 2</div>
538
+ <div>Item 3</div>
539
+ <div>Item 4</div>
540
+ </div>`}
541
+ </code>
542
+ </div>
543
+ </div>
544
+ ),
545
+ };
546
+
@@ -0,0 +1,50 @@
1
+ import { useTranslation } from 'react-i18next';
2
+ import { Select } from '../../Inputs/Select/Select';
3
+
4
+ export const Header = ({
5
+ title = 'Anima DS',
6
+ onLanguageChange,
7
+ currentLanguage = 'es-AR',
8
+ className = '',
9
+ ...props
10
+ }) => {
11
+ const { t, i18n } = useTranslation();
12
+
13
+ const languageOptions = [
14
+ { value: 'es-AR', label: 'Español (AR)' },
15
+ { value: 'pt-BR', label: 'Português (BR)' },
16
+ ];
17
+
18
+ const handleLanguageChange = (e) => {
19
+ const lang = e.target.value;
20
+ i18n.changeLanguage(lang);
21
+ if (onLanguageChange) {
22
+ onLanguageChange(lang);
23
+ }
24
+ };
25
+
26
+ return (
27
+ <header className={`bg-white shadow-sm border-b border-gray-200 ${className}`} {...props}>
28
+ <div className="container mx-auto px-4 sm:px-6 lg:px-8">
29
+ <div className="flex items-center justify-between h-16">
30
+ <div className="flex items-center">
31
+ <h1 className="text-xl font-bold text-gray-900">{title}</h1>
32
+ </div>
33
+ <div className="flex items-center space-x-4">
34
+ <div className="w-48">
35
+ <Select
36
+ value={currentLanguage}
37
+ options={languageOptions}
38
+ onChange={handleLanguageChange}
39
+ className="w-full"
40
+ />
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </div>
45
+ </header>
46
+ );
47
+ };
48
+
49
+ export default Header;
50
+
@@ -0,0 +1,36 @@
1
+ import { useState } from 'react';
2
+ import { Header } from './Header';
3
+ import { I18nProvider } from '../../../providers/I18nProvider';
4
+
5
+ export default {
6
+ title: 'Layout/Header',
7
+ component: Header,
8
+ tags: ['autodocs'],
9
+ decorators: [
10
+ (Story) => (
11
+ <I18nProvider>
12
+ <Story />
13
+ </I18nProvider>
14
+ ),
15
+ ],
16
+ };
17
+
18
+ export const Default = {
19
+ render: () => {
20
+ const [language, setLanguage] = useState('es-AR');
21
+ return (
22
+ <Header
23
+ title="Anima Design System"
24
+ currentLanguage={language}
25
+ onLanguageChange={setLanguage}
26
+ />
27
+ );
28
+ },
29
+ };
30
+
31
+ export const WithCustomTitle = {
32
+ args: {
33
+ title: 'My Application',
34
+ },
35
+ };
36
+
@@ -0,0 +1,14 @@
1
+ export const Layout = ({ children, className = '' }) => {
2
+ return (
3
+ <div className={`min-h-screen bg-gray-50 ${className}`}>
4
+ <div className="container mx-auto px-4 sm:px-6 lg:px-8">
5
+ <div className="grid grid-cols-1 md:grid-cols-12 gap-4">
6
+ {children}
7
+ </div>
8
+ </div>
9
+ </div>
10
+ );
11
+ };
12
+
13
+ export default Layout;
14
+
@@ -0,0 +1,34 @@
1
+ import { Layout } from './Layout';
2
+
3
+ export default {
4
+ title: 'Layout/Layout',
5
+ component: Layout,
6
+ tags: ['autodocs'],
7
+ };
8
+
9
+ export const Default = {
10
+ args: {
11
+ children: (
12
+ <div className="col-span-12 bg-white p-6 rounded-lg shadow">
13
+ <h2 className="text-2xl font-bold mb-4">Layout Content</h2>
14
+ <p>This is a responsive layout container with breakpoint classes.</p>
15
+ </div>
16
+ ),
17
+ },
18
+ };
19
+
20
+ export const WithGrid = {
21
+ render: () => (
22
+ <Layout>
23
+ <div className="col-span-12 md:col-span-8 bg-blue-100 p-6 rounded-lg">
24
+ <h3 className="font-bold mb-2">Main Content (8 cols on md+)</h3>
25
+ <p>This section takes 8 columns on medium screens and above.</p>
26
+ </div>
27
+ <div className="col-span-12 md:col-span-4 bg-green-100 p-6 rounded-lg">
28
+ <h3 className="font-bold mb-2">Sidebar (4 cols on md+)</h3>
29
+ <p>This section takes 4 columns on medium screens and above.</p>
30
+ </div>
31
+ </Layout>
32
+ ),
33
+ };
34
+