anima-ds-nucleus 1.0.2 → 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 (38) hide show
  1. package/dist/anima-ds-nucleus.css +1 -1
  2. package/dist/anima-ds.cjs.js +152 -34
  3. package/dist/anima-ds.esm.js +10124 -7528
  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 +53 -18
  9. package/src/components/Atoms/Typography/Typography.stories.jsx +40 -4
  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.jsx +136 -0
  20. package/src/components/Layout/Header/HeaderConBuscador.stories.jsx +86 -0
  21. package/src/components/Layout/Header/HeaderCore.jsx +347 -0
  22. package/src/components/Layout/Header/HeaderCore.stories.jsx +59 -0
  23. package/src/components/Layout/Header/HeaderGeneral.jsx +92 -0
  24. package/src/components/Layout/Header/HeaderGeneral.stories.jsx +64 -0
  25. package/src/components/Layout/Header/HeaderPoint.jsx +120 -0
  26. package/src/components/Layout/Header/HeaderPoint.stories.jsx +110 -0
  27. package/src/components/Layout/NavPoint/NavPoint.jsx +64 -0
  28. package/src/components/Layout/NavPoint/NavPoint.stories.jsx +52 -0
  29. package/src/components/Layout/Sidebar/SidebarCore.jsx +779 -0
  30. package/src/components/Layout/Sidebar/SidebarCore.stories.jsx +167 -0
  31. package/src/components/Layout/Sidebar/SidebarPoint.jsx +645 -0
  32. package/src/components/Layout/Sidebar/SidebarPoint.stories.jsx +183 -0
  33. package/src/index.js +15 -2
  34. package/src/style.css +37 -0
  35. package/src/components/Layout/Header/Header.jsx +0 -50
  36. package/src/components/Layout/Header/Header.stories.jsx +0 -36
  37. package/src/components/Layout/Sidebar/Sidebar.jsx +0 -57
  38. package/src/components/Layout/Sidebar/Sidebar.stories.jsx +0 -51
