feat: add temporal context and contextual help

This commit is contained in:
2026-08-05 00:03:31 +02:00
parent 982ef636b8
commit add7a99f6d
43 changed files with 1878 additions and 167 deletions
+11 -2
View File
@@ -8,8 +8,9 @@ import {
registerDialog,
type DialogStackId
} from "./dialogStack";
import type { PlatformInterfaceIdentityProps } from "../types";
export type DialogProps = {
export type DialogProps = PlatformInterfaceIdentityProps & {
open: boolean;
title: ReactNode;
children: ReactNode;
@@ -56,7 +57,10 @@ export default function Dialog({
footerClassName = "",
portal = false,
panelStyle,
backdropStyle
backdropStyle,
interfaceId,
helpContextId,
helpTopicId
}: DialogProps) {
const titleId = useId();
const canClose = Boolean(onClose) && !closeDisabled;
@@ -134,6 +138,11 @@ export default function Dialog({
role={role}
aria-modal="true"
data-dialog-stack-state="topmost"
data-help-scope="dialog"
data-interface-id={interfaceId}
data-help-context-id={helpContextId}
data-help-topic-id={helpTopicId}
data-help-key={typeof title === "string" ? title : undefined}
aria-labelledby={titleId}
aria-describedby={ariaDescribedBy}
>