@cabin-id/nextjs 2.1.0 → 2.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/dist/cjs/components/AuthButton.js +75 -0
- package/dist/cjs/components/AuthButton.js.map +1 -0
- package/dist/cjs/components/SignInButton.js +4 -3
- package/dist/cjs/components/SignInButton.js.map +1 -1
- package/dist/cjs/components/index.js +3 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/server/createRedirect.js +12 -8
- package/dist/cjs/server/createRedirect.js.map +1 -1
- package/dist/cjs/styles/global.css +18 -0
- package/dist/cjs/styles/global.css.map +1 -1
- package/dist/esm/components/AuthButton.js +41 -0
- package/dist/esm/components/AuthButton.js.map +1 -0
- package/dist/esm/components/SignInButton.js +4 -3
- package/dist/esm/components/SignInButton.js.map +1 -1
- package/dist/esm/components/index.js +2 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/server/createRedirect.js +12 -8
- package/dist/esm/server/createRedirect.js.map +1 -1
- package/dist/esm/styles/global.css +18 -0
- package/dist/esm/styles/global.css.map +1 -1
- package/dist/types/components/AuthButton.d.ts +33 -0
- package/dist/types/components/AuthButton.d.ts.map +1 -0
- package/dist/types/components/SignInButton.d.ts +5 -0
- package/dist/types/components/SignInButton.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/server/createRedirect.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var AuthButton_exports = {};
|
|
31
|
+
__export(AuthButton_exports, {
|
|
32
|
+
AuthButton: () => AuthButton
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(AuthButton_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_useUser = require("../hooks/useUser");
|
|
37
|
+
var import_SignInButton = require("./SignInButton");
|
|
38
|
+
var import_SignOutButton = require("./SignOutButton");
|
|
39
|
+
const AuthButton = ({
|
|
40
|
+
signInLabel = "Sign In",
|
|
41
|
+
signOutLabel = "Sign Out",
|
|
42
|
+
className,
|
|
43
|
+
afterSignInUrl,
|
|
44
|
+
afterSignOutUrl,
|
|
45
|
+
showLogo = true
|
|
46
|
+
}) => {
|
|
47
|
+
const { isSignedIn, isLoaded } = (0, import_useUser.useUser)();
|
|
48
|
+
if (!isLoaded) {
|
|
49
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `animate-pulse bg-gray-200 h-10 w-24 rounded-full ${className}` });
|
|
50
|
+
}
|
|
51
|
+
if (isSignedIn) {
|
|
52
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
53
|
+
import_SignOutButton.SignOutButton,
|
|
54
|
+
{
|
|
55
|
+
afterSignOutUrl,
|
|
56
|
+
className
|
|
57
|
+
},
|
|
58
|
+
signOutLabel
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
62
|
+
import_SignInButton.SignInButton,
|
|
63
|
+
{
|
|
64
|
+
afterSignInUrl,
|
|
65
|
+
className,
|
|
66
|
+
showLogo
|
|
67
|
+
},
|
|
68
|
+
signInLabel
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
72
|
+
0 && (module.exports = {
|
|
73
|
+
AuthButton
|
|
74
|
+
});
|
|
75
|
+
//# sourceMappingURL=AuthButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AuthButton.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport { useUser } from '../hooks/useUser';\nimport { SignInButton } from './SignInButton';\nimport { SignOutButton } from './SignOutButton';\n\nexport interface AuthButtonProps {\n /**\n * Custom text for sign in button\n */\n signInLabel?: React.ReactNode;\n /**\n * Custom text for sign out button\n */\n signOutLabel?: React.ReactNode;\n /**\n * Custom CSS class name for the button\n */\n className?: string;\n /**\n * URL to redirect after sign in\n */\n afterSignInUrl?: string;\n /**\n * URL to redirect after sign out\n */\n afterSignOutUrl?: string;\n /**\n * Whether to show the CabinID logo (only applies if using default children)\n */\n showLogo?: boolean;\n}\n\n/**\n * AuthButton automatically toggles between SignIn and Out buttons \n * based on the user's authentication state.\n */\nexport const AuthButton: React.FC<AuthButtonProps> = ({\n signInLabel = 'Sign In',\n signOutLabel = 'Sign Out',\n className,\n afterSignInUrl,\n afterSignOutUrl,\n showLogo = true,\n}) => {\n const { isSignedIn, isLoaded } = useUser();\n\n if (!isLoaded) {\n return (\n <div className={`animate-pulse bg-gray-200 h-10 w-24 rounded-full ${className}`} />\n );\n }\n\n if (isSignedIn) {\n return (\n <SignOutButton\n afterSignOutUrl={afterSignOutUrl}\n className={className}\n >\n {signOutLabel}\n </SignOutButton>\n );\n }\n\n return (\n <SignInButton\n afterSignInUrl={afterSignInUrl}\n className={className}\n showLogo={showLogo}\n >\n {signInLabel}\n </SignInButton>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAAkB;AAClB,qBAAwB;AACxB,0BAA6B;AAC7B,2BAA8B;AAiCvB,MAAM,aAAwC,CAAC;AAAA,EAClD,cAAc;AAAA,EACd,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AACf,MAAM;AACF,QAAM,EAAE,YAAY,SAAS,QAAI,wBAAQ;AAEzC,MAAI,CAAC,UAAU;AACX,WACI,6BAAAA,QAAA,cAAC,SAAI,WAAW,oDAAoD,SAAS,IAAI;AAAA,EAEzF;AAEA,MAAI,YAAY;AACZ,WACI,6BAAAA,QAAA;AAAA,MAAC;AAAA;AAAA,QACG;AAAA,QACA;AAAA;AAAA,MAEC;AAAA,IACL;AAAA,EAER;AAEA,SACI,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACG;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC;AAAA,EACL;AAER;","names":["React"]}
|
|
@@ -38,7 +38,8 @@ var import_constants = require("../constants");
|
|
|
38
38
|
const SignInButton = ({
|
|
39
39
|
children = "Continue to CabinID",
|
|
40
40
|
className = "max-w-48 pl-2 py-2 pr-4 bg-blue-600 rounded-full flex flex-row space-x-2 items-center hover:opacity-90 active:bg-blue-700",
|
|
41
|
-
afterSignInUrl
|
|
41
|
+
afterSignInUrl,
|
|
42
|
+
showLogo = true
|
|
42
43
|
}) => {
|
|
43
44
|
const [signInUrl, setSignInUrl] = (0, import_react.useState)("#");
|
|
44
45
|
(0, import_react.useEffect)(() => {
|
|
@@ -69,8 +70,8 @@ const SignInButton = ({
|
|
|
69
70
|
href: signInUrl,
|
|
70
71
|
className
|
|
71
72
|
},
|
|
72
|
-
/* @__PURE__ */ import_react.default.createElement(import_logo.CabinLogo, null),
|
|
73
|
-
/* @__PURE__ */ import_react.default.createElement("span", { className: "text-white text-sm" }, children)
|
|
73
|
+
showLogo && /* @__PURE__ */ import_react.default.createElement(import_logo.CabinLogo, null),
|
|
74
|
+
typeof children === "string" ? /* @__PURE__ */ import_react.default.createElement("span", { className: "text-white text-sm" }, children) : children
|
|
74
75
|
);
|
|
75
76
|
};
|
|
76
77
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/SignInButton.tsx"],"sourcesContent":["'use client';\n\nimport React, { useEffect, useState } from 'react';\nimport { CabinLogo } from '../icons/logo';\nimport { AFTER_SIGN_IN_URL, frontendApi, SIGN_IN_URL } from '../constants';\n\nexport interface SignInButtonProps {\n /**\n * Custom text to display on the button\n * @default \"Continue to CabinID\"\n */\n children?: React.ReactNode;\n /**\n * Custom CSS class name\n */\n className?: string;\n /**\n * Custom URL to redirect after successful sign in.\n * If not provided, it will use NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_IN_URL from env.\n */\n afterSignInUrl?: string;\n}\n\n/**\n * SignInButton component that handles user authentication redirect to CabinID\n */\nexport const SignInButton: React.FC<SignInButtonProps> = ({\n children = 'Continue to CabinID',\n className = 'max-w-48 pl-2 py-2 pr-4 bg-blue-600 rounded-full flex flex-row space-x-2 items-center hover:opacity-90 active:bg-blue-700',\n afterSignInUrl,\n}) => {\n const [signInUrl, setSignInUrl] = useState('#');\n\n useEffect(() => {\n if (typeof window !== 'undefined') {\n const origin = window.origin;\n if (!origin) {\n return;\n }\n\n const redirectPath = afterSignInUrl || AFTER_SIGN_IN_URL || '/';\n // Ensure redirectPath starts with / if it's a relative path and doesn't already have it\n const formattedPath = (redirectPath.startsWith('/') || redirectPath.startsWith('http'))\n ? redirectPath\n : `/${redirectPath}`;\n\n const absoluteRedirectUrl = formattedPath.startsWith('http')\n ? formattedPath\n : `${origin}${formattedPath}`;\n\n const params = new URLSearchParams({\n redirect_url: absoluteRedirectUrl,\n });\n\n let signInUrlTemp = '#';\n if (SIGN_IN_URL) {\n signInUrlTemp = SIGN_IN_URL.includes('?')\n ? `${SIGN_IN_URL}&${params.toString()}`\n : `${SIGN_IN_URL}?${params.toString()}`;\n } else if (frontendApi) {\n const protocol = frontendApi.includes('localhost') ? 'http' : 'https';\n signInUrlTemp = `${protocol}://${frontendApi}/sign-in?${params.toString()}`;\n }\n\n setSignInUrl(signInUrlTemp);\n }\n }, [afterSignInUrl]);\n\n return (\n <a\n href={signInUrl}\n className={className}\n >\n <CabinLogo
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SignInButton.tsx"],"sourcesContent":["'use client';\n\nimport React, { useEffect, useState } from 'react';\nimport { CabinLogo } from '../icons/logo';\nimport { AFTER_SIGN_IN_URL, frontendApi, SIGN_IN_URL } from '../constants';\n\nexport interface SignInButtonProps {\n /**\n * Custom text to display on the button\n * @default \"Continue to CabinID\"\n */\n children?: React.ReactNode;\n /**\n * Custom CSS class name\n */\n className?: string;\n /**\n * Custom URL to redirect after successful sign in.\n * If not provided, it will use NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_IN_URL from env.\n */\n afterSignInUrl?: string;\n /**\n * Whether to show the CabinID logo\n * @default true\n */\n showLogo?: boolean;\n}\n\n/**\n * SignInButton component that handles user authentication redirect to CabinID\n */\nexport const SignInButton: React.FC<SignInButtonProps> = ({\n children = 'Continue to CabinID',\n className = 'max-w-48 pl-2 py-2 pr-4 bg-blue-600 rounded-full flex flex-row space-x-2 items-center hover:opacity-90 active:bg-blue-700',\n afterSignInUrl,\n showLogo = true,\n}) => {\n const [signInUrl, setSignInUrl] = useState('#');\n\n useEffect(() => {\n if (typeof window !== 'undefined') {\n const origin = window.origin;\n if (!origin) {\n return;\n }\n\n const redirectPath = afterSignInUrl || AFTER_SIGN_IN_URL || '/';\n // Ensure redirectPath starts with / if it's a relative path and doesn't already have it\n const formattedPath = (redirectPath.startsWith('/') || redirectPath.startsWith('http'))\n ? redirectPath\n : `/${redirectPath}`;\n\n const absoluteRedirectUrl = formattedPath.startsWith('http')\n ? formattedPath\n : `${origin}${formattedPath}`;\n\n const params = new URLSearchParams({\n redirect_url: absoluteRedirectUrl,\n });\n\n let signInUrlTemp = '#';\n if (SIGN_IN_URL) {\n signInUrlTemp = SIGN_IN_URL.includes('?')\n ? `${SIGN_IN_URL}&${params.toString()}`\n : `${SIGN_IN_URL}?${params.toString()}`;\n } else if (frontendApi) {\n const protocol = frontendApi.includes('localhost') ? 'http' : 'https';\n signInUrlTemp = `${protocol}://${frontendApi}/sign-in?${params.toString()}`;\n }\n\n setSignInUrl(signInUrlTemp);\n }\n }, [afterSignInUrl]);\n\n return (\n <a\n href={signInUrl}\n className={className}\n >\n {showLogo && <CabinLogo />}\n {typeof children === 'string' ? (\n <span className=\"text-white text-sm\">{children}</span>\n ) : (\n children\n )}\n </a>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAA2C;AAC3C,kBAA0B;AAC1B,uBAA4D;AA2BrD,MAAM,eAA4C,CAAC;AAAA,EACxD,WAAW;AAAA,EACX,YAAY;AAAA,EACZ;AAAA,EACA,WAAW;AACb,MAAM;AACJ,QAAM,CAAC,WAAW,YAAY,QAAI,uBAAS,GAAG;AAE9C,8BAAU,MAAM;AACd,QAAI,OAAO,WAAW,aAAa;AACjC,YAAM,SAAS,OAAO;AACtB,UAAI,CAAC,QAAQ;AACX;AAAA,MACF;AAEA,YAAM,eAAe,kBAAkB,sCAAqB;AAE5D,YAAM,gBAAiB,aAAa,WAAW,GAAG,KAAK,aAAa,WAAW,MAAM,IACjF,eACA,IAAI,YAAY;AAEpB,YAAM,sBAAsB,cAAc,WAAW,MAAM,IACvD,gBACA,GAAG,MAAM,GAAG,aAAa;AAE7B,YAAM,SAAS,IAAI,gBAAgB;AAAA,QACjC,cAAc;AAAA,MAChB,CAAC;AAED,UAAI,gBAAgB;AACpB,UAAI,8BAAa;AACf,wBAAgB,6BAAY,SAAS,GAAG,IACpC,GAAG,4BAAW,IAAI,OAAO,SAAS,CAAC,KACnC,GAAG,4BAAW,IAAI,OAAO,SAAS,CAAC;AAAA,MACzC,WAAW,8BAAa;AACtB,cAAM,WAAW,6BAAY,SAAS,WAAW,IAAI,SAAS;AAC9D,wBAAgB,GAAG,QAAQ,MAAM,4BAAW,YAAY,OAAO,SAAS,CAAC;AAAA,MAC3E;AAEA,mBAAa,aAAa;AAAA,IAC5B;AAAA,EACF,GAAG,CAAC,cAAc,CAAC;AAEnB,SACE,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN;AAAA;AAAA,IAEC,YAAY,6BAAAA,QAAA,cAAC,2BAAU;AAAA,IACvB,OAAO,aAAa,WACnB,6BAAAA,QAAA,cAAC,UAAK,WAAU,wBAAsB,QAAS,IAE/C;AAAA,EAEJ;AAEJ;","names":["React"]}
|
|
@@ -18,14 +18,17 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var components_exports = {};
|
|
20
20
|
__export(components_exports, {
|
|
21
|
+
AuthButton: () => import_AuthButton.AuthButton,
|
|
21
22
|
SignInButton: () => import_SignInButton.SignInButton,
|
|
22
23
|
SignOutButton: () => import_SignOutButton.SignOutButton
|
|
23
24
|
});
|
|
24
25
|
module.exports = __toCommonJS(components_exports);
|
|
25
26
|
var import_SignInButton = require("./SignInButton");
|
|
26
27
|
var import_SignOutButton = require("./SignOutButton");
|
|
28
|
+
var import_AuthButton = require("./AuthButton");
|
|
27
29
|
// Annotate the CommonJS export names for ESM import in node:
|
|
28
30
|
0 && (module.exports = {
|
|
31
|
+
AuthButton,
|
|
29
32
|
SignInButton,
|
|
30
33
|
SignOutButton
|
|
31
34
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export { SignInButton } from './SignInButton';\nexport { SignOutButton } from './SignOutButton';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA6B;AAC7B,2BAA8B;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export { SignInButton } from './SignInButton';\nexport { SignOutButton } from './SignOutButton';\nexport { AuthButton } from './AuthButton';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA6B;AAC7B,2BAA8B;AAC9B,wBAA2B;","names":[]}
|
|
@@ -51,6 +51,10 @@ const createRedirect = (params) => {
|
|
|
51
51
|
const { publishableKey, redirectAdapter, signInUrl, signUpUrl, baseUrl } = params;
|
|
52
52
|
const frontendApi = (0, import_key.parsePublishableKey)(publishableKey);
|
|
53
53
|
const accountsBaseUrl = buildAccountsBaseUrl(frontendApi);
|
|
54
|
+
const addClientId = (url) => {
|
|
55
|
+
url.searchParams.set("client_id", publishableKey);
|
|
56
|
+
return url;
|
|
57
|
+
};
|
|
54
58
|
const redirectToSignUp = ({ returnBackUrl } = {}) => {
|
|
55
59
|
if (!signUpUrl && !accountsBaseUrl) {
|
|
56
60
|
throw new Error("Publish Key is not exist");
|
|
@@ -58,11 +62,11 @@ const createRedirect = (params) => {
|
|
|
58
62
|
const accountsSignUpUrl = `${accountsBaseUrl}/sign-up`;
|
|
59
63
|
let redirect = null;
|
|
60
64
|
if (signUpUrl) {
|
|
61
|
-
|
|
65
|
+
const url = new URL(buildUrl(baseUrl, signUpUrl));
|
|
66
|
+
redirect = redirectAdapter(addClientId(url).toString());
|
|
62
67
|
} else {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
);
|
|
68
|
+
const url = new URL(buildUrl(null, accountsSignUpUrl, returnBackUrl));
|
|
69
|
+
redirect = redirectAdapter(addClientId(url).toString());
|
|
66
70
|
}
|
|
67
71
|
return redirect;
|
|
68
72
|
};
|
|
@@ -73,11 +77,11 @@ const createRedirect = (params) => {
|
|
|
73
77
|
const accountsSignInUrl = `${accountsBaseUrl}/sign-in`;
|
|
74
78
|
let redirect = null;
|
|
75
79
|
if (signInUrl) {
|
|
76
|
-
|
|
80
|
+
const url = new URL(buildUrl(baseUrl, signInUrl));
|
|
81
|
+
redirect = redirectAdapter(addClientId(url).toString());
|
|
77
82
|
} else {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
);
|
|
83
|
+
const url = new URL(buildUrl(null, accountsSignInUrl, returnBackUrl));
|
|
84
|
+
redirect = redirectAdapter(addClientId(url).toString());
|
|
81
85
|
}
|
|
82
86
|
return redirect;
|
|
83
87
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/server/createRedirect.ts"],"sourcesContent":["import { parsePublishableKey } from '../utils/key';\n\ntype RedirectAdapter<RedirectReturn> = (url: string) => RedirectReturn;\ntype RedirectToParams = { returnBackUrl?: string | URL | null };\nexport type RedirectFun<ReturnType> = (params?: RedirectToParams) => ReturnType;\n\nconst buildUrl = (\n _baseUrl: string | URL | null,\n _targetUrl: string | URL,\n _returnBackUrl?: string | URL | null\n) => {\n if (!!_baseUrl) {\n const baseUrl = new URL(_baseUrl);\n const returnBackUrl = _returnBackUrl\n ? new URL(_returnBackUrl, baseUrl)\n : undefined;\n const res = new URL(_targetUrl, baseUrl);\n\n if (returnBackUrl) {\n res.searchParams.set('redirect_url', returnBackUrl.toString());\n }\n return res.toString();\n } else {\n const returnBackUrl = _returnBackUrl ? new URL(_returnBackUrl) : undefined;\n const res = new URL(_targetUrl);\n\n if (returnBackUrl) {\n res.searchParams.set('redirect_url', returnBackUrl.toString());\n }\n return res.toString();\n }\n};\n\nconst buildAccountsBaseUrl = (frontendApi: string | null) => {\n if (!frontendApi) {\n return '';\n }\n\n // convert url from FAPI to accounts for Kima and legacy (prod & dev) instances\n const accountsBaseUrl = frontendApi;\n return `https://${accountsBaseUrl}`;\n};\n\n/**\n * @internal\n */\ntype CreateRedirect = <ReturnType>(params: {\n publishableKey: string;\n redirectAdapter: RedirectAdapter<ReturnType>;\n baseUrl: URL | string;\n signInUrl?: URL | string;\n signUpUrl?: URL | string;\n}) => {\n redirectToSignIn: RedirectFun<ReturnType>;\n redirectToSignUp: RedirectFun<ReturnType>;\n};\n\nexport const createRedirect: CreateRedirect = (params) => {\n const { publishableKey, redirectAdapter, signInUrl, signUpUrl, baseUrl } =\n params;\n const frontendApi = parsePublishableKey(publishableKey);\n const accountsBaseUrl = buildAccountsBaseUrl(frontendApi);\n\n const redirectToSignUp = ({ returnBackUrl }: RedirectToParams = {}) => {\n if (!signUpUrl && !accountsBaseUrl) {\n throw new Error('Publish Key is not exist');\n }\n const accountsSignUpUrl = `${accountsBaseUrl}/sign-up`;\n let redirect = null;\n\n if (signUpUrl) {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/server/createRedirect.ts"],"sourcesContent":["import { parsePublishableKey } from '../utils/key';\n\ntype RedirectAdapter<RedirectReturn> = (url: string) => RedirectReturn;\ntype RedirectToParams = { returnBackUrl?: string | URL | null };\nexport type RedirectFun<ReturnType> = (params?: RedirectToParams) => ReturnType;\n\nconst buildUrl = (\n _baseUrl: string | URL | null,\n _targetUrl: string | URL,\n _returnBackUrl?: string | URL | null\n) => {\n if (!!_baseUrl) {\n const baseUrl = new URL(_baseUrl);\n const returnBackUrl = _returnBackUrl\n ? new URL(_returnBackUrl, baseUrl)\n : undefined;\n const res = new URL(_targetUrl, baseUrl);\n\n if (returnBackUrl) {\n res.searchParams.set('redirect_url', returnBackUrl.toString());\n }\n return res.toString();\n } else {\n const returnBackUrl = _returnBackUrl ? new URL(_returnBackUrl) : undefined;\n const res = new URL(_targetUrl);\n\n if (returnBackUrl) {\n res.searchParams.set('redirect_url', returnBackUrl.toString());\n }\n return res.toString();\n }\n};\n\nconst buildAccountsBaseUrl = (frontendApi: string | null) => {\n if (!frontendApi) {\n return '';\n }\n\n // convert url from FAPI to accounts for Kima and legacy (prod & dev) instances\n const accountsBaseUrl = frontendApi;\n return `https://${accountsBaseUrl}`;\n};\n\n/**\n * @internal\n */\ntype CreateRedirect = <ReturnType>(params: {\n publishableKey: string;\n redirectAdapter: RedirectAdapter<ReturnType>;\n baseUrl: URL | string;\n signInUrl?: URL | string;\n signUpUrl?: URL | string;\n}) => {\n redirectToSignIn: RedirectFun<ReturnType>;\n redirectToSignUp: RedirectFun<ReturnType>;\n};\n\nexport const createRedirect: CreateRedirect = (params) => {\n const { publishableKey, redirectAdapter, signInUrl, signUpUrl, baseUrl } =\n params;\n const frontendApi = parsePublishableKey(publishableKey);\n const accountsBaseUrl = buildAccountsBaseUrl(frontendApi);\n\n const addClientId = (url: URL) => {\n url.searchParams.set('client_id', publishableKey);\n return url;\n };\n\n const redirectToSignUp = ({ returnBackUrl }: RedirectToParams = {}) => {\n if (!signUpUrl && !accountsBaseUrl) {\n throw new Error('Publish Key is not exist');\n }\n const accountsSignUpUrl = `${accountsBaseUrl}/sign-up`;\n let redirect = null;\n\n if (signUpUrl) {\n const url = new URL(buildUrl(baseUrl, signUpUrl));\n redirect = redirectAdapter(addClientId(url).toString());\n } else {\n const url = new URL(buildUrl(null, accountsSignUpUrl, returnBackUrl));\n redirect = redirectAdapter(addClientId(url).toString());\n }\n return redirect;\n };\n\n const redirectToSignIn = ({ returnBackUrl }: RedirectToParams = {}) => {\n if (!signInUrl && !accountsBaseUrl) {\n throw new Error('Publish Key is not exist');\n }\n const accountsSignInUrl = `${accountsBaseUrl}/sign-in`;\n\n let redirect = null;\n if (signInUrl) {\n const url = new URL(buildUrl(baseUrl, signInUrl));\n redirect = redirectAdapter(addClientId(url).toString());\n } else {\n const url = new URL(buildUrl(null, accountsSignInUrl, returnBackUrl));\n redirect = redirectAdapter(addClientId(url).toString());\n }\n\n return redirect;\n };\n\n return { redirectToSignUp, redirectToSignIn };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAoC;AAMpC,MAAM,WAAW,CACf,UACA,YACA,mBACG;AACH,MAAI,CAAC,CAAC,UAAU;AACd,UAAM,UAAU,IAAI,IAAI,QAAQ;AAChC,UAAM,gBAAgB,iBAClB,IAAI,IAAI,gBAAgB,OAAO,IAC/B;AACJ,UAAM,MAAM,IAAI,IAAI,YAAY,OAAO;AAEvC,QAAI,eAAe;AACjB,UAAI,aAAa,IAAI,gBAAgB,cAAc,SAAS,CAAC;AAAA,IAC/D;AACA,WAAO,IAAI,SAAS;AAAA,EACtB,OAAO;AACL,UAAM,gBAAgB,iBAAiB,IAAI,IAAI,cAAc,IAAI;AACjE,UAAM,MAAM,IAAI,IAAI,UAAU;AAE9B,QAAI,eAAe;AACjB,UAAI,aAAa,IAAI,gBAAgB,cAAc,SAAS,CAAC;AAAA,IAC/D;AACA,WAAO,IAAI,SAAS;AAAA,EACtB;AACF;AAEA,MAAM,uBAAuB,CAAC,gBAA+B;AAC3D,MAAI,CAAC,aAAa;AAChB,WAAO;AAAA,EACT;AAGA,QAAM,kBAAkB;AACxB,SAAO,WAAW,eAAe;AACnC;AAgBO,MAAM,iBAAiC,CAAC,WAAW;AACxD,QAAM,EAAE,gBAAgB,iBAAiB,WAAW,WAAW,QAAQ,IACrE;AACF,QAAM,kBAAc,gCAAoB,cAAc;AACtD,QAAM,kBAAkB,qBAAqB,WAAW;AAExD,QAAM,cAAc,CAAC,QA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{
|
|
378
|
+
width: 6rem;
|
|
379
|
+
}
|
|
374
380
|
.max-w-48 {
|
|
375
381
|
max-width: 12rem;
|
|
376
382
|
}
|
|
383
|
+
@keyframes pulse {
|
|
384
|
+
50% {
|
|
385
|
+
opacity: .5;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
.animate-pulse {
|
|
389
|
+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
390
|
+
}
|
|
377
391
|
.flex-row {
|
|
378
392
|
flex-direction: row;
|
|
379
393
|
}
|
|
@@ -395,6 +409,10 @@ video {
|
|
|
395
409
|
--tw-bg-opacity: 1;
|
|
396
410
|
background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
|
|
397
411
|
}
|
|
412
|
+
.bg-gray-200 {
|
|
413
|
+
--tw-bg-opacity: 1;
|
|
414
|
+
background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));
|
|
415
|
+
}
|
|
398
416
|
.bg-red-600 {
|
|
399
417
|
--tw-bg-opacity: 1;
|
|
400
418
|
background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/styles/global.css"],"sourcesContent":["*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden]:where(:not([hidden=\"until-found\"])) {\n display: none;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.flex {\n display: flex;\n}\n.max-w-48 {\n max-width: 12rem;\n}\n.flex-row {\n flex-direction: row;\n}\n.items-center {\n align-items: center;\n}\n.space-x-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));\n}\n.bg-red-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pr-4 {\n padding-right: 1rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.hover\\:bg-red-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(185 28 28 / var(--tw-bg-opacity, 1));\n}\n.hover\\:opacity-90:hover {\n opacity: 0.9;\n}\n.active\\:bg-blue-700:active {\n --tw-bg-opacity: 1;\n background-color: rgb(29 78 216 / var(--tw-bg-opacity, 1));\n}\n.disabled\\:opacity-50:disabled {\n opacity: 0.5;\n}\n"],"mappings":"AAAA;AAAG;AAAU;AACX,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AAEA;AACE,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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AAiB;AACjB,oBAAkB,IAAI,GAAG,GAAG,IAAI,EAAE,IAAI,eAAe,EAAE;AACzD;AACA,CAAC,oBAAoB;AACnB,WAAS;AACX;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/styles/global.css"],"sourcesContent":["*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden]:where(:not([hidden=\"until-found\"])) {\n display: none;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.flex {\n display: flex;\n}\n.h-10 {\n height: 2.5rem;\n}\n.w-24 {\n width: 6rem;\n}\n.max-w-48 {\n max-width: 12rem;\n}\n@keyframes pulse {\n\n 50% {\n opacity: .5;\n }\n}\n.animate-pulse {\n animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n.flex-row {\n flex-direction: row;\n}\n.items-center {\n align-items: center;\n}\n.space-x-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));\n}\n.bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));\n}\n.bg-red-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pr-4 {\n padding-right: 1rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.hover\\:bg-red-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(185 28 28 / var(--tw-bg-opacity, 1));\n}\n.hover\\:opacity-90:hover {\n opacity: 0.9;\n}\n.active\\:bg-blue-700:active {\n --tw-bg-opacity: 1;\n background-color: rgb(29 78 216 / var(--tw-bg-opacity, 1));\n}\n.disabled\\:opacity-50:disabled {\n opacity: 0.5;\n}\n"],"mappings":"AAAA;AAAG;AAAU;AACX,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AAEA;AACE,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AAOA;AACA;AACA;AACE,cAAY;AACZ,gBAAc;AACd,gBAAc;AACd,gBAAc;AAChB;AAEA;AACA;AACE,gBAAc;AAChB;AAYA;AACA;AACE,eAAa;AACb,4BAA0B;AAC1B,iBAAe;AACf,eAAa;AACV,YAAU;AACb;AAAA,IAAa,aAAa;AAAA,IAAE,SAAS;AAAA,IAAE,UAAU;AAAA,IAAE,mBAAmB;AAAA,IAAE,gBAAgB;AAAA,IAAE,iBAAiB;AAAA,IAAE;AA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AACnB,WAAS;AACX;","names":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { useUser } from "../hooks/useUser";
|
|
4
|
+
import { SignInButton } from "./SignInButton";
|
|
5
|
+
import { SignOutButton } from "./SignOutButton";
|
|
6
|
+
const AuthButton = ({
|
|
7
|
+
signInLabel = "Sign In",
|
|
8
|
+
signOutLabel = "Sign Out",
|
|
9
|
+
className,
|
|
10
|
+
afterSignInUrl,
|
|
11
|
+
afterSignOutUrl,
|
|
12
|
+
showLogo = true
|
|
13
|
+
}) => {
|
|
14
|
+
const { isSignedIn, isLoaded } = useUser();
|
|
15
|
+
if (!isLoaded) {
|
|
16
|
+
return /* @__PURE__ */ React.createElement("div", { className: `animate-pulse bg-gray-200 h-10 w-24 rounded-full ${className}` });
|
|
17
|
+
}
|
|
18
|
+
if (isSignedIn) {
|
|
19
|
+
return /* @__PURE__ */ React.createElement(
|
|
20
|
+
SignOutButton,
|
|
21
|
+
{
|
|
22
|
+
afterSignOutUrl,
|
|
23
|
+
className
|
|
24
|
+
},
|
|
25
|
+
signOutLabel
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
return /* @__PURE__ */ React.createElement(
|
|
29
|
+
SignInButton,
|
|
30
|
+
{
|
|
31
|
+
afterSignInUrl,
|
|
32
|
+
className,
|
|
33
|
+
showLogo
|
|
34
|
+
},
|
|
35
|
+
signInLabel
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
AuthButton
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=AuthButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AuthButton.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport { useUser } from '../hooks/useUser';\nimport { SignInButton } from './SignInButton';\nimport { SignOutButton } from './SignOutButton';\n\nexport interface AuthButtonProps {\n /**\n * Custom text for sign in button\n */\n signInLabel?: React.ReactNode;\n /**\n * Custom text for sign out button\n */\n signOutLabel?: React.ReactNode;\n /**\n * Custom CSS class name for the button\n */\n className?: string;\n /**\n * URL to redirect after sign in\n */\n afterSignInUrl?: string;\n /**\n * URL to redirect after sign out\n */\n afterSignOutUrl?: string;\n /**\n * Whether to show the CabinID logo (only applies if using default children)\n */\n showLogo?: boolean;\n}\n\n/**\n * AuthButton automatically toggles between SignIn and Out buttons \n * based on the user's authentication state.\n */\nexport const AuthButton: React.FC<AuthButtonProps> = ({\n signInLabel = 'Sign In',\n signOutLabel = 'Sign Out',\n className,\n afterSignInUrl,\n afterSignOutUrl,\n showLogo = true,\n}) => {\n const { isSignedIn, isLoaded } = useUser();\n\n if (!isLoaded) {\n return (\n <div className={`animate-pulse bg-gray-200 h-10 w-24 rounded-full ${className}`} />\n );\n }\n\n if (isSignedIn) {\n return (\n <SignOutButton\n afterSignOutUrl={afterSignOutUrl}\n className={className}\n >\n {signOutLabel}\n </SignOutButton>\n );\n }\n\n return (\n <SignInButton\n afterSignInUrl={afterSignInUrl}\n className={className}\n showLogo={showLogo}\n >\n {signInLabel}\n </SignInButton>\n );\n};\n"],"mappings":";AAEA,OAAO,WAAW;AAClB,SAAS,eAAe;AACxB,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAiCvB,MAAM,aAAwC,CAAC;AAAA,EAClD,cAAc;AAAA,EACd,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AACf,MAAM;AACF,QAAM,EAAE,YAAY,SAAS,IAAI,QAAQ;AAEzC,MAAI,CAAC,UAAU;AACX,WACI,oCAAC,SAAI,WAAW,oDAAoD,SAAS,IAAI;AAAA,EAEzF;AAEA,MAAI,YAAY;AACZ,WACI;AAAA,MAAC;AAAA;AAAA,QACG;AAAA,QACA;AAAA;AAAA,MAEC;AAAA,IACL;AAAA,EAER;AAEA,SACI;AAAA,IAAC;AAAA;AAAA,MACG;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC;AAAA,EACL;AAER;","names":[]}
|
|
@@ -5,7 +5,8 @@ import { AFTER_SIGN_IN_URL, frontendApi, SIGN_IN_URL } from "../constants";
|
|
|
5
5
|
const SignInButton = ({
|
|
6
6
|
children = "Continue to CabinID",
|
|
7
7
|
className = "max-w-48 pl-2 py-2 pr-4 bg-blue-600 rounded-full flex flex-row space-x-2 items-center hover:opacity-90 active:bg-blue-700",
|
|
8
|
-
afterSignInUrl
|
|
8
|
+
afterSignInUrl,
|
|
9
|
+
showLogo = true
|
|
9
10
|
}) => {
|
|
10
11
|
const [signInUrl, setSignInUrl] = useState("#");
|
|
11
12
|
useEffect(() => {
|
|
@@ -36,8 +37,8 @@ const SignInButton = ({
|
|
|
36
37
|
href: signInUrl,
|
|
37
38
|
className
|
|
38
39
|
},
|
|
39
|
-
/* @__PURE__ */ React.createElement(CabinLogo, null),
|
|
40
|
-
/* @__PURE__ */ React.createElement("span", { className: "text-white text-sm" }, children)
|
|
40
|
+
showLogo && /* @__PURE__ */ React.createElement(CabinLogo, null),
|
|
41
|
+
typeof children === "string" ? /* @__PURE__ */ React.createElement("span", { className: "text-white text-sm" }, children) : children
|
|
41
42
|
);
|
|
42
43
|
};
|
|
43
44
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/SignInButton.tsx"],"sourcesContent":["'use client';\n\nimport React, { useEffect, useState } from 'react';\nimport { CabinLogo } from '../icons/logo';\nimport { AFTER_SIGN_IN_URL, frontendApi, SIGN_IN_URL } from '../constants';\n\nexport interface SignInButtonProps {\n /**\n * Custom text to display on the button\n * @default \"Continue to CabinID\"\n */\n children?: React.ReactNode;\n /**\n * Custom CSS class name\n */\n className?: string;\n /**\n * Custom URL to redirect after successful sign in.\n * If not provided, it will use NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_IN_URL from env.\n */\n afterSignInUrl?: string;\n}\n\n/**\n * SignInButton component that handles user authentication redirect to CabinID\n */\nexport const SignInButton: React.FC<SignInButtonProps> = ({\n children = 'Continue to CabinID',\n className = 'max-w-48 pl-2 py-2 pr-4 bg-blue-600 rounded-full flex flex-row space-x-2 items-center hover:opacity-90 active:bg-blue-700',\n afterSignInUrl,\n}) => {\n const [signInUrl, setSignInUrl] = useState('#');\n\n useEffect(() => {\n if (typeof window !== 'undefined') {\n const origin = window.origin;\n if (!origin) {\n return;\n }\n\n const redirectPath = afterSignInUrl || AFTER_SIGN_IN_URL || '/';\n // Ensure redirectPath starts with / if it's a relative path and doesn't already have it\n const formattedPath = (redirectPath.startsWith('/') || redirectPath.startsWith('http'))\n ? redirectPath\n : `/${redirectPath}`;\n\n const absoluteRedirectUrl = formattedPath.startsWith('http')\n ? formattedPath\n : `${origin}${formattedPath}`;\n\n const params = new URLSearchParams({\n redirect_url: absoluteRedirectUrl,\n });\n\n let signInUrlTemp = '#';\n if (SIGN_IN_URL) {\n signInUrlTemp = SIGN_IN_URL.includes('?')\n ? `${SIGN_IN_URL}&${params.toString()}`\n : `${SIGN_IN_URL}?${params.toString()}`;\n } else if (frontendApi) {\n const protocol = frontendApi.includes('localhost') ? 'http' : 'https';\n signInUrlTemp = `${protocol}://${frontendApi}/sign-in?${params.toString()}`;\n }\n\n setSignInUrl(signInUrlTemp);\n }\n }, [afterSignInUrl]);\n\n return (\n <a\n href={signInUrl}\n className={className}\n >\n <CabinLogo
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SignInButton.tsx"],"sourcesContent":["'use client';\n\nimport React, { useEffect, useState } from 'react';\nimport { CabinLogo } from '../icons/logo';\nimport { AFTER_SIGN_IN_URL, frontendApi, SIGN_IN_URL } from '../constants';\n\nexport interface SignInButtonProps {\n /**\n * Custom text to display on the button\n * @default \"Continue to CabinID\"\n */\n children?: React.ReactNode;\n /**\n * Custom CSS class name\n */\n className?: string;\n /**\n * Custom URL to redirect after successful sign in.\n * If not provided, it will use NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_IN_URL from env.\n */\n afterSignInUrl?: string;\n /**\n * Whether to show the CabinID logo\n * @default true\n */\n showLogo?: boolean;\n}\n\n/**\n * SignInButton component that handles user authentication redirect to CabinID\n */\nexport const SignInButton: React.FC<SignInButtonProps> = ({\n children = 'Continue to CabinID',\n className = 'max-w-48 pl-2 py-2 pr-4 bg-blue-600 rounded-full flex flex-row space-x-2 items-center hover:opacity-90 active:bg-blue-700',\n afterSignInUrl,\n showLogo = true,\n}) => {\n const [signInUrl, setSignInUrl] = useState('#');\n\n useEffect(() => {\n if (typeof window !== 'undefined') {\n const origin = window.origin;\n if (!origin) {\n return;\n }\n\n const redirectPath = afterSignInUrl || AFTER_SIGN_IN_URL || '/';\n // Ensure redirectPath starts with / if it's a relative path and doesn't already have it\n const formattedPath = (redirectPath.startsWith('/') || redirectPath.startsWith('http'))\n ? redirectPath\n : `/${redirectPath}`;\n\n const absoluteRedirectUrl = formattedPath.startsWith('http')\n ? formattedPath\n : `${origin}${formattedPath}`;\n\n const params = new URLSearchParams({\n redirect_url: absoluteRedirectUrl,\n });\n\n let signInUrlTemp = '#';\n if (SIGN_IN_URL) {\n signInUrlTemp = SIGN_IN_URL.includes('?')\n ? `${SIGN_IN_URL}&${params.toString()}`\n : `${SIGN_IN_URL}?${params.toString()}`;\n } else if (frontendApi) {\n const protocol = frontendApi.includes('localhost') ? 'http' : 'https';\n signInUrlTemp = `${protocol}://${frontendApi}/sign-in?${params.toString()}`;\n }\n\n setSignInUrl(signInUrlTemp);\n }\n }, [afterSignInUrl]);\n\n return (\n <a\n href={signInUrl}\n className={className}\n >\n {showLogo && <CabinLogo />}\n {typeof children === 'string' ? (\n <span className=\"text-white text-sm\">{children}</span>\n ) : (\n children\n )}\n </a>\n );\n};\n"],"mappings":";AAEA,OAAO,SAAS,WAAW,gBAAgB;AAC3C,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB,aAAa,mBAAmB;AA2BrD,MAAM,eAA4C,CAAC;AAAA,EACxD,WAAW;AAAA,EACX,YAAY;AAAA,EACZ;AAAA,EACA,WAAW;AACb,MAAM;AACJ,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,GAAG;AAE9C,YAAU,MAAM;AACd,QAAI,OAAO,WAAW,aAAa;AACjC,YAAM,SAAS,OAAO;AACtB,UAAI,CAAC,QAAQ;AACX;AAAA,MACF;AAEA,YAAM,eAAe,kBAAkB,qBAAqB;AAE5D,YAAM,gBAAiB,aAAa,WAAW,GAAG,KAAK,aAAa,WAAW,MAAM,IACjF,eACA,IAAI,YAAY;AAEpB,YAAM,sBAAsB,cAAc,WAAW,MAAM,IACvD,gBACA,GAAG,MAAM,GAAG,aAAa;AAE7B,YAAM,SAAS,IAAI,gBAAgB;AAAA,QACjC,cAAc;AAAA,MAChB,CAAC;AAED,UAAI,gBAAgB;AACpB,UAAI,aAAa;AACf,wBAAgB,YAAY,SAAS,GAAG,IACpC,GAAG,WAAW,IAAI,OAAO,SAAS,CAAC,KACnC,GAAG,WAAW,IAAI,OAAO,SAAS,CAAC;AAAA,MACzC,WAAW,aAAa;AACtB,cAAM,WAAW,YAAY,SAAS,WAAW,IAAI,SAAS;AAC9D,wBAAgB,GAAG,QAAQ,MAAM,WAAW,YAAY,OAAO,SAAS,CAAC;AAAA,MAC3E;AAEA,mBAAa,aAAa;AAAA,IAC5B;AAAA,EACF,GAAG,CAAC,cAAc,CAAC;AAEnB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN;AAAA;AAAA,IAEC,YAAY,oCAAC,eAAU;AAAA,IACvB,OAAO,aAAa,WACnB,oCAAC,UAAK,WAAU,wBAAsB,QAAS,IAE/C;AAAA,EAEJ;AAEJ;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export { SignInButton } from './SignInButton';\nexport { SignOutButton } from './SignOutButton';\n"],"mappings":"AAAA,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export { SignInButton } from './SignInButton';\nexport { SignOutButton } from './SignOutButton';\nexport { AuthButton } from './AuthButton';\n"],"mappings":"AAAA,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;","names":[]}
|
|
@@ -28,6 +28,10 @@ const createRedirect = (params) => {
|
|
|
28
28
|
const { publishableKey, redirectAdapter, signInUrl, signUpUrl, baseUrl } = params;
|
|
29
29
|
const frontendApi = parsePublishableKey(publishableKey);
|
|
30
30
|
const accountsBaseUrl = buildAccountsBaseUrl(frontendApi);
|
|
31
|
+
const addClientId = (url) => {
|
|
32
|
+
url.searchParams.set("client_id", publishableKey);
|
|
33
|
+
return url;
|
|
34
|
+
};
|
|
31
35
|
const redirectToSignUp = ({ returnBackUrl } = {}) => {
|
|
32
36
|
if (!signUpUrl && !accountsBaseUrl) {
|
|
33
37
|
throw new Error("Publish Key is not exist");
|
|
@@ -35,11 +39,11 @@ const createRedirect = (params) => {
|
|
|
35
39
|
const accountsSignUpUrl = `${accountsBaseUrl}/sign-up`;
|
|
36
40
|
let redirect = null;
|
|
37
41
|
if (signUpUrl) {
|
|
38
|
-
|
|
42
|
+
const url = new URL(buildUrl(baseUrl, signUpUrl));
|
|
43
|
+
redirect = redirectAdapter(addClientId(url).toString());
|
|
39
44
|
} else {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
);
|
|
45
|
+
const url = new URL(buildUrl(null, accountsSignUpUrl, returnBackUrl));
|
|
46
|
+
redirect = redirectAdapter(addClientId(url).toString());
|
|
43
47
|
}
|
|
44
48
|
return redirect;
|
|
45
49
|
};
|
|
@@ -50,11 +54,11 @@ const createRedirect = (params) => {
|
|
|
50
54
|
const accountsSignInUrl = `${accountsBaseUrl}/sign-in`;
|
|
51
55
|
let redirect = null;
|
|
52
56
|
if (signInUrl) {
|
|
53
|
-
|
|
57
|
+
const url = new URL(buildUrl(baseUrl, signInUrl));
|
|
58
|
+
redirect = redirectAdapter(addClientId(url).toString());
|
|
54
59
|
} else {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
);
|
|
60
|
+
const url = new URL(buildUrl(null, accountsSignInUrl, returnBackUrl));
|
|
61
|
+
redirect = redirectAdapter(addClientId(url).toString());
|
|
58
62
|
}
|
|
59
63
|
return redirect;
|
|
60
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/server/createRedirect.ts"],"sourcesContent":["import { parsePublishableKey } from '../utils/key';\n\ntype RedirectAdapter<RedirectReturn> = (url: string) => RedirectReturn;\ntype RedirectToParams = { returnBackUrl?: string | URL | null };\nexport type RedirectFun<ReturnType> = (params?: RedirectToParams) => ReturnType;\n\nconst buildUrl = (\n _baseUrl: string | URL | null,\n _targetUrl: string | URL,\n _returnBackUrl?: string | URL | null\n) => {\n if (!!_baseUrl) {\n const baseUrl = new URL(_baseUrl);\n const returnBackUrl = _returnBackUrl\n ? new URL(_returnBackUrl, baseUrl)\n : undefined;\n const res = new URL(_targetUrl, baseUrl);\n\n if (returnBackUrl) {\n res.searchParams.set('redirect_url', returnBackUrl.toString());\n }\n return res.toString();\n } else {\n const returnBackUrl = _returnBackUrl ? new URL(_returnBackUrl) : undefined;\n const res = new URL(_targetUrl);\n\n if (returnBackUrl) {\n res.searchParams.set('redirect_url', returnBackUrl.toString());\n }\n return res.toString();\n }\n};\n\nconst buildAccountsBaseUrl = (frontendApi: string | null) => {\n if (!frontendApi) {\n return '';\n }\n\n // convert url from FAPI to accounts for Kima and legacy (prod & dev) instances\n const accountsBaseUrl = frontendApi;\n return `https://${accountsBaseUrl}`;\n};\n\n/**\n * @internal\n */\ntype CreateRedirect = <ReturnType>(params: {\n publishableKey: string;\n redirectAdapter: RedirectAdapter<ReturnType>;\n baseUrl: URL | string;\n signInUrl?: URL | string;\n signUpUrl?: URL | string;\n}) => {\n redirectToSignIn: RedirectFun<ReturnType>;\n redirectToSignUp: RedirectFun<ReturnType>;\n};\n\nexport const createRedirect: CreateRedirect = (params) => {\n const { publishableKey, redirectAdapter, signInUrl, signUpUrl, baseUrl } =\n params;\n const frontendApi = parsePublishableKey(publishableKey);\n const accountsBaseUrl = buildAccountsBaseUrl(frontendApi);\n\n const redirectToSignUp = ({ returnBackUrl }: RedirectToParams = {}) => {\n if (!signUpUrl && !accountsBaseUrl) {\n throw new Error('Publish Key is not exist');\n }\n const accountsSignUpUrl = `${accountsBaseUrl}/sign-up`;\n let redirect = null;\n\n if (signUpUrl) {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/server/createRedirect.ts"],"sourcesContent":["import { parsePublishableKey } from '../utils/key';\n\ntype RedirectAdapter<RedirectReturn> = (url: string) => RedirectReturn;\ntype RedirectToParams = { returnBackUrl?: string | URL | null };\nexport type RedirectFun<ReturnType> = (params?: RedirectToParams) => ReturnType;\n\nconst buildUrl = (\n _baseUrl: string | URL | null,\n _targetUrl: string | URL,\n _returnBackUrl?: string | URL | null\n) => {\n if (!!_baseUrl) {\n const baseUrl = new URL(_baseUrl);\n const returnBackUrl = _returnBackUrl\n ? new URL(_returnBackUrl, baseUrl)\n : undefined;\n const res = new URL(_targetUrl, baseUrl);\n\n if (returnBackUrl) {\n res.searchParams.set('redirect_url', returnBackUrl.toString());\n }\n return res.toString();\n } else {\n const returnBackUrl = _returnBackUrl ? new URL(_returnBackUrl) : undefined;\n const res = new URL(_targetUrl);\n\n if (returnBackUrl) {\n res.searchParams.set('redirect_url', returnBackUrl.toString());\n }\n return res.toString();\n }\n};\n\nconst buildAccountsBaseUrl = (frontendApi: string | null) => {\n if (!frontendApi) {\n return '';\n }\n\n // convert url from FAPI to accounts for Kima and legacy (prod & dev) instances\n const accountsBaseUrl = frontendApi;\n return `https://${accountsBaseUrl}`;\n};\n\n/**\n * @internal\n */\ntype CreateRedirect = <ReturnType>(params: {\n publishableKey: string;\n redirectAdapter: RedirectAdapter<ReturnType>;\n baseUrl: URL | string;\n signInUrl?: URL | string;\n signUpUrl?: URL | string;\n}) => {\n redirectToSignIn: RedirectFun<ReturnType>;\n redirectToSignUp: RedirectFun<ReturnType>;\n};\n\nexport const createRedirect: CreateRedirect = (params) => {\n const { publishableKey, redirectAdapter, signInUrl, signUpUrl, baseUrl } =\n params;\n const frontendApi = parsePublishableKey(publishableKey);\n const accountsBaseUrl = buildAccountsBaseUrl(frontendApi);\n\n const addClientId = (url: URL) => {\n url.searchParams.set('client_id', publishableKey);\n return url;\n };\n\n const redirectToSignUp = ({ returnBackUrl }: RedirectToParams = {}) => {\n if (!signUpUrl && !accountsBaseUrl) {\n throw new Error('Publish Key is not exist');\n }\n const accountsSignUpUrl = `${accountsBaseUrl}/sign-up`;\n let redirect = null;\n\n if (signUpUrl) {\n const url = new URL(buildUrl(baseUrl, signUpUrl));\n redirect = redirectAdapter(addClientId(url).toString());\n } else {\n const url = new URL(buildUrl(null, accountsSignUpUrl, returnBackUrl));\n redirect = redirectAdapter(addClientId(url).toString());\n }\n return redirect;\n };\n\n const redirectToSignIn = ({ returnBackUrl }: RedirectToParams = {}) => {\n if (!signInUrl && !accountsBaseUrl) {\n throw new Error('Publish Key is not exist');\n }\n const accountsSignInUrl = `${accountsBaseUrl}/sign-in`;\n\n let redirect = null;\n if (signInUrl) {\n const url = new URL(buildUrl(baseUrl, signInUrl));\n redirect = redirectAdapter(addClientId(url).toString());\n } else {\n const url = new URL(buildUrl(null, accountsSignInUrl, returnBackUrl));\n redirect = redirectAdapter(addClientId(url).toString());\n }\n\n return redirect;\n };\n\n return { redirectToSignUp, redirectToSignIn };\n};\n"],"mappings":"AAAA,SAAS,2BAA2B;AAMpC,MAAM,WAAW,CACf,UACA,YACA,mBACG;AACH,MAAI,CAAC,CAAC,UAAU;AACd,UAAM,UAAU,IAAI,IAAI,QAAQ;AAChC,UAAM,gBAAgB,iBAClB,IAAI,IAAI,gBAAgB,OAAO,IAC/B;AACJ,UAAM,MAAM,IAAI,IAAI,YAAY,OAAO;AAEvC,QAAI,eAAe;AACjB,UAAI,aAAa,IAAI,gBAAgB,cAAc,SAAS,CA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,YAAM,IAAI,MAAM,0BAA0B;AAAA,IAC5C;AACA,UAAM,oBAAoB,GAAG,eAAe;AAE5C,QAAI,WAAW;AACf,QAAI,WAAW;AACb,YAAM,MAAM,IAAI,IAAI,SAAS,SAAS,SAAS,CAAC;AAChD,iBAAW,gBAAgB,YAAY,GAAG,EAAE,SAAS,CAAC;AAAA,IACxD,OAAO;AACL,YAAM,MAAM,IAAI,IAAI,SAAS,MAAM,mBAAmB,aAAa,CAAC;AACpE,iBAAW,gBAAgB,YAAY,GAAG,EAAE,SAAS,CAAC;AAAA,IACxD;AAEA,WAAO;AAAA,EACT;AAEA,SAAO,EAAE,kBAAkB,iBAAiB;AAC9C;","names":[]}
|
|
@@ -371,9 +371,23 @@ video {
|
|
|
371
371
|
.flex {
|
|
372
372
|
display: flex;
|
|
373
373
|
}
|
|
374
|
+
.h-10 {
|
|
375
|
+
height: 2.5rem;
|
|
376
|
+
}
|
|
377
|
+
.w-24 {
|
|
378
|
+
width: 6rem;
|
|
379
|
+
}
|
|
374
380
|
.max-w-48 {
|
|
375
381
|
max-width: 12rem;
|
|
376
382
|
}
|
|
383
|
+
@keyframes pulse {
|
|
384
|
+
50% {
|
|
385
|
+
opacity: .5;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
.animate-pulse {
|
|
389
|
+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
390
|
+
}
|
|
377
391
|
.flex-row {
|
|
378
392
|
flex-direction: row;
|
|
379
393
|
}
|
|
@@ -395,6 +409,10 @@ video {
|
|
|
395
409
|
--tw-bg-opacity: 1;
|
|
396
410
|
background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
|
|
397
411
|
}
|
|
412
|
+
.bg-gray-200 {
|
|
413
|
+
--tw-bg-opacity: 1;
|
|
414
|
+
background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));
|
|
415
|
+
}
|
|
398
416
|
.bg-red-600 {
|
|
399
417
|
--tw-bg-opacity: 1;
|
|
400
418
|
background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/styles/global.css"],"sourcesContent":["*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden]:where(:not([hidden=\"until-found\"])) {\n display: none;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.flex {\n display: flex;\n}\n.max-w-48 {\n max-width: 12rem;\n}\n.flex-row {\n flex-direction: row;\n}\n.items-center {\n align-items: center;\n}\n.space-x-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));\n}\n.bg-red-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pr-4 {\n padding-right: 1rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.hover\\:bg-red-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(185 28 28 / var(--tw-bg-opacity, 1));\n}\n.hover\\:opacity-90:hover {\n opacity: 0.9;\n}\n.active\\:bg-blue-700:active {\n --tw-bg-opacity: 1;\n background-color: rgb(29 78 216 / var(--tw-bg-opacity, 1));\n}\n.disabled\\:opacity-50:disabled {\n opacity: 0.5;\n}\n"],"mappings":"AAAA;AAAG;AAAU;AACX,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AAEA;AACE,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AAOA;AACA;AACA;AACE,cAAY;AACZ,gBAAc;AACd,gBAAc;AACd,gBAAc;AAChB;AAEA;AACA;AACE,gBAAc;AAChB;AAYA;AACA;AACE,eAAa;AACb,4BAA0B;AAC1B,iBAAe;AACf,eAAa;AACV,YAAU;AACb;AAAA,IAAa,aAAa;AAAA,IAAE,SAAS;AAAA,IAAE,UAAU;AAAA,IAAE,mBAAmB;AAAA,IAAE,gBAAgB;AAAA,IAAE,iBAAiB;AAAA,IAAE;AAC7G,yBAAuB;AACvB,2BAAyB;AACzB,+BAA6B;AAC/B;AAOA;AACE,UAAQ;AACR,eAAa;AACf;AAQA;AACE,UAAQ;AACR,SAAO;AACP,oBAAkB;AACpB;AAMA,IAAI,OAAO,CAAC;AACV,2BAAyB,UAAU;AAC3B,mBAAiB,UAAU;AACrC;AAMA;AACA;AACA;AACA;AACA;AACA;AACE,aAAW;AACX,eAAa;AACf;AAMA;AACE,SAAO;AAC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e,EAAE;AACzD;AACA,CAAC;AACC,gBAAc;AACd,iBAAe;AACjB;AACA,CAAC;AACC,eAAa;AACb,kBAAgB;AAClB;AACA,CAAC;AACC,gBAAc;AAChB;AACA,CAAC;AACC,iBAAe;AACjB;AACA,CAAC;AACC,aAAW;AACX,eAAa;AACf;AACA,CAAC;AACC,qBAAmB;AACnB,SAAO,IAAI,IAAI,IAAI,IAAI,EAAE,IAAI,iBAAiB,EAAE;AAClD;AACA,CAAC;AACC,UAAQ,IAAI,WAAW,IAAI,iBAAiB,IAAI,eAAe,IAAI,gBAAgB,IAAI,iBAAiB,IAAI,aAAa,IAAI,eAAe,IAAI,YAAY,IAAI;AAClK;AACA,CAAC,iBAAiB;AAChB,mBAAiB;AACjB,oBAAkB,IAAI,IAAI,GAAG,GAAG,EAAE,IAAI,eAAe,EAAE;AACzD;AACA,CAAC,iBAAiB;AAChB,WAAS;AACX;AACA,CAAC,mBAAmB;AAClB,mBAAiB;AACjB,oBAAkB,IAAI,GAAG,GAAG,IAAI,EAAE,IAAI,eAAe,EAAE;AACzD;AACA,CAAC,oBAAoB;AACnB,WAAS;AACX;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/styles/global.css"],"sourcesContent":["*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden]:where(:not([hidden=\"until-found\"])) {\n display: none;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.flex {\n display: flex;\n}\n.h-10 {\n height: 2.5rem;\n}\n.w-24 {\n width: 6rem;\n}\n.max-w-48 {\n max-width: 12rem;\n}\n@keyframes pulse {\n\n 50% {\n opacity: .5;\n }\n}\n.animate-pulse {\n animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n.flex-row {\n flex-direction: row;\n}\n.items-center {\n align-items: center;\n}\n.space-x-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));\n}\n.bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));\n}\n.bg-red-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pr-4 {\n padding-right: 1rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.hover\\:bg-red-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(185 28 28 / var(--tw-bg-opacity, 1));\n}\n.hover\\:opacity-90:hover {\n opacity: 0.9;\n}\n.active\\:bg-blue-700:active {\n --tw-bg-opacity: 1;\n background-color: rgb(29 78 216 / var(--tw-bg-opacity, 1));\n}\n.disabled\\:opacity-50:disabled {\n opacity: 0.5;\n}\n"],"mappings":"AAAA;AAAG;AAAU;AACX,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AAEA;AACE,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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B;AACA,CAAC;AACC,gBAAc;AAChB;AACA,CAAC;AACC,iBAAe;AACjB;AACA,CAAC;AACC,aAAW;AACX,eAAa;AACf;AACA,CAAC;AACC,qBAAmB;AACnB,SAAO,IAAI,IAAI,IAAI,IAAI,EAAE,IAAI,iBAAiB,EAAE;AAClD;AACA,CAAC;AACC,UAAQ,IAAI,WAAW,IAAI,iBAAiB,IAAI,eAAe,IAAI,gBAAgB,IAAI,iBAAiB,IAAI,aAAa,IAAI,eAAe,IAAI,YAAY,IAAI;AAClK;AACA,CAAC,iBAAiB;AAChB,mBAAiB;AACjB,oBAAkB,IAAI,IAAI,GAAG,GAAG,EAAE,IAAI,eAAe,EAAE;AACzD;AACA,CAAC,iBAAiB;AAChB,WAAS;AACX;AACA,CAAC,mBAAmB;AAClB,mBAAiB;AACjB,oBAAkB,IAAI,GAAG,GAAG,IAAI,EAAE,IAAI,eAAe,EAAE;AACzD;AACA,CAAC,oBAAoB;AACnB,WAAS;AACX;","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface AuthButtonProps {
|
|
3
|
+
/**
|
|
4
|
+
* Custom text for sign in button
|
|
5
|
+
*/
|
|
6
|
+
signInLabel?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Custom text for sign out button
|
|
9
|
+
*/
|
|
10
|
+
signOutLabel?: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Custom CSS class name for the button
|
|
13
|
+
*/
|
|
14
|
+
className?: string;
|
|
15
|
+
/**
|
|
16
|
+
* URL to redirect after sign in
|
|
17
|
+
*/
|
|
18
|
+
afterSignInUrl?: string;
|
|
19
|
+
/**
|
|
20
|
+
* URL to redirect after sign out
|
|
21
|
+
*/
|
|
22
|
+
afterSignOutUrl?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Whether to show the CabinID logo (only applies if using default children)
|
|
25
|
+
*/
|
|
26
|
+
showLogo?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* AuthButton automatically toggles between SignIn and Out buttons
|
|
30
|
+
* based on the user's authentication state.
|
|
31
|
+
*/
|
|
32
|
+
export declare const AuthButton: React.FC<AuthButtonProps>;
|
|
33
|
+
//# sourceMappingURL=AuthButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthButton.d.ts","sourceRoot":"","sources":["../../../src/components/AuthButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,eAAe;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAoChD,CAAC"}
|
|
@@ -14,6 +14,11 @@ export interface SignInButtonProps {
|
|
|
14
14
|
* If not provided, it will use NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_IN_URL from env.
|
|
15
15
|
*/
|
|
16
16
|
afterSignInUrl?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Whether to show the CabinID logo
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
showLogo?: boolean;
|
|
17
22
|
}
|
|
18
23
|
/**
|
|
19
24
|
* SignInButton component that handles user authentication redirect to CabinID
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignInButton.d.ts","sourceRoot":"","sources":["../../../src/components/SignInButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"SignInButton.d.ts","sourceRoot":"","sources":["../../../src/components/SignInButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAwDpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRedirect.d.ts","sourceRoot":"","sources":["../../../src/server/createRedirect.ts"],"names":[],"mappings":"AAEA,KAAK,eAAe,CAAC,cAAc,IAAI,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