@@ -0,0 +1,183 @@
1
+ import { useState } from 'react';
2
+ import { SidebarPoint, SidebarPointMobile } from './SidebarPoint';
3
+
4
+ export default {
5
+ title: 'Layout/SidebarPoint',
6
+ component: SidebarPoint,
7
+ tags: ['autodocs'],
8
+ };
9
+
10
+ // Mock data con 2 títulos y 2 secciones
11
+ const mockSections = [
12
+ {
13
+ title: 'PERSONAS',
14
+ items: [
15
+ { id: 'empleados', label: 'Empleados', icon: 'UserGroupIcon' },
16
+ { id: 'organizacion', label: 'Organización', icon: 'BuildingOfficeIcon' },
17
+ ],
18
+ },
19
+ {
20
+ title: 'TALENTO',
21
+ items: [
22
+ { id: 'reclutamiento', label: 'Reclutamiento', icon: 'UserPlusIcon' },
23
+ { id: 'desarrollo', label: 'Desarrollo', icon: 'AcademicCapIcon' },
24
+ ],
25
+ },
26
+ ];
27
+
28
+ export const Default = {
29
+ render: () => {
30
+ const [activeItem, setActiveItem] = useState('inicio');
31
+ return (
32
+ <div className="h-screen bg-gray-100">
33
+ <SidebarPoint
34
+ sections={mockSections}
35
+ activeItem={activeItem}
36
+ onItemClick={setActiveItem}
37
+ companyName="HEXA Point"
38
+ onCompanyClick={() => console.log('Company clicked')}
39
+ Client={false}
40
+ footerText="v1.0 | Powered by Nucleus"
41
+ />
42
+ </div>
43
+ );
44
+ },
45
+ };
46
+
47
+ export const Colapsado = {
48
+ render: () => {
49
+ const [activeItem, setActiveItem] = useState('inicio');
50
+ return (
51
+ <div className="h-screen bg-gray-100">
52
+ <SidebarPoint
53
+ sections={mockSections}
54
+ activeItem={activeItem}
55
+ onItemClick={setActiveItem}
56
+ defaultCollapsed={true}
57
+ footerText="v1.0 | Powered by Nucleus"
58
+ footerCollapsedContent="v1.0"
59
+ />
60
+ </div>
61
+ );
62
+ },
63
+ };
64
+
65
+ export const ConSeccionesPersonalizadas = {
66
+ render: () => {
67
+ const [activeItem, setActiveItem] = useState('item1');
68
+ const customSections = [
69
+ {
70
+ title: 'ADMINISTRACIÓN',
71
+ items: [
72
+ { id: 'item1', label: 'Usuarios', icon: 'UserIcon' },
73
+ { id: 'item2', label: 'Roles', icon: 'ShieldCheckIcon' },
74
+ ],
75
+ },
76
+ {
77
+ title: 'REPORTES',
78
+ items: [
79
+ { id: 'item3', label: 'Analíticas', icon: 'ChartBarIcon' },
80
+ { id: 'item4', label: 'Exportar', icon: 'ArrowDownTrayIcon' },
81
+ ],
82
+ },
83
+ ];
84
+ return (
85
+ <div className="h-screen bg-gray-100">
86
+ <SidebarPoint
87
+ sections={customSections}
88
+ activeItem={activeItem}
89
+ onItemClick={setActiveItem}
90
+ footerText="v1.0 | Powered by Nucleus"
91
+ />
92
+ </div>
93
+ );
94
+ },
95
+ };
96
+
97
+ export const Mobile = {
98
+ render: () => {
99
+ const [activeItem, setActiveItem] = useState('inicio');
100
+ return (
101
+ <div className="h-screen bg-gray-100 relative">
102
+ <SidebarPointMobile
103
+ sections={mockSections}
104
+ activeItem={activeItem}
105
+ onItemClick={setActiveItem}
106
+ companyName="HEXA Point"
107
+ companyLogo="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5OjcBCgoKDQwNGg8PGjclHyU3Nzc3Nzc3Nzc3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z3V6/kMWjKhjW2qN09dMdPvt6R8zeRxMHXvVyi35RXdv8CFzf8TYX8r9bPfP4WXXyUeRopV8El+y49Wteq9Bd3z0mufc+3U9VawuSxM5tY1vVKK24taaRtkTg87BzL3KvGjj5fQ1KMeyktrevx0WzWb3Hfi39892gANOgAAIeRxWTZ4hhnRUPYxlBvcu+ku/YufAAkzIxjjznvr9czy/hyy3JdmB7NQn3cJS10v5fIqcvxr5Dj40xlGNsNOLflvWmikDP0jE+Pid+PbnIcfzduG8S66uumMdLT7zXwW/Q3OG4yzG4+/FzVB+1k9qMt9taK4LMRM/Hzm9uaq4rluMtn9HWwnVL4Tet/an8fmjfqxuTtwM2vOnXK26txrjF9o7RWAmOjPBmer4SeE42eLx92NmqElZJ7UZb7NJf2NKnjOW4u2a42yuymT2ozevzXbv9h0YFxC8GepJ+JnH0cm8n2/I319Ci1GmtdvtJ9nE8jh8jZk8ZKDjY22ptdtvbTTOjA+i3glklt8Oalw3JT5KjLvtqtcZQlY+rWtPyS18Fo38+vmI5crcCyuVLS/dzfkVgT6SJPj5kvVvlD4fisqrkLc/OdaslvUK/Lb+JcANSSOnHxzjnUAAVsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/9k="
108
+ onCompanyClick={() => console.log('Company clicked')}
109
+ />
110
+ <div className="p-4">
111
+ <p className="text-sm text-gray-600">
112
+ Haz clic en el botón hamburguesa (esquina superior izquierda) para abrir el menú mobile.
113
+ </p>
114
+ </div>
115
+ </div>
116
+ );
117
+ },
118
+ };
119
+
120
+ export const ConFooter = {
121
+ render: () => {
122
+ const [activeItem, setActiveItem] = useState('inicio');
123
+ return (
124
+ <div className="h-screen bg-gray-100">
125
+ <SidebarPoint
126
+ sections={mockSections}
127
+ activeItem={activeItem}
128
+ onItemClick={setActiveItem}
129
+ companyName="HEXA Point"
130
+ onCompanyClick={() => console.log('Company clicked')}
131
+ footerText="v1.0 | Powered by Nucleus"
132
+ />
133
+ </div>
134
+ );
135
+ },
136
+ };
137
+
138
+ export const ConFooterPersonalizado = {
139
+ render: () => {
140
+ const [activeItem, setActiveItem] = useState('inicio');
141
+ return (
142
+ <div className="h-screen bg-gray-100">
143
+ <SidebarPoint
144
+ sections={mockSections}
145
+ activeItem={activeItem}
146
+ onItemClick={setActiveItem}
147
+ companyName="HEXA Point"
148
+ onCompanyClick={() => console.log('Company clicked')}
149
+ footerText={{
150
+ version: 'v2.1',
151
+ poweredBy: 'Powered by',
152
+ brand: 'Nucleus'
153
+ }}
154
+ footerCollapsedContent={{
155
+ icon: 'InformationCircleIcon',
156
+ text: 'v2.1'
157
+ }}
158
+ />
159
+ </div>
160
+ );
161
+ },
162
+ };
163
+
164
+ export const Client = {
165
+ render: () => {
166
+ const [activeItem, setActiveItem] = useState('inicio');
167
+ return (
168
+ <div className="h-screen bg-gray-100">
169
+ <SidebarPoint
170
+ sections={mockSections}
171
+ activeItem={activeItem}
172
+ onItemClick={setActiveItem}
173
+ companyName="HEXA Point"
174
+ onCompanyClick={() => console.log('Company clicked')}
175
+ Client={false}
176
+ footerText="v1.0 | Powered by Nucleus"
177
+ />
178
+ </div>
179
+ );
180
+ },
181
+ };
182
+
183
+
package/src/index.js CHANGED
@@ -14,6 +14,7 @@ export { Divider } from './components/Atoms/Divider/Divider';
14
14
  export { Skeleton } from './components/Atoms/Skeleton/Skeleton';
