@hjmds/react 1.35.0 → 1.36.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.
@@ -23,11 +23,13 @@ export type RepeatableFieldGroupProps = Omit<FieldGroupProps, "renderField"> & R
23
23
  removeLabel: (id: string) => string;
24
24
  minFields?: number;
25
25
  maxFields?: number;
26
+ /** A referenced row may stay editable while removal is unavailable (Utilverse expense participants). */
27
+ isRemoveDisabled?: (id: string) => boolean;
26
28
  /** Return the new stable id to focus after the controlled descriptor includes it. */
27
29
  onAdd: () => string | undefined;
28
30
  onRemove: (id: string) => void;
29
31
  }>;
30
- export declare function RepeatableFieldGroup({ renderField, addLabel, removeLabel, minFields, maxFields, onAdd, onRemove, ...props }: RepeatableFieldGroupProps): import("react").JSX.Element;
32
+ export declare function RepeatableFieldGroup({ renderField, addLabel, removeLabel, minFields, maxFields, isRemoveDisabled, onAdd, onRemove, ...props }: RepeatableFieldGroupProps): import("react").JSX.Element;
31
33
  export type SelectionActionBarProps = Readonly<{
32
34
  selectedIds: readonly string[];
33
35
  selectionLabel: (count: number) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"collection-editing.d.ts","sourceRoot":"","sources":["../src/collection-editing.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAuD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5F,OAAO,EAA8H,KAAK,aAAa,EAAE,KAAK,oBAAoB,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAM/Q,OAAO,EAAc,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAO5F,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACrC,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;I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CAAC,CAAC;CAC5E,CAAC,CAAC;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,sCAmBhE;AAED,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC9E,WAAW,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,MAAM,CAAC;IAAC,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrG,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACxC,CAAC,CAAC;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,+BASxD;AAED,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS,aAAa,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACrE,YAAY,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,MAAM,CAAC;IAAC,UAAU,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,MAAM,CAAC;IAC/F,eAAe,EAAE,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,KAAK,IAAI,CAAC;CAC9D,CAAC,CAAC;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,+BAiBlE"}
@@ -54,7 +54,7 @@ function InlineEditBody(props) {
54
54
  }
55
55
  } }), _jsxs(Stack, { axis: "inline", gap: "sm", wrap: true, children: [_jsx(Button, { tone: "ghost", disabled: action.pending, onClick: close, children: props.cancelLabel }), _jsx(Button, { loading: action.pending, disabled: props.disabled === true || !!error, onClick: () => void save(), children: props.saveLabel })] }), action.failed ? _jsx(ErrorMessage, { children: props.errorLabel }) : null] }) });
56
56
  }
