@activecollab/components 2.0.417 → 2.0.418

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.
@@ -0,0 +1,284 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.POSITIVE_FEEDBACK_OPTIONS = exports.NEGATIVE_FEEDBACK_OPTIONS = exports.MessageFeedback = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
9
+ var _BreakPoints = require("../../components/BreakPoints");
10
+ var _Button = require("../../components/Button");
11
+ var _Dialog = require("../../components/Dialog");
12
+ var _IconButton = require("../../components/IconButton");
13
+ var _Icons = require("../../components/Icons");
14
+ var _Label = require("../../components/Label");
15
+ var _Textarea = require("../../components/Textarea");
16
+ var _Tooltip = require("../../components/Tooltip");
17
+ var _Typography = require("../../components/Typography");
18
+ var _Typography2 = require("../../components/Typography/Typography");
19
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
20
+ 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); }
21
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
22
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
23
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
24
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
25
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
26
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
27
+ /**
28
+ * MessageFeedback — the reusable "Was this helpful?" flow, as a Presentation
29
+ * mock.
30
+ *
31
+ * It is built only from design-system parts and owns the whole flow, so any
32
+ * content surface (the message dialog, a help article, a settings panel) can
33
+ * drop it in and get the same behaviour:
34
+ *
35
+ * 1. Prompt — an inline "Was this helpful?" row with a thumb up / down.
36
+ * 2. Details — a centred dialog: option chips for the chosen sentiment,
37
+ * plus an optional free-text comment. Submit or Cancel.
38
+ * 3. Thank you — a short confirmation, then the prompt shows a quiet
39
+ * "Thanks for your feedback!".
40
+ *
41
+ * The vote is recorded the moment a thumb is pressed (`onVote`), so a user who
42
+ * cancels the details step still leaves a valid vote — the same contract the
43
+ * trial Feedback flow uses. The details are reported on Submit (`onSubmit`).
44
+ *
45
+ * In the product this lives in application code; the presentation ships this
46
+ * demo copy so the stories need no app imports.
47
+ */
48
+
49
+ /* ---- public types & default option catalogs ------------------------ */
50
+
51
+ /* The options rate the one piece of content, not the whole product. Each
52
+ negative option maps to an action a writer can take. Override per surface
53
+ through the component props. */
54
+ var POSITIVE_FEEDBACK_OPTIONS = exports.POSITIVE_FEEDBACK_OPTIONS = [{
55
+ id: "clear",
56
+ label: "Clear and easy to understand"
57
+ }, {
58
+ id: "answered",
59
+ label: "Answered my question"
60
+ }, {
61
+ id: "right-detail",
62
+ label: "Right amount of detail"
63
+ }, {
64
+ id: "helped-use",
65
+ label: "Helped me use the feature"
66
+ }, {
67
+ id: "good-examples",
68
+ label: "Good examples or screenshots"
69
+ }, {
70
+ id: "other",
71
+ label: "Other"
72
+ }];
73
+ var NEGATIVE_FEEDBACK_OPTIONS = exports.NEGATIVE_FEEDBACK_OPTIONS = [{
74
+ id: "not-answered",
75
+ label: "Did not answer my question"
76
+ }, {
77
+ id: "confusing",
78
+ label: "Confusing or hard to follow"
79
+ }, {
80
+ id: "too-long",
81
+ label: "Too long"
82
+ }, {
83
+ id: "not-enough-detail",
84
+ label: "Not enough detail"
85
+ }, {
86
+ id: "out-of-date",
87
+ label: "Out of date or incorrect"
88
+ }, {
89
+ id: "wrong-plan-role",
90
+ label: "Wrong for my plan or role"
91
+ }, {
92
+ id: "not-found",
93
+ label: "I could not find what I needed"
94
+ }, {
95
+ id: "broken",
96
+ label: "Something is broken"
97
+ }, {
98
+ id: "other",
99
+ label: "Other"
100
+ }];
101
+
102
+ /* ---- the inline prompt row ----------------------------------------- */
103
+
104
+ /* Down-vote reuses the up icon, rotated (the DS set only ships
105
+ ThumbUpOutlineIcon). */
106
+ var StyledPrompt = _styledComponents.default.div.withConfig({
107
+ displayName: "MessageFeedback__StyledPrompt",
108
+ componentId: "sc-1i96o75-0"
109
+ })(["display:flex;align-items:center;justify-content:center;gap:8px;padding:8px 24px 28px;", "{padding:4px 24px 24px;}.fb-question{margin-right:4px;}.fb-btn svg{width:18px;height:18px;}.fb-down svg{transform:rotate(180deg);}"], _BreakPoints.screenBelow.sm);
110
+
111
+ /* ---- the details dialog -------------------------------------------- */
112
+
113
+ var StyledForm = _styledComponents.default.div.withConfig({
114
+ displayName: "MessageFeedback__StyledForm",
115
+ componentId: "sc-1i96o75-1"
116
+ })(["display:flex;flex-direction:column;gap:20px;.fb-field{display:flex;flex-direction:column;gap:8px;}.fb-chips{display:flex;flex-wrap:wrap;gap:8px;}.c-textarea{width:100%;box-sizing:border-box;}"]);
117
+
118
+ /* The option chip — a pill that toggles to the theme primary tint when
119
+ selected. Translated from the trial Feedback chip into styled-components
120
+ (runtime tw- classes do not work in the presentation storybook). The label
121
+ text is a DS Body2 so it carries the correct font. */
122
+ var StyledChip = _styledComponents.default.button.withConfig({
123
+ displayName: "MessageFeedback__StyledChip",
124
+ componentId: "sc-1i96o75-2"
125
+ })(["display:inline-flex;align-items:center;box-sizing:border-box;margin:0;padding:3px 8px 4px;border:1px solid ", ";border-radius:4px;background-color:", ";cursor:pointer;transition:border-color 120ms ease,background-color 120ms ease;&:hover{border-color:var(--color-primary);}"], function (_ref) {
126
+ var $selected = _ref.$selected;
127
+ return $selected ? "var(--color-primary)" : "var(--color-theme-500)";
128
+ }, function (_ref2) {
129
+ var $selected = _ref2.$selected;
130
+ return $selected ? "var(--color-primary-300)" : "transparent";
131
+ });
132
+ var FeedbackChip = function FeedbackChip(_ref3) {
133
+ var option = _ref3.option,
134
+ selected = _ref3.selected,
135
+ onToggle = _ref3.onToggle;
136
+ return /*#__PURE__*/_react.default.createElement(StyledChip, {
137
+ type: "button",
138
+ $selected: selected,
139
+ "aria-pressed": selected,
140
+ onClick: function onClick() {
141
+ return onToggle(option.id);
142
+ }
143
+ }, /*#__PURE__*/_react.default.createElement(_Typography2.Typography, {
144
+ variant: "Body 2",
145
+ as: "span"
146
+ }, option.label));
147
+ };
148
+ var StyledActions = _styledComponents.default.div.withConfig({
149
+ displayName: "MessageFeedback__StyledActions",
150
+ componentId: "sc-1i96o75-3"
151
+ })(["display:flex;gap:12px;"]);
152
+
153
+ /* ---- the component ------------------------------------------------- */
154
+
155
+ var MessageFeedback = exports.MessageFeedback = function MessageFeedback(_ref4) {
156
+ var _ref4$question = _ref4.question,
157
+ question = _ref4$question === void 0 ? "Was this helpful?" : _ref4$question,
158
+ _ref4$positiveTitle = _ref4.positiveTitle,
159
+ positiveTitle = _ref4$positiveTitle === void 0 ? "What was good?" : _ref4$positiveTitle,
160
+ _ref4$negativeTitle = _ref4.negativeTitle,
161
+ negativeTitle = _ref4$negativeTitle === void 0 ? "What went wrong?" : _ref4$negativeTitle,
162
+ _ref4$positiveOptions = _ref4.positiveOptions,
163
+ positiveOptions = _ref4$positiveOptions === void 0 ? POSITIVE_FEEDBACK_OPTIONS : _ref4$positiveOptions,
164
+ _ref4$negativeOptions = _ref4.negativeOptions,
165
+ negativeOptions = _ref4$negativeOptions === void 0 ? NEGATIVE_FEEDBACK_OPTIONS : _ref4$negativeOptions,
166
+ onVote = _ref4.onVote,
167
+ onSubmit = _ref4.onSubmit;
168
+ var _useState = (0, _react.useState)(null),
169
+ _useState2 = _slicedToArray(_useState, 2),
170
+ sentiment = _useState2[0],
171
+ setSentiment = _useState2[1];
172
+ var _useState3 = (0, _react.useState)("closed"),
173
+ _useState4 = _slicedToArray(_useState3, 2),
174
+ stage = _useState4[0],
175
+ setStage = _useState4[1];
176
+ var _useState5 = (0, _react.useState)([]),
177
+ _useState6 = _slicedToArray(_useState5, 2),
178
+ selected = _useState6[0],
179
+ setSelected = _useState6[1];
180
+ var _useState7 = (0, _react.useState)(""),
181
+ _useState8 = _slicedToArray(_useState7, 2),
182
+ comment = _useState8[0],
183
+ setComment = _useState8[1];
184
+ var _useState9 = (0, _react.useState)(false),
185
+ _useState0 = _slicedToArray(_useState9, 2),
186
+ done = _useState0[0],
187
+ setDone = _useState0[1];
188
+ var vote = (0, _react.useCallback)(function (value) {
189
+ setSentiment(value);
190
+ setSelected([]);
191
+ setComment("");
192
+ onVote === null || onVote === void 0 || onVote(value);
193
+ setStage("details");
194
+ }, [onVote]);
195
+ var toggleOption = (0, _react.useCallback)(function (id) {
196
+ setSelected(function (current) {
197
+ return current.includes(id) ? current.filter(function (one) {
198
+ return one !== id;
199
+ }) : [...current, id];
200
+ });
201
+ }, []);
202
+ var submit = (0, _react.useCallback)(function () {
203
+ if (sentiment) {
204
+ onSubmit === null || onSubmit === void 0 || onSubmit({
205
+ sentiment,
206
+ options: selected,
207
+ comment: comment.trim()
208
+ });
209
+ }
210
+ setStage("closed");
211
+ setDone(true);
212
+ }, [sentiment, selected, comment, onSubmit]);
213
+
214
+ /* Cancel keeps the vote (already sent on the thumb press) and closes. */
215
+ var finish = (0, _react.useCallback)(function () {
216
+ setStage("closed");
217
+ setDone(true);
218
+ }, []);
219
+ var isPositive = sentiment === "up";
220
+ var options = isPositive ? positiveOptions : negativeOptions;
221
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(StyledPrompt, null, done ? /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
222
+ color: "secondary"
223
+ }, "Thank you for the feedback!") : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
224
+ color: "secondary",
225
+ className: "fb-question"
226
+ }, question), /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, {
227
+ title: "Yes, helpful"
228
+ }, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, {
229
+ type: "button",
230
+ variant: "text gray",
231
+ className: "fb-btn",
232
+ "aria-label": "Yes, helpful",
233
+ onClick: function onClick() {
234
+ return vote("up");
235
+ }
236
+ }, /*#__PURE__*/_react.default.createElement(_Icons.ThumbUpOutlineIcon, null))), /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, {
237
+ title: "No, not helpful"
238
+ }, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, {
239
+ type: "button",
240
+ variant: "text gray",
241
+ className: "fb-btn fb-down",
242
+ "aria-label": "No, not helpful",
243
+ onClick: function onClick() {
244
+ return vote("down");
245
+ }
246
+ }, /*#__PURE__*/_react.default.createElement(_Icons.ThumbUpOutlineIcon, null))))), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog, {
247
+ open: stage !== "closed",
248
+ onClose: finish,
249
+ enableBackgroundClick: true
250
+ }, stage === "details" ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Title, null, isPositive ? positiveTitle : negativeTitle), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.ContentDivider, null), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Content, null, /*#__PURE__*/_react.default.createElement(StyledForm, null, /*#__PURE__*/_react.default.createElement("div", {
251
+ className: "fb-field"
252
+ }, /*#__PURE__*/_react.default.createElement(_Label.Label, null, "Select all that apply"), /*#__PURE__*/_react.default.createElement("div", {
253
+ className: "fb-chips"
254
+ }, options.map(function (option) {
255
+ return /*#__PURE__*/_react.default.createElement(FeedbackChip, {
256
+ key: option.id,
257
+ option: option,
258
+ selected: selected.includes(option.id),
259
+ onToggle: toggleOption
260
+ });
261
+ }))), /*#__PURE__*/_react.default.createElement("div", {
262
+ className: "fb-field"
263
+ }, /*#__PURE__*/_react.default.createElement(_Label.Label, {
264
+ htmlFor: "fb-comment"
265
+ }, "Tell us more (optional)"), /*#__PURE__*/_react.default.createElement(_Textarea.Textarea, {
266
+ id: "fb-comment",
267
+ value: comment,
268
+ placeholder: isPositive ? "What made this useful?" : "What would have helped?",
269
+ onChange: function onChange(event) {
270
+ return setComment(event.target.value);
271
+ }
272
+ })))), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.ContentDivider, null), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Actions, null, /*#__PURE__*/_react.default.createElement(StyledActions, null, /*#__PURE__*/_react.default.createElement(_Button.Button, {
273
+ variant: "primary",
274
+ size: "small",
275
+ type: "button",
276
+ onClick: submit
277
+ }, "Submit"), /*#__PURE__*/_react.default.createElement(_Button.Button, {
278
+ variant: "secondary",
279
+ size: "small",
280
+ type: "button",
281
+ onClick: finish
282
+ }, "Cancel")))) : null));
283
+ };
284
+ //# sourceMappingURL=MessageFeedback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageFeedback.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_BreakPoints","_Button","_Dialog","_IconButton","_Icons","_Label","_Textarea","_Tooltip","_Typography","_Typography2","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","length","l","Symbol","iterator","u","next","done","push","value","return","isArray","POSITIVE_FEEDBACK_OPTIONS","exports","id","label","NEGATIVE_FEEDBACK_OPTIONS","StyledPrompt","styled","div","withConfig","displayName","componentId","screenBelow","sm","StyledForm","StyledChip","button","_ref","$selected","_ref2","FeedbackChip","_ref3","option","selected","onToggle","createElement","type","onClick","Typography","variant","as","StyledActions","MessageFeedback","_ref4","_ref4$question","question","_ref4$positiveTitle","positiveTitle","_ref4$negativeTitle","negativeTitle","_ref4$positiveOptions","positiveOptions","_ref4$negativeOptions","negativeOptions","onVote","onSubmit","_useState","useState","_useState2","sentiment","setSentiment","_useState3","_useState4","stage","setStage","_useState5","_useState6","setSelected","_useState7","_useState8","comment","setComment","_useState9","_useState0","setDone","vote","useCallback","toggleOption","current","includes","filter","one","submit","options","trim","finish","isPositive","Fragment","Body2","color","className","Tooltip","title","IconButton","ThumbUpOutlineIcon","Dialog","open","onClose","enableBackgroundClick","Title","ContentDivider","Content","Label","map","key","htmlFor","Textarea","placeholder","onChange","event","target","Actions","Button","size"],"sources":["../../../../src/presentation/shared/MessageFeedback.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode, useCallback, useState } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { screenBelow } from \"../../components/BreakPoints\";\nimport { Button } from \"../../components/Button\";\nimport { Dialog } from \"../../components/Dialog\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { ThumbUpOutlineIcon } from \"../../components/Icons\";\nimport { Label } from \"../../components/Label\";\nimport { Textarea } from \"../../components/Textarea\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Body2 } from \"../../components/Typography\";\nimport { Typography } from \"../../components/Typography/Typography\";\n\n/**\n * MessageFeedback — the reusable \"Was this helpful?\" flow, as a Presentation\n * mock.\n *\n * It is built only from design-system parts and owns the whole flow, so any\n * content surface (the message dialog, a help article, a settings panel) can\n * drop it in and get the same behaviour:\n *\n * 1. Prompt — an inline \"Was this helpful?\" row with a thumb up / down.\n * 2. Details — a centred dialog: option chips for the chosen sentiment,\n * plus an optional free-text comment. Submit or Cancel.\n * 3. Thank you — a short confirmation, then the prompt shows a quiet\n * \"Thanks for your feedback!\".\n *\n * The vote is recorded the moment a thumb is pressed (`onVote`), so a user who\n * cancels the details step still leaves a valid vote — the same contract the\n * trial Feedback flow uses. The details are reported on Submit (`onSubmit`).\n *\n * In the product this lives in application code; the presentation ships this\n * demo copy so the stories need no app imports.\n */\n\n/* ---- public types & default option catalogs ------------------------ */\n\nexport type FeedbackSentiment = \"up\" | \"down\";\n\nexport interface FeedbackOption {\n /** Stable id sent with the feedback record; not shown to the user. */\n id: string;\n /** The chip label the user sees. */\n label: string;\n}\n\nexport interface MessageFeedbackResult {\n sentiment: FeedbackSentiment;\n /** The ids of the chosen option chips. */\n options: string[];\n /** The free-text comment, trimmed; \"\" when left blank. */\n comment: string;\n}\n\n/* The options rate the one piece of content, not the whole product. Each\n negative option maps to an action a writer can take. Override per surface\n through the component props. */\nexport const POSITIVE_FEEDBACK_OPTIONS: FeedbackOption[] = [\n { id: \"clear\", label: \"Clear and easy to understand\" },\n { id: \"answered\", label: \"Answered my question\" },\n { id: \"right-detail\", label: \"Right amount of detail\" },\n { id: \"helped-use\", label: \"Helped me use the feature\" },\n { id: \"good-examples\", label: \"Good examples or screenshots\" },\n { id: \"other\", label: \"Other\" },\n];\n\nexport const NEGATIVE_FEEDBACK_OPTIONS: FeedbackOption[] = [\n { id: \"not-answered\", label: \"Did not answer my question\" },\n { id: \"confusing\", label: \"Confusing or hard to follow\" },\n { id: \"too-long\", label: \"Too long\" },\n { id: \"not-enough-detail\", label: \"Not enough detail\" },\n { id: \"out-of-date\", label: \"Out of date or incorrect\" },\n { id: \"wrong-plan-role\", label: \"Wrong for my plan or role\" },\n { id: \"not-found\", label: \"I could not find what I needed\" },\n { id: \"broken\", label: \"Something is broken\" },\n { id: \"other\", label: \"Other\" },\n];\n\n/* ---- the inline prompt row ----------------------------------------- */\n\n/* Down-vote reuses the up icon, rotated (the DS set only ships\n ThumbUpOutlineIcon). */\nconst StyledPrompt = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 8px 24px 28px;\n\n ${screenBelow.sm} {\n padding: 4px 24px 24px;\n }\n\n .fb-question {\n margin-right: 4px;\n }\n\n .fb-btn svg {\n width: 18px;\n height: 18px;\n }\n\n .fb-down svg {\n transform: rotate(180deg);\n }\n`;\n\n/* ---- the details dialog -------------------------------------------- */\n\nconst StyledForm = styled.div`\n display: flex;\n flex-direction: column;\n gap: 20px;\n\n .fb-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n }\n\n .fb-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n }\n\n /* DS Textarea is a fixed 360px; let it fill the dialog width instead. */\n .c-textarea {\n width: 100%;\n box-sizing: border-box;\n }\n`;\n\n/* The option chip — a pill that toggles to the theme primary tint when\n selected. Translated from the trial Feedback chip into styled-components\n (runtime tw- classes do not work in the presentation storybook). The label\n text is a DS Body2 so it carries the correct font. */\nconst StyledChip = styled.button<{ $selected: boolean }>`\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n margin: 0;\n padding: 3px 8px 4px;\n border: 1px solid\n ${({ $selected }) =>\n $selected ? \"var(--color-primary)\" : \"var(--color-theme-500)\"};\n border-radius: 4px;\n background-color: ${({ $selected }) =>\n $selected ? \"var(--color-primary-300)\" : \"transparent\"};\n cursor: pointer;\n transition: border-color 120ms ease, background-color 120ms ease;\n\n &:hover {\n border-color: var(--color-primary);\n }\n`;\n\nconst FeedbackChip = ({\n option,\n selected,\n onToggle,\n}: {\n option: FeedbackOption;\n selected: boolean;\n onToggle: (id: string) => void;\n}): ReactElement => (\n <StyledChip\n type=\"button\"\n $selected={selected}\n aria-pressed={selected}\n onClick={() => onToggle(option.id)}\n >\n <Typography variant=\"Body 2\" as=\"span\">\n {option.label}\n </Typography>\n </StyledChip>\n);\n\nconst StyledActions = styled.div`\n display: flex;\n gap: 12px;\n`;\n\n/* ---- the component ------------------------------------------------- */\n\ntype DialogStage = \"closed\" | \"details\";\n\nexport interface MessageFeedbackProps {\n /** The inline prompt copy. */\n question?: ReactNode;\n /** Details-dialog title for a thumb up / down. */\n positiveTitle?: string;\n negativeTitle?: string;\n /** Option catalogs; default to the content-feedback sets above. */\n positiveOptions?: FeedbackOption[];\n negativeOptions?: FeedbackOption[];\n /** Fired the moment a thumb is pressed (the vote itself). */\n onVote?: (sentiment: FeedbackSentiment) => void;\n /** Fired on Submit, with the chosen options and comment. */\n onSubmit?: (result: MessageFeedbackResult) => void;\n}\n\nexport const MessageFeedback = ({\n question = \"Was this helpful?\",\n positiveTitle = \"What was good?\",\n negativeTitle = \"What went wrong?\",\n positiveOptions = POSITIVE_FEEDBACK_OPTIONS,\n negativeOptions = NEGATIVE_FEEDBACK_OPTIONS,\n onVote,\n onSubmit,\n}: MessageFeedbackProps): ReactElement => {\n const [sentiment, setSentiment] = useState<FeedbackSentiment | null>(null);\n const [stage, setStage] = useState<DialogStage>(\"closed\");\n const [selected, setSelected] = useState<string[]>([]);\n const [comment, setComment] = useState(\"\");\n const [done, setDone] = useState(false);\n\n const vote = useCallback(\n (value: FeedbackSentiment) => {\n setSentiment(value);\n setSelected([]);\n setComment(\"\");\n onVote?.(value);\n setStage(\"details\");\n },\n [onVote]\n );\n\n const toggleOption = useCallback((id: string) => {\n setSelected((current) =>\n current.includes(id)\n ? current.filter((one) => one !== id)\n : [...current, id]\n );\n }, []);\n\n const submit = useCallback(() => {\n if (sentiment) {\n onSubmit?.({ sentiment, options: selected, comment: comment.trim() });\n }\n setStage(\"closed\");\n setDone(true);\n }, [sentiment, selected, comment, onSubmit]);\n\n /* Cancel keeps the vote (already sent on the thumb press) and closes. */\n const finish = useCallback(() => {\n setStage(\"closed\");\n setDone(true);\n }, []);\n\n const isPositive = sentiment === \"up\";\n const options = isPositive ? positiveOptions : negativeOptions;\n\n return (\n <>\n <StyledPrompt>\n {done ? (\n <Body2 color=\"secondary\">Thank you for the feedback!</Body2>\n ) : (\n <>\n <Body2 color=\"secondary\" className=\"fb-question\">\n {question}\n </Body2>\n <Tooltip title=\"Yes, helpful\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n className=\"fb-btn\"\n aria-label=\"Yes, helpful\"\n onClick={() => vote(\"up\")}\n >\n <ThumbUpOutlineIcon />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"No, not helpful\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n className=\"fb-btn fb-down\"\n aria-label=\"No, not helpful\"\n onClick={() => vote(\"down\")}\n >\n <ThumbUpOutlineIcon />\n </IconButton>\n </Tooltip>\n </>\n )}\n </StyledPrompt>\n\n <Dialog open={stage !== \"closed\"} onClose={finish} enableBackgroundClick>\n {stage === \"details\" ? (\n <>\n <Dialog.Title>\n {isPositive ? positiveTitle : negativeTitle}\n </Dialog.Title>\n <Dialog.ContentDivider />\n <Dialog.Content>\n <StyledForm>\n <div className=\"fb-field\">\n <Label>Select all that apply</Label>\n <div className=\"fb-chips\">\n {options.map((option) => (\n <FeedbackChip\n key={option.id}\n option={option}\n selected={selected.includes(option.id)}\n onToggle={toggleOption}\n />\n ))}\n </div>\n </div>\n <div className=\"fb-field\">\n <Label htmlFor=\"fb-comment\">Tell us more (optional)</Label>\n <Textarea\n id=\"fb-comment\"\n value={comment}\n placeholder={\n isPositive\n ? \"What made this useful?\"\n : \"What would have helped?\"\n }\n onChange={(event) => setComment(event.target.value)}\n />\n </div>\n </StyledForm>\n </Dialog.Content>\n <Dialog.ContentDivider />\n <Dialog.Actions>\n <StyledActions>\n <Button\n variant=\"primary\"\n size=\"small\"\n type=\"button\"\n onClick={submit}\n >\n Submit\n </Button>\n <Button\n variant=\"secondary\"\n size=\"small\"\n type=\"button\"\n onClick={finish}\n >\n Cancel\n </Button>\n </StyledActions>\n </Dialog.Actions>\n </>\n ) : null}\n </Dialog>\n </>\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AACA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,YAAA,GAAAZ,OAAA;AAAoE,SAAAE,uBAAAW,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAd,wBAAAc,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAlB,uBAAA,YAAAA,wBAAAc,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAA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,OAAO,qBACbjK,MAAA,CAAAiB,OAAA,CAAAoE,aAAA,CAACM,aAAa,qBACZ3F,MAAA,CAAAiB,OAAA,CAAAoE,aAAA,CAAC/E,OAAA,CAAA4J,MAAM;IACLzE,OAAO,EAAC,SAAS;IACjB0E,IAAI,EAAC,OAAO;IACZ7E,IAAI,EAAC,QAAQ;IACbC,OAAO,EAAE6C;EAAO,GACjB,QAEO,CAAC,eACTpI,MAAA,CAAAiB,OAAA,CAAAoE,aAAA,CAAC/E,OAAA,CAAA4J,MAAM;IACLzE,OAAO,EAAC,WAAW;IACnB0E,IAAI,EAAC,OAAO;IACZ7E,IAAI,EAAC,QAAQ;IACbC,OAAO,EAAEgD;EAAO,GACjB,QAEO,CACK,CACD,CAChB,CAAC,GACD,IACE,CACR,CAAC;AAEP,CAAC","ignoreList":[]}
@@ -15,6 +15,9 @@ var _exportNames = {
15
15
  MessageDialog: true,
16
16
  DocLinkContext: true,
17
17
  messageComponents: true,
18
+ MessageFeedback: true,
19
+ POSITIVE_FEEDBACK_OPTIONS: true,
20
+ NEGATIVE_FEEDBACK_OPTIONS: true,
18
21
  HelpAndSupportMenu: true,
19
22
  LinkingCommandsButton: true,
20
23
  LinkBranchOrPullRequestDialog: true,
@@ -156,6 +159,24 @@ Object.defineProperty(exports, "MessageDialog", {
156
159
  return _MessageDialog.MessageDialog;
157
160
  }
158
161
  });