15
15
  export { Toast } from './components/Atoms/Toast/Toast';
16
16
  export { Tooltip } from './components/Atoms/Tooltip/Tooltip';
17
+ export { LogoHexa } from './components/Atoms/LogoHexa/LogoHexa';
17
18
 
18
19
  // Inputs
19
20
  export { Input } from './components/Inputs/Input/Input';
@@ -27,8 +28,13 @@ export { FileUpload } from './components/Inputs/FileUpload/FileUpload';
27
28
 
28
29
  // Layout
29
30
  export { Layout } from './components/Layout/Layout/Layout';
30
- export { Header } from './components/Layout/Header/Header';
31
- export { Sidebar } from './components/Layout/Sidebar/Sidebar';
31
+ export { HeaderConBuscador } from './components/Layout/Header/HeaderConBuscador';
32
+ export { HeaderCore } from './components/Layout/Header/HeaderCore';
33
+ export { HeaderPoint } from './components/Layout/Header/HeaderPoint';
34
+ export { HeaderGeneral } from './components/Layout/Header/HeaderGeneral';
35
+ export { SidebarCore, SidebarCoreMobile } from './components/Layout/Sidebar/SidebarCore';
36
+ export { SidebarPoint, SidebarPointMobile } from './components/Layout/Sidebar/SidebarPoint';
37
+ export { NavPoint } from './components/Layout/NavPoint/NavPoint';
32
38
  export { Modal } from './components/Layout/Modal/Modal';
33
39
  export { Tabs } from './components/Layout/Tabs/Tabs';
34
40
  export { Accordion } from './components/Layout/Accordion/Accordion';
@@ -40,6 +46,13 @@ export { Stepper } from './components/Layout/Stepper/Stepper';
40
46
 
41
47
  // DataDisplay
42
48
  export { Card } from './components/DataDisplay/Card/Card';
49
+ export { CardTituloCorto } from './components/DataDisplay/Card/CardTituloCorto';
50
+ export { CardTituloLargo } from './components/DataDisplay/Card/CardTituloLargo';
51
+ export { CardTituloCortoMasEstado } from './components/DataDisplay/Card/CardTituloCortoMasEstado';
52
+ export { CardTituloLargoMasEstado } from './components/DataDisplay/Card/CardTituloLargoMasEstado';
53
+ export { CardSkeleton } from './components/DataDisplay/Card/CardSkeleton';
54
+ export { CardVacia } from './components/DataDisplay/Card/CardVacia';
55
+ export { CardError } from './components/DataDisplay/Card/CardError';
43
56
  export { DBGrid } from './components/DataDisplay/DBGrid/DBGrid';
44
57
  export { LineChart } from './components/DataDisplay/LineChart/LineChart';
45
58
  export { BarChart } from './components/DataDisplay/BarChart/BarChart';
package/src/style.css CHANGED
@@ -104,6 +104,31 @@
104
104
  font-family: 'IBM Plex Mono', monospace;
105
105
  }
106
106
 
