@activecollab/components 2.0.540 → 2.0.541

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.
Files changed (25) hide show
  1. package/dist/cjs/presentation/listView/columns.js +17 -18
  2. package/dist/cjs/presentation/listView/columns.js.map +1 -1
  3. package/dist/cjs/presentation/shared/MessageDialog.js +113 -81
  4. package/dist/cjs/presentation/shared/MessageDialog.js.map +1 -1
  5. package/dist/cjs/presentation/shared/PresentationShell.js +7 -7
  6. package/dist/cjs/presentation/shared/PresentationShell.js.map +1 -1
  7. package/dist/cjs/presentation/whiteboard/canvasElements.js.map +1 -1
  8. package/dist/cjs/presentation/whiteboard/projectElements.js +20 -27
  9. package/dist/cjs/presentation/whiteboard/projectElements.js.map +1 -1
  10. package/dist/esm/presentation/listView/columns.d.ts +10 -0
  11. package/dist/esm/presentation/listView/columns.d.ts.map +1 -1
  12. package/dist/esm/presentation/listView/columns.js +16 -17
  13. package/dist/esm/presentation/listView/columns.js.map +1 -1
  14. package/dist/esm/presentation/shared/MessageDialog.d.ts +3 -0
  15. package/dist/esm/presentation/shared/MessageDialog.d.ts.map +1 -1
  16. package/dist/esm/presentation/shared/MessageDialog.js +107 -80
  17. package/dist/esm/presentation/shared/MessageDialog.js.map +1 -1
  18. package/dist/esm/presentation/shared/PresentationShell.d.ts.map +1 -1
  19. package/dist/esm/presentation/shared/PresentationShell.js +7 -7
  20. package/dist/esm/presentation/shared/PresentationShell.js.map +1 -1
  21. package/dist/esm/presentation/whiteboard/canvasElements.js.map +1 -1
  22. package/dist/esm/presentation/whiteboard/projectElements.d.ts.map +1 -1
  23. package/dist/esm/presentation/whiteboard/projectElements.js +21 -28
  24. package/dist/esm/presentation/whiteboard/projectElements.js.map +1 -1
  25. package/package.json +1 -1
@@ -1,14 +1,16 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
1
2
  import React, { useContext } from "react";
2
3
  import styled from "styled-components";
3
4
  import { MessageFeedback } from "./MessageFeedback";
4
5
  import { screenBelow } from "../../components/BreakPoints";
5
6
  import { Button } from "../../components/Button";
6
7
  import { Columns } from "../../components/Columns";
8
+ import { Dialog } from "../../components/Dialog";
7
9
  import { IconButton } from "../../components/IconButton";
8
10
  import { CancelCrossIcon } from "../../components/Icons";
9
11
  import { InfoBox } from "../../components/InfoBox";
10
12
  import { Media } from "../../components/Media";
11
- import { Modal } from "../../components/Modal";
13
+ import { portableTextDefaultBlockRenderers } from "../../components/PortableText";
12
14
  import { StyledLink as InlineLink } from "../../components/PortableText/Styles";
13
15
  import { Row } from "../../components/Row";
14
16
  import { Stack } from "../../components/Stack";
@@ -35,50 +37,62 @@ import { Typography } from "../../components/Typography/Typography";
35
37
 
36
38
  /* ---- the dialog shell ---------------------------------------------- */
37
39
 
