@onexapis/cli 1.1.36 → 1.1.37
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/cli.js +5 -1
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +5 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/preview/preview-app.tsx +13 -5
- package/package.json +1 -1
- package/templates/default/AUTH_AND_PROFILE.md +167 -0
- package/templates/default/LAYOUT.md +195 -0
- package/templates/default/bundle-entry.ts +5 -0
- package/templates/default/hooks/index.ts +26 -0
- package/templates/default/hooks/use-forgot-password-form.ts +90 -0
- package/templates/default/hooks/use-login-form.ts +102 -0
- package/templates/default/hooks/use-profile-form.ts +255 -0
- package/templates/default/hooks/use-register-form.ts +154 -0
- package/templates/default/hooks/use-verify-code-form.ts +224 -0
- package/templates/default/index.ts +21 -1
- package/templates/default/pages/forgot-password.ts +41 -0
- package/templates/default/pages/login.ts +41 -0
- package/templates/default/pages/profile.ts +39 -0
- package/templates/default/pages/register.ts +41 -0
- package/templates/default/pages/verify-code.ts +41 -0
- package/templates/default/sections/auth-forgot-password/auth-forgot-password-default.tsx +192 -0
- package/templates/default/sections/auth-forgot-password/auth-forgot-password.schema.ts +150 -0
- package/templates/default/sections/auth-forgot-password/index.ts +14 -0
- package/templates/default/sections/auth-login/auth-login-default.tsx +238 -0
- package/templates/default/sections/auth-login/auth-login.schema.ts +171 -0
- package/templates/default/sections/auth-login/index.ts +14 -0
- package/templates/default/sections/auth-register/auth-register-default.tsx +327 -0
- package/templates/default/sections/auth-register/auth-register.schema.ts +188 -0
- package/templates/default/sections/auth-register/index.ts +14 -0
- package/templates/default/sections/auth-verify-code/auth-verify-code-default.tsx +209 -0
- package/templates/default/sections/auth-verify-code/auth-verify-code.schema.ts +150 -0
- package/templates/default/sections/auth-verify-code/index.ts +14 -0
- package/templates/default/sections/footer/footer-default.tsx +214 -0
- package/templates/default/sections/footer/footer.schema.ts +170 -0
- package/templates/default/sections/footer/index.ts +14 -0
- package/templates/default/sections/header/header-default.tsx +322 -0
- package/templates/default/sections/header/header.schema.ts +168 -0
- package/templates/default/sections/header/index.ts +14 -0
- package/templates/default/sections/profile/index.ts +14 -0
- package/templates/default/sections/profile/profile-default.tsx +522 -0
- package/templates/default/sections/profile/profile.schema.ts +228 -0
- package/templates/default/sections-registry.ts +28 -0
- package/templates/default/theme.layout.ts +53 -2
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My Simple Theme - Login Page Configuration
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { PageConfig } from "@onexapis/core/types";
|
|
6
|
+
|
|
7
|
+
export const loginPageConfig: Omit<
|
|
8
|
+
PageConfig,
|
|
9
|
+
"id" | "createdAt" | "updatedAt"
|
|
10
|
+
> = {
|
|
11
|
+
title: "Login",
|
|
12
|
+
handle: "login",
|
|
13
|
+
path: "/login",
|
|
14
|
+
type: "auth",
|
|
15
|
+
renderMode: "sections",
|
|
16
|
+
themeId: "my-simple",
|
|
17
|
+
editable: true,
|
|
18
|
+
published: true,
|
|
19
|
+
hideHeader: true,
|
|
20
|
+
hideFooter: true,
|
|
21
|
+
|
|
22
|
+
seo: {
|
|
23
|
+
title: "Sign In",
|
|
24
|
+
description: "Sign in to your account",
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
sections: [
|
|
28
|
+
{
|
|
29
|
+
id: "auth-login-1",
|
|
30
|
+
type: "my-simple-auth-login",
|
|
31
|
+
template: "default",
|
|
32
|
+
order: 0,
|
|
33
|
+
enabled: true,
|
|
34
|
+
settings: {},
|
|
35
|
+
components: [],
|
|
36
|
+
blocks: [],
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default loginPageConfig;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My Simple Theme - Profile Page Configuration
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { PageConfig } from "@onexapis/core/types";
|
|
6
|
+
|
|
7
|
+
export const profilePageConfig: Omit<
|
|
8
|
+
PageConfig,
|
|
9
|
+
"id" | "createdAt" | "updatedAt"
|
|
10
|
+
> = {
|
|
11
|
+
title: "Profile",
|
|
12
|
+
handle: "profile",
|
|
13
|
+
path: "/profile",
|
|
14
|
+
type: "account",
|
|
15
|
+
renderMode: "sections",
|
|
16
|
+
themeId: "my-simple",
|
|
17
|
+
editable: true,
|
|
18
|
+
published: true,
|
|
19
|
+
|
|
20
|
+
seo: {
|
|
21
|
+
title: "My Profile",
|
|
22
|
+
description: "Manage your account profile",
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
sections: [
|
|
26
|
+
{
|
|
27
|
+
id: "profile-1",
|
|
28
|
+
type: "my-simple-profile",
|
|
29
|
+
template: "default",
|
|
30
|
+
order: 0,
|
|
31
|
+
enabled: true,
|
|
32
|
+
settings: {},
|
|
33
|
+
components: [],
|
|
34
|
+
blocks: [],
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default profilePageConfig;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My Simple Theme - Register Page Configuration
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { PageConfig } from "@onexapis/core/types";
|
|
6
|
+
|
|
7
|
+
export const registerPageConfig: Omit<
|
|
8
|
+
PageConfig,
|
|
9
|
+
"id" | "createdAt" | "updatedAt"
|
|
10
|
+
> = {
|
|
11
|
+
title: "Register",
|
|
12
|
+
handle: "register",
|
|
13
|
+
path: "/register",
|
|
14
|
+
type: "auth",
|
|
15
|
+
renderMode: "sections",
|
|
16
|
+
themeId: "my-simple",
|
|
17
|
+
editable: true,
|
|
18
|
+
published: true,
|
|
19
|
+
hideHeader: true,
|
|
20
|
+
hideFooter: true,
|
|
21
|
+
|
|
22
|
+
seo: {
|
|
23
|
+
title: "Create Account",
|
|
24
|
+
description: "Create a new account",
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
sections: [
|
|
28
|
+
{
|
|
29
|
+
id: "auth-register-1",
|
|
30
|
+
type: "my-simple-auth-register",
|
|
31
|
+
template: "default",
|
|
32
|
+
order: 0,
|
|
33
|
+
enabled: true,
|
|
34
|
+
settings: {},
|
|
35
|
+
components: [],
|
|
36
|
+
blocks: [],
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default registerPageConfig;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My Simple Theme - Verify Code Page Configuration
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { PageConfig } from "@onexapis/core/types";
|
|
6
|
+
|
|
7
|
+
export const verifyCodePageConfig: Omit<
|
|
8
|
+
PageConfig,
|
|
9
|
+
"id" | "createdAt" | "updatedAt"
|
|
10
|
+
> = {
|
|
11
|
+
title: "Verify Code",
|
|
12
|
+
handle: "verify-code",
|
|
13
|
+
path: "/verify-code",
|
|
14
|
+
type: "auth",
|
|
15
|
+
renderMode: "sections",
|
|
16
|
+
themeId: "my-simple",
|
|
17
|
+
editable: true,
|
|
18
|
+
published: true,
|
|
19
|
+
hideHeader: true,
|
|
20
|
+
hideFooter: true,
|
|
21
|
+
|
|
22
|
+
seo: {
|
|
23
|
+
title: "Verify Your Account",
|
|
24
|
+
description: "Enter the verification code sent to your email",
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
sections: [
|
|
28
|
+
{
|
|
29
|
+
id: "auth-verify-code-1",
|
|
30
|
+
type: "my-simple-auth-verify-code",
|
|
31
|
+
template: "default",
|
|
32
|
+
order: 0,
|
|
33
|
+
enabled: true,
|
|
34
|
+
settings: {},
|
|
35
|
+
components: [],
|
|
36
|
+
blocks: [],
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default verifyCodePageConfig;
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth Forgot Password - Default Template
|
|
3
|
+
* Clean forgot password form with customizable settings
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
"use client";
|
|
7
|
+
|
|
8
|
+
import type { SectionComponentProps } from "@onexapis/core/types";
|
|
9
|
+
import coreUtils from "@onexapis/core/utils";
|
|
10
|
+
import { useForgotPasswordForm } from "../../hooks/use-forgot-password-form";
|
|
11
|
+
|
|
12
|
+
const { getSectionValues } = coreUtils;
|
|
13
|
+
|
|
14
|
+
export function AuthForgotPasswordDefault({
|
|
15
|
+
section,
|
|
16
|
+
schema,
|
|
17
|
+
isEditing,
|
|
18
|
+
}: SectionComponentProps) {
|
|
19
|
+
const { settings } = getSectionValues(section, schema);
|
|
20
|
+
const {
|
|
21
|
+
heading,
|
|
22
|
+
subheading,
|
|
23
|
+
usernameLabel,
|
|
24
|
+
usernamePlaceholder,
|
|
25
|
+
submitButtonText,
|
|
26
|
+
loadingText,
|
|
27
|
+
backToLoginText,
|
|
28
|
+
loginUrl,
|
|
29
|
+
registerPromptText,
|
|
30
|
+
registerLinkText,
|
|
31
|
+
registerUrl,
|
|
32
|
+
backgroundColor,
|
|
33
|
+
cardBackground,
|
|
34
|
+
primaryColor,
|
|
35
|
+
textColor,
|
|
36
|
+
cardBorderRadius,
|
|
37
|
+
} = settings;
|
|
38
|
+
|
|
39
|
+
const { username, error, isPending, handleUsernameChange, handleSubmit } =
|
|
40
|
+
useForgotPasswordForm();
|
|
41
|
+
|
|
42
|
+
const bgColor = String(backgroundColor || "#F9FAFB");
|
|
43
|
+
const cardBg = String(cardBackground || "#FFFFFF");
|
|
44
|
+
const btnColor = String(primaryColor || "#2563EB");
|
|
45
|
+
const headingColor = String(textColor || "#111827");
|
|
46
|
+
const radiusClass = `rounded-${String(cardBorderRadius || "2xl")}`;
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<section
|
|
50
|
+
className="min-h-screen w-full flex items-center justify-center p-4"
|
|
51
|
+
style={{ backgroundColor: bgColor }}
|
|
52
|
+
data-section-id={section.id}
|
|
53
|
+
data-section-type={section.type}
|
|
54
|
+
data-section-template="default"
|
|
55
|
+
>
|
|
56
|
+
<div
|
|
57
|
+
className={`w-full max-w-md shadow-lg p-8 ${radiusClass}`}
|
|
58
|
+
style={{ backgroundColor: cardBg }}
|
|
59
|
+
>
|
|
60
|
+
{/* Header */}
|
|
61
|
+
<div className="text-center mb-8">
|
|
62
|
+
<h1 className="text-2xl font-bold" style={{ color: headingColor }}>
|
|
63
|
+
{String(heading)}
|
|
64
|
+
</h1>
|
|
65
|
+
{subheading && (
|
|
66
|
+
<p className="mt-2 text-sm text-gray-500">{String(subheading)}</p>
|
|
67
|
+
)}
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
{/* Error Message */}
|
|
71
|
+
{error && (
|
|
72
|
+
<div className="mb-4 rounded-lg bg-red-50 border border-red-200 p-3 text-sm text-red-600">
|
|
73
|
+
{error}
|
|
74
|
+
</div>
|
|
75
|
+
)}
|
|
76
|
+
|
|
77
|
+
{/* Form */}
|
|
78
|
+
<form onSubmit={handleSubmit} className="space-y-5">
|
|
79
|
+
{/* Username / Email */}
|
|
80
|
+
<div className="flex flex-col gap-1.5">
|
|
81
|
+
<label
|
|
82
|
+
htmlFor="username"
|
|
83
|
+
className="text-sm font-medium text-gray-700"
|
|
84
|
+
>
|
|
85
|
+
{String(usernameLabel)} <span className="text-red-500">*</span>
|
|
86
|
+
</label>
|
|
87
|
+
<input
|
|
88
|
+
id="username"
|
|
89
|
+
name="username"
|
|
90
|
+
type="text"
|
|
91
|
+
value={username}
|
|
92
|
+
onChange={handleUsernameChange}
|
|
93
|
+
placeholder={String(usernamePlaceholder)}
|
|
94
|
+
disabled={isPending || isEditing}
|
|
95
|
+
className="h-11 w-full rounded-lg border border-gray-300 px-4 text-sm text-gray-900 placeholder:text-gray-400 outline-none transition-colors focus:border-blue-500 focus:ring-1 focus:ring-blue-500 disabled:opacity-50"
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
{/* Submit Button */}
|
|
100
|
+
<button
|
|
101
|
+
type="submit"
|
|
102
|
+
disabled={isPending || isEditing}
|
|
103
|
+
className="h-11 w-full rounded-lg text-sm font-medium text-white transition-colors hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2"
|
|
104
|
+
style={{ backgroundColor: btnColor }}
|
|
105
|
+
>
|
|
106
|
+
{isPending && (
|
|
107
|
+
<svg
|
|
108
|
+
className="h-4 w-4 animate-spin"
|
|
109
|
+
fill="none"
|
|
110
|
+
viewBox="0 0 24 24"
|
|
111
|
+
>
|
|
112
|
+
<circle
|
|
113
|
+
className="opacity-25"
|
|
114
|
+
cx="12"
|
|
115
|
+
cy="12"
|
|
116
|
+
r="10"
|
|
117
|
+
stroke="currentColor"
|
|
118
|
+
strokeWidth="4"
|
|
119
|
+
/>
|
|
120
|
+
<path
|
|
121
|
+
className="opacity-75"
|
|
122
|
+
fill="currentColor"
|
|
123
|
+
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
124
|
+
/>
|
|
125
|
+
</svg>
|
|
126
|
+
)}
|
|
127
|
+
{isPending ? String(loadingText) : String(submitButtonText)}
|
|
128
|
+
</button>
|
|
129
|
+
</form>
|
|
130
|
+
|
|
131
|
+
{/* Back to Login */}
|
|
132
|
+
<div className="mt-6 text-center">
|
|
133
|
+
{isEditing ? (
|
|
134
|
+
<span className="inline-flex items-center gap-2 text-sm text-gray-500">
|
|
135
|
+
<svg
|
|
136
|
+
className="h-4 w-4"
|
|
137
|
+
fill="none"
|
|
138
|
+
viewBox="0 0 24 24"
|
|
139
|
+
stroke="currentColor"
|
|
140
|
+
strokeWidth={2}
|
|
141
|
+
>
|
|
142
|
+
<path d="M10 19l-7-7m0 0l7-7m-7 7h18" />
|
|
143
|
+
</svg>
|
|
144
|
+
{String(backToLoginText)}
|
|
145
|
+
</span>
|
|
146
|
+
) : (
|
|
147
|
+
<a
|
|
148
|
+
href={String(loginUrl)}
|
|
149
|
+
className="inline-flex items-center gap-2 text-sm text-gray-500 hover:text-gray-700 transition-colors"
|
|
150
|
+
>
|
|
151
|
+
<svg
|
|
152
|
+
className="h-4 w-4"
|
|
153
|
+
fill="none"
|
|
154
|
+
viewBox="0 0 24 24"
|
|
155
|
+
stroke="currentColor"
|
|
156
|
+
strokeWidth={2}
|
|
157
|
+
>
|
|
158
|
+
<path d="M10 19l-7-7m0 0l7-7m-7 7h18" />
|
|
159
|
+
</svg>
|
|
160
|
+
{String(backToLoginText)}
|
|
161
|
+
</a>
|
|
162
|
+
)}
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
{/* Register Link */}
|
|
166
|
+
<div className="mt-4 text-center">
|
|
167
|
+
<p className="text-sm text-gray-500">
|
|
168
|
+
{String(registerPromptText)}{" "}
|
|
169
|
+
{isEditing ? (
|
|
170
|
+
<span
|
|
171
|
+
className="font-medium hover:opacity-80"
|
|
172
|
+
style={{ color: btnColor }}
|
|
173
|
+
>
|
|
174
|
+
{String(registerLinkText)}
|
|
175
|
+
</span>
|
|
176
|
+
) : (
|
|
177
|
+
<a
|
|
178
|
+
href={String(registerUrl)}
|
|
179
|
+
className="font-medium hover:opacity-80 transition-colors"
|
|
180
|
+
style={{ color: btnColor }}
|
|
181
|
+
>
|
|
182
|
+
{String(registerLinkText)}
|
|
183
|
+
</a>
|
|
184
|
+
)}
|
|
185
|
+
</p>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
</section>
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export default AuthForgotPasswordDefault;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth Forgot Password Section Schema
|
|
3
|
+
* Forgot password form with editable labels
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { SectionSchema, FieldDefinition } from "@onexapis/core/types";
|
|
7
|
+
|
|
8
|
+
const commonSettings: FieldDefinition[] = [
|
|
9
|
+
{
|
|
10
|
+
id: "heading",
|
|
11
|
+
type: "text",
|
|
12
|
+
label: "Heading",
|
|
13
|
+
default: "Forgot Password",
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: "subheading",
|
|
18
|
+
type: "text",
|
|
19
|
+
label: "Subheading",
|
|
20
|
+
default: "Enter your email or username to receive a verification code",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: "usernameLabel",
|
|
24
|
+
type: "text",
|
|
25
|
+
label: "Email/Username Label",
|
|
26
|
+
default: "Email",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: "usernamePlaceholder",
|
|
30
|
+
type: "text",
|
|
31
|
+
label: "Placeholder",
|
|
32
|
+
default: "Enter your email or username",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: "submitButtonText",
|
|
36
|
+
type: "text",
|
|
37
|
+
label: "Submit Button Text",
|
|
38
|
+
default: "Send Verification Code",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "loadingText",
|
|
42
|
+
type: "text",
|
|
43
|
+
label: "Loading Text",
|
|
44
|
+
default: "Sending...",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: "backToLoginText",
|
|
48
|
+
type: "text",
|
|
49
|
+
label: "Back to Login Text",
|
|
50
|
+
default: "Back to login",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: "loginUrl",
|
|
54
|
+
type: "url",
|
|
55
|
+
label: "Login URL",
|
|
56
|
+
default: "/login",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: "registerPromptText",
|
|
60
|
+
type: "text",
|
|
61
|
+
label: "Register Prompt Text",
|
|
62
|
+
default: "Don't have an account?",
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "registerLinkText",
|
|
66
|
+
type: "text",
|
|
67
|
+
label: "Register Link Text",
|
|
68
|
+
default: "Sign up",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: "registerUrl",
|
|
72
|
+
type: "url",
|
|
73
|
+
label: "Register URL",
|
|
74
|
+
default: "/register",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "backgroundColor",
|
|
78
|
+
type: "color",
|
|
79
|
+
label: "Background Color",
|
|
80
|
+
default: "#F9FAFB",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: "cardBackground",
|
|
84
|
+
type: "color",
|
|
85
|
+
label: "Card Background",
|
|
86
|
+
default: "#FFFFFF",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "primaryColor",
|
|
90
|
+
type: "color",
|
|
91
|
+
label: "Primary Color (buttons)",
|
|
92
|
+
default: "#2563EB",
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: "textColor",
|
|
96
|
+
type: "color",
|
|
97
|
+
label: "Heading Text Color",
|
|
98
|
+
default: "#111827",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: "cardBorderRadius",
|
|
102
|
+
type: "select",
|
|
103
|
+
label: "Card Border Radius",
|
|
104
|
+
default: "2xl",
|
|
105
|
+
options: [
|
|
106
|
+
{ label: "Small", value: "lg" },
|
|
107
|
+
{ label: "Medium", value: "xl" },
|
|
108
|
+
{ label: "Large", value: "2xl" },
|
|
109
|
+
{ label: "Extra Large", value: "3xl" },
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
];
|
|
113
|
+
|
|
114
|
+
export const authForgotPasswordSchema: SectionSchema = {
|
|
115
|
+
type: "my-simple-auth-forgot-password",
|
|
116
|
+
name: "Auth Forgot Password",
|
|
117
|
+
description: "Forgot password form with email/username input",
|
|
118
|
+
category: "auth",
|
|
119
|
+
icon: "key",
|
|
120
|
+
settings: commonSettings,
|
|
121
|
+
templates: [
|
|
122
|
+
{
|
|
123
|
+
id: "default",
|
|
124
|
+
name: "Default Forgot Password",
|
|
125
|
+
description: "Clean forgot password form",
|
|
126
|
+
isDefault: true,
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
defaults: {
|
|
130
|
+
settings: {
|
|
131
|
+
heading: "Forgot Password",
|
|
132
|
+
subheading: "Enter your email or username to receive a verification code",
|
|
133
|
+
usernameLabel: "Email",
|
|
134
|
+
usernamePlaceholder: "Enter your email or username",
|
|
135
|
+
submitButtonText: "Send Verification Code",
|
|
136
|
+
loadingText: "Sending...",
|
|
137
|
+
backToLoginText: "Back to login",
|
|
138
|
+
loginUrl: "/login",
|
|
139
|
+
registerPromptText: "Don't have an account?",
|
|
140
|
+
registerLinkText: "Sign up",
|
|
141
|
+
registerUrl: "/register",
|
|
142
|
+
backgroundColor: "#F9FAFB",
|
|
143
|
+
cardBackground: "#FFFFFF",
|
|
144
|
+
primaryColor: "#2563EB",
|
|
145
|
+
textColor: "#111827",
|
|
146
|
+
cardBorderRadius: "2xl",
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
tags: ["auth", "forgot-password", "reset"],
|
|
150
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth Forgot Password Section
|
|
3
|
+
* Exports schema and component templates
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { SectionComponentProps } from "@onexapis/core/types";
|
|
7
|
+
import { AuthForgotPasswordDefault } from "./auth-forgot-password-default";
|
|
8
|
+
|
|
9
|
+
export const authForgotPasswordComponents: Record<
|
|
10
|
+
string,
|
|
11
|
+
React.ComponentType<SectionComponentProps>
|
|
12
|
+
> = { default: AuthForgotPasswordDefault };
|
|
13
|
+
|
|
14
|
+
export { authForgotPasswordSchema } from "./auth-forgot-password.schema";
|