anima-ds-nucleus 1.0.3 → 1.0.4

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 (37) hide show
  1. package/dist/anima-ds-nucleus.css +1 -1
  2. package/dist/anima-ds.cjs.js +123 -57
  3. package/dist/anima-ds.esm.js +6590 -5067
  4. package/package.json +10 -2
  5. package/src/assets/nucleus-logo.svg +3 -0
  6. package/src/components/Atoms/LogoHexa/LogoHexa.jsx +34 -0
  7. package/src/components/Atoms/LogoHexa/LogoHexa.stories.jsx +36 -0
  8. package/src/components/Atoms/Typography/Typography.jsx +4 -0
  9. package/src/components/Atoms/Typography/Typography.stories.jsx +37 -1
  10. package/src/components/DataDisplay/Card/Card.jsx +117 -24
  11. package/src/components/DataDisplay/Card/Card.stories.jsx +119 -35
  12. package/src/components/DataDisplay/Card/CardError.jsx +142 -0
  13. package/src/components/DataDisplay/Card/CardSkeleton.jsx +96 -0
  14. package/src/components/DataDisplay/Card/CardTituloCorto.jsx +61 -0
  15. package/src/components/DataDisplay/Card/CardTituloCortoMasEstado.jsx +79 -0
  16. package/src/components/DataDisplay/Card/CardTituloLargo.jsx +61 -0
  17. package/src/components/DataDisplay/Card/CardTituloLargoMasEstado.jsx +77 -0
  18. package/src/components/DataDisplay/Card/CardVacia.jsx +111 -0
  19. package/src/components/Layout/Header/HeaderConBuscador.stories.jsx +7 -0
  20. package/src/components/Layout/Header/HeaderCore.jsx +313 -85
  21. package/src/components/Layout/Header/HeaderCore.stories.jsx +25 -21
  22. package/src/components/Layout/Header/HeaderGeneral.jsx +92 -0
  23. package/src/components/Layout/Header/HeaderGeneral.stories.jsx +64 -0
  24. package/src/components/Layout/Header/HeaderPoint.jsx +120 -0
  25. package/src/components/Layout/Header/HeaderPoint.stories.jsx +110 -0
  26. package/src/components/Layout/NavPoint/NavPoint.jsx +64 -0
  27. package/src/components/Layout/NavPoint/NavPoint.stories.jsx +52 -0
  28. package/src/components/Layout/Sidebar/SidebarCore.jsx +524 -91
  29. package/src/components/Layout/Sidebar/SidebarCore.stories.jsx +76 -1
  30. package/src/components/Layout/Sidebar/SidebarPoint.jsx +264 -59
  31. package/src/components/Layout/Sidebar/SidebarPoint.stories.jsx +69 -0
  32. package/src/index.js +12 -3
  33. package/src/style.css +25 -0
  34. package/src/components/Layout/Header/Header.jsx +0 -50
  35. package/src/components/Layout/Header/Header.stories.jsx +0 -36
  36. package/src/components/Layout/Sidebar/Sidebar.jsx +0 -230
  37. package/src/components/Layout/Sidebar/Sidebar.stories.jsx +0 -90
@@ -1,113 +1,341 @@
1
- import { Typography } from '../../Atoms/Typography/Typography';
1
+ import { useState } from 'react';
2
2
  import { Icon } from '../../Atoms/Icon/Icon';
3
+ import { Avatar } from '../../Atoms/Avatar/Avatar';
4
+ import { Typography } from '../../Atoms/Typography/Typography';
3
5
 