162
+ Object.defineProperty(exports, "MessageFeedback", {
163
+ enumerable: true,
164
+ get: function get() {
165
+ return _MessageFeedback.MessageFeedback;
166
+ }
167
+ });
168
+ Object.defineProperty(exports, "NEGATIVE_FEEDBACK_OPTIONS", {
169
+ enumerable: true,
170
+ get: function get() {
171
+ return _MessageFeedback.NEGATIVE_FEEDBACK_OPTIONS;
172
+ }
173
+ });
174
+ Object.defineProperty(exports, "POSITIVE_FEEDBACK_OPTIONS", {
175
+ enumerable: true,
176
+ get: function get() {
177
+ return _MessageFeedback.POSITIVE_FEEDBACK_OPTIONS;
178
+ }
179
+ });
159
180
  Object.defineProperty(exports, "PROJECT_REPOSITORIES", {
160
181
  enumerable: true,
161
182
  get: function get() {
@@ -324,6 +345,7 @@ var _PresentationShell = require("./PresentationShell");
324
345
  var _headers = require("./headers");
325
346
  var _FloatingControls = require("./FloatingControls");
326
347
  var _MessageDialog = require("./MessageDialog");
348
+ var _MessageFeedback = require("./MessageFeedback");
327
349
  var _HelpAndSupportMenu = require("./HelpAndSupportMenu");
328
350
  var _LinkingCommandsButton = require("./LinkingCommandsButton");
329
351
  var _LinkBranchOrPullRequestDialog = require("./LinkBranchOrPullRequestDialog");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_tokens","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_MainLogo","_RoundAvatar","_PresentationShell","_headers","_FloatingControls","_MessageDialog","_HelpAndSupportMenu","_LinkingCommandsButton","_LinkBranchOrPullRequestDialog","_ConnectRepositoryDialog","_WebhookLogsDialog","_SourceCodeSection","_SuggestSubtasksButton","_TaskOptionsMenu","_UserMenu","_TwoFactorShield","_TwoFactorDialogs","_settings","_FeatureAvailability"],"sources":["../../../../src/presentation/shared/index.ts"],"sourcesContent":["/**\n * Shared building blocks for the Presentation mock-ups (`Presentation/*`\n * stories). The application shell, page headers, tab bar and small widgets are\n * defined once here and reused by the List view, Column view, Task sheet and\n * empty-page stories so the chrome stays identical and in one place.\n */\nexport * from \"./tokens\";\nexport { MainLogo } from \"./MainLogo\";\nexport { RoundAvatar } from \"./RoundAvatar\";\nexport { PresentationShell, StyledPagePaper } from \"./PresentationShell\";\nexport type { PresentationShellProps } from \"./PresentationShell\";\nexport { PageHeader, ProjectPageHeader, TabHeader } from \"./headers\";\nexport type {\n PageHeaderProps,\n ProjectPageHeaderProps,\n TabHeaderProps,\n} from \"./headers\";\nexport { FloatingControls } from \"./FloatingControls\";\nexport {\n MessageDialog,\n DocLinkContext,\n messageComponents,\n} from \"./MessageDialog\";\nexport type {\n MessageDialogProps,\n MessageDialogSize,\n OpenArticleHandler,\n} from \"./MessageDialog\";\nexport { HelpAndSupportMenu } from \"./HelpAndSupportMenu\";\nexport type { HelpAndSupportMenuProps } from \"./HelpAndSupportMenu\";\nexport { LinkingCommandsButton } from \"./LinkingCommandsButton\";\nexport { LinkBranchOrPullRequestDialog } from \"./LinkBranchOrPullRequestDialog\";\nexport type { LinkBranchOrPullRequestDialogProps } from \"./LinkBranchOrPullRequestDialog\";\nexport {\n ConnectRepositoryDialog,\n RepositorySelect,\n buildRepoOptions,\n CONNECTIONS,\n PROJECT_REPOSITORIES,\n CONNECTABLE_REPOSITORIES,\n} from \"./ConnectRepositoryDialog\";\nexport type {\n ConnectRepositoryDialogProps,\n RepositorySelectProps,\n Connection,\n ConnectionService,\n Repository,\n} from \"./ConnectRepositoryDialog\";\nexport {\n WebhookLogsDialog,\n WEBHOOK_CONNECTIONS,\n WEBHOOK_REPOSITORIES,\n} from \"./WebhookLogsDialog\";\nexport type {\n WebhookLogsDialogProps,\n WebhookConnection,\n WebhookRepository,\n WebhookLog,\n} from \"./WebhookLogsDialog\";\nexport {\n SourceCodeSection,\n IssueRow,\n CodeRow,\n Spine,\n HistoryDialog,\n CompletedHeader,\n} from \"./SourceCodeSection\";\nexport type {\n IssueEntry,\n CodeEntry,\n Stage,\n HistoryEvent,\n StageState,\n CodeStatus,\n SectionVariant,\n} from \"./SourceCodeSection\";\nexport { SuggestSubtasksButton } from \"./SuggestSubtasksButton\";\nexport { TaskOptionsMenu, TaskListOptionsMenu } from \"./TaskOptionsMenu\";\nexport type {\n TaskOptionsMenuProps,\n TaskListOptionsMenuProps,\n} from \"./TaskOptionsMenu\";\nexport { UserMenu } from \"./UserMenu\";\nexport type { UserMenuProps, UserMenuVariant } from \"./UserMenu\";\nexport { TwoFactorShield } from \"./TwoFactorShield\";\nexport type { TwoFactorShieldProps } from \"./TwoFactorShield\";\nexport { BackupCodesDialogs, CreateLoginCodeDialogs } from \"./TwoFactorDialogs\";\nexport type {\n BackupCodesDialogsProps,\n CreateLoginCodeDialogsProps,\n} from \"./TwoFactorDialogs\";\nexport {\n SettingsHeader,\n SettingsContent,\n StyledSettingRow,\n RowText,\n SettingRow,\n} from \"./settings\";\nexport type { SettingsHeaderProps, SettingRowProps } from \"./settings\";\nexport {\n FeatureAvailability,\n DEFAULT_FEATURE_AVAILABILITY,\n} from \"./FeatureAvailability\";\nexport type {\n FeatureAvailabilityProps,\n AvailabilityRow,\n AvailabilityMark,\n AvailabilityStatus,\n} from \"./FeatureAvailability\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAb,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,SAAA,GAAAb,OAAA;AACA,IAAAc,YAAA,GAAAd,OAAA;AACA,IAAAe,kBAAA,GAAAf,OAAA;AAEA,IAAAgB,QAAA,GAAAhB,OAAA;AAMA,IAAAiB,iBAAA,GAAAjB,OAAA;AACA,IAAAkB,cAAA,GAAAlB,OAAA;AAUA,IAAAmB,mBAAA,GAAAnB,OAAA;AAEA,IAAAoB,sBAAA,GAAApB,OAAA;AACA,IAAAqB,8BAAA,GAAArB,OAAA;AAEA,IAAAsB,wBAAA,GAAAtB,OAAA;AAeA,IAAAuB,kBAAA,GAAAvB,OAAA;AAWA,IAAAwB,kBAAA,GAAAxB,OAAA;AAiBA,IAAAyB,sBAAA,GAAAzB,OAAA;AACA,IAAA0B,gBAAA,GAAA1B,OAAA;AAKA,IAAA2B,SAAA,GAAA3B,OAAA;AAEA,IAAA4B,gBAAA,GAAA5B,OAAA;AAEA,IAAA6B,iBAAA,GAAA7B,OAAA;AAKA,IAAA8B,SAAA,GAAA9B,OAAA;AAQA,IAAA+B,oBAAA,GAAA/B,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_tokens","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_MainLogo","_RoundAvatar","_PresentationShell","_headers","_FloatingControls","_MessageDialog","_MessageFeedback","_HelpAndSupportMenu","_LinkingCommandsButton","_LinkBranchOrPullRequestDialog","_ConnectRepositoryDialog","_WebhookLogsDialog","_SourceCodeSection","_SuggestSubtasksButton","_TaskOptionsMenu","_UserMenu","_TwoFactorShield","_TwoFactorDialogs","_settings","_FeatureAvailability"],"sources":["../../../../src/presentation/shared/index.ts"],"sourcesContent":["/**\n * Shared building blocks for the Presentation mock-ups (`Presentation/*`\n * stories). The application shell, page headers, tab bar and small widgets are\n * defined once here and reused by the List view, Column view, Task sheet and\n * empty-page stories so the chrome stays identical and in one place.\n */\nexport * from \"./tokens\";\nexport { MainLogo } from \"./MainLogo\";\nexport { RoundAvatar } from \"./RoundAvatar\";\nexport { PresentationShell, StyledPagePaper } from \"./PresentationShell\";\nexport type { PresentationShellProps } from \"./PresentationShell\";\nexport { PageHeader, ProjectPageHeader, TabHeader } from \"./headers\";\nexport type {\n PageHeaderProps,\n ProjectPageHeaderProps,\n TabHeaderProps,\n} from \"./headers\";\nexport { FloatingControls } from \"./FloatingControls\";\nexport {\n MessageDialog,\n DocLinkContext,\n messageComponents,\n} from \"./MessageDialog\";\nexport type {\n MessageDialogProps,\n MessageDialogSize,\n OpenArticleHandler,\n} from \"./MessageDialog\";\nexport {\n MessageFeedback,\n POSITIVE_FEEDBACK_OPTIONS,\n NEGATIVE_FEEDBACK_OPTIONS,\n} from \"./MessageFeedback\";\nexport type {\n MessageFeedbackProps,\n MessageFeedbackResult,\n FeedbackOption,\n FeedbackSentiment,\n} from \"./MessageFeedback\";\nexport { HelpAndSupportMenu } from \"./HelpAndSupportMenu\";\nexport type { HelpAndSupportMenuProps } from \"./HelpAndSupportMenu\";\nexport { LinkingCommandsButton } from \"./LinkingCommandsButton\";\nexport { LinkBranchOrPullRequestDialog } from \"./LinkBranchOrPullRequestDialog\";\nexport type { LinkBranchOrPullRequestDialogProps } from \"./LinkBranchOrPullRequestDialog\";\nexport {\n ConnectRepositoryDialog,\n RepositorySelect,\n buildRepoOptions,\n CONNECTIONS,\n PROJECT_REPOSITORIES,\n CONNECTABLE_REPOSITORIES,\n} from \"./ConnectRepositoryDialog\";\nexport type {\n ConnectRepositoryDialogProps,\n RepositorySelectProps,\n Connection,\n ConnectionService,\n Repository,\n} from \"./ConnectRepositoryDialog\";\nexport {\n WebhookLogsDialog,\n WEBHOOK_CONNECTIONS,\n WEBHOOK_REPOSITORIES,\n} from \"./WebhookLogsDialog\";\nexport type {\n WebhookLogsDialogProps,\n WebhookConnection,\n WebhookRepository,\n WebhookLog,\n} from \"./WebhookLogsDialog\";\nexport {\n SourceCodeSection,\n IssueRow,\n CodeRow,\n Spine,\n HistoryDialog,\n CompletedHeader,\n} from \"./SourceCodeSection\";\nexport type {\n IssueEntry,\n CodeEntry,\n Stage,\n HistoryEvent,\n StageState,\n CodeStatus,\n SectionVariant,\n} from \"./SourceCodeSection\";\nexport { SuggestSubtasksButton } from \"./SuggestSubtasksButton\";\nexport { TaskOptionsMenu, TaskListOptionsMenu } from \"./TaskOptionsMenu\";\nexport type {\n TaskOptionsMenuProps,\n TaskListOptionsMenuProps,\n} from \"./TaskOptionsMenu\";\nexport { UserMenu } from \"./UserMenu\";\nexport type { UserMenuProps, UserMenuVariant } from \"./UserMenu\";\nexport { TwoFactorShield } from \"./TwoFactorShield\";\nexport type { TwoFactorShieldProps } from \"./TwoFactorShield\";\nexport { BackupCodesDialogs, CreateLoginCodeDialogs } from \"./TwoFactorDialogs\";\nexport type {\n BackupCodesDialogsProps,\n CreateLoginCodeDialogsProps,\n} from \"./TwoFactorDialogs\";\nexport {\n SettingsHeader,\n SettingsContent,\n StyledSettingRow,\n RowText,\n SettingRow,\n} from \"./settings\";\nexport type { SettingsHeaderProps, SettingRowProps } from \"./settings\";\nexport {\n FeatureAvailability,\n DEFAULT_FEATURE_AVAILABILITY,\n} from \"./FeatureAvailability\";\nexport type {\n FeatureAvailabilityProps,\n AvailabilityRow,\n AvailabilityMark,\n AvailabilityStatus,\n} from \"./FeatureAvailability\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAb,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,SAAA,GAAAb,OAAA;AACA,IAAAc,YAAA,GAAAd,OAAA;AACA,IAAAe,kBAAA,GAAAf,OAAA;AAEA,IAAAgB,QAAA,GAAAhB,OAAA;AAMA,IAAAiB,iBAAA,GAAAjB,OAAA;AACA,IAAAkB,cAAA,GAAAlB,OAAA;AAUA,IAAAmB,gBAAA,GAAAnB,OAAA;AAWA,IAAAoB,mBAAA,GAAApB,OAAA;AAEA,IAAAqB,sBAAA,GAAArB,OAAA;AACA,IAAAsB,8BAAA,GAAAtB,OAAA;AAEA,IAAAuB,wBAAA,GAAAvB,OAAA;AAeA,IAAAwB,kBAAA,GAAAxB,OAAA;AAWA,IAAAyB,kBAAA,GAAAzB,OAAA;AAiBA,IAAA0B,sBAAA,GAAA1B,OAAA;AACA,IAAA2B,gBAAA,GAAA3B,OAAA;AAKA,IAAA4B,SAAA,GAAA5B,OAAA;AAEA,IAAA6B,gBAAA,GAAA7B,OAAA;AAEA,IAAA8B,iBAAA,GAAA9B,OAAA;AAKA,IAAA+B,SAAA,GAAA/B,OAAA;AAQA,IAAAgC,oBAAA,GAAAhC,OAAA","ignoreList":[]}
@@ -1,4 +1,5 @@
1
1
  import React, { ReactElement, ReactNode } from "react";
2
+ import type { MessageFeedbackResult } from "./MessageFeedback";
2
3
  import { PortableTextComponents } from "../../components/PortableText";
3
4
  /**
4
5
  * The in-app message dialog, as a Presentation mock.
@@ -19,11 +20,15 @@ export interface MessageDialogProps {
19
20
  open: boolean;
20
21
  onClose: () => void;
21
22
  size?: MessageDialogSize;
22
- /** Supplying a handler shows the centred helpful / not-helpful vote. */
23
- onVote?: (vote: "up" | "down") => void;
23
+ /** Show the reusable helpful / not-helpful feedback flow. */
24
+ feedback?: boolean;
25
+ /** Fired when a thumb is pressed (the vote itself). */
26
+ onVote?: (sentiment: "up" | "down") => void;
27
+ /** Fired on Submit, with the chosen options and comment. */
28
+ onFeedbackSubmit?: (result: MessageFeedbackResult) => void;
24
29
  children: ReactNode;
25
30
  }
26
- export declare const MessageDialog: ({ open, onClose, size, onVote, children, }: MessageDialogProps) => ReactElement;
31
+ export declare const MessageDialog: ({ open, onClose, size, feedback, onVote, onFeedbackSubmit, children, }: MessageDialogProps) => ReactElement;
27
32
  /** How a doc-link mark opens its article (by a slug-like reference). The
28
33
  surface that renders the message supplies the handler — in the product it
29
34
  closes the dialog and opens the article Sheet. */
@@ -1 +1 @@
1
- {"version":3,"file":"MessageDialog.d.ts","sourceRoot":"","sources":["../../../../src/presentation/shared/MessageDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,YAAY,EACZ,SAAS,EAIV,MAAM,OAAO,CAAC;AAaf,OAAO,EAEL,sBAAsB,EAKvB,MAAM,+BAA+B,CAAC;AAUvC;;;;;;;;;;;;;GAaG;AAIH,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAiInD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,wEAAwE;IACxE,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,GAAI,4CAM3B,kBAAkB,KAAG,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