@activecollab/components 2.0.413 → 2.0.414
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/cjs/presentation/shared/MessageDialog.js +10 -6
- package/dist/cjs/presentation/shared/MessageDialog.js.map +1 -1
- package/dist/esm/presentation/shared/MessageDialog.d.ts.map +1 -1
- package/dist/esm/presentation/shared/MessageDialog.js +10 -6
- package/dist/esm/presentation/shared/MessageDialog.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,11 +14,11 @@ var _Icons = require("../../components/Icons");
|
|
|
14
14
|
var _InfoBox = require("../../components/InfoBox");
|
|
15
15
|
var _Media = require("../../components/Media");
|
|
16
16
|
var _Modal = require("../../components/Modal");
|
|
17
|
-
var _PortableText = require("../../components/PortableText");
|
|
18
17
|
var _Styles = require("../../components/PortableText/Styles");
|
|
19
18
|
var _Row = require("../../components/Row");
|
|
20
19
|
var _Stack = require("../../components/Stack");
|
|
21
20
|
var _Tiles = require("../../components/Tiles");
|
|
21
|
+
var _TitledText = require("../../components/TitledText");
|
|
22
22
|
var _Tooltip = require("../../components/Tooltip");
|
|
23
23
|
var _Typography = require("../../components/Typography");
|
|
24
24
|
var _Typography2 = require("../../components/Typography/Typography");
|
|
@@ -314,14 +314,18 @@ var ListItemBlock = function ListItemBlock(_ref16) {
|
|
|
314
314
|
}, children);
|
|
315
315
|
};
|
|
316
316
|
|
|
317
|
-
/*
|
|
318
|
-
|
|
319
|
-
|
|
317
|
+
/* Titled sections speak in the quiet Header2 subhead voice rather than the
|
|
318
|
+
engine's default Title2 for level 2, and keep a roomier rhythm between a
|
|
319
|
+
titled section's content nodes. */
|
|
320
320
|
var TitledTextBlock = function TitledTextBlock(_ref17) {
|
|
321
321
|
var block = _ref17.block,
|
|
322
322
|
children = _ref17.children;
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
var _ref18 = block,
|
|
324
|
+
title = _ref18.title,
|
|
325
|
+
level = _ref18.level;
|
|
326
|
+
return /*#__PURE__*/_react.default.createElement(_TitledText.TitledText, {
|
|
327
|
+
title: title,
|
|
328
|
+
variant: level === 1 ? "title1" : "header2"
|
|
325
329
|
}, children ? /*#__PURE__*/_react.default.createElement(_Stack.Stack, {
|
|
326
330
|
space: "sm"
|
|
327
331
|
}, children) : undefined);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageDialog.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_BreakPoints","_Button","_Columns","_IconButton","_Icons","_InfoBox","_Media","_Modal","_PortableText","_Styles","_Row","_Stack","_Tiles","_Tooltip","_Typography","_Typography2","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","length","l","Symbol","iterator","u","next","done","push","value","return","isArray","DIALOG_WIDTH","sm","md","lg","StyledFeedback","styled","div","withConfig","displayName","componentId","screenBelow","DialogFeedback","_ref","onVote","_useState","useState","_useState2","voted","setVoted","vote","useCallback","createElement","Body2","color","Fragment","className","Tooltip","title","IconButton","type","variant","onClick","ThumbUpOutlineIcon","StyledDialog","_ref2","$size","MessageDialog","exports","_ref3","open","onClose","_ref3$size","size","children","Modal","CancelCrossIcon","DocLinkContext","React","createContext","undefined","StyledInterfaceName","span","InterfaceNameMark","_ref4","StyledKeyboardKey","kbd","KeyboardKeyMark","_ref5","StyledDocLink","InlineLink","DocLinkMark","_ref6","mark","openArticle","useContext","href","event","preventDefault","article","CALLOUT_TYPE","info","note","success","CalloutObject","_ref7","_ref8","node","InfoBox","tone","showIcon","StyledButtonReference","ButtonReferenceObject","_ref9","_ref0","label","Button","tabIndex","RowObject","_ref1","_ref10","Row","space","TilesObject","_ref11","_ref12","Tiles","columns","collapseBelow","SplitObject","_ref13","_ref14","media","widths","textColumn","Stack","src","screenshot","mediaColumn","Media","alt","caption","Columns","reverse","alignY","ParagraphBlock","_ref15","lineHeight","ListItemBlock","_ref16","Typography","as","DefaultTitledText","portableTextDefaultBlockRenderers","TitledTextBlock","_ref17","block","messageComponents","marks","objects","callout","row","tiles","split","blocks","paragraph"],"sources":["../../../../src/presentation/shared/MessageDialog.tsx"],"sourcesContent":["import React, {\n ReactElement,\n ReactNode,\n useCallback,\n useContext,\n useState,\n} from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { screenBelow } from \"../../components/BreakPoints\";\nimport { Button } from \"../../components/Button\";\nimport { Columns } from \"../../components/Columns\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { CancelCrossIcon, ThumbUpOutlineIcon } from \"../../components/Icons\";\nimport { InfoBox, InfoBoxType } from \"../../components/InfoBox\";\nimport { Space } from \"../../components/LayoutTokens\";\nimport { Media } from \"../../components/Media\";\nimport { Modal } from \"../../components/Modal\";\nimport {\n portableTextDefaultBlockRenderers,\n PortableTextBlockRenderer,\n PortableTextComponents,\n PortableTextMarkRenderer,\n PortableTextMediaVariant,\n PortableTextObjectRenderer,\n} from \"../../components/PortableText\";\nimport { StyledLink as InlineLink } from \"../../components/PortableText/Styles\";\nimport { Row } from \"../../components/Row\";\nimport { Stack } from \"../../components/Stack\";\nimport { Tiles } from \"../../components/Tiles\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Body2 } from \"../../components/Typography\";\nimport { Typography } from \"../../components/Typography/Typography\";\n\n/**\n * The in-app message dialog, as a Presentation mock.\n *\n * Two pieces, mirroring how the product is split:\n *\n * - {@link MessageDialog} — the hollow dialog shell (width, closing,\n * feedback), built only from design-system parts. In the product this shell\n * lives in the application as `InAppMessageDialog`.\n * - {@link messageComponents} — a demo message element catalog injected into\n * the design-system Portable Text engine, exactly like the typed cards\n * injected into the hollow StackedCard shell. In the product the catalog is\n * application code; the presentation ships this demo copy so the stories\n * need no app imports.\n */\n\n/* ---- the dialog shell ---------------------------------------------- */\n\nexport type MessageDialogSize = \"sm\" | \"md\" | \"lg\";\n\nconst DIALOG_WIDTH: Record<MessageDialogSize, string> = {\n sm: \"520px\",\n md: \"720px\",\n lg: \"880px\",\n};\n\n/* Feedback — the thumbs up / down slot. Down-vote reuses the up icon,\n rotated (the DS set only ships ThumbUpOutlineIcon). */\nconst StyledFeedback = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 8px 24px 28px;\n\n ${screenBelow.sm} {\n padding: 4px 24px 24px;\n }\n\n .fb-question {\n margin-right: 4px;\n }\n\n .fb-btn svg {\n width: 18px;\n height: 18px;\n }\n\n .fb-down svg {\n transform: rotate(180deg);\n }\n`;\n\nconst DialogFeedback = ({\n onVote,\n}: {\n onVote?: (vote: \"up\" | \"down\") => void;\n}): ReactElement => {\n const [voted, setVoted] = useState<\"up\" | \"down\" | null>(null);\n const vote = useCallback(\n (value: \"up\" | \"down\") => {\n setVoted(value);\n onVote?.(value);\n },\n [onVote]\n );\n\n return (\n <StyledFeedback>\n {voted ? (\n <Body2 color=\"secondary\">Thanks for your feedback!</Body2>\n ) : (\n <>\n <Body2 color=\"secondary\" className=\"fb-question\">\n Was this helpful?\n </Body2>\n <Tooltip title=\"Yes, helpful\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n className=\"fb-btn\"\n aria-label=\"Yes, helpful\"\n onClick={() => vote(\"up\")}\n >\n <ThumbUpOutlineIcon />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"No, not helpful\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n className=\"fb-btn fb-down\"\n aria-label=\"No, not helpful\"\n onClick={() => vote(\"down\")}\n >\n <ThumbUpOutlineIcon />\n </IconButton>\n </Tooltip>\n </>\n )}\n </StyledFeedback>\n );\n};\n\n/* The shell is behaviour only: it sizes itself, closes on click-outside /\n Esc (DS Modal) / the X, and shows the feedback slot when an onVote handler\n is supplied. Content is whatever the caller renders as children — usually\n the Portable Text engine with the demo catalog injected. */\nconst StyledDialog = styled.div<{ $size: MessageDialogSize }>`\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n width: calc(100% - 32px);\n max-width: ${({ $size }) => DIALOG_WIDTH[$size]};\n max-height: calc(100vh - 96px);\n margin: 56px auto 40px;\n overflow-y: auto;\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n border-radius: 12px;\n box-shadow: var(--shadow-primary);\n\n ${screenBelow.sm} {\n margin: 16px auto;\n }\n\n /* X floats in the corner and overlaps the content padding — it does not\n reserve a row of its own. */\n .dlg-close {\n position: absolute;\n top: 12px;\n right: 12px;\n z-index: 2;\n }\n\n .dlg-content {\n padding: 40px;\n }\n\n ${screenBelow.sm} {\n .dlg-content {\n padding: 32px 20px 24px;\n }\n }\n`;\n\nexport interface MessageDialogProps {\n open: boolean;\n onClose: () => void;\n size?: MessageDialogSize;\n /** Supplying a handler shows the centred helpful / not-helpful vote. */\n onVote?: (vote: \"up\" | \"down\") => void;\n children: ReactNode;\n}\n\nexport const MessageDialog = ({\n open,\n onClose,\n size = \"md\",\n onVote,\n children,\n}: MessageDialogProps): ReactElement => (\n <Modal open={open} onClose={onClose}>\n <StyledDialog $size={size}>\n <div className=\"dlg-close\">\n <Tooltip title=\"Close\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n aria-label=\"Close\"\n onClick={onClose}\n >\n <CancelCrossIcon />\n </IconButton>\n </Tooltip>\n </div>\n <div className=\"dlg-content\">{children}</div>\n {onVote ? <DialogFeedback onVote={onVote} /> : null}\n </StyledDialog>\n </Modal>\n);\n\n/* ---- doc-link wiring ------------------------------------------------ */\n\n/** How a doc-link mark opens its article (by a slug-like reference). The\n surface that renders the message supplies the handler — in the product it\n closes the dialog and opens the article Sheet. */\nexport type OpenArticleHandler = (article?: string) => void;\n\nexport const DocLinkContext = React.createContext<OpenArticleHandler>(\n () => undefined\n);\n\n/* ---- the demo message element catalog ------------------------------- */\n\n/* Inline marks ------------------------------------------------------- */\n\n/* interface-name — the name of an interface element, e.g. the Security page. */\nconst StyledInterfaceName = styled.span`\n padding: 0 4px;\n border-radius: 4px;\n background-color: var(--color-theme-300);\n color: var(--color-theme-900);\n font-weight: 600;\n white-space: nowrap;\n`;\nconst InterfaceNameMark: PortableTextMarkRenderer = ({ children }) => (\n <StyledInterfaceName>{children}</StyledInterfaceName>\n);\n\n/* keyboard-key — a keyboard key cap. */\nconst StyledKeyboardKey = styled.kbd`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 20px;\n height: 20px;\n padding: 0 6px;\n border: 1px solid var(--border-primary);\n border-bottom-width: 2px;\n border-radius: 5px;\n background-color: var(--color-theme-200);\n color: var(--color-theme-900);\n font-family: ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace;\n font-size: 11px;\n font-weight: 600;\n line-height: 1;\n vertical-align: baseline;\n`;\nconst KeyboardKeyMark: PortableTextMarkRenderer = ({ children }) => (\n <StyledKeyboardKey>{children}</StyledKeyboardKey>\n);\n\n/* doc-link — an inline link that opens a full help article. The mark carries\n an article reference; the open behaviour comes from DocLinkContext, so the\n authored content stays declarative. */\n/* Built on the engine's inline anchor so a doc-link sits in the sentence\n exactly like a default link mark — same size, weight and line box as the\n surrounding copy — just recoloured. */\nconst StyledDocLink = styled(InlineLink)`\n color: var(--color-secondary);\n text-decoration-color: var(--color-secondary);\n`;\nconst DocLinkMark: PortableTextMarkRenderer = ({ mark, children }) => {\n const openArticle = useContext(DocLinkContext);\n return (\n <StyledDocLink\n href=\"#\"\n onClick={(event: React.MouseEvent) => {\n event.preventDefault();\n openArticle(mark?.article as string | undefined);\n }}\n >\n {children}\n </StyledDocLink>\n );\n};\n\n/* Component objects --------------------------------------------------- */\n\n/* callout — rendered with the DS InfoBox; the catalog keeps its own tone\n vocabulary and maps it to InfoBox types. */\ntype CalloutTone = \"info\" | \"note\" | \"success\";\nconst CALLOUT_TYPE: Record<CalloutTone, InfoBoxType> = {\n info: \"default\",\n note: \"note\",\n success: \"success\",\n};\nconst CalloutObject: PortableTextObjectRenderer = ({ node, children }) => (\n <InfoBox\n type={CALLOUT_TYPE[(node.tone as CalloutTone | undefined) ?? \"info\"]}\n title={node.title as string | undefined}\n showIcon\n >\n {children}\n </InfoBox>\n);\n\n/* button-reference — a real DS Button shown for reference as its own block,\n so a message can point at a button instead of screenshotting it. It is\n intentionally non-interactive. */\nconst StyledButtonReference = styled.div`\n display: flex;\n\n .c-button {\n pointer-events: none;\n }\n`;\ntype ButtonReferenceVariant =\n | \"primary\"\n | \"secondary\"\n | \"text colored\"\n | \"text gray\";\nconst ButtonReferenceObject: PortableTextObjectRenderer = ({ node }) => {\n if (typeof node.label !== \"string\") {\n return null;\n }\n\n return (\n <StyledButtonReference aria-hidden=\"true\">\n <Button\n variant={\n (node.variant as ButtonReferenceVariant | undefined) ?? \"primary\"\n }\n size=\"small\"\n type=\"button\"\n tabIndex={-1}\n >\n {node.label}\n </Button>\n </StyledButtonReference>\n );\n};\n\n/* row — a horizontal run of blocks (e.g. two button references). */\nconst RowObject: PortableTextObjectRenderer = ({ node, children }) => (\n <Row space={(node.space as Space | undefined) ?? \"sm\"}>{children}</Row>\n);\n\n/* tiles — an equal-size mosaic of blocks. */\nconst TilesObject: PortableTextObjectRenderer = ({ node, children }) => (\n <Tiles\n columns={(node.columns as number | undefined) ?? 3}\n space=\"md\"\n collapseBelow=\"sm\"\n >\n {children}\n </Tiles>\n);\n\n/* split — text beside media, with the one layout rule the messages follow:\n screenshots sit on the right, flat illustrations on the left. `widths` is\n authored as [text, media] and reordered with the columns. */\ninterface SplitMedia {\n src: string;\n alt?: string;\n variant?: PortableTextMediaVariant;\n caption?: string;\n}\nconst SplitObject: PortableTextObjectRenderer = ({ node, children }) => {\n const media = node.media as SplitMedia | undefined;\n const widths = (node.widths as number[] | undefined) ?? [1, 1];\n const textColumn = <Stack space=\"lg\">{children}</Stack>;\n\n // A split without media degrades to its text column instead of crashing.\n if (!media?.src) {\n return textColumn;\n }\n\n const screenshot = media.variant === \"screenshot\";\n\n const mediaColumn = (\n <Media\n src={media.src}\n alt={media.alt}\n variant={media.variant}\n caption={media.caption}\n />\n );\n\n return (\n <Columns\n widths={screenshot ? widths : [...widths].reverse()}\n space=\"xl\"\n alignY=\"center\"\n collapseBelow=\"md\"\n >\n {screenshot ? textColumn : mediaColumn}\n {screenshot ? mediaColumn : textColumn}\n </Columns>\n );\n};\n\n/* Default-block overrides --------------------------------------------- */\n\n/* The engine's defaults use Body 1 primary; the messages are designed on the\n quieter Body 2 secondary voice, so the catalog overrides the text blocks —\n demonstrating the `blocks` half of the injection contract. */\nconst ParagraphBlock: PortableTextBlockRenderer = ({ children }) => (\n <Body2 color=\"secondary\" lineHeight=\"loose\">\n {children}\n </Body2>\n);\n\nconst ListItemBlock: PortableTextBlockRenderer = ({ children }) => (\n <Typography variant=\"Body 2\" as=\"li\" color=\"secondary\" lineHeight=\"loose\">\n {children}\n </Typography>\n);\n\n/* Only the delta from the default renderer: the messages want a roomier\n rhythm between a titled section's content nodes. */\nconst DefaultTitledText = portableTextDefaultBlockRenderers[\"titled-text\"];\nconst TitledTextBlock: PortableTextBlockRenderer = ({ block, children }) => (\n <DefaultTitledText block={block}>\n {children ? <Stack space=\"sm\">{children}</Stack> : undefined}\n </DefaultTitledText>\n);\n\n/** The demo catalog the presentations inject into the Portable Text engine —\n the stand-in for the application's `messageComponents` map. */\nexport const messageComponents: PortableTextComponents = {\n marks: {\n \"interface-name\": InterfaceNameMark,\n \"keyboard-key\": KeyboardKeyMark,\n \"doc-link\": DocLinkMark,\n },\n objects: {\n callout: CalloutObject,\n \"button-reference\": ButtonReferenceObject,\n row: RowObject,\n tiles: TilesObject,\n split: SplitObject,\n },\n blocks: {\n paragraph: ParagraphBlock,\n \"list-item\": ListItemBlock,\n \"titled-text\": TitledTextBlock,\n },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAQA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OA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A,CAAAuB,OAAA,CAAAiE,aAAA,CAACpE,YAAA,CAAAsK,UAAU;IAACzF,OAAO,EAAC,QAAQ;IAAC0F,EAAE,EAAC,IAAI;IAACjG,KAAK,EAAC,WAAW;IAAC6F,UAAU,EAAC;EAAO,GACtEzE,QACS,CAAC;AAAA,CACd;;AAED;AACA;AACA,IAAM8E,iBAAiB,GAAGC,+CAAiC,CAAC,aAAa,CAAC;AAC1E,IAAMC,eAA0C,GAAG,SAA7CA,eAA0CA,CAAAC,MAAA;EAAA,IAAMC,KAAK,GAAAD,MAAA,CAALC,KAAK;IAAElF,QAAQ,GAAAiF,MAAA,CAARjF,QAAQ;EAAA,oBACnE9G,MAAA,CAAAuB,OAAA,CAAAiE,aAAA,CAACoG,iBAAiB;IAACI,KAAK,EAAEA;EAAM,GAC7BlF,QAAQ,gBAAG9G,MAAA,CAAAuB,OAAA,CAAAiE,aAAA,CAACxE,MAAA,CAAA2J,KAAK;IAACb,KAAK,EAAC;EAAI,GAAEhD,QAAgB,CAAC,GAAGM,SAClC,CAAC;AAAA,CACrB;;AAED;AACA;AACO,IAAM6E,iBAAyC,GAAAzF,OAAA,CAAAyF,iBAAA,GAAG;EACvDC,KAAK,EAAE;IACL,gBAAgB,EAAE3E,iBAAiB;IACnC,cAAc,EAAEI,eAAe;IAC/B,UAAU,EAAEI;EACd,CAAC;EACDoE,OAAO,EAAE;IACPC,OAAO,EAAExD,aAAa;IACtB,kBAAkB,EAAEQ,qBAAqB;IACzCiD,GAAG,EAAE3C,SAAS;IACd4C,KAAK,EAAEvC,WAAW;IAClBwC,KAAK,EAAElC;EACT,CAAC;EACDmC,MAAM,EAAE;IACNC,SAAS,EAAEpB,cAAc;IACzB,WAAW,EAAEG,aAAa;IAC1B,aAAa,EAAEM;EACjB;AACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"MessageDialog.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_BreakPoints","_Button","_Columns","_IconButton","_Icons","_InfoBox","_Media","_Modal","_Styles","_Row","_Stack","_Tiles","_TitledText","_Tooltip","_Typography","_Typography2","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","length","l","Symbol","iterator","u","next","done","push","value","return","isArray","DIALOG_WIDTH","sm","md","lg","StyledFeedback","styled","div","withConfig","displayName","componentId","screenBelow","DialogFeedback","_ref","onVote","_useState","useState","_useState2","voted","setVoted","vote","useCallback","createElement","Body2","color","Fragment","className","Tooltip","title","IconButton","type","variant","onClick","ThumbUpOutlineIcon","StyledDialog","_ref2","$size","MessageDialog","exports","_ref3","open","onClose","_ref3$size","size","children","Modal","CancelCrossIcon","DocLinkContext","React","createContext","undefined","StyledInterfaceName","span","InterfaceNameMark","_ref4","StyledKeyboardKey","kbd","KeyboardKeyMark","_ref5","StyledDocLink","InlineLink","DocLinkMark","_ref6","mark","openArticle","useContext","href","event","preventDefault","article","CALLOUT_TYPE","info","note","success","CalloutObject","_ref7","_ref8","node","InfoBox","tone","showIcon","StyledButtonReference","ButtonReferenceObject","_ref9","_ref0","label","Button","tabIndex","RowObject","_ref1","_ref10","Row","space","TilesObject","_ref11","_ref12","Tiles","columns","collapseBelow","SplitObject","_ref13","_ref14","media","widths","textColumn","Stack","src","screenshot","mediaColumn","Media","alt","caption","Columns","reverse","alignY","ParagraphBlock","_ref15","lineHeight","ListItemBlock","_ref16","Typography","as","TitledTextBlock","_ref17","block","_ref18","level","TitledText","messageComponents","marks","objects","callout","row","tiles","split","blocks","paragraph"],"sources":["../../../../src/presentation/shared/MessageDialog.tsx"],"sourcesContent":["import React, {\n ReactElement,\n ReactNode,\n useCallback,\n useContext,\n useState,\n} from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { screenBelow } from \"../../components/BreakPoints\";\nimport { Button } from \"../../components/Button\";\nimport { Columns } from \"../../components/Columns\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { CancelCrossIcon, ThumbUpOutlineIcon } from \"../../components/Icons\";\nimport { InfoBox, InfoBoxType } from \"../../components/InfoBox\";\nimport { Space } from \"../../components/LayoutTokens\";\nimport { Media } from \"../../components/Media\";\nimport { Modal } from \"../../components/Modal\";\nimport {\n PortableTextBlockRenderer,\n PortableTextComponents,\n PortableTextMarkRenderer,\n PortableTextMediaVariant,\n PortableTextObjectRenderer,\n PortableTextTitledTextBlock,\n} from \"../../components/PortableText\";\nimport { StyledLink as InlineLink } from \"../../components/PortableText/Styles\";\nimport { Row } from \"../../components/Row\";\nimport { Stack } from \"../../components/Stack\";\nimport { Tiles } from \"../../components/Tiles\";\nimport { TitledText } from \"../../components/TitledText\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Body2 } from \"../../components/Typography\";\nimport { Typography } from \"../../components/Typography/Typography\";\n\n/**\n * The in-app message dialog, as a Presentation mock.\n *\n * Two pieces, mirroring how the product is split:\n *\n * - {@link MessageDialog} — the hollow dialog shell (width, closing,\n * feedback), built only from design-system parts. In the product this shell\n * lives in the application as `InAppMessageDialog`.\n * - {@link messageComponents} — a demo message element catalog injected into\n * the design-system Portable Text engine, exactly like the typed cards\n * injected into the hollow StackedCard shell. In the product the catalog is\n * application code; the presentation ships this demo copy so the stories\n * need no app imports.\n */\n\n/* ---- the dialog shell ---------------------------------------------- */\n\nexport type MessageDialogSize = \"sm\" | \"md\" | \"lg\";\n\nconst DIALOG_WIDTH: Record<MessageDialogSize, string> = {\n sm: \"520px\",\n md: \"720px\",\n lg: \"880px\",\n};\n\n/* Feedback — the thumbs up / down slot. Down-vote reuses the up icon,\n rotated (the DS set only ships ThumbUpOutlineIcon). */\nconst StyledFeedback = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 8px 24px 28px;\n\n ${screenBelow.sm} {\n padding: 4px 24px 24px;\n }\n\n .fb-question {\n margin-right: 4px;\n }\n\n .fb-btn svg {\n width: 18px;\n height: 18px;\n }\n\n .fb-down svg {\n transform: rotate(180deg);\n }\n`;\n\nconst DialogFeedback = ({\n onVote,\n}: {\n onVote?: (vote: \"up\" | \"down\") => void;\n}): ReactElement => {\n const [voted, setVoted] = useState<\"up\" | \"down\" | null>(null);\n const vote = useCallback(\n (value: \"up\" | \"down\") => {\n setVoted(value);\n onVote?.(value);\n },\n [onVote]\n );\n\n return (\n <StyledFeedback>\n {voted ? (\n <Body2 color=\"secondary\">Thanks for your feedback!</Body2>\n ) : (\n <>\n <Body2 color=\"secondary\" className=\"fb-question\">\n Was this helpful?\n </Body2>\n <Tooltip title=\"Yes, helpful\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n className=\"fb-btn\"\n aria-label=\"Yes, helpful\"\n onClick={() => vote(\"up\")}\n >\n <ThumbUpOutlineIcon />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"No, not helpful\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n className=\"fb-btn fb-down\"\n aria-label=\"No, not helpful\"\n onClick={() => vote(\"down\")}\n >\n <ThumbUpOutlineIcon />\n </IconButton>\n </Tooltip>\n </>\n )}\n </StyledFeedback>\n );\n};\n\n/* The shell is behaviour only: it sizes itself, closes on click-outside /\n Esc (DS Modal) / the X, and shows the feedback slot when an onVote handler\n is supplied. Content is whatever the caller renders as children — usually\n the Portable Text engine with the demo catalog injected. */\nconst StyledDialog = styled.div<{ $size: MessageDialogSize }>`\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n width: calc(100% - 32px);\n max-width: ${({ $size }) => DIALOG_WIDTH[$size]};\n max-height: calc(100vh - 96px);\n margin: 56px auto 40px;\n overflow-y: auto;\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n border-radius: 12px;\n box-shadow: var(--shadow-primary);\n\n ${screenBelow.sm} {\n margin: 16px auto;\n }\n\n /* X floats in the corner and overlaps the content padding — it does not\n reserve a row of its own. */\n .dlg-close {\n position: absolute;\n top: 12px;\n right: 12px;\n z-index: 2;\n }\n\n .dlg-content {\n padding: 40px;\n }\n\n ${screenBelow.sm} {\n .dlg-content {\n padding: 32px 20px 24px;\n }\n }\n`;\n\nexport interface MessageDialogProps {\n open: boolean;\n onClose: () => void;\n size?: MessageDialogSize;\n /** Supplying a handler shows the centred helpful / not-helpful vote. */\n onVote?: (vote: \"up\" | \"down\") => void;\n children: ReactNode;\n}\n\nexport const MessageDialog = ({\n open,\n onClose,\n size = \"md\",\n onVote,\n children,\n}: MessageDialogProps): ReactElement => (\n <Modal open={open} onClose={onClose}>\n <StyledDialog $size={size}>\n <div className=\"dlg-close\">\n <Tooltip title=\"Close\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n aria-label=\"Close\"\n onClick={onClose}\n >\n <CancelCrossIcon />\n </IconButton>\n </Tooltip>\n </div>\n <div className=\"dlg-content\">{children}</div>\n {onVote ? <DialogFeedback onVote={onVote} /> : null}\n </StyledDialog>\n </Modal>\n);\n\n/* ---- doc-link wiring ------------------------------------------------ */\n\n/** How a doc-link mark opens its article (by a slug-like reference). The\n surface that renders the message supplies the handler — in the product it\n closes the dialog and opens the article Sheet. */\nexport type OpenArticleHandler = (article?: string) => void;\n\nexport const DocLinkContext = React.createContext<OpenArticleHandler>(\n () => undefined\n);\n\n/* ---- the demo message element catalog ------------------------------- */\n\n/* Inline marks ------------------------------------------------------- */\n\n/* interface-name — the name of an interface element, e.g. the Security page. */\nconst StyledInterfaceName = styled.span`\n padding: 0 4px;\n border-radius: 4px;\n background-color: var(--color-theme-300);\n color: var(--color-theme-900);\n font-weight: 600;\n white-space: nowrap;\n`;\nconst InterfaceNameMark: PortableTextMarkRenderer = ({ children }) => (\n <StyledInterfaceName>{children}</StyledInterfaceName>\n);\n\n/* keyboard-key — a keyboard key cap. */\nconst StyledKeyboardKey = styled.kbd`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 20px;\n height: 20px;\n padding: 0 6px;\n border: 1px solid var(--border-primary);\n border-bottom-width: 2px;\n border-radius: 5px;\n background-color: var(--color-theme-200);\n color: var(--color-theme-900);\n font-family: ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace;\n font-size: 11px;\n font-weight: 600;\n line-height: 1;\n vertical-align: baseline;\n`;\nconst KeyboardKeyMark: PortableTextMarkRenderer = ({ children }) => (\n <StyledKeyboardKey>{children}</StyledKeyboardKey>\n);\n\n/* doc-link — an inline link that opens a full help article. The mark carries\n an article reference; the open behaviour comes from DocLinkContext, so the\n authored content stays declarative. */\n/* Built on the engine's inline anchor so a doc-link sits in the sentence\n exactly like a default link mark — same size, weight and line box as the\n surrounding copy — just recoloured. */\nconst StyledDocLink = styled(InlineLink)`\n color: var(--color-secondary);\n text-decoration-color: var(--color-secondary);\n`;\nconst DocLinkMark: PortableTextMarkRenderer = ({ mark, children }) => {\n const openArticle = useContext(DocLinkContext);\n return (\n <StyledDocLink\n href=\"#\"\n onClick={(event: React.MouseEvent) => {\n event.preventDefault();\n openArticle(mark?.article as string | undefined);\n }}\n >\n {children}\n </StyledDocLink>\n );\n};\n\n/* Component objects --------------------------------------------------- */\n\n/* callout — rendered with the DS InfoBox; the catalog keeps its own tone\n vocabulary and maps it to InfoBox types. */\ntype CalloutTone = \"info\" | \"note\" | \"success\";\nconst CALLOUT_TYPE: Record<CalloutTone, InfoBoxType> = {\n info: \"default\",\n note: \"note\",\n success: \"success\",\n};\nconst CalloutObject: PortableTextObjectRenderer = ({ node, children }) => (\n <InfoBox\n type={CALLOUT_TYPE[(node.tone as CalloutTone | undefined) ?? \"info\"]}\n title={node.title as string | undefined}\n showIcon\n >\n {children}\n </InfoBox>\n);\n\n/* button-reference — a real DS Button shown for reference as its own block,\n so a message can point at a button instead of screenshotting it. It is\n intentionally non-interactive. */\nconst StyledButtonReference = styled.div`\n display: flex;\n\n .c-button {\n pointer-events: none;\n }\n`;\ntype ButtonReferenceVariant =\n | \"primary\"\n | \"secondary\"\n | \"text colored\"\n | \"text gray\";\nconst ButtonReferenceObject: PortableTextObjectRenderer = ({ node }) => {\n if (typeof node.label !== \"string\") {\n return null;\n }\n\n return (\n <StyledButtonReference aria-hidden=\"true\">\n <Button\n variant={\n (node.variant as ButtonReferenceVariant | undefined) ?? \"primary\"\n }\n size=\"small\"\n type=\"button\"\n tabIndex={-1}\n >\n {node.label}\n </Button>\n </StyledButtonReference>\n );\n};\n\n/* row — a horizontal run of blocks (e.g. two button references). */\nconst RowObject: PortableTextObjectRenderer = ({ node, children }) => (\n <Row space={(node.space as Space | undefined) ?? \"sm\"}>{children}</Row>\n);\n\n/* tiles — an equal-size mosaic of blocks. */\nconst TilesObject: PortableTextObjectRenderer = ({ node, children }) => (\n <Tiles\n columns={(node.columns as number | undefined) ?? 3}\n space=\"md\"\n collapseBelow=\"sm\"\n >\n {children}\n </Tiles>\n);\n\n/* split — text beside media, with the one layout rule the messages follow:\n screenshots sit on the right, flat illustrations on the left. `widths` is\n authored as [text, media] and reordered with the columns. */\ninterface SplitMedia {\n src: string;\n alt?: string;\n variant?: PortableTextMediaVariant;\n caption?: string;\n}\nconst SplitObject: PortableTextObjectRenderer = ({ node, children }) => {\n const media = node.media as SplitMedia | undefined;\n const widths = (node.widths as number[] | undefined) ?? [1, 1];\n const textColumn = <Stack space=\"lg\">{children}</Stack>;\n\n // A split without media degrades to its text column instead of crashing.\n if (!media?.src) {\n return textColumn;\n }\n\n const screenshot = media.variant === \"screenshot\";\n\n const mediaColumn = (\n <Media\n src={media.src}\n alt={media.alt}\n variant={media.variant}\n caption={media.caption}\n />\n );\n\n return (\n <Columns\n widths={screenshot ? widths : [...widths].reverse()}\n space=\"xl\"\n alignY=\"center\"\n collapseBelow=\"md\"\n >\n {screenshot ? textColumn : mediaColumn}\n {screenshot ? mediaColumn : textColumn}\n </Columns>\n );\n};\n\n/* Default-block overrides --------------------------------------------- */\n\n/* The engine's defaults use Body 1 primary; the messages are designed on the\n quieter Body 2 secondary voice, so the catalog overrides the text blocks —\n demonstrating the `blocks` half of the injection contract. */\nconst ParagraphBlock: PortableTextBlockRenderer = ({ children }) => (\n <Body2 color=\"secondary\" lineHeight=\"loose\">\n {children}\n </Body2>\n);\n\nconst ListItemBlock: PortableTextBlockRenderer = ({ children }) => (\n <Typography variant=\"Body 2\" as=\"li\" color=\"secondary\" lineHeight=\"loose\">\n {children}\n </Typography>\n);\n\n/* Titled sections speak in the quiet Header2 subhead voice rather than the\n engine's default Title2 for level 2, and keep a roomier rhythm between a\n titled section's content nodes. */\nconst TitledTextBlock: PortableTextBlockRenderer = ({ block, children }) => {\n const { title, level } = block as PortableTextTitledTextBlock;\n\n return (\n <TitledText title={title} variant={level === 1 ? \"title1\" : \"header2\"}>\n {children ? <Stack space=\"sm\">{children}</Stack> : undefined}\n </TitledText>\n );\n};\n\n/** The demo catalog the presentations inject into the Portable Text engine —\n the stand-in for the application's `messageComponents` map. */\nexport const messageComponents: PortableTextComponents = {\n marks: {\n \"interface-name\": InterfaceNameMark,\n \"keyboard-key\": KeyboardKeyMark,\n \"doc-link\": DocLinkMark,\n },\n objects: {\n callout: CalloutObject,\n \"button-reference\": ButtonReferenceObject,\n row: RowObject,\n tiles: TilesObject,\n split: SplitObject,\n },\n blocks: {\n paragraph: ParagraphBlock,\n \"list-item\": ListItemBlock,\n \"titled-text\": TitledTextBlock,\n },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAQA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAEA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AASA,IAAAW,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B;EAAA,IAAtBC,KAAK,GAAAD,MAAA,CAALC,KAAK;IAAEhF,QAAQ,GAAA+E,MAAA,CAAR/E,QAAQ;EACnE,IAAAiF,MAAA,GAAyBD,KAAK;IAAtBhG,KAAK,GAAAiG,MAAA,CAALjG,KAAK;IAAEkG,KAAK,GAAAD,MAAA,CAALC,KAAK;EAEpB,oBACEhM,MAAA,CAAAuB,OAAA,CAAAiE,aAAA,CAACvE,WAAA,CAAAgL,UAAU;IAACnG,KAAK,EAAEA,KAAM;IAACG,OAAO,EAAE+F,KAAK,KAAK,CAAC,GAAG,QAAQ,GAAG;EAAU,GACnElF,QAAQ,gBAAG9G,MAAA,CAAAuB,OAAA,CAAAiE,aAAA,CAACzE,MAAA,CAAA4J,KAAK;IAACb,KAAK,EAAC;EAAI,GAAEhD,QAAgB,CAAC,GAAGM,SACzC,CAAC;AAEjB,CAAC;;AAED;AACA;AACO,IAAM8E,iBAAyC,GAAA1F,OAAA,CAAA0F,iBAAA,GAAG;EACvDC,KAAK,EAAE;IACL,gBAAgB,EAAE5E,iBAAiB;IACnC,cAAc,EAAEI,eAAe;IAC/B,UAAU,EAAEI;EACd,CAAC;EACDqE,OAAO,EAAE;IACPC,OAAO,EAAEzD,aAAa;IACtB,kBAAkB,EAAEQ,qBAAqB;IACzCkD,GAAG,EAAE5C,SAAS;IACd6C,KAAK,EAAExC,WAAW;IAClByC,KAAK,EAAEnC;EACT,CAAC;EACDoC,MAAM,EAAE;IACNC,SAAS,EAAErB,cAAc;IACzB,WAAW,EAAEG,aAAa;IAC1B,aAAa,EAAEI;EACjB;AACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageDialog.d.ts","sourceRoot":"","sources":["../../../../src/presentation/shared/MessageDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,YAAY,EACZ,SAAS,EAIV,MAAM,OAAO,CAAC;AAaf,OAAO,
|
|
1
|
+
{"version":3,"file":"MessageDialog.d.ts","sourceRoot":"","sources":["../../../../src/presentation/shared/MessageDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,YAAY,EACZ,SAAS,EAIV,MAAM,OAAO,CAAC;AAaf,OAAO,EAEL,sBAAsB,EAKvB,MAAM,+BAA+B,CAAC;AAUvC;;;;;;;;;;;;;GAaG;AAIH,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAiInD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,wEAAwE;IACxE,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,GAAI,4CAM3B,kBAAkB,KAAG,YAmBvB,CAAC;AAIF;;qDAEqD;AACrD,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AAE5D,eAAO,MAAM,cAAc,mCAE1B,CAAC;AAoNF;kEACkE;AAClE,eAAO,MAAM,iBAAiB,EAAE,sBAkB/B,CAAC"}
|
|
@@ -8,11 +8,11 @@ import { CancelCrossIcon, ThumbUpOutlineIcon } from "../../components/Icons";
|
|
|
8
8
|
import { InfoBox } from "../../components/InfoBox";
|
|
9
9
|
import { Media } from "../../components/Media";
|
|
10
10
|
import { Modal } from "../../components/Modal";
|
|
11
|
-
import { portableTextDefaultBlockRenderers } from "../../components/PortableText";
|
|
12
11
|
import { StyledLink as InlineLink } from "../../components/PortableText/Styles";
|
|
13
12
|
import { Row } from "../../components/Row";
|
|
14
13
|
import { Stack } from "../../components/Stack";
|
|
15
14
|
import { Tiles } from "../../components/Tiles";
|
|
15
|
+
import { TitledText } from "../../components/TitledText";
|
|
16
16
|
import { Tooltip } from "../../components/Tooltip";
|
|
17
17
|
import { Body2 } from "../../components/Typography";
|
|
18
18
|
import { Typography } from "../../components/Typography/Typography";
|
|
@@ -294,14 +294,18 @@ const ListItemBlock = _ref16 => {
|
|
|
294
294
|
}, children);
|
|
295
295
|
};
|
|
296
296
|
|
|
297
|
-
/*
|
|
298
|
-
|
|
299
|
-
|
|
297
|
+
/* Titled sections speak in the quiet Header2 subhead voice rather than the
|
|
298
|
+
engine's default Title2 for level 2, and keep a roomier rhythm between a
|
|
299
|
+
titled section's content nodes. */
|
|
300
300
|
const TitledTextBlock = _ref17 => {
|
|
301
301
|
let block = _ref17.block,
|
|
302
302
|
children = _ref17.children;
|
|
303
|
-
|
|
304
|
-
|
|
303
|
+
const _ref18 = block,
|
|
304
|
+
title = _ref18.title,
|
|
305
|
+
level = _ref18.level;
|
|
306
|
+
return /*#__PURE__*/React.createElement(TitledText, {
|
|
307
|
+
title: title,
|
|
308
|
+
variant: level === 1 ? "title1" : "header2"
|
|
305
309
|
}, children ? /*#__PURE__*/React.createElement(Stack, {
|
|
306
310
|
space: "sm"
|
|
307
311
|
}, children) : undefined);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageDialog.js","names":["React","useCallback","useContext","useState","styled","screenBelow","Button","Columns","IconButton","CancelCrossIcon","ThumbUpOutlineIcon","InfoBox","Media","Modal","portableTextDefaultBlockRenderers","StyledLink","InlineLink","Row","Stack","Tiles","Tooltip","Body2","Typography","DIALOG_WIDTH","sm","md","lg","StyledFeedback","div","withConfig","displayName","componentId","DialogFeedback","_ref","onVote","_useState","voted","setVoted","vote","value","createElement","color","Fragment","className","title","type","variant","onClick","StyledDialog","_ref2","$size","MessageDialog","_ref3","open","onClose","_ref3$size","size","children","DocLinkContext","createContext","undefined","StyledInterfaceName","span","InterfaceNameMark","_ref4","StyledKeyboardKey","kbd","KeyboardKeyMark","_ref5","StyledDocLink","DocLinkMark","_ref6","mark","openArticle","href","event","preventDefault","article","CALLOUT_TYPE","info","note","success","CalloutObject","_ref7","_ref8","node","tone","showIcon","StyledButtonReference","ButtonReferenceObject","_ref9","_ref0","label","tabIndex","RowObject","_ref1","_ref10","space","TilesObject","_ref11","_ref12","columns","collapseBelow","SplitObject","_ref13","_ref14","media","widths","textColumn","src","screenshot","mediaColumn","alt","caption","reverse","alignY","ParagraphBlock","_ref15","lineHeight","ListItemBlock","_ref16","as","DefaultTitledText","TitledTextBlock","_ref17","block","messageComponents","marks","objects","callout","row","tiles","split","blocks","paragraph"],"sources":["../../../../src/presentation/shared/MessageDialog.tsx"],"sourcesContent":["import React, {\n ReactElement,\n ReactNode,\n useCallback,\n useContext,\n useState,\n} from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { screenBelow } from \"../../components/BreakPoints\";\nimport { Button } from \"../../components/Button\";\nimport { Columns } from \"../../components/Columns\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { CancelCrossIcon, ThumbUpOutlineIcon } from \"../../components/Icons\";\nimport { InfoBox, InfoBoxType } from \"../../components/InfoBox\";\nimport { Space } from \"../../components/LayoutTokens\";\nimport { Media } from \"../../components/Media\";\nimport { Modal } from \"../../components/Modal\";\nimport {\n portableTextDefaultBlockRenderers,\n PortableTextBlockRenderer,\n PortableTextComponents,\n PortableTextMarkRenderer,\n PortableTextMediaVariant,\n PortableTextObjectRenderer,\n} from \"../../components/PortableText\";\nimport { StyledLink as InlineLink } from \"../../components/PortableText/Styles\";\nimport { Row } from \"../../components/Row\";\nimport { Stack } from \"../../components/Stack\";\nimport { Tiles } from \"../../components/Tiles\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Body2 } from \"../../components/Typography\";\nimport { Typography } from \"../../components/Typography/Typography\";\n\n/**\n * The in-app message dialog, as a Presentation mock.\n *\n * Two pieces, mirroring how the product is split:\n *\n * - {@link MessageDialog} — the hollow dialog shell (width, closing,\n * feedback), built only from design-system parts. In the product this shell\n * lives in the application as `InAppMessageDialog`.\n * - {@link messageComponents} — a demo message element catalog injected into\n * the design-system Portable Text engine, exactly like the typed cards\n * injected into the hollow StackedCard shell. In the product the catalog is\n * application code; the presentation ships this demo copy so the stories\n * need no app imports.\n */\n\n/* ---- the dialog shell ---------------------------------------------- */\n\nexport type MessageDialogSize = \"sm\" | \"md\" | \"lg\";\n\nconst DIALOG_WIDTH: Record<MessageDialogSize, string> = {\n sm: \"520px\",\n md: \"720px\",\n lg: \"880px\",\n};\n\n/* Feedback — the thumbs up / down slot. Down-vote reuses the up icon,\n rotated (the DS set only ships ThumbUpOutlineIcon). */\nconst StyledFeedback = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 8px 24px 28px;\n\n ${screenBelow.sm} {\n padding: 4px 24px 24px;\n }\n\n .fb-question {\n margin-right: 4px;\n }\n\n .fb-btn svg {\n width: 18px;\n height: 18px;\n }\n\n .fb-down svg {\n transform: rotate(180deg);\n }\n`;\n\nconst DialogFeedback = ({\n onVote,\n}: {\n onVote?: (vote: \"up\" | \"down\") => void;\n}): ReactElement => {\n const [voted, setVoted] = useState<\"up\" | \"down\" | null>(null);\n const vote = useCallback(\n (value: \"up\" | \"down\") => {\n setVoted(value);\n onVote?.(value);\n },\n [onVote]\n );\n\n return (\n <StyledFeedback>\n {voted ? (\n <Body2 color=\"secondary\">Thanks for your feedback!</Body2>\n ) : (\n <>\n <Body2 color=\"secondary\" className=\"fb-question\">\n Was this helpful?\n </Body2>\n <Tooltip title=\"Yes, helpful\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n className=\"fb-btn\"\n aria-label=\"Yes, helpful\"\n onClick={() => vote(\"up\")}\n >\n <ThumbUpOutlineIcon />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"No, not helpful\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n className=\"fb-btn fb-down\"\n aria-label=\"No, not helpful\"\n onClick={() => vote(\"down\")}\n >\n <ThumbUpOutlineIcon />\n </IconButton>\n </Tooltip>\n </>\n )}\n </StyledFeedback>\n );\n};\n\n/* The shell is behaviour only: it sizes itself, closes on click-outside /\n Esc (DS Modal) / the X, and shows the feedback slot when an onVote handler\n is supplied. Content is whatever the caller renders as children — usually\n the Portable Text engine with the demo catalog injected. */\nconst StyledDialog = styled.div<{ $size: MessageDialogSize }>`\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n width: calc(100% - 32px);\n max-width: ${({ $size }) => DIALOG_WIDTH[$size]};\n max-height: calc(100vh - 96px);\n margin: 56px auto 40px;\n overflow-y: auto;\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n border-radius: 12px;\n box-shadow: var(--shadow-primary);\n\n ${screenBelow.sm} {\n margin: 16px auto;\n }\n\n /* X floats in the corner and overlaps the content padding — it does not\n reserve a row of its own. */\n .dlg-close {\n position: absolute;\n top: 12px;\n right: 12px;\n z-index: 2;\n }\n\n .dlg-content {\n padding: 40px;\n }\n\n ${screenBelow.sm} {\n .dlg-content {\n padding: 32px 20px 24px;\n }\n }\n`;\n\nexport interface MessageDialogProps {\n open: boolean;\n onClose: () => void;\n size?: MessageDialogSize;\n /** Supplying a handler shows the centred helpful / not-helpful vote. */\n onVote?: (vote: \"up\" | \"down\") => void;\n children: ReactNode;\n}\n\nexport const MessageDialog = ({\n open,\n onClose,\n size = \"md\",\n onVote,\n children,\n}: MessageDialogProps): ReactElement => (\n <Modal open={open} onClose={onClose}>\n <StyledDialog $size={size}>\n <div className=\"dlg-close\">\n <Tooltip title=\"Close\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n aria-label=\"Close\"\n onClick={onClose}\n >\n <CancelCrossIcon />\n </IconButton>\n </Tooltip>\n </div>\n <div className=\"dlg-content\">{children}</div>\n {onVote ? <DialogFeedback onVote={onVote} /> : null}\n </StyledDialog>\n </Modal>\n);\n\n/* ---- doc-link wiring ------------------------------------------------ */\n\n/** How a doc-link mark opens its article (by a slug-like reference). The\n surface that renders the message supplies the handler — in the product it\n closes the dialog and opens the article Sheet. */\nexport type OpenArticleHandler = (article?: string) => void;\n\nexport const DocLinkContext = React.createContext<OpenArticleHandler>(\n () => undefined\n);\n\n/* ---- the demo message element catalog ------------------------------- */\n\n/* Inline marks ------------------------------------------------------- */\n\n/* interface-name — the name of an interface element, e.g. the Security page. */\nconst StyledInterfaceName = styled.span`\n padding: 0 4px;\n border-radius: 4px;\n background-color: var(--color-theme-300);\n color: var(--color-theme-900);\n font-weight: 600;\n white-space: nowrap;\n`;\nconst InterfaceNameMark: PortableTextMarkRenderer = ({ children }) => (\n <StyledInterfaceName>{children}</StyledInterfaceName>\n);\n\n/* keyboard-key — a keyboard key cap. */\nconst StyledKeyboardKey = styled.kbd`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 20px;\n height: 20px;\n padding: 0 6px;\n border: 1px solid var(--border-primary);\n border-bottom-width: 2px;\n border-radius: 5px;\n background-color: var(--color-theme-200);\n color: var(--color-theme-900);\n font-family: ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace;\n font-size: 11px;\n font-weight: 600;\n line-height: 1;\n vertical-align: baseline;\n`;\nconst KeyboardKeyMark: PortableTextMarkRenderer = ({ children }) => (\n <StyledKeyboardKey>{children}</StyledKeyboardKey>\n);\n\n/* doc-link — an inline link that opens a full help article. The mark carries\n an article reference; the open behaviour comes from DocLinkContext, so the\n authored content stays declarative. */\n/* Built on the engine's inline anchor so a doc-link sits in the sentence\n exactly like a default link mark — same size, weight and line box as the\n surrounding copy — just recoloured. */\nconst StyledDocLink = styled(InlineLink)`\n color: var(--color-secondary);\n text-decoration-color: var(--color-secondary);\n`;\nconst DocLinkMark: PortableTextMarkRenderer = ({ mark, children }) => {\n const openArticle = useContext(DocLinkContext);\n return (\n <StyledDocLink\n href=\"#\"\n onClick={(event: React.MouseEvent) => {\n event.preventDefault();\n openArticle(mark?.article as string | undefined);\n }}\n >\n {children}\n </StyledDocLink>\n );\n};\n\n/* Component objects --------------------------------------------------- */\n\n/* callout — rendered with the DS InfoBox; the catalog keeps its own tone\n vocabulary and maps it to InfoBox types. */\ntype CalloutTone = \"info\" | \"note\" | \"success\";\nconst CALLOUT_TYPE: Record<CalloutTone, InfoBoxType> = {\n info: \"default\",\n note: \"note\",\n success: \"success\",\n};\nconst CalloutObject: PortableTextObjectRenderer = ({ node, children }) => (\n <InfoBox\n type={CALLOUT_TYPE[(node.tone as CalloutTone | undefined) ?? \"info\"]}\n title={node.title as string | undefined}\n showIcon\n >\n {children}\n </InfoBox>\n);\n\n/* button-reference — a real DS Button shown for reference as its own block,\n so a message can point at a button instead of screenshotting it. It is\n intentionally non-interactive. */\nconst StyledButtonReference = styled.div`\n display: flex;\n\n .c-button {\n pointer-events: none;\n }\n`;\ntype ButtonReferenceVariant =\n | \"primary\"\n | \"secondary\"\n | \"text colored\"\n | \"text gray\";\nconst ButtonReferenceObject: PortableTextObjectRenderer = ({ node }) => {\n if (typeof node.label !== \"string\") {\n return null;\n }\n\n return (\n <StyledButtonReference aria-hidden=\"true\">\n <Button\n variant={\n (node.variant as ButtonReferenceVariant | undefined) ?? \"primary\"\n }\n size=\"small\"\n type=\"button\"\n tabIndex={-1}\n >\n {node.label}\n </Button>\n </StyledButtonReference>\n );\n};\n\n/* row — a horizontal run of blocks (e.g. two button references). */\nconst RowObject: PortableTextObjectRenderer = ({ node, children }) => (\n <Row space={(node.space as Space | undefined) ?? \"sm\"}>{children}</Row>\n);\n\n/* tiles — an equal-size mosaic of blocks. */\nconst TilesObject: PortableTextObjectRenderer = ({ node, children }) => (\n <Tiles\n columns={(node.columns as number | undefined) ?? 3}\n space=\"md\"\n collapseBelow=\"sm\"\n >\n {children}\n </Tiles>\n);\n\n/* split — text beside media, with the one layout rule the messages follow:\n screenshots sit on the right, flat illustrations on the left. `widths` is\n authored as [text, media] and reordered with the columns. */\ninterface SplitMedia {\n src: string;\n alt?: string;\n variant?: PortableTextMediaVariant;\n caption?: string;\n}\nconst SplitObject: PortableTextObjectRenderer = ({ node, children }) => {\n const media = node.media as SplitMedia | undefined;\n const widths = (node.widths as number[] | undefined) ?? [1, 1];\n const textColumn = <Stack space=\"lg\">{children}</Stack>;\n\n // A split without media degrades to its text column instead of crashing.\n if (!media?.src) {\n return textColumn;\n }\n\n const screenshot = media.variant === \"screenshot\";\n\n const mediaColumn = (\n <Media\n src={media.src}\n alt={media.alt}\n variant={media.variant}\n caption={media.caption}\n />\n );\n\n return (\n <Columns\n widths={screenshot ? widths : [...widths].reverse()}\n space=\"xl\"\n alignY=\"center\"\n collapseBelow=\"md\"\n >\n {screenshot ? textColumn : mediaColumn}\n {screenshot ? mediaColumn : textColumn}\n </Columns>\n );\n};\n\n/* Default-block overrides --------------------------------------------- */\n\n/* The engine's defaults use Body 1 primary; the messages are designed on the\n quieter Body 2 secondary voice, so the catalog overrides the text blocks —\n demonstrating the `blocks` half of the injection contract. */\nconst ParagraphBlock: PortableTextBlockRenderer = ({ children }) => (\n <Body2 color=\"secondary\" lineHeight=\"loose\">\n {children}\n </Body2>\n);\n\nconst ListItemBlock: PortableTextBlockRenderer = ({ children }) => (\n <Typography variant=\"Body 2\" as=\"li\" color=\"secondary\" lineHeight=\"loose\">\n {children}\n </Typography>\n);\n\n/* Only the delta from the default renderer: the messages want a roomier\n rhythm between a titled section's content nodes. */\nconst DefaultTitledText = portableTextDefaultBlockRenderers[\"titled-text\"];\nconst TitledTextBlock: PortableTextBlockRenderer = ({ block, children }) => (\n <DefaultTitledText block={block}>\n {children ? <Stack space=\"sm\">{children}</Stack> : undefined}\n </DefaultTitledText>\n);\n\n/** The demo catalog the presentations inject into the Portable Text engine —\n the stand-in for the application's `messageComponents` map. */\nexport const messageComponents: PortableTextComponents = {\n marks: {\n \"interface-name\": InterfaceNameMark,\n \"keyboard-key\": KeyboardKeyMark,\n \"doc-link\": DocLinkMark,\n },\n objects: {\n callout: CalloutObject,\n \"button-reference\": ButtonReferenceObject,\n row: RowObject,\n tiles: TilesObject,\n split: SplitObject,\n },\n blocks: {\n paragraph: ParagraphBlock,\n \"list-item\": ListItemBlock,\n \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A,oBACnEzD,KAAA,CAAAwC,aAAA,CAACkF,iBAAiB;IAACG,KAAK,EAAEA;EAAM,GAC7BpE,QAAQ,gBAAGzD,KAAA,CAAAwC,aAAA,CAACtB,KAAK;IAAC+E,KAAK,EAAC;EAAI,GAAExC,QAAgB,CAAC,GAAGG,SAClC,CAAC;AAAA,CACrB;;AAED;AACA;AACA,OAAO,MAAMkE,iBAAyC,GAAG;EACvDC,KAAK,EAAE;IACL,gBAAgB,EAAEhE,iBAAiB;IACnC,cAAc,EAAEI,eAAe;IAC/B,UAAU,EAAEG;EACd,CAAC;EACD0D,OAAO,EAAE;IACPC,OAAO,EAAE/C,aAAa;IACtB,kBAAkB,EAAEO,qBAAqB;IACzCyC,GAAG,EAAEpC,SAAS;IACdqC,KAAK,EAAEjC,WAAW;IAClBkC,KAAK,EAAE7B;EACT,CAAC;EACD8B,MAAM,EAAE;IACNC,SAAS,EAAElB,cAAc;IACzB,WAAW,EAAEG,aAAa;IAC1B,aAAa,EAAEI;EACjB;AACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"MessageDialog.js","names":["React","useCallback","useContext","useState","styled","screenBelow","Button","Columns","IconButton","CancelCrossIcon","ThumbUpOutlineIcon","InfoBox","Media","Modal","StyledLink","InlineLink","Row","Stack","Tiles","TitledText","Tooltip","Body2","Typography","DIALOG_WIDTH","sm","md","lg","StyledFeedback","div","withConfig","displayName","componentId","DialogFeedback","_ref","onVote","_useState","voted","setVoted","vote","value","createElement","color","Fragment","className","title","type","variant","onClick","StyledDialog","_ref2","$size","MessageDialog","_ref3","open","onClose","_ref3$size","size","children","DocLinkContext","createContext","undefined","StyledInterfaceName","span","InterfaceNameMark","_ref4","StyledKeyboardKey","kbd","KeyboardKeyMark","_ref5","StyledDocLink","DocLinkMark","_ref6","mark","openArticle","href","event","preventDefault","article","CALLOUT_TYPE","info","note","success","CalloutObject","_ref7","_ref8","node","tone","showIcon","StyledButtonReference","ButtonReferenceObject","_ref9","_ref0","label","tabIndex","RowObject","_ref1","_ref10","space","TilesObject","_ref11","_ref12","columns","collapseBelow","SplitObject","_ref13","_ref14","media","widths","textColumn","src","screenshot","mediaColumn","alt","caption","reverse","alignY","ParagraphBlock","_ref15","lineHeight","ListItemBlock","_ref16","as","TitledTextBlock","_ref17","block","_ref18","level","messageComponents","marks","objects","callout","row","tiles","split","blocks","paragraph"],"sources":["../../../../src/presentation/shared/MessageDialog.tsx"],"sourcesContent":["import React, {\n ReactElement,\n ReactNode,\n useCallback,\n useContext,\n useState,\n} from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { screenBelow } from \"../../components/BreakPoints\";\nimport { Button } from \"../../components/Button\";\nimport { Columns } from \"../../components/Columns\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { CancelCrossIcon, ThumbUpOutlineIcon } from \"../../components/Icons\";\nimport { InfoBox, InfoBoxType } from \"../../components/InfoBox\";\nimport { Space } from \"../../components/LayoutTokens\";\nimport { Media } from \"../../components/Media\";\nimport { Modal } from \"../../components/Modal\";\nimport {\n PortableTextBlockRenderer,\n PortableTextComponents,\n PortableTextMarkRenderer,\n PortableTextMediaVariant,\n PortableTextObjectRenderer,\n PortableTextTitledTextBlock,\n} from \"../../components/PortableText\";\nimport { StyledLink as InlineLink } from \"../../components/PortableText/Styles\";\nimport { Row } from \"../../components/Row\";\nimport { Stack } from \"../../components/Stack\";\nimport { Tiles } from \"../../components/Tiles\";\nimport { TitledText } from \"../../components/TitledText\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Body2 } from \"../../components/Typography\";\nimport { Typography } from \"../../components/Typography/Typography\";\n\n/**\n * The in-app message dialog, as a Presentation mock.\n *\n * Two pieces, mirroring how the product is split:\n *\n * - {@link MessageDialog} — the hollow dialog shell (width, closing,\n * feedback), built only from design-system parts. In the product this shell\n * lives in the application as `InAppMessageDialog`.\n * - {@link messageComponents} — a demo message element catalog injected into\n * the design-system Portable Text engine, exactly like the typed cards\n * injected into the hollow StackedCard shell. In the product the catalog is\n * application code; the presentation ships this demo copy so the stories\n * need no app imports.\n */\n\n/* ---- the dialog shell ---------------------------------------------- */\n\nexport type MessageDialogSize = \"sm\" | \"md\" | \"lg\";\n\nconst DIALOG_WIDTH: Record<MessageDialogSize, string> = {\n sm: \"520px\",\n md: \"720px\",\n lg: \"880px\",\n};\n\n/* Feedback — the thumbs up / down slot. Down-vote reuses the up icon,\n rotated (the DS set only ships ThumbUpOutlineIcon). */\nconst StyledFeedback = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 8px 24px 28px;\n\n ${screenBelow.sm} {\n padding: 4px 24px 24px;\n }\n\n .fb-question {\n margin-right: 4px;\n }\n\n .fb-btn svg {\n width: 18px;\n height: 18px;\n }\n\n .fb-down svg {\n transform: rotate(180deg);\n }\n`;\n\nconst DialogFeedback = ({\n onVote,\n}: {\n onVote?: (vote: \"up\" | \"down\") => void;\n}): ReactElement => {\n const [voted, setVoted] = useState<\"up\" | \"down\" | null>(null);\n const vote = useCallback(\n (value: \"up\" | \"down\") => {\n setVoted(value);\n onVote?.(value);\n },\n [onVote]\n );\n\n return (\n <StyledFeedback>\n {voted ? (\n <Body2 color=\"secondary\">Thanks for your feedback!</Body2>\n ) : (\n <>\n <Body2 color=\"secondary\" className=\"fb-question\">\n Was this helpful?\n </Body2>\n <Tooltip title=\"Yes, helpful\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n className=\"fb-btn\"\n aria-label=\"Yes, helpful\"\n onClick={() => vote(\"up\")}\n >\n <ThumbUpOutlineIcon />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"No, not helpful\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n className=\"fb-btn fb-down\"\n aria-label=\"No, not helpful\"\n onClick={() => vote(\"down\")}\n >\n <ThumbUpOutlineIcon />\n </IconButton>\n </Tooltip>\n </>\n )}\n </StyledFeedback>\n );\n};\n\n/* The shell is behaviour only: it sizes itself, closes on click-outside /\n Esc (DS Modal) / the X, and shows the feedback slot when an onVote handler\n is supplied. Content is whatever the caller renders as children — usually\n the Portable Text engine with the demo catalog injected. */\nconst StyledDialog = styled.div<{ $size: MessageDialogSize }>`\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n width: calc(100% - 32px);\n max-width: ${({ $size }) => DIALOG_WIDTH[$size]};\n max-height: calc(100vh - 96px);\n margin: 56px auto 40px;\n overflow-y: auto;\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n border-radius: 12px;\n box-shadow: var(--shadow-primary);\n\n ${screenBelow.sm} {\n margin: 16px auto;\n }\n\n /* X floats in the corner and overlaps the content padding — it does not\n reserve a row of its own. */\n .dlg-close {\n position: absolute;\n top: 12px;\n right: 12px;\n z-index: 2;\n }\n\n .dlg-content {\n padding: 40px;\n }\n\n ${screenBelow.sm} {\n .dlg-content {\n padding: 32px 20px 24px;\n }\n }\n`;\n\nexport interface MessageDialogProps {\n open: boolean;\n onClose: () => void;\n size?: MessageDialogSize;\n /** Supplying a handler shows the centred helpful / not-helpful vote. */\n onVote?: (vote: \"up\" | \"down\") => void;\n children: ReactNode;\n}\n\nexport const MessageDialog = ({\n open,\n onClose,\n size = \"md\",\n onVote,\n children,\n}: MessageDialogProps): ReactElement => (\n <Modal open={open} onClose={onClose}>\n <StyledDialog $size={size}>\n <div className=\"dlg-close\">\n <Tooltip title=\"Close\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n aria-label=\"Close\"\n onClick={onClose}\n >\n <CancelCrossIcon />\n </IconButton>\n </Tooltip>\n </div>\n <div className=\"dlg-content\">{children}</div>\n {onVote ? <DialogFeedback onVote={onVote} /> : null}\n </StyledDialog>\n </Modal>\n);\n\n/* ---- doc-link wiring ------------------------------------------------ */\n\n/** How a doc-link mark opens its article (by a slug-like reference). The\n surface that renders the message supplies the handler — in the product it\n closes the dialog and opens the article Sheet. */\nexport type OpenArticleHandler = (article?: string) => void;\n\nexport const DocLinkContext = React.createContext<OpenArticleHandler>(\n () => undefined\n);\n\n/* ---- the demo message element catalog ------------------------------- */\n\n/* Inline marks ------------------------------------------------------- */\n\n/* interface-name — the name of an interface element, e.g. the Security page. */\nconst StyledInterfaceName = styled.span`\n padding: 0 4px;\n border-radius: 4px;\n background-color: var(--color-theme-300);\n color: var(--color-theme-900);\n font-weight: 600;\n white-space: nowrap;\n`;\nconst InterfaceNameMark: PortableTextMarkRenderer = ({ children }) => (\n <StyledInterfaceName>{children}</StyledInterfaceName>\n);\n\n/* keyboard-key — a keyboard key cap. */\nconst StyledKeyboardKey = styled.kbd`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 20px;\n height: 20px;\n padding: 0 6px;\n border: 1px solid var(--border-primary);\n border-bottom-width: 2px;\n border-radius: 5px;\n background-color: var(--color-theme-200);\n color: var(--color-theme-900);\n font-family: ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace;\n font-size: 11px;\n font-weight: 600;\n line-height: 1;\n vertical-align: baseline;\n`;\nconst KeyboardKeyMark: PortableTextMarkRenderer = ({ children }) => (\n <StyledKeyboardKey>{children}</StyledKeyboardKey>\n);\n\n/* doc-link — an inline link that opens a full help article. The mark carries\n an article reference; the open behaviour comes from DocLinkContext, so the\n authored content stays declarative. */\n/* Built on the engine's inline anchor so a doc-link sits in the sentence\n exactly like a default link mark — same size, weight and line box as the\n surrounding copy — just recoloured. */\nconst StyledDocLink = styled(InlineLink)`\n color: var(--color-secondary);\n text-decoration-color: var(--color-secondary);\n`;\nconst DocLinkMark: PortableTextMarkRenderer = ({ mark, children }) => {\n const openArticle = useContext(DocLinkContext);\n return (\n <StyledDocLink\n href=\"#\"\n onClick={(event: React.MouseEvent) => {\n event.preventDefault();\n openArticle(mark?.article as string | undefined);\n }}\n >\n {children}\n </StyledDocLink>\n );\n};\n\n/* Component objects --------------------------------------------------- */\n\n/* callout — rendered with the DS InfoBox; the catalog keeps its own tone\n vocabulary and maps it to InfoBox types. */\ntype CalloutTone = \"info\" | \"note\" | \"success\";\nconst CALLOUT_TYPE: Record<CalloutTone, InfoBoxType> = {\n info: \"default\",\n note: \"note\",\n success: \"success\",\n};\nconst CalloutObject: PortableTextObjectRenderer = ({ node, children }) => (\n <InfoBox\n type={CALLOUT_TYPE[(node.tone as CalloutTone | undefined) ?? \"info\"]}\n title={node.title as string | undefined}\n showIcon\n >\n {children}\n </InfoBox>\n);\n\n/* button-reference — a real DS Button shown for reference as its own block,\n so a message can point at a button instead of screenshotting it. It is\n intentionally non-interactive. */\nconst StyledButtonReference = styled.div`\n display: flex;\n\n .c-button {\n pointer-events: none;\n }\n`;\ntype ButtonReferenceVariant =\n | \"primary\"\n | \"secondary\"\n | \"text colored\"\n | \"text gray\";\nconst ButtonReferenceObject: PortableTextObjectRenderer = ({ node }) => {\n if (typeof node.label !== \"string\") {\n return null;\n }\n\n return (\n <StyledButtonReference aria-hidden=\"true\">\n <Button\n variant={\n (node.variant as ButtonReferenceVariant | undefined) ?? \"primary\"\n }\n size=\"small\"\n type=\"button\"\n tabIndex={-1}\n >\n {node.label}\n </Button>\n </StyledButtonReference>\n );\n};\n\n/* row — a horizontal run of blocks (e.g. two button references). */\nconst RowObject: PortableTextObjectRenderer = ({ node, children }) => (\n <Row space={(node.space as Space | undefined) ?? \"sm\"}>{children}</Row>\n);\n\n/* tiles — an equal-size mosaic of blocks. */\nconst TilesObject: PortableTextObjectRenderer = ({ node, children }) => (\n <Tiles\n columns={(node.columns as number | undefined) ?? 3}\n space=\"md\"\n collapseBelow=\"sm\"\n >\n {children}\n </Tiles>\n);\n\n/* split — text beside media, with the one layout rule the messages follow:\n screenshots sit on the right, flat illustrations on the left. `widths` is\n authored as [text, media] and reordered with the columns. */\ninterface SplitMedia {\n src: string;\n alt?: string;\n variant?: PortableTextMediaVariant;\n caption?: string;\n}\nconst SplitObject: PortableTextObjectRenderer = ({ node, children }) => {\n const media = node.media as SplitMedia | undefined;\n const widths = (node.widths as number[] | undefined) ?? [1, 1];\n const textColumn = <Stack space=\"lg\">{children}</Stack>;\n\n // A split without media degrades to its text column instead of crashing.\n if (!media?.src) {\n return textColumn;\n }\n\n const screenshot = media.variant === \"screenshot\";\n\n const mediaColumn = (\n <Media\n src={media.src}\n alt={media.alt}\n variant={media.variant}\n caption={media.caption}\n />\n );\n\n return (\n <Columns\n widths={screenshot ? widths : [...widths].reverse()}\n space=\"xl\"\n alignY=\"center\"\n collapseBelow=\"md\"\n >\n {screenshot ? textColumn : mediaColumn}\n {screenshot ? mediaColumn : textColumn}\n </Columns>\n );\n};\n\n/* Default-block overrides --------------------------------------------- */\n\n/* The engine's defaults use Body 1 primary; the messages are designed on the\n quieter Body 2 secondary voice, so the catalog overrides the text blocks —\n demonstrating the `blocks` half of the injection contract. */\nconst ParagraphBlock: PortableTextBlockRenderer = ({ children }) => (\n <Body2 color=\"secondary\" lineHeight=\"loose\">\n {children}\n </Body2>\n);\n\nconst ListItemBlock: PortableTextBlockRenderer = ({ children }) => (\n <Typography variant=\"Body 2\" as=\"li\" color=\"secondary\" lineHeight=\"loose\">\n {children}\n </Typography>\n);\n\n/* Titled sections speak in the quiet Header2 subhead voice rather than the\n engine's default Title2 for level 2, and keep a roomier rhythm between a\n titled section's content nodes. */\nconst TitledTextBlock: PortableTextBlockRenderer = ({ block, children }) => {\n const { title, level } = block as PortableTextTitledTextBlock;\n\n return (\n <TitledText title={title} variant={level === 1 ? \"title1\" : \"header2\"}>\n {children ? <Stack space=\"sm\">{children}</Stack> : undefined}\n </TitledText>\n );\n};\n\n/** The demo catalog the presentations inject into the Portable Text engine —\n the stand-in for the application's `messageComponents` map. */\nexport const messageComponents: PortableTextComponents = {\n marks: {\n \"interface-name\": InterfaceNameMark,\n \"keyboard-key\": KeyboardKeyMark,\n \"doc-link\": DocLinkMark,\n },\n objects: {\n callout: CalloutObject,\n \"button-reference\": ButtonReferenceObject,\n row: RowObject,\n tiles: TilesObject,\n split: SplitObject,\n },\n blocks: {\n paragraph: ParagraphBlock,\n \"list-item\": ListItemBlock,\n \"titled-text\": TitledTextBlock,\n },\n};\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