@hjmds/react 1.49.0 → 2.0.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.
@@ -1 +1 @@
1
- {"version":3,"file":"advanced-display.js","sourceRoot":"","sources":["../src/advanced-display.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AACb,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,EAAE,qBAAqB,EAA8B,MAAM,yCAAyC,CAAC;AAC5G,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,EACL,iCAAiC,EACjC,gCAAgC,GAGjC,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,gBAAgB,EAChB,yBAAyB,GAG1B,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,GAIvB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,0BAA0B,EAC1B,aAAa,EACb,UAAU,EACV,wBAAwB,EAExB,eAAe,GAQhB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,QAAQ,EACR,cAAc,EACd,KAAK,EACL,eAAe,EACf,OAAO,EACP,MAAM,EACN,QAAQ,GAUT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AA0BpD,SAAS,sBAAsB,CAAC,KAA+B;IAC7D,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAC;IACpF,MAAM,GAA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AAkB,EAAE,IAAI,CAAC,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;oBACjF,QAAQ,EAAE,IAAI,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBACxC,OAAO,EAAE,CAAC,KAAuC,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,aAAiC,EAAE,IAAI,CAAC,EAAE,CAAC;iBAC7H,CAAC,CAAC,CAAC,EAAE,CAAC,YAAG,IAAI,IANsC,IAAI,CAAC,EAAE,CAMvC,CAAA;QACxB,CAAC,CAAC,GACC,CACN,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC,aAAa,CAE/B,CAAC","sourcesContent":["\"use client\";\nimport { IdentityAction } from \"./internal/identity-action.js\";\n\nimport { resolveAvatarInitials, type AvatarFallbackContext } from \"@hjmds/design-contracts/avatar-fallback\";\nimport { TableSortButton } from \"./table-sort-button.js\";\nimport { getNextDataTableSortState } from \"@hjmds/design-contracts/components/data-table\";\nimport {\n resolveDescriptionListColumnCount,\n resolveDescriptionListDescriptor,\n type DescriptionItemDescriptor,\n type DescriptionListColumns,\n} from \"@hjmds/design-contracts/components/description-list\";\nimport {\n getTimelineSelectionTarget,\n resolveTimelineDescriptor,\n timelineDefaults,\n validateTimelineSelection,\n type ComposeTimelineAccessibleName,\n type TimelineItemDescriptor,\n} from \"@hjmds/design-contracts/components/timeline\";\nimport {\n resolveStatisticDescriptor,\n validateStatisticGroup,\n type ResolvedStatisticDescriptor,\n type StatisticDescriptor,\n type StatisticGroupDescriptor,\n} from \"@hjmds/design-contracts/components/statistic\";\nimport {\n accordionRecipe,\n avatarRecipe,\n resolveAvatarSize,\n validateAvatarPresentation,\n dividerRecipe,\n listRecipe,\n validateDividerLineStyle,\n type DividerLineStyle,\n statisticRecipe,\n type AccordionDensity,\n type AvatarFrame,\n type AvatarShape,\n type AvatarSize,\n type CornerAccessoryPlacement,\n type StatisticDensity,\n type StatisticPresentation,\n} from \"@hjmds/design-contracts/recipes\";\nimport {\n Children,\n createElement,\n forwardRef,\n Fragment,\n isValidElement,\n useId,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type CSSProperties,\n type ForwardedRef,\n type HTMLAttributes,\n type ImgHTMLAttributes,\n type KeyboardEvent,\n type ReactElement,\n type ReactNode,\n type RefAttributes,\n type TableHTMLAttributes,\n} from \"react\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\nimport { assignRef, classNames, useControllableState, useElementWidth } from \"./internal.js\";\nimport { useOptionalHjmTheme } from \"./provider.js\";\n\nexport type AccordionItem = Readonly<{\n id: string;\n title: ReactNode;\n panel: ReactNode;\n disabled?: boolean;\n /** Include domain values when a decorative indicator carries more than expansion. */\n accessibilityLabel?: string;\n}>;\n\nexport type AccordionProps = Omit<HTMLAttributes<HTMLDivElement>, \"onChange\"> &\n Readonly<{\n items: readonly AccordionItem[];\n value?: readonly string[];\n defaultValue?: readonly string[];\n onValueChange?: (value: readonly string[]) => void;\n allowsMultipleExpanded?: boolean;\n density?: AccordionDensity;\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n /** Decorative replacement; interaction and expanded state remain owned by Accordion. */\n renderIndicator?: (props: Readonly<{ value: string; expanded: boolean; disabled: boolean }>) => ReactNode;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\nfunction validateAccordionItems(items: readonly AccordionItem[]): void {\n if (items.length === 0) throw new TypeError(\"Accordion requires at least one item\");\n const ids = new Set<string>();\n for (const item of items) {\n if (item.id.trim().length === 0) throw new TypeError(\"Accordion item id must not be empty\");\n if (ids.has(item.id)) throw new TypeError(`Duplicate Accordion item id: ${item.id}`);\n ids.add(item.id);\n }\n}\n\nfunction accordionFocusTarget(\n items: readonly AccordionItem[],\n currentIndex: number,\n key: string,\n): number | undefined {\n if (key === \"Home\") return items.findIndex((item) => !item.disabled);\n if (key === \"End\") {\n for (let index = items.length - 1; index >= 0; index -= 1) {\n if (!items[index]?.disabled) return index;\n }\n return -1;\n }\n const direction = key === \"ArrowDown\" ? 1 : key === \"ArrowUp\" ? -1 : 0;\n if (direction === 0) return undefined;\n for (let offset = 1; offset <= items.length; offset += 1) {\n const index = (currentIndex + direction * offset + items.length) % items.length;\n if (!items[index]?.disabled) return index;\n }\n return currentIndex;\n}\n\nexport const Accordion = forwardRef<HTMLDivElement, AccordionProps>(\n function Accordion(\n {\n items,\n value: valueProp,\n defaultValue = [],\n onValueChange,\n allowsMultipleExpanded = accordionRecipe.defaults.allowsMultipleExpanded,\n density = accordionRecipe.defaults.density,\n headingLevel = 3,\n renderIndicator,\n className,\n layoutStyle,\n ...props\n },\n ref,\n ) {\n validateAccordionItems(items);\n const [storedValue, setValue] = useControllableState<readonly string[]>({\n ...(valueProp === undefined ? {} : { value: valueProp }),\n defaultValue,\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n const validIds = new Set(items.map((item) => item.id));\n const committed = useRef(false);\n const value = valueProp === undefined && committed.current ? storedValue.filter(id => validIds.has(id)) : storedValue;\n useLayoutEffect(() => {\n committed.current = true;\n // Removed uncontrolled disclosures retire their expansion; reinsertion starts closed.\n if (value.length !== storedValue.length) setValue(value);\n }, [value, storedValue, setValue]);\n const valueIds = new Set<string>();\n for (const id of value) {\n if (!validIds.has(id)) throw new RangeError(`Unknown Accordion value: ${id}`);\n if (valueIds.has(id)) throw new TypeError(`Duplicate Accordion value: ${id}`);\n valueIds.add(id);\n }\n if (!allowsMultipleExpanded && value.length > 1) {\n throw new RangeError(\"Accordion only allows one expanded item\");\n }\n const baseId = useId().replaceAll(\":\", \"\");\n const triggerRefs = useRef(new Map<string, HTMLButtonElement>());\n const host = useRef<HTMLDivElement | null>(null);\n const focused = useRef<{ id: string; index: number; node: HTMLElement } | null>(null);\n useLayoutEffect(() => {\n const previous = focused.current;\n if (!previous) return;\n const index = items.findIndex(item => item.id === previous.id);\n const removed = index < 0;\n const disabledTrigger = index >= 0 && items[index]!.disabled && triggerRefs.current.get(previous.id) === previous.node;\n if (!(removed || disabledTrigger) || (document.activeElement !== previous.node && document.activeElement !== document.body)) return;\n // Restore only the removed/disabled target, never steal a user's external focus.\n const origin = removed ? Math.min(previous.index, items.length - 1) : index + 1;\n const target = Array.from({ length: items.length }, (_, offset) => items[(origin + offset) % items.length]!).find(item => !item.disabled);\n focused.current = null;\n (target ? triggerRefs.current.get(target.id) : host.current)?.focus();\n }, [items]);\n const toggle = (id: string) => {\n const expanded = value.includes(id);\n setValue(\n expanded\n ? value.filter((candidate) => candidate !== id)\n : allowsMultipleExpanded\n ? [...value, id]\n : [id],\n );\n };\n\n return (\n <div\n {...props}\n style={{ ...props.style, ...layoutStyle }}\n ref={node => { host.current = node; assignRef(ref, node); }}\n tabIndex={-1}\n className={classNames(\"hjm-accordion\", className)}\n data-density={density}\n data-multiple={allowsMultipleExpanded || undefined}\n >\n {items.map((item, index) => {\n const expanded = value.includes(item.id);\n const triggerId = `${baseId}-accordion-trigger-${index}`;\n const panelId = `${baseId}-accordion-panel-${index}`;\n const trigger = (\n <button\n ref={(node) => {\n if (node) triggerRefs.current.set(item.id, node);\n else triggerRefs.current.delete(item.id);\n }}\n id={triggerId}\n type=\"button\"\n className=\"hjm-accordion__trigger\"\n aria-expanded={expanded}\n aria-label={item.accessibilityLabel}\n aria-controls={panelId}\n disabled={item.disabled}\n onClick={() => toggle(item.id)}\n onKeyDown={(event: KeyboardEvent<HTMLButtonElement>) => {\n const target = accordionFocusTarget(items, index, event.key);\n if (target === undefined || target < 0) return;\n event.preventDefault();\n triggerRefs.current.get(items[target]!.id)?.focus();\n }}\n >\n <span className=\"hjm-accordion__title\">{item.title}</span>\n <span className=\"hjm-accordion__indicator\" aria-hidden=\"true\">\n {renderIndicator ? renderIndicator({ value: item.id, expanded, disabled: item.disabled === true }) : expanded ? \"−\" : \"+\"}\n </span>\n </button>\n );\n return (\n <div\n key={item.id}\n onFocusCapture={event => { if (event.target instanceof HTMLElement) focused.current = { id: item.id, index, node: event.target }; }}\n className=\"hjm-accordion__item\"\n data-state={item.disabled ? \"disabled\" : expanded ? \"expanded\" : \"collapsed\"}\n >\n {createElement(`h${headingLevel}`, { className: \"hjm-accordion__header\" }, trigger)}\n <div\n id={panelId}\n role=\"region\"\n className=\"hjm-accordion__panel\"\n aria-labelledby={triggerId}\n hidden={!expanded}\n >\n {item.panel}\n </div>\n </div>\n );\n })}\n </div>\n );\n },\n);\n\n\n/** Props handed to a product image host (`next/image`, a cache-aware loader) that replaces Avatar's `<img>`. */\nexport type AvatarImageRenderProps = Readonly<{\n src: string;\n /** `\"\"` for a decorative avatar or `alt=\"\"`; otherwise the avatar's accessible name. */\n alt: string;\n /** Diameter in px from the size step. */\n size: number;\n /** Avatar's image class (fill + cover); keep it so the frame's clipping and fit still apply. */\n className: string;\n /** Report a failure for this `src` generation; callbacks from a replaced `src` are ignored. */\n onError: () => void;\n}>;\n\n/**\n * Accessibility identity. A meaningful avatar is named by `name` (or `alt`); a decorative one — next to a visible\n * author name, or ornament without a person — is hidden from assistive tech and may omit `name` (2026-10-23:\n * Burntok's decorative avatars had no name to pass).\n */\ntype AvatarIdentity =\n | Readonly<{ decorative?: false; name: string; alt?: string }>\n | Readonly<{ decorative: true; name?: string; alt?: never }>;\n\nexport type AvatarProps = Omit<HTMLAttributes<HTMLSpanElement>, \"children\"> &\n AvatarIdentity &\n Readonly<{\n /** Profile navigation; products provide the member route and localized name. */\n action?: Readonly<{ label: string; onPress(): void; disabled?: boolean }>;\n src?: string;\n fallback?: ReactNode;\n renderFallback?: (context: AvatarFallbackContext) => ReactNode;\n /** Product image host in place of the built-in `<img>`. Exclusive with `imageProps`. */\n renderImage?: (props: AvatarImageRenderProps) => ReactNode;\n size?: AvatarSize;\n shape?: AvatarShape;\n /** Border/background treatment from avatarRecipe.frames; `none` when product artwork fills the frame. */\n frame?: AvatarFrame;\n /** A small mark (team badge, status dot) on a corner of the avatar's box. It is not clipped by the frame. */\n accessory?: ReactNode;\n accessoryPlacement?: CornerAccessoryPlacement;\n imageProps?: Omit<ImgHTMLAttributes<HTMLImageElement>, \"alt\" | \"src\">;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\nexport const Avatar = forwardRef<HTMLSpanElement, AvatarProps>(function Avatar(\n {\n name,\n action,\n src,\n alt: altProp,\n decorative = false,\n fallback,\n renderFallback,\n renderImage,\n size = avatarRecipe.defaults.size,\n shape = avatarRecipe.defaults.shape,\n frame = avatarRecipe.defaults.frame,\n accessory,\n accessoryPlacement = avatarRecipe.defaults.accessoryPlacement,\n imageProps,\n className,\n layoutStyle,\n ...props\n },\n ref,\n) {\n if (!decorative && (name === undefined || name.trim().length === 0)) throw new TypeError(\"Avatar name must not be empty\");\n if (renderImage && imageProps) throw new TypeError(\"Avatar renderImage and imageProps are exclusive; pass image attributes to the host\");\n validateAvatarPresentation({ shape, frame, accessoryPlacement });\n const diameter = resolveAvatarSize(size);\n const alt = decorative ? \"\" : altProp ?? name ?? \"\";\n const generation = useMemo(() => ({}), [src]);\n const active = useRef<object | null>(generation);\n useLayoutEffect(() => { active.current = generation; return () => { active.current = null; }; }, [generation]);\n const [failed, setFailed] = useState<object | null>(null);\n const imageAvailable = Boolean(src) && failed !== generation;\n const { onError, className: imageClassName, ...restImageProps } = imageProps ?? {};\n const fail = () => { if (active.current === generation) setFailed(generation); };\n const initials = name !== undefined && name.trim().length > 0 ? resolveAvatarInitials(name) : null;\n const avatarNode = (\n <span\n {...props}\n aria-hidden={decorative || props[\"aria-hidden\"]}\n style={{ ...props.style, ...(action ? {} : layoutStyle), \"--hjm-avatar-size\": `${diameter}px`,\n // Absolute children are placed from the padding edge; subtract the frame border so the offset is from the box.\n \"--hjm-avatar-accessory-inset\": `${0 - avatarRecipe.accessory.offset - avatarRecipe.frames[frame].borderWidth}px` } as CSSProperties}\n ref={ref}\n className={classNames(\"hjm-avatar\", className)}\n data-size={size}\n data-shape={shape}\n data-frame={frame}\n data-state={imageAvailable ? \"image\" : \"fallback\"}\n >\n {src && imageAvailable ? (\n renderImage ? (\n <Fragment key={src}>{renderImage({ src, alt, size: diameter, className: \"hjm-avatar__image\", onError: fail })}</Fragment>\n ) : (\n <img\n {...restImageProps}\n key={src}\n src={src}\n alt={alt}\n className={classNames(\"hjm-avatar__image\", imageClassName)}\n onError={(event) => {\n if (active.current !== generation) return;\n setFailed(generation);\n onError?.(event);\n }}\n />\n )\n ) : (\n <span\n className=\"hjm-avatar__fallback\"\n role={alt.length > 0 ? \"img\" : undefined}\n aria-label={alt.length > 0 ? alt : undefined}\n aria-hidden={alt.length === 0 || undefined}\n >\n {renderFallback?.({ size: diameter, decorative: true }) ?? fallback ?? initials}\n </span>\n )}\n {accessory ? <span className=\"hjm-avatar__accessory\" data-placement={accessoryPlacement}>{accessory}</span> : null}\n </span>\n );\n return action ? <IdentityAction action={action} {...(layoutStyle?{layoutStyle}:{})}>{avatarNode}</IdentityAction> : avatarNode;\n});\n\nexport type AvatarGroupProps = Omit<HTMLAttributes<HTMLSpanElement>, \"children\"> &\n Readonly<{\n /** Required: a pile of faces is meaningless to a screen reader otherwise. */\n label: string;\n children: ReactNode;\n size?: AvatarSize;\n /** Product-composed overflow copy such as \"+3\"; the count is the product's. */\n overflow?: ReactNode;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\n/**\n * Overlapping avatars. The overlap comes from the recipe ratio rather than a\n * pixel value so it holds across all four sizes, and the group carries one\n * accessible name instead of letting a reader walk five unlabelled images.\n */\nexport const AvatarGroup = forwardRef<HTMLSpanElement, AvatarGroupProps>(function AvatarGroup(\n { label, children, size = avatarRecipe.defaults.size, overflow, className, layoutStyle, style, ...props },\n ref,\n) {\n if (label.trim().length === 0) throw new TypeError(\"AvatarGroup label must not be empty\");\n const offset = Math.round(avatarRecipe.sizes[size] * avatarRecipe.overlapRatio);\n return (\n <span\n {...props}\n ref={ref}\n role=\"group\"\n aria-label={label}\n className={classNames(\"hjm-avatar-group\", className)}\n data-size={size}\n // The caller `style` used to be replaced by the overlap variable; merge it\n // and keep the recipe overlap last so it stays size-derived.\n style={{ ...style, ...layoutStyle, \"--hjm-avatar-overlap\": `${offset}px` } as CSSProperties}\n >\n {children}\n {overflow ? <span className=\"hjm-avatar-group__overflow\" aria-hidden=\"true\">{overflow}</span> : null}\n </span>\n );\n});\n\nexport type DividerOrientation = \"horizontal\" | \"vertical\";\nexport type DividerInset = keyof typeof dividerRecipe.insets;\n\nexport type DividerProps = HTMLAttributes<HTMLElement> &\n Readonly<{\n orientation?: DividerOrientation;\n inset?: DividerInset;\n /** `dashed`: a break inside one surface rather than a new section; dash/gap from dividerRecipe.lineStyles. */\n lineStyle?: DividerLineStyle;\n decorative?: boolean;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\nexport const Divider = forwardRef<HTMLElement, DividerProps>(function Divider(\n {\n orientation = dividerRecipe.defaults.orientation,\n inset = dividerRecipe.defaults.inset,\n lineStyle = dividerRecipe.defaults.lineStyle,\n decorative = false,\n className,\n layoutStyle,\n ...props\n },\n ref,\n) {\n validateDividerLineStyle(lineStyle);\n return createElement(orientation === \"horizontal\" ? \"hr\" : \"div\", {\n ...props,\n style: { ...props.style, ...layoutStyle },\n ref,\n className: classNames(\"hjm-divider\", className),\n \"data-orientation\": orientation,\n \"data-inset\": inset,\n \"data-line-style\": lineStyle,\n role: decorative ? \"presentation\" : \"separator\",\n \"aria-hidden\": decorative || undefined,\n \"aria-orientation\": decorative ? undefined : orientation,\n });\n});\n\nexport type ListSeparatorProps = Readonly<{\n separator?: keyof typeof listRecipe.separators;\n leading?: boolean;\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\n/** Decorative separator for a product-owned virtual collection. List owns separators for finite rows. */\nexport function ListSeparator({ separator = \"content\", leading = false, layoutStyle }: ListSeparatorProps) {\n if (!listRecipe.separators[separator]) return null;\n return <div aria-hidden=\"true\" role=\"presentation\" className=\"hjm-list-separator\" style={{\n marginInlineStart: `var(--hjm-list-separator-${separator}-${leading ? \"leading-start\" : \"start\"})`,\n marginInlineEnd: `var(--hjm-list-separator-${separator}-end)`,\n ...layoutStyle,\n }} />;\n}\n\nexport type ListAppearance = \"grouped\" | \"plain\";\n\nexport type ListProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Readonly<{\n label: string;\n children: ReactNode;\n separator?: keyof typeof listRecipe.separators;\n appearance?: ListAppearance;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\n/** Semantic list container that owns separators around composed rows. */\nexport const List = forwardRef<HTMLDivElement, ListProps>(function List(\n {\n label,\n children,\n separator = listRecipe.defaults.separator,\n appearance = \"plain\",\n className,\n layoutStyle,\n ...props\n },\n ref,\n) {\n if (!label.trim()) throw new TypeError(\"List label must not be empty\");\n const items = Children.toArray(children);\n return (\n <div\n {...props}\n style={{ ...props.style, ...layoutStyle }}\n ref={ref}\n aria-label={label}\n className={classNames(\"hjm-list\", className)}\n data-appearance={appearance}\n data-separator={separator}\n role=\"list\"\n >\n {items.map((item, index) => (\n <div\n className=\"hjm-list__item\"\n key={isValidElement(item) && item.key !== null ? item.key : `hjm-list-${index}`}\n role=\"listitem\"\n >\n {item}\n </div>\n ))}\n </div>\n );\n});\n\nexport type StatisticTrendMarkRenderProps = Readonly<{\n name: \"trendUp\" | \"trendDown\" | \"trendFlat\";\n color: \"currentColor\";\n size: number;\n}>;\n\nexport type ComposeStatisticAccessibilityLabel<Id extends string = string> = (\n input: Readonly<{\n contextLabel?: string;\n descriptor: ResolvedStatisticDescriptor<Id>;\n valueText: string;\n }>,\n) => string;\n\nexport type StatisticProps<Id extends string = string> = Omit<\n HTMLAttributes<HTMLElement>,\n \"children\"\n> & Readonly<{\n descriptor: StatisticDescriptor<Id>;\n density?: StatisticDensity;\n presentation?: StatisticPresentation;\n contextLabel?: string;\n accessibilityLabel?: string;\n composeAccessibilityLabel?: ComposeStatisticAccessibilityLabel<Id>;\n leading?: ReactNode;\n /** Product-owned series/category color; value text and decorative leading share it. */\n valueColor?: string;\n renderTrendMark?: (props: StatisticTrendMarkRenderProps) => ReactNode;\n /** Optional visual adapter; the descriptor remains the accessible value source. */\n renderValue?: (value: string) => ReactNode;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport function Statistic<Id extends string = string>(props: StatisticProps<Id>) {\n return <StatisticView {...props} />;\n}\n\nfunction StatisticView<Id extends string = string>({\n descriptor,\n density = \"comfortable\",\n presentation = \"plain\",\n contextLabel,\n accessibilityLabel,\n composeAccessibilityLabel,\n leading,\n valueColor,\n bar = false,\n renderTrendMark,\n renderValue,\n className,\n layoutStyle,\n ...props\n}: StatisticProps<Id> & { bar?: boolean }) {\n const resolved = resolveStatisticDescriptor(descriptor);\n const valueText = `${resolved.prefix ?? \"\"}${resolved.value}${resolved.suffix ?? \"\"}`;\n const announcement = accessibilityLabel ?? composeAccessibilityLabel?.({\n ...(contextLabel === undefined ? {} : { contextLabel }),\n descriptor: resolved,\n valueText,\n }) ?? [contextLabel, resolved.label, valueText, resolved.trend?.label, resolved.hint]\n .filter(Boolean)\n .join(\", \");\n if (!announcement.trim()) throw new TypeError(\"Statistic accessibility label must not be empty\");\n const trendName = resolved.trend\n ? statisticRecipe.trend.marks[resolved.trend.direction]\n : undefined;\n return (\n <article\n {...props}\n style={{ ...props.style, ...layoutStyle, ...(valueColor ? { \"--hjm-statistic-value-color\": valueColor } : {}) } as CSSProperties}\n aria-label={announcement}\n className={classNames(\"hjm-statistic\", className)}\n data-arrangement={bar ? \"bar\" : undefined}\n data-density={density}\n data-presentation={presentation}\n >\n <span aria-hidden=\"true\" className=\"hjm-statistic__label\">{resolved.label}</span>\n <span aria-hidden=\"true\" className=\"hjm-statistic__value-row\" data-leading={leading === undefined ? undefined : \"\"}>\n {leading === undefined ? null : <span className=\"hjm-statistic__leading\">{leading}</span>}\n {resolved.prefix ? <span className=\"hjm-statistic__affix\">{resolved.prefix}</span> : null}\n <strong className=\"hjm-statistic__value\">{renderValue?.(resolved.value) ?? resolved.value}</strong>\n {resolved.suffix ? <span className=\"hjm-statistic__affix\">{resolved.suffix}</span> : null}\n </span>\n {resolved.trend ? (\n <span aria-hidden=\"true\" className=\"hjm-statistic__trend\" data-tone={resolved.trend.tone}>\n <span className=\"hjm-statistic__trend-mark\">\n {renderTrendMark?.({ name: trendName!, color: \"currentColor\", size: 16 }) ?? (\n resolved.trend.direction === \"up\" ? \"↑\" : resolved.trend.direction === \"down\" ? \"↓\" : \"—\"\n )}\n </span>\n {resolved.trend.label}\n </span>\n ) : null}\n {resolved.hint ? <span aria-hidden=\"true\" className=\"hjm-statistic__hint\">{resolved.hint}</span> : null}\n </article>\n );\n}\n\nexport type StatisticGroupProps<Id extends string = string> = Omit<\n HTMLAttributes<HTMLDivElement>,\n \"children\"\n> & Readonly<{\n label: string;\n descriptor: StatisticGroupDescriptor<Id>;\n density?: StatisticDensity;\n presentation?: StatisticPresentation;\n composeAccessibilityLabel?: ComposeStatisticAccessibilityLabel<Id>;\n /** A bar is a single equal-width row for a few short counts; grid retains responsive columns. */\n arrangement?: \"grid\" | \"bar\";\n renderLeading?: (item: StatisticDescriptor<Id>, context: { color: string; size: number }) => ReactNode;\n getValueColor?: (item: StatisticDescriptor<Id>) => string | undefined;\n renderTrendMark?: (props: StatisticTrendMarkRenderProps) => ReactNode;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport function StatisticGroup<Id extends string = string>({\n label,\n descriptor,\n density,\n presentation,\n composeAccessibilityLabel,\n arrangement = \"grid\",\n renderLeading,\n getValueColor,\n renderTrendMark,\n className,\n style,\n layoutStyle,\n ...props\n}: StatisticGroupProps<Id>) {\n validateStatisticGroup(descriptor);\n if (!label.trim()) throw new TypeError(\"StatisticGroup label must not be empty\");\n return (\n <div\n {...props}\n aria-label={label}\n className={classNames(\"hjm-statistic-group\", className)}\n role=\"list\"\n data-arrangement={arrangement}\n style={{ ...style, ...layoutStyle, \"--hjm-statistic-columns\": arrangement === \"bar\" ? descriptor.items.length : descriptor.columns ?? statisticRecipe.defaults.columns } as CSSProperties}\n >\n {descriptor.items.map((item) => {\n const valueColor = getValueColor?.(item);\n return (\n <div key={item.id} role=\"listitem\">\n <StatisticView\n bar={arrangement === \"bar\"}\n {...(valueColor ? { valueColor } : {})}\n {...(renderLeading ? { leading: renderLeading(item, { color: valueColor ?? \"currentColor\", size: statisticRecipe.group.bar.iconSize }) } : {})}\n contextLabel={label}\n descriptor={item}\n {...(composeAccessibilityLabel === undefined ? {} : { composeAccessibilityLabel })}\n {...(density === undefined ? {} : { density })}\n {...(presentation === undefined ? {} : { presentation })}\n {...(renderTrendMark === undefined ? {} : { renderTrendMark })}\n />\n </div>\n ); })}\n </div>\n );\n}\n\nexport type DescriptionListProps<Id extends string = string> = Omit<\n HTMLAttributes<HTMLDListElement>,\n \"children\"\n> &\n Readonly<{\n items: readonly DescriptionItemDescriptor<Id>[];\n columns?: DescriptionListColumns;\n layout?: \"stacked\" | \"inline\";\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\nfunction DescriptionListInner<Id extends string>(\n { items, columns, layout, className, layoutStyle, style, ...props }: DescriptionListProps<Id>,\n forwardedRef: ForwardedRef<HTMLDListElement>,\n) {\n const descriptor = resolveDescriptionListDescriptor({\n items,\n ...(columns === undefined ? {} : { columns }),\n ...(layout === undefined ? {} : { layout }),\n });\n const [width, ref] = useElementWidth(forwardedRef);\n const theme = useOptionalHjmTheme();\n const resolvedColumns = resolveDescriptionListColumnCount(\n width ?? 0,\n descriptor.columns,\n theme?.environment.textScale ?? 1,\n );\n const responsiveStyle = {\n ...style,\n ...layoutStyle,\n \"--hjm-description-columns\": resolvedColumns,\n } as CSSProperties;\n return (\n <dl\n {...props}\n ref={ref}\n className={classNames(\"hjm-description-list\", className)}\n data-layout={descriptor.layout}\n data-columns={resolvedColumns}\n data-state={resolvedColumns < descriptor.columns ? \"collapsed\" : \"ready\"}\n style={responsiveStyle}\n >\n {descriptor.items.map((item) => (\n <div key={item.id} className=\"hjm-description-list__item\">\n <dt className=\"hjm-description-list__label\">{item.label}</dt>\n <dd className=\"hjm-description-list__value\">{item.value}</dd>\n </div>\n ))}\n </dl>\n );\n}\n\nexport const DescriptionList = forwardRef(DescriptionListInner) as <Id extends string = string>(\n props: DescriptionListProps<Id> & RefAttributes<HTMLDListElement>,\n) => ReactElement;\n\nexport type TableSortDirection = \"ascending\" | \"descending\";\n\nexport type TableColumn<Row> = Readonly<{\n id: string;\n header: ReactNode;\n cell: (row: Row, rowIndex: number) => ReactNode;\n align?: \"start\" | \"center\" | \"end\";\n sortable?: boolean;\n sortDirection?: TableSortDirection;\n}>;\n\nexport type TableProps<Row> = Omit<TableHTMLAttributes<HTMLTableElement>, \"children\"> &\n Readonly<{\n columns: readonly TableColumn<Row>[];\n rows: readonly Row[];\n getRowKey: (row: Row, rowIndex: number) => string;\n caption?: ReactNode;\n /** Localized content rendered when rows is empty. */\n emptyState: ReactNode;\n onSortChange?: (columnId: string, direction: TableSortDirection) => void;\n wrapperClassName?: string;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\n// Table's callback cannot express null; share the sort policy with a two-state cycle.\nfunction TableInner<Row>(\n {\n columns,\n rows,\n getRowKey,\n caption,\n emptyState,\n onSortChange,\n wrapperClassName,\n className,\n layoutStyle,\n ...props\n }: TableProps<Row>,\n ref: ForwardedRef<HTMLTableElement>,\n) {\n if (columns.length === 0) throw new TypeError(\"Table requires at least one column\");\n const ids = new Set<string>();\n for (const column of columns) {\n if (column.id.trim().length === 0) throw new TypeError(\"Table column id must not be empty\");\n if (ids.has(column.id)) throw new TypeError(`Duplicate Table column id: ${column.id}`);\n ids.add(column.id);\n if (column.sortDirection && !column.sortable) {\n throw new TypeError(`Table column ${column.id} has sortDirection but is not sortable`);\n }\n }\n const rowKeys = rows.map((row, rowIndex) => getRowKey(row, rowIndex));\n const seenRowKeys = new Set<string>();\n for (const rowKey of rowKeys) {\n if (rowKey.trim().length === 0) throw new TypeError(\"Table row key must not be empty\");\n if (seenRowKeys.has(rowKey)) throw new TypeError(`Duplicate Table row key: ${rowKey}`);\n seenRowKeys.add(rowKey);\n }\n return (\n // Placement belongs to the scroll wrapper (the visual root); `style` keeps\n // going to the <table>, where it always went.\n <div className={classNames(\"hjm-table-scroll\", wrapperClassName)} style={layoutStyle} tabIndex={0}>\n <table {...props} ref={ref} className={classNames(\"hjm-table\", className)}>\n {caption ? <caption className=\"hjm-table__caption\">{caption}</caption> : null}\n <thead>\n <tr>\n {columns.map((column) => (\n <th\n key={column.id}\n scope=\"col\"\n className=\"hjm-table__header\"\n data-align={column.align ?? \"start\"}\n aria-sort={column.sortDirection ?? (column.sortable ? \"none\" : undefined)}\n >\n {column.sortable ? (\n <TableSortButton\n header={column.header}\n {...(column.sortDirection === undefined ? {} : { direction: column.sortDirection })}\n glyphs={{ ascending: \" ↑\", descending: \" ↓\", none: \" ↕\" }}\n className=\"hjm-table__sort\"\n onSort={() => {\n const next = getNextDataTableSortState(\n column.sortDirection ? { columnId: column.id, direction: column.sortDirection } : null,\n column.id, \"two-state\",\n );\n onSortChange?.(column.id, next!.direction);\n }} />\n ) : column.header}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.length === 0 ? (\n <tr>\n <td className=\"hjm-table__empty\" colSpan={columns.length}>{emptyState}</td>\n </tr>\n ) : (\n rows.map((row, rowIndex) => (\n <tr key={rowKeys[rowIndex]} className=\"hjm-table__row\">\n {columns.map((column) => (\n <td\n key={column.id}\n className=\"hjm-table__cell\"\n data-align={column.align ?? \"start\"}\n >\n {column.cell(row, rowIndex)}\n </td>\n ))}\n </tr>\n ))\n )}\n </tbody>\n </table>\n </div>\n );\n}\n\nexport const Table = forwardRef(TableInner) as <Row>(\n props: TableProps<Row> & RefAttributes<HTMLTableElement>,\n) => ReactElement;\n\nexport type TimelineProps<Id extends string = string> = Omit<\n HTMLAttributes<HTMLOListElement>,\n \"children\"\n> &\n Readonly<{\n items: readonly TimelineItemDescriptor<Id>[];\n /** Default journal uses unfilled reading rows; selection adds record disclosure. \"record\" retains the earlier card surface. */\n variant?: \"record\" | \"journal\";\n composeAccessibleName: ComposeTimelineAccessibleName;\n renderMetadata?: (item: TimelineItemDescriptor<Id>) => ReactNode;\n /** Per-record commands of a passive Timeline. Not allowed together with selection. */\n renderActions?: (item: TimelineItemDescriptor<Id>) => ReactNode;\n /**\n * Makes records selectable (journal disclosure buttons; record variant listbox). `null` = nothing chosen. Supply\n * together with `onSelectedIdChange`; the list then needs `aria-label` or `aria-labelledby`.\n */\n selectedId?: Id | null;\n /** Called with the record chosen by click, Enter/Space or ArrowUp/ArrowDown/Home/End (selection follows focus). */\n onSelectedIdChange?: (id: Id) => void;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\nfunction TimelineInner<Id extends string = string>(\n {\n items,\n variant = timelineDefaults.variant,\n composeAccessibleName,\n renderMetadata,\n renderActions,\n selectedId,\n onSelectedIdChange,\n className,\n layoutStyle,\n onKeyDown,\n ...props\n }: TimelineProps<Id>,\n ref: ForwardedRef<HTMLOListElement>,\n) {\n validateTimelineSelection(selectedId, onSelectedIdChange, { hasActions: renderActions !== undefined, variant });\n const selectable = onSelectedIdChange !== undefined;\n const journal = variant === \"journal\";\n // Anchor collapsed state to its selected record. External map/day selection opens the new record immediately.\n const [disclosure, setDisclosure] = useState({ id: selectedId, collapsed: false });\n if (disclosure.id !== selectedId) setDisclosure({ id: selectedId, collapsed: false });\n if (selectable && !props[\"aria-label\"] && !props[\"aria-labelledby\"]) {\n throw new TypeError(\"A selectable Timeline needs aria-label or aria-labelledby (listbox name)\");\n }\n const resolved = resolveTimelineDescriptor(\n selectable ? { items, selectedId: selectedId ?? null } : { items },\n { composeAccessibleName },\n );\n const idPrefix = useId();\n // Roving tab stop: the selected record, or the first one before anything is chosen.\n const tabStopId = selectable ? (selectedId ?? resolved[0]?.id) : undefined;\n const select = (list: HTMLOListElement, id: Id, toggle = false) => {\n if (journal) setDisclosure({ id, collapsed: toggle && id === selectedId && !disclosure.collapsed });\n if (id !== selectedId) onSelectedIdChange?.(id);\n list.querySelector<HTMLElement>(`[data-timeline-id=\"${CSS.escape(id)}\"]`)?.focus();\n };\n const handleKeyDown = (event: KeyboardEvent<HTMLOListElement>) => {\n onKeyDown?.(event);\n if (!selectable || event.defaultPrevented) return;\n const focusedId = (event.target as HTMLElement).closest<HTMLElement>(\"[data-timeline-id]\")?.dataset.timelineId as Id | undefined;\n if (focusedId === undefined) return;\n if (!journal && (event.key === \"Enter\" || event.key === \" \")) {\n event.preventDefault();\n select(event.currentTarget, focusedId, true);\n return;\n }\n const target = getTimelineSelectionTarget(items, focusedId, event.key);\n if (target === undefined) return;\n event.preventDefault();\n select(event.currentTarget, target);\n };\n return (\n <ol\n {...props}\n style={{ ...props.style, ...layoutStyle }}\n ref={ref}\n className={classNames(\"hjm-timeline\", className)}\n role={selectable && !journal ? \"listbox\" : props.role}\n aria-orientation={selectable && !journal ? \"vertical\" : undefined}\n data-selectable={selectable || undefined}\n data-variant={variant}\n onKeyDown={handleKeyDown}\n >\n {resolved.map((item, index) => {\n const actions = renderActions?.(item);\n const detailIds = selectable\n ? [item.description ? `${idPrefix}-${index}-description` : null, item.timestamp ? `${idPrefix}-${index}-timestamp` : null].filter(Boolean).join(\" \")\n : \"\";\n const expanded = !selectable || (item.selected && (disclosure.id !== selectedId || !disclosure.collapsed));\n const body = <>\n <span className=\"hjm-timeline__rail\" aria-hidden=\"true\">\n <span className=\"hjm-timeline__dot\" />\n {index < resolved.length - 1 ? <span className=\"hjm-timeline__connector\" /> : null}\n </span>\n <span className=\"hjm-timeline__content\">\n <span className=\"hjm-timeline__heading\">\n <strong className=\"hjm-timeline__label\">{item.label}</strong>\n {!journal ? renderMetadata?.(item) : selectable ? <span className=\"hjm-timeline__chevron\" aria-hidden=\"true\">⌄</span> : null}\n </span>\n {journal && item.timestamp ? <time className=\"hjm-timeline__timestamp\" dateTime={item.dateTime}>{item.timestamp}</time> : null}\n <span className=\"hjm-timeline__details\" id={`${idPrefix}-${index}-details`} hidden={journal && !expanded}>\n {journal ? renderMetadata?.(item) : null}\n {item.description ? <span className=\"hjm-timeline__description\" id={selectable && !journal ? `${idPrefix}-${index}-description` : undefined}>{item.description}</span> : null}\n {!journal && item.timestamp ? <time className=\"hjm-timeline__timestamp\" dateTime={item.dateTime} id={selectable ? `${idPrefix}-${index}-timestamp` : undefined}>{item.timestamp}</time> : null}\n </span>\n </span>\n {actions ? <div className=\"hjm-timeline__actions\">{actions}</div> : null}\n </>;\n if (journal && selectable) return <li key={item.id}>\n <button type=\"button\" className=\"hjm-timeline__item\" data-tone={item.tone} data-state={item.selected ? \"selected\" : undefined}\n data-timeline-id={item.id} aria-label={[item.accessibleName, item.timestamp].filter(Boolean).join(\", \")}\n aria-expanded={expanded} aria-controls={`${idPrefix}-${index}-details`} aria-describedby={expanded ? `${idPrefix}-${index}-details` : undefined}\n onClick={event => select(event.currentTarget.closest(\"ol\")!, item.id, true)}>{body}</button>\n </li>;\n return <li aria-label={item.accessibleName} className=\"hjm-timeline__item\" data-tone={item.tone}\n data-emphasized={item.emphasized || undefined} key={item.id}\n {...(selectable ? {\n role: \"option\", \"aria-selected\": item.selected, \"aria-describedby\": detailIds || undefined,\n \"data-timeline-id\": item.id, \"data-state\": item.selected ? \"selected\" : undefined,\n tabIndex: item.id === tabStopId ? 0 : -1,\n onClick: (event: { currentTarget: HTMLLIElement }) => select(event.currentTarget.parentElement as HTMLOListElement, item.id),\n } : {})}>{body}</li>\n })}\n </ol>\n );\n}\n\nexport const Timeline = forwardRef(TimelineInner) as <Id extends string = string>(\n props: TimelineProps<Id> & RefAttributes<HTMLOListElement>,\n) => ReactElement;\n"]}
1
+ {"version":3,"file":"advanced-display.js","sourceRoot":"","sources":["../src/advanced-display.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AACb,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,EAAE,qBAAqB,EAA8B,MAAM,yCAAyC,CAAC;AAC5G,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,EACL,iCAAiC,EACjC,gCAAgC,GAGjC,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,gBAAgB,EAChB,yBAAyB,GAG1B,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,GAIvB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,0BAA0B,EAC1B,aAAa,EACb,UAAU,EACV,wBAAwB,EAExB,eAAe,GAQhB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,QAAQ,EACR,cAAc,EACd,KAAK,EACL,eAAe,EACf,OAAO,EACP,MAAM,EACN,QAAQ,GAUT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AA0BpD,SAAS,sBAAsB,CAAC,KAA+B;IAC7D,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;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zC,CAAC,UAAU,CAAC,CAAC,CAAC;oBAChB,IAAI,EAAE,QAAQ,EAAE,eAAe,EAAE,IAAI,CAAC,QAAQ,EAAE,kBAAkB,EAAE,SAAS,IAAI,SAAS;oBAC1F,kBAAkB,EAAE,IAAI,CAAC,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;oBACjF,QAAQ,EAAE,IAAI,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBACxC,OAAO,EAAE,CAAC,KAAuC,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,aAAiC,EAAE,IAAI,CAAC,EAAE,CAAC;iBAC7H,CAAC,CAAC,CAAC,EAAE,CAAC,YAAG,IAAI,IANsC,IAAI,CAAC,EAAE,CAMvC,CAAA;QACxB,CAAC,CAAC,GACC,CACN,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC,aAAa,CAE/B,CAAC","sourcesContent":["\"use client\";\nimport { IdentityAction } from \"./internal/identity-action.js\";\n\nimport { resolveAvatarInitials, type AvatarFallbackContext } from \"@hjmds/design-contracts/avatar-fallback\";\nimport { TableSortButton } from \"./table-sort-button.js\";\nimport { getNextDataTableSortState } from \"@hjmds/design-contracts/components/data-table\";\nimport {\n resolveDescriptionListColumnCount,\n resolveDescriptionListDescriptor,\n type DescriptionItemDescriptor,\n type DescriptionListColumns,\n} from \"@hjmds/design-contracts/components/description-list\";\nimport {\n getTimelineSelectionTarget,\n resolveTimelineDescriptor,\n timelineDefaults,\n validateTimelineSelection,\n type ComposeTimelineAccessibleName,\n type TimelineItemDescriptor,\n} from \"@hjmds/design-contracts/components/timeline\";\nimport {\n resolveStatisticDescriptor,\n validateStatisticGroup,\n type ResolvedStatisticDescriptor,\n type StatisticDescriptor,\n type StatisticGroupDescriptor,\n} from \"@hjmds/design-contracts/components/statistic\";\nimport {\n accordionRecipe,\n avatarRecipe,\n resolveAvatarSize,\n validateAvatarPresentation,\n dividerRecipe,\n listRecipe,\n validateDividerLineStyle,\n type DividerLineStyle,\n statisticRecipe,\n type AccordionDensity,\n type AvatarFrame,\n type AvatarShape,\n type AvatarSize,\n type CornerAccessoryPlacement,\n type StatisticDensity,\n type StatisticPresentation,\n} from \"@hjmds/design-contracts/recipes\";\nimport {\n Children,\n createElement,\n forwardRef,\n Fragment,\n isValidElement,\n useId,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type CSSProperties,\n type ForwardedRef,\n type HTMLAttributes,\n type ImgHTMLAttributes,\n type KeyboardEvent,\n type ReactElement,\n type ReactNode,\n type RefAttributes,\n type TableHTMLAttributes,\n} from \"react\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\nimport { assignRef, classNames, useControllableState, useElementWidth } from \"./internal.js\";\nimport { useOptionalHjmTheme } from \"./provider.js\";\n\nexport type AccordionItem = Readonly<{\n id: string;\n title: ReactNode;\n panel: ReactNode;\n disabled?: boolean;\n /** Include domain values when a decorative indicator carries more than expansion. */\n accessibilityLabel?: string;\n}>;\n\nexport type AccordionProps = Omit<HTMLAttributes<HTMLDivElement>, \"onChange\"> &\n Readonly<{\n items: readonly AccordionItem[];\n value?: readonly string[];\n defaultValue?: readonly string[];\n onValueChange?: (value: readonly string[]) => void;\n allowsMultipleExpanded?: boolean;\n density?: AccordionDensity;\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n /** Decorative replacement; interaction and expanded state remain owned by Accordion. */\n renderIndicator?: (props: Readonly<{ value: string; expanded: boolean; disabled: boolean }>) => ReactNode;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\nfunction validateAccordionItems(items: readonly AccordionItem[]): void {\n if (items.length === 0) throw new TypeError(\"Accordion requires at least one item\");\n const ids = new Set<string>();\n for (const item of items) {\n if (item.id.trim().length === 0) throw new TypeError(\"Accordion item id must not be empty\");\n if (ids.has(item.id)) throw new TypeError(`Duplicate Accordion item id: ${item.id}`);\n ids.add(item.id);\n }\n}\n\nfunction accordionFocusTarget(\n items: readonly AccordionItem[],\n currentIndex: number,\n key: string,\n): number | undefined {\n if (key === \"Home\") return items.findIndex((item) => !item.disabled);\n if (key === \"End\") {\n for (let index = items.length - 1; index >= 0; index -= 1) {\n if (!items[index]?.disabled) return index;\n }\n return -1;\n }\n const direction = key === \"ArrowDown\" ? 1 : key === \"ArrowUp\" ? -1 : 0;\n if (direction === 0) return undefined;\n for (let offset = 1; offset <= items.length; offset += 1) {\n const index = (currentIndex + direction * offset + items.length) % items.length;\n if (!items[index]?.disabled) return index;\n }\n return currentIndex;\n}\n\nexport const Accordion = forwardRef<HTMLDivElement, AccordionProps>(\n function Accordion(\n {\n items,\n value: valueProp,\n defaultValue = [],\n onValueChange,\n allowsMultipleExpanded = accordionRecipe.defaults.allowsMultipleExpanded,\n density = accordionRecipe.defaults.density,\n headingLevel = 3,\n renderIndicator,\n className,\n layoutStyle,\n ...props\n },\n ref,\n ) {\n validateAccordionItems(items);\n const [storedValue, setValue] = useControllableState<readonly string[]>({\n ...(valueProp === undefined ? {} : { value: valueProp }),\n defaultValue,\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n const validIds = new Set(items.map((item) => item.id));\n const committed = useRef(false);\n const value = valueProp === undefined && committed.current ? storedValue.filter(id => validIds.has(id)) : storedValue;\n useLayoutEffect(() => {\n committed.current = true;\n // Removed uncontrolled disclosures retire their expansion; reinsertion starts closed.\n if (value.length !== storedValue.length) setValue(value);\n }, [value, storedValue, setValue]);\n const valueIds = new Set<string>();\n for (const id of value) {\n if (!validIds.has(id)) throw new RangeError(`Unknown Accordion value: ${id}`);\n if (valueIds.has(id)) throw new TypeError(`Duplicate Accordion value: ${id}`);\n valueIds.add(id);\n }\n if (!allowsMultipleExpanded && value.length > 1) {\n throw new RangeError(\"Accordion only allows one expanded item\");\n }\n const baseId = useId().replaceAll(\":\", \"\");\n const triggerRefs = useRef(new Map<string, HTMLButtonElement>());\n const host = useRef<HTMLDivElement | null>(null);\n const focused = useRef<{ id: string; index: number; node: HTMLElement } | null>(null);\n useLayoutEffect(() => {\n const previous = focused.current;\n if (!previous) return;\n const index = items.findIndex(item => item.id === previous.id);\n const removed = index < 0;\n const disabledTrigger = index >= 0 && items[index]!.disabled && triggerRefs.current.get(previous.id) === previous.node;\n if (!(removed || disabledTrigger) || (document.activeElement !== previous.node && document.activeElement !== document.body)) return;\n // Restore only the removed/disabled target, never steal a user's external focus.\n const origin = removed ? Math.min(previous.index, items.length - 1) : index + 1;\n const target = Array.from({ length: items.length }, (_, offset) => items[(origin + offset) % items.length]!).find(item => !item.disabled);\n focused.current = null;\n (target ? triggerRefs.current.get(target.id) : host.current)?.focus();\n }, [items]);\n const toggle = (id: string) => {\n const expanded = value.includes(id);\n setValue(\n expanded\n ? value.filter((candidate) => candidate !== id)\n : allowsMultipleExpanded\n ? [...value, id]\n : [id],\n );\n };\n\n return (\n <div\n {...props}\n style={{ ...props.style, ...layoutStyle }}\n ref={node => { host.current = node; assignRef(ref, node); }}\n tabIndex={-1}\n className={classNames(\"hjm-accordion\", className)}\n data-density={density}\n data-multiple={allowsMultipleExpanded || undefined}\n >\n {items.map((item, index) => {\n const expanded = value.includes(item.id);\n const triggerId = `${baseId}-accordion-trigger-${index}`;\n const panelId = `${baseId}-accordion-panel-${index}`;\n const trigger = (\n <button\n ref={(node) => {\n if (node) triggerRefs.current.set(item.id, node);\n else triggerRefs.current.delete(item.id);\n }}\n id={triggerId}\n type=\"button\"\n className=\"hjm-accordion__trigger\"\n aria-expanded={expanded}\n aria-label={item.accessibilityLabel}\n aria-controls={panelId}\n disabled={item.disabled}\n onClick={() => toggle(item.id)}\n onKeyDown={(event: KeyboardEvent<HTMLButtonElement>) => {\n const target = accordionFocusTarget(items, index, event.key);\n if (target === undefined || target < 0) return;\n event.preventDefault();\n triggerRefs.current.get(items[target]!.id)?.focus();\n }}\n >\n <span className=\"hjm-accordion__title\">{item.title}</span>\n <span className=\"hjm-accordion__indicator\" aria-hidden=\"true\">\n {renderIndicator ? renderIndicator({ value: item.id, expanded, disabled: item.disabled === true }) : expanded ? \"−\" : \"+\"}\n </span>\n </button>\n );\n return (\n <div\n key={item.id}\n onFocusCapture={event => { if (event.target instanceof HTMLElement) focused.current = { id: item.id, index, node: event.target }; }}\n className=\"hjm-accordion__item\"\n data-state={item.disabled ? \"disabled\" : expanded ? \"expanded\" : \"collapsed\"}\n >\n {createElement(`h${headingLevel}`, { className: \"hjm-accordion__header\" }, trigger)}\n <div\n id={panelId}\n role=\"region\"\n className=\"hjm-accordion__panel\"\n aria-labelledby={triggerId}\n hidden={!expanded}\n >\n {item.panel}\n </div>\n </div>\n );\n })}\n </div>\n );\n },\n);\n\n\n/** Props handed to a product image host (`next/image`, a cache-aware loader) that replaces Avatar's `<img>`. */\nexport type AvatarImageRenderProps = Readonly<{\n src: string;\n /** `\"\"` for a decorative avatar or `alt=\"\"`; otherwise the avatar's accessible name. */\n alt: string;\n /** Diameter in px from the size step. */\n size: number;\n /** Avatar's image class (fill + cover); keep it so the frame's clipping and fit still apply. */\n className: string;\n /** Report a failure for this `src` generation; callbacks from a replaced `src` are ignored. */\n onError: () => void;\n}>;\n\n/**\n * Accessibility identity. A meaningful avatar is named by `name` (or `alt`); a decorative one — next to a visible\n * author name, or ornament without a person — is hidden from assistive tech and may omit `name` (2026-10-23:\n * Burntok's decorative avatars had no name to pass).\n */\ntype AvatarIdentity =\n | Readonly<{ decorative?: false; name: string; alt?: string }>\n | Readonly<{ decorative: true; name?: string; alt?: never }>;\n\nexport type AvatarProps = Omit<HTMLAttributes<HTMLSpanElement>, \"children\"> &\n AvatarIdentity &\n Readonly<{\n /** Profile navigation; products provide the member route and localized name. */\n action?: Readonly<{ label: string; onPress(): void; disabled?: boolean }>;\n src?: string;\n /** contain preserves the entire picture inside the shaped frame, including its corners. */\n imageFit?: \"cover\" | \"contain\";\n fallback?: ReactNode;\n renderFallback?: (context: AvatarFallbackContext) => ReactNode;\n /** Product image host in place of the built-in `<img>`. Exclusive with `imageProps`. */\n renderImage?: (props: AvatarImageRenderProps) => ReactNode;\n size?: AvatarSize;\n shape?: AvatarShape;\n /** Border/background treatment from avatarRecipe.frames; `none` when product artwork fills the frame. */\n frame?: AvatarFrame;\n /** A small mark (team badge, status dot) on a corner of the avatar's box. It is not clipped by the frame. */\n accessory?: ReactNode;\n accessoryPlacement?: CornerAccessoryPlacement;\n imageProps?: Omit<ImgHTMLAttributes<HTMLImageElement>, \"alt\" | \"src\">;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\nexport const Avatar = forwardRef<HTMLSpanElement, AvatarProps>(function Avatar(\n {\n name,\n action,\n src,\n imageFit = \"cover\",\n alt: altProp,\n decorative = false,\n fallback,\n renderFallback,\n renderImage,\n size = avatarRecipe.defaults.size,\n shape = avatarRecipe.defaults.shape,\n frame = avatarRecipe.defaults.frame,\n accessory,\n accessoryPlacement = avatarRecipe.defaults.accessoryPlacement,\n imageProps,\n className,\n layoutStyle,\n ...props\n },\n ref,\n) {\n if (!decorative && (name === undefined || name.trim().length === 0)) throw new TypeError(\"Avatar name must not be empty\");\n if (renderImage && imageProps) throw new TypeError(\"Avatar renderImage and imageProps are exclusive; pass image attributes to the host\");\n validateAvatarPresentation({ shape, frame, accessoryPlacement });\n const diameter = resolveAvatarSize(size);\n const alt = decorative ? \"\" : altProp ?? name ?? \"\";\n const generation = useMemo(() => ({}), [src]);\n const active = useRef<object | null>(generation);\n useLayoutEffect(() => { active.current = generation; return () => { active.current = null; }; }, [generation]);\n const [failed, setFailed] = useState<object | null>(null);\n const imageAvailable = Boolean(src) && failed !== generation;\n const { onError, className: imageClassName, ...restImageProps } = imageProps ?? {};\n const fail = () => { if (active.current === generation) setFailed(generation); };\n const initials = name !== undefined && name.trim().length > 0 ? resolveAvatarInitials(name) : null;\n const avatarNode = (\n <span\n {...props}\n aria-hidden={decorative || props[\"aria-hidden\"]}\n style={{ ...props.style, ...(action ? {} : layoutStyle), \"--hjm-avatar-size\": `${diameter}px`,\n \"--hjm-avatar-contained-ratio\": avatarRecipe.containedImageRatio,\n // Absolute children are placed from the padding edge; subtract the frame border so the offset is from the box.\n \"--hjm-avatar-accessory-inset\": `${0 - avatarRecipe.accessory.offset - avatarRecipe.frames[frame].borderWidth}px` } as CSSProperties}\n ref={ref}\n className={classNames(\"hjm-avatar\", className)}\n data-size={size}\n data-shape={shape}\n data-image-fit={imageFit}\n data-frame={frame}\n data-state={imageAvailable ? \"image\" : \"fallback\"}\n >\n {src && imageAvailable ? (\n renderImage ? (\n <Fragment key={src}>{renderImage({ src, alt, size: diameter, className: \"hjm-avatar__image\", onError: fail })}</Fragment>\n ) : (\n <img\n {...restImageProps}\n key={src}\n src={src}\n alt={alt}\n className={classNames(\"hjm-avatar__image\", imageClassName)}\n onError={(event) => {\n if (active.current !== generation) return;\n setFailed(generation);\n onError?.(event);\n }}\n />\n )\n ) : (\n <span\n className=\"hjm-avatar__fallback\"\n role={alt.length > 0 ? \"img\" : undefined}\n aria-label={alt.length > 0 ? alt : undefined}\n aria-hidden={alt.length === 0 || undefined}\n >\n {renderFallback?.({ size: diameter, decorative: true }) ?? fallback ?? initials}\n </span>\n )}\n {accessory ? <span className=\"hjm-avatar__accessory\" data-placement={accessoryPlacement}>{accessory}</span> : null}\n </span>\n );\n return action ? <IdentityAction action={action} {...(layoutStyle?{layoutStyle}:{})}>{avatarNode}</IdentityAction> : avatarNode;\n});\n\nexport type AvatarGroupProps = Omit<HTMLAttributes<HTMLSpanElement>, \"children\"> &\n Readonly<{\n /** Required: a pile of faces is meaningless to a screen reader otherwise. */\n label: string;\n children: ReactNode;\n size?: AvatarSize;\n /** Product-composed overflow copy such as \"+3\"; the count is the product's. */\n overflow?: ReactNode;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\n/**\n * Overlapping avatars. The overlap comes from the recipe ratio rather than a\n * pixel value so it holds across all four sizes, and the group carries one\n * accessible name instead of letting a reader walk five unlabelled images.\n */\nexport const AvatarGroup = forwardRef<HTMLSpanElement, AvatarGroupProps>(function AvatarGroup(\n { label, children, size = avatarRecipe.defaults.size, overflow, className, layoutStyle, style, ...props },\n ref,\n) {\n if (label.trim().length === 0) throw new TypeError(\"AvatarGroup label must not be empty\");\n const offset = Math.round(avatarRecipe.sizes[size] * avatarRecipe.overlapRatio);\n return (\n <span\n {...props}\n ref={ref}\n role=\"group\"\n aria-label={label}\n className={classNames(\"hjm-avatar-group\", className)}\n data-size={size}\n // The caller `style` used to be replaced by the overlap variable; merge it\n // and keep the recipe overlap last so it stays size-derived.\n style={{ ...style, ...layoutStyle, \"--hjm-avatar-overlap\": `${offset}px` } as CSSProperties}\n >\n {children}\n {overflow ? <span className=\"hjm-avatar-group__overflow\" aria-hidden=\"true\">{overflow}</span> : null}\n </span>\n );\n});\n\nexport type DividerOrientation = \"horizontal\" | \"vertical\";\nexport type DividerInset = keyof typeof dividerRecipe.insets;\n\nexport type DividerProps = HTMLAttributes<HTMLElement> &\n Readonly<{\n orientation?: DividerOrientation;\n inset?: DividerInset;\n /** `dashed`: a break inside one surface rather than a new section; dash/gap from dividerRecipe.lineStyles. */\n lineStyle?: DividerLineStyle;\n decorative?: boolean;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\nexport const Divider = forwardRef<HTMLElement, DividerProps>(function Divider(\n {\n orientation = dividerRecipe.defaults.orientation,\n inset = dividerRecipe.defaults.inset,\n lineStyle = dividerRecipe.defaults.lineStyle,\n decorative = false,\n className,\n layoutStyle,\n ...props\n },\n ref,\n) {\n validateDividerLineStyle(lineStyle);\n return createElement(orientation === \"horizontal\" ? \"hr\" : \"div\", {\n ...props,\n style: { ...props.style, ...layoutStyle },\n ref,\n className: classNames(\"hjm-divider\", className),\n \"data-orientation\": orientation,\n \"data-inset\": inset,\n \"data-line-style\": lineStyle,\n role: decorative ? \"presentation\" : \"separator\",\n \"aria-hidden\": decorative || undefined,\n \"aria-orientation\": decorative ? undefined : orientation,\n });\n});\n\nexport type ListSeparatorProps = Readonly<{\n separator?: keyof typeof listRecipe.separators;\n leading?: boolean;\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\n/** Decorative separator for a product-owned virtual collection. List owns separators for finite rows. */\nexport function ListSeparator({ separator = \"content\", leading = false, layoutStyle }: ListSeparatorProps) {\n if (!listRecipe.separators[separator]) return null;\n return <div aria-hidden=\"true\" role=\"presentation\" className=\"hjm-list-separator\" style={{\n marginInlineStart: `var(--hjm-list-separator-${separator}-${leading ? \"leading-start\" : \"start\"})`,\n marginInlineEnd: `var(--hjm-list-separator-${separator}-end)`,\n ...layoutStyle,\n }} />;\n}\n\nexport type ListAppearance = \"grouped\" | \"plain\";\n\nexport type ListProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Readonly<{\n label: string;\n children: ReactNode;\n separator?: keyof typeof listRecipe.separators;\n appearance?: ListAppearance;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\n/** Semantic list container that owns separators around composed rows. */\nexport const List = forwardRef<HTMLDivElement, ListProps>(function List(\n {\n label,\n children,\n separator = listRecipe.defaults.separator,\n appearance = \"plain\",\n className,\n layoutStyle,\n ...props\n },\n ref,\n) {\n if (!label.trim()) throw new TypeError(\"List label must not be empty\");\n const items = Children.toArray(children);\n return (\n <div\n {...props}\n style={{ ...props.style, ...layoutStyle }}\n ref={ref}\n aria-label={label}\n className={classNames(\"hjm-list\", className)}\n data-appearance={appearance}\n data-separator={separator}\n role=\"list\"\n >\n {items.map((item, index) => (\n <div\n className=\"hjm-list__item\"\n key={isValidElement(item) && item.key !== null ? item.key : `hjm-list-${index}`}\n role=\"listitem\"\n >\n {item}\n </div>\n ))}\n </div>\n );\n});\n\nexport type StatisticTrendMarkRenderProps = Readonly<{\n name: \"trendUp\" | \"trendDown\" | \"trendFlat\";\n color: \"currentColor\";\n size: number;\n}>;\n\nexport type ComposeStatisticAccessibilityLabel<Id extends string = string> = (\n input: Readonly<{\n contextLabel?: string;\n descriptor: ResolvedStatisticDescriptor<Id>;\n valueText: string;\n }>,\n) => string;\n\nexport type StatisticProps<Id extends string = string> = Omit<\n HTMLAttributes<HTMLElement>,\n \"children\"\n> & Readonly<{\n descriptor: StatisticDescriptor<Id>;\n density?: StatisticDensity;\n presentation?: StatisticPresentation;\n contextLabel?: string;\n accessibilityLabel?: string;\n composeAccessibilityLabel?: ComposeStatisticAccessibilityLabel<Id>;\n leading?: ReactNode;\n /** Product-owned series/category color; value text and decorative leading share it. */\n valueColor?: string;\n renderTrendMark?: (props: StatisticTrendMarkRenderProps) => ReactNode;\n /** Optional visual adapter; the descriptor remains the accessible value source. */\n renderValue?: (value: string) => ReactNode;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport function Statistic<Id extends string = string>(props: StatisticProps<Id>) {\n return <StatisticView {...props} />;\n}\n\nfunction StatisticView<Id extends string = string>({\n descriptor,\n density = \"comfortable\",\n presentation = \"plain\",\n contextLabel,\n accessibilityLabel,\n composeAccessibilityLabel,\n leading,\n valueColor,\n bar = false,\n renderTrendMark,\n renderValue,\n className,\n layoutStyle,\n ...props\n}: StatisticProps<Id> & { bar?: boolean }) {\n const resolved = resolveStatisticDescriptor(descriptor);\n const valueText = `${resolved.prefix ?? \"\"}${resolved.value}${resolved.suffix ?? \"\"}`;\n const announcement = accessibilityLabel ?? composeAccessibilityLabel?.({\n ...(contextLabel === undefined ? {} : { contextLabel }),\n descriptor: resolved,\n valueText,\n }) ?? [contextLabel, resolved.label, valueText, resolved.trend?.label, resolved.hint]\n .filter(Boolean)\n .join(\", \");\n if (!announcement.trim()) throw new TypeError(\"Statistic accessibility label must not be empty\");\n const trendName = resolved.trend\n ? statisticRecipe.trend.marks[resolved.trend.direction]\n : undefined;\n return (\n <article\n {...props}\n style={{ ...props.style, ...layoutStyle, ...(valueColor ? { \"--hjm-statistic-value-color\": valueColor } : {}) } as CSSProperties}\n aria-label={announcement}\n className={classNames(\"hjm-statistic\", className)}\n data-arrangement={bar ? \"bar\" : undefined}\n data-density={density}\n data-presentation={presentation}\n >\n <span aria-hidden=\"true\" className=\"hjm-statistic__label\">{resolved.label}</span>\n <span aria-hidden=\"true\" className=\"hjm-statistic__value-row\" data-leading={leading === undefined ? undefined : \"\"}>\n {leading === undefined ? null : <span className=\"hjm-statistic__leading\">{leading}</span>}\n {resolved.prefix ? <span className=\"hjm-statistic__affix\">{resolved.prefix}</span> : null}\n <strong className=\"hjm-statistic__value\">{renderValue?.(resolved.value) ?? resolved.value}</strong>\n {resolved.suffix ? <span className=\"hjm-statistic__affix\">{resolved.suffix}</span> : null}\n </span>\n {resolved.trend ? (\n <span aria-hidden=\"true\" className=\"hjm-statistic__trend\" data-tone={resolved.trend.tone}>\n <span className=\"hjm-statistic__trend-mark\">\n {renderTrendMark?.({ name: trendName!, color: \"currentColor\", size: 16 }) ?? (\n resolved.trend.direction === \"up\" ? \"↑\" : resolved.trend.direction === \"down\" ? \"↓\" : \"—\"\n )}\n </span>\n {resolved.trend.label}\n </span>\n ) : null}\n {resolved.hint ? <span aria-hidden=\"true\" className=\"hjm-statistic__hint\">{resolved.hint}</span> : null}\n </article>\n );\n}\n\nexport type StatisticGroupProps<Id extends string = string> = Omit<\n HTMLAttributes<HTMLDivElement>,\n \"children\"\n> & Readonly<{\n label: string;\n descriptor: StatisticGroupDescriptor<Id>;\n density?: StatisticDensity;\n presentation?: StatisticPresentation;\n composeAccessibilityLabel?: ComposeStatisticAccessibilityLabel<Id>;\n /** A bar is a single equal-width row for a few short counts; grid retains responsive columns. */\n arrangement?: \"grid\" | \"bar\";\n renderLeading?: (item: StatisticDescriptor<Id>, context: { color: string; size: number }) => ReactNode;\n getValueColor?: (item: StatisticDescriptor<Id>) => string | undefined;\n renderTrendMark?: (props: StatisticTrendMarkRenderProps) => ReactNode;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport function StatisticGroup<Id extends string = string>({\n label,\n descriptor,\n density,\n presentation,\n composeAccessibilityLabel,\n arrangement = \"grid\",\n renderLeading,\n getValueColor,\n renderTrendMark,\n className,\n style,\n layoutStyle,\n ...props\n}: StatisticGroupProps<Id>) {\n validateStatisticGroup(descriptor);\n if (!label.trim()) throw new TypeError(\"StatisticGroup label must not be empty\");\n return (\n <div\n {...props}\n aria-label={label}\n className={classNames(\"hjm-statistic-group\", className)}\n role=\"list\"\n data-arrangement={arrangement}\n style={{ ...style, ...layoutStyle, \"--hjm-statistic-columns\": arrangement === \"bar\" ? descriptor.items.length : descriptor.columns ?? statisticRecipe.defaults.columns } as CSSProperties}\n >\n {descriptor.items.map((item) => {\n const valueColor = getValueColor?.(item);\n return (\n <div key={item.id} role=\"listitem\">\n <StatisticView\n bar={arrangement === \"bar\"}\n {...(valueColor ? { valueColor } : {})}\n {...(renderLeading ? { leading: renderLeading(item, { color: valueColor ?? \"currentColor\", size: statisticRecipe.group.bar.iconSize }) } : {})}\n contextLabel={label}\n descriptor={item}\n {...(composeAccessibilityLabel === undefined ? {} : { composeAccessibilityLabel })}\n {...(density === undefined ? {} : { density })}\n {...(presentation === undefined ? {} : { presentation })}\n {...(renderTrendMark === undefined ? {} : { renderTrendMark })}\n />\n </div>\n ); })}\n </div>\n );\n}\n\nexport type DescriptionListProps<Id extends string = string> = Omit<\n HTMLAttributes<HTMLDListElement>,\n \"children\"\n> &\n Readonly<{\n items: readonly DescriptionItemDescriptor<Id>[];\n columns?: DescriptionListColumns;\n layout?: \"stacked\" | \"inline\";\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\nfunction DescriptionListInner<Id extends string>(\n { items, columns, layout, className, layoutStyle, style, ...props }: DescriptionListProps<Id>,\n forwardedRef: ForwardedRef<HTMLDListElement>,\n) {\n const descriptor = resolveDescriptionListDescriptor({\n items,\n ...(columns === undefined ? {} : { columns }),\n ...(layout === undefined ? {} : { layout }),\n });\n const [width, ref] = useElementWidth(forwardedRef);\n const theme = useOptionalHjmTheme();\n const resolvedColumns = resolveDescriptionListColumnCount(\n width ?? 0,\n descriptor.columns,\n theme?.environment.textScale ?? 1,\n );\n const responsiveStyle = {\n ...style,\n ...layoutStyle,\n \"--hjm-description-columns\": resolvedColumns,\n } as CSSProperties;\n return (\n <dl\n {...props}\n ref={ref}\n className={classNames(\"hjm-description-list\", className)}\n data-layout={descriptor.layout}\n data-columns={resolvedColumns}\n data-state={resolvedColumns < descriptor.columns ? \"collapsed\" : \"ready\"}\n style={responsiveStyle}\n >\n {descriptor.items.map((item) => (\n <div key={item.id} className=\"hjm-description-list__item\">\n <dt className=\"hjm-description-list__label\">{item.label}</dt>\n <dd className=\"hjm-description-list__value\">{item.value}</dd>\n </div>\n ))}\n </dl>\n );\n}\n\nexport const DescriptionList = forwardRef(DescriptionListInner) as <Id extends string = string>(\n props: DescriptionListProps<Id> & RefAttributes<HTMLDListElement>,\n) => ReactElement;\n\nexport type TableSortDirection = \"ascending\" | \"descending\";\n\nexport type TableColumn<Row> = Readonly<{\n id: string;\n header: ReactNode;\n cell: (row: Row, rowIndex: number) => ReactNode;\n align?: \"start\" | \"center\" | \"end\";\n sortable?: boolean;\n sortDirection?: TableSortDirection;\n}>;\n\nexport type TableProps<Row> = Omit<TableHTMLAttributes<HTMLTableElement>, \"children\"> &\n Readonly<{\n columns: readonly TableColumn<Row>[];\n rows: readonly Row[];\n getRowKey: (row: Row, rowIndex: number) => string;\n caption?: ReactNode;\n /** Localized content rendered when rows is empty. */\n emptyState: ReactNode;\n onSortChange?: (columnId: string, direction: TableSortDirection) => void;\n wrapperClassName?: string;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\n// Table's callback cannot express null; share the sort policy with a two-state cycle.\nfunction TableInner<Row>(\n {\n columns,\n rows,\n getRowKey,\n caption,\n emptyState,\n onSortChange,\n wrapperClassName,\n className,\n layoutStyle,\n ...props\n }: TableProps<Row>,\n ref: ForwardedRef<HTMLTableElement>,\n) {\n if (columns.length === 0) throw new TypeError(\"Table requires at least one column\");\n const ids = new Set<string>();\n for (const column of columns) {\n if (column.id.trim().length === 0) throw new TypeError(\"Table column id must not be empty\");\n if (ids.has(column.id)) throw new TypeError(`Duplicate Table column id: ${column.id}`);\n ids.add(column.id);\n if (column.sortDirection && !column.sortable) {\n throw new TypeError(`Table column ${column.id} has sortDirection but is not sortable`);\n }\n }\n const rowKeys = rows.map((row, rowIndex) => getRowKey(row, rowIndex));\n const seenRowKeys = new Set<string>();\n for (const rowKey of rowKeys) {\n if (rowKey.trim().length === 0) throw new TypeError(\"Table row key must not be empty\");\n if (seenRowKeys.has(rowKey)) throw new TypeError(`Duplicate Table row key: ${rowKey}`);\n seenRowKeys.add(rowKey);\n }\n return (\n // Placement belongs to the scroll wrapper (the visual root); `style` keeps\n // going to the <table>, where it always went.\n <div className={classNames(\"hjm-table-scroll\", wrapperClassName)} style={layoutStyle} tabIndex={0}>\n <table {...props} ref={ref} className={classNames(\"hjm-table\", className)}>\n {caption ? <caption className=\"hjm-table__caption\">{caption}</caption> : null}\n <thead>\n <tr>\n {columns.map((column) => (\n <th\n key={column.id}\n scope=\"col\"\n className=\"hjm-table__header\"\n data-align={column.align ?? \"start\"}\n aria-sort={column.sortDirection ?? (column.sortable ? \"none\" : undefined)}\n >\n {column.sortable ? (\n <TableSortButton\n header={column.header}\n {...(column.sortDirection === undefined ? {} : { direction: column.sortDirection })}\n glyphs={{ ascending: \" ↑\", descending: \" ↓\", none: \" ↕\" }}\n className=\"hjm-table__sort\"\n onSort={() => {\n const next = getNextDataTableSortState(\n column.sortDirection ? { columnId: column.id, direction: column.sortDirection } : null,\n column.id, \"two-state\",\n );\n onSortChange?.(column.id, next!.direction);\n }} />\n ) : column.header}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.length === 0 ? (\n <tr>\n <td className=\"hjm-table__empty\" colSpan={columns.length}>{emptyState}</td>\n </tr>\n ) : (\n rows.map((row, rowIndex) => (\n <tr key={rowKeys[rowIndex]} className=\"hjm-table__row\">\n {columns.map((column) => (\n <td\n key={column.id}\n className=\"hjm-table__cell\"\n data-align={column.align ?? \"start\"}\n >\n {column.cell(row, rowIndex)}\n </td>\n ))}\n </tr>\n ))\n )}\n </tbody>\n </table>\n </div>\n );\n}\n\nexport const Table = forwardRef(TableInner) as <Row>(\n props: TableProps<Row> & RefAttributes<HTMLTableElement>,\n) => ReactElement;\n\nexport type TimelineProps<Id extends string = string> = Omit<\n HTMLAttributes<HTMLOListElement>,\n \"children\"\n> &\n Readonly<{\n items: readonly TimelineItemDescriptor<Id>[];\n /** Default journal uses unfilled reading rows; selection adds record disclosure. \"record\" retains the earlier card surface. */\n variant?: \"record\" | \"journal\";\n composeAccessibleName: ComposeTimelineAccessibleName;\n renderMetadata?: (item: TimelineItemDescriptor<Id>) => ReactNode;\n /** Per-record commands of a passive Timeline. Not allowed together with selection. */\n renderActions?: (item: TimelineItemDescriptor<Id>) => ReactNode;\n /**\n * Makes records selectable (journal disclosure buttons; record variant listbox). `null` = nothing chosen. Supply\n * together with `onSelectedIdChange`; the list then needs `aria-label` or `aria-labelledby`.\n */\n selectedId?: Id | null;\n /** Called with the record chosen by click, Enter/Space or ArrowUp/ArrowDown/Home/End (selection follows focus). */\n onSelectedIdChange?: (id: Id) => void;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\nfunction TimelineInner<Id extends string = string>(\n {\n items,\n variant = timelineDefaults.variant,\n composeAccessibleName,\n renderMetadata,\n renderActions,\n selectedId,\n onSelectedIdChange,\n className,\n layoutStyle,\n onKeyDown,\n ...props\n }: TimelineProps<Id>,\n ref: ForwardedRef<HTMLOListElement>,\n) {\n validateTimelineSelection(selectedId, onSelectedIdChange, { hasActions: renderActions !== undefined, variant });\n const selectable = onSelectedIdChange !== undefined;\n const journal = variant === \"journal\";\n // Anchor collapsed state to its selected record. External map/day selection opens the new record immediately.\n const [disclosure, setDisclosure] = useState({ id: selectedId, collapsed: false });\n if (disclosure.id !== selectedId) setDisclosure({ id: selectedId, collapsed: false });\n if (selectable && !props[\"aria-label\"] && !props[\"aria-labelledby\"]) {\n throw new TypeError(\"A selectable Timeline needs aria-label or aria-labelledby (listbox name)\");\n }\n const resolved = resolveTimelineDescriptor(\n selectable ? { items, selectedId: selectedId ?? null } : { items },\n { composeAccessibleName },\n );\n const idPrefix = useId();\n // Roving tab stop: the selected record, or the first one before anything is chosen.\n const tabStopId = selectable ? (selectedId ?? resolved[0]?.id) : undefined;\n const select = (list: HTMLOListElement, id: Id, toggle = false) => {\n if (journal) setDisclosure({ id, collapsed: toggle && id === selectedId && !disclosure.collapsed });\n if (id !== selectedId) onSelectedIdChange?.(id);\n list.querySelector<HTMLElement>(`[data-timeline-id=\"${CSS.escape(id)}\"]`)?.focus();\n };\n const handleKeyDown = (event: KeyboardEvent<HTMLOListElement>) => {\n onKeyDown?.(event);\n if (!selectable || event.defaultPrevented) return;\n const focusedId = (event.target as HTMLElement).closest<HTMLElement>(\"[data-timeline-id]\")?.dataset.timelineId as Id | undefined;\n if (focusedId === undefined) return;\n if (!journal && (event.key === \"Enter\" || event.key === \" \")) {\n event.preventDefault();\n select(event.currentTarget, focusedId, true);\n return;\n }\n const target = getTimelineSelectionTarget(items, focusedId, event.key);\n if (target === undefined) return;\n event.preventDefault();\n select(event.currentTarget, target);\n };\n return (\n <ol\n {...props}\n style={{ ...props.style, ...layoutStyle }}\n ref={ref}\n className={classNames(\"hjm-timeline\", className)}\n role={selectable && !journal ? \"listbox\" : props.role}\n aria-orientation={selectable && !journal ? \"vertical\" : undefined}\n data-selectable={selectable || undefined}\n data-variant={variant}\n onKeyDown={handleKeyDown}\n >\n {resolved.map((item, index) => {\n const actions = renderActions?.(item);\n const detailIds = selectable\n ? [item.description ? `${idPrefix}-${index}-description` : null, item.timestamp ? `${idPrefix}-${index}-timestamp` : null].filter(Boolean).join(\" \")\n : \"\";\n const expanded = !selectable || (item.selected && (disclosure.id !== selectedId || !disclosure.collapsed));\n const body = <>\n <span className=\"hjm-timeline__rail\" aria-hidden=\"true\">\n <span className=\"hjm-timeline__dot\" />\n {index < resolved.length - 1 ? <span className=\"hjm-timeline__connector\" /> : null}\n </span>\n <span className=\"hjm-timeline__content\">\n <span className=\"hjm-timeline__heading\">\n <strong className=\"hjm-timeline__label\">{item.label}</strong>\n {!journal ? renderMetadata?.(item) : selectable ? <span className=\"hjm-timeline__chevron\" aria-hidden=\"true\">⌄</span> : null}\n </span>\n {journal && item.timestamp ? <time className=\"hjm-timeline__timestamp\" dateTime={item.dateTime}>{item.timestamp}</time> : null}\n <span className=\"hjm-timeline__details\" id={`${idPrefix}-${index}-details`} hidden={journal && !expanded}>\n {journal ? renderMetadata?.(item) : null}\n {item.description ? <span className=\"hjm-timeline__description\" id={selectable && !journal ? `${idPrefix}-${index}-description` : undefined}>{item.description}</span> : null}\n {!journal && item.timestamp ? <time className=\"hjm-timeline__timestamp\" dateTime={item.dateTime} id={selectable ? `${idPrefix}-${index}-timestamp` : undefined}>{item.timestamp}</time> : null}\n </span>\n </span>\n {actions ? <div className=\"hjm-timeline__actions\">{actions}</div> : null}\n </>;\n if (journal && selectable) return <li key={item.id}>\n <button type=\"button\" className=\"hjm-timeline__item\" data-tone={item.tone} data-state={item.selected ? \"selected\" : undefined}\n data-timeline-id={item.id} aria-label={[item.accessibleName, item.timestamp].filter(Boolean).join(\", \")}\n aria-expanded={expanded} aria-controls={`${idPrefix}-${index}-details`} aria-describedby={expanded ? `${idPrefix}-${index}-details` : undefined}\n onClick={event => select(event.currentTarget.closest(\"ol\")!, item.id, true)}>{body}</button>\n </li>;\n return <li aria-label={item.accessibleName} className=\"hjm-timeline__item\" data-tone={item.tone}\n data-emphasized={item.emphasized || undefined} key={item.id}\n {...(selectable ? {\n role: \"option\", \"aria-selected\": item.selected, \"aria-describedby\": detailIds || undefined,\n \"data-timeline-id\": item.id, \"data-state\": item.selected ? \"selected\" : undefined,\n tabIndex: item.id === tabStopId ? 0 : -1,\n onClick: (event: { currentTarget: HTMLLIElement }) => select(event.currentTarget.parentElement as HTMLOListElement, item.id),\n } : {})}>{body}</li>\n })}\n </ol>\n );\n}\n\nexport const Timeline = forwardRef(TimelineInner) as <Id extends string = string>(\n props: TimelineProps<Id> & RefAttributes<HTMLOListElement>,\n) => ReactElement;\n"]}
@@ -10,6 +10,13 @@ export type DateRangeSummary = Readonly<{
10
10
  placeholder: string;
11
11
  formatDate: (date: string) => string;
12
12
  }>;
13
+ /** Fold the grid behind `summary`, which becomes the toggle; presets stay visible. */
14
+ export type DateRangeCollapsible = Readonly<{
15
+ /** Controlled open state. Without it the grid starts folded and folds again after a preset or a completing date. */
16
+ expanded?: boolean;
17
+ defaultExpanded?: boolean;
18
+ onExpandedChange?: (expanded: boolean) => void;
19
+ }>;
13
20
  /** A shortcut such as "최근 7일" or "1개월" that ends on the grid's `todayDate`. */
14
21
  export type DateRangePresetOption = Readonly<{
15
22
  id: string;
@@ -39,10 +46,15 @@ export type DateRangePickerProps<Content = unknown> = Readonly<{
39
46
  summary?: DateRangeSummary;
40
47
  /** Shortcut chips between the summary and the grid; each ends on `descriptor.grid.todayDate`. */
41
48
  presets?: readonly DateRangePresetOption[];
49
+ /**
50
+ * Fold the grid behind `summary` (required), which becomes a toggle button; presets stay visible. A preset or a date
51
+ * that completes the range folds it again (`resolveDateRangeExpandedAfterSelection`).
52
+ */
53
+ collapsible?: DateRangeCollapsible;
42
54
  className?: string;
43
55
  /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */
44
56
  layoutStyle?: HjmCompositionStyleProp;
45
57
  }>;
46
- export declare function DateRangePicker<Content = unknown>({ descriptor, composeAccessibleName, value: controlledValue, defaultValue, onValueChange, previousMonth, nextMonth, rangeLabels, maxRange, renderCellContent, summary, presets, className, layoutStyle, }: DateRangePickerProps<Content>): import("react").JSX.Element;
58
+ export declare function DateRangePicker<Content = unknown>({ descriptor, composeAccessibleName, value: controlledValue, defaultValue, onValueChange, previousMonth, nextMonth, rangeLabels, maxRange, renderCellContent, summary, presets, collapsible, className, layoutStyle, }: DateRangePickerProps<Content>): import("react").JSX.Element;
47
59
  export {};
48
60
  //# sourceMappingURL=date-range.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-range.d.ts","sourceRoot":"","sources":["../src/date-range.tsx"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,cAAc,EAMnB,KAAK,qBAAqB,EAG1B,KAAK,cAAc,EACpB,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EACV,kBAAkB,EAClB,6BAA6B,EAC9B,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAY,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAInE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACtC,CAAC,CAAC;AAEH,+EAA+E;AAC/E,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,qBAAqB,CAAA;CAAE,CAAC,CAAC;AAG3G,KAAK,u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,EACT,WAAW,EACX,QAAgC,EAChC,iBAAiB,EACjB,OAAO,EACP,OAAO,EACP,WAAW,EACX,SAAS,EACT,WAAW,GACZ,EAAE,oBAAoB,CAAC,OAAO,CAAC,+BA+F/B"}
@@ -1,38 +1,55 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { dateRangeRecipe, emptyDateRange, defaultDateRangeLimit, isDateWithinRangeLimit, isCompleteDateRange, resolveDateRangeActiveEdge, resolveDateRangeCellPaint, resolveDateRangeCellState, resolveDateRangePreset, resolveDateRangeSelection, validateDateRange, } from "@hjmds/design-contracts/components/date-range";
3
+ import { dateRangeRecipe, emptyDateRange, defaultDateRangeLimit, isDateWithinRangeLimit, isCompleteDateRange, resolveDateRangeActiveEdge, resolveDateRangeCellPaint, resolveDateRangeCellState, resolveDateRangeExpandedAfterSelection, resolveDateRangePreset, resolveDateRangeSelection, validateDateRange, } from "@hjmds/design-contracts/components/date-range";
4
4
  import { useState } from "react";
5
+ import { Icon } from "./supplemental-display.js";
5
6
  import { Calendar } from "./calendar.js";
6
7
  import { classNames, useControllableState } from "./internal.js";
7
8
  import { CalendarPaintContext } from "./internal/calendar-paint.js";
8
9
  import { Chip } from "./selection.js";
9
- export function DateRangePicker({ descriptor, composeAccessibleName, value: controlledValue, defaultValue, onValueChange, previousMonth, nextMonth, rangeLabels, maxRange = defaultDateRangeLimit, renderCellContent, summary, presets, className, layoutStyle, }) {
10
+ export function DateRangePicker({ descriptor, composeAccessibleName, value: controlledValue, defaultValue, onValueChange, previousMonth, nextMonth, rangeLabels, maxRange = defaultDateRangeLimit, renderCellContent, summary, presets, collapsible, className, layoutStyle, }) {
11
+ if (collapsible && !summary)
12
+ throw new TypeError("DateRangePicker collapsible needs summary to act as its toggle");
10
13
  const [value, setValue] = useControllableState({
11
14
  ...(controlledValue === undefined ? {} : { value: controlledValue }),
12
15
  defaultValue: defaultValue ?? emptyDateRange,
13
16
  ...(onValueChange === undefined ? {} : { onChange: onValueChange }),
14
17
  });
15
18
  validateDateRange(value, maxRange);
19
+ const [expanded, setExpanded] = useControllableState({
20
+ ...(collapsible?.expanded === undefined ? {} : { value: collapsible.expanded }),
21
+ defaultValue: collapsible?.defaultExpanded ?? false,
22
+ ...(collapsible?.onExpandedChange === undefined ? {} : { onChange: collapsible.onExpandedChange }),
23
+ });
24
+ const open = collapsible === undefined || expanded;
25
+ const select = (next, source) => {
26
+ setValue(next);
27
+ if (collapsible && !resolveDateRangeExpandedAfterSelection(next, source))
28
+ setExpanded(false);
29
+ };
16
30
  // The hovered date previews the not-yet-committed end through the same cell
17
31
  // state function the committed range uses.
18
32
  const [pointer, setPointer] = useState(null);
19
33
  const hovered = pointer !== null && isDateWithinRangeLimit(value, pointer, maxRange) ? pointer : null;
20
34
  const activeEdge = resolveDateRangeActiveEdge(value);
35
+ // A button may only hold phrasing content, so the fields become spans when the summary is the toggle.
36
+ const Field = collapsible ? "span" : "div";
21
37
  const field = (edge) => {
22
38
  const date = value[edge];
23
- return (_jsxs("div", { className: "hjm-date-range__field", "data-active": activeEdge === edge || undefined, "data-empty": date === null || undefined, children: [_jsx("span", { className: "hjm-date-range__field-label", children: edge === "start" ? summary.startLabel : summary.endLabel }), _jsx("span", { className: "hjm-date-range__field-value", children: date === null ? summary.placeholder : summary.formatDate(date) })] }, edge));
39
+ return (_jsxs(Field, { className: "hjm-date-range__field", "data-active": activeEdge === edge || undefined, "data-empty": date === null || undefined, children: [_jsx("span", { className: "hjm-date-range__field-label", children: edge === "start" ? summary.startLabel : summary.endLabel }), _jsx("span", { className: "hjm-date-range__field-value", children: date === null ? summary.placeholder : summary.formatDate(date) })] }, edge));
24
40
  };
25
- return (_jsxs("div", { style: layoutStyle, className: classNames("hjm-date-range", className), "data-selecting": value.start !== null && value.end === null ? "" : undefined, "data-complete": isCompleteDateRange(value) || undefined, onMouseLeave: () => setPointer(null), children: [summary ? _jsxs("div", { className: "hjm-date-range__summary", children: [field("start"), field("end")] }) : null, presets?.length ? (_jsx("div", { className: "hjm-date-range__presets", children: presets.map((preset) => {
41
+ return (_jsxs("div", { style: layoutStyle, className: classNames("hjm-date-range", className), "data-selecting": value.start !== null && value.end === null ? "" : undefined, "data-complete": isCompleteDateRange(value) || undefined, "data-expanded": collapsible ? String(open) : undefined, onMouseLeave: () => setPointer(null), children: [summary && collapsible ? (_jsxs("button", { type: "button", className: "hjm-date-range__summary", "data-toggle": "", "aria-expanded": open, onClick: () => setExpanded(!open), children: [field("start"), field("end"), _jsx(Icon, { name: open ? dateRangeRecipe.toggle.icon.expanded : dateRangeRecipe.toggle.icon.collapsed, size: dateRangeRecipe.toggle.glyph, tone: "secondary", decorative: true })] })) : summary ? _jsxs("div", { className: "hjm-date-range__summary", children: [field("start"), field("end")] }) : null, presets?.length ? (_jsx("div", { className: "hjm-date-range__presets", children: presets.map((preset) => {
26
42
  const range = resolveDateRangePreset(descriptor.grid.todayDate, preset.length);
27
43
  return (_jsx(Chip, { label: preset.label, size: dateRangeRecipe.presets.chipSize, selectionMode: "single", selected: range.start === value.start && range.end === value.end, onSelectedChange: () => {
28
44
  validateDateRange(range, maxRange);
29
- setValue(range);
45
+ select(range, "preset");
30
46
  // A preset ends today; bring its end month into view like a jump, so the band is visible.
31
- const month = range.end.slice(0, 7);
32
- if (descriptor.focusedMonth !== month)
47
+ // The `all` preset is the empty range and has no month to show.
48
+ const month = range.end?.slice(0, 7);
49
+ if (month !== undefined && descriptor.focusedMonth !== month)
33
50
  descriptor.onFocusedMonthChange?.(month, "jump");
34
51
  } }, preset.id));
35
- }) })) : null, _jsx(CalendarPaintContext.Provider, { value: { paint: (date) => resolveDateRangeCellPaint(value, date, hovered), onDayHover: setPointer }, children: _jsx(Calendar, { descriptor: {
52
+ }) })) : null, open ? _jsx(CalendarPaintContext.Provider, { value: { paint: (date) => resolveDateRangeCellPaint(value, date, hovered), onDayHover: setPointer }, children: _jsx(Calendar, { descriptor: {
36
53
  ...descriptor,
37
54
  // The range owns eligibility; Calendar keeps the same disabled-day interaction contract.
38
55
  grid: { ...descriptor.grid, cells: descriptor.grid.cells.map(cell => cell.date === undefined ? cell :
@@ -41,11 +58,11 @@ export function DateRangePicker({ descriptor, composeAccessibleName, value: cont
41
58
  // paint context, and each day's name carries the range position for assistive tech.
42
59
  selectedDate: value.end ?? value.start,
43
60
  onSelectionChange: (date) => { if (date !== null)
44
- setValue(resolveDateRangeSelection(value, date, maxRange)); },
61
+ select(resolveDateRangeSelection(value, date, maxRange), "date"); },
45
62
  }, composeAccessibleName: (info) => {
46
63
  const state = resolveDateRangeCellState(value, info.date, hovered);
47
64
  const base = composeAccessibleName(info);
48
65
  return state === "none" ? base : `${base}, ${rangeLabels[state]}`;
49
- }, ...(previousMonth === undefined ? {} : { previousMonth }), ...(nextMonth === undefined ? {} : { nextMonth }), ...(renderCellContent === undefined ? {} : { renderCellContent: (cell) => renderCellContent(cell.date) }) }) })] }));
66
+ }, ...(previousMonth === undefined ? {} : { previousMonth }), ...(nextMonth === undefined ? {} : { nextMonth }), ...(renderCellContent === undefined ? {} : { renderCellContent: (cell) => renderCellContent(cell.date) }) }) }) : null] }));
50
67
  }
51
68
  //# sourceMappingURL=date-range.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-range.js","sourceRoot":"","sources":["../src/date-range.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EACL,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,sBAAsB,EAEtB,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EAEtB,yBAAyB,EACzB,iBAAiB,GAElB,MAAM,+CAA+C,CAAC;AAKvD,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,QAAQ,EAA4B,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,M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,GAAG,IAAI,KAAK,CAAC,KAAK;wBACtC,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,IAAI,IAAI,KAAK,IAAI;4BAAE,QAAQ,CAAC,yBAAyB,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;qBACjF,EAChC,qBAAqB,EAAE,CAAC,IAAI,EAAE,EAAE;wBAC9B,MAAM,KAAK,GAAG,yBAAyB,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;wBACnE,MAAM,IAAI,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;wBACzC,OAAO,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;oBACpE,CAAC,KACG,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,KACtD,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAC9C,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,IAAsB,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAC5H,GAC4B,IAC5B,CACP,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport {\n dateRangeRecipe,\n emptyDateRange,\n defaultDateRangeLimit,\n isDateWithinRangeLimit,\n type DateRangeLimit,\n isCompleteDateRange,\n resolveDateRangeActiveEdge,\n resolveDateRangeCellPaint,\n resolveDateRangeCellState,\n resolveDateRangePreset,\n type DateRangePresetLength,\n resolveDateRangeSelection,\n validateDateRange,\n type DateRangeValue,\n} from \"@hjmds/design-contracts/components/date-range\";\nimport type {\n CalendarDescriptor,\n ComposeCalendarAccessibleName,\n} from \"@hjmds/design-contracts/components/calendar\";\nimport { useState, type ReactNode } from \"react\";\nimport { Calendar, type CalendarMonthAction } from \"./calendar.js\";\nimport { classNames, useControllableState } from \"./internal.js\";\nimport { CalendarPaintContext } from \"./internal/calendar-paint.js\";\nimport { Chip } from \"./selection.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type DateRangeSummary = Readonly<{\n startLabel: string;\n endLabel: string;\n /** Shown in a field whose date is not chosen yet. */\n placeholder: string;\n formatDate: (date: string) => string;\n}>;\n\n/** A shortcut such as \"최근 7일\" or \"1개월\" that ends on the grid's `todayDate`. */\nexport type DateRangePresetOption = Readonly<{ id: string; label: string; length: DateRangePresetLength }>;\n\n// Preserve Calendar's controlled/uncontrolled month union when removing its single-date selection props.\ntype RangeCalendarDescriptor<T> = T extends unknown ? Omit<T, \"selectedDate\" | \"defaultSelectedDate\" | \"onSelectionChange\"> : never;\n\nexport type DateRangePickerProps<Content = unknown> = Readonly<{\n /** The same grid Calendar renders; the product still owns month data. */\n descriptor: RangeCalendarDescriptor<CalendarDescriptor<Content>>;\n composeAccessibleName: ComposeCalendarAccessibleName<Content>;\n value?: DateRangeValue;\n defaultValue?: DateRangeValue;\n onValueChange?: (value: DateRangeValue) => void;\n previousMonth?: CalendarMonthAction;\n nextMonth?: CalendarMonthAction;\n /** Localized suffixes appended to a day's name when it is a range edge. */\n rangeLabels: Readonly<{ start: string; end: string; between: string }>;\n /** Inclusive calendar span; one year by default, null removes the limit. */\n maxRange?: DateRangeLimit | null;\n renderCellContent?: (date: string) => ReactNode;\n /** Start/end fields above the grid; the edge the next tap sets is marked (replaces a hint sentence). */\n summary?: DateRangeSummary;\n /** Shortcut chips between the summary and the grid; each ends on `descriptor.grid.todayDate`. */\n presets?: readonly DateRangePresetOption[];\n className?: string;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport function DateRangePicker<Content = unknown>({\n descriptor,\n composeAccessibleName,\n value: controlledValue,\n defaultValue,\n onValueChange,\n previousMonth,\n nextMonth,\n rangeLabels,\n maxRange = defaultDateRangeLimit,\n renderCellContent,\n summary,\n presets,\n className,\n layoutStyle,\n}: DateRangePickerProps<Content>) {\n const [value, setValue] = useControllableState<DateRangeValue>({\n ...(controlledValue === undefined ? {} : { value: controlledValue }),\n defaultValue: defaultValue ?? emptyDateRange,\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n validateDateRange(value, maxRange);\n // The hovered date previews the not-yet-committed end through the same cell\n // state function the committed range uses.\n const [pointer, setPointer] = useState<string | null>(null);\n const hovered = pointer !== null && isDateWithinRangeLimit(value, pointer, maxRange) ? pointer : null;\n\n const activeEdge = resolveDateRangeActiveEdge(value);\n const field = (edge: \"start\" | \"end\") => {\n const date = value[edge];\n return (\n <div key={edge} className=\"hjm-date-range__field\" data-active={activeEdge === edge || undefined} data-empty={date === null || undefined}>\n <span className=\"hjm-date-range__field-label\">{edge === \"start\" ? summary!.startLabel : summary!.endLabel}</span>\n <span className=\"hjm-date-range__field-value\">{date === null ? summary!.placeholder : summary!.formatDate(date)}</span>\n </div>\n );\n };\n\n return (\n <div\n style={layoutStyle}\n className={classNames(\"hjm-date-range\", className)}\n data-selecting={value.start !== null && value.end === null ? \"\" : undefined}\n data-complete={isCompleteDateRange(value) || undefined}\n onMouseLeave={() => setPointer(null)}\n >\n {summary ? <div className=\"hjm-date-range__summary\">{field(\"start\")}{field(\"end\")}</div> : null}\n {presets?.length ? (\n <div className=\"hjm-date-range__presets\">\n {presets.map((preset) => {\n const range = resolveDateRangePreset(descriptor.grid.todayDate, preset.length);\n return (\n <Chip key={preset.id} label={preset.label} size={dateRangeRecipe.presets.chipSize} selectionMode=\"single\"\n selected={range.start === value.start && range.end === value.end}\n onSelectedChange={() => {\n validateDateRange(range, maxRange);\n setValue(range);\n // A preset ends today; bring its end month into view like a jump, so the band is visible.\n const month = range.end!.slice(0, 7);\n if (descriptor.focusedMonth !== month) descriptor.onFocusedMonthChange?.(month, \"jump\");\n }} />\n );\n })}\n </div>\n ) : null}\n <CalendarPaintContext.Provider value={{ paint: (date) => resolveDateRangeCellPaint(value, date, hovered), onDayHover: setPointer }}>\n <Calendar<Content>\n descriptor={{\n ...descriptor,\n // The range owns eligibility; Calendar keeps the same disabled-day interaction contract.\n grid: { ...descriptor.grid, cells: descriptor.grid.cells.map(cell => cell.date === undefined ? cell :\n { ...cell, disabled: cell.disabled === true || !isDateWithinRangeLimit(value, cell.date, maxRange) }) },\n // Calendar keeps single selection; the two edges and the band are painted through the internal\n // paint context, and each day's name carries the range position for assistive tech.\n selectedDate: value.end ?? value.start,\n onSelectionChange: (date) => { if (date !== null) setValue(resolveDateRangeSelection(value, date, maxRange)); },\n } as CalendarDescriptor<Content>}\n composeAccessibleName={(info) => {\n const state = resolveDateRangeCellState(value, info.date, hovered);\n const base = composeAccessibleName(info);\n return state === \"none\" ? base : `${base}, ${rangeLabels[state]}`;\n }}\n {...(previousMonth === undefined ? {} : { previousMonth })}\n {...(nextMonth === undefined ? {} : { nextMonth })}\n {...(renderCellContent === undefined ? {} : { renderCellContent: (cell: { date: string }) => renderCellContent(cell.date) })}\n />\n </CalendarPaintContext.Provider>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"date-range.js","sourceRoot":"","sources":["../src/date-range.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EACL,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,sBAAsB,EAEtB,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EACzB,yBAAyB,EACzB,sCAAsC,EACtC,sBAAsB,EAEtB,yBAAyB,EACzB,iBAAiB,GAElB,MAAM,+CAA+C,CAAC;AAKvD,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,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EAAE,SAAS,EAAE,CAAC,KAC9C,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,IAAsB,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAC5H,GAC4B,CAAC,CAAC,CAAC,IAAI,IACnC,CACP,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport {\n dateRangeRecipe,\n emptyDateRange,\n defaultDateRangeLimit,\n isDateWithinRangeLimit,\n type DateRangeLimit,\n isCompleteDateRange,\n resolveDateRangeActiveEdge,\n resolveDateRangeCellPaint,\n resolveDateRangeCellState,\n resolveDateRangeExpandedAfterSelection,\n resolveDateRangePreset,\n type DateRangePresetLength,\n resolveDateRangeSelection,\n validateDateRange,\n type DateRangeValue,\n} from \"@hjmds/design-contracts/components/date-range\";\nimport type {\n CalendarDescriptor,\n ComposeCalendarAccessibleName,\n} from \"@hjmds/design-contracts/components/calendar\";\nimport { useState, type ReactNode } from \"react\";\nimport { Icon } from \"./supplemental-display.js\";\nimport { Calendar, type CalendarMonthAction } from \"./calendar.js\";\nimport { classNames, useControllableState } from \"./internal.js\";\nimport { CalendarPaintContext } from \"./internal/calendar-paint.js\";\nimport { Chip } from \"./selection.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type DateRangeSummary = Readonly<{\n startLabel: string;\n endLabel: string;\n /** Shown in a field whose date is not chosen yet. */\n placeholder: string;\n formatDate: (date: string) => string;\n}>;\n\n/** Fold the grid behind `summary`, which becomes the toggle; presets stay visible. */\nexport type DateRangeCollapsible = Readonly<{\n /** Controlled open state. Without it the grid starts folded and folds again after a preset or a completing date. */\n expanded?: boolean;\n defaultExpanded?: boolean;\n onExpandedChange?: (expanded: boolean) => void;\n}>;\n\n/** A shortcut such as \"최근 7일\" or \"1개월\" that ends on the grid's `todayDate`. */\nexport type DateRangePresetOption = Readonly<{ id: string; label: string; length: DateRangePresetLength }>;\n\n// Preserve Calendar's controlled/uncontrolled month union when removing its single-date selection props.\ntype RangeCalendarDescriptor<T> = T extends unknown ? Omit<T, \"selectedDate\" | \"defaultSelectedDate\" | \"onSelectionChange\"> : never;\n\nexport type DateRangePickerProps<Content = unknown> = Readonly<{\n /** The same grid Calendar renders; the product still owns month data. */\n descriptor: RangeCalendarDescriptor<CalendarDescriptor<Content>>;\n composeAccessibleName: ComposeCalendarAccessibleName<Content>;\n value?: DateRangeValue;\n defaultValue?: DateRangeValue;\n onValueChange?: (value: DateRangeValue) => void;\n previousMonth?: CalendarMonthAction;\n nextMonth?: CalendarMonthAction;\n /** Localized suffixes appended to a day's name when it is a range edge. */\n rangeLabels: Readonly<{ start: string; end: string; between: string }>;\n /** Inclusive calendar span; one year by default, null removes the limit. */\n maxRange?: DateRangeLimit | null;\n renderCellContent?: (date: string) => ReactNode;\n /** Start/end fields above the grid; the edge the next tap sets is marked (replaces a hint sentence). */\n summary?: DateRangeSummary;\n /** Shortcut chips between the summary and the grid; each ends on `descriptor.grid.todayDate`. */\n presets?: readonly DateRangePresetOption[];\n /**\n * Fold the grid behind `summary` (required), which becomes a toggle button; presets stay visible. A preset or a date\n * that completes the range folds it again (`resolveDateRangeExpandedAfterSelection`).\n */\n collapsible?: DateRangeCollapsible;\n className?: string;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport function DateRangePicker<Content = unknown>({\n descriptor,\n composeAccessibleName,\n value: controlledValue,\n defaultValue,\n onValueChange,\n previousMonth,\n nextMonth,\n rangeLabels,\n maxRange = defaultDateRangeLimit,\n renderCellContent,\n summary,\n presets,\n collapsible,\n className,\n layoutStyle,\n}: DateRangePickerProps<Content>) {\n if (collapsible && !summary) throw new TypeError(\"DateRangePicker collapsible needs summary to act as its toggle\");\n const [value, setValue] = useControllableState<DateRangeValue>({\n ...(controlledValue === undefined ? {} : { value: controlledValue }),\n defaultValue: defaultValue ?? emptyDateRange,\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n validateDateRange(value, maxRange);\n const [expanded, setExpanded] = useControllableState<boolean>({\n ...(collapsible?.expanded === undefined ? {} : { value: collapsible.expanded }),\n defaultValue: collapsible?.defaultExpanded ?? false,\n ...(collapsible?.onExpandedChange === undefined ? {} : { onChange: collapsible.onExpandedChange }),\n });\n const open = collapsible === undefined || expanded;\n const select = (next: DateRangeValue, source: \"date\" | \"preset\") => {\n setValue(next);\n if (collapsible && !resolveDateRangeExpandedAfterSelection(next, source)) setExpanded(false);\n };\n // The hovered date previews the not-yet-committed end through the same cell\n // state function the committed range uses.\n const [pointer, setPointer] = useState<string | null>(null);\n const hovered = pointer !== null && isDateWithinRangeLimit(value, pointer, maxRange) ? pointer : null;\n\n const activeEdge = resolveDateRangeActiveEdge(value);\n // A button may only hold phrasing content, so the fields become spans when the summary is the toggle.\n const Field = collapsible ? \"span\" : \"div\";\n const field = (edge: \"start\" | \"end\") => {\n const date = value[edge];\n return (\n <Field key={edge} className=\"hjm-date-range__field\" data-active={activeEdge === edge || undefined} data-empty={date === null || undefined}>\n <span className=\"hjm-date-range__field-label\">{edge === \"start\" ? summary!.startLabel : summary!.endLabel}</span>\n <span className=\"hjm-date-range__field-value\">{date === null ? summary!.placeholder : summary!.formatDate(date)}</span>\n </Field>\n );\n };\n\n return (\n <div\n style={layoutStyle}\n className={classNames(\"hjm-date-range\", className)}\n data-selecting={value.start !== null && value.end === null ? \"\" : undefined}\n data-complete={isCompleteDateRange(value) || undefined}\n data-expanded={collapsible ? String(open) : undefined}\n onMouseLeave={() => setPointer(null)}\n >\n {summary && collapsible ? (\n <button type=\"button\" className=\"hjm-date-range__summary\" data-toggle=\"\" aria-expanded={open} onClick={() => setExpanded(!open)}>\n {field(\"start\")}{field(\"end\")}\n <Icon name={open ? dateRangeRecipe.toggle.icon.expanded : dateRangeRecipe.toggle.icon.collapsed}\n size={dateRangeRecipe.toggle.glyph} tone=\"secondary\" decorative />\n </button>\n ) : summary ? <div className=\"hjm-date-range__summary\">{field(\"start\")}{field(\"end\")}</div> : null}\n {presets?.length ? (\n <div className=\"hjm-date-range__presets\">\n {presets.map((preset) => {\n const range = resolveDateRangePreset(descriptor.grid.todayDate, preset.length);\n return (\n <Chip key={preset.id} label={preset.label} size={dateRangeRecipe.presets.chipSize} selectionMode=\"single\"\n selected={range.start === value.start && range.end === value.end}\n onSelectedChange={() => {\n validateDateRange(range, maxRange);\n select(range, \"preset\");\n // A preset ends today; bring its end month into view like a jump, so the band is visible.\n // The `all` preset is the empty range and has no month to show.\n const month = range.end?.slice(0, 7);\n if (month !== undefined && descriptor.focusedMonth !== month) descriptor.onFocusedMonthChange?.(month, \"jump\");\n }} />\n );\n })}\n </div>\n ) : null}\n {open ? <CalendarPaintContext.Provider value={{ paint: (date) => resolveDateRangeCellPaint(value, date, hovered), onDayHover: setPointer }}>\n <Calendar<Content>\n descriptor={{\n ...descriptor,\n // The range owns eligibility; Calendar keeps the same disabled-day interaction contract.\n grid: { ...descriptor.grid, cells: descriptor.grid.cells.map(cell => cell.date === undefined ? cell :\n { ...cell, disabled: cell.disabled === true || !isDateWithinRangeLimit(value, cell.date, maxRange) }) },\n // Calendar keeps single selection; the two edges and the band are painted through the internal\n // paint context, and each day's name carries the range position for assistive tech.\n selectedDate: value.end ?? value.start,\n onSelectionChange: (date) => { if (date !== null) select(resolveDateRangeSelection(value, date, maxRange), \"date\"); },\n } as CalendarDescriptor<Content>}\n composeAccessibleName={(info) => {\n const state = resolveDateRangeCellState(value, info.date, hovered);\n const base = composeAccessibleName(info);\n return state === \"none\" ? base : `${base}, ${rangeLabels[state]}`;\n }}\n {...(previousMonth === undefined ? {} : { previousMonth })}\n {...(nextMonth === undefined ? {} : { nextMonth })}\n {...(renderCellContent === undefined ? {} : { renderCellContent: (cell: { date: string }) => renderCellContent(cell.date) })}\n />\n </CalendarPaintContext.Provider> : null}\n </div>\n );\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.49.0";
37
+ readonly packageVersion: "2.0.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.49.0",
138
+ packageVersion: "2.0.0",
139
139
  surface: "web",
140
140
  components: activeWebEntries.map(derivedClaim),
141
141
  };