@hjmds/react 1.27.1 → 1.28.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/actions.d.ts +26 -4
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +4 -4
- package/dist/actions.js.map +1 -1
- package/dist/auth-screen.d.ts +32 -2
- package/dist/auth-screen.d.ts.map +1 -1
- package/dist/auth-screen.js +52 -4
- package/dist/auth-screen.js.map +1 -1
- package/dist/chart.d.ts +1 -1
- package/dist/chart.js.map +1 -1
- package/dist/collection-editing.d.ts.map +1 -1
- package/dist/collection-editing.js +5 -4
- package/dist/collection-editing.js.map +1 -1
- package/dist/communication.js +1 -1
- package/dist/communication.js.map +1 -1
- package/dist/data-table.d.ts +2 -2
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js.map +1 -1
- package/dist/display.d.ts.map +1 -1
- package/dist/display.js +9 -3
- package/dist/display.js.map +1 -1
- package/dist/evidence.d.ts +1 -1
- package/dist/evidence.js +2 -2
- package/dist/evidence.js.map +1 -1
- package/dist/feedback.d.ts +10 -0
- package/dist/feedback.d.ts.map +1 -1
- package/dist/feedback.js +6 -1
- package/dist/feedback.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/list-row-scroll-room.d.ts +16 -0
- package/dist/internal/list-row-scroll-room.d.ts.map +1 -0
- package/dist/internal/list-row-scroll-room.js +17 -0
- package/dist/internal/list-row-scroll-room.js.map +1 -0
- package/dist/internal/screen-exit.d.ts.map +1 -1
- package/dist/internal/screen-exit.js +2 -1
- package/dist/internal/screen-exit.js.map +1 -1
- package/dist/notification-bell.d.ts +4 -1
- package/dist/notification-bell.d.ts.map +1 -1
- package/dist/notification-bell.js +5 -2
- package/dist/notification-bell.js.map +1 -1
- package/dist/overlays.js +2 -2
- package/dist/overlays.js.map +1 -1
- package/dist/saved-items.js +1 -1
- package/dist/saved-items.js.map +1 -1
- package/dist/screen-flows.d.ts +2 -2
- package/dist/screen-flows.d.ts.map +1 -1
- package/dist/screen-flows.js +14 -13
- package/dist/screen-flows.js.map +1 -1
- package/dist/screens.d.ts +1 -1
- package/dist/screens.d.ts.map +1 -1
- package/dist/screens.js +2 -2
- package/dist/screens.js.map +1 -1
- package/dist/selection.d.ts.map +1 -1
- package/dist/selection.js +2 -2
- package/dist/selection.js.map +1 -1
- package/dist/styles.css +271 -125
- package/dist/styles.layered.css +271 -125
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +40 -4
- package/dist/theme.js.map +1 -1
- package/dist/toast.d.ts.map +1 -1
- package/dist/toast.js +4 -1
- package/dist/toast.js.map +1 -1
- package/dist/top.js +1 -1
- package/dist/top.js.map +1 -1
- package/dist/upload-item.d.ts.map +1 -1
- package/dist/upload-item.js +1 -1
- package/dist/upload-item.js.map +1 -1
- package/dist/virtual-list.d.ts.map +1 -1
- package/dist/virtual-list.js +5 -1
- package/dist/virtual-list.js.map +1 -1
- package/package.json +3 -3
package/dist/actions.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type ButtonAlign, type ButtonShape, type ButtonSize, type ButtonTone } from "@hjmds/design-contracts/recipes/base";
|
|
2
|
-
export type { ButtonAlign, ButtonShape };
|
|
3
|
-
import { type IconButtonShape, type IconButtonSize, type IconButtonTone, type LinkTone, type LinkVariant } from "@hjmds/design-contracts/recipes";
|
|
1
|
+
import { type ButtonAlign, type ButtonEdge, type ButtonShape, type ButtonSize, type ButtonTone } from "@hjmds/design-contracts/recipes/base";
|
|
2
|
+
export type { ButtonAlign, ButtonEdge, ButtonShape };
|
|
3
|
+
import { type IconButtonEdge, type IconButtonShape, type IconButtonSize, type IconButtonTone, type LinkTone, type LinkVariant } from "@hjmds/design-contracts/recipes";
|
|
4
4
|
import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type ForwardedRef, type ReactElement, type ReactNode } from "react";
|
|
5
5
|
export type { ButtonSize, ButtonTone } from "@hjmds/design-contracts/recipes/base";
|
|
6
|
-
export type { IconButtonShape, IconButtonSize, IconButtonTone, } from "@hjmds/design-contracts/recipes";
|
|
6
|
+
export type { IconButtonEdge, IconButtonShape, IconButtonSize, IconButtonTone, } from "@hjmds/design-contracts/recipes";
|
|
7
7
|
import type { HjmCompositionStyleProp } from "./composition-style.js";
|
|
8
8
|
export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & Readonly<{
|
|
9
9
|
tone?: ButtonTone;
|
|
@@ -22,6 +22,11 @@ export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & Readonly<{
|
|
|
22
22
|
}>;
|
|
23
23
|
leading?: ReactNode;
|
|
24
24
|
trailing?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Container edge(s) this button sits on. A ghost button overhangs that edge by its inline padding so the label
|
|
27
|
+
* or trailing glyph lines up with the container inset (`resolveButtonEdgeOverhang`); framed tones keep their frame.
|
|
28
|
+
*/
|
|
29
|
+
edge?: ButtonEdge;
|
|
25
30
|
/** Canonical layout-only placement. Controlled visual keys are excluded. */
|
|
26
31
|
layoutStyle?: HjmCompositionStyleProp;
|
|
27
32
|
}>;
|
|
@@ -42,6 +47,11 @@ export declare const Button: import("react").ForwardRefExoticComponent<ButtonHTM
|
|
|
42
47
|
}>;
|
|
43
48
|
leading?: ReactNode;
|
|
44
49
|
trailing?: ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* Container edge(s) this button sits on. A ghost button overhangs that edge by its inline padding so the label
|
|
52
|
+
* or trailing glyph lines up with the container inset (`resolveButtonEdgeOverhang`); framed tones keep their frame.
|
|
53
|
+
*/
|
|
54
|
+
edge?: ButtonEdge;
|
|
45
55
|
/** Canonical layout-only placement. Controlled visual keys are excluded. */
|
|
46
56
|
layoutStyle?: HjmCompositionStyleProp;
|
|
47
57
|
}> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -53,6 +63,12 @@ export type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "ari
|
|
|
53
63
|
/** Toggle state. Paints the selected treatment and sets `aria-pressed`. */
|
|
54
64
|
selected?: boolean;
|
|
55
65
|
loading?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Container edge(s) this button sits on (logical, RTL-aware). A ghost button keeps its touch target but overhangs
|
|
68
|
+
* the edge by (diameter − glyph slot) / 2 so the glyph slot lines up with the container inset
|
|
69
|
+
* (`resolveIconButtonEdgeOverhang`, 2026-10-17 measured audit). Framed tones align their frame and do not move.
|
|
70
|
+
*/
|
|
71
|
+
edge?: IconButtonEdge;
|
|
56
72
|
children: ReactNode;
|
|
57
73
|
/** Canonical layout-only placement. Controlled visual keys are excluded. */
|
|
58
74
|
layoutStyle?: HjmCompositionStyleProp;
|
|
@@ -65,6 +81,12 @@ export declare const IconButton: import("react").ForwardRefExoticComponent<Omit<
|
|
|
65
81
|
/** Toggle state. Paints the selected treatment and sets `aria-pressed`. */
|
|
66
82
|
selected?: boolean;
|
|
67
83
|
loading?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Container edge(s) this button sits on (logical, RTL-aware). A ghost button keeps its touch target but overhangs
|
|
86
|
+
* the edge by (diameter − glyph slot) / 2 so the glyph slot lines up with the container inset
|
|
87
|
+
* (`resolveIconButtonEdgeOverhang`, 2026-10-17 measured audit). Framed tones align their frame and do not move.
|
|
88
|
+
*/
|
|
89
|
+
edge?: IconButtonEdge;
|
|
68
90
|
children: ReactNode;
|
|
69
91
|
/** Canonical layout-only placement. Controlled visual keys are excluded. */
|
|
70
92
|
layoutStyle?: HjmCompositionStyleProp;
|
package/dist/actions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EAChB,MAA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E;kBAChE,uBAAuB;sDA0DxC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GACnE,QAAQ,CAAC;IACP,QAAQ,EAAE,SAAS,CAAC;IACpB,GAAG,EAAE,YAAY,CAAC,iBAAiB,CAAC,CAAC;IACrC,WAAW,EAAE,QAAQ,CAAC;IACtB,cAAc,EAAE,WAAW,CAAC;IAC5B,YAAY,EAAE,UAAU,GAAG,MAAM,CAAC;CACnC,CAAC,CAAC;AAEL,MAAM,MAAM,SAAS,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAC7D,QAAQ,CAAC;IACP,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,6FAA6F;IAC7F,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,YAAY,CAAC;IACxD,gGAAgG;IAChG,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACvC,CAAC,CAAC;AAEL,eAAO,MAAM,IAAI;WAXN,QAAQ;cACL,WAAW;eACV,OAAO;cACR,SAAS;eACR,SAAS;IACpB,6FAA6F;mBAC9E,CAAC,KAAK,EAAE,eAAe,KAAK,YAAY;IACvD,gGAAgG;kBAClF,uBAAuB;sDAqDvC,CAAC"}
|
package/dist/actions.js
CHANGED
|
@@ -3,7 +3,7 @@ import { buttonRecipe, } from "@hjmds/design-contracts/recipes/base";
|
|
|
3
3
|
import { iconButtonRecipe, linkRecipe, } from "@hjmds/design-contracts/recipes";
|
|
4
4
|
import { Children, forwardRef, } from "react";
|
|
5
5
|
import { classNames } from "./internal.js";
|
|
6
|
-
export const Button = forwardRef(function Button({ tone = buttonRecipe.defaults.tone, size = buttonRecipe.defaults.size, shape = buttonRecipe.defaults.shape, align = buttonRecipe.defaults.align, selected, loading = false, completion, leading, trailing, disabled, onClick, type = "button", className, children, layoutStyle, style, ...props }, ref) {
|
|
6
|
+
export const Button = forwardRef(function Button({ tone = buttonRecipe.defaults.tone, size = buttonRecipe.defaults.size, shape = buttonRecipe.defaults.shape, align = buttonRecipe.defaults.align, selected, loading = false, completion, leading, trailing, edge, disabled, onClick, type = "button", className, children, layoutStyle, style, ...props }, ref) {
|
|
7
7
|
const textParts = completion ? Children.toArray(children) : [];
|
|
8
8
|
if (completion && (!completion.label.trim() || typeof completion.confirmed !== "boolean" || textParts.length === 0 || !textParts.every(part => typeof part === "string" || typeof part === "number"))) {
|
|
9
9
|
throw new TypeError("Button completion requires a nonempty label, a boolean confirmed value and text-only children");
|
|
@@ -23,9 +23,9 @@ export const Button = forwardRef(function Button({ tone = buttonRecipe.defaults.
|
|
|
23
23
|
};
|
|
24
24
|
return (_jsxs("button", { ...props,
|
|
25
25
|
// The cap lives in the recipe, not in the stylesheet: one number, one place.
|
|
26
|
-
style: { "--hjm-button-label-lines": buttonRecipe.label.maxLines, ...style, ...layoutStyle }, ref: ref, type: type, className: classNames("hjm-button", className), "data-tone": tone, "data-size": size, "data-shape": shape, "data-align": align, ...(selected === undefined ? {} : { "data-selected": selected, "aria-pressed": selected }), "data-state": loading ? "loading" : unavailable ? "disabled" : "idle", "aria-busy": loading || undefined, "aria-disabled": unavailable || undefined, disabled: disabled, onClick: handleClick, children: [leading, completion ? _jsxs("span", { style: { display: "inline-grid", minWidth: 0 }, children: [_jsx("span", { "aria-hidden": "true", className: "hjm-button__label", style: { gridArea: "1 / 1", visibility: "hidden" }, children: idleLabel }), _jsx("span", { "aria-hidden": "true", className: "hjm-button__label", style: { gridArea: "1 / 1", visibility: "hidden" }, children: completion.label }), _jsx("span", { className: "hjm-button__label", style: { gridArea: "1 / 1", alignSelf: "center" }, children: currentLabel })] }) : _jsx("span", { className: "hjm-button__label", children: children }), trailing, loading ? _jsx("span", { className: "hjm-button__loading-indicator", "aria-hidden": "true", children: _jsx("span", { className: "hjm-button__spinner" }) }) : null] }));
|
|
26
|
+
style: { "--hjm-button-label-lines": buttonRecipe.label.maxLines, ...style, ...layoutStyle }, ref: ref, type: type, className: classNames("hjm-button", className), "data-tone": tone, "data-size": size, "data-shape": shape, "data-align": align, "data-edge": edge, ...(selected === undefined ? {} : { "data-selected": selected, "aria-pressed": selected }), "data-state": loading ? "loading" : unavailable ? "disabled" : "idle", "aria-busy": loading || undefined, "aria-disabled": unavailable || undefined, disabled: disabled, onClick: handleClick, children: [leading, completion ? _jsxs("span", { style: { display: "inline-grid", minWidth: 0 }, children: [_jsx("span", { "aria-hidden": "true", className: "hjm-button__label", style: { gridArea: "1 / 1", visibility: "hidden" }, children: idleLabel }), _jsx("span", { "aria-hidden": "true", className: "hjm-button__label", style: { gridArea: "1 / 1", visibility: "hidden" }, children: completion.label }), _jsx("span", { className: "hjm-button__label", style: { gridArea: "1 / 1", alignSelf: "center" }, children: currentLabel })] }) : _jsx("span", { className: "hjm-button__label", children: children }), trailing, loading ? _jsx("span", { className: "hjm-button__loading-indicator", "aria-hidden": "true", children: _jsx("span", { className: "hjm-button__spinner" }) }) : null] }));
|
|
27
27
|
});
|
|
28
|
-
export const IconButton = forwardRef(function IconButton({ label, tone = iconButtonRecipe.defaults.tone, size = iconButtonRecipe.defaults.size, shape = iconButtonRecipe.defaults.shape, selected, loading = false, disabled, onClick, type = "button", className, children, layoutStyle, style, ...props }, ref) {
|
|
28
|
+
export const IconButton = forwardRef(function IconButton({ label, tone = iconButtonRecipe.defaults.tone, size = iconButtonRecipe.defaults.size, shape = iconButtonRecipe.defaults.shape, selected, loading = false, edge, disabled, onClick, type = "button", className, children, layoutStyle, style, ...props }, ref) {
|
|
29
29
|
// Preserve a focusable disabled action (e.g. a Carousel boundary).
|
|
30
30
|
const ariaDisabled = props["aria-disabled"] === true || props["aria-disabled"] === "true";
|
|
31
31
|
const unavailable = disabled === true || loading || ariaDisabled;
|
|
@@ -37,7 +37,7 @@ export const IconButton = forwardRef(function IconButton({ label, tone = iconBut
|
|
|
37
37
|
}
|
|
38
38
|
onClick?.(event);
|
|
39
39
|
};
|
|
40
|
-
return (_jsx("button", { ...props, style: { ...style, ...layoutStyle }, ref: ref, type: type, className: classNames("hjm-icon-button", className), "data-tone": tone, "data-size": size, "data-shape": shape, ...(selected === undefined ? {} : { "data-selected": selected, "aria-pressed": selected }), "data-state": loading ? "loading" : unavailable ? "disabled" : "idle", "aria-label": label, "aria-busy": loading || undefined, "aria-disabled": unavailable || undefined, disabled: disabled, onClick: handleClick, children: loading ? _jsx("span", { className: "hjm-button__spinner", "aria-hidden": "true" }) : children }));
|
|
40
|
+
return (_jsx("button", { ...props, style: { ...style, ...layoutStyle }, ref: ref, type: type, className: classNames("hjm-icon-button", className), "data-tone": tone, "data-size": size, "data-shape": shape, "data-edge": edge, ...(selected === undefined ? {} : { "data-selected": selected, "aria-pressed": selected }), "data-state": loading ? "loading" : unavailable ? "disabled" : "idle", "aria-label": label, "aria-busy": loading || undefined, "aria-disabled": unavailable || undefined, disabled: disabled, onClick: handleClick, children: loading ? _jsx("span", { className: "hjm-button__spinner", "aria-hidden": "true" }) : children }));
|
|
41
41
|
});
|
|
42
42
|
export const Link = forwardRef(function Link({ tone = linkRecipe.defaults.tone, variant = linkRecipe.defaults.variant, disabled = false, leading, trailing, renderAnchor, target, rel, tabIndex, onClick, className, children, layoutStyle, ...props }, ref) {
|
|
43
43
|
const handleClick = (event) => {
|
package/dist/actions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../src/actions.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,YAAY,GAKb,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EACL,gBAAgB,EAChB,UAAU,GAMX,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,QAAQ,EACR,UAAU,GAQX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,C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ize,\n type ButtonTone,\n} from \"@hjmds/design-contracts/recipes/base\";\n\nexport type { ButtonAlign, ButtonShape };\nimport {\n iconButtonRecipe,\n linkRecipe,\n type IconButtonShape,\n type IconButtonSize,\n type IconButtonTone,\n type LinkTone,\n type LinkVariant,\n} from \"@hjmds/design-contracts/recipes\";\nimport {\n Children,\n forwardRef,\n type AnchorHTMLAttributes,\n type CSSProperties,\n type ButtonHTMLAttributes,\n type ForwardedRef,\n type MouseEvent,\n type ReactElement,\n type ReactNode,\n} from \"react\";\nimport { classNames } from \"./internal.js\";\n\nexport type { ButtonSize, ButtonTone } from \"@hjmds/design-contracts/recipes/base\";\nexport type {\n IconButtonShape,\n IconButtonSize,\n IconButtonTone,\n} from \"@hjmds/design-contracts/recipes\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &\n Readonly<{\n tone?: ButtonTone;\n size?: ButtonSize;\n /** Frame geometry. `pill` replaces product code that overrode `border-radius`. */\n shape?: ButtonShape;\n /** Label placement inside the frame; `leading` suits a full-width row action. */\n align?: ButtonAlign;\n /** Toggle state. Paints the selected treatment and sets `aria-pressed`. */\n selected?: boolean;\n loading?: boolean;\n /** Explicit confirmed mutation result. Both text labels remain measured in every state. */\n completion?: Readonly<{ confirmed: boolean; label: string }>;\n leading?: ReactNode;\n trailing?: ReactNode;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n tone = buttonRecipe.defaults.tone,\n size = buttonRecipe.defaults.size,\n shape = buttonRecipe.defaults.shape,\n align = buttonRecipe.defaults.align,\n selected,\n loading = false,\n completion,\n leading,\n trailing,\n disabled,\n onClick,\n type = \"button\",\n className,\n children,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n const textParts = completion ? Children.toArray(children) : [];\n if (completion && (!completion.label.trim() || typeof completion.confirmed !== \"boolean\" || textParts.length === 0 || !textParts.every(part => typeof part === \"string\" || typeof part === \"number\"))) {\n throw new TypeError(\"Button completion requires a nonempty label, a boolean confirmed value and text-only children\");\n }\n const idleLabel = completion ? textParts.join(\"\") : children;\n const currentLabel = completion?.confirmed && !loading ? completion.label : idleLabel;\n // Preserve a focusable disabled action (e.g. a Carousel boundary).\n const ariaDisabled = props[\"aria-disabled\"] === true || props[\"aria-disabled\"] === \"true\";\n const unavailable = disabled === true || loading || ariaDisabled;\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (unavailable) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n onClick?.(event);\n };\n return (\n <button\n {...props}\n // The cap lives in the recipe, not in the stylesheet: one number, one place.\n style={{ \"--hjm-button-label-lines\": buttonRecipe.label.maxLines, ...style, ...layoutStyle } as CSSProperties}\n ref={ref}\n type={type}\n className={classNames(\"hjm-button\", className)}\n data-tone={tone}\n data-size={size}\n data-shape={shape}\n data-align={align}\n {...(selected === undefined ? {} : { \"data-selected\": selected, \"aria-pressed\": selected })}\n data-state={loading ? \"loading\" : unavailable ? \"disabled\" : \"idle\"}\n aria-busy={loading || undefined}\n aria-disabled={unavailable || undefined}\n disabled={disabled}\n onClick={handleClick}\n >\n {leading}\n {completion ? <span style={{ display: \"inline-grid\", minWidth: 0 }}>\n {/* Both labels contribute intrinsic dimensions, including wrapping/font changes. */}\n <span aria-hidden=\"true\" className=\"hjm-button__label\" style={{ gridArea: \"1 / 1\", visibility: \"hidden\" }}>{idleLabel}</span>\n <span aria-hidden=\"true\" className=\"hjm-button__label\" style={{ gridArea: \"1 / 1\", visibility: \"hidden\" }}>{completion.label}</span>\n <span className=\"hjm-button__label\" style={{ gridArea: \"1 / 1\", alignSelf: \"center\" }}>{currentLabel}</span>\n </span> : <span className=\"hjm-button__label\">{children}</span>}\n {trailing}\n {loading ? <span className=\"hjm-button__loading-indicator\" aria-hidden=\"true\"><span className=\"hjm-button__spinner\" /></span> : null}\n </button>\n );\n});\n\nexport type IconButtonProps = Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n \"aria-label\"\n> &\n Readonly<{\n label: string;\n tone?: IconButtonTone;\n size?: IconButtonSize;\n shape?: IconButtonShape;\n /** Toggle state. Paints the selected treatment and sets `aria-pressed`. */\n selected?: boolean;\n loading?: boolean;\n children: ReactNode;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n function IconButton(\n {\n label,\n tone = iconButtonRecipe.defaults.tone,\n size = iconButtonRecipe.defaults.size,\n shape = iconButtonRecipe.defaults.shape,\n selected,\n loading = false,\n disabled,\n onClick,\n type = \"button\",\n className,\n children,\n layoutStyle,\n style,\n ...props\n },\n ref,\n ) {\n // Preserve a focusable disabled action (e.g. a Carousel boundary).\n const ariaDisabled = props[\"aria-disabled\"] === true || props[\"aria-disabled\"] === \"true\";\n const unavailable = disabled === true || loading || ariaDisabled;\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (unavailable) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n onClick?.(event);\n };\n return (\n <button\n {...props}\n style={{ ...style, ...layoutStyle }}\n ref={ref}\n type={type}\n className={classNames(\"hjm-icon-button\", className)}\n data-tone={tone}\n data-size={size}\n data-shape={shape}\n {...(selected === undefined ? {} : { \"data-selected\": selected, \"aria-pressed\": selected })}\n data-state={loading ? \"loading\" : unavailable ? \"disabled\" : \"idle\"}\n aria-label={label}\n aria-busy={loading || undefined}\n aria-disabled={unavailable || undefined}\n disabled={disabled}\n onClick={handleClick}\n >\n {loading ? <span className=\"hjm-button__spinner\" aria-hidden=\"true\" /> : children}\n </button>\n );\n },\n);\n\nexport type LinkRenderProps = AnchorHTMLAttributes<HTMLAnchorElement> &\n Readonly<{\n children: ReactNode;\n ref: ForwardedRef<HTMLAnchorElement>;\n \"data-tone\": LinkTone;\n \"data-variant\": LinkVariant;\n \"data-state\": \"disabled\" | \"idle\";\n }>;\n\nexport type LinkProps = AnchorHTMLAttributes<HTMLAnchorElement> &\n Readonly<{\n tone?: LinkTone;\n variant?: LinkVariant;\n disabled?: boolean;\n leading?: ReactNode;\n trailing?: ReactNode;\n /** Framework adapter, for example Next.js Link, while HJM keeps link semantics and state. */\n renderAnchor?: (props: LinkRenderProps) => ReactElement;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(function Link(\n {\n tone = linkRecipe.defaults.tone,\n variant = linkRecipe.defaults.variant,\n disabled = false,\n leading,\n trailing,\n renderAnchor,\n target,\n rel,\n tabIndex,\n onClick,\n className,\n children,\n layoutStyle,\n ...props\n },\n ref,\n) {\n const handleClick = (event: MouseEvent<HTMLAnchorElement>) => {\n if (disabled) {\n event.preventDefault();\n return;\n }\n onClick?.(event);\n };\n const anchorProps: LinkRenderProps = {\n ...props,\n // `renderAnchor` adapters receive the merged placement, so a framework Link\n // gets the same position as the plain <a>.\n ...(props.style === undefined && layoutStyle === undefined ? {} : { style: { ...props.style, ...layoutStyle } }),\n ref,\n className: classNames(\"hjm-link\", className),\n \"data-tone\": tone,\n \"data-variant\": variant,\n \"data-state\": disabled ? \"disabled\" : \"idle\",\n \"aria-disabled\": disabled || undefined,\n tabIndex: disabled ? -1 : tabIndex,\n target,\n rel: rel ?? (target === \"_blank\" ? \"noreferrer noopener\" : undefined),\n onClick: handleClick,\n children: (\n <>\n {leading}\n <span>{children}</span>\n {trailing}\n </>\n ),\n };\n return renderAnchor ? renderAnchor(anchorProps) : <a {...anchorProps} />;\n});\n"]}
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../src/actions.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,YAAY,GAMb,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EACL,gBAAgB,EAChB,UAAU,GAOX,MAA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,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,eAAO,WAAW,GAAI,CAAC;AAC3E,CAAC,CAAC,CAAC","sourcesContent":["import {\n buttonRecipe,\n type ButtonAlign,\n type ButtonEdge,\n type ButtonShape,\n type ButtonSize,\n type ButtonTone,\n} from \"@hjmds/design-contracts/recipes/base\";\n\nexport type { ButtonAlign, ButtonEdge, ButtonShape };\nimport {\n iconButtonRecipe,\n linkRecipe,\n type IconButtonEdge,\n type IconButtonShape,\n type IconButtonSize,\n type IconButtonTone,\n type LinkTone,\n type LinkVariant,\n} from \"@hjmds/design-contracts/recipes\";\nimport {\n Children,\n forwardRef,\n type AnchorHTMLAttributes,\n type CSSProperties,\n type ButtonHTMLAttributes,\n type ForwardedRef,\n type MouseEvent,\n type ReactElement,\n type ReactNode,\n} from \"react\";\nimport { classNames } from \"./internal.js\";\n\nexport type { ButtonSize, ButtonTone } from \"@hjmds/design-contracts/recipes/base\";\nexport type {\n IconButtonEdge,\n IconButtonShape,\n IconButtonSize,\n IconButtonTone,\n} from \"@hjmds/design-contracts/recipes\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &\n Readonly<{\n tone?: ButtonTone;\n size?: ButtonSize;\n /** Frame geometry. `pill` replaces product code that overrode `border-radius`. */\n shape?: ButtonShape;\n /** Label placement inside the frame; `leading` suits a full-width row action. */\n align?: ButtonAlign;\n /** Toggle state. Paints the selected treatment and sets `aria-pressed`. */\n selected?: boolean;\n loading?: boolean;\n /** Explicit confirmed mutation result. Both text labels remain measured in every state. */\n completion?: Readonly<{ confirmed: boolean; label: string }>;\n leading?: ReactNode;\n trailing?: ReactNode;\n /**\n * Container edge(s) this button sits on. A ghost button overhangs that edge by its inline padding so the label\n * or trailing glyph lines up with the container inset (`resolveButtonEdgeOverhang`); framed tones keep their frame.\n */\n edge?: ButtonEdge;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n tone = buttonRecipe.defaults.tone,\n size = buttonRecipe.defaults.size,\n shape = buttonRecipe.defaults.shape,\n align = buttonRecipe.defaults.align,\n selected,\n loading = false,\n completion,\n leading,\n trailing,\n edge,\n disabled,\n onClick,\n type = \"button\",\n className,\n children,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n const textParts = completion ? Children.toArray(children) : [];\n if (completion && (!completion.label.trim() || typeof completion.confirmed !== \"boolean\" || textParts.length === 0 || !textParts.every(part => typeof part === \"string\" || typeof part === \"number\"))) {\n throw new TypeError(\"Button completion requires a nonempty label, a boolean confirmed value and text-only children\");\n }\n const idleLabel = completion ? textParts.join(\"\") : children;\n const currentLabel = completion?.confirmed && !loading ? completion.label : idleLabel;\n // Preserve a focusable disabled action (e.g. a Carousel boundary).\n const ariaDisabled = props[\"aria-disabled\"] === true || props[\"aria-disabled\"] === \"true\";\n const unavailable = disabled === true || loading || ariaDisabled;\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (unavailable) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n onClick?.(event);\n };\n return (\n <button\n {...props}\n // The cap lives in the recipe, not in the stylesheet: one number, one place.\n style={{ \"--hjm-button-label-lines\": buttonRecipe.label.maxLines, ...style, ...layoutStyle } as CSSProperties}\n ref={ref}\n type={type}\n className={classNames(\"hjm-button\", className)}\n data-tone={tone}\n data-size={size}\n data-shape={shape}\n data-align={align}\n data-edge={edge}\n {...(selected === undefined ? {} : { \"data-selected\": selected, \"aria-pressed\": selected })}\n data-state={loading ? \"loading\" : unavailable ? \"disabled\" : \"idle\"}\n aria-busy={loading || undefined}\n aria-disabled={unavailable || undefined}\n disabled={disabled}\n onClick={handleClick}\n >\n {leading}\n {completion ? <span style={{ display: \"inline-grid\", minWidth: 0 }}>\n {/* Both labels contribute intrinsic dimensions, including wrapping/font changes. */}\n <span aria-hidden=\"true\" className=\"hjm-button__label\" style={{ gridArea: \"1 / 1\", visibility: \"hidden\" }}>{idleLabel}</span>\n <span aria-hidden=\"true\" className=\"hjm-button__label\" style={{ gridArea: \"1 / 1\", visibility: \"hidden\" }}>{completion.label}</span>\n <span className=\"hjm-button__label\" style={{ gridArea: \"1 / 1\", alignSelf: \"center\" }}>{currentLabel}</span>\n </span> : <span className=\"hjm-button__label\">{children}</span>}\n {trailing}\n {loading ? <span className=\"hjm-button__loading-indicator\" aria-hidden=\"true\"><span className=\"hjm-button__spinner\" /></span> : null}\n </button>\n );\n});\n\nexport type IconButtonProps = Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n \"aria-label\"\n> &\n Readonly<{\n label: string;\n tone?: IconButtonTone;\n size?: IconButtonSize;\n shape?: IconButtonShape;\n /** Toggle state. Paints the selected treatment and sets `aria-pressed`. */\n selected?: boolean;\n loading?: boolean;\n /**\n * Container edge(s) this button sits on (logical, RTL-aware). A ghost button keeps its touch target but overhangs\n * the edge by (diameter − glyph slot) / 2 so the glyph slot lines up with the container inset\n * (`resolveIconButtonEdgeOverhang`, 2026-10-17 measured audit). Framed tones align their frame and do not move.\n */\n edge?: IconButtonEdge;\n children: ReactNode;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n function IconButton(\n {\n label,\n tone = iconButtonRecipe.defaults.tone,\n size = iconButtonRecipe.defaults.size,\n shape = iconButtonRecipe.defaults.shape,\n selected,\n loading = false,\n edge,\n disabled,\n onClick,\n type = \"button\",\n className,\n children,\n layoutStyle,\n style,\n ...props\n },\n ref,\n ) {\n // Preserve a focusable disabled action (e.g. a Carousel boundary).\n const ariaDisabled = props[\"aria-disabled\"] === true || props[\"aria-disabled\"] === \"true\";\n const unavailable = disabled === true || loading || ariaDisabled;\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (unavailable) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n onClick?.(event);\n };\n return (\n <button\n {...props}\n style={{ ...style, ...layoutStyle }}\n ref={ref}\n type={type}\n className={classNames(\"hjm-icon-button\", className)}\n data-tone={tone}\n data-size={size}\n data-shape={shape}\n data-edge={edge}\n {...(selected === undefined ? {} : { \"data-selected\": selected, \"aria-pressed\": selected })}\n data-state={loading ? \"loading\" : unavailable ? \"disabled\" : \"idle\"}\n aria-label={label}\n aria-busy={loading || undefined}\n aria-disabled={unavailable || undefined}\n disabled={disabled}\n onClick={handleClick}\n >\n {loading ? <span className=\"hjm-button__spinner\" aria-hidden=\"true\" /> : children}\n </button>\n );\n },\n);\n\nexport type LinkRenderProps = AnchorHTMLAttributes<HTMLAnchorElement> &\n Readonly<{\n children: ReactNode;\n ref: ForwardedRef<HTMLAnchorElement>;\n \"data-tone\": LinkTone;\n \"data-variant\": LinkVariant;\n \"data-state\": \"disabled\" | \"idle\";\n }>;\n\nexport type LinkProps = AnchorHTMLAttributes<HTMLAnchorElement> &\n Readonly<{\n tone?: LinkTone;\n variant?: LinkVariant;\n disabled?: boolean;\n leading?: ReactNode;\n trailing?: ReactNode;\n /** Framework adapter, for example Next.js Link, while HJM keeps link semantics and state. */\n renderAnchor?: (props: LinkRenderProps) => ReactElement;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(function Link(\n {\n tone = linkRecipe.defaults.tone,\n variant = linkRecipe.defaults.variant,\n disabled = false,\n leading,\n trailing,\n renderAnchor,\n target,\n rel,\n tabIndex,\n onClick,\n className,\n children,\n layoutStyle,\n ...props\n },\n ref,\n) {\n const handleClick = (event: MouseEvent<HTMLAnchorElement>) => {\n if (disabled) {\n event.preventDefault();\n return;\n }\n onClick?.(event);\n };\n const anchorProps: LinkRenderProps = {\n ...props,\n // `renderAnchor` adapters receive the merged placement, so a framework Link\n // gets the same position as the plain <a>.\n ...(props.style === undefined && layoutStyle === undefined ? {} : { style: { ...props.style, ...layoutStyle } }),\n ref,\n className: classNames(\"hjm-link\", className),\n \"data-tone\": tone,\n \"data-variant\": variant,\n \"data-state\": disabled ? \"disabled\" : \"idle\",\n \"aria-disabled\": disabled || undefined,\n tabIndex: disabled ? -1 : tabIndex,\n target,\n rel: rel ?? (target === \"_blank\" ? \"noreferrer noopener\" : undefined),\n onClick: handleClick,\n children: (\n <>\n {leading}\n <span>{children}</span>\n {trailing}\n </>\n ),\n };\n return renderAnchor ? renderAnchor(anchorProps) : <a {...anchorProps} />;\n});\n"]}
|
package/dist/auth-screen.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AuthScreenDescriptor } from "@hjmds/design-contracts/components/auth-screen";
|
|
1
|
+
import { type AuthScreenDensity, type AuthScreenDescriptor, type AuthScreenHeroDescriptor, type AuthScreenPolicyLinkDescriptor } from "@hjmds/design-contracts/components/auth-screen";
|
|
2
2
|
import { type HTMLAttributes, type ReactNode } from "react";
|
|
3
3
|
import type { HjmCompositionStyleProp } from "./composition-style.js";
|
|
4
4
|
export type AuthScreenLayoutProps = Omit<HTMLAttributes<HTMLElement>, "children"> & AuthScreenDescriptor & Readonly<{
|
|
@@ -24,7 +24,7 @@ export type AuthScreenLayoutProps = Omit<HTMLAttributes<HTMLElement>, "children"
|
|
|
24
24
|
* properties so the stylesheet keeps one source of truth with the contract.
|
|
25
25
|
*/
|
|
26
26
|
export declare const AuthScreenLayout: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "children"> & Readonly<{
|
|
27
|
-
density?:
|
|
27
|
+
density?: AuthScreenDensity;
|
|
28
28
|
hasFooter?: boolean;
|
|
29
29
|
}> & Readonly<{
|
|
30
30
|
/** Use section inside a product shell that already owns the main landmark. */
|
|
@@ -43,4 +43,34 @@ export declare const AuthScreenLayout: import("react").ForwardRefExoticComponent
|
|
|
43
43
|
/** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */
|
|
44
44
|
layoutStyle?: HjmCompositionStyleProp;
|
|
45
45
|
}> & import("react").RefAttributes<HTMLElement>>;
|
|
46
|
+
export type AuthScreenHeroProps = AuthScreenHeroDescriptor & Readonly<{
|
|
47
|
+
/** Product mark asset. HJM never ships product marks. */
|
|
48
|
+
mark?: ReactNode;
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* The `hero` slot content: mark, eyebrow, tagline and one description line. The
|
|
52
|
+
* product supplies the strings and mark; the type steps, tones and gaps come from
|
|
53
|
+
* `authScreenRecipe.hero` so a login slogan never borrows the page-heading size.
|
|
54
|
+
*/
|
|
55
|
+
export declare function AuthScreenHero({ mark, title, eyebrow, description, headingLevel }: AuthScreenHeroProps): import("react").JSX.Element;
|
|
56
|
+
export type AuthScreenPolicyLink = AuthScreenPolicyLinkDescriptor & Readonly<{
|
|
57
|
+
/** Document URL; renders an anchor. */
|
|
58
|
+
href?: string;
|
|
59
|
+
/** In-app handler; renders a button when there is no `href`. */
|
|
60
|
+
onClick?: () => void;
|
|
61
|
+
}>;
|
|
62
|
+
export type AuthScreenFooterProps = Readonly<{
|
|
63
|
+
/** Optional consent notice (LS-04). */
|
|
64
|
+
notice?: ReactNode;
|
|
65
|
+
/** Terms and privacy links; at least one is required (LS-04). */
|
|
66
|
+
links: readonly AuthScreenPolicyLink[];
|
|
67
|
+
/** Extra product content under the links. */
|
|
68
|
+
children?: ReactNode;
|
|
69
|
+
}>;
|
|
70
|
+
/**
|
|
71
|
+
* The `footer` slot content: consent notice plus dot-separated policy links. The
|
|
72
|
+
* visible gap between two links is `linkGap` + separator + `linkGap`; the 44px
|
|
73
|
+
* touch target is an invisible hit area, not visible padding.
|
|
74
|
+
*/
|
|
75
|
+
export declare function AuthScreenFooter({ notice, links, children }: AuthScreenFooterProps): import("react").JSX.Element;
|
|
46
76
|
//# sourceMappingURL=auth-screen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-screen.d.ts","sourceRoot":"","sources":["../src/auth-screen.tsx"],"names":[],"mappings":"AAAA,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,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzK,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAKtE,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC,GAC/E,oBAAoB,GACpB,QAAQ,CAAC;IACP,8EAA8E;IAC9E,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,+EAA+E;IAC/E,IAAI,EAAE,SAAS,CAAC;IAChB,sFAAsF;IACtF,IAAI,EAAE,SAAS,CAAC;IAChB,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qEAAqE;IACrE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gGAAgG;IAChG,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACvC,CAAC,CAAC;AAEL;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;;IAtBzB,8EAA8E;SACzE,MAAM,GAAG,SAAS;IACvB,+EAA+E;UACzE,SAAS;IACf,sFAAsF;UAChF,SAAS;IACf,2FAA2F;mBAC5E,MAAM;IACrB,4FAA4F;eACjF,OAAO;IAClB,qEAAqE;aAC5D,SAAS;gBACN,MAAM;IAClB,gGAAgG;kBAClF,uBAAuB;gDAkExC,CAAC;AASF,MAAM,MAAM,mBAAmB,GAAG,wBAAwB,GACxD,QAAQ,CAAC;IACP,yDAAyD;IACzD,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC,CAAC;AAEL;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,YAAgB,EAAE,EAAE,mBAAmB,+BA4B1G;AAED,MAAM,MAAM,oBAAoB,GAAG,8BAA8B,GAC/D,QAAQ,CAAC;IACP,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC,CAAC;AAEL,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC3C,uCAAuC;IACvC,MAAM,CAAC,EAAE,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,+BAwBlF"}
|
package/dist/auth-screen.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { resolveAuthScreenDescriptor, } from "@hjmds/design-contracts/components/auth-screen";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { authScreenRecipe, resolveAuthScreenDescriptor, validateAuthScreenHeroDescriptor, validateAuthScreenPolicyLinks, } from "@hjmds/design-contracts/components/auth-screen";
|
|
3
|
+
import { typography } from "@hjmds/design-contracts/foundations";
|
|
4
|
+
import { createContext, createElement, forwardRef, Fragment, useContext, useLayoutEffect, useRef } from "react";
|
|
5
|
+
import { classNames, useDesignProfileDefaults } from "./internal.js";
|
|
6
|
+
// The hero follows the layout density without the product passing it twice.
|
|
7
|
+
const AuthScreenDensityContext = createContext(undefined);
|
|
5
8
|
/**
|
|
6
9
|
* Two regions: hero + main stay one vertically centred block, the footer sits at
|
|
7
10
|
* the bottom. The measurements come from the resolved descriptor as custom
|
|
@@ -37,7 +40,52 @@ export const AuthScreenLayout = forwardRef(function AuthScreenLayout({ hero, mai
|
|
|
37
40
|
["--hjm-auth-screen-padding-block"]: `${resolved.paddingBlock}px`,
|
|
38
41
|
...props.style,
|
|
39
42
|
...layoutStyle,
|
|
40
|
-
}, children: [_jsxs("div", { className: "hjm-auth-screen__block", 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))
|
|
43
|
+
}, 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))
|
|
41
44
|
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] }));
|
|
42
45
|
});
|
|
46
|
+
/** Token weight per variant, following the nearest design profile like `Text` does. */
|
|
47
|
+
function useTypeWeight() {
|
|
48
|
+
const profile = useDesignProfileDefaults();
|
|
49
|
+
const tokens = profile?.tokens.typography ?? typography;
|
|
50
|
+
return variant => tokens[variant].fontWeight;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The `hero` slot content: mark, eyebrow, tagline and one description line. The
|
|
54
|
+
* product supplies the strings and mark; the type steps, tones and gaps come from
|
|
55
|
+
* `authScreenRecipe.hero` so a login slogan never borrows the page-heading size.
|
|
56
|
+
*/
|
|
57
|
+
export function AuthScreenHero({ mark, title, eyebrow, description, headingLevel = 1 }) {
|
|
58
|
+
validateAuthScreenHeroDescriptor({ title, ...(eyebrow === undefined ? {} : { eyebrow }), ...(description === undefined ? {} : { description }), headingLevel });
|
|
59
|
+
const density = useContext(AuthScreenDensityContext);
|
|
60
|
+
const variant = resolveAuthScreenDescriptor(density === undefined ? {} : { density }).titleVariant;
|
|
61
|
+
const weight = useTypeWeight();
|
|
62
|
+
const recipe = authScreenRecipe.hero;
|
|
63
|
+
// Fragment: the mark and the copy are direct children of the hero so the
|
|
64
|
+
// recipe hero gap separates them on both platforms.
|
|
65
|
+
return (_jsxs(Fragment, { children: [mark ? _jsx("div", { className: "hjm-auth-screen__mark", children: mark }) : null, _jsxs("div", { className: "hjm-auth-screen__copy", children: [eyebrow ? _jsx("p", { className: "hjm-text hjm-auth-screen__eyebrow", "data-variant": recipe.eyebrow.textVariant, "data-font-role": "ui", "data-tone": recipe.eyebrow.tone, style: { marginBlockEnd: recipe.eyebrow.gapBelow, fontWeight: weight(recipe.eyebrow.textVariant) }, children: eyebrow }) : null, createElement(`h${headingLevel}`, {
|
|
66
|
+
className: "hjm-text hjm-auth-screen__title",
|
|
67
|
+
"data-variant": variant,
|
|
68
|
+
"data-font-role": "display",
|
|
69
|
+
"data-tone": recipe.title.tone,
|
|
70
|
+
// The title step's own weight (500), not Text's regular default outside a profile.
|
|
71
|
+
style: { fontWeight: weight(variant) },
|
|
72
|
+
}, title), description ? _jsx("p", { className: "hjm-text hjm-auth-screen__description", "data-variant": recipe.description.textVariant, "data-font-role": "ui", "data-tone": recipe.description.tone, style: { marginBlockStart: recipe.description.gapAbove, fontWeight: weight(recipe.description.textVariant) }, children: description }) : null] })] }));
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The `footer` slot content: consent notice plus dot-separated policy links. The
|
|
76
|
+
* visible gap between two links is `linkGap` + separator + `linkGap`; the 44px
|
|
77
|
+
* touch target is an invisible hit area, not visible padding.
|
|
78
|
+
*/
|
|
79
|
+
export function AuthScreenFooter({ notice, links, children }) {
|
|
80
|
+
validateAuthScreenPolicyLinks(links);
|
|
81
|
+
const recipe = authScreenRecipe.footer;
|
|
82
|
+
const weight = useTypeWeight();
|
|
83
|
+
const linkStyle = { fontWeight: weight(recipe.link.textVariant) };
|
|
84
|
+
return (_jsxs("div", { className: "hjm-auth-screen__footer-content", style: { gap: recipe.noticeGap }, children: [notice ? _jsx("p", { className: "hjm-text", "data-variant": recipe.notice.textVariant, "data-font-role": "ui", "data-tone": recipe.notice.tone, style: { fontWeight: weight(recipe.notice.textVariant) }, children: notice }) : null, _jsx("div", { className: "hjm-auth-screen__links", style: {
|
|
85
|
+
["--hjm-auth-screen-link-gap"]: `${recipe.linkGap}px`,
|
|
86
|
+
["--hjm-auth-screen-link-target"]: `${authScreenRecipe.footerMinTouchTarget}px`,
|
|
87
|
+
}, children: links.map((link, index) => (_jsxs(Fragment, { children: [index > 0 ? _jsx("span", { className: "hjm-text hjm-auth-screen__separator", "data-variant": recipe.link.textVariant, "data-tone": recipe.notice.tone, "aria-hidden": "true", children: recipe.separator }) : null, link.href !== undefined
|
|
88
|
+
? _jsx("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, onClick: link.onClick, children: link.label })
|
|
89
|
+
: _jsx("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, onClick: link.onClick, children: link.label })] }, `${index}:${link.label}`))) }), children] }));
|
|
90
|
+
}
|
|
43
91
|
//# sourceMappingURL=auth-screen.js.map
|
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,2BAA2B,GAE5B,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAuC,MAAM,OAAO,CAAC;AACjG,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAuB3C;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CACxC,SAAS,gBAAgB,CACvB,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,GAAG,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,OAAO,GAAG,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,EAClI,YAAY;IAEZ,MAAM,QAAQ,GAAG,2BAA2B,CAAC;QAC3C,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC;QAC7C,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC;KAClD,CAAC,CAAC;IACH,MAAM,UAAU,GAAG,QAAQ,CAAC,SAAS,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,CAAC;IACjF,MAAM,OAAO,GAAG,YAAY,KAAK,SAAS,CAAC;IAC3C,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAChD,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C3E,GAAG,KAAK,CAAC,KAAK;YACd,GAAG,WAAW;SACf,aAED,eAAK,SAAS,EAAC,wBAAwB,aACrC,cAAK,SAAS,EAAC,uBAAuB,YAAE,IAAI,GAAO,EACnD,eAAK,SAAS,EAAC,uBAAuB,eAAY,QAAQ,IAAI,SAAS,eAAa,OAAO,IAAI,SAAS,aAEtG,cAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAC,0BAA0B,EAAC,KAAK,EAAE,OAAO,iBAAe,OAAO,IAAI,SAAS,EAC1G,cAAc,EAAE,KAAK,CAAC,EAAE,GAAG,aAAa,CAAC,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAClE,aAAa,EAAE,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC;oCAAE,aAAa,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,EAC7H,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,YAAG,IAAI,GAAO,EACpE,OAAO,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,0BAA0B,EAAC,IAAI,EAAC,QAAQ,gBAAa,YAAY,YACzF,eAAM,SAAS,EAAC,mCAAmC,iBAAa,MAAM,GAAG,GACrE,CAAC,CAAC,CAAC,IAAI,IACT,IACF,EACL,UAAU,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,yBAAyB,YAAE,MAAM,GAAO,CAAC,CAAC,CAAC,IAAI,IACpE,CACX,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import {\n resolveAuthScreenDescriptor,\n type AuthScreenDescriptor,\n} from \"@hjmds/design-contracts/components/auth-screen\";\nimport { forwardRef, useLayoutEffect, useRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { classNames } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\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\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, ...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 <div className=\"hjm-auth-screen__block\">\n <div className=\"hjm-auth-screen__hero\">{hero}</div>\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 </Element>\n );\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,EAA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oBAC7C,CAAC,4BAAsC,CAAC,EAAE,GAAG,MAAM,CAAC,OAAO,IAAI;oBAC/D,CAAC,+BAAyC,CAAC,EAAE,GAAG,gBAAgB,CAAC,oBAAoB,IAAI;iBACzE,YACf,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1B,MAAC,QAAQ,eACN,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,qCAAqC,kBAAe,MAAM,CAAC,IAAI,CAAC,WAAW,eAAa,MAAM,CAAC,MAAM,CAAC,IAAI,iBAAc,MAAM,YAAE,MAAM,CAAC,SAAS,GAAQ,CAAC,CAAC,CAAC,IAAI,EAC3L,IAAI,CAAC,IAAI,KAAK,SAAS;4BACtB,CAAC,CAAC,YAAG,SAAS,EAAC,gCAAgC,kBAAe,MAAM,CAAC,IAAI,CAAC,WAAW,oBAAiB,IAAI,eAAY,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,YAAG,IAAI,CAAC,KAAK,GAAK;4BAClN,CAAC,CAAC,iBAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,gCAAgC,kBAAe,MAAM,CAAC,IAAI,CAAC,WAAW,oBAAiB,IAAI,eAAY,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,YAAG,IAAI,CAAC,KAAK,GAAU,KAJ9M,GAAG,KAAK,IAAI,IAAI,CAAC,KAAK,EAAE,CAK5B,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 HTMLAttributes, type ReactNode } from \"react\";\nimport { classNames, useDesignProfileDefaults } from \"./internal.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\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, ...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 <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 </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 /** 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 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} 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} onClick={link.onClick}>{link.label}</button>}\n </Fragment>\n ))}\n </div>\n {children}\n </div>\n );\n}\n"]}
|
package/dist/chart.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ export type LineChartProps = CartesianCommon & FocusProps & Readonly<{
|
|
|
54
54
|
animateChanges?: boolean;
|
|
55
55
|
/** Keep the chosen side in series color; mute the other side. */
|
|
56
56
|
scrubEmphasis?: "before" | "after";
|
|
57
|
-
/** Value labels only (rank charts: "1
|
|
57
|
+
/** Value labels only (rank charts: "#1" at the top). */
|
|
58
58
|
valueAxis?: boolean;
|
|
59
59
|
/** Overrides grid/label ticks. */
|
|
60
60
|
ticks?: readonly number[];
|