nucleus-core-ts 0.9.881 → 0.9.882
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/.build-ok +1 -1
- package/dist/fe/components/ForgotPasswordPage/components/ForgotPasswordForm.d.ts +1 -1
- package/dist/fe/components/ForgotPasswordPage/components/ForgotPasswordForm.js +21 -15
- package/dist/fe/components/ForgotPasswordPage/components/ForgotPasswordPage.d.ts +1 -1
- package/dist/fe/components/ForgotPasswordPage/components/ForgotPasswordPage.js +9 -3
- package/dist/fe/components/ForgotPasswordPage/index.d.ts +1 -0
- package/dist/fe/components/ForgotPasswordPage/index.js +1 -0
- package/dist/fe/components/ForgotPasswordPage/labels.d.ts +19 -0
- package/dist/fe/components/ForgotPasswordPage/labels.js +16 -0
- package/dist/fe/components/ForgotPasswordPage/types/index.d.ts +4 -0
- package/dist/fe/components/ResetPasswordPage/components/ResetPasswordForm.d.ts +1 -1
- package/dist/fe/components/ResetPasswordPage/components/ResetPasswordForm.js +13 -8
- package/dist/fe/components/ResetPasswordPage/components/ResetPasswordPage.d.ts +1 -1
- package/dist/fe/components/ResetPasswordPage/components/ResetPasswordPage.js +9 -3
- package/dist/fe/components/ResetPasswordPage/index.d.ts +1 -0
- package/dist/fe/components/ResetPasswordPage/index.js +1 -0
- package/dist/fe/components/ResetPasswordPage/labels.d.ts +14 -0
- package/dist/fe/components/ResetPasswordPage/labels.js +12 -0
- package/dist/fe/components/ResetPasswordPage/types/index.d.ts +4 -0
- package/dist/fe/index.d.ts +2 -2
- package/dist/fe/index.js +2 -2
- package/package.json +1 -1
package/dist/.build-ok
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.9.
|
|
1
|
+
0.9.882
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import type { ForgotPasswordFormProps } from '../types';
|
|
3
|
-
export declare function ForgotPasswordForm({ forgotPasswordAction, onBackToLogin, backToLoginHref, }: ForgotPasswordFormProps): ReactElement;
|
|
3
|
+
export declare function ForgotPasswordForm({ labels, forgotPasswordAction, onBackToLogin, backToLoginHref, }: ForgotPasswordFormProps): ReactElement;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { DEFAULT_FORGOT_PASSWORD_LABELS } from '../labels';
|
|
3
|
+
'use client';
|
|
3
4
|
import { useGSAP } from '@gsap/react';
|
|
4
5
|
import gsap from 'gsap';
|
|
5
6
|
import { useRef } from 'react';
|
|
@@ -39,7 +40,11 @@ function CheckCircleIcon({ className }) {
|
|
|
39
40
|
})
|
|
40
41
|
});
|
|
41
42
|
}
|
|
42
|
-
export function ForgotPasswordForm({ forgotPasswordAction, onBackToLogin, backToLoginHref }) {
|
|
43
|
+
export function ForgotPasswordForm({ labels, forgotPasswordAction, onBackToLogin, backToLoginHref }) {
|
|
44
|
+
const say = {
|
|
45
|
+
...DEFAULT_FORGOT_PASSWORD_LABELS,
|
|
46
|
+
...labels
|
|
47
|
+
};
|
|
43
48
|
const theme = forgotPasswordPageTheme;
|
|
44
49
|
const formRef = useRef(null);
|
|
45
50
|
const successRef = useRef(null);
|
|
@@ -122,17 +127,18 @@ export function ForgotPasswordForm({ forgotPasswordAction, onBackToLogin, backTo
|
|
|
122
127
|
}),
|
|
123
128
|
/*#__PURE__*/ _jsx("h2", {
|
|
124
129
|
className: theme.success.title,
|
|
125
|
-
children:
|
|
130
|
+
children: say.checkYourEmail
|
|
126
131
|
}),
|
|
127
|
-
/*#__PURE__*/
|
|
132
|
+
/*#__PURE__*/ _jsx("p", {
|
|
128
133
|
className: theme.success.message,
|
|
129
|
-
children: [
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
children: say.sentTo.split('{email}').flatMap((part, i)=>i === 0 ? [
|
|
135
|
+
part
|
|
136
|
+
] : [
|
|
137
|
+
/*#__PURE__*/ _jsx("strong", {
|
|
138
|
+
children: store.email
|
|
139
|
+
}, "e"),
|
|
140
|
+
part
|
|
141
|
+
])
|
|
136
142
|
}),
|
|
137
143
|
/*#__PURE__*/ _jsx("div", {
|
|
138
144
|
className: theme.links.container,
|
|
@@ -142,7 +148,7 @@ export function ForgotPasswordForm({ forgotPasswordAction, onBackToLogin, backTo
|
|
|
142
148
|
className: theme.links.backToLogin,
|
|
143
149
|
children: [
|
|
144
150
|
/*#__PURE__*/ _jsx(ArrowLeftIcon, {}),
|
|
145
|
-
|
|
151
|
+
say.backToLogin
|
|
146
152
|
]
|
|
147
153
|
})
|
|
148
154
|
})
|
|
@@ -170,8 +176,8 @@ export function ForgotPasswordForm({ forgotPasswordAction, onBackToLogin, backTo
|
|
|
170
176
|
className: theme.input.wrapper,
|
|
171
177
|
children: /*#__PURE__*/ _jsx(NucleusTextInput, {
|
|
172
178
|
type: "email",
|
|
173
|
-
label:
|
|
174
|
-
placeholder:
|
|
179
|
+
label: say.emailLabel,
|
|
180
|
+
placeholder: say.emailPlaceholder,
|
|
175
181
|
value: store.email,
|
|
176
182
|
onChange: store.setEmail,
|
|
177
183
|
disabled: isLoading,
|
|
@@ -203,7 +209,7 @@ export function ForgotPasswordForm({ forgotPasswordAction, onBackToLogin, backTo
|
|
|
203
209
|
disabled: isLoading,
|
|
204
210
|
children: [
|
|
205
211
|
/*#__PURE__*/ _jsx(ArrowLeftIcon, {}),
|
|
206
|
-
|
|
212
|
+
say.backToLogin
|
|
207
213
|
]
|
|
208
214
|
})
|
|
209
215
|
})
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import type { ForgotPasswordPageConfig } from '../types';
|
|
3
|
-
export declare function ForgotPasswordPage({ logo, title, subtitle, forgotPasswordAction, onBackToLogin, backToLoginHref, showBackground, className, }: ForgotPasswordPageConfig): ReactElement;
|
|
3
|
+
export declare function ForgotPasswordPage({ labels, logo, title, subtitle, forgotPasswordAction, onBackToLogin, backToLoginHref, showBackground, className, }: ForgotPasswordPageConfig): ReactElement;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { DEFAULT_FORGOT_PASSWORD_LABELS } from '../labels';
|
|
3
|
+
'use client';
|
|
3
4
|
import { useGSAP } from '@gsap/react';
|
|
4
5
|
import gsap from 'gsap';
|
|
5
6
|
import { useRef } from 'react';
|
|
@@ -9,7 +10,11 @@ import { forgotPasswordPageTheme } from '../theme';
|
|
|
9
10
|
import { ForgotPasswordForm } from './ForgotPasswordForm';
|
|
10
11
|
import { ForgotPasswordHeader } from './ForgotPasswordHeader';
|
|
11
12
|
gsap.registerPlugin(useGSAP);
|
|
12
|
-
export function ForgotPasswordPage({ logo, title = 'Forgot Password?', subtitle = "No worries, we'll send you reset instructions.", forgotPasswordAction, onBackToLogin, backToLoginHref, showBackground = true, className }) {
|
|
13
|
+
export function ForgotPasswordPage({ labels, logo, title = 'Forgot Password?', subtitle = "No worries, we'll send you reset instructions.", forgotPasswordAction, onBackToLogin, backToLoginHref, showBackground = true, className }) {
|
|
14
|
+
const say = {
|
|
15
|
+
...DEFAULT_FORGOT_PASSWORD_LABELS,
|
|
16
|
+
...labels
|
|
17
|
+
};
|
|
13
18
|
const theme = forgotPasswordPageTheme;
|
|
14
19
|
const containerRef = useRef(null);
|
|
15
20
|
const cardRef = useRef(null);
|
|
@@ -32,7 +37,7 @@ export function ForgotPasswordPage({ logo, title = 'Forgot Password?', subtitle
|
|
|
32
37
|
return /*#__PURE__*/ _jsxs("main", {
|
|
33
38
|
ref: containerRef,
|
|
34
39
|
className: cn(theme.container.base, className),
|
|
35
|
-
"aria-label":
|
|
40
|
+
"aria-label": say.pageLabel,
|
|
36
41
|
children: [
|
|
37
42
|
showBackground && /*#__PURE__*/ _jsx(AbstractAnimatedBackground, {}),
|
|
38
43
|
/*#__PURE__*/ _jsx("div", {
|
|
@@ -47,6 +52,7 @@ export function ForgotPasswordPage({ logo, title = 'Forgot Password?', subtitle
|
|
|
47
52
|
subtitle: subtitle
|
|
48
53
|
}),
|
|
49
54
|
/*#__PURE__*/ _jsx(ForgotPasswordForm, {
|
|
55
|
+
labels: labels,
|
|
50
56
|
forgotPasswordAction: forgotPasswordAction,
|
|
51
57
|
onBackToLogin: onBackToLogin,
|
|
52
58
|
backToLoginHref: backToLoginHref
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { ForgotPasswordForm } from './components/ForgotPasswordForm';
|
|
2
2
|
export { ForgotPasswordHeader } from './components/ForgotPasswordHeader';
|
|
3
3
|
export { ForgotPasswordPage } from './components/ForgotPasswordPage';
|
|
4
|
+
export { DEFAULT_FORGOT_PASSWORD_LABELS, type ForgotPasswordLabels } from './labels';
|
|
4
5
|
export { useForgotPasswordStore } from './store';
|
|
5
6
|
export { extendForgotPasswordPageTheme, type ForgotPasswordPageTheme, forgotPasswordPageTheme, } from './theme';
|
|
6
7
|
export type { ForgotPasswordAction, ForgotPasswordFormProps, ForgotPasswordHeaderProps, ForgotPasswordPageConfig, ForgotPasswordStep, } from './types';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { ForgotPasswordForm } from './components/ForgotPasswordForm';
|
|
2
2
|
export { ForgotPasswordHeader } from './components/ForgotPasswordHeader';
|
|
3
3
|
export { ForgotPasswordPage } from './components/ForgotPasswordPage';
|
|
4
|
+
export { DEFAULT_FORGOT_PASSWORD_LABELS } from './labels';
|
|
4
5
|
export { useForgotPasswordStore } from './store';
|
|
5
6
|
export { extendForgotPasswordPageTheme, forgotPasswordPageTheme } from './theme';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every word this page says, so a portal can say them in its own language.
|
|
3
|
+
*
|
|
4
|
+
* `title` and `subtitle` were already props; everything under them was English
|
|
5
|
+
* — including the whole success state, which is the only screen somebody who
|
|
6
|
+
* has lost their password actually reads.
|
|
7
|
+
*
|
|
8
|
+
* Defaults stay English, so nothing that does not pass labels changes.
|
|
9
|
+
*/
|
|
10
|
+
export type ForgotPasswordLabels = {
|
|
11
|
+
emailLabel: string;
|
|
12
|
+
emailPlaceholder: string;
|
|
13
|
+
checkYourEmail: string;
|
|
14
|
+
/** `{email}` is replaced with the address the link went to. */
|
|
15
|
+
sentTo: string;
|
|
16
|
+
backToLogin: string;
|
|
17
|
+
pageLabel: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const DEFAULT_FORGOT_PASSWORD_LABELS: ForgotPasswordLabels;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every word this page says, so a portal can say them in its own language.
|
|
3
|
+
*
|
|
4
|
+
* `title` and `subtitle` were already props; everything under them was English
|
|
5
|
+
* — including the whole success state, which is the only screen somebody who
|
|
6
|
+
* has lost their password actually reads.
|
|
7
|
+
*
|
|
8
|
+
* Defaults stay English, so nothing that does not pass labels changes.
|
|
9
|
+
*/ export const DEFAULT_FORGOT_PASSWORD_LABELS = {
|
|
10
|
+
emailLabel: 'Email',
|
|
11
|
+
emailPlaceholder: 'you@example.com',
|
|
12
|
+
checkYourEmail: 'Check your email',
|
|
13
|
+
sentTo: "We've sent a password reset link to {email}. Please check your inbox and follow the instructions.",
|
|
14
|
+
backToLogin: 'Back to login',
|
|
15
|
+
pageLabel: 'Forgot password page'
|
|
16
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ForgotPasswordLabels } from '../labels';
|
|
2
3
|
export type ForgotPasswordStep = 'request' | 'success';
|
|
3
4
|
export type ForgotPasswordAction<TData = unknown, TError = unknown> = {
|
|
4
5
|
start: (config: {
|
|
@@ -17,6 +18,8 @@ export type ForgotPasswordAction<TData = unknown, TError = unknown> = {
|
|
|
17
18
|
export interface ForgotPasswordPageConfig {
|
|
18
19
|
title?: string;
|
|
19
20
|
subtitle?: string;
|
|
21
|
+
/** Every word the page says, so a portal can say them in its own language. */
|
|
22
|
+
labels?: Partial<ForgotPasswordLabels>;
|
|
20
23
|
logo?: ReactNode;
|
|
21
24
|
forgotPasswordAction: ForgotPasswordAction;
|
|
22
25
|
onBackToLogin?: () => void;
|
|
@@ -25,6 +28,7 @@ export interface ForgotPasswordPageConfig {
|
|
|
25
28
|
className?: string;
|
|
26
29
|
}
|
|
27
30
|
export interface ForgotPasswordFormProps {
|
|
31
|
+
labels?: Partial<ForgotPasswordLabels>;
|
|
28
32
|
forgotPasswordAction: ForgotPasswordAction;
|
|
29
33
|
onBackToLogin?: () => void;
|
|
30
34
|
backToLoginHref?: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import type { ResetPasswordFormProps } from '../types';
|
|
3
|
-
export declare function ResetPasswordForm({ token, resetPasswordAction, onBackToLogin, backToLoginHref, passwordPolicy, }: ResetPasswordFormProps): ReactElement;
|
|
3
|
+
export declare function ResetPasswordForm({ labels, token, resetPasswordAction, onBackToLogin, backToLoginHref, passwordPolicy, }: ResetPasswordFormProps): ReactElement;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { DEFAULT_RESET_PASSWORD_LABELS } from '../labels';
|
|
3
|
+
'use client';
|
|
3
4
|
import { useGSAP } from '@gsap/react';
|
|
4
5
|
import gsap from 'gsap';
|
|
5
6
|
import { useMemo, useRef } from 'react';
|
|
@@ -70,7 +71,11 @@ function XIcon({ className }) {
|
|
|
70
71
|
})
|
|
71
72
|
});
|
|
72
73
|
}
|
|
73
|
-
export function ResetPasswordForm({ token, resetPasswordAction, onBackToLogin, backToLoginHref, passwordPolicy = {} }) {
|
|
74
|
+
export function ResetPasswordForm({ labels, token, resetPasswordAction, onBackToLogin, backToLoginHref, passwordPolicy = {} }) {
|
|
75
|
+
const say = {
|
|
76
|
+
...DEFAULT_RESET_PASSWORD_LABELS,
|
|
77
|
+
...labels
|
|
78
|
+
};
|
|
74
79
|
const theme = resetPasswordPageTheme;
|
|
75
80
|
const formRef = useRef(null);
|
|
76
81
|
const successRef = useRef(null);
|
|
@@ -218,7 +223,7 @@ export function ResetPasswordForm({ token, resetPasswordAction, onBackToLogin, b
|
|
|
218
223
|
}),
|
|
219
224
|
/*#__PURE__*/ _jsx("h2", {
|
|
220
225
|
className: theme.success.title,
|
|
221
|
-
children:
|
|
226
|
+
children: say.success
|
|
222
227
|
}),
|
|
223
228
|
/*#__PURE__*/ _jsx("p", {
|
|
224
229
|
className: theme.success.message,
|
|
@@ -232,7 +237,7 @@ export function ResetPasswordForm({ token, resetPasswordAction, onBackToLogin, b
|
|
|
232
237
|
className: theme.links.backToLogin,
|
|
233
238
|
children: [
|
|
234
239
|
/*#__PURE__*/ _jsx(ArrowLeftIcon, {}),
|
|
235
|
-
|
|
240
|
+
say.backToLogin
|
|
236
241
|
]
|
|
237
242
|
})
|
|
238
243
|
})
|
|
@@ -260,7 +265,7 @@ export function ResetPasswordForm({ token, resetPasswordAction, onBackToLogin, b
|
|
|
260
265
|
className: theme.input.wrapper,
|
|
261
266
|
children: /*#__PURE__*/ _jsx(NucleusTextInput, {
|
|
262
267
|
type: "password",
|
|
263
|
-
label:
|
|
268
|
+
label: say.newPassword,
|
|
264
269
|
placeholder: "••••••••",
|
|
265
270
|
value: store.newPassword,
|
|
266
271
|
onChange: store.setNewPassword,
|
|
@@ -279,7 +284,7 @@ export function ResetPasswordForm({ token, resetPasswordAction, onBackToLogin, b
|
|
|
279
284
|
className: theme.input.wrapper,
|
|
280
285
|
children: /*#__PURE__*/ _jsx(NucleusTextInput, {
|
|
281
286
|
type: "password",
|
|
282
|
-
label:
|
|
287
|
+
label: say.confirmPassword,
|
|
283
288
|
placeholder: "••••••••",
|
|
284
289
|
value: store.confirmPassword,
|
|
285
290
|
onChange: store.setConfirmPassword,
|
|
@@ -298,7 +303,7 @@ export function ResetPasswordForm({ token, resetPasswordAction, onBackToLogin, b
|
|
|
298
303
|
children: [
|
|
299
304
|
/*#__PURE__*/ _jsx("p", {
|
|
300
305
|
className: theme.requirements.title,
|
|
301
|
-
children:
|
|
306
|
+
children: say.passwordRequirements
|
|
302
307
|
}),
|
|
303
308
|
/*#__PURE__*/ _jsx("ul", {
|
|
304
309
|
className: theme.requirements.list,
|
|
@@ -336,7 +341,7 @@ export function ResetPasswordForm({ token, resetPasswordAction, onBackToLogin, b
|
|
|
336
341
|
disabled: isLoading,
|
|
337
342
|
children: [
|
|
338
343
|
/*#__PURE__*/ _jsx(ArrowLeftIcon, {}),
|
|
339
|
-
|
|
344
|
+
say.backToLogin
|
|
340
345
|
]
|
|
341
346
|
})
|
|
342
347
|
})
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import type { ResetPasswordPageConfig } from '../types';
|
|
3
|
-
export declare function ResetPasswordPage({ logo, title, subtitle, token, resetPasswordAction, onBackToLogin, backToLoginHref, showBackground, className, passwordPolicy, }: ResetPasswordPageConfig): ReactElement;
|
|
3
|
+
export declare function ResetPasswordPage({ labels, logo, title, subtitle, token, resetPasswordAction, onBackToLogin, backToLoginHref, showBackground, className, passwordPolicy, }: ResetPasswordPageConfig): ReactElement;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { DEFAULT_RESET_PASSWORD_LABELS } from '../labels';
|
|
3
|
+
'use client';
|
|
3
4
|
import { useGSAP } from '@gsap/react';
|
|
4
5
|
import gsap from 'gsap';
|
|
5
6
|
import { useRef } from 'react';
|
|
@@ -9,7 +10,11 @@ import { resetPasswordPageTheme } from '../theme';
|
|
|
9
10
|
import { ResetPasswordForm } from './ResetPasswordForm';
|
|
10
11
|
import { ResetPasswordHeader } from './ResetPasswordHeader';
|
|
11
12
|
gsap.registerPlugin(useGSAP);
|
|
12
|
-
export function ResetPasswordPage({ logo, title = 'Reset Password', subtitle = 'Enter your new password below.', token, resetPasswordAction, onBackToLogin, backToLoginHref, showBackground = true, className, passwordPolicy }) {
|
|
13
|
+
export function ResetPasswordPage({ labels, logo, title = 'Reset Password', subtitle = 'Enter your new password below.', token, resetPasswordAction, onBackToLogin, backToLoginHref, showBackground = true, className, passwordPolicy }) {
|
|
14
|
+
const say = {
|
|
15
|
+
...DEFAULT_RESET_PASSWORD_LABELS,
|
|
16
|
+
...labels
|
|
17
|
+
};
|
|
13
18
|
const theme = resetPasswordPageTheme;
|
|
14
19
|
const containerRef = useRef(null);
|
|
15
20
|
const cardRef = useRef(null);
|
|
@@ -32,7 +37,7 @@ export function ResetPasswordPage({ logo, title = 'Reset Password', subtitle = '
|
|
|
32
37
|
return /*#__PURE__*/ _jsxs("main", {
|
|
33
38
|
ref: containerRef,
|
|
34
39
|
className: cn(theme.container.base, className),
|
|
35
|
-
"aria-label":
|
|
40
|
+
"aria-label": say.pageLabel,
|
|
36
41
|
children: [
|
|
37
42
|
showBackground && /*#__PURE__*/ _jsx(AbstractAnimatedBackground, {}),
|
|
38
43
|
/*#__PURE__*/ _jsx("div", {
|
|
@@ -47,6 +52,7 @@ export function ResetPasswordPage({ logo, title = 'Reset Password', subtitle = '
|
|
|
47
52
|
subtitle: subtitle
|
|
48
53
|
}),
|
|
49
54
|
/*#__PURE__*/ _jsx(ResetPasswordForm, {
|
|
55
|
+
labels: labels,
|
|
50
56
|
token: token,
|
|
51
57
|
resetPasswordAction: resetPasswordAction,
|
|
52
58
|
onBackToLogin: onBackToLogin,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { ResetPasswordForm } from './components/ResetPasswordForm';
|
|
2
2
|
export { ResetPasswordHeader } from './components/ResetPasswordHeader';
|
|
3
3
|
export { ResetPasswordPage } from './components/ResetPasswordPage';
|
|
4
|
+
export { DEFAULT_RESET_PASSWORD_LABELS, type ResetPasswordLabels } from './labels';
|
|
4
5
|
export { useResetPasswordStore } from './store';
|
|
5
6
|
export { extendResetPasswordPageTheme, type ResetPasswordPageTheme, resetPasswordPageTheme, } from './theme';
|
|
6
7
|
export type { ResetPasswordAction, ResetPasswordFormProps, ResetPasswordHeaderProps, ResetPasswordPageConfig, ResetPasswordStep, } from './types';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { ResetPasswordForm } from './components/ResetPasswordForm';
|
|
2
2
|
export { ResetPasswordHeader } from './components/ResetPasswordHeader';
|
|
3
3
|
export { ResetPasswordPage } from './components/ResetPasswordPage';
|
|
4
|
+
export { DEFAULT_RESET_PASSWORD_LABELS } from './labels';
|
|
4
5
|
export { useResetPasswordStore } from './store';
|
|
5
6
|
export { extendResetPasswordPageTheme, resetPasswordPageTheme } from './theme';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every word this page says, so a portal can say them in its own language.
|
|
3
|
+
*
|
|
4
|
+
* Defaults stay English, so nothing that does not pass labels changes.
|
|
5
|
+
*/
|
|
6
|
+
export type ResetPasswordLabels = {
|
|
7
|
+
newPassword: string;
|
|
8
|
+
confirmPassword: string;
|
|
9
|
+
passwordRequirements: string;
|
|
10
|
+
success: string;
|
|
11
|
+
backToLogin: string;
|
|
12
|
+
pageLabel: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const DEFAULT_RESET_PASSWORD_LABELS: ResetPasswordLabels;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every word this page says, so a portal can say them in its own language.
|
|
3
|
+
*
|
|
4
|
+
* Defaults stay English, so nothing that does not pass labels changes.
|
|
5
|
+
*/ export const DEFAULT_RESET_PASSWORD_LABELS = {
|
|
6
|
+
newPassword: 'New Password',
|
|
7
|
+
confirmPassword: 'Confirm Password',
|
|
8
|
+
passwordRequirements: 'Password requirements:',
|
|
9
|
+
success: 'Password Reset Successful',
|
|
10
|
+
backToLogin: 'Back to login',
|
|
11
|
+
pageLabel: 'Reset password page'
|
|
12
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { PasswordPolicy } from '../../SetPasswordPage/types';
|
|
3
|
+
import type { ResetPasswordLabels } from '../labels';
|
|
3
4
|
export type ResetPasswordStep = 'form' | 'success';
|
|
4
5
|
export type ResetPasswordAction<TData = unknown, TError = unknown> = {
|
|
5
6
|
start: (config: {
|
|
@@ -20,6 +21,8 @@ export type ResetPasswordAction<TData = unknown, TError = unknown> = {
|
|
|
20
21
|
export interface ResetPasswordPageConfig {
|
|
21
22
|
title?: string;
|
|
22
23
|
subtitle?: string;
|
|
24
|
+
/** Every word the page says, so a portal can say them in its own language. */
|
|
25
|
+
labels?: Partial<ResetPasswordLabels>;
|
|
23
26
|
logo?: ReactNode;
|
|
24
27
|
token: string;
|
|
25
28
|
resetPasswordAction: ResetPasswordAction;
|
|
@@ -30,6 +33,7 @@ export interface ResetPasswordPageConfig {
|
|
|
30
33
|
passwordPolicy?: PasswordPolicy;
|
|
31
34
|
}
|
|
32
35
|
export interface ResetPasswordFormProps {
|
|
36
|
+
labels?: Partial<ResetPasswordLabels>;
|
|
33
37
|
token: string;
|
|
34
38
|
resetPasswordAction: ResetPasswordAction;
|
|
35
39
|
onBackToLogin?: () => void;
|
package/dist/fe/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export { ComponentCanvas, ComponentSidebar, createDefaultRegistry, DesignSystemP
|
|
|
18
18
|
export type { DeviceCardProps, DeviceInfo, DevicesHeaderProps, DevicesPageConfig, DevicesPageProps, DevicesPageVariant, DevicesState, DevicesStatsProps, SessionRevokeAction, SessionRevokeAllAction, SessionsAction, } from './components/DevicesPage';
|
|
19
19
|
export { DeviceCard, DevicesHeader, DevicesPage, useDevicesStore, } from './components/DevicesPage';
|
|
20
20
|
export type { ForgotPasswordAction, ForgotPasswordFormProps, ForgotPasswordHeaderProps, ForgotPasswordPageConfig, ForgotPasswordStep, } from './components/ForgotPasswordPage';
|
|
21
|
-
export { ForgotPasswordPage, useForgotPasswordStore, } from './components/ForgotPasswordPage';
|
|
21
|
+
export { DEFAULT_FORGOT_PASSWORD_LABELS, ForgotPasswordPage, useForgotPasswordStore, } from './components/ForgotPasswordPage';
|
|
22
22
|
export type { FormBuilderProps, FormFieldConfig, FormFieldProps, FormFieldRenderProps, FormFooterRenderProps, FormLayout, FormMode, FormSize, FormState, UseFormBuilderOptions, UseFormBuilderReturn, } from './components/FormBuilder';
|
|
23
23
|
export { FormBuilder, FormField, formBuilderTheme, useFormBuilder, } from './components/FormBuilder';
|
|
24
24
|
export { defaultIntegrationsLabels, extendIntegrationsTheme, IntegrationsPage, integrationsPageTheme, resolveIntegrationsLabels, useIntegrationsStore, } from './components/IntegrationsPage';
|
|
@@ -40,7 +40,7 @@ export { RangePicker } from './components/RangePicker';
|
|
|
40
40
|
export type { PasswordStrength, RegisterAction, RegisterFormData, RegisterFormProps, RegisterHeaderProps, RegisterPageConfig, RegisterPageProps, RegisterPageVariant, RegisterState, } from './components/RegisterPage';
|
|
41
41
|
export { PasswordStrengthIndicator, RegisterPage, useRegisterStore, } from './components/RegisterPage';
|
|
42
42
|
export type { ResetPasswordAction, ResetPasswordFormProps, ResetPasswordHeaderProps, ResetPasswordPageConfig, ResetPasswordStep, } from './components/ResetPasswordPage';
|
|
43
|
-
export { ResetPasswordPage, useResetPasswordStore, } from './components/ResetPasswordPage';
|
|
43
|
+
export { DEFAULT_RESET_PASSWORD_LABELS, ResetPasswordPage, useResetPasswordStore, } from './components/ResetPasswordPage';
|
|
44
44
|
export { SearchBox } from './components/SearchBox';
|
|
45
45
|
export { SelectBox } from './components/SelectBox';
|
|
46
46
|
export type { MagicLinkVerifyAction, PasswordChangeAction, PasswordPolicy, PasswordSetAction, SetPasswordFormProps, SetPasswordHeaderProps, SetPasswordLabels, SetPasswordPageConfig, SetPasswordStep, } from './components/SetPasswordPage';
|
package/dist/fe/index.js
CHANGED
|
@@ -13,7 +13,7 @@ export { DataTable } from './components/DataTable';
|
|
|
13
13
|
export { DatePicker } from './components/DatePicker';
|
|
14
14
|
export { ComponentCanvas, ComponentSidebar, createDefaultRegistry, DesignSystemPage, designSystemTheme, extendDesignSystemTheme, PropsPanel, useDesignSystemStore } from './components/DesignSystem';
|
|
15
15
|
export { DeviceCard, DevicesHeader, DevicesPage, useDevicesStore } from './components/DevicesPage';
|
|
16
|
-
export { ForgotPasswordPage, useForgotPasswordStore } from './components/ForgotPasswordPage';
|
|
16
|
+
export { DEFAULT_FORGOT_PASSWORD_LABELS, ForgotPasswordPage, useForgotPasswordStore } from './components/ForgotPasswordPage';
|
|
17
17
|
export { FormBuilder, FormField, formBuilderTheme, useFormBuilder } from './components/FormBuilder';
|
|
18
18
|
export { defaultIntegrationsLabels, extendIntegrationsTheme, IntegrationsPage, integrationsPageTheme, resolveIntegrationsLabels, useIntegrationsStore } from './components/IntegrationsPage';
|
|
19
19
|
export { LoginPage, useLoginStore } from './components/LoginPage';
|
|
@@ -24,7 +24,7 @@ export { NucleusTextInput } from './components/NucleusTextInput';
|
|
|
24
24
|
export { AddressCard, PhoneCard, ProfileHeader, ProfilePage, useProfileStore } from './components/ProfilePage';
|
|
25
25
|
export { RangePicker } from './components/RangePicker';
|
|
26
26
|
export { PasswordStrengthIndicator, RegisterPage, useRegisterStore } from './components/RegisterPage';
|
|
27
|
-
export { ResetPasswordPage, useResetPasswordStore } from './components/ResetPasswordPage';
|
|
27
|
+
export { DEFAULT_RESET_PASSWORD_LABELS, ResetPasswordPage, useResetPasswordStore } from './components/ResetPasswordPage';
|
|
28
28
|
export { SearchBox } from './components/SearchBox';
|
|
29
29
|
export { SelectBox } from './components/SelectBox';
|
|
30
30
|
export { DEFAULT_PASSWORD_POLICY, DEFAULT_SET_PASSWORD_LABELS, SetPasswordPage, useSetPasswordStore } from './components/SetPasswordPage';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nucleus-core-ts",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.882",
|
|
4
4
|
"description": "Production-ready, enterprise-grade TypeScript framework for building multi-tenant APIs",
|
|
5
5
|
"author": "Hidayet Can Özcan <hidayetcan@gmail.com>",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|