anima-ds-nucleus 1.0.16 → 1.0.18
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/dist/anima-ds-nucleus.css +1 -1
- package/dist/anima-ds.cjs.js +150 -124
- package/dist/anima-ds.esm.js +6799 -5651
- package/package.json +1 -1
- package/src/components/DataDisplay/Card/CardTituloCorto.jsx +23 -2
- package/src/components/DataDisplay/Card/CardTituloCortoMasEstado.jsx +23 -2
- package/src/components/DataDisplay/Card/CardTituloLargo.jsx +23 -2
- package/src/components/DataDisplay/Card/CardTituloLargoMasEstado.jsx +23 -2
- package/src/components/Inputs/PasswordInput/PasswordInput.jsx +85 -0
- package/src/components/Layout/Header/HeaderCompartido.jsx +192 -0
- package/src/components/Layout/Header/HeaderCompartido.stories.jsx +66 -0
- package/src/components/Layout/Header/HeaderConBuscador.stories.jsx +1 -0
- package/src/components/Layout/Header/HeaderCore.jsx +12 -12
- package/src/components/Layout/Header/HeaderGeneral.jsx +248 -53
- package/src/components/Layout/Header/HeaderGeneral.stories.jsx +34 -0
- package/src/components/Layout/Header/HeaderPoint.jsx +3 -3
- package/src/components/Layout/NavPoint/NavPoint.jsx +76 -55
- package/src/components/Layout/SaludoConFechaDashboard/SaludoConFechaDashboard.jsx +0 -1
- package/src/components/Layout/Sidebar/SidebarCore.jsx +82 -30
- package/src/components/Views/ForgotPassword/ForgotPassword.jsx +341 -0
- package/src/components/Views/ForgotPassword/ForgotPassword.stories.jsx +186 -0
- package/src/components/Views/LoginForm/LoginForm.jsx +332 -43
- package/src/components/Views/LoginForm/LoginForm.stories.jsx +182 -4
- package/src/i18n/config.js +12 -0
- package/src/index.js +2 -0
|
@@ -4,6 +4,7 @@ import { Typography } from '../../Atoms/Typography/Typography';
|
|
|
4
4
|
import { LogoHexa } from '../../Atoms/LogoHexa/LogoHexa';
|
|
5
5
|
|
|
6
6
|
export const HeaderGeneral = ({
|
|
7
|
+
variant,
|
|
7
8
|
logoText = 'HEXA',
|
|
8
9
|
suiteText = 'Suite',
|
|
9
10
|
languages = [
|
|
@@ -16,6 +17,9 @@ export const HeaderGeneral = ({
|
|
|
16
17
|
...props
|
|
17
18
|
}) => {
|
|
18
19
|
const [isLanguageOpen, setIsLanguageOpen] = useState(false);
|
|
20
|
+
const [hoveredLangCode, setHoveredLangCode] = useState(null);
|
|
21
|
+
const [isLanguageButtonHovered, setIsLanguageButtonHovered] = useState(false);
|
|
22
|
+
const isLoginVariant = variant === 'login';
|
|
19
23
|
|
|
20
24
|
const currentLanguage = languages.find(lang => lang.code === currentLanguageCode) || languages[0];
|
|
21
25
|
|
|
@@ -27,64 +31,255 @@ export const HeaderGeneral = ({
|
|
|
27
31
|
};
|
|
28
32
|
|
|
29
33
|
return (
|
|
30
|
-
|
|
31
|
-
{
|
|
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>
|
|
34
|
+
isLoginVariant ? (() => {
|
|
35
|
+
const { style: styleProp, ...restProps } = props;
|
|
43
36
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
37
|
+
return (
|
|
38
|
+
<header
|
|
39
|
+
className={`w-full flex justify-between items-center bg-white ${className}`}
|
|
40
|
+
style={{
|
|
41
|
+
boxShadow: '0px 2px 4px -1px #0000000F, 0px 4px 6px -1px #0000001A',
|
|
42
|
+
padding: '16px var(--mf-ds-grid-margin, 20px)',
|
|
43
|
+
...styleProp,
|
|
44
|
+
}}
|
|
45
|
+
{...restProps}
|
|
46
|
+
>
|
|
47
|
+
{/* Logo */}
|
|
48
|
+
<div className="flex items-center gap-3">
|
|
49
|
+
<LogoHexa width={36} height={40} />
|
|
50
|
+
<div className="flex items-center" style={{ gap: '4px' }}>
|
|
51
|
+
<Typography
|
|
52
|
+
variant="h5"
|
|
53
|
+
className="font-normal"
|
|
54
|
+
style={{
|
|
55
|
+
color: '#2D5C63',
|
|
56
|
+
margin: 0,
|
|
57
|
+
fontFamily: 'IBM Plex Sans',
|
|
58
|
+
fontWeight: 400,
|
|
59
|
+
fontStyle: 'normal',
|
|
60
|
+
fontSize: '20px',
|
|
61
|
+
lineHeight: '30px',
|
|
62
|
+
letterSpacing: '0px',
|
|
63
|
+
}}
|
|
64
|
+
>
|
|
65
|
+
{logoText}
|
|
66
|
+
</Typography>
|
|
67
|
+
<Typography
|
|
68
|
+
variant="h5"
|
|
69
|
+
className="font-normal"
|
|
70
|
+
style={{
|
|
71
|
+
color: '#2D5C63',
|
|
72
|
+
margin: 0,
|
|
73
|
+
fontFamily: 'IBM Plex Sans',
|
|
74
|
+
fontWeight: 400,
|
|
75
|
+
fontStyle: 'normal',
|
|
76
|
+
fontSize: '20px',
|
|
77
|
+
lineHeight: '30px',
|
|
78
|
+
letterSpacing: '0px',
|
|
79
|
+
}}
|
|
80
|
+
>
|
|
81
|
+
{suiteText}
|
|
82
|
+
</Typography>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
61
85
|
|
|
62
|
-
{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
86
|
+
{/* Language Selector - Solo se muestra si hay idiomas */}
|
|
87
|
+
{languages && languages.length > 0 && (
|
|
88
|
+
<div className="relative">
|
|
89
|
+
<div className="flex items-center" style={{ width: '150px', height: '40px', gap: '16px', opacity: 1 }}>
|
|
90
|
+
<Icon
|
|
91
|
+
name="LanguageIcon"
|
|
92
|
+
variant="24-outline"
|
|
93
|
+
size={20}
|
|
94
|
+
style={{ width: '20px', height: '20px', opacity: 1 }}
|
|
95
|
+
/>
|
|
96
|
+
<button
|
|
97
|
+
onClick={() => setIsLanguageOpen(!isLanguageOpen)}
|
|
98
|
+
onMouseEnter={() => setIsLanguageButtonHovered(true)}
|
|
99
|
+
onMouseLeave={() => setIsLanguageButtonHovered(false)}
|
|
100
|
+
className="flex items-center gap-2 text-body-md text-gray-700 bg-white hover:bg-gray-50 transition-colors"
|
|
101
|
+
style={{
|
|
102
|
+
width: '114px',
|
|
103
|
+
height: '40px',
|
|
104
|
+
padding: '8px 12px 8px 16px',
|
|
105
|
+
gap: '8px',
|
|
106
|
+
borderRadius: '8px',
|
|
107
|
+
border: '1px solid #38656D',
|
|
108
|
+
background: isLanguageButtonHovered ? '#F9FAFB' : 'white',
|
|
109
|
+
opacity: 1,
|
|
110
|
+
color: '#374151',
|
|
111
|
+
}}
|
|
112
|
+
>
|
|
113
|
+
<span>{currentLanguage.name}</span>
|
|
114
|
+
<Icon
|
|
115
|
+
name="ChevronDownIcon"
|
|
116
|
+
variant="24-outline"
|
|
117
|
+
size={16}
|
|
118
|
+
className={`transition-transform ${isLanguageOpen ? 'rotate-180' : ''}`}
|
|
119
|
+
/>
|
|
120
|
+
</button>
|
|
82
121
|
</div>
|
|
83
|
-
|
|
122
|
+
|
|
123
|
+
{isLanguageOpen && (
|
|
124
|
+
<>
|
|
125
|
+
<div
|
|
126
|
+
className="fixed inset-0 z-10"
|
|
127
|
+
onClick={() => setIsLanguageOpen(false)}
|
|
128
|
+
/>
|
|
129
|
+
<div
|
|
130
|
+
className="absolute right-0 mt-2 bg-white z-20"
|
|
131
|
+
style={{
|
|
132
|
+
width: '224px',
|
|
133
|
+
height: '112px',
|
|
134
|
+
padding: '12px',
|
|
135
|
+
borderRadius: '12px',
|
|
136
|
+
border: '1px solid #E5E7EB',
|
|
137
|
+
boxShadow: '0px 2px 4px -2px #0000001A, 0px 4px 6px -1px #0000001A',
|
|
138
|
+
display: 'flex',
|
|
139
|
+
flexDirection: 'column',
|
|
140
|
+
gap: '8px',
|
|
141
|
+
}}
|
|
142
|
+
>
|
|
143
|
+
{languages.map((lang) => (
|
|
144
|
+
<button
|
|
145
|
+
key={lang.code}
|
|
146
|
+
onClick={() => handleLanguageChange(lang.code)}
|
|
147
|
+
className="w-full text-left transition-colors"
|
|
148
|
+
style={{
|
|
149
|
+
width: '200px',
|
|
150
|
+
height: '40px',
|
|
151
|
+
padding: 0,
|
|
152
|
+
border: 'none',
|
|
153
|
+
background: 'transparent',
|
|
154
|
+
}}
|
|
155
|
+
onMouseEnter={() => setHoveredLangCode(lang.code)}
|
|
156
|
+
onMouseLeave={() => setHoveredLangCode(null)}
|
|
157
|
+
>
|
|
158
|
+
<div
|
|
159
|
+
style={{
|
|
160
|
+
width: '200px',
|
|
161
|
+
height: '40px',
|
|
162
|
+
padding: '8px',
|
|
163
|
+
borderRadius: '8px',
|
|
164
|
+
display: 'flex',
|
|
165
|
+
alignItems: 'center',
|
|
166
|
+
justifyContent: 'space-between',
|
|
167
|
+
gap: '16px',
|
|
168
|
+
backgroundColor:
|
|
169
|
+
currentLanguage.code === lang.code
|
|
170
|
+
? '#6D3856'
|
|
171
|
+
: hoveredLangCode === lang.code
|
|
172
|
+
? '#DDDDDD'
|
|
173
|
+
: 'transparent',
|
|
174
|
+
color: currentLanguage.code === lang.code ? '#FFFFFF' : undefined,
|
|
175
|
+
}}
|
|
176
|
+
>
|
|
177
|
+
<span
|
|
178
|
+
style={{
|
|
179
|
+
fontFamily: 'IBM Plex Sans',
|
|
180
|
+
fontWeight: 400,
|
|
181
|
+
fontStyle: 'normal',
|
|
182
|
+
fontSize: '16px',
|
|
183
|
+
lineHeight: '24px',
|
|
184
|
+
letterSpacing: '0px',
|
|
185
|
+
width: '144px',
|
|
186
|
+
height: '24px',
|
|
187
|
+
opacity: 1,
|
|
188
|
+
}}
|
|
189
|
+
>
|
|
190
|
+
{lang.name}
|
|
191
|
+
</span>
|
|
192
|
+
|
|
193
|
+
{currentLanguage.code === lang.code && (
|
|
194
|
+
<div
|
|
195
|
+
style={{
|
|
196
|
+
width: '24px',
|
|
197
|
+
height: '24px',
|
|
198
|
+
backgroundColor: '#FFFFFF',
|
|
199
|
+
borderRadius: '999px',
|
|
200
|
+
display: 'flex',
|
|
201
|
+
alignItems: 'center',
|
|
202
|
+
justifyContent: 'center',
|
|
203
|
+
}}
|
|
204
|
+
>
|
|
205
|
+
<Icon
|
|
206
|
+
name="CheckCircleIcon"
|
|
207
|
+
variant="24-solid"
|
|
208
|
+
size={24}
|
|
209
|
+
style={{ width: '24px', height: '24px', color: '#6D3856' }}
|
|
210
|
+
/>
|
|
211
|
+
</div>
|
|
212
|
+
)}
|
|
213
|
+
</div>
|
|
214
|
+
</button>
|
|
215
|
+
))}
|
|
216
|
+
</div>
|
|
217
|
+
</>
|
|
218
|
+
)}
|
|
219
|
+
</div>
|
|
84
220
|
)}
|
|
221
|
+
</header>
|
|
222
|
+
);
|
|
223
|
+
})() : (
|
|
224
|
+
<header className={`w-full flex justify-between items-center bg-white ${className}`} style={{ paddingTop: '4px', paddingBottom: '4px', paddingLeft: '8px', paddingRight: '12px' }} {...props}>
|
|
225
|
+
{/* Logo */}
|
|
226
|
+
<div className="flex items-center gap-2">
|
|
227
|
+
<LogoHexa width={32} height={36} />
|
|
228
|
+
<div className="flex items-center" style={{ gap: '4px' }}>
|
|
229
|
+
<Typography variant="h6" className="font-normal" style={{ color: '#2D5C63', margin: 0 }}>
|
|
230
|
+
{logoText}
|
|
231
|
+
</Typography>
|
|
232
|
+
<Typography variant="h6" className="font-normal" style={{ color: '#2D5C63', margin: 0 }}>
|
|
233
|
+
{suiteText}
|
|
234
|
+
</Typography>
|
|
235
|
+
</div>
|
|
85
236
|
</div>
|
|
86
|
-
|
|
87
|
-
|
|
237
|
+
|
|
238
|
+
{/* Language Selector - Solo se muestra si hay idiomas */}
|
|
239
|
+
{languages && languages.length > 0 && (
|
|
240
|
+
<div className="relative flex items-center gap-2">
|
|
241
|
+
<Icon name="LanguageIcon" variant="24-outline" size={18} style={{ color: '#374151' }} />
|
|
242
|
+
<button
|
|
243
|
+
onClick={() => setIsLanguageOpen(!isLanguageOpen)}
|
|
244
|
+
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"
|
|
245
|
+
style={{ border: '1px solid #2D5C63' }}
|
|
246
|
+
>
|
|
247
|
+
<span>{currentLanguage.name}</span>
|
|
248
|
+
<Icon
|
|
249
|
+
name="ChevronDownIcon"
|
|
250
|
+
variant="24-outline"
|
|
251
|
+
size={16}
|
|
252
|
+
className={`transition-transform ${isLanguageOpen ? 'rotate-180' : ''}`}
|
|
253
|
+
/>
|
|
254
|
+
</button>
|
|
255
|
+
|
|
256
|
+
{isLanguageOpen && (
|
|
257
|
+
<>
|
|
258
|
+
<div
|
|
259
|
+
className="fixed inset-0 z-10"
|
|
260
|
+
onClick={() => setIsLanguageOpen(false)}
|
|
261
|
+
/>
|
|
262
|
+
<div className="absolute right-0 mt-2 w-40 bg-white rounded-lg shadow-lg z-20 py-1" style={{ border: '1px solid #2D5C63' }}>
|
|
263
|
+
{languages.map((lang) => (
|
|
264
|
+
<button
|
|
265
|
+
key={lang.code}
|
|
266
|
+
onClick={() => handleLanguageChange(lang.code)}
|
|
267
|
+
className={`w-full text-left px-4 py-2 text-body-md hover:bg-gray-50 transition-colors ${
|
|
268
|
+
currentLanguage.code === lang.code
|
|
269
|
+
? 'bg-gray-50 color-brand font-medium'
|
|
270
|
+
: 'color-gray-700'
|
|
271
|
+
}`}
|
|
272
|
+
>
|
|
273
|
+
{lang.name}
|
|
274
|
+
</button>
|
|
275
|
+
))}
|
|
276
|
+
</div>
|
|
277
|
+
</>
|
|
278
|
+
)}
|
|
279
|
+
</div>
|
|
280
|
+
)}
|
|
281
|
+
</header>
|
|
282
|
+
)
|
|
88
283
|
);
|
|
89
284
|
};
|
|
90
285
|
|
|
@@ -62,3 +62,37 @@ export const SinIdiomas = {
|
|
|
62
62
|
),
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
+
export const Login = {
|
|
66
|
+
render: () => (
|
|
67
|
+
<HeaderGeneral
|
|
68
|
+
variant="login"
|
|
69
|
+
logoText="HEXA"
|
|
70
|
+
suiteText="Suite"
|
|
71
|
+
languages={[
|
|
72
|
+
{ code: 'es-AR', name: 'Español' },
|
|
73
|
+
{ code: 'en', name: 'English' },
|
|
74
|
+
]}
|
|
75
|
+
currentLanguageCode="es-AR"
|
|
76
|
+
onLanguageChange={(langCode) => console.log('Idioma cambiado:', langCode)}
|
|
77
|
+
/>
|
|
78
|
+
),
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const LoginConMargenCustom = {
|
|
82
|
+
render: () => (
|
|
83
|
+
<div style={{ '--mf-ds-grid-margin': '32px' }}>
|
|
84
|
+
<HeaderGeneral
|
|
85
|
+
variant="login"
|
|
86
|
+
logoText="HEXA"
|
|
87
|
+
suiteText="Suite"
|
|
88
|
+
languages={[
|
|
89
|
+
{ code: 'es-AR', name: 'Español' },
|
|
90
|
+
{ code: 'en', name: 'English' },
|
|
91
|
+
]}
|
|
92
|
+
currentLanguageCode="en"
|
|
93
|
+
onLanguageChange={(langCode) => console.log('Idioma cambiado:', langCode)}
|
|
94
|
+
/>
|
|
95
|
+
</div>
|
|
96
|
+
),
|
|
97
|
+
};
|
|
98
|
+
|
|
@@ -21,8 +21,8 @@ const FONT_SIZE_BASE = '14px';
|
|
|
21
21
|
const LINE_HEIGHT_BASE = '20px';
|
|
22
22
|
|
|
23
23
|
// Constantes de breakpoints
|
|
24
|
-
const BREAKPOINT_MOBILE_MAX = '
|
|
25
|
-
const BREAKPOINT_DESKTOP_MIN = '
|
|
24
|
+
const BREAKPOINT_MOBILE_MAX = '1024px';
|
|
25
|
+
const BREAKPOINT_DESKTOP_MIN = '1025px';
|
|
26
26
|
const BREAKPOINT_TABLET_MAX = '700px';
|
|
27
27
|
|
|
28
28
|
// Constantes de valores por defecto
|
|
@@ -127,7 +127,7 @@ export const HeaderPoint = ({
|
|
|
127
127
|
.header-actions-wrapper {
|
|
128
128
|
flex-shrink: 0;
|
|
129
129
|
}
|
|
130
|
-
/* Estilos para rango intermedio (
|
|
130
|
+
/* Estilos para rango intermedio (1025px - 700px) - No aplica con nuevo breakpoint */
|
|
131
131
|
@media (min-width: ${BREAKPOINT_DESKTOP_MIN}) and (max-width: ${BREAKPOINT_TABLET_MAX}) {
|
|
132
132
|
.header-desktop-layout {
|
|
133
133
|
gap: 0.5rem;
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import { Icon } from '../../Atoms/Icon/Icon';
|
|
2
2
|
import { Typography } from '../../Atoms/Typography/Typography';
|
|
3
3
|
|
|
4
|
+
// Constantes de diseño reutilizables
|
|
5
|
+
const ICON_SIZE = 24;
|
|
6
|
+
const ICON_COLOR_ACTIVE = '#FFFFFF';
|
|
7
|
+
const ICON_COLOR_INACTIVE = '#374151';
|
|
8
|
+
const BACKGROUND_COLOR_ACTIVE = '#2D5C63';
|
|
9
|
+
const TEXT_COLOR_ACTIVE = '#FFFFFF';
|
|
10
|
+
const TEXT_COLOR_INACTIVE = '#374151';
|
|
11
|
+
const NAV_HEIGHT = '80px'; // Altura fija para garantizar espacio para icono + label + padding
|
|
12
|
+
const BORDER_RADIUS_TOP = '16px';
|
|
13
|
+
const SHADOW_COLOR = 'rgba(0, 0, 0, 0.1)';
|
|
14
|
+
|
|
15
|
+
// Constantes de breakpoints
|
|
16
|
+
const BREAKPOINT_MOBILE_MAX = '1024px';
|
|
17
|
+
const BREAKPOINT_DESKTOP_MIN = '1025px';
|
|
18
|
+
|
|
4
19
|
const DEFAULT_ITEMS = [
|
|
5
20
|
{ id: 'inicio', label: 'Inicio', icon: 'Squares2X2Icon' },
|
|
6
21
|
{ id: 'docs', label: 'Docs', icon: 'DocumentTextIcon' },
|
|
@@ -15,91 +30,96 @@ export const NavPoint = ({
|
|
|
15
30
|
className = '',
|
|
16
31
|
...props
|
|
17
32
|
}) => {
|
|
18
|
-
const
|
|
19
|
-
|
|
33
|
+
const handleItemClick = (itemId) => {
|
|
34
|
+
if (onItemClick) {
|
|
35
|
+
onItemClick(itemId);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const getBorderRadius = (isActive) => {
|
|
40
|
+
if (!isActive) return '0';
|
|
41
|
+
// Redondear ambas esquinas superiores cuando la pestaña está activa
|
|
42
|
+
return `${BORDER_RADIUS_TOP} ${BORDER_RADIUS_TOP} 0 0`;
|
|
43
|
+
};
|
|
44
|
+
|
|
20
45
|
return (
|
|
21
|
-
|
|
22
|
-
className={`fixed bottom-0 left-0 right-0 z-50 md:hidden bg-white rounded-t-lg shadow-md nav-point ${shouldCompress ? 'compressed' : ''} ${className}`}
|
|
23
|
-
style={{
|
|
24
|
-
boxShadow: '0 -2px 8px rgba(0, 0, 0, 0.1)',
|
|
25
|
-
borderRadius: '16px 16px 0 0',
|
|
26
|
-
overflow: 'hidden'
|
|
27
|
-
}}
|
|
28
|
-
{...props}
|
|
29
|
-
>
|
|
46
|
+
<>
|
|
30
47
|
<style>{`
|
|
31
48
|
.nav-point {
|
|
32
|
-
border-radius:
|
|
49
|
+
border-radius: ${BORDER_RADIUS_TOP} ${BORDER_RADIUS_TOP} 0 0 !important;
|
|
33
50
|
overflow: hidden !important;
|
|
51
|
+
min-height: ${NAV_HEIGHT} !important;
|
|
52
|
+
height: ${NAV_HEIGHT} !important;
|
|
53
|
+
}
|
|
54
|
+
/* Mostrar NavPoint de 0px a 1024px */
|
|
55
|
+
@media (max-width: ${BREAKPOINT_MOBILE_MAX}) {
|
|
56
|
+
.nav-point {
|
|
57
|
+
display: block !important;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/* Ocultar NavPoint desde 1025px en adelante */
|
|
61
|
+
@media (min-width: ${BREAKPOINT_DESKTOP_MIN}) {
|
|
62
|
+
.nav-point {
|
|
63
|
+
display: none !important;
|
|
64
|
+
}
|
|
34
65
|
}
|
|
35
66
|
.nav-point > div {
|
|
36
67
|
overflow: hidden;
|
|
68
|
+
height: 100%;
|
|
69
|
+
}
|
|
70
|
+
.nav-point-item {
|
|
71
|
+
min-width: 0;
|
|
72
|
+
min-height: ${NAV_HEIGHT};
|
|
73
|
+
height: 100%;
|
|
37
74
|
}
|
|
38
75
|
.nav-point-text {
|
|
39
|
-
display: block;
|
|
40
|
-
|
|
76
|
+
display: block !important;
|
|
77
|
+
visibility: visible !important;
|
|
78
|
+
opacity: 1 !important;
|
|
79
|
+
max-height: none !important;
|
|
41
80
|
overflow: hidden;
|
|
42
81
|
white-space: nowrap !important;
|
|
43
82
|
text-overflow: ellipsis;
|
|
44
83
|
width: 100%;
|
|
45
84
|
text-align: center;
|
|
46
85
|
}
|
|
47
|
-
.nav-point-item {
|
|
48
|
-
min-width: 0;
|
|
49
|
-
}
|
|
50
|
-
/* Ocultar textos solo cuando hay muchos items (5+) y pantalla pequeña para evitar desorden */
|
|
51
|
-
@media (max-width: 480px) {
|
|
52
|
-
.nav-point.compressed .nav-point-text {
|
|
53
|
-
display: none !important;
|
|
54
|
-
max-height: 0;
|
|
55
|
-
opacity: 0;
|
|
56
|
-
}
|
|
57
|
-
.nav-point.compressed .nav-point-item {
|
|
58
|
-
padding-left: 0.5rem !important;
|
|
59
|
-
padding-right: 0.5rem !important;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
/* Ocultar textos solo en pantallas muy pequeñas (< 320px) donde definitivamente no caben */
|
|
63
|
-
@media (max-width: 320px) {
|
|
64
|
-
.nav-point-text {
|
|
65
|
-
display: none !important;
|
|
66
|
-
max-height: 0;
|
|
67
|
-
opacity: 0;
|
|
68
|
-
}
|
|
69
|
-
.nav-point-item {
|
|
70
|
-
padding-left: 0.5rem !important;
|
|
71
|
-
padding-right: 0.5rem !important;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
86
|
`}</style>
|
|
75
|
-
<
|
|
87
|
+
<nav
|
|
88
|
+
className={`fixed bottom-0 left-0 right-0 z-50 bg-white rounded-t-lg shadow-md nav-point ${className}`}
|
|
89
|
+
style={{
|
|
90
|
+
boxShadow: `0 -2px 8px ${SHADOW_COLOR}`,
|
|
91
|
+
borderRadius: `${BORDER_RADIUS_TOP} ${BORDER_RADIUS_TOP} 0 0`,
|
|
92
|
+
overflow: 'hidden',
|
|
93
|
+
minHeight: NAV_HEIGHT,
|
|
94
|
+
height: NAV_HEIGHT,
|
|
95
|
+
}}
|
|
96
|
+
{...props}
|
|
97
|
+
>
|
|
98
|
+
<div className="flex items-stretch h-full" style={{ overflow: 'hidden' }}>
|
|
76
99
|
{items.map((item, index) => {
|
|
77
100
|
const isActive = activeItem === item.id;
|
|
78
|
-
|
|
79
|
-
const isLast = index === items.length - 1;
|
|
101
|
+
|
|
80
102
|
return (
|
|
81
103
|
<button
|
|
82
104
|
key={item.id}
|
|
83
|
-
onClick={() =>
|
|
84
|
-
className="flex flex-col items-center justify-center px-4 py-3 transition-
|
|
105
|
+
onClick={() => handleItemClick(item.id)}
|
|
106
|
+
className="flex flex-col items-center justify-center px-4 py-3 transition-colors duration-200 cursor-pointer flex-1 relative nav-point-item"
|
|
85
107
|
style={{
|
|
86
|
-
backgroundColor: isActive ?
|
|
87
|
-
borderRadius: isActive
|
|
88
|
-
? (isFirst ? '16px 0 0 0' : isLast ? '0 16px 0 0' : '0')
|
|
89
|
-
: '0',
|
|
108
|
+
backgroundColor: isActive ? BACKGROUND_COLOR_ACTIVE : 'transparent',
|
|
109
|
+
borderRadius: getBorderRadius(isActive),
|
|
90
110
|
}}
|
|
91
111
|
>
|
|
92
112
|
<Icon
|
|
93
113
|
name={item.icon}
|
|
94
114
|
variant="24-outline"
|
|
95
|
-
size={
|
|
96
|
-
style={{ color: isActive ?
|
|
115
|
+
size={ICON_SIZE}
|
|
116
|
+
style={{ color: isActive ? ICON_COLOR_ACTIVE : ICON_COLOR_INACTIVE }}
|
|
97
117
|
/>
|
|
98
118
|
<Typography
|
|
99
119
|
variant="body-sm"
|
|
100
120
|
className="mt-1 font-medium nav-point-text"
|
|
101
121
|
style={{
|
|
102
|
-
color: isActive ?
|
|
122
|
+
color: isActive ? TEXT_COLOR_ACTIVE : TEXT_COLOR_INACTIVE,
|
|
103
123
|
whiteSpace: 'nowrap',
|
|
104
124
|
overflow: 'hidden',
|
|
105
125
|
textOverflow: 'ellipsis',
|
|
@@ -111,8 +131,9 @@ export const NavPoint = ({
|
|
|
111
131
|
</button>
|
|
112
132
|
);
|
|
113
133
|
})}
|
|
114
|
-
|
|
115
|
-
|
|
134
|
+
</div>
|
|
135
|
+
</nav>
|
|
136
|
+
</>
|
|
116
137
|
);
|
|
117
138
|
};
|
|
118
139
|
|
|
@@ -170,7 +170,6 @@ export const SaludoConFechaDashboard = ({
|
|
|
170
170
|
// Responsive: ocupar el ancho disponible sin generar scroll horizontal,
|
|
171
171
|
// manteniendo el ancho Figma como máximo.
|
|
172
172
|
width: '100%',
|
|
173
|
-
maxWidth: '1250px',
|
|
174
173
|
minHeight: '74px',
|
|
175
174
|
gap: '24px',
|
|
176
175
|
opacity: 1,
|