anima-ds-nucleus 1.0.7 → 1.0.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anima-ds-nucleus",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Anima Design System - A comprehensive React component library",
5
5
  "author": "Nucleus Labs <ipvasallo@nucleus.com.ar>",
6
6
  "license": "UNLICENSED",
@@ -33,7 +33,10 @@ export const HeaderPoint = ({
33
33
 
34
34
  return (
35
35
  <header
36
- className={`bg-white border-b border-gray-200 header-point-mobile ${className}`}
36
+ className={`bg-white header-point-mobile ${className}`}
37
+ style={{
38
+ ...(props.style || {}),
39
+ }}
37
40
  {...props}
38
41
  >
39
42
  <style>{`
@@ -56,35 +59,70 @@ export const HeaderPoint = ({
56
59
  box-shadow: 0 0 0 1px #3b82f6;
57
60
  }
58
61
  @media (max-width: 768px) {
59
- .header-point-mobile {
62
+ header.header-point-mobile,
63
+ .header-point-mobile,
64
+ header.bg-white.header-point-mobile {
60
65
  background-color: transparent !important;
66
+ background: transparent !important;
61
67
  border-bottom: none !important;
62
68
  }
69
+ header.header-point-mobile[style*="background"],
70
+ .header-point-mobile[style*="background"],
71
+ header.header-point-mobile[style*="backgroundColor"] {
72
+ background-color: transparent !important;
73
+ background: transparent !important;
74
+ }
63
75
  .header-mobile-layout {
64
- display: block;
65
- position: relative;
76
+ display: block !important;
77
+ position: relative !important;
66
78
  }
67
79
  .header-mobile-top-row {
68
- display: flex;
69
- align-items: center;
70
- justify-content: space-between;
71
- padding: 8px 4px;
72
- min-height: 48px;
80
+ display: flex !important;
81
+ align-items: center !important;
82
+ justify-content: space-between !important;
83
+ padding: 24px 24px 12px 24px !important;
84
+ min-height: 64px !important;
85
+ height: 64px !important;
86
+ }
87
+ .header-mobile-menu-button,
88
+ .header-mobile-notification-button {
89
+ display: flex !important;
90
+ align-items: center !important;
91
+ justify-content: center !important;
92
+ }
93
+ .header-mobile-point-text {
94
+ display: flex !important;
95
+ align-items: center !important;
73
96
  }
74
97
  .header-mobile-layout::after {
75
- content: '';
76
- position: absolute;
77
- top: 0;
78
- left: 0;
79
- right: 0;
80
- height: calc(48px + 16px + 4px + 20px);
81
- background-color: var(--color-main);
82
- z-index: -1;
83
- border-bottom: 1px solid var(--color-main-800);
98
+ content: '' !important;
99
+ position: absolute !important;
100
+ top: 0 !important;
101
+ left: 0 !important;
102
+ right: 0 !important;
103
+ width: 100% !important;
104
+ height: calc(64px + 12px + 20px) !important;
105
+ background-color: var(--color-main) !important;
106
+ background: var(--color-main) !important;
107
+ z-index: 0 !important;
108
+ border-bottom: 1px solid var(--color-main-800) !important;
109
+ pointer-events: none !important;
110
+ display: block !important;
111
+ visibility: visible !important;
112
+ opacity: 1 !important;
113
+ }
114
+ .header-mobile-top-row {
115
+ position: relative;
116
+ z-index: 2 !important;
117
+ }
118
+ .header-mobile-search-row {
119
+ position: relative;
120
+ z-index: 2 !important;
84
121
  }
85
122
  .header-mobile-search-row {
86
123
  display: block;
87
- padding: 4px 4px 8px 4px;
124
+ padding: 12px 24px 0 24px;
125
+ margin-top: -8px;
88
126
  }
89
127
  .header-desktop-layout {
90
128
  display: none !important;
@@ -95,7 +133,8 @@ export const HeaderPoint = ({
95
133
  padding-right: 8px !important;
96
134
  }
97
135
  .header-mobile-layout .header-search-icon-container {
98
- width: 36px !important;
136
+ width: 44px !important;
137
+ height: 44px !important;
99
138
  }
100
139
  .header-mobile-menu-icon {
101
140
  color: var(--color-neutrals-white) !important;
@@ -111,6 +150,9 @@ export const HeaderPoint = ({
111
150
  .header-mobile-layout {
112
151
  display: none;
113
152
  }
153
+ header.header-point-mobile {
154
+ border-bottom: none !important;
155
+ }
114
156
  }
115
157
  `}</style>
116
158
 
@@ -242,7 +284,7 @@ export const HeaderPoint = ({
242
284
  <div className="flex items-center">
243
285
  <button
244
286
  className="p-2 hover:bg-gray-100 rounded-lg transition-colors header-mobile-menu-button"
245
- style={{ cursor: 'pointer' }}
287
+ style={{ cursor: 'pointer', padding: '8px' }}
246
288
  aria-label="Menú"
247
289
  >
248
290
  <Icon
@@ -259,14 +301,17 @@ export const HeaderPoint = ({
259
301
  style={{
260
302
  position: 'absolute',
261
303
  left: '50%',
262
- transform: 'translateX(-50%)'
304
+ top: '54%',
305
+ transform: 'translate(-50%, -50%)',
306
+ display: 'flex',
307
+ alignItems: 'center'
263
308
  }}
264
309
  >
265
310
  <Typography
266
311
  variant="h6"
267
312
  className="header-mobile-point-text"
268
313
  style={{
269
- fontSize: '24px',
314
+ fontSize: '20px',
270
315
  fontFamily: 'IBM Plex Sans',
271
316
  fontWeight: 600,
272
317
  lineHeight: '1.2',
@@ -283,7 +328,7 @@ export const HeaderPoint = ({
283
328
  <button
284
329
  onClick={onNotificationClick}
285
330
  className="relative p-2 hover:bg-gray-100 rounded-lg transition-colors header-mobile-notification-button"
286
- style={{ cursor: 'pointer' }}
331
+ style={{ cursor: 'pointer', padding: '8px' }}
287
332
  aria-label="Notificaciones"
288
333
  >
289
334
  <Icon
@@ -319,10 +364,10 @@ export const HeaderPoint = ({
319
364
  value={searchValue}
320
365
  onChange={handleSearchChange}
321
366
  placeholder={searchPlaceholder}
322
- className="header-search-input flex-1 pl-3 pr-3 py-2 bg-white border border-gray-400 rounded-l-lg
367
+ className="header-search-input flex-1 pl-4 pr-4 py-2 bg-white border border-gray-400 rounded-l-lg
323
368
  focus:outline-none text-sm"
324
369
  style={{
325
- height: '40px',
370
+ height: '44px',
326
371
  borderRight: 'none',
327
372
  borderTopRightRadius: '0',
328
373
  borderBottomRightRadius: '0',
@@ -19,13 +19,22 @@ export const NavPoint = ({
19
19
 
20
20
  return (
21
21
  <nav
22
- className={`fixed bottom-0 left-0 right-0 z-50 md:hidden bg-white rounded-t-lg shadow-md overflow-hidden nav-point ${shouldCompress ? 'compressed' : ''} ${className}`}
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
23
  style={{
24
- boxShadow: '0 -2px 8px rgba(0, 0, 0, 0.1)'
24
+ boxShadow: '0 -2px 8px rgba(0, 0, 0, 0.1)',
25
+ borderRadius: '16px 16px 0 0',
26
+ overflow: 'hidden'
25
27
  }}
26
28
  {...props}
27
29
  >
28
30
  <style>{`
31
+ .nav-point {
32
+ border-radius: 16px 16px 0 0 !important;
33
+ overflow: hidden !important;
34
+ }
35
+ .nav-point > div {
36
+ overflow: hidden;
37
+ }
29
38
  .nav-point-text {
30
39
  display: block;
31
40
  transition: opacity 0.2s, max-height 0.2s;
@@ -63,7 +72,7 @@ export const NavPoint = ({
63
72
  }
64
73
  }
65
74
  `}</style>
66
- <div className="flex items-stretch">
75
+ <div className="flex items-stretch" style={{ overflow: 'hidden' }}>
67
76
  {items.map((item, index) => {
68
77
  const isActive = activeItem === item.id;
69
78
  const isFirst = index === 0;
@@ -50,55 +50,6 @@ export const SidebarPoint = ({
50
50
  {...props}
51
51
  >
52
52
  <nav className="h-full flex flex-col" style={{ overflow: 'hidden' }}>
53
- {/* Barra superior con HEXA Point */}
54
- {!isCollapsed && (
55
- <div className="p-4 border-b border-gray-200 flex-shrink-0">
56
- <button
57
- onClick={onCompanyClick}
58
- className="w-full bg-white rounded-lg px-3 py-2.5
59
- flex items-center justify-between hover:bg-gray-50 transition-colors"
60
- >
61
- <div className="flex items-center space-x-3">
62
- {/* Logo hexagonal */}
63
- {companyLogo ? (
64
- <img
65
- src={companyLogo}
66
- alt={companyName}
67
- className="w-8 h-8 rounded"
68
- />
69
- ) : (
70
- <LogoHexa width={36} height={40} />
71
- )}
72
- {/* Nombre de la empresa */}
73
- <Typography
74
- variant="body-md"
75
- className="color-gray-900 font-medium"
76
- >
77
- {companyName}
78
- </Typography>
79
- </div>
80
- </button>
81
- </div>
82
- )}
83
-
84
- {/* Botón de colapsar/expandir - Solo visible cuando está expandido */}
85
- {!isCollapsed && (
86
- <div className="px-4 pt-2 pb-2 flex justify-end flex-shrink-0">
87
- <button
88
- onClick={toggleCollapse}
89
- className="p-1.5 hover:bg-gray-100 rounded-lg transition-colors"
90
- aria-label="Colapsar sidebar"
91
- style={{ marginRight: '10px' }}
92
- >
93
- <Icon
94
- name="ChevronDoubleLeftIcon"
95
- variant="24-outline"
96
- size={20}
97
- className="color-teal"
98
- />
99
- </button>
100
- </div>
101
- )}
102
53
 
103
54
  {/* Header con logo de empresa cuando Client es true - entre botón colapsar y botón Inicio */}
104
55
  {Client && companyLogo && !isCollapsed && (
@@ -113,38 +64,7 @@ export const SidebarPoint = ({
113
64
  </div>
114
65
  )}
115
66
 
116
- {/* Logo cuando está colapsado */}
117
- {isCollapsed && (
118
- <div className="p-4 border-b border-gray-200 flex justify-center flex-shrink-0">
119
- {companyLogo ? (
120
- <img
121
- src={companyLogo}
122
- alt={companyName}
123
- className="w-8 h-8 rounded"
124
- />
125
- ) : (
126
- <LogoHexa width={36} height={40} />
127
- )}
128
- </div>
129
- )}
130
67
 
131
- {/* Botón para expandir - Solo visible cuando está colapsado */}
132
- {isCollapsed && (
133
- <div className="px-4 pt-2 pb-2 flex justify-center flex-shrink-0">
134
- <button
135
- onClick={toggleCollapse}
136
- className="p-1.5 hover:bg-gray-100 rounded-lg transition-colors"
137
- aria-label="Expandir sidebar"
138
- >
139
- <Icon
140
- name="ChevronDoubleRightIcon"
141
- variant="24-outline"
142
- size={20}
143
- className="color-teal"
144
- />
145
- </button>
146
- </div>
147
- )}
148
68
 
149
69
  {/* Contenido del sidebar - Wrapper para controlar el espacio */}
150
70
  <div className="flex-1 min-h-0 flex flex-col overflow-hidden">
@@ -166,31 +86,34 @@ export const SidebarPoint = ({
166
86
  : {}
167
87
  }
168
88
  >
169
- <Icon
170
- name="HomeIcon"
171
- variant="24-outline"
172
- size={20}
173
- className={`${isCollapsed ? '' : 'mr-3'} ${
174
- activeItem === 'inicio' ? 'color-white' : 'color-gray-700'
175
- }`}
176
- />
177
- {!isCollapsed && (
178
- <Typography
179
- variant="body-md"
180
- className={`font-medium ${
89
+ <div className="flex items-center">
90
+ <Icon
91
+ name="HomeIcon"
92
+ variant="24-outline"
93
+ size={20}
94
+ className={`${isCollapsed ? '' : 'mr-3'} ${
181
95
  activeItem === 'inicio' ? 'color-white' : 'color-gray-700'
182
96
  }`}
183
- >
184
- Inicio
185
- </Typography>
186
- )}
97
+ />
98
+ {!isCollapsed && (
99
+ <Typography
100
+ variant="body-md"
101
+ className={`font-medium ${
102
+ activeItem === 'inicio' ? 'color-white' : 'color-gray-700'
103
+ }`}
104
+ >
105
+ Inicio
106
+ </Typography>
107
+ )}
108
+ </div>
187
109
  {!isCollapsed && itemBadges['inicio'] !== undefined && itemBadges['inicio'] > 0 && (
188
110
  <span
189
111
  className="px-2 py-0.5 min-w-[20px] h-5
190
- text-white rounded-full flex items-center justify-center
112
+ rounded-full flex items-center justify-center
191
113
  text-body-sm font-medium"
192
114
  style={{
193
- backgroundColor: '#6D3856',
115
+ backgroundColor: activeItem === 'inicio' ? '#FFFFFF' : '#6D3856',
116
+ color: activeItem === 'inicio' ? '#6D3856' : '#FFFFFF',
194
117
  borderRadius: '12px'
195
118
  }}
196
119
  >
@@ -265,10 +188,11 @@ export const SidebarPoint = ({
265
188
  {!isCollapsed && ((itemBadges[item.id] !== undefined && itemBadges[item.id] > 0) || (item.id === 'empleados' && 2)) && (
266
189
  <span
267
190
  className="px-2 py-0.5 min-w-[20px] h-5
268
- text-white rounded-full flex items-center justify-center
191
+ rounded-full flex items-center justify-center
269
192
  text-body-sm font-medium"
270
193
  style={{
271
- backgroundColor: '#6D3856',
194
+ backgroundColor: activeItem === item.id ? '#FFFFFF' : '#6D3856',
195
+ color: activeItem === item.id ? '#6D3856' : '#FFFFFF',
272
196
  borderRadius: '12px'
273
197
  }}
274
198
  >
@@ -0,0 +1,92 @@
1
+ import { LogoHexa } from '../../Atoms/LogoHexa/LogoHexa';
2
+ import { Typography } from '../../Atoms/Typography/Typography';
3
+
4
+ export const TituloPoint = ({
5
+ backgroundColor = 'var(--color-main)',
6
+ textColor = '#FFFFFF',
7
+ borderBottomColor = 'var(--color-main-800)',
8
+ className = '',
9
+ ...props
10
+ }) => {
11
+ return (
12
+ <div
13
+ className={`titulo-point ${className}`}
14
+ style={{
15
+ backgroundColor: backgroundColor,
16
+ width: '100%',
17
+ display: 'none',
18
+ opacity: 1,
19
+ borderBottomColor: borderBottomColor
20
+ }}
21
+ {...props}
22
+ >
23
+ <style>{`
24
+ @media (min-width: 769px) {
25
+ .titulo-point {
26
+ display: flex !important;
27
+ align-items: center !important;
28
+ justify-content: center !important;
29
+ width: 100%;
30
+ height: calc(60px * (100vw / 1440px));
31
+ min-height: 40px;
32
+ max-height: 60px;
33
+ padding-top: 20px;
34
+ padding-right: 16px;
35
+ padding-left: 16px;
36
+ padding-bottom: 0;
37
+ border-bottom-width: 1px;
38
+ border-bottom-style: solid;
39
+ box-sizing: border-box;
40
+ position: relative;
41
+ }
42
+ .titulo-point-inner {
43
+ display: flex !important;
44
+ align-items: center !important;
45
+ justify-content: center !important;
46
+ gap: 12px;
47
+ width: 100%;
48
+ margin: 0 auto;
49
+ padding: 0;
50
+ flex-shrink: 0;
51
+ }
52
+ }
53
+ @media (min-width: 1440px) {
54
+ .titulo-point {
55
+ height: 60px;
56
+ }
57
+ }
58
+ @media (max-width: 768px) {
59
+ .titulo-point {
60
+ display: none !important;
61
+ }
62
+ }
63
+ `}</style>
64
+ <div className="titulo-point-inner" style={{ margin: 0, padding: 0 }}>
65
+ <LogoHexa
66
+ width={28}
67
+ height={32}
68
+ backgroundColor="#FFFFFF"
69
+ textColor="var(--color-main)"
70
+ />
71
+ <Typography
72
+ variant="h5"
73
+ style={{
74
+ color: textColor,
75
+ fontFamily: 'IBM Plex Sans',
76
+ fontWeight: 600,
77
+ fontSize: '18px',
78
+ lineHeight: '1.2',
79
+ margin: 0,
80
+ padding: 0,
81
+ display: 'flex',
82
+ alignItems: 'center'
83
+ }}
84
+ >
85
+ HEXA Point
86
+ </Typography>
87
+ </div>
88
+ </div>
89
+ );
90
+ };
91
+
92
+ export default TituloPoint;
@@ -0,0 +1,31 @@
1
+ import { TituloPoint } from './TituloPoint';
2
+
3
+ export default {
4
+ title: 'Layout/TituloPoint',
5
+ component: TituloPoint,
6
+ tags: ['autodocs'],
7
+ };
8
+
9
+ export const Default = {
10
+ render: () => (
11
+ <TituloPoint />
12
+ ),
13
+ };
14
+
15
+ export const ConColorPersonalizado = {
16
+ render: () => (
17
+ <TituloPoint
18
+ backgroundColor="#000000"
19
+ textColor="#FFFFFF"
20
+ />
21
+ ),
22
+ };
23
+
24
+ export const ConColorSecundario = {
25
+ render: () => (
26
+ <TituloPoint
27
+ backgroundColor="var(--color-secondary)"
28
+ textColor="#FFFFFF"
29
+ />
30
+ ),
31
+ };