@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
package/README.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# @mdxui/cockpit
|
|
2
|
+
|
|
3
|
+
App template components for mdxui - developer dashboards, auth flows, and SaaS patterns.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @mdxui/cockpit @mdxui/primitives @mdxui/themes mdxui
|
|
9
|
+
# or
|
|
10
|
+
pnpm add @mdxui/cockpit @mdxui/primitives @mdxui/themes mdxui
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { App, DeveloperDashboard } from '@mdxui/cockpit'
|
|
17
|
+
|
|
18
|
+
export default function Dashboard() {
|
|
19
|
+
return (
|
|
20
|
+
<App
|
|
21
|
+
branding={{
|
|
22
|
+
name: 'My App',
|
|
23
|
+
logo: <Logo />,
|
|
24
|
+
}}
|
|
25
|
+
theme="default"
|
|
26
|
+
/>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Auth Pages
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import { LoginPage, SignupPage, OTPPage } from '@mdxui/cockpit/auth'
|
|
35
|
+
|
|
36
|
+
// Login page with all options
|
|
37
|
+
<LoginPage
|
|
38
|
+
logo={<Logo />}
|
|
39
|
+
title="Welcome back"
|
|
40
|
+
onSubmit={handleLogin}
|
|
41
|
+
providers={['google', 'github']}
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
// Signup with onboarding
|
|
45
|
+
<SignupPage
|
|
46
|
+
logo={<Logo />}
|
|
47
|
+
onSubmit={handleSignup}
|
|
48
|
+
/>
|
|
49
|
+
|
|
50
|
+
// OTP verification
|
|
51
|
+
<OTPPage
|
|
52
|
+
logo={<Logo />}
|
|
53
|
+
email="user@example.com"
|
|
54
|
+
onVerify={handleVerify}
|
|
55
|
+
/>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Components
|
|
59
|
+
|
|
60
|
+
### Main Dashboard
|
|
61
|
+
- `App` / `DeveloperDashboard` - Full dashboard wrapper with routing
|
|
62
|
+
- `DashboardLayout` - Layout with sidebar navigation
|
|
63
|
+
- `DashboardGrid` - Responsive grid for dashboard widgets
|
|
64
|
+
|
|
65
|
+
### Auth Components
|
|
66
|
+
- `AuthLayout` - Shared auth page layout
|
|
67
|
+
- `LoginPage` - Login with social providers
|
|
68
|
+
- `SignupPage` - Registration flow
|
|
69
|
+
- `PasswordResetPage` - Password recovery
|
|
70
|
+
- `OTPPage` - One-time password verification
|
|
71
|
+
- `OnboardingPage` - User onboarding wizard
|
|
72
|
+
|
|
73
|
+
### Dashboard Widgets
|
|
74
|
+
- `KPICard` - Key performance indicator cards
|
|
75
|
+
- `AreaChart` - Area chart visualization
|
|
76
|
+
- `BarChart` - Bar chart visualization
|
|
77
|
+
- `LineChart` - Line chart visualization
|
|
78
|
+
- `DataTable` - Sortable, filterable data table
|
|
79
|
+
- `ActivityFeed` - Recent activity timeline
|
|
80
|
+
|
|
81
|
+
### App Features
|
|
82
|
+
- `APIKeyManager` - API key creation and management
|
|
83
|
+
- `TeamManager` - Team member management
|
|
84
|
+
- `Billing` - Subscription and billing UI
|
|
85
|
+
- `UserProfile` - User profile settings
|
|
86
|
+
- `SettingsPage` - App settings
|
|
87
|
+
|
|
88
|
+
### Navigation
|
|
89
|
+
- `NavMain` - Main navigation menu
|
|
90
|
+
- `NavUser` - User menu dropdown
|
|
91
|
+
- `TeamSwitcher` - Workspace/team switcher
|
|
92
|
+
- `CommandPalette` - Keyboard-driven command palette
|
|
93
|
+
|
|
94
|
+
### Theme System
|
|
95
|
+
```tsx
|
|
96
|
+
import { useThemeStore, ThemeScript } from '@mdxui/cockpit/themes'
|
|
97
|
+
|
|
98
|
+
// In your root layout
|
|
99
|
+
<ThemeScript />
|
|
100
|
+
|
|
101
|
+
// Toggle theme
|
|
102
|
+
const { theme, setTheme } = useThemeStore()
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Exports
|
|
106
|
+
|
|
107
|
+
```tsx
|
|
108
|
+
// Main export
|
|
109
|
+
import { App, DeveloperDashboard } from '@mdxui/cockpit'
|
|
110
|
+
|
|
111
|
+
// Developer components
|
|
112
|
+
import { KPICard, DataTable } from '@mdxui/cockpit/developer'
|
|
113
|
+
|
|
114
|
+
// Auth pages
|
|
115
|
+
import { LoginPage, SignupPage } from '@mdxui/cockpit/auth'
|
|
116
|
+
|
|
117
|
+
// Theme utilities
|
|
118
|
+
import { useThemeStore, ThemeScript } from '@mdxui/cockpit/themes'
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Peer Dependencies
|
|
122
|
+
|
|
123
|
+
- `react` ^18.0.0 || ^19.0.0
|
|
124
|
+
- `@mdxui/primitives` - Base UI components
|
|
125
|
+
- `@mdxui/themes` - Theme system
|
|
126
|
+
- `mdxui` - Core types and contracts
|
|
127
|
+
|
|
128
|
+
## Links
|
|
129
|
+
|
|
130
|
+
- [Documentation](https://mdxui.dev)
|
|
131
|
+
- [GitHub](https://github.com/dot-do/ui)
|
|
132
|
+
- [npm](https://www.npmjs.com/package/@mdxui/cockpit)
|
|
133
|
+
|
|
134
|
+
## License
|
|
135
|
+
|
|
136
|
+
MIT
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
interface AuthLayoutProps extends React.ComponentProps<"div"> {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
title?: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
logo?: React.ReactNode;
|
|
9
|
+
backgroundImage?: string;
|
|
10
|
+
showTestimonial?: boolean;
|
|
11
|
+
testimonial?: {
|
|
12
|
+
quote: string;
|
|
13
|
+
author: string;
|
|
14
|
+
role: string;
|
|
15
|
+
avatar?: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
declare function AuthLayout({ className, children, title, subtitle, logo, backgroundImage, showTestimonial, testimonial, ...props }: AuthLayoutProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { AuthLayout, type AuthLayoutProps };
|
|
@@ -0,0 +1,103 @@
|
|
|
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/auth-layout.tsx
|
|
35
|
+
import { cn } from "@mdxui/primitives/lib/utils";
|
|
36
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
37
|
+
function AuthLayout(_a) {
|
|
38
|
+
var _b = _a, {
|
|
39
|
+
className,
|
|
40
|
+
children,
|
|
41
|
+
title,
|
|
42
|
+
subtitle,
|
|
43
|
+
logo,
|
|
44
|
+
backgroundImage,
|
|
45
|
+
showTestimonial = false,
|
|
46
|
+
testimonial
|
|
47
|
+
} = _b, props = __objRest(_b, [
|
|
48
|
+
"className",
|
|
49
|
+
"children",
|
|
50
|
+
"title",
|
|
51
|
+
"subtitle",
|
|
52
|
+
"logo",
|
|
53
|
+
"backgroundImage",
|
|
54
|
+
"showTestimonial",
|
|
55
|
+
"testimonial"
|
|
56
|
+
]);
|
|
57
|
+
return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({ className: cn("min-h-screen w-full lg:grid lg:grid-cols-2", className) }, props), { children: [
|
|
58
|
+
/* @__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: [
|
|
59
|
+
logo && /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: logo }),
|
|
60
|
+
(title || subtitle) && /* @__PURE__ */ jsxs("div", { className: "space-y-2 text-center", children: [
|
|
61
|
+
title && /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold tracking-tight", children: title }),
|
|
62
|
+
subtitle && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: subtitle })
|
|
63
|
+
] }),
|
|
64
|
+
/* @__PURE__ */ jsx("div", { children })
|
|
65
|
+
] }) }),
|
|
66
|
+
/* @__PURE__ */ jsx(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: "bg-muted hidden lg:block",
|
|
70
|
+
style: backgroundImage ? {
|
|
71
|
+
backgroundImage: `url(${backgroundImage})`,
|
|
72
|
+
backgroundSize: "cover",
|
|
73
|
+
backgroundPosition: "center"
|
|
74
|
+
} : void 0,
|
|
75
|
+
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: [
|
|
76
|
+
/* @__PURE__ */ jsxs("p", { className: "text-lg font-medium leading-relaxed", children: [
|
|
77
|
+
'"',
|
|
78
|
+
testimonial.quote,
|
|
79
|
+
'"'
|
|
80
|
+
] }),
|
|
81
|
+
/* @__PURE__ */ jsxs("footer", { className: "flex items-center gap-3", children: [
|
|
82
|
+
testimonial.avatar && /* @__PURE__ */ jsx(
|
|
83
|
+
"img",
|
|
84
|
+
{
|
|
85
|
+
src: testimonial.avatar,
|
|
86
|
+
alt: testimonial.author,
|
|
87
|
+
className: "size-10 rounded-full"
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
91
|
+
/* @__PURE__ */ jsx("div", { className: "font-semibold", children: testimonial.author }),
|
|
92
|
+
/* @__PURE__ */ jsx("div", { className: "text-muted-foreground text-sm", children: testimonial.role })
|
|
93
|
+
] })
|
|
94
|
+
] })
|
|
95
|
+
] }) }) })
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
] }));
|
|
99
|
+
}
|
|
100
|
+
export {
|
|
101
|
+
AuthLayout
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=auth-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/auth/auth-layout.tsx"],"sourcesContent":["\"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,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,uCAAsC;AAAA;AAAA,YAC/C,YAAY;AAAA,YAAM;AAAA,aACtB;AAAA,UACA,qBAAC,YAAO,WAAU,2BACf;AAAA,wBAAY,UACX;AAAA,cAAC;AAAA;AAAA,gBACC,KAAK,YAAY;AAAA,gBACjB,KAAK,YAAY;AAAA,gBACjB,WAAU;AAAA;AAAA,YACZ;AAAA,YAEF,qBAAC,SACC;AAAA,kCAAC,SAAI,WAAU,iBAAiB,sBAAY,QAAO;AAAA,cACnD,oBAAC,SAAI,WAAU,iCACZ,sBAAY,MACf;AAAA,eACF;AAAA,aACF;AAAA,WACF,GACF,GACF;AAAA;AAAA,IAEJ;AAAA,MACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { AuthLayout, AuthLayoutProps } from './auth-layout.js';
|
|
2
|
+
export { LoginPage, LoginPageProps } from './login-page.js';
|
|
3
|
+
export { SignupPage, SignupPageProps } from './signup-page.js';
|
|
4
|
+
export { PasswordResetPage, PasswordResetPageProps } from './password-reset-page.js';
|
|
5
|
+
export { OTPPage, OTPPageProps } from './otp-page.js';
|
|
6
|
+
export { OnboardingPage, OnboardingPageProps } from './onboarding-page.js';
|
|
7
|
+
import 'react/jsx-runtime';
|
|
8
|
+
import 'react';
|
|
9
|
+
import '@mdxui/primitives/auth/onboarding-wizard';
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// src/auth/auth-layout.tsx
|
|
34
|
+
import { cn } from "@mdxui/primitives/lib/utils";
|
|
35
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
36
|
+
function AuthLayout(_a) {
|
|
37
|
+
var _b = _a, {
|
|
38
|
+
className,
|
|
39
|
+
children,
|
|
40
|
+
title,
|
|
41
|
+
subtitle,
|
|
42
|
+
logo,
|
|
43
|
+
backgroundImage,
|
|
44
|
+
showTestimonial = false,
|
|
45
|
+
testimonial
|
|
46
|
+
} = _b, props = __objRest(_b, [
|
|
47
|
+
"className",
|
|
48
|
+
"children",
|
|
49
|
+
"title",
|
|
50
|
+
"subtitle",
|
|
51
|
+
"logo",
|
|
52
|
+
"backgroundImage",
|
|
53
|
+
"showTestimonial",
|
|
54
|
+
"testimonial"
|
|
55
|
+
]);
|
|
56
|
+
return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({ className: cn("min-h-screen w-full lg:grid lg:grid-cols-2", className) }, props), { children: [
|
|
57
|
+
/* @__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: [
|
|
58
|
+
logo && /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: logo }),
|
|
59
|
+
(title || subtitle) && /* @__PURE__ */ jsxs("div", { className: "space-y-2 text-center", children: [
|
|
60
|
+
title && /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold tracking-tight", children: title }),
|
|
61
|
+
subtitle && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: subtitle })
|
|
62
|
+
] }),
|
|
63
|
+
/* @__PURE__ */ jsx("div", { children })
|
|
64
|
+
] }) }),
|
|
65
|
+
/* @__PURE__ */ jsx(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
className: "bg-muted hidden lg:block",
|
|
69
|
+
style: backgroundImage ? {
|
|
70
|
+
backgroundImage: `url(${backgroundImage})`,
|
|
71
|
+
backgroundSize: "cover",
|
|
72
|
+
backgroundPosition: "center"
|
|
73
|
+
} : void 0,
|
|
74
|
+
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: [
|
|
75
|
+
/* @__PURE__ */ jsxs("p", { className: "text-lg font-medium leading-relaxed", children: [
|
|
76
|
+
'"',
|
|
77
|
+
testimonial.quote,
|
|
78
|
+
'"'
|
|
79
|
+
] }),
|
|
80
|
+
/* @__PURE__ */ jsxs("footer", { className: "flex items-center gap-3", children: [
|
|
81
|
+
testimonial.avatar && /* @__PURE__ */ jsx(
|
|
82
|
+
"img",
|
|
83
|
+
{
|
|
84
|
+
src: testimonial.avatar,
|
|
85
|
+
alt: testimonial.author,
|
|
86
|
+
className: "size-10 rounded-full"
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
90
|
+
/* @__PURE__ */ jsx("div", { className: "font-semibold", children: testimonial.author }),
|
|
91
|
+
/* @__PURE__ */ jsx("div", { className: "text-muted-foreground text-sm", children: testimonial.role })
|
|
92
|
+
] })
|
|
93
|
+
] })
|
|
94
|
+
] }) }) })
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
] }));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// src/auth/login-page.tsx
|
|
101
|
+
import { LoginForm } from "@mdxui/primitives/auth/login-form";
|
|
102
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
103
|
+
function LoginPage({
|
|
104
|
+
onSubmit,
|
|
105
|
+
onOAuthClick,
|
|
106
|
+
onMagicLinkClick,
|
|
107
|
+
onForgotPasswordClick,
|
|
108
|
+
onSignupClick,
|
|
109
|
+
isLoading,
|
|
110
|
+
showOAuth = true,
|
|
111
|
+
showMagicLink = false,
|
|
112
|
+
oauthProviders = ["google", "github"],
|
|
113
|
+
error,
|
|
114
|
+
logo,
|
|
115
|
+
title = "Welcome back",
|
|
116
|
+
subtitle = "Sign in to your account to continue",
|
|
117
|
+
backgroundImage,
|
|
118
|
+
showTestimonial = false,
|
|
119
|
+
testimonial
|
|
120
|
+
}) {
|
|
121
|
+
return /* @__PURE__ */ jsx2(
|
|
122
|
+
AuthLayout,
|
|
123
|
+
{
|
|
124
|
+
logo,
|
|
125
|
+
title,
|
|
126
|
+
subtitle,
|
|
127
|
+
backgroundImage,
|
|
128
|
+
showTestimonial,
|
|
129
|
+
testimonial,
|
|
130
|
+
children: /* @__PURE__ */ jsx2(
|
|
131
|
+
LoginForm,
|
|
132
|
+
{
|
|
133
|
+
onSubmit,
|
|
134
|
+
onOAuthClick,
|
|
135
|
+
onMagicLinkClick,
|
|
136
|
+
onForgotPasswordClick,
|
|
137
|
+
onSignupClick,
|
|
138
|
+
isLoading,
|
|
139
|
+
showOAuth,
|
|
140
|
+
showMagicLink,
|
|
141
|
+
oauthProviders,
|
|
142
|
+
error
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// src/auth/signup-page.tsx
|
|
150
|
+
import { SignupForm } from "@mdxui/primitives/auth/signup-form";
|
|
151
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
152
|
+
function SignupPage({
|
|
153
|
+
onSubmit,
|
|
154
|
+
onOAuthClick,
|
|
155
|
+
onLoginClick,
|
|
156
|
+
isLoading,
|
|
157
|
+
showOAuth = true,
|
|
158
|
+
oauthProviders = ["google", "github"],
|
|
159
|
+
multiStep = false,
|
|
160
|
+
error,
|
|
161
|
+
logo,
|
|
162
|
+
title = "Create an account",
|
|
163
|
+
subtitle = "Get started with your free account",
|
|
164
|
+
backgroundImage,
|
|
165
|
+
showTestimonial = false,
|
|
166
|
+
testimonial
|
|
167
|
+
}) {
|
|
168
|
+
return /* @__PURE__ */ jsx3(
|
|
169
|
+
AuthLayout,
|
|
170
|
+
{
|
|
171
|
+
logo,
|
|
172
|
+
title,
|
|
173
|
+
subtitle,
|
|
174
|
+
backgroundImage,
|
|
175
|
+
showTestimonial,
|
|
176
|
+
testimonial,
|
|
177
|
+
children: /* @__PURE__ */ jsx3(
|
|
178
|
+
SignupForm,
|
|
179
|
+
{
|
|
180
|
+
onSubmit,
|
|
181
|
+
onOAuthClick,
|
|
182
|
+
onLoginClick,
|
|
183
|
+
isLoading,
|
|
184
|
+
showOAuth,
|
|
185
|
+
oauthProviders,
|
|
186
|
+
multiStep,
|
|
187
|
+
error
|
|
188
|
+
}
|
|
189
|
+
)
|
|
190
|
+
}
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// src/auth/password-reset-page.tsx
|
|
195
|
+
import { PasswordResetForm } from "@mdxui/primitives/auth/password-reset-form";
|
|
196
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
197
|
+
function PasswordResetPage({
|
|
198
|
+
mode = "request",
|
|
199
|
+
onRequestSubmit,
|
|
200
|
+
onConfirmSubmit,
|
|
201
|
+
onBackToLogin,
|
|
202
|
+
isLoading,
|
|
203
|
+
error,
|
|
204
|
+
successMessage,
|
|
205
|
+
logo,
|
|
206
|
+
title,
|
|
207
|
+
subtitle,
|
|
208
|
+
backgroundImage
|
|
209
|
+
}) {
|
|
210
|
+
const defaultTitle = mode === "request" ? "Reset your password" : "Create new password";
|
|
211
|
+
const defaultSubtitle = mode === "request" ? "We'll send you a link to reset your password" : "Enter your new password below";
|
|
212
|
+
return /* @__PURE__ */ jsx4(
|
|
213
|
+
AuthLayout,
|
|
214
|
+
{
|
|
215
|
+
logo,
|
|
216
|
+
title: title || defaultTitle,
|
|
217
|
+
subtitle: subtitle || defaultSubtitle,
|
|
218
|
+
backgroundImage,
|
|
219
|
+
children: /* @__PURE__ */ jsx4(
|
|
220
|
+
PasswordResetForm,
|
|
221
|
+
{
|
|
222
|
+
mode,
|
|
223
|
+
onRequestSubmit,
|
|
224
|
+
onConfirmSubmit,
|
|
225
|
+
onBackToLogin,
|
|
226
|
+
isLoading,
|
|
227
|
+
error,
|
|
228
|
+
successMessage
|
|
229
|
+
}
|
|
230
|
+
)
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// src/auth/otp-page.tsx
|
|
236
|
+
import { OTPInputForm } from "@mdxui/primitives/auth/otp-input";
|
|
237
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
238
|
+
function OTPPage({
|
|
239
|
+
onSubmit,
|
|
240
|
+
onResend,
|
|
241
|
+
isLoading,
|
|
242
|
+
error,
|
|
243
|
+
canResend = false,
|
|
244
|
+
resendTimeout = 60,
|
|
245
|
+
logo,
|
|
246
|
+
title = "Two-Factor Authentication",
|
|
247
|
+
subtitle = "Enter the code from your authenticator app",
|
|
248
|
+
description,
|
|
249
|
+
backgroundImage
|
|
250
|
+
}) {
|
|
251
|
+
return /* @__PURE__ */ jsx5(AuthLayout, { logo, backgroundImage, children: /* @__PURE__ */ jsx5(
|
|
252
|
+
OTPInputForm,
|
|
253
|
+
{
|
|
254
|
+
onSubmit,
|
|
255
|
+
onResend,
|
|
256
|
+
isLoading,
|
|
257
|
+
error,
|
|
258
|
+
title,
|
|
259
|
+
description: description || subtitle,
|
|
260
|
+
canResend,
|
|
261
|
+
resendTimeout
|
|
262
|
+
}
|
|
263
|
+
) });
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// src/auth/onboarding-page.tsx
|
|
267
|
+
import { OnboardingWizard } from "@mdxui/primitives/auth/onboarding-wizard";
|
|
268
|
+
import { cn as cn2 } from "@mdxui/primitives/lib/utils";
|
|
269
|
+
import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
270
|
+
function OnboardingPage({
|
|
271
|
+
steps,
|
|
272
|
+
onComplete,
|
|
273
|
+
onSkip,
|
|
274
|
+
allowSkip = false,
|
|
275
|
+
isLoading,
|
|
276
|
+
logo,
|
|
277
|
+
title = "Welcome! Let's get you set up",
|
|
278
|
+
subtitle = "This will only take a few minutes",
|
|
279
|
+
showProgress = true,
|
|
280
|
+
className
|
|
281
|
+
}) {
|
|
282
|
+
return /* @__PURE__ */ jsx6("div", { className: cn2("flex min-h-screen items-center justify-center p-4", className), children: /* @__PURE__ */ jsxs2("div", { className: "w-full space-y-8", children: [
|
|
283
|
+
logo && /* @__PURE__ */ jsx6("div", { className: "flex justify-center", children: logo }),
|
|
284
|
+
/* @__PURE__ */ jsx6(
|
|
285
|
+
OnboardingWizard,
|
|
286
|
+
{
|
|
287
|
+
steps,
|
|
288
|
+
onComplete,
|
|
289
|
+
onSkip,
|
|
290
|
+
allowSkip,
|
|
291
|
+
isLoading,
|
|
292
|
+
title,
|
|
293
|
+
subtitle,
|
|
294
|
+
showProgress
|
|
295
|
+
}
|
|
296
|
+
)
|
|
297
|
+
] }) });
|
|
298
|
+
}
|
|
299
|
+
export {
|
|
300
|
+
AuthLayout,
|
|
301
|
+
LoginPage,
|
|
302
|
+
OTPPage,
|
|
303
|
+
OnboardingPage,
|
|
304
|
+
PasswordResetPage,
|
|
305
|
+
SignupPage
|
|
306
|
+
};
|
|
307
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/auth/auth-layout.tsx","../../src/auth/login-page.tsx","../../src/auth/signup-page.tsx","../../src/auth/password-reset-page.tsx","../../src/auth/otp-page.tsx","../../src/auth/onboarding-page.tsx"],"sourcesContent":["\"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","\"use client\"\n\nimport * as React from \"react\"\nimport { LoginForm } from \"@mdxui/primitives/auth/login-form\"\nimport { AuthLayout } from \"./auth-layout\"\n\nexport interface LoginPageProps {\n onSubmit?: (data: { email: string; password: string; rememberMe?: boolean }) => void | Promise<void>\n onOAuthClick?: (provider: \"google\" | \"github\" | \"microsoft\") => void | Promise<void>\n onMagicLinkClick?: (email: string) => void | Promise<void>\n onForgotPasswordClick?: () => void\n onSignupClick?: () => void\n isLoading?: boolean\n showOAuth?: boolean\n showMagicLink?: boolean\n oauthProviders?: Array<\"google\" | \"github\" | \"microsoft\">\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 LoginPage({\n onSubmit,\n onOAuthClick,\n onMagicLinkClick,\n onForgotPasswordClick,\n onSignupClick,\n isLoading,\n showOAuth = true,\n showMagicLink = false,\n oauthProviders = [\"google\", \"github\"],\n error,\n logo,\n title = \"Welcome back\",\n subtitle = \"Sign in to your account to continue\",\n backgroundImage,\n showTestimonial = false,\n testimonial,\n}: LoginPageProps) {\n return (\n <AuthLayout\n logo={logo}\n title={title}\n subtitle={subtitle}\n backgroundImage={backgroundImage}\n showTestimonial={showTestimonial}\n testimonial={testimonial}\n >\n <LoginForm\n onSubmit={onSubmit}\n onOAuthClick={onOAuthClick}\n onMagicLinkClick={onMagicLinkClick}\n onForgotPasswordClick={onForgotPasswordClick}\n onSignupClick={onSignupClick}\n isLoading={isLoading}\n showOAuth={showOAuth}\n showMagicLink={showMagicLink}\n oauthProviders={oauthProviders}\n error={error}\n />\n </AuthLayout>\n )\n}\n\nexport { LoginPage }\n","\"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 { PasswordResetForm } from \"@mdxui/primitives/auth/password-reset-form\"\nimport { AuthLayout } from \"./auth-layout\"\n\nexport interface PasswordResetPageProps {\n mode?: \"request\" | \"confirm\"\n onRequestSubmit?: (data: { email: string }) => void | Promise<void>\n onConfirmSubmit?: (data: { password: string; confirmPassword: string }) => void | Promise<void>\n onBackToLogin?: () => void\n isLoading?: boolean\n error?: string\n successMessage?: string\n logo?: React.ReactNode\n title?: string\n subtitle?: string\n backgroundImage?: string\n}\n\nfunction PasswordResetPage({\n mode = \"request\",\n onRequestSubmit,\n onConfirmSubmit,\n onBackToLogin,\n isLoading,\n error,\n successMessage,\n logo,\n title,\n subtitle,\n backgroundImage,\n}: PasswordResetPageProps) {\n const defaultTitle =\n mode === \"request\" ? \"Reset your password\" : \"Create new password\"\n const defaultSubtitle =\n mode === \"request\"\n ? \"We'll send you a link to reset your password\"\n : \"Enter your new password below\"\n\n return (\n <AuthLayout\n logo={logo}\n title={title || defaultTitle}\n subtitle={subtitle || defaultSubtitle}\n backgroundImage={backgroundImage}\n >\n <PasswordResetForm\n mode={mode}\n onRequestSubmit={onRequestSubmit}\n onConfirmSubmit={onConfirmSubmit}\n onBackToLogin={onBackToLogin}\n isLoading={isLoading}\n error={error}\n successMessage={successMessage}\n />\n </AuthLayout>\n )\n}\n\nexport { PasswordResetPage }\n","\"use client\"\n\nimport * as React from \"react\"\nimport { OTPInputForm } from \"@mdxui/primitives/auth/otp-input\"\nimport { AuthLayout } from \"./auth-layout\"\n\nexport interface OTPPageProps {\n onSubmit?: (data: { otp: string }) => void | Promise<void>\n onResend?: () => void | Promise<void>\n isLoading?: boolean\n error?: string\n canResend?: boolean\n resendTimeout?: number\n logo?: React.ReactNode\n title?: string\n subtitle?: string\n description?: string\n backgroundImage?: string\n}\n\nfunction OTPPage({\n onSubmit,\n onResend,\n isLoading,\n error,\n canResend = false,\n resendTimeout = 60,\n logo,\n title = \"Two-Factor Authentication\",\n subtitle = \"Enter the code from your authenticator app\",\n description,\n backgroundImage,\n}: OTPPageProps) {\n return (\n <AuthLayout logo={logo} backgroundImage={backgroundImage}>\n <OTPInputForm\n onSubmit={onSubmit}\n onResend={onResend}\n isLoading={isLoading}\n error={error}\n title={title}\n description={description || subtitle}\n canResend={canResend}\n resendTimeout={resendTimeout}\n />\n </AuthLayout>\n )\n}\n\nexport { OTPPage }\n","\"use client\"\n\nimport * as React from \"react\"\nimport { OnboardingWizard, type OnboardingStep } from \"@mdxui/primitives/auth/onboarding-wizard\"\nimport { cn } from \"@mdxui/primitives/lib/utils\"\n\nexport interface OnboardingPageProps {\n steps: OnboardingStep[]\n onComplete?: (data: Record<string, any>) => void | Promise<void>\n onSkip?: () => void\n allowSkip?: boolean\n isLoading?: boolean\n logo?: React.ReactNode\n title?: string\n subtitle?: string\n showProgress?: boolean\n className?: string\n}\n\nfunction OnboardingPage({\n steps,\n onComplete,\n onSkip,\n allowSkip = false,\n isLoading,\n logo,\n title = \"Welcome! Let's get you set up\",\n subtitle = \"This will only take a few minutes\",\n showProgress = true,\n className,\n}: OnboardingPageProps) {\n return (\n <div className={cn(\"flex min-h-screen items-center justify-center p-4\", className)}>\n <div className=\"w-full space-y-8\">\n {logo && <div className=\"flex justify-center\">{logo}</div>}\n\n <OnboardingWizard\n steps={steps}\n onComplete={onComplete}\n onSkip={onSkip}\n allowSkip={allowSkip}\n isLoading={isLoading}\n title={title}\n subtitle={subtitle}\n showProgress={showProgress}\n />\n </div>\n </div>\n )\n}\n\nexport { OnboardingPage }\n"],"mappings":"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","names":["jsx","jsx","jsx","jsx","cn","jsx","jsxs"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
interface LoginPageProps {
|
|
5
|
+
onSubmit?: (data: {
|
|
6
|
+
email: string;
|
|
7
|
+
password: string;
|
|
8
|
+
rememberMe?: boolean;
|
|
9
|
+
}) => void | Promise<void>;
|
|
10
|
+
onOAuthClick?: (provider: "google" | "github" | "microsoft") => void | Promise<void>;
|
|
11
|
+
onMagicLinkClick?: (email: string) => void | Promise<void>;
|
|
12
|
+
onForgotPasswordClick?: () => void;
|
|
13
|
+
onSignupClick?: () => void;
|
|
14
|
+
isLoading?: boolean;
|
|
15
|
+
showOAuth?: boolean;
|
|
16
|
+
showMagicLink?: boolean;
|
|
17
|
+
oauthProviders?: Array<"google" | "github" | "microsoft">;
|
|
18
|
+
error?: string;
|
|
19
|
+
logo?: React.ReactNode;
|
|
20
|
+
title?: string;
|
|
21
|
+
subtitle?: string;
|
|
22
|
+
backgroundImage?: string;
|
|
23
|
+
showTestimonial?: boolean;
|
|
24
|
+
testimonial?: {
|
|
25
|
+
quote: string;
|
|
26
|
+
author: string;
|
|
27
|
+
role: string;
|
|
28
|
+
avatar?: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
declare function LoginPage({ onSubmit, onOAuthClick, onMagicLinkClick, onForgotPasswordClick, onSignupClick, isLoading, showOAuth, showMagicLink, oauthProviders, error, logo, title, subtitle, backgroundImage, showTestimonial, testimonial, }: LoginPageProps): react_jsx_runtime.JSX.Element;
|
|
32
|
+
|
|
33
|
+
export { LoginPage, type LoginPageProps };
|