@mdxui/cockpit 0.2.0
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/README.md +136 -0
- package/dist/auth/auth-layout.d.ts +20 -0
- package/dist/auth/auth-layout.js +103 -0
- package/dist/auth/auth-layout.js.map +1 -0
- package/dist/auth/index.d.ts +9 -0
- package/dist/auth/index.js +307 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/login-page.d.ts +33 -0
- package/dist/auth/login-page.js +154 -0
- package/dist/auth/login-page.js.map +1 -0
- package/dist/auth/onboarding-page.d.ts +19 -0
- package/dist/auth/onboarding-page.js +39 -0
- package/dist/auth/onboarding-page.js.map +1 -0
- package/dist/auth/otp-page.d.ts +21 -0
- package/dist/auth/otp-page.js +136 -0
- package/dist/auth/otp-page.js.map +1 -0
- package/dist/auth/password-reset-page.d.ts +24 -0
- package/dist/auth/password-reset-page.js +146 -0
- package/dist/auth/password-reset-page.js.map +1 -0
- package/dist/auth/signup-page.d.ts +33 -0
- package/dist/auth/signup-page.js +150 -0
- package/dist/auth/signup-page.js.map +1 -0
- package/dist/developer/index.d.ts +764 -0
- package/dist/developer/index.js +5791 -0
- package/dist/developer/index.js.map +1 -0
- package/dist/developer/themes/index.d.ts +1 -0
- package/dist/developer/themes/index.js +3 -0
- package/dist/developer/themes/index.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +6077 -0
- package/dist/index.js.map +1 -0
- package/package.json +125 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
var __objRest = (source, exclude) => {
|
|
22
|
+
var target = {};
|
|
23
|
+
for (var prop in source)
|
|
24
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
if (source != null && __getOwnPropSymbols)
|
|
27
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
}
|
|
31
|
+
return target;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// src/auth/signup-page.tsx
|
|
35
|
+
import { SignupForm } from "@mdxui/primitives/auth/signup-form";
|
|
36
|
+
|
|
37
|
+
// src/auth/auth-layout.tsx
|
|
38
|
+
import { cn } from "@mdxui/primitives/lib/utils";
|
|
39
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
40
|
+
function AuthLayout(_a) {
|
|
41
|
+
var _b = _a, {
|
|
42
|
+
className,
|
|
43
|
+
children,
|
|
44
|
+
title,
|
|
45
|
+
subtitle,
|
|
46
|
+
logo,
|
|
47
|
+
backgroundImage,
|
|
48
|
+
showTestimonial = false,
|
|
49
|
+
testimonial
|
|
50
|
+
} = _b, props = __objRest(_b, [
|
|
51
|
+
"className",
|
|
52
|
+
"children",
|
|
53
|
+
"title",
|
|
54
|
+
"subtitle",
|
|
55
|
+
"logo",
|
|
56
|
+
"backgroundImage",
|
|
57
|
+
"showTestimonial",
|
|
58
|
+
"testimonial"
|
|
59
|
+
]);
|
|
60
|
+
return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({ className: cn("min-h-screen w-full lg:grid lg:grid-cols-2", className) }, props), { children: [
|
|
61
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto w-full max-w-[400px] space-y-8 px-4", children: [
|
|
62
|
+
logo && /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: logo }),
|
|
63
|
+
(title || subtitle) && /* @__PURE__ */ jsxs("div", { className: "space-y-2 text-center", children: [
|
|
64
|
+
title && /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold tracking-tight", children: title }),
|
|
65
|
+
subtitle && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: subtitle })
|
|
66
|
+
] }),
|
|
67
|
+
/* @__PURE__ */ jsx("div", { children })
|
|
68
|
+
] }) }),
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
className: "bg-muted hidden lg:block",
|
|
73
|
+
style: backgroundImage ? {
|
|
74
|
+
backgroundImage: `url(${backgroundImage})`,
|
|
75
|
+
backgroundSize: "cover",
|
|
76
|
+
backgroundPosition: "center"
|
|
77
|
+
} : void 0,
|
|
78
|
+
children: showTestimonial && testimonial && !backgroundImage && /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center p-12", children: /* @__PURE__ */ jsx("div", { className: "max-w-md space-y-6", children: /* @__PURE__ */ jsxs("blockquote", { className: "space-y-4", children: [
|
|
79
|
+
/* @__PURE__ */ jsxs("p", { className: "text-lg font-medium leading-relaxed", children: [
|
|
80
|
+
'"',
|
|
81
|
+
testimonial.quote,
|
|
82
|
+
'"'
|
|
83
|
+
] }),
|
|
84
|
+
/* @__PURE__ */ jsxs("footer", { className: "flex items-center gap-3", children: [
|
|
85
|
+
testimonial.avatar && /* @__PURE__ */ jsx(
|
|
86
|
+
"img",
|
|
87
|
+
{
|
|
88
|
+
src: testimonial.avatar,
|
|
89
|
+
alt: testimonial.author,
|
|
90
|
+
className: "size-10 rounded-full"
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
94
|
+
/* @__PURE__ */ jsx("div", { className: "font-semibold", children: testimonial.author }),
|
|
95
|
+
/* @__PURE__ */ jsx("div", { className: "text-muted-foreground text-sm", children: testimonial.role })
|
|
96
|
+
] })
|
|
97
|
+
] })
|
|
98
|
+
] }) }) })
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
] }));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// src/auth/signup-page.tsx
|
|
105
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
106
|
+
function SignupPage({
|
|
107
|
+
onSubmit,
|
|
108
|
+
onOAuthClick,
|
|
109
|
+
onLoginClick,
|
|
110
|
+
isLoading,
|
|
111
|
+
showOAuth = true,
|
|
112
|
+
oauthProviders = ["google", "github"],
|
|
113
|
+
multiStep = false,
|
|
114
|
+
error,
|
|
115
|
+
logo,
|
|
116
|
+
title = "Create an account",
|
|
117
|
+
subtitle = "Get started with your free account",
|
|
118
|
+
backgroundImage,
|
|
119
|
+
showTestimonial = false,
|
|
120
|
+
testimonial
|
|
121
|
+
}) {
|
|
122
|
+
return /* @__PURE__ */ jsx2(
|
|
123
|
+
AuthLayout,
|
|
124
|
+
{
|
|
125
|
+
logo,
|
|
126
|
+
title,
|
|
127
|
+
subtitle,
|
|
128
|
+
backgroundImage,
|
|
129
|
+
showTestimonial,
|
|
130
|
+
testimonial,
|
|
131
|
+
children: /* @__PURE__ */ jsx2(
|
|
132
|
+
SignupForm,
|
|
133
|
+
{
|
|
134
|
+
onSubmit,
|
|
135
|
+
onOAuthClick,
|
|
136
|
+
onLoginClick,
|
|
137
|
+
isLoading,
|
|
138
|
+
showOAuth,
|
|
139
|
+
oauthProviders,
|
|
140
|
+
multiStep,
|
|
141
|
+
error
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
export {
|
|
148
|
+
SignupPage
|
|
149
|
+
};
|
|
150
|
+
//# sourceMappingURL=signup-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/auth/signup-page.tsx","../../src/auth/auth-layout.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { SignupForm } from \"@mdxui/primitives/auth/signup-form\"\nimport { AuthLayout } from \"./auth-layout\"\n\nexport interface SignupPageProps {\n onSubmit?: (data: {\n fullName: string\n email: string\n password: string\n confirmPassword: string\n agreeToTerms: boolean\n }) => void | Promise<void>\n onOAuthClick?: (provider: \"google\" | \"github\" | \"microsoft\") => void | Promise<void>\n onLoginClick?: () => void\n isLoading?: boolean\n showOAuth?: boolean\n oauthProviders?: Array<\"google\" | \"github\" | \"microsoft\">\n multiStep?: boolean\n error?: string\n logo?: React.ReactNode\n title?: string\n subtitle?: string\n backgroundImage?: string\n showTestimonial?: boolean\n testimonial?: {\n quote: string\n author: string\n role: string\n avatar?: string\n }\n}\n\nfunction SignupPage({\n onSubmit,\n onOAuthClick,\n onLoginClick,\n isLoading,\n showOAuth = true,\n oauthProviders = [\"google\", \"github\"],\n multiStep = false,\n error,\n logo,\n title = \"Create an account\",\n subtitle = \"Get started with your free account\",\n backgroundImage,\n showTestimonial = false,\n testimonial,\n}: SignupPageProps) {\n return (\n <AuthLayout\n logo={logo}\n title={title}\n subtitle={subtitle}\n backgroundImage={backgroundImage}\n showTestimonial={showTestimonial}\n testimonial={testimonial}\n >\n <SignupForm\n onSubmit={onSubmit}\n onOAuthClick={onOAuthClick}\n onLoginClick={onLoginClick}\n isLoading={isLoading}\n showOAuth={showOAuth}\n oauthProviders={oauthProviders}\n multiStep={multiStep}\n error={error}\n />\n </AuthLayout>\n )\n}\n\nexport { SignupPage }\n","\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@mdxui/primitives/lib/utils\"\n\nexport interface AuthLayoutProps extends React.ComponentProps<\"div\"> {\n children: React.ReactNode\n title?: string\n subtitle?: string\n logo?: React.ReactNode\n backgroundImage?: string\n showTestimonial?: boolean\n testimonial?: {\n quote: string\n author: string\n role: string\n avatar?: string\n }\n}\n\nfunction AuthLayout({\n className,\n children,\n title,\n subtitle,\n logo,\n backgroundImage,\n showTestimonial = false,\n testimonial,\n ...props\n}: AuthLayoutProps) {\n return (\n <div className={cn(\"min-h-screen w-full lg:grid lg:grid-cols-2\", className)} {...props}>\n {/* Left side - Form */}\n <div className=\"flex items-center justify-center py-12\">\n <div className=\"mx-auto w-full max-w-[400px] space-y-8 px-4\">\n {logo && <div className=\"flex justify-center\">{logo}</div>}\n\n {(title || subtitle) && (\n <div className=\"space-y-2 text-center\">\n {title && (\n <h1 className=\"text-3xl font-bold tracking-tight\">{title}</h1>\n )}\n {subtitle && (\n <p className=\"text-muted-foreground text-sm\">{subtitle}</p>\n )}\n </div>\n )}\n\n <div>{children}</div>\n </div>\n </div>\n\n {/* Right side - Visual/Testimonial */}\n <div\n className=\"bg-muted hidden lg:block\"\n style={\n backgroundImage\n ? {\n backgroundImage: `url(${backgroundImage})`,\n backgroundSize: \"cover\",\n backgroundPosition: \"center\",\n }\n : undefined\n }\n >\n {showTestimonial && testimonial && !backgroundImage && (\n <div className=\"flex h-full items-center justify-center p-12\">\n <div className=\"max-w-md space-y-6\">\n <blockquote className=\"space-y-4\">\n <p className=\"text-lg font-medium leading-relaxed\">\n \"{testimonial.quote}\"\n </p>\n <footer className=\"flex items-center gap-3\">\n {testimonial.avatar && (\n <img\n src={testimonial.avatar}\n alt={testimonial.author}\n className=\"size-10 rounded-full\"\n />\n )}\n <div>\n <div className=\"font-semibold\">{testimonial.author}</div>\n <div className=\"text-muted-foreground text-sm\">\n {testimonial.role}\n </div>\n </div>\n </footer>\n </blockquote>\n </div>\n </div>\n )}\n </div>\n </div>\n )\n}\n\nexport { AuthLayout }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,SAAS,kBAAkB;;;ACA3B,SAAS,UAAU;AAiCA,cAGP,YAHO;AAhBnB,SAAS,WAAW,IAUA;AAVA,eAClB;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,kBAAkB;AAAA,IAClB;AAAA,EA5BF,IAoBoB,IASf,kBATe,IASf;AAAA,IARH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,SACE,qBAAC,sCAAI,WAAW,GAAG,8CAA8C,SAAS,KAAO,QAAhF,EAEC;AAAA,wBAAC,SAAI,WAAU,0CACb,+BAAC,SAAI,WAAU,+CACZ;AAAA,cAAQ,oBAAC,SAAI,WAAU,uBAAuB,gBAAK;AAAA,OAElD,SAAS,aACT,qBAAC,SAAI,WAAU,yBACZ;AAAA,iBACC,oBAAC,QAAG,WAAU,qCAAqC,iBAAM;AAAA,QAE1D,YACC,oBAAC,OAAE,WAAU,iCAAiC,oBAAS;AAAA,SAE3D;AAAA,MAGF,oBAAC,SAAK,UAAS;AAAA,OACjB,GACF;AAAA,IAGA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,OACE,kBACI;AAAA,UACE,iBAAiB,OAAO,eAAe;AAAA,UACvC,gBAAgB;AAAA,UAChB,oBAAoB;AAAA,QACtB,IACA;AAAA,QAGL,6BAAmB,eAAe,CAAC,mBAClC,oBAAC,SAAI,WAAU,gDACb,8BAAC,SAAI,WAAU,sBACb,+BAAC,gBAAW,WAAU,aACpB;AAAA,+BAAC,OAAE,WAAU,u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