anima-ds-nucleus 1.0.17 → 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 +111 -95
- package/dist/anima-ds.esm.js +3521 -2714
- 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/HeaderConBuscador.stories.jsx +1 -0
- package/src/components/Layout/Header/HeaderCore.jsx +12 -12
- package/src/components/Layout/Header/HeaderGeneral.jsx +28 -2
- package/src/components/Layout/Header/HeaderPoint.jsx +3 -3
- package/src/components/Layout/NavPoint/NavPoint.jsx +36 -21
- 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 +1 -0
|
@@ -7,13 +7,59 @@ export default {
|
|
|
7
7
|
tags: ['autodocs'],
|
|
8
8
|
decorators: [
|
|
9
9
|
(Story) => (
|
|
10
|
-
<I18nProvider>
|
|
11
|
-
<
|
|
10
|
+
<I18nProvider language="es-AR">
|
|
11
|
+
<div style={{ padding: '2rem', maxWidth: '500px', margin: '0 auto' }}>
|
|
12
|
+
<Story />
|
|
13
|
+
</div>
|
|
12
14
|
</I18nProvider>
|
|
13
15
|
),
|
|
14
16
|
],
|
|
17
|
+
argTypes: {
|
|
18
|
+
variant: {
|
|
19
|
+
control: 'select',
|
|
20
|
+
options: ['hexa-login', undefined],
|
|
21
|
+
description: 'Variante del formulario de login',
|
|
22
|
+
},
|
|
23
|
+
loading: {
|
|
24
|
+
control: 'boolean',
|
|
25
|
+
description: 'Estado de carga del formulario',
|
|
26
|
+
},
|
|
27
|
+
showSocialLogin: {
|
|
28
|
+
control: 'boolean',
|
|
29
|
+
description: 'Mostrar botones de login social',
|
|
30
|
+
},
|
|
31
|
+
showDivider: {
|
|
32
|
+
control: 'boolean',
|
|
33
|
+
description: 'Mostrar divisor antes de los botones sociales',
|
|
34
|
+
},
|
|
35
|
+
generalError: {
|
|
36
|
+
control: 'text',
|
|
37
|
+
description: 'Mensaje de error general',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// Variante Hexa Login (principal)
|
|
43
|
+
export const HexaLogin = {
|
|
44
|
+
args: {
|
|
45
|
+
variant: 'hexa-login',
|
|
46
|
+
onSubmit: (data) => {
|
|
47
|
+
console.log('Login data:', data);
|
|
48
|
+
alert('Login submitted!');
|
|
49
|
+
},
|
|
50
|
+
onForgotPassword: () => {
|
|
51
|
+
alert('Forgot password clicked');
|
|
52
|
+
},
|
|
53
|
+
onGoogleLogin: () => {
|
|
54
|
+
alert('Google login clicked');
|
|
55
|
+
},
|
|
56
|
+
onMicrosoftLogin: () => {
|
|
57
|
+
alert('Microsoft login clicked');
|
|
58
|
+
},
|
|
59
|
+
},
|
|
15
60
|
};
|
|
16
61
|
|
|
62
|
+
// Variante por defecto
|
|
17
63
|
export const Default = {
|
|
18
64
|
args: {
|
|
19
65
|
onSubmit: (data) => {
|
|
@@ -23,33 +69,165 @@ export const Default = {
|
|
|
23
69
|
},
|
|
24
70
|
};
|
|
25
71
|
|
|
72
|
+
// Con estado de carga
|
|
73
|
+
export const Loading = {
|
|
74
|
+
args: {
|
|
75
|
+
variant: 'hexa-login',
|
|
76
|
+
loading: true,
|
|
77
|
+
onSubmit: (data) => {
|
|
78
|
+
console.log('Login data:', data);
|
|
79
|
+
},
|
|
80
|
+
onGoogleLogin: () => {
|
|
81
|
+
alert('Google login clicked');
|
|
82
|
+
},
|
|
83
|
+
onMicrosoftLogin: () => {
|
|
84
|
+
alert('Microsoft login clicked');
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
// Con error general (string)
|
|
90
|
+
export const WithError = {
|
|
91
|
+
args: {
|
|
92
|
+
variant: 'hexa-login',
|
|
93
|
+
generalError: 'Credenciales incorrectas',
|
|
94
|
+
onSubmit: (data) => {
|
|
95
|
+
console.log('Login data:', data);
|
|
96
|
+
},
|
|
97
|
+
onGoogleLogin: () => {
|
|
98
|
+
alert('Google login clicked');
|
|
99
|
+
},
|
|
100
|
+
onMicrosoftLogin: () => {
|
|
101
|
+
alert('Microsoft login clicked');
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
// Con error general (boolean - muestra textos i18n)
|
|
107
|
+
export const WithErrorBoolean = {
|
|
108
|
+
args: {
|
|
109
|
+
variant: 'hexa-login',
|
|
110
|
+
generalError: true,
|
|
111
|
+
onSubmit: (data) => {
|
|
112
|
+
console.log('Login data:', data);
|
|
113
|
+
},
|
|
114
|
+
onGoogleLogin: () => {
|
|
115
|
+
alert('Google login clicked');
|
|
116
|
+
},
|
|
117
|
+
onMicrosoftLogin: () => {
|
|
118
|
+
alert('Microsoft login clicked');
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
// Con error general personalizado
|
|
124
|
+
export const WithCustomError = {
|
|
125
|
+
args: {
|
|
126
|
+
variant: 'hexa-login',
|
|
127
|
+
generalError: true,
|
|
128
|
+
generalErrorTitle: 'Error de autenticación',
|
|
129
|
+
generalErrorSubtitle: 'Verifica tus credenciales e intenta nuevamente.',
|
|
130
|
+
onSubmit: (data) => {
|
|
131
|
+
console.log('Login data:', data);
|
|
132
|
+
},
|
|
133
|
+
onGoogleLogin: () => {
|
|
134
|
+
alert('Google login clicked');
|
|
135
|
+
},
|
|
136
|
+
onMicrosoftLogin: () => {
|
|
137
|
+
alert('Microsoft login clicked');
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
// Sin login social
|
|
143
|
+
export const WithoutSocialLogin = {
|
|
144
|
+
args: {
|
|
145
|
+
variant: 'hexa-login',
|
|
146
|
+
showSocialLogin: false,
|
|
147
|
+
showDivider: false,
|
|
148
|
+
onSubmit: (data) => {
|
|
149
|
+
console.log('Login data:', data);
|
|
150
|
+
alert('Login submitted!');
|
|
151
|
+
},
|
|
152
|
+
onForgotPassword: () => {
|
|
153
|
+
alert('Forgot password clicked');
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
// Con labels personalizados
|
|
159
|
+
export const CustomLabels = {
|
|
160
|
+
args: {
|
|
161
|
+
variant: 'hexa-login',
|
|
162
|
+
labels: {
|
|
163
|
+
emailLabel: 'Correo electrónico',
|
|
164
|
+
passwordLabel: 'Contraseña',
|
|
165
|
+
rememberMeLabel: 'Recordar sesión',
|
|
166
|
+
forgotPasswordLabel: '¿Olvidaste tu contraseña?',
|
|
167
|
+
continueWithLabel: 'O continúa con',
|
|
168
|
+
googleLabel: 'Google',
|
|
169
|
+
microsoftLabel: 'Microsoft',
|
|
170
|
+
},
|
|
171
|
+
onSubmit: (data) => {
|
|
172
|
+
console.log('Login data:', data);
|
|
173
|
+
alert('Login submitted!');
|
|
174
|
+
},
|
|
175
|
+
onGoogleLogin: () => {
|
|
176
|
+
alert('Google login clicked');
|
|
177
|
+
},
|
|
178
|
+
onMicrosoftLogin: () => {
|
|
179
|
+
alert('Microsoft login clicked');
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
// Versión en español
|
|
26
185
|
export const Spanish = {
|
|
27
186
|
decorators: [
|
|
28
187
|
(Story) => (
|
|
29
188
|
<I18nProvider language="es-AR">
|
|
30
|
-
<
|
|
189
|
+
<div style={{ padding: '2rem', maxWidth: '500px', margin: '0 auto' }}>
|
|
190
|
+
<Story />
|
|
191
|
+
</div>
|
|
31
192
|
</I18nProvider>
|
|
32
193
|
),
|
|
33
194
|
],
|
|
34
195
|
args: {
|
|
196
|
+
variant: 'hexa-login',
|
|
35
197
|
onSubmit: (data) => {
|
|
36
198
|
console.log('Login data:', data);
|
|
37
199
|
},
|
|
200
|
+
onGoogleLogin: () => {
|
|
201
|
+
alert('Google login clicked');
|
|
202
|
+
},
|
|
203
|
+
onMicrosoftLogin: () => {
|
|
204
|
+
alert('Microsoft login clicked');
|
|
205
|
+
},
|
|
38
206
|
},
|
|
39
207
|
};
|
|
40
208
|
|
|
209
|
+
// Versión en portugués
|
|
41
210
|
export const Portuguese = {
|
|
42
211
|
decorators: [
|
|
43
212
|
(Story) => (
|
|
44
213
|
<I18nProvider language="pt-BR">
|
|
45
|
-
<
|
|
214
|
+
<div style={{ padding: '2rem', maxWidth: '500px', margin: '0 auto' }}>
|
|
215
|
+
<Story />
|
|
216
|
+
</div>
|
|
46
217
|
</I18nProvider>
|
|
47
218
|
),
|
|
48
219
|
],
|
|
49
220
|
args: {
|
|
221
|
+
variant: 'hexa-login',
|
|
50
222
|
onSubmit: (data) => {
|
|
51
223
|
console.log('Login data:', data);
|
|
52
224
|
},
|
|
225
|
+
onGoogleLogin: () => {
|
|
226
|
+
alert('Google login clicked');
|
|
227
|
+
},
|
|
228
|
+
onMicrosoftLogin: () => {
|
|
229
|
+
alert('Microsoft login clicked');
|
|
230
|
+
},
|
|
53
231
|
},
|
|
54
232
|
};
|
|
55
233
|
|
package/src/i18n/config.js
CHANGED
|
@@ -95,6 +95,12 @@ const resources = {
|
|
|
95
95
|
'alert.error': 'Error',
|
|
96
96
|
'alert.warning': 'Advertencia',
|
|
97
97
|
'alert.info': 'Información',
|
|
98
|
+
|
|
99
|
+
// Errors
|
|
100
|
+
'errors.invalidCredentials': 'Correo o contraseña incorrectos.',
|
|
101
|
+
'errors.tryAgain': 'Intentá nuevamente.',
|
|
102
|
+
'form.tryAgain': 'Por favor, intentá nuevamente.',
|
|
103
|
+
'form.loggingIn': 'Ingresando...',
|
|
98
104
|
},
|
|
99
105
|
},
|
|
100
106
|
'pt-BR': {
|
|
@@ -190,6 +196,12 @@ const resources = {
|
|
|
190
196
|
'alert.error': 'Erro',
|
|
191
197
|
'alert.warning': 'Aviso',
|
|
192
198
|
'alert.info': 'Informação',
|
|
199
|
+
|
|
200
|
+
// Errors
|
|
201
|
+
'errors.invalidCredentials': 'E-mail ou senha incorretos.',
|
|
202
|
+
'errors.tryAgain': 'Tente novamente.',
|
|
203
|
+
'form.tryAgain': 'Por favor, tente novamente.',
|
|
204
|
+
'form.loggingIn': 'Entrando...',
|
|
193
205
|
},
|
|
194
206
|
},
|
|
195
207
|
};
|
package/src/index.js
CHANGED
|
@@ -71,6 +71,7 @@ export { TagList } from './components/DataDisplay/TagList/TagList';
|
|
|
71
71
|
// Views
|
|
72
72
|
export { LoginForm } from './components/Views/LoginForm/LoginForm';
|
|
73
73
|
export { ChangePasswordForm } from './components/Views/ChangePasswordForm/ChangePasswordForm';
|
|
74
|
+
export { ForgotPassword } from './components/Views/ForgotPassword/ForgotPassword';
|
|
74
75
|
export { Chat } from './components/Views/Chat/Chat';
|
|
75
76
|
|
|
76
77
|
// Providers
|