hazo_auth 10.6.0 → 10.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/components/layouts/login/config/login_field_config.js +2 -2
- package/dist/components/layouts/register/config/register_field_config.js +2 -2
- package/dist/components/layouts/shared/components/auth_navbar.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/auth_navbar.js +2 -1
- package/dist/server/routes/user_management_users.d.ts +1 -1
- package/dist/server_pages/login.d.ts +8 -1
- package/dist/server_pages/login.d.ts.map +1 -1
- package/dist/server_pages/login.js +2 -2
- package/dist/server_pages/register.d.ts +8 -1
- package/dist/server_pages/register.d.ts.map +1 -1
- package/dist/server_pages/register.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1656,7 +1656,7 @@ logo_height = 32 # Logo height in pixels
|
|
|
1656
1656
|
company_name = My Company # Company name (links to home)
|
|
1657
1657
|
home_path = / # URL for logo and company name link
|
|
1658
1658
|
home_label = Home # Label for home link
|
|
1659
|
-
show_home_link = true # Show "Home" link
|
|
1659
|
+
show_home_link = true # Show "Home" link (only used when no logo/company_name is set — see below)
|
|
1660
1660
|
background_color = # Custom background (optional)
|
|
1661
1661
|
text_color = # Custom text color (optional)
|
|
1662
1662
|
height = 64 # Navbar height in pixels
|
|
@@ -1664,6 +1664,10 @@ height = 64 # Navbar height in pixels
|
|
|
1664
1664
|
|
|
1665
1665
|
The navbar provides consistent branding across authentication pages with your company logo, name, and optional home link. It automatically vertically centers auth content when enabled.
|
|
1666
1666
|
|
|
1667
|
+
**Home link behavior:** the standalone "Home" link and your brand (logo/company name) never both render — the brand link already goes home.
|
|
1668
|
+
- `logo_path` or `company_name` set → the brand renders on the left as a link to `home_path`; the separate "Home" link is hidden, regardless of `show_home_link`.
|
|
1669
|
+
- Neither set → the "Home" link (icon + label) renders on the **left** instead, as long as `show_home_link = true`.
|
|
1670
|
+
|
|
1667
1671
|
**Zero-config usage (recommended):**
|
|
1668
1672
|
```typescript
|
|
1669
1673
|
// app/hazo_auth/login/page.tsx
|
|
@@ -36,7 +36,7 @@ export const resolveLoginLabels = (overrides) => resolveLabels(LOGIN_LABEL_DEFAU
|
|
|
36
36
|
const LOGIN_BUTTON_PALETTE_DEFAULTS = {
|
|
37
37
|
submitBackground: "#0f172a",
|
|
38
38
|
submitText: "#ffffff",
|
|
39
|
-
cancelBorder: "
|
|
40
|
-
cancelText: "
|
|
39
|
+
cancelBorder: "hsl(var(--border))",
|
|
40
|
+
cancelText: "hsl(var(--foreground))",
|
|
41
41
|
};
|
|
42
42
|
export const resolveLoginButtonPalette = (overrides) => resolveButtonPalette(LOGIN_BUTTON_PALETTE_DEFAULTS, overrides);
|
|
@@ -54,8 +54,8 @@ export const resolveRegisterLabels = (overrides) => resolveLabels(REGISTER_LABEL
|
|
|
54
54
|
const REGISTER_BUTTON_PALETTE_DEFAULTS = {
|
|
55
55
|
submitBackground: "#0f172a",
|
|
56
56
|
submitText: "#ffffff",
|
|
57
|
-
cancelBorder: "
|
|
58
|
-
cancelText: "
|
|
57
|
+
cancelBorder: "hsl(var(--border))",
|
|
58
|
+
cancelText: "hsl(var(--foreground))",
|
|
59
59
|
};
|
|
60
60
|
export const resolveRegisterButtonPalette = (overrides) => resolveButtonPalette(REGISTER_BUTTON_PALETTE_DEFAULTS, overrides);
|
|
61
61
|
// section: password_rules
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth_navbar.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/shared/components/auth_navbar.tsx"],"names":[],"mappings":"AAWA,MAAM,MAAM,eAAe,GAAG;IAC5B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qBAAqB;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8BAA8B;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wBAAwB;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAGF,wBAAgB,UAAU,CAAC,EACzB,SAAc,EACd,UAAe,EACf,WAAgB,EAChB,YAAiB,EACjB,SAAe,EACf,UAAmB,EACnB,cAAqB,EACrB,gBAAgB,EAChB,UAAU,EACV,MAAW,EACX,SAAS,GACV,EAAE,eAAe,+
|
|
1
|
+
{"version":3,"file":"auth_navbar.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/shared/components/auth_navbar.tsx"],"names":[],"mappings":"AAWA,MAAM,MAAM,eAAe,GAAG;IAC5B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qBAAqB;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8BAA8B;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wBAAwB;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAGF,wBAAgB,UAAU,CAAC,EACzB,SAAc,EACd,UAAe,EACf,WAAgB,EAChB,YAAiB,EACjB,SAAe,EACf,UAAmB,EACnB,cAAqB,EACrB,gBAAgB,EAChB,UAAU,EACV,MAAW,EACX,SAAS,GACV,EAAE,eAAe,+BAoDjB"}
|
|
@@ -11,6 +11,7 @@ import { cn } from "../../../../lib/utils.js";
|
|
|
11
11
|
export function AuthNavbar({ logo_path = "", logo_width = 28, logo_height = 28, company_name = "", home_path = "/", home_label = "Home", show_home_link = true, background_color, text_color, height = 40, className, }) {
|
|
12
12
|
// Only show logo if logo_path is configured (non-empty)
|
|
13
13
|
const showLogo = logo_path !== "";
|
|
14
|
+
const hasBrand = showLogo || company_name !== "";
|
|
14
15
|
const navStyle = Object.assign(Object.assign({ height: `${height}px` }, (background_color && { backgroundColor: background_color })), (text_color && { color: text_color }));
|
|
15
|
-
return (
|
|
16
|
+
return (_jsx("nav", { className: cn("cls_auth_navbar flex w-full items-center justify-between border-b border-border/40 bg-background/95 px-4 backdrop-blur supports-[backdrop-filter]:bg-background/60", className), style: navStyle, "aria-label": "Authentication page navigation", children: _jsxs("div", { className: "cls_auth_navbar_brand flex items-center gap-3", children: [hasBrand && (_jsxs(Link, { href: home_path, className: "cls_auth_navbar_logo_link flex items-center gap-3", children: [showLogo && (_jsx(Image, { src: logo_path, alt: company_name ? `${company_name} logo` : "Logo", width: logo_width, height: logo_height, className: "cls_auth_navbar_logo object-contain" })), company_name && (_jsx("span", { className: "cls_auth_navbar_company_name text-lg font-semibold text-foreground", children: company_name }))] })), !hasBrand && show_home_link && (_jsxs(Link, { href: home_path, className: "cls_auth_navbar_home_link flex items-center gap-2 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground", "aria-label": `Navigate to ${home_label}`, children: [_jsx(Home, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: home_label })] }))] }) }));
|
|
16
17
|
}
|
|
@@ -26,7 +26,7 @@ export declare function GET(request: NextRequest): Promise<NextResponse<{
|
|
|
26
26
|
profile_source: {} | null;
|
|
27
27
|
user_type: string | null;
|
|
28
28
|
app_user_data: Record<string, unknown> | null;
|
|
29
|
-
legal_acceptance_status: "current" | "
|
|
29
|
+
legal_acceptance_status: "current" | "none" | "outdated";
|
|
30
30
|
}[];
|
|
31
31
|
}>>;
|
|
32
32
|
/**
|
|
@@ -33,6 +33,13 @@ export type LoginPageProps = {
|
|
|
33
33
|
email?: string;
|
|
34
34
|
password?: string;
|
|
35
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* Force-disable the package navbar for this page, so a consuming app can
|
|
38
|
+
* render its own navbar/logo around the login form instead.
|
|
39
|
+
* Only applies in `layout: "two_column"` mode (ignored in `form_only`, which
|
|
40
|
+
* never renders AuthPageShell / the navbar anyway).
|
|
41
|
+
*/
|
|
42
|
+
disableNavbar?: boolean;
|
|
36
43
|
};
|
|
37
44
|
/**
|
|
38
45
|
* Zero-config LoginPage server component
|
|
@@ -57,6 +64,6 @@ export type LoginPageProps = {
|
|
|
57
64
|
* @param props - Optional visual customization props
|
|
58
65
|
* @returns Server-rendered login page
|
|
59
66
|
*/
|
|
60
|
-
export default function LoginPage({ image_src, image_alt, image_background_color, layout, default_values, }?: LoginPageProps): import("react").JSX.Element;
|
|
67
|
+
export default function LoginPage({ image_src, image_alt, image_background_color, layout, default_values, disableNavbar, }?: LoginPageProps): import("react").JSX.Element;
|
|
61
68
|
export { LoginPage };
|
|
62
69
|
//# sourceMappingURL=login.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/server_pages/login.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAUrB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC;IAErC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,YAAY,GAAG,WAAW,CAAC;IACpC,+EAA+E;IAC/E,cAAc,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/server_pages/login.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAUrB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC;IAErC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,YAAY,GAAG,WAAW,CAAC;IACpC,+EAA+E;IAC/E,cAAc,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAEvD;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,SAAS,EACT,SAAS,EACT,sBAAsB,EACtB,MAAqB,EACrB,cAAc,EACd,aAAqB,GACtB,GAAE,cAAmB,+BAuErB;AAGD,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -33,7 +33,7 @@ import { FloatingHomeLink } from "../components/layouts/shared/components/floati
|
|
|
33
33
|
* @param props - Optional visual customization props
|
|
34
34
|
* @returns Server-rendered login page
|
|
35
35
|
*/
|
|
36
|
-
export default function LoginPage({ image_src, image_alt, image_background_color, layout = "two_column", default_values, } = {}) {
|
|
36
|
+
export default function LoginPage({ image_src, image_alt, image_background_color, layout = "two_column", default_values, disableNavbar = false, } = {}) {
|
|
37
37
|
// Load configuration from INI file (with defaults including asset images)
|
|
38
38
|
const config = get_login_config();
|
|
39
39
|
// Resolve strings for heading/subheading/ctaText
|
|
@@ -69,7 +69,7 @@ export default function LoginPage({ image_src, image_alt, image_background_color
|
|
|
69
69
|
const navbar = get_navbar_config();
|
|
70
70
|
return (_jsxs(_Fragment, { children: [navbar.show_home_link && (_jsx(FloatingHomeLink, { path: navbar.home_path, label: navbar.home_label })), wrapper] }));
|
|
71
71
|
}
|
|
72
|
-
return _jsx(AuthPageShell, { children: wrapper });
|
|
72
|
+
return _jsx(AuthPageShell, { disableNavbar: disableNavbar, children: wrapper });
|
|
73
73
|
}
|
|
74
74
|
// Named export for direct imports
|
|
75
75
|
export { LoginPage };
|
|
@@ -22,6 +22,13 @@ export type RegisterPageProps = {
|
|
|
22
22
|
* TwoColumnAuthLayout so the consumer's brand chrome can wrap the form.
|
|
23
23
|
*/
|
|
24
24
|
layout?: "two_column" | "form_only";
|
|
25
|
+
/**
|
|
26
|
+
* Force-disable the package navbar for this page, so a consuming app can
|
|
27
|
+
* render its own navbar/logo around the registration form instead.
|
|
28
|
+
* Only applies in `layout: "two_column"` mode (ignored in `form_only`, which
|
|
29
|
+
* never renders AuthPageShell / the navbar anyway).
|
|
30
|
+
*/
|
|
31
|
+
disableNavbar?: boolean;
|
|
25
32
|
};
|
|
26
33
|
/**
|
|
27
34
|
* Zero-config RegisterPage server component
|
|
@@ -48,6 +55,6 @@ export type RegisterPageProps = {
|
|
|
48
55
|
* @param props - Optional visual customization props
|
|
49
56
|
* @returns Server-rendered register page
|
|
50
57
|
*/
|
|
51
|
-
export default function RegisterPage({ image_src, image_alt, image_background_color, layout, }?: RegisterPageProps): import("react").JSX.Element;
|
|
58
|
+
export default function RegisterPage({ image_src, image_alt, image_background_color, layout, disableNavbar, }?: RegisterPageProps): import("react").JSX.Element;
|
|
52
59
|
export { RegisterPage };
|
|
53
60
|
//# sourceMappingURL=register.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/server_pages/register.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAUrB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC;IAErC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;;;OAIG;IACH,MAAM,CAAC,EAAE,YAAY,GAAG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/server_pages/register.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAUrB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC;IAErC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;;;OAIG;IACH,MAAM,CAAC,EAAE,YAAY,GAAG,WAAW,CAAC;IAEpC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,SAAS,EACT,SAAS,EACT,sBAAsB,EACtB,MAAqB,EACrB,aAAqB,GACtB,GAAE,iBAAsB,+BA2DxB;AAGD,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -35,7 +35,7 @@ import { FloatingHomeLink } from "../components/layouts/shared/components/floati
|
|
|
35
35
|
* @param props - Optional visual customization props
|
|
36
36
|
* @returns Server-rendered register page
|
|
37
37
|
*/
|
|
38
|
-
export default function RegisterPage({ image_src, image_alt, image_background_color, layout = "two_column", } = {}) {
|
|
38
|
+
export default function RegisterPage({ image_src, image_alt, image_background_color, layout = "two_column", disableNavbar = false, } = {}) {
|
|
39
39
|
// Load configuration from INI file (with defaults including asset images)
|
|
40
40
|
const config = get_register_config();
|
|
41
41
|
const strings = readStrings();
|
|
@@ -63,7 +63,7 @@ export default function RegisterPage({ image_src, image_alt, image_background_co
|
|
|
63
63
|
const navbar = get_navbar_config();
|
|
64
64
|
return (_jsxs(_Fragment, { children: [navbar.show_home_link && (_jsx(FloatingHomeLink, { path: navbar.home_path, label: navbar.home_label })), wrapper] }));
|
|
65
65
|
}
|
|
66
|
-
return _jsx(AuthPageShell, { children: wrapper });
|
|
66
|
+
return _jsx(AuthPageShell, { disableNavbar: disableNavbar, children: wrapper });
|
|
67
67
|
}
|
|
68
68
|
// Named export for direct imports
|
|
69
69
|
export { RegisterPage };
|
package/package.json
CHANGED