@hjmds/react 1.23.0 → 1.25.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/conversation-row.d.ts +11 -0
- package/dist/conversation-row.d.ts.map +1 -0
- package/dist/conversation-row.js +8 -0
- package/dist/conversation-row.js.map +1 -0
- package/dist/display.d.ts +8 -0
- package/dist/display.d.ts.map +1 -1
- package/dist/display.js +4 -2
- 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/screen-flows.d.ts +1 -0
- package/dist/screen-flows.d.ts.map +1 -1
- package/dist/screen-flows.js +6 -2
- package/dist/screen-flows.js.map +1 -1
- package/dist/screens.d.ts +8 -2
- package/dist/screens.d.ts.map +1 -1
- package/dist/screens.js +5 -5
- package/dist/screens.js.map +1 -1
- package/dist/selection.d.ts +4 -2
- package/dist/selection.d.ts.map +1 -1
- package/dist/selection.js +3 -3
- package/dist/selection.js.map +1 -1
- package/dist/styles.css +12 -0
- package/dist/styles.layered.css +12 -0
- package/dist/top-bar.d.ts +8 -0
- package/dist/top-bar.d.ts.map +1 -1
- package/dist/top-bar.js +9 -4
- package/dist/top-bar.js.map +1 -1
- package/package.json +8 -3
package/dist/styles.css
CHANGED
|
@@ -2775,6 +2775,7 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
2775
2775
|
.hjm-top-bar__leading, .hjm-top-bar__trailing { display: flex; flex-wrap: wrap; align-items: center; min-inline-size: 0; gap: var(--hjm-top-bar-gap); }
|
|
2776
2776
|
.hjm-top-bar__trailing { justify-content: flex-end; }
|
|
2777
2777
|
.hjm-top-bar__title { min-inline-size: 0; text-align: center; overflow-wrap: anywhere; }
|
|
2778
|
+
.hjm-top-bar__subtitle { display: block; color: var(--hjm-color-text-muted); font-size: var(--hjm-type-caption-size); line-height: var(--hjm-type-caption-line-height); }
|
|
2778
2779
|
.hjm-top-bar__heading { margin: 0; font-size: var(--hjm-type-body-large-size); line-height: var(--hjm-type-body-large-line-height); font-weight: var(--hjm-font-weight-bold); }
|
|
2779
2780
|
.hjm-top-bar__heading > span { display: inline-flex; align-items: center; gap: var(--hjm-top-bar-gap); }
|
|
2780
2781
|
.hjm-top-bar[data-centered="false"] { grid-template-columns: auto minmax(0, 1fr) auto; }
|
|
@@ -3028,6 +3029,8 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
3028
3029
|
.hjm-screen__body { flex: 1 1 0%; min-block-size: 0; min-inline-size: 0; padding: var(--hjm-screen-padding); overflow-wrap: anywhere; }
|
|
3029
3030
|
.hjm-screen__body[data-scroll="screen"] { overflow-y: auto; }
|
|
3030
3031
|
.hjm-screen__body[data-scroll="content"] { display: flex; flex-direction: column; overflow: hidden; }
|
|
3032
|
+
.hjm-screen__body[data-content-alignment="center"] { display: flex; flex-direction: column; }
|
|
3033
|
+
.hjm-screen__centered-content { margin-block: auto; flex-shrink: 0; inline-size: 100%; }
|
|
3031
3034
|
.hjm-screen__body[data-replacement="true"] { display: flex; flex-direction: column; }
|
|
3032
3035
|
.hjm-screen__state { margin-block: auto; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: var(--hjm-screen-state-gap, var(--hjm-space-md)); padding-block: var(--hjm-screen-gap); text-align: center; }
|
|
3033
3036
|
.hjm-screen__footer { flex: 0 0 auto; padding: var(--hjm-screen-padding); padding-block-end: max(var(--hjm-screen-padding), env(safe-area-inset-bottom)); border-block-start: 1px solid var(--hjm-color-border); }
|
|
@@ -3176,3 +3179,12 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
3176
3179
|
.hjm-bottom-navigation[data-surface="raised"] .hjm-bottom-navigation__surface { background: var(--hjm-color-surface-alt); border-color: var(--hjm-color-border-control); border-block-end-width: 4px; box-shadow: none; }
|
|
3177
3180
|
.hjm-bottom-navigation[data-surface="raised"] .hjm-bottom-navigation__item { border-block-end: 3px solid transparent; }
|
|
3178
3181
|
.hjm-bottom-navigation[data-surface="raised"] .hjm-bottom-navigation__item[data-state="selected"] { border-block-end-color: color-mix(in srgb, var(--hjm-color-text) 45%, transparent); }
|
|
3182
|
+
|
|
3183
|
+
/* Text radio navigation shares the selection engine and its focus behavior. */
|
|
3184
|
+
.hjm-segmented[data-presentation="text"] .hjm-segmented__items { flex-direction:row; gap:var(--hjm-space-md); padding:0; border:0; border-radius:0; background:transparent; }
|
|
3185
|
+
.hjm-segmented[data-presentation="text"] .hjm-segmented__item { flex:0 0 auto; display:flex; flex-direction:column; justify-content:center; min-block-size:var(--hjm-control-min-touch-target); padding:0; gap:var(--hjm-space-xxs); box-shadow:none; background:transparent; color:var(--hjm-color-text-muted); font-size:var(--hjm-type-body-large-size); font-weight:500; }
|
|
3186
|
+
.hjm-segmented[data-presentation="text"] .hjm-segmented__item::after { content:""; position:static; width:16px; height:2px; border-radius:var(--hjm-radius-full); background:transparent; }
|
|
3187
|
+
.hjm-segmented[data-presentation="text"] .hjm-segmented__item[data-state="checked"] { color:var(--hjm-color-text); font-weight:700; }
|
|
3188
|
+
.hjm-segmented[data-presentation="text"] .hjm-segmented__item[data-state="checked"]::after { background:var(--hjm-color-content-brand); }
|
|
3189
|
+
.hjm-segmented[data-presentation="text"][data-text-emphasis="regular"] .hjm-segmented__item { font-weight:400; }
|
|
3190
|
+
.hjm-segmented[data-presentation="text"][data-text-emphasis="regular"] .hjm-segmented__item[data-state="checked"] { font-weight:600; }
|
package/dist/styles.layered.css
CHANGED
|
@@ -2776,6 +2776,7 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
2776
2776
|
.hjm-top-bar__leading, .hjm-top-bar__trailing { display: flex; flex-wrap: wrap; align-items: center; min-inline-size: 0; gap: var(--hjm-top-bar-gap); }
|
|
2777
2777
|
.hjm-top-bar__trailing { justify-content: flex-end; }
|
|
2778
2778
|
.hjm-top-bar__title { min-inline-size: 0; text-align: center; overflow-wrap: anywhere; }
|
|
2779
|
+
.hjm-top-bar__subtitle { display: block; color: var(--hjm-color-text-muted); font-size: var(--hjm-type-caption-size); line-height: var(--hjm-type-caption-line-height); }
|
|
2779
2780
|
.hjm-top-bar__heading { margin: 0; font-size: var(--hjm-type-body-large-size); line-height: var(--hjm-type-body-large-line-height); font-weight: var(--hjm-font-weight-bold); }
|
|
2780
2781
|
.hjm-top-bar__heading > span { display: inline-flex; align-items: center; gap: var(--hjm-top-bar-gap); }
|
|
2781
2782
|
.hjm-top-bar[data-centered="false"] { grid-template-columns: auto minmax(0, 1fr) auto; }
|
|
@@ -3029,6 +3030,8 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
3029
3030
|
.hjm-screen__body { flex: 1 1 0%; min-block-size: 0; min-inline-size: 0; padding: var(--hjm-screen-padding); overflow-wrap: anywhere; }
|
|
3030
3031
|
.hjm-screen__body[data-scroll="screen"] { overflow-y: auto; }
|
|
3031
3032
|
.hjm-screen__body[data-scroll="content"] { display: flex; flex-direction: column; overflow: hidden; }
|
|
3033
|
+
.hjm-screen__body[data-content-alignment="center"] { display: flex; flex-direction: column; }
|
|
3034
|
+
.hjm-screen__centered-content { margin-block: auto; flex-shrink: 0; inline-size: 100%; }
|
|
3032
3035
|
.hjm-screen__body[data-replacement="true"] { display: flex; flex-direction: column; }
|
|
3033
3036
|
.hjm-screen__state { margin-block: auto; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: var(--hjm-screen-state-gap, var(--hjm-space-md)); padding-block: var(--hjm-screen-gap); text-align: center; }
|
|
3034
3037
|
.hjm-screen__footer { flex: 0 0 auto; padding: var(--hjm-screen-padding); padding-block-end: max(var(--hjm-screen-padding), env(safe-area-inset-bottom)); border-block-start: 1px solid var(--hjm-color-border); }
|
|
@@ -3178,4 +3181,13 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
3178
3181
|
.hjm-bottom-navigation[data-surface="raised"] .hjm-bottom-navigation__item { border-block-end: 3px solid transparent; }
|
|
3179
3182
|
.hjm-bottom-navigation[data-surface="raised"] .hjm-bottom-navigation__item[data-state="selected"] { border-block-end-color: color-mix(in srgb, var(--hjm-color-text) 45%, transparent); }
|
|
3180
3183
|
|
|
3184
|
+
/* Text radio navigation shares the selection engine and its focus behavior. */
|
|
3185
|
+
.hjm-segmented[data-presentation="text"] .hjm-segmented__items { flex-direction:row; gap:var(--hjm-space-md); padding:0; border:0; border-radius:0; background:transparent; }
|
|
3186
|
+
.hjm-segmented[data-presentation="text"] .hjm-segmented__item { flex:0 0 auto; display:flex; flex-direction:column; justify-content:center; min-block-size:var(--hjm-control-min-touch-target); padding:0; gap:var(--hjm-space-xxs); box-shadow:none; background:transparent; color:var(--hjm-color-text-muted); font-size:var(--hjm-type-body-large-size); font-weight:500; }
|
|
3187
|
+
.hjm-segmented[data-presentation="text"] .hjm-segmented__item::after { content:""; position:static; width:16px; height:2px; border-radius:var(--hjm-radius-full); background:transparent; }
|
|
3188
|
+
.hjm-segmented[data-presentation="text"] .hjm-segmented__item[data-state="checked"] { color:var(--hjm-color-text); font-weight:700; }
|
|
3189
|
+
.hjm-segmented[data-presentation="text"] .hjm-segmented__item[data-state="checked"]::after { background:var(--hjm-color-content-brand); }
|
|
3190
|
+
.hjm-segmented[data-presentation="text"][data-text-emphasis="regular"] .hjm-segmented__item { font-weight:400; }
|
|
3191
|
+
.hjm-segmented[data-presentation="text"][data-text-emphasis="regular"] .hjm-segmented__item[data-state="checked"] { font-weight:600; }
|
|
3192
|
+
|
|
3181
3193
|
}
|
package/dist/top-bar.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ import { type HTMLAttributes, type MouseEventHandler, type ReactNode } from "rea
|
|
|
2
2
|
import type { HjmCompositionStyleProp } from "./composition-style.js";
|
|
3
3
|
export type TopBarProps = Omit<HTMLAttributes<HTMLDivElement>, "title" | "children"> & Readonly<{
|
|
4
4
|
title?: string;
|
|
5
|
+
/** Product control in the shared title slot; exclusive with text title affordances. */
|
|
6
|
+
titleContent?: ReactNode;
|
|
7
|
+
/** Secondary product context; the shared title slot owns its placement. */
|
|
8
|
+
subtitle?: string;
|
|
5
9
|
titleLeading?: ReactNode;
|
|
6
10
|
onTitleClick?: MouseEventHandler<HTMLButtonElement>;
|
|
7
11
|
titleAccessibilityLabel?: string;
|
|
@@ -17,6 +21,10 @@ export type TopBarProps = Omit<HTMLAttributes<HTMLDivElement>, "title" | "childr
|
|
|
17
21
|
/** Screen chrome stays composable inside pages and dialogs, without adding a second banner landmark. */
|
|
18
22
|
export declare const TopBar: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "title" | "children"> & Readonly<{
|
|
19
23
|
title?: string;
|
|
24
|
+
/** Product control in the shared title slot; exclusive with text title affordances. */
|
|
25
|
+
titleContent?: ReactNode;
|
|
26
|
+
/** Secondary product context; the shared title slot owns its placement. */
|
|
27
|
+
subtitle?: string;
|
|
20
28
|
titleLeading?: ReactNode;
|
|
21
29
|
onTitleClick?: MouseEventHandler<HTMLButtonElement>;
|
|
22
30
|
titleAccessibilityLabel?: string;
|
package/dist/top-bar.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"top-bar.d.ts","sourceRoot":"","sources":["../src/top-bar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkC,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIpH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,GAAG,QAAQ,CAAC;IAC9F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,YAAY,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACpD,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC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,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gGAAgG;IAChG,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACvC,CAAC,CAAC;AAEH,wGAAwG;AACxG,eAAO,MAAM,MAAM;YAnBT,MAAM;IACd,uFAAuF;mBACxE,SAAS;IACxB,2EAA2E;eAChE,MAAM;mBACF,SAAS;mBACT,iBAAiB,CAAC,iBAAiB,CAAC;8BACzB,MAAM;mBACjB,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;cAC1B,SAAS;eACR,SAAS;cACV,SAAS;eACR,OAAO;kBACJ,MAAM;IACpB,gGAAgG;kBAClF,uBAAuB;mDAwCrC,CAAC"}
|
package/dist/top-bar.js
CHANGED
|
@@ -5,8 +5,13 @@ import { Button } from "./actions.js";
|
|
|
5
5
|
import { classNames } from "./internal.js";
|
|
6
6
|
import { useOptionalHjmTheme } from "./provider.js";
|
|
7
7
|
/** Screen chrome stays composable inside pages and dialogs, without adding a second banner landmark. */
|
|
8
|
-
export const TopBar = forwardRef(function TopBar({ title, titleLeading, onTitleClick, titleAccessibilityLabel, headingLevel = 1, leading, trailing, actions, centered = topBarRecipe.defaults.centered, safeAreaTop = 0, className, style, layoutStyle, ...props }, ref) {
|
|
8
|
+
export const TopBar = forwardRef(function TopBar({ title, titleContent, subtitle, titleLeading, onTitleClick, titleAccessibilityLabel, headingLevel = 1, leading, trailing, actions, centered = topBarRecipe.defaults.centered, safeAreaTop = 0, className, style, layoutStyle, ...props }, ref) {
|
|
9
9
|
const theme = useOptionalHjmTheme();
|
|
10
|
+
if (titleContent !== undefined && (title !== undefined || subtitle !== undefined || titleLeading !== undefined || onTitleClick !== undefined || titleAccessibilityLabel !== undefined)) {
|
|
11
|
+
throw new TypeError("TopBar titleContent is exclusive with title affordances");
|
|
12
|
+
}
|
|
13
|
+
if (subtitle !== undefined && !subtitle.trim())
|
|
14
|
+
throw new TypeError("TopBar subtitle must not be empty");
|
|
10
15
|
if (!Number.isFinite(safeAreaTop) || safeAreaTop < 0)
|
|
11
16
|
throw new RangeError("TopBar safeAreaTop must be non-negative");
|
|
12
17
|
if (title !== undefined && !title.trim())
|
|
@@ -15,7 +20,7 @@ export const TopBar = forwardRef(function TopBar({ title, titleLeading, onTitleC
|
|
|
15
20
|
throw new TypeError("TopBar titleAccessibilityLabel must not be empty");
|
|
16
21
|
if (actions !== undefined && trailing !== undefined)
|
|
17
22
|
throw new TypeError("TopBar accepts either trailing or actions");
|
|
18
|
-
if (title === undefined && (titleLeading !== undefined || onTitleClick !== undefined || titleAccessibilityLabel !== undefined)) {
|
|
23
|
+
if (title === undefined && (subtitle !== undefined || titleLeading !== undefined || onTitleClick !== undefined || titleAccessibilityLabel !== undefined)) {
|
|
19
24
|
throw new TypeError("TopBar title affordances require a title");
|
|
20
25
|
}
|
|
21
26
|
const Heading = `h${headingLevel}`;
|
|
@@ -24,7 +29,7 @@ export const TopBar = forwardRef(function TopBar({ title, titleLeading, onTitleC
|
|
|
24
29
|
"--hjm-top-bar-padding": `${topBarRecipe.paddingHorizontal}px`,
|
|
25
30
|
"--hjm-top-bar-gap": `${topBarRecipe.gap}px`,
|
|
26
31
|
"--hjm-top-bar-safe-area": `${safeAreaTop}px`, ...style, ...layoutStyle,
|
|
27
|
-
}, children: [_jsx("div", { className: "hjm-top-bar__leading", children: leading }),
|
|
28
|
-
|
|
32
|
+
}, children: [_jsx("div", { className: "hjm-top-bar__leading", children: leading }), _jsxs("div", { className: "hjm-top-bar__title", children: [titleContent ?? (title === undefined ? null : _jsx(Heading, { className: "hjm-top-bar__heading", children: onTitleClick ? _jsx(Button, { tone: "ghost", onClick: onTitleClick, "aria-label": titleAccessibilityLabel, leading: titleLeading, children: title })
|
|
33
|
+
: _jsxs("span", { "aria-label": titleAccessibilityLabel, children: [titleLeading, title] }) })), subtitle ? _jsx("span", { className: "hjm-top-bar__subtitle", children: subtitle }) : null] }), _jsx("div", { className: "hjm-top-bar__trailing", children: actions ?? trailing })] });
|
|
29
34
|
});
|
|
30
35
|
//# sourceMappingURL=top-bar.js.map
|
package/dist/top-bar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"top-bar.js","sourceRoot":"","sources":["../src/top-bar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAmF,MAAM,OAAO,CAAC;AACpH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"top-bar.js","sourceRoot":"","sources":["../src/top-bar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAmF,MAAM,OAAO,CAAC;AACpH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAsBpD,wGAAwG;AACxG,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAA8B,SAAS,MAAM,CAAC,EAC5E,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,uBAAuB,EAAE,YAAY,GAAG,CAAC,EACpG,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,WAAW,GAAG,CAAC,EACtF,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,KAAK,EACxC,EAAE,GAAG;IACJ,MAAM,KAAK,GAAG,mBAAmB,EAAE,CAAC;IACpC,IAAI,YAAY,KAAK,SAAS,IAAI,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I,CAAC,CAAC,IAAI,YAAY,CAAC,kBAAkB,EAChH,KAAK,EAAE;YACL,0BAA0B,EAAE,GAAG,YAAY,CAAC,SAAS,IAAI;YACzD,uBAAuB,EAAE,GAAG,YAAY,CAAC,iBAAiB,IAAI;YAC9D,mBAAmB,EAAE,GAAG,YAAY,CAAC,GAAG,IAAI;YAC5C,yBAAyB,EAAE,GAAG,WAAW,IAAI,EAAE,GAAG,KAAK,EAAE,GAAG,WAAW;SACvD,aAClB,cAAK,SAAS,EAAC,sBAAsB,YAAE,OAAO,GAAO,EACrD,eAAK,SAAS,EAAC,oBAAoB,aAChC,YAAY,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,OAAO,IAAC,SAAS,EAAC,sBAAsB,YACrF,YAAY,CAAC,CAAC,CAAC,KAAC,MAAM,IAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,YAAY,gBAAc,uBAAuB,EAAE,OAAO,EAAE,YAAY,YAAG,KAAK,GAAU;4BACtI,CAAC,CAAC,8BAAkB,uBAAuB,aAAG,YAAY,EAAE,KAAK,IAAQ,GACnE,CAAC,EACV,QAAQ,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,uBAAuB,YAAE,QAAQ,GAAQ,CAAC,CAAC,CAAC,IAAI,IACxE,EACN,cAAK,SAAS,EAAC,uBAAuB,YAAE,OAAO,IAAI,QAAQ,GAAO,IAC9D,CAAC;AACT,CAAC,CAAC,CAAC","sourcesContent":["import { topBarRecipe } from \"@hjmds/design-contracts/recipes\";\nimport { forwardRef, type CSSProperties, type HTMLAttributes, type MouseEventHandler, type ReactNode } from \"react\";\nimport { Button } from \"./actions.js\";\nimport { classNames } from \"./internal.js\";\nimport { useOptionalHjmTheme } from \"./provider.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type TopBarProps = Omit<HTMLAttributes<HTMLDivElement>, \"title\" | \"children\"> & Readonly<{\n title?: string;\n /** Product control in the shared title slot; exclusive with text title affordances. */\n titleContent?: ReactNode;\n /** Secondary product context; the shared title slot owns its placement. */\n subtitle?: string;\n titleLeading?: ReactNode;\n onTitleClick?: MouseEventHandler<HTMLButtonElement>;\n titleAccessibilityLabel?: string;\n headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n leading?: ReactNode;\n trailing?: ReactNode;\n actions?: ReactNode;\n centered?: boolean;\n safeAreaTop?: number;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\n/** Screen chrome stays composable inside pages and dialogs, without adding a second banner landmark. */\nexport const TopBar = forwardRef<HTMLDivElement, TopBarProps>(function TopBar({\n title, titleContent, subtitle, titleLeading, onTitleClick, titleAccessibilityLabel, headingLevel = 1,\n leading, trailing, actions, centered = topBarRecipe.defaults.centered, safeAreaTop = 0,\n className, style, layoutStyle, ...props\n}, ref) {\n const theme = useOptionalHjmTheme();\n if (titleContent !== undefined && (title !== undefined || subtitle !== undefined || titleLeading !== undefined || onTitleClick !== undefined || titleAccessibilityLabel !== undefined)) {\n throw new TypeError(\"TopBar titleContent is exclusive with title affordances\");\n }\n if (subtitle !== undefined && !subtitle.trim()) throw new TypeError(\"TopBar subtitle must not be empty\");\n if (!Number.isFinite(safeAreaTop) || safeAreaTop < 0) throw new RangeError(\"TopBar safeAreaTop must be non-negative\");\n if (title !== undefined && !title.trim()) throw new TypeError(\"TopBar title must not be empty\");\n if (titleAccessibilityLabel !== undefined && !titleAccessibilityLabel.trim()) throw new TypeError(\"TopBar titleAccessibilityLabel must not be empty\");\n if (actions !== undefined && trailing !== undefined) throw new TypeError(\"TopBar accepts either trailing or actions\");\n if (title === undefined && (subtitle !== undefined || titleLeading !== undefined || onTitleClick !== undefined || titleAccessibilityLabel !== undefined)) {\n throw new TypeError(\"TopBar title affordances require a title\");\n }\n const Heading = `h${headingLevel}` as \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n return <div {...props} ref={ref} className={classNames(\"hjm-top-bar\", className)}\n data-centered={centered} data-large-text={(theme?.environment.textScale ?? 1) >= topBarRecipe.largeTextThreshold}\n style={{\n \"--hjm-top-bar-min-height\": `${topBarRecipe.minHeight}px`,\n \"--hjm-top-bar-padding\": `${topBarRecipe.paddingHorizontal}px`,\n \"--hjm-top-bar-gap\": `${topBarRecipe.gap}px`,\n \"--hjm-top-bar-safe-area\": `${safeAreaTop}px`, ...style, ...layoutStyle,\n } as CSSProperties}>\n <div className=\"hjm-top-bar__leading\">{leading}</div>\n <div className=\"hjm-top-bar__title\">\n {titleContent ?? (title === undefined ? null : <Heading className=\"hjm-top-bar__heading\">\n {onTitleClick ? <Button tone=\"ghost\" onClick={onTitleClick} aria-label={titleAccessibilityLabel} leading={titleLeading}>{title}</Button>\n : <span aria-label={titleAccessibilityLabel}>{titleLeading}{title}</span>}\n </Heading>)}\n {subtitle ? <span className=\"hjm-top-bar__subtitle\">{subtitle}</span> : null}\n </div>\n <div className=\"hjm-top-bar__trailing\">{actions ?? trailing}</div>\n </div>;\n});\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hjmds/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.25.0",
|
|
4
4
|
"description": "Accessible React 19 renderers for HJM design contracts.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -577,6 +577,11 @@
|
|
|
577
577
|
"types": "./dist/streaming-answer.d.ts",
|
|
578
578
|
"import": "./dist/streaming-answer.js",
|
|
579
579
|
"default": "./dist/streaming-answer.js"
|
|
580
|
+
},
|
|
581
|
+
"./conversation-row": {
|
|
582
|
+
"types": "./dist/conversation-row.d.ts",
|
|
583
|
+
"import": "./dist/conversation-row.js",
|
|
584
|
+
"default": "./dist/conversation-row.js"
|
|
580
585
|
}
|
|
581
586
|
},
|
|
582
587
|
"files": [
|
|
@@ -586,7 +591,7 @@
|
|
|
586
591
|
"THIRD_PARTY_NOTICES.md"
|
|
587
592
|
],
|
|
588
593
|
"peerDependencies": {
|
|
589
|
-
"@hjmds/design-contracts": "
|
|
594
|
+
"@hjmds/design-contracts": "^1.25.0",
|
|
590
595
|
"react": ">=19.0.0",
|
|
591
596
|
"react-dom": ">=19.0.0",
|
|
592
597
|
"@number-flow/react": "0.6.2",
|
|
@@ -623,7 +628,7 @@
|
|
|
623
628
|
"blobatar": "2.7.0",
|
|
624
629
|
"@blobatar/react": "2.7.0",
|
|
625
630
|
"lucide-react": "1.49.0",
|
|
626
|
-
"@hjmds/design-contracts": "1.
|
|
631
|
+
"@hjmds/design-contracts": "1.25.0"
|
|
627
632
|
},
|
|
628
633
|
"peerDependenciesMeta": {
|
|
629
634
|
"@number-flow/react": {
|