@dravyn/auth-ui 0.1.1
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/chunk-35G4WYX3.mjs +154 -0
- package/dist/chunk-35G4WYX3.mjs.map +1 -0
- package/dist/chunk-6BBGRN4E.mjs +1 -0
- package/dist/chunk-6BBGRN4E.mjs.map +1 -0
- package/dist/chunk-FAI3ERB3.mjs +209 -0
- package/dist/chunk-FAI3ERB3.mjs.map +1 -0
- package/dist/chunk-FVXZZTKL.mjs +152 -0
- package/dist/chunk-FVXZZTKL.mjs.map +1 -0
- package/dist/chunk-Z2ICX4UY.mjs +132 -0
- package/dist/chunk-Z2ICX4UY.mjs.map +1 -0
- package/dist/index.css +235 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +678 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +22 -0
- package/dist/index.mjs.map +1 -0
- package/dist/screens/ForgotResetScreen.css +235 -0
- package/dist/screens/ForgotResetScreen.css.map +1 -0
- package/dist/screens/ForgotResetScreen.d.mts +17 -0
- package/dist/screens/ForgotResetScreen.d.ts +17 -0
- package/dist/screens/ForgotResetScreen.js +245 -0
- package/dist/screens/ForgotResetScreen.js.map +1 -0
- package/dist/screens/ForgotResetScreen.mjs +11 -0
- package/dist/screens/ForgotResetScreen.mjs.map +1 -0
- package/dist/screens/LoginScreen.css +235 -0
- package/dist/screens/LoginScreen.css.map +1 -0
- package/dist/screens/LoginScreen.d.mts +36 -0
- package/dist/screens/LoginScreen.d.ts +36 -0
- package/dist/screens/LoginScreen.js +167 -0
- package/dist/screens/LoginScreen.js.map +1 -0
- package/dist/screens/LoginScreen.mjs +9 -0
- package/dist/screens/LoginScreen.mjs.map +1 -0
- package/dist/screens/OTPScreen.css +235 -0
- package/dist/screens/OTPScreen.css.map +1 -0
- package/dist/screens/OTPScreen.d.mts +16 -0
- package/dist/screens/OTPScreen.d.ts +16 -0
- package/dist/screens/OTPScreen.js +187 -0
- package/dist/screens/OTPScreen.js.map +1 -0
- package/dist/screens/OTPScreen.mjs +9 -0
- package/dist/screens/OTPScreen.mjs.map +1 -0
- package/dist/screens/RegisterScreen.css +235 -0
- package/dist/screens/RegisterScreen.css.map +1 -0
- package/dist/screens/RegisterScreen.d.mts +21 -0
- package/dist/screens/RegisterScreen.d.ts +21 -0
- package/dist/screens/RegisterScreen.js +189 -0
- package/dist/screens/RegisterScreen.js.map +1 -0
- package/dist/screens/RegisterScreen.mjs +9 -0
- package/dist/screens/RegisterScreen.mjs.map +1 -0
- package/package.json +39 -0
- package/src/screens/auth.css +260 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// src/screens/LoginScreen.tsx
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Button } from "@dravyn/ui";
|
|
4
|
+
import { Input } from "@dravyn/ui";
|
|
5
|
+
import { Alert } from "@dravyn/ui";
|
|
6
|
+
var LoginScreen = ({
|
|
7
|
+
redirectTo = "/dashboard",
|
|
8
|
+
showRegisterLink = true,
|
|
9
|
+
onSuccess,
|
|
10
|
+
logo,
|
|
11
|
+
brandName = "Dravyn",
|
|
12
|
+
apiBase = process.env.NEXT_PUBLIC_AUTH_API_URL ?? "http://localhost:3001"
|
|
13
|
+
}) => {
|
|
14
|
+
const [email, setEmail] = React.useState("");
|
|
15
|
+
const [password, setPassword] = React.useState("");
|
|
16
|
+
const [showPass, setShowPass] = React.useState(false);
|
|
17
|
+
const [loading, setLoading] = React.useState(false);
|
|
18
|
+
const [error, setError] = React.useState("");
|
|
19
|
+
const emailRef = React.useRef(null);
|
|
20
|
+
React.useEffect(() => {
|
|
21
|
+
emailRef.current?.focus();
|
|
22
|
+
}, []);
|
|
23
|
+
const validate = () => {
|
|
24
|
+
if (!email.trim()) return "Email address is required.";
|
|
25
|
+
if (!/\S+@\S+\.\S+/.test(email)) return "Enter a valid email address.";
|
|
26
|
+
if (!password) return "Password is required.";
|
|
27
|
+
if (password.length < 6) return "Password must be at least 6 characters.";
|
|
28
|
+
return null;
|
|
29
|
+
};
|
|
30
|
+
const handleSubmit = async (e) => {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
const err = validate();
|
|
33
|
+
if (err) {
|
|
34
|
+
setError(err);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
setLoading(true);
|
|
38
|
+
setError("");
|
|
39
|
+
try {
|
|
40
|
+
const res = await fetch(`${apiBase}/auth/login`, {
|
|
41
|
+
method: "POST",
|
|
42
|
+
headers: { "Content-Type": "application/json" },
|
|
43
|
+
body: JSON.stringify({ email: email.trim().toLowerCase(), password })
|
|
44
|
+
});
|
|
45
|
+
const data = await res.json();
|
|
46
|
+
if (!res.ok) {
|
|
47
|
+
setError(data.message ?? "Invalid email or password.");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
localStorage.setItem("dravyn_token", data.accessToken);
|
|
51
|
+
localStorage.setItem("dravyn_user", JSON.stringify(data.user));
|
|
52
|
+
if (onSuccess) {
|
|
53
|
+
onSuccess(data.accessToken, data.user);
|
|
54
|
+
} else {
|
|
55
|
+
window.location.href = redirectTo;
|
|
56
|
+
}
|
|
57
|
+
} catch {
|
|
58
|
+
setError("Unable to connect. Please check your internet connection.");
|
|
59
|
+
} finally {
|
|
60
|
+
setLoading(false);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const handleGoogle = async () => {
|
|
64
|
+
window.location.href = `${apiBase}/auth/google`;
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ React.createElement("div", { className: "dauth-root" }, /* @__PURE__ */ React.createElement("div", { className: "dauth-card" }, /* @__PURE__ */ React.createElement("div", { className: "dauth-brand" }, logo ?? /* @__PURE__ */ React.createElement("div", { className: "dauth-logo-default" }, /* @__PURE__ */ React.createElement("span", { className: "dauth-logo-dot" }), brandName)), /* @__PURE__ */ React.createElement("h1", { className: "dauth-title" }, "Welcome back"), /* @__PURE__ */ React.createElement("p", { className: "dauth-sub" }, "Sign in to your ", brandName, " account"), error && /* @__PURE__ */ React.createElement("div", { style: { marginBottom: 16 } }, /* @__PURE__ */ React.createElement(Alert, { variant: "danger" }, error)), /* @__PURE__ */ React.createElement("form", { onSubmit: handleSubmit, noValidate: true }, /* @__PURE__ */ React.createElement("div", { className: "dauth-fields" }, /* @__PURE__ */ React.createElement(
|
|
67
|
+
Input,
|
|
68
|
+
{
|
|
69
|
+
ref: emailRef,
|
|
70
|
+
label: "Email address",
|
|
71
|
+
type: "email",
|
|
72
|
+
placeholder: "you@example.com",
|
|
73
|
+
value: email,
|
|
74
|
+
onChange: (e) => setEmail(e.target.value),
|
|
75
|
+
leftIcon: /* @__PURE__ */ React.createElement(EmailIcon, null),
|
|
76
|
+
autoComplete: "email",
|
|
77
|
+
required: true
|
|
78
|
+
}
|
|
79
|
+
), /* @__PURE__ */ React.createElement("div", { className: "dauth-password-wrap" }, /* @__PURE__ */ React.createElement(
|
|
80
|
+
Input,
|
|
81
|
+
{
|
|
82
|
+
label: "Password",
|
|
83
|
+
type: showPass ? "text" : "password",
|
|
84
|
+
placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
|
|
85
|
+
value: password,
|
|
86
|
+
onChange: (e) => setPassword(e.target.value),
|
|
87
|
+
leftIcon: /* @__PURE__ */ React.createElement(LockIcon, null),
|
|
88
|
+
rightIcon: /* @__PURE__ */ React.createElement(
|
|
89
|
+
"button",
|
|
90
|
+
{
|
|
91
|
+
type: "button",
|
|
92
|
+
className: "dauth-eye",
|
|
93
|
+
onClick: () => setShowPass((v) => !v),
|
|
94
|
+
"aria-label": showPass ? "Hide password" : "Show password"
|
|
95
|
+
},
|
|
96
|
+
showPass ? /* @__PURE__ */ React.createElement(EyeOffIcon, null) : /* @__PURE__ */ React.createElement(EyeIcon, null)
|
|
97
|
+
),
|
|
98
|
+
autoComplete: "current-password",
|
|
99
|
+
required: true
|
|
100
|
+
}
|
|
101
|
+
), /* @__PURE__ */ React.createElement("a", { href: "/auth/forgot-password", className: "dauth-forgot" }, "Forgot password?"))), /* @__PURE__ */ React.createElement(
|
|
102
|
+
Button,
|
|
103
|
+
{
|
|
104
|
+
type: "submit",
|
|
105
|
+
variant: "primary",
|
|
106
|
+
fullWidth: true,
|
|
107
|
+
loading,
|
|
108
|
+
style: { marginTop: 8 }
|
|
109
|
+
},
|
|
110
|
+
"Sign in"
|
|
111
|
+
)), /* @__PURE__ */ React.createElement("div", { className: "dauth-divider" }, /* @__PURE__ */ React.createElement("span", null, "or continue with")), /* @__PURE__ */ React.createElement(
|
|
112
|
+
"button",
|
|
113
|
+
{
|
|
114
|
+
type: "button",
|
|
115
|
+
className: "dauth-google-btn",
|
|
116
|
+
onClick: handleGoogle,
|
|
117
|
+
disabled: loading
|
|
118
|
+
},
|
|
119
|
+
/* @__PURE__ */ React.createElement(GoogleIcon, null),
|
|
120
|
+
"Continue with Google"
|
|
121
|
+
), showRegisterLink && /* @__PURE__ */ React.createElement("p", { className: "dauth-footer-text" }, "Don't have an account?", " ", /* @__PURE__ */ React.createElement("a", { href: "/auth/register", className: "dauth-link" }, "Create one"))));
|
|
122
|
+
};
|
|
123
|
+
var EmailIcon = () => /* @__PURE__ */ React.createElement("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("rect", { width: "20", height: "16", x: "2", y: "4", rx: "2" }), /* @__PURE__ */ React.createElement("path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" }));
|
|
124
|
+
var LockIcon = () => /* @__PURE__ */ React.createElement("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }), /* @__PURE__ */ React.createElement("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" }));
|
|
125
|
+
var EyeIcon = () => /* @__PURE__ */ React.createElement("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }), /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "3" }));
|
|
126
|
+
var EyeOffIcon = () => /* @__PURE__ */ React.createElement("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }), /* @__PURE__ */ React.createElement("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }), /* @__PURE__ */ React.createElement("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }), /* @__PURE__ */ React.createElement("line", { x1: "2", x2: "22", y1: "2", y2: "22" }));
|
|
127
|
+
var GoogleIcon = () => /* @__PURE__ */ React.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24" }, /* @__PURE__ */ React.createElement("path", { fill: "#4285F4", d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" }), /* @__PURE__ */ React.createElement("path", { fill: "#34A853", d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" }), /* @__PURE__ */ React.createElement("path", { fill: "#FBBC05", d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" }), /* @__PURE__ */ React.createElement("path", { fill: "#EA4335", d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" }));
|
|
128
|
+
|
|
129
|
+
export {
|
|
130
|
+
LoginScreen
|
|
131
|
+
};
|
|
132
|
+
//# sourceMappingURL=chunk-Z2ICX4UY.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/screens/LoginScreen.tsx"],"sourcesContent":["/**\n * Dravyn Auth — LoginScreen\n * Drop this into any Next.js / React project.\n * Requires: @dravyn/ui (or dravyn-ui) and @dravyn/auth-js\n *\n * Usage (Next.js App Router):\n * import { LoginScreen } from '@dravyn/auth-ui'\n * export default function LoginPage() {\n * return <LoginScreen redirectTo=\"/dashboard\" />\n * }\n */\n\n'use client';\n\nimport React from 'react';\nimport { Button } from '@dravyn/ui';\nimport { Input } from '@dravyn/ui';\nimport { Alert } from '@dravyn/ui';\nimport { Spinner } from '@dravyn/ui';\nimport './auth.css';\n\nexport interface LoginScreenProps {\n /** Where to send the user after a successful login */\n redirectTo?: string;\n /** Show / hide the \"Create account\" link */\n showRegisterLink?: boolean;\n /** Called with the JWT on success — use this OR redirectTo */\n onSuccess?: (token: string, user: AuthUser) => void;\n /** Override the logo node */\n logo?: React.ReactNode;\n /** Your brand name shown in the UI */\n brandName?: string;\n /** API base URL — defaults to NEXT_PUBLIC_AUTH_API_URL env var */\n apiBase?: string;\n}\n\ninterface AuthUser {\n id: string;\n email: string;\n name: string;\n}\n\nexport const LoginScreen: React.FC<LoginScreenProps> = ({\n redirectTo = '/dashboard',\n showRegisterLink = true,\n onSuccess,\n logo,\n brandName = 'Dravyn',\n apiBase = process.env.NEXT_PUBLIC_AUTH_API_URL ?? 'http://localhost:3001',\n}) => {\n const [email, setEmail] = React.useState('');\n const [password, setPassword] = React.useState('');\n const [showPass, setShowPass] = React.useState(false);\n const [loading, setLoading] = React.useState(false);\n const [error, setError] = React.useState('');\n\n const emailRef = React.useRef<HTMLInputElement>(null);\n React.useEffect(() => { emailRef.current?.focus(); }, []);\n\n const validate = () => {\n if (!email.trim()) return 'Email address is required.';\n if (!/\\S+@\\S+\\.\\S+/.test(email)) return 'Enter a valid email address.';\n if (!password) return 'Password is required.';\n if (password.length < 6) return 'Password must be at least 6 characters.';\n return null;\n };\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n const err = validate();\n if (err) { setError(err); return; }\n\n setLoading(true);\n setError('');\n\n try {\n const res = await fetch(`${apiBase}/auth/login`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ email: email.trim().toLowerCase(), password }),\n });\n\n const data = await res.json();\n\n if (!res.ok) {\n setError(data.message ?? 'Invalid email or password.');\n return;\n }\n\n // Store token\n localStorage.setItem('dravyn_token', data.accessToken);\n localStorage.setItem('dravyn_user', JSON.stringify(data.user));\n\n if (onSuccess) {\n onSuccess(data.accessToken, data.user);\n } else {\n window.location.href = redirectTo;\n }\n } catch {\n setError('Unable to connect. Please check your internet connection.');\n } finally {\n setLoading(false);\n }\n };\n\n const handleGoogle = async () => {\n window.location.href = `${apiBase}/auth/google`;\n };\n\n return (\n <div className=\"dauth-root\">\n <div className=\"dauth-card\">\n\n {/* Logo / brand */}\n <div className=\"dauth-brand\">\n {logo ?? (\n <div className=\"dauth-logo-default\">\n <span className=\"dauth-logo-dot\" />\n {brandName}\n </div>\n )}\n </div>\n\n <h1 className=\"dauth-title\">Welcome back</h1>\n <p className=\"dauth-sub\">Sign in to your {brandName} account</p>\n\n {/* Error */}\n {error && (\n <div style={{ marginBottom: 16 }}>\n <Alert variant=\"danger\">{error}</Alert>\n </div>\n )}\n\n <form onSubmit={handleSubmit} noValidate>\n <div className=\"dauth-fields\">\n <Input\n ref={emailRef}\n label=\"Email address\"\n type=\"email\"\n placeholder=\"you@example.com\"\n value={email}\n onChange={e => setEmail(e.target.value)}\n leftIcon={<EmailIcon />}\n autoComplete=\"email\"\n required\n />\n\n <div className=\"dauth-password-wrap\">\n <Input\n label=\"Password\"\n type={showPass ? 'text' : 'password'}\n placeholder=\"••••••••\"\n value={password}\n onChange={e => setPassword(e.target.value)}\n leftIcon={<LockIcon />}\n rightIcon={\n <button\n type=\"button\"\n className=\"dauth-eye\"\n onClick={() => setShowPass(v => !v)}\n aria-label={showPass ? 'Hide password' : 'Show password'}\n >\n {showPass ? <EyeOffIcon /> : <EyeIcon />}\n </button>\n }\n autoComplete=\"current-password\"\n required\n />\n <a href=\"/auth/forgot-password\" className=\"dauth-forgot\">\n Forgot password?\n </a>\n </div>\n </div>\n\n <Button\n type=\"submit\"\n variant=\"primary\"\n fullWidth\n loading={loading}\n style={{ marginTop: 8 }}\n >\n Sign in\n </Button>\n </form>\n\n {/* Divider */}\n <div className=\"dauth-divider\">\n <span>or continue with</span>\n </div>\n\n {/* Google OAuth */}\n <button\n type=\"button\"\n className=\"dauth-google-btn\"\n onClick={handleGoogle}\n disabled={loading}\n >\n <GoogleIcon />\n Continue with Google\n </button>\n\n {/* Register link */}\n {showRegisterLink && (\n <p className=\"dauth-footer-text\">\n Don't have an account?{' '}\n <a href=\"/auth/register\" className=\"dauth-link\">\n Create one\n </a>\n </p>\n )}\n </div>\n </div>\n );\n};\n\n// ── Inline SVG icons (zero extra deps) ───────────────────────────────────────\nconst EmailIcon = () => <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\"><rect width=\"20\" height=\"16\" x=\"2\" y=\"4\" rx=\"2\"/><path d=\"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7\"/></svg>;\nconst LockIcon = () => <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\"><rect width=\"18\" height=\"11\" x=\"3\" y=\"11\" rx=\"2\" ry=\"2\"/><path d=\"M7 11V7a5 5 0 0 1 10 0v4\"/></svg>;\nconst EyeIcon = () => <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\"><path d=\"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></svg>;\nconst EyeOffIcon = () => <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\"><path d=\"M9.88 9.88a3 3 0 1 0 4.24 4.24\"/><path d=\"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68\"/><path d=\"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61\"/><line x1=\"2\" x2=\"22\" y1=\"2\" y2=\"22\"/></svg>;\nconst GoogleIcon = () => (\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\">\n <path fill=\"#4285F4\" d=\"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z\"/>\n <path fill=\"#34A853\" d=\"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z\"/>\n <path fill=\"#FBBC05\" d=\"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09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,MAAK,WAAU,GAAE,uIAAqI,CAC9J;","names":[]}
|
package/dist/index.css
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/* src/screens/auth.css */
|
|
2
|
+
.dauth-root {
|
|
3
|
+
min-height: 100vh;
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
background: var(--dui-bg, #0d0d0d);
|
|
8
|
+
padding: 24px 16px;
|
|
9
|
+
font-family: var(--dui-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
|
|
10
|
+
}
|
|
11
|
+
.dauth-card {
|
|
12
|
+
width: 100%;
|
|
13
|
+
max-width: 420px;
|
|
14
|
+
background: var(--dui-bg-raised, #161616);
|
|
15
|
+
border: 0.5px solid var(--dui-border-strong, rgba(255,255,255,0.16));
|
|
16
|
+
border-radius: 16px;
|
|
17
|
+
padding: 36px 32px 32px;
|
|
18
|
+
animation: dauth-in 220ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
19
|
+
}
|
|
20
|
+
@keyframes dauth-in {
|
|
21
|
+
from {
|
|
22
|
+
opacity: 0;
|
|
23
|
+
transform: translateY(10px) scale(0.98);
|
|
24
|
+
}
|
|
25
|
+
to {
|
|
26
|
+
opacity: 1;
|
|
27
|
+
transform: translateY(0) scale(1);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
.dauth-brand {
|
|
31
|
+
margin-bottom: 24px;
|
|
32
|
+
}
|
|
33
|
+
.dauth-logo-default {
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
gap: 7px;
|
|
37
|
+
font-size: 15px;
|
|
38
|
+
font-weight: 700;
|
|
39
|
+
color: var(--dui-text, #f0f0f0);
|
|
40
|
+
letter-spacing: -0.01em;
|
|
41
|
+
}
|
|
42
|
+
.dauth-logo-dot {
|
|
43
|
+
width: 8px;
|
|
44
|
+
height: 8px;
|
|
45
|
+
border-radius: 50%;
|
|
46
|
+
background: var(--dui-teal-400, #4ecdc4);
|
|
47
|
+
flex-shrink: 0;
|
|
48
|
+
}
|
|
49
|
+
.dauth-title {
|
|
50
|
+
font-size: 22px;
|
|
51
|
+
font-weight: 700;
|
|
52
|
+
color: var(--dui-text, #f0f0f0);
|
|
53
|
+
letter-spacing: -0.02em;
|
|
54
|
+
line-height: 1.2;
|
|
55
|
+
margin: 0 0 6px;
|
|
56
|
+
}
|
|
57
|
+
.dauth-sub {
|
|
58
|
+
font-size: 13.5px;
|
|
59
|
+
color: var(--dui-text-muted, #888);
|
|
60
|
+
line-height: 1.55;
|
|
61
|
+
margin: 0 0 22px;
|
|
62
|
+
}
|
|
63
|
+
.dauth-fields {
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
gap: 14px;
|
|
67
|
+
margin-bottom: 14px;
|
|
68
|
+
}
|
|
69
|
+
.dauth-row {
|
|
70
|
+
display: grid;
|
|
71
|
+
grid-template-columns: 1fr 1fr;
|
|
72
|
+
gap: 10px;
|
|
73
|
+
}
|
|
74
|
+
.dauth-password-wrap {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
gap: 6px;
|
|
78
|
+
}
|
|
79
|
+
.dauth-forgot {
|
|
80
|
+
font-size: 12px;
|
|
81
|
+
color: var(--dui-text-muted, #888);
|
|
82
|
+
text-decoration: none;
|
|
83
|
+
align-self: flex-end;
|
|
84
|
+
transition: color 0.15s;
|
|
85
|
+
}
|
|
86
|
+
.dauth-forgot:hover {
|
|
87
|
+
color: var(--dui-teal-400, #4ecdc4);
|
|
88
|
+
}
|
|
89
|
+
.dauth-eye {
|
|
90
|
+
background: none;
|
|
91
|
+
border: none;
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
color: var(--dui-text-hint, #555);
|
|
94
|
+
display: inline-flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
padding: 0;
|
|
97
|
+
transition: color 0.15s;
|
|
98
|
+
}
|
|
99
|
+
.dauth-eye:hover {
|
|
100
|
+
color: var(--dui-text-muted, #888);
|
|
101
|
+
}
|
|
102
|
+
.dauth-divider {
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
gap: 10px;
|
|
106
|
+
margin: 18px 0;
|
|
107
|
+
color: var(--dui-text-hint, #555);
|
|
108
|
+
font-size: 12px;
|
|
109
|
+
}
|
|
110
|
+
.dauth-divider::before,
|
|
111
|
+
.dauth-divider::after {
|
|
112
|
+
content: "";
|
|
113
|
+
flex: 1;
|
|
114
|
+
height: 0.5px;
|
|
115
|
+
background: var(--dui-border, rgba(255,255,255,0.07));
|
|
116
|
+
}
|
|
117
|
+
.dauth-google-btn {
|
|
118
|
+
width: 100%;
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
justify-content: center;
|
|
122
|
+
gap: 10px;
|
|
123
|
+
background: transparent;
|
|
124
|
+
border: 0.5px solid var(--dui-border-strong, rgba(255,255,255,0.16));
|
|
125
|
+
border-radius: 8px;
|
|
126
|
+
padding: 10px 18px;
|
|
127
|
+
font-family: var(--dui-font-sans);
|
|
128
|
+
font-size: 13px;
|
|
129
|
+
font-weight: 500;
|
|
130
|
+
color: var(--dui-text, #f0f0f0);
|
|
131
|
+
cursor: pointer;
|
|
132
|
+
transition: background 0.15s, border-color 0.15s;
|
|
133
|
+
}
|
|
134
|
+
.dauth-google-btn:hover:not(:disabled) {
|
|
135
|
+
background: var(--dui-bg-overlay, #1e1e1e);
|
|
136
|
+
border-color: rgba(255, 255, 255, 0.24);
|
|
137
|
+
}
|
|
138
|
+
.dauth-google-btn:disabled {
|
|
139
|
+
opacity: 0.4;
|
|
140
|
+
cursor: not-allowed;
|
|
141
|
+
}
|
|
142
|
+
.dauth-otp-icon {
|
|
143
|
+
font-size: 28px;
|
|
144
|
+
margin-bottom: 12px;
|
|
145
|
+
color: var(--dui-teal-400, #4ecdc4);
|
|
146
|
+
}
|
|
147
|
+
.dauth-otp-boxes {
|
|
148
|
+
display: flex;
|
|
149
|
+
gap: 8px;
|
|
150
|
+
justify-content: center;
|
|
151
|
+
margin: 20px 0 8px;
|
|
152
|
+
}
|
|
153
|
+
.dauth-otp-box {
|
|
154
|
+
width: 46px;
|
|
155
|
+
height: 54px;
|
|
156
|
+
background: var(--dui-bg, #0d0d0d);
|
|
157
|
+
border: 0.5px solid var(--dui-border-strong, rgba(255,255,255,0.16));
|
|
158
|
+
border-radius: 8px;
|
|
159
|
+
color: var(--dui-text, #f0f0f0);
|
|
160
|
+
font-size: 22px;
|
|
161
|
+
font-weight: 700;
|
|
162
|
+
font-family: var(--dui-font-sans);
|
|
163
|
+
text-align: center;
|
|
164
|
+
outline: none;
|
|
165
|
+
transition: border-color 0.15s, box-shadow 0.15s;
|
|
166
|
+
caret-color: var(--dui-teal-400, #4ecdc4);
|
|
167
|
+
}
|
|
168
|
+
.dauth-otp-box:focus {
|
|
169
|
+
border-color: var(--dui-teal-400, #4ecdc4);
|
|
170
|
+
box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.12);
|
|
171
|
+
}
|
|
172
|
+
.dauth-otp-box--filled {
|
|
173
|
+
border-color: var(--dui-teal-400, #4ecdc4);
|
|
174
|
+
background: rgba(78, 205, 196, 0.04);
|
|
175
|
+
}
|
|
176
|
+
.dauth-resend {
|
|
177
|
+
text-align: center;
|
|
178
|
+
font-size: 13px;
|
|
179
|
+
color: var(--dui-text-muted, #888);
|
|
180
|
+
margin: 14px 0 4px;
|
|
181
|
+
}
|
|
182
|
+
.dauth-link {
|
|
183
|
+
color: var(--dui-teal-400, #4ecdc4);
|
|
184
|
+
text-decoration: none;
|
|
185
|
+
font-weight: 500;
|
|
186
|
+
background: none;
|
|
187
|
+
border: none;
|
|
188
|
+
cursor: pointer;
|
|
189
|
+
font-size: inherit;
|
|
190
|
+
font-family: inherit;
|
|
191
|
+
padding: 0;
|
|
192
|
+
transition: opacity 0.15s;
|
|
193
|
+
}
|
|
194
|
+
.dauth-link:hover {
|
|
195
|
+
opacity: 0.8;
|
|
196
|
+
}
|
|
197
|
+
.dauth-footer-text {
|
|
198
|
+
text-align: center;
|
|
199
|
+
font-size: 13px;
|
|
200
|
+
color: var(--dui-text-muted, #888);
|
|
201
|
+
margin-top: 18px;
|
|
202
|
+
}
|
|
203
|
+
.dauth-terms {
|
|
204
|
+
text-align: center;
|
|
205
|
+
font-size: 11.5px;
|
|
206
|
+
color: var(--dui-text-hint, #555);
|
|
207
|
+
margin-top: 12px;
|
|
208
|
+
line-height: 1.6;
|
|
209
|
+
}
|
|
210
|
+
:root {
|
|
211
|
+
--dauth-text: var(--dui-text, #f0f0f0);
|
|
212
|
+
--dauth-muted: var(--dui-text-muted, #888888);
|
|
213
|
+
--dauth-teal: var(--dui-teal-400, #4ecdc4);
|
|
214
|
+
--dauth-green: #22c55e;
|
|
215
|
+
--dauth-label: var(--dui-text-muted, #888888);
|
|
216
|
+
}
|
|
217
|
+
.dauth-label {
|
|
218
|
+
font-size: 12px;
|
|
219
|
+
font-weight: 500;
|
|
220
|
+
color: var(--dauth-label);
|
|
221
|
+
}
|
|
222
|
+
@media (max-width: 480px) {
|
|
223
|
+
.dauth-card {
|
|
224
|
+
padding: 28px 20px 24px;
|
|
225
|
+
}
|
|
226
|
+
.dauth-row {
|
|
227
|
+
grid-template-columns: 1fr;
|
|
228
|
+
}
|
|
229
|
+
.dauth-otp-box {
|
|
230
|
+
width: 40px;
|
|
231
|
+
height: 48px;
|
|
232
|
+
font-size: 20px;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
/*# sourceMappingURL=index.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/screens/auth.css"],"sourcesContent":["/*\n Dravyn Auth UI — Styles\n Consumes @dravyn/ui CSS custom properties.\n Import tokens first: import 'dravyn-ui/tokens'\n Then import this file once: import '@dravyn/auth-ui/auth.css'\n*/\n\n/* ── Root / centred layout ──────────────────────────────────────────────── */\n.dauth-root {\n min-height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--dui-bg, #0d0d0d);\n padding: 24px 16px;\n font-family: var(--dui-font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);\n}\n\n/* ── Card ───────────────────────────────────────────────────────────────── */\n.dauth-card {\n width: 100%;\n max-width: 420px;\n background: var(--dui-bg-raised, #161616);\n border: 0.5px solid var(--dui-border-strong, rgba(255,255,255,0.16));\n border-radius: 16px;\n padding: 36px 32px 32px;\n animation: dauth-in 220ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n@keyframes dauth-in {\n from { opacity: 0; transform: translateY(10px) scale(0.98); }\n to { opacity: 1; transform: translateY(0) scale(1); }\n}\n\n/* ── Brand / logo ───────────────────────────────────────────────────────── */\n.dauth-brand {\n margin-bottom: 24px;\n}\n\n.dauth-logo-default {\n display: inline-flex;\n align-items: center;\n gap: 7px;\n font-size: 15px;\n font-weight: 700;\n color: var(--dui-text, #f0f0f0);\n letter-spacing: -0.01em;\n}\n\n.dauth-logo-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--dui-teal-400, #4ecdc4);\n flex-shrink: 0;\n}\n\n/* ── Headings ────────────────────────────────────────────────────────────── */\n.dauth-title {\n font-size: 22px;\n font-weight: 700;\n color: var(--dui-text, #f0f0f0);\n letter-spacing: -0.02em;\n line-height: 1.2;\n margin: 0 0 6px;\n}\n\n.dauth-sub {\n font-size: 13.5px;\n color: var(--dui-text-muted, #888);\n line-height: 1.55;\n margin: 0 0 22px;\n}\n\n/* ── Form fields ─────────────────────────────────────────────────────────── */\n.dauth-fields {\n display: flex;\n flex-direction: column;\n gap: 14px;\n margin-bottom: 14px;\n}\n\n.dauth-row {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 10px;\n}\n\n/* ── Password wrap (holds input + forgot link) ───────────────────────────── */\n.dauth-password-wrap {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.dauth-forgot {\n font-size: 12px;\n color: var(--dui-text-muted, #888);\n text-decoration: none;\n align-self: flex-end;\n transition: color 0.15s;\n}\n\n.dauth-forgot:hover { color: var(--dui-teal-400, #4ecdc4); }\n\n/* ── Show/hide password button ───────────────────────────────────────────── */\n.dauth-eye {\n background: none;\n border: none;\n cursor: pointer;\n color: var(--dui-text-hint, #555);\n display: inline-flex;\n align-items: center;\n padding: 0;\n transition: color 0.15s;\n}\n.dauth-eye:hover { color: var(--dui-text-muted, #888); }\n\n/* ── Divider ─────────────────────────────────────────────────────────────── */\n.dauth-divider {\n display: flex;\n align-items: center;\n gap: 10px;\n margin: 18px 0;\n color: var(--dui-text-hint, #555);\n font-size: 12px;\n}\n.dauth-divider::before,\n.dauth-divider::after {\n content: '';\n flex: 1;\n height: 0.5px;\n background: var(--dui-border, rgba(255,255,255,0.07));\n}\n\n/* ── Google OAuth button ─────────────────────────────────────────────────── */\n.dauth-google-btn {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n background: transparent;\n border: 0.5px solid var(--dui-border-strong, rgba(255,255,255,0.16));\n border-radius: 8px;\n padding: 10px 18px;\n font-family: var(--dui-font-sans);\n font-size: 13px;\n font-weight: 500;\n color: var(--dui-text, #f0f0f0);\n cursor: pointer;\n transition: background 0.15s, border-color 0.15s;\n}\n.dauth-google-btn:hover:not(:disabled) {\n background: var(--dui-bg-overlay, #1e1e1e);\n border-color: rgba(255,255,255,0.24);\n}\n.dauth-google-btn:disabled { opacity: 0.4; cursor: not-allowed; }\n\n/* ── OTP boxes ───────────────────────────────────────────────────────────── */\n.dauth-otp-icon {\n font-size: 28px;\n margin-bottom: 12px;\n color: var(--dui-teal-400, #4ecdc4);\n}\n\n.dauth-otp-boxes {\n display: flex;\n gap: 8px;\n justify-content: center;\n margin: 20px 0 8px;\n}\n\n.dauth-otp-box {\n width: 46px;\n height: 54px;\n background: var(--dui-bg, #0d0d0d);\n border: 0.5px solid var(--dui-border-strong, rgba(255,255,255,0.16));\n border-radius: 8px;\n color: var(--dui-text, #f0f0f0);\n font-size: 22px;\n font-weight: 700;\n font-family: var(--dui-font-sans);\n text-align: center;\n outline: none;\n transition: border-color 0.15s, box-shadow 0.15s;\n caret-color: var(--dui-teal-400, #4ecdc4);\n}\n\n.dauth-otp-box:focus {\n border-color: var(--dui-teal-400, #4ecdc4);\n box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.12);\n}\n\n.dauth-otp-box--filled {\n border-color: var(--dui-teal-400, #4ecdc4);\n background: rgba(78, 205, 196, 0.04);\n}\n\n/* ── Resend row ──────────────────────────────────────────────────────────── */\n.dauth-resend {\n text-align: center;\n font-size: 13px;\n color: var(--dui-text-muted, #888);\n margin: 14px 0 4px;\n}\n\n/* ── Links ───────────────────────────────────────────────────────────────── */\n.dauth-link {\n color: var(--dui-teal-400, #4ecdc4);\n text-decoration: none;\n font-weight: 500;\n background: none;\n border: none;\n cursor: pointer;\n font-size: inherit;\n font-family: inherit;\n padding: 0;\n transition: opacity 0.15s;\n}\n.dauth-link:hover { opacity: 0.8; }\n\n/* ── Footer text + terms ─────────────────────────────────────────────────── */\n.dauth-footer-text {\n text-align: center;\n font-size: 13px;\n color: var(--dui-text-muted, #888);\n margin-top: 18px;\n}\n\n.dauth-terms {\n text-align: center;\n font-size: 11.5px;\n color: var(--dui-text-hint, #555);\n margin-top: 12px;\n line-height: 1.6;\n}\n\n/* ── CSS variable aliases (readable names inside auth components) ─────────── */\n:root {\n --dauth-text: var(--dui-text, #f0f0f0);\n --dauth-muted: var(--dui-text-muted, #888888);\n --dauth-teal: var(--dui-teal-400, #4ecdc4);\n --dauth-green: #22c55e;\n --dauth-label: var(--dui-text-muted, #888888);\n}\n\n/* ── Label helper (used in ResetPasswordScreen) ───────────────────────────── */\n.dauth-label {\n font-size: 12px;\n font-weight: 500;\n color: var(--dauth-label);\n}\n\n/* ── Responsive ──────────────────────────────────────────────────────────── */\n@media (max-width: 480px) {\n .dauth-card { padding: 28px 20px 24px; }\n .dauth-row { grid-template-columns: 1fr; }\n .dau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B,EAAE;AACvC;AAGA,CAAC;AACC,aAAW;AACX,eAAa;AACb,SAAO,IAAI;AACb;AAGA,QAAO,WAAY;AACjB,GA7OD;AA6Oe,aAAS,KAAK,KAAK;AAAM;AACvC,GA/KD;AA+Ke,2BAAuB;AAAK;AAC1C,GArFD;AAqFkB,WAAO;AAAM,YAAQ;AAAM,eAAW;AAAM;AAC/D;","names":[]}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { LoginScreen, LoginScreenProps } from './screens/LoginScreen.mjs';
|
|
2
|
+
export { RegisterScreen, RegisterScreenProps } from './screens/RegisterScreen.mjs';
|
|
3
|
+
export { OTPScreen, OTPScreenProps } from './screens/OTPScreen.mjs';
|
|
4
|
+
export { ForgotPasswordScreen, ForgotPasswordScreenProps, ResetPasswordScreen, ResetPasswordScreenProps } from './screens/ForgotResetScreen.mjs';
|
|
5
|
+
import 'react';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { LoginScreen, LoginScreenProps } from './screens/LoginScreen.js';
|
|
2
|
+
export { RegisterScreen, RegisterScreenProps } from './screens/RegisterScreen.js';
|
|
3
|
+
export { OTPScreen, OTPScreenProps } from './screens/OTPScreen.js';
|
|
4
|
+
export { ForgotPasswordScreen, ForgotPasswordScreenProps, ResetPasswordScreen, ResetPasswordScreenProps } from './screens/ForgotResetScreen.js';
|
|
5
|
+
import 'react';
|