@forjio/auth-ui 0.6.0 → 0.8.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/AuthForm.cjs +171 -36
- package/dist/AuthForm.cjs.map +1 -1
- package/dist/AuthForm.d.cts +2 -2
- package/dist/AuthForm.d.ts +2 -2
- package/dist/AuthForm.js +173 -38
- package/dist/AuthForm.js.map +1 -1
- package/dist/ForgotPasswordForm.cjs +8 -5
- package/dist/ForgotPasswordForm.cjs.map +1 -1
- package/dist/ForgotPasswordForm.d.cts +2 -2
- package/dist/ForgotPasswordForm.d.ts +2 -2
- package/dist/ForgotPasswordForm.js +8 -5
- package/dist/ForgotPasswordForm.js.map +1 -1
- package/dist/ResetPasswordForm.cjs +8 -5
- package/dist/ResetPasswordForm.cjs.map +1 -1
- package/dist/ResetPasswordForm.d.cts +2 -2
- package/dist/ResetPasswordForm.d.ts +2 -2
- package/dist/ResetPasswordForm.js +8 -5
- package/dist/ResetPasswordForm.js.map +1 -1
- package/dist/components/ui/button.cjs +84 -0
- package/dist/components/ui/button.cjs.map +1 -0
- package/dist/components/ui/button.d.cts +14 -0
- package/dist/components/ui/button.d.ts +14 -0
- package/dist/components/ui/button.js +49 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/input.cjs +58 -0
- package/dist/components/ui/input.cjs.map +1 -0
- package/dist/components/ui/input.d.cts +5 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/input.js +24 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/label.cjs +56 -0
- package/dist/components/ui/label.cjs.map +1 -0
- package/dist/components/ui/label.d.cts +8 -0
- package/dist/components/ui/label.d.ts +8 -0
- package/dist/components/ui/label.js +22 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/lib/utils.cjs +33 -0
- package/dist/lib/utils.cjs.map +1 -0
- package/dist/lib/utils.d.cts +9 -0
- package/dist/lib/utils.d.ts +9 -0
- package/dist/lib/utils.js +9 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/types.cjs +1 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +6 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -1
- package/package.json +7 -2
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var utils_exports = {};
|
|
20
|
+
__export(utils_exports, {
|
|
21
|
+
cn: () => cn
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(utils_exports);
|
|
24
|
+
var import_clsx = require("clsx");
|
|
25
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
26
|
+
function cn(...inputs) {
|
|
27
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
28
|
+
}
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
cn
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * Merge Tailwind class names with conflict resolution.\n * The shadcn/ui standard helper — every `components/ui/*` file imports this.\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAsC;AACtC,4BAAwB;AAMjB,SAAS,MAAM,QAA8B;AAClD,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * Merge Tailwind class names with conflict resolution.\n * The shadcn/ui standard helper — every `components/ui/*` file imports this.\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n"],"mappings":"AAAA,SAAS,YAA6B;AACtC,SAAS,eAAe;AAMjB,SAAS,MAAM,QAA8B;AAClD,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;","names":[]}
|
package/dist/types.cjs
CHANGED
|
@@ -26,6 +26,7 @@ const defaultEndpoints = {
|
|
|
26
26
|
signup: "/api/v1/auth/signup",
|
|
27
27
|
forgotPassword: "/api/v1/auth/password-reset/request",
|
|
28
28
|
resetPassword: "/api/v1/auth/password-reset/complete",
|
|
29
|
+
mfa: "/api/v1/auth/mfa",
|
|
29
30
|
socialStart: "/api/v1/auth/huudis/start"
|
|
30
31
|
};
|
|
31
32
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/types.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["/** Endpoint paths the auth forms hit on the host product's backend.\n * Defaults match the Forjio family convention (`@forjio/sdk/auth-\n * handlers`); override only for unusual layouts. */\nexport interface AuthEndpoints {\n login: string;\n signup: string;\n forgotPassword: string;\n resetPassword: string;\n /** Social-provider start path. `?provider=<google|apple|facebook>` is\n * appended by the form. Hitting it with no `provider=` lands on the\n * Huudis hosted login (used for the MFA hand-off). */\n socialStart: string;\n}\n\nexport const defaultEndpoints: AuthEndpoints = {\n login: '/api/v1/auth/login',\n signup: '/api/v1/auth/signup',\n forgotPassword: '/api/v1/auth/password-reset/request',\n resetPassword: '/api/v1/auth/password-reset/complete',\n socialStart: '/api/v1/auth/huudis/start',\n};\n\n/** Which social-login buttons to render. Default = both, since fail-\n * open matches the host product's expectation (Huudis tells the\n * consumer which providers are off via a separate fetch the host\n * does — pass the result here). */\nexport interface SocialProviders {\n google?: boolean;\n apple?: boolean;\n facebook?: boolean;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
1
|
+
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["/** Endpoint paths the auth forms hit on the host product's backend.\n * Defaults match the Forjio family convention (`@forjio/sdk/auth-\n * handlers`); override only for unusual layouts. */\nexport interface AuthEndpoints {\n login: string;\n signup: string;\n forgotPassword: string;\n resetPassword: string;\n /** Product-hosted MFA verify path. The login POST returns\n * `{ mfaRequired, mfaChallengeToken, methods, expiresAt }` when the\n * user has MFA enabled and the product opted into in-product OTP;\n * the form then POSTs `{ mfaChallengeToken, code }` here. Shares the\n * same base-path convention as `login`. */\n mfa: string;\n /** Social-provider start path. `?provider=<google|apple|facebook>` is\n * appended by the form. Hitting it with no `provider=` lands on the\n * Huudis hosted login (used for the MFA hand-off). */\n socialStart: string;\n}\n\nexport const defaultEndpoints: AuthEndpoints = {\n login: '/api/v1/auth/login',\n signup: '/api/v1/auth/signup',\n forgotPassword: '/api/v1/auth/password-reset/request',\n resetPassword: '/api/v1/auth/password-reset/complete',\n mfa: '/api/v1/auth/mfa',\n socialStart: '/api/v1/auth/huudis/start',\n};\n\n/** Which social-login buttons to render. Default = both, since fail-\n * open matches the host product's expectation (Huudis tells the\n * consumer which providers are off via a separate fetch the host\n * does — pass the result here). */\nexport interface SocialProviders {\n google?: boolean;\n apple?: boolean;\n facebook?: boolean;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBO,MAAM,mBAAkC;AAAA,EAC7C,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,KAAK;AAAA,EACL,aAAa;AACf;","names":[]}
|
package/dist/types.d.cts
CHANGED
|
@@ -6,6 +6,12 @@ interface AuthEndpoints {
|
|
|
6
6
|
signup: string;
|
|
7
7
|
forgotPassword: string;
|
|
8
8
|
resetPassword: string;
|
|
9
|
+
/** Product-hosted MFA verify path. The login POST returns
|
|
10
|
+
* `{ mfaRequired, mfaChallengeToken, methods, expiresAt }` when the
|
|
11
|
+
* user has MFA enabled and the product opted into in-product OTP;
|
|
12
|
+
* the form then POSTs `{ mfaChallengeToken, code }` here. Shares the
|
|
13
|
+
* same base-path convention as `login`. */
|
|
14
|
+
mfa: string;
|
|
9
15
|
/** Social-provider start path. `?provider=<google|apple|facebook>` is
|
|
10
16
|
* appended by the form. Hitting it with no `provider=` lands on the
|
|
11
17
|
* Huudis hosted login (used for the MFA hand-off). */
|
package/dist/types.d.ts
CHANGED
|
@@ -6,6 +6,12 @@ interface AuthEndpoints {
|
|
|
6
6
|
signup: string;
|
|
7
7
|
forgotPassword: string;
|
|
8
8
|
resetPassword: string;
|
|
9
|
+
/** Product-hosted MFA verify path. The login POST returns
|
|
10
|
+
* `{ mfaRequired, mfaChallengeToken, methods, expiresAt }` when the
|
|
11
|
+
* user has MFA enabled and the product opted into in-product OTP;
|
|
12
|
+
* the form then POSTs `{ mfaChallengeToken, code }` here. Shares the
|
|
13
|
+
* same base-path convention as `login`. */
|
|
14
|
+
mfa: string;
|
|
9
15
|
/** Social-provider start path. `?provider=<google|apple|facebook>` is
|
|
10
16
|
* appended by the form. Hitting it with no `provider=` lands on the
|
|
11
17
|
* Huudis hosted login (used for the MFA hand-off). */
|
package/dist/types.js
CHANGED
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["/** Endpoint paths the auth forms hit on the host product's backend.\n * Defaults match the Forjio family convention (`@forjio/sdk/auth-\n * handlers`); override only for unusual layouts. */\nexport interface AuthEndpoints {\n login: string;\n signup: string;\n forgotPassword: string;\n resetPassword: string;\n /** Social-provider start path. `?provider=<google|apple|facebook>` is\n * appended by the form. Hitting it with no `provider=` lands on the\n * Huudis hosted login (used for the MFA hand-off). */\n socialStart: string;\n}\n\nexport const defaultEndpoints: AuthEndpoints = {\n login: '/api/v1/auth/login',\n signup: '/api/v1/auth/signup',\n forgotPassword: '/api/v1/auth/password-reset/request',\n resetPassword: '/api/v1/auth/password-reset/complete',\n socialStart: '/api/v1/auth/huudis/start',\n};\n\n/** Which social-login buttons to render. Default = both, since fail-\n * open matches the host product's expectation (Huudis tells the\n * consumer which providers are off via a separate fetch the host\n * does — pass the result here). */\nexport interface SocialProviders {\n google?: boolean;\n apple?: boolean;\n facebook?: boolean;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["/** Endpoint paths the auth forms hit on the host product's backend.\n * Defaults match the Forjio family convention (`@forjio/sdk/auth-\n * handlers`); override only for unusual layouts. */\nexport interface AuthEndpoints {\n login: string;\n signup: string;\n forgotPassword: string;\n resetPassword: string;\n /** Product-hosted MFA verify path. The login POST returns\n * `{ mfaRequired, mfaChallengeToken, methods, expiresAt }` when the\n * user has MFA enabled and the product opted into in-product OTP;\n * the form then POSTs `{ mfaChallengeToken, code }` here. Shares the\n * same base-path convention as `login`. */\n mfa: string;\n /** Social-provider start path. `?provider=<google|apple|facebook>` is\n * appended by the form. Hitting it with no `provider=` lands on the\n * Huudis hosted login (used for the MFA hand-off). */\n socialStart: string;\n}\n\nexport const defaultEndpoints: AuthEndpoints = {\n login: '/api/v1/auth/login',\n signup: '/api/v1/auth/signup',\n forgotPassword: '/api/v1/auth/password-reset/request',\n resetPassword: '/api/v1/auth/password-reset/complete',\n mfa: '/api/v1/auth/mfa',\n socialStart: '/api/v1/auth/huudis/start',\n};\n\n/** Which social-login buttons to render. Default = both, since fail-\n * open matches the host product's expectation (Huudis tells the\n * consumer which providers are off via a separate fetch the host\n * does — pass the result here). */\nexport interface SocialProviders {\n google?: boolean;\n apple?: boolean;\n facebook?: boolean;\n}\n"],"mappings":"AAoBO,MAAM,mBAAkC;AAAA,EAC7C,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,KAAK;AAAA,EACL,aAAa;AACf;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forjio/auth-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Shared auth forms (login, signup, forgot-password, reset-password) for the Forjio family of SaaS products. Sister package to @forjio/website-ui and @forjio/portal-ui.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"private": false,
|
|
@@ -56,6 +56,11 @@
|
|
|
56
56
|
"huudis"
|
|
57
57
|
],
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@marsidev/react-turnstile": "^1.5.3"
|
|
59
|
+
"@marsidev/react-turnstile": "^1.5.3",
|
|
60
|
+
"@radix-ui/react-label": "^2.1.0",
|
|
61
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
62
|
+
"class-variance-authority": "^0.7.0",
|
|
63
|
+
"clsx": "^2.1.1",
|
|
64
|
+
"tailwind-merge": "^2.5.0"
|
|
60
65
|
}
|
|
61
66
|
}
|