57
- export function RepeatableFieldGroup({ renderField, addLabel, removeLabel, minFields = 0, maxFields = Infinity, onAdd, onRemove, ...props }) {
57
+ export function RepeatableFieldGroup({ renderField, addLabel, removeLabel, minFields = 0, maxFields = Infinity, isRemoveDisabled, onAdd, onRemove, ...props }) {
58
58
  const targets = useRef(new Map()), add = useRef(null);
59
59
  const focus = useRef(undefined);
60
60
  useLayoutEffect(() => {
@@ -70,15 +70,15 @@ export function RepeatableFieldGroup({ renderField, addLabel, removeLabel, minFi
70
70
  }
71
71
  });
72
72
  const fields = props.descriptor.fields;
73
- const live = useRef(true), policy = useRef({ fields, minFields, maxFields, onAdd, onRemove, disabled: props.descriptor.disabled });
74
- policy.current = { fields, minFields, maxFields, onAdd, onRemove, disabled: props.descriptor.disabled };
73
+ const live = useRef(true), policy = useRef({ fields, minFields, maxFields, isRemoveDisabled, onAdd, onRemove, disabled: props.descriptor.disabled });
74
+ policy.current = { fields, minFields, maxFields, isRemoveDisabled, onAdd, onRemove, disabled: props.descriptor.disabled };
75
75
  useEffect(() => { live.current = true; return () => { live.current = false; }; }, []);
76
76
  return _jsxs(Stack, { gap: collectionEditingRecipe.gap, children: [_jsx(FieldGroup, { ...props, renderField: binding => _jsxs(Stack, { axis: "inline", gap: "xs", align: "end", children: [_jsx("div", { style: { flex: 1, minInlineSize: 0 }, children: renderField({ ...binding, focusRef: target => { if (target)
77
77
  targets.current.set(binding.id, target);
78
78
  else
79
- targets.current.delete(binding.id); } }) }), _jsx(IconButton, { label: removeLabel(binding.id), tone: "ghost", edge: "end", disabled: binding.controlProps.disabled || fields.length <= minFields, onClick: binding.guardChange(() => {
79
+ targets.current.delete(binding.id); } }) }), _jsx(IconButton, { label: removeLabel(binding.id), tone: "ghost", edge: "end", disabled: binding.controlProps.disabled || fields.length <= minFields || isRemoveDisabled?.(binding.id) === true, onClick: binding.guardChange(() => {
80
80
  const current = policy.current;
81
- if (!live.current || current.disabled || current.fields.length <= current.minFields)
81
+ if (!live.current || current.disabled || current.fields.length <= current.minFields || current.isRemoveDisabled?.(binding.id))
82
82
  return;
83
83
  focus.current = focusAfterRemoval(current.fields.map(field => field.id), binding.id, current.fields.filter(field => field.disabled).map(field => field.id)) ?? null;
84
84
  current.onRemove(binding.id);
@@ -1 +1 @@
1
- {"version":3,"file":"collection-editing.js","sourceRoot":"","sources":["../src/collection-editing.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAyF,MAAM,4CAA4C,CAAC;AAC/Q,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAgD,MAAM,kBAAkB,CAAC;AAG5F,SAAS,YAAY,CAAC,EAAE,QAAQ,EAA2B;IACzD,OAAO,cAAK,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAE,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,YAAE,QAAQ,GAAQ,GAAM,CAAC;AAC9I,CAAC;AAQD,MAAM,UAAU,UAAU,CAAC,KAAsB,IAAI,OAAO,KAAC,cAAc,OAAoB,KAAK,IAAnB,KAAK,CAAC,EAAE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MAAM,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,GAAI,EACvR,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,QAAQ,IAAI,oBAAoB,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,EAAE,SAAS,CAAC,KAAK,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,CAAC,YAAE,KAAC,IAAI,IAAC,IAAI,EAAC,WAAW,GAAG,GAAa,EAClP,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,KAAK,EAAC,QAAQ,EAAE,QAAQ,IAAI,oBAAoB,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,KAAK,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,YAAE,KAAC,IAAI,IAAC,IAAI,EAAC,aAAa,GAAG,GAAa,KAHlN,MAAM,CAAC,EAAE,CAI1C,CAAC,IACH,CAAC;AACX,CAAC","sourcesContent":["\"use client\";\n\nimport { useEffect, useId, useLayoutEffect, useRef, useState, type ReactNode } from \"react\";\nimport { useCompositionAction } from \"./internal/use-composition-action.js\";\nimport { assertDistinctIds, changeColumnSettings, collectionEditingRecipe, focusAfterRemoval, recoverableFilters, snapshotSelection, type ColumnSetting, type FilterRecoveryOption, type FocusTarget, type SelectionAction } from \"@hjmds/design-contracts/collection-editing\";\nimport { Button, IconButton } from \"./actions.js\";\nimport { Icon } from \"./supplemental-display.js\";\nimport { TextField } from \"./forms.js\";\nimport { Checkbox } from \"./selection.js\";\nimport { Stack, Text } from \"./layout.js\";\nimport { FieldGroup, type FieldGroupBinding, type FieldGroupProps } from \"./field-group.js\";\n\n\nfunction ErrorMessage({ children }: { children: ReactNode }) {\n return <div role=\"alert\" style={{ display: \"grid\", placeItems: \"center\", textAlign: \"center\" }}><Text tone=\"danger\">{children}</Text></div>;\n}\n\nexport type InlineEditProps = Readonly<{\n id: string; value: string; label: string; editLabel: string; saveLabel: string; cancelLabel: string; errorLabel: string;\n disabled?: boolean; validate?: (draft: string) => string | undefined;\n /** Resolve only after confirming and updating the product value; reject to preserve the draft. */\n onSave: (draft: string) => void | Promise<void>;\n}>;\nexport function InlineEdit(props: InlineEditProps) { return <InlineEditBody key={props.id} {...props} />; }\nfunction InlineEditBody(props: InlineEditProps) {\n const [editing, setEditing] = useState(false), [draft, setDraft] = useState(props.value);\n const action = useCompositionAction(props.disabled);\n const input = useRef<HTMLInputElement>(null), trigger = useRef<HTMLButtonElement>(null), group = useRef<HTMLDivElement>(null);\n const restore = useRef(false);\n useLayoutEffect(() => {\n if (editing) input.current?.focus();\n else if (restore.current) { restore.current = false; trigger.current?.focus(); }\n }, [editing]);\n const error = props.validate?.(draft);\n const close = () => {\n restore.current = group.current?.contains(document.activeElement) ?? false;\n setEditing(false);\n };\n const save = async () => {\n if (props.disabled || error || action.pending || action.session.getSnapshot().status === \"pending\") return;\n const result = await action.run(\"save\", () => props.onSave(draft));\n if (result.status === \"success\") close();\n };\n return <div ref={group} role=\"group\" aria-label={props.label}>\n {/* Read state names the value with its label and edits through a pencil tool at the row end; a bare value beside a\n text \"Edit title\" button lost the label (2026-10-17 review). */}\n {!editing ? <Stack axis=\"inline\" gap=\"sm\" align=\"center\">\n <Stack gap=\"xxs\" layoutStyle={{ flex: 1, minInlineSize: 0 }}><Text variant=\"caption\" tone=\"muted\">{props.label}</Text><Text emphasis=\"strong\">{props.value}</Text></Stack>\n <IconButton ref={trigger} label={props.editLabel} tone=\"ghost\" edge=\"end\" disabled={props.disabled ?? false} onClick={() => { setDraft(props.value); action.session.reset(null); setEditing(true); }}><Icon name=\"edit\" /></IconButton>\n </Stack>\n : <Stack gap={collectionEditingRecipe.actionGap}>\n <TextField ref={input} label={props.label} value={draft} disabled={props.disabled ?? false} readOnly={action.pending}\n {...(error ? { error, \"aria-invalid\": true } : {})} onValueChange={setDraft}\n onKeyDown={event => {\n // Enter during IME composition confirms a character, not the title.\n if (event.nativeEvent.isComposing || event.keyCode === 229) return;\n if (event.key === \"Enter\") { event.preventDefault(); void save(); }\n if (event.key === \"Escape\" && !action.pending) { event.preventDefault(); event.stopPropagation(); close(); }\n }} />\n <Stack axis=\"inline\" gap=\"sm\" wrap><Button tone=\"ghost\" disabled={action.pending} onClick={close}>{props.cancelLabel}</Button>\n <Button loading={action.pending} disabled={props.disabled === true || !!error} onClick={() => void save()}>{props.saveLabel}</Button></Stack>\n {action.failed ? <ErrorMessage>{props.errorLabel}</ErrorMessage> : null}\n </Stack>}\n </div>;\n}\n\nexport type RepeatableFieldGroupProps = Omit<FieldGroupProps, \"renderField\"> & Readonly<{\n renderField: (binding: FieldGroupBinding & { focusRef: (target: FocusTarget | null) => void }) => ReactNode;\n addLabel: string; removeLabel: (id: string) => string; minFields?: number; maxFields?: number;\n /** Return the new stable id to focus after the controlled descriptor includes it. */\n onAdd: () => string | undefined; onRemove: (id: string) => void;\n}>;\nexport function RepeatableFieldGroup({ renderField, addLabel, removeLabel, minFields = 0, maxFields = Infinity, onAdd, onRemove, ...props }: RepeatableFieldGroupProps) {\n const targets = useRef(new Map<string, FocusTarget>()), add = useRef<HTMLButtonElement>(null);\n const focus = useRef<string | null | undefined>(undefined);\n useLayoutEffect(() => {\n if (focus.current === undefined) return;\n if (focus.current === null) { add.current?.focus(); focus.current = undefined; }\n else if (targets.current.has(focus.current)) { targets.current.get(focus.current)?.focus(); focus.current = undefined; }\n });\n const fields = props.descriptor.fields;\n const live = useRef(true), policy = useRef({ fields, minFields, maxFields, onAdd, onRemove, disabled: props.descriptor.disabled });\n policy.current = { fields, minFields, maxFields, onAdd, onRemove, disabled: props.descriptor.disabled };\n useEffect(() => { live.current = true; return () => { live.current = false; }; }, []);\n return <Stack gap={collectionEditingRecipe.gap}>\n {/* Remove is a row tool: a trash IconButton at the field's end whose label names the row (icon-button.md), not a\n full-width ghost text button under the field (2026-10-17 review). End-aligned so it sits beside the input. */}\n <FieldGroup {...props} renderField={binding => <Stack axis=\"inline\" gap=\"xs\" align=\"end\">\n <div style={{ flex: 1, minInlineSize: 0 }}>{renderField({ ...binding, focusRef: target => { if (target) targets.current.set(binding.id, target); else targets.current.delete(binding.id); } })}</div>\n <IconButton label={removeLabel(binding.id)} tone=\"ghost\" edge=\"end\" disabled={binding.controlProps.disabled || fields.length <= minFields} onClick={binding.guardChange(() => {\n const current = policy.current;\n if (!live.current || current.disabled || current.fields.length <= current.minFields) return;\n focus.current = focusAfterRemoval(current.fields.map(field => field.id), binding.id, current.fields.filter(field => field.disabled).map(field => field.id)) ?? null;\n current.onRemove(binding.id);\n })}><Icon name=\"delete\" /></IconButton>\n </Stack>} />\n <Button ref={add} tone=\"secondary\" disabled={props.descriptor.disabled === true || fields.length >= maxFields} onClick={() => {\n const current = policy.current;\n if (!live.current || current.disabled || current.fields.length >= current.maxFields) return;\n const id = current.onAdd(); if (id !== undefined) focus.current = id;\n }}>{addLabel}</Button>\n </Stack>;\n}\n\nexport type SelectionActionBarProps = Readonly<{\n selectedIds: readonly string[]; selectionLabel: (count: number) => string;\n clearLabel: string; onClear: () => void; actions: readonly SelectionAction[];\n onAction: (actionId: string, selectedIds: readonly string[]) => void | Promise<void>; errorLabel: string; disabled?: boolean;\n /** Product supplies the exact confirmed operation to undo; never restore an entire collection. */\n recovery?: Readonly<{ label: string; onUndo: () => void | Promise<void> }>;\n}>;\nexport function SelectionActionBar(props: SelectionActionBarProps) {\n const action = useCompositionAction(props.disabled);\n assertDistinctIds(props.actions); snapshotSelection(props.selectedIds);\n if (!props.selectedIds.length && !props.recovery && !action.pending && !action.failed) return null;\n return <div role=\"group\" aria-label={props.selectionLabel(props.selectedIds.length)}><Stack gap=\"sm\">\n <Text role=\"status\">{props.selectionLabel(props.selectedIds.length)}</Text>\n <Stack axis=\"inline\" gap=\"sm\" wrap>\n {props.actions.map(item => <Button key={item.id} tone={item.destructive ? \"danger\" : \"secondary\"} loading={action.active === `action:${item.id}`} disabled={props.disabled === true || (action.pending && action.active !== `action:${item.id}`) || !props.selectedIds.length} onClick={() => {\n if (props.disabled) return;\n const scope = snapshotSelection(props.selectedIds);\n if (scope.length) void action.run(`action:${item.id}`, () => props.onAction(item.id, scope));\n }}>{item.label}</Button>)}\n <Button tone=\"ghost\" disabled={props.disabled === true || action.pending || !props.selectedIds.length} onClick={props.onClear}>{props.clearLabel}</Button>\n {props.recovery ? <Button tone=\"ghost\" loading={action.active === \"undo\"} disabled={props.disabled === true || (action.pending && action.active !== \"undo\")} onClick={() => {\n if (!props.disabled) void action.run(\"undo\", () => props.recovery!.onUndo());\n }}>{props.recovery.label}</Button> : null}\n </Stack>\n {action.failed ? <ErrorMessage>{props.errorLabel}</ErrorMessage> : null}\n </Stack></div>;\n}\n\nexport type FilterRecoveryProps = Readonly<{\n title: string; description?: string; options: readonly FilterRecoveryOption[];\n optionLabel: (option: FilterRecoveryOption) => string; onApply: (id: string) => void | Promise<void>;\n errorLabel: string; disabled?: boolean;\n}>;\nexport function FilterRecovery(props: FilterRecoveryProps) {\n const action = useCompositionAction(props.disabled), options = recoverableFilters(props.options);\n // Fills the result area its host gives it (flex parent) and centers there, like Native.\n return <div role=\"group\" aria-label={props.title} style={{ display: \"grid\", placeItems: \"center\", flexGrow: 1, textAlign: \"center\" }}><Stack gap=\"sm\" align=\"center\">\n <Text emphasis=\"strong\">{props.title}</Text>{props.description ? <Text tone=\"muted\">{props.description}</Text> : null}\n {options.map(option => <Button key={option.id} tone=\"secondary\" loading={action.active === option.id} disabled={props.disabled === true || (action.pending && action.active !== option.id)}\n onClick={() => { if (!props.disabled) void action.run(option.id, () => props.onApply(option.id)); }}>{props.optionLabel(option)}</Button>)}\n {action.failed ? <ErrorMessage>{props.errorLabel}</ErrorMessage> : null}\n </Stack></div>;\n}\n\nexport type TableColumnSettingsProps = Readonly<{\n label: string; columns: readonly ColumnSetting[]; disabled?: boolean;\n earlierLabel: (column: ColumnSetting) => string; laterLabel: (column: ColumnSetting) => string;\n onColumnsChange: (columns: readonly ColumnSetting[]) => void;\n}>;\nexport function TableColumnSettings(props: TableColumnSettingsProps) {\n assertDistinctIds(props.columns);\n const change = (id: string, kind: \"toggle\" | \"earlier\" | \"later\") => {\n if (props.disabled) return;\n const next = changeColumnSettings(props.columns, id, kind); if (next !== props.columns) props.onColumnsChange(next);\n };\n const labelId = useId(), disabled = props.disabled === true;\n // One row per column: visibility checkbox, then reorder as icon tools (labels stay the accessible names); the last\n // tool takes edge=\"end\" so its glyph slot ends on the group's edge like the checkbox starts on it (2026-10-17 audit).\n // The group label is HJM Text like Native; a browser-default <legend> rendered differently (2026-10-17 review).\n return <Stack gap=\"sm\" role=\"group\" aria-labelledby={labelId}><Text id={labelId} emphasis=\"strong\">{props.label}</Text>\n {props.columns.map(column => <Stack key={column.id} axis=\"inline\" gap=\"xs\" align=\"center\">\n <Checkbox label={column.label} checked={column.visible} layoutStyle={{ flex: 1, minInlineSize: 0 }} disabled={disabled || column.locked === true || (column.visible && props.columns.filter(item => item.visible).length === 1)} onCheckedChange={() => change(column.id, \"toggle\")} />\n <IconButton label={props.earlierLabel(column)} tone=\"ghost\" disabled={disabled || changeColumnSettings(props.columns, column.id, \"earlier\") === props.columns} onClick={() => change(column.id, \"earlier\")}><Icon name=\"chevronUp\" /></IconButton>\n <IconButton label={props.laterLabel(column)} tone=\"ghost\" edge=\"end\" disabled={disabled || changeColumnSettings(props.columns, column.id, \"later\") === props.columns} onClick={() => change(column.id, \"later\")}><Icon name=\"chevronDown\" /></IconButton>\n </Stack>)}\n </Stack>;\n}\n"]}
1
+ {"version":3,"file":"collection-editing.js","sourceRoot":"","sources":["../src/collection-editing.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAyF,MAAM,4CAA4C,CAAC;AAC/Q,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAgD,MAAM,kBAAkB,CAAC;AAG5F,SAAS,YAAY,CAAC,EAAE,QAAQ,EAA2B;IACzD,OAAO,cAAK,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAE,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,YAAE,QAAQ,GAAQ,GAAM,CAAC;AAC9I,CAAC;AAQD,MAAM,UAAU,UAAU,CAAC,KAAsB,IAAI,OAAO,KAAC,cAAc,OAAoB,KAAK,IAAnB,KAAK,CAAC,EAAE,CAAe,CAAC,CAAC,CAAC;AAC3G,SAAS,cA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Node } from \"react\";\nimport { useCompositionAction } from \"./internal/use-composition-action.js\";\nimport { assertDistinctIds, changeColumnSettings, collectionEditingRecipe, focusAfterRemoval, recoverableFilters, snapshotSelection, type ColumnSetting, type FilterRecoveryOption, type FocusTarget, type SelectionAction } from \"@hjmds/design-contracts/collection-editing\";\nimport { Button, IconButton } from \"./actions.js\";\nimport { Icon } from \"./supplemental-display.js\";\nimport { TextField } from \"./forms.js\";\nimport { Checkbox } from \"./selection.js\";\nimport { Stack, Text } from \"./layout.js\";\nimport { FieldGroup, type FieldGroupBinding, type FieldGroupProps } from \"./field-group.js\";\n\n\nfunction ErrorMessage({ children }: { children: ReactNode }) {\n return <div role=\"alert\" style={{ display: \"grid\", placeItems: \"center\", textAlign: \"center\" }}><Text tone=\"danger\">{children}</Text></div>;\n}\n\nexport type InlineEditProps = Readonly<{\n id: string; value: string; label: string; editLabel: string; saveLabel: string; cancelLabel: string; errorLabel: string;\n disabled?: boolean; validate?: (draft: string) => string | undefined;\n /** Resolve only after confirming and updating the product value; reject to preserve the draft. */\n onSave: (draft: string) => void | Promise<void>;\n}>;\nexport function InlineEdit(props: InlineEditProps) { return <InlineEditBody key={props.id} {...props} />; }\nfunction InlineEditBody(props: InlineEditProps) {\n const [editing, setEditing] = useState(false), [draft, setDraft] = useState(props.value);\n const action = useCompositionAction(props.disabled);\n const input = useRef<HTMLInputElement>(null), trigger = useRef<HTMLButtonElement>(null), group = useRef<HTMLDivElement>(null);\n const restore = useRef(false);\n useLayoutEffect(() => {\n if (editing) input.current?.focus();\n else if (restore.current) { restore.current = false; trigger.current?.focus(); }\n }, [editing]);\n const error = props.validate?.(draft);\n const close = () => {\n restore.current = group.current?.contains(document.activeElement) ?? false;\n setEditing(false);\n };\n const save = async () => {\n if (props.disabled || error || action.pending || action.session.getSnapshot().status === \"pending\") return;\n const result = await action.run(\"save\", () => props.onSave(draft));\n if (result.status === \"success\") close();\n };\n return <div ref={group} role=\"group\" aria-label={props.label}>\n {/* Read state names the value with its label and edits through a pencil tool at the row end; a bare value beside a\n text \"Edit title\" button lost the label (2026-10-17 review). */}\n {!editing ? <Stack axis=\"inline\" gap=\"sm\" align=\"center\">\n <Stack gap=\"xxs\" layoutStyle={{ flex: 1, minInlineSize: 0 }}><Text variant=\"caption\" tone=\"muted\">{props.label}</Text><Text emphasis=\"strong\">{props.value}</Text></Stack>\n <IconButton ref={trigger} label={props.editLabel} tone=\"ghost\" edge=\"end\" disabled={props.disabled ?? false} onClick={() => { setDraft(props.value); action.session.reset(null); setEditing(true); }}><Icon name=\"edit\" /></IconButton>\n </Stack>\n : <Stack gap={collectionEditingRecipe.actionGap}>\n <TextField ref={input} label={props.label} value={draft} disabled={props.disabled ?? false} readOnly={action.pending}\n {...(error ? { error, \"aria-invalid\": true } : {})} onValueChange={setDraft}\n onKeyDown={event => {\n // Enter during IME composition confirms a character, not the title.\n if (event.nativeEvent.isComposing || event.keyCode === 229) return;\n if (event.key === \"Enter\") { event.preventDefault(); void save(); }\n if (event.key === \"Escape\" && !action.pending) { event.preventDefault(); event.stopPropagation(); close(); }\n }} />\n <Stack axis=\"inline\" gap=\"sm\" wrap><Button tone=\"ghost\" disabled={action.pending} onClick={close}>{props.cancelLabel}</Button>\n <Button loading={action.pending} disabled={props.disabled === true || !!error} onClick={() => void save()}>{props.saveLabel}</Button></Stack>\n {action.failed ? <ErrorMessage>{props.errorLabel}</ErrorMessage> : null}\n </Stack>}\n </div>;\n}\n\nexport type RepeatableFieldGroupProps = Omit<FieldGroupProps, \"renderField\"> & Readonly<{\n renderField: (binding: FieldGroupBinding & { focusRef: (target: FocusTarget | null) => void }) => ReactNode;\n addLabel: string; removeLabel: (id: string) => string; minFields?: number; maxFields?: number;\n /** A referenced row may stay editable while removal is unavailable (Utilverse expense participants). */\n isRemoveDisabled?: (id: string) => boolean;\n /** Return the new stable id to focus after the controlled descriptor includes it. */\n onAdd: () => string | undefined; onRemove: (id: string) => void;\n}>;\nexport function RepeatableFieldGroup({ renderField, addLabel, removeLabel, minFields = 0, maxFields = Infinity, isRemoveDisabled, onAdd, onRemove, ...props }: RepeatableFieldGroupProps) {\n const targets = useRef(new Map<string, FocusTarget>()), add = useRef<HTMLButtonElement>(null);\n const focus = useRef<string | null | undefined>(undefined);\n useLayoutEffect(() => {\n if (focus.current === undefined) return;\n if (focus.current === null) { add.current?.focus(); focus.current = undefined; }\n else if (targets.current.has(focus.current)) { targets.current.get(focus.current)?.focus(); focus.current = undefined; }\n });\n const fields = props.descriptor.fields;\n const live = useRef(true), policy = useRef({ fields, minFields, maxFields, isRemoveDisabled, onAdd, onRemove, disabled: props.descriptor.disabled });\n policy.current = { fields, minFields, maxFields, isRemoveDisabled, onAdd, onRemove, disabled: props.descriptor.disabled };\n useEffect(() => { live.current = true; return () => { live.current = false; }; }, []);\n return <Stack gap={collectionEditingRecipe.gap}>\n {/* Remove is a row tool: a trash IconButton at the field's end whose label names the row (icon-button.md), not a\n full-width ghost text button under the field (2026-10-17 review). End-aligned so it sits beside the input. */}\n <FieldGroup {...props} renderField={binding => <Stack axis=\"inline\" gap=\"xs\" align=\"end\">\n <div style={{ flex: 1, minInlineSize: 0 }}>{renderField({ ...binding, focusRef: target => { if (target) targets.current.set(binding.id, target); else targets.current.delete(binding.id); } })}</div>\n <IconButton label={removeLabel(binding.id)} tone=\"ghost\" edge=\"end\" disabled={binding.controlProps.disabled || fields.length <= minFields || isRemoveDisabled?.(binding.id) === true} onClick={binding.guardChange(() => {\n const current = policy.current;\n if (!live.current || current.disabled || current.fields.length <= current.minFields || current.isRemoveDisabled?.(binding.id)) return;\n focus.current = focusAfterRemoval(current.fields.map(field => field.id), binding.id, current.fields.filter(field => field.disabled).map(field => field.id)) ?? null;\n current.onRemove(binding.id);\n })}><Icon name=\"delete\" /></IconButton>\n </Stack>} />\n <Button ref={add} tone=\"secondary\" disabled={props.descriptor.disabled === true || fields.length >= maxFields} onClick={() => {\n const current = policy.current;\n if (!live.current || current.disabled || current.fields.length >= current.maxFields) return;\n const id = current.onAdd(); if (id !== undefined) focus.current = id;\n }}>{addLabel}</Button>\n </Stack>;\n}\n\nexport type SelectionActionBarProps = Readonly<{\n selectedIds: readonly string[]; selectionLabel: (count: number) => string;\n clearLabel: string; onClear: () => void; actions: readonly SelectionAction[];\n onAction: (actionId: string, selectedIds: readonly string[]) => void | Promise<void>; errorLabel: string; disabled?: boolean;\n /** Product supplies the exact confirmed operation to undo; never restore an entire collection. */\n recovery?: Readonly<{ label: string; onUndo: () => void | Promise<void> }>;\n}>;\nexport function SelectionActionBar(props: SelectionActionBarProps) {\n const action = useCompositionAction(props.disabled);\n assertDistinctIds(props.actions); snapshotSelection(props.selectedIds);\n if (!props.selectedIds.length && !props.recovery && !action.pending && !action.failed) return null;\n return <div role=\"group\" aria-label={props.selectionLabel(props.selectedIds.length)}><Stack gap=\"sm\">\n <Text role=\"status\">{props.selectionLabel(props.selectedIds.length)}</Text>\n <Stack axis=\"inline\" gap=\"sm\" wrap>\n {props.actions.map(item => <Button key={item.id} tone={item.destructive ? \"danger\" : \"secondary\"} loading={action.active === `action:${item.id}`} disabled={props.disabled === true || (action.pending && action.active !== `action:${item.id}`) || !props.selectedIds.length} onClick={() => {\n if (props.disabled) return;\n const scope = snapshotSelection(props.selectedIds);\n if (scope.length) void action.run(`action:${item.id}`, () => props.onAction(item.id, scope));\n }}>{item.label}</Button>)}\n <Button tone=\"ghost\" disabled={props.disabled === true || action.pending || !props.selectedIds.length} onClick={props.onClear}>{props.clearLabel}</Button>\n {props.recovery ? <Button tone=\"ghost\" loading={action.active === \"undo\"} disabled={props.disabled === true || (action.pending && action.active !== \"undo\")} onClick={() => {\n if (!props.disabled) void action.run(\"undo\", () => props.recovery!.onUndo());\n }}>{props.recovery.label}</Button> : null}\n </Stack>\n {action.failed ? <ErrorMessage>{props.errorLabel}</ErrorMessage> : null}\n </Stack></div>;\n}\n\nexport type FilterRecoveryProps = Readonly<{\n title: string; description?: string; options: readonly FilterRecoveryOption[];\n optionLabel: (option: FilterRecoveryOption) => string; onApply: (id: string) => void | Promise<void>;\n errorLabel: string; disabled?: boolean;\n}>;\nexport function FilterRecovery(props: FilterRecoveryProps) {\n const action = useCompositionAction(props.disabled), options = recoverableFilters(props.options);\n // Fills the result area its host gives it (flex parent) and centers there, like Native.\n return <div role=\"group\" aria-label={props.title} style={{ display: \"grid\", placeItems: \"center\", flexGrow: 1, textAlign: \"center\" }}><Stack gap=\"sm\" align=\"center\">\n <Text emphasis=\"strong\">{props.title}</Text>{props.description ? <Text tone=\"muted\">{props.description}</Text> : null}\n {options.map(option => <Button key={option.id} tone=\"secondary\" loading={action.active === option.id} disabled={props.disabled === true || (action.pending && action.active !== option.id)}\n onClick={() => { if (!props.disabled) void action.run(option.id, () => props.onApply(option.id)); }}>{props.optionLabel(option)}</Button>)}\n {action.failed ? <ErrorMessage>{props.errorLabel}</ErrorMessage> : null}\n </Stack></div>;\n}\n\nexport type TableColumnSettingsProps = Readonly<{\n label: string; columns: readonly ColumnSetting[]; disabled?: boolean;\n earlierLabel: (column: ColumnSetting) => string; laterLabel: (column: ColumnSetting) => string;\n onColumnsChange: (columns: readonly ColumnSetting[]) => void;\n}>;\nexport function TableColumnSettings(props: TableColumnSettingsProps) {\n assertDistinctIds(props.columns);\n const change = (id: string, kind: \"toggle\" | \"earlier\" | \"later\") => {\n if (props.disabled) return;\n const next = changeColumnSettings(props.columns, id, kind); if (next !== props.columns) props.onColumnsChange(next);\n };\n const labelId = useId(), disabled = props.disabled === true;\n // One row per column: visibility checkbox, then reorder as icon tools (labels stay the accessible names); the last\n // tool takes edge=\"end\" so its glyph slot ends on the group's edge like the checkbox starts on it (2026-10-17 audit).\n // The group label is HJM Text like Native; a browser-default <legend> rendered differently (2026-10-17 review).\n return <Stack gap=\"sm\" role=\"group\" aria-labelledby={labelId}><Text id={labelId} emphasis=\"strong\">{props.label}</Text>\n {props.columns.map(column => <Stack key={column.id} axis=\"inline\" gap=\"xs\" align=\"center\">\n <Checkbox label={column.label} checked={column.visible} layoutStyle={{ flex: 1, minInlineSize: 0 }} disabled={disabled || column.locked === true || (column.visible && props.columns.filter(item => item.visible).length === 1)} onCheckedChange={() => change(column.id, \"toggle\")} />\n <IconButton label={props.earlierLabel(column)} tone=\"ghost\" disabled={disabled || changeColumnSettings(props.columns, column.id, \"earlier\") === props.columns} onClick={() => change(column.id, \"earlier\")}><Icon name=\"chevronUp\" /></IconButton>\n <IconButton label={props.laterLabel(column)} tone=\"ghost\" edge=\"end\" disabled={disabled || changeColumnSettings(props.columns, column.id, \"later\") === props.columns} onClick={() => change(column.id, \"later\")}><Icon name=\"chevronDown\" /></IconButton>\n </Stack>)}\n </Stack>;\n}\n"]}
@@ -34,7 +34,7 @@ export type ReactRendererEvidenceManifest = Readonly<{
34
34
  export declare const reactRendererEvidence: {
35
35
  readonly schemaVersion: 2;
36
36
  readonly packageName: "@hjmds/react";
37
- readonly packageVersion: "1.35.0";
37
+ readonly packageVersion: "1.36.0";
38
38
  readonly surface: "web";
39
39
  readonly components: Readonly<{
40
40
  /** Canonical component id from the design-contracts catalog. */
package/dist/evidence.js CHANGED
@@ -135,7 +135,7 @@ const activeWebEntries = componentCatalog.filter((entry) => {
135
135
  export const reactRendererEvidence = {
136
136
  schemaVersion: reactRendererEvidenceSchemaVersion,
137
137
  packageName: "@hjmds/react",
138
- packageVersion: "1.35.0",
138
+ packageVersion: "1.36.0",
139
139
  surface: "web",
140
140
  components: activeWebEntries.map(derivedClaim),
141
141
  };
@@ -1 +1 @@
1
- {"version":3,"file":"evidence.js","sourceRoot":"","sources":["../src/evidence.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,yBAAyB,EAA8B,MAAM,iCAAiC,CAAC;AACzI,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAU,CAAC;AA6B7D,MAAM,gBAAgB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AC","sourcesContent":["import type { ShowcaseScenarioId } from \"@hjmds/design-contracts/showcase\";\nimport { getRequiredShowcaseEvidence } from \"@hjmds/design-contracts/showcase\";\nimport { componentCatalog, componentIdOf, getComponentSurfaceStatus, type ComponentCatalogEntry } from \"@hjmds/design-contracts/catalog\";\nimport { publicExportEntries } from \"./public-exports.generated.js\";\n\nexport const reactRendererEvidenceSchemaVersion = 2 as const;\n\nexport type ReactRendererEvidenceScenario = Exclude<ShowcaseScenarioId, \"contract\" | \"native-actions\">;\n\nexport type ReactRendererEvidenceComponent = Readonly<{\n /** Canonical component id from the design-contracts catalog. */\n componentId: string;\n /** Public symbols that implement this contract on the declared subpath. */\n exportNames: readonly string[];\n /** Granular @hjmds/react export used by consumers. */\n subpath: `./${string}`;\n /** Scenarios supported by automated first-party renderer evidence. */\n scenarios: readonly ReactRendererEvidenceScenario[];\n /** Repository-local executable proof for every claimed scenario. */\n proofs: readonly Readonly<{\n scenarios: readonly ReactRendererEvidenceScenario[];\n file: `test/${string}.test.tsx`;\n caseId: string;\n }>[];\n}>;\n\nexport type ReactRendererEvidenceManifest = Readonly<{\n schemaVersion: typeof reactRendererEvidenceSchemaVersion;\n packageName: \"@hjmds/react\";\n packageVersion: string;\n surface: \"web\";\n components: readonly ReactRendererEvidenceComponent[];\n}>;\n\nconst defaultProofFile = \"test/default-render.ssr.test.tsx\" as const;\nconst matrixProofFile = \"test/scenario-matrix.browser.test.tsx\" as const;\nconst stableCoreProofFile = \"test/stable-core.browser.test.tsx\" as const;\n\ntype ProofFile = `test/${string}.test.tsx`;\n\n/**\n * Scenarios a component does not pass yet. Each entry is promotion debt that\n * the generated evidence projection reports; remove it when the component is\n * fixed and the matrix case passes. Stable surfaces cannot carry a gap\n * (scripts/check-workspace-sync.mjs).\n */\nconst webScenarioGaps: Readonly<Record<string, readonly ReactRendererEvidenceScenario[]>> = {};\n\n/**\n * Proofs that live outside the shared default/matrix files: keyboard behavior in a dedicated browser test,\n * long copy proven inside a portal by the component's own test, or a whole matrix run in a component file.\n * Everything else about a claim derives from the catalog row (2026-10-18 registration input).\n */\ntype ClaimExtras = Readonly<{\n /** Extra proofs; their scenarios are removed from the shared matrix proof. */\n proofs?: readonly Readonly<{ scenarios: readonly ReactRendererEvidenceScenario[]; file: ProofFile }>[];\n /** Hooks or helpers published beside the component symbols on the same subpath. */\n exportNames?: readonly string[];\n}>;\n\nconst keyboard = (file: ProofFile = stableCoreProofFile): ClaimExtras => ({ proofs: [{ scenarios: [\"keyboard\"], file }] });\nconst keyboardAndLongCopy = (file: ProofFile): ClaimExtras => ({ proofs: [{ scenarios: [\"keyboard\", \"long-copy\"], file }] });\n\nconst claimExtras: Readonly<Record<string, ClaimExtras>> = {\n \"time-picker\": keyboard(\"test/time-picker.browser.test.tsx\"),\n \"design-system-provider\": { exportNames: [\"useHjmTheme\"] },\n layout: keyboard(),\n link: keyboard(),\n field: keyboard(),\n \"search-field\": keyboard(),\n \"password-field\": keyboard(),\n \"otp-field\": keyboard(),\n \"number-field\": keyboard(),\n slider: keyboard(),\n form: keyboard(\"test/form.keyboard.browser.test.tsx\"),\n \"date-picker\": keyboard(),\n calendar: keyboard(\"test/calendar.browser.test.tsx\"),\n \"file-picker\": keyboard(\"test/file-picker.keyboard.browser.test.tsx\"),\n checkbox: keyboard(),\n \"checkbox-group\": keyboard(),\n \"radio-group\": keyboard(),\n switch: keyboard(),\n \"segmented-control\": keyboard(),\n chip: keyboard(),\n tabs: keyboard(\"test/tabs.keyboard.browser.test.tsx\"),\n breadcrumb: keyboard(\"test/page-navigation.browser.test.tsx\"),\n pagination: keyboard(\"test/pagination.keyboard.browser.test.tsx\"),\n popover: keyboardAndLongCopy(\"test/popover.browser.test.tsx\"),\n \"side-panel\": keyboardAndLongCopy(\"test/side-panel.browser.test.tsx\"),\n splitter: keyboard(\"test/splitter.browser.test.tsx\"),\n tour: keyboardAndLongCopy(\"test/tour.browser.test.tsx\"),\n tree: keyboard(\"test/tree.browser.test.tsx\"),\n \"transfer-list\": keyboard(\"test/transfer-list.browser.test.tsx\"),\n mentions: keyboard(\"test/mentions.browser.test.tsx\"),\n \"command-palette\": keyboardAndLongCopy(\"test/command-palette.browser.test.tsx\"),\n agreement: keyboard(\"test/agreement.keyboard.browser.test.tsx\"),\n \"toggle-group\": keyboard(),\n \"tags-input\": keyboard(),\n \"skip-nav\": keyboardAndLongCopy(\"test/skip-nav.browser.test.tsx\"),\n sidebar: keyboard(\"test/sidebar.browser.test.tsx\"),\n \"date-range-picker\": keyboard(\"test/date-range.keyboard.browser.test.tsx\"),\n \"auth-provider-button\": keyboard(),\n \"data-table\": keyboard(\"test/data-table.keyboard.browser.test.tsx\"),\n collapsible: keyboard(\"test/collapsible.keyboard.browser.test.tsx\"),\n \"context-menu\": keyboardAndLongCopy(\"test/context-menu.interactions.browser.test.tsx\"),\n menubar: keyboard(\"test/menubar.keyboard.browser.test.tsx\"),\n anchor: keyboard(\"test/anchor.browser.test.tsx\"),\n \"bottom-navigation\": keyboard(\"test/bottom-navigation.keyboard.browser.test.tsx\"),\n \"load-more\": keyboard(\"test/load-more.interactions.browser.test.tsx\"),\n carousel: keyboard(\"test/carousel.browser.test.tsx\"),\n \"floating-action-button\": keyboard(),\n accordion: keyboard(\"test/accordion.keyboard.browser.test.tsx\"),\n \"upload-item\": keyboard(\"test/upload-item.browser.test.tsx\"),\n // ThinkingOrb runs its whole environment matrix in its own file (canvas timing), not in scenario-matrix.\n \"thinking-orb\": { proofs: [{ scenarios: [\"dark\", \"large-text\", \"rtl\", \"reduced-motion\", \"accessibility\"], file: \"test/thinking-orb.browser.test.tsx\" }] },\n \"color-picker\": keyboard(\"test/web-additions.browser.test.tsx\"),\n // SSR proves semantics but cannot catch the close-only row seen in BurnTok.\n // Keep real geometry evidence attached without promoting catalog maturity.\n toast: {\n exportNames: [\"useToast\"],\n proofs: [\n { scenarios: [\"keyboard\"], file: stableCoreProofFile },\n { scenarios: [\"dark\", \"long-copy\", \"large-text\", \"rtl\"], file: \"test/toast-layout.browser.test.tsx\" },\n ],\n },\n select: keyboard(),\n combobox: keyboard(),\n dialog: keyboard(\"test/advanced.browser.test.tsx\"),\n \"alert-dialog\": keyboardAndLongCopy(\"test/alert-dialog.keyboard.browser.test.tsx\"),\n sheet: keyboardAndLongCopy(\"test/sheet-layout.browser.test.tsx\"),\n tooltip: keyboard(\"test/tooltip.browser.test.tsx\"),\n menu: keyboardAndLongCopy(\"test/menu.keyboard.browser.test.tsx\"),\n};\n\nconst exportEntries: Readonly<Record<string, readonly `./${string}`[] | undefined>> = publicExportEntries;\n\n/**\n * One claim per active Web row of the catalog. The subpath is the symbol's canonical granular entry, the export\n * names are the row's own symbol plus the companions published on that entry, and the scenarios are the row's\n * required Web evidence minus recorded gaps. Keyboard is never implied: it comes only from a dedicated proof.\n */\nfunction derivedClaim(entry: ComponentCatalogEntry): ReactRendererEvidenceComponent {\n const componentId = componentIdOf(entry);\n const extras = claimExtras[componentId] ?? {};\n const symbols = entry.name === \"DesignSystemProvider\" ? [\"HjmProvider\"] : [entry.name, ...(entry.companions ?? [])];\n // A row whose own name is not a symbol (Chart) claims through its first published companion.\n const subpath = symbols.map((symbol) => exportEntries[symbol]?.[0]).find((entry) => entry !== undefined);\n if (!subpath) throw new Error(`${entry.name} has no granular @hjmds/react export to claim evidence on`);\n const exportNames = [\n ...symbols.filter((symbol) => exportEntries[symbol]?.includes(subpath)),\n ...(extras.exportNames ?? []),\n ];\n const required = getRequiredShowcaseEvidence(entry).find((evidence) => evidence.surface === \"web\")?.scenarios ?? [];\n const gaps = webScenarioGaps[componentId] ?? [];\n const extraProofs = extras.proofs ?? [];\n const proven = new Set(extraProofs.flatMap((proof) => proof.scenarios));\n const matrix = required.filter((scenario): scenario is ReactRendererEvidenceScenario =>\n scenario !== \"default\" && scenario !== \"keyboard\" && scenario !== \"native-actions\" && scenario !== \"contract\"\n && !gaps.includes(scenario as ReactRendererEvidenceScenario) && !proven.has(scenario as ReactRendererEvidenceScenario));\n const proofs = [\n { scenarios: [\"default\" as const], file: defaultProofFile, caseId: componentId },\n ...(matrix.length === 0 ? [] : [{ scenarios: matrix, file: matrixProofFile, caseId: componentId }]),\n ...extraProofs.map((proof) => ({ ...proof, caseId: componentId })),\n ];\n return {\n componentId,\n exportNames,\n subpath,\n scenarios: proofs.flatMap((proof) => proof.scenarios),\n proofs,\n };\n}\n\nconst activeWebEntries: readonly ComponentCatalogEntry[] = componentCatalog.filter((entry) => {\n const status = getComponentSurfaceStatus(entry, \"web\");\n return status === \"stable\" || status === \"beta\";\n});\n\n/**\n * First-party Web renderer claims. Scenario axes remain fail-closed: the\n * default scenario is an SSR render, the environment and accessibility\n * scenarios are computed-style assertions in scenario-matrix.browser.\n * Keyboard and cross-platform parity remain fail-closed until dedicated\n * interaction or paired-renderer proofs are mapped one-to-one.\n */\nexport const reactRendererEvidence = {\n schemaVersion: reactRendererEvidenceSchemaVersion,\n packageName: \"@hjmds/react\",\n packageVersion: \"1.35.0\",\n surface: \"web\",\n components: activeWebEntries.map(derivedClaim),\n} as const satisfies ReactRendererEvidenceManifest;\n"]}
1
+ {"version":3,"file":"evidence.js","sourceRoot":"","sources":["../src/evidence.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,yBAAyB,EAA8B,MAAM,iCAAiC,CAAC;AACzI,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAU,CAAC;AA6B7D,MAAM,gBAAgB,GAAG,kCAA2C,CAAC;AACrE,MAAM,eAAe,GAAG,uCAAgD,CAAC;AACzE,MAAM,mBAAmB,GAAG,mCAA4C,CAAC;AAIzE;;;;;GAKG;AACH,MAAM,eAAe,GAAuE,EAAE,CAAC;AAc/F,MAAM,QAAQ,GAAG,CAAC,OAAkB,mBAAmB,EAAe,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,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,EAAE,MAAM,EAAE,WAAW,EAAE;QAChF,GAAG,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;QACnG,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;KACnE,CAAC;IACF,OAAO;QACL,WAAW;QACX,WAAW;QACX,OAAO;QACP,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC;QACrD,MAAM;KACP,CAAC;AACJ,CAAC;AAED,MAAM,gBAAgB,GAAqC,gBAAgB,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;IAC3F,MAAM,MAAM,GAAG,yBAAyB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACvD,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,MAAM,CAAC;AAClD,CAAC,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,aAAa,EAAE,kCAAkC;IACjD,WAAW,EAAE,cAAc;IAC3B,cAAc,EAAE,QAAQ;IACxB,OAAO,EAAE,KAAK;IACd,UAAU,EAAE,gBAAgB,CAAC,GAAG,CAAC,YAAY,CAAC;CACE,CAAC","sourcesContent":["import type { ShowcaseScenarioId } from \"@hjmds/design-contracts/showcase\";\nimport { getRequiredShowcaseEvidence } from \"@hjmds/design-contracts/showcase\";\nimport { componentCatalog, componentIdOf, getComponentSurfaceStatus, type ComponentCatalogEntry } from \"@hjmds/design-contracts/catalog\";\nimport { publicExportEntries } from \"./public-exports.generated.js\";\n\nexport const reactRendererEvidenceSchemaVersion = 2 as const;\n\nexport type ReactRendererEvidenceScenario = Exclude<ShowcaseScenarioId, \"contract\" | \"native-actions\">;\n\nexport type ReactRendererEvidenceComponent = Readonly<{\n /** Canonical component id from the design-contracts catalog. */\n componentId: string;\n /** Public symbols that implement this contract on the declared subpath. */\n exportNames: readonly string[];\n /** Granular @hjmds/react export used by consumers. */\n subpath: `./${string}`;\n /** Scenarios supported by automated first-party renderer evidence. */\n scenarios: readonly ReactRendererEvidenceScenario[];\n /** Repository-local executable proof for every claimed scenario. */\n proofs: readonly Readonly<{\n scenarios: readonly ReactRendererEvidenceScenario[];\n file: `test/${string}.test.tsx`;\n caseId: string;\n }>[];\n}>;\n\nexport type ReactRendererEvidenceManifest = Readonly<{\n schemaVersion: typeof reactRendererEvidenceSchemaVersion;\n packageName: \"@hjmds/react\";\n packageVersion: string;\n surface: \"web\";\n components: readonly ReactRendererEvidenceComponent[];\n}>;\n\nconst defaultProofFile = \"test/default-render.ssr.test.tsx\" as const;\nconst matrixProofFile = \"test/scenario-matrix.browser.test.tsx\" as const;\nconst stableCoreProofFile = \"test/stable-core.browser.test.tsx\" as const;\n\ntype ProofFile = `test/${string}.test.tsx`;\n\n/**\n * Scenarios a component does not pass yet. Each entry is promotion debt that\n * the generated evidence projection reports; remove it when the component is\n * fixed and the matrix case passes. Stable surfaces cannot carry a gap\n * (scripts/check-workspace-sync.mjs).\n */\nconst webScenarioGaps: Readonly<Record<string, readonly ReactRendererEvidenceScenario[]>> = {};\n\n/**\n * Proofs that live outside the shared default/matrix files: keyboard behavior in a dedicated browser test,\n * long copy proven inside a portal by the component's own test, or a whole matrix run in a component file.\n * Everything else about a claim derives from the catalog row (2026-10-18 registration input).\n */\ntype ClaimExtras = Readonly<{\n /** Extra proofs; their scenarios are removed from the shared matrix proof. */\n proofs?: readonly Readonly<{ scenarios: readonly ReactRendererEvidenceScenario[]; file: ProofFile }>[];\n /** Hooks or helpers published beside the component symbols on the same subpath. */\n exportNames?: readonly string[];\n}>;\n\nconst keyboard = (file: ProofFile = stableCoreProofFile): ClaimExtras => ({ proofs: [{ scenarios: [\"keyboard\"], file }] });\nconst keyboardAndLongCopy = (file: ProofFile): ClaimExtras => ({ proofs: [{ scenarios: [\"keyboard\", \"long-copy\"], file }] });\n\nconst claimExtras: Readonly<Record<string, ClaimExtras>> = {\n \"time-picker\": keyboard(\"test/time-picker.browser.test.tsx\"),\n \"design-system-provider\": { exportNames: [\"useHjmTheme\"] },\n layout: keyboard(),\n link: keyboard(),\n field: keyboard(),\n \"search-field\": keyboard(),\n \"password-field\": keyboard(),\n \"otp-field\": keyboard(),\n \"number-field\": keyboard(),\n slider: keyboard(),\n form: keyboard(\"test/form.keyboard.browser.test.tsx\"),\n \"date-picker\": keyboard(),\n calendar: keyboard(\"test/calendar.browser.test.tsx\"),\n \"file-picker\": keyboard(\"test/file-picker.keyboard.browser.test.tsx\"),\n checkbox: keyboard(),\n \"checkbox-group\": keyboard(),\n \"radio-group\": keyboard(),\n switch: keyboard(),\n \"segmented-control\": keyboard(),\n chip: keyboard(),\n tabs: keyboard(\"test/tabs.keyboard.browser.test.tsx\"),\n breadcrumb: keyboard(\"test/page-navigation.browser.test.tsx\"),\n pagination: keyboard(\"test/pagination.keyboard.browser.test.tsx\"),\n popover: keyboardAndLongCopy(\"test/popover.browser.test.tsx\"),\n \"side-panel\": keyboardAndLongCopy(\"test/side-panel.browser.test.tsx\"),\n splitter: keyboard(\"test/splitter.browser.test.tsx\"),\n tour: keyboardAndLongCopy(\"test/tour.browser.test.tsx\"),\n tree: keyboard(\"test/tree.browser.test.tsx\"),\n \"transfer-list\": keyboard(\"test/transfer-list.browser.test.tsx\"),\n mentions: keyboard(\"test/mentions.browser.test.tsx\"),\n \"command-palette\": keyboardAndLongCopy(\"test/command-palette.browser.test.tsx\"),\n agreement: keyboard(\"test/agreement.keyboard.browser.test.tsx\"),\n \"toggle-group\": keyboard(),\n \"tags-input\": keyboard(),\n \"skip-nav\": keyboardAndLongCopy(\"test/skip-nav.browser.test.tsx\"),\n sidebar: keyboard(\"test/sidebar.browser.test.tsx\"),\n \"date-range-picker\": keyboard(\"test/date-range.keyboard.browser.test.tsx\"),\n \"auth-provider-button\": keyboard(),\n \"data-table\": keyboard(\"test/data-table.keyboard.browser.test.tsx\"),\n collapsible: keyboard(\"test/collapsible.keyboard.browser.test.tsx\"),\n \"context-menu\": keyboardAndLongCopy(\"test/context-menu.interactions.browser.test.tsx\"),\n menubar: keyboard(\"test/menubar.keyboard.browser.test.tsx\"),\n anchor: keyboard(\"test/anchor.browser.test.tsx\"),\n \"bottom-navigation\": keyboard(\"test/bottom-navigation.keyboard.browser.test.tsx\"),\n \"load-more\": keyboard(\"test/load-more.interactions.browser.test.tsx\"),\n carousel: keyboard(\"test/carousel.browser.test.tsx\"),\n \"floating-action-button\": keyboard(),\n accordion: keyboard(\"test/accordion.keyboard.browser.test.tsx\"),\n \"upload-item\": keyboard(\"test/upload-item.browser.test.tsx\"),\n // ThinkingOrb runs its whole environment matrix in its own file (canvas timing), not in scenario-matrix.\n \"thinking-orb\": { proofs: [{ scenarios: [\"dark\", \"large-text\", \"rtl\", \"reduced-motion\", \"accessibility\"], file: \"test/thinking-orb.browser.test.tsx\" }] },\n \"color-picker\": keyboard(\"test/web-additions.browser.test.tsx\"),\n // SSR proves semantics but cannot catch the close-only row seen in BurnTok.\n // Keep real geometry evidence attached without promoting catalog maturity.\n toast: {\n exportNames: [\"useToast\"],\n proofs: [\n { scenarios: [\"keyboard\"], file: stableCoreProofFile },\n { scenarios: [\"dark\", \"long-copy\", \"large-text\", \"rtl\"], file: \"test/toast-layout.browser.test.tsx\" },\n ],\n },\n select: keyboard(),\n combobox: keyboard(),\n dialog: keyboard(\"test/advanced.browser.test.tsx\"),\n \"alert-dialog\": keyboardAndLongCopy(\"test/alert-dialog.keyboard.browser.test.tsx\"),\n sheet: keyboardAndLongCopy(\"test/sheet-layout.browser.test.tsx\"),\n tooltip: keyboard(\"test/tooltip.browser.test.tsx\"),\n menu: keyboardAndLongCopy(\"test/menu.keyboard.browser.test.tsx\"),\n};\n\nconst exportEntries: Readonly<Record<string, readonly `./${string}`[] | undefined>> = publicExportEntries;\n\n/**\n * One claim per active Web row of the catalog. The subpath is the symbol's canonical granular entry, the export\n * names are the row's own symbol plus the companions published on that entry, and the scenarios are the row's\n * required Web evidence minus recorded gaps. Keyboard is never implied: it comes only from a dedicated proof.\n */\nfunction derivedClaim(entry: ComponentCatalogEntry): ReactRendererEvidenceComponent {\n const componentId = componentIdOf(entry);\n const extras = claimExtras[componentId] ?? {};\n const symbols = entry.name === \"DesignSystemProvider\" ? [\"HjmProvider\"] : [entry.name, ...(entry.companions ?? [])];\n // A row whose own name is not a symbol (Chart) claims through its first published companion.\n const subpath = symbols.map((symbol) => exportEntries[symbol]?.[0]).find((entry) => entry !== undefined);\n if (!subpath) throw new Error(`${entry.name} has no granular @hjmds/react export to claim evidence on`);\n const exportNames = [\n ...symbols.filter((symbol) => exportEntries[symbol]?.includes(subpath)),\n ...(extras.exportNames ?? []),\n ];\n const required = getRequiredShowcaseEvidence(entry).find((evidence) => evidence.surface === \"web\")?.scenarios ?? [];\n const gaps = webScenarioGaps[componentId] ?? [];\n const extraProofs = extras.proofs ?? [];\n const proven = new Set(extraProofs.flatMap((proof) => proof.scenarios));\n const matrix = required.filter((scenario): scenario is ReactRendererEvidenceScenario =>\n scenario !== \"default\" && scenario !== \"keyboard\" && scenario !== \"native-actions\" && scenario !== \"contract\"\n && !gaps.includes(scenario as ReactRendererEvidenceScenario) && !proven.has(scenario as ReactRendererEvidenceScenario));\n const proofs = [\n { scenarios: [\"default\" as const], file: defaultProofFile, caseId: componentId },\n ...(matrix.length === 0 ? [] : [{ scenarios: matrix, file: matrixProofFile, caseId: componentId }]),\n ...extraProofs.map((proof) => ({ ...proof, caseId: componentId })),\n ];\n return {\n componentId,\n exportNames,\n subpath,\n scenarios: proofs.flatMap((proof) => proof.scenarios),\n proofs,\n };\n}\n\nconst activeWebEntries: readonly ComponentCatalogEntry[] = componentCatalog.filter((entry) => {\n const status = getComponentSurfaceStatus(entry, \"web\");\n return status === \"stable\" || status === \"beta\";\n});\n\n/**\n * First-party Web renderer claims. Scenario axes remain fail-closed: the\n * default scenario is an SSR render, the environment and accessibility\n * scenarios are computed-style assertions in scenario-matrix.browser.\n * Keyboard and cross-platform parity remain fail-closed until dedicated\n * interaction or paired-renderer proofs are mapped one-to-one.\n */\nexport const reactRendererEvidence = {\n schemaVersion: reactRendererEvidenceSchemaVersion,\n packageName: \"@hjmds/react\",\n packageVersion: \"1.36.0\",\n surface: \"web\",\n components: activeWebEntries.map(derivedClaim),\n} as const satisfies ReactRendererEvidenceManifest;\n"]}
package/dist/forms.js CHANGED
@@ -176,7 +176,7 @@ export const PasswordField = forwardRef(function PasswordField({ value: valuePro
176
176
  revealed,
177
177
  disabled: disabled ?? false,
178
178
  };
179
- return (_jsx(FieldDisabledOpacityContext.Provider, { value: passwordFieldRecipe.states.disabledOpacity, children: _jsx(TextField, { ...props, ref: composeRefs(inputRef, forwardedRef), autoComplete: autofillHint === "current" ? "current-password" : "new-password", className: classNames("hjm-password-field__input", className), disabled: disabled, fieldClassName: classNames("hjm-password-field", `hjm-password-field--${size}`, fieldClassName), onChange: (event) => {
179
+ return (_jsx(FieldDisabledOpacityContext.Provider, { value: passwordFieldRecipe.states.disabledOpacity, children: _jsx(TextField, { ...props, ref: composeRefs(inputRef, forwardedRef), autoComplete: autofillHint === "none" ? "off" : autofillHint === "current" ? "current-password" : "new-password", className: classNames("hjm-password-field__input", className), disabled: disabled, fieldClassName: classNames("hjm-password-field", `hjm-password-field--${size}`, fieldClassName), onChange: (event) => {
180
180
  setValue(event.currentTarget.value);
181
181
  onChange?.(event);
182
182
  }, readOnly: readOnly, trailing: (_jsx("button", { "aria-label": resolved.toggleAccessibleName, className: "hjm-password-field__toggle", "data-revealed": revealed || undefined, disabled: disabled, onClick: () => {
package/dist/forms.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"forms.js","sourceRo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racts/recipes/base\";\nimport {\n iconRecipe,\n searchFieldRecipe,\n type SearchFieldSize,\n} from \"@hjmds/design-contracts/recipes\";\nimport {\n passwordFieldRecipe,\n resolvePasswordFieldDescriptor,\n type PasswordFieldAutofillHint,\n type PasswordFieldSize,\n} from \"@hjmds/design-contracts/components/password-field\";\nimport {\n getOtpFieldSlotValues,\n otpFieldRecipe,\n resolveOtpFieldValue,\n type OtpFieldSize,\n type OtpFieldPresentation,\n} from \"@hjmds/design-contracts/components/otp-field\";\nimport {\n createContext,\n forwardRef,\n useContext,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n type CSSProperties,\n type FocusEvent,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type ReactNode,\n type TextareaHTMLAttributes,\n} from \"react\";\nimport { composeRefs, classNames, isAriaInvalid, useControllableState } from \"./internal.js\";\nimport { useInitialFocusTarget } from \"./internal/initial-focus.js\";\nimport { Icon } from \"./supplemental-display.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\nimport { FieldError } from \"./internal/field-error.js\";\n\ntype FieldCopyProps = Readonly<{\n label?: ReactNode;\n description?: ReactNode;\n error?: ReactNode;\n required?: boolean;\n}>;\n\ntype FieldFrameProps = HTMLAttributes<HTMLDivElement> &\n FieldCopyProps &\n Readonly<{\n controlId: string;\n descriptionId?: string;\n errorId?: string;\n disabled?: boolean;\n focused?: boolean;\n invalid?: boolean;\n variant?: FieldVariant;\n shape?: FieldShape;\n align?: FieldAlign;\n /** Component recipe override of fieldRecipe.disabledOpacity (OtpField). */\n disabledOpacity?: number;\n children: ReactNode;\n /** Canonical layout-only placement on the field frame (`.hjm-field`), not the input. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\n/*\n How far a disabled field fades its label and control (fieldRecipe.disabledScope). The\n frame defaults to fieldRecipe.disabledOpacity; SearchField and PasswordField render\n through the public TextField, so they hand their own recipe value down this\n module-private context instead of widening TextField's public props.\n*/\nconst FieldDisabledOpacityContext = createContext<number | undefined>(undefined);\n\nfunction FieldFrame({\n controlId,\n label,\n description,\n error,\n descriptionId,\n errorId,\n required = false,\n disabled = false,\n focused = false,\n invalid = false,\n variant = fieldRecipe.defaults.variant,\n shape = fieldRecipe.defaults.shape,\n align = fieldRecipe.defaults.align,\n disabledOpacity,\n className,\n children,\n layoutStyle,\n style,\n ...props\n}: FieldFrameProps) {\n // A grouped field may reference one external error; aria-invalid must still\n // use the invalid recipe even when no inline error copy is repeated.\n const state = disabled ? \"disabled\" : error || invalid ? \"invalid\" : focused ? \"focused\" : \"idle\";\n const inheritedOpacity = useContext(FieldDisabledOpacityContext);\n const recipeOpacity = disabledOpacity ?? inheritedOpacity;\n return (\n <div\n {...props}\n // The stylesheet fades the label and control with --hjm-field-disabled-opacity\n // (theme value: fieldRecipe.disabledOpacity); a component recipe value is set\n // here, only while disabled, so enabled roots keep their old inline style.\n style={{\n ...style,\n ...layoutStyle,\n ...(disabled && recipeOpacity !== undefined\n ? ({ \"--hjm-field-disabled-opacity\": recipeOpacity } as CSSProperties)\n : {}),\n }}\n className={classNames(\"hjm-field\", className)}\n data-state={state}\n data-invalid={Boolean(error || invalid) || undefined}\n data-variant={variant}\n data-shape={shape}\n data-align={align}\n >\n {label !== undefined && label !== null ? (\n <label className=\"hjm-field__label\" htmlFor={controlId}>\n {label}\n {required ? <span aria-hidden=\"true\"> *</span> : null}\n </label>\n ) : null}\n {children}\n {/*\n Support text stays visible under an error instead of being replaced by\n it: the guidance (a length or format hint) is what tells the user how to clear the\n error, and hiding it is why a product copied that sentence into its own\n error string. Both are also referenced by aria-describedby.\n */}\n {description ? (\n <div id={descriptionId} className=\"hjm-field__description\">\n {description}\n </div>\n ) : null}\n <FieldError id={errorId} error={error} />\n </div>\n );\n}\n\nexport type FieldControlProps = Readonly<{\n id: string;\n required: boolean;\n disabled: boolean;\n \"aria-invalid\"?: true;\n \"aria-describedby\"?: string;\n}>;\n\nexport type FieldProps = Omit<\n FieldFrameProps,\n \"children\" | \"descriptionId\" | \"errorId\" | \"disabledOpacity\"\n> &\n Readonly<{\n label: ReactNode;\n children: ReactNode | ((props: FieldControlProps) => ReactNode);\n }>;\n\n/** Generic frame for custom native controls; `controlId` keeps the label explicit. */\nexport function Field({\n controlId,\n description,\n error,\n required = false,\n disabled = false,\n children,\n ...props\n}: FieldProps) {\n const descriptionId = `${controlId}-description`;\n const errorId = `${controlId}-error`;\n const controlProps: FieldControlProps = {\n id: controlId,\n required,\n disabled,\n ...(error ? { \"aria-invalid\": true as const } : {}),\n // Same merge as the built-in fields: support text stays referenced once an\n // error appears, so a custom control does not have to re-derive the ids.\n ...(description || error\n ? {\n \"aria-describedby\": [description ? descriptionId : undefined, error ? errorId : undefined]\n .filter(Boolean)\n .join(\" \"),\n }\n : {}),\n };\n return (\n <FieldFrame\n {...props}\n controlId={controlId}\n description={description}\n error={error}\n required={required}\n disabled={disabled}\n {...(description ? { descriptionId } : {})}\n {...(error ? { errorId } : {})}\n >\n {typeof children === \"function\" ? children(controlProps) : children}\n </FieldFrame>\n );\n}\n\nfunction useFieldIds(id: string | undefined) {\n const generatedId = useId();\n const controlId = id ?? `hjm-${generatedId.replaceAll(\":\", \"\")}`;\n return {\n controlId,\n descriptionId: `${controlId}-description`,\n errorId: `${controlId}-error`,\n } as const;\n}\n\n/*\n Support text and the error are both referenced when both exist, in DOM reading\n order, and the consumer's own `aria-describedby` is kept in front of them.\n Announcing only the error (the earlier behaviour) dropped the guidance that\n explains how to fix it — exactly the text a product then duplicated into the\n error string by hand.\n*/\nfunction describedBy(\n own: string | undefined,\n description: ReactNode | undefined,\n error: ReactNode | undefined,\n descriptionId: string,\n errorId: string,\n): string | undefined {\n return [own, description ? descriptionId : undefined, error ? errorId : undefined]\n .filter(Boolean)\n .join(\" \") || undefined;\n}\n\nfunction requireFieldAccessibleName(label: ReactNode | undefined, ariaLabel: string | undefined) {\n if ((label === undefined || label === null) && !ariaLabel?.trim()) {\n throw new TypeError(\"Field controls require either label or aria-label\");\n }\n}\n\ntype SharedInputProps = FieldCopyProps &\n Readonly<{\n variant?: FieldVariant;\n shape?: FieldShape;\n /**\n * Text placement inside the control. `start` follows the resolved\n * direction; `center` suits a short, ceremonial single value such as a\n * nickname or a code. Replaces a `text-align` override.\n */\n align?: FieldAlign;\n leading?: ReactNode;\n trailing?: ReactNode;\n fieldClassName?: string;\n /**\n * Canonical layout-only placement on the field frame. `style` keeps going to\n * the input element, where it always went, so existing callers do not move.\n */\n layoutStyle?: HjmCompositionStyleProp;\n /**\n * Page-entry target: true prefers this field, false excludes it, omission uses tree order. Only chooses during\n * entry; revealing a field after interaction does not focus it. Bottom sheets disable automatic input focus.\n */\n initialFocusTarget?: boolean;\n }>;\n\nexport type TextFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, \"size\"> &\n SharedInputProps &\n Readonly<{\n /**\n * Receives the next string value, the same callback name and shape as the\n * Native TextField. Web TextArea retains the DOM `onChange` callback. Before 1.5.0 Web TextField only had\n * the DOM `onChange`, so shared form code needed a platform branch. Both\n * fire; `onChange` stays for event access.\n */\n onValueChange?: (value: string) => void;\n }>;\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(\n {\n id,\n label,\n description,\n error,\n required,\n disabled,\n variant,\n shape,\n align,\n leading,\n trailing,\n fieldClassName,\n className,\n onFocus,\n onBlur,\n onChange,\n onValueChange,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": ariaInvalid,\n \"aria-label\": ariaLabel,\n layoutStyle,\n initialFocusTarget,\n ...props\n },\n ref,\n ) {\n const ids = useFieldIds(id);\n const [focused, setFocused] = useState(false);\n requireFieldAccessibleName(label, ariaLabel);\n const control = useRef<HTMLInputElement>(null);\n useInitialFocusTarget(control, initialFocusTarget);\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setFocused(true);\n onFocus?.(event);\n };\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n setFocused(false);\n onBlur?.(event);\n };\n return (\n <FieldFrame\n controlId={ids.controlId}\n label={label}\n description={description}\n error={error}\n required={required ?? false}\n disabled={disabled ?? false}\n focused={focused}\n invalid={isAriaInvalid(ariaInvalid)}\n variant={variant ?? fieldRecipe.defaults.variant}\n shape={shape ?? fieldRecipe.defaults.shape}\n align={align ?? fieldRecipe.defaults.align}\n className={fieldClassName}\n {...(layoutStyle === undefined ? {} : { layoutStyle })}\n {...(description ? { descriptionId: ids.descriptionId } : {})}\n {...(error ? { errorId: ids.errorId } : {})}\n >\n <div className=\"hjm-field__control\">\n {leading ? <span className=\"hjm-field__affix\">{leading}</span> : null}\n <input\n {...props}\n ref={composeRefs(control, ref)}\n id={ids.controlId}\n className={classNames(\"hjm-field__input\", className)}\n required={required}\n disabled={disabled}\n aria-invalid={error ? true : ariaInvalid}\n aria-label={ariaLabel}\n aria-describedby={describedBy(\n ariaDescribedBy,\n description,\n error,\n ids.descriptionId,\n ids.errorId,\n )}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={(event) => {\n onChange?.(event);\n onValueChange?.(event.currentTarget.value);\n }}\n />\n {trailing ? <span className=\"hjm-field__affix\">{trailing}</span> : null}\n </div>\n </FieldFrame>\n );\n },\n);\n\nexport type TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement> &\n Omit<SharedInputProps, \"leading\"> &\n Readonly<{\n /**\n * Action before the text inside the field frame (for example a composer's camera button),\n * vertically centred while the text grows. Mirrors `trailing`; `leading` stays omitted because\n * TextField's `leading` is a decorative affix with muted color, not an action slot.\n */\n leadingAction?: ReactNode;\n /**\n * Lower bound for a growing multiline field, in visible lines. Height is\n * recipe-owned, so this semantic axis replaces a `min-height` override.\n */\n minVisibleLines?: number;\n /** Upper bound for a growing multiline field, in visible lines. */\n maxVisibleLines?: number;\n }>;\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n function TextArea(\n {\n id,\n label,\n description,\n error,\n required,\n disabled,\n variant,\n shape,\n trailing,\n leadingAction,\n align,\n fieldClassName,\n className,\n onFocus,\n onBlur,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": ariaInvalid,\n \"aria-label\": ariaLabel,\n minVisibleLines,\n maxVisibleLines,\n style,\n layoutStyle,\n initialFocusTarget,\n ...props\n },\n ref,\n ) {\n const ids = useFieldIds(id);\n const [focused, setFocused] = useState(false);\n requireFieldAccessibleName(label, ariaLabel);\n const control = useRef<HTMLTextAreaElement>(null);\n useInitialFocusTarget(control, initialFocusTarget);\n // Bounds are expressed in lines so the recipe keeps line height and padding.\n const lineBounds = {\n ...(minVisibleLines === undefined\n ? {}\n : { \"--hjm-field-min-visible-lines\": minVisibleLines }),\n ...(maxVisibleLines === undefined\n ? {}\n : { \"--hjm-field-max-visible-lines\": maxVisibleLines }),\n } as CSSProperties;\n return (\n <FieldFrame\n controlId={ids.controlId}\n label={label}\n description={description}\n error={error}\n required={required ?? false}\n disabled={disabled ?? false}\n focused={focused}\n invalid={isAriaInvalid(ariaInvalid)}\n variant={variant ?? fieldRecipe.defaults.variant}\n shape={shape ?? fieldRecipe.defaults.shape}\n align={align ?? fieldRecipe.defaults.align}\n className={fieldClassName}\n {...(layoutStyle === undefined ? {} : { layoutStyle })}\n {...(description ? { descriptionId: ids.descriptionId } : {})}\n {...(error ? { errorId: ids.errorId } : {})}\n >\n <div className=\"hjm-field__control hjm-field__control--multiline\">\n {leadingAction ? <span className=\"hjm-field__leading\">{leadingAction}</span> : null}\n <textarea\n {...props}\n ref={composeRefs(control, ref)}\n id={ids.controlId}\n className={classNames(\"hjm-field__input\", className)}\n style={{ ...style, ...lineBounds }}\n required={required}\n disabled={disabled}\n aria-invalid={error ? true : ariaInvalid}\n aria-label={ariaLabel}\n aria-describedby={describedBy(\n ariaDescribedBy,\n description,\n error,\n ids.descriptionId,\n ids.errorId,\n )}\n onFocus={(event) => {\n setFocused(true);\n onFocus?.(event);\n }}\n onBlur={(event) => {\n setFocused(false);\n onBlur?.(event);\n }}\n />\n {trailing ? <span className=\"hjm-field__trailing\">{trailing}</span> : null}\n </div>\n </FieldFrame>\n );\n },\n);\n\nexport type SearchFieldProps = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"type\" | \"size\" | \"value\" | \"defaultValue\"\n> &\n SharedInputProps &\n Readonly<{\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n size?: SearchFieldSize;\n /** Localized accessible name for the clear action. */\n clearLabel: string;\n onClear?: () => void;\n /** Keeps the input mounted and named while replacing trailing actions with progress. */\n loading?: boolean;\n /** Product icon adapter; the renderer owns size and inherited color. */\n renderSearchIcon?: (props: SearchFieldIconRenderProps) => ReactNode;\n /** Product icon adapter for the clear action. */\n renderClearIcon?: (props: SearchFieldIconRenderProps) => ReactNode;\n /** Optional progress adapter. The default is the canonical CSS spinner. */\n renderLoadingIndicator?: (props: SearchFieldIconRenderProps) => ReactNode;\n }>;\n\nexport type SearchFieldIconRenderProps = Readonly<{\n color: \"currentColor\";\n size: number;\n}>;\n\nexport const SearchField = forwardRef<HTMLInputElement, SearchFieldProps>(\n function SearchField(\n {\n value: valueProp,\n defaultValue = \"\",\n onValueChange,\n onChange,\n size = searchFieldRecipe.defaults.size,\n clearLabel,\n onClear,\n loading = false,\n renderSearchIcon,\n renderClearIcon,\n renderLoadingIndicator,\n leading,\n trailing,\n fieldClassName,\n disabled,\n \"aria-busy\": ariaBusy,\n ...props\n },\n forwardedRef,\n ) {\n const [value, setValue] = useControllableState({\n ...(valueProp === undefined ? {} : { value: valueProp }),\n defaultValue,\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n const inputRef = useRef<HTMLInputElement>(null);\n const iconAppearance: SearchFieldIconRenderProps = {\n color: \"currentColor\",\n size: iconRecipe.sizes[searchFieldRecipe.sizes[size].glyph],\n };\n const canClear = value.length > 0 && !disabled && !props.readOnly;\n return (\n <FieldDisabledOpacityContext.Provider value={searchFieldRecipe.states.disabledOpacity}>\n <TextField\n {...props}\n ref={composeRefs(inputRef, forwardedRef)}\n type=\"search\"\n value={value}\n data-size={size}\n data-loading={loading || undefined}\n disabled={disabled}\n aria-busy={loading || ariaBusy || undefined}\n fieldClassName={classNames(\"hjm-search-field\", fieldClassName)!}\n leading={\n leading ?? (renderSearchIcon ? renderSearchIcon(iconAppearance) : undefined)\n }\n onChange={(event) => {\n setValue(event.currentTarget.value);\n onChange?.(event);\n }}\n trailing={\n loading ? (\n <span className=\"hjm-search-field__spinner\" aria-hidden=\"true\">\n {renderLoadingIndicator?.(iconAppearance)}\n </span>\n ) : canClear ? (\n <button\n type=\"button\"\n className=\"hjm-search-field__clear\"\n aria-label={clearLabel}\n onMouseDown={(event) => event.preventDefault()}\n onClick={() => {\n setValue(\"\");\n onClear?.();\n inputRef.current?.focus();\n }}\n >\n {renderClearIcon?.(iconAppearance) ?? \"×\"}\n </button>\n ) : trailing\n }\n />\n </FieldDisabledOpacityContext.Provider>\n );\n },\n);\n\nexport type PasswordFieldToggleRenderProps = Readonly<{\n name: \"visibility\" | \"visibilityOff\";\n color: \"currentColor\";\n size: number;\n revealed: boolean;\n disabled: boolean;\n}>;\n\nexport type PasswordFieldProps = Omit<\n TextFieldProps,\n \"autoComplete\" | \"defaultValue\" | \"size\" | \"trailing\" | \"type\" | \"value\"\n> &\n Readonly<{\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n revealed?: boolean;\n defaultRevealed?: boolean;\n onRevealedChange?: (revealed: boolean) => void;\n autofillHint: PasswordFieldAutofillHint;\n revealLabel: string;\n concealLabel: string;\n size?: PasswordFieldSize;\n renderToggleIcon?: (props: PasswordFieldToggleRenderProps) => ReactNode;\n }>;\n\n/** Password input with an independently controlled, selection-safe reveal action. */\nexport const PasswordField = forwardRef<HTMLInputElement, PasswordFieldProps>(\n function PasswordField(\n {\n value: valueProp,\n defaultValue = \"\",\n onValueChange,\n onChange,\n revealed: revealedProp,\n defaultRevealed = false,\n onRevealedChange,\n autofillHint,\n revealLabel,\n concealLabel,\n size = passwordFieldRecipe.defaults.size,\n renderToggleIcon,\n fieldClassName,\n className,\n disabled,\n readOnly,\n ...props\n },\n forwardedRef,\n ) {\n const [value, setValue] = useControllableState({\n ...(valueProp === undefined ? {} : { value: valueProp }),\n defaultValue,\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n const [revealed, setRevealed] = useControllableState({\n ...(revealedProp === undefined ? {} : { value: revealedProp }),\n defaultValue: defaultRevealed,\n ...(onRevealedChange === undefined ? {} : { onChange: onRevealedChange }),\n });\n const resolved = resolvePasswordFieldDescriptor(\n { revealed, autofillHint },\n {\n composeToggleAccessibleName: ({ willReveal }) =>\n willReveal ? revealLabel : concealLabel,\n },\n );\n const inputRef = useRef<HTMLInputElement>(null);\n const selectionRef = useRef<Readonly<{ start: number; end: number }> | null>(null);\n\n useLayoutEffect(() => {\n const selection = selectionRef.current;\n if (!selection || !inputRef.current) return;\n inputRef.current.setSelectionRange(selection.start, selection.end);\n selectionRef.current = null;\n }, [revealed]);\n\n const toggleAppearance: PasswordFieldToggleRenderProps = {\n name: revealed\n ? passwordFieldRecipe.toggle.icons.revealed\n : passwordFieldRecipe.toggle.icons.concealed,\n color: \"currentColor\",\n size: iconRecipe.sizes.sm,\n revealed,\n disabled: disabled ?? false,\n };\n\n return (\n <FieldDisabledOpacityContext.Provider value={passwordFieldRecipe.states.disabledOpacity}>\n <TextField\n {...props}\n ref={composeRefs(inputRef, forwardedRef)}\n autoComplete={autofillHint === \"current\" ? \"current-password\" : \"new-password\"}\n className={classNames(\"hjm-password-field__input\", className)}\n disabled={disabled}\n fieldClassName={classNames(\n \"hjm-password-field\",\n `hjm-password-field--${size}`,\n fieldClassName,\n )!}\n onChange={(event) => {\n setValue(event.currentTarget.value);\n onChange?.(event);\n }}\n readOnly={readOnly}\n trailing={(\n <button\n // No `aria-pressed`: the name already says the next action (\"Show/Hide\n // password\"), and a pressed state on top would read as \"Hide password,\n // pressed\" — two answers to one question (password-field.md, rationale 1).\n aria-label={resolved.toggleAccessibleName}\n className=\"hjm-password-field__toggle\"\n data-revealed={revealed || undefined}\n disabled={disabled}\n onClick={() => {\n const input = inputRef.current;\n if (input && input.selectionStart !== null && input.selectionEnd !== null) {\n selectionRef.current = {\n start: input.selectionStart,\n end: input.selectionEnd,\n };\n }\n setRevealed(!revealed);\n }}\n type=\"button\"\n >\n {renderToggleIcon?.(toggleAppearance) ?? <Icon name={toggleAppearance.name} size=\"sm\" />}\n </button>\n )}\n type={resolved.webInputType}\n value={value}\n />\n </FieldDisabledOpacityContext.Provider>\n );\n },\n);\n\nexport type OtpFieldProps = Omit<\n TextFieldProps,\n | \"autoComplete\"\n | \"defaultValue\"\n | \"leading\"\n | \"maxLength\"\n | \"shape\"\n | \"size\"\n | \"trailing\"\n | \"type\"\n | \"value\"\n | \"variant\"\n> &\n Readonly<{\n length: number;\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n onComplete?: (value: string) => void;\n size?: OtpFieldSize;\n presentation?: OtpFieldPresentation;\n busy?: boolean;\n }>;\n\n/** One accessible numeric input rendered as decorative OTP slots. */\nexport const OtpField = forwardRef<HTMLInputElement, OtpFieldProps>(\n function OtpField(\n {\n id,\n label,\n description,\n error,\n required,\n disabled,\n readOnly,\n busy = false,\n length,\n value: valueProp,\n defaultValue = \"\",\n onValueChange,\n onComplete,\n onChange,\n size = otpFieldRecipe.defaults.size,\n presentation = \"boxes\",\n fieldClassName,\n className,\n onFocus,\n onBlur,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": ariaInvalid,\n \"aria-label\": ariaLabel,\n layoutStyle,\n ...props\n },\n ref,\n ) {\n const ids = useFieldIds(id);\n const [focused, setFocused] = useState(false);\n requireFieldAccessibleName(label, ariaLabel);\n const [value, setValue] = useControllableState({\n ...(valueProp === undefined ? {} : { value: valueProp }),\n defaultValue: resolveOtpFieldValue(length, defaultValue),\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n const slots = getOtpFieldSlotValues({ length, value });\n const complete = value.length === length;\n const wasCompleteRef = useRef(complete);\n useEffect(() => {\n if (complete && !wasCompleteRef.current) onComplete?.(value);\n wasCompleteRef.current = complete;\n }, [complete, onComplete, value]);\n const activeIndex = Math.min(value.length, length - 1);\n\n return (\n <FieldFrame\n className={classNames(\"hjm-otp-field\", fieldClassName)}\n disabledOpacity={otpFieldRecipe.states.disabledOpacity}\n {...(layoutStyle === undefined ? {} : { layoutStyle })}\n controlId={ids.controlId}\n description={description}\n disabled={(disabled ?? false) || busy}\n error={error}\n focused={focused}\n label={label}\n required={required ?? false}\n {...(description ? { descriptionId: ids.descriptionId } : {})}\n {...(error ? { errorId: ids.errorId } : {})}\n >\n <div\n className=\"hjm-otp-field__control\"\n data-presentation={presentation}\n data-complete={complete || undefined}\n data-size={size}\n style={{ \"--hjm-otp-length\": length } as CSSProperties}\n >\n <input\n {...props}\n ref={ref}\n aria-busy={busy || undefined}\n aria-describedby={describedBy(\n ariaDescribedBy,\n description,\n error,\n ids.descriptionId,\n ids.errorId,\n )}\n aria-invalid={error ? true : ariaInvalid}\n aria-label={ariaLabel}\n autoComplete=\"one-time-code\"\n className={classNames(\"hjm-otp-field__input\", className)}\n // busy stays focusable (read-only); see otp-field.md.\n disabled={disabled}\n id={ids.controlId}\n inputMode=\"numeric\"\n maxLength={length}\n onBlur={(event) => {\n setFocused(false);\n onBlur?.(event);\n }}\n onChange={(event) => {\n setValue(resolveOtpFieldValue(length, event.currentTarget.value));\n onChange?.(event);\n }}\n onFocus={(event) => {\n setFocused(true);\n onFocus?.(event);\n }}\n pattern=\"[0-9]*\"\n readOnly={readOnly || busy}\n required={required}\n type=\"text\"\n value={value}\n />\n <div aria-hidden=\"true\" className=\"hjm-otp-field__slots\">\n {slots.map((digit, index) => (\n <span\n className=\"hjm-otp-field__slot\"\n data-state={error\n ? \"invalid\"\n : focused && index === activeIndex\n ? \"focused\"\n : digit\n ? \"filled\"\n : \"idle\"}\n key={index}\n >\n {digit}\n </span>\n ))}\n </div>\n </div>\n </FieldFrame>\n );\n },\n);\n"]}
1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ACF,CAAC","sourcesContent":["import {\n fieldRecipe,\n type FieldAlign,\n type FieldShape,\n type FieldVariant,\n} from \"@hjmds/design-contracts/recipes/base\";\nimport {\n iconRecipe,\n searchFieldRecipe,\n type SearchFieldSize,\n} from \"@hjmds/design-contracts/recipes\";\nimport {\n passwordFieldRecipe,\n resolvePasswordFieldDescriptor,\n type PasswordFieldAutofillHint,\n type PasswordFieldSize,\n} from \"@hjmds/design-contracts/components/password-field\";\nimport {\n getOtpFieldSlotValues,\n otpFieldRecipe,\n resolveOtpFieldValue,\n type OtpFieldSize,\n type OtpFieldPresentation,\n} from \"@hjmds/design-contracts/components/otp-field\";\nimport {\n createContext,\n forwardRef,\n useContext,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n type CSSProperties,\n type FocusEvent,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type ReactNode,\n type TextareaHTMLAttributes,\n} from \"react\";\nimport { composeRefs, classNames, isAriaInvalid, useControllableState } from \"./internal.js\";\nimport { useInitialFocusTarget } from \"./internal/initial-focus.js\";\nimport { Icon } from \"./supplemental-display.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\nimport { FieldError } from \"./internal/field-error.js\";\n\ntype FieldCopyProps = Readonly<{\n label?: ReactNode;\n description?: ReactNode;\n error?: ReactNode;\n required?: boolean;\n}>;\n\ntype FieldFrameProps = HTMLAttributes<HTMLDivElement> &\n FieldCopyProps &\n Readonly<{\n controlId: string;\n descriptionId?: string;\n errorId?: string;\n disabled?: boolean;\n focused?: boolean;\n invalid?: boolean;\n variant?: FieldVariant;\n shape?: FieldShape;\n align?: FieldAlign;\n /** Component recipe override of fieldRecipe.disabledOpacity (OtpField). */\n disabledOpacity?: number;\n children: ReactNode;\n /** Canonical layout-only placement on the field frame (`.hjm-field`), not the input. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\n/*\n How far a disabled field fades its label and control (fieldRecipe.disabledScope). The\n frame defaults to fieldRecipe.disabledOpacity; SearchField and PasswordField render\n through the public TextField, so they hand their own recipe value down this\n module-private context instead of widening TextField's public props.\n*/\nconst FieldDisabledOpacityContext = createContext<number | undefined>(undefined);\n\nfunction FieldFrame({\n controlId,\n label,\n description,\n error,\n descriptionId,\n errorId,\n required = false,\n disabled = false,\n focused = false,\n invalid = false,\n variant = fieldRecipe.defaults.variant,\n shape = fieldRecipe.defaults.shape,\n align = fieldRecipe.defaults.align,\n disabledOpacity,\n className,\n children,\n layoutStyle,\n style,\n ...props\n}: FieldFrameProps) {\n // A grouped field may reference one external error; aria-invalid must still\n // use the invalid recipe even when no inline error copy is repeated.\n const state = disabled ? \"disabled\" : error || invalid ? \"invalid\" : focused ? \"focused\" : \"idle\";\n const inheritedOpacity = useContext(FieldDisabledOpacityContext);\n const recipeOpacity = disabledOpacity ?? inheritedOpacity;\n return (\n <div\n {...props}\n // The stylesheet fades the label and control with --hjm-field-disabled-opacity\n // (theme value: fieldRecipe.disabledOpacity); a component recipe value is set\n // here, only while disabled, so enabled roots keep their old inline style.\n style={{\n ...style,\n ...layoutStyle,\n ...(disabled && recipeOpacity !== undefined\n ? ({ \"--hjm-field-disabled-opacity\": recipeOpacity } as CSSProperties)\n : {}),\n }}\n className={classNames(\"hjm-field\", className)}\n data-state={state}\n data-invalid={Boolean(error || invalid) || undefined}\n data-variant={variant}\n data-shape={shape}\n data-align={align}\n >\n {label !== undefined && label !== null ? (\n <label className=\"hjm-field__label\" htmlFor={controlId}>\n {label}\n {required ? <span aria-hidden=\"true\"> *</span> : null}\n </label>\n ) : null}\n {children}\n {/*\n Support text stays visible under an error instead of being replaced by\n it: the guidance (a length or format hint) is what tells the user how to clear the\n error, and hiding it is why a product copied that sentence into its own\n error string. Both are also referenced by aria-describedby.\n */}\n {description ? (\n <div id={descriptionId} className=\"hjm-field__description\">\n {description}\n </div>\n ) : null}\n <FieldError id={errorId} error={error} />\n </div>\n );\n}\n\nexport type FieldControlProps = Readonly<{\n id: string;\n required: boolean;\n disabled: boolean;\n \"aria-invalid\"?: true;\n \"aria-describedby\"?: string;\n}>;\n\nexport type FieldProps = Omit<\n FieldFrameProps,\n \"children\" | \"descriptionId\" | \"errorId\" | \"disabledOpacity\"\n> &\n Readonly<{\n label: ReactNode;\n children: ReactNode | ((props: FieldControlProps) => ReactNode);\n }>;\n\n/** Generic frame for custom native controls; `controlId` keeps the label explicit. */\nexport function Field({\n controlId,\n description,\n error,\n required = false,\n disabled = false,\n children,\n ...props\n}: FieldProps) {\n const descriptionId = `${controlId}-description`;\n const errorId = `${controlId}-error`;\n const controlProps: FieldControlProps = {\n id: controlId,\n required,\n disabled,\n ...(error ? { \"aria-invalid\": true as const } : {}),\n // Same merge as the built-in fields: support text stays referenced once an\n // error appears, so a custom control does not have to re-derive the ids.\n ...(description || error\n ? {\n \"aria-describedby\": [description ? descriptionId : undefined, error ? errorId : undefined]\n .filter(Boolean)\n .join(\" \"),\n }\n : {}),\n };\n return (\n <FieldFrame\n {...props}\n controlId={controlId}\n description={description}\n error={error}\n required={required}\n disabled={disabled}\n {...(description ? { descriptionId } : {})}\n {...(error ? { errorId } : {})}\n >\n {typeof children === \"function\" ? children(controlProps) : children}\n </FieldFrame>\n );\n}\n\nfunction useFieldIds(id: string | undefined) {\n const generatedId = useId();\n const controlId = id ?? `hjm-${generatedId.replaceAll(\":\", \"\")}`;\n return {\n controlId,\n descriptionId: `${controlId}-description`,\n errorId: `${controlId}-error`,\n } as const;\n}\n\n/*\n Support text and the error are both referenced when both exist, in DOM reading\n order, and the consumer's own `aria-describedby` is kept in front of them.\n Announcing only the error (the earlier behaviour) dropped the guidance that\n explains how to fix it — exactly the text a product then duplicated into the\n error string by hand.\n*/\nfunction describedBy(\n own: string | undefined,\n description: ReactNode | undefined,\n error: ReactNode | undefined,\n descriptionId: string,\n errorId: string,\n): string | undefined {\n return [own, description ? descriptionId : undefined, error ? errorId : undefined]\n .filter(Boolean)\n .join(\" \") || undefined;\n}\n\nfunction requireFieldAccessibleName(label: ReactNode | undefined, ariaLabel: string | undefined) {\n if ((label === undefined || label === null) && !ariaLabel?.trim()) {\n throw new TypeError(\"Field controls require either label or aria-label\");\n }\n}\n\ntype SharedInputProps = FieldCopyProps &\n Readonly<{\n variant?: FieldVariant;\n shape?: FieldShape;\n /**\n * Text placement inside the control. `start` follows the resolved\n * direction; `center` suits a short, ceremonial single value such as a\n * nickname or a code. Replaces a `text-align` override.\n */\n align?: FieldAlign;\n leading?: ReactNode;\n trailing?: ReactNode;\n fieldClassName?: string;\n /**\n * Canonical layout-only placement on the field frame. `style` keeps going to\n * the input element, where it always went, so existing callers do not move.\n */\n layoutStyle?: HjmCompositionStyleProp;\n /**\n * Page-entry target: true prefers this field, false excludes it, omission uses tree order. Only chooses during\n * entry; revealing a field after interaction does not focus it. Bottom sheets disable automatic input focus.\n */\n initialFocusTarget?: boolean;\n }>;\n\nexport type TextFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, \"size\"> &\n SharedInputProps &\n Readonly<{\n /**\n * Receives the next string value, the same callback name and shape as the\n * Native TextField. Web TextArea retains the DOM `onChange` callback. Before 1.5.0 Web TextField only had\n * the DOM `onChange`, so shared form code needed a platform branch. Both\n * fire; `onChange` stays for event access.\n */\n onValueChange?: (value: string) => void;\n }>;\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(\n {\n id,\n label,\n description,\n error,\n required,\n disabled,\n variant,\n shape,\n align,\n leading,\n trailing,\n fieldClassName,\n className,\n onFocus,\n onBlur,\n onChange,\n onValueChange,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": ariaInvalid,\n \"aria-label\": ariaLabel,\n layoutStyle,\n initialFocusTarget,\n ...props\n },\n ref,\n ) {\n const ids = useFieldIds(id);\n const [focused, setFocused] = useState(false);\n requireFieldAccessibleName(label, ariaLabel);\n const control = useRef<HTMLInputElement>(null);\n useInitialFocusTarget(control, initialFocusTarget);\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setFocused(true);\n onFocus?.(event);\n };\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n setFocused(false);\n onBlur?.(event);\n };\n return (\n <FieldFrame\n controlId={ids.controlId}\n label={label}\n description={description}\n error={error}\n required={required ?? false}\n disabled={disabled ?? false}\n focused={focused}\n invalid={isAriaInvalid(ariaInvalid)}\n variant={variant ?? fieldRecipe.defaults.variant}\n shape={shape ?? fieldRecipe.defaults.shape}\n align={align ?? fieldRecipe.defaults.align}\n className={fieldClassName}\n {...(layoutStyle === undefined ? {} : { layoutStyle })}\n {...(description ? { descriptionId: ids.descriptionId } : {})}\n {...(error ? { errorId: ids.errorId } : {})}\n >\n <div className=\"hjm-field__control\">\n {leading ? <span className=\"hjm-field__affix\">{leading}</span> : null}\n <input\n {...props}\n ref={composeRefs(control, ref)}\n id={ids.controlId}\n className={classNames(\"hjm-field__input\", className)}\n required={required}\n disabled={disabled}\n aria-invalid={error ? true : ariaInvalid}\n aria-label={ariaLabel}\n aria-describedby={describedBy(\n ariaDescribedBy,\n description,\n error,\n ids.descriptionId,\n ids.errorId,\n )}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={(event) => {\n onChange?.(event);\n onValueChange?.(event.currentTarget.value);\n }}\n />\n {trailing ? <span className=\"hjm-field__affix\">{trailing}</span> : null}\n </div>\n </FieldFrame>\n );\n },\n);\n\nexport type TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement> &\n Omit<SharedInputProps, \"leading\"> &\n Readonly<{\n /**\n * Action before the text inside the field frame (for example a composer's camera button),\n * vertically centred while the text grows. Mirrors `trailing`; `leading` stays omitted because\n * TextField's `leading` is a decorative affix with muted color, not an action slot.\n */\n leadingAction?: ReactNode;\n /**\n * Lower bound for a growing multiline field, in visible lines. Height is\n * recipe-owned, so this semantic axis replaces a `min-height` override.\n */\n minVisibleLines?: number;\n /** Upper bound for a growing multiline field, in visible lines. */\n maxVisibleLines?: number;\n }>;\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n function TextArea(\n {\n id,\n label,\n description,\n error,\n required,\n disabled,\n variant,\n shape,\n trailing,\n leadingAction,\n align,\n fieldClassName,\n className,\n onFocus,\n onBlur,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": ariaInvalid,\n \"aria-label\": ariaLabel,\n minVisibleLines,\n maxVisibleLines,\n style,\n layoutStyle,\n initialFocusTarget,\n ...props\n },\n ref,\n ) {\n const ids = useFieldIds(id);\n const [focused, setFocused] = useState(false);\n requireFieldAccessibleName(label, ariaLabel);\n const control = useRef<HTMLTextAreaElement>(null);\n useInitialFocusTarget(control, initialFocusTarget);\n // Bounds are expressed in lines so the recipe keeps line height and padding.\n const lineBounds = {\n ...(minVisibleLines === undefined\n ? {}\n : { \"--hjm-field-min-visible-lines\": minVisibleLines }),\n ...(maxVisibleLines === undefined\n ? {}\n : { \"--hjm-field-max-visible-lines\": maxVisibleLines }),\n } as CSSProperties;\n return (\n <FieldFrame\n controlId={ids.controlId}\n label={label}\n description={description}\n error={error}\n required={required ?? false}\n disabled={disabled ?? false}\n focused={focused}\n invalid={isAriaInvalid(ariaInvalid)}\n variant={variant ?? fieldRecipe.defaults.variant}\n shape={shape ?? fieldRecipe.defaults.shape}\n align={align ?? fieldRecipe.defaults.align}\n className={fieldClassName}\n {...(layoutStyle === undefined ? {} : { layoutStyle })}\n {...(description ? { descriptionId: ids.descriptionId } : {})}\n {...(error ? { errorId: ids.errorId } : {})}\n >\n <div className=\"hjm-field__control hjm-field__control--multiline\">\n {leadingAction ? <span className=\"hjm-field__leading\">{leadingAction}</span> : null}\n <textarea\n {...props}\n ref={composeRefs(control, ref)}\n id={ids.controlId}\n className={classNames(\"hjm-field__input\", className)}\n style={{ ...style, ...lineBounds }}\n required={required}\n disabled={disabled}\n aria-invalid={error ? true : ariaInvalid}\n aria-label={ariaLabel}\n aria-describedby={describedBy(\n ariaDescribedBy,\n description,\n error,\n ids.descriptionId,\n ids.errorId,\n )}\n onFocus={(event) => {\n setFocused(true);\n onFocus?.(event);\n }}\n onBlur={(event) => {\n setFocused(false);\n onBlur?.(event);\n }}\n />\n {trailing ? <span className=\"hjm-field__trailing\">{trailing}</span> : null}\n </div>\n </FieldFrame>\n );\n },\n);\n\nexport type SearchFieldProps = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"type\" | \"size\" | \"value\" | \"defaultValue\"\n> &\n SharedInputProps &\n Readonly<{\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n size?: SearchFieldSize;\n /** Localized accessible name for the clear action. */\n clearLabel: string;\n onClear?: () => void;\n /** Keeps the input mounted and named while replacing trailing actions with progress. */\n loading?: boolean;\n /** Product icon adapter; the renderer owns size and inherited color. */\n renderSearchIcon?: (props: SearchFieldIconRenderProps) => ReactNode;\n /** Product icon adapter for the clear action. */\n renderClearIcon?: (props: SearchFieldIconRenderProps) => ReactNode;\n /** Optional progress adapter. The default is the canonical CSS spinner. */\n renderLoadingIndicator?: (props: SearchFieldIconRenderProps) => ReactNode;\n }>;\n\nexport type SearchFieldIconRenderProps = Readonly<{\n color: \"currentColor\";\n size: number;\n}>;\n\nexport const SearchField = forwardRef<HTMLInputElement, SearchFieldProps>(\n function SearchField(\n {\n value: valueProp,\n defaultValue = \"\",\n onValueChange,\n onChange,\n size = searchFieldRecipe.defaults.size,\n clearLabel,\n onClear,\n loading = false,\n renderSearchIcon,\n renderClearIcon,\n renderLoadingIndicator,\n leading,\n trailing,\n fieldClassName,\n disabled,\n \"aria-busy\": ariaBusy,\n ...props\n },\n forwardedRef,\n ) {\n const [value, setValue] = useControllableState({\n ...(valueProp === undefined ? {} : { value: valueProp }),\n defaultValue,\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n const inputRef = useRef<HTMLInputElement>(null);\n const iconAppearance: SearchFieldIconRenderProps = {\n color: \"currentColor\",\n size: iconRecipe.sizes[searchFieldRecipe.sizes[size].glyph],\n };\n const canClear = value.length > 0 && !disabled && !props.readOnly;\n return (\n <FieldDisabledOpacityContext.Provider value={searchFieldRecipe.states.disabledOpacity}>\n <TextField\n {...props}\n ref={composeRefs(inputRef, forwardedRef)}\n type=\"search\"\n value={value}\n data-size={size}\n data-loading={loading || undefined}\n disabled={disabled}\n aria-busy={loading || ariaBusy || undefined}\n fieldClassName={classNames(\"hjm-search-field\", fieldClassName)!}\n leading={\n leading ?? (renderSearchIcon ? renderSearchIcon(iconAppearance) : undefined)\n }\n onChange={(event) => {\n setValue(event.currentTarget.value);\n onChange?.(event);\n }}\n trailing={\n loading ? (\n <span className=\"hjm-search-field__spinner\" aria-hidden=\"true\">\n {renderLoadingIndicator?.(iconAppearance)}\n </span>\n ) : canClear ? (\n <button\n type=\"button\"\n className=\"hjm-search-field__clear\"\n aria-label={clearLabel}\n onMouseDown={(event) => event.preventDefault()}\n onClick={() => {\n setValue(\"\");\n onClear?.();\n inputRef.current?.focus();\n }}\n >\n {renderClearIcon?.(iconAppearance) ?? \"×\"}\n </button>\n ) : trailing\n }\n />\n </FieldDisabledOpacityContext.Provider>\n );\n },\n);\n\nexport type PasswordFieldToggleRenderProps = Readonly<{\n name: \"visibility\" | \"visibilityOff\";\n color: \"currentColor\";\n size: number;\n revealed: boolean;\n disabled: boolean;\n}>;\n\nexport type PasswordFieldProps = Omit<\n TextFieldProps,\n \"autoComplete\" | \"defaultValue\" | \"size\" | \"trailing\" | \"type\" | \"value\"\n> &\n Readonly<{\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n revealed?: boolean;\n defaultRevealed?: boolean;\n onRevealedChange?: (revealed: boolean) => void;\n autofillHint: PasswordFieldAutofillHint;\n revealLabel: string;\n concealLabel: string;\n size?: PasswordFieldSize;\n renderToggleIcon?: (props: PasswordFieldToggleRenderProps) => ReactNode;\n }>;\n\n/** Password input with an independently controlled, selection-safe reveal action. */\nexport const PasswordField = forwardRef<HTMLInputElement, PasswordFieldProps>(\n function PasswordField(\n {\n value: valueProp,\n defaultValue = \"\",\n onValueChange,\n onChange,\n revealed: revealedProp,\n defaultRevealed = false,\n onRevealedChange,\n autofillHint,\n revealLabel,\n concealLabel,\n size = passwordFieldRecipe.defaults.size,\n renderToggleIcon,\n fieldClassName,\n className,\n disabled,\n readOnly,\n ...props\n },\n forwardedRef,\n ) {\n const [value, setValue] = useControllableState({\n ...(valueProp === undefined ? {} : { value: valueProp }),\n defaultValue,\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n const [revealed, setRevealed] = useControllableState({\n ...(revealedProp === undefined ? {} : { value: revealedProp }),\n defaultValue: defaultRevealed,\n ...(onRevealedChange === undefined ? {} : { onChange: onRevealedChange }),\n });\n const resolved = resolvePasswordFieldDescriptor(\n { revealed, autofillHint },\n {\n composeToggleAccessibleName: ({ willReveal }) =>\n willReveal ? revealLabel : concealLabel,\n },\n );\n const inputRef = useRef<HTMLInputElement>(null);\n const selectionRef = useRef<Readonly<{ start: number; end: number }> | null>(null);\n\n useLayoutEffect(() => {\n const selection = selectionRef.current;\n if (!selection || !inputRef.current) return;\n inputRef.current.setSelectionRange(selection.start, selection.end);\n selectionRef.current = null;\n }, [revealed]);\n\n const toggleAppearance: PasswordFieldToggleRenderProps = {\n name: revealed\n ? passwordFieldRecipe.toggle.icons.revealed\n : passwordFieldRecipe.toggle.icons.concealed,\n color: \"currentColor\",\n size: iconRecipe.sizes.sm,\n revealed,\n disabled: disabled ?? false,\n };\n\n return (\n <FieldDisabledOpacityContext.Provider value={passwordFieldRecipe.states.disabledOpacity}>\n <TextField\n {...props}\n ref={composeRefs(inputRef, forwardedRef)}\n autoComplete={autofillHint === \"none\" ? \"off\" : autofillHint === \"current\" ? \"current-password\" : \"new-password\"}\n className={classNames(\"hjm-password-field__input\", className)}\n disabled={disabled}\n fieldClassName={classNames(\n \"hjm-password-field\",\n `hjm-password-field--${size}`,\n fieldClassName,\n )!}\n onChange={(event) => {\n setValue(event.currentTarget.value);\n onChange?.(event);\n }}\n readOnly={readOnly}\n trailing={(\n <button\n // No `aria-pressed`: the name already says the next action (\"Show/Hide\n // password\"), and a pressed state on top would read as \"Hide password,\n // pressed\" — two answers to one question (password-field.md, rationale 1).\n aria-label={resolved.toggleAccessibleName}\n className=\"hjm-password-field__toggle\"\n data-revealed={revealed || undefined}\n disabled={disabled}\n onClick={() => {\n const input = inputRef.current;\n if (input && input.selectionStart !== null && input.selectionEnd !== null) {\n selectionRef.current = {\n start: input.selectionStart,\n end: input.selectionEnd,\n };\n }\n setRevealed(!revealed);\n }}\n type=\"button\"\n >\n {renderToggleIcon?.(toggleAppearance) ?? <Icon name={toggleAppearance.name} size=\"sm\" />}\n </button>\n )}\n type={resolved.webInputType}\n value={value}\n />\n </FieldDisabledOpacityContext.Provider>\n );\n },\n);\n\nexport type OtpFieldProps = Omit<\n TextFieldProps,\n | \"autoComplete\"\n | \"defaultValue\"\n | \"leading\"\n | \"maxLength\"\n | \"shape\"\n | \"size\"\n | \"trailing\"\n | \"type\"\n | \"value\"\n | \"variant\"\n> &\n Readonly<{\n length: number;\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n onComplete?: (value: string) => void;\n size?: OtpFieldSize;\n presentation?: OtpFieldPresentation;\n busy?: boolean;\n }>;\n\n/** One accessible numeric input rendered as decorative OTP slots. */\nexport const OtpField = forwardRef<HTMLInputElement, OtpFieldProps>(\n function OtpField(\n {\n id,\n label,\n description,\n error,\n required,\n disabled,\n readOnly,\n busy = false,\n length,\n value: valueProp,\n defaultValue = \"\",\n onValueChange,\n onComplete,\n onChange,\n size = otpFieldRecipe.defaults.size,\n presentation = \"boxes\",\n fieldClassName,\n className,\n onFocus,\n onBlur,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": ariaInvalid,\n \"aria-label\": ariaLabel,\n layoutStyle,\n ...props\n },\n ref,\n ) {\n const ids = useFieldIds(id);\n const [focused, setFocused] = useState(false);\n requireFieldAccessibleName(label, ariaLabel);\n const [value, setValue] = useControllableState({\n ...(valueProp === undefined ? {} : { value: valueProp }),\n defaultValue: resolveOtpFieldValue(length, defaultValue),\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n const slots = getOtpFieldSlotValues({ length, value });\n const complete = value.length === length;\n const wasCompleteRef = useRef(complete);\n useEffect(() => {\n if (complete && !wasCompleteRef.current) onComplete?.(value);\n wasCompleteRef.current = complete;\n }, [complete, onComplete, value]);\n const activeIndex = Math.min(value.length, length - 1);\n\n return (\n <FieldFrame\n className={classNames(\"hjm-otp-field\", fieldClassName)}\n disabledOpacity={otpFieldRecipe.states.disabledOpacity}\n {...(layoutStyle === undefined ? {} : { layoutStyle })}\n controlId={ids.controlId}\n description={description}\n disabled={(disabled ?? false) || busy}\n error={error}\n focused={focused}\n label={label}\n required={required ?? false}\n {...(description ? { descriptionId: ids.descriptionId } : {})}\n {...(error ? { errorId: ids.errorId } : {})}\n >\n <div\n className=\"hjm-otp-field__control\"\n data-presentation={presentation}\n data-complete={complete || undefined}\n data-size={size}\n style={{ \"--hjm-otp-length\": length } as CSSProperties}\n >\n <input\n {...props}\n ref={ref}\n aria-busy={busy || undefined}\n aria-describedby={describedBy(\n ariaDescribedBy,\n description,\n error,\n ids.descriptionId,\n ids.errorId,\n )}\n aria-invalid={error ? true : ariaInvalid}\n aria-label={ariaLabel}\n autoComplete=\"one-time-code\"\n className={classNames(\"hjm-otp-field__input\", className)}\n // busy stays focusable (read-only); see otp-field.md.\n disabled={disabled}\n id={ids.controlId}\n inputMode=\"numeric\"\n maxLength={length}\n onBlur={(event) => {\n setFocused(false);\n onBlur?.(event);\n }}\n onChange={(event) => {\n setValue(resolveOtpFieldValue(length, event.currentTarget.value));\n onChange?.(event);\n }}\n onFocus={(event) => {\n setFocused(true);\n onFocus?.(event);\n }}\n pattern=\"[0-9]*\"\n readOnly={readOnly || busy}\n required={required}\n type=\"text\"\n value={value}\n />\n <div aria-hidden=\"true\" className=\"hjm-otp-field__slots\">\n {slots.map((digit, index) => (\n <span\n className=\"hjm-otp-field__slot\"\n data-state={error\n ? \"invalid\"\n : focused && index === activeIndex\n ? \"focused\"\n : digit\n ? \"filled\"\n : \"idle\"}\n key={index}\n >\n {digit}\n </span>\n ))}\n </div>\n </div>\n </FieldFrame>\n );\n },\n);\n"]}
@@ -0,0 +1,5 @@
1
+ import type { PhotoSource } from "@hjmds/design-contracts/screen-patterns";
2
+ export declare function PhotoSourceIcon({ source }: {
3
+ source: PhotoSource;
4
+ }): import("react").JSX.Element;
5
+ //# sourceMappingURL=photo-source-icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"photo-source-icon.d.ts","sourceRoot":"","sources":["../../src/internal/photo-source-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAI3E,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,+BAalE"}
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useHjmTheme } from "../provider.js";
3
+ export function PhotoSourceIcon({ source }) {
4
+ const { environment } = useHjmTheme();
5
+ // Shared neutral colors use a stronger plate/line contrast after device feedback (2026-10-20).
6
+ const colors = environment.theme === "dark"
7
+ ? { background: "#334155", color: "#F1F5F9" }
8
+ : { background: "#E2E8F0", color: "#334155" };
9
+ return _jsx("span", { className: "hjm-photo-source__icon", style: colors, "aria-hidden": "true", children: _jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", focusable: "false", children: source === "camera"
10
+ ? _jsx("path", { d: "M8 6 9.5 3h5L16 6h4a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4Zm8 7a4 4 0 1 0-8 0 4 4 0 0 0 8 0Z" })
11
+ : _jsx("path", { d: "M5 17H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v1M9 7h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2Zm-2 12 5-5 4 4 2-2 4 4M17 11h.01" }) }) });
12
+ }
13
+ //# sourceMappingURL=photo-source-icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"photo-source-icon.js","sourceRoot":"","sources":["../../src/internal/photo-source-icon.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,UAAU,eAAe,CAAC,EAAE,MAAM,EAA2B;IACjE,MAAM,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,CAAC;IACtC,+FAA+F;IAC/F,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,KAAK,MAAM;QACzC,CAAC,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;QAC7C,CAAC,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAChD,OAAO,eAAM,SAAS,EAAC,wBAAwB,EAAC,KAAK,EAAE,MAAM,iBAAc,MAAM,YAC/E,cAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,GAAG,EAAC,aAAa,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,EAAC,SAAS,EAAC,OAAO,YACtI,MAAM,KAAK,QAAQ;gBAClB,CAAC,CAAC,eAAM,CAAC,EAAC,wHAAwH,GAAG;gBACrI,CAAC,CAAC,eAAM,CAAC,EAAC,iKAAiK,GAAG,GAC5K,GACD,CAAC;AACV,CAAC","sourcesContent":["import type { PhotoSource } from \"@hjmds/design-contracts/screen-patterns\";\n\nimport { useHjmTheme } from \"../provider.js\";\n\nexport function PhotoSourceIcon({ source }: { source: PhotoSource }) {\n const { environment } = useHjmTheme();\n // Shared neutral colors use a stronger plate/line contrast after device feedback (2026-10-20).\n const colors = environment.theme === \"dark\"\n ? { background: \"#334155\", color: \"#F1F5F9\" }\n : { background: \"#E2E8F0\", color: \"#334155\" };\n return <span className=\"hjm-photo-source__icon\" style={colors} aria-hidden=\"true\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" focusable=\"false\">\n {source === \"camera\"\n ? <path d=\"M8 6 9.5 3h5L16 6h4a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4Zm8 7a4 4 0 1 0-8 0 4 4 0 0 0 8 0Z\" />\n : <path d=\"M5 17H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v1M9 7h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2Zm-2 12 5-5 4 4 2-2 4 4M17 11h.01\" />}\n </svg>\n </span>;\n}\n"]}