anima-ds-nucleus 1.0.22 → 1.0.24
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.cjs.js +87 -83
- package/dist/anima-ds.esm.js +1509 -1200
- package/package.json +1 -1
- package/src/components/DataDisplay/Card/CardError.jsx +0 -1
- package/src/components/DataDisplay/Card/CardVacia.jsx +0 -1
- package/src/components/Layout/Header/HeaderCore.jsx +4 -4
- package/src/components/Layout/Header/HeaderPoint.jsx +6 -5
- package/src/components/Layout/NavPoint/NavPoint.jsx +5 -4
- package/src/components/Layout/SaludoConFechaDashboard/SaludoConFechaDashboard.jsx +3 -1
- package/src/components/Layout/Sidebar/SidebarCore.jsx +312 -3
package/package.json
CHANGED
|
@@ -160,7 +160,7 @@ export const HeaderCore = ({
|
|
|
160
160
|
border-color: #3b82f6 !important;
|
|
161
161
|
box-shadow: 0 0 0 1px #3b82f6;
|
|
162
162
|
}
|
|
163
|
-
@media (max-width:
|
|
163
|
+
@media (max-width: 1365px) {
|
|
164
164
|
.header-mobile-layout {
|
|
165
165
|
display: block;
|
|
166
166
|
}
|
|
@@ -187,7 +187,7 @@ export const HeaderCore = ({
|
|
|
187
187
|
width: 36px !important;
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
@media (min-width:
|
|
190
|
+
@media (min-width: 1366px) {
|
|
191
191
|
.header-mobile-layout {
|
|
192
192
|
display: none;
|
|
193
193
|
}
|
|
@@ -195,7 +195,7 @@ export const HeaderCore = ({
|
|
|
195
195
|
`}</style>
|
|
196
196
|
|
|
197
197
|
<div className="w-full" style={{ paddingLeft: '4px', paddingRight: '4px' }}>
|
|
198
|
-
{/* Layout Desktop (más de
|
|
198
|
+
{/* Layout Desktop (más de 1365px) */}
|
|
199
199
|
<div
|
|
200
200
|
className={`header-desktop-layout flex items-center justify-between h-16 ${desktopLayoutClassName}`}
|
|
201
201
|
style={desktopLayoutStyle}
|
|
@@ -373,7 +373,7 @@ export const HeaderCore = ({
|
|
|
373
373
|
</div>
|
|
374
374
|
</div>
|
|
375
375
|
|
|
376
|
-
{/* Layout Mobile (
|
|
376
|
+
{/* Layout Mobile (1365px o menos) */}
|
|
377
377
|
<div
|
|
378
378
|
className={`header-mobile-layout ${mobileHeaderClassName}`}
|
|
379
379
|
style={{ background: mobileBackgroundColor, ...(mobileHeaderStyle || {}) }}
|
|
@@ -5,7 +5,7 @@ import { Typography } from '../../Atoms/Typography/Typography';
|
|
|
5
5
|
import { SidebarPointMobile } from '../Sidebar/SidebarPoint';
|
|
6
6
|
|
|
7
7
|
// Constantes de diseño reutilizables
|
|
8
|
-
const HEADER_HEIGHT = '
|
|
8
|
+
const HEADER_HEIGHT = '80px';
|
|
9
9
|
const SEARCH_INPUT_HEIGHT = '40px';
|
|
10
10
|
const SEARCH_ICON_SIZE = '40px';
|
|
11
11
|
const NOTIFICATION_BADGE_COLOR = '#6D3856';
|
|
@@ -21,8 +21,9 @@ const FONT_SIZE_BASE = '14px';
|
|
|
21
21
|
const LINE_HEIGHT_BASE = '20px';
|
|
22
22
|
|
|
23
23
|
// Constantes de breakpoints
|
|
24
|
-
|
|
25
|
-
const
|
|
24
|
+
// SM: ≤ 480px, MD: 481px - 1364px, BASE: 1365px - 1440px, LG: ≥ 1441px
|
|
25
|
+
const BREAKPOINT_MOBILE_MAX = '1364px'; // Mobile hasta 1364px (SM y MD)
|
|
26
|
+
const BREAKPOINT_DESKTOP_MIN = '1365px'; // Desktop desde 1365px (BASE y LG)
|
|
26
27
|
const BREAKPOINT_TABLET_MAX = '700px';
|
|
27
28
|
|
|
28
29
|
// Constantes de valores por defecto
|
|
@@ -280,8 +281,8 @@ export const HeaderPoint = ({
|
|
|
280
281
|
{...props}
|
|
281
282
|
>
|
|
282
283
|
<div className="w-full" style={{ paddingLeft: '4px', paddingRight: '4px' }}>
|
|
283
|
-
{/* Layout Desktop (más de
|
|
284
|
-
<div className="header-desktop-layout flex items-center justify-between
|
|
284
|
+
{/* Layout Desktop (más de 1364px) */}
|
|
285
|
+
<div className="header-desktop-layout flex items-center justify-between" style={{ height: HEADER_HEIGHT, padding: '16px' }}>
|
|
285
286
|
{/* Barra de búsqueda con icono a la derecha */}
|
|
286
287
|
<div className="header-search-wrapper" style={{ marginRight: '16px' }}>
|
|
287
288
|
<form onSubmit={handleSearchSubmit} className="header-search-form flex items-center w-full">
|
|
@@ -13,8 +13,9 @@ const BORDER_RADIUS_TOP = '16px';
|
|
|
13
13
|
const SHADOW_COLOR = 'rgba(0, 0, 0, 0.1)';
|
|
14
14
|
|
|
15
15
|
// Constantes de breakpoints
|
|
16
|
-
|
|
17
|
-
const
|
|
16
|
+
// SM: ≤ 480px, MD: 481px - 1364px, BASE: 1365px - 1440px, LG: ≥ 1441px
|
|
17
|
+
const BREAKPOINT_MOBILE_MAX = '1364px'; // Visible en SM y MD
|
|
18
|
+
const BREAKPOINT_DESKTOP_MIN = '1365px'; // Oculto en BASE y LG
|
|
18
19
|
|
|
19
20
|
const DEFAULT_ITEMS = [
|
|
20
21
|
{ id: 'inicio', label: 'Inicio', icon: 'Squares2X2Icon' },
|
|
@@ -51,13 +52,13 @@ export const NavPoint = ({
|
|
|
51
52
|
min-height: ${NAV_HEIGHT} !important;
|
|
52
53
|
height: ${NAV_HEIGHT} !important;
|
|
53
54
|
}
|
|
54
|
-
/* Mostrar NavPoint
|
|
55
|
+
/* Mostrar NavPoint en SM (≤ 480px) y MD (481px - 1364px) */
|
|
55
56
|
@media (max-width: ${BREAKPOINT_MOBILE_MAX}) {
|
|
56
57
|
.nav-point {
|
|
57
58
|
display: block !important;
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
|
-
/* Ocultar NavPoint
|
|
61
|
+
/* Ocultar NavPoint en BASE (1365px - 1440px) y LG (≥ 1441px) */
|
|
61
62
|
@media (min-width: ${BREAKPOINT_DESKTOP_MIN}) {
|
|
62
63
|
.nav-point {
|
|
63
64
|
display: none !important;
|
|
@@ -32,6 +32,7 @@ export const SaludoConFechaDashboard = ({
|
|
|
32
32
|
saludo = 'Hola',
|
|
33
33
|
date = new Date(),
|
|
34
34
|
showDate = true,
|
|
35
|
+
showSaludoFecha = true, // Prop para ocultar saludo y fecha manteniendo el alto
|
|
35
36
|
|
|
36
37
|
// Breadcrumb / inicio (arriba del saludo)
|
|
37
38
|
showInicio = true,
|
|
@@ -41,7 +42,7 @@ export const SaludoConFechaDashboard = ({
|
|
|
41
42
|
inicioIconVariant = '20-solid', // heroicons "mini"
|
|
42
43
|
inicioIconSize = 16,
|
|
43
44
|
// Responsive behavior (<= breakpoint): centrar saludo y ocultar el resto
|
|
44
|
-
responsiveBreakpointPx =
|
|
45
|
+
responsiveBreakpointPx = 1365,
|
|
45
46
|
responsiveHideInicio = true,
|
|
46
47
|
responsiveHideDate = true,
|
|
47
48
|
responsiveCenterGreeting = true,
|
|
@@ -178,6 +179,7 @@ export const SaludoConFechaDashboard = ({
|
|
|
178
179
|
paddingBottom: '16px',
|
|
179
180
|
paddingLeft: '8px',
|
|
180
181
|
boxSizing: 'border-box',
|
|
182
|
+
visibility: showSaludoFecha ? 'visible' : 'hidden',
|
|
181
183
|
...(saludoFechaContainerStyle || {}),
|
|
182
184
|
}}
|
|
183
185
|
>
|
|
@@ -46,6 +46,12 @@ const SidebarCoreMobile = ({
|
|
|
46
46
|
// Mobile: íconos
|
|
47
47
|
mobileIconSize = 24,
|
|
48
48
|
mobileIconStyle,
|
|
49
|
+
// Sección de Configuración
|
|
50
|
+
configSectionLabel = 'Configuración',
|
|
51
|
+
configSectionIcon = 'Cog6ToothIcon',
|
|
52
|
+
configSectionId = 'configuracion',
|
|
53
|
+
onConfigClick,
|
|
54
|
+
configBadge,
|
|
49
55
|
isOpen: controlledIsOpen,
|
|
50
56
|
onClose: controlledOnClose,
|
|
51
57
|
className = '',
|
|
@@ -385,6 +391,95 @@ const SidebarCoreMobile = ({
|
|
|
385
391
|
))}
|
|
386
392
|
</div>
|
|
387
393
|
|
|
394
|
+
{/* Sección de Configuración */}
|
|
395
|
+
<div
|
|
396
|
+
className="flex-shrink-0 px-4"
|
|
397
|
+
style={{
|
|
398
|
+
paddingTop: '24px',
|
|
399
|
+
paddingBottom: '40px',
|
|
400
|
+
position: 'relative',
|
|
401
|
+
}}
|
|
402
|
+
>
|
|
403
|
+
{/* Borde superior centrado */}
|
|
404
|
+
<div
|
|
405
|
+
style={{
|
|
406
|
+
position: 'absolute',
|
|
407
|
+
top: '24px',
|
|
408
|
+
left: '16px',
|
|
409
|
+
right: '16px',
|
|
410
|
+
height: '1px',
|
|
411
|
+
backgroundColor: '#E5E5E5',
|
|
412
|
+
}}
|
|
413
|
+
/>
|
|
414
|
+
<button
|
|
415
|
+
onClick={() => {
|
|
416
|
+
if (enableOptimisticActiveItem) {
|
|
417
|
+
setOptimisticActiveItem(configSectionId);
|
|
418
|
+
}
|
|
419
|
+
onConfigClick && onConfigClick(configSectionId);
|
|
420
|
+
if (controlledOnClose) {
|
|
421
|
+
if (closeOnItemClickAnimationFrame) {
|
|
422
|
+
requestAnimationFrame(() => controlledOnClose());
|
|
423
|
+
} else {
|
|
424
|
+
controlledOnClose();
|
|
425
|
+
}
|
|
426
|
+
} else {
|
|
427
|
+
toggleMobileMenu();
|
|
428
|
+
}
|
|
429
|
+
}}
|
|
430
|
+
className={`w-full flex items-center cursor-pointer px-4 justify-between py-2.5 rounded-lg transition-all duration-200 ${
|
|
431
|
+
effectiveActiveItem === configSectionId
|
|
432
|
+
? ''
|
|
433
|
+
: 'color-gray-700 hover:bg-gray-100'
|
|
434
|
+
}`}
|
|
435
|
+
style={
|
|
436
|
+
effectiveActiveItem === configSectionId
|
|
437
|
+
? { backgroundColor: '#2D5C63' }
|
|
438
|
+
: {}
|
|
439
|
+
}
|
|
440
|
+
>
|
|
441
|
+
<div className="flex items-center">
|
|
442
|
+
<Icon
|
|
443
|
+
name={configSectionIcon}
|
|
444
|
+
variant="24-outline"
|
|
445
|
+
size={mobileIconSize}
|
|
446
|
+
className={`mr-3 ${
|
|
447
|
+
effectiveActiveItem === configSectionId ? 'color-white' : 'color-gray-700'
|
|
448
|
+
}`}
|
|
449
|
+
style={{
|
|
450
|
+
width: `${mobileIconSize}px`,
|
|
451
|
+
height: `${mobileIconSize}px`,
|
|
452
|
+
opacity: 1,
|
|
453
|
+
transform: 'rotate(0deg)',
|
|
454
|
+
...(mobileIconStyle || {}),
|
|
455
|
+
}}
|
|
456
|
+
/>
|
|
457
|
+
<Typography
|
|
458
|
+
variant="body-md"
|
|
459
|
+
weight={effectiveActiveItem === configSectionId ? mobileItemLabelWeightActive : mobileItemLabelWeightInactive}
|
|
460
|
+
className={effectiveActiveItem === configSectionId ? 'color-white' : 'color-gray-700'}
|
|
461
|
+
style={{ fontSize: mobileItemLabelFontSize }}
|
|
462
|
+
>
|
|
463
|
+
{configSectionLabel}
|
|
464
|
+
</Typography>
|
|
465
|
+
</div>
|
|
466
|
+
{configBadge !== undefined && configBadge > 0 && (
|
|
467
|
+
<span
|
|
468
|
+
className="px-2 py-0.5 min-w-[20px] h-5
|
|
469
|
+
rounded-full flex items-center justify-center
|
|
470
|
+
text-body-sm font-medium"
|
|
471
|
+
style={{
|
|
472
|
+
backgroundColor: effectiveActiveItem === configSectionId ? '#ffffff' : '#6D3856',
|
|
473
|
+
color: effectiveActiveItem === configSectionId ? '#6D3856' : '#ffffff',
|
|
474
|
+
borderRadius: '12px'
|
|
475
|
+
}}
|
|
476
|
+
>
|
|
477
|
+
{configBadge > 9 ? '9+' : configBadge}
|
|
478
|
+
</span>
|
|
479
|
+
)}
|
|
480
|
+
</button>
|
|
481
|
+
</div>
|
|
482
|
+
|
|
388
483
|
{/* Footer con texto configurable */}
|
|
389
484
|
{footerText && (
|
|
390
485
|
<div className="px-4 pb-4 flex-shrink-0">
|
|
@@ -525,6 +620,12 @@ export const SidebarCore = ({
|
|
|
525
620
|
coreContainerStyle, // Estilos personalizados para el contenedor de LogoHexa y "Core" (solo mobile)
|
|
526
621
|
coreTextStyle, // Estilos personalizados para el texto "Core" (solo mobile)
|
|
527
622
|
fluidWidth = false, // Si es true, el root respeta el ancho del contenedor (grid/flex) en lugar de usar anchos fijos
|
|
623
|
+
// Sección de Configuración
|
|
624
|
+
configSectionLabel = 'Configuración',
|
|
625
|
+
configSectionIcon = 'Cog6ToothIcon',
|
|
626
|
+
configSectionId = 'configuracion',
|
|
627
|
+
onConfigClick,
|
|
628
|
+
configBadge,
|
|
528
629
|
className = '',
|
|
529
630
|
...props
|
|
530
631
|
}) => {
|
|
@@ -549,7 +650,7 @@ export const SidebarCore = ({
|
|
|
549
650
|
// Detectar tamaño de pantalla
|
|
550
651
|
useEffect(() => {
|
|
551
652
|
const checkMobile = () => {
|
|
552
|
-
setIsMobile(window.innerWidth <=
|
|
653
|
+
setIsMobile(window.innerWidth <= 1365);
|
|
553
654
|
};
|
|
554
655
|
|
|
555
656
|
// Verificar al montar
|
|
@@ -604,6 +705,11 @@ export const SidebarCore = ({
|
|
|
604
705
|
footerCollapsedContent={footerCollapsedContent}
|
|
605
706
|
coreContainerStyle={coreContainerStyle}
|
|
606
707
|
coreTextStyle={coreTextStyle}
|
|
708
|
+
configSectionLabel={configSectionLabel}
|
|
709
|
+
configSectionIcon={configSectionIcon}
|
|
710
|
+
configSectionId={configSectionId}
|
|
711
|
+
onConfigClick={onConfigClick}
|
|
712
|
+
configBadge={configBadge}
|
|
607
713
|
className={className}
|
|
608
714
|
{...props}
|
|
609
715
|
/>
|
|
@@ -1175,6 +1281,209 @@ export const SidebarCore = ({
|
|
|
1175
1281
|
</div>
|
|
1176
1282
|
</div>
|
|
1177
1283
|
|
|
1284
|
+
{/* Sección de Configuración - Desktop expandido */}
|
|
1285
|
+
{!isCollapsed && (
|
|
1286
|
+
<div
|
|
1287
|
+
className="flex-shrink-0 px-4"
|
|
1288
|
+
style={{
|
|
1289
|
+
paddingTop: '24px',
|
|
1290
|
+
paddingBottom: '40px',
|
|
1291
|
+
position: 'relative',
|
|
1292
|
+
}}
|
|
1293
|
+
>
|
|
1294
|
+
{/* Borde superior centrado */}
|
|
1295
|
+
<div
|
|
1296
|
+
style={{
|
|
1297
|
+
position: 'absolute',
|
|
1298
|
+
top: '24px',
|
|
1299
|
+
left: '16px',
|
|
1300
|
+
right: '16px',
|
|
1301
|
+
height: '1px',
|
|
1302
|
+
backgroundColor: '#E5E5E5',
|
|
1303
|
+
}}
|
|
1304
|
+
/>
|
|
1305
|
+
<button
|
|
1306
|
+
onClick={() => onConfigClick && onConfigClick(configSectionId)}
|
|
1307
|
+
className={`w-full flex items-center cursor-pointer px-4 justify-between py-2.5 rounded-lg transition-all duration-200 ${
|
|
1308
|
+
activeItem === configSectionId
|
|
1309
|
+
? ''
|
|
1310
|
+
: 'color-gray-700 hover:bg-gray-100'
|
|
1311
|
+
}`}
|
|
1312
|
+
style={
|
|
1313
|
+
activeItem === configSectionId
|
|
1314
|
+
? { backgroundColor: '#2D5C63' }
|
|
1315
|
+
: {}
|
|
1316
|
+
}
|
|
1317
|
+
>
|
|
1318
|
+
<div className="flex items-center">
|
|
1319
|
+
<Icon
|
|
1320
|
+
name={configSectionIcon}
|
|
1321
|
+
variant="24-outline"
|
|
1322
|
+
size={desktopNavIconGlyphSize}
|
|
1323
|
+
className={`mr-3 ${
|
|
1324
|
+
activeItem === configSectionId ? 'color-white' : 'color-gray-700'
|
|
1325
|
+
}`}
|
|
1326
|
+
/>
|
|
1327
|
+
<Typography
|
|
1328
|
+
variant="body-lg"
|
|
1329
|
+
weight={activeItem === configSectionId ? desktopItemLabelWeightActive : desktopItemLabelWeightInactive}
|
|
1330
|
+
className={`${
|
|
1331
|
+
activeItem === configSectionId ? 'color-white' : 'color-gray-700'
|
|
1332
|
+
} min-w-0`}
|
|
1333
|
+
style={{
|
|
1334
|
+
fontSize: desktopItemLabelFontSize,
|
|
1335
|
+
overflow: 'hidden',
|
|
1336
|
+
textOverflow: 'ellipsis',
|
|
1337
|
+
whiteSpace: 'nowrap',
|
|
1338
|
+
}}
|
|
1339
|
+
>
|
|
1340
|
+
{configSectionLabel}
|
|
1341
|
+
</Typography>
|
|
1342
|
+
</div>
|
|
1343
|
+
{configBadge !== undefined && configBadge > 0 && (
|
|
1344
|
+
<span
|
|
1345
|
+
className="px-2 py-0.5 min-w-[20px] h-5
|
|
1346
|
+
rounded-full flex items-center justify-center
|
|
1347
|
+
text-body-sm font-medium"
|
|
1348
|
+
style={{
|
|
1349
|
+
backgroundColor: activeItem === configSectionId ? '#ffffff' : '#6D3856',
|
|
1350
|
+
color: activeItem === configSectionId ? '#6D3856' : '#ffffff',
|
|
1351
|
+
borderRadius: '12px'
|
|
1352
|
+
}}
|
|
1353
|
+
>
|
|
1354
|
+
{configBadge > 9 ? '9+' : configBadge}
|
|
1355
|
+
</span>
|
|
1356
|
+
)}
|
|
1357
|
+
</button>
|
|
1358
|
+
</div>
|
|
1359
|
+
)}
|
|
1360
|
+
|
|
1361
|
+
{/* Sección de Configuración - Desktop colapsado */}
|
|
1362
|
+
{isCollapsed && (
|
|
1363
|
+
<div
|
|
1364
|
+
className="flex-shrink-0 px-2"
|
|
1365
|
+
style={{
|
|
1366
|
+
paddingTop: '24px',
|
|
1367
|
+
paddingBottom: '40px',
|
|
1368
|
+
position: 'relative',
|
|
1369
|
+
}}
|
|
1370
|
+
>
|
|
1371
|
+
{/* Borde superior centrado */}
|
|
1372
|
+
<div
|
|
1373
|
+
style={{
|
|
1374
|
+
position: 'absolute',
|
|
1375
|
+
top: '24px',
|
|
1376
|
+
left: '8px',
|
|
1377
|
+
right: '8px',
|
|
1378
|
+
height: '1px',
|
|
1379
|
+
backgroundColor: '#E5E5E5',
|
|
1380
|
+
}}
|
|
1381
|
+
/>
|
|
1382
|
+
<div
|
|
1383
|
+
className={desktopCollapsedItemWrapperClassName}
|
|
1384
|
+
style={{
|
|
1385
|
+
...collapsedItemWrapperDefaults,
|
|
1386
|
+
backgroundColor:
|
|
1387
|
+
activeItem === configSectionId ? desktopCollapsedItemActiveBackgroundColor : 'transparent',
|
|
1388
|
+
...(desktopCollapsedItemWrapperStyle || {}),
|
|
1389
|
+
}}
|
|
1390
|
+
title={configSectionLabel}
|
|
1391
|
+
>
|
|
1392
|
+
<button
|
|
1393
|
+
onClick={() => onConfigClick && onConfigClick(configSectionId)}
|
|
1394
|
+
className="flex items-center justify-center transition-all duration-200"
|
|
1395
|
+
style={{
|
|
1396
|
+
width: '100%',
|
|
1397
|
+
height: '100%',
|
|
1398
|
+
backgroundColor: 'transparent',
|
|
1399
|
+
borderRadius: '8px',
|
|
1400
|
+
}}
|
|
1401
|
+
title={configSectionLabel}
|
|
1402
|
+
>
|
|
1403
|
+
<div
|
|
1404
|
+
className="flex items-center"
|
|
1405
|
+
style={{
|
|
1406
|
+
justifyContent: 'center',
|
|
1407
|
+
columnGap: `${desktopCollapsedOverlapColumnGapPx}px`,
|
|
1408
|
+
width: '100%',
|
|
1409
|
+
}}
|
|
1410
|
+
>
|
|
1411
|
+
<div
|
|
1412
|
+
style={{
|
|
1413
|
+
width: `${desktopNavIconSize}px`,
|
|
1414
|
+
height: `${desktopNavIconSize}px`,
|
|
1415
|
+
opacity: 1,
|
|
1416
|
+
transform: 'rotate(0deg)',
|
|
1417
|
+
display: 'flex',
|
|
1418
|
+
alignItems: 'center',
|
|
1419
|
+
justifyContent: 'center',
|
|
1420
|
+
marginLeft:
|
|
1421
|
+
desktopCollapsedOverlapEnabled &&
|
|
1422
|
+
configBadge !== undefined &&
|
|
1423
|
+
configBadge > 0
|
|
1424
|
+
? `${desktopCollapsedOverlapIconMarginLeftPx}px`
|
|
1425
|
+
: undefined,
|
|
1426
|
+
...(desktopCollapsedIconWrapperStyle || {}),
|
|
1427
|
+
}}
|
|
1428
|
+
>
|
|
1429
|
+
<div
|
|
1430
|
+
style={{
|
|
1431
|
+
width: '24px',
|
|
1432
|
+
height: '24px',
|
|
1433
|
+
opacity: 1,
|
|
1434
|
+
transform: 'rotate(0deg)',
|
|
1435
|
+
display: 'flex',
|
|
1436
|
+
alignItems: 'center',
|
|
1437
|
+
justifyContent: 'center',
|
|
1438
|
+
...(desktopCollapsedIconInnerStyle || {}),
|
|
1439
|
+
}}
|
|
1440
|
+
>
|
|
1441
|
+
<Icon
|
|
1442
|
+
name={configSectionIcon}
|
|
1443
|
+
variant="24-outline"
|
|
1444
|
+
size={desktopNavIconGlyphSize}
|
|
1445
|
+
className={activeItem === configSectionId ? 'color-white' : 'color-gray-700'}
|
|
1446
|
+
style={{
|
|
1447
|
+
width: `${desktopNavIconGlyphSize}px`,
|
|
1448
|
+
height: `${desktopNavIconGlyphSize}px`,
|
|
1449
|
+
opacity: 1,
|
|
1450
|
+
transform: 'rotate(0deg)',
|
|
1451
|
+
...(desktopNavIconStyle || {}),
|
|
1452
|
+
}}
|
|
1453
|
+
/>
|
|
1454
|
+
</div>
|
|
1455
|
+
</div>
|
|
1456
|
+
{configBadge !== undefined && configBadge > 0 && (
|
|
1457
|
+
<span
|
|
1458
|
+
className={`flex items-center justify-center text-body-sm font-medium ${desktopCollapsedBadgeClassName}`}
|
|
1459
|
+
style={{
|
|
1460
|
+
backgroundColor: activeItem === configSectionId ? '#ffffff' : '#6D3856',
|
|
1461
|
+
color: activeItem === configSectionId ? '#6D3856' : '#ffffff',
|
|
1462
|
+
width: desktopCollapsedBadgeWidth,
|
|
1463
|
+
height: desktopCollapsedBadgeHeight,
|
|
1464
|
+
paddingTop: '4px',
|
|
1465
|
+
paddingRight: '6px',
|
|
1466
|
+
paddingBottom: '4px',
|
|
1467
|
+
paddingLeft: '6px',
|
|
1468
|
+
borderRadius: '16px',
|
|
1469
|
+
opacity: 1,
|
|
1470
|
+
transform: 'rotate(0deg)',
|
|
1471
|
+
marginLeft: desktopCollapsedOverlapEnabled
|
|
1472
|
+
? `${desktopCollapsedOverlapBadgeMarginLeftPx}px`
|
|
1473
|
+
: undefined,
|
|
1474
|
+
boxSizing: 'border-box',
|
|
1475
|
+
...(desktopCollapsedBadgeStyle || {}),
|
|
1476
|
+
}}
|
|
1477
|
+
>
|
|
1478
|
+
{configBadge > 9 ? '9+' : configBadge}
|
|
1479
|
+
</span>
|
|
1480
|
+
)}
|
|
1481
|
+
</div>
|
|
1482
|
+
</button>
|
|
1483
|
+
</div>
|
|
1484
|
+
</div>
|
|
1485
|
+
)}
|
|
1486
|
+
|
|
1178
1487
|
{/* Footer con texto configurable - cuando está expandido */}
|
|
1179
1488
|
{footerText && !isCollapsed && (
|
|
1180
1489
|
<div className="px-4 pb-4 flex-shrink-0">
|
|
@@ -1292,8 +1601,8 @@ export const SidebarCore = ({
|
|
|
1292
1601
|
lineHeight: '100%',
|
|
1293
1602
|
letterSpacing: '0%',
|
|
1294
1603
|
textAlign: 'center',
|
|
1295
|
-
marginLeft: effectiveFooterCollapsedContent.icon ? '4px' : '0'
|
|
1296
|
-
|
|
1604
|
+
marginLeft: effectiveFooterCollapsedContent.icon ? '4px' : '0',
|
|
1605
|
+
...(desktopCollapsedFooterTextStyle || {})
|
|
1297
1606
|
}}
|
|
1298
1607
|
>
|
|
1299
1608
|
{effectiveFooterCollapsedContent.text}
|