107
+ /* --- MONO TEXT - IBM Plex Mono --- */
108
+ .text-mono-lg {
109
+ font-family: 'IBM Plex Mono', monospace;
110
+ font-size: 1rem; /* 16px */
111
+ line-height: 1.5rem; /* 24px */
112
+ font-weight: 400; /* Regular */
113
+ letter-spacing: 0;
114
+ }
115
+
116
+ .text-mono-md {
117
+ font-family: 'IBM Plex Mono', monospace;
118
+ font-size: 0.875rem; /* 14px */
119
+ line-height: 1.3125rem; /* 21px */
120
+ font-weight: 400; /* Regular */
121
+ letter-spacing: 0;
122
+ }
123
+
124
+ .text-mono-sm {
125
+ font-family: 'IBM Plex Mono', monospace;
126
+ font-size: 0.75rem; /* 12px */
127
+ line-height: 1.125rem; /* 18px */
128
+ font-weight: 400; /* Regular */
129
+ letter-spacing: 0;
130
+ }
131
+
107
132
  /* --- COLORS GENÉRICOS (Clases utilitarias) --- */
108
133
  .color-black {
109
134
  color: #111827; /* gray-900 */
@@ -153,6 +178,18 @@
153
178
  color: #dcfce7;
154
179
  }
155
180
 
181
+ .color-brand {
182
+ color: #56B676; /* Brand color principal */
183
+ }
184
+
185
+ .color-main {
186
+ color: #38656D; /* Main color (verde-azulado oscuro) */
187
+ }
188
+
189
+ .color-teal {
190
+ color: #2D5C63; /* Teal color (usado en botones) */
191
+ }
192
+
156
193
  /* --- FONT WEIGHTS PERMITIDOS (según Figma) --- */
157
194
  .font-light {
158
195
  font-weight: 300;
@@ -1,50 +0,0 @@
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
-
@@ -1,36 +0,0 @@
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
-
@@ -1,57 +0,0 @@
1
- import { useTranslation } from 'react-i18next';
2
- import { Icon } from '../../Atoms/Icon/Icon';
3
-
4
- export const Sidebar = ({
5
- items = [],
6
- activeItem,
7
- onItemClick,
8
- className = '',
9
- ...props
10
- }) => {
11
- const { t } = useTranslation();
12
-
13
- const defaultItems = [
14
- { id: 'home', label: t('nav.home'), icon: 'HomeIcon' },
15
- { id: 'dashboard', label: t('nav.dashboard'), icon: 'ChartBarIcon' },
16
- { id: 'profile', label: t('nav.profile'), icon: 'UserIcon' },
17
- { id: 'settings', label: t('nav.settings'), icon: 'Cog6ToothIcon' },
18
- ];
19
-
20
- const menuItems = items.length > 0 ? items : defaultItems;
21
-
22
- return (
23
- <aside className={`bg-white shadow-sm border-r border-gray-200 ${className}`} {...props}>
24
- <nav className="p-4">
25
- <ul className="space-y-2">
26
- {menuItems.map((item) => (
27
- <li key={item.id}>
28
- <button
29
- onClick={() => onItemClick && onItemClick(item.id)}
30
- className={`
31
- w-full flex items-center px-4 py-2 rounded-lg
32
- transition-colors
33
- ${
34
- activeItem === item.id
35
- ? 'bg-blue-100 text-blue-700 font-medium'
36
- : 'text-gray-700 hover:bg-gray-100'
37
- }
38
- `}
39
- >
40
- {item.icon && (
41
- <Icon
42
- name={item.icon}
43
- className="mr-3 h-5 w-5"
44
- />
45
- )}
46
- <span>{item.label}</span>
47
- </button>
48
- </li>
49
- ))}
50
- </ul>
51
- </nav>
52
- </aside>
53
- );
54
- };
55
-
56
- export default Sidebar;
57
-
@@ -1,51 +0,0 @@
1
- import { useState } from 'react';
2
- import { Sidebar } from './Sidebar';
3
- import { I18nProvider } from '../../../providers/I18nProvider';
4
-
5
- export default {
6
- title: 'Layout/Sidebar',
7
- component: Sidebar,
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 [activeItem, setActiveItem] = useState('home');
21
- return (
22
- <div className="w-64">
23
- <Sidebar
24
- activeItem={activeItem}
25
- onItemClick={setActiveItem}
26
- />
27
- </div>
28
- );
29
- },
30
- };
31
-
32
- export const WithCustomItems = {
33
- render: () => {
34
- const [activeItem, setActiveItem] = useState('item1');
35
- const customItems = [
36
- { id: 'item1', label: 'Custom Item 1', icon: 'HomeIcon' },
37
- { id: 'item2', label: 'Custom Item 2', icon: 'UserIcon' },
38
- { id: 'item3', label: 'Custom Item 3', icon: 'SettingsIcon' },
39
- ];
40
- return (
41
- <div className="w-64">
42
- <Sidebar
43
- items={customItems}
44
- activeItem={activeItem}
45
- onItemClick={setActiveItem}
46
- />
47
- </div>
48
- );
49
- },
50
- };
51
-