@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
@@ -3,18 +3,19 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.messageComponents = exports.MessageDialog = exports.DocLinkContext = void 0;
6
+ exports.messageComponents = exports.MessageDialog = exports.MESSAGE_TITLE_ID = exports.DocLinkContext = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
  var _MessageFeedback = require("./MessageFeedback");
10
10
  var _BreakPoints = require("../../components/BreakPoints");
11
11
  var _Button = require("../../components/Button");
12
12
  var _Columns = require("../../components/Columns");
13
+ var _Dialog = require("../../components/Dialog");
13
14
  var _IconButton = require("../../components/IconButton");
14
15
  var _Icons = require("../../components/Icons");
15
16
  var _InfoBox = require("../../components/InfoBox");
16
17
  var _Media = require("../../components/Media");
17
- var _Modal = require("../../components/Modal");
18
+ var _PortableText = require("../../components/PortableText");
18
19
  var _Styles = require("../../components/PortableText/Styles");
19
20
  var _Row = require("../../components/Row");
20
21
  var _Stack = require("../../components/Stack");
@@ -25,6 +26,12 @@ var _Typography = require("../../components/Typography");
25
26
  var _Typography2 = require("../../components/Typography/Typography");
26
27
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
27
28
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
29
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
30
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
31
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
32
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
33
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
34
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
28
35
  /**
29
36
  * The in-app message dialog, as a Presentation mock.
30
37
  *
@@ -42,50 +49,62 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
42
49
 
43
50
  /* ---- the dialog shell ---------------------------------------------- */
44
51
 
