@eazo/sdk 0.4.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/PROTOCOL.md +134 -0
- package/README.md +163 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/auth-primitive/EazoAuthClient.d.ts +35 -0
- package/dist/internal/auth-primitive/EazoAuthClient.d.ts.map +1 -0
- package/dist/internal/auth-primitive/EazoAuthClient.js +107 -0
- package/dist/internal/auth-primitive/EazoAuthClient.js.map +1 -0
- package/dist/internal/auth-primitive/EazoAuthServer.d.ts +18 -0
- package/dist/internal/auth-primitive/EazoAuthServer.d.ts.map +1 -0
- package/dist/internal/auth-primitive/EazoAuthServer.js +37 -0
- package/dist/internal/auth-primitive/EazoAuthServer.js.map +1 -0
- package/dist/internal/auth-primitive/decrypt.d.ts +12 -0
- package/dist/internal/auth-primitive/decrypt.d.ts.map +1 -0
- package/dist/internal/auth-primitive/decrypt.js +89 -0
- package/dist/internal/auth-primitive/decrypt.js.map +1 -0
- package/dist/internal/auth-primitive/index.d.ts +5 -0
- package/dist/internal/auth-primitive/index.d.ts.map +1 -0
- package/dist/internal/auth-primitive/index.js +13 -0
- package/dist/internal/auth-primitive/index.js.map +1 -0
- package/dist/internal/auth-primitive/types.d.ts +61 -0
- package/dist/internal/auth-primitive/types.d.ts.map +1 -0
- package/dist/internal/auth-primitive/types.js +6 -0
- package/dist/internal/auth-primitive/types.js.map +1 -0
- package/dist/internal/bootstrap.d.ts +16 -0
- package/dist/internal/bootstrap.d.ts.map +1 -0
- package/dist/internal/bootstrap.js +81 -0
- package/dist/internal/bootstrap.js.map +1 -0
- package/dist/internal/bridge/client.d.ts +40 -0
- package/dist/internal/bridge/client.d.ts.map +1 -0
- package/dist/internal/bridge/client.js +160 -0
- package/dist/internal/bridge/client.js.map +1 -0
- package/dist/internal/bridge/protocol.d.ts +61 -0
- package/dist/internal/bridge/protocol.d.ts.map +1 -0
- package/dist/internal/bridge/protocol.js +38 -0
- package/dist/internal/bridge/protocol.js.map +1 -0
- package/dist/internal/bridge/transport.d.ts +19 -0
- package/dist/internal/bridge/transport.d.ts.map +1 -0
- package/dist/internal/bridge/transport.js +66 -0
- package/dist/internal/bridge/transport.js.map +1 -0
- package/dist/internal/capabilities/auth.d.ts +55 -0
- package/dist/internal/capabilities/auth.d.ts.map +1 -0
- package/dist/internal/capabilities/auth.js +361 -0
- package/dist/internal/capabilities/auth.js.map +1 -0
- package/dist/internal/capabilities/device.d.ts +11 -0
- package/dist/internal/capabilities/device.d.ts.map +1 -0
- package/dist/internal/capabilities/device.js +65 -0
- package/dist/internal/capabilities/device.js.map +1 -0
- package/dist/internal/env.d.ts +14 -0
- package/dist/internal/env.d.ts.map +1 -0
- package/dist/internal/env.js +28 -0
- package/dist/internal/env.js.map +1 -0
- package/dist/internal/login-ui/icons.d.ts +18 -0
- package/dist/internal/login-ui/icons.d.ts.map +1 -0
- package/dist/internal/login-ui/icons.js +62 -0
- package/dist/internal/login-ui/icons.js.map +1 -0
- package/dist/internal/login-ui/index.d.ts +3 -0
- package/dist/internal/login-ui/index.d.ts.map +1 -0
- package/dist/internal/login-ui/index.js +160 -0
- package/dist/internal/login-ui/index.js.map +1 -0
- package/dist/internal/login-ui/styles.d.ts +3 -0
- package/dist/internal/login-ui/styles.d.ts.map +1 -0
- package/dist/internal/login-ui/styles.js +282 -0
- package/dist/internal/login-ui/styles.js.map +1 -0
- package/dist/internal/store.d.ts +29 -0
- package/dist/internal/store.d.ts.map +1 -0
- package/dist/internal/store.js +82 -0
- package/dist/internal/store.js.map +1 -0
- package/dist/react.d.ts +24 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +81 -0
- package/dist/react.js.map +1 -0
- package/dist/server.d.ts +21 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +53 -0
- package/dist/server.js.map +1 -0
- package/dist/testing.d.ts +13 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +38 -0
- package/dist/testing.js.map +1 -0
- package/dist/types.d.ts +33 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GoogleIcon = GoogleIcon;
|
|
4
|
+
exports.TwitterXIcon = TwitterXIcon;
|
|
5
|
+
exports.AppleIcon = AppleIcon;
|
|
6
|
+
exports.GithubIcon = GithubIcon;
|
|
7
|
+
exports.GenericProviderIcon = GenericProviderIcon;
|
|
8
|
+
exports.CloseIcon = CloseIcon;
|
|
9
|
+
exports.MailIcon = MailIcon;
|
|
10
|
+
exports.KeyIcon = KeyIcon;
|
|
11
|
+
exports.EyeIcon = EyeIcon;
|
|
12
|
+
exports.EyeOffIcon = EyeOffIcon;
|
|
13
|
+
exports.ArrowLeftIcon = ArrowLeftIcon;
|
|
14
|
+
exports.pickProviderIcon = pickProviderIcon;
|
|
15
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
const defaultSize = 20;
|
|
17
|
+
function GoogleIcon({ size = defaultSize }) {
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("path", { 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", fill: "#4285F4" }), (0, jsx_runtime_1.jsx)("path", { 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", fill: "#34A853" }), (0, jsx_runtime_1.jsx)("path", { 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", fill: "#FBBC05" }), (0, jsx_runtime_1.jsx)("path", { 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", fill: "#EA4335" })] }));
|
|
19
|
+
}
|
|
20
|
+
function TwitterXIcon({ size = defaultSize }) {
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "#000", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.746l7.73-8.835L1.254 2.25H8.08l4.253 5.622zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) }));
|
|
22
|
+
}
|
|
23
|
+
function AppleIcon({ size = defaultSize }) {
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "#000", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701" }) }));
|
|
25
|
+
}
|
|
26
|
+
function GithubIcon({ size = defaultSize }) {
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "#24292e", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" }) }));
|
|
28
|
+
}
|
|
29
|
+
function GenericProviderIcon({ size = defaultSize }) {
|
|
30
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", children: [(0, jsx_runtime_1.jsx)("circle", { cx: "12", cy: "12", r: "9" }), (0, jsx_runtime_1.jsx)("path", { d: "M8 12h8M12 8v8", strokeLinecap: "round" })] }));
|
|
31
|
+
}
|
|
32
|
+
function CloseIcon({ size = 16 }) {
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: (0, jsx_runtime_1.jsx)("path", { d: "M18 6L6 18M6 6l12 12" }) }));
|
|
34
|
+
}
|
|
35
|
+
function MailIcon({ size = 20 }) {
|
|
36
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [(0, jsx_runtime_1.jsx)("path", { d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8" }), (0, jsx_runtime_1.jsx)("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" })] }));
|
|
37
|
+
}
|
|
38
|
+
function KeyIcon({ size = 18 }) {
|
|
39
|
+
return ((0, jsx_runtime_1.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: (0, jsx_runtime_1.jsx)("path", { d: "M21 2l-2 2m0 0l-5 5-3-3-4 4 3 3-1 1-3-3-4 4v4h4l4-4-3-3 1-1 3 3 4-4-3-3 5-5z" }) }));
|
|
40
|
+
}
|
|
41
|
+
function EyeIcon({ size = 18 }) {
|
|
42
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: [(0, jsx_runtime_1.jsx)("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }), (0, jsx_runtime_1.jsx)("circle", { cx: "12", cy: "12", r: "3" })] }));
|
|
43
|
+
}
|
|
44
|
+
function EyeOffIcon({ size = 18 }) {
|
|
45
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: [(0, jsx_runtime_1.jsx)("path", { d: "M17.94 17.94A10.94 10.94 0 0112 20c-7 0-11-8-11-8a20.52 20.52 0 013.88-5.12M9.88 4.24A10.94 10.94 0 0112 4c7 0 11 8 11 8a20.63 20.63 0 01-3.19 4.28M14.12 14.12A3 3 0 119.88 9.88" }), (0, jsx_runtime_1.jsx)("path", { d: "M1 1l22 22" })] }));
|
|
46
|
+
}
|
|
47
|
+
function ArrowLeftIcon({ size = 14 }) {
|
|
48
|
+
return ((0, jsx_runtime_1.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: (0, jsx_runtime_1.jsx)("path", { d: "M19 12H5M12 19l-7-7 7-7" }) }));
|
|
49
|
+
}
|
|
50
|
+
function pickProviderIcon(provider) {
|
|
51
|
+
const normalized = provider.toLowerCase();
|
|
52
|
+
if (normalized.includes("google"))
|
|
53
|
+
return (0, jsx_runtime_1.jsx)(GoogleIcon, {});
|
|
54
|
+
if (normalized.includes("apple"))
|
|
55
|
+
return (0, jsx_runtime_1.jsx)(AppleIcon, {});
|
|
56
|
+
if (normalized.includes("twitter") || normalized === "x")
|
|
57
|
+
return (0, jsx_runtime_1.jsx)(TwitterXIcon, {});
|
|
58
|
+
if (normalized.includes("github"))
|
|
59
|
+
return (0, jsx_runtime_1.jsx)(GithubIcon, {});
|
|
60
|
+
return (0, jsx_runtime_1.jsx)(GenericProviderIcon, {});
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../src/internal/login-ui/icons.tsx"],"names":[],"mappings":";;AAMA,gCASC;AAED,oCAMC;AAED,8BAMC;AAED,gCAMC;AAED,kDAOC;AAED,8BAMC;AAED,4BAOC;AAED,0BAMC;AAED,0BAOC;AAED,gCAOC;AAED,sCAMC;AAED,4CAOC;;AAxGD,MAAM,WAAW,GAAG,EAAE,CAAC;AAEvB,S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AM,EAAE,IAAI,EAAE,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,GAAG,EAAC,aAAa,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,YAChJ,iCAAM,CAAC,EAAC,yBAAyB,GAAG,GAChC,CACP,CAAC;AACJ,CAAC;AAED,SAAgB,gBAAgB,CAAC,QAAgB;IAC/C,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IAC1C,IAAI,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,uBAAC,UAAU,KAAG,CAAC;IACzD,IAAI,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC;QAAE,OAAO,uBAAC,SAAS,KAAG,CAAC;IACvD,IAAI,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,UAAU,KAAK,GAAG;QAAE,OAAO,uBAAC,YAAY,KAAG,CAAC;IAClF,IAAI,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,uBAAC,UAAU,KAAG,CAAC;IACzD,OAAO,uBAAC,mBAAmB,KAAG,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internal/login-ui/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuB/B,wBAAgB,OAAO,IAAI,KAAK,CAAC,YAAY,GAAG,IAAI,CAiDnD"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.LoginUI = LoginUI;
|
|
38
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
|
+
const Dialog = __importStar(require("@radix-ui/react-dialog"));
|
|
40
|
+
const React = __importStar(require("react"));
|
|
41
|
+
const auth_1 = require("../capabilities/auth");
|
|
42
|
+
const store_1 = require("../store");
|
|
43
|
+
const icons_1 = require("./icons");
|
|
44
|
+
const styles_1 = require("./styles");
|
|
45
|
+
function useLoginUI() {
|
|
46
|
+
return React.useSyncExternalStore(store_1.store.subscribe, () => store_1.store.getSnapshot().loginUI, () => store_1.store.getSnapshot().loginUI);
|
|
47
|
+
}
|
|
48
|
+
function LoginUI() {
|
|
49
|
+
const ui = useLoginUI();
|
|
50
|
+
React.useEffect(() => {
|
|
51
|
+
(0, styles_1.ensureStylesInjected)();
|
|
52
|
+
}, []);
|
|
53
|
+
React.useEffect(() => {
|
|
54
|
+
if (!ui.open)
|
|
55
|
+
return;
|
|
56
|
+
auth_1.auth.fetchSocialConnections().then((all) => {
|
|
57
|
+
(0, store_1.setLoginUI)({
|
|
58
|
+
providers: all.filter((c) => c.tagsStatus),
|
|
59
|
+
providersLoading: false,
|
|
60
|
+
});
|
|
61
|
+
}, () => (0, store_1.setLoginUI)({ providersLoading: false }));
|
|
62
|
+
(0, store_1.setLoginUI)({ providersLoading: true });
|
|
63
|
+
}, [ui.open]);
|
|
64
|
+
if (typeof document === "undefined")
|
|
65
|
+
return null;
|
|
66
|
+
const onOpenChange = (next) => {
|
|
67
|
+
if (!next)
|
|
68
|
+
(0, auth_1._cancelPendingLogin)("user closed login UI");
|
|
69
|
+
};
|
|
70
|
+
return ((0, jsx_runtime_1.jsx)(Dialog.Root, { open: ui.open, onOpenChange: onOpenChange, children: (0, jsx_runtime_1.jsxs)(Dialog.Portal, { children: [(0, jsx_runtime_1.jsx)(Dialog.Overlay, { className: "eazo-overlay" }), (0, jsx_runtime_1.jsxs)(Dialog.Content, { className: "eazo-content", "aria-describedby": undefined, children: [(0, jsx_runtime_1.jsx)(Dialog.Close, { className: "eazo-close", "aria-label": "Close", children: (0, jsx_runtime_1.jsx)(icons_1.CloseIcon, { size: 16 }) }), (0, jsx_runtime_1.jsxs)("div", { className: "eazo-header", children: [(0, jsx_runtime_1.jsx)(Dialog.Title, { className: "eazo-title", children: "Welcome" }), (0, jsx_runtime_1.jsx)(Dialog.Description, { className: "eazo-subtitle", children: "Sign in to continue" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "eazo-body", children: [ui.step === "providers" ? (0, jsx_runtime_1.jsx)(ProvidersStep, {}) : (0, jsx_runtime_1.jsx)(EmailStep, {}), ui.error ? (0, jsx_runtime_1.jsx)("div", { className: "eazo-error", children: ui.error }) : null] })] })] }) }));
|
|
71
|
+
}
|
|
72
|
+
function ProvidersStep() {
|
|
73
|
+
const ui = useLoginUI();
|
|
74
|
+
const submitting = ui.submitting;
|
|
75
|
+
const handleSocial = async (identifier) => {
|
|
76
|
+
(0, store_1.setLoginUI)({ submitting: true, error: null });
|
|
77
|
+
try {
|
|
78
|
+
await auth_1.auth.loginWithSocial(identifier);
|
|
79
|
+
(0, store_1.setLoginUI)({ open: false, submitting: false, error: null });
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
(0, store_1.setLoginUI)({
|
|
83
|
+
submitting: false,
|
|
84
|
+
error: err instanceof Error ? err.message : "Social login failed",
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [ui.providersLoading ? ((0, jsx_runtime_1.jsx)("div", { className: "eazo-spinner-row", children: (0, jsx_runtime_1.jsx)("div", { className: "eazo-spinner" }) })) : (ui.providers.map((conn) => ((0, jsx_runtime_1.jsxs)("button", { className: "eazo-provider-btn", onClick: () => handleSocial(conn.identifier), disabled: submitting, children: [(0, jsx_runtime_1.jsx)("span", { className: "eazo-provider-icon", children: (0, icons_1.pickProviderIcon)(conn.provider) }), (0, jsx_runtime_1.jsxs)("span", { children: ["Continue with ", conn.tooltip?.["en-US"] || conn.name_en || conn.provider] })] }, conn.identifier)))), !ui.providersLoading ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "eazo-divider", children: "or" }), (0, jsx_runtime_1.jsxs)("button", { type: "button", className: "eazo-email-trigger", onClick: () => (0, store_1.setLoginUI)({ step: "email", error: null }), children: [(0, jsx_runtime_1.jsx)("span", { className: "eazo-provider-icon", children: (0, jsx_runtime_1.jsx)(icons_1.MailIcon, {}) }), (0, jsx_runtime_1.jsx)("span", { children: "Continue with email" })] })] })) : null] }));
|
|
89
|
+
}
|
|
90
|
+
function EmailStep() {
|
|
91
|
+
const ui = useLoginUI();
|
|
92
|
+
const [email, setEmail] = React.useState("");
|
|
93
|
+
const [password, setPassword] = React.useState("");
|
|
94
|
+
const [code, setCode] = React.useState("");
|
|
95
|
+
const [codeSent, setCodeSent] = React.useState(false);
|
|
96
|
+
const [showPassword, setShowPassword] = React.useState(false);
|
|
97
|
+
const [resendCooldown, setResendCooldown] = React.useState(0);
|
|
98
|
+
const [sendingCode, setSendingCode] = React.useState(false);
|
|
99
|
+
const cooldownRef = React.useRef(null);
|
|
100
|
+
React.useEffect(() => () => {
|
|
101
|
+
if (cooldownRef.current)
|
|
102
|
+
clearInterval(cooldownRef.current);
|
|
103
|
+
}, []);
|
|
104
|
+
const startCooldown = () => {
|
|
105
|
+
setResendCooldown(60);
|
|
106
|
+
cooldownRef.current = setInterval(() => {
|
|
107
|
+
setResendCooldown((n) => {
|
|
108
|
+
if (n <= 1) {
|
|
109
|
+
if (cooldownRef.current)
|
|
110
|
+
clearInterval(cooldownRef.current);
|
|
111
|
+
return 0;
|
|
112
|
+
}
|
|
113
|
+
return n - 1;
|
|
114
|
+
});
|
|
115
|
+
}, 1000);
|
|
116
|
+
};
|
|
117
|
+
const sendCode = async () => {
|
|
118
|
+
if (!email.includes("@"))
|
|
119
|
+
return;
|
|
120
|
+
setSendingCode(true);
|
|
121
|
+
(0, store_1.setLoginUI)({ error: null });
|
|
122
|
+
try {
|
|
123
|
+
await auth_1.auth.sendEmailCode(email);
|
|
124
|
+
setCodeSent(true);
|
|
125
|
+
startCooldown();
|
|
126
|
+
}
|
|
127
|
+
catch (err) {
|
|
128
|
+
(0, store_1.setLoginUI)({
|
|
129
|
+
error: err instanceof Error ? err.message : "Failed to send code",
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
finally {
|
|
133
|
+
setSendingCode(false);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
const submit = async () => {
|
|
137
|
+
(0, store_1.setLoginUI)({ submitting: true, error: null });
|
|
138
|
+
try {
|
|
139
|
+
if (ui.emailMode === "code") {
|
|
140
|
+
await auth_1.auth.loginWithEmailCode(email, code);
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
await auth_1.auth.loginWithEmailPassword(email, password);
|
|
144
|
+
}
|
|
145
|
+
(0, store_1.setLoginUI)({ open: false, submitting: false, step: "providers", error: null });
|
|
146
|
+
}
|
|
147
|
+
catch (err) {
|
|
148
|
+
(0, store_1.setLoginUI)({
|
|
149
|
+
submitting: false,
|
|
150
|
+
error: err instanceof Error ? err.message : "Login failed",
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("button", { type: "button", className: "eazo-back-btn", onClick: () => (0, store_1.setLoginUI)({ step: "providers", error: null }), children: [(0, jsx_runtime_1.jsx)(icons_1.ArrowLeftIcon, { size: 14 }), " Back"] }), (0, jsx_runtime_1.jsxs)("div", { className: "eazo-input-wrapper", children: [(0, jsx_runtime_1.jsx)("span", { className: "eazo-input-icon", children: (0, jsx_runtime_1.jsx)(icons_1.MailIcon, { size: 18 }) }), (0, jsx_runtime_1.jsx)("input", { type: "email", className: "eazo-input", placeholder: "Email address", autoFocus: true, value: email, onChange: (e) => setEmail(e.target.value) })] }), ui.emailMode === "code" ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [codeSent ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "eazo-input-wrapper", children: (0, jsx_runtime_1.jsx)("input", { type: "text", inputMode: "numeric", maxLength: 6, className: "eazo-input eazo-input-code", placeholder: "Verification code", value: code, onChange: (e) => setCode(e.target.value), autoFocus: true }) }), (0, jsx_runtime_1.jsxs)("div", { className: "eazo-resend-row", children: [(0, jsx_runtime_1.jsxs)("span", { children: ["Code sent to ", email] }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "eazo-resend-btn", onClick: sendCode, disabled: sendingCode || resendCooldown > 0, children: sendingCode
|
|
155
|
+
? "Sending…"
|
|
156
|
+
: resendCooldown > 0
|
|
157
|
+
? `Resend in ${resendCooldown}s`
|
|
158
|
+
: "Resend" })] }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "eazo-primary-btn", onClick: submit, disabled: !email || !code || ui.submitting, children: ui.submitting ? "Signing in…" : "Log in" })] })) : ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "eazo-primary-btn", onClick: sendCode, disabled: !email.includes("@") || sendingCode, children: sendingCode ? "Sending…" : "Send code" })), (0, jsx_runtime_1.jsx)("div", { className: "eazo-divider", children: "or" }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "eazo-secondary-btn", onClick: () => (0, store_1.setLoginUI)({ emailMode: "password", error: null }), children: "Continue with password" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "eazo-input-wrapper", children: [(0, jsx_runtime_1.jsx)("span", { className: "eazo-input-icon", children: (0, jsx_runtime_1.jsx)(icons_1.KeyIcon, { size: 18 }) }), (0, jsx_runtime_1.jsx)("input", { type: showPassword ? "text" : "password", className: "eazo-input", placeholder: "Password", value: password, onChange: (e) => setPassword(e.target.value) }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "eazo-input-eye", onClick: () => setShowPassword((v) => !v), "aria-label": showPassword ? "Hide password" : "Show password", children: showPassword ? (0, jsx_runtime_1.jsx)(icons_1.EyeOffIcon, { size: 18 }) : (0, jsx_runtime_1.jsx)(icons_1.EyeIcon, { size: 18 }) })] }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "eazo-primary-btn", onClick: submit, disabled: !email || !password || ui.submitting, children: ui.submitting ? "Signing in…" : "Log in" }), (0, jsx_runtime_1.jsx)("div", { className: "eazo-divider", children: "or" }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "eazo-secondary-btn", onClick: () => (0, store_1.setLoginUI)({ emailMode: "code", error: null }), children: "Continue with verification code" })] }))] }));
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/internal/login-ui/index.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0Bb,0BAiDC;;AAzED,+DAAiD;AACjD,6CAA+B;AAE/B,+CAAiE;AACjE,oCAAqE;AACrE,mCAQiB;AACjB,qCAAgD;AAEhD,SAAS,UAAU;IACjB,OAAO,KAAK,CAAC,oBAAoB,CAC/B,aAAK,CAAC,SAAS,EACf,GAAG,EAAE,CAAC,aAAK,CAAC,WAAW,EAAE,CAAC,OAAO,EACjC,GAAG,EAAE,CAAC,aAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAClC,CAAC;AACJ,CAAC;AAED,SAAgB,OAAO;IACrB,MAAM,EAAE,GAAG,UAAU,EAAE,CAAC;IAExB,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAA,6BAAoB,GAAE,CAAC;IACzB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,EAAE,CAAC,IAAI;YAAE,OAAO;QACrB,WAAI,CAAC,sBAAsB,EAAE,CAAC,IAAI,CAChC,CAAC,GAAG,EAAE,EAAE;YACN,IAAA,kBAAU,EAAC;gBACT,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;gBAC1C,gBAAgB,EAAE,KAAK;aACxB,CAAC,CAAC;QACL,CAAC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AAI,EAAC,QAAQ,EACb,SAAS,EAAC,kBAAkB,EAC5B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,CAAC,KAAK,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,UAAU,YAE7C,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,GAClC,EACT,gCAAK,SAAS,EAAC,cAAc,mBAAS,EACtC,mCACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,oBAAoB,EAC9B,OAAO,EAAE,GAAG,EAAE,CAAC,IAAA,kBAAU,EAAC,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,gDAGtD,IACR,CACJ,IACA,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const LOGIN_UI_CSS = "\n.eazo-overlay {\n position: fixed;\n inset: 0;\n z-index: 2147483600;\n background: rgba(15, 23, 42, 0.36);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n animation: eazo-fade-in 180ms ease-out;\n}\n\n.eazo-content {\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 2147483601;\n width: calc(100vw - 32px);\n max-width: 440px;\n transform: translate(-50%, -50%);\n border-radius: 28px;\n padding: 28px 28px 22px;\n background: linear-gradient(145deg, #ffffff 0%, #f8f6f3 100%);\n box-shadow: 0 32px 80px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.8);\n color: #0f172a;\n font-family: inherit;\n animation: eazo-pop-in 200ms cubic-bezier(0.16, 1, 0.3, 1);\n max-height: calc(100vh - 48px);\n overflow-y: auto;\n}\n\n@keyframes eazo-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n@keyframes eazo-pop-in {\n from { opacity: 0; transform: translate(-50%, -48%) scale(0.96); }\n to { opacity: 1; transform: translate(-50%, -50%) scale(1); }\n}\n\n.eazo-close {\n position: absolute;\n top: 14px;\n right: 14px;\n width: 32px;\n height: 32px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: 0;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.88);\n color: #78716c;\n box-shadow: 0 4px 12px rgba(22, 28, 40, 0.08);\n cursor: pointer;\n transition: color 120ms ease, background 120ms ease;\n}\n.eazo-close:hover { color: #292524; background: #ffffff; }\n\n.eazo-header { text-align: center; margin-bottom: 6px; }\n.eazo-title {\n margin: 0;\n font-size: 28px;\n font-weight: 600;\n letter-spacing: -0.01em;\n color: rgba(15, 23, 42, 0.92);\n}\n.eazo-subtitle {\n margin: 2px 0 0;\n font-size: 15px;\n font-weight: 500;\n color: rgba(15, 23, 42, 0.52);\n}\n\n.eazo-body { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }\n\n.eazo-provider-btn,\n.eazo-email-trigger,\n.eazo-secondary-btn {\n width: 100%;\n height: 52px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n border-radius: 16px;\n border: 1px solid rgba(255, 255, 255, 0.72);\n background: rgba(255, 255, 255, 0.78);\n color: rgba(15, 23, 42, 0.82);\n font-size: 15px;\n font-weight: 600;\n cursor: pointer;\n box-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);\n transition: background 160ms ease, box-shadow 160ms ease, opacity 160ms ease;\n}\n.eazo-provider-btn:hover:not(:disabled),\n.eazo-secondary-btn:hover:not(:disabled),\n.eazo-email-trigger:hover:not(:disabled) {\n background: rgba(255, 255, 255, 0.94);\n box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);\n}\n.eazo-provider-btn:disabled,\n.eazo-secondary-btn:disabled,\n.eazo-primary-btn:disabled { cursor: not-allowed; opacity: 0.55; }\n\n.eazo-provider-icon {\n width: 20px;\n height: 20px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.eazo-primary-btn {\n width: 100%;\n height: 52px;\n border: 0;\n border-radius: 16px;\n background: linear-gradient(180deg, #F47A42 0%, #EE5C2A 100%);\n color: #ffffff;\n font-size: 15px;\n font-weight: 600;\n cursor: pointer;\n box-shadow: 0 12px 24px rgba(238, 92, 42, 0.32);\n transition: filter 160ms ease, box-shadow 160ms ease, opacity 160ms ease;\n}\n.eazo-primary-btn:hover:not(:disabled) {\n filter: brightness(1.05);\n box-shadow: 0 14px 30px rgba(238, 92, 42, 0.36);\n}\n\n.eazo-divider {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 4px 0;\n color: rgba(15, 23, 42, 0.42);\n font-size: 13px;\n font-weight: 500;\n letter-spacing: 0.02em;\n}\n.eazo-divider::before,\n.eazo-divider::after {\n content: \"\";\n flex: 1;\n height: 1px;\n background: rgba(15, 23, 42, 0.1);\n}\n\n.eazo-input-wrapper { position: relative; }\n.eazo-input {\n width: 100%;\n height: 48px;\n padding: 0 16px 0 44px;\n font: inherit;\n font-size: 15px;\n border-radius: 14px;\n border: 1px solid rgba(255, 255, 255, 0.7);\n background: rgba(255, 255, 255, 0.78);\n color: rgba(15, 23, 42, 0.82);\n box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);\n transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;\n box-sizing: border-box;\n outline: none;\n}\n.eazo-input:focus {\n border-color: rgba(238, 92, 42, 0.48);\n background: rgba(255, 255, 255, 0.92);\n box-shadow: 0 0 0 4px rgba(238, 92, 42, 0.12);\n}\n.eazo-input::placeholder { color: rgba(15, 23, 42, 0.4); }\n\n.eazo-input-icon {\n position: absolute;\n top: 50%;\n left: 14px;\n transform: translateY(-50%);\n display: inline-flex;\n color: rgba(15, 23, 42, 0.45);\n pointer-events: none;\n}\n.eazo-input-eye {\n position: absolute;\n top: 50%;\n right: 12px;\n transform: translateY(-50%);\n border: 0;\n background: transparent;\n color: rgba(15, 23, 42, 0.45);\n cursor: pointer;\n padding: 4px;\n}\n.eazo-input-eye:hover { color: rgba(15, 23, 42, 0.72); }\n.eazo-input-code {\n padding-left: 16px;\n}\n\n.eazo-back-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n border: 0;\n background: transparent;\n color: rgba(15, 23, 42, 0.52);\n font-size: 14px;\n cursor: pointer;\n padding: 4px 0;\n}\n.eazo-back-btn:hover { color: rgba(15, 23, 42, 0.8); }\n\n.eazo-resend-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 13px;\n color: rgba(15, 23, 42, 0.52);\n padding: 0 4px;\n}\n.eazo-resend-btn {\n border: 0;\n background: transparent;\n color: #EE5C2A;\n font-weight: 600;\n cursor: pointer;\n padding: 0;\n}\n.eazo-resend-btn:hover:not(:disabled) { color: #d54e1f; }\n.eazo-resend-btn:disabled { color: rgba(15, 23, 42, 0.3); cursor: not-allowed; }\n\n.eazo-error {\n background: rgba(248, 113, 113, 0.12);\n color: #b91c1c;\n padding: 10px 12px;\n border-radius: 10px;\n font-size: 13px;\n line-height: 1.45;\n}\n\n.eazo-spinner {\n width: 20px;\n height: 20px;\n border-radius: 999px;\n border: 2px solid rgba(15, 23, 42, 0.15);\n border-top-color: rgba(15, 23, 42, 0.65);\n animation: eazo-spin 700ms linear infinite;\n}\n.eazo-spinner-row { display: flex; justify-content: center; padding: 16px 0; }\n\n@keyframes eazo-spin {\n to { transform: rotate(360deg); }\n}\n\n.eazo-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n";
|
|
2
|
+
export declare function ensureStylesInjected(): void;
|
|
3
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/internal/login-ui/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,0zMAwQxB,CAAC;AAEF,wBAAgB,oBAAoB,IAAI,IAAI,CAQ3C"}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LOGIN_UI_CSS = void 0;
|
|
4
|
+
exports.ensureStylesInjected = ensureStylesInjected;
|
|
5
|
+
const STYLE_ID = "eazo-sdk-login-ui";
|
|
6
|
+
exports.LOGIN_UI_CSS = `
|
|
7
|
+
.eazo-overlay {
|
|
8
|
+
position: fixed;
|
|
9
|
+
inset: 0;
|
|
10
|
+
z-index: 2147483600;
|
|
11
|
+
background: rgba(15, 23, 42, 0.36);
|
|
12
|
+
backdrop-filter: blur(8px);
|
|
13
|
+
-webkit-backdrop-filter: blur(8px);
|
|
14
|
+
animation: eazo-fade-in 180ms ease-out;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.eazo-content {
|
|
18
|
+
position: fixed;
|
|
19
|
+
top: 50%;
|
|
20
|
+
left: 50%;
|
|
21
|
+
z-index: 2147483601;
|
|
22
|
+
width: calc(100vw - 32px);
|
|
23
|
+
max-width: 440px;
|
|
24
|
+
transform: translate(-50%, -50%);
|
|
25
|
+
border-radius: 28px;
|
|
26
|
+
padding: 28px 28px 22px;
|
|
27
|
+
background: linear-gradient(145deg, #ffffff 0%, #f8f6f3 100%);
|
|
28
|
+
box-shadow: 0 32px 80px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.8);
|
|
29
|
+
color: #0f172a;
|
|
30
|
+
font-family: inherit;
|
|
31
|
+
animation: eazo-pop-in 200ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
32
|
+
max-height: calc(100vh - 48px);
|
|
33
|
+
overflow-y: auto;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@keyframes eazo-fade-in {
|
|
37
|
+
from { opacity: 0; }
|
|
38
|
+
to { opacity: 1; }
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@keyframes eazo-pop-in {
|
|
42
|
+
from { opacity: 0; transform: translate(-50%, -48%) scale(0.96); }
|
|
43
|
+
to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.eazo-close {
|
|
47
|
+
position: absolute;
|
|
48
|
+
top: 14px;
|
|
49
|
+
right: 14px;
|
|
50
|
+
width: 32px;
|
|
51
|
+
height: 32px;
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
border: 0;
|
|
56
|
+
border-radius: 999px;
|
|
57
|
+
background: rgba(255, 255, 255, 0.88);
|
|
58
|
+
color: #78716c;
|
|
59
|
+
box-shadow: 0 4px 12px rgba(22, 28, 40, 0.08);
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
transition: color 120ms ease, background 120ms ease;
|
|
62
|
+
}
|
|
63
|
+
.eazo-close:hover { color: #292524; background: #ffffff; }
|
|
64
|
+
|
|
65
|
+
.eazo-header { text-align: center; margin-bottom: 6px; }
|
|
66
|
+
.eazo-title {
|
|
67
|
+
margin: 0;
|
|
68
|
+
font-size: 28px;
|
|
69
|
+
font-weight: 600;
|
|
70
|
+
letter-spacing: -0.01em;
|
|
71
|
+
color: rgba(15, 23, 42, 0.92);
|
|
72
|
+
}
|
|
73
|
+
.eazo-subtitle {
|
|
74
|
+
margin: 2px 0 0;
|
|
75
|
+
font-size: 15px;
|
|
76
|
+
font-weight: 500;
|
|
77
|
+
color: rgba(15, 23, 42, 0.52);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.eazo-body { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
|
|
81
|
+
|
|
82
|
+
.eazo-provider-btn,
|
|
83
|
+
.eazo-email-trigger,
|
|
84
|
+
.eazo-secondary-btn {
|
|
85
|
+
width: 100%;
|
|
86
|
+
height: 52px;
|
|
87
|
+
display: inline-flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
justify-content: center;
|
|
90
|
+
gap: 12px;
|
|
91
|
+
border-radius: 16px;
|
|
92
|
+
border: 1px solid rgba(255, 255, 255, 0.72);
|
|
93
|
+
background: rgba(255, 255, 255, 0.78);
|
|
94
|
+
color: rgba(15, 23, 42, 0.82);
|
|
95
|
+
font-size: 15px;
|
|
96
|
+
font-weight: 600;
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
box-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
|
|
99
|
+
transition: background 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
|
|
100
|
+
}
|
|
101
|
+
.eazo-provider-btn:hover:not(:disabled),
|
|
102
|
+
.eazo-secondary-btn:hover:not(:disabled),
|
|
103
|
+
.eazo-email-trigger:hover:not(:disabled) {
|
|
104
|
+
background: rgba(255, 255, 255, 0.94);
|
|
105
|
+
box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
|
|
106
|
+
}
|
|
107
|
+
.eazo-provider-btn:disabled,
|
|
108
|
+
.eazo-secondary-btn:disabled,
|
|
109
|
+
.eazo-primary-btn:disabled { cursor: not-allowed; opacity: 0.55; }
|
|
110
|
+
|
|
111
|
+
.eazo-provider-icon {
|
|
112
|
+
width: 20px;
|
|
113
|
+
height: 20px;
|
|
114
|
+
display: inline-flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
justify-content: center;
|
|
117
|
+
flex-shrink: 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.eazo-primary-btn {
|
|
121
|
+
width: 100%;
|
|
122
|
+
height: 52px;
|
|
123
|
+
border: 0;
|
|
124
|
+
border-radius: 16px;
|
|
125
|
+
background: linear-gradient(180deg, #F47A42 0%, #EE5C2A 100%);
|
|
126
|
+
color: #ffffff;
|
|
127
|
+
font-size: 15px;
|
|
128
|
+
font-weight: 600;
|
|
129
|
+
cursor: pointer;
|
|
130
|
+
box-shadow: 0 12px 24px rgba(238, 92, 42, 0.32);
|
|
131
|
+
transition: filter 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
|
|
132
|
+
}
|
|
133
|
+
.eazo-primary-btn:hover:not(:disabled) {
|
|
134
|
+
filter: brightness(1.05);
|
|
135
|
+
box-shadow: 0 14px 30px rgba(238, 92, 42, 0.36);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.eazo-divider {
|
|
139
|
+
display: flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
gap: 12px;
|
|
142
|
+
padding: 4px 0;
|
|
143
|
+
color: rgba(15, 23, 42, 0.42);
|
|
144
|
+
font-size: 13px;
|
|
145
|
+
font-weight: 500;
|
|
146
|
+
letter-spacing: 0.02em;
|
|
147
|
+
}
|
|
148
|
+
.eazo-divider::before,
|
|
149
|
+
.eazo-divider::after {
|
|
150
|
+
content: "";
|
|
151
|
+
flex: 1;
|
|
152
|
+
height: 1px;
|
|
153
|
+
background: rgba(15, 23, 42, 0.1);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.eazo-input-wrapper { position: relative; }
|
|
157
|
+
.eazo-input {
|
|
158
|
+
width: 100%;
|
|
159
|
+
height: 48px;
|
|
160
|
+
padding: 0 16px 0 44px;
|
|
161
|
+
font: inherit;
|
|
162
|
+
font-size: 15px;
|
|
163
|
+
border-radius: 14px;
|
|
164
|
+
border: 1px solid rgba(255, 255, 255, 0.7);
|
|
165
|
+
background: rgba(255, 255, 255, 0.78);
|
|
166
|
+
color: rgba(15, 23, 42, 0.82);
|
|
167
|
+
box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
|
|
168
|
+
transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
|
|
169
|
+
box-sizing: border-box;
|
|
170
|
+
outline: none;
|
|
171
|
+
}
|
|
172
|
+
.eazo-input:focus {
|
|
173
|
+
border-color: rgba(238, 92, 42, 0.48);
|
|
174
|
+
background: rgba(255, 255, 255, 0.92);
|
|
175
|
+
box-shadow: 0 0 0 4px rgba(238, 92, 42, 0.12);
|
|
176
|
+
}
|
|
177
|
+
.eazo-input::placeholder { color: rgba(15, 23, 42, 0.4); }
|
|
178
|
+
|
|
179
|
+
.eazo-input-icon {
|
|
180
|
+
position: absolute;
|
|
181
|
+
top: 50%;
|
|
182
|
+
left: 14px;
|
|
183
|
+
transform: translateY(-50%);
|
|
184
|
+
display: inline-flex;
|
|
185
|
+
color: rgba(15, 23, 42, 0.45);
|
|
186
|
+
pointer-events: none;
|
|
187
|
+
}
|
|
188
|
+
.eazo-input-eye {
|
|
189
|
+
position: absolute;
|
|
190
|
+
top: 50%;
|
|
191
|
+
right: 12px;
|
|
192
|
+
transform: translateY(-50%);
|
|
193
|
+
border: 0;
|
|
194
|
+
background: transparent;
|
|
195
|
+
color: rgba(15, 23, 42, 0.45);
|
|
196
|
+
cursor: pointer;
|
|
197
|
+
padding: 4px;
|
|
198
|
+
}
|
|
199
|
+
.eazo-input-eye:hover { color: rgba(15, 23, 42, 0.72); }
|
|
200
|
+
.eazo-input-code {
|
|
201
|
+
padding-left: 16px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.eazo-back-btn {
|
|
205
|
+
display: inline-flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
gap: 6px;
|
|
208
|
+
border: 0;
|
|
209
|
+
background: transparent;
|
|
210
|
+
color: rgba(15, 23, 42, 0.52);
|
|
211
|
+
font-size: 14px;
|
|
212
|
+
cursor: pointer;
|
|
213
|
+
padding: 4px 0;
|
|
214
|
+
}
|
|
215
|
+
.eazo-back-btn:hover { color: rgba(15, 23, 42, 0.8); }
|
|
216
|
+
|
|
217
|
+
.eazo-resend-row {
|
|
218
|
+
display: flex;
|
|
219
|
+
justify-content: space-between;
|
|
220
|
+
align-items: center;
|
|
221
|
+
font-size: 13px;
|
|
222
|
+
color: rgba(15, 23, 42, 0.52);
|
|
223
|
+
padding: 0 4px;
|
|
224
|
+
}
|
|
225
|
+
.eazo-resend-btn {
|
|
226
|
+
border: 0;
|
|
227
|
+
background: transparent;
|
|
228
|
+
color: #EE5C2A;
|
|
229
|
+
font-weight: 600;
|
|
230
|
+
cursor: pointer;
|
|
231
|
+
padding: 0;
|
|
232
|
+
}
|
|
233
|
+
.eazo-resend-btn:hover:not(:disabled) { color: #d54e1f; }
|
|
234
|
+
.eazo-resend-btn:disabled { color: rgba(15, 23, 42, 0.3); cursor: not-allowed; }
|
|
235
|
+
|
|
236
|
+
.eazo-error {
|
|
237
|
+
background: rgba(248, 113, 113, 0.12);
|
|
238
|
+
color: #b91c1c;
|
|
239
|
+
padding: 10px 12px;
|
|
240
|
+
border-radius: 10px;
|
|
241
|
+
font-size: 13px;
|
|
242
|
+
line-height: 1.45;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.eazo-spinner {
|
|
246
|
+
width: 20px;
|
|
247
|
+
height: 20px;
|
|
248
|
+
border-radius: 999px;
|
|
249
|
+
border: 2px solid rgba(15, 23, 42, 0.15);
|
|
250
|
+
border-top-color: rgba(15, 23, 42, 0.65);
|
|
251
|
+
animation: eazo-spin 700ms linear infinite;
|
|
252
|
+
}
|
|
253
|
+
.eazo-spinner-row { display: flex; justify-content: center; padding: 16px 0; }
|
|
254
|
+
|
|
255
|
+
@keyframes eazo-spin {
|
|
256
|
+
to { transform: rotate(360deg); }
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.eazo-sr-only {
|
|
260
|
+
position: absolute;
|
|
261
|
+
width: 1px;
|
|
262
|
+
height: 1px;
|
|
263
|
+
padding: 0;
|
|
264
|
+
margin: -1px;
|
|
265
|
+
overflow: hidden;
|
|
266
|
+
clip: rect(0, 0, 0, 0);
|
|
267
|
+
white-space: nowrap;
|
|
268
|
+
border: 0;
|
|
269
|
+
}
|
|
270
|
+
`;
|
|
271
|
+
function ensureStylesInjected() {
|
|
272
|
+
if (typeof document === "undefined")
|
|
273
|
+
return;
|
|
274
|
+
if (document.getElementById(STYLE_ID))
|
|
275
|
+
return;
|
|
276
|
+
const style = document.createElement("style");
|
|
277
|
+
style.id = STYLE_ID;
|
|
278
|
+
style.setAttribute("data-eazo-sdk", "login-ui");
|
|
279
|
+
style.textContent = exports.LOGIN_UI_CSS;
|
|
280
|
+
document.head.appendChild(style);
|
|
281
|
+
}
|
|
282
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/internal/login-ui/styles.ts"],"names":[],"mappings":";;;AA4QA,oDAQC;AApRD,MAAM,QAAQ,GAAG,mBAAmB,CAAC;AAExB,QAAA,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwQ3B,CAAC;AAEF,SAAgB,oBAAoB;IAClC,IAAI,OAAO,QAAQ,KAAK,WAAW;QAAE,OAAO;IAC5C,IAAI,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC;QAAE,OAAO;IAC9C,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,KAAK,CAAC,EAAE,GAAG,QAAQ,CAAC;IACpB,KAAK,CAAC,YAAY,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;IAChD,KAAK,CAAC,WAAW,GAAG,oBAAY,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { SocialConnection } from "./auth-primitive";
|
|
2
|
+
import type { AuthState, DeviceContext, EazoState } from "../types";
|
|
3
|
+
type Listener = () => void;
|
|
4
|
+
export type LoginUIStep = "providers" | "email";
|
|
5
|
+
export type LoginUIEmailMode = "code" | "password";
|
|
6
|
+
export interface LoginUIState {
|
|
7
|
+
open: boolean;
|
|
8
|
+
step: LoginUIStep;
|
|
9
|
+
emailMode: LoginUIEmailMode;
|
|
10
|
+
providers: SocialConnection[];
|
|
11
|
+
providersLoading: boolean;
|
|
12
|
+
error: string | null;
|
|
13
|
+
submitting: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface InternalEazoState extends EazoState {
|
|
16
|
+
loginUI: LoginUIState;
|
|
17
|
+
}
|
|
18
|
+
export declare const INITIAL_STATE: InternalEazoState;
|
|
19
|
+
export declare const store: {
|
|
20
|
+
getSnapshot(): InternalEazoState;
|
|
21
|
+
getServerSnapshot(): InternalEazoState;
|
|
22
|
+
subscribe(listener: Listener): () => void;
|
|
23
|
+
reset(): void;
|
|
24
|
+
};
|
|
25
|
+
export declare function setAuth(patch: Partial<AuthState>): void;
|
|
26
|
+
export declare function setDevice(patch: Partial<DeviceContext>): void;
|
|
27
|
+
export declare function setLoginUI(patch: Partial<LoginUIState>): void;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/internal/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEpE,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAC;AAE3B,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,OAAO,CAAC;AAChD,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,UAAU,CAAC;AAEnD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACrB;AAyBD,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,eAAO,MAAM,aAAa,EAAE,iBAI3B,CAAC;AAKF,eAAO,MAAM,KAAK;mBACD,iBAAiB;yBAGX,iBAAiB;wBAGlB,QAAQ,GAAG,MAAM,IAAI;aAIhC,IAAI;CAId,CAAC;AAOF,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,CAWvD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAQ7D;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAQ7D"}
|