@hjmds/react 1.33.2 → 1.35.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 +23 -2
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +61 -6
- package/dist/actions.js.map +1 -1
- package/dist/advanced-display.d.ts +35 -2
- package/dist/advanced-display.d.ts.map +1 -1
- package/dist/advanced-display.js +28 -9
- package/dist/advanced-display.js.map +1 -1
- package/dist/anchor.d.ts +3 -1
- package/dist/anchor.d.ts.map +1 -1
- package/dist/anchor.js +5 -5
- package/dist/anchor.js.map +1 -1
- package/dist/auth-screen.d.ts.map +1 -1
- package/dist/auth-screen.js +5 -2
- package/dist/auth-screen.js.map +1 -1
- package/dist/avatar-blobatar-motion.d.ts.map +1 -1
- package/dist/avatar-blobatar-motion.js +2 -1
- package/dist/avatar-blobatar-motion.js.map +1 -1
- package/dist/avatar-blobatar.d.ts.map +1 -1
- package/dist/avatar-blobatar.js +2 -1
- package/dist/avatar-blobatar.js.map +1 -1
- package/dist/bottom-cta.d.ts +8 -1
- package/dist/bottom-cta.d.ts.map +1 -1
- package/dist/bottom-cta.js +6 -2
- package/dist/bottom-cta.js.map +1 -1
- package/dist/carousel-motion.d.ts.map +1 -1
- package/dist/carousel-motion.js +11 -2
- package/dist/carousel-motion.js.map +1 -1
- package/dist/carousel.d.ts +10 -0
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +23 -7
- package/dist/carousel.js.map +1 -1
- package/dist/collapsible.d.ts +6 -0
- package/dist/collapsible.d.ts.map +1 -1
- package/dist/collapsible.js +22 -20
- package/dist/collapsible.js.map +1 -1
- package/dist/collection-rail.d.ts +4 -4
- package/dist/collection-rail.d.ts.map +1 -1
- package/dist/collection-rail.js.map +1 -1
- package/dist/conversation-row.d.ts.map +1 -1
- package/dist/conversation-row.js +4 -1
- package/dist/conversation-row.js.map +1 -1
- package/dist/data-table.d.ts +2 -0
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +2 -2
- package/dist/data-table.js.map +1 -1
- package/dist/display.d.ts +60 -3
- package/dist/display.d.ts.map +1 -1
- package/dist/display.js +33 -10
- package/dist/display.js.map +1 -1
- package/dist/evidence.d.ts +1 -1
- package/dist/evidence.d.ts.map +1 -1
- package/dist/evidence.js +2 -1
- package/dist/evidence.js.map +1 -1
- package/dist/feedback.d.ts +5 -0
- package/dist/feedback.d.ts.map +1 -1
- package/dist/feedback.js +7 -5
- package/dist/feedback.js.map +1 -1
- package/dist/floating-action-button.js +1 -1
- package/dist/floating-action-button.js.map +1 -1
- package/dist/forms.d.ts.map +1 -1
- package/dist/forms.js +4 -4
- package/dist/forms.js.map +1 -1
- package/dist/image-choice.js +3 -3
- package/dist/image-choice.js.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/internal/initial-focus.d.ts +6 -0
- package/dist/internal/initial-focus.d.ts.map +1 -1
- package/dist/internal/initial-focus.js +6 -0
- package/dist/internal/initial-focus.js.map +1 -1
- package/dist/internal/pending-content.d.ts +19 -0
- package/dist/internal/pending-content.d.ts.map +1 -0
- package/dist/internal/pending-content.js +34 -0
- package/dist/internal/pending-content.js.map +1 -0
- package/dist/internal/screen-footer.d.ts +4 -2
- package/dist/internal/screen-footer.d.ts.map +1 -1
- package/dist/internal/screen-footer.js +2 -2
- package/dist/internal/screen-footer.js.map +1 -1
- package/dist/internal.d.ts +9 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +4 -0
- package/dist/internal.js.map +1 -1
- package/dist/navigation.d.ts.map +1 -1
- package/dist/navigation.js +58 -4
- package/dist/navigation.js.map +1 -1
- package/dist/number-field.d.ts.map +1 -1
- package/dist/number-field.js +4 -3
- package/dist/number-field.js.map +1 -1
- package/dist/overlays.d.ts +4 -0
- package/dist/overlays.d.ts.map +1 -1
- package/dist/overlays.js +46 -18
- package/dist/overlays.js.map +1 -1
- package/dist/public-exports.generated.d.ts +6 -0
- package/dist/public-exports.generated.d.ts.map +1 -1
- package/dist/public-exports.generated.js +18 -0
- package/dist/public-exports.generated.js.map +1 -1
- package/dist/screen-flows.d.ts +13 -6
- package/dist/screen-flows.d.ts.map +1 -1
- package/dist/screen-flows.js +26 -15
- package/dist/screen-flows.js.map +1 -1
- package/dist/screens.d.ts +19 -6
- package/dist/screens.d.ts.map +1 -1
- package/dist/screens.js +22 -11
- package/dist/screens.js.map +1 -1
- package/dist/selection.d.ts +22 -0
- package/dist/selection.d.ts.map +1 -1
- package/dist/selection.js +32 -9
- package/dist/selection.js.map +1 -1
- package/dist/shortcut-rail.d.ts +27 -0
- package/dist/shortcut-rail.d.ts.map +1 -0
- package/dist/shortcut-rail.js +37 -0
- package/dist/shortcut-rail.js.map +1 -0
- package/dist/steps.d.ts +5 -2
- package/dist/steps.d.ts.map +1 -1
- package/dist/steps.js +3 -3
- package/dist/steps.js.map +1 -1
- package/dist/styles.css +242 -61
- package/dist/styles.layered.css +242 -61
- package/dist/task-list.d.ts +3 -1
- package/dist/task-list.d.ts.map +1 -1
- package/dist/task-list.js +2 -2
- package/dist/task-list.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/time-picker.d.ts +9 -0
- package/dist/time-picker.d.ts.map +1 -0
- package/dist/time-picker.js +74 -0
- package/dist/time-picker.js.map +1 -0
- package/dist/top-bar.d.ts +4 -0
- package/dist/top-bar.d.ts.map +1 -1
- package/dist/top-bar.js +2 -2
- package/dist/top-bar.js.map +1 -1
- package/package.json +26 -15
package/dist/task-list.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export type TaskListProps = Readonly<{
|
|
|
7
7
|
onCompletedChange: (id: string, completed: boolean) => void;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
emptyContent?: ReactNode;
|
|
10
|
+
/** Use plain rows inside an enclosing surface; omission retains the Checkbox default. */
|
|
11
|
+
itemPresentation?: "plain" | "card";
|
|
10
12
|
/** Independent row action beside the checkbox; apply disabled to the supplied control. */
|
|
11
13
|
renderItemAction?: (context: Readonly<{
|
|
12
14
|
item: TaskItem;
|
|
@@ -20,5 +22,5 @@ export type TaskListProps = Readonly<{
|
|
|
20
22
|
layoutStyle?: HjmCompositionStyleProp;
|
|
21
23
|
}>;
|
|
22
24
|
/** Canonical Checkbox/List own semantics; optional collection composition keeps drag peers out of this entry. */
|
|
23
|
-
export declare function TaskList({ label, items, onCompletedChange, disabled, emptyContent, renderItemAction, renderCollection, layoutStyle }: TaskListProps): import("react").JSX.Element;
|
|
25
|
+
export declare function TaskList({ label, items, onCompletedChange, disabled, emptyContent, itemPresentation, renderItemAction, renderCollection, layoutStyle }: TaskListProps): import("react").JSX.Element;
|
|
24
26
|
//# sourceMappingURL=task-list.d.ts.map
|
package/dist/task-list.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-list.d.ts","sourceRoot":"","sources":["../src/task-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAI,EAAC,SAAS,EAAC,MAAI,OAAO,CAAC;AAClC,OAAM,EAAe,KAAK,QAAQ,EAAC,MAAI,mCAAmC,CAAC;AAE3E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,MAAM,MAAM,aAAa,GAAC,QAAQ,CAAC;IAAC,KAAK,EAAC,MAAM,CAAC;IAAA,KAAK,EAAC,SAAS,QAAQ,EAAE,CAAC;IAAA,iBAAiB,EAAC,CAAC,EAAE,EAAC,MAAM,EAAC,SAAS,EAAC,OAAO,KAAG,IAAI,CAAC;IAAA,QAAQ,CAAC,EAAC,OAAO,CAAC;IAAA,YAAY,CAAC,EAAC,SAAS,CAAC;IAC1K,0FAA0F;IAC1F,gBAAgB,CAAC,EAAC,CAAC,OAAO,EAAC,QAAQ,CAAC;QAAC,IAAI,EAAC,QAAQ,CAAC;QA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AG,SAAS,CAAC;IAClF,gBAAgB,CAAC,EAAC,CAAC,OAAO,EAAC,QAAQ,CAAC;QAAC,KAAK,EAAC,SAAS,QAAQ,EAAE,CAAC;QAAA,UAAU,EAAC,CAAC,IAAI,EAAC,QAAQ,KAAG,SAAS,CAAA;KAAC,CAAC,KAAG,SAAS,CAAC;IACnH,kIAAkI;IAClI,WAAW,CAAC,EAAC,uBAAuB,CAAA;CAAC,CAAC,CAAC;AACxC,iHAAiH;AACjH,wBAAgB,QAAQ,CAAC,EAAC,KAAK,EAAC,KAAK,EAAC,iBAAiB,EAAC,QAAc,EAAC,YAAY,EAAC,gBAAgB,EAAC,gBAAgB,EAAC,gBAAgB,EAAC,WAAW,EAAC,EAAC,aAAa,+BAQhK"}
|
package/dist/task-list.js
CHANGED
|
@@ -3,12 +3,12 @@ import { validateTasks } from '@hjmds/design-contracts/task-list';
|
|
|
3
3
|
import { Checkbox } from './selection.js';
|
|
4
4
|
import { List } from './advanced-display.js';
|
|
5
5
|
/** Canonical Checkbox/List own semantics; optional collection composition keeps drag peers out of this entry. */
|
|
6
|
-
export function TaskList({ label, items, onCompletedChange, disabled = false, emptyContent, renderItemAction, renderCollection, layoutStyle }) {
|
|
6
|
+
export function TaskList({ label, items, onCompletedChange, disabled = false, emptyContent, itemPresentation, renderItemAction, renderCollection, layoutStyle }) {
|
|
7
7
|
validateTasks(items);
|
|
8
8
|
if (!label.trim())
|
|
9
9
|
throw new TypeError('TaskList needs a localized label');
|
|
10
10
|
const renderItem = (item) => {
|
|
11
|
-
const control = _jsx(Checkbox, { label: item.label, checked: item.completed, disabled: disabled || item.disabled === true, onCheckedChange: completed => onCompletedChange(item.id, completed), ...(item.description === undefined ? {} : { description: item.description }) });
|
|
11
|
+
const control = _jsx(Checkbox, { ...(itemPresentation === undefined ? {} : { presentation: itemPresentation }), label: item.label, checked: item.completed, disabled: disabled || item.disabled === true, onCheckedChange: completed => onCompletedChange(item.id, completed), ...(item.description === undefined ? {} : { description: item.description }) });
|
|
12
12
|
const action = renderItemAction?.({ item, disabled: disabled || item.disabled === true });
|
|
13
13
|
// The action sits beside Checkbox, never inside its label (pressing it must not toggle completion); long labels wrap
|
|
14
14
|
// inside the checkbox column. A separate action line made each task two to three lines tall (2026-10-17 review).
|
package/dist/task-list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-list.js","sourceRoot":"","sources":["../src/task-list.tsx"],"names":[],"mappings":";AACA,OAAM,EAAC,aAAa,EAAe,MAAI,mCAAmC,CAAC;AAC3E,OAAM,EAAC,QAAQ,EAAC,MAAI,gBAAgB,CAAC;AAAA,OAAM,EAAC,IAAI,EAAC,MAAI,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"task-list.js","sourceRoot":"","sources":["../src/task-list.tsx"],"names":[],"mappings":";AACA,OAAM,EAAC,aAAa,EAAe,MAAI,mCAAmC,CAAC;AAC3E,OAAM,EAAC,QAAQ,EAAC,MAAI,gBAAgB,CAAC;AAAA,OAAM,EAAC,IAAI,EAAC,MAAI,uBAAuB,CAAC;AAU7E,iHAAiH;AACjH,MAAM,UAAU,QAAQ,CAAC,EAAC,KAAK,EAAC,KAAK,EAAC,iBAAiB,EAAC,QAAQ,GAAC,KAAK,EAAC,YAAY,EAAC,gBAAgB,EAAC,gBAAgB,EAAC,gBAAgB,EAAC,WAAW,EAAe;IAAE,aAAa,CAAC,KAAK,CAAC,CAAC;IAAA,IAAG,CAAC,KAAK,CAAC,IAAI,EAAE;QAAC,MAAM,IAAI,SAAS,CAAC,kCAAkC,CAAC,CAAC;IAChQ,MAAM,UAAU,GAAC,CAAC,IAAa,EAAC,EAAE;QAAC,MAAM,OAAO,GAAC,KAAC,QAAQ,OAAK,CAAC,gBAAgB,KAAG,SAAS,CAAA,CAAC,CAAA,EAAE,CAAA,CAAC,CAAA,EAAC,YAAY,EAAC,gBAAgB,EAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,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KAAK,CAAC,GAAG,CAAC,IAAI,CAAA,EAAE,CAAA,cAAmB,KAAK,EAAE,EAAC,OAAO,EAAC,qBAAqB,EAAC,YAAG,UAAU,CAAC,IAAI,CAAC,IAAlE,IAAI,CAAC,EAAE,CAAkE,CAAC,GAAQ,CAAC;AAC/M,CAAC","sourcesContent":["import type{ReactNode}from'react';\nimport{validateTasks,type TaskItem}from'@hjmds/design-contracts/task-list';\nimport{Checkbox}from'./selection.js';import{List}from'./advanced-display.js';\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\nexport type TaskListProps=Readonly<{label:string;items:readonly TaskItem[];onCompletedChange:(id:string,completed:boolean)=>void;disabled?:boolean;emptyContent?:ReactNode;\n /** Use plain rows inside an enclosing surface; omission retains the Checkbox default. */\n itemPresentation?:\"plain\"|\"card\";\n /** Independent row action beside the checkbox; apply disabled to the supplied control. */\n renderItemAction?:(context:Readonly<{item:TaskItem;disabled:boolean}>)=>ReactNode;\n renderCollection?:(context:Readonly<{items:readonly TaskItem[];renderItem:(item:TaskItem)=>ReactNode}>)=>ReactNode;\n /** Canonical layout-only placement on the List root. With `renderCollection` the product owns the root, so place that instead. */\n layoutStyle?:HjmCompositionStyleProp}>;\n/** Canonical Checkbox/List own semantics; optional collection composition keeps drag peers out of this entry. */\nexport function TaskList({label,items,onCompletedChange,disabled=false,emptyContent,itemPresentation,renderItemAction,renderCollection,layoutStyle}:TaskListProps){validateTasks(items);if(!label.trim())throw new TypeError('TaskList needs a localized label');\n const renderItem=(item:TaskItem)=>{const control=<Checkbox {...(itemPresentation===undefined?{}:{presentation:itemPresentation})} label={item.label} checked={item.completed} disabled={disabled||item.disabled===true} onCheckedChange={completed=>onCompletedChange(item.id,completed)} {...(item.description===undefined?{}:{description:item.description})}/>;const action=renderItemAction?.({item,disabled:disabled||item.disabled===true});\n // The action sits beside Checkbox, never inside its label (pressing it must not toggle completion); long labels wrap\n // inside the checkbox column. A separate action line made each task two to three lines tall (2026-10-17 review).\n return <div style={{display:\"grid\",gridTemplateColumns:action==null?\"minmax(0, 1fr)\":\"minmax(0, 1fr) auto\",alignItems:\"center\",gap:\"var(--hjm-space-sm)\"}}>{control}{action}</div>;};\n if(items.length===0)return <List label={label} {...(layoutStyle===undefined?{}:{layoutStyle})}>{emptyContent}</List>;\n if(renderCollection)return <>{renderCollection({items,renderItem})}</>;\n return <List label={label} appearance=\"grouped\" {...(layoutStyle===undefined?{}:{layoutStyle})}>{items.map(item=><div key={item.id} style={{padding:\"var(--hjm-space-md)\"}}>{renderItem(item)}</div>)}</List>;\n}\n"]}
|
package/dist/theme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAkBA,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,2DAA2D,CAAC;AAoBnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,MAAM,aAAa,GAAG,aAAa,GACvC,MAAM,CAAC,SAAS,MAAM,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAmB7C,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,yBAAyB,GAC/B,aAAa,
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAkBA,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,2DAA2D,CAAC;AAoBnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,MAAM,aAAa,GAAG,aAAa,GACvC,MAAM,CAAC,SAAS,MAAM,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAmB7C,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,yBAAyB,GAC/B,aAAa,CAsOf"}
|
package/dist/theme.js
CHANGED
|
@@ -219,6 +219,7 @@ export function createHjmThemeStyle(value) {
|
|
|
219
219
|
style["--hjm-button-pressed-opacity"] = buttonRecipe.opacity.pressed;
|
|
220
220
|
style["--hjm-button-disabled-opacity"] = buttonRecipe.opacity.disabled;
|
|
221
221
|
style["--hjm-field-border-width"] = `${fieldRecipe.borderWidth}px`;
|
|
222
|
+
style["--hjm-field-invalid-border-width"] = `${fieldRecipe.states.invalid.borderWidth}px`;
|
|
222
223
|
style["--hjm-field-focus-ring-width"] = `${fieldRecipe.focusRingWidth}px`;
|
|
223
224
|
style["--hjm-field-disabled-opacity"] = fieldRecipe.disabledOpacity;
|
|
224
225
|
style["--hjm-control-min-touch-target"] = `${control.minTouchTarget}px`;
|
package/dist/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EACL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,UAAU,EACV,sBAAsB,EACtB,UAAU,EACV,MAAM,EACN,KAAK,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,UAAU,GACX,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EACL,oBAAoB,GAErB,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAC5G,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,6BAA6B,EAC7B,cAAc,EACd,YAAY,EACZ,UAAU,EACV,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,WAAW,EACX,UAAU,GACX,MAAM,iCAAiC,CAAC;AAMzC,SAAS,KAAK,CAAC,KAAa;IA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,CAAC,WAAW,IAAI,CAAC;IACjE,KAAK,CAAC,kCAAkC,CAAC,GAAG,GAAG,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAChF,KAAK,CAAC,2BAA2B,CAAC,GAAG,GAAG,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IACtE,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QACjE,2EAA2E;QAC3E,yEAAyE;QACzE,KAAK,CAAC,wBAAwB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1C,GAAG,oBAAoB,CAAC,KAAK,EAAE,WAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC;IACxE,CAAC;IACD,4GAA4G;IAC5G,iHAAiH;IACjH,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAA4C,EAAE,CAAC;QAClG,MAAM,OAAO,GAAG,oBAAoB,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,WAAW,CAAC,mBAAmB,CAAC,CAAC;QAC7G,KAAK,CAAC,0BAA0B,IAAI,EAAE,CAAC,GAAG,GAAG,6BAA6B,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC;IACzG,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAwC,EAAE,CAAC;QAC1F,KAAK,CAAC,qBAAqB,IAAI,EAAE,CAAC,GAAG,GAAG,yBAAyB,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC;IACvF,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { resolveSurfaceFillOpacity } from \"@hjmds/design-contracts/palette-contrast\";\nimport {\n backdrop,\n control,\n easing,\n fontFamily,\n resolveFontFamilyStack,\n fontWeight,\n motion,\n layer,\n radius,\n shadow,\n spacing,\n stroke,\n typography,\n} from \"@hjmds/design-contracts/foundations\";\nimport { resolveColorReference } from \"@hjmds/design-contracts/color-references\";\nimport { focusIndicatorContract } from \"@hjmds/design-contracts/contracts\";\nimport {\n visibleControlHeight,\n type DesignSystemProviderValue,\n} from \"@hjmds/design-contracts/components/design-system-provider\";\nimport { buttonRecipe, fieldRecipe, resolveButtonEdgeOverhang } from \"@hjmds/design-contracts/recipes/base\";\nimport {\n bottomNavigationRecipe,\n iconButtonRecipe,\n resolveIconButtonEdgeOverhang,\n comboboxRecipe,\n dialogRecipe,\n listRecipe,\n listRowRecipe,\n menuRecipe,\n searchFieldRecipe,\n selectRecipe,\n sheetRecipe,\n skeletonRecipe,\n tooltipRecipe,\n switchRecipe,\n toastRecipe,\n textRecipe,\n} from \"@hjmds/design-contracts/recipes\";\nimport type { CSSProperties } from \"react\";\n\nexport type HjmThemeStyle = CSSProperties &\n Record<`--hjm-${string}`, string | number>;\n\nfunction kebab(value: string): string {\n return value.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);\n}\n\ntype ShadowToken = Readonly<{ color: string; opacity: number; radius: number; offsetY: number }>;\n\n// RN shadow token -> CSS; blur = radius, as react-native-web maps it.\nfunction shadowCss(token: ShadowToken, offsetX = 0): string {\n const hex = token.color.replace(\"#\", \"\");\n const [r, g, b] = [0, 2, 4].map((start) => Number.parseInt(hex.slice(start, start + 2), 16));\n return `${offsetX}px ${token.offsetY}px ${token.radius}px rgb(${r} ${g} ${b} / ${Math.round(token.opacity * 100)}%)`;\n}\n\nfunction rem(value: number): string {\n return `${Number((value / 16).toFixed(5))}rem`;\n}\n\nexport function createHjmThemeStyle(\n value: DesignSystemProviderValue,\n): HjmThemeStyle {\n const { environment, palette } = value;\n const profileTokens = value.designProfile?.tokens;\n const style: HjmThemeStyle = {\n \"--hjm-backdrop-modal\": `color-mix(in srgb, ${backdrop.modal.color} ${backdrop.modal.opacity * 100}%, transparent)`,\n \"--hjm-text-scale\": environment.textScale,\n \"--hjm-motion-scale\": environment.reducedMotion ? 0 : 1,\n colorScheme: environment.theme,\n backgroundColor: palette.theme.bg,\n color: palette.theme.text,\n };\n\n for (const [name, color] of Object.entries(palette.theme)) {\n style[`--hjm-color-${kebab(name)}`] = color;\n }\n for (const [name, color] of Object.entries(palette.statusAccents)) {\n style[`--hjm-accent-${kebab(name)}`] = color;\n }\n for (const [name, color] of Object.entries(palette.statusAccentFills)) {\n style[`--hjm-accent-fill-${kebab(name)}`] = color;\n }\n for (const [name, value] of Object.entries(spacing)) {\n style[`--hjm-space-${kebab(name)}`] = `${value}px`;\n }\n for (const [name, value] of Object.entries(profileTokens?.radius ?? radius)) {\n style[`--hjm-radius-${kebab(name)}`] = `${value}px`;\n }\n for (const [name, value] of Object.entries(profileTokens?.typography ?? typography)) {\n style[`--hjm-type-${kebab(name)}-size`] =\n `calc(${rem(value.fontSize)} * var(--hjm-text-scale))`;\n style[`--hjm-type-${kebab(name)}-line-height`] =\n `calc(${rem(value.lineHeight)} * var(--hjm-text-scale))`;\n style[`--hjm-type-${kebab(name)}-weight`] = value.fontWeight;\n }\n for (const [name, value] of Object.entries(fontWeight)) {\n style[`--hjm-font-weight-${kebab(name)}`] = value;\n }\n for (const [name, value] of Object.entries(motion)) {\n style[`--hjm-motion-${kebab(name)}`] = environment.reducedMotion\n ? \"0ms\"\n : `${value}ms`;\n }\n\n style[\"--hjm-font-family-ui\"] = (profileTokens?.fontFamily.ui ?? fontFamily.ui).join(\", \");\n style[\"--hjm-font-family-code\"] = (profileTokens?.fontFamily.code ?? fontFamily.code).join(\", \");\n // Roles resolve from the nearest Provider, including portal/nested reset contexts.\n for (const role of [\"display\", \"reading\"] as const) {\n style[`--hjm-font-family-${role}`] = resolveFontFamilyStack(profileTokens?.fontFamily ?? fontFamily, role).join(\", \");\n }\n for (const [name, value] of Object.entries(stroke)) {\n style[`--hjm-stroke-${kebab(name)}`] = `${value}px`;\n }\n // Unset before 1.4.1, so focus rules were invalid and drew no ring.\n style[\"--hjm-color-focus\"] = resolveColorReference(focusIndicatorContract.color, palette);\n style[\"--hjm-focus-width\"] = `${focusIndicatorContract.width}px`;\n style[\"--hjm-focus-offset\"] = `${focusIndicatorContract.offset}px`;\n style[\"--hjm-bottom-navigation-pressed-background\"] = resolveColorReference(\n bottomNavigationRecipe.states.pressedBackground,\n palette,\n );\n // Row rhythm and the leading frame come from the recipe so the stylesheet\n // does not carry a second copy of the same numbers.\n style[\"--hjm-list-row-gap\"] = rem(listRowRecipe.gap);\n style[\"--hjm-list-row-leading-size\"] = rem(listRowRecipe.leadingSize);\n // Row text sits on the container content edge; the surface bleeds by this much (2026-10-17 user decision).\n style[\"--hjm-list-row-surface-bleed\"] = rem(listRowRecipe.surfaceBleed);\n style[\"--hjm-list-grouped-padding-inline\"] = rem(listRecipe.grouped.paddingInline);\n for (const [name, value] of Object.entries(listRecipe.separators)) {\n if (value === null) continue;\n style[`--hjm-list-separator-${kebab(name)}-start`] = rem(value.insetStart);\n // Start when the row above has a leading element (its text column), as Native's List reads it per row.\n style[`--hjm-list-separator-${kebab(name)}-leading-start`] = rem(value.leadingInsetStart);\n style[`--hjm-list-separator-${kebab(name)}-end`] = rem(value.insetEnd);\n }\n // A described switch row has the same padding and minimum height as Native (switchRecipe.rowPaddingVertical,\n // rowTwoLineMinHeight); Web used to let content decide, so neighbouring settings rows differed by platform.\n style[\"--hjm-switch-row-min-height\"] = rem(switchRecipe.rowMinHeight);\n style[\"--hjm-switch-row-padding-vertical\"] = rem(switchRecipe.rowPaddingVertical);\n style[\"--hjm-switch-row-two-line-min-height\"] = rem(switchRecipe.rowTwoLineMinHeight);\n for (const [name, value] of Object.entries(switchRecipe.sizes)) {\n style[`--hjm-switch-${kebab(name)}-width`] = rem(value.width);\n style[`--hjm-switch-${kebab(name)}-height`] = rem(value.height);\n style[`--hjm-switch-${kebab(name)}-thumb`] = rem(value.thumb);\n style[`--hjm-switch-${kebab(name)}-inset`] = rem(value.inset);\n style[`--hjm-switch-${kebab(name)}-offset`] = rem(\n value.width - value.thumb - value.inset * 2,\n );\n }\n for (const [name, value] of Object.entries(listRowRecipe.density)) {\n style[`--hjm-list-row-${kebab(name)}-one-line`] = rem(value.oneLineMinHeight);\n style[`--hjm-list-row-${kebab(name)}-two-line`] = rem(value.twoLineMinHeight);\n style[`--hjm-list-row-${kebab(name)}-padding-inline`] = rem(value.paddingHorizontal);\n style[`--hjm-list-row-${kebab(name)}-padding-block`] = rem(value.paddingVertical);\n }\n // The recipe owns these; a second copy in the stylesheet drifts silently\n // because the gates read that file as text only. Block and text heights\n // already resolve through --hjm-space-*, so they are not re-emitted.\n const skeletonCurve = easing[skeletonRecipe.animation.easing];\n style[\"--hjm-skeleton-circle-size\"] =\n `${skeletonRecipe.shapes.circle.defaultHeight}px`;\n style[\"--hjm-skeleton-background\"] = resolveColorReference(skeletonRecipe.background, palette);\n style[\"--hjm-skeleton-button-height\"] = `${skeletonRecipe.shapes.button.defaultHeight}px`;\n style[\"--hjm-skeleton-media-aspect\"] = skeletonRecipe.shapes.media.aspectRatio;\n style[\"--hjm-skeleton-lines-gap\"] = `${skeletonRecipe.lines.gap}px`;\n style[\"--hjm-skeleton-last-line-width\"] = `${skeletonRecipe.lines.lastLineWidthPercent}%`;\n style[\"--hjm-skeleton-duration\"] = `${skeletonRecipe.animation.duration}ms`;\n style[\"--hjm-skeleton-easing\"] = `cubic-bezier(${skeletonCurve.join(\", \")})`;\n style[\"--hjm-skeleton-from-opacity\"] = skeletonRecipe.animation.fromOpacity;\n style[\"--hjm-skeleton-to-opacity\"] = skeletonRecipe.animation.toOpacity;\n // Export the shared order instead of keeping a second numeric scale in CSS.\n for (const [name, value] of Object.entries(layer)) {\n style[`--hjm-layer-${kebab(name)}`] = value;\n }\n for (const [name, token] of Object.entries(profileTokens?.shadow ?? shadow)) {\n style[`--hjm-shadow-${kebab(name)}`] = shadowCss(token);\n }\n const surfaceMaterial = value.designProfile?.material.surface;\n // Defaults are emitted on every Provider, so a nested neutral profile clears\n // inherited glass/clay. Unsupported transparency remains an opaque CSS fill.\n style[\"--hjm-surface-blur\"] = surfaceMaterial?.blurStrength ? `blur(${surfaceMaterial.blurStrength * 32}px)` : \"none\";\n style[\"--hjm-surface-fill-opacity\"] = surfaceMaterial?.blurStrength ? resolveSurfaceFillOpacity(surfaceMaterial.fillOpacity, palette.theme) : 1;\n const insetShadow = surfaceMaterial?.insetShadows.length\n ? surfaceMaterial.insetShadows.map(token => `inset ${shadowCss(token, token.offsetX)}`).join(\", \")\n : \"\";\n style[\"--hjm-surface-inset-shadow\"] = insetShadow || \"none\";\n style[\"--hjm-surface-raised-shadow\"] = shadowCss(profileTokens?.shadow.floating ?? shadow.floating) + (insetShadow ? `, ${insetShadow}` : \"\");\n // BottomCTA overlaps content above it (bottomCtaRecipe rationale). Profile\n // strength is shared, but its shadow must cast upward rather than behind the\n // footer; preserve the stylesheet-only legacy path when no profile is supplied.\n style[\"--hjm-bottom-cta-shadow\"] = profileTokens\n ? shadowCss({ ...profileTokens.shadow.floating, offsetY: -Math.abs(profileTokens.shadow.floating.offsetY) })\n : \"none\";\n // Toast body metrics follow a selected profile; emit legacy values when no profile is selected\n // instead of inheriting a parent profile or changing standalone presentation.\n style[\"--hjm-toast-title-line-height\"] = profileTokens ? \"var(--hjm-type-body-line-height)\" : \"1.35\";\n style[\"--hjm-toast-description-line-height\"] = profileTokens ? \"var(--hjm-type-body-line-height)\" : \"1.45\";\n // Overlay chrome and sizes come from the recipes Native reads (1.5.0).\n for (const [name, chrome] of [[\"dialog\", dialogRecipe.content], [\"sheet\", sheetRecipe.content], [\"toast\", toastRecipe.surface]] as const) {\n style[`--hjm-${name}-background`] = resolveColorReference(chrome.background, palette);\n style[`--hjm-${name}-border`] = resolveColorReference(chrome.border, palette);\n style[`--hjm-${name}-border-width`] = `${chrome.borderWidth}px`;\n style[`--hjm-${name}-radius`] = `var(--hjm-radius-${chrome.radius})`;\n // Recipes select the floating role. Resolve its value from the profile so\n // dialogs, sheets and toasts cannot retain neutral shadows after a theme switch.\n style[`--hjm-${name}-shadow`] = shadowCss(profileTokens?.shadow.floating ?? chrome.shadow);\n }\n style[\"--hjm-immersive-background\"] = resolveColorReference(dialogRecipe.immersive.background, palette);\n style[\"--hjm-sheet-max-height\"] = `${sheetRecipe.content.maxHeightRatio * 100}dvh`;\n style[\"--hjm-sheet-max-width\"] = `${sheetRecipe.web.maxWidth}px`;\n style[\"--hjm-sheet-handle-width\"] = `${sheetRecipe.handle.width}px`;\n style[\"--hjm-sheet-handle-height\"] = `${sheetRecipe.handle.height}px`;\n style[\"--hjm-sheet-handle-color\"] = resolveColorReference(sheetRecipe.handle.color, palette);\n for (const [name, ratio] of Object.entries(sheetRecipe.sizes)) {\n if (ratio !== null) style[`--hjm-sheet-size-${name}`] = `${ratio * 100}dvh`;\n }\n // Toast badge/action colours resolve from the recipe so Web and Native share one tone table (1.10.0).\n for (const [tone, contract] of Object.entries(toastRecipe.tones)) {\n style[`--hjm-toast-accent-${tone}`] = resolveColorReference(contract.accent, palette);\n style[`--hjm-toast-badge-${tone}`] = resolveColorReference(contract.badge, palette);\n }\n // Text emphasis steps come from textRecipe so Web and Native share one scale (400/500/500 since the 2026-10-17 lighter scale).\n for (const [step, weight] of Object.entries(textRecipe.emphasis)) style[`--hjm-text-emphasis-${step}`] = weight;\n style[\"--hjm-toast-badge-size\"] = `${toastRecipe.icon.badgeDiameter}px`;\n // First-line anchor geometry (2026-10-17): the same padding, anchor and close overhang Native reads.\n style[\"--hjm-toast-padding-block\"] = `${toastRecipe.surface.padding.block}px`;\n style[\"--hjm-toast-padding-inline\"] = `${toastRecipe.surface.padding.inline}px`;\n style[\"--hjm-toast-anchor-size\"] = `${toastRecipe.anchor.blockSize}px`;\n style[\"--hjm-toast-close-size\"] = `${toastRecipe.close.diameter}px`;\n style[\"--hjm-toast-close-block-overhang\"] = `${toastRecipe.close.blockOverhang}px`;\n style[\"--hjm-toast-close-inline-overhang\"] = `${toastRecipe.close.inlineOverhang}px`;\n style[\"--hjm-toast-action-background\"] = resolveColorReference(toastRecipe.action.background, palette);\n style[\"--hjm-toast-action-color\"] = resolveColorReference(toastRecipe.action.color, palette);\n style[\"--hjm-toast-description-color\"] = resolveColorReference(toastRecipe.description.color, palette);\n // Panel toast (2026-10-10): media column, step progress and action alignment come from the same recipe Native reads.\n style[\"--hjm-toast-media-size\"] = `${toastRecipe.media.size}px`;\n style[\"--hjm-toast-action-align\"] = toastRecipe.action.align;\n style[\"--hjm-toast-pressed-opacity\"] = toastRecipe.states.pressedOpacity;\n style[\"--hjm-toast-progress-gap\"] = `${toastRecipe.progress.gap}px`;\n style[\"--hjm-toast-progress-dot\"] = `${toastRecipe.progress.dotSize}px`;\n style[\"--hjm-toast-progress-current-scale\"] = String(toastRecipe.progress.currentScale);\n style[\"--hjm-toast-progress-done\"] = resolveColorReference(toastRecipe.progress.doneColor, palette);\n style[\"--hjm-toast-progress-upcoming\"] = resolveColorReference(toastRecipe.progress.upcomingColor, palette);\n style[\"--hjm-toast-progress-label\"] = resolveColorReference(toastRecipe.progress.labelColor, palette);\n style[\"--hjm-toast-progress-current-label\"] = resolveColorReference(toastRecipe.progress.currentLabelColor, palette);\n const toastExit = toastRecipe.transition.web.exit;\n style[\"--hjm-toast-exit-duration\"] = environment.reducedMotion ? \"0ms\" : `${toastExit.duration}ms`;\n style[\"--hjm-toast-exit-easing\"] = `cubic-bezier(${easing[toastExit.easing].join(\", \")})`;\n // SearchField geometry comes from searchFieldRecipe (2026-10-06 follow-up). Web had drawn TextField's\n // 16px padding for both sizes and a 44px clear button even at `medium`, where the recipe and Native\n // use a 36 circle with a 4px hit slop (44 target, 36 footprint).\n for (const [name, size] of Object.entries(searchFieldRecipe.sizes)) {\n style[`--hjm-search-field-padding-${name}`] = `${size.paddingHorizontal}px`;\n style[`--hjm-search-field-gap-${name}`] = `${size.gap}px`;\n style[`--hjm-search-field-clear-${name}`] = `${size.clearDiameter}px`;\n style[`--hjm-search-field-clear-slop-${name}`] = `${size.clearHitSlop}px`;\n }\n style[\"--hjm-tooltip-max-width\"] = `${tooltipRecipe.content.maxWidth}px`;\n style[\"--hjm-tooltip-padding\"] = `${tooltipRecipe.surface.padding}px`;\n // Floating collection surfaces read their padding from the recipe (2026-10-06): the stylesheet's 4 had drifted from 8.\n style[\"--hjm-menu-padding\"] = `${menuRecipe.surface.padding}px`;\n style[\"--hjm-select-popover-padding\"] = `${selectRecipe.popover.padding}px`;\n style[\"--hjm-combobox-popover-padding\"] = `${comboboxRecipe.popover.padding}px`;\n style[\"--hjm-tooltip-collision-padding\"] = `${tooltipRecipe.positioning.collisionPadding}px`;\n style[\"--hjm-button-pressed-opacity\"] = buttonRecipe.opacity.pressed;\n style[\"--hjm-button-disabled-opacity\"] = buttonRecipe.opacity.disabled;\n style[\"--hjm-field-border-width\"] = `${fieldRecipe.borderWidth}px`;\n style[\"--hjm-field-focus-ring-width\"] = `${fieldRecipe.focusRingWidth}px`;\n style[\"--hjm-field-disabled-opacity\"] = fieldRecipe.disabledOpacity;\n style[\"--hjm-control-min-touch-target\"] = `${control.minTouchTarget}px`;\n style[\"--hjm-control-field-height\"] = `${control.fieldHeight}px`;\n style[\"--hjm-field-multiline-min-height\"] = rem(fieldRecipe.multilineMinHeight);\n style[\"--hjm-field-padding-block\"] = rem(fieldRecipe.paddingVertical);\n for (const [name, value] of Object.entries(control.buttonHeight)) {\n // The axis is applied to the emitted variables rather than to each rule so\n // that every stylesheet consumer of a control height honours it at once.\n style[`--hjm-control-button-${kebab(name)}`] =\n `${visibleControlHeight(value, environment.minimumVisualTarget)}px`;\n }\n // Edge alignment (2026-10-17 measured audit): how far a ghost IconButton / Button with `edge` overhangs the\n // container edge, from the same contract helpers Native reads (glyph slot or label on the inset, hit area kept).\n for (const size of Object.keys(iconButtonRecipe.sizes) as (keyof typeof iconButtonRecipe.sizes)[]) {\n const visible = visibleControlHeight(iconButtonRecipe.sizes[size].diameter, environment.minimumVisualTarget);\n style[`--hjm-icon-button-edge-${size}`] = `${resolveIconButtonEdgeOverhang(\"ghost\", size, visible)}px`;\n }\n for (const size of Object.keys(buttonRecipe.sizes) as (keyof typeof buttonRecipe.sizes)[]) {\n style[`--hjm-button-edge-${size}`] = `${resolveButtonEdgeOverhang(\"ghost\", size)}px`;\n }\n\n return style;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EACL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,UAAU,EACV,sBAAsB,EACtB,UAAU,EACV,MAAM,EACN,KAAK,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,UAAU,GACX,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EACL,oBAAoB,GAErB,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAC5G,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,6BAA6B,EAC7B,cAAc,EACd,YAAY,EACZ,UAAU,EACV,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,WAAW,EACX,UAAU,GACX,MAAM,iCAAiC,CAAC;AAMzC,SAAS,KAAK,CAAC,KAAa;IAC1B,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACzE,CAAC;AAID,sEAAsE;AACtE,SAAS,SAAS,CAAC,KAAkB,EAAE,OAAO,GAAG,CAAC;IAChD,MAAM,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,CAAC,2BAA2B,CAAC,GAAG,GAAG,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IACtE,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QACjE,2EAA2E;QAC3E,yEAAyE;QACzE,KAAK,CAAC,wBAAwB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1C,GAAG,oBAAoB,CAAC,KAAK,EAAE,WAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC;IACxE,CAAC;IACD,4GAA4G;IAC5G,iHAAiH;IACjH,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAA4C,EAAE,CAAC;QAClG,MAAM,OAAO,GAAG,oBAAoB,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,WAAW,CAAC,mBAAmB,CAAC,CAAC;QAC7G,KAAK,CAAC,0BAA0B,IAAI,EAAE,CAAC,GAAG,GAAG,6BAA6B,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC;IACzG,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAwC,EAAE,CAAC;QAC1F,KAAK,CAAC,qBAAqB,IAAI,EAAE,CAAC,GAAG,GAAG,yBAAyB,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC;IACvF,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { resolveSurfaceFillOpacity } from \"@hjmds/design-contracts/palette-contrast\";\nimport {\n backdrop,\n control,\n easing,\n fontFamily,\n resolveFontFamilyStack,\n fontWeight,\n motion,\n layer,\n radius,\n shadow,\n spacing,\n stroke,\n typography,\n} from \"@hjmds/design-contracts/foundations\";\nimport { resolveColorReference } from \"@hjmds/design-contracts/color-references\";\nimport { focusIndicatorContract } from \"@hjmds/design-contracts/contracts\";\nimport {\n visibleControlHeight,\n type DesignSystemProviderValue,\n} from \"@hjmds/design-contracts/components/design-system-provider\";\nimport { buttonRecipe, fieldRecipe, resolveButtonEdgeOverhang } from \"@hjmds/design-contracts/recipes/base\";\nimport {\n bottomNavigationRecipe,\n iconButtonRecipe,\n resolveIconButtonEdgeOverhang,\n comboboxRecipe,\n dialogRecipe,\n listRecipe,\n listRowRecipe,\n menuRecipe,\n searchFieldRecipe,\n selectRecipe,\n sheetRecipe,\n skeletonRecipe,\n tooltipRecipe,\n switchRecipe,\n toastRecipe,\n textRecipe,\n} from \"@hjmds/design-contracts/recipes\";\nimport type { CSSProperties } from \"react\";\n\nexport type HjmThemeStyle = CSSProperties &\n Record<`--hjm-${string}`, string | number>;\n\nfunction kebab(value: string): string {\n return value.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);\n}\n\ntype ShadowToken = Readonly<{ color: string; opacity: number; radius: number; offsetY: number }>;\n\n// RN shadow token -> CSS; blur = radius, as react-native-web maps it.\nfunction shadowCss(token: ShadowToken, offsetX = 0): string {\n const hex = token.color.replace(\"#\", \"\");\n const [r, g, b] = [0, 2, 4].map((start) => Number.parseInt(hex.slice(start, start + 2), 16));\n return `${offsetX}px ${token.offsetY}px ${token.radius}px rgb(${r} ${g} ${b} / ${Math.round(token.opacity * 100)}%)`;\n}\n\nfunction rem(value: number): string {\n return `${Number((value / 16).toFixed(5))}rem`;\n}\n\nexport function createHjmThemeStyle(\n value: DesignSystemProviderValue,\n): HjmThemeStyle {\n const { environment, palette } = value;\n const profileTokens = value.designProfile?.tokens;\n const style: HjmThemeStyle = {\n \"--hjm-backdrop-modal\": `color-mix(in srgb, ${backdrop.modal.color} ${backdrop.modal.opacity * 100}%, transparent)`,\n \"--hjm-text-scale\": environment.textScale,\n \"--hjm-motion-scale\": environment.reducedMotion ? 0 : 1,\n colorScheme: environment.theme,\n backgroundColor: palette.theme.bg,\n color: palette.theme.text,\n };\n\n for (const [name, color] of Object.entries(palette.theme)) {\n style[`--hjm-color-${kebab(name)}`] = color;\n }\n for (const [name, color] of Object.entries(palette.statusAccents)) {\n style[`--hjm-accent-${kebab(name)}`] = color;\n }\n for (const [name, color] of Object.entries(palette.statusAccentFills)) {\n style[`--hjm-accent-fill-${kebab(name)}`] = color;\n }\n for (const [name, value] of Object.entries(spacing)) {\n style[`--hjm-space-${kebab(name)}`] = `${value}px`;\n }\n for (const [name, value] of Object.entries(profileTokens?.radius ?? radius)) {\n style[`--hjm-radius-${kebab(name)}`] = `${value}px`;\n }\n for (const [name, value] of Object.entries(profileTokens?.typography ?? typography)) {\n style[`--hjm-type-${kebab(name)}-size`] =\n `calc(${rem(value.fontSize)} * var(--hjm-text-scale))`;\n style[`--hjm-type-${kebab(name)}-line-height`] =\n `calc(${rem(value.lineHeight)} * var(--hjm-text-scale))`;\n style[`--hjm-type-${kebab(name)}-weight`] = value.fontWeight;\n }\n for (const [name, value] of Object.entries(fontWeight)) {\n style[`--hjm-font-weight-${kebab(name)}`] = value;\n }\n for (const [name, value] of Object.entries(motion)) {\n style[`--hjm-motion-${kebab(name)}`] = environment.reducedMotion\n ? \"0ms\"\n : `${value}ms`;\n }\n\n style[\"--hjm-font-family-ui\"] = (profileTokens?.fontFamily.ui ?? fontFamily.ui).join(\", \");\n style[\"--hjm-font-family-code\"] = (profileTokens?.fontFamily.code ?? fontFamily.code).join(\", \");\n // Roles resolve from the nearest Provider, including portal/nested reset contexts.\n for (const role of [\"display\", \"reading\"] as const) {\n style[`--hjm-font-family-${role}`] = resolveFontFamilyStack(profileTokens?.fontFamily ?? fontFamily, role).join(\", \");\n }\n for (const [name, value] of Object.entries(stroke)) {\n style[`--hjm-stroke-${kebab(name)}`] = `${value}px`;\n }\n // Unset before 1.4.1, so focus rules were invalid and drew no ring.\n style[\"--hjm-color-focus\"] = resolveColorReference(focusIndicatorContract.color, palette);\n style[\"--hjm-focus-width\"] = `${focusIndicatorContract.width}px`;\n style[\"--hjm-focus-offset\"] = `${focusIndicatorContract.offset}px`;\n style[\"--hjm-bottom-navigation-pressed-background\"] = resolveColorReference(\n bottomNavigationRecipe.states.pressedBackground,\n palette,\n );\n // Row rhythm and the leading frame come from the recipe so the stylesheet\n // does not carry a second copy of the same numbers.\n style[\"--hjm-list-row-gap\"] = rem(listRowRecipe.gap);\n style[\"--hjm-list-row-leading-size\"] = rem(listRowRecipe.leadingSize);\n // Row text sits on the container content edge; the surface bleeds by this much (2026-10-17 user decision).\n style[\"--hjm-list-row-surface-bleed\"] = rem(listRowRecipe.surfaceBleed);\n style[\"--hjm-list-grouped-padding-inline\"] = rem(listRecipe.grouped.paddingInline);\n for (const [name, value] of Object.entries(listRecipe.separators)) {\n if (value === null) continue;\n style[`--hjm-list-separator-${kebab(name)}-start`] = rem(value.insetStart);\n // Start when the row above has a leading element (its text column), as Native's List reads it per row.\n style[`--hjm-list-separator-${kebab(name)}-leading-start`] = rem(value.leadingInsetStart);\n style[`--hjm-list-separator-${kebab(name)}-end`] = rem(value.insetEnd);\n }\n // A described switch row has the same padding and minimum height as Native (switchRecipe.rowPaddingVertical,\n // rowTwoLineMinHeight); Web used to let content decide, so neighbouring settings rows differed by platform.\n style[\"--hjm-switch-row-min-height\"] = rem(switchRecipe.rowMinHeight);\n style[\"--hjm-switch-row-padding-vertical\"] = rem(switchRecipe.rowPaddingVertical);\n style[\"--hjm-switch-row-two-line-min-height\"] = rem(switchRecipe.rowTwoLineMinHeight);\n for (const [name, value] of Object.entries(switchRecipe.sizes)) {\n style[`--hjm-switch-${kebab(name)}-width`] = rem(value.width);\n style[`--hjm-switch-${kebab(name)}-height`] = rem(value.height);\n style[`--hjm-switch-${kebab(name)}-thumb`] = rem(value.thumb);\n style[`--hjm-switch-${kebab(name)}-inset`] = rem(value.inset);\n style[`--hjm-switch-${kebab(name)}-offset`] = rem(\n value.width - value.thumb - value.inset * 2,\n );\n }\n for (const [name, value] of Object.entries(listRowRecipe.density)) {\n style[`--hjm-list-row-${kebab(name)}-one-line`] = rem(value.oneLineMinHeight);\n style[`--hjm-list-row-${kebab(name)}-two-line`] = rem(value.twoLineMinHeight);\n style[`--hjm-list-row-${kebab(name)}-padding-inline`] = rem(value.paddingHorizontal);\n style[`--hjm-list-row-${kebab(name)}-padding-block`] = rem(value.paddingVertical);\n }\n // The recipe owns these; a second copy in the stylesheet drifts silently\n // because the gates read that file as text only. Block and text heights\n // already resolve through --hjm-space-*, so they are not re-emitted.\n const skeletonCurve = easing[skeletonRecipe.animation.easing];\n style[\"--hjm-skeleton-circle-size\"] =\n `${skeletonRecipe.shapes.circle.defaultHeight}px`;\n style[\"--hjm-skeleton-background\"] = resolveColorReference(skeletonRecipe.background, palette);\n style[\"--hjm-skeleton-button-height\"] = `${skeletonRecipe.shapes.button.defaultHeight}px`;\n style[\"--hjm-skeleton-media-aspect\"] = skeletonRecipe.shapes.media.aspectRatio;\n style[\"--hjm-skeleton-lines-gap\"] = `${skeletonRecipe.lines.gap}px`;\n style[\"--hjm-skeleton-last-line-width\"] = `${skeletonRecipe.lines.lastLineWidthPercent}%`;\n style[\"--hjm-skeleton-duration\"] = `${skeletonRecipe.animation.duration}ms`;\n style[\"--hjm-skeleton-easing\"] = `cubic-bezier(${skeletonCurve.join(\", \")})`;\n style[\"--hjm-skeleton-from-opacity\"] = skeletonRecipe.animation.fromOpacity;\n style[\"--hjm-skeleton-to-opacity\"] = skeletonRecipe.animation.toOpacity;\n // Export the shared order instead of keeping a second numeric scale in CSS.\n for (const [name, value] of Object.entries(layer)) {\n style[`--hjm-layer-${kebab(name)}`] = value;\n }\n for (const [name, token] of Object.entries(profileTokens?.shadow ?? shadow)) {\n style[`--hjm-shadow-${kebab(name)}`] = shadowCss(token);\n }\n const surfaceMaterial = value.designProfile?.material.surface;\n // Defaults are emitted on every Provider, so a nested neutral profile clears\n // inherited glass/clay. Unsupported transparency remains an opaque CSS fill.\n style[\"--hjm-surface-blur\"] = surfaceMaterial?.blurStrength ? `blur(${surfaceMaterial.blurStrength * 32}px)` : \"none\";\n style[\"--hjm-surface-fill-opacity\"] = surfaceMaterial?.blurStrength ? resolveSurfaceFillOpacity(surfaceMaterial.fillOpacity, palette.theme) : 1;\n const insetShadow = surfaceMaterial?.insetShadows.length\n ? surfaceMaterial.insetShadows.map(token => `inset ${shadowCss(token, token.offsetX)}`).join(\", \")\n : \"\";\n style[\"--hjm-surface-inset-shadow\"] = insetShadow || \"none\";\n style[\"--hjm-surface-raised-shadow\"] = shadowCss(profileTokens?.shadow.floating ?? shadow.floating) + (insetShadow ? `, ${insetShadow}` : \"\");\n // BottomCTA overlaps content above it (bottomCtaRecipe rationale). Profile\n // strength is shared, but its shadow must cast upward rather than behind the\n // footer; preserve the stylesheet-only legacy path when no profile is supplied.\n style[\"--hjm-bottom-cta-shadow\"] = profileTokens\n ? shadowCss({ ...profileTokens.shadow.floating, offsetY: -Math.abs(profileTokens.shadow.floating.offsetY) })\n : \"none\";\n // Toast body metrics follow a selected profile; emit legacy values when no profile is selected\n // instead of inheriting a parent profile or changing standalone presentation.\n style[\"--hjm-toast-title-line-height\"] = profileTokens ? \"var(--hjm-type-body-line-height)\" : \"1.35\";\n style[\"--hjm-toast-description-line-height\"] = profileTokens ? \"var(--hjm-type-body-line-height)\" : \"1.45\";\n // Overlay chrome and sizes come from the recipes Native reads (1.5.0).\n for (const [name, chrome] of [[\"dialog\", dialogRecipe.content], [\"sheet\", sheetRecipe.content], [\"toast\", toastRecipe.surface]] as const) {\n style[`--hjm-${name}-background`] = resolveColorReference(chrome.background, palette);\n style[`--hjm-${name}-border`] = resolveColorReference(chrome.border, palette);\n style[`--hjm-${name}-border-width`] = `${chrome.borderWidth}px`;\n style[`--hjm-${name}-radius`] = `var(--hjm-radius-${chrome.radius})`;\n // Recipes select the floating role. Resolve its value from the profile so\n // dialogs, sheets and toasts cannot retain neutral shadows after a theme switch.\n style[`--hjm-${name}-shadow`] = shadowCss(profileTokens?.shadow.floating ?? chrome.shadow);\n }\n style[\"--hjm-immersive-background\"] = resolveColorReference(dialogRecipe.immersive.background, palette);\n style[\"--hjm-sheet-max-height\"] = `${sheetRecipe.content.maxHeightRatio * 100}dvh`;\n style[\"--hjm-sheet-max-width\"] = `${sheetRecipe.web.maxWidth}px`;\n style[\"--hjm-sheet-handle-width\"] = `${sheetRecipe.handle.width}px`;\n style[\"--hjm-sheet-handle-height\"] = `${sheetRecipe.handle.height}px`;\n style[\"--hjm-sheet-handle-color\"] = resolveColorReference(sheetRecipe.handle.color, palette);\n for (const [name, ratio] of Object.entries(sheetRecipe.sizes)) {\n if (ratio !== null) style[`--hjm-sheet-size-${name}`] = `${ratio * 100}dvh`;\n }\n // Toast badge/action colours resolve from the recipe so Web and Native share one tone table (1.10.0).\n for (const [tone, contract] of Object.entries(toastRecipe.tones)) {\n style[`--hjm-toast-accent-${tone}`] = resolveColorReference(contract.accent, palette);\n style[`--hjm-toast-badge-${tone}`] = resolveColorReference(contract.badge, palette);\n }\n // Text emphasis steps come from textRecipe so Web and Native share one scale (400/500/500 since the 2026-10-17 lighter scale).\n for (const [step, weight] of Object.entries(textRecipe.emphasis)) style[`--hjm-text-emphasis-${step}`] = weight;\n style[\"--hjm-toast-badge-size\"] = `${toastRecipe.icon.badgeDiameter}px`;\n // First-line anchor geometry (2026-10-17): the same padding, anchor and close overhang Native reads.\n style[\"--hjm-toast-padding-block\"] = `${toastRecipe.surface.padding.block}px`;\n style[\"--hjm-toast-padding-inline\"] = `${toastRecipe.surface.padding.inline}px`;\n style[\"--hjm-toast-anchor-size\"] = `${toastRecipe.anchor.blockSize}px`;\n style[\"--hjm-toast-close-size\"] = `${toastRecipe.close.diameter}px`;\n style[\"--hjm-toast-close-block-overhang\"] = `${toastRecipe.close.blockOverhang}px`;\n style[\"--hjm-toast-close-inline-overhang\"] = `${toastRecipe.close.inlineOverhang}px`;\n style[\"--hjm-toast-action-background\"] = resolveColorReference(toastRecipe.action.background, palette);\n style[\"--hjm-toast-action-color\"] = resolveColorReference(toastRecipe.action.color, palette);\n style[\"--hjm-toast-description-color\"] = resolveColorReference(toastRecipe.description.color, palette);\n // Panel toast (2026-10-10): media column, step progress and action alignment come from the same recipe Native reads.\n style[\"--hjm-toast-media-size\"] = `${toastRecipe.media.size}px`;\n style[\"--hjm-toast-action-align\"] = toastRecipe.action.align;\n style[\"--hjm-toast-pressed-opacity\"] = toastRecipe.states.pressedOpacity;\n style[\"--hjm-toast-progress-gap\"] = `${toastRecipe.progress.gap}px`;\n style[\"--hjm-toast-progress-dot\"] = `${toastRecipe.progress.dotSize}px`;\n style[\"--hjm-toast-progress-current-scale\"] = String(toastRecipe.progress.currentScale);\n style[\"--hjm-toast-progress-done\"] = resolveColorReference(toastRecipe.progress.doneColor, palette);\n style[\"--hjm-toast-progress-upcoming\"] = resolveColorReference(toastRecipe.progress.upcomingColor, palette);\n style[\"--hjm-toast-progress-label\"] = resolveColorReference(toastRecipe.progress.labelColor, palette);\n style[\"--hjm-toast-progress-current-label\"] = resolveColorReference(toastRecipe.progress.currentLabelColor, palette);\n const toastExit = toastRecipe.transition.web.exit;\n style[\"--hjm-toast-exit-duration\"] = environment.reducedMotion ? \"0ms\" : `${toastExit.duration}ms`;\n style[\"--hjm-toast-exit-easing\"] = `cubic-bezier(${easing[toastExit.easing].join(\", \")})`;\n // SearchField geometry comes from searchFieldRecipe (2026-10-06 follow-up). Web had drawn TextField's\n // 16px padding for both sizes and a 44px clear button even at `medium`, where the recipe and Native\n // use a 36 circle with a 4px hit slop (44 target, 36 footprint).\n for (const [name, size] of Object.entries(searchFieldRecipe.sizes)) {\n style[`--hjm-search-field-padding-${name}`] = `${size.paddingHorizontal}px`;\n style[`--hjm-search-field-gap-${name}`] = `${size.gap}px`;\n style[`--hjm-search-field-clear-${name}`] = `${size.clearDiameter}px`;\n style[`--hjm-search-field-clear-slop-${name}`] = `${size.clearHitSlop}px`;\n }\n style[\"--hjm-tooltip-max-width\"] = `${tooltipRecipe.content.maxWidth}px`;\n style[\"--hjm-tooltip-padding\"] = `${tooltipRecipe.surface.padding}px`;\n // Floating collection surfaces read their padding from the recipe (2026-10-06): the stylesheet's 4 had drifted from 8.\n style[\"--hjm-menu-padding\"] = `${menuRecipe.surface.padding}px`;\n style[\"--hjm-select-popover-padding\"] = `${selectRecipe.popover.padding}px`;\n style[\"--hjm-combobox-popover-padding\"] = `${comboboxRecipe.popover.padding}px`;\n style[\"--hjm-tooltip-collision-padding\"] = `${tooltipRecipe.positioning.collisionPadding}px`;\n style[\"--hjm-button-pressed-opacity\"] = buttonRecipe.opacity.pressed;\n style[\"--hjm-button-disabled-opacity\"] = buttonRecipe.opacity.disabled;\n style[\"--hjm-field-border-width\"] = `${fieldRecipe.borderWidth}px`;\n style[\"--hjm-field-invalid-border-width\"] = `${fieldRecipe.states.invalid.borderWidth}px`;\n style[\"--hjm-field-focus-ring-width\"] = `${fieldRecipe.focusRingWidth}px`;\n style[\"--hjm-field-disabled-opacity\"] = fieldRecipe.disabledOpacity;\n style[\"--hjm-control-min-touch-target\"] = `${control.minTouchTarget}px`;\n style[\"--hjm-control-field-height\"] = `${control.fieldHeight}px`;\n style[\"--hjm-field-multiline-min-height\"] = rem(fieldRecipe.multilineMinHeight);\n style[\"--hjm-field-padding-block\"] = rem(fieldRecipe.paddingVertical);\n for (const [name, value] of Object.entries(control.buttonHeight)) {\n // The axis is applied to the emitted variables rather than to each rule so\n // that every stylesheet consumer of a control height honours it at once.\n style[`--hjm-control-button-${kebab(name)}`] =\n `${visibleControlHeight(value, environment.minimumVisualTarget)}px`;\n }\n // Edge alignment (2026-10-17 measured audit): how far a ghost IconButton / Button with `edge` overhangs the\n // container edge, from the same contract helpers Native reads (glyph slot or label on the inset, hit area kept).\n for (const size of Object.keys(iconButtonRecipe.sizes) as (keyof typeof iconButtonRecipe.sizes)[]) {\n const visible = visibleControlHeight(iconButtonRecipe.sizes[size].diameter, environment.minimumVisualTarget);\n style[`--hjm-icon-button-edge-${size}`] = `${resolveIconButtonEdgeOverhang(\"ghost\", size, visible)}px`;\n }\n for (const size of Object.keys(buttonRecipe.sizes) as (keyof typeof buttonRecipe.sizes)[]) {\n style[`--hjm-button-edge-${size}`] = `${resolveButtonEdgeOverhang(\"ghost\", size)}px`;\n }\n\n return style;\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type TimePickerOptions } from "@hjmds/design-contracts/components/time-picker";
|
|
2
|
+
import type { HjmCompositionStyleProp } from "./composition-style.js";
|
|
3
|
+
export type TimePickerProps = TimePickerOptions & Readonly<{
|
|
4
|
+
layoutStyle?: HjmCompositionStyleProp;
|
|
5
|
+
className?: string;
|
|
6
|
+
}>;
|
|
7
|
+
/** One draft and one confirmation for both columns. Inline mode delegates confirmation to its form. */
|
|
8
|
+
export declare function TimePicker(props: TimePickerProps): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=time-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-picker.d.ts","sourceRoot":"","sources":["../src/time-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkG,KAAK,iBAAiB,EAAuB,MAAM,gDAAgD,CAAC;AAI7M,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,MAAM,eAAe,GAAG,iBAAiB,GAAG,QAAQ,CAAC;IAAE,WAAW,CAAC,EAAE,uBAAuB,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE1H,uGAAuG;AACvG,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BA4DhD"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
4
|
+
import { timePickerDraft, timePickerItems, resolveTimePickerValue, validateTimePicker, timePickerRecipe } from "@hjmds/design-contracts/components/time-picker";
|
|
5
|
+
import { Button } from "./actions.js";
|
|
6
|
+
import { Icon } from "./supplemental-display.js";
|
|
7
|
+
import { Popover } from "./popover.js";
|
|
8
|
+
/** One draft and one confirmation for both columns. Inline mode delegates confirmation to its form. */
|
|
9
|
+
export function TimePicker(props) {
|
|
10
|
+
validateTimePicker(props);
|
|
11
|
+
const { value, onValueChange, labels, disabled, readOnly, description, error, presentation = "field", layoutStyle, className } = props;
|
|
12
|
+
const [open, setOpen] = useState(false), [draft, setDraft] = useState(() => timePickerDraft(value));
|
|
13
|
+
const locked = !!(disabled || readOnly);
|
|
14
|
+
const panelRef = useRef(null), firstRef = useRef(null);
|
|
15
|
+
const emitted = useRef(null);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
// Preserve an incomplete inline draft when the parent echoes its null validity value.
|
|
18
|
+
if (presentation === "inline" && emitted.current?.value === value) {
|
|
19
|
+
emitted.current = null;
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
emitted.current = null;
|
|
23
|
+
setDraft(timePickerDraft(value));
|
|
24
|
+
}, [value, open, presentation]);
|
|
25
|
+
useEffect(() => { if (locked)
|
|
26
|
+
setOpen(false); }, [locked]);
|
|
27
|
+
const resolved = resolveTimePickerValue(draft, props);
|
|
28
|
+
useLayoutEffect(() => {
|
|
29
|
+
panelRef.current?.querySelectorAll('[role="listbox"]').forEach(list => {
|
|
30
|
+
const selected = list.querySelector('[aria-selected="true"]');
|
|
31
|
+
if (selected)
|
|
32
|
+
list.scrollTop = Math.max(0, selected.offsetTop - (list.clientHeight - selected.offsetHeight) / 2);
|
|
33
|
+
});
|
|
34
|
+
}, [draft.hour, draft.minute, open]);
|
|
35
|
+
function select(part, next) {
|
|
36
|
+
if (locked)
|
|
37
|
+
return;
|
|
38
|
+
const updated = { ...draft, [part]: next };
|
|
39
|
+
setDraft(updated);
|
|
40
|
+
const result = resolveTimePickerValue(updated, props);
|
|
41
|
+
if (presentation === "inline") {
|
|
42
|
+
emitted.current = { value: result };
|
|
43
|
+
onValueChange(result);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
const panel = _jsxs("div", { style: { "--hjm-time-row": `${timePickerRecipe.rowHeight}px`, "--hjm-time-height": `${timePickerRecipe.rowHeight * timePickerRecipe.visibleRows}px`, "--hjm-time-summary": `${timePickerRecipe.readoutSize}px`, "--hjm-time-summary-line-height": `${timePickerRecipe.readoutLineHeight}px`, maxWidth: timePickerRecipe.panelWidth }, ref: panelRef, className: "hjm-time-picker__panel", role: "group", "aria-label": labels.label, children: [_jsxs("div", { className: "hjm-time-picker__readout", "aria-live": "polite", "aria-atomic": "true", children: [draft.hour ?? "--", _jsx("span", { children: ":" }), draft.minute ?? "--"] }), _jsx("div", { className: "hjm-time-picker__columns", children: ["hour", "minute"].map(part => {
|
|
47
|
+
const items = timePickerItems(part, draft, props);
|
|
48
|
+
const active = items.find(item => item.value === draft[part] && !item.disabled)?.value ?? items.find(item => !item.disabled)?.value;
|
|
49
|
+
return _jsxs("div", { className: "hjm-time-picker__column", children: [_jsx("div", { className: "hjm-time-picker__caption", children: labels[part] }), _jsx("div", { role: "listbox", "aria-label": labels[part], "aria-disabled": locked, className: "hjm-time-picker__list", children: items.map(item => _jsx("button", { ref: part === "hour" && item.value === active ? firstRef : undefined, type: "button", role: "option", "aria-selected": draft[part] === item.value, "aria-label": `${item.value} ${labels[part]}`, disabled: locked || item.disabled, tabIndex: item.value === active ? 0 : -1, onClick: () => select(part, item.value), onFocus: e => {
|
|
50
|
+
const list = e.currentTarget.parentElement;
|
|
51
|
+
const row = e.currentTarget;
|
|
52
|
+
if (row.offsetTop < list.scrollTop)
|
|
53
|
+
list.scrollTop = row.offsetTop;
|
|
54
|
+
else if (row.offsetTop + row.offsetHeight > list.scrollTop + list.clientHeight)
|
|
55
|
+
list.scrollTop = row.offsetTop + row.offsetHeight - list.clientHeight;
|
|
56
|
+
}, onKeyDown: e => {
|
|
57
|
+
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(e.key))
|
|
58
|
+
return;
|
|
59
|
+
e.preventDefault();
|
|
60
|
+
const enabled = Array.from(e.currentTarget.parentElement.querySelectorAll('button:not(:disabled)'));
|
|
61
|
+
const index = enabled.indexOf(e.currentTarget);
|
|
62
|
+
const target = e.key === "Home" ? enabled[0] : e.key === "End" ? enabled.at(-1) : enabled[index + (e.key === "ArrowDown" ? 1 : -1)];
|
|
63
|
+
if (target) {
|
|
64
|
+
target.focus();
|
|
65
|
+
select(part, target.textContent);
|
|
66
|
+
}
|
|
67
|
+
}, children: item.value }, item.value)) })] }, part);
|
|
68
|
+
}) }), presentation === "field" ? _jsx(Button, { disabled: locked || resolved === null, onClick: () => { const current = resolveTimePickerValue(draft, props); if (!locked && current !== null) {
|
|
69
|
+
onValueChange(current);
|
|
70
|
+
setOpen(false);
|
|
71
|
+
} }, children: labels.confirm }) : null] });
|
|
72
|
+
return _jsxs("div", { className: `hjm-time-picker ${className ?? ""}`, style: layoutStyle, "data-disabled": disabled || undefined, children: [presentation === "inline" ? panel : _jsxs(_Fragment, { children: [_jsx("span", { className: "hjm-time-picker__label", children: labels.label }), _jsx(Popover, { title: labels.label, closeLabel: labels.cancel, closeIcon: _jsx(Icon, { name: "close" }), open: open, onOpenChange: setOpen, initialFocusRef: firstRef, trigger: _jsx("button", { type: "button", className: "hjm-time-picker__trigger", disabled: locked, "aria-label": `${labels.label}, ${value ?? labels.placeholder}`, "aria-invalid": !!error, children: _jsx("span", { children: value ?? labels.placeholder }) }), children: panel })] }), description ? _jsx("span", { className: "hjm-time-picker__description", children: description }) : null, error ? _jsx("span", { role: "alert", className: "hjm-time-picker__error", children: error }) : null] });
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=time-picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-picker.js","sourceRoot":"","sources":["../src/time-picker.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,Q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C,OAAO,CAAC,KAAK,CAAC,CAAC;gBAAC,CAAC,CAAC,CAAC,YAAG,MAAM,CAAC,OAAO,GAAU,CAAC,CAAC,CAAC,IAAI,IAC9P,CAAC;IACP,OAAO,eAAK,SAAS,EAAE,mBAAmB,SAAS,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,mBAAiB,QAAQ,IAAI,SAAS,aAClH,YAAY,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,8BAAE,eAAM,SAAS,EAAC,wBAAwB,YAAE,MAAM,CAAC,KAAK,GAAQ,EAAA,KAAC,OAAO,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAC1P,OAAO,EAAE,iBAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,0BAA0B,EAAC,QAAQ,EAAE,MAAM,gBAAc,GAAG,MAAM,CAAC,KAAK,KAAK,KAAK,IAAI,MAAM,CAAC,WAAW,EAAE,kBAAgB,CAAC,CAAC,KAAK,YAAE,yBAAO,KAAK,IAAI,MAAM,CAAC,WAAW,GAAQ,GAAS,YAAG,KAAK,GAAW,IAAG,EACtP,WAAW,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,8BAA8B,YAAE,WAAW,GAAQ,CAAC,CAAC,CAAC,IAAI,EACxF,KAAK,CAAC,CAAC,CAAC,eAAM,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,wBAAwB,YAAE,KAAK,GAAQ,CAAC,CAAC,CAAC,IAAI,IAChF,CAAC;AACT,CAAC","sourcesContent":["\"use client\";\nimport { useEffect, useLayoutEffect, useRef, useState, type CSSProperties } from \"react\";\nimport { timePickerDraft, timePickerItems, resolveTimePickerValue, validateTimePicker, timePickerRecipe, type TimePickerOptions, type TimePickerPart } from \"@hjmds/design-contracts/components/time-picker\";\nimport { Button } from \"./actions.js\";\nimport { Icon } from \"./supplemental-display.js\";\nimport { Popover } from \"./popover.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type TimePickerProps = TimePickerOptions & Readonly<{ layoutStyle?: HjmCompositionStyleProp; className?: string }>;\n\n/** One draft and one confirmation for both columns. Inline mode delegates confirmation to its form. */\nexport function TimePicker(props: TimePickerProps) {\n validateTimePicker(props);\n const { value, onValueChange, labels, disabled, readOnly, description, error, presentation = \"field\", layoutStyle, className } = props;\n const [open, setOpen] = useState(false), [draft, setDraft] = useState(() => timePickerDraft(value));\n const locked = !!(disabled || readOnly);\n const panelRef = useRef<HTMLDivElement>(null), firstRef = useRef<HTMLButtonElement>(null);\n const emitted = useRef<{ value: string | null } | null>(null);\n useEffect(() => {\n // Preserve an incomplete inline draft when the parent echoes its null validity value.\n if (presentation === \"inline\" && emitted.current?.value === value) { emitted.current = null; return; }\n emitted.current = null; setDraft(timePickerDraft(value));\n }, [value, open, presentation]);\n useEffect(() => { if (locked) setOpen(false); }, [locked]);\n const resolved = resolveTimePickerValue(draft, props);\n useLayoutEffect(() => {\n panelRef.current?.querySelectorAll<HTMLElement>('[role=\"listbox\"]').forEach(list => {\n const selected = list.querySelector<HTMLElement>('[aria-selected=\"true\"]');\n if (selected) list.scrollTop = Math.max(0, selected.offsetTop - (list.clientHeight - selected.offsetHeight) / 2);\n });\n }, [draft.hour, draft.minute, open]);\n function select(part: TimePickerPart, next: string) {\n if (locked) return;\n const updated = { ...draft, [part]: next }; setDraft(updated);\n const result = resolveTimePickerValue(updated, props);\n if (presentation === \"inline\") { emitted.current = { value: result }; onValueChange(result); }\n }\n const panel = <div style={{ \"--hjm-time-row\": `${timePickerRecipe.rowHeight}px`, \"--hjm-time-height\": `${timePickerRecipe.rowHeight * timePickerRecipe.visibleRows}px`, \"--hjm-time-summary\": `${timePickerRecipe.readoutSize}px`, \"--hjm-time-summary-line-height\": `${timePickerRecipe.readoutLineHeight}px`, maxWidth: timePickerRecipe.panelWidth } as CSSProperties} ref={panelRef} className=\"hjm-time-picker__panel\" role=\"group\" aria-label={labels.label}>\n <div className=\"hjm-time-picker__readout\" aria-live=\"polite\" aria-atomic=\"true\">{draft.hour ?? \"--\"}<span>:</span>{draft.minute ?? \"--\"}</div>\n <div className=\"hjm-time-picker__columns\">\n {([\"hour\", \"minute\"] as const).map(part => {\n const items = timePickerItems(part, draft, props);\n const active = items.find(item => item.value === draft[part] && !item.disabled)?.value ?? items.find(item => !item.disabled)?.value;\n return <div key={part} className=\"hjm-time-picker__column\"><div className=\"hjm-time-picker__caption\">{labels[part]}</div>\n <div role=\"listbox\" aria-label={labels[part]} aria-disabled={locked} className=\"hjm-time-picker__list\">\n {items.map(item => <button key={item.value} ref={part === \"hour\" && item.value === active ? firstRef : undefined} type=\"button\" role=\"option\"\n aria-selected={draft[part] === item.value} aria-label={`${item.value} ${labels[part]}`} disabled={locked || item.disabled} tabIndex={item.value === active ? 0 : -1}\n onClick={() => select(part, item.value)} onFocus={e => {\n const list = e.currentTarget.parentElement!; const row = e.currentTarget;\n if (row.offsetTop < list.scrollTop) list.scrollTop = row.offsetTop;\n else if (row.offsetTop + row.offsetHeight > list.scrollTop + list.clientHeight) list.scrollTop = row.offsetTop + row.offsetHeight - list.clientHeight;\n }}\n onKeyDown={e => {\n if (![\"ArrowDown\", \"ArrowUp\", \"Home\", \"End\"].includes(e.key)) return;\n e.preventDefault();\n const enabled = Array.from(e.currentTarget.parentElement!.querySelectorAll<HTMLButtonElement>('button:not(:disabled)'));\n const index = enabled.indexOf(e.currentTarget);\n const target = e.key === \"Home\" ? enabled[0] : e.key === \"End\" ? enabled.at(-1) : enabled[index + (e.key === \"ArrowDown\" ? 1 : -1)];\n if (target) { target.focus(); select(part, target.textContent!); }\n }}>{item.value}</button>)}\n </div></div>;\n })}\n </div>\n {presentation === \"field\" ? <Button disabled={locked || resolved === null} onClick={() => { const current = resolveTimePickerValue(draft, props); if (!locked && current !== null) { onValueChange(current); setOpen(false); } }}>{labels.confirm}</Button> : null}\n </div>;\n return <div className={`hjm-time-picker ${className ?? \"\"}`} style={layoutStyle} data-disabled={disabled || undefined}>\n {presentation === \"inline\" ? panel : <><span className=\"hjm-time-picker__label\">{labels.label}</span><Popover title={labels.label} closeLabel={labels.cancel} closeIcon={<Icon name=\"close\" />} open={open} onOpenChange={setOpen} initialFocusRef={firstRef}\n trigger={<button type=\"button\" className=\"hjm-time-picker__trigger\" disabled={locked} aria-label={`${labels.label}, ${value ?? labels.placeholder}`} aria-invalid={!!error}><span>{value ?? labels.placeholder}</span></button>}>{panel}</Popover></>}\n {description ? <span className=\"hjm-time-picker__description\">{description}</span> : null}\n {error ? <span role=\"alert\" className=\"hjm-time-picker__error\">{error}</span> : null}\n </div>;\n}\n"]}
|
package/dist/top-bar.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export type TopBarProps = Omit<HTMLAttributes<HTMLDivElement>, "title" | "childr
|
|
|
18
18
|
actions?: ReactNode;
|
|
19
19
|
centered?: boolean;
|
|
20
20
|
safeAreaTop?: number;
|
|
21
|
+
/** Share a product scene behind the bar without replacing its layout or controls. */
|
|
22
|
+
surface?: "default" | "transparent";
|
|
21
23
|
/** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */
|
|
22
24
|
layoutStyle?: HjmCompositionStyleProp;
|
|
23
25
|
}>;
|
|
@@ -39,6 +41,8 @@ export declare const TopBar: import("react").ForwardRefExoticComponent<Omit<HTML
|
|
|
39
41
|
actions?: ReactNode;
|
|
40
42
|
centered?: boolean;
|
|
41
43
|
safeAreaTop?: number;
|
|
44
|
+
/** Share a product scene behind the bar without replacing its layout or controls. */
|
|
45
|
+
surface?: "default" | "transparent";
|
|
42
46
|
/** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */
|
|
43
47
|
layoutStyle?: HjmCompositionStyleProp;
|
|
44
48
|
}> & import("react").RefAttributes<HTMLDivElement>>;
|
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;AAEpH,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAI9E,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,uFAAuF;IACvF,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,4GAA4G;IAC5G,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,YAAY,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACpD,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACrC,kHAAkH;IAClH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,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;
|
|
1
|
+
{"version":3,"file":"top-bar.d.ts","sourceRoot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,CAAC,iBAAiB,CAAC;8BACzB,MAAM;mBACjB,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;IACpC,kHAAkH;WAC3G,UAAU;cACP,SAAS;eACR,SAAS;cACV,SAAS;eACR,OAAO;kBACJ,MAAM;IACpB,qFAAqF;cAC3E,SAAS,GAAG,aAAa;IACnC,gGAAgG;kBAClF,uBAAuB;mDAyCrC,CAAC"}
|
package/dist/top-bar.js
CHANGED
|
@@ -7,7 +7,7 @@ import { validateScreenExit } from "@hjmds/design-contracts/screen-patterns";
|
|
|
7
7
|
import { classNames } from "./internal.js";
|
|
8
8
|
import { useOptionalHjmTheme } from "./provider.js";
|
|
9
9
|
/** Screen chrome stays composable inside pages and dialogs, without adding a second banner landmark. */
|
|
10
|
-
export const TopBar = forwardRef(function TopBar({ title, titleContent, subtitle, titleLeading, onTitleClick, titleAccessibilityLabel, headingLevel = 1, exit, leading: leadingSlot, trailing, actions, centered = topBarRecipe.defaults.centered, safeAreaTop = 0, className, style, layoutStyle, ...props }, ref) {
|
|
10
|
+
export const TopBar = forwardRef(function TopBar({ title, titleContent, subtitle, titleLeading, onTitleClick, titleAccessibilityLabel, headingLevel = 1, exit, leading: leadingSlot, trailing, actions, centered = topBarRecipe.defaults.centered, safeAreaTop = 0, surface = "default", className, style, layoutStyle, ...props }, ref) {
|
|
11
11
|
const theme = useOptionalHjmTheme();
|
|
12
12
|
if (exit)
|
|
13
13
|
validateScreenExit(exit, leadingSlot !== undefined);
|
|
@@ -29,7 +29,7 @@ export const TopBar = forwardRef(function TopBar({ title, titleContent, subtitle
|
|
|
29
29
|
throw new TypeError("TopBar title affordances require a title");
|
|
30
30
|
}
|
|
31
31
|
const Heading = `h${headingLevel}`;
|
|
32
|
-
return _jsxs("div", { ...props, ref: ref, className: classNames("hjm-top-bar", className), "data-centered": centered, "data-large-text": (theme?.environment.textScale ?? 1) >= topBarRecipe.largeTextThreshold, style: {
|
|
32
|
+
return _jsxs("div", { ...props, ref: ref, className: classNames("hjm-top-bar", className), "data-surface": surface, "data-centered": centered, "data-large-text": (theme?.environment.textScale ?? 1) >= topBarRecipe.largeTextThreshold, style: {
|
|
33
33
|
"--hjm-top-bar-min-height": `${topBarRecipe.minHeight}px`,
|
|
34
34
|
"--hjm-top-bar-padding": `${topBarRecipe.paddingHorizontal}px`,
|
|
35
35
|
"--hjm-top-bar-gap": `${topBarRecipe.gap}px`,
|
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,gBAAgB,EAAmB,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,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,gBAAgB,EAAmB,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AA0BpD,wGAAwG;AACxG,MAAM,CAAC,MA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AO,EAAC,OAAO,EAAE,YAAY,gBAAc,uBAAuB,EAAE,OAAO,EAAE,YAAY,YAAG,KAAK,GAAU;wBACtI,CAAC,CAAC,8BAAkB,uBAAuB,aAAG,YAAY,EAAE,KAAK,IAAQ,GACnE,CAAC,GACP,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 { ScreenExitButton, type ScreenExit } from \"./internal/screen-exit.js\";\nimport { validateScreenExit } from \"@hjmds/design-contracts/screen-patterns\";\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 /** @deprecated Header supporting copy is no longer displayed; retained until the next major API cleanup. */\n subtitle?: string;\n titleLeading?: ReactNode;\n onTitleClick?: MouseEventHandler<HTMLButtonElement>;\n titleAccessibilityLabel?: string;\n headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n /** Leaving this screen: icon-only back/close fixed at the leading edge (2026-10-17). Exclusive with `leading`. */\n exit?: ScreenExit;\n leading?: ReactNode;\n trailing?: ReactNode;\n actions?: ReactNode;\n centered?: boolean;\n safeAreaTop?: number;\n /** Share a product scene behind the bar without replacing its layout or controls. */\n surface?: \"default\" | \"transparent\";\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 exit, leading: leadingSlot, trailing, actions, centered = topBarRecipe.defaults.centered, safeAreaTop = 0,\n surface = \"default\", className, style, layoutStyle, ...props\n}, ref) {\n const theme = useOptionalHjmTheme();\n if (exit) validateScreenExit(exit, leadingSlot !== undefined);\n const leading = exit ? <ScreenExitButton {...exit} /> : leadingSlot;\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-surface={surface} 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 </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.35.0",
|
|
4
4
|
"description": "Accessible React 19 renderers for HJM design contracts.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -588,6 +588,16 @@
|
|
|
588
588
|
"types": "./dist/conversation-row.d.ts",
|
|
589
589
|
"import": "./dist/conversation-row.js",
|
|
590
590
|
"default": "./dist/conversation-row.js"
|
|
591
|
+
},
|
|
592
|
+
"./shortcut-rail": {
|
|
593
|
+
"types": "./dist/shortcut-rail.d.ts",
|
|
594
|
+
"import": "./dist/shortcut-rail.js",
|
|
595
|
+
"default": "./dist/shortcut-rail.js"
|
|
596
|
+
},
|
|
597
|
+
"./time-picker": {
|
|
598
|
+
"types": "./dist/time-picker.d.ts",
|
|
599
|
+
"import": "./dist/time-picker.js",
|
|
600
|
+
"default": "./dist/time-picker.js"
|
|
591
601
|
}
|
|
592
602
|
},
|
|
593
603
|
"files": [
|
|
@@ -598,7 +608,7 @@
|
|
|
598
608
|
"THIRD_PARTY_NOTICES.md"
|
|
599
609
|
],
|
|
600
610
|
"peerDependencies": {
|
|
601
|
-
"@hjmds/design-contracts": ">=1.
|
|
611
|
+
"@hjmds/design-contracts": ">=1.35.0 <1.36.0",
|
|
602
612
|
"react": ">=19.0.0",
|
|
603
613
|
"react-dom": ">=19.0.0",
|
|
604
614
|
"@number-flow/react": "0.6.2",
|
|
@@ -614,28 +624,29 @@
|
|
|
614
624
|
"lucide-react": "1.49.0"
|
|
615
625
|
},
|
|
616
626
|
"devDependencies": {
|
|
617
|
-
"@types/node": "^24.
|
|
618
|
-
"@types/react": "^19.
|
|
619
|
-
"@types/react-dom": "^19.
|
|
620
|
-
"@vitest/browser-playwright": "^
|
|
621
|
-
"playwright": "^1.
|
|
622
|
-
"react": "19.
|
|
623
|
-
"react-dom": "19.
|
|
627
|
+
"@types/node": "^24.19.2",
|
|
628
|
+
"@types/react": "^19.3.0",
|
|
629
|
+
"@types/react-dom": "^19.3.0",
|
|
630
|
+
"@vitest/browser-playwright": "^5.0.5",
|
|
631
|
+
"playwright": "^1.64.1",
|
|
632
|
+
"react": "19.3.1",
|
|
633
|
+
"react-dom": "19.3.1",
|
|
624
634
|
"typescript": "^5.9.3",
|
|
625
|
-
"vitest": "^
|
|
635
|
+
"vitest": "^5.0.5",
|
|
626
636
|
"@number-flow/react": "0.6.2",
|
|
627
637
|
"bloom-menu": "0.1.0",
|
|
628
|
-
"framer-motion": "13.
|
|
638
|
+
"framer-motion": "13.5.1",
|
|
629
639
|
"qrcode-generator": "2.0.4",
|
|
630
|
-
"@dnd-kit/react": "0.5.
|
|
640
|
+
"@dnd-kit/react": "0.5.1",
|
|
631
641
|
"embla-carousel-react": "8.6.0",
|
|
632
642
|
"canvas-confetti": "1.9.4",
|
|
633
643
|
"@types/canvas-confetti": "1.9.0",
|
|
634
|
-
"@dnd-kit/dom": "0.5.
|
|
644
|
+
"@dnd-kit/dom": "0.5.1",
|
|
635
645
|
"blobatar": "2.7.0",
|
|
636
646
|
"@blobatar/react": "2.7.0",
|
|
637
|
-
"lucide-react": "1.
|
|
638
|
-
"
|
|
647
|
+
"lucide-react": "1.59.0",
|
|
648
|
+
"vite": "8.3.4",
|
|
649
|
+
"@hjmds/design-contracts": "1.35.0"
|
|
639
650
|
},
|
|
640
651
|
"peerDependenciesMeta": {
|
|
641
652
|
"@number-flow/react": {
|