45
- var DIALOG_WIDTH = {
46
- sm: "520px",
47
- md: "720px",
48
- lg: "880px"
52
+ /** The id the dialog points `aria-labelledby` at, carried by the message's
53
+ level 1 heading, as in the app's message catalog (Heading.jsx). */
54
+ var MESSAGE_TITLE_ID = exports.MESSAGE_TITLE_ID = "in-app-message-title";
55
+
56
+ /* The app maps its message sizes onto DS Dialog steps (InAppMessageDialog constants). */
57
+ var DIALOG_SIZE = {
58
+ sm: "m",
59
+ md: "l",
60
+ lg: "xl"
49
61
  };
50
62
 
51
- /* The shell is behaviour only: it sizes itself, closes on click-outside /
52
- Esc (DS Modal) / the X, and shows the feedback slot when an onVote handler
53
- is supplied. Content is whatever the caller renders as children — usually
54
- the Portable Text engine with the demo catalog injected. */
55
- var StyledDialog = _styledComponents.default.div.withConfig({
56
- displayName: "MessageDialog__StyledDialog",
63
+ /* The shell is a DS Dialog, as in the app: it closes on click-outside, Esc and
64
+ the X, and shows the feedback slot when an onVote handler is supplied.
65
+ Content is whatever the caller renders as children — usually the Portable
66
+ Text engine with the demo catalog injected. */
67
+
68
+ /* X floats in the corner and overlaps the content padding — it does not
69
+ reserve a row of its own. */
70
+ var StyledMessageClose = _styledComponents.default.div.withConfig({
71
+ displayName: "MessageDialog__StyledMessageClose",
57
72
  componentId: "sc-1kt5lil-0"
58
- })(["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;}}"], function (_ref) {
59
- var $size = _ref.$size;
60
- return DIALOG_WIDTH[$size];
61
- }, _BreakPoints.screenBelow.sm, _BreakPoints.screenBelow.sm);
62
- var MessageDialog = exports.MessageDialog = function MessageDialog(_ref2) {
63
- var open = _ref2.open,
64
- onClose = _ref2.onClose,
65
- _ref2$size = _ref2.size,
66
- size = _ref2$size === void 0 ? "md" : _ref2$size,
67
- _ref2$feedback = _ref2.feedback,
68
- feedback = _ref2$feedback === void 0 ? false : _ref2$feedback,
69
- onVote = _ref2.onVote,
70
- onFeedbackSubmit = _ref2.onFeedbackSubmit,
71
- children = _ref2.children;
72
- return /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
73
+ })(["position:absolute;top:12px;right:12px;z-index:2;"]);
74
+ var StyledMessageContent = (0, _styledComponents.default)(_Dialog.Dialog.Content).withConfig({
75
+ displayName: "MessageDialog__StyledMessageContent",
76
+ componentId: "sc-1kt5lil-1"
77
+ })(["&&{padding:0;}"]);
78
+ var StyledMessageBody = _styledComponents.default.div.withConfig({
79
+ displayName: "MessageDialog__StyledMessageBody",
80
+ componentId: "sc-1kt5lil-2"
81
+ })(["padding:40px;", "{padding:32px 20px 24px;}"], _BreakPoints.screenBelow.sm);
82
+ var MessageDialog = exports.MessageDialog = function MessageDialog(_ref) {
83
+ var open = _ref.open,
84
+ onClose = _ref.onClose,
85
+ _ref$size = _ref.size,
86
+ size = _ref$size === void 0 ? "md" : _ref$size,
87
+ _ref$feedback = _ref.feedback,
88
+ feedback = _ref$feedback === void 0 ? false : _ref$feedback,
89
+ onVote = _ref.onVote,
90
+ onFeedbackSubmit = _ref.onFeedbackSubmit,
91
+ children = _ref.children;
92
+ return /*#__PURE__*/_react.default.createElement(_Dialog.Dialog, {
73
93
  open: open,
74
- onClose: onClose
75
- }, /*#__PURE__*/_react.default.createElement(StyledDialog, {
76
- $size: size
77
- }, /*#__PURE__*/_react.default.createElement("div", {
78
- className: "dlg-close"
79
- }, /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, {
94
+ onClose: onClose,
95
+ size: DIALOG_SIZE[size],
96
+ enableBackgroundClick: true,
97
+ role: "dialog",
98
+ "aria-modal": "true",
99
+ "aria-labelledby": MESSAGE_TITLE_ID
100
+ }, /*#__PURE__*/_react.default.createElement(StyledMessageClose, null, /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, {
80
101
  title: "Close"
81
102
  }, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, {
82
103
  type: "button",
83
104
  variant: "text gray",
84
105
  "aria-label": "Close",
85
106
  onClick: onClose
86
- }, /*#__PURE__*/_react.default.createElement(_Icons.CancelCrossIcon, null)))), /*#__PURE__*/_react.default.createElement("div", {
87
- className: "dlg-content"
88
- }, children), feedback ? /*#__PURE__*/_react.default.createElement(_MessageFeedback.MessageFeedback, {
107
+ }, /*#__PURE__*/_react.default.createElement(_Icons.CancelCrossIcon, null)))), /*#__PURE__*/_react.default.createElement(StyledMessageContent, null, /*#__PURE__*/_react.default.createElement(StyledMessageBody, null, children), feedback ? /*#__PURE__*/_react.default.createElement(_MessageFeedback.MessageFeedback, {
89
108
  onVote: onVote,
90
109
  onSubmit: onFeedbackSubmit
91
110
  }) : null));
@@ -108,20 +127,20 @@ var DocLinkContext = exports.DocLinkContext = /*#__PURE__*/_react.default.create
108
127
  /* interface-name — the name of an interface element, e.g. the Security page. */
109
128
  var StyledInterfaceName = _styledComponents.default.span.withConfig({
110
129
  displayName: "MessageDialog__StyledInterfaceName",
111
- componentId: "sc-1kt5lil-1"
130
+ componentId: "sc-1kt5lil-3"
112
131
  })(["padding:0 4px;border-radius:4px;background-color:var(--color-theme-300);color:var(--color-theme-900);font-weight:600;white-space:nowrap;"]);
113
- var InterfaceNameMark = function InterfaceNameMark(_ref3) {
114
- var children = _ref3.children;
132
+ var InterfaceNameMark = function InterfaceNameMark(_ref2) {
133
+ var children = _ref2.children;
115
134
  return /*#__PURE__*/_react.default.createElement(StyledInterfaceName, null, children);
116
135
  };
117
136
 
118
137
  /* keyboard-key — a keyboard key cap. */
119
138
  var StyledKeyboardKey = _styledComponents.default.kbd.withConfig({
120
139
  displayName: "MessageDialog__StyledKeyboardKey",
121
- componentId: "sc-1kt5lil-2"
140
+ componentId: "sc-1kt5lil-4"
122
141
  })(["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;"]);
123
- var KeyboardKeyMark = function KeyboardKeyMark(_ref4) {
124
- var children = _ref4.children;
142
+ var KeyboardKeyMark = function KeyboardKeyMark(_ref3) {
143
+ var children = _ref3.children;
125
144
  return /*#__PURE__*/_react.default.createElement(StyledKeyboardKey, null, children);
126
145
  };
127
146
 
@@ -133,11 +152,11 @@ var KeyboardKeyMark = function KeyboardKeyMark(_ref4) {
133
152
  surrounding copy — just recoloured. */
134
153
  var StyledDocLink = (0, _styledComponents.default)(_Styles.StyledLink).withConfig({
135
154
  displayName: "MessageDialog__StyledDocLink",
136
- componentId: "sc-1kt5lil-3"
155
+ componentId: "sc-1kt5lil-5"
137
156
  })(["color:var(--color-secondary);text-decoration-color:var(--color-secondary);"]);
138
- var DocLinkMark = function DocLinkMark(_ref5) {
139
- var mark = _ref5.mark,
140
- children = _ref5.children;
157
+ var DocLinkMark = function DocLinkMark(_ref4) {
158
+ var mark = _ref4.mark,
159
+ children = _ref4.children;
141
160
  var openArticle = (0, _react.useContext)(DocLinkContext);
142
161
  return /*#__PURE__*/_react.default.createElement(StyledDocLink, {
143
162
  href: "#",
@@ -158,12 +177,12 @@ var CALLOUT_TYPE = {
158
177
  note: "note",
159
178
  success: "success"
160
179
  };
161
- var CalloutObject = function CalloutObject(_ref6) {
162
- var _ref7;
163
- var node = _ref6.node,
164
- children = _ref6.children;
180
+ var CalloutObject = function CalloutObject(_ref5) {
181
+ var _ref6;
182
+ var node = _ref5.node,
183
+ children = _ref5.children;
165
184
  return /*#__PURE__*/_react.default.createElement(_InfoBox.InfoBox, {
166
- type: CALLOUT_TYPE[(_ref7 = node.tone) !== null && _ref7 !== void 0 ? _ref7 : "info"],
185
+ type: CALLOUT_TYPE[(_ref6 = node.tone) !== null && _ref6 !== void 0 ? _ref6 : "info"],
167
186
  title: node.title,
168
187
  showIcon: true
169
188
  }, children);
@@ -174,18 +193,18 @@ var CalloutObject = function CalloutObject(_ref6) {
174
193
  intentionally non-interactive. */
175
194
  var StyledButtonReference = _styledComponents.default.div.withConfig({
176
195
  displayName: "MessageDialog__StyledButtonReference",
177
- componentId: "sc-1kt5lil-4"
196
+ componentId: "sc-1kt5lil-6"
178
197
  })(["display:flex;.c-button{pointer-events:none;}"]);
179
- var ButtonReferenceObject = function ButtonReferenceObject(_ref8) {
180
- var _ref9;
181
- var node = _ref8.node;
198
+ var ButtonReferenceObject = function ButtonReferenceObject(_ref7) {
199
+ var _ref8;
200
+ var node = _ref7.node;
182
201
  if (typeof node.label !== "string") {
183
202
  return null;
184
203
  }
185
204
  return /*#__PURE__*/_react.default.createElement(StyledButtonReference, {
186
205
  "aria-hidden": "true"
187
206
  }, /*#__PURE__*/_react.default.createElement(_Button.Button, {
188
- variant: (_ref9 = node.variant) !== null && _ref9 !== void 0 ? _ref9 : "primary",
207
+ variant: (_ref8 = node.variant) !== null && _ref8 !== void 0 ? _ref8 : "primary",
189
208
  size: "small",
190
209
  type: "button",
191
210
  tabIndex: -1
@@ -193,22 +212,22 @@ var ButtonReferenceObject = function ButtonReferenceObject(_ref8) {
193
212
  };
194
213
 
195
214
  /* row — a horizontal run of blocks (e.g. two button references). */
196
- var RowObject = function RowObject(_ref0) {
197
- var _ref1;
198
- var node = _ref0.node,
199
- children = _ref0.children;
215
+ var RowObject = function RowObject(_ref9) {
216
+ var _ref0;
217
+ var node = _ref9.node,
218
+ children = _ref9.children;
200
219
  return /*#__PURE__*/_react.default.createElement(_Row.Row, {
201
- space: (_ref1 = node.space) !== null && _ref1 !== void 0 ? _ref1 : "sm"
220
+ space: (_ref0 = node.space) !== null && _ref0 !== void 0 ? _ref0 : "sm"
202
221
  }, children);
203
222
  };
204
223
 
205
224
  /* tiles — an equal-size mosaic of blocks. */
206
- var TilesObject = function TilesObject(_ref10) {
207
- var _ref11;
208
- var node = _ref10.node,
209
- children = _ref10.children;
225
+ var TilesObject = function TilesObject(_ref1) {
226
+ var _ref10;
227
+ var node = _ref1.node,
228
+ children = _ref1.children;
210
229
  return /*#__PURE__*/_react.default.createElement(_Tiles.Tiles, {
211
- columns: (_ref11 = node.columns) !== null && _ref11 !== void 0 ? _ref11 : 3,
230
+ columns: (_ref10 = node.columns) !== null && _ref10 !== void 0 ? _ref10 : 3,
212
231
  space: "md",
213
232
  collapseBelow: "sm"
214
233
  }, children);
@@ -218,12 +237,12 @@ var TilesObject = function TilesObject(_ref10) {
218
237
  screenshots sit on the right, flat illustrations on the left. `widths` is
219
238
  authored as [text, media] and reordered with the columns. */
220
239
 
221
- var SplitObject = function SplitObject(_ref12) {
222
- var _ref13;
223
- var node = _ref12.node,
224
- children = _ref12.children;
240
+ var SplitObject = function SplitObject(_ref11) {
241
+ var _ref12;
242
+ var node = _ref11.node,
243
+ children = _ref11.children;
225
244
  var media = node.media;
226
- var widths = (_ref13 = node.widths) !== null && _ref13 !== void 0 ? _ref13 : [1, 1];
245
+ var widths = (_ref12 = node.widths) !== null && _ref12 !== void 0 ? _ref12 : [1, 1];
227
246
  var textColumn = /*#__PURE__*/_react.default.createElement(_Stack.Stack, {
228
247
  space: "lg"
229
248
  }, children);
@@ -252,15 +271,15 @@ var SplitObject = function SplitObject(_ref12) {
252
271
  /* The engine's defaults use Body 1 primary; the messages are designed on the
253
272
  quieter Body 2 secondary voice, so the catalog overrides the text blocks —
254
273
  demonstrating the `blocks` half of the injection contract. */
255
- var ParagraphBlock = function ParagraphBlock(_ref14) {
256
- var children = _ref14.children;
274
+ var ParagraphBlock = function ParagraphBlock(_ref13) {
275
+ var children = _ref13.children;
257
276
  return /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
258
277
  color: "secondary",
259
278
  lineHeight: "loose"
260
279
  }, children);
261
280
  };
262
- var ListItemBlock = function ListItemBlock(_ref15) {
263
- var children = _ref15.children;
281
+ var ListItemBlock = function ListItemBlock(_ref14) {
282
+ var children = _ref14.children;
264
283
  return /*#__PURE__*/_react.default.createElement(_Typography2.Typography, {
265
284
  variant: "Body 2",
266
285
  as: "li",
@@ -269,15 +288,27 @@ var ListItemBlock = function ListItemBlock(_ref15) {
269
288
  }, children);
270
289
  };
271
290
 
291
+ /* The level 1 heading is the message title and names the dialog; the others
292
+ keep the engine's own heading. */
293
+ var HeadingBlock = function HeadingBlock(props) {
294
+ var block = props.block;
295
+ var DefaultHeading = _PortableText.portableTextDefaultBlockRenderers.heading;
296
+ return /*#__PURE__*/_react.default.createElement(DefaultHeading, _extends({}, props, {
297
+ block: block.level === 1 ? _objectSpread(_objectSpread({}, block), {}, {
298
+ id: MESSAGE_TITLE_ID
299
+ }) : block
300
+ }));
301
+ };
302
+
272
303
  /* Titled sections speak in the quiet Header2 subhead voice rather than the
273
304
  engine's default Title2 for level 2, and keep a roomier rhythm between a
274
305
  titled section's content nodes. */
275
- var TitledTextBlock = function TitledTextBlock(_ref16) {
276
- var block = _ref16.block,
277
- children = _ref16.children;
278
- var _ref17 = block,
279
- title = _ref17.title,
280
- level = _ref17.level;
306
+ var TitledTextBlock = function TitledTextBlock(_ref15) {
307
+ var block = _ref15.block,
308
+ children = _ref15.children;
309
+ var _ref16 = block,
310
+ title = _ref16.title,
311
+ level = _ref16.level;
281
312
  return /*#__PURE__*/_react.default.createElement(_TitledText.TitledText, {
282
313
  title: title,
283
314
  variant: level === 1 ? "title1" : "header2"
@@ -303,6 +334,7 @@ var messageComponents = exports.messageComponents = {
303
334
  },
304
335
  blocks: {
305
336
  paragraph: ParagraphBlock,
337
+ heading: HeadingBlock,
306
338
  "list-item": ListItemBlock,
307
339
  "titled-text": TitledTextBlock
308
340
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MessageDialog.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_MessageFeedback","_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","DIALOG_WIDTH","sm","md","lg","StyledDialog","styled","div","withConfig","displayName","componentId","_ref","$size","screenBelow","MessageDialog","exports","_ref2","open","onClose","_ref2$size","size","_ref2$feedback","feedback","onVote","onFeedbackSubmit","children","createElement","Modal","className","Tooltip","title","IconButton","type","variant","onClick","CancelCrossIcon","MessageFeedback","onSubmit","DocLinkContext","React","createContext","undefined","StyledInterfaceName","span","InterfaceNameMark","_ref3","StyledKeyboardKey","kbd","KeyboardKeyMark","_ref4","StyledDocLink","InlineLink","DocLinkMark","_ref5","mark","openArticle","useContext","href","event","preventDefault","article","CALLOUT_TYPE","info","note","success","CalloutObject","_ref6","_ref7","node","InfoBox","tone","showIcon","StyledButtonReference","ButtonReferenceObject","_ref8","_ref9","label","Button","tabIndex","RowObject","_ref0","_ref1","Row","space","TilesObject","_ref10","_ref11","Tiles","columns","collapseBelow","SplitObject","_ref12","_ref13","media","widths","textColumn","Stack","src","screenshot","mediaColumn","Media","alt","caption","Columns","reverse","alignY","ParagraphBlock","_ref14","Body2","color","lineHeight","ListItemBlock","_ref15","Typography","as","TitledTextBlock","_ref16","block","_ref17","level","TitledText","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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,gBAAA,GAAAH,OAAA;AAEA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAEA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AASA,IAAAY,OAAA,GAAAZ,OAAA;AACA,IAAAa,I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A,eAA0CA,CAAAC,MAAA,EAA4B;EAAA,IAAtBC,KAAK,GAAAD,MAAA,CAALC,KAAK;IAAE5F,QAAQ,GAAA2F,MAAA,CAAR3F,QAAQ;EACnE,IAAA6F,MAAA,GAAyBD,KAAK;IAAtBvF,KAAK,GAAAwF,MAAA,CAALxF,KAAK;IAAEyF,KAAK,GAAAD,MAAA,CAALC,KAAK;EAEpB,oBACEhK,MAAA,CAAAwB,OAAA,CAAA2C,aAAA,CAACjD,WAAA,CAAA+I,UAAU;IAAC1F,KAAK,EAAEA,KAAM;IAACG,OAAO,EAAEsF,KAAK,KAAK,CAAC,GAAG,QAAQ,GAAG;EAAU,GACnE9F,QAAQ,gBAAGlE,MAAA,CAAAwB,OAAA,CAAA2C,aAAA,CAACnD,MAAA,CAAAyH,KAAK;IAACb,KAAK,EAAC;EAAI,GAAE1D,QAAgB,CAAC,GAAGgB,SACzC,CAAC;AAEjB,CAAC;;AAED;AACA;AACO,IAAMgF,iBAAyC,GAAA1G,OAAA,CAAA0G,iBAAA,GAAG;EACvDC,KAAK,EAAE;IACL,gBAAgB,EAAE9E,iBAAiB;IACnC,cAAc,EAAEI,eAAe;IAC/B,UAAU,EAAEI;EACd,CAAC;EACDuE,OAAO,EAAE;IACPC,OAAO,EAAE3D,aAAa;IACtB,kBAAkB,EAAEQ,qBAAqB;IACzCoD,GAAG,EAAE9C,SAAS;IACd+C,KAAK,EAAE1C,WAAW;IAClB2C,KAAK,EAAErC;EACT,CAAC;EACDsC,MAAM,EAAE;IACNC,SAAS,EAAEvB,cAAc;IACzB,WAAW,EAAEK,aAAa;IAC1B,aAAa,EAAEI;EACjB;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"MessageDialog.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_MessageFeedback","_BreakPoints","_Button","_Columns","_Dialog","_IconButton","_Icons","_InfoBox","_Media","_PortableText","_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","_extends","assign","bind","arguments","length","apply","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","MESSAGE_TITLE_ID","exports","DIALOG_SIZE","sm","md","lg","StyledMessageClose","styled","div","withConfig","displayName","componentId","StyledMessageContent","Dialog","Content","StyledMessageBody","screenBelow","MessageDialog","_ref","open","onClose","_ref$size","size","_ref$feedback","feedback","onVote","onFeedbackSubmit","children","createElement","enableBackgroundClick","role","Tooltip","title","IconButton","type","variant","onClick","CancelCrossIcon","MessageFeedback","onSubmit","DocLinkContext","React","createContext","undefined","StyledInterfaceName","span","InterfaceNameMark","_ref2","StyledKeyboardKey","kbd","KeyboardKeyMark","_ref3","StyledDocLink","InlineLink","DocLinkMark","_ref4","mark","openArticle","useContext","href","event","preventDefault","article","CALLOUT_TYPE","info","note","success","CalloutObject","_ref5","_ref6","node","InfoBox","tone","showIcon","StyledButtonReference","ButtonReferenceObject","_ref7","_ref8","label","Button","tabIndex","RowObject","_ref9","_ref0","Row","space","TilesObject","_ref1","_ref10","Tiles","columns","collapseBelow","SplitObject","_ref11","_ref12","media","widths","textColumn","Stack","src","screenshot","mediaColumn","Media","alt","caption","Columns","reverse","alignY","ParagraphBlock","_ref13","Body2","color","lineHeight","ListItemBlock","_ref14","Typography","as","HeadingBlock","props","block","DefaultHeading","portableTextDefaultBlockRenderers","heading","level","id","TitledTextBlock","_ref15","_ref16","TitledText","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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,gBAAA,GAAAH,OAAA;AAEA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AAEA,IAAAW,MAAA,GAAAX,OAAA;AACA,IAAAY,aAAA,GAAAZ,OAAA;AAUA,IAAAa,OAAA,GAAAb,OAAA;AACA,IAAAc,IAAA,GAAAd,OAAA;AACA,IAAAe,MAAA,GAAAf,OAAA;AACA,IAAAgB,MAAA,GAAAhB,OAAA;AACA,IAAAiB,WAAA,GAAAjB,OAAA;AACA,IAAAkB,QAAA,GAAAlB,OAAA;AACA,IAAAmB,WAAA,GAAAnB,OAAA;AACA,IAAAoB,YAAA,GAAApB,OAAA;AAAoE,SAAAE,uBAAAmB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA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KuH;EAAM,EACvE,CAAC;AAEN,CAAC;;AAED;AACA;AACA;AACA,IAAMM,eAA0C,GAAG,SAA7CA,eAA0CA,CAAAC,MAAA,EAA4B;EAAA,IAAtBP,KAAK,GAAAO,MAAA,CAALP,KAAK;IAAE5F,QAAQ,GAAAmG,MAAA,CAARnG,QAAQ;EACnE,IAAAoG,MAAA,GAAyBR,KAAK;IAAtBvF,KAAK,GAAA+F,MAAA,CAAL/F,KAAK;IAAE2F,KAAK,GAAAI,MAAA,CAALJ,KAAK;EAEpB,oBACEjM,MAAA,CAAAyB,OAAA,CAAAyE,aAAA,CAAC/E,WAAA,CAAAmL,UAAU;IAAChG,KAAK,EAAEA,KAAM;IAACG,OAAO,EAAEwF,KAAK,KAAK,CAAC,GAAG,QAAQ,GAAG;EAAU,GACnEhG,QAAQ,gBAAGjG,MAAA,CAAAyB,OAAA,CAAAyE,aAAA,CAACjF,MAAA,CAAAuJ,KAAK;IAACb,KAAK,EAAC;EAAI,GAAE1D,QAAgB,CAAC,GAAGgB,SACzC,CAAC;AAEjB,CAAC;;AAED;AACA;AACO,IAAMsF,iBAAyC,GAAAhI,OAAA,CAAAgI,iBAAA,GAAG;EACvDC,KAAK,EAAE;IACL,gBAAgB,EAAEpF,iBAAiB;IACnC,cAAc,EAAEI,eAAe;IAC/B,UAAU,EAAEI;EACd,CAAC;EACD6E,OAAO,EAAE;IACPC,OAAO,EAAEjE,aAAa;IACtB,kBAAkB,EAAEQ,qBAAqB;IACzC0D,GAAG,EAAEpD,SAAS;IACdqD,KAAK,EAAEhD,WAAW;IAClBiD,KAAK,EAAE3C;EACT,CAAC;EACD4C,MAAM,EAAE;IACNC,SAAS,EAAE7B,cAAc;IACzBc,OAAO,EAAEL,YAAY;IACrB,WAAW,EAAEJ,aAAa;IAC1B,aAAa,EAAEY;EACjB;AACF,CAAC","ignoreList":[]}
@@ -8,9 +8,9 @@ var _react = _interopRequireWildcard(require("react"));
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
  var _MainLogo = require("./MainLogo");
10
10
  var _tokens = require("./tokens");
11
+ var _Drawer = require("../../components/Drawer");
11
12
  var _IconButton = require("../../components/IconButton");
12
13
  var _Icons = require("../../components/Icons");
13
- var _Modal = require("../../components/Modal");
14
14
  var _Paper = require("../../components/Paper");
15
15
  var _Tooltip = require("../../components/Tooltip");
16
16
  var _Typography = require("../../components/Typography");
@@ -79,7 +79,7 @@ var StyledRightWindow = _styledComponents.default.div.withConfig({
79
79
  var StyledMainMenu = _styledComponents.default.div.withConfig({
80
80
  displayName: "PresentationShell__StyledMainMenu",
81
81
  componentId: "sc-12j90o1-3"
82
- })(["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);}"], _tokens.TRANSITION, _tokens.SM, _tokens.TRANSITION);
82
+ })(["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;}"], _tokens.TRANSITION, _tokens.SM, _tokens.TRANSITION);
83
83
  var StyledMenuHeader = _styledComponents.default.div.withConfig({
84
84
  displayName: "PresentationShell__StyledMenuHeader",
85
85
  componentId: "sc-12j90o1-4"
@@ -197,12 +197,12 @@ var MainMenuMobileMock = function MainMenuMobileMock(_ref4) {
197
197
  close = _ref4.close,
198
198
  footer = _ref4.footer,
199
199
  activeItem = _ref4.activeItem;
200
- return open ? /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
200
+ return /*#__PURE__*/_react.default.createElement(_Drawer.Drawer, {
201
201
  open: open,
202
- onClose: close
203
- }, /*#__PURE__*/_react.default.createElement(StyledMainMenu, {
204
- className: "mobile",
202
+ onClose: close,
205
203
  "data-testid": "main-menu-mobile"
204
+ }, /*#__PURE__*/_react.default.createElement(StyledMainMenu, {
205
+ className: "mobile"
206
206
  }, /*#__PURE__*/_react.default.createElement(StyledMenuHeader, null, /*#__PURE__*/_react.default.createElement("a", {
207
207
  className: "main-logo"
208
208
  }, /*#__PURE__*/_react.default.createElement(_MainLogo.MainLogo, null)), /*#__PURE__*/_react.default.createElement(StyledMobileMenuClose, {
@@ -211,7 +211,7 @@ var MainMenuMobileMock = function MainMenuMobileMock(_ref4) {
211
211
  }, /*#__PURE__*/_react.default.createElement(_Icons.CloseIcon, null))), /*#__PURE__*/_react.default.createElement(MenuItemsMock, {
212
212
  mobile: true,
213
213
  activeItem: activeItem
214
- }), footer)) : null;
214
+ }), footer));
215
215
  };
216
216
  var MobileMenuHeaderMock = function MobileMenuHeaderMock(_ref5) {
217
217
  var onOpenMobileMenu = _ref5.onOpenMobileMenu;