@adlas/create-app 1.0.15 → 1.0.17
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 +1 -1
- package/templates/boilerplate/components/icons/ChevronRightIcon.tsx +8 -0
- package/templates/boilerplate/components/icons/CloseIcon.tsx +16 -0
- package/templates/boilerplate/components/icons/EyeIcon.tsx +17 -0
- package/templates/boilerplate/components/icons/EyeSlashIcon.tsx +29 -0
- package/templates/boilerplate/components/icons/index.ts +4 -0
- package/templates/boilerplate/validations/auth.validation.ts +0 -92
package/package.json
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
const ChevronRightIcon = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg viewBox="0 0 16 16" fill="none" stroke="foreground" width="1em" height="1em" {...props}>
|
|
5
|
+
<path strokeLinecap="round" strokeLinejoin="round" d="m6 12 4-4-4-4" />
|
|
6
|
+
</svg>
|
|
7
|
+
);
|
|
8
|
+
export default ChevronRightIcon;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
const CloseIcon = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg viewBox="0 0 12 12" fill="none" stroke="foreground" width="1em" height="1em" {...props}>
|
|
5
|
+
<g clipPath="url(#close-icon_svg__a)">
|
|
6
|
+
<path d="M1 11 11 1" />
|
|
7
|
+
<path d="M11 11 1 1" />
|
|
8
|
+
</g>
|
|
9
|
+
<defs>
|
|
10
|
+
<clipPath id="close-icon_svg__a">
|
|
11
|
+
<rect width={12} height={12} />
|
|
12
|
+
</clipPath>
|
|
13
|
+
</defs>
|
|
14
|
+
</svg>
|
|
15
|
+
);
|
|
16
|
+
export default CloseIcon;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
const EyeIcon = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="foreground" width="1em" height="1em" {...props}>
|
|
5
|
+
<path
|
|
6
|
+
strokeLinecap="round"
|
|
7
|
+
strokeLinejoin="round"
|
|
8
|
+
d="M15.58 12c0 1.98-1.6 3.58-3.58 3.58S8.42 13.98 8.42 12s1.6-3.58 3.58-3.58 3.58 1.6 3.58 3.58"
|
|
9
|
+
/>
|
|
10
|
+
<path
|
|
11
|
+
strokeLinecap="round"
|
|
12
|
+
strokeLinejoin="round"
|
|
13
|
+
d="M12 20.27c3.53 0 6.82-2.08 9.11-5.68.9-1.41.9-3.78 0-5.19-2.29-3.6-5.58-5.68-9.11-5.68S5.18 5.8 2.89 9.4c-.9 1.41-.9 3.78 0 5.19 2.29 3.6 5.58 5.68 9.11 5.68"
|
|
14
|
+
/>
|
|
15
|
+
</svg>
|
|
16
|
+
);
|
|
17
|
+
export default EyeIcon;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
const EyeSlashIcon = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="foreground" width="1em" height="1em" {...props}>
|
|
5
|
+
<path
|
|
6
|
+
strokeLinecap="round"
|
|
7
|
+
strokeLinejoin="round"
|
|
8
|
+
d="m14.53 9.47-5.06 5.06a3.576 3.576 0 1 1 5.06-5.06"
|
|
9
|
+
/>
|
|
10
|
+
<path
|
|
11
|
+
strokeLinecap="round"
|
|
12
|
+
strokeLinejoin="round"
|
|
13
|
+
d="M17.82 5.77C16.07 4.45 14.07 3.73 12 3.73c-3.53 0-6.82 2.08-9.11 5.68-.9 1.41-.9 3.78 0 5.19.79 1.24 1.71 2.31 2.71 3.17"
|
|
14
|
+
/>
|
|
15
|
+
<path
|
|
16
|
+
strokeLinecap="round"
|
|
17
|
+
strokeLinejoin="round"
|
|
18
|
+
d="M8.42 19.53c1.14.48 2.35.74 3.58.74 3.53 0 6.82-2.08 9.11-5.68.9-1.41.9-3.78 0-5.19-.33-.52-.69-1.01-1.06-1.47"
|
|
19
|
+
/>
|
|
20
|
+
<path
|
|
21
|
+
strokeLinecap="round"
|
|
22
|
+
strokeLinejoin="round"
|
|
23
|
+
d="M15.51 12.7a3.565 3.565 0 0 1-2.82 2.82"
|
|
24
|
+
/>
|
|
25
|
+
<path strokeLinecap="round" strokeLinejoin="round" d="M9.47 14.53 2 22" />
|
|
26
|
+
<path strokeLinecap="round" strokeLinejoin="round" d="m22 2-7.47 7.47" />
|
|
27
|
+
</svg>
|
|
28
|
+
);
|
|
29
|
+
export default EyeSlashIcon;
|
|
@@ -1 +1,5 @@
|
|
|
1
1
|
export { default as ChevronDownIcon } from './ChevronDownIcon';
|
|
2
|
+
export { default as ChevronRightIcon } from './ChevronRightIcon';
|
|
3
|
+
export { default as CloseIcon } from './CloseIcon';
|
|
4
|
+
export { default as EyeIcon } from './EyeIcon';
|
|
5
|
+
export { default as EyeSlashIcon } from './EyeSlashIcon';
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
confirmPasswordValidationI18n,
|
|
5
|
-
emailValidationI18n,
|
|
6
|
-
firstNameValidationI18n,
|
|
7
|
-
lastNameValidationI18n,
|
|
8
|
-
passwordValidationI18n,
|
|
9
|
-
} from './commonValidations';
|
|
10
|
-
|
|
11
|
-
// ==================== Authentication Validation Schemas with i18n ====================
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Login validation schema with i18n support
|
|
15
|
-
*/
|
|
16
|
-
export const LoginValidationI18n = z.object({
|
|
17
|
-
email: emailValidationI18n,
|
|
18
|
-
password: passwordValidationI18n,
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Register person validation schema with i18n support
|
|
23
|
-
*/
|
|
24
|
-
const _RegisterPersonValidationI18n = z
|
|
25
|
-
.object({
|
|
26
|
-
firstName: firstNameValidationI18n,
|
|
27
|
-
lastName: lastNameValidationI18n,
|
|
28
|
-
email: emailValidationI18n,
|
|
29
|
-
password: passwordValidationI18n,
|
|
30
|
-
confirmPassword: confirmPasswordValidationI18n,
|
|
31
|
-
})
|
|
32
|
-
.refine(data => data.password === data.confirmPassword, {
|
|
33
|
-
path: ['confirmPassword'],
|
|
34
|
-
message: 'Validations.Auth.passwordsDoNotMatch',
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Basic info validation schema with i18n support
|
|
39
|
-
* Used for the first step of registration
|
|
40
|
-
*/
|
|
41
|
-
export const PersonBasicInfoValidationI18n = z.object({
|
|
42
|
-
firstName: firstNameValidationI18n,
|
|
43
|
-
lastName: lastNameValidationI18n,
|
|
44
|
-
email: emailValidationI18n,
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Password step validation schema with i18n support
|
|
49
|
-
* Used for the second step of registration
|
|
50
|
-
*/
|
|
51
|
-
export const PersonPasswordValidationI18n = z
|
|
52
|
-
.object({
|
|
53
|
-
password: passwordValidationI18n,
|
|
54
|
-
confirmPassword: confirmPasswordValidationI18n,
|
|
55
|
-
})
|
|
56
|
-
.refine(data => data.password === data.confirmPassword, {
|
|
57
|
-
path: ['confirmPassword'],
|
|
58
|
-
message: 'Validations.Auth.passwordsDoNotMatch',
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Forgot password request validation schema with i18n support
|
|
63
|
-
*/
|
|
64
|
-
export const ForgotPasswordRequestValidationI18n = z.object({
|
|
65
|
-
email: emailValidationI18n,
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Reset password validation schema with i18n support
|
|
70
|
-
*/
|
|
71
|
-
export const ResetPasswordValidationI18n = z
|
|
72
|
-
.object({
|
|
73
|
-
email: emailValidationI18n,
|
|
74
|
-
token: z.string().min(1, { message: 'Validations.Auth.tokenRequired' }),
|
|
75
|
-
password: passwordValidationI18n,
|
|
76
|
-
confirmPassword: confirmPasswordValidationI18n,
|
|
77
|
-
})
|
|
78
|
-
.refine(data => data.password === data.confirmPassword, {
|
|
79
|
-
path: ['confirmPassword'],
|
|
80
|
-
message: 'Validations.Auth.passwordsDoNotMatch',
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
// ==================== Type Exports ====================
|
|
84
|
-
|
|
85
|
-
export type LoginValidationI18nType = z.infer<typeof LoginValidationI18n>;
|
|
86
|
-
export type RegisterPersonValidationI18nType = z.infer<typeof _RegisterPersonValidationI18n>;
|
|
87
|
-
export type PersonBasicInfoValidationI18nType = z.infer<typeof PersonBasicInfoValidationI18n>;
|
|
88
|
-
export type PersonPasswordValidationI18nType = z.infer<typeof PersonPasswordValidationI18n>;
|
|
89
|
-
export type ForgotPasswordRequestValidationI18nType = z.infer<
|
|
90
|
-
typeof ForgotPasswordRequestValidationI18n
|
|
91
|
-
>;
|
|
92
|
-
export type ResetPasswordValidationI18nType = z.infer<typeof ResetPasswordValidationI18n>;
|