@hjmds/react 1.21.0 → 1.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/evidence.d.ts +1 -1
- package/dist/evidence.js +1 -1
- package/dist/evidence.js.map +1 -1
- package/dist/screen-flows.d.ts +11 -0
- package/dist/screen-flows.d.ts.map +1 -1
- package/dist/screen-flows.js +12 -10
- package/dist/screen-flows.js.map +1 -1
- package/dist/screens.d.ts +18 -1
- package/dist/screens.d.ts.map +1 -1
- package/dist/screens.js +6 -2
- package/dist/screens.js.map +1 -1
- package/dist/styles.css +4 -3
- package/dist/styles.layered.css +4 -3
- package/dist/table-family.d.ts +3 -1
- package/dist/table-family.d.ts.map +1 -1
- package/dist/table-family.js +3 -3
- package/dist/table-family.js.map +1 -1
- package/package.json +3 -3
package/dist/screens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screens.js","sourceRoot":"","sources":["../src/screens.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAA+B,MAAM,uCAAuC,CAAC;AAC1G,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAwC,MAAM,+CAA+C,CAAC;AACjI,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAA4B,MAAM,OAAO,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,0BAA0B,EAAoC,yBAAyB,EAAE,mBAAmB,EAAuF,MAAM,yCAAyC,CAAC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AAC,UAAU,IAAI,SAAS,CAAC,IAAE,aAAa,IAAE,OAAO,CAAA,CAAC,CAAA,eAAK,SAAS,EAAC,wBAAwB,aAAE,CAAC,CAAC,UAAU,IAAI,SAAS,CAAC,IAAE,aAAa,CAAA,CAAC,CAAA,KAAC,IAAI,IAAC,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,YAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAQ,CAAA,CAAC,CAAA,IAAI,EAAE,OAAO,IAAO,CAAA,CAAC,CAAA,IAAI,IACnR,IACA,IACE,CAAC;AACb,CAAC","sourcesContent":["import { resolveComposerLimit, type ComposerLengthFeedback } from \"@hjmds/design-contracts/communication\";\nimport { Progress } from \"./feedback.js\";\nimport { resolveDesignProfileScreen, type DesignProfileScreenPresentation } from \"@hjmds/design-contracts/design-profile-layout\";\nimport { MessageReactions } from \"./internal/message-reactions.js\";\nimport type { ReactionPickerProps } from \"./reaction-picker.js\";\nimport { Button, IconButton } from \"./actions.js\";\nimport { useOptionalHjmTheme } from \"./provider.js\";\nimport { TextArea } from \"./forms.js\";\nimport { useId, useLayoutEffect, useRef, useState, type Ref, type ReactNode } from \"react\";\nimport { isReplySwipe, timestampRevealOffset, shouldSubmitMessageKey, canSubmitMessage, validateMessageAttachments, type MessageAttachmentDescriptor, resolveScreenContentState, screenPatternRecipe, type ChatMessageDescriptor, type MessageComposerDescriptor, type ScreenContentState } from \"@hjmds/design-contracts/screen-patterns\";\nimport { Heading } from \"./heading.js\";\nimport { Spinner } from \"./internal/spinner.js\";\nimport { Section, Stack, Text } from \"./layout.js\";\nimport { ListRow, type ListRowProps } from \"./display.js\";\nimport { classNames, useDesignProfileDefaults } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type ScreenLayoutProps = Readonly<{\n title: string;\n /** Hide redundant route names while retaining descriptions and a named screen. */\n titleVisibility?: \"visible\" | \"hidden\";\n headerAlignment?: \"start\" | \"center\";\n /** Preserve host navigation while the shared shell owns content and state. */\n header?: ReactNode;\n contentInset?: \"default\" | \"none\";\n /** Explicit layout wins over the nearest design profile. */\n presentation?: DesignProfileScreenPresentation;\n description?: string;\n leading?: ReactNode;\n actions?: ReactNode;\n notice?: ReactNode;\n footer?: ReactNode;\n state?: ScreenContentState;\n stateAction?: ReactNode;\n children?: ReactNode;\n /** A virtualized list must own scrolling; never nest it inside a second scroll container. */\n scroll?: \"screen\" | \"content\";\n as?: \"main\" | \"section\";\n className?: string;\n /**\n * Canonical layout-only placement on the screen root (for example `flex` or `width` in a split\n * view), matching Native ScreenLayout. Every screen built on ScreenLayout forwards it.\n */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\n/** Shared screen shell. Routing, data, permission checks and mutation state remain product-owned. */\nexport function ScreenLayout({ title, titleVisibility = \"visible\", headerAlignment = \"start\", header, contentInset = \"default\", presentation: suppliedPresentation, description, leading, actions, notice, footer, state = { kind: \"ready\" }, stateAction, children, scroll = \"screen\", as: Element = \"main\", className, layoutStyle }: ScreenLayoutProps) {\n const id = useId();\n const showHeader = titleVisibility === \"visible\" || !!description || !!leading || !!actions;\n // Screens historically work with the stylesheet alone. Optional context keeps\n // that path while inheriting profiles from an enclosing Provider when present.\n const designProfile = useDesignProfileDefaults();\n const presentation = suppliedPresentation ?? designProfile?.screens.overview;\n const profileLayout = presentation === undefined ? undefined : resolveDesignProfileScreen(presentation);\n const resolved = resolveScreenContentState(state);\n // Replacement text owns scrolling even when the ready state delegates it to\n // a virtual list. Use the rendered mode for keyboard access as well as CSS.\n const bodyScroll = resolved.replacesContent ? \"screen\" : scroll;\n const bodyRef = useRef<HTMLDivElement>(null);\n const lastBodyFocus = useRef<HTMLElement | null>(null);\n useLayoutEffect(() => {\n // Replacing a focused retry/input removes its DOM node. Keep keyboard users\n // in the same content region without stealing focus moved to another control.\n const previous = lastBodyFocus.current;\n if (previous && !previous.isConnected && document.activeElement === document.body) {\n bodyRef.current?.focus({ preventScroll: true });\n }\n if (previous && !previous.isConnected) lastBodyFocus.current = null;\n });\n const recipe = screenPatternRecipe;\n return <Element aria-labelledby={header || titleVisibility === \"hidden\" ? undefined : id} aria-label={header || titleVisibility === \"hidden\" ? title : undefined} data-content-inset={contentInset} data-presentation={presentation} className={classNames(\"hjm-screen\", className)}\n style={{ backgroundColor: designProfile?.material.canvas ? \"transparent\" : undefined, \"--hjm-screen-width\": `${profileLayout?.maxWidth ?? recipe.maxWidth}px`, \"--hjm-screen-padding\": `${contentInset === \"none\" ? 0 : recipe.padding}px`, \"--hjm-screen-gap\": `${profileLayout?.gap ?? recipe.sectionGap}px`, \"--hjm-screen-item-gap\": `${recipe.itemGap}px`, \"--hjm-screen-state-gap\": `${recipe.stateGap}px`, \"--hjm-screen-header-min\": `${recipe.headerMinWidth}px`, ...layoutStyle } as React.CSSProperties}>\n {header ?? (showHeader ? headerAlignment === \"center\" ? <header className=\"hjm-screen__header\" style={{ display: \"grid\", gridTemplateColumns: \"minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr)\", alignItems: \"center\" }}>\n <div>{leading}</div><div className=\"hjm-screen__heading\" style={{ textAlign: \"center\", minWidth: 0 }}>\n {titleVisibility === \"visible\" && <Heading level=\"level3\" semanticLevel={1} id={id}>{title}</Heading>}\n {description ? <Text as=\"p\" tone=\"muted\">{description}</Text> : null}</div><div style={{ justifySelf: \"end\" }}>{actions}</div>\n </header> : <header className=\"hjm-screen__header\" style={profileLayout ? { flexDirection: profileLayout.headerAxis, alignItems: profileLayout.centered ? \"center\" : undefined, textAlign: profileLayout.centered ? \"center\" : undefined } : undefined}>\n {leading}<div className=\"hjm-screen__heading\">{titleVisibility === \"visible\" && <Heading level=\"level3\" semanticLevel={1} id={id}>{title}</Heading>}\n {description ? <Text as=\"p\" tone=\"muted\">{description}</Text> : null}</div>{actions}\n </header> : null)}\n {notice ? <div className=\"hjm-screen__notice\">{notice}</div> : null}\n {/* Scrollable read-only screens still need a keyboard entry point. */}\n <div ref={bodyRef} tabIndex={bodyScroll === \"content\" ? -1 : 0}\n onFocusCapture={event => { lastBodyFocus.current = event.target as HTMLElement; }}\n onBlurCapture={event => {\n // A connected input blurred to the document intentionally relinquishes\n // focus too; only removal of the currently focused node needs recovery.\n if (event.relatedTarget ? !event.currentTarget.contains(event.relatedTarget as Node) : (event.target as HTMLElement).isConnected) {\n lastBodyFocus.current = null;\n }\n }}\n className=\"hjm-screen__body\" data-scroll={bodyScroll} data-replacement={resolved.replacesContent || undefined} aria-busy={resolved.busy || undefined}>\n {state.kind === \"ready\" ? children : <div className=\"hjm-screen__state\">\n {/* Loading copy is an accessible name; visible copy beside the spinner\n contradicts the shared spinner-only loading contract. */}\n {resolved.busy ? <Spinner label={[state.title, state.description].filter(Boolean).join(\". \")} /> : <div role={state.kind === \"error\" ? \"alert\" : \"status\"}>\n <Stack gap=\"sm\" align=\"center\"><Text variant=\"title\">{state.title}</Text>\n {state.description ? <Text tone=\"muted\">{state.description}</Text> : null}</Stack>\n </div>}\n {stateAction}\n </div>}\n </div>\n {footer ? <footer className=\"hjm-screen__footer\">{footer}</footer> : null}\n </Element>;\n}\n\nexport type SettingsScreenSection = Readonly<{ id: string; title: string; description?: string; children: ReactNode }>;\nexport type SettingsScreenProps = Omit<ScreenLayoutProps, \"children\" | \"scroll\"> & Readonly<{ profile?: ReactNode; sections: readonly SettingsScreenSection[] }>;\nexport function SettingsScreen({ profile, sections, ...props }: SettingsScreenProps) {\n // Keep semantic section headings while using the smaller settings label role.\n return <ScreenLayout {...props}><Stack gap=\"md\">{profile}{sections.map(section =>\n <Section className=\"hjm-settings-section\" key={section.id} title={<Text variant=\"label\" emphasis=\"strong\" tone=\"muted\">{section.title}</Text>} description={section.description}>{section.children}</Section>)}</Stack></ScreenLayout>;\n}\n\nexport type NotificationInboxScreenProps = Omit<ScreenLayoutProps, \"children\"> & Readonly<{\n filters?: ReactNode;\n children: ReactNode;\n}>;\nexport function NotificationInboxScreen({ filters, children, notice, ...props }: NotificationInboxScreenProps) {\n return <ScreenLayout {...props} notice={<Stack gap=\"sm\">{notice}{filters}</Stack>}>{children}</ScreenLayout>;\n}\n\n/** Read/unread is announced in localized copy as well as emphasis; rendering never marks an item read. */\nexport type NotificationItemProps = Omit<ListRowProps, \"description\" | \"selected\"> & Readonly<{\n read: boolean;\n statusLabel: string;\n timestamp: string;\n description?: ReactNode;\n}>;\nexport function NotificationItem({ read, statusLabel, timestamp, description, title, className, ...props }: NotificationItemProps) {\n return <ListRow {...props} className={classNames(\"hjm-notification-item\", className)} data-unread={!read || undefined} title={<Text emphasis={read ? \"regular\" : \"strong\"}>{title}</Text>}\n description={<Stack gap=\"xxs\">{description}<Text variant=\"caption\" tone=\"muted\">{statusLabel} · {timestamp}</Text></Stack>} />;\n}\n\nexport type ChatScreenProps = Omit<ScreenLayoutProps, \"footer\"> & Readonly<{ composer: ReactNode }>;\n/** Caller supplies a virtualized timeline and keyboard-aware composer; no implicit auto-scroll or send. */\nexport function ChatScreen({ composer, scroll = \"content\", ...props }: ChatScreenProps) {\n // An empty conversation must still allow its first message; unavailable states hide input.\n return <ScreenLayout {...props} scroll={scroll} footer={!props.state || props.state.kind === \"ready\" || props.state.kind === \"empty\" ? composer : null} />;\n}\n\nexport type MessageComposerProps = Omit<MessageComposerDescriptor, \"attachmentCount\"> & Readonly<{\n maxLength?: number;\n /** Opt-in count/ring appears only near the actual maxLength; never trims drafts. */\n lengthFeedback?: ComposerLengthFeedback;\n sendDisabled?: boolean;\n additionalContent?: boolean;\n leadingAction?: ReactNode;\n inputRef?: Ref<HTMLTextAreaElement>;\n /** Release typing presence when the host input loses focus. */\n onBlur?: () => void;\n onValueChange(value: string): void;\n onSend(value: string): void;\n context?: ReactNode;\n replyTo?: Readonly<{ author: string; excerpt: string; cancelLabel: string; onCancel(): void }>;\n /** Icon mode puts the send/attachment action inside the growing field. */\n sendIcon?: ReactNode;\n /** Reference comment layout: a filled circular send action inside the field. */\n sendPresentation?: \"inline\" | \"circle\";\n attachmentAction?: Readonly<{ label: string; icon: ReactNode; onPress(): void; disabled?: boolean }>;\n attachments?: readonly (MessageAttachmentDescriptor & Readonly<{ preview: ReactNode }>)[];\n onRemoveAttachment?: (id: string) => void;\n /** Canonical layout-only placement on the composer root. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\nexport function MessageComposer({ value, label, sendLabel, placeholder = label, description, error, invalid = false, submitMode = \"newline\", onBlur, disabled = false, pending = false, onValueChange, onSend, maxLength, lengthFeedback, sendDisabled = false, additionalContent = false, leadingAction, inputRef, context, replyTo, sendIcon, sendPresentation = \"inline\", attachmentAction, attachments = [], onRemoveAttachment, layoutStyle }: MessageComposerProps) {\n validateMessageAttachments(attachments);\n if (attachments.length && !onRemoveAttachment) throw new TypeError(\"Attachments require a removal callback\");\n if (lengthFeedback && maxLength === undefined) throw new TypeError(\"Composer length feedback requires maxLength\");\n const limit = !lengthFeedback ? null : resolveComposerLimit(value, maxLength!, lengthFeedback.threshold);\n const canSend = !sendDisabled && !limit?.exceeded && canSubmitMessage({ value, label, sendLabel, disabled, pending, attachmentCount: attachments.length + (additionalContent ? 1 : 0) });\n const locked = disabled || pending;\n // A bounded corner radius keeps multiline/large-text content inside the field instead of a tall pill.\n const hasContent = !!value.trim() || attachments.length > 0 || additionalContent;\n const attach = attachmentAction ? <IconButton label={attachmentAction.label} tone=\"ghost\" disabled={locked || attachmentAction.disabled} onClick={attachmentAction.onPress}>{attachmentAction.icon}</IconButton> : null;\n const send = sendIcon ? <IconButton label={sendLabel} size={sendPresentation === \"circle\" ? \"small\" : \"medium\"} shape=\"circle\" tone={sendPresentation === \"circle\" ? \"primary\" : \"ghost\"} disabled={!canSend} loading={pending} onClick={() => { if (canSend) onSend(value); }}>{sendIcon}</IconButton> : <Button disabled={!canSend} loading={pending} onClick={() => { if (canSend) onSend(value); }}>{sendLabel}</Button>;\n // Readonly pending input preserves the keyboard/focus for receipt failure recovery; disabling it would blur desktop chat.\n // Enter is opt-in and IME-safe; receipt-driven clearing and failed-send recovery belong to the host.\n return <div className=\"hjm-message-composer\" data-send-presentation={sendPresentation} style={{\"--hjm-message-composer-gap\": `${screenPatternRecipe.itemGap}px`, \"--hjm-attachment-size\": `${screenPatternRecipe.attachmentSize}px`, \"--hjm-attachment-remove-size\": `${screenPatternRecipe.attachmentRemoveSize}px`, ...layoutStyle} as React.CSSProperties}>{context}{replyTo ? <Stack axis=\"inline\" gap=\"sm\" align=\"center\"><Stack gap=\"xxs\"><Text variant=\"caption\" emphasis=\"strong\">{replyTo.author}</Text><Text variant=\"caption\" tone=\"muted\">{replyTo.excerpt}</Text></Stack><IconButton label={replyTo.cancelLabel} tone=\"ghost\" disabled={locked} onClick={replyTo.onCancel}><Text>×</Text></IconButton></Stack> : null}\n {attachments.length ? <div className=\"hjm-message-composer__attachments\">{attachments.map(item => <div key={item.id} className=\"hjm-message-composer__attachment\"><div className=\"hjm-message-composer__preview\">{item.preview}</div><span className=\"hjm-message-composer__remove\"><IconButton label={item.removeLabel} tone=\"ghost\" size=\"small\" disabled={locked || item.disabled} onClick={() => { if (!locked && !item.disabled) onRemoveAttachment?.(item.id); }}><span className=\"hjm-message-composer__remove-glyph\" aria-hidden=\"true\">×</span></IconButton></span></div>)}{attach}</div> : null}\n <div className=\"hjm-message-composer__row\"><TextArea ref={inputRef} maxLength={maxLength} leadingAction={leadingAction} shape=\"large\" rows={screenPatternRecipe.composerMinLines} aria-label={label} placeholder={placeholder} description={description} error={error} aria-invalid={invalid || undefined} onBlur={onBlur} value={value} disabled={disabled} readOnly={pending} aria-busy={pending || undefined}\n onKeyDown={event => { if (shouldSubmitMessageKey({key:event.key, shiftKey:event.shiftKey, isComposing:event.nativeEvent.isComposing, keyCode:event.nativeEvent.keyCode}, submitMode)) { event.preventDefault(); if (canSend) onSend(value); } }}\n onChange={event => { if (!locked) onValueChange(event.currentTarget.value); }} minVisibleLines={screenPatternRecipe.composerMinLines} maxVisibleLines={screenPatternRecipe.composerMaxLines}\n {...(sendIcon ? { trailing: hasContent || pending ? send : attach } : {})} />\n {sendIcon ? null : send}\n </div>{lengthFeedback && limit?.near ? <Progress shape=\"circular\" label={lengthFeedback.label} value={Math.min(limit.used, limit.max)} max={limit.max} valueText={lengthFeedback.formatCount(limit.used, limit.max)}><Text variant=\"caption\">{lengthFeedback.formatCount(limit.used, limit.max)}</Text></Progress> : null}</div>;\n}\n\nexport type ChatMessageProps = ChatMessageDescriptor & Readonly<{ children: ReactNode; interactiveContent?: boolean; avatar?: ReactNode; reply?: ReactNode; actions?: ReactNode; replyAction?: Readonly<{label:string; onPress():void; disabled?:boolean}>; replyLink?: Readonly<{label:string; onPress():void}>; reactions?: ReactionPickerProps & Readonly<{ closeLabel: string; menuAction?: Readonly<{ label: string; onPress(): void; disabled?: boolean }> }>;\n /** Canonical layout-only placement on the message row. The swipe offset still owns `transform`. */\n layoutStyle?: HjmCompositionStyleProp }>;\nexport function ChatMessage({ direction, author, timestamp, timestampPresentation = \"always\", bubbleTail = false, deliveryLabel, avatar, reply, actions, replyAction, replyLink, reactions, children, interactiveContent=false, layoutStyle }: ChatMessageProps) {\n const theme = useOptionalHjmTheme();\n const revealTime = timestampPresentation === \"swipe\" && !!timestamp;\n // Only the pointer that began a drag can finish it; another touch must not reply or cancel it.\n const start = useRef<{x:number;y:number;pointerId:number} | null>(null);\n const [offset, setOffset] = useState(0);\n const finish = () => { start.current = null; setOffset(0); };\n return <article tabIndex={replyAction && !replyAction.disabled ? 0 : undefined}\n aria-keyshortcuts={replyAction ? \"Alt+ArrowLeft Alt+ArrowRight\" : undefined} aria-description={replyAction?.label}\n onKeyDown={event => { if (event.target === event.currentTarget && event.altKey && (event.key === \"ArrowLeft\" || event.key === \"ArrowRight\") && replyAction && !replyAction.disabled) { event.preventDefault(); replyAction.onPress(); } }}\n onPointerDown={event => { if (start.current || (!revealTime && (!replyAction || replyAction.disabled)) || event.button !== 0 || (event.target as HTMLElement).closest(\"button,a,input,textarea\")) return; start.current = {x:event.clientX,y:event.clientY,pointerId:event.pointerId}; }}\n onPointerMove={event => { if (!start.current || start.current.pointerId !== event.pointerId) return; const dx=event.clientX-start.current.x,dy=event.clientY-start.current.y; if (Math.abs(dy)>10 && Math.abs(dy)>Math.abs(dx)) {finish();return;} if (revealTime) setOffset((direction === \"outgoing\" ? -1 : 1) * timestampRevealOffset(direction === \"outgoing\" ? -dx : dx,dy)); else if (Math.abs(dx)>Math.abs(dy)*2) setOffset(Math.max(-72,Math.min(72,dx))); }}\n onPointerUp={event => { if (start.current?.pointerId !== event.pointerId) return; if (!revealTime && start.current && replyAction && !replyAction.disabled && isReplySwipe(event.clientX-start.current.x,event.clientY-start.current.y)) replyAction.onPress(); finish(); }} onPointerCancel={event => { if (start.current?.pointerId === event.pointerId) finish(); }} onPointerLeave={event => { if (start.current?.pointerId === event.pointerId) finish(); }}\n style={{ ...layoutStyle, position: \"relative\", overflow: \"hidden\", paddingInline: bubbleTail ? \"var(--hjm-space-xs)\" : undefined, touchAction: revealTime || replyAction ? \"pan-y\" : undefined }} aria-label={author}>\n {revealTime ? <time style={{ position: \"absolute\", ...(direction === \"outgoing\" ? { right: 0, justifyContent: \"flex-end\" } : { left: 0 }), top: 0, bottom: 0, width: 80, display: \"flex\", alignItems: \"center\", opacity: offset !== 0 ? 1 : 0, pointerEvents: \"none\" }}><Text variant=\"caption\" tone=\"muted\">{timestamp}</Text></time> : null}\n <div className=\"hjm-chat-message\" style={{ transform: `translateX(${offset}px)`, transition: start.current || theme?.environment.reducedMotion ? \"none\" : \"transform var(--hjm-motion-normal, 200ms) ease-out\", \"--hjm-message-max-width\": screenPatternRecipe.messageMaxWidth } as React.CSSProperties} data-direction={direction} data-tail={bubbleTail || undefined}>\n {avatar ? <div className=\"hjm-chat-message__avatar\">{avatar}</div> : null}\n <div className=\"hjm-chat-message__content\">{author?<Text variant=\"caption\" tone=\"muted\">{author}</Text>:null}\n {reply && replyLink ? <Button tone=\"ghost\" aria-label={replyLink.label} onClick={replyLink.onPress}>{reply}</Button> : null}\n {reactions ? <MessageReactions {...reactions} interactiveContent={interactiveContent}>{reply && !replyLink ? <div className=\"hjm-chat-message__reply\">{reply}</div> : null}{children}</MessageReactions> : <div className=\"hjm-chat-message__bubble\">{reply && !replyLink ? <div className=\"hjm-chat-message__reply\">{reply}</div> : null}{children}</div>}\n {(!revealTime && timestamp)||deliveryLabel||actions?<div className=\"hjm-chat-message__meta\">{(!revealTime && timestamp)||deliveryLabel?<Text variant=\"caption\" tone=\"muted\">{[revealTime ? \"\" : timestamp, deliveryLabel].filter(Boolean).join(\" · \")}</Text>:null}{actions}</div>:null}\n </div>\n </div>\n </article>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"screens.js","sourceRoot":"","sources":["../src/screens.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAA+B,MAAM,uCAAuC,CAAC;AAC1G,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAwC,MAAM,+CAA+C,CAAC;AACjI,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAA4B,MAAM,OAAO,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,0BAA0B,EAAoC,yBAAyB,EAAE,mBAAmB,EAAuF,MAAM,yCAAyC,CAAC;AAC3U,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EA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AO,CAAC,CAAC,CAAC,QAAQ,aAAE,KAAC,IAAI,IAAC,OAAO,EAAC,OAAO,YAAE,KAAK,CAAC,KAAK,GAAQ,EAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,YAAE,KAAK,CAAC,WAAW,GAAQ,CAAC,CAAC,CAAC,IAAI,IAAO,EACpR,WAAW,IACN,EACP,MAAM,IACD,CAAC;AACX,CAAC","sourcesContent":["import { resolveComposerLimit, type ComposerLengthFeedback } from \"@hjmds/design-contracts/communication\";\nimport { Progress } from \"./feedback.js\";\nimport { resolveDesignProfileScreen, type DesignProfileScreenPresentation } from \"@hjmds/design-contracts/design-profile-layout\";\nimport { MessageReactions } from \"./internal/message-reactions.js\";\nimport type { ReactionPickerProps } from \"./reaction-picker.js\";\nimport { Button, IconButton } from \"./actions.js\";\nimport { useOptionalHjmTheme } from \"./provider.js\";\nimport { TextArea } from \"./forms.js\";\nimport { useId, useLayoutEffect, useRef, useState, type Ref, type ReactNode } from \"react\";\nimport { isReplySwipe, timestampRevealOffset, shouldSubmitMessageKey, canSubmitMessage, validateMessageAttachments, type MessageAttachmentDescriptor, resolveScreenContentState, screenPatternRecipe, type ChatMessageDescriptor, type MessageComposerDescriptor, type ScreenContentState } from \"@hjmds/design-contracts/screen-patterns\";\nimport { Heading } from \"./heading.js\";\nimport { Spinner } from \"./internal/spinner.js\";\nimport { Section, Stack, Text } from \"./layout.js\";\nimport { ListRow, type ListRowProps } from \"./display.js\";\nimport { classNames, useDesignProfileDefaults } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type ScreenLayoutProps = Readonly<{\n title: string;\n /** The shared header owns badge placement; the product supplies its meaning and label. */\n titleBadge?: ReactNode;\n /** Hide redundant route names while retaining descriptions and a named screen. */\n titleVisibility?: \"visible\" | \"hidden\";\n headerAlignment?: \"start\" | \"center\";\n /** Preserve host navigation while the shared shell owns content and state. */\n header?: ReactNode;\n contentInset?: \"default\" | \"none\";\n /** Explicit layout wins over the nearest design profile. */\n presentation?: DesignProfileScreenPresentation;\n description?: string;\n leading?: ReactNode;\n actions?: ReactNode;\n notice?: ReactNode;\n footer?: ReactNode;\n state?: ScreenContentState;\n stateAction?: ReactNode;\n children?: ReactNode;\n /** A virtualized list must own scrolling; never nest it inside a second scroll container. */\n scroll?: \"screen\" | \"content\";\n as?: \"main\" | \"section\";\n className?: string;\n /**\n * Canonical layout-only placement on the screen root (for example `flex` or `width` in a split\n * view), matching Native ScreenLayout. Every screen built on ScreenLayout forwards it.\n */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\n/** Shared screen shell. Routing, data, permission checks and mutation state remain product-owned. */\nexport function ScreenLayout({ title, titleBadge, titleVisibility = \"visible\", headerAlignment = \"start\", header, contentInset = \"default\", presentation: suppliedPresentation, description, leading, actions, notice, footer, state = { kind: \"ready\" }, stateAction, children, scroll = \"screen\", as: Element = \"main\", className, layoutStyle }: ScreenLayoutProps) {\n const id = useId();\n const showHeader = titleVisibility === \"visible\" || !!description || !!leading || !!actions;\n // Screens historically work with the stylesheet alone. Optional context keeps\n // that path while inheriting profiles from an enclosing Provider when present.\n const designProfile = useDesignProfileDefaults();\n const presentation = suppliedPresentation ?? designProfile?.screens.overview;\n const profileLayout = presentation === undefined ? undefined : resolveDesignProfileScreen(presentation);\n const resolved = resolveScreenContentState(state);\n // Replacement text owns scrolling even when the ready state delegates it to\n // a virtual list. Use the rendered mode for keyboard access as well as CSS.\n const bodyScroll = resolved.replacesContent ? \"screen\" : scroll;\n const bodyRef = useRef<HTMLDivElement>(null);\n const lastBodyFocus = useRef<HTMLElement | null>(null);\n useLayoutEffect(() => {\n // Replacing a focused retry/input removes its DOM node. Keep keyboard users\n // in the same content region without stealing focus moved to another control.\n const previous = lastBodyFocus.current;\n if (previous && !previous.isConnected && document.activeElement === document.body) {\n bodyRef.current?.focus({ preventScroll: true });\n }\n if (previous && !previous.isConnected) lastBodyFocus.current = null;\n });\n const recipe = screenPatternRecipe;\n return <Element aria-labelledby={header || titleVisibility === \"hidden\" ? undefined : id} aria-label={header || titleVisibility === \"hidden\" ? title : undefined} data-content-inset={contentInset} data-presentation={presentation} className={classNames(\"hjm-screen\", className)}\n style={{ backgroundColor: designProfile?.material.canvas ? \"transparent\" : undefined, \"--hjm-screen-width\": `${profileLayout?.maxWidth ?? recipe.maxWidth}px`, \"--hjm-screen-padding\": `${contentInset === \"none\" ? 0 : recipe.padding}px`, \"--hjm-screen-gap\": `${profileLayout?.gap ?? recipe.sectionGap}px`, \"--hjm-screen-item-gap\": `${recipe.itemGap}px`, \"--hjm-screen-state-gap\": `${recipe.stateGap}px`, \"--hjm-screen-header-min\": `${recipe.headerMinWidth}px`, ...layoutStyle } as React.CSSProperties}>\n {header ?? (showHeader ? headerAlignment === \"center\" ? <header className=\"hjm-screen__header\" style={{ display: \"grid\", gridTemplateColumns: \"minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr)\", alignItems: \"center\" }}>\n <div>{leading}</div><div className=\"hjm-screen__heading\" style={{ textAlign: \"center\", minWidth: 0 }}>\n {titleVisibility === \"visible\" && <Stack axis=\"inline\" gap=\"xs\" align=\"center\" justify=\"center\" wrap><Heading level=\"level3\" semanticLevel={1} id={id}>{title}</Heading>{titleBadge}</Stack>}\n {description ? <Text as=\"p\" tone=\"muted\">{description}</Text> : null}</div><div style={{ justifySelf: \"end\" }}>{actions}</div>\n </header> : <header className=\"hjm-screen__header\" style={profileLayout ? { flexDirection: profileLayout.headerAxis, alignItems: profileLayout.centered ? \"center\" : undefined, textAlign: profileLayout.centered ? \"center\" : undefined } : undefined}>\n {leading}<div className=\"hjm-screen__heading\">{titleVisibility === \"visible\" && <Stack axis=\"inline\" gap=\"xs\" align=\"center\" justify={profileLayout?.centered ? \"center\" : \"start\"} wrap><Heading level=\"level3\" semanticLevel={1} id={id}>{title}</Heading>{titleBadge}</Stack>}\n {description ? <Text as=\"p\" tone=\"muted\">{description}</Text> : null}</div>{actions}\n </header> : null)}\n {notice ? <div className=\"hjm-screen__notice\">{notice}</div> : null}\n {/* Scrollable read-only screens still need a keyboard entry point. */}\n <div ref={bodyRef} tabIndex={bodyScroll === \"content\" ? -1 : 0}\n onFocusCapture={event => { lastBodyFocus.current = event.target as HTMLElement; }}\n onBlurCapture={event => {\n // A connected input blurred to the document intentionally relinquishes\n // focus too; only removal of the currently focused node needs recovery.\n if (event.relatedTarget ? !event.currentTarget.contains(event.relatedTarget as Node) : (event.target as HTMLElement).isConnected) {\n lastBodyFocus.current = null;\n }\n }}\n className=\"hjm-screen__body\" data-scroll={bodyScroll} data-replacement={resolved.replacesContent || undefined} aria-busy={resolved.busy || undefined}>\n {state.kind === \"ready\" ? children : <div className=\"hjm-screen__state\">\n {/* Loading copy is an accessible name; visible copy beside the spinner\n contradicts the shared spinner-only loading contract. */}\n {resolved.busy ? <Spinner label={[state.title, state.description].filter(Boolean).join(\". \")} /> : <div role={state.kind === \"error\" ? \"alert\" : \"status\"}>\n <Stack gap=\"sm\" align=\"center\"><Text variant=\"title\">{state.title}</Text>\n {state.description ? <Text tone=\"muted\">{state.description}</Text> : null}</Stack>\n </div>}\n {stateAction}\n </div>}\n </div>\n {footer ? <footer className=\"hjm-screen__footer\">{footer}</footer> : null}\n </Element>;\n}\n\nexport type SettingsScreenSection = Readonly<{ id: string; title: string; description?: string; children: ReactNode }>;\nexport type SettingsScreenProps = Omit<ScreenLayoutProps, \"children\" | \"scroll\"> & Readonly<{ profile?: ReactNode; sections: readonly SettingsScreenSection[] }>;\nexport function SettingsScreen({ profile, sections, ...props }: SettingsScreenProps) {\n // Keep semantic section headings while using the smaller settings label role.\n return <ScreenLayout {...props}><Stack gap=\"md\">{profile}{sections.map(section =>\n <Section className=\"hjm-settings-section\" key={section.id} title={<Text variant=\"label\" emphasis=\"strong\" tone=\"muted\">{section.title}</Text>} description={section.description}>{section.children}</Section>)}</Stack></ScreenLayout>;\n}\n\nexport type NotificationInboxScreenProps = Omit<ScreenLayoutProps, \"children\"> & Readonly<{\n filters?: ReactNode;\n children: ReactNode;\n}>;\nexport function NotificationInboxScreen({ filters, children, notice, ...props }: NotificationInboxScreenProps) {\n return <ScreenLayout {...props} notice={<Stack gap=\"sm\">{notice}{filters}</Stack>}>{children}</ScreenLayout>;\n}\n\n/** Read/unread is announced in localized copy as well as emphasis; rendering never marks an item read. */\nexport type NotificationItemProps = Omit<ListRowProps, \"description\" | \"selected\"> & Readonly<{\n read: boolean;\n statusLabel: string;\n timestamp: string;\n description?: ReactNode;\n}>;\nexport function NotificationItem({ read, statusLabel, timestamp, description, title, className, ...props }: NotificationItemProps) {\n return <ListRow {...props} className={classNames(\"hjm-notification-item\", className)} data-unread={!read || undefined} title={<Text emphasis={read ? \"regular\" : \"strong\"}>{title}</Text>}\n description={<Stack gap=\"xxs\">{description}<Text variant=\"caption\" tone=\"muted\">{statusLabel} · {timestamp}</Text></Stack>} />;\n}\n\nexport type ChatScreenProps = Omit<ScreenLayoutProps, \"footer\"> & Readonly<{ composer: ReactNode }>;\n/** Caller supplies a virtualized timeline and keyboard-aware composer; no implicit auto-scroll or send. */\nexport function ChatScreen({ composer, scroll = \"content\", ...props }: ChatScreenProps) {\n // An empty conversation must still allow its first message; unavailable states hide input.\n return <ScreenLayout {...props} scroll={scroll} footer={!props.state || props.state.kind === \"ready\" || props.state.kind === \"empty\" ? composer : null} />;\n}\n\nexport type MessageComposerProps = Omit<MessageComposerDescriptor, \"attachmentCount\"> & Readonly<{\n maxLength?: number;\n /** Opt-in count/ring appears only near the actual maxLength; never trims drafts. */\n lengthFeedback?: ComposerLengthFeedback;\n sendDisabled?: boolean;\n additionalContent?: boolean;\n leadingAction?: ReactNode;\n inputRef?: Ref<HTMLTextAreaElement>;\n /** Release typing presence when the host input loses focus. */\n onBlur?: () => void;\n onValueChange(value: string): void;\n onSend(value: string): void;\n context?: ReactNode;\n replyTo?: Readonly<{ author: string; excerpt: string; cancelLabel: string; onCancel(): void }>;\n /** Icon mode puts the send/attachment action inside the growing field. */\n sendIcon?: ReactNode;\n /** Reference comment layout: a filled circular send action inside the field. */\n sendPresentation?: \"inline\" | \"circle\";\n attachmentAction?: Readonly<{ label: string; icon: ReactNode; onPress(): void; disabled?: boolean }>;\n attachments?: readonly (MessageAttachmentDescriptor & Readonly<{ preview: ReactNode }>)[];\n onRemoveAttachment?: (id: string) => void;\n /** Canonical layout-only placement on the composer root. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\nexport function MessageComposer({ value, label, sendLabel, placeholder = label, description, error, invalid = false, submitMode = \"newline\", onBlur, disabled = false, pending = false, onValueChange, onSend, maxLength, lengthFeedback, sendDisabled = false, additionalContent = false, leadingAction, inputRef, context, replyTo, sendIcon, sendPresentation = \"inline\", attachmentAction, attachments = [], onRemoveAttachment, layoutStyle }: MessageComposerProps) {\n validateMessageAttachments(attachments);\n if (attachments.length && !onRemoveAttachment) throw new TypeError(\"Attachments require a removal callback\");\n if (lengthFeedback && maxLength === undefined) throw new TypeError(\"Composer length feedback requires maxLength\");\n const limit = !lengthFeedback ? null : resolveComposerLimit(value, maxLength!, lengthFeedback.threshold);\n const canSend = !sendDisabled && !limit?.exceeded && canSubmitMessage({ value, label, sendLabel, disabled, pending, attachmentCount: attachments.length + (additionalContent ? 1 : 0) });\n const locked = disabled || pending;\n // A bounded corner radius keeps multiline/large-text content inside the field instead of a tall pill.\n const hasContent = !!value.trim() || attachments.length > 0 || additionalContent;\n const attach = attachmentAction ? <IconButton label={attachmentAction.label} tone=\"ghost\" disabled={locked || attachmentAction.disabled} onClick={attachmentAction.onPress}>{attachmentAction.icon}</IconButton> : null;\n const send = sendIcon ? <IconButton label={sendLabel} size={sendPresentation === \"circle\" ? \"small\" : \"medium\"} shape=\"circle\" tone={sendPresentation === \"circle\" ? \"primary\" : \"ghost\"} disabled={!canSend} loading={pending} onClick={() => { if (canSend) onSend(value); }}>{sendIcon}</IconButton> : <Button disabled={!canSend} loading={pending} onClick={() => { if (canSend) onSend(value); }}>{sendLabel}</Button>;\n // Readonly pending input preserves the keyboard/focus for receipt failure recovery; disabling it would blur desktop chat.\n // Enter is opt-in and IME-safe; receipt-driven clearing and failed-send recovery belong to the host.\n return <div className=\"hjm-message-composer\" data-send-presentation={sendPresentation} style={{\"--hjm-message-composer-gap\": `${screenPatternRecipe.itemGap}px`, \"--hjm-attachment-size\": `${screenPatternRecipe.attachmentSize}px`, \"--hjm-attachment-remove-size\": `${screenPatternRecipe.attachmentRemoveSize}px`, ...layoutStyle} as React.CSSProperties}>{context}{replyTo ? <Stack axis=\"inline\" gap=\"sm\" align=\"center\"><Stack gap=\"xxs\"><Text variant=\"caption\" emphasis=\"strong\">{replyTo.author}</Text><Text variant=\"caption\" tone=\"muted\">{replyTo.excerpt}</Text></Stack><IconButton label={replyTo.cancelLabel} tone=\"ghost\" disabled={locked} onClick={replyTo.onCancel}><Text>×</Text></IconButton></Stack> : null}\n {attachments.length ? <div className=\"hjm-message-composer__attachments\">{attachments.map(item => <div key={item.id} className=\"hjm-message-composer__attachment\"><div className=\"hjm-message-composer__preview\">{item.preview}</div><span className=\"hjm-message-composer__remove\"><IconButton label={item.removeLabel} tone=\"ghost\" size=\"small\" disabled={locked || item.disabled} onClick={() => { if (!locked && !item.disabled) onRemoveAttachment?.(item.id); }}><span className=\"hjm-message-composer__remove-glyph\" aria-hidden=\"true\">×</span></IconButton></span></div>)}{attach}</div> : null}\n <div className=\"hjm-message-composer__row\"><TextArea ref={inputRef} maxLength={maxLength} leadingAction={leadingAction} shape=\"large\" rows={screenPatternRecipe.composerMinLines} aria-label={label} placeholder={placeholder} description={description} error={error} aria-invalid={invalid || undefined} onBlur={onBlur} value={value} disabled={disabled} readOnly={pending} aria-busy={pending || undefined}\n onKeyDown={event => { if (shouldSubmitMessageKey({key:event.key, shiftKey:event.shiftKey, isComposing:event.nativeEvent.isComposing, keyCode:event.nativeEvent.keyCode}, submitMode)) { event.preventDefault(); if (canSend) onSend(value); } }}\n onChange={event => { if (!locked) onValueChange(event.currentTarget.value); }} minVisibleLines={screenPatternRecipe.composerMinLines} maxVisibleLines={screenPatternRecipe.composerMaxLines}\n {...(sendIcon ? { trailing: hasContent || pending ? send : attach } : {})} />\n {sendIcon ? null : send}\n </div>{lengthFeedback && limit?.near ? <Progress shape=\"circular\" label={lengthFeedback.label} value={Math.min(limit.used, limit.max)} max={limit.max} valueText={lengthFeedback.formatCount(limit.used, limit.max)}><Text variant=\"caption\">{lengthFeedback.formatCount(limit.used, limit.max)}</Text></Progress> : null}</div>;\n}\n\nexport type ChatMessageProps = ChatMessageDescriptor & Readonly<{ children: ReactNode; interactiveContent?: boolean; avatar?: ReactNode; reply?: ReactNode; actions?: ReactNode; replyAction?: Readonly<{label:string; onPress():void; disabled?:boolean}>; replyLink?: Readonly<{label:string; onPress():void}>; reactions?: ReactionPickerProps & Readonly<{ closeLabel: string; menuAction?: Readonly<{ label: string; onPress(): void; disabled?: boolean }> }>;\n /** Canonical layout-only placement on the message row. The swipe offset still owns `transform`. */\n layoutStyle?: HjmCompositionStyleProp }>;\nexport function ChatMessage({ direction, author, timestamp, timestampPresentation = \"always\", bubbleTail = false, deliveryLabel, avatar, reply, actions, replyAction, replyLink, reactions, children, interactiveContent=false, layoutStyle }: ChatMessageProps) {\n const theme = useOptionalHjmTheme();\n const revealTime = timestampPresentation === \"swipe\" && !!timestamp;\n // Only the pointer that began a drag can finish it; another touch must not reply or cancel it.\n const start = useRef<{x:number;y:number;pointerId:number} | null>(null);\n const [offset, setOffset] = useState(0);\n const finish = () => { start.current = null; setOffset(0); };\n return <article tabIndex={replyAction && !replyAction.disabled ? 0 : undefined}\n aria-keyshortcuts={replyAction ? \"Alt+ArrowLeft Alt+ArrowRight\" : undefined} aria-description={replyAction?.label}\n onKeyDown={event => { if (event.target === event.currentTarget && event.altKey && (event.key === \"ArrowLeft\" || event.key === \"ArrowRight\") && replyAction && !replyAction.disabled) { event.preventDefault(); replyAction.onPress(); } }}\n onPointerDown={event => { if (start.current || (!revealTime && (!replyAction || replyAction.disabled)) || event.button !== 0 || (event.target as HTMLElement).closest(\"button,a,input,textarea\")) return; start.current = {x:event.clientX,y:event.clientY,pointerId:event.pointerId}; }}\n onPointerMove={event => { if (!start.current || start.current.pointerId !== event.pointerId) return; const dx=event.clientX-start.current.x,dy=event.clientY-start.current.y; if (Math.abs(dy)>10 && Math.abs(dy)>Math.abs(dx)) {finish();return;} if (revealTime) setOffset((direction === \"outgoing\" ? -1 : 1) * timestampRevealOffset(direction === \"outgoing\" ? -dx : dx,dy)); else if (Math.abs(dx)>Math.abs(dy)*2) setOffset(Math.max(-72,Math.min(72,dx))); }}\n onPointerUp={event => { if (start.current?.pointerId !== event.pointerId) return; if (!revealTime && start.current && replyAction && !replyAction.disabled && isReplySwipe(event.clientX-start.current.x,event.clientY-start.current.y)) replyAction.onPress(); finish(); }} onPointerCancel={event => { if (start.current?.pointerId === event.pointerId) finish(); }} onPointerLeave={event => { if (start.current?.pointerId === event.pointerId) finish(); }}\n style={{ ...layoutStyle, position: \"relative\", overflow: \"hidden\", paddingInline: bubbleTail ? \"var(--hjm-space-xs)\" : undefined, touchAction: revealTime || replyAction ? \"pan-y\" : undefined }} aria-label={author}>\n {revealTime ? <time style={{ position: \"absolute\", ...(direction === \"outgoing\" ? { right: 0, justifyContent: \"flex-end\" } : { left: 0 }), top: 0, bottom: 0, width: 80, display: \"flex\", alignItems: \"center\", opacity: offset !== 0 ? 1 : 0, pointerEvents: \"none\" }}><Text variant=\"caption\" tone=\"muted\">{timestamp}</Text></time> : null}\n <div className=\"hjm-chat-message\" style={{ transform: `translateX(${offset}px)`, transition: start.current || theme?.environment.reducedMotion ? \"none\" : \"transform var(--hjm-motion-normal, 200ms) ease-out\", \"--hjm-message-max-width\": screenPatternRecipe.messageMaxWidth } as React.CSSProperties} data-direction={direction} data-tail={bubbleTail || undefined}>\n {avatar ? <div className=\"hjm-chat-message__avatar\">{avatar}</div> : null}\n <div className=\"hjm-chat-message__content\">{author?<Text variant=\"caption\" tone=\"muted\">{author}</Text>:null}\n {reply && replyLink ? <Button tone=\"ghost\" aria-label={replyLink.label} onClick={replyLink.onPress}>{reply}</Button> : null}\n {reactions ? <MessageReactions {...reactions} interactiveContent={interactiveContent}>{reply && !replyLink ? <div className=\"hjm-chat-message__reply\">{reply}</div> : null}{children}</MessageReactions> : <div className=\"hjm-chat-message__bubble\">{reply && !replyLink ? <div className=\"hjm-chat-message__reply\">{reply}</div> : null}{children}</div>}\n {(!revealTime && timestamp)||deliveryLabel||actions?<div className=\"hjm-chat-message__meta\">{(!revealTime && timestamp)||deliveryLabel?<Text variant=\"caption\" tone=\"muted\">{[revealTime ? \"\" : timestamp, deliveryLabel].filter(Boolean).join(\" · \")}</Text>:null}{actions}</div>:null}\n </div>\n </div>\n </article>;\n}\n\n/** Shared structure for embedded compositions. The parent supplies size; this never creates a second scroller. */\nexport type CompositionLayoutProps = Readonly<{\n title?: string;\n description?: string;\n badge?: ReactNode;\n leading?: ReactNode;\n actions?: ReactNode;\n notice?: ReactNode;\n children?: ReactNode;\n footer?: ReactNode;\n state?: ScreenContentState;\n stateAction?: ReactNode;\n layoutStyle?: HjmCompositionStyleProp;\n}>;\nexport function CompositionLayout({title, description, badge, leading, actions, notice, children, footer, state = {kind: \"ready\"}, stateAction, layoutStyle}: CompositionLayoutProps) {\n const resolved = resolveScreenContentState(state);\n return <Stack gap=\"md\" {...(layoutStyle === undefined ? {} : {layoutStyle})}>\n {title || description || badge || leading || actions ? <Stack axis=\"inline\" gap=\"sm\" align=\"center\" layoutStyle={{flexWrap: \"wrap\"}}>\n {leading}<Stack gap=\"xxs\" layoutStyle={{flex: 1, minWidth: 0}}>\n <Stack axis=\"inline\" gap=\"xs\" align=\"center\" layoutStyle={{flexWrap: \"wrap\"}}>{title ? <Heading level=\"level3\">{title}</Heading> : null}{badge}</Stack>\n {description ? <Text tone=\"muted\">{description}</Text> : null}\n </Stack>{actions}\n </Stack> : null}\n {notice}\n {state.kind === \"ready\" ? children : <Stack gap=\"sm\" align=\"center\" justify=\"center\" layoutStyle={{flex: 1}}>\n {resolved.busy ? <Spinner label={[state.title, state.description].filter(Boolean).join(\". \")} /> : <div role={state.kind === \"error\" ? \"alert\" : \"status\"}><Text variant=\"title\">{state.title}</Text>{state.description ? <Text tone=\"muted\">{state.description}</Text> : null}</div>}\n {stateAction}\n </Stack>}\n {footer}\n </Stack>;\n}\n"]}
|
package/dist/styles.css
CHANGED
|
@@ -1277,12 +1277,13 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
1277
1277
|
.hjm-comparison-table { padding-block: var(--hjm-space-xs); }
|
|
1278
1278
|
.hjm-comparison-table__sides { display: flex; justify-content: space-between; padding: var(--hjm-space-xs) var(--hjm-space-md); font-weight: var(--hjm-font-weight-bold); }
|
|
1279
1279
|
.hjm-comparison-table__rows { margin: 0; padding: 0; list-style: none; }
|
|
1280
|
-
.hjm-comparison-table__row { display: grid; gap: var(--hjm-space-
|
|
1280
|
+
.hjm-comparison-table__row { display: grid; gap: var(--hjm-space-xs); padding: var(--hjm-space-sm) var(--hjm-space-md); border-block-start: 1px solid var(--hjm-color-border); }
|
|
1281
|
+
.hjm-comparison-table__rows:first-child > :first-child { border-block-start: 0; }
|
|
1281
1282
|
.hjm-comparison-table__values { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--hjm-space-sm); font-variant-numeric: tabular-nums; color: var(--hjm-color-text-sub); }
|
|
1282
1283
|
.hjm-comparison-table__values > :last-child { text-align: end; }
|
|
1283
1284
|
.hjm-comparison-table__values > [data-win] { color: var(--hjm-color-text); font-weight: var(--hjm-font-weight-bold); }
|
|
1284
|
-
.hjm-comparison-table__label { color: var(--hjm-color-text
|
|
1285
|
-
.hjm-comparison-table__bars { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hjm-space-
|
|
1285
|
+
.hjm-comparison-table__label { color: var(--hjm-color-text); font-size: var(--hjm-type-label-size); }
|
|
1286
|
+
.hjm-comparison-table__bars { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hjm-space-sm); block-size: 5px; }
|
|
1286
1287
|
.hjm-comparison-table__track { display: flex; justify-content: flex-end; border-radius: 2px; background: var(--hjm-color-surface-alt); overflow: hidden; }
|
|
1287
1288
|
.hjm-comparison-table__track[data-side="1"] { justify-content: flex-start; }
|
|
1288
1289
|
.hjm-comparison-table__bar { display: block; block-size: 100%; border-radius: 2px; }
|
package/dist/styles.layered.css
CHANGED
|
@@ -1278,12 +1278,13 @@ button.hjm-list-row, a.hjm-list-row { cursor: pointer; }
|
|
|
1278
1278
|
.hjm-comparison-table { padding-block: var(--hjm-space-xs); }
|
|
1279
1279
|
.hjm-comparison-table__sides { display: flex; justify-content: space-between; padding: var(--hjm-space-xs) var(--hjm-space-md); font-weight: var(--hjm-font-weight-bold); }
|
|
1280
1280
|
.hjm-comparison-table__rows { margin: 0; padding: 0; list-style: none; }
|
|
1281
|
-
.hjm-comparison-table__row { display: grid; gap: var(--hjm-space-
|
|
1281
|
+
.hjm-comparison-table__row { display: grid; gap: var(--hjm-space-xs); padding: var(--hjm-space-sm) var(--hjm-space-md); border-block-start: 1px solid var(--hjm-color-border); }
|
|
1282
|
+
.hjm-comparison-table__rows:first-child > :first-child { border-block-start: 0; }
|
|
1282
1283
|
.hjm-comparison-table__values { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--hjm-space-sm); font-variant-numeric: tabular-nums; color: var(--hjm-color-text-sub); }
|
|
1283
1284
|
.hjm-comparison-table__values > :last-child { text-align: end; }
|
|
1284
1285
|
.hjm-comparison-table__values > [data-win] { color: var(--hjm-color-text); font-weight: var(--hjm-font-weight-bold); }
|
|
1285
|
-
.hjm-comparison-table__label { color: var(--hjm-color-text
|
|
1286
|
-
.hjm-comparison-table__bars { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hjm-space-
|
|
1286
|
+
.hjm-comparison-table__label { color: var(--hjm-color-text); font-size: var(--hjm-type-label-size); }
|
|
1287
|
+
.hjm-comparison-table__bars { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hjm-space-sm); block-size: 5px; }
|
|
1287
1288
|
.hjm-comparison-table__track { display: flex; justify-content: flex-end; border-radius: 2px; background: var(--hjm-color-surface-alt); overflow: hidden; }
|
|
1288
1289
|
.hjm-comparison-table__track[data-side="1"] { justify-content: flex-start; }
|
|
1289
1290
|
.hjm-comparison-table__bar { display: block; block-size: 100%; border-radius: 2px; }
|
package/dist/table-family.d.ts
CHANGED
|
@@ -58,9 +58,11 @@ export type ComparisonTableProps = Readonly<{
|
|
|
58
58
|
name: string;
|
|
59
59
|
color: string;
|
|
60
60
|
}>];
|
|
61
|
+
/** Hide duplicate visual names when the two sides are already identified above; spoken row labels retain them. */
|
|
62
|
+
showSideNames?: boolean;
|
|
61
63
|
accessibilityLabel: string;
|
|
62
64
|
className?: string;
|
|
63
65
|
layoutStyle?: HjmCompositionStyleProp;
|
|
64
66
|
}>;
|
|
65
|
-
export declare function ComparisonTable({ rows, sides, accessibilityLabel, className, layoutStyle }: ComparisonTableProps): import("react").JSX.Element;
|
|
67
|
+
export declare function ComparisonTable({ rows, sides, showSideNames, accessibilityLabel, className, layoutStyle }: ComparisonTableProps): import("react").JSX.Element;
|
|
66
68
|
//# sourceMappingURL=table-family.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-family.d.ts","sourceRoot":"","sources":["../src/table-family.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAEL,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EACxG,MAAM,+CAA+C,CAAC;AAEvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAYtE,kIAAkI;AAClI,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SAAS,CAAC,QAAQ,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,QAAQ,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;IACvG,kHAAkH;IAClH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACvC,CAAC,CAAC;AAEH,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,aAAoB,EAAE,kBAAkB,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,oBAAoB,+BAmCtI"}
|
package/dist/table-family.js
CHANGED
|
@@ -65,11 +65,11 @@ export function MatrixTable({ ids, labelOf, getCell, highlightId = null, heatCol
|
|
|
65
65
|
})] }, rowId));
|
|
66
66
|
}) })] }) }));
|
|
67
67
|
}
|
|
68
|
-
export function ComparisonTable({ rows, sides, accessibilityLabel, className, layoutStyle }) {
|
|
69
|
-
return (_jsxs("section", { className: classNames("hjm-table-family", "hjm-comparison-table", className), style: withFamilyStyle(layoutStyle), "aria-label": accessibilityLabel, children: [_jsx("div", { className: "hjm-comparison-table__sides", "aria-hidden": "true", children: sides.map((side, index) => _jsx("span", { style: { color: side.color }, children: side.name }, index)) }), _jsx("ul", { className: "hjm-comparison-table__rows", role: "list", children: rows.map((row) => {
|
|
68
|
+
export function ComparisonTable({ rows, sides, showSideNames = true, accessibilityLabel, className, layoutStyle }) {
|
|
69
|
+
return (_jsxs("section", { className: classNames("hjm-table-family", "hjm-comparison-table", className), style: withFamilyStyle(layoutStyle), "aria-label": accessibilityLabel, children: [showSideNames && _jsx("div", { className: "hjm-comparison-table__sides", "aria-hidden": "true", children: sides.map((side, index) => _jsx("span", { style: { color: side.color }, children: side.name }, index)) }), _jsx("ul", { className: "hjm-comparison-table__rows", role: "list", children: rows.map((row) => {
|
|
70
70
|
const { winner, shares } = resolveComparisonRow(row);
|
|
71
71
|
const shown = row.display ?? [row.values[0] === null ? "—" : String(row.values[0]), row.values[1] === null ? "—" : String(row.values[1])];
|
|
72
|
-
return (_jsxs("li", { className: "hjm-comparison-table__row", "data-winner": winner ?? undefined, children: [_jsx("span", { className: "hjm-visually-hidden", children: `${row.label} ${sides[0].name} ${shown[0]}, ${sides[1].name} ${shown[1]}` }), _jsxs("div", { className: "hjm-comparison-table__values", "aria-hidden": "true", children: [_jsx("span", { "data-win": winner === 0 || undefined, children: shown[0] }), _jsx("span", { className: "hjm-comparison-table__label", children: row.label }), _jsx("span", { "data-win": winner === 1 || undefined, children: shown[1] })] }), _jsx("div", { className: "hjm-comparison-table__bars", "aria-hidden": "true", children: [0, 1].map((index) => (_jsx("span", { className: "hjm-comparison-table__track", "data-side": index, children: _jsx("span", { className: "hjm-comparison-table__bar", style: { inlineSize: `${Math.round(shares[index] * 1000) / 10}%`, background: sides[index].color, opacity: winner === null || winner === index ? 1 : 0.
|
|
72
|
+
return (_jsxs("li", { className: "hjm-comparison-table__row", "data-winner": winner ?? undefined, children: [_jsx("span", { className: "hjm-visually-hidden", children: `${row.label} ${sides[0].name} ${shown[0]}, ${sides[1].name} ${shown[1]}` }), _jsxs("div", { className: "hjm-comparison-table__values", "aria-hidden": "true", children: [_jsx("span", { "data-win": winner === 0 || undefined, children: shown[0] }), _jsx("span", { className: "hjm-comparison-table__label", children: row.label }), _jsx("span", { "data-win": winner === 1 || undefined, children: shown[1] })] }), _jsx("div", { className: "hjm-comparison-table__bars", "aria-hidden": "true", children: [0, 1].map((index) => (_jsx("span", { className: "hjm-comparison-table__track", "data-side": index, children: _jsx("span", { className: "hjm-comparison-table__bar", style: { inlineSize: `${Math.round(shares[index] * 1000) / 10}%`, background: sides[index].color, opacity: winner === null || winner === index ? 1 : 0.6 } }) }, index))) })] }, row.id));
|
|
73
73
|
}) })] }));
|
|
74
74
|
}
|
|
75
75
|
//# sourceMappingURL=table-family.js.map
|
package/dist/table-family.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-family.js","sourceRoot":"","sources":["../src/table-family.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,qBAAqB,EAAE,eAAe,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,aAAa,GAEnH,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C;;;;GAIG;AAEH,SAAS,KAAK,CAAC,KAAa;IAC1B,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACzE,CAAC;AAED,kIAAkI;AAClI,MAAM,UAAU,aAAa,CAAC,SAAyB;IACrD,MAAM,IAAI,GAAG,SAAS,CAAC,MAAM,KAAK,OAAO;QACvC,CAAC,CAAC,eAAe,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE;QACvC,CAAC,CAAC,SAAS,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,gBAAgB,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,qBAAqB,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;IACzH,OAAO,SAAS,CAAC,KAAK,KAAK,SAAS,IAAI,SAAS,CAAC,KAAK,KAAK,CAAC;QAC3D,CAAC,CAAC,OAAO,IAAI,GAAG;QAChB,CAAC,CAAC,0BAA0B,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,GAAG,GAAG,CAAC,iBAAiB,CAAC;AAC5F,CAAC;AAED,wEAAwE;AACxE,MAAM,WAAW,GAAG,EAAE,6BAA6B,EAAE,aAAa,CAAC,eAAe,CAAC,GAAG,CAAC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KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,GAC3J,IAJO,KAAK,CAKT,CACR,CAAC,GACE,KAjBC,GAAG,CAAC,EAAE,CAkBV,CACN,CAAC;gBACJ,CAAC,CAAC,GACC,IACG,CACX,CAAC;AACJ,CAAC","sourcesContent":["import type { CSSProperties, ReactNode } from \"react\";\nimport type { ColorReference } from \"@hjmds/design-contracts/color-references\";\nimport {\n dataTableFamilyRecipe, dataTableRecipe, formatLineScoreCell, resolveComparisonRow, resolveLineScore, resolveMatrix,\n type ComparisonRow, type DataTableCellHeat, type DataTableCellTone, type LineScoreTeam, type MatrixCell,\n} from \"@hjmds/design-contracts/components/data-table\";\nimport { classNames } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\n/*\n * Table family companions (2026-10-14): layouts products kept hand-building next to DataTable.\n * LineScore follows MLB/ESPN game headers, MatrixTable a head-to-head cross table, ComparisonTable\n * the ESPN matchup rows. Geometry and rules live in the data-table contract; these only draw.\n */\n\nfunction kebab(value: string): string {\n return value.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);\n}\n\n/** Recipe colors resolve through the provider's CSS variables so a theme switch repaints without re-rendering (same as Chart). */\nexport function tableCssColor(reference: ColorReference): string {\n const name = reference.source === \"theme\"\n ? `--hjm-color-${kebab(reference.key)}`\n : reference.source === \"accent\" ? `--hjm-accent-${kebab(reference.key)}` : `--hjm-accent-fill-${kebab(reference.key)}`;\n return reference.alpha === undefined || reference.alpha === 1\n ? `var(${name})`\n : `color-mix(in srgb, var(${name}) ${Math.round(reference.alpha * 100)}%, transparent)`;\n}\n\n/** Live period and \"my team\" row reuse the shared selected-row tint. */\nconst familyStyle = { \"--hjm-table-family-selected\": tableCssColor(dataTableRecipe.row.selectedBackground) } as CSSProperties;\nconst withFamilyStyle = (layoutStyle: HjmCompositionStyleProp | undefined) => ({ ...familyStyle, ...layoutStyle }) as CSSProperties;\n\nexport type TableHeatColors = Readonly<{ high: string; low: string }>;\n\n/**\n * Cell emphasis as inline style. Heat paints a background *image* so pinned cells keep their opaque\n * canvas color underneath and scrolled content never shows through the translucent tint.\n */\nexport function tableCellEmphasis(\n decoration: Readonly<{ tone?: DataTableCellTone | null; heat?: DataTableCellHeat | null }> | null | undefined,\n heatColors?: TableHeatColors,\n): Readonly<{ style: CSSProperties; tone?: DataTableCellTone; heat?: string }> {\n if (!decoration) return { style: {} };\n const style: Record<string, string | number> = {};\n const tone = decoration.tone ?? undefined, heat = decoration.heat ?? null;\n if (tone) {\n style.color = tableCssColor(dataTableFamilyRecipe.tone[tone].color);\n style.fontWeight = dataTableFamilyRecipe.tone[tone].fontWeight;\n }\n if (heat) {\n const base = heatColors?.[heat.side] ?? tableCssColor(dataTableFamilyRecipe.heat[heat.side]);\n style[\"--hjm-data-table-heat\"] = `color-mix(in srgb, ${base} ${Math.round(dataTableFamilyRecipe.heatAlpha[heat.strength] * 100)}%, transparent)`;\n }\n return { style: style as CSSProperties, ...(tone ? { tone } : {}), ...(heat ? { heat: `${heat.side}-${heat.strength}` } : {}) };\n}\n\n/* ---------------------------------------------- Line score ------------------------------------- */\n\nexport type LineScoreProps = Readonly<{\n teams: readonly LineScoreTeam[];\n /** Total column headers in order, e.g. [\"R\", \"H\", \"E\", \"B\"]. The first one decides the leader. */\n totals: readonly string[];\n /** Live period (1-based) to highlight. */\n currentPeriod?: number | null;\n minPeriods?: number;\n /** Optional leading content per team (logo/badge). */\n renderTeam?: (team: LineScoreTeam) => ReactNode;\n /** Accessible name of the table (prop name kept for Native parity). */\n accessibilityLabel: string;\n className?: string;\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport function LineScore({ teams, totals, currentPeriod = null, minPeriods, renderTeam, accessibilityLabel, className, layoutStyle }: LineScoreProps) {\n const score = resolveLineScore(teams, { totals, currentPeriod, ...(minPeriods !== undefined ? { minPeriods } : {}) });\n const periods = score.columns.filter((column) => column.kind === \"period\");\n const totalColumns = score.columns.filter((column) => column.kind === \"total\");\n return (\n <div className={classNames(\"hjm-table-family\", \"hjm-line-score\", className)} style={withFamilyStyle(layoutStyle)}>\n <table className=\"hjm-line-score__table\" aria-label={accessibilityLabel}>\n <thead>\n <tr>\n <td className=\"hjm-line-score__team\" />\n {periods.map((column, index) => {\n const live = score.currentPeriod === index + 1;\n return <th key={column.id} scope=\"col\" className=\"hjm-line-score__period\" aria-current={live ? \"true\" : undefined} data-current={live || undefined}>{column.header}</th>;\n })}\n {totalColumns.map((column, index) => (\n <th key={column.id} scope=\"col\" className={classNames(\"hjm-line-score__total\", index === 0 && \"hjm-line-score__total-edge\")}>{column.header}</th>\n ))}\n </tr>\n </thead>\n <tbody>\n {teams.map((team) => (\n <tr key={team.id} data-leader={score.leaderId === team.id || undefined}>\n <th scope=\"row\" className=\"hjm-line-score__team\">\n <span className=\"hjm-line-score__team-content\">{renderTeam?.(team)}<span>{team.name}</span></span>\n </th>\n {periods.map((column, index) => {\n const value = team.periods[index];\n return <td key={column.id} className=\"hjm-line-score__period\" data-current={score.currentPeriod === index + 1 || undefined} data-scored={typeof value === \"number\" && value > 0 || undefined}>{formatLineScoreCell(value)}</td>;\n })}\n {totalColumns.map((column, index) => (\n <td key={column.id} className={classNames(\"hjm-line-score__total\", index === 0 && \"hjm-line-score__total-edge\")}>{team.totals[column.header] ?? \"—\"}</td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n}\n\n/* ---------------------------------------------- Matrix table ----------------------------------- */\n\nexport type MatrixTableProps<Key extends string = string> = Readonly<{\n ids: readonly Key[];\n /** Short header per id (team short name). */\n labelOf: (id: Key) => string;\n getCell: (row: Key, column: Key) => MatrixCell | null;\n /** Row id to highlight (my team). */\n highlightId?: Key | null;\n heatColors?: TableHeatColors;\n accessibilityLabel: string;\n className?: string;\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport function MatrixTable<Key extends string = string>({ ids, labelOf, getCell, highlightId = null, heatColors, accessibilityLabel, className, layoutStyle }: MatrixTableProps<Key>) {\n const matrix = resolveMatrix(ids, getCell);\n return (\n <div className={classNames(\"hjm-table-family\", \"hjm-matrix-table\", className)} style={withFamilyStyle(layoutStyle)}>\n <table className=\"hjm-matrix-table__table\" aria-label={accessibilityLabel}>\n <thead>\n <tr>\n <td className=\"hjm-matrix-table__corner\" />\n {ids.map((id) => <th key={id} scope=\"col\">{labelOf(id)}</th>)}\n </tr>\n </thead>\n <tbody>\n {matrix.map((cells, rowIndex) => {\n const rowId = ids[rowIndex]!;\n return (\n <tr key={rowId} data-highlighted={rowId === highlightId || undefined}>\n <th scope=\"row\">{labelOf(rowId)}</th>\n {cells.map((cell, columnIndex) => {\n // The diagonal is a team against itself: blank and hidden, not \"no record\".\n if (cell === \"self\") return <td key={ids[columnIndex]} className=\"hjm-matrix-table__self\" aria-hidden=\"true\" />;\n const emphasis = tableCellEmphasis(cell, heatColors);\n return <td key={ids[columnIndex]} className={emphasis.heat ? \"hjm-table-family__heat\" : undefined} style={emphasis.style} data-tone={emphasis.tone} data-heat={emphasis.heat}>{cell?.label ?? \"—\"}</td>;\n })}\n </tr>\n );\n })}\n </tbody>\n </table>\n </div>\n );\n}\n\n/* ---------------------------------------------- Comparison table ------------------------------- */\n\nexport type ComparisonTableProps = Readonly<{\n rows: readonly ComparisonRow[];\n /** Side names and accent colors (team colors). */\n sides: readonly [Readonly<{ name: string; color: string }>, Readonly<{ name: string; color: string }>];\n accessibilityLabel: string;\n className?: string;\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport function ComparisonTable({ rows, sides, accessibilityLabel, className, layoutStyle }: ComparisonTableProps) {\n return (\n <section className={classNames(\"hjm-table-family\", \"hjm-comparison-table\", className)} style={withFamilyStyle(layoutStyle)} aria-label={accessibilityLabel}>\n <div className=\"hjm-comparison-table__sides\" aria-hidden=\"true\">\n {sides.map((side, index) => <span key={index} style={{ color: side.color }}>{side.name}</span>)}\n </div>\n <ul className=\"hjm-comparison-table__rows\" role=\"list\">\n {rows.map((row) => {\n const { winner, shares } = resolveComparisonRow(row);\n const shown = row.display ?? [row.values[0] === null ? \"—\" : String(row.values[0]), row.values[1] === null ? \"—\" : String(row.values[1])];\n return (\n <li key={row.id} className=\"hjm-comparison-table__row\" data-winner={winner ?? undefined}>\n {/* One sentence for assistive tech; the visual grid and bars are decoration. */}\n <span className=\"hjm-visually-hidden\">{`${row.label} ${sides[0].name} ${shown[0]}, ${sides[1].name} ${shown[1]}`}</span>\n <div className=\"hjm-comparison-table__values\" aria-hidden=\"true\">\n <span data-win={winner === 0 || undefined}>{shown[0]}</span>\n <span className=\"hjm-comparison-table__label\">{row.label}</span>\n <span data-win={winner === 1 || undefined}>{shown[1]}</span>\n </div>\n <div className=\"hjm-comparison-table__bars\" aria-hidden=\"true\">\n {([0, 1] as const).map((index) => (\n <span key={index} className=\"hjm-comparison-table__track\" data-side={index}>\n <span\n className=\"hjm-comparison-table__bar\"\n style={{ inlineSize: `${Math.round(shares[index] * 1000) / 10}%`, background: sides[index].color, opacity: winner === null || winner === index ? 1 : 0.35 }}\n />\n </span>\n ))}\n </div>\n </li>\n );\n })}\n </ul>\n </section>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"table-family.js","sourceRoot":"","sources":["../src/table-family.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,qBAAqB,EAAE,eAAe,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,aAAa,GAEnH,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C;;;;GAIG;AAEH,SAAS,KAAK,CAAC,KAAa;IAC1B,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACzE,CAAC;AAED,kIAAkI;AAClI,MAAM,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,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,GAAQ,EACxH,eAAK,SAAS,EAAC,8BAA8B,iBAAa,MAAM,aAC9D,2BAAgB,MAAM,KAAK,CAAC,IAAI,SAAS,YAAG,KAAK,CAAC,CAAC,CAAC,GAAQ,EAC5D,eAAM,SAAS,EAAC,6BAA6B,YAAE,GAAG,CAAC,KAAK,GAAQ,EAChE,2BAAgB,MAAM,KAAK,CAAC,IAAI,SAAS,YAAG,KAAK,CAAC,CAAC,CAAC,GAAQ,IACxD,EACN,cAAK,SAAS,EAAC,4BAA4B,iBAAa,MAAM,YAC1D,CAAC,CAAC,EAAE,CAAC,CAAW,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAChC,eAAkB,SAAS,EAAC,6BAA6B,eAAY,KAAK,YACxE,eACE,SAAS,EAAC,2BAA2B,EACrC,KAAK,EAAE,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,GAC1J,IAJO,KAAK,CAKT,CACR,CAAC,GACE,KAjBC,GAAG,CAAC,EAAE,CAkBV,CACN,CAAC;gBACJ,CAAC,CAAC,GACC,IACG,CACX,CAAC;AACJ,CAAC","sourcesContent":["import type { CSSProperties, ReactNode } from \"react\";\nimport type { ColorReference } from \"@hjmds/design-contracts/color-references\";\nimport {\n dataTableFamilyRecipe, dataTableRecipe, formatLineScoreCell, resolveComparisonRow, resolveLineScore, resolveMatrix,\n type ComparisonRow, type DataTableCellHeat, type DataTableCellTone, type LineScoreTeam, type MatrixCell,\n} from \"@hjmds/design-contracts/components/data-table\";\nimport { classNames } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\n/*\n * Table family companions (2026-10-14): layouts products kept hand-building next to DataTable.\n * LineScore follows MLB/ESPN game headers, MatrixTable a head-to-head cross table, ComparisonTable\n * the ESPN matchup rows. Geometry and rules live in the data-table contract; these only draw.\n */\n\nfunction kebab(value: string): string {\n return value.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);\n}\n\n/** Recipe colors resolve through the provider's CSS variables so a theme switch repaints without re-rendering (same as Chart). */\nexport function tableCssColor(reference: ColorReference): string {\n const name = reference.source === \"theme\"\n ? `--hjm-color-${kebab(reference.key)}`\n : reference.source === \"accent\" ? `--hjm-accent-${kebab(reference.key)}` : `--hjm-accent-fill-${kebab(reference.key)}`;\n return reference.alpha === undefined || reference.alpha === 1\n ? `var(${name})`\n : `color-mix(in srgb, var(${name}) ${Math.round(reference.alpha * 100)}%, transparent)`;\n}\n\n/** Live period and \"my team\" row reuse the shared selected-row tint. */\nconst familyStyle = { \"--hjm-table-family-selected\": tableCssColor(dataTableRecipe.row.selectedBackground) } as CSSProperties;\nconst withFamilyStyle = (layoutStyle: HjmCompositionStyleProp | undefined) => ({ ...familyStyle, ...layoutStyle }) as CSSProperties;\n\nexport type TableHeatColors = Readonly<{ high: string; low: string }>;\n\n/**\n * Cell emphasis as inline style. Heat paints a background *image* so pinned cells keep their opaque\n * canvas color underneath and scrolled content never shows through the translucent tint.\n */\nexport function tableCellEmphasis(\n decoration: Readonly<{ tone?: DataTableCellTone | null; heat?: DataTableCellHeat | null }> | null | undefined,\n heatColors?: TableHeatColors,\n): Readonly<{ style: CSSProperties; tone?: DataTableCellTone; heat?: string }> {\n if (!decoration) return { style: {} };\n const style: Record<string, string | number> = {};\n const tone = decoration.tone ?? undefined, heat = decoration.heat ?? null;\n if (tone) {\n style.color = tableCssColor(dataTableFamilyRecipe.tone[tone].color);\n style.fontWeight = dataTableFamilyRecipe.tone[tone].fontWeight;\n }\n if (heat) {\n const base = heatColors?.[heat.side] ?? tableCssColor(dataTableFamilyRecipe.heat[heat.side]);\n style[\"--hjm-data-table-heat\"] = `color-mix(in srgb, ${base} ${Math.round(dataTableFamilyRecipe.heatAlpha[heat.strength] * 100)}%, transparent)`;\n }\n return { style: style as CSSProperties, ...(tone ? { tone } : {}), ...(heat ? { heat: `${heat.side}-${heat.strength}` } : {}) };\n}\n\n/* ---------------------------------------------- Line score ------------------------------------- */\n\nexport type LineScoreProps = Readonly<{\n teams: readonly LineScoreTeam[];\n /** Total column headers in order, e.g. [\"R\", \"H\", \"E\", \"B\"]. The first one decides the leader. */\n totals: readonly string[];\n /** Live period (1-based) to highlight. */\n currentPeriod?: number | null;\n minPeriods?: number;\n /** Optional leading content per team (logo/badge). */\n renderTeam?: (team: LineScoreTeam) => ReactNode;\n /** Accessible name of the table (prop name kept for Native parity). */\n accessibilityLabel: string;\n className?: string;\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport function LineScore({ teams, totals, currentPeriod = null, minPeriods, renderTeam, accessibilityLabel, className, layoutStyle }: LineScoreProps) {\n const score = resolveLineScore(teams, { totals, currentPeriod, ...(minPeriods !== undefined ? { minPeriods } : {}) });\n const periods = score.columns.filter((column) => column.kind === \"period\");\n const totalColumns = score.columns.filter((column) => column.kind === \"total\");\n return (\n <div className={classNames(\"hjm-table-family\", \"hjm-line-score\", className)} style={withFamilyStyle(layoutStyle)}>\n <table className=\"hjm-line-score__table\" aria-label={accessibilityLabel}>\n <thead>\n <tr>\n <td className=\"hjm-line-score__team\" />\n {periods.map((column, index) => {\n const live = score.currentPeriod === index + 1;\n return <th key={column.id} scope=\"col\" className=\"hjm-line-score__period\" aria-current={live ? \"true\" : undefined} data-current={live || undefined}>{column.header}</th>;\n })}\n {totalColumns.map((column, index) => (\n <th key={column.id} scope=\"col\" className={classNames(\"hjm-line-score__total\", index === 0 && \"hjm-line-score__total-edge\")}>{column.header}</th>\n ))}\n </tr>\n </thead>\n <tbody>\n {teams.map((team) => (\n <tr key={team.id} data-leader={score.leaderId === team.id || undefined}>\n <th scope=\"row\" className=\"hjm-line-score__team\">\n <span className=\"hjm-line-score__team-content\">{renderTeam?.(team)}<span>{team.name}</span></span>\n </th>\n {periods.map((column, index) => {\n const value = team.periods[index];\n return <td key={column.id} className=\"hjm-line-score__period\" data-current={score.currentPeriod === index + 1 || undefined} data-scored={typeof value === \"number\" && value > 0 || undefined}>{formatLineScoreCell(value)}</td>;\n })}\n {totalColumns.map((column, index) => (\n <td key={column.id} className={classNames(\"hjm-line-score__total\", index === 0 && \"hjm-line-score__total-edge\")}>{team.totals[column.header] ?? \"—\"}</td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n}\n\n/* ---------------------------------------------- Matrix table ----------------------------------- */\n\nexport type MatrixTableProps<Key extends string = string> = Readonly<{\n ids: readonly Key[];\n /** Short header per id (team short name). */\n labelOf: (id: Key) => string;\n getCell: (row: Key, column: Key) => MatrixCell | null;\n /** Row id to highlight (my team). */\n highlightId?: Key | null;\n heatColors?: TableHeatColors;\n accessibilityLabel: string;\n className?: string;\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport function MatrixTable<Key extends string = string>({ ids, labelOf, getCell, highlightId = null, heatColors, accessibilityLabel, className, layoutStyle }: MatrixTableProps<Key>) {\n const matrix = resolveMatrix(ids, getCell);\n return (\n <div className={classNames(\"hjm-table-family\", \"hjm-matrix-table\", className)} style={withFamilyStyle(layoutStyle)}>\n <table className=\"hjm-matrix-table__table\" aria-label={accessibilityLabel}>\n <thead>\n <tr>\n <td className=\"hjm-matrix-table__corner\" />\n {ids.map((id) => <th key={id} scope=\"col\">{labelOf(id)}</th>)}\n </tr>\n </thead>\n <tbody>\n {matrix.map((cells, rowIndex) => {\n const rowId = ids[rowIndex]!;\n return (\n <tr key={rowId} data-highlighted={rowId === highlightId || undefined}>\n <th scope=\"row\">{labelOf(rowId)}</th>\n {cells.map((cell, columnIndex) => {\n // The diagonal is a team against itself: blank and hidden, not \"no record\".\n if (cell === \"self\") return <td key={ids[columnIndex]} className=\"hjm-matrix-table__self\" aria-hidden=\"true\" />;\n const emphasis = tableCellEmphasis(cell, heatColors);\n return <td key={ids[columnIndex]} className={emphasis.heat ? \"hjm-table-family__heat\" : undefined} style={emphasis.style} data-tone={emphasis.tone} data-heat={emphasis.heat}>{cell?.label ?? \"—\"}</td>;\n })}\n </tr>\n );\n })}\n </tbody>\n </table>\n </div>\n );\n}\n\n/* ---------------------------------------------- Comparison table ------------------------------- */\n\nexport type ComparisonTableProps = Readonly<{\n rows: readonly ComparisonRow[];\n /** Side names and accent colors (team colors). */\n sides: readonly [Readonly<{ name: string; color: string }>, Readonly<{ name: string; color: string }>];\n /** Hide duplicate visual names when the two sides are already identified above; spoken row labels retain them. */\n showSideNames?: boolean;\n accessibilityLabel: string;\n className?: string;\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport function ComparisonTable({ rows, sides, showSideNames = true, accessibilityLabel, className, layoutStyle }: ComparisonTableProps) {\n return (\n <section className={classNames(\"hjm-table-family\", \"hjm-comparison-table\", className)} style={withFamilyStyle(layoutStyle)} aria-label={accessibilityLabel}>\n {showSideNames && <div className=\"hjm-comparison-table__sides\" aria-hidden=\"true\">\n {sides.map((side, index) => <span key={index} style={{ color: side.color }}>{side.name}</span>)}\n </div>}\n <ul className=\"hjm-comparison-table__rows\" role=\"list\">\n {rows.map((row) => {\n const { winner, shares } = resolveComparisonRow(row);\n const shown = row.display ?? [row.values[0] === null ? \"—\" : String(row.values[0]), row.values[1] === null ? \"—\" : String(row.values[1])];\n return (\n <li key={row.id} className=\"hjm-comparison-table__row\" data-winner={winner ?? undefined}>\n {/* One sentence for assistive tech; the visual grid and bars are decoration. */}\n <span className=\"hjm-visually-hidden\">{`${row.label} ${sides[0].name} ${shown[0]}, ${sides[1].name} ${shown[1]}`}</span>\n <div className=\"hjm-comparison-table__values\" aria-hidden=\"true\">\n <span data-win={winner === 0 || undefined}>{shown[0]}</span>\n <span className=\"hjm-comparison-table__label\">{row.label}</span>\n <span data-win={winner === 1 || undefined}>{shown[1]}</span>\n </div>\n <div className=\"hjm-comparison-table__bars\" aria-hidden=\"true\">\n {([0, 1] as const).map((index) => (\n <span key={index} className=\"hjm-comparison-table__track\" data-side={index}>\n <span\n className=\"hjm-comparison-table__bar\"\n style={{ inlineSize: `${Math.round(shares[index] * 1000) / 10}%`, background: sides[index].color, opacity: winner === null || winner === index ? 1 : 0.6 }}\n />\n </span>\n ))}\n </div>\n </li>\n );\n })}\n </ul>\n </section>\n );\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hjmds/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.0",
|
|
4
4
|
"description": "Accessible React 19 renderers for HJM design contracts.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -586,7 +586,7 @@
|
|
|
586
586
|
"THIRD_PARTY_NOTICES.md"
|
|
587
587
|
],
|
|
588
588
|
"peerDependencies": {
|
|
589
|
-
"@hjmds/design-contracts": ">=1.
|
|
589
|
+
"@hjmds/design-contracts": ">=1.23.0 <1.24.0",
|
|
590
590
|
"react": ">=19.0.0",
|
|
591
591
|
"react-dom": ">=19.0.0",
|
|
592
592
|
"@number-flow/react": "0.6.2",
|
|
@@ -623,7 +623,7 @@
|
|
|
623
623
|
"blobatar": "2.7.0",
|
|
624
624
|
"@blobatar/react": "2.7.0",
|
|
625
625
|
"lucide-react": "1.49.0",
|
|
626
|
-
"@hjmds/design-contracts": "1.
|
|
626
|
+
"@hjmds/design-contracts": "1.23.0"
|
|
627
627
|
},
|
|
628
628
|
"peerDependenciesMeta": {
|
|
629
629
|
"@number-flow/react": {
|