@hjmds/react 1.30.0 → 1.32.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/auth-screen.d.ts +18 -3
- package/dist/auth-screen.d.ts.map +1 -1
- package/dist/auth-screen.js +22 -6
- package/dist/auth-screen.js.map +1 -1
- package/dist/bottom-cta.d.ts +6 -1
- package/dist/bottom-cta.d.ts.map +1 -1
- package/dist/bottom-cta.js +1 -1
- package/dist/bottom-cta.js.map +1 -1
- package/dist/bottom-navigation.d.ts +10 -0
- package/dist/bottom-navigation.d.ts.map +1 -1
- package/dist/bottom-navigation.js +80 -8
- package/dist/bottom-navigation.js.map +1 -1
- package/dist/carousel.d.ts +29 -1
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +27 -3
- package/dist/carousel.js.map +1 -1
- package/dist/display.d.ts +8 -2
- package/dist/display.d.ts.map +1 -1
- package/dist/display.js +12 -7
- package/dist/display.js.map +1 -1
- package/dist/evidence.d.ts +1 -1
- package/dist/evidence.js +1 -1
- package/dist/evidence.js.map +1 -1
- package/dist/forms.d.ts.map +1 -1
- package/dist/forms.js +2 -1
- package/dist/forms.js.map +1 -1
- package/dist/image-choice.d.ts +20 -2
- package/dist/image-choice.d.ts.map +1 -1
- package/dist/image-choice.js +60 -7
- package/dist/image-choice.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/internal/field-error.d.ts +19 -0
- package/dist/internal/field-error.d.ts.map +1 -0
- package/dist/internal/field-error.js +19 -0
- package/dist/internal/field-error.js.map +1 -0
- package/dist/internal/initial-focus.d.ts.map +1 -1
- package/dist/internal/initial-focus.js +49 -7
- package/dist/internal/initial-focus.js.map +1 -1
- package/dist/internal/media-album.d.ts +70 -0
- package/dist/internal/media-album.d.ts.map +1 -0
- package/dist/internal/media-album.js +52 -0
- package/dist/internal/media-album.js.map +1 -0
- package/dist/internal/message-reactions.d.ts +39 -2
- package/dist/internal/message-reactions.d.ts.map +1 -1
- package/dist/internal/message-reactions.js +31 -6
- package/dist/internal/message-reactions.js.map +1 -1
- package/dist/layout.d.ts +19 -3
- package/dist/layout.d.ts.map +1 -1
- package/dist/layout.js +10 -3
- package/dist/layout.js.map +1 -1
- package/dist/navigation.d.ts +3 -1
- package/dist/navigation.d.ts.map +1 -1
- package/dist/navigation.js +4 -2
- package/dist/navigation.js.map +1 -1
- package/dist/number-field.d.ts.map +1 -1
- package/dist/number-field.js +2 -1
- package/dist/number-field.js.map +1 -1
- package/dist/overlays.d.ts +65 -0
- package/dist/overlays.d.ts.map +1 -1
- package/dist/overlays.js +36 -3
- package/dist/overlays.js.map +1 -1
- package/dist/pagination.d.ts +13 -11
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +12 -5
- package/dist/pagination.js.map +1 -1
- package/dist/public-exports.generated.d.ts +8 -0
- package/dist/public-exports.generated.d.ts.map +1 -1
- package/dist/public-exports.generated.js +24 -0
- package/dist/public-exports.generated.js.map +1 -1
- package/dist/screen-flows.d.ts +118 -14
- package/dist/screen-flows.d.ts.map +1 -1
- package/dist/screen-flows.js +95 -23
- package/dist/screen-flows.js.map +1 -1
- package/dist/screens.d.ts +69 -10
- package/dist/screens.d.ts.map +1 -1
- package/dist/screens.js +77 -15
- package/dist/screens.js.map +1 -1
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +2 -1
- package/dist/select.js.map +1 -1
- package/dist/selection.d.ts.map +1 -1
- package/dist/selection.js +3 -2
- package/dist/selection.js.map +1 -1
- package/dist/steps.d.ts +11 -1
- package/dist/steps.d.ts.map +1 -1
- package/dist/steps.js +11 -6
- package/dist/steps.js.map +1 -1
- package/dist/styles.css +181 -22
- package/dist/styles.layered.css +181 -22
- package/dist/supplemental-display.d.ts.map +1 -1
- package/dist/supplemental-display.js +2 -48
- package/dist/supplemental-display.js.map +1 -1
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +1 -0
- package/dist/theme.js.map +1 -1
- package/dist/toast.d.ts.map +1 -1
- package/dist/toast.js +1 -1
- package/dist/toast.js.map +1 -1
- package/package.json +3 -3
package/dist/auth-screen.d.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { type AuthScreenDensity, type AuthScreenDescriptor, type AuthScreenHeroDescriptor, type AuthScreenPolicyLinkDescriptor } from "@hjmds/design-contracts/components/auth-screen";
|
|
2
2
|
import { type HTMLAttributeAnchorTarget, type HTMLAttributes, type ReactNode } from "react";
|
|
3
3
|
import { type ScreenInitialFocus } from "@hjmds/design-contracts/screen-patterns";
|
|
4
|
+
import { type ScreenExit } from "./internal/screen-exit.js";
|
|
4
5
|
import type { HjmCompositionStyleProp } from "./composition-style.js";
|
|
5
|
-
export type AuthScreenLayoutProps = Omit<HTMLAttributes<HTMLElement>, "children"> & AuthScreenDescriptor & Readonly<{
|
|
6
|
+
export type AuthScreenLayoutProps = Omit<HTMLAttributes<HTMLElement>, "children" | "title"> & AuthScreenDescriptor & Readonly<{
|
|
6
7
|
/** Use section inside a product shell that already owns the main landmark. */
|
|
7
8
|
as?: "main" | "section";
|
|
9
|
+
/**
|
|
10
|
+
* Route name in the shared screen header band (screenHeaderRecipe, centered like ScreenLayout). Login and signup
|
|
11
|
+
* routes kept a TopBar above this layout only for the route name + back/close (2026-10-18: utilverse, burntok).
|
|
12
|
+
*/
|
|
13
|
+
title?: string;
|
|
14
|
+
/** Leaving the route: the same icon-only back/close as ScreenLayout `exit`, at the header's leading edge. */
|
|
15
|
+
exit?: ScreenExit;
|
|
8
16
|
/** Product mark, title and description. The product owns every string here. */
|
|
9
17
|
hero: ReactNode;
|
|
10
18
|
/** The primary action block — provider buttons, or a product's own sign-in bundle. */
|
|
@@ -29,12 +37,19 @@ export type AuthScreenLayoutProps = Omit<HTMLAttributes<HTMLElement>, "children"
|
|
|
29
37
|
* the bottom. The measurements come from the resolved descriptor as custom
|
|
30
38
|
* properties so the stylesheet keeps one source of truth with the contract.
|
|
31
39
|
*/
|
|
32
|
-
export declare const AuthScreenLayout: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "children"> & Readonly<{
|
|
40
|
+
export declare const AuthScreenLayout: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "title" | "children"> & Readonly<{
|
|
33
41
|
density?: AuthScreenDensity;
|
|
34
42
|
hasFooter?: boolean;
|
|
35
43
|
}> & Readonly<{
|
|
36
44
|
/** Use section inside a product shell that already owns the main landmark. */
|
|
37
45
|
as?: "main" | "section";
|
|
46
|
+
/**
|
|
47
|
+
* Route name in the shared screen header band (screenHeaderRecipe, centered like ScreenLayout). Login and signup
|
|
48
|
+
* routes kept a TopBar above this layout only for the route name + back/close (2026-10-18: utilverse, burntok).
|
|
49
|
+
*/
|
|
50
|
+
title?: string;
|
|
51
|
+
/** Leaving the route: the same icon-only back/close as ScreenLayout `exit`, at the header's leading edge. */
|
|
52
|
+
exit?: ScreenExit;
|
|
38
53
|
/** Product mark, title and description. The product owns every string here. */
|
|
39
54
|
hero: ReactNode;
|
|
40
55
|
/** The primary action block — provider buttons, or a product's own sign-in bundle. */
|
|
@@ -63,7 +78,7 @@ export type AuthScreenHeroProps = AuthScreenHeroDescriptor & Readonly<{
|
|
|
63
78
|
* product supplies the strings and mark; the type steps, tones and gaps come from
|
|
64
79
|
* `authScreenRecipe.hero` so a login slogan never borrows the page-heading size.
|
|
65
80
|
*/
|
|
66
|
-
export declare function AuthScreenHero({ mark, title, eyebrow, description, headingLevel }: AuthScreenHeroProps): import("react").JSX.Element;
|
|
81
|
+
export declare function AuthScreenHero({ mark, title, eyebrow, description, headingLevel: suppliedHeadingLevel }: AuthScreenHeroProps): import("react").JSX.Element;
|
|
67
82
|
export type AuthScreenPolicyLink = AuthScreenPolicyLinkDescriptor & Readonly<{
|
|
68
83
|
/** Document URL; renders an anchor. */
|
|
69
84
|
href?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-screen.d.ts","sourceRoot":"","sources":["../src/auth-screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACpC,MAAM,gDAAgD,CAAC;AAExD,OAAO,EAA+G,KAAK,yBAAyB,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAChN,OAAO,
|
|
1
|
+
{"version":3,"file":"auth-screen.d.ts","sourceRoot":"","sources":["../src/auth-screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACpC,MAAM,gDAAgD,CAAC;AAExD,OAAO,EAA+G,KAAK,yBAAyB,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAChN,OAAO,EAAqF,KAAK,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAGrK,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE9E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAOtE,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,GACzF,oBAAoB,GACpB,QAAQ,CAAC;IACP,8EAA8E;IAC9E,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6GAA6G;IAC7G,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,+EAA+E;IAC/E,IAAI,EAAE,SAAS,CAAC;IAChB,sFAAsF;IACtF,IAAI,EAAE,SAAS,CAAC;IAChB,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4FAA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E,SAAS,CAAC;IACnB,iEAAiE;IACjE,KAAK,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACvC,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC,CAAC;AAEH;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,qBAAqB,+BA8BlF"}
|
package/dist/auth-screen.js
CHANGED
|
@@ -2,17 +2,26 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { authScreenRecipe, resolveAuthScreenDescriptor, validateAuthScreenHeroDescriptor, validateAuthScreenPolicyLinks, } from "@hjmds/design-contracts/components/auth-screen";
|
|
3
3
|
import { typography } from "@hjmds/design-contracts/foundations";
|
|
4
4
|
import { createContext, createElement, forwardRef, Fragment, useContext, useLayoutEffect, useRef, useId } from "react";
|
|
5
|
-
import { initialFocusDefaults } from "@hjmds/design-contracts/screen-patterns";
|
|
5
|
+
import { initialFocusDefaults, screenHeaderRecipe, screenPatternRecipe, validateScreenExit } from "@hjmds/design-contracts/screen-patterns";
|
|
6
6
|
import { classNames, useDesignProfileDefaults } from "./internal.js";
|
|
7
7
|
import { InitialFocusScope } from "./internal/initial-focus.js";
|
|
8
|
+
import { ScreenExitButton } from "./internal/screen-exit.js";
|
|
9
|
+
import { Heading } from "./heading.js";
|
|
8
10
|
// The hero follows the layout density without the product passing it twice.
|
|
9
11
|
const AuthScreenDensityContext = createContext(undefined);
|
|
12
|
+
// With a header title the route name is the page heading (h1), so the hero tagline steps down to h2 by default.
|
|
13
|
+
const AuthScreenTitledContext = createContext(false);
|
|
10
14
|
/**
|
|
11
15
|
* Two regions: hero + main stay one vertically centred block, the footer sits at
|
|
12
16
|
* the bottom. The measurements come from the resolved descriptor as custom
|
|
13
17
|
* properties so the stylesheet keeps one source of truth with the contract.
|
|
14
18
|
*/
|
|
15
|
-
export const AuthScreenLayout = forwardRef(function AuthScreenLayout({ hero, main, footer, density, hasFooter, pendingLabel, mainCard = false, className, as: Element = "main", layoutStyle, initialFocus = initialFocusDefaults.auth, ...props }, forwardedRef) {
|
|
19
|
+
export const AuthScreenLayout = forwardRef(function AuthScreenLayout({ title, exit, hero, main, footer, density, hasFooter, pendingLabel, mainCard = false, className, as: Element = "main", layoutStyle, initialFocus = initialFocusDefaults.auth, ...props }, forwardedRef) {
|
|
20
|
+
if (title !== undefined && !title.trim())
|
|
21
|
+
throw new TypeError("AuthScreenLayout title must not be empty");
|
|
22
|
+
if (exit)
|
|
23
|
+
validateScreenExit(exit, false);
|
|
24
|
+
const hasHeader = title !== undefined || exit !== undefined;
|
|
16
25
|
const resolved = resolveAuthScreenDescriptor({
|
|
17
26
|
...(density === undefined ? {} : { density }),
|
|
18
27
|
...(hasFooter === undefined ? {} : { hasFooter }),
|
|
@@ -33,17 +42,22 @@ export const AuthScreenLayout = forwardRef(function AuthScreenLayout({ hero, mai
|
|
|
33
42
|
}, [pending]);
|
|
34
43
|
if (pending && !pendingLabel.trim())
|
|
35
44
|
throw new TypeError("AuthScreen pendingLabel must not be empty");
|
|
36
|
-
return (
|
|
45
|
+
return (_jsxs(Element, { ...props, ref: forwardedRef, className: classNames("hjm-auth-screen", className), "data-density": resolved.density, "data-header": hasHeader || undefined, style: {
|
|
37
46
|
["--hjm-auth-screen-max-width"]: `${resolved.maxWidth}px`,
|
|
38
47
|
["--hjm-auth-screen-hero-gap"]: `${resolved.heroGap}px`,
|
|
39
48
|
["--hjm-auth-screen-main-gap"]: `${resolved.mainGap}px`,
|
|
40
49
|
["--hjm-auth-screen-footer-gap"]: `${resolved.footerGap}px`,
|
|
41
50
|
["--hjm-auth-screen-padding-inline"]: `${resolved.paddingInline}px`,
|
|
42
51
|
["--hjm-auth-screen-padding-block"]: `${resolved.paddingBlock}px`,
|
|
52
|
+
...(hasHeader ? {
|
|
53
|
+
["--hjm-auth-screen-header-padding-inline"]: `${screenPatternRecipe.padding}px`,
|
|
54
|
+
["--hjm-auth-screen-header-padding-block"]: `${screenHeaderRecipe.paddingVertical}px`,
|
|
55
|
+
["--hjm-auth-screen-header-min-height"]: `${screenHeaderRecipe.minHeight}px`,
|
|
56
|
+
} : {}),
|
|
43
57
|
...props.style,
|
|
44
58
|
...layoutStyle,
|
|
45
|
-
}, children: _jsxs(InitialFocusScope, { mode: initialFocus, children: [_jsxs("div", { className: "hjm-auth-screen__block", children: [_jsx(AuthScreenDensityContext.Provider, { value: resolved.density, children: _jsx("div", { className: "hjm-auth-screen__hero", children: hero }) }), _jsxs("div", { className: "hjm-auth-screen__main", "data-card": mainCard || undefined, "aria-busy": pending || undefined, children: [_jsx("div", { ref: actionsRef, className: "hjm-auth-screen__actions", inert: pending, "aria-hidden": pending || undefined, onFocusCapture: event => { focusedAction.current = event.target; }, onBlurCapture: event => { if (!pending && !event.currentTarget.contains(event.relatedTarget))
|
|
46
|
-
|
|
59
|
+
}, children: [hasHeader ? _jsxs("header", { className: "hjm-auth-screen__header", children: [_jsx("div", { children: exit ? _jsx(ScreenExitButton, { ...exit }) : null }), _jsx("div", { className: "hjm-auth-screen__header-title", children: title === undefined ? null : _jsx(Heading, { level: screenHeaderRecipe.centeredTitleLevel, semanticLevel: 1, children: title }) }), _jsx("div", {})] }) : null, _jsxs(InitialFocusScope, { mode: initialFocus, children: [_jsxs("div", { className: "hjm-auth-screen__block", children: [_jsx(AuthScreenDensityContext.Provider, { value: resolved.density, children: _jsx(AuthScreenTitledContext.Provider, { value: title !== undefined, children: _jsx("div", { className: "hjm-auth-screen__hero", children: hero }) }) }), _jsxs("div", { className: "hjm-auth-screen__main", "data-card": mainCard || undefined, "aria-busy": pending || undefined, children: [_jsx("div", { ref: actionsRef, className: "hjm-auth-screen__actions", inert: pending, "aria-hidden": pending || undefined, onFocusCapture: event => { focusedAction.current = event.target; }, onBlurCapture: event => { if (!pending && !event.currentTarget.contains(event.relatedTarget))
|
|
60
|
+
focusedAction.current = null; }, style: pending ? { visibility: "hidden" } : undefined, children: main }), pending ? _jsx("div", { className: "hjm-auth-screen__pending", role: "status", "aria-label": pendingLabel, children: _jsx("span", { className: "hjm-auth-provider-button__spinner", "aria-hidden": "true" }) }) : null] })] }), showFooter ? _jsx("div", { className: "hjm-auth-screen__footer", children: footer }) : null] })] }));
|
|
47
61
|
});
|
|
48
62
|
/** Token weight per variant, following the nearest design profile like `Text` does. */
|
|
49
63
|
function useTypeWeight() {
|
|
@@ -56,7 +70,9 @@ function useTypeWeight() {
|
|
|
56
70
|
* product supplies the strings and mark; the type steps, tones and gaps come from
|
|
57
71
|
* `authScreenRecipe.hero` so a login slogan never borrows the page-heading size.
|
|
58
72
|
*/
|
|
59
|
-
export function AuthScreenHero({ mark, title, eyebrow, description, headingLevel
|
|
73
|
+
export function AuthScreenHero({ mark, title, eyebrow, description, headingLevel: suppliedHeadingLevel }) {
|
|
74
|
+
const titled = useContext(AuthScreenTitledContext);
|
|
75
|
+
const headingLevel = suppliedHeadingLevel ?? (titled ? 2 : 1);
|
|
60
76
|
validateAuthScreenHeroDescriptor({ title, ...(eyebrow === undefined ? {} : { eyebrow }), ...(description === undefined ? {} : { description }), headingLevel });
|
|
61
77
|
const density = useContext(AuthScreenDensityContext);
|
|
62
78
|
const variant = resolveAuthScreenDescriptor(density === undefined ? {} : { density }).titleVariant;
|
package/dist/auth-screen.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-screen.js","sourceRoot":"","sources":["../src/auth-screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,gBAAgB,EAChB,2BAA2B,EAC3B,gCAAgC,EAChC,6BAA6B,GAK9B,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,UAAU,EAAoB,MAAM,qCAAqC,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAA2F,KAAK,EAAE,MAAM,OAAO,CAAC;AAChN,OA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AAC,QAAQ,EAAC,SAAS,EAAC,gCAAgC,kBAAe,MAAM,CAAC,IAAI,CAAC,WAAW,oBAAiB,IAAI,eAAY,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,sBACrJ,IAAI,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,YAAG,IAAI,CAAC,KAAK,GAAU,EAE5I,IAAI,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAM,EAAE,EAAE,GAAG,MAAM,IAAI,KAAK,EAAE,EAAE,SAAS,EAAC,qBAAqB,YAAE,IAAI,CAAC,iBAAiB,GAAQ,KATjI,GAAG,KAAK,IAAI,IAAI,CAAC,KAAK,EAAE,CAU5B,CACZ,CAAC,GACE,EACL,QAAQ,IACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["import {\n authScreenRecipe,\n resolveAuthScreenDescriptor,\n validateAuthScreenHeroDescriptor,\n validateAuthScreenPolicyLinks,\n type AuthScreenDensity,\n type AuthScreenDescriptor,\n type AuthScreenHeroDescriptor,\n type AuthScreenPolicyLinkDescriptor,\n} from \"@hjmds/design-contracts/components/auth-screen\";\nimport { typography, type TextVariant } from \"@hjmds/design-contracts/foundations\";\nimport { createContext, createElement, forwardRef, Fragment, useContext, useLayoutEffect, useRef, type CSSProperties, type HTMLAttributeAnchorTarget, type HTMLAttributes, type ReactNode, useId } from \"react\";\nimport { initialFocusDefaults, type ScreenInitialFocus } from \"@hjmds/design-contracts/screen-patterns\";\nimport { classNames, useDesignProfileDefaults } from \"./internal.js\";\nimport { InitialFocusScope } from \"./internal/initial-focus.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\n// The hero follows the layout density without the product passing it twice.\nconst AuthScreenDensityContext = createContext<AuthScreenDensity | undefined>(undefined);\n\nexport type AuthScreenLayoutProps = Omit<HTMLAttributes<HTMLElement>, \"children\"> &\n AuthScreenDescriptor &\n Readonly<{\n /** Use section inside a product shell that already owns the main landmark. */\n as?: \"main\" | \"section\";\n /** Product mark, title and description. The product owns every string here. */\n hero: ReactNode;\n /** The primary action block — provider buttons, or a product's own sign-in bundle. */\n main: ReactNode;\n /** Product-localized progress label; presence replaces actions with one centred loader. */\n pendingLabel?: string;\n /** Let the layout own the action card; omit when the product already supplies a surface. */\n mainCard?: boolean;\n /** Consent notice and policy links. Omit with `hasFooter: false`. */\n footer?: ReactNode;\n className?: string;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n /**\n * Entry focus, same rules as ScreenLayout `initialFocus`. Off by default because auth screens lead with provider\n * buttons; a signup nickname step opts in with `first-input` (2026-10-18 adoption, same as Native).\n */\n initialFocus?: ScreenInitialFocus;\n }>;\n\n/**\n * Two regions: hero + main stay one vertically centred block, the footer sits at\n * the bottom. The measurements come from the resolved descriptor as custom\n * properties so the stylesheet keeps one source of truth with the contract.\n */\nexport const AuthScreenLayout = forwardRef<HTMLElement, AuthScreenLayoutProps>(\n function AuthScreenLayout(\n { hero, main, footer, density, hasFooter, pendingLabel, mainCard = false, className, as: Element = \"main\", layoutStyle, initialFocus = initialFocusDefaults.auth, ...props },\n forwardedRef,\n ) {\n const resolved = resolveAuthScreenDescriptor({\n ...(density === undefined ? {} : { density }),\n ...(hasFooter === undefined ? {} : { hasFooter }),\n });\n const showFooter = resolved.hasFooter && footer !== undefined && footer !== null;\n const pending = pendingLabel !== undefined;\n const actionsRef = useRef<HTMLDivElement>(null);\n const focusedAction = useRef<HTMLElement | null>(null);\n const wasPending = useRef(pending);\n useLayoutEffect(() => {\n // Inert loading content sends keyboard focus to body. Resume at the same\n // action after failure/cancellation, unless the user moved somewhere else.\n const target = focusedAction.current;\n if (wasPending.current && !pending && document.activeElement === document.body && target?.isConnected && actionsRef.current?.contains(target)) {\n target.focus({ preventScroll: true });\n }\n wasPending.current = pending;\n }, [pending]);\n if (pending && !pendingLabel.trim()) throw new TypeError(\"AuthScreen pendingLabel must not be empty\");\n return (\n <Element\n {...props}\n ref={forwardedRef}\n className={classNames(\"hjm-auth-screen\", className)}\n data-density={resolved.density}\n style={{\n [\"--hjm-auth-screen-max-width\" as string]: `${resolved.maxWidth}px`,\n [\"--hjm-auth-screen-hero-gap\" as string]: `${resolved.heroGap}px`,\n [\"--hjm-auth-screen-main-gap\" as string]: `${resolved.mainGap}px`,\n [\"--hjm-auth-screen-footer-gap\" as string]: `${resolved.footerGap}px`,\n [\"--hjm-auth-screen-padding-inline\" as string]: `${resolved.paddingInline}px`,\n [\"--hjm-auth-screen-padding-block\" as string]: `${resolved.paddingBlock}px`,\n ...props.style,\n ...layoutStyle,\n }}\n >\n <InitialFocusScope mode={initialFocus}>\n <div className=\"hjm-auth-screen__block\">\n <AuthScreenDensityContext.Provider value={resolved.density}><div className=\"hjm-auth-screen__hero\">{hero}</div></AuthScreenDensityContext.Provider>\n <div className=\"hjm-auth-screen__main\" data-card={mainCard || undefined} aria-busy={pending || undefined}>\n {/* Keep the action block in flow so the card never collapses; inert also removes keyboard access. */}\n <div ref={actionsRef} className=\"hjm-auth-screen__actions\" inert={pending} aria-hidden={pending || undefined}\n onFocusCapture={event => { focusedAction.current = event.target; }}\n onBlurCapture={event => { if (!pending && !event.currentTarget.contains(event.relatedTarget)) focusedAction.current = null; }}\n style={pending ? { visibility: \"hidden\" } : undefined}>{main}</div>\n {pending ? <div className=\"hjm-auth-screen__pending\" role=\"status\" aria-label={pendingLabel}>\n <span className=\"hjm-auth-provider-button__spinner\" aria-hidden=\"true\" />\n </div> : null}\n </div>\n </div>\n {showFooter ? <div className=\"hjm-auth-screen__footer\">{footer}</div> : null}\n </InitialFocusScope>\n </Element>\n );\n },\n);\n\n/** Token weight per variant, following the nearest design profile like `Text` does. */\nfunction useTypeWeight(): (variant: TextVariant) => number | string {\n const profile = useDesignProfileDefaults();\n const tokens = profile?.tokens.typography ?? typography;\n return variant => tokens[variant].fontWeight;\n}\n\nexport type AuthScreenHeroProps = AuthScreenHeroDescriptor &\n Readonly<{\n /** Product mark asset. HJM never ships product marks. */\n mark?: ReactNode;\n }>;\n\n/**\n * The `hero` slot content: mark, eyebrow, tagline and one description line. The\n * product supplies the strings and mark; the type steps, tones and gaps come from\n * `authScreenRecipe.hero` so a login slogan never borrows the page-heading size.\n */\nexport function AuthScreenHero({ mark, title, eyebrow, description, headingLevel = 1 }: AuthScreenHeroProps) {\n validateAuthScreenHeroDescriptor({ title, ...(eyebrow === undefined ? {} : { eyebrow }), ...(description === undefined ? {} : { description }), headingLevel });\n const density = useContext(AuthScreenDensityContext);\n const variant = resolveAuthScreenDescriptor(density === undefined ? {} : { density }).titleVariant;\n const weight = useTypeWeight();\n const recipe = authScreenRecipe.hero;\n // Fragment: the mark and the copy are direct children of the hero so the\n // recipe hero gap separates them on both platforms.\n return (\n <Fragment>\n {mark ? <div className=\"hjm-auth-screen__mark\">{mark}</div> : null}\n <div className=\"hjm-auth-screen__copy\">\n {eyebrow ? <p className=\"hjm-text hjm-auth-screen__eyebrow\" data-variant={recipe.eyebrow.textVariant} data-font-role=\"ui\" data-tone={recipe.eyebrow.tone}\n style={{ marginBlockEnd: recipe.eyebrow.gapBelow, fontWeight: weight(recipe.eyebrow.textVariant) }}>{eyebrow}</p> : null}\n {/* A real heading element: the tagline is the route's first heading. */}\n {createElement(`h${headingLevel}`, {\n className: \"hjm-text hjm-auth-screen__title\",\n \"data-variant\": variant,\n \"data-font-role\": \"display\",\n \"data-tone\": recipe.title.tone,\n // The title step's own weight (500), not Text's regular default outside a profile.\n style: { fontWeight: weight(variant) },\n }, title)}\n {description ? <p className=\"hjm-text hjm-auth-screen__description\" data-variant={recipe.description.textVariant} data-font-role=\"ui\" data-tone={recipe.description.tone}\n style={{ marginBlockStart: recipe.description.gapAbove, fontWeight: weight(recipe.description.textVariant) }}>{description}</p> : null}\n </div>\n </Fragment>\n );\n}\n\nexport type AuthScreenPolicyLink = AuthScreenPolicyLinkDescriptor &\n Readonly<{\n /** Document URL; renders an anchor. */\n href?: string;\n /**\n * Anchor target with `href`, e.g. `_blank` for policy documents that open beside the app (diairy web lost its\n * new-tab links on adoption, 2026-10-17). `rel` defaults to \"noreferrer noopener\" for `_blank`, as on Link.\n */\n target?: HTMLAttributeAnchorTarget;\n rel?: string;\n /** In-app handler; renders a button when there is no `href`. */\n onClick?: () => void;\n }>;\n\nexport type AuthScreenFooterProps = Readonly<{\n /** Optional consent notice (LS-04). */\n notice?: ReactNode;\n /** Terms and privacy links; at least one is required (LS-04). */\n links: readonly AuthScreenPolicyLink[];\n /** Extra product content under the links. */\n children?: ReactNode;\n}>;\n\n/**\n * The `footer` slot content: consent notice plus dot-separated policy links. The\n * visible gap between two links is `linkGap` + separator + `linkGap`; the 44px\n * touch target is an invisible hit area, not visible padding.\n */\nexport function AuthScreenFooter({ notice, links, children }: AuthScreenFooterProps) {\n validateAuthScreenPolicyLinks(links);\n const recipe = authScreenRecipe.footer;\n const weight = useTypeWeight();\n const linkStyle = { fontWeight: weight(recipe.link.textVariant) };\n const hintId = useId();\n return (\n <div className=\"hjm-auth-screen__footer-content\" style={{ gap: recipe.noticeGap }}>\n {notice ? <p className=\"hjm-text\" data-variant={recipe.notice.textVariant} data-font-role=\"ui\" data-tone={recipe.notice.tone} style={{ fontWeight: weight(recipe.notice.textVariant) }}>{notice}</p> : null}\n <div className=\"hjm-auth-screen__links\" style={{\n [\"--hjm-auth-screen-link-gap\" as string]: `${recipe.linkGap}px`,\n [\"--hjm-auth-screen-link-target\" as string]: `${authScreenRecipe.footerMinTouchTarget}px`,\n } as CSSProperties}>\n {links.map((link, index) => (\n <Fragment key={`${index}:${link.label}`}>\n {index > 0 ? <span className=\"hjm-text hjm-auth-screen__separator\" data-variant={recipe.link.textVariant} data-tone={recipe.notice.tone} aria-hidden=\"true\">{recipe.separator}</span> : null}\n {link.href !== undefined\n ? <a className=\"hjm-text hjm-auth-screen__link\" data-variant={recipe.link.textVariant} data-font-role=\"ui\" data-tone={recipe.link.tone} style={linkStyle} href={link.href}\n target={link.target} rel={link.rel ?? (link.target === \"_blank\" ? \"noreferrer noopener\" : undefined)}\n aria-describedby={link.accessibilityHint === undefined ? undefined : `${hintId}-${index}`} onClick={link.onClick}>{link.label}</a>\n : <button type=\"button\" className=\"hjm-text hjm-auth-screen__link\" data-variant={recipe.link.textVariant} data-font-role=\"ui\" data-tone={recipe.link.tone} style={linkStyle}\n aria-describedby={link.accessibilityHint === undefined ? undefined : `${hintId}-${index}`} onClick={link.onClick}>{link.label}</button>}\n {/* Native announces the hint after the label; Web reads the same text as the link's description. */}\n {link.accessibilityHint === undefined ? null : <span id={`${hintId}-${index}`} className=\"hjm-visually-hidden\">{link.accessibilityHint}</span>}\n </Fragment>\n ))}\n </div>\n {children}\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"auth-screen.js","sourceRoot":"","sources":["../src/auth-screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,gBAAgB,EAChB,2BAA2B,EAC3B,gCAAgC,EAChC,6BAA6B,GAK9B,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,UAAU,EAAoB,MAAM,qCAAqC,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAA2F,KAAK,EAAE,MAAM,OAAO,CAAC;AAChN,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,kBAAkB,EAA2B,MAAM,yCAAyC,CAAC;AACrK,OAAO,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,OAAO,EAA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,WAAW,oBAAiB,IAAI,eAAY,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,sBACrJ,IAAI,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,YAAG,IAAI,CAAC,KAAK,GAAU,EAE5I,IAAI,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAM,EAAE,EAAE,GAAG,MAAM,IAAI,KAAK,EAAE,EAAE,SAAS,EAAC,qBAAqB,YAAE,IAAI,CAAC,iBAAiB,GAAQ,KATjI,GAAG,KAAK,IAAI,IAAI,CAAC,KAAK,EAAE,CAU5B,CACZ,CAAC,GACE,EACL,QAAQ,IACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["import {\n authScreenRecipe,\n resolveAuthScreenDescriptor,\n validateAuthScreenHeroDescriptor,\n validateAuthScreenPolicyLinks,\n type AuthScreenDensity,\n type AuthScreenDescriptor,\n type AuthScreenHeroDescriptor,\n type AuthScreenPolicyLinkDescriptor,\n} from \"@hjmds/design-contracts/components/auth-screen\";\nimport { typography, type TextVariant } from \"@hjmds/design-contracts/foundations\";\nimport { createContext, createElement, forwardRef, Fragment, useContext, useLayoutEffect, useRef, type CSSProperties, type HTMLAttributeAnchorTarget, type HTMLAttributes, type ReactNode, useId } from \"react\";\nimport { initialFocusDefaults, screenHeaderRecipe, screenPatternRecipe, validateScreenExit, type ScreenInitialFocus } from \"@hjmds/design-contracts/screen-patterns\";\nimport { classNames, useDesignProfileDefaults } from \"./internal.js\";\nimport { InitialFocusScope } from \"./internal/initial-focus.js\";\nimport { ScreenExitButton, type ScreenExit } from \"./internal/screen-exit.js\";\nimport { Heading } from \"./heading.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\n// The hero follows the layout density without the product passing it twice.\nconst AuthScreenDensityContext = createContext<AuthScreenDensity | undefined>(undefined);\n// With a header title the route name is the page heading (h1), so the hero tagline steps down to h2 by default.\nconst AuthScreenTitledContext = createContext(false);\n\nexport type AuthScreenLayoutProps = Omit<HTMLAttributes<HTMLElement>, \"children\" | \"title\"> &\n AuthScreenDescriptor &\n Readonly<{\n /** Use section inside a product shell that already owns the main landmark. */\n as?: \"main\" | \"section\";\n /**\n * Route name in the shared screen header band (screenHeaderRecipe, centered like ScreenLayout). Login and signup\n * routes kept a TopBar above this layout only for the route name + back/close (2026-10-18: utilverse, burntok).\n */\n title?: string;\n /** Leaving the route: the same icon-only back/close as ScreenLayout `exit`, at the header's leading edge. */\n exit?: ScreenExit;\n /** Product mark, title and description. The product owns every string here. */\n hero: ReactNode;\n /** The primary action block — provider buttons, or a product's own sign-in bundle. */\n main: ReactNode;\n /** Product-localized progress label; presence replaces actions with one centred loader. */\n pendingLabel?: string;\n /** Let the layout own the action card; omit when the product already supplies a surface. */\n mainCard?: boolean;\n /** Consent notice and policy links. Omit with `hasFooter: false`. */\n footer?: ReactNode;\n className?: string;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n /**\n * Entry focus, same rules as ScreenLayout `initialFocus`. Off by default because auth screens lead with provider\n * buttons; a signup nickname step opts in with `first-input` (2026-10-18 adoption, same as Native).\n */\n initialFocus?: ScreenInitialFocus;\n }>;\n\n/**\n * Two regions: hero + main stay one vertically centred block, the footer sits at\n * the bottom. The measurements come from the resolved descriptor as custom\n * properties so the stylesheet keeps one source of truth with the contract.\n */\nexport const AuthScreenLayout = forwardRef<HTMLElement, AuthScreenLayoutProps>(\n function AuthScreenLayout(\n { title, exit, hero, main, footer, density, hasFooter, pendingLabel, mainCard = false, className, as: Element = \"main\", layoutStyle, initialFocus = initialFocusDefaults.auth, ...props },\n forwardedRef,\n ) {\n if (title !== undefined && !title.trim()) throw new TypeError(\"AuthScreenLayout title must not be empty\");\n if (exit) validateScreenExit(exit, false);\n const hasHeader = title !== undefined || exit !== undefined;\n const resolved = resolveAuthScreenDescriptor({\n ...(density === undefined ? {} : { density }),\n ...(hasFooter === undefined ? {} : { hasFooter }),\n });\n const showFooter = resolved.hasFooter && footer !== undefined && footer !== null;\n const pending = pendingLabel !== undefined;\n const actionsRef = useRef<HTMLDivElement>(null);\n const focusedAction = useRef<HTMLElement | null>(null);\n const wasPending = useRef(pending);\n useLayoutEffect(() => {\n // Inert loading content sends keyboard focus to body. Resume at the same\n // action after failure/cancellation, unless the user moved somewhere else.\n const target = focusedAction.current;\n if (wasPending.current && !pending && document.activeElement === document.body && target?.isConnected && actionsRef.current?.contains(target)) {\n target.focus({ preventScroll: true });\n }\n wasPending.current = pending;\n }, [pending]);\n if (pending && !pendingLabel.trim()) throw new TypeError(\"AuthScreen pendingLabel must not be empty\");\n return (\n <Element\n {...props}\n ref={forwardedRef}\n className={classNames(\"hjm-auth-screen\", className)}\n data-density={resolved.density}\n data-header={hasHeader || undefined}\n style={{\n [\"--hjm-auth-screen-max-width\" as string]: `${resolved.maxWidth}px`,\n [\"--hjm-auth-screen-hero-gap\" as string]: `${resolved.heroGap}px`,\n [\"--hjm-auth-screen-main-gap\" as string]: `${resolved.mainGap}px`,\n [\"--hjm-auth-screen-footer-gap\" as string]: `${resolved.footerGap}px`,\n [\"--hjm-auth-screen-padding-inline\" as string]: `${resolved.paddingInline}px`,\n [\"--hjm-auth-screen-padding-block\" as string]: `${resolved.paddingBlock}px`,\n ...(hasHeader ? {\n [\"--hjm-auth-screen-header-padding-inline\" as string]: `${screenPatternRecipe.padding}px`,\n [\"--hjm-auth-screen-header-padding-block\" as string]: `${screenHeaderRecipe.paddingVertical}px`,\n [\"--hjm-auth-screen-header-min-height\" as string]: `${screenHeaderRecipe.minHeight}px`,\n } : {}),\n ...props.style,\n ...layoutStyle,\n }}\n >\n {/* The ScreenLayout centered band (same exit, gutter and title step), full-bleed above the padded block. */}\n {hasHeader ? <header className=\"hjm-auth-screen__header\">\n <div>{exit ? <ScreenExitButton {...exit} /> : null}</div>\n <div className=\"hjm-auth-screen__header-title\">{title === undefined ? null : <Heading level={screenHeaderRecipe.centeredTitleLevel} semanticLevel={1}>{title}</Heading>}</div>\n <div />\n </header> : null}\n <InitialFocusScope mode={initialFocus}>\n <div className=\"hjm-auth-screen__block\">\n <AuthScreenDensityContext.Provider value={resolved.density}><AuthScreenTitledContext.Provider value={title !== undefined}><div className=\"hjm-auth-screen__hero\">{hero}</div></AuthScreenTitledContext.Provider></AuthScreenDensityContext.Provider>\n <div className=\"hjm-auth-screen__main\" data-card={mainCard || undefined} aria-busy={pending || undefined}>\n {/* Keep the action block in flow so the card never collapses; inert also removes keyboard access. */}\n <div ref={actionsRef} className=\"hjm-auth-screen__actions\" inert={pending} aria-hidden={pending || undefined}\n onFocusCapture={event => { focusedAction.current = event.target; }}\n onBlurCapture={event => { if (!pending && !event.currentTarget.contains(event.relatedTarget)) focusedAction.current = null; }}\n style={pending ? { visibility: \"hidden\" } : undefined}>{main}</div>\n {pending ? <div className=\"hjm-auth-screen__pending\" role=\"status\" aria-label={pendingLabel}>\n <span className=\"hjm-auth-provider-button__spinner\" aria-hidden=\"true\" />\n </div> : null}\n </div>\n </div>\n {showFooter ? <div className=\"hjm-auth-screen__footer\">{footer}</div> : null}\n </InitialFocusScope>\n </Element>\n );\n },\n);\n\n/** Token weight per variant, following the nearest design profile like `Text` does. */\nfunction useTypeWeight(): (variant: TextVariant) => number | string {\n const profile = useDesignProfileDefaults();\n const tokens = profile?.tokens.typography ?? typography;\n return variant => tokens[variant].fontWeight;\n}\n\nexport type AuthScreenHeroProps = AuthScreenHeroDescriptor &\n Readonly<{\n /** Product mark asset. HJM never ships product marks. */\n mark?: ReactNode;\n }>;\n\n/**\n * The `hero` slot content: mark, eyebrow, tagline and one description line. The\n * product supplies the strings and mark; the type steps, tones and gaps come from\n * `authScreenRecipe.hero` so a login slogan never borrows the page-heading size.\n */\nexport function AuthScreenHero({ mark, title, eyebrow, description, headingLevel: suppliedHeadingLevel }: AuthScreenHeroProps) {\n const titled = useContext(AuthScreenTitledContext);\n const headingLevel = suppliedHeadingLevel ?? (titled ? 2 : 1);\n validateAuthScreenHeroDescriptor({ title, ...(eyebrow === undefined ? {} : { eyebrow }), ...(description === undefined ? {} : { description }), headingLevel });\n const density = useContext(AuthScreenDensityContext);\n const variant = resolveAuthScreenDescriptor(density === undefined ? {} : { density }).titleVariant;\n const weight = useTypeWeight();\n const recipe = authScreenRecipe.hero;\n // Fragment: the mark and the copy are direct children of the hero so the\n // recipe hero gap separates them on both platforms.\n return (\n <Fragment>\n {mark ? <div className=\"hjm-auth-screen__mark\">{mark}</div> : null}\n <div className=\"hjm-auth-screen__copy\">\n {eyebrow ? <p className=\"hjm-text hjm-auth-screen__eyebrow\" data-variant={recipe.eyebrow.textVariant} data-font-role=\"ui\" data-tone={recipe.eyebrow.tone}\n style={{ marginBlockEnd: recipe.eyebrow.gapBelow, fontWeight: weight(recipe.eyebrow.textVariant) }}>{eyebrow}</p> : null}\n {/* A real heading element: the tagline is the route's first heading. */}\n {createElement(`h${headingLevel}`, {\n className: \"hjm-text hjm-auth-screen__title\",\n \"data-variant\": variant,\n \"data-font-role\": \"display\",\n \"data-tone\": recipe.title.tone,\n // The title step's own weight (500), not Text's regular default outside a profile.\n style: { fontWeight: weight(variant) },\n }, title)}\n {description ? <p className=\"hjm-text hjm-auth-screen__description\" data-variant={recipe.description.textVariant} data-font-role=\"ui\" data-tone={recipe.description.tone}\n style={{ marginBlockStart: recipe.description.gapAbove, fontWeight: weight(recipe.description.textVariant) }}>{description}</p> : null}\n </div>\n </Fragment>\n );\n}\n\nexport type AuthScreenPolicyLink = AuthScreenPolicyLinkDescriptor &\n Readonly<{\n /** Document URL; renders an anchor. */\n href?: string;\n /**\n * Anchor target with `href`, e.g. `_blank` for policy documents that open beside the app (diairy web lost its\n * new-tab links on adoption, 2026-10-17). `rel` defaults to \"noreferrer noopener\" for `_blank`, as on Link.\n */\n target?: HTMLAttributeAnchorTarget;\n rel?: string;\n /** In-app handler; renders a button when there is no `href`. */\n onClick?: () => void;\n }>;\n\nexport type AuthScreenFooterProps = Readonly<{\n /** Optional consent notice (LS-04). */\n notice?: ReactNode;\n /** Terms and privacy links; at least one is required (LS-04). */\n links: readonly AuthScreenPolicyLink[];\n /** Extra product content under the links. */\n children?: ReactNode;\n}>;\n\n/**\n * The `footer` slot content: consent notice plus dot-separated policy links. The\n * visible gap between two links is `linkGap` + separator + `linkGap`; the 44px\n * touch target is an invisible hit area, not visible padding.\n */\nexport function AuthScreenFooter({ notice, links, children }: AuthScreenFooterProps) {\n validateAuthScreenPolicyLinks(links);\n const recipe = authScreenRecipe.footer;\n const weight = useTypeWeight();\n const linkStyle = { fontWeight: weight(recipe.link.textVariant) };\n const hintId = useId();\n return (\n <div className=\"hjm-auth-screen__footer-content\" style={{ gap: recipe.noticeGap }}>\n {notice ? <p className=\"hjm-text\" data-variant={recipe.notice.textVariant} data-font-role=\"ui\" data-tone={recipe.notice.tone} style={{ fontWeight: weight(recipe.notice.textVariant) }}>{notice}</p> : null}\n <div className=\"hjm-auth-screen__links\" style={{\n [\"--hjm-auth-screen-link-gap\" as string]: `${recipe.linkGap}px`,\n [\"--hjm-auth-screen-link-target\" as string]: `${authScreenRecipe.footerMinTouchTarget}px`,\n } as CSSProperties}>\n {links.map((link, index) => (\n <Fragment key={`${index}:${link.label}`}>\n {index > 0 ? <span className=\"hjm-text hjm-auth-screen__separator\" data-variant={recipe.link.textVariant} data-tone={recipe.notice.tone} aria-hidden=\"true\">{recipe.separator}</span> : null}\n {link.href !== undefined\n ? <a className=\"hjm-text hjm-auth-screen__link\" data-variant={recipe.link.textVariant} data-font-role=\"ui\" data-tone={recipe.link.tone} style={linkStyle} href={link.href}\n target={link.target} rel={link.rel ?? (link.target === \"_blank\" ? \"noreferrer noopener\" : undefined)}\n aria-describedby={link.accessibilityHint === undefined ? undefined : `${hintId}-${index}`} onClick={link.onClick}>{link.label}</a>\n : <button type=\"button\" className=\"hjm-text hjm-auth-screen__link\" data-variant={recipe.link.textVariant} data-font-role=\"ui\" data-tone={recipe.link.tone} style={linkStyle}\n aria-describedby={link.accessibilityHint === undefined ? undefined : `${hintId}-${index}`} onClick={link.onClick}>{link.label}</button>}\n {/* Native announces the hint after the label; Web reads the same text as the link's description. */}\n {link.accessibilityHint === undefined ? null : <span id={`${hintId}-${index}`} className=\"hjm-visually-hidden\">{link.accessibilityHint}</span>}\n </Fragment>\n ))}\n </div>\n {children}\n </div>\n );\n}\n"]}
|
package/dist/bottom-cta.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HTMLAttributes, type MouseEventHandler, type ReactNode } from "react";
|
|
1
|
+
import { type HTMLAttributes, type MouseEventHandler, type ReactNode, type Ref } from "react";
|
|
2
2
|
import { type ButtonSize, type ButtonTone } from "./actions.js";
|
|
3
3
|
import type { HjmCompositionStyleProp } from "./composition-style.js";
|
|
4
4
|
export type BottomCTAAction = Readonly<{
|
|
@@ -10,6 +10,11 @@ export type BottomCTAAction = Readonly<{
|
|
|
10
10
|
loadingLabel?: string;
|
|
11
11
|
size?: ButtonSize;
|
|
12
12
|
tone?: ButtonTone;
|
|
13
|
+
/**
|
|
14
|
+
* Ref to this action's button. The component `ref` names the bar; a dialog or overlay opened from the primary
|
|
15
|
+
* action needs the button itself to return focus to on close (2026-10-18 Utilverse display board).
|
|
16
|
+
*/
|
|
17
|
+
buttonRef?: Ref<HTMLButtonElement>;
|
|
13
18
|
}>;
|
|
14
19
|
export type BottomCTAProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & Readonly<{
|
|
15
20
|
primaryAction: BottomCTAAction;
|
package/dist/bottom-cta.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bottom-cta.d.ts","sourceRoot":"","sources":["../src/bottom-cta.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA8C,KAAK,cAAc,EAAE,KAAK,iBAAiB,EA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AAC,CAAC;AAeH,wGAAwG;AACxG,eAAO,MAAM,SAAS;mBAzBL,eAAe;sBACZ,eAAe,GAAG,SAAS;kBAC/B,MAAM;yBACC,MAAM;qBACV,MAAM;IACvB,4FAA4F;eACjF,MAAM,GAAG,QAAQ;IAC5B,gGAAgG;kBAClF,uBAAuB;mDA2CrC,CAAC"}
|
package/dist/bottom-cta.js
CHANGED
|
@@ -9,7 +9,7 @@ import { ScreenFooterContext } from "./internal/screen-footer.js";
|
|
|
9
9
|
function Action({ action, tone }) {
|
|
10
10
|
if (!action.label.trim())
|
|
11
11
|
throw new TypeError("BottomCTA action label must not be empty");
|
|
12
|
-
return _jsx(Button, { onClick: action.onClick, tone: action.tone ?? tone, size: action.size ?? "medium", disabled: action.disabled, loading: action.loading ?? false, "aria-label": action.loading ? action.loadingLabel ?? action.accessibilityLabel ?? action.label : action.accessibilityLabel, children: action.label });
|
|
12
|
+
return _jsx(Button, { ref: action.buttonRef, onClick: action.onClick, tone: action.tone ?? tone, size: action.size ?? "medium", disabled: action.disabled, loading: action.loading ?? false, "aria-label": action.loading ? action.loadingLabel ?? action.accessibilityLabel ?? action.label : action.accessibilityLabel, children: action.label });
|
|
13
13
|
}
|
|
14
14
|
function isAction(value) {
|
|
15
15
|
return typeof value === "object" && value !== null && "label" in value && "onClick" in value;
|
package/dist/bottom-cta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bottom-cta.js","sourceRoot":"","sources":["../src/bottom-cta.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"bottom-cta.js","sourceRoot":"","sources":["../src/bottom-cta.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,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C,CAAC,IAAI,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,2BAA2B,YAAE,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,KAAC,MAAM,IAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAC,WAAW,GAAG,CAAC,CAAC,CAAC,eAAe,GAAO,EACvL,cAAK,SAAS,EAAC,yBAAyB,YAAC,KAAC,MAAM,IAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAC,SAAS,GAAG,GAAM,IAC3F,IACF,CAAC;AACT,CAAC,CAAC,CAAC","sourcesContent":["import { bottomCtaRecipe } from \"@hjmds/design-contracts/recipes\";\nimport { isLargeTextScale } from \"@hjmds/design-contracts/components/design-system-provider\";\nimport { forwardRef, useContext, type CSSProperties, type HTMLAttributes, type MouseEventHandler, type ReactNode, type Ref } from \"react\";\nimport { Button, type ButtonSize, type ButtonTone } from \"./actions.js\";\nimport { classNames } from \"./internal.js\";\nimport { useOptionalHjmTheme } from \"./provider.js\";\nimport { ScreenFooterContext } from \"./internal/screen-footer.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type BottomCTAAction = Readonly<{\n label: string;\n onClick: MouseEventHandler<HTMLButtonElement>;\n accessibilityLabel?: string;\n disabled?: boolean;\n loading?: boolean;\n loadingLabel?: string;\n size?: ButtonSize;\n tone?: ButtonTone;\n /**\n * Ref to this action's button. The component `ref` names the bar; a dialog or overlay opened from the primary\n * action needs the button itself to return focus to on close (2026-10-18 Utilverse display board).\n */\n buttonRef?: Ref<HTMLButtonElement>;\n}>;\n\nexport type BottomCTAProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> & Readonly<{\n primaryAction: BottomCTAAction;\n secondaryAction?: BottomCTAAction | ReactNode;\n description?: string;\n accessibilityLabel?: string;\n safeAreaBottom?: number;\n /** Sticky remains in document flow; fixed overlays would need a measured content spacer. */\n position?: \"flow\" | \"sticky\";\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nfunction Action({ action, tone }: { action: BottomCTAAction; tone: ButtonTone }) {\n if (!action.label.trim()) throw new TypeError(\"BottomCTA action label must not be empty\");\n return <Button ref={action.buttonRef} onClick={action.onClick} tone={action.tone ?? tone} size={action.size ?? \"medium\"}\n disabled={action.disabled} loading={action.loading ?? false}\n aria-label={action.loading ? action.loadingLabel ?? action.accessibilityLabel ?? action.label : action.accessibilityLabel}>\n {action.label}\n </Button>;\n}\n\nfunction isAction(value: BottomCTAAction | ReactNode): value is BottomCTAAction {\n return typeof value === \"object\" && value !== null && \"label\" in value && \"onClick\" in value;\n}\n\n/** One primary action with optional supporting copy and a secondary action, matching Native's slots. */\nexport const BottomCTA = forwardRef<HTMLDivElement, BottomCTAProps>(function BottomCTA({\n primaryAction, secondaryAction, description, accessibilityLabel, safeAreaBottom = 0,\n position = \"flow\", className, style, layoutStyle, ...props\n}, ref) {\n const theme = useOptionalHjmTheme();\n const inScreenFooter = useContext(ScreenFooterContext);\n if (!Number.isFinite(safeAreaBottom) || safeAreaBottom < 0) throw new RangeError(\"BottomCTA safeAreaBottom must be non-negative\");\n return <div {...props} ref={ref} role=\"group\" aria-label={accessibilityLabel}\n className={classNames(\"hjm-bottom-cta\", className)} data-position={position}\n data-placement={inScreenFooter ? \"screen-footer\" : undefined}\n data-large-text={isLargeTextScale(theme?.environment.textScale ?? 1)}\n style={{\n \"--hjm-bottom-cta-min-height\": `${bottomCtaRecipe.minHeight}px`,\n \"--hjm-bottom-cta-padding-inline\": `${bottomCtaRecipe.paddingHorizontal}px`,\n \"--hjm-bottom-cta-padding-top\": `${bottomCtaRecipe.paddingTop}px`,\n \"--hjm-bottom-cta-padding-bottom\": `${bottomCtaRecipe.paddingBottom}px`,\n \"--hjm-bottom-cta-gap\": `${bottomCtaRecipe.gap}px`,\n \"--hjm-bottom-cta-content-max-width\": `${bottomCtaRecipe.contentMaxWidth}px`,\n \"--hjm-bottom-cta-safe-area\": `${safeAreaBottom}px`, ...style, ...layoutStyle,\n } as CSSProperties}>\n {description ? <p className=\"hjm-bottom-cta__description\">{description}</p> : null}\n <div className=\"hjm-bottom-cta__actions\">\n {secondaryAction == null ? null : <div className=\"hjm-bottom-cta__secondary\">{isAction(secondaryAction) ? <Action action={secondaryAction} tone=\"secondary\" /> : secondaryAction}</div>}\n <div className=\"hjm-bottom-cta__primary\"><Action action={primaryAction} tone=\"primary\" /></div>\n </div>\n </div>;\n});\n"]}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { type BottomNavigationActivation, type BottomNavigationConfiguration, type BottomNavigationDescriptor, type ResolvedBottomNavigationItemDescriptor } from "@hjmds/design-contracts/components/bottom-navigation";
|
|
2
2
|
import { type AnchorHTMLAttributes, type HTMLAttributes, type MouseEvent, type ReactElement, type ReactNode, type RefAttributes } from "react";
|
|
3
3
|
import type { HjmCompositionStyleProp } from "./composition-style.js";
|
|
4
|
+
export type BottomNavigationInsetProviderProps = Readonly<{
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}>;
|
|
7
|
+
/** Wrap the app shell that holds both the screens and the BottomNavigation. */
|
|
8
|
+
export declare function BottomNavigationInsetProvider({ children }: BottomNavigationInsetProviderProps): import("react").JSX.Element;
|
|
9
|
+
/**
|
|
10
|
+
* Bottom height covered by the BottomNavigation inside the nearest provider; 0 outside one. For layouts that are not
|
|
11
|
+
* a ScreenLayout: inside one the shell already pads by it, so adding it again doubles the space.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useBottomNavigationInset(): number;
|
|
4
14
|
export type BottomNavigationIconRenderProps<Key extends string = string, IconName extends string = string> = Readonly<{
|
|
5
15
|
item: ResolvedBottomNavigationItemDescriptor<Key, IconName>;
|
|
6
16
|
name: IconName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bottom-navigation.d.ts","sourceRoot":"","sources":["../src/bottom-navigation.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"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G,OAAO,CAOX;AAMD,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,OAAO,GAAG,YAAY,GACnC,MAAM,GAAG,SAAS,CAIpB;AAmPD,eAAO,MAAM,gBAAgB,EAAwC,CACnE,GAAG,SAAS,MAAM,GAAG,MAAM,EAC3B,QAAQ,SAAS,MAAM,GAAG,MAAM,EAEhC,KAAK,EAAE,qBAAqB,CAAC,GAAG,EAAE,QAAQ,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,KACrE,YAAY,GAAG,IAAI,CAAC"}
|
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { resolveBottomNavigationActivation, resolveBottomNavigationConfiguration, resolveBottomNavigationDescriptor, } from "@hjmds/design-contracts/components/bottom-navigation";
|
|
2
|
+
import { resolveBottomNavigationActivation, resolveBottomNavigationConfiguration, resolveBottomNavigationDescriptor, validateBottomNavigationProminence, } from "@hjmds/design-contracts/components/bottom-navigation";
|
|
3
3
|
import { bottomNavigationRecipe, iconRecipe, } from "@hjmds/design-contracts/recipes";
|
|
4
|
-
import { forwardRef, useEffect, useState, } from "react";
|
|
5
|
-
import { classNames } from "./internal.js";
|
|
4
|
+
import { createContext, forwardRef, useContext, useEffect, useMemo, useRef, useState, } from "react";
|
|
5
|
+
import { assignRef, classNames } from "./internal.js";
|
|
6
6
|
import { useOptionalHjmTheme } from "./provider.js";
|
|
7
7
|
const virtualKeyboardMinimumOcclusion = 120;
|
|
8
|
+
/**
|
|
9
|
+
* Height of the viewport bottom covered by the fixed bar (safe area and a raised center circle included); 0 when
|
|
10
|
+
* there is no bar or it is hidden for the keyboard. The provider also exposes it as `--hjm-bottom-navigation-inset`,
|
|
11
|
+
* which ScreenLayout's last region adds to its bottom padding, so products stop hand-keeping a bottom spacer
|
|
12
|
+
* (2026-10-18; Native shares the same API for its `placement="overlay"` bar).
|
|
13
|
+
*/
|
|
14
|
+
const BottomNavigationInsetContext = createContext(0);
|
|
15
|
+
const BottomNavigationInsetReporterContext = createContext(null);
|
|
16
|
+
/** Wrap the app shell that holds both the screens and the BottomNavigation. */
|
|
17
|
+
export function BottomNavigationInsetProvider({ children }) {
|
|
18
|
+
const [inset, setInset] = useState(0);
|
|
19
|
+
const report = useMemo(() => (height) => {
|
|
20
|
+
const next = Number.isFinite(height) && height > 0 ? height : 0;
|
|
21
|
+
setInset(current => current === next ? current : next);
|
|
22
|
+
}, []);
|
|
23
|
+
return (_jsx(BottomNavigationInsetReporterContext.Provider, { value: report, children: _jsx(BottomNavigationInsetContext.Provider, { value: inset, children: _jsx("div", { style: { display: "contents", "--hjm-bottom-navigation-inset": `${inset}px` }, children: children }) }) }));
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Bottom height covered by the BottomNavigation inside the nearest provider; 0 outside one. For layouts that are not
|
|
27
|
+
* a ScreenLayout: inside one the shell already pads by it, so adding it again doubles the space.
|
|
28
|
+
*/
|
|
29
|
+
export function useBottomNavigationInset() {
|
|
30
|
+
return useContext(BottomNavigationInsetContext);
|
|
31
|
+
}
|
|
8
32
|
export function isUnmodifiedPrimaryBottomNavigationClick(event) {
|
|
9
33
|
return (!event.defaultPrevented &&
|
|
10
34
|
event.button === 0 &&
|
|
@@ -64,14 +88,52 @@ function BottomNavigationInner({ descriptor, configuration = {}, getHref, render
|
|
|
64
88
|
...configuration,
|
|
65
89
|
...(direction === undefined ? {} : { direction }),
|
|
66
90
|
}, resolved.items.length);
|
|
91
|
+
validateBottomNavigationProminence(resolved.items, presentation);
|
|
67
92
|
const hidden = useKeyboardHidden(presentation.keyboardBehavior);
|
|
68
93
|
const density = bottomNavigationRecipe.density[presentation.density];
|
|
69
94
|
const presentationRecipe = bottomNavigationRecipe.presentations[presentation.presentation];
|
|
70
95
|
const centerGap = bottomNavigationRecipe.distributions[presentation.distribution].centerGap;
|
|
71
|
-
const iconSize =
|
|
96
|
+
const iconSize = presentation.iconSize === "standard"
|
|
97
|
+
? iconRecipe.sizes[density.icon]
|
|
98
|
+
: bottomNavigationRecipe.iconSizes[presentation.iconSize];
|
|
99
|
+
// `shape` reframes the floating surface (radius + inner padding); `standard` keeps the presentation recipe.
|
|
100
|
+
const shapeRecipe = presentation.shape === "standard"
|
|
101
|
+
? null
|
|
102
|
+
: bottomNavigationRecipe.shapes[presentation.shape];
|
|
103
|
+
const liftRecipe = bottomNavigationRecipe.icon.liftEmphasis;
|
|
104
|
+
const prominentRecipe = bottomNavigationRecipe.prominentDestination;
|
|
105
|
+
// Lifting by (diameter - indicator height) keeps the prominent label on the other labels' line; an app-icon
|
|
106
|
+
// slot taller than the indicator minimum raises that height.
|
|
107
|
+
const prominentLift = prominentRecipe.diameter - Math.max(bottomNavigationRecipe.indicator.minHeight, iconSize);
|
|
108
|
+
// The part of the circle above the nav box still covers content, so the reported inset includes it.
|
|
109
|
+
const prominentOverflow = resolved.items.some((item) => item.prominent)
|
|
110
|
+
? Math.max(0, prominentLift - density.padding - presentationRecipe.outerPaddingTop)
|
|
111
|
+
: 0;
|
|
112
|
+
const navRef = useRef(null);
|
|
113
|
+
const reportInset = useContext(BottomNavigationInsetReporterContext);
|
|
114
|
+
useEffect(() => {
|
|
115
|
+
const nav = navRef.current;
|
|
116
|
+
if (!reportInset)
|
|
117
|
+
return;
|
|
118
|
+
if (hidden || !nav) {
|
|
119
|
+
reportInset(0);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const update = () => reportInset(nav.getBoundingClientRect().height + prominentOverflow);
|
|
123
|
+
update();
|
|
124
|
+
const observer = new ResizeObserver(update);
|
|
125
|
+
observer.observe(nav);
|
|
126
|
+
return () => {
|
|
127
|
+
observer.disconnect();
|
|
128
|
+
reportInset(0);
|
|
129
|
+
};
|
|
130
|
+
}, [reportInset, hidden, prominentOverflow]);
|
|
72
131
|
if (hidden)
|
|
73
132
|
return null;
|
|
74
|
-
return (_jsx("nav", { ...props, ref:
|
|
133
|
+
return (_jsx("nav", { ...props, ref: (node) => {
|
|
134
|
+
navRef.current = node;
|
|
135
|
+
assignRef(ref, node);
|
|
136
|
+
}, "aria-label": resolved.accessibilityLabel, className: classNames("hjm-bottom-navigation", className), "data-expanded-labels": (theme?.environment.textScale ?? 1) >= 1.5 || resolved.items.length > 4 ? "true" : "false", "data-density": presentation.density, "data-distribution": presentation.distribution, "data-keyboard-behavior": presentation.keyboardBehavior, "data-labels": presentation.labels, "data-selection": presentation.selection, "data-surface": presentation.surface, "data-presentation": presentation.presentation, "data-shape": presentation.shape, "data-icon-emphasis": presentation.iconEmphasis, dir: presentation.direction, style: {
|
|
75
137
|
"--hjm-bottom-navigation-center-gap": `${centerGap}px`,
|
|
76
138
|
"--hjm-bottom-navigation-columns": resolved.items.length,
|
|
77
139
|
"--hjm-bottom-navigation-half-columns": resolved.items.length / 2,
|
|
@@ -87,6 +149,16 @@ function BottomNavigationInner({ descriptor, configuration = {}, getHref, render
|
|
|
87
149
|
: "none",
|
|
88
150
|
"--hjm-bottom-navigation-outer-inline": `${presentationRecipe.outerPaddingHorizontal}px`,
|
|
89
151
|
"--hjm-bottom-navigation-outer-top": `${presentationRecipe.outerPaddingTop}px`,
|
|
152
|
+
"--hjm-bottom-navigation-prominent-diameter": `${prominentRecipe.diameter}px`,
|
|
153
|
+
"--hjm-bottom-navigation-prominent-lift": `${prominentLift}px`,
|
|
154
|
+
...(shapeRecipe ? {
|
|
155
|
+
"--hjm-bottom-navigation-shape-radius": `var(--hjm-radius-${shapeRecipe.radius})`,
|
|
156
|
+
"--hjm-bottom-navigation-shape-padding": `${shapeRecipe.surfacePadding}px`,
|
|
157
|
+
} : {}),
|
|
158
|
+
...(presentation.iconEmphasis === "lift" ? {
|
|
159
|
+
"--hjm-bottom-navigation-lift-offset": `${liftRecipe.translateY}px`,
|
|
160
|
+
"--hjm-bottom-navigation-lift-idle-opacity": liftRecipe.idleOpacity,
|
|
161
|
+
} : {}),
|
|
90
162
|
...style,
|
|
91
163
|
...layoutStyle,
|
|
92
164
|
}, children: _jsxs("div", { className: "hjm-bottom-navigation__surface", children: [_jsx("ul", { className: "hjm-bottom-navigation__list", children: resolved.items.map((item, index) => {
|
|
@@ -96,7 +168,7 @@ function BottomNavigationInner({ descriptor, configuration = {}, getHref, render
|
|
|
96
168
|
name: item.icon.name,
|
|
97
169
|
selected,
|
|
98
170
|
color: "currentColor",
|
|
99
|
-
size: iconSize,
|
|
171
|
+
size: item.prominent ? iconRecipe.sizes[prominentRecipe.icon] : iconSize,
|
|
100
172
|
strokeWidth: selected
|
|
101
173
|
? bottomNavigationRecipe.icon.selectedEmphasis.strokeWidth.selected
|
|
102
174
|
: bottomNavigationRecipe.icon.selectedEmphasis.strokeWidth.idle,
|
|
@@ -108,7 +180,7 @@ function BottomNavigationInner({ descriptor, configuration = {}, getHref, render
|
|
|
108
180
|
gridColumn: getBottomNavigationGridColumn(index, resolved.items.length, presentation.distribution),
|
|
109
181
|
};
|
|
110
182
|
if (item.disabled) {
|
|
111
|
-
return (_jsx("li", { style: itemStyle, "data-selected": "false", children: _jsx("span", { "aria-disabled": "true", "aria-label": item.resolvedAccessibilityLabel, className: "hjm-bottom-navigation__item", "data-state": "disabled", role: "link", children: content }) }, item.id));
|
|
183
|
+
return (_jsx("li", { style: itemStyle, "data-selected": "false", "data-prominent": item.prominent || undefined, children: _jsx("span", { "aria-disabled": "true", "aria-label": item.resolvedAccessibilityLabel, className: "hjm-bottom-navigation__item", "data-state": "disabled", role: "link", children: content }) }, item.id));
|
|
112
184
|
}
|
|
113
185
|
const href = getHref(item);
|
|
114
186
|
if (!href.trim()) {
|
|
@@ -129,7 +201,7 @@ function BottomNavigationInner({ descriptor, configuration = {}, getHref, render
|
|
|
129
201
|
},
|
|
130
202
|
children: content,
|
|
131
203
|
};
|
|
132
|
-
return (_jsx("li", { style: itemStyle, "data-selected": selected, children: renderLink ? renderLink(linkProps) : _jsx("a", { ...linkProps }) }, item.id));
|
|
204
|
+
return (_jsx("li", { style: itemStyle, "data-selected": selected, "data-prominent": item.prominent || undefined, children: renderLink ? renderLink(linkProps) : _jsx("a", { ...linkProps }) }, item.id));
|
|
133
205
|
}) }), primaryAction ? (_jsx("div", { className: "hjm-bottom-navigation__primary-action", children: primaryAction })) : null] }) }));
|
|
134
206
|
}
|
|
135
207
|
export const BottomNavigation = forwardRef(BottomNavigationInner);
|