@intlayer/design-system 5.0.1 → 5.0.3
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/.vite/manifest.json +10 -10
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +10 -10
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +10 -10
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.d.ts +150 -10
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.d.ts.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.d.ts +120 -8
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.d.ts.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.d.ts.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.mjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +3 -3
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.d.ts.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +3 -3
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts +75 -5
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +6 -6
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +6 -6
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.d.ts +105 -7
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.d.ts.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.cjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.d.ts +45 -3
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.d.ts.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.d.ts.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.mjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.cjs +7 -7
- package/dist/components/Auth/SignInForm/SignInForm.cjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.d.ts.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.mjs +7 -7
- package/dist/components/Auth/SignInForm/SignInForm.mjs.map +1 -1
- package/dist/components/Auth/SignInForm/signIn.content.d.ts +195 -13
- package/dist/components/Auth/SignInForm/signIn.content.d.ts.map +1 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.cjs.map +1 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.content.d.ts +60 -4
- package/dist/components/Auth/SignInForm/useSignInSchema.content.d.ts.map +1 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.d.ts.map +1 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.mjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs +8 -8
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.d.ts.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs +8 -8
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs.map +1 -1
- package/dist/components/Auth/SignUpForm/signUpForm.content.d.ts +165 -11
- package/dist/components/Auth/SignUpForm/signUpForm.content.d.ts.map +1 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.cjs.map +1 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.d.ts +105 -7
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.d.ts.map +1 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.d.ts.map +1 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.mjs.map +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.cjs +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.cjs.map +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.d.ts.map +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.mjs +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.mjs.map +1 -1
- package/dist/components/Auth/VerifyEmailForm/index.content.d.ts +60 -4
- package/dist/components/Auth/VerifyEmailForm/index.content.d.ts.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.content.d.ts +15 -1
- package/dist/components/Breadcrumb/breadcrumb.content.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.cjs.map +1 -1
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.mjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +4 -4
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +4 -4
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.d.ts +114 -8
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.d.ts +30 -2
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +6 -6
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +6 -6
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts +195 -13
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts +60 -4
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +22 -17
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +22 -17
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +387 -26
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +180 -12
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs +3 -3
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +3 -3
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +165 -11
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +10 -4
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +10 -4
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +6 -6
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +6 -6
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +150 -10
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts +45 -3
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts +60 -4
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/editorView.content.d.ts +105 -7
- package/dist/components/DictionaryFieldEditor/editorView.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs +59 -14
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts +135 -6
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs +59 -14
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
- package/dist/components/IDE/CopyButton.cjs +1 -1
- package/dist/components/IDE/CopyButton.cjs.map +1 -1
- package/dist/components/IDE/CopyButton.content.d.ts +15 -1
- package/dist/components/IDE/CopyButton.content.d.ts.map +1 -1
- package/dist/components/IDE/CopyButton.d.ts.map +1 -1
- package/dist/components/IDE/CopyButton.mjs +1 -1
- package/dist/components/IDE/CopyButton.mjs.map +1 -1
- package/dist/components/Loader/index.content.d.ts +12 -1
- package/dist/components/Loader/index.content.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +5 -5
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +5 -5
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.d.ts +6 -6
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts +105 -7
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +3 -3
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +3 -3
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +75 -5
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts.map +1 -1
- package/dist/{index-Di_3dNqI.js → index-BVYRWLUL.js} +3 -2
- package/dist/index-BVYRWLUL.js.map +1 -0
- package/dist/{index-ZARcTrR0.cjs → index-DTQyeqio.cjs} +3 -2
- package/dist/index-DTQyeqio.cjs.map +1 -0
- package/package.json +19 -19
- package/dist/index-Di_3dNqI.js.map +0 -1
- package/dist/index-ZARcTrR0.cjs.map +0 -1
|
@@ -2,25 +2,179 @@ declare const content: {
|
|
|
2
2
|
key: string;
|
|
3
3
|
content: {
|
|
4
4
|
emailInput: {
|
|
5
|
-
label: import('@intlayer/core').
|
|
6
|
-
|
|
5
|
+
label: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
6
|
+
en: string;
|
|
7
|
+
'en-GB': string;
|
|
8
|
+
fr: string;
|
|
9
|
+
es: string;
|
|
10
|
+
de: string;
|
|
11
|
+
ja: string;
|
|
12
|
+
ko: string;
|
|
13
|
+
zh: string;
|
|
14
|
+
it: string;
|
|
15
|
+
pt: string;
|
|
16
|
+
hi: string;
|
|
17
|
+
ar: string;
|
|
18
|
+
ru: string;
|
|
19
|
+
}>;
|
|
20
|
+
placeholder: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
21
|
+
en: string;
|
|
22
|
+
'en-GB': string;
|
|
23
|
+
fr: string;
|
|
24
|
+
es: string;
|
|
25
|
+
de: string;
|
|
26
|
+
ja: string;
|
|
27
|
+
ko: string;
|
|
28
|
+
zh: string;
|
|
29
|
+
it: string;
|
|
30
|
+
pt: string;
|
|
31
|
+
hi: string;
|
|
32
|
+
ar: string;
|
|
33
|
+
ru: string;
|
|
34
|
+
}>;
|
|
7
35
|
};
|
|
8
36
|
passwordInput: {
|
|
9
|
-
label: import('@intlayer/core').
|
|
10
|
-
|
|
37
|
+
label: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
38
|
+
en: string;
|
|
39
|
+
'en-GB': string;
|
|
40
|
+
fr: string;
|
|
41
|
+
es: string;
|
|
42
|
+
de: string;
|
|
43
|
+
ja: string;
|
|
44
|
+
ko: string;
|
|
45
|
+
zh: string;
|
|
46
|
+
it: string;
|
|
47
|
+
pt: string;
|
|
48
|
+
hi: string;
|
|
49
|
+
ar: string;
|
|
50
|
+
ru: string;
|
|
51
|
+
}>;
|
|
52
|
+
placeholder: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
53
|
+
en: string;
|
|
54
|
+
'en-GB': string;
|
|
55
|
+
fr: string;
|
|
56
|
+
es: string;
|
|
57
|
+
de: string;
|
|
58
|
+
ja: string;
|
|
59
|
+
ko: string;
|
|
60
|
+
zh: string;
|
|
61
|
+
it: string;
|
|
62
|
+
pt: string;
|
|
63
|
+
hi: string;
|
|
64
|
+
ar: string;
|
|
65
|
+
ru: string;
|
|
66
|
+
}>;
|
|
11
67
|
};
|
|
12
68
|
passwordConfirmationInput: {
|
|
13
|
-
label: import('@intlayer/core').
|
|
14
|
-
|
|
69
|
+
label: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
70
|
+
en: string;
|
|
71
|
+
'en-GB': string;
|
|
72
|
+
fr: string;
|
|
73
|
+
es: string;
|
|
74
|
+
de: string;
|
|
75
|
+
ja: string;
|
|
76
|
+
ko: string;
|
|
77
|
+
zh: string;
|
|
78
|
+
it: string;
|
|
79
|
+
pt: string;
|
|
80
|
+
hi: string;
|
|
81
|
+
ar: string;
|
|
82
|
+
ru: string;
|
|
83
|
+
}>;
|
|
84
|
+
placeholder: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
85
|
+
en: string;
|
|
86
|
+
'en-GB': string;
|
|
87
|
+
fr: string;
|
|
88
|
+
es: string;
|
|
89
|
+
de: string;
|
|
90
|
+
ja: string;
|
|
91
|
+
ko: string;
|
|
92
|
+
zh: string;
|
|
93
|
+
it: string;
|
|
94
|
+
pt: string;
|
|
95
|
+
hi: string;
|
|
96
|
+
ar: string;
|
|
97
|
+
ru: string;
|
|
98
|
+
}>;
|
|
15
99
|
};
|
|
16
100
|
signUpButton: {
|
|
17
|
-
text: import('@intlayer/core').
|
|
18
|
-
|
|
101
|
+
text: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
102
|
+
en: string;
|
|
103
|
+
'en-GB': string;
|
|
104
|
+
fr: string;
|
|
105
|
+
es: string;
|
|
106
|
+
de: string;
|
|
107
|
+
ja: string;
|
|
108
|
+
ko: string;
|
|
109
|
+
zh: string;
|
|
110
|
+
it: string;
|
|
111
|
+
pt: string;
|
|
112
|
+
hi: string;
|
|
113
|
+
ar: string;
|
|
114
|
+
ru: string;
|
|
115
|
+
}>;
|
|
116
|
+
ariaLabel: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
117
|
+
en: string;
|
|
118
|
+
'en-GB': string;
|
|
119
|
+
fr: string;
|
|
120
|
+
es: string;
|
|
121
|
+
de: string;
|
|
122
|
+
ja: string;
|
|
123
|
+
ko: string;
|
|
124
|
+
zh: string;
|
|
125
|
+
it: string;
|
|
126
|
+
pt: string;
|
|
127
|
+
hi: string;
|
|
128
|
+
ar: string;
|
|
129
|
+
ru: string;
|
|
130
|
+
}>;
|
|
19
131
|
};
|
|
20
132
|
loginLink: {
|
|
21
|
-
message: import('@intlayer/core').
|
|
22
|
-
|
|
23
|
-
|
|
133
|
+
message: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
134
|
+
en: string;
|
|
135
|
+
'en-GB': string;
|
|
136
|
+
fr: string;
|
|
137
|
+
es: string;
|
|
138
|
+
de: string;
|
|
139
|
+
ja: string;
|
|
140
|
+
ko: string;
|
|
141
|
+
zh: string;
|
|
142
|
+
it: string;
|
|
143
|
+
pt: string;
|
|
144
|
+
hi: string;
|
|
145
|
+
ar: string;
|
|
146
|
+
ru: string;
|
|
147
|
+
}>;
|
|
148
|
+
text: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
149
|
+
en: string;
|
|
150
|
+
'en-GB': string;
|
|
151
|
+
fr: string;
|
|
152
|
+
es: string;
|
|
153
|
+
de: string;
|
|
154
|
+
ja: string;
|
|
155
|
+
ko: string;
|
|
156
|
+
zh: string;
|
|
157
|
+
it: string;
|
|
158
|
+
pt: string;
|
|
159
|
+
hi: string;
|
|
160
|
+
ar: string;
|
|
161
|
+
ru: string;
|
|
162
|
+
}>;
|
|
163
|
+
ariaLabel: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
164
|
+
en: string;
|
|
165
|
+
'en-GB': string;
|
|
166
|
+
fr: string;
|
|
167
|
+
es: string;
|
|
168
|
+
de: string;
|
|
169
|
+
ja: string;
|
|
170
|
+
ko: string;
|
|
171
|
+
zh: string;
|
|
172
|
+
it: string;
|
|
173
|
+
pt: string;
|
|
174
|
+
hi: string;
|
|
175
|
+
ar: string;
|
|
176
|
+
ru: string;
|
|
177
|
+
}>;
|
|
24
178
|
};
|
|
25
179
|
};
|
|
26
180
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signUpForm.content.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/SignUpForm/signUpForm.content.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"signUpForm.content.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/SignUpForm/signUpForm.content.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmLZ,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignUpSchema.cjs","sources":["../../../../src/components/Auth/SignUpForm/useSignUpSchema.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"useSignUpSchema.cjs","sources":["../../../../src/components/Auth/SignUpForm/useSignUpSchema.ts"],"sourcesContent":["import { t, useDictionary } from 'react-intlayer';\nimport { z } from 'zod';\nimport { signUpSchemaContent } from './useSignUpSchema.content';\n\nexport const useSignUpSchema = () => {\n const {\n requiredErrorEmail,\n invalidTypeErrorEmail,\n requiredErrorPassword,\n invalidTypeErrorPassword,\n requiredErrorPasswordConfirmation,\n invalidTypeErrorPasswordConfirmation,\n passwordNotMatchError,\n } = useDictionary(signUpSchemaContent);\n\n return z\n .object({\n email: z\n .string({\n required_error: requiredErrorEmail,\n invalid_type_error: invalidTypeErrorEmail,\n })\n .min(1, { message: invalidTypeErrorEmail })\n .email({ message: invalidTypeErrorEmail }),\n password: z\n .string({\n required_error: requiredErrorPassword,\n invalid_type_error: invalidTypeErrorPassword,\n })\n .min(8, { message: invalidTypeErrorPassword }),\n passwordConfirmation: z\n .string({\n required_error: requiredErrorPasswordConfirmation,\n invalid_type_error: invalidTypeErrorPasswordConfirmation,\n })\n .min(8, { message: invalidTypeErrorPasswordConfirmation }),\n })\n .refine((data) => data.password === data.passwordConfirmation, {\n message: passwordNotMatchError,\n path: ['passwordConfirmation'], // This specifies which field the error should be associated with\n });\n};\n\nexport type SignUp = z.infer<ReturnType<typeof useSignUpSchema>>;\n"],"names":["useDictionary","signUpSchemaContent","z"],"mappings":";;;;;AAIO,MAAM,kBAAkB,MAAM;AAC7B,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACEA,cAAAA,cAAcC,mDAAAA,mBAAmB;AAErC,SAAOC,IAAAA,EACJ,OAAO;AAAA,IACN,OAAOA,MACJ,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,uBAAuB,EACzC,MAAM,EAAE,SAAS,uBAAuB;AAAA,IAC3C,UAAUA,MACP,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,0BAA0B;AAAA,IAC/C,sBAAsBA,MACnB,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,qCAAsC,CAAA;AAAA,EAAA,CAC5D,EACA,OAAO,CAAC,SAAS,KAAK,aAAa,KAAK,sBAAsB;AAAA,IAC7D,SAAS;AAAA,IACT,MAAM,CAAC,sBAAsB;AAAA;AAAA,EAAA,CAC9B;AACL;;"}
|
|
@@ -1,13 +1,111 @@
|
|
|
1
1
|
export declare const signUpSchemaContent: {
|
|
2
2
|
key: string;
|
|
3
3
|
content: {
|
|
4
|
-
requiredErrorEmail: import('@intlayer/core').
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
requiredErrorEmail: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
5
|
+
en: string;
|
|
6
|
+
'en-GB': string;
|
|
7
|
+
fr: string;
|
|
8
|
+
es: string;
|
|
9
|
+
de: string;
|
|
10
|
+
ja: string;
|
|
11
|
+
ko: string;
|
|
12
|
+
zh: string;
|
|
13
|
+
it: string;
|
|
14
|
+
pt: string;
|
|
15
|
+
hi: string;
|
|
16
|
+
ar: string;
|
|
17
|
+
ru: string;
|
|
18
|
+
}>;
|
|
19
|
+
invalidTypeErrorEmail: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
20
|
+
en: string;
|
|
21
|
+
'en-GB': string;
|
|
22
|
+
fr: string;
|
|
23
|
+
es: string;
|
|
24
|
+
de: string;
|
|
25
|
+
ja: string;
|
|
26
|
+
ko: string;
|
|
27
|
+
zh: string;
|
|
28
|
+
it: string;
|
|
29
|
+
pt: string;
|
|
30
|
+
hi: string;
|
|
31
|
+
ar: string;
|
|
32
|
+
ru: string;
|
|
33
|
+
}>;
|
|
34
|
+
requiredErrorPassword: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
35
|
+
en: string;
|
|
36
|
+
'en-GB': string;
|
|
37
|
+
fr: string;
|
|
38
|
+
es: string;
|
|
39
|
+
de: string;
|
|
40
|
+
ja: string;
|
|
41
|
+
ko: string;
|
|
42
|
+
zh: string;
|
|
43
|
+
it: string;
|
|
44
|
+
pt: string;
|
|
45
|
+
hi: string;
|
|
46
|
+
ar: string;
|
|
47
|
+
ru: string;
|
|
48
|
+
}>;
|
|
49
|
+
invalidTypeErrorPassword: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
50
|
+
en: string;
|
|
51
|
+
'en-GB': string;
|
|
52
|
+
fr: string;
|
|
53
|
+
es: string;
|
|
54
|
+
de: string;
|
|
55
|
+
ja: string;
|
|
56
|
+
ko: string;
|
|
57
|
+
zh: string;
|
|
58
|
+
it: string;
|
|
59
|
+
pt: string;
|
|
60
|
+
hi: string;
|
|
61
|
+
ar: string;
|
|
62
|
+
ru: string;
|
|
63
|
+
}>;
|
|
64
|
+
requiredErrorPasswordConfirmation: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
65
|
+
en: string;
|
|
66
|
+
'en-GB': string;
|
|
67
|
+
fr: string;
|
|
68
|
+
es: string;
|
|
69
|
+
de: string;
|
|
70
|
+
ja: string;
|
|
71
|
+
ko: string;
|
|
72
|
+
zh: string;
|
|
73
|
+
it: string;
|
|
74
|
+
pt: string;
|
|
75
|
+
hi: string;
|
|
76
|
+
ar: string;
|
|
77
|
+
ru: string;
|
|
78
|
+
}>;
|
|
79
|
+
invalidTypeErrorPasswordConfirmation: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
80
|
+
en: string;
|
|
81
|
+
'en-GB': string;
|
|
82
|
+
fr: string;
|
|
83
|
+
es: string;
|
|
84
|
+
de: string;
|
|
85
|
+
ja: string;
|
|
86
|
+
ko: string;
|
|
87
|
+
zh: string;
|
|
88
|
+
it: string;
|
|
89
|
+
pt: string;
|
|
90
|
+
hi: string;
|
|
91
|
+
ar: string;
|
|
92
|
+
ru: string;
|
|
93
|
+
}>;
|
|
94
|
+
passwordNotMatchError: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
95
|
+
en: string;
|
|
96
|
+
'en-GB': string;
|
|
97
|
+
fr: string;
|
|
98
|
+
es: string;
|
|
99
|
+
de: string;
|
|
100
|
+
ja: string;
|
|
101
|
+
ko: string;
|
|
102
|
+
zh: string;
|
|
103
|
+
it: string;
|
|
104
|
+
pt: string;
|
|
105
|
+
hi: string;
|
|
106
|
+
ar: string;
|
|
107
|
+
ru: string;
|
|
108
|
+
}>;
|
|
11
109
|
};
|
|
12
110
|
};
|
|
13
111
|
export default signUpSchemaContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignUpSchema.content.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/SignUpForm/useSignUpSchema.content.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"useSignUpSchema.content.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/SignUpForm/useSignUpSchema.content.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmHV,CAAC;AAEvB,eAAe,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignUpSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/SignUpForm/useSignUpSchema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSignUpSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/SignUpForm/useSignUpSchema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;EAqC3B,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignUpSchema.mjs","sources":["../../../../src/components/Auth/SignUpForm/useSignUpSchema.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"useSignUpSchema.mjs","sources":["../../../../src/components/Auth/SignUpForm/useSignUpSchema.ts"],"sourcesContent":["import { t, useDictionary } from 'react-intlayer';\nimport { z } from 'zod';\nimport { signUpSchemaContent } from './useSignUpSchema.content';\n\nexport const useSignUpSchema = () => {\n const {\n requiredErrorEmail,\n invalidTypeErrorEmail,\n requiredErrorPassword,\n invalidTypeErrorPassword,\n requiredErrorPasswordConfirmation,\n invalidTypeErrorPasswordConfirmation,\n passwordNotMatchError,\n } = useDictionary(signUpSchemaContent);\n\n return z\n .object({\n email: z\n .string({\n required_error: requiredErrorEmail,\n invalid_type_error: invalidTypeErrorEmail,\n })\n .min(1, { message: invalidTypeErrorEmail })\n .email({ message: invalidTypeErrorEmail }),\n password: z\n .string({\n required_error: requiredErrorPassword,\n invalid_type_error: invalidTypeErrorPassword,\n })\n .min(8, { message: invalidTypeErrorPassword }),\n passwordConfirmation: z\n .string({\n required_error: requiredErrorPasswordConfirmation,\n invalid_type_error: invalidTypeErrorPasswordConfirmation,\n })\n .min(8, { message: invalidTypeErrorPasswordConfirmation }),\n })\n .refine((data) => data.password === data.passwordConfirmation, {\n message: passwordNotMatchError,\n path: ['passwordConfirmation'], // This specifies which field the error should be associated with\n });\n};\n\nexport type SignUp = z.infer<ReturnType<typeof useSignUpSchema>>;\n"],"names":[],"mappings":";;;AAIO,MAAM,kBAAkB,MAAM;AAC7B,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,cAAc,mBAAmB;AAErC,SAAO,EACJ,OAAO;AAAA,IACN,OAAO,EACJ,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,uBAAuB,EACzC,MAAM,EAAE,SAAS,uBAAuB;AAAA,IAC3C,UAAU,EACP,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,0BAA0B;AAAA,IAC/C,sBAAsB,EACnB,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,qCAAsC,CAAA;AAAA,EAAA,CAC5D,EACA,OAAO,CAAC,SAAS,KAAK,aAAa,KAAK,sBAAsB;AAAA,IAC7D,SAAS;AAAA,IACT,MAAM,CAAC,sBAAsB;AAAA;AAAA,EAAA,CAC9B;AACL;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerifyEmailForm.cjs","sources":["../../../../src/components/Auth/VerifyEmailForm/VerifyEmailForm.tsx"],"sourcesContent":["'use client';\n\nimport { intlayerAPI } from '@intlayer/api';\nimport { Check } from 'lucide-react';\
|
|
1
|
+
{"version":3,"file":"VerifyEmailForm.cjs","sources":["../../../../src/components/Auth/VerifyEmailForm/VerifyEmailForm.tsx"],"sourcesContent":["'use client';\n\nimport { intlayerAPI } from '@intlayer/api';\nimport { Check } from 'lucide-react';\nimport { useEffect, useMemo, useState, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Button } from '../../Button';\nimport { Form, useForm } from '../../Form';\nimport { H3 } from '../../Headers';\nimport { Loader } from '../../Loader';\nimport { useUser } from '../useUser';\nimport content from './index.content';\nimport { getVerifyEmailSchema, VerifyEmail } from './VerifyEmailSchema';\n\ntype VerifyEmailFormProps = {\n onSubmitSuccess: (data: VerifyEmail) => Promise<void>;\n onSubmitError?: (error: Error) => void;\n userId?: string;\n};\n\nexport const VerifyEmailForm: FC<VerifyEmailFormProps> = ({\n userId,\n onSubmitSuccess,\n onSubmitError,\n}) => {\n const VerifyEmailSchema = getVerifyEmailSchema();\n const { revalidateSession, user } = useUser();\n const { verifyEmail, doneButton } = useDictionary(content);\n const [isEmailVerified, setIsEmailVerified] = useState(false);\n const { form } = useForm(VerifyEmailSchema, {});\n\n const targetedUserId = useMemo(\n () => userId ?? user?._id,\n [userId, user?._id]\n );\n\n useEffect(() => {\n if (!targetedUserId) return;\n if (isEmailVerified) return;\n\n // EventSource alow to receive server-sent events from the server\n // In this case, we are listening to the email verification status\n const eventSource = new EventSource(\n intlayerAPI.auth.getVerifyEmailStatusURL(targetedUserId!)\n );\n\n eventSource.onmessage = async (event) => {\n const data = JSON.parse(event.data);\n\n if (data.status === 'verified') {\n // Update your UI to reflect the verification\n\n setIsEmailVerified(true);\n\n await revalidateSession();\n\n eventSource.close(); // Close the connection if no longer needed\n }\n };\n\n eventSource.onerror = (event) => {\n console.error(event);\n // Handle errors or reconnection logic\n eventSource.close();\n };\n\n return () => eventSource.close(); // Clean up on component unmount\n }, [revalidateSession, targetedUserId, userId, user?._id, isEmailVerified]);\n\n return (\n <Form\n schema={VerifyEmailSchema}\n autoComplete\n {...form}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n >\n <H3>{verifyEmail.title}</H3>\n <span className=\"text-neutral dark:text-neutral text-sm\">\n {verifyEmail.description}\n </span>\n <Loader isLoading={!isEmailVerified}>\n <div className=\"bg-success/30 dark:bg-success-dark/30 m-auto aspect-square rounded-full p-5\">\n <Check className=\"text-success dark:text-success-dark\" size={50} />\n </div>\n </Loader>\n <Button\n disabled={!isEmailVerified}\n label={doneButton.text.value}\n type=\"submit\"\n color=\"text\"\n >\n {doneButton.text}\n </Button>\n </Form>\n );\n};\n"],"names":["getVerifyEmailSchema","useUser","useDictionary","content","useState","useForm","useMemo","useEffect","intlayerAPI","jsxs","Form","jsx","H3","Loader","Check","Button"],"mappings":";;;;;;;;;;;;;;;;;AAoBO,MAAM,kBAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,oBAAoBA,kDAAAA,qBAAqB;AAC/C,QAAM,EAAE,mBAAmB,KAAK,IAAIC,sCAAQ;AAC5C,QAAM,EAAE,aAAa,eAAeC,cAAAA,cAAcC,6CAAO;AACzD,QAAM,CAAC,iBAAiB,kBAAkB,IAAIC,WAAAA,SAAS,KAAK;AAC5D,QAAM,EAAE,KAAK,IAAIC,iCAAQ,mBAAmB,CAAA,CAAE;AAE9C,QAAM,iBAAiBC,WAAA;AAAA,IACrB,MAAM,UAAU,MAAM;AAAA,IACtB,CAAC,QAAQ,MAAM,GAAG;AAAA,EACpB;AAEAC,aAAAA,UAAU,MAAM;AACd,QAAI,CAAC,eAAgB;AACrB,QAAI,gBAAiB;AAIrB,UAAM,cAAc,IAAI;AAAA,MACtBC,gBAAY,KAAK,wBAAwB,cAAe;AAAA,IAC1D;AAEY,gBAAA,YAAY,OAAO,UAAU;AACvC,YAAM,OAAO,KAAK,MAAM,MAAM,IAAI;AAE9B,UAAA,KAAK,WAAW,YAAY;AAG9B,2BAAmB,IAAI;AAEvB,cAAM,kBAAkB;AAExB,oBAAY,MAAM;AAAA,MAAA;AAAA,IAEtB;AAEY,gBAAA,UAAU,CAAC,UAAU;AAC/B,cAAQ,MAAM,KAAK;AAEnB,kBAAY,MAAM;AAAA,IACpB;AAEO,WAAA,MAAM,YAAY,MAAM;AAAA,EAAA,GAC9B,CAAC,mBAAmB,gBAAgB,QAAQ,MAAM,KAAK,eAAe,CAAC;AAGxE,SAAAC,2BAAA,kBAAA;AAAA,IAACC,sCAAA;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR,cAAY;AAAA,MACX,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MAEA,UAAA;AAAA,QAACC,2BAAAA,kBAAAA,IAAAC,yBAAAA,IAAA,EAAI,sBAAY,MAAM,CAAA;AAAA,QACtBD,2BAAA,kBAAA,IAAA,QAAA,EAAK,WAAU,0CACb,sBAAY,aACf;AAAA,yDACCE,wBAAAA,QAAO,EAAA,WAAW,CAAC,iBAClB,2DAAC,OAAI,EAAA,WAAU,+EACb,UAAAF,2BAAA,kBAAA,IAACG,qBAAM,WAAU,uCAAsC,MAAM,GAAA,CAAI,EACnE,CAAA,GACF;AAAA,QACAH,2BAAA,kBAAA;AAAA,UAACI,yBAAA;AAAA,UAAA;AAAA,YACC,UAAU,CAAC;AAAA,YACX,OAAO,WAAW,KAAK;AAAA,YACvB,MAAK;AAAA,YACL,OAAM;AAAA,YAEL,UAAW,WAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACd;AAAA,IAAA;AAAA,EACF;AAEJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerifyEmailForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/VerifyEmailForm/VerifyEmailForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VerifyEmailForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/VerifyEmailForm/VerifyEmailForm.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAgC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAQ9D,OAAO,EAAwB,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAExE,KAAK,oBAAoB,GAAG;IAC1B,eAAe,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA4EpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerifyEmailForm.mjs","sources":["../../../../src/components/Auth/VerifyEmailForm/VerifyEmailForm.tsx"],"sourcesContent":["'use client';\n\nimport { intlayerAPI } from '@intlayer/api';\nimport { Check } from 'lucide-react';\
|
|
1
|
+
{"version":3,"file":"VerifyEmailForm.mjs","sources":["../../../../src/components/Auth/VerifyEmailForm/VerifyEmailForm.tsx"],"sourcesContent":["'use client';\n\nimport { intlayerAPI } from '@intlayer/api';\nimport { Check } from 'lucide-react';\nimport { useEffect, useMemo, useState, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Button } from '../../Button';\nimport { Form, useForm } from '../../Form';\nimport { H3 } from '../../Headers';\nimport { Loader } from '../../Loader';\nimport { useUser } from '../useUser';\nimport content from './index.content';\nimport { getVerifyEmailSchema, VerifyEmail } from './VerifyEmailSchema';\n\ntype VerifyEmailFormProps = {\n onSubmitSuccess: (data: VerifyEmail) => Promise<void>;\n onSubmitError?: (error: Error) => void;\n userId?: string;\n};\n\nexport const VerifyEmailForm: FC<VerifyEmailFormProps> = ({\n userId,\n onSubmitSuccess,\n onSubmitError,\n}) => {\n const VerifyEmailSchema = getVerifyEmailSchema();\n const { revalidateSession, user } = useUser();\n const { verifyEmail, doneButton } = useDictionary(content);\n const [isEmailVerified, setIsEmailVerified] = useState(false);\n const { form } = useForm(VerifyEmailSchema, {});\n\n const targetedUserId = useMemo(\n () => userId ?? user?._id,\n [userId, user?._id]\n );\n\n useEffect(() => {\n if (!targetedUserId) return;\n if (isEmailVerified) return;\n\n // EventSource alow to receive server-sent events from the server\n // In this case, we are listening to the email verification status\n const eventSource = new EventSource(\n intlayerAPI.auth.getVerifyEmailStatusURL(targetedUserId!)\n );\n\n eventSource.onmessage = async (event) => {\n const data = JSON.parse(event.data);\n\n if (data.status === 'verified') {\n // Update your UI to reflect the verification\n\n setIsEmailVerified(true);\n\n await revalidateSession();\n\n eventSource.close(); // Close the connection if no longer needed\n }\n };\n\n eventSource.onerror = (event) => {\n console.error(event);\n // Handle errors or reconnection logic\n eventSource.close();\n };\n\n return () => eventSource.close(); // Clean up on component unmount\n }, [revalidateSession, targetedUserId, userId, user?._id, isEmailVerified]);\n\n return (\n <Form\n schema={VerifyEmailSchema}\n autoComplete\n {...form}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n >\n <H3>{verifyEmail.title}</H3>\n <span className=\"text-neutral dark:text-neutral text-sm\">\n {verifyEmail.description}\n </span>\n <Loader isLoading={!isEmailVerified}>\n <div className=\"bg-success/30 dark:bg-success-dark/30 m-auto aspect-square rounded-full p-5\">\n <Check className=\"text-success dark:text-success-dark\" size={50} />\n </div>\n </Loader>\n <Button\n disabled={!isEmailVerified}\n label={doneButton.text.value}\n type=\"submit\"\n color=\"text\"\n >\n {doneButton.text}\n </Button>\n </Form>\n );\n};\n"],"names":["content","jsxs","jsx"],"mappings":";;;;;;;;;;;;;;;AAoBO,MAAM,kBAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,oBAAoB,qBAAqB;AAC/C,QAAM,EAAE,mBAAmB,KAAK,IAAI,QAAQ;AAC5C,QAAM,EAAE,aAAa,eAAe,cAAcA,sBAAO;AACzD,QAAM,CAAC,iBAAiB,kBAAkB,IAAI,SAAS,KAAK;AAC5D,QAAM,EAAE,KAAK,IAAI,QAAQ,mBAAmB,CAAA,CAAE;AAE9C,QAAM,iBAAiB;AAAA,IACrB,MAAM,UAAU,MAAM;AAAA,IACtB,CAAC,QAAQ,MAAM,GAAG;AAAA,EACpB;AAEA,YAAU,MAAM;AACd,QAAI,CAAC,eAAgB;AACrB,QAAI,gBAAiB;AAIrB,UAAM,cAAc,IAAI;AAAA,MACtB,YAAY,KAAK,wBAAwB,cAAe;AAAA,IAC1D;AAEY,gBAAA,YAAY,OAAO,UAAU;AACvC,YAAM,OAAO,KAAK,MAAM,MAAM,IAAI;AAE9B,UAAA,KAAK,WAAW,YAAY;AAG9B,2BAAmB,IAAI;AAEvB,cAAM,kBAAkB;AAExB,oBAAY,MAAM;AAAA,MAAA;AAAA,IAEtB;AAEY,gBAAA,UAAU,CAAC,UAAU;AAC/B,cAAQ,MAAM,KAAK;AAEnB,kBAAY,MAAM;AAAA,IACpB;AAEO,WAAA,MAAM,YAAY,MAAM;AAAA,EAAA,GAC9B,CAAC,mBAAmB,gBAAgB,QAAQ,MAAM,KAAK,eAAe,CAAC;AAGxE,SAAAC,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR,cAAY;AAAA,MACX,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MAEA,UAAA;AAAA,QAACC,kCAAAA,IAAA,IAAA,EAAI,sBAAY,MAAM,CAAA;AAAA,QACtBA,kCAAA,IAAA,QAAA,EAAK,WAAU,0CACb,sBAAY,aACf;AAAA,8CACC,QAAO,EAAA,WAAW,CAAC,iBAClB,gDAAC,OAAI,EAAA,WAAU,+EACb,UAAAA,kCAAA,IAAC,SAAM,WAAU,uCAAsC,MAAM,GAAA,CAAI,EACnE,CAAA,GACF;AAAA,QACAA,kCAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,UAAU,CAAC;AAAA,YACX,OAAO,WAAW,KAAK;AAAA,YACvB,MAAK;AAAA,YACL,OAAM;AAAA,YAEL,UAAW,WAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACd;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -2,12 +2,68 @@ declare const verifyEmailFormContent: {
|
|
|
2
2
|
key: string;
|
|
3
3
|
content: {
|
|
4
4
|
verifyEmail: {
|
|
5
|
-
title: import('@intlayer/core').
|
|
6
|
-
|
|
5
|
+
title: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
6
|
+
en: string;
|
|
7
|
+
'en-GB': string;
|
|
8
|
+
fr: string;
|
|
9
|
+
es: string;
|
|
10
|
+
de: string;
|
|
11
|
+
ja: string;
|
|
12
|
+
ko: string;
|
|
13
|
+
zh: string;
|
|
14
|
+
it: string;
|
|
15
|
+
pt: string;
|
|
16
|
+
hi: string;
|
|
17
|
+
ar: string;
|
|
18
|
+
ru: string;
|
|
19
|
+
}>;
|
|
20
|
+
description: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
21
|
+
en: string;
|
|
22
|
+
'en-GB': string;
|
|
23
|
+
fr: string;
|
|
24
|
+
es: string;
|
|
25
|
+
de: string;
|
|
26
|
+
ja: string;
|
|
27
|
+
ko: string;
|
|
28
|
+
zh: string;
|
|
29
|
+
it: string;
|
|
30
|
+
pt: string;
|
|
31
|
+
hi: string;
|
|
32
|
+
ar: string;
|
|
33
|
+
ru: string;
|
|
34
|
+
}>;
|
|
7
35
|
};
|
|
8
36
|
doneButton: {
|
|
9
|
-
text: import('@intlayer/core').
|
|
10
|
-
|
|
37
|
+
text: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
38
|
+
en: string;
|
|
39
|
+
'en-GB': string;
|
|
40
|
+
fr: string;
|
|
41
|
+
es: string;
|
|
42
|
+
de: string;
|
|
43
|
+
ja: string;
|
|
44
|
+
ko: string;
|
|
45
|
+
zh: string;
|
|
46
|
+
it: string;
|
|
47
|
+
pt: string;
|
|
48
|
+
hi: string;
|
|
49
|
+
ar: string;
|
|
50
|
+
ru: string;
|
|
51
|
+
}>;
|
|
52
|
+
ariaLabel: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
53
|
+
en: string;
|
|
54
|
+
'en-GB': string;
|
|
55
|
+
fr: string;
|
|
56
|
+
es: string;
|
|
57
|
+
de: string;
|
|
58
|
+
ja: string;
|
|
59
|
+
ko: string;
|
|
60
|
+
zh: string;
|
|
61
|
+
it: string;
|
|
62
|
+
pt: string;
|
|
63
|
+
hi: string;
|
|
64
|
+
ar: string;
|
|
65
|
+
ru: string;
|
|
66
|
+
}>;
|
|
11
67
|
};
|
|
12
68
|
};
|
|
13
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.content.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/VerifyEmailForm/index.content.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"index.content.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/VerifyEmailForm/index.content.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqEN,CAAC;AAEvB,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
export declare const breadCrumbContent: {
|
|
2
2
|
key: string;
|
|
3
3
|
content: {
|
|
4
|
-
linkLabel: import('@intlayer/core').
|
|
4
|
+
linkLabel: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
5
|
+
en: string;
|
|
6
|
+
fr: string;
|
|
7
|
+
es: string;
|
|
8
|
+
'en-GB': string;
|
|
9
|
+
de: string;
|
|
10
|
+
ja: string;
|
|
11
|
+
ko: string;
|
|
12
|
+
zh: string;
|
|
13
|
+
it: string;
|
|
14
|
+
pt: string;
|
|
15
|
+
hi: string;
|
|
16
|
+
ar: string;
|
|
17
|
+
ru: string;
|
|
18
|
+
}>;
|
|
5
19
|
};
|
|
6
20
|
};
|
|
7
21
|
export default breadCrumbContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.content.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/breadcrumb.content.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"breadcrumb.content.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/breadcrumb.content.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;CAmBR,CAAC;AAEvB,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/Breadcrumb/index.tsx"],"sourcesContent":["'use client';\n\nimport { Locales } from '@intlayer/config/client';\nimport { ChevronRightIcon } from 'lucide-react';\nimport { Fragment, HTMLAttributes, type FC } from 'react';\
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/Breadcrumb/index.tsx"],"sourcesContent":["'use client';\n\nimport { Locales } from '@intlayer/config/client';\nimport { ChevronRightIcon } from 'lucide-react';\nimport { Fragment, HTMLAttributes, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { cn } from '../../utils/cn';\nimport { Button, type ButtonProps } from '../Button';\nimport { Link, type LinkProps } from '../Link';\nimport { breadCrumbContent } from './breadcrumb.content';\n\ntype LinkLinkProps = {\n children: string;\n position: number;\n locale?: Locales;\n} & Omit<LinkProps, 'children' | 'label'>;\n\nconst LinkLink: FC<LinkLinkProps> = ({\n href,\n lang,\n children,\n onClick,\n color,\n position,\n locale,\n ...props\n}) => {\n const { linkLabel } = useDictionary(breadCrumbContent);\n\n return (\n <>\n <Link\n href={href}\n locale={locale}\n color={color}\n onClick={onClick}\n itemProp=\"item\"\n itemScope\n itemType=\"https://schema.org/WebPage\"\n {...props}\n label={`${linkLabel} ${children}`}\n itemID={href}\n >\n <span itemProp=\"name\">{children}</span>\n </Link>\n <meta itemProp=\"position\" content={position.toString()} />\n </>\n );\n};\n\ntype ButtonButtonProps = {\n children: string;\n position: number;\n} & Omit<ButtonProps, 'children' | 'label'>;\n\nconst ButtonLink: FC<ButtonButtonProps> = ({\n children: text,\n onClick,\n color,\n position,\n ...props\n}) => {\n const { linkLabel } = useDictionary(breadCrumbContent);\n\n return (\n <>\n <Button\n onClick={onClick}\n variant=\"link\"\n label={`${linkLabel} ${text}`}\n color={color}\n itemProp=\"item\"\n {...props}\n >\n <span itemProp=\"name\">{text}</span>\n </Button>\n <meta itemProp=\"position\" content={position.toString()} />\n </>\n );\n};\n\ntype SpanProps = {\n children: string;\n position: number;\n} & HTMLAttributes<HTMLSpanElement>;\n\nconst Span: FC<SpanProps> = ({ children, position, ...props }) => (\n <span itemProp=\"item\">\n <span itemProp=\"name\" {...props}>\n {children}\n </span>\n <meta itemProp=\"position\" content={position.toString()} />\n </span>\n);\n\ntype DetailedBreadcrumbLink = {\n href?: string;\n text: string;\n onClick?: () => void;\n};\nexport type BreadcrumbLink = string | DetailedBreadcrumbLink;\n\nexport type BreadcrumbProps = {\n links: BreadcrumbLink[];\n color?:\n | 'primary'\n | 'destructive'\n | 'neutral'\n | 'light'\n | 'dark'\n | 'text'\n | 'custom';\n locale?: Locales;\n elementType?: 'page' | 'location';\n} & HTMLAttributes<HTMLOListElement>;\n\nexport const Breadcrumb: FC<BreadcrumbProps> = ({\n links,\n className,\n color = 'text',\n locale,\n elementType = 'page',\n ...props\n}) => (\n <nav aria-label=\"breadcrumb\">\n <ol\n className={cn(\n 'flex flex-row flex-wrap items-center gap-2 text-sm',\n className\n )}\n itemScope\n itemType=\"http://schema.org/BreadcrumbList\"\n {...props}\n >\n {links.map((link, index) => {\n const isLastLink = index === links.length - 1;\n const isLink =\n typeof link === 'object' && typeof link.href === 'string';\n const isButton =\n typeof link === 'object' && typeof link.onClick === 'function';\n const isActive = index === links.length - 1;\n const ariaCurrent = isActive ? elementType : undefined;\n\n const text = (link as DetailedBreadcrumbLink).text ?? link;\n\n let section = (\n <Span key={text} position={index + 1} aria-current={ariaCurrent}>\n {text}\n </Span>\n );\n\n if (isLink) {\n section = (\n <LinkLink\n key={text}\n href={link.href!}\n color={color}\n position={index + 1}\n locale={locale}\n aria-current={ariaCurrent}\n >\n {text}\n </LinkLink>\n );\n } else if (isButton) {\n section = (\n <ButtonLink\n key={text}\n onClick={link.onClick!}\n color={color}\n position={index + 1}\n aria-current={ariaCurrent}\n >\n {text}\n </ButtonLink>\n );\n }\n\n const listElement = (\n <li\n itemProp=\"itemListElement\"\n itemScope\n itemType=\"https://schema.org/ListItem\"\n key={text}\n >\n {section}\n </li>\n );\n\n if (isLastLink) {\n return listElement;\n }\n\n return (\n <Fragment key={text}>\n {listElement}\n <ChevronRightIcon size={10} />\n </Fragment>\n );\n })}\n </ol>\n </nav>\n);\n"],"names":["useDictionary","breadCrumbContent","jsxs","Fragment","jsx","Link","Button","cn","ChevronRightIcon"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,OAAO,EAAY,cAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,OAAO,EAAY,cAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AA2F1D,KAAK,sBAAsB,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AACF,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,sBAAsB,CAAC;AAE7D,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,KAAK,CAAC,EACF,SAAS,GACT,aAAa,GACb,SAAS,GACT,OAAO,GACP,MAAM,GACN,MAAM,GACN,QAAQ,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;CACnC,GAAG,cAAc,CAAC,gBAAgB,CAAC,CAAC;AAErC,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAsF1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../src/components/Breadcrumb/index.tsx"],"sourcesContent":["'use client';\n\nimport { Locales } from '@intlayer/config/client';\nimport { ChevronRightIcon } from 'lucide-react';\nimport { Fragment, HTMLAttributes, type FC } from 'react';\
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/components/Breadcrumb/index.tsx"],"sourcesContent":["'use client';\n\nimport { Locales } from '@intlayer/config/client';\nimport { ChevronRightIcon } from 'lucide-react';\nimport { Fragment, HTMLAttributes, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { cn } from '../../utils/cn';\nimport { Button, type ButtonProps } from '../Button';\nimport { Link, type LinkProps } from '../Link';\nimport { breadCrumbContent } from './breadcrumb.content';\n\ntype LinkLinkProps = {\n children: string;\n position: number;\n locale?: Locales;\n} & Omit<LinkProps, 'children' | 'label'>;\n\nconst LinkLink: FC<LinkLinkProps> = ({\n href,\n lang,\n children,\n onClick,\n color,\n position,\n locale,\n ...props\n}) => {\n const { linkLabel } = useDictionary(breadCrumbContent);\n\n return (\n <>\n <Link\n href={href}\n locale={locale}\n color={color}\n onClick={onClick}\n itemProp=\"item\"\n itemScope\n itemType=\"https://schema.org/WebPage\"\n {...props}\n label={`${linkLabel} ${children}`}\n itemID={href}\n >\n <span itemProp=\"name\">{children}</span>\n </Link>\n <meta itemProp=\"position\" content={position.toString()} />\n </>\n );\n};\n\ntype ButtonButtonProps = {\n children: string;\n position: number;\n} & Omit<ButtonProps, 'children' | 'label'>;\n\nconst ButtonLink: FC<ButtonButtonProps> = ({\n children: text,\n onClick,\n color,\n position,\n ...props\n}) => {\n const { linkLabel } = useDictionary(breadCrumbContent);\n\n return (\n <>\n <Button\n onClick={onClick}\n variant=\"link\"\n label={`${linkLabel} ${text}`}\n color={color}\n itemProp=\"item\"\n {...props}\n >\n <span itemProp=\"name\">{text}</span>\n </Button>\n <meta itemProp=\"position\" content={position.toString()} />\n </>\n );\n};\n\ntype SpanProps = {\n children: string;\n position: number;\n} & HTMLAttributes<HTMLSpanElement>;\n\nconst Span: FC<SpanProps> = ({ children, position, ...props }) => (\n <span itemProp=\"item\">\n <span itemProp=\"name\" {...props}>\n {children}\n </span>\n <meta itemProp=\"position\" content={position.toString()} />\n </span>\n);\n\ntype DetailedBreadcrumbLink = {\n href?: string;\n text: string;\n onClick?: () => void;\n};\nexport type BreadcrumbLink = string | DetailedBreadcrumbLink;\n\nexport type BreadcrumbProps = {\n links: BreadcrumbLink[];\n color?:\n | 'primary'\n | 'destructive'\n | 'neutral'\n | 'light'\n | 'dark'\n | 'text'\n | 'custom';\n locale?: Locales;\n elementType?: 'page' | 'location';\n} & HTMLAttributes<HTMLOListElement>;\n\nexport const Breadcrumb: FC<BreadcrumbProps> = ({\n links,\n className,\n color = 'text',\n locale,\n elementType = 'page',\n ...props\n}) => (\n <nav aria-label=\"breadcrumb\">\n <ol\n className={cn(\n 'flex flex-row flex-wrap items-center gap-2 text-sm',\n className\n )}\n itemScope\n itemType=\"http://schema.org/BreadcrumbList\"\n {...props}\n >\n {links.map((link, index) => {\n const isLastLink = index === links.length - 1;\n const isLink =\n typeof link === 'object' && typeof link.href === 'string';\n const isButton =\n typeof link === 'object' && typeof link.onClick === 'function';\n const isActive = index === links.length - 1;\n const ariaCurrent = isActive ? elementType : undefined;\n\n const text = (link as DetailedBreadcrumbLink).text ?? link;\n\n let section = (\n <Span key={text} position={index + 1} aria-current={ariaCurrent}>\n {text}\n </Span>\n );\n\n if (isLink) {\n section = (\n <LinkLink\n key={text}\n href={link.href!}\n color={color}\n position={index + 1}\n locale={locale}\n aria-current={ariaCurrent}\n >\n {text}\n </LinkLink>\n );\n } else if (isButton) {\n section = (\n <ButtonLink\n key={text}\n onClick={link.onClick!}\n color={color}\n position={index + 1}\n aria-current={ariaCurrent}\n >\n {text}\n </ButtonLink>\n );\n }\n\n const listElement = (\n <li\n itemProp=\"itemListElement\"\n itemScope\n itemType=\"https://schema.org/ListItem\"\n key={text}\n >\n {section}\n </li>\n );\n\n if (isLastLink) {\n return listElement;\n }\n\n return (\n <Fragment key={text}>\n {listElement}\n <ChevronRightIcon size={10} />\n </Fragment>\n );\n })}\n </ol>\n </nav>\n);\n"],"names":["jsxs","Fragment","jsx"],"mappings":"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"}
|