38
- const DIALOG_WIDTH = {
39
- sm: "520px",
40
- md: "720px",
41
- lg: "880px"
40
+ /** The id the dialog points `aria-labelledby` at, carried by the message's
41
+ level 1 heading, as in the app's message catalog (Heading.jsx). */
42
+ export const MESSAGE_TITLE_ID = "in-app-message-title";
43
+
44
+ /* The app maps its message sizes onto DS Dialog steps (InAppMessageDialog constants). */
45
+ const DIALOG_SIZE = {
46
+ sm: "m",
47
+ md: "l",
48
+ lg: "xl"
42
49
  };
43
50
 
44
- /* The shell is behaviour only: it sizes itself, closes on click-outside /
45
- Esc (DS Modal) / the X, and shows the feedback slot when an onVote handler
46
- is supplied. Content is whatever the caller renders as children — usually
47
- the Portable Text engine with the demo catalog injected. */
48
- const StyledDialog = styled.div.withConfig({
49
- displayName: "MessageDialog__StyledDialog",
51
+ /* The shell is a DS Dialog, as in the app: it closes on click-outside, Esc and
52
+ the X, and shows the feedback slot when an onVote handler is supplied.
53
+ Content is whatever the caller renders as children — usually the Portable
54
+ Text engine with the demo catalog injected. */
55
+
56
+ /* X floats in the corner and overlaps the content padding — it does not
57
+ reserve a row of its own. */
58
+ const StyledMessageClose = styled.div.withConfig({
59
+ displayName: "MessageDialog__StyledMessageClose",
50
60
  componentId: "sc-1kt5lil-0"
51
- })(["position:relative;box-sizing:border-box;display:flex;flex-direction:column;width:calc(100% - 32px);max-width:", ";max-height:calc(100vh - 96px);margin:56px auto 40px;overflow-y:auto;background-color:var(--page-paper-main);color:var(--color-theme-900);border-radius:12px;box-shadow:var(--shadow-primary);", "{margin:16px auto;}.dlg-close{position:absolute;top:12px;right:12px;z-index:2;}.dlg-content{padding:40px;}", "{.dlg-content{padding:32px 20px 24px;}}"], _ref => {
52
- let $size = _ref.$size;
53
- return DIALOG_WIDTH[$size];
54
- }, screenBelow.sm, screenBelow.sm);
55
- export const MessageDialog = _ref2 => {
56
- let open = _ref2.open,
57
- onClose = _ref2.onClose,
58
- _ref2$size = _ref2.size,
59
- size = _ref2$size === void 0 ? "md" : _ref2$size,
60
- _ref2$feedback = _ref2.feedback,
61
- feedback = _ref2$feedback === void 0 ? false : _ref2$feedback,
62
- onVote = _ref2.onVote,
63
- onFeedbackSubmit = _ref2.onFeedbackSubmit,
64
- children = _ref2.children;
65
- return /*#__PURE__*/React.createElement(Modal, {
61
+ })(["position:absolute;top:12px;right:12px;z-index:2;"]);
62
+ const StyledMessageContent = styled(Dialog.Content).withConfig({
63
+ displayName: "MessageDialog__StyledMessageContent",
64
+ componentId: "sc-1kt5lil-1"
65
+ })(["&&{padding:0;}"]);
66
+ const StyledMessageBody = styled.div.withConfig({
67
+ displayName: "MessageDialog__StyledMessageBody",
68
+ componentId: "sc-1kt5lil-2"
69
+ })(["padding:40px;", "{padding:32px 20px 24px;}"], screenBelow.sm);
70
+ export const MessageDialog = _ref => {
71
+ let open = _ref.open,
72
+ onClose = _ref.onClose,
73
+ _ref$size = _ref.size,
74
+ size = _ref$size === void 0 ? "md" : _ref$size,
75
+ _ref$feedback = _ref.feedback,
76
+ feedback = _ref$feedback === void 0 ? false : _ref$feedback,
77
+ onVote = _ref.onVote,
78
+ onFeedbackSubmit = _ref.onFeedbackSubmit,
79
+ children = _ref.children;
80
+ return /*#__PURE__*/React.createElement(Dialog, {
66
81
  open: open,
67
- onClose: onClose
68
- }, /*#__PURE__*/React.createElement(StyledDialog, {
69
- $size: size
70
- }, /*#__PURE__*/React.createElement("div", {
71
- className: "dlg-close"
72
- }, /*#__PURE__*/React.createElement(Tooltip, {
82
+ onClose: onClose,
83
+ size: DIALOG_SIZE[size],
84
+ enableBackgroundClick: true,
85
+ role: "dialog",
86
+ "aria-modal": "true",
87
+ "aria-labelledby": MESSAGE_TITLE_ID
88
+ }, /*#__PURE__*/React.createElement(StyledMessageClose, null, /*#__PURE__*/React.createElement(Tooltip, {
73
89
  title: "Close"
74
90
  }, /*#__PURE__*/React.createElement(IconButton, {
75
91
  type: "button",
76
92
  variant: "text gray",
77
93
  "aria-label": "Close",
78
94
  onClick: onClose
79
- }, /*#__PURE__*/React.createElement(CancelCrossIcon, null)))), /*#__PURE__*/React.createElement("div", {
80
- className: "dlg-content"
81
- }, children), feedback ? /*#__PURE__*/React.createElement(MessageFeedback, {
95
+ }, /*#__PURE__*/React.createElement(CancelCrossIcon, null)))), /*#__PURE__*/React.createElement(StyledMessageContent, null, /*#__PURE__*/React.createElement(StyledMessageBody, null, children), feedback ? /*#__PURE__*/React.createElement(MessageFeedback, {
82
96
  onVote: onVote,
83
97
  onSubmit: onFeedbackSubmit
84
98
  }) : null));
@@ -99,20 +113,20 @@ export const DocLinkContext = /*#__PURE__*/React.createContext(() => undefined);
99
113
  /* interface-name — the name of an interface element, e.g. the Security page. */
100
114
  const StyledInterfaceName = styled.span.withConfig({
101
115
  displayName: "MessageDialog__StyledInterfaceName",
102
- componentId: "sc-1kt5lil-1"
116
+ componentId: "sc-1kt5lil-3"
103
117
  })(["padding:0 4px;border-radius:4px;background-color:var(--color-theme-300);color:var(--color-theme-900);font-weight:600;white-space:nowrap;"]);
104
- const InterfaceNameMark = _ref3 => {
105
- let children = _ref3.children;
118
+ const InterfaceNameMark = _ref2 => {
119
+ let children = _ref2.children;
106
120
  return /*#__PURE__*/React.createElement(StyledInterfaceName, null, children);
107
121
  };
108
122
 
109
123
  /* keyboard-key — a keyboard key cap. */
110
124
  const StyledKeyboardKey = styled.kbd.withConfig({
111
125
  displayName: "MessageDialog__StyledKeyboardKey",
112
- componentId: "sc-1kt5lil-2"
126
+ componentId: "sc-1kt5lil-4"
113
127
  })(["display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border:1px solid var(--border-primary);border-bottom-width:2px;border-radius:5px;background-color:var(--color-theme-200);color:var(--color-theme-900);font-family:ui-monospace,\"SFMono-Regular\",Menlo,Consolas,monospace;font-size:11px;font-weight:600;line-height:1;vertical-align:baseline;"]);
114
- const KeyboardKeyMark = _ref4 => {
115
- let children = _ref4.children;
128
+ const KeyboardKeyMark = _ref3 => {
129
+ let children = _ref3.children;
116
130
  return /*#__PURE__*/React.createElement(StyledKeyboardKey, null, children);
117
131
  };
118
132
 
@@ -124,11 +138,11 @@ const KeyboardKeyMark = _ref4 => {
124
138
  surrounding copy — just recoloured. */
125
139
  const StyledDocLink = styled(InlineLink).withConfig({
126
140
  displayName: "MessageDialog__StyledDocLink",
127
- componentId: "sc-1kt5lil-3"
141
+ componentId: "sc-1kt5lil-5"
128
142
  })(["color:var(--color-secondary);text-decoration-color:var(--color-secondary);"]);
129
- const DocLinkMark = _ref5 => {
130
- let mark = _ref5.mark,
131
- children = _ref5.children;
143
+ const DocLinkMark = _ref4 => {
144
+ let mark = _ref4.mark,
145
+ children = _ref4.children;
132
146
  const openArticle = useContext(DocLinkContext);
133
147
  return /*#__PURE__*/React.createElement(StyledDocLink, {
134
148
  href: "#",
@@ -149,12 +163,12 @@ const CALLOUT_TYPE = {
149
163
  note: "note",
150
164
  success: "success"
151
165
  };
152
- const CalloutObject = _ref6 => {
153
- var _ref7;
154
- let node = _ref6.node,
155
- children = _ref6.children;
166
+ const CalloutObject = _ref5 => {
167
+ var _ref6;
168
+ let node = _ref5.node,
169
+ children = _ref5.children;
156
170
  return /*#__PURE__*/React.createElement(InfoBox, {
157
- type: CALLOUT_TYPE[(_ref7 = node.tone) != null ? _ref7 : "info"],
171
+ type: CALLOUT_TYPE[(_ref6 = node.tone) != null ? _ref6 : "info"],
158
172
  title: node.title,
159
173
  showIcon: true
160
174
  }, children);
@@ -165,18 +179,18 @@ const CalloutObject = _ref6 => {
165
179
  intentionally non-interactive. */
166
180
  const StyledButtonReference = styled.div.withConfig({
167
181
  displayName: "MessageDialog__StyledButtonReference",
168
- componentId: "sc-1kt5lil-4"
182
+ componentId: "sc-1kt5lil-6"
169
183
  })(["display:flex;.c-button{pointer-events:none;}"]);
170
- const ButtonReferenceObject = _ref8 => {
171
- var _ref9;
172
- let node = _ref8.node;
184
+ const ButtonReferenceObject = _ref7 => {
185
+ var _ref8;
186
+ let node = _ref7.node;
173
187
  if (typeof node.label !== "string") {
174
188
  return null;
175
189
  }
176
190
  return /*#__PURE__*/React.createElement(StyledButtonReference, {
177
191
  "aria-hidden": "true"
178
192
  }, /*#__PURE__*/React.createElement(Button, {
179
- variant: (_ref9 = node.variant) != null ? _ref9 : "primary",
193
+ variant: (_ref8 = node.variant) != null ? _ref8 : "primary",
180
194
  size: "small",
181
195
  type: "button",
182
196
  tabIndex: -1
@@ -184,22 +198,22 @@ const ButtonReferenceObject = _ref8 => {
184
198
  };
185
199
 
186
200
  /* row — a horizontal run of blocks (e.g. two button references). */
187
- const RowObject = _ref0 => {
188
- var _ref1;
189
- let node = _ref0.node,
190
- children = _ref0.children;
201
+ const RowObject = _ref9 => {
202
+ var _ref0;
203
+ let node = _ref9.node,
204
+ children = _ref9.children;
191
205
  return /*#__PURE__*/React.createElement(Row, {
192
- space: (_ref1 = node.space) != null ? _ref1 : "sm"
206
+ space: (_ref0 = node.space) != null ? _ref0 : "sm"
193
207
  }, children);
194
208
  };
195
209
 
196
210
  /* tiles — an equal-size mosaic of blocks. */
197
- const TilesObject = _ref10 => {
198
- var _ref11;
199
- let node = _ref10.node,
200
- children = _ref10.children;
211
+ const TilesObject = _ref1 => {
212
+ var _ref10;
213
+ let node = _ref1.node,
214
+ children = _ref1.children;
201
215
  return /*#__PURE__*/React.createElement(Tiles, {
202
- columns: (_ref11 = node.columns) != null ? _ref11 : 3,
216
+ columns: (_ref10 = node.columns) != null ? _ref10 : 3,
203
217
  space: "md",
204
218
  collapseBelow: "sm"
205
219
  }, children);
@@ -209,12 +223,12 @@ const TilesObject = _ref10 => {
209
223
  screenshots sit on the right, flat illustrations on the left. `widths` is
210
224
  authored as [text, media] and reordered with the columns. */
211
225
 
212
- const SplitObject = _ref12 => {
213
- var _ref13;
214
- let node = _ref12.node,
215
- children = _ref12.children;
226
+ const SplitObject = _ref11 => {
227
+ var _ref12;
228
+ let node = _ref11.node,
229
+ children = _ref11.children;
216
230
  const media = node.media;
217
- const widths = (_ref13 = node.widths) != null ? _ref13 : [1, 1];
231
+ const widths = (_ref12 = node.widths) != null ? _ref12 : [1, 1];
218
232
  const textColumn = /*#__PURE__*/React.createElement(Stack, {
219
233
  space: "lg"
220
234
  }, children);
@@ -243,15 +257,15 @@ const SplitObject = _ref12 => {
243
257
  /* The engine's defaults use Body 1 primary; the messages are designed on the
244
258
  quieter Body 2 secondary voice, so the catalog overrides the text blocks —
245
259
  demonstrating the `blocks` half of the injection contract. */
246
- const ParagraphBlock = _ref14 => {
247
- let children = _ref14.children;
260
+ const ParagraphBlock = _ref13 => {
261
+ let children = _ref13.children;
248
262
  return /*#__PURE__*/React.createElement(Body2, {
249
263
  color: "secondary",
250
264
  lineHeight: "loose"
251
265
  }, children);
252
266
  };
253
- const ListItemBlock = _ref15 => {
254
- let children = _ref15.children;
267
+ const ListItemBlock = _ref14 => {
268
+ let children = _ref14.children;
255
269
  return /*#__PURE__*/React.createElement(Typography, {
256
270
  variant: "Body 2",
257
271
  as: "li",
@@ -260,15 +274,27 @@ const ListItemBlock = _ref15 => {
260
274
  }, children);
261
275
  };
262
276
 
277
+ /* The level 1 heading is the message title and names the dialog; the others
278
+ keep the engine's own heading. */
279
+ const HeadingBlock = props => {
280
+ const block = props.block;
281
+ const DefaultHeading = portableTextDefaultBlockRenderers.heading;
282
+ return /*#__PURE__*/React.createElement(DefaultHeading, _extends({}, props, {
283
+ block: block.level === 1 ? _extends({}, block, {
284
+ id: MESSAGE_TITLE_ID
285
+ }) : block
286
+ }));
287
+ };
288
+
263
289
  /* Titled sections speak in the quiet Header2 subhead voice rather than the
264
290
  engine's default Title2 for level 2, and keep a roomier rhythm between a
265
291
  titled section's content nodes. */
266
- const TitledTextBlock = _ref16 => {
267
- let block = _ref16.block,
268
- children = _ref16.children;
269
- const _ref17 = block,
270
- title = _ref17.title,
271
- level = _ref17.level;
292
+ const TitledTextBlock = _ref15 => {
293
+ let block = _ref15.block,
294
+ children = _ref15.children;
295
+ const _ref16 = block,
296
+ title = _ref16.title,
297
+ level = _ref16.level;
272
298
  return /*#__PURE__*/React.createElement(TitledText, {
273
299
  title: title,
274
300
  variant: level === 1 ? "title1" : "header2"
@@ -294,6 +320,7 @@ export const messageComponents = {
294
320
  },
295
321
  blocks: {
296
322
  paragraph: ParagraphBlock,
323
+ heading: HeadingBlock,
297
324
  "list-item": ListItemBlock,
298
325
  "titled-text": TitledTextBlock
299
326
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MessageDialog.js","names":["React","useContext","styled","MessageFeedback","screenBelow","Button","Columns","IconButton","CancelCrossIcon","InfoBox","Media","Modal","StyledLink","InlineLink","Row","Stack","Tiles","TitledText","Tooltip","Body2","Typography","DIALOG_WIDTH","sm","md","lg","StyledDialog","div","withConfig","displayName","componentId","_ref","$size","MessageDialog","_ref2","open","onClose","_ref2$size","size","_ref2$feedback","feedback","onVote","onFeedbackSubmit","children","createElement","className","title","type","variant","onClick","onSubmit","DocLinkContext","createContext","undefined","StyledInterfaceName","span","InterfaceNameMark","_ref3","StyledKeyboardKey","kbd","KeyboardKeyMark","_ref4","StyledDocLink","DocLinkMark","_ref5","mark","openArticle","href","event","preventDefault","article","CALLOUT_TYPE","info","note","success","CalloutObject","_ref6","_ref7","node","tone","showIcon","StyledButtonReference","ButtonReferenceObject","_ref8","_ref9","label","tabIndex","RowObject","_ref0","_ref1","space","TilesObject","_ref10","_ref11","columns","collapseBelow","SplitObject","_ref12","_ref13","media","widths","textColumn","src","screenshot","mediaColumn","alt","caption","reverse","alignY","ParagraphBlock","_ref14","color","lineHeight","ListItemBlock","_ref15","as","TitledTextBlock","_ref16","block","_ref17","level","messageComponents","marks","objects","callout","row","tiles","split","blocks","paragraph"],"sources":["../../../../src/presentation/shared/MessageDialog.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode, useContext } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { MessageFeedback } from \"./MessageFeedback\";\nimport type { MessageFeedbackResult } from \"./MessageFeedback\";\nimport { screenBelow } from \"../../components/BreakPoints\";\nimport { Button } from \"../../components/Button\";\nimport { Columns } from \"../../components/Columns\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { CancelCrossIcon } 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 PortableTextMediaImageVariant,\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/* 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 /** Show the reusable helpful / not-helpful feedback flow. */\n feedback?: boolean;\n /** Fired when a thumb is pressed (the vote itself). */\n onVote?: (sentiment: \"up\" | \"down\") => void;\n /** Fired on Submit, with the chosen options and comment. */\n onFeedbackSubmit?: (result: MessageFeedbackResult) => void;\n children: ReactNode;\n}\n\nexport const MessageDialog = ({\n open,\n onClose,\n size = \"md\",\n feedback = false,\n onVote,\n onFeedbackSubmit,\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 {feedback ? (\n <MessageFeedback onVote={onVote} onSubmit={onFeedbackSubmit} />\n ) : 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 // Split never carries a video: video media always stays in the vertical flow.\n variant?: PortableTextMediaImageVariant;\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,OAAOA,KAAK,IAA6BC,UAAU,QAAQ,OAAO;AAElE,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,eAAe,QAAQ,mBAAmB;AAEnD,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,OAAO,QAAQ,0BAA0B;AAClD,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,eAAe,QAAQ,wBAAwB;AACxD,SAASC,OAAO,QAAqB,0BAA0B;AAE/D,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,KAAK,QAAQ,wBAAwB;AAS9C,SAASC,UAAU,IAAIC,UAAU,QAAQ,sCAAsC;AAC/E,SAASC,GAAG,QAAQ,sBAAsB;AAC1C,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,OAAO,QAAQ,0BAA0B;AAClD,SAASC,KAAK,QAAQ,6BAA6B;AACnD,SAASC,UAAU,QAAQ,wCAAwC;;AAEnE;AACA;AACA;AACA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C,aAAA,CAACvB,UAAU;IAAC2B,OAAO,EAAC,QAAQ;IAACmE,EAAE,EAAC,IAAI;IAACJ,KAAK,EAAC,WAAW;IAACC,UAAU,EAAC;EAAO,GACtErE,QACS,CAAC;AAAA,CACd;;AAED;AACA;AACA;AACA,MAAMyE,eAA0C,GAAGC,MAAA,IAAyB;EAAA,IAAtBC,KAAK,GAAAD,MAAA,CAALC,KAAK;IAAE3E,QAAQ,GAAA0E,MAAA,CAAR1E,QAAQ;EACnE,MAAA4E,MAAA,GAAyBD,KAAK;IAAtBxE,KAAK,GAAAyE,MAAA,CAALzE,KAAK;IAAE0E,KAAK,GAAAD,MAAA,CAALC,KAAK;EAEpB,oBACEvH,KAAA,CAAA2C,aAAA,CAAC1B,UAAU;IAAC4B,KAAK,EAAEA,KAAM;IAACE,OAAO,EAAEwE,KAAK,KAAK,CAAC,GAAG,QAAQ,GAAG;EAAU,GACnE7E,QAAQ,gBAAG1C,KAAA,CAAA2C,aAAA,CAAC5B,KAAK;IAAC0E,KAAK,EAAC;EAAI,GAAE/C,QAAgB,CAAC,GAAGU,SACzC,CAAC;AAEjB,CAAC;;AAED;AACA;AACA,OAAO,MAAMoE,iBAAyC,GAAG;EACvDC,KAAK,EAAE;IACL,gBAAgB,EAAElE,iBAAiB;IACnC,cAAc,EAAEI,eAAe;IAC/B,UAAU,EAAEG;EACd,CAAC;EACD4D,OAAO,EAAE;IACPC,OAAO,EAAEjD,aAAa;IACtB,kBAAkB,EAAEO,qBAAqB;IACzC2C,GAAG,EAAEtC,SAAS;IACduC,KAAK,EAAEnC,WAAW;IAClBoC,KAAK,EAAE/B;EACT,CAAC;EACDgC,MAAM,EAAE;IACNC,SAAS,EAAEpB,cAAc;IACzB,WAAW,EAAEI,aAAa;IAC1B,aAAa,EAAEG;EACjB;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"MessageDialog.js","names":["React","useContext","styled","MessageFeedback","screenBelow","Button","Columns","Dialog","IconButton","CancelCrossIcon","InfoBox","Media","portableTextDefaultBlockRenderers","StyledLink","InlineLink","Row","Stack","Tiles","TitledText","Tooltip","Body2","Typography","MESSAGE_TITLE_ID","DIALOG_SIZE","sm","md","lg","StyledMessageClose","div","withConfig","displayName","componentId","StyledMessageContent","Content","StyledMessageBody","MessageDialog","_ref","open","onClose","_ref$size","size","_ref$feedback","feedback","onVote","onFeedbackSubmit","children","createElement","enableBackgroundClick","role","title","type","variant","onClick","onSubmit","DocLinkContext","createContext","undefined","StyledInterfaceName","span","InterfaceNameMark","_ref2","StyledKeyboardKey","kbd","KeyboardKeyMark","_ref3","StyledDocLink","DocLinkMark","_ref4","mark","openArticle","href","event","preventDefault","article","CALLOUT_TYPE","info","note","success","CalloutObject","_ref5","_ref6","node","tone","showIcon","StyledButtonReference","ButtonReferenceObject","_ref7","_ref8","label","tabIndex","RowObject","_ref9","_ref0","space","TilesObject","_ref1","_ref10","columns","collapseBelow","SplitObject","_ref11","_ref12","media","widths","textColumn","src","screenshot","mediaColumn","alt","caption","reverse","alignY","ParagraphBlock","_ref13","color","lineHeight","ListItemBlock","_ref14","as","HeadingBlock","props","block","DefaultHeading","heading","_extends","level","id","TitledTextBlock","_ref15","_ref16","messageComponents","marks","objects","callout","row","tiles","split","blocks","paragraph"],"sources":["../../../../src/presentation/shared/MessageDialog.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode, useContext } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { MessageFeedback } from \"./MessageFeedback\";\nimport type { MessageFeedbackResult } from \"./MessageFeedback\";\nimport { screenBelow } from \"../../components/BreakPoints\";\nimport { Button } from \"../../components/Button\";\nimport { Columns } from \"../../components/Columns\";\nimport { Dialog } from \"../../components/Dialog\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { CancelCrossIcon } from \"../../components/Icons\";\nimport { InfoBox, InfoBoxType } from \"../../components/InfoBox\";\nimport { Space } from \"../../components/LayoutTokens\";\nimport { Media } from \"../../components/Media\";\nimport {\n PortableTextBlockRenderer,\n PortableTextComponents,\n PortableTextHeadingBlock,\n PortableTextMarkRenderer,\n PortableTextMediaImageVariant,\n PortableTextObjectRenderer,\n PortableTextTitledTextBlock,\n portableTextDefaultBlockRenderers,\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\n/** The id the dialog points `aria-labelledby` at, carried by the message's\n level 1 heading, as in the app's message catalog (Heading.jsx). */\nexport const MESSAGE_TITLE_ID = \"in-app-message-title\";\n\n/* The app maps its message sizes onto DS Dialog steps (InAppMessageDialog constants). */\nconst DIALOG_SIZE: Record<MessageDialogSize, \"m\" | \"l\" | \"xl\"> = {\n sm: \"m\",\n md: \"l\",\n lg: \"xl\",\n};\n\n/* The shell is a DS Dialog, as in the app: it closes on click-outside, Esc and\n the X, and shows the feedback slot when an onVote handler is supplied.\n Content is whatever the caller renders as children — usually the Portable\n Text engine with the demo catalog injected. */\n\n/* X floats in the corner and overlaps the content padding — it does not\n reserve a row of its own. */\nconst StyledMessageClose = styled.div`\n position: absolute;\n top: 12px;\n right: 12px;\n z-index: 2;\n`;\n\nconst StyledMessageContent = styled(Dialog.Content)`\n && {\n padding: 0;\n }\n`;\n\nconst StyledMessageBody = styled.div`\n padding: 40px;\n\n ${screenBelow.sm} {\n padding: 32px 20px 24px;\n }\n`;\n\nexport interface MessageDialogProps {\n open: boolean;\n onClose: () => void;\n size?: MessageDialogSize;\n /** Show the reusable helpful / not-helpful feedback flow. */\n feedback?: boolean;\n /** Fired when a thumb is pressed (the vote itself). */\n onVote?: (sentiment: \"up\" | \"down\") => void;\n /** Fired on Submit, with the chosen options and comment. */\n onFeedbackSubmit?: (result: MessageFeedbackResult) => void;\n children: ReactNode;\n}\n\nexport const MessageDialog = ({\n open,\n onClose,\n size = \"md\",\n feedback = false,\n onVote,\n onFeedbackSubmit,\n children,\n}: MessageDialogProps): ReactElement => (\n <Dialog\n open={open}\n onClose={onClose}\n size={DIALOG_SIZE[size]}\n enableBackgroundClick\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={MESSAGE_TITLE_ID}\n >\n <StyledMessageClose>\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 </StyledMessageClose>\n <StyledMessageContent>\n <StyledMessageBody>{children}</StyledMessageBody>\n {feedback ? (\n <MessageFeedback onVote={onVote} onSubmit={onFeedbackSubmit} />\n ) : null}\n </StyledMessageContent>\n </Dialog>\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 // Split never carries a video: video media always stays in the vertical flow.\n variant?: PortableTextMediaImageVariant;\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/* The level 1 heading is the message title and names the dialog; the others\n keep the engine's own heading. */\nconst HeadingBlock: PortableTextBlockRenderer = (props) => {\n const block = props.block as PortableTextHeadingBlock;\n const DefaultHeading = portableTextDefaultBlockRenderers.heading;\n\n return (\n <DefaultHeading\n {...props}\n block={block.level === 1 ? { ...block, id: MESSAGE_TITLE_ID } : block}\n />\n );\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 heading: HeadingBlock,\n \"list-item\": ListItemBlock,\n \"titled-text\": TitledTextBlock,\n },\n};\n"],"mappings":";AAAA,OAAOA,KAAK,IAA6BC,UAAU,QAAQ,OAAO;AAElE,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,eAAe,QAAQ,mBAAmB;AAEnD,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,OAAO,QAAQ,0BAA0B;AAClD,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,eAAe,QAAQ,wBAAwB;AACxD,SAASC,OAAO,QAAqB,0BAA0B;AAE/D,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAQEC,iCAAiC,QAC5B,+BAA+B;AACtC,SAASC,UAAU,IAAIC,UAAU,QAAQ,sCAAsC;AAC/E,SAASC,GAAG,QAAQ,sBAAsB;AAC1C,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,OAAO,QAAQ,0BAA0B;AAClD,SAASC,KAAK,QAAQ,6BAA6B;AACnD,SAASC,UAAU,QAAQ,wCAAwC;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAIA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAG,sBAAsB;;AAEtD;AACA,MAAMC,WAAwD,GAAG;EAC/DC,EAAE,EAAE,GAAG;EACPC,EAAE,EAAE,GAAG;EACPC,EAAE,EAAE;AACN,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAMC,kBAAkB,GAAGzB,MAAM,CAAC0B,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wDAKpC;AAED,MAAMC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AK,EAAEzC,WAAW;IAClB0C,KAAK,EAAErC;EACT,CAAC;EACDsC,MAAM,EAAE;IACNC,SAAS,EAAE1B,cAAc;IACzBW,OAAO,EAAEJ,YAAY;IACrB,WAAW,EAAEH,aAAa;IAC1B,aAAa,EAAEW;EACjB;AACF,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"PresentationShell.d.ts","sourceRoot":"","sources":["../../../../src/presentation/shared/PresentationShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,YAAY,EACZ,SAAS,EAKV,MAAM,OAAO,CAAC;AAgWf,gFAAgF;AAChF,eAAO,MAAM,eAAe,wMAG3B,CAAC;AAmJF,MAAM,WAAW,sBAAsB;IACrC,gFAAgF;IAChF,MAAM,EAAE,SAAS,CAAC;IAClB,kEAAkE;IAClE,QAAQ,EAAE,SAAS,CAAC;IACpB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,4FAA4F;IAC5F,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;kEAM3B,sBAAsB,GAAG,YAAY;;CA2DvC,CAAC"}
1
+ {"version":3,"file":"PresentationShell.d.ts","sourceRoot":"","sources":["../../../../src/presentation/shared/PresentationShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,YAAY,EACZ,SAAS,EAKV,MAAM,OAAO,CAAC;AA8Vf,gFAAgF;AAChF,eAAO,MAAM,eAAe,wMAG3B,CAAC;AAkJF,MAAM,WAAW,sBAAsB;IACrC,gFAAgF;IAChF,MAAM,EAAE,SAAS,CAAC;IAClB,kEAAkE;IAClE,QAAQ,EAAE,SAAS,CAAC;IACpB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,4FAA4F;IAC5F,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;kEAM3B,sBAAsB,GAAG,YAAY;;CA2DvC,CAAC"}
@@ -2,9 +2,9 @@ import React, { useCallback, useEffect, useRef, useState } from "react";
2
2
  import styled from "styled-components";
3
3
  import { MainLogo } from "./MainLogo";
4
4
  import { BREAKPOINT, SM, TRANSITION, XL } from "./tokens";
5
+ import { Drawer } from "../../components/Drawer";
5
6
  import { IconButton } from "../../components/IconButton";
6
7
  import { ActivityIcon, CalendarIcon, ClockStopwatchIndicatorIcon, CloseIcon, CollapsIcon, EstimatesIcon, InvoicesIcon, MobileMenuIcon, MyWorkIcon, NotificationBellIcon, PeopleIcon, ProjectsIcon, ReportTimeIcon, ReportsIcon, RocketIcon, SearchIcon } from "../../components/Icons";
7
- import { Modal } from "../../components/Modal";
8
8
  import { Paper } from "../../components/Paper";
9
9
  import { Tooltip } from "../../components/Tooltip";
10
10
  import { Body2, Caption1 } from "../../components/Typography";
@@ -65,7 +65,7 @@ const StyledRightWindow = styled.div.withConfig({
65
65
  const StyledMainMenu = styled.div.withConfig({
66
66
  displayName: "PresentationShell__StyledMainMenu",
67
67
  componentId: "sc-12j90o1-3"
68
- })(["position:relative;z-index:1;display:none;flex-direction:column;height:100%;margin-right:4px;flex-shrink:0;width:240px;transition:width ", ";@media (min-width:", "){display:flex;}&.collapsed{width:72px;}.menu-item-text,.menu-section,#logotype{transition:all ", ";}&.collapsed .menu-item-text{opacity:0;visibility:hidden;width:0;margin-left:0;}&.collapsed .menu-section{transform:scaleY(0);opacity:0;max-height:0;margin-bottom:0;}&.collapsed #logotype{transform:translateX(-5%);opacity:0;}&.collapsed .collapse-expand-menu svg{transform:rotate(180deg);}&:not(.mobile){@media (max-width:1279.98px){width:72px;.menu-item-text{opacity:0;visibility:hidden;width:0;margin-left:0;}.menu-section{transform:scaleY(0);opacity:0;max-height:0;margin-bottom:0;}#logotype{transform:translateX(-5%);opacity:0;}}}&.mobile{display:flex;position:absolute;left:0;top:0;width:240px;background-color:var(--page-paper-main);}"], TRANSITION, SM, TRANSITION);
68
+ })(["position:relative;z-index:1;display:none;flex-direction:column;height:100%;margin-right:4px;flex-shrink:0;width:240px;transition:width ", ";@media (min-width:", "){display:flex;}&.collapsed{width:72px;}.menu-item-text,.menu-section,#logotype{transition:all ", ";}&.collapsed .menu-item-text{opacity:0;visibility:hidden;width:0;margin-left:0;}&.collapsed .menu-section{transform:scaleY(0);opacity:0;max-height:0;margin-bottom:0;}&.collapsed #logotype{transform:translateX(-5%);opacity:0;}&.collapsed .collapse-expand-menu svg{transform:rotate(180deg);}&:not(.mobile){@media (max-width:1279.98px){width:72px;.menu-item-text{opacity:0;visibility:hidden;width:0;margin-left:0;}.menu-section{transform:scaleY(0);opacity:0;max-height:0;margin-bottom:0;}#logotype{transform:translateX(-5%);opacity:0;}}}&.mobile{display:flex;width:100%;margin-right:0;}"], TRANSITION, SM, TRANSITION);
69
69
  const StyledMenuHeader = styled.div.withConfig({
70
70
  displayName: "PresentationShell__StyledMenuHeader",
71
71
  componentId: "sc-12j90o1-4"
@@ -183,12 +183,12 @@ const MainMenuMobileMock = _ref4 => {
183
183
  close = _ref4.close,
184
184
  footer = _ref4.footer,
185
185
  activeItem = _ref4.activeItem;
186
- return open ? /*#__PURE__*/React.createElement(Modal, {
186
+ return /*#__PURE__*/React.createElement(Drawer, {
187
187
  open: open,
188
- onClose: close
189
- }, /*#__PURE__*/React.createElement(StyledMainMenu, {
190
- className: "mobile",
188
+ onClose: close,
191
189
  "data-testid": "main-menu-mobile"
190
+ }, /*#__PURE__*/React.createElement(StyledMainMenu, {
191
+ className: "mobile"
192
192
  }, /*#__PURE__*/React.createElement(StyledMenuHeader, null, /*#__PURE__*/React.createElement("a", {
193
193
  className: "main-logo"
194
194
  }, /*#__PURE__*/React.createElement(MainLogo, null)), /*#__PURE__*/React.createElement(StyledMobileMenuClose, {
@@ -197,7 +197,7 @@ const MainMenuMobileMock = _ref4 => {
197
197
  }, /*#__PURE__*/React.createElement(CloseIcon, null))), /*#__PURE__*/React.createElement(MenuItemsMock, {
198
198
  mobile: true,
199
199
  activeItem: activeItem
200
- }), footer)) : null;
200
+ }), footer));
201
201
  };
202
202
  const MobileMenuHeaderMock = _ref5 => {
203
203
  let onOpenMobileMenu = _ref5.onOpenMobileMenu;
@@ -1 +1 @@
1
- {"version":3,"file":"PresentationShell.js","names":["React","useCallback","useEffect","useRef","useState","styled","MainLogo","BREAKPOINT","SM","TRANSITION","XL","IconButton","ActivityIcon","CalendarIcon","ClockStopwatchIndicatorIcon","CloseIcon","CollapsIcon","EstimatesIcon","InvoicesIcon","MobileMenuIcon","MyWorkIcon","NotificationBellIcon","PeopleIcon","ProjectsIcon","ReportTimeIcon","ReportsIcon","RocketIcon","SearchIcon","Modal","Paper","Tooltip","Body2","Caption1","DARK_THEME_SELECTOR","useResizeObserver","MENU_ITEMS","icon","text","StyledLayout","div","withConfig","displayName","componentId","StyledContentRow","StyledRightWindow","StyledMainMenu","StyledMenuHeader","StyledMenuScroll","StyledMenuSection","StyledMenuItem","a","StyledMobileMenuClose","StyledMobileMenuHeader","StyledIconRow","StyledTopRightControls","StyledHeaderAvatar","StyledPage","StyledPageBody","StyledPagePaper","MenuItemsMock","_ref","_ref$mobile","mobile","activeItem","createElement","className","weight","color","map","_ref2","Icon","key","title","placement","disable","undefined","whitespace","MainMenuMock","_ref3","collapsed","onToggleCollapsed","footer","variant","size","onClick","MainMenuMobileMock","_ref4","open","close","onClose","MobileMenuHeaderMock","_ref5","onOpenMobileMenu","TopRightControlsMock","PresentationShell","_ref6","header","children","floating","menuFooter","_ref6$activeMenuItem","activeMenuItem","_useState","mobileMenuOpen","setMobileMenuOpen","_useState2","setCollapsed","_useState3","isMobileView","setIsMobileView","ref","dimensions","width","handleOpenMobileMenu","handleCloseMobileMenu","handleToggleCollapsed","prev","id"],"sources":["../../../../src/presentation/shared/PresentationShell.tsx"],"sourcesContent":["import React, {\n ReactElement,\n ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { MainLogo } from \"./MainLogo\";\nimport { BREAKPOINT, SM, TRANSITION, XL } from \"./tokens\";\nimport { IconButton } from \"../../components/IconButton\";\nimport {\n ActivityIcon,\n CalendarIcon,\n ClockStopwatchIndicatorIcon,\n CloseIcon,\n CollapsIcon,\n EstimatesIcon,\n InvoicesIcon,\n MobileMenuIcon,\n MyWorkIcon,\n NotificationBellIcon,\n PeopleIcon,\n ProjectsIcon,\n ReportTimeIcon,\n ReportsIcon,\n RocketIcon,\n SearchIcon,\n} from \"../../components/Icons\";\nimport { Modal } from \"../../components/Modal\";\nimport { Paper } from \"../../components/Paper\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Body2, Caption1 } from \"../../components/Typography\";\nimport { DARK_THEME_SELECTOR, useResizeObserver } from \"../../utils\";\n\nconst MENU_ITEMS: {\n icon: React.FC<React.SVGProps<SVGSVGElement>>;\n text: string;\n}[] = [\n { icon: RocketIcon, text: \"Getting Started\" },\n { icon: ProjectsIcon, text: \"Projects\" },\n { icon: MyWorkIcon, text: \"My Work\" },\n { icon: ActivityIcon, text: \"Activity\" },\n { icon: CalendarIcon, text: \"Calendar\" },\n { icon: PeopleIcon, text: \"People\" },\n { icon: ReportTimeIcon, text: \"Time\" },\n { icon: ReportsIcon, text: \"Reports\" },\n { icon: InvoicesIcon, text: \"Invoices\" },\n { icon: EstimatesIcon, text: \"Estimates\" },\n];\n\n/* ------------------------------------------------------------------ */\n/* Layout shell (mirrors Layout.js) */\n/* ------------------------------------------------------------------ */\n\nconst StyledLayout = styled.div`\n height: 100vh;\n display: flex;\n flex-direction: column;\n background-color: var(--body-bg-main);\n`;\n\nconst StyledContentRow = styled.div`\n position: relative;\n display: flex;\n flex-direction: row-reverse;\n flex: 1 1 0%;\n flex-grow: 1;\n overflow-y: auto;\n`;\n\nconst StyledRightWindow = styled.div`\n position: relative;\n display: flex;\n flex-direction: column;\n flex: 1 1 0%;\n flex-grow: 1;\n width: 100%;\n height: 100%;\n overflow-y: auto;\n padding: 0 16px;\n\n @media (min-width: ${SM}) {\n padding-right: 32px;\n }\n`;\n\n/* ------------------------------------------------------------------ */\n/* Main menu (mirrors MainMenu.js + MainMenu.less) */\n/* ------------------------------------------------------------------ */\n\nconst StyledMainMenu = styled.div`\n position: relative;\n z-index: 1;\n display: none;\n flex-direction: column;\n height: 100%;\n margin-right: 4px;\n flex-shrink: 0;\n width: 240px;\n transition: width ${TRANSITION};\n\n @media (min-width: ${SM}) {\n display: flex;\n }\n\n &.collapsed {\n width: 72px;\n }\n\n .menu-item-text,\n .menu-section,\n #logotype {\n transition: all ${TRANSITION};\n }\n\n &.collapsed .menu-item-text {\n opacity: 0;\n visibility: hidden;\n width: 0;\n margin-left: 0;\n }\n\n &.collapsed .menu-section {\n transform: scaleY(0);\n opacity: 0;\n max-height: 0;\n margin-bottom: 0;\n }\n\n &.collapsed #logotype {\n transform: translateX(-5%);\n opacity: 0;\n }\n\n &.collapsed .collapse-expand-menu svg {\n transform: rotate(180deg);\n }\n\n &:not(.mobile) {\n @media (max-width: 1279.98px) {\n width: 72px;\n\n .menu-item-text {\n opacity: 0;\n visibility: hidden;\n width: 0;\n margin-left: 0;\n }\n\n .menu-section {\n transform: scaleY(0);\n opacity: 0;\n max-height: 0;\n margin-bottom: 0;\n }\n\n #logotype {\n transform: translateX(-5%);\n opacity: 0;\n }\n }\n }\n\n &.mobile {\n display: flex;\n position: absolute;\n left: 0;\n top: 0;\n width: 240px;\n background-color: var(--page-paper-main);\n }\n`;\n\nconst StyledMenuHeader = styled.div`\n position: relative;\n height: 68px;\n display: flex;\n align-items: center;\n flex-shrink: 0;\n overflow: hidden;\n\n .main-logo {\n position: absolute;\n left: 20px;\n color: var(--color-secondary);\n\n path {\n fill: var(--color-secondary);\n }\n }\n\n .collapse-expand-menu {\n position: absolute;\n right: 4px;\n display: none;\n\n @media (min-width: ${XL}) {\n display: flex;\n }\n }\n`;\n\nconst StyledMenuScroll = styled.div`\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n min-height: 0;\n margin: 12px 0;\n overflow-y: auto;\n overflow-x: hidden;\n`;\n\nconst StyledMenuSection = styled.div`\n display: flex;\n align-items: center;\n margin: 0 12px 8px;\n padding: 0 4px 0 12px;\n`;\n\nconst StyledMenuItem = styled.a`\n display: flex;\n align-items: center;\n height: 40px;\n padding: 0 4px 0 12px;\n margin: 0 12px 2px;\n border-radius: 8px;\n cursor: pointer;\n text-decoration: none;\n\n svg {\n flex-shrink: 0;\n fill: var(--color-theme-700);\n opacity: 0.7;\n }\n\n .menu-item-text {\n margin-left: 12px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n &:hover {\n transition: all ${TRANSITION};\n background-color: var(--color-theme-300);\n\n svg {\n fill: var(--color-theme-900);\n opacity: 1;\n }\n\n .menu-item-text {\n color: var(--color-theme-900);\n }\n }\n\n &.active {\n background-color: var(--color-secondary-200);\n\n svg {\n fill: var(--color-secondary);\n opacity: 1;\n }\n\n .menu-item-text {\n color: var(--color-secondary);\n }\n }\n`;\n\nconst StyledMobileMenuClose = styled(IconButton)`\n position: absolute;\n right: 16px;\n`;\n\n/* ------------------------------------------------------------------ */\n/* Top bars */\n/* ------------------------------------------------------------------ */\n\nconst StyledMobileMenuHeader = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 16px;\n background-color: var(--color-primary);\n z-index: 50;\n\n @media (min-width: ${SM}) {\n display: none;\n }\n\n .mobile-menu-icon {\n fill: var(--color-theme-300);\n }\n`;\n\nconst StyledIconRow = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst StyledTopRightControls = styled.div`\n position: absolute;\n top: 0;\n right: 0;\n z-index: 11;\n display: none;\n align-items: center;\n justify-content: flex-end;\n padding: 12px 32px 12px 0;\n\n @media (min-width: ${SM}) {\n display: flex;\n }\n`;\n\nconst StyledHeaderAvatar = styled.div`\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background-color: var(--color-secondary);\n color: var(--only-white);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n font-weight: 600;\n margin: 0 8px;\n flex-shrink: 0;\n cursor: pointer;\n\n /* dark themes: use paper colour for the initials */\n ${DARK_THEME_SELECTOR} & {\n color: var(--page-paper-main);\n }\n`;\n\n/* ------------------------------------------------------------------ */\n/* Page region (mirrors Page.jsx / PageBody.jsx) */\n/* ------------------------------------------------------------------ */\n\nconst StyledPage = styled.div`\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n`;\n\nconst StyledPageBody = styled.div`\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n margin-bottom: 32px;\n min-height: 0;\n`;\n\n/** The paper card that holds page content (used by list view & empty pages). */\nexport const StyledPagePaper = styled(Paper)`\n flex-grow: 1;\n width: 100%;\n`;\n\n/* ------------------------------------------------------------------ */\n/* Mocked layout building blocks */\n/* ------------------------------------------------------------------ */\n\ninterface MenuItemsProps {\n mobile?: boolean;\n activeItem: string;\n}\n\nconst MenuItemsMock = ({\n mobile = false,\n activeItem,\n}: MenuItemsProps): ReactElement => (\n <StyledMenuScroll>\n <StyledMenuSection className=\"menu-section\">\n <Caption1 weight=\"bold\" color=\"tertiary\">\n MENU\n </Caption1>\n </StyledMenuSection>\n {MENU_ITEMS.map(({ icon: Icon, text }) => (\n <Tooltip key={text} title={text} placement=\"right\" disable={mobile}>\n <StyledMenuItem className={text === activeItem ? \"active\" : undefined}>\n <Icon />\n <Body2\n weight=\"medium\"\n color=\"secondary\"\n whitespace=\"no-wrap\"\n className=\"menu-item-text\"\n >\n {text}\n </Body2>\n </StyledMenuItem>\n </Tooltip>\n ))}\n </StyledMenuScroll>\n);\n\ninterface MainMenuMockProps {\n collapsed: boolean;\n onToggleCollapsed: () => void;\n footer?: ReactNode;\n activeItem: string;\n}\n\nconst MainMenuMock = ({\n collapsed,\n onToggleCollapsed,\n footer,\n activeItem,\n}: MainMenuMockProps): ReactElement => (\n <StyledMainMenu\n className={collapsed ? \"collapsed\" : undefined}\n data-testid=\"main-menu\"\n >\n <StyledMenuHeader>\n <a className=\"main-logo\">\n <MainLogo />\n </a>\n <div className=\"collapse-expand-menu\">\n <IconButton\n variant=\"text gray\"\n size=\"small\"\n onClick={onToggleCollapsed}\n >\n <CollapsIcon />\n </IconButton>\n </div>\n </StyledMenuHeader>\n <MenuItemsMock activeItem={activeItem} />\n {footer}\n </StyledMainMenu>\n);\n\ninterface MainMenuMobileMockProps {\n open: boolean;\n close: () => void;\n footer?: ReactNode;\n activeItem: string;\n}\n\nconst MainMenuMobileMock = ({\n open,\n close,\n footer,\n activeItem,\n}: MainMenuMobileMockProps): ReactElement | null =>\n open ? (\n <Modal open={open} onClose={close}>\n <StyledMainMenu className=\"mobile\" data-testid=\"main-menu-mobile\">\n <StyledMenuHeader>\n <a className=\"main-logo\">\n <MainLogo />\n </a>\n <StyledMobileMenuClose onClick={close} variant=\"text gray\">\n <CloseIcon />\n </StyledMobileMenuClose>\n </StyledMenuHeader>\n <MenuItemsMock mobile activeItem={activeItem} />\n {footer}\n </StyledMainMenu>\n </Modal>\n ) : null;\n\ninterface MobileMenuHeaderMockProps {\n onOpenMobileMenu: () => void;\n}\n\nconst MobileMenuHeaderMock = ({\n onOpenMobileMenu,\n}: MobileMenuHeaderMockProps): ReactElement => (\n <StyledMobileMenuHeader>\n <IconButton size=\"big\" variant=\"circle raised\" onClick={onOpenMobileMenu}>\n <MobileMenuIcon className=\"mobile-menu-icon\" />\n </IconButton>\n <StyledIconRow>\n <IconButton variant=\"text gray\">\n <SearchIcon />\n </IconButton>\n <StyledHeaderAvatar>JS</StyledHeaderAvatar>\n <IconButton variant=\"text gray\">\n <NotificationBellIcon />\n </IconButton>\n </StyledIconRow>\n </StyledMobileMenuHeader>\n);\n\nconst TopRightControlsMock = (): ReactElement => (\n <StyledTopRightControls>\n <IconButton variant=\"text gray\">\n <ClockStopwatchIndicatorIcon />\n </IconButton>\n <IconButton variant=\"text gray\">\n <SearchIcon />\n </IconButton>\n <StyledHeaderAvatar>JS</StyledHeaderAvatar>\n <IconButton variant=\"text gray\">\n <NotificationBellIcon />\n </IconButton>\n </StyledTopRightControls>\n);\n\n/* ------------------------------------------------------------------ */\n/* PresentationShell */\n/* ------------------------------------------------------------------ */\n\nexport interface PresentationShellProps {\n /** Page header row (e.g. <ProjectPageHeader /> or <PageHeader title=\"…\" />). */\n header: ReactNode;\n /** Page body content rendered inside the scrollable page area. */\n children: ReactNode;\n /** Optional fixed controls (e.g. <FloatingControls />). */\n floating?: ReactNode;\n /** Optional content pinned to the bottom of the main menu (e.g. <HelpAndSupportMenu />). */\n menuFooter?: ReactNode;\n activeMenuItem?: string;\n}\n\n/**\n * The full application shell shared by every presentation mock-up: the main\n * menu on the left (auto-collapsing below 1280px, modal below 640px), the\n * top-right controls and the scrollable page area. Pass the page header via\n * `header` and the body via `children`.\n */\nexport const PresentationShell = ({\n header,\n children,\n floating,\n menuFooter,\n activeMenuItem = \"Projects\",\n}: PresentationShellProps): ReactElement => {\n const [mobileMenuOpen, setMobileMenuOpen] = useState(false);\n const [collapsed, setCollapsed] = useState(false);\n const [isMobileView, setIsMobileView] = useState<boolean>();\n\n const ref = useRef<HTMLDivElement>(null);\n const dimensions = useResizeObserver(ref);\n const width = dimensions?.width;\n\n useEffect(() => {\n if (width) {\n if (width < BREAKPOINT) {\n setIsMobileView(true);\n } else {\n setIsMobileView(false);\n setMobileMenuOpen(false);\n }\n }\n }, [width]);\n\n const handleOpenMobileMenu = useCallback(() => setMobileMenuOpen(true), []);\n const handleCloseMobileMenu = useCallback(() => setMobileMenuOpen(false), []);\n const handleToggleCollapsed = useCallback(\n () => setCollapsed((prev) => !prev),\n []\n );\n\n return (\n <StyledLayout ref={ref}>\n {isMobileView ? (\n <MobileMenuHeaderMock onOpenMobileMenu={handleOpenMobileMenu} />\n ) : null}\n <StyledContentRow>\n <StyledRightWindow id=\"right-window\">\n <StyledPage>\n {header}\n <StyledPageBody>{children}</StyledPageBody>\n </StyledPage>\n {isMobileView === false ? <TopRightControlsMock /> : null}\n </StyledRightWindow>\n {isMobileView ? (\n <MainMenuMobileMock\n open={mobileMenuOpen}\n close={handleCloseMobileMenu}\n footer={menuFooter}\n activeItem={activeMenuItem}\n />\n ) : (\n <MainMenuMock\n collapsed={collapsed}\n onToggleCollapsed={handleToggleCollapsed}\n footer={menuFooter}\n activeItem={activeMenuItem}\n />\n )}\n </StyledContentRow>\n {floating}\n </StyledLayout>\n );\n};\n\nPresentationShell.displayName = \"PresentationShell\";\n"],"mappings":"AAAA,OAAOA,KAAK,IAGVC,WAAW,EACXC,SAAS,EACTC,MAAM,EACNC,QAAQ,QACH,OAAO;AAEd,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,QAAQ,QAAQ,YAAY;AACrC,SAASC,UAAU,EAAEC,EAAE,EAAEC,UAAU,EAAEC,EAAE,QAAQ,UAAU;AACzD,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SACEC,YAAY,EACZC,YAAY,EACZC,2BAA2B,EAC3BC,SAAS,EACTC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,oBAAoB,EACpBC,UAAU,EACVC,YAAY,EACZC,cAAc,EACdC,WAAW,EACXC,UAAU,EACVC,UAAU,QACL,wBAAwB;AAC/B,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,OAAO,QAAQ,0BAA0B;AAClD,SAASC,KAAK,EAAEC,QAAQ,QAAQ,6BAA6B;AAC7D,SAASC,mBAAmB,EAAEC,iBAAiB,QAAQ,aAAa;AAEpE,MAAMC,UAGH,GAAG,CACJ;EAAEC,IAAI,EAAEV,UAAU;EAAEW,IAAI,EAAE;AAAkB,CAAC,EAC7C;EAAED,IAAI,EAAEb,YAAY;EAAEc,IAAI,EAAE;AAAW,CAAC,EACxC;EAAED,IAAI,EAAEhB,UAAU;EAAEiB,I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,EAAEkB,UAAW;IACnBpC,UAAU,EAAEsC;EAAe,CAC5B,CAEa,CAAC,EAClBH,QACW,CAAC;AAEnB,CAAC;AAEDJ,iBAAiB,CAACrD,WAAW,GAAG,mBAAmB","ignoreList":[]}
1
+ {"version":3,"file":"PresentationShell.js","names":["React","useCallback","useEffect","useRef","useState","styled","MainLogo","BREAKPOINT","SM","TRANSITION","XL","Drawer","IconButton","ActivityIcon","CalendarIcon","ClockStopwatchIndicatorIcon","CloseIcon","CollapsIcon","EstimatesIcon","InvoicesIcon","MobileMenuIcon","MyWorkIcon","NotificationBellIcon","PeopleIcon","ProjectsIcon","ReportTimeIcon","ReportsIcon","RocketIcon","SearchIcon","Paper","Tooltip","Body2","Caption1","DARK_THEME_SELECTOR","useResizeObserver","MENU_ITEMS","icon","text","StyledLayout","div","withConfig","displayName","componentId","StyledContentRow","StyledRightWindow","StyledMainMenu","StyledMenuHeader","StyledMenuScroll","StyledMenuSection","StyledMenuItem","a","StyledMobileMenuClose","StyledMobileMenuHeader","StyledIconRow","StyledTopRightControls","StyledHeaderAvatar","StyledPage","StyledPageBody","StyledPagePaper","MenuItemsMock","_ref","_ref$mobile","mobile","activeItem","createElement","className","weight","color","map","_ref2","Icon","key","title","placement","disable","undefined","whitespace","MainMenuMock","_ref3","collapsed","onToggleCollapsed","footer","variant","size","onClick","MainMenuMobileMock","_ref4","open","close","onClose","MobileMenuHeaderMock","_ref5","onOpenMobileMenu","TopRightControlsMock","PresentationShell","_ref6","header","children","floating","menuFooter","_ref6$activeMenuItem","activeMenuItem","_useState","mobileMenuOpen","setMobileMenuOpen","_useState2","setCollapsed","_useState3","isMobileView","setIsMobileView","ref","dimensions","width","handleOpenMobileMenu","handleCloseMobileMenu","handleToggleCollapsed","prev","id"],"sources":["../../../../src/presentation/shared/PresentationShell.tsx"],"sourcesContent":["import React, {\n ReactElement,\n ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { MainLogo } from \"./MainLogo\";\nimport { BREAKPOINT, SM, TRANSITION, XL } from \"./tokens\";\nimport { Drawer } from \"../../components/Drawer\";\nimport { IconButton } from \"../../components/IconButton\";\nimport {\n ActivityIcon,\n CalendarIcon,\n ClockStopwatchIndicatorIcon,\n CloseIcon,\n CollapsIcon,\n EstimatesIcon,\n InvoicesIcon,\n MobileMenuIcon,\n MyWorkIcon,\n NotificationBellIcon,\n PeopleIcon,\n ProjectsIcon,\n ReportTimeIcon,\n ReportsIcon,\n RocketIcon,\n SearchIcon,\n} from \"../../components/Icons\";\nimport { Paper } from \"../../components/Paper\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Body2, Caption1 } from \"../../components/Typography\";\nimport { DARK_THEME_SELECTOR, useResizeObserver } from \"../../utils\";\n\nconst MENU_ITEMS: {\n icon: React.FC<React.SVGProps<SVGSVGElement>>;\n text: string;\n}[] = [\n { icon: RocketIcon, text: \"Getting Started\" },\n { icon: ProjectsIcon, text: \"Projects\" },\n { icon: MyWorkIcon, text: \"My Work\" },\n { icon: ActivityIcon, text: \"Activity\" },\n { icon: CalendarIcon, text: \"Calendar\" },\n { icon: PeopleIcon, text: \"People\" },\n { icon: ReportTimeIcon, text: \"Time\" },\n { icon: ReportsIcon, text: \"Reports\" },\n { icon: InvoicesIcon, text: \"Invoices\" },\n { icon: EstimatesIcon, text: \"Estimates\" },\n];\n\n/* ------------------------------------------------------------------ */\n/* Layout shell (mirrors Layout.js) */\n/* ------------------------------------------------------------------ */\n\nconst StyledLayout = styled.div`\n height: 100vh;\n display: flex;\n flex-direction: column;\n background-color: var(--body-bg-main);\n`;\n\nconst StyledContentRow = styled.div`\n position: relative;\n display: flex;\n flex-direction: row-reverse;\n flex: 1 1 0%;\n flex-grow: 1;\n overflow-y: auto;\n`;\n\nconst StyledRightWindow = styled.div`\n position: relative;\n display: flex;\n flex-direction: column;\n flex: 1 1 0%;\n flex-grow: 1;\n width: 100%;\n height: 100%;\n overflow-y: auto;\n padding: 0 16px;\n\n @media (min-width: ${SM}) {\n padding-right: 32px;\n }\n`;\n\n/* ------------------------------------------------------------------ */\n/* Main menu (mirrors MainMenu.js + MainMenu.less) */\n/* ------------------------------------------------------------------ */\n\nconst StyledMainMenu = styled.div`\n position: relative;\n z-index: 1;\n display: none;\n flex-direction: column;\n height: 100%;\n margin-right: 4px;\n flex-shrink: 0;\n width: 240px;\n transition: width ${TRANSITION};\n\n @media (min-width: ${SM}) {\n display: flex;\n }\n\n &.collapsed {\n width: 72px;\n }\n\n .menu-item-text,\n .menu-section,\n #logotype {\n transition: all ${TRANSITION};\n }\n\n &.collapsed .menu-item-text {\n opacity: 0;\n visibility: hidden;\n width: 0;\n margin-left: 0;\n }\n\n &.collapsed .menu-section {\n transform: scaleY(0);\n opacity: 0;\n max-height: 0;\n margin-bottom: 0;\n }\n\n &.collapsed #logotype {\n transform: translateX(-5%);\n opacity: 0;\n }\n\n &.collapsed .collapse-expand-menu svg {\n transform: rotate(180deg);\n }\n\n &:not(.mobile) {\n @media (max-width: 1279.98px) {\n width: 72px;\n\n .menu-item-text {\n opacity: 0;\n visibility: hidden;\n width: 0;\n margin-left: 0;\n }\n\n .menu-section {\n transform: scaleY(0);\n opacity: 0;\n max-height: 0;\n margin-bottom: 0;\n }\n\n #logotype {\n transform: translateX(-5%);\n opacity: 0;\n }\n }\n }\n\n /* The Drawer gives the mobile menu its edge, width and paper. */\n &.mobile {\n display: flex;\n width: 100%;\n margin-right: 0;\n }\n`;\n\nconst StyledMenuHeader = styled.div`\n position: relative;\n height: 68px;\n display: flex;\n align-items: center;\n flex-shrink: 0;\n overflow: hidden;\n\n .main-logo {\n position: absolute;\n left: 20px;\n color: var(--color-secondary);\n\n path {\n fill: var(--color-secondary);\n }\n }\n\n .collapse-expand-menu {\n position: absolute;\n right: 4px;\n display: none;\n\n @media (min-width: ${XL}) {\n display: flex;\n }\n }\n`;\n\nconst StyledMenuScroll = styled.div`\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n min-height: 0;\n margin: 12px 0;\n overflow-y: auto;\n overflow-x: hidden;\n`;\n\nconst StyledMenuSection = styled.div`\n display: flex;\n align-items: center;\n margin: 0 12px 8px;\n padding: 0 4px 0 12px;\n`;\n\nconst StyledMenuItem = styled.a`\n display: flex;\n align-items: center;\n height: 40px;\n padding: 0 4px 0 12px;\n margin: 0 12px 2px;\n border-radius: 8px;\n cursor: pointer;\n text-decoration: none;\n\n svg {\n flex-shrink: 0;\n fill: var(--color-theme-700);\n opacity: 0.7;\n }\n\n .menu-item-text {\n margin-left: 12px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n &:hover {\n transition: all ${TRANSITION};\n background-color: var(--color-theme-300);\n\n svg {\n fill: var(--color-theme-900);\n opacity: 1;\n }\n\n .menu-item-text {\n color: var(--color-theme-900);\n }\n }\n\n &.active {\n background-color: var(--color-secondary-200);\n\n svg {\n fill: var(--color-secondary);\n opacity: 1;\n }\n\n .menu-item-text {\n color: var(--color-secondary);\n }\n }\n`;\n\nconst StyledMobileMenuClose = styled(IconButton)`\n position: absolute;\n right: 16px;\n`;\n\n/* ------------------------------------------------------------------ */\n/* Top bars */\n/* ------------------------------------------------------------------ */\n\nconst StyledMobileMenuHeader = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 16px;\n background-color: var(--color-primary);\n z-index: 50;\n\n @media (min-width: ${SM}) {\n display: none;\n }\n\n .mobile-menu-icon {\n fill: var(--color-theme-300);\n }\n`;\n\nconst StyledIconRow = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst StyledTopRightControls = styled.div`\n position: absolute;\n top: 0;\n right: 0;\n z-index: 11;\n display: none;\n align-items: center;\n justify-content: flex-end;\n padding: 12px 32px 12px 0;\n\n @media (min-width: ${SM}) {\n display: flex;\n }\n`;\n\nconst StyledHeaderAvatar = styled.div`\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background-color: var(--color-secondary);\n color: var(--only-white);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n font-weight: 600;\n margin: 0 8px;\n flex-shrink: 0;\n cursor: pointer;\n\n /* dark themes: use paper colour for the initials */\n ${DARK_THEME_SELECTOR} & {\n color: var(--page-paper-main);\n }\n`;\n\n/* ------------------------------------------------------------------ */\n/* Page region (mirrors Page.jsx / PageBody.jsx) */\n/* ------------------------------------------------------------------ */\n\nconst StyledPage = styled.div`\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n`;\n\nconst StyledPageBody = styled.div`\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n margin-bottom: 32px;\n min-height: 0;\n`;\n\n/** The paper card that holds page content (used by list view & empty pages). */\nexport const StyledPagePaper = styled(Paper)`\n flex-grow: 1;\n width: 100%;\n`;\n\n/* ------------------------------------------------------------------ */\n/* Mocked layout building blocks */\n/* ------------------------------------------------------------------ */\n\ninterface MenuItemsProps {\n mobile?: boolean;\n activeItem: string;\n}\n\nconst MenuItemsMock = ({\n mobile = false,\n activeItem,\n}: MenuItemsProps): ReactElement => (\n <StyledMenuScroll>\n <StyledMenuSection className=\"menu-section\">\n <Caption1 weight=\"bold\" color=\"tertiary\">\n MENU\n </Caption1>\n </StyledMenuSection>\n {MENU_ITEMS.map(({ icon: Icon, text }) => (\n <Tooltip key={text} title={text} placement=\"right\" disable={mobile}>\n <StyledMenuItem className={text === activeItem ? \"active\" : undefined}>\n <Icon />\n <Body2\n weight=\"medium\"\n color=\"secondary\"\n whitespace=\"no-wrap\"\n className=\"menu-item-text\"\n >\n {text}\n </Body2>\n </StyledMenuItem>\n </Tooltip>\n ))}\n </StyledMenuScroll>\n);\n\ninterface MainMenuMockProps {\n collapsed: boolean;\n onToggleCollapsed: () => void;\n footer?: ReactNode;\n activeItem: string;\n}\n\nconst MainMenuMock = ({\n collapsed,\n onToggleCollapsed,\n footer,\n activeItem,\n}: MainMenuMockProps): ReactElement => (\n <StyledMainMenu\n className={collapsed ? \"collapsed\" : undefined}\n data-testid=\"main-menu\"\n >\n <StyledMenuHeader>\n <a className=\"main-logo\">\n <MainLogo />\n </a>\n <div className=\"collapse-expand-menu\">\n <IconButton\n variant=\"text gray\"\n size=\"small\"\n onClick={onToggleCollapsed}\n >\n <CollapsIcon />\n </IconButton>\n </div>\n </StyledMenuHeader>\n <MenuItemsMock activeItem={activeItem} />\n {footer}\n </StyledMainMenu>\n);\n\ninterface MainMenuMobileMockProps {\n open: boolean;\n close: () => void;\n footer?: ReactNode;\n activeItem: string;\n}\n\nconst MainMenuMobileMock = ({\n open,\n close,\n footer,\n activeItem,\n}: MainMenuMobileMockProps): ReactElement => (\n <Drawer open={open} onClose={close} data-testid=\"main-menu-mobile\">\n <StyledMainMenu className=\"mobile\">\n <StyledMenuHeader>\n <a className=\"main-logo\">\n <MainLogo />\n </a>\n <StyledMobileMenuClose onClick={close} variant=\"text gray\">\n <CloseIcon />\n </StyledMobileMenuClose>\n </StyledMenuHeader>\n <MenuItemsMock mobile activeItem={activeItem} />\n {footer}\n </StyledMainMenu>\n </Drawer>\n);\n\ninterface MobileMenuHeaderMockProps {\n onOpenMobileMenu: () => void;\n}\n\nconst MobileMenuHeaderMock = ({\n onOpenMobileMenu,\n}: MobileMenuHeaderMockProps): ReactElement => (\n <StyledMobileMenuHeader>\n <IconButton size=\"big\" variant=\"circle raised\" onClick={onOpenMobileMenu}>\n <MobileMenuIcon className=\"mobile-menu-icon\" />\n </IconButton>\n <StyledIconRow>\n <IconButton variant=\"text gray\">\n <SearchIcon />\n </IconButton>\n <StyledHeaderAvatar>JS</StyledHeaderAvatar>\n <IconButton variant=\"text gray\">\n <NotificationBellIcon />\n </IconButton>\n </StyledIconRow>\n </StyledMobileMenuHeader>\n);\n\nconst TopRightControlsMock = (): ReactElement => (\n <StyledTopRightControls>\n <IconButton variant=\"text gray\">\n <ClockStopwatchIndicatorIcon />\n </IconButton>\n <IconButton variant=\"text gray\">\n <SearchIcon />\n </IconButton>\n <StyledHeaderAvatar>JS</StyledHeaderAvatar>\n <IconButton variant=\"text gray\">\n <NotificationBellIcon />\n </IconButton>\n </StyledTopRightControls>\n);\n\n/* ------------------------------------------------------------------ */\n/* PresentationShell */\n/* ------------------------------------------------------------------ */\n\nexport interface PresentationShellProps {\n /** Page header row (e.g. <ProjectPageHeader /> or <PageHeader title=\"…\" />). */\n header: ReactNode;\n /** Page body content rendered inside the scrollable page area. */\n children: ReactNode;\n /** Optional fixed controls (e.g. <FloatingControls />). */\n floating?: ReactNode;\n /** Optional content pinned to the bottom of the main menu (e.g. <HelpAndSupportMenu />). */\n menuFooter?: ReactNode;\n activeMenuItem?: string;\n}\n\n/**\n * The full application shell shared by every presentation mock-up: the main\n * menu on the left (auto-collapsing below 1280px, modal below 640px), the\n * top-right controls and the scrollable page area. Pass the page header via\n * `header` and the body via `children`.\n */\nexport const PresentationShell = ({\n header,\n children,\n floating,\n menuFooter,\n activeMenuItem = \"Projects\",\n}: PresentationShellProps): ReactElement => {\n const [mobileMenuOpen, setMobileMenuOpen] = useState(false);\n const [collapsed, setCollapsed] = useState(false);\n const [isMobileView, setIsMobileView] = useState<boolean>();\n\n const ref = useRef<HTMLDivElement>(null);\n const dimensions = useResizeObserver(ref);\n const width = dimensions?.width;\n\n useEffect(() => {\n if (width) {\n if (width < BREAKPOINT) {\n setIsMobileView(true);\n } else {\n setIsMobileView(false);\n setMobileMenuOpen(false);\n }\n }\n }, [width]);\n\n const handleOpenMobileMenu = useCallback(() => setMobileMenuOpen(true), []);\n const handleCloseMobileMenu = useCallback(() => setMobileMenuOpen(false), []);\n const handleToggleCollapsed = useCallback(\n () => setCollapsed((prev) => !prev),\n []\n );\n\n return (\n <StyledLayout ref={ref}>\n {isMobileView ? (\n <MobileMenuHeaderMock onOpenMobileMenu={handleOpenMobileMenu} />\n ) : null}\n <StyledContentRow>\n <StyledRightWindow id=\"right-window\">\n <StyledPage>\n {header}\n <StyledPageBody>{children}</StyledPageBody>\n </StyledPage>\n {isMobileView === false ? <TopRightControlsMock /> : null}\n </StyledRightWindow>\n {isMobileView ? (\n <MainMenuMobileMock\n open={mobileMenuOpen}\n close={handleCloseMobileMenu}\n footer={menuFooter}\n activeItem={activeMenuItem}\n />\n ) : (\n <MainMenuMock\n collapsed={collapsed}\n onToggleCollapsed={handleToggleCollapsed}\n footer={menuFooter}\n activeItem={activeMenuItem}\n />\n )}\n </StyledContentRow>\n {floating}\n </StyledLayout>\n );\n};\n\nPresentationShell.displayName = \"PresentationShell\";\n"],"mappings":"AAAA,OAAOA,KAAK,IAGVC,WAAW,EACXC,SAAS,EACTC,MAAM,EACNC,QAAQ,QACH,OAAO;AAEd,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,QAAQ,QAAQ,YAAY;AACrC,SAASC,UAAU,EAAEC,EAAE,EAAEC,UAAU,EAAEC,EAAE,QAAQ,UAAU;AACzD,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SACEC,YAAY,EACZC,YAAY,EACZC,2BAA2B,EAC3BC,SAAS,EACTC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,cAAc,EACdC,UAAU,EACVC,oBAAoB,EACpBC,UAAU,EACVC,YAAY,EACZC,cAAc,EACdC,WAAW,EACXC,UAAU,EACVC,UAAU,QACL,wBAAwB;AAC/B,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,OAAO,QAAQ,0BAA0B;AAClD,SAASC,KAAK,EAAEC,QAAQ,QAAQ,6BAA6B;AAC7D,SAASC,mBAAmB,EAAEC,iBAAiB,QAAQ,aAAa;AAEpE,MAAMC,UAGH,GAAG,CACJ;EAAEC,IAAI,EAAET,UAAU;EAAEU,IAAI,EAAE;AAAkB,CAAC,EAC7C;EAAED,IAAI,EAAEZ,YAAY;EAAEa,IAAI,EAAE;AAAW,CAAC,EACxC;EAAED,IAAI,EAAEf,UAAU;EAAEgB,IAAI,EAAE;AAAU,CAAC,EACrC;EAAED,IAAI,EAAEvB,YAAY;EAAEwB,IAAI,EAAE;AAAW,CAAC,EACxC;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