4
6
  export const HeaderCore = ({
5
- logo,
6
- companyName = 'HEXA Core',
7
- date,
8
- pointLabel = 'HEXA Point',
9
- onPointClick,
7
+ searchPlaceholder = 'Buscar empleados, reportes, configuraciones...',
8
+ userName,
9
+ userAvatar,
10
+ notificationCount = 0,
11
+ onSearch,
12
+ onNotificationClick,
13
+ onUserClick,
10
14
  className = '',
11
15
  ...props
12
16
  }) => {
13
- // Formatear fecha si no se proporciona
14
- const formattedDate = date || new Date().toLocaleDateString('es-AR', {
15
- weekday: 'long',
16
- year: 'numeric',
17
- month: 'long',
18
- day: 'numeric',
19
- });
17
+ const [searchValue, setSearchValue] = useState('');
18
+
19
+ const handleSearchChange = (e) => {
20
+ const value = e.target.value;
21
+ setSearchValue(value);
22
+ if (onSearch) {
23
+ onSearch(value);
24
+ }
25
+ };
20
26
 
21
- // Capitalizar primera letra de la fecha
22
- const capitalizedDate = formattedDate.charAt(0).toUpperCase() + formattedDate.slice(1);
27
+ const handleSearchSubmit = (e) => {
28
+ e.preventDefault();
29
+ if (onSearch) {
30
+ onSearch(searchValue);
31
+ }
32
+ };
23
33
 
24
34
  return (
25
35
  <header
26
36
  className={`bg-white border-b border-gray-200 ${className}`}
27
37
  {...props}
28
38
  >
29
- <div className="container mx-auto px-4 sm:px-6 lg:px-8">
30
- <div className="flex items-center justify-between h-16">
31
- {/* Lado izquierdo: Línea vertical, logo y nombre */}
32
- <div className="flex items-center space-x-4">
33
- {/* Línea vertical */}
34
- <div className="w-px h-8 bg-gray-400"></div>
35
-
36
- {/* Logo hexagonal */}
37
- {logo ? (
38
- <img
39
- src={logo}
40
- alt={companyName}
41
- className="w-8 h-8"
39
+ <style>{`
40
+ .header-search-input {
41
+ border-color: #9ca3af;
42
+ }
43
+ .header-search-input::placeholder {
44
+ color: #9ca3af !important;
45
+ opacity: 1 !important;
46
+ }
47
+ .header-search-icon-container {
48
+ border-color: #9ca3af;
49
+ }
50
+ .header-search-form:focus-within .header-search-input {
51
+ border-color: #3b82f6 !important;
52
+ box-shadow: 0 0 0 1px #3b82f6;
53
+ }
54
+ .header-search-form:focus-within .header-search-icon-container {
55
+ border-color: #3b82f6 !important;
56
+ box-shadow: 0 0 0 1px #3b82f6;
57
+ }
58
+ @media (max-width: 768px) {
59
+ .header-search-input {
60
+ font-size: 12px !important;
61
+ padding-left: 8px !important;
62
+ padding-right: 8px !important;
63
+ }
64
+ .header-search-icon-container {
65
+ width: 36px !important;
66
+ }
67
+ }
68
+ @media (max-width: 480px) {
69
+ .header-mobile-top-row {
70
+ display: flex;
71
+ align-items: center;
72
+ justify-content: space-between;
73
+ padding: 8px 4px;
74
+ min-height: 48px;
75
+ }
76
+ .header-mobile-search-row {
77
+ display: block;
78
+ padding: 12px 4px 8px 4px;
79
+ }
80
+ .header-desktop-layout {
81
+ display: none;
82
+ }
83
+ }
84
+ @media (min-width: 481px) {
85
+ .header-mobile-layout {
86
+ display: none;
87
+ }
88
+ }
89
+ `}</style>
90
+
91
+ <div className="w-full" style={{ paddingLeft: '4px', paddingRight: '4px' }}>
92
+ {/* Layout Desktop (más de 480px) */}
93
+ <div className="header-desktop-layout flex items-center justify-between h-16">
94
+ {/* Barra de búsqueda con icono a la derecha */}
95
+ <div className="flex-1 mr-2 md:mr-4" style={{ maxWidth: 'none', minWidth: '0' }}>
96
+ <form onSubmit={handleSearchSubmit} className="header-search-form flex items-center w-full">
97
+ {/* Input de búsqueda */}
98
+ <input
99
+ type="text"
100
+ value={searchValue}
101
+ onChange={handleSearchChange}
102
+ placeholder={searchPlaceholder}
103
+ className="header-search-input flex-1 pl-2 md:pl-4 pr-2 md:pr-4 py-2 md:py-2.5 bg-white border border-gray-400 rounded-l-lg
104
+ focus:outline-none text-sm md:text-base"
105
+ style={{
106
+ height: '40px',
107
+ borderRight: 'none',
108
+ borderTopRightRadius: '0',
109
+ borderBottomRightRadius: '0',
110
+ color: '#374151',
111
+ fontFamily: 'IBM Plex Sans',
112
+ fontWeight: 400,
113
+ fontStyle: 'italic',
114
+ fontSize: '14px',
115
+ lineHeight: '20px',
116
+ letterSpacing: '0px'
117
+ }}
42
118
  />
43
- ) : (
44
- <svg
45
- width="36"
46
- height="36"
47
- viewBox="0 0 36 36"
48
- fill="none"
49
- xmlns="http://www.w3.org/2000/svg"
50
- className="w-9 h-9"
119
+
120
+ {/* Recuadro con icono de buscar a la derecha */}
121
+ <div
122
+ className="header-search-icon-container flex items-center justify-center border border-gray-400 rounded-r-lg bg-white"
123
+ style={{
124
+ width: '40px',
125
+ height: '40px',
126
+ borderTopLeftRadius: '0',
127
+ borderBottomLeftRadius: '0'
128
+ }}
51
129
  >
52
- {/* Hexágono con fondo verde oscuro y esquinas redondeadas - más ancho */}
53
- <path
54
- d="M18 4L28 9L28 27L18 32L8 27L8 9L18 4Z"
55
- fill="#2D5C63"
56
- stroke="#2D5C63"
57
- strokeWidth="0.5"
58
- strokeLinejoin="round"
130
+ <Icon
131
+ name="MagnifyingGlassIcon"
132
+ variant="24-outline"
133
+ size={20}
134
+ className="color-gray-600"
59
135
  />
60
- {/* H estilizada en blanco - bold con bordes redondeados */}
61
- <path
62
- d="M15 13V23M21 13V23M15 18H21"
63
- stroke="white"
64
- strokeWidth="1.5"
65
- strokeLinecap="round"
66
- strokeLinejoin="round"
136
+ </div>
137
+ </form>
138
+ </div>
139
+
140
+ {/* Notificaciones y Perfil */}
141
+ <div className="flex items-center space-x-3 md:space-x-6 flex-shrink-0" style={{ marginLeft: 'auto', paddingRight: '0px' }}>
142
+ {/* Icono de notificaciones */}
143
+ {notificationCount !== undefined && (
144
+ <button
145
+ onClick={onNotificationClick}
146
+ className="relative p-2 hover:bg-gray-100 rounded-lg transition-colors"
147
+ aria-label="Notificaciones"
148
+ >
149
+ <Icon
150
+ name="BellIcon"
151
+ variant="24-outline"
152
+ size={24}
153
+ className="color-gray-600"
67
154
  />
68
- </svg>
155
+ {notificationCount > 0 && (
156
+ <span
157
+ className="absolute -top-1 -right-1 px-1.5 py-0.5 min-w-[20px] h-5
158
+ text-white rounded-full flex items-center justify-center
159
+ text-body-sm font-medium"
160
+ style={{
161
+ backgroundColor: '#6D3856',
162
+ borderRadius: '12px'
163
+ }}
164
+ >
165
+ {notificationCount > 9 ? '9+' : notificationCount}
166
+ </span>
167
+ )}
168
+ </button>
69
169
  )}
70
-
71
- {/* Nombre de la empresa */}
72
- <Typography
73
- variant="body-md"
74
- className="color-teal font-bold"
75
- >
76
- {companyName}
77
- </Typography>
78
- </div>
79
170
 
80
- {/* Centro: Fecha */}
81
- <div className="flex-1 flex justify-center">
82
- <Typography
83
- variant="body-md"
84
- className="color-gray-500"
85
- >
86
- {capitalizedDate}
87
- </Typography>
171
+ {/* Perfil de usuario */}
172
+ {userName && (
173
+ <button
174
+ onClick={onUserClick}
175
+ className="flex items-center space-x-3 hover:bg-gray-50
176
+ rounded-lg px-2 py-1.5 transition-colors"
177
+ aria-label="Perfil de usuario"
178
+ >
179
+ <Avatar
180
+ src={userAvatar}
181
+ name={userName}
182
+ size="medium"
183
+ variant="circle"
184
+ />
185
+ <Typography
186
+ variant="body-lg"
187
+ className="color-gray-700 hidden md:block"
188
+ style={{
189
+ fontFamily: 'IBM Plex Sans',
190
+ fontWeight: 400,
191
+ fontStyle: 'normal',
192
+ fontSize: '16px',
193
+ lineHeight: '24px',
194
+ letterSpacing: '0%',
195
+ verticalAlign: 'middle'
196
+ }}
197
+ >
198
+ {userName}
199
+ </Typography>
200
+ <Icon
201
+ name="ChevronDownIcon"
202
+ variant="24-outline"
203
+ size={20}
204
+ className="color-gray-500"
205
+ />
206
+ </button>
207
+ )}
88
208
  </div>
209
+ </div>
89
210
 
90
- {/* Lado derecho: Botón HEXA Point */}
91
- <div className="flex items-center">
92
- <button
93
- onClick={onPointClick}
94
- className="px-4 py-2 border bg-white rounded-lg
95
- hover:bg-gray-50 transition-colors flex items-center space-x-2"
96
- style={{ borderColor: '#2D5C63' }}
97
- >
211
+ {/* Layout Mobile (480px o menos) */}
212
+ <div className="header-mobile-layout">
213
+ {/* Primera fila: Menú, Core, Notificaciones y Avatar */}
214
+ <div className="header-mobile-top-row">
215
+ {/* Lado izquierdo: Menú hamburguesa y Core */}
216
+ <div className="flex items-center space-x-2">
217
+ {/* Botón menú hamburguesa */}
218
+ <button
219
+ className="p-2 hover:bg-gray-100 rounded-lg transition-colors"
220
+ aria-label="Menú"
221
+ >
222
+ <Icon
223
+ name="Bars3Icon"
224
+ variant="24-outline"
225
+ size={24}
226
+ className="color-gray-700"
227
+ />
228
+ </button>
229
+
230
+ {/* Texto "Core" */}
98
231
  <Typography
99
- variant="body-md"
100
- className="color-teal"
232
+ variant="h6"
233
+ style={{
234
+ color: '#2D5C63',
235
+ fontSize: '24px',
236
+ fontFamily: 'IBM Plex Sans',
237
+ fontWeight: 600,
238
+ lineHeight: '1.2',
239
+ margin: 0
240
+ }}
101
241
  >
102
- {pointLabel}
242
+ Core
103
243
  </Typography>
104
- <Icon
105
- name="ArrowUpRightIcon"
106
- variant="24-outline"
107
- size={16}
108
- className="color-teal"
244
+ </div>
245
+
246
+ {/* Lado derecho: Notificaciones y Avatar */}
247
+ <div className="flex items-center space-x-3">
248
+ {/* Icono de notificaciones */}
249
+ {notificationCount !== undefined && (
250
+ <button
251
+ onClick={onNotificationClick}
252
+ className="relative p-2 hover:bg-gray-100 rounded-lg transition-colors"
253
+ aria-label="Notificaciones"
254
+ >
255
+ <Icon
256
+ name="BellIcon"
257
+ variant="24-outline"
258
+ size={24}
259
+ className="color-gray-600"
260
+ />
261
+ {notificationCount > 0 && (
262
+ <span
263
+ className="absolute -top-1 -right-1 px-1.5 py-0.5 min-w-[20px] h-5
264
+ text-white rounded-full flex items-center justify-center
265
+ text-body-sm font-medium"
266
+ style={{
267
+ backgroundColor: '#6D3856',
268
+ borderRadius: '12px'
269
+ }}
270
+ >
271
+ {notificationCount > 9 ? '9+' : notificationCount}
272
+ </span>
273
+ )}
274
+ </button>
275
+ )}
276
+
277
+ {/* Avatar (sin nombre) */}
278
+ {userAvatar && (
279
+ <button
280
+ onClick={onUserClick}
281
+ className="hover:bg-gray-50 rounded-lg transition-colors"
282
+ aria-label="Perfil de usuario"
283
+ >
284
+ <Avatar
285
+ src={userAvatar}
286
+ name={userName || ''}
287
+ size="medium"
288
+ variant="circle"
289
+ />
290
+ </button>
291
+ )}
292
+ </div>
293
+ </div>
294
+
295
+ {/* Segunda fila: Barra de búsqueda */}
296
+ <div className="header-mobile-search-row">
297
+ <form onSubmit={handleSearchSubmit} className="header-search-form flex items-center w-full">
298
+ {/* Input de búsqueda */}
299
+ <input
300
+ type="text"
301
+ value={searchValue}
302
+ onChange={handleSearchChange}
303
+ placeholder={searchPlaceholder}
304
+ className="header-search-input flex-1 pl-3 pr-3 py-2 bg-white border border-gray-400 rounded-l-lg
305
+ focus:outline-none text-sm"
306
+ style={{
307
+ height: '40px',
308
+ borderRight: 'none',
309
+ borderTopRightRadius: '0',
310
+ borderBottomRightRadius: '0',
311
+ color: '#374151',
312
+ fontFamily: 'IBM Plex Sans',
313
+ fontWeight: 400,
314
+ fontStyle: 'italic',
315
+ fontSize: '14px',
316
+ lineHeight: '20px',
317
+ letterSpacing: '0px'
318
+ }}
109
319
  />
110
- </button>
320
+
321
+ {/* Recuadro con icono de buscar a la derecha */}
322
+ <div
323
+ className="header-search-icon-container flex items-center justify-center border border-gray-400 rounded-r-lg bg-white"
324
+ style={{
325
+ width: '40px',
326
+ height: '40px',
327
+ borderTopLeftRadius: '0',
328
+ borderBottomLeftRadius: '0'
329
+ }}
330
+ >
331
+ <Icon
332
+ name="MagnifyingGlassIcon"
333
+ variant="24-outline"
334
+ size={20}
335
+ className="color-gray-600"
336
+ />
337
+ </div>
338
+ </form>
111
339
  </div>
112
340
  </div>
113
341
  </div>
@@ -9,47 +9,51 @@ export default {
9
9
  export const Default = {
10
10
  render: () => (
11
11
  <HeaderCore
12
- companyName="HEXA Corp"
13
- date="Martes, 20 de octubre de 2023"
14
- newElementLabel="NUEVO ELEMENTO"
15
- pointLabel="HEXA Point"
16
- onNewElementClick={() => console.log('Nuevo elemento clickeado')}
17
- onPointClick={() => console.log('HEXA Point clickeado')}
12
+ searchPlaceholder="Buscar empleados, reportes, configuraciones..."
13
+ userName="Maria García Alonso"
14
+ userAvatar="https://i.pravatar.cc/150?img=12"
15
+ notificationCount={7}
16
+ onSearch={(value) => console.log('Búsqueda:', value)}
17
+ onNotificationClick={() => console.log('Notificaciones clickeadas')}
18
+ onUserClick={() => console.log('Usuario clickeado')}
18
19
  />
19
20
  ),
20
21
  };
21
22
 
22
- export const ConFechaAutomatica = {
23
+ export const SinNotificaciones = {
23
24
  render: () => (
24
25
  <HeaderCore
25
- companyName="HEXA Corp"
26
- newElementLabel="NUEVO ELEMENTO"
27
- pointLabel="HEXA Point"
26
+ searchPlaceholder="Buscar empleados, reportes, configuraciones..."
27
+ userName="Juan Pérez"
28
+ userAvatar="https://i.pravatar.cc/150?img=33"
29
+ notificationCount={0}
28
30
  />
29
31
  ),
30
32
  };
31
33
 
32
- export const ConLogoPersonalizado = {
34
+ export const ConMuchasNotificaciones = {
33
35
  render: () => (
34
36
  <HeaderCore
35
- companyName="Mi Empresa"
36
- logo="https://via.placeholder.com/32"
37
- date="Lunes, 15 de enero de 2024"
38
- newElementLabel="CREAR"
39
- pointLabel="Mi Punto"
37
+ searchPlaceholder="Buscar empleados, reportes, configuraciones..."
38
+ userName="Ana Martínez"
39
+ userAvatar="https://i.pravatar.cc/150?img=47"
40
+ notificationCount={15}
40
41
  />
41
42
  ),
42
43
  };
43
44
 
44
- export const ConLabelsPersonalizados = {
45
+ export const SinUsuario = {
45
46
  render: () => (
46
47
  <HeaderCore
47
- companyName="ACME Corp"
48
- date="Viernes, 25 de diciembre de 2024"
49
- newElementLabel="AGREGAR"
50
- pointLabel="ACME Hub"
48
+ searchPlaceholder="Buscar empleados, reportes, configuraciones..."
49
+ notificationCount={3}
51
50
  />
52
51
  ),
53
52
  };
54
53
 
55
54
 
55
+
56
+
57
+
58
+
59
+
@@ -0,0 +1,92 @@
1
+ import { useState } from 'react';
2
+ import { Icon } from '../../Atoms/Icon/Icon';
3
+ import { Typography } from '../../Atoms/Typography/Typography';
4
+ import { LogoHexa } from '../../Atoms/LogoHexa/LogoHexa';
5
+
6
+ export const HeaderGeneral = ({
7
+ logoText = 'HEXA',
8
+ suiteText = 'Suite',
9
+ languages = [
10
+ { code: 'es-AR', name: 'Español' },
11
+ { code: 'en', name: 'English' },
12
+ ],
13
+ currentLanguageCode = 'es-AR',
14
+ onLanguageChange,
15
+ className = '',
16
+ ...props
17
+ }) => {
18
+ const [isLanguageOpen, setIsLanguageOpen] = useState(false);
19
+
20
+ const currentLanguage = languages.find(lang => lang.code === currentLanguageCode) || languages[0];
21
+
22
+ const handleLanguageChange = (langCode) => {
23
+ if (onLanguageChange) {
24
+ onLanguageChange(langCode);
25
+ }
26
+ setIsLanguageOpen(false);
27
+ };
28
+
29
+ return (
30
+ <header className={`w-full flex justify-between items-center bg-white ${className}`} style={{ paddingTop: '4px', paddingBottom: '4px', paddingLeft: '8px', paddingRight: '12px' }} {...props}>
31
+ {/* Logo */}
32
+ <div className="flex items-center gap-2">
33
+ <LogoHexa width={32} height={36} />
34
+ <div className="flex items-center" style={{ gap: '4px' }}>
35
+ <Typography variant="h6" className="font-normal" style={{ color: '#2D5C63', margin: 0 }}>
36
+ {logoText}
37
+ </Typography>
38
+ <Typography variant="h6" className="font-normal" style={{ color: '#2D5C63', margin: 0 }}>
39
+ {suiteText}
40
+ </Typography>
41
+ </div>
42
+ </div>
43
+
44
+ {/* Language Selector - Solo se muestra si hay idiomas */}
45
+ {languages && languages.length > 0 && (
46
+ <div className="relative flex items-center gap-2">
47
+ <Icon name="LanguageIcon" variant="24-outline" size={18} style={{ color: '#374151' }} />
48
+ <button
49
+ onClick={() => setIsLanguageOpen(!isLanguageOpen)}
50
+ className="flex items-center gap-2 px-3 py-2 text-body-md color-gray-700 bg-white hover:bg-gray-50 rounded-lg transition-colors"
51
+ style={{ border: '1px solid #2D5C63' }}
52
+ >
53
+ <span>{currentLanguage.name}</span>
54
+ <Icon
55
+ name="ChevronDownIcon"
56
+ variant="24-outline"
57
+ size={16}
58
+ className={`transition-transform ${isLanguageOpen ? 'rotate-180' : ''}`}
59
+ />
60
+ </button>
61
+
62
+ {isLanguageOpen && (
63
+ <>
64
+ <div
65
+ className="fixed inset-0 z-10"
66
+ onClick={() => setIsLanguageOpen(false)}
67
+ />
68
+ <div className="absolute right-0 mt-2 w-40 bg-white rounded-lg shadow-lg z-20 py-1" style={{ border: '1px solid #2D5C63' }}>
69
+ {languages.map((lang) => (
70
+ <button
71
+ key={lang.code}
72
+ onClick={() => handleLanguageChange(lang.code)}
73
+ className={`w-full text-left px-4 py-2 text-body-md hover:bg-gray-50 transition-colors ${
74
+ currentLanguage.code === lang.code
75
+ ? 'bg-gray-50 color-brand font-medium'
76
+ : 'color-gray-700'
77
+ }`}
78
+ >
79
+ {lang.name}
80
+ </button>
81
+ ))}
82
+ </div>
83
+ </>
84
+ )}
85
+ </div>
86
+ )}
87
+ </header>
88
+ );
89
+ };
90
+
91
+ export default HeaderGeneral;
92
+
@@ -0,0 +1,64 @@
1
+ import { HeaderGeneral } from './HeaderGeneral';
2
+
3
+ export default {
4
+ title: 'Layout/HeaderGeneral',
5
+ component: HeaderGeneral,
6
+ tags: ['autodocs'],
7
+ };
8
+
9
+ export const Default = {
10
+ render: () => (
11
+ <HeaderGeneral
12
+ logoText="HEXA"
13
+ suiteText="Suite"
14
+ languages={[
15
+ { code: 'es-AR', name: 'Español' },
16
+ { code: 'en', name: 'English' },
17
+ ]}
18
+ currentLanguageCode="es-AR"
19
+ onLanguageChange={(langCode) => console.log('Idioma cambiado:', langCode)}
20
+ />
21
+ ),
22
+ };
23
+
24
+ export const ConIdiomaIngles = {
25
+ render: () => (
26
+ <HeaderGeneral
27
+ logoText="HEXA"
28
+ suiteText="Suite"
29
+ languages={[
30
+ { code: 'es-AR', name: 'Español' },
31
+ { code: 'en', name: 'English' },
32
+ ]}
33
+ currentLanguageCode="en"
34
+ onLanguageChange={(langCode) => console.log('Idioma cambiado:', langCode)}
35
+ />
36
+ ),
37
+ };
38
+
39
+ export const ConTextosPersonalizados = {
40
+ render: () => (
41
+ <HeaderGeneral
42
+ logoText="MI"
43
+ suiteText="EMPRESA"
44
+ languages={[
45
+ { code: 'es-AR', name: 'Español' },
46
+ { code: 'en', name: 'English' },
47
+ { code: 'pt', name: 'Português' },
48
+ ]}
49
+ currentLanguageCode="es-AR"
50
+ onLanguageChange={(langCode) => console.log('Idioma cambiado:', langCode)}
51
+ />
52
+ ),
53
+ };
54
+
55
+ export const SinIdiomas = {
56
+ render: () => (
57
+ <HeaderGeneral
58
+ logoText="HEXA"
59
+ suiteText="Suite"
60
+ languages={[]}
61
+ />
62
+ ),
63
+ };
64
+