@100mslive/roomkit-react 0.3.24-alpha.0 → 0.3.24-alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Theme/ThemeProvider.d.ts +1 -0
- package/dist/index.cjs.css +2 -2
- package/dist/index.cjs.css.map +1 -1
- package/dist/index.cjs.js +34109 -37488
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.js +36389 -73
- package/dist/index.js.map +4 -4
- package/dist/meta.cjs.json +5568 -5617
- package/dist/meta.esbuild.json +6032 -8744
- package/package.json +7 -7
- package/src/Prebuilt/App.tsx +3 -6
- package/src/Prebuilt/components/Chat/Chat.tsx +8 -12
- package/src/Prebuilt/components/Footer/WhiteboardToggle.tsx +11 -4
- package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +3 -3
- package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx +3 -0
- package/src/Prebuilt/components/Preview/PreviewJoin.tsx +3 -2
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +30 -43
- package/src/Prebuilt/layouts/HLSView.jsx +2 -3
- package/src/Prebuilt/layouts/SidePane.tsx +6 -12
- package/src/Prebuilt/layouts/VideoStreamingSection.tsx +64 -69
- package/src/Theme/ThemeProvider.tsx +9 -3
- package/dist/ConferenceScreen-CLPW3BGP.css +0 -2780
- package/dist/ConferenceScreen-CLPW3BGP.css.map +0 -7
- package/dist/ConferenceScreen-M6RBPTAJ.js +0 -1774
- package/dist/ConferenceScreen-M6RBPTAJ.js.map +0 -7
- package/dist/EmbedView-DDSO7ZCV.js +0 -17
- package/dist/EmbedView-DDSO7ZCV.js.map +0 -7
- package/dist/EmbedView-HGIUZHKA.css +0 -2780
- package/dist/EmbedView-HGIUZHKA.css.map +0 -7
- package/dist/EmojiReaction-23JDKJD4.js +0 -11
- package/dist/EmojiReaction-23JDKJD4.js.map +0 -7
- package/dist/HLSView-OW77EAAO.css +0 -2780
- package/dist/HLSView-OW77EAAO.css.map +0 -7
- package/dist/HLSView-Q6GEB3UM.js +0 -1666
- package/dist/HLSView-Q6GEB3UM.js.map +0 -7
- package/dist/LeaveScreen-BYTE73MT.js +0 -556
- package/dist/LeaveScreen-BYTE73MT.js.map +0 -7
- package/dist/LeaveScreen-P7AATEIF.css +0 -2780
- package/dist/LeaveScreen-P7AATEIF.css.map +0 -7
- package/dist/MoreSettings-LV5X2U6K.css +0 -2780
- package/dist/MoreSettings-LV5X2U6K.css.map +0 -7
- package/dist/MoreSettings-WSHMMNOC.js +0 -16
- package/dist/MoreSettings-WSHMMNOC.js.map +0 -7
- package/dist/PDFView-RIPRIIH6.css +0 -2780
- package/dist/PDFView-RIPRIIH6.css.map +0 -7
- package/dist/PDFView-ZFSG2ESE.js +0 -84
- package/dist/PDFView-ZFSG2ESE.js.map +0 -7
- package/dist/Polls-QWW5LTTB.js +0 -1584
- package/dist/Polls-QWW5LTTB.js.map +0 -7
- package/dist/Polls-ULYGUPPF.css +0 -2780
- package/dist/Polls-ULYGUPPF.css.map +0 -7
- package/dist/RaiseHand-K7NFLH7H.js +0 -10
- package/dist/RaiseHand-K7NFLH7H.js.map +0 -7
- package/dist/RoleProminence-235AFT7F.js +0 -116
- package/dist/RoleProminence-235AFT7F.js.map +0 -7
- package/dist/RoleProminence-6XN3POS5.css +0 -2780
- package/dist/RoleProminence-6XN3POS5.css.map +0 -7
- package/dist/RoomDetailsPane-O5TFMTPI.css +0 -2780
- package/dist/RoomDetailsPane-O5TFMTPI.css.map +0 -7
- package/dist/RoomDetailsPane-RF3D3TDR.js +0 -53
- package/dist/RoomDetailsPane-RF3D3TDR.js.map +0 -7
- package/dist/ScreenshareLayout-KNEB3AJJ.css +0 -2780
- package/dist/ScreenshareLayout-KNEB3AJJ.css.map +0 -7
- package/dist/ScreenshareLayout-PSQMS3NC.js +0 -358
- package/dist/ScreenshareLayout-PSQMS3NC.js.map +0 -7
- package/dist/SidePaneTabs-I6DECE5R.css +0 -2780
- package/dist/SidePaneTabs-I6DECE5R.css.map +0 -7
- package/dist/SidePaneTabs-NXHBI2JB.js +0 -1354
- package/dist/SidePaneTabs-NXHBI2JB.js.map +0 -7
- package/dist/VBPicker-2CQ3IIO7.js +0 -322
- package/dist/VBPicker-2CQ3IIO7.js.map +0 -7
- package/dist/VBPicker-DCNYGO23.css +0 -2780
- package/dist/VBPicker-DCNYGO23.css.map +0 -7
- package/dist/WaitingView-NZIUOXBI.js +0 -10
- package/dist/WaitingView-NZIUOXBI.js.map +0 -7
- package/dist/WhiteboardLayout-4YLFM3EY.js +0 -96
- package/dist/WhiteboardLayout-4YLFM3EY.js.map +0 -7
- package/dist/WhiteboardLayout-JUOBDFKY.css +0 -2780
- package/dist/WhiteboardLayout-JUOBDFKY.css.map +0 -7
- package/dist/chunk-3C7IESSI.js +0 -254
- package/dist/chunk-3C7IESSI.js.map +0 -7
- package/dist/chunk-7FD3VT6Q.js +0 -114
- package/dist/chunk-7FD3VT6Q.js.map +0 -7
- package/dist/chunk-AHI4HCY3.js +0 -62
- package/dist/chunk-AHI4HCY3.js.map +0 -7
- package/dist/chunk-BGSYLCVD.js +0 -6337
- package/dist/chunk-BGSYLCVD.js.map +0 -7
- package/dist/chunk-DANANDDE.js +0 -418
- package/dist/chunk-DANANDDE.js.map +0 -7
- package/dist/chunk-ETRNLEWQ.js +0 -2658
- package/dist/chunk-ETRNLEWQ.js.map +0 -7
- package/dist/chunk-EWPHJFZJ.js +0 -487
- package/dist/chunk-EWPHJFZJ.js.map +0 -7
- package/dist/chunk-F63YJBI4.js +0 -98
- package/dist/chunk-F63YJBI4.js.map +0 -7
- package/dist/chunk-GLAJUP3O.js +0 -576
- package/dist/chunk-GLAJUP3O.js.map +0 -7
- package/dist/chunk-GOXRTCTY.js +0 -90
- package/dist/chunk-GOXRTCTY.js.map +0 -7
- package/dist/chunk-HMCBZI3A.js +0 -59
- package/dist/chunk-HMCBZI3A.js.map +0 -7
- package/dist/chunk-HVYTC3PX.js +0 -171
- package/dist/chunk-HVYTC3PX.js.map +0 -7
- package/dist/chunk-LJVP6AWF.js +0 -262
- package/dist/chunk-LJVP6AWF.js.map +0 -7
- package/dist/chunk-LXJGCRKM.js +0 -30
- package/dist/chunk-LXJGCRKM.js.map +0 -7
- package/dist/chunk-MG3UGW66.js +0 -16800
- package/dist/chunk-MG3UGW66.js.map +0 -7
- package/dist/chunk-MUKUP7JU.js +0 -161
- package/dist/chunk-MUKUP7JU.js.map +0 -7
- package/dist/chunk-OV6MVDCL.js +0 -41
- package/dist/chunk-OV6MVDCL.js.map +0 -7
- package/dist/chunk-P6NV2XO4.js +0 -178
- package/dist/chunk-P6NV2XO4.js.map +0 -7
- package/dist/chunk-REL3HBSD.js +0 -71
- package/dist/chunk-REL3HBSD.js.map +0 -7
- package/dist/chunk-U4SQBXPZ.js +0 -830
- package/dist/chunk-U4SQBXPZ.js.map +0 -7
- package/dist/chunk-YEL5ZTFU.js +0 -136
- package/dist/chunk-YEL5ZTFU.js.map +0 -7
@@ -1,556 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
Header
|
3
|
-
} from "./chunk-LJVP6AWF.js";
|
4
|
-
import "./chunk-3C7IESSI.js";
|
5
|
-
import {
|
6
|
-
Button,
|
7
|
-
Checkbox,
|
8
|
-
Dialog,
|
9
|
-
Label,
|
10
|
-
Sheet,
|
11
|
-
TextArea,
|
12
|
-
useHMSAppStateContext,
|
13
|
-
useHMSPrebuiltContext
|
14
|
-
} from "./chunk-MG3UGW66.js";
|
15
|
-
import {
|
16
|
-
Text
|
17
|
-
} from "./chunk-MUKUP7JU.js";
|
18
|
-
import {
|
19
|
-
ToastManager
|
20
|
-
} from "./chunk-DANANDDE.js";
|
21
|
-
import {
|
22
|
-
Box,
|
23
|
-
Flex
|
24
|
-
} from "./chunk-GOXRTCTY.js";
|
25
|
-
import {
|
26
|
-
UserPreferencesKeys,
|
27
|
-
defaultPreviewPreference,
|
28
|
-
textEllipsis,
|
29
|
-
useRoomLayoutLeaveScreen,
|
30
|
-
useUserPreferences
|
31
|
-
} from "./chunk-BGSYLCVD.js";
|
32
|
-
import {
|
33
|
-
__async,
|
34
|
-
__spreadValues,
|
35
|
-
config,
|
36
|
-
init_define_process_env
|
37
|
-
} from "./chunk-GLAJUP3O.js";
|
38
|
-
|
39
|
-
// src/Prebuilt/components/LeaveScreen.tsx
|
40
|
-
init_define_process_env();
|
41
|
-
import React4 from "react";
|
42
|
-
import { ExitIcon } from "@100mslive/react-icons";
|
43
|
-
|
44
|
-
// src/Prebuilt/components/EndCallFeedback/Feedback.tsx
|
45
|
-
init_define_process_env();
|
46
|
-
import React3, { useState as useState2 } from "react";
|
47
|
-
import { useMedia as useMedia3 } from "react-use";
|
48
|
-
|
49
|
-
// src/Prebuilt/components/EndCallFeedback/FeedbackForm.tsx
|
50
|
-
init_define_process_env();
|
51
|
-
import React, { useState } from "react";
|
52
|
-
import { useMedia } from "react-use";
|
53
|
-
import { useHMSActions } from "@100mslive/react-sdk";
|
54
|
-
import { CheckIcon, CrossIcon } from "@100mslive/react-icons";
|
55
|
-
var FEEBACK_INDEX = {
|
56
|
-
THANK_YOU: -10,
|
57
|
-
INIT: -1
|
58
|
-
};
|
59
|
-
var FeedbackModal = ({
|
60
|
-
ratings,
|
61
|
-
index,
|
62
|
-
setIndex
|
63
|
-
}) => {
|
64
|
-
const isMobile = useMedia(config.media.md);
|
65
|
-
const onOpenChange = () => {
|
66
|
-
setIndex(FEEBACK_INDEX.INIT);
|
67
|
-
};
|
68
|
-
const avoidDefaultDomBehavior = (e) => {
|
69
|
-
e.preventDefault();
|
70
|
-
};
|
71
|
-
if (isMobile) {
|
72
|
-
return /* @__PURE__ */ React.createElement(Sheet.Root, { open: index !== FEEBACK_INDEX.INIT, onOpenChange }, /* @__PURE__ */ React.createElement(
|
73
|
-
Sheet.Content,
|
74
|
-
{
|
75
|
-
css: { bg: "$surface_dim", p: "$10", overflowY: "auto" },
|
76
|
-
onPointerDownOutside: avoidDefaultDomBehavior,
|
77
|
-
onInteractOutside: avoidDefaultDomBehavior
|
78
|
-
},
|
79
|
-
/* @__PURE__ */ React.createElement(FeedbackContent, { ratings, indexSelected: index, setIndex })
|
80
|
-
));
|
81
|
-
}
|
82
|
-
return /* @__PURE__ */ React.createElement(Dialog.Root, { open: index !== FEEBACK_INDEX.INIT, onOpenChange }, /* @__PURE__ */ React.createElement(Dialog.Portal, null, /* @__PURE__ */ React.createElement(Dialog.Overlay, null), /* @__PURE__ */ React.createElement(
|
83
|
-
Dialog.Content,
|
84
|
-
{
|
85
|
-
css: { bg: "$surface_dim", width: "528px", p: "$12" },
|
86
|
-
onPointerDownOutside: avoidDefaultDomBehavior,
|
87
|
-
onInteractOutside: avoidDefaultDomBehavior
|
88
|
-
},
|
89
|
-
/* @__PURE__ */ React.createElement(FeedbackContent, { ratings, indexSelected: index, setIndex })
|
90
|
-
)));
|
91
|
-
};
|
92
|
-
var FeedbackContent = ({
|
93
|
-
ratings,
|
94
|
-
indexSelected,
|
95
|
-
setIndex
|
96
|
-
}) => {
|
97
|
-
const { feedback } = useRoomLayoutLeaveScreen();
|
98
|
-
const { endpoints } = useHMSPrebuiltContext();
|
99
|
-
const isMobile = useMedia(config.media.md);
|
100
|
-
const hmsActions = useHMSActions();
|
101
|
-
const [comment, setComment] = useState("");
|
102
|
-
const [selectedReasons, setSelectedReasons] = useState(/* @__PURE__ */ new Set());
|
103
|
-
const handleCheckedChange = (checked, index) => {
|
104
|
-
const newSelected = new Set(selectedReasons);
|
105
|
-
if (checked) {
|
106
|
-
newSelected.add(index);
|
107
|
-
} else {
|
108
|
-
newSelected.delete(index);
|
109
|
-
}
|
110
|
-
setSelectedReasons(newSelected);
|
111
|
-
};
|
112
|
-
const submitFeedback = () => __async(void 0, null, function* () {
|
113
|
-
if (indexSelected < 0 || ratings.length <= indexSelected) {
|
114
|
-
return;
|
115
|
-
}
|
116
|
-
try {
|
117
|
-
const reasons = [...selectedReasons].map((value) => {
|
118
|
-
var _a, _b;
|
119
|
-
return ((_b = (_a = ratings[indexSelected]) == null ? void 0 : _a.reasons) == null ? void 0 : _b[value]) || "";
|
120
|
-
});
|
121
|
-
yield hmsActions.submitSessionFeedback(
|
122
|
-
{
|
123
|
-
question: `${feedback == null ? void 0 : feedback.title} | ${ratings[indexSelected].question || ""}`,
|
124
|
-
rating: ratings[indexSelected].value || 1,
|
125
|
-
min_rating: 1,
|
126
|
-
max_rating: ratings.length,
|
127
|
-
reasons: selectedReasons.size === 0 ? [] : reasons,
|
128
|
-
comment
|
129
|
-
},
|
130
|
-
endpoints == null ? void 0 : endpoints.event
|
131
|
-
);
|
132
|
-
} catch (e) {
|
133
|
-
console.error(e);
|
134
|
-
}
|
135
|
-
setIndex(FEEBACK_INDEX.THANK_YOU);
|
136
|
-
});
|
137
|
-
return /* @__PURE__ */ React.createElement(
|
138
|
-
Flex,
|
139
|
-
{
|
140
|
-
css: {
|
141
|
-
p: indexSelected === FEEBACK_INDEX.INIT ? "$12 !important" : "0",
|
142
|
-
bg: "$surface_dim",
|
143
|
-
r: "$3",
|
144
|
-
gap: "$10"
|
145
|
-
},
|
146
|
-
direction: "column"
|
147
|
-
},
|
148
|
-
/* @__PURE__ */ React.createElement(
|
149
|
-
FeedbackHeader,
|
150
|
-
{
|
151
|
-
ratings,
|
152
|
-
indexSelected,
|
153
|
-
onEmojiClicked: (value) => {
|
154
|
-
setSelectedReasons(/* @__PURE__ */ new Set());
|
155
|
-
setIndex(value);
|
156
|
-
}
|
157
|
-
}
|
158
|
-
),
|
159
|
-
/* @__PURE__ */ React.createElement(
|
160
|
-
FeedbackForm,
|
161
|
-
{
|
162
|
-
rating: ratings[indexSelected],
|
163
|
-
comment,
|
164
|
-
setComment,
|
165
|
-
selectedReasons,
|
166
|
-
handleCheckedChange
|
167
|
-
}
|
168
|
-
),
|
169
|
-
/* @__PURE__ */ React.createElement(
|
170
|
-
Button,
|
171
|
-
{
|
172
|
-
type: "submit",
|
173
|
-
icon: true,
|
174
|
-
css: {
|
175
|
-
alignSelf: isMobile ? "" : "end"
|
176
|
-
},
|
177
|
-
onClick: submitFeedback
|
178
|
-
},
|
179
|
-
(feedback == null ? void 0 : feedback.submit_btn_label) || "Submit Feedback"
|
180
|
-
)
|
181
|
-
);
|
182
|
-
};
|
183
|
-
var FeedbackHeader = ({
|
184
|
-
onEmojiClicked,
|
185
|
-
ratings,
|
186
|
-
indexSelected = FEEBACK_INDEX.INIT
|
187
|
-
}) => {
|
188
|
-
const isMobile = useMedia(config.media.md);
|
189
|
-
const { feedback } = useRoomLayoutLeaveScreen();
|
190
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Flex, { align: "center" }, /* @__PURE__ */ React.createElement(
|
191
|
-
Flex,
|
192
|
-
{
|
193
|
-
direction: "column",
|
194
|
-
css: {
|
195
|
-
flex: "1 1 0"
|
196
|
-
}
|
197
|
-
},
|
198
|
-
/* @__PURE__ */ React.createElement(
|
199
|
-
Text,
|
200
|
-
{
|
201
|
-
variant: isMobile ? "h6" : "h5",
|
202
|
-
css: {
|
203
|
-
c: "$on_surface_high",
|
204
|
-
fontStyle: "normal"
|
205
|
-
}
|
206
|
-
},
|
207
|
-
(feedback == null ? void 0 : feedback.title) || "How was your experience?"
|
208
|
-
),
|
209
|
-
/* @__PURE__ */ React.createElement(
|
210
|
-
Text,
|
211
|
-
{
|
212
|
-
variant: isMobile ? "body2" : "body1",
|
213
|
-
css: {
|
214
|
-
c: "$on_surface_medium",
|
215
|
-
opacity: 0.9,
|
216
|
-
fontWeight: "$regular"
|
217
|
-
}
|
218
|
-
},
|
219
|
-
(feedback == null ? void 0 : feedback.sub_title) || "Your answers help us improve the quality."
|
220
|
-
)
|
221
|
-
), indexSelected !== FEEBACK_INDEX.INIT ? /* @__PURE__ */ React.createElement(CrossIcon, { width: "24px", height: "24px", color: "white", onClick: () => onEmojiClicked(FEEBACK_INDEX.INIT) }) : null), /* @__PURE__ */ React.createElement(
|
222
|
-
Flex,
|
223
|
-
{
|
224
|
-
justify: "between",
|
225
|
-
css: {
|
226
|
-
gap: "$17",
|
227
|
-
c: "$on_surface_high",
|
228
|
-
"@md": {
|
229
|
-
gap: "0"
|
230
|
-
}
|
231
|
-
}
|
232
|
-
},
|
233
|
-
ratings.map((element, index) => {
|
234
|
-
return /* @__PURE__ */ React.createElement(
|
235
|
-
Flex,
|
236
|
-
{
|
237
|
-
align: "center",
|
238
|
-
direction: "column",
|
239
|
-
css: {
|
240
|
-
c: indexSelected === index || indexSelected === FEEBACK_INDEX.INIT ? "$on_surface_high" : "$on_surface_default",
|
241
|
-
gap: "$4"
|
242
|
-
},
|
243
|
-
onClick: () => onEmojiClicked(index),
|
244
|
-
key: `${index}`
|
245
|
-
},
|
246
|
-
/* @__PURE__ */ React.createElement(
|
247
|
-
Text,
|
248
|
-
{
|
249
|
-
css: {
|
250
|
-
fontWeight: "$semiBold",
|
251
|
-
fontSize: "$h4",
|
252
|
-
pb: "$1",
|
253
|
-
cursor: "pointer",
|
254
|
-
opacity: indexSelected === index || indexSelected === FEEBACK_INDEX.INIT ? 1 : 0.2,
|
255
|
-
"@md": {
|
256
|
-
fontSize: "$h5"
|
257
|
-
}
|
258
|
-
}
|
259
|
-
},
|
260
|
-
element.emoji
|
261
|
-
),
|
262
|
-
/* @__PURE__ */ React.createElement(
|
263
|
-
Text,
|
264
|
-
{
|
265
|
-
variant: isMobile ? "body2" : "body1",
|
266
|
-
css: {
|
267
|
-
c: indexSelected === index || indexSelected === FEEBACK_INDEX.INIT ? "$on_surface_medium" : "$on_surface_low",
|
268
|
-
fontWeight: "$regular"
|
269
|
-
}
|
270
|
-
},
|
271
|
-
element.label
|
272
|
-
)
|
273
|
-
);
|
274
|
-
})
|
275
|
-
));
|
276
|
-
};
|
277
|
-
var FeedbackForm = ({
|
278
|
-
rating,
|
279
|
-
comment,
|
280
|
-
setComment,
|
281
|
-
selectedReasons,
|
282
|
-
handleCheckedChange
|
283
|
-
}) => {
|
284
|
-
const { feedback } = useRoomLayoutLeaveScreen();
|
285
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, rating.reasons && rating.reasons.length > 0 && /* @__PURE__ */ React.createElement(
|
286
|
-
Flex,
|
287
|
-
{
|
288
|
-
direction: "column",
|
289
|
-
css: {
|
290
|
-
gap: "$4"
|
291
|
-
}
|
292
|
-
},
|
293
|
-
/* @__PURE__ */ React.createElement(
|
294
|
-
Text,
|
295
|
-
{
|
296
|
-
variant: "sub2",
|
297
|
-
css: {
|
298
|
-
c: "$on_surface_high",
|
299
|
-
fontWeight: "$semiBold",
|
300
|
-
fontSize: "$sm",
|
301
|
-
px: "$2"
|
302
|
-
}
|
303
|
-
},
|
304
|
-
rating.question || "What do you like/dislike here?"
|
305
|
-
),
|
306
|
-
/* @__PURE__ */ React.createElement(
|
307
|
-
Flex,
|
308
|
-
{
|
309
|
-
css: {
|
310
|
-
alignItems: "flex-start",
|
311
|
-
alignSelf: "stretch",
|
312
|
-
flexWrap: "wrap",
|
313
|
-
gap: "$6",
|
314
|
-
flex: "1 1 calc(25% - 12px)",
|
315
|
-
"@md": {
|
316
|
-
flex: "1 1 calc(50% - 12px)"
|
317
|
-
},
|
318
|
-
"@sm": {
|
319
|
-
flex: "1 1 100%"
|
320
|
-
}
|
321
|
-
}
|
322
|
-
},
|
323
|
-
rating.reasons.map((option, index) => {
|
324
|
-
return /* @__PURE__ */ React.createElement(
|
325
|
-
Flex,
|
326
|
-
{
|
327
|
-
align: "center",
|
328
|
-
gap: "2",
|
329
|
-
key: index,
|
330
|
-
css: {
|
331
|
-
border: "1px solid $border_bright",
|
332
|
-
r: "$1",
|
333
|
-
p: "$6"
|
334
|
-
}
|
335
|
-
},
|
336
|
-
/* @__PURE__ */ React.createElement(
|
337
|
-
Checkbox.Root,
|
338
|
-
{
|
339
|
-
id: `${option}-${index}`,
|
340
|
-
checked: selectedReasons.has(index),
|
341
|
-
onCheckedChange: (checked) => handleCheckedChange(checked, index),
|
342
|
-
css: {
|
343
|
-
cursor: "pointer",
|
344
|
-
flexShrink: 0,
|
345
|
-
bg: "$on_secondary_low",
|
346
|
-
border: "1px solid $border_bright"
|
347
|
-
}
|
348
|
-
},
|
349
|
-
/* @__PURE__ */ React.createElement(Checkbox.Indicator, null, /* @__PURE__ */ React.createElement(CheckIcon, { width: 12, height: 12 }))
|
350
|
-
),
|
351
|
-
/* @__PURE__ */ React.createElement(
|
352
|
-
Label,
|
353
|
-
{
|
354
|
-
htmlFor: `${option}-${index}`,
|
355
|
-
css: {
|
356
|
-
color: "$on_surface_high",
|
357
|
-
fontSize: "$sm",
|
358
|
-
fontWeight: "$regular",
|
359
|
-
lineHeight: "20px"
|
360
|
-
}
|
361
|
-
},
|
362
|
-
option
|
363
|
-
)
|
364
|
-
);
|
365
|
-
})
|
366
|
-
)
|
367
|
-
), (feedback == null ? void 0 : feedback.comment) && /* @__PURE__ */ React.createElement(
|
368
|
-
Flex,
|
369
|
-
{
|
370
|
-
direction: "column",
|
371
|
-
css: {
|
372
|
-
gap: "$4"
|
373
|
-
}
|
374
|
-
},
|
375
|
-
/* @__PURE__ */ React.createElement(
|
376
|
-
Text,
|
377
|
-
{
|
378
|
-
variant: "body2",
|
379
|
-
css: {
|
380
|
-
c: "$on_surface_high",
|
381
|
-
fontWeight: "$regular",
|
382
|
-
fontSize: "$sm"
|
383
|
-
}
|
384
|
-
},
|
385
|
-
(feedback == null ? void 0 : feedback.comment.label) || "Additional comments (optional)"
|
386
|
-
),
|
387
|
-
/* @__PURE__ */ React.createElement(
|
388
|
-
TextArea,
|
389
|
-
{
|
390
|
-
maxLength: 1024,
|
391
|
-
placeholder: (feedback == null ? void 0 : feedback.comment.placeholder) || "Tell us more...",
|
392
|
-
css: {
|
393
|
-
backgroundColor: "$surface_bright",
|
394
|
-
border: "1px solid $border_bright",
|
395
|
-
resize: "none",
|
396
|
-
height: "$36",
|
397
|
-
display: "flex"
|
398
|
-
},
|
399
|
-
value: comment,
|
400
|
-
onChange: (event) => setComment(event.target.value.trimStart())
|
401
|
-
}
|
402
|
-
)
|
403
|
-
));
|
404
|
-
};
|
405
|
-
|
406
|
-
// src/Prebuilt/components/EndCallFeedback/ThankyouView.tsx
|
407
|
-
init_define_process_env();
|
408
|
-
import React2 from "react";
|
409
|
-
import { useMedia as useMedia2 } from "react-use";
|
410
|
-
import { UserMusicIcon } from "@100mslive/react-icons";
|
411
|
-
var ThankyouView = () => {
|
412
|
-
const isMobile = useMedia2(config.media.md);
|
413
|
-
return /* @__PURE__ */ React2.createElement(
|
414
|
-
Flex,
|
415
|
-
{
|
416
|
-
direction: isMobile ? "column" : "row",
|
417
|
-
align: "center",
|
418
|
-
css: {
|
419
|
-
gap: "$10",
|
420
|
-
border: "1px solid $border_default",
|
421
|
-
borderRadius: !isMobile ? "$3" : "$3 $3 0 0",
|
422
|
-
bg: "$surface_dim",
|
423
|
-
w: !isMobile ? "528px" : "410px",
|
424
|
-
p: "$12",
|
425
|
-
pb: isMobile ? "$16" : "$12",
|
426
|
-
"@md": {
|
427
|
-
position: "absolute",
|
428
|
-
bottom: "0"
|
429
|
-
}
|
430
|
-
}
|
431
|
-
},
|
432
|
-
/* @__PURE__ */ React2.createElement(UserMusicIcon, { width: "64px", height: "64px" }),
|
433
|
-
/* @__PURE__ */ React2.createElement(Flex, { direction: "column", align: isMobile ? "center" : "start" }, /* @__PURE__ */ React2.createElement(Text, { variant: "h5" }, "Thank you for your feedback"), /* @__PURE__ */ React2.createElement(
|
434
|
-
Text,
|
435
|
-
{
|
436
|
-
variant: "body1",
|
437
|
-
css: {
|
438
|
-
fontWeight: "$regular",
|
439
|
-
fontSize: "$md",
|
440
|
-
opacity: "0.9"
|
441
|
-
}
|
442
|
-
},
|
443
|
-
"Your answers help us improve."
|
444
|
-
))
|
445
|
-
);
|
446
|
-
};
|
447
|
-
|
448
|
-
// src/Prebuilt/components/EndCallFeedback/Feedback.tsx
|
449
|
-
var Feedback = () => {
|
450
|
-
const { feedback } = useRoomLayoutLeaveScreen();
|
451
|
-
const [index, setIndex] = useState2(FEEBACK_INDEX.INIT);
|
452
|
-
const isMobile = useMedia3(config.media.md);
|
453
|
-
if (!feedback) {
|
454
|
-
return null;
|
455
|
-
}
|
456
|
-
const { ratings } = feedback;
|
457
|
-
if (!ratings) {
|
458
|
-
return null;
|
459
|
-
}
|
460
|
-
ratings.sort((a, b) => {
|
461
|
-
if (!a.value || !b.value) {
|
462
|
-
return 0;
|
463
|
-
}
|
464
|
-
return a.value - b.value;
|
465
|
-
});
|
466
|
-
if (index === FEEBACK_INDEX.THANK_YOU) {
|
467
|
-
return /* @__PURE__ */ React3.createElement(
|
468
|
-
Flex,
|
469
|
-
{
|
470
|
-
justify: "center",
|
471
|
-
css: {
|
472
|
-
pt: "$16"
|
473
|
-
}
|
474
|
-
},
|
475
|
-
/* @__PURE__ */ React3.createElement(ThankyouView, null)
|
476
|
-
);
|
477
|
-
}
|
478
|
-
return /* @__PURE__ */ React3.createElement(
|
479
|
-
Flex,
|
480
|
-
{
|
481
|
-
justify: "center",
|
482
|
-
css: {
|
483
|
-
pt: "$16",
|
484
|
-
w: isMobile ? "100%" : "528px"
|
485
|
-
}
|
486
|
-
},
|
487
|
-
index === FEEBACK_INDEX.INIT ? /* @__PURE__ */ React3.createElement(
|
488
|
-
Flex,
|
489
|
-
{
|
490
|
-
css: {
|
491
|
-
p: isMobile ? "$10" : "$12",
|
492
|
-
border: "1px solid $border_default",
|
493
|
-
bg: "$surface_dim",
|
494
|
-
borderRadius: !isMobile ? "$3" : "$3 $3 0 0",
|
495
|
-
gap: "$10",
|
496
|
-
"@md": {
|
497
|
-
position: "absolute",
|
498
|
-
bottom: "0",
|
499
|
-
w: "100%"
|
500
|
-
}
|
501
|
-
},
|
502
|
-
direction: "column"
|
503
|
-
},
|
504
|
-
/* @__PURE__ */ React3.createElement(FeedbackHeader, { ratings, onEmojiClicked: setIndex })
|
505
|
-
) : /* @__PURE__ */ React3.createElement(FeedbackModal, { ratings, index, setIndex })
|
506
|
-
);
|
507
|
-
};
|
508
|
-
|
509
|
-
// src/Prebuilt/components/LeaveScreen.tsx
|
510
|
-
var LeaveScreen = () => {
|
511
|
-
const { rejoin } = useHMSAppStateContext();
|
512
|
-
const [previewPreference] = useUserPreferences(UserPreferencesKeys.PREVIEW, defaultPreviewPreference);
|
513
|
-
return /* @__PURE__ */ React4.createElement(Flex, { direction: "column", css: { size: "100%" } }, /* @__PURE__ */ React4.createElement(Box, { css: { h: "$18", "@md": { h: "$17" } }, "data-testid": "header" }, /* @__PURE__ */ React4.createElement(Header, null)), /* @__PURE__ */ React4.createElement(
|
514
|
-
Flex,
|
515
|
-
{
|
516
|
-
justify: "center",
|
517
|
-
direction: "column",
|
518
|
-
align: "center",
|
519
|
-
css: { bg: "$background_dim", flex: "1 1 0", position: "relative" }
|
520
|
-
},
|
521
|
-
/* @__PURE__ */ React4.createElement(Text, { variant: "h2", css: { fontWeight: "$semiBold" } }, "\u{1F44B}"),
|
522
|
-
/* @__PURE__ */ React4.createElement(Text, { variant: "h4", css: { color: "$on_surface_high", fontWeight: "$semiBold", mt: "$12" } }, "You left the room"),
|
523
|
-
/* @__PURE__ */ React4.createElement(
|
524
|
-
Text,
|
525
|
-
{
|
526
|
-
variant: "body1",
|
527
|
-
css: {
|
528
|
-
color: "$on_surface_medium",
|
529
|
-
mt: "$8",
|
530
|
-
fontWeight: "$regular",
|
531
|
-
textAlign: "center"
|
532
|
-
}
|
533
|
-
},
|
534
|
-
"Have a nice day",
|
535
|
-
previewPreference.name && /* @__PURE__ */ React4.createElement(Box, { as: "span", css: __spreadValues({}, textEllipsis(100)) }, ", ", previewPreference.name),
|
536
|
-
"!"
|
537
|
-
),
|
538
|
-
/* @__PURE__ */ React4.createElement(Flex, { css: { mt: "$14", gap: "$10", alignItems: "center" } }, /* @__PURE__ */ React4.createElement(Text, { variant: "body1", css: { color: "$on_surface_medium", fontWeight: "$regular" } }, "Left by mistake?"), /* @__PURE__ */ React4.createElement(
|
539
|
-
Button,
|
540
|
-
{
|
541
|
-
onClick: () => {
|
542
|
-
rejoin();
|
543
|
-
ToastManager.clearAllToast();
|
544
|
-
},
|
545
|
-
"data-testid": "join_again_btn"
|
546
|
-
},
|
547
|
-
/* @__PURE__ */ React4.createElement(ExitIcon, null),
|
548
|
-
/* @__PURE__ */ React4.createElement(Text, { css: { ml: "$3", fontWeight: "$semiBold", color: "inherit" } }, "Rejoin")
|
549
|
-
)),
|
550
|
-
/* @__PURE__ */ React4.createElement(Feedback, null)
|
551
|
-
));
|
552
|
-
};
|
553
|
-
export {
|
554
|
-
LeaveScreen
|
555
|
-
};
|
556
|
-
//# sourceMappingURL=LeaveScreen-BYTE73MT.js.map
|
@@ -1,7 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"version": 3,
|
3
|
-
"sources": ["../src/Prebuilt/components/LeaveScreen.tsx", "../src/Prebuilt/components/EndCallFeedback/Feedback.tsx", "../src/Prebuilt/components/EndCallFeedback/FeedbackForm.tsx", "../src/Prebuilt/components/EndCallFeedback/ThankyouView.tsx"],
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { ExitIcon } from '@100mslive/react-icons';\nimport { Feedback } from './EndCallFeedback/Feedback';\n// @ts-ignore: No implicit Any\nimport { ToastManager } from './Toast/ToastManager';\nimport { Button } from '../../Button';\nimport { Box, Flex } from '../../Layout';\nimport { Text } from '../../Text';\nimport { useHMSAppStateContext } from '../AppStateContext';\nimport { Header } from './Header';\n// @ts-ignore: No implicit Any\nimport { defaultPreviewPreference, UserPreferencesKeys, useUserPreferences } from './hooks/useUserPreferences';\nimport { textEllipsis } from '../../utils';\n\nexport const LeaveScreen = () => {\n const { rejoin } = useHMSAppStateContext();\n const [previewPreference] = useUserPreferences(UserPreferencesKeys.PREVIEW, defaultPreviewPreference);\n return (\n <Flex direction=\"column\" css={{ size: '100%' }}>\n <Box css={{ h: '$18', '@md': { h: '$17' } }} data-testid=\"header\">\n <Header />\n </Box>\n <Flex\n justify=\"center\"\n direction=\"column\"\n align=\"center\"\n css={{ bg: '$background_dim', flex: '1 1 0', position: 'relative' }}\n >\n <Text variant=\"h2\" css={{ fontWeight: '$semiBold' }}>\n \uD83D\uDC4B\n </Text>\n <Text variant=\"h4\" css={{ color: '$on_surface_high', fontWeight: '$semiBold', mt: '$12' }}>\n You left the room\n </Text>\n <Text\n variant=\"body1\"\n css={{\n color: '$on_surface_medium',\n mt: '$8',\n fontWeight: '$regular',\n textAlign: 'center',\n }}\n >\n Have a nice day\n {previewPreference.name && (\n <Box as=\"span\" css={{ ...textEllipsis(100) }}>\n , {previewPreference.name}\n </Box>\n )}\n !\n </Text>\n <Flex css={{ mt: '$14', gap: '$10', alignItems: 'center' }}>\n <Text variant=\"body1\" css={{ color: '$on_surface_medium', fontWeight: '$regular' }}>\n Left by mistake?\n </Text>\n <Button\n onClick={() => {\n rejoin();\n ToastManager.clearAllToast();\n }}\n data-testid=\"join_again_btn\"\n >\n <ExitIcon />\n <Text css={{ ml: '$3', fontWeight: '$semiBold', color: 'inherit' }}>Rejoin</Text>\n </Button>\n </Flex>\n <Feedback />\n </Flex>\n </Flex>\n );\n};\n", "import React, { useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { Flex } from '../../../Layout';\nimport { config as cssConfig } from '../../../Theme';\nimport { FEEBACK_INDEX, FeedbackHeader, FeedbackModal } from './FeedbackForm';\nimport { ThankyouView } from './ThankyouView';\nimport { useRoomLayoutLeaveScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n\nexport const Feedback = () => {\n const { feedback } = useRoomLayoutLeaveScreen();\n const [index, setIndex] = useState(FEEBACK_INDEX.INIT);\n const isMobile = useMedia(cssConfig.media.md);\n\n if (!feedback) {\n return null;\n }\n const { ratings } = feedback;\n if (!ratings) {\n return null;\n }\n ratings.sort((a, b) => {\n if (!a.value || !b.value) {\n return 0;\n }\n return a.value - b.value;\n });\n // TO show thank ypu page\n if (index === FEEBACK_INDEX.THANK_YOU) {\n return (\n <Flex\n justify=\"center\"\n css={{\n pt: '$16',\n }}\n >\n <ThankyouView />\n </Flex>\n );\n }\n return (\n <Flex\n justify=\"center\"\n css={{\n pt: '$16',\n w: isMobile ? '100%' : '528px',\n }}\n >\n {index === FEEBACK_INDEX.INIT ? (\n <Flex\n css={{\n p: isMobile ? '$10' : '$12',\n border: '1px solid $border_default',\n bg: '$surface_dim',\n borderRadius: !isMobile ? '$3' : '$3 $3 0 0',\n gap: '$10',\n '@md': {\n position: 'absolute',\n bottom: '0',\n w: '100%',\n },\n }}\n direction=\"column\"\n >\n <FeedbackHeader ratings={ratings} onEmojiClicked={setIndex} />\n </Flex>\n ) : (\n <FeedbackModal ratings={ratings} index={index} setIndex={setIndex} />\n )}\n </Flex>\n );\n};\n", "import React, { useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { Rating } from '@100mslive/types-prebuilt/elements/feedback';\nimport { useHMSActions } from '@100mslive/react-sdk';\nimport { CheckIcon, CrossIcon } from '@100mslive/react-icons';\nimport { Button } from '../../../Button';\nimport { Checkbox } from '../../../Checkbox';\nimport { Label } from '../../../Label';\nimport { Flex } from '../../../Layout';\nimport { Dialog } from '../../../Modal';\nimport { Sheet } from '../../../Sheet';\nimport { Text } from '../../../Text';\nimport { TextArea } from '../../../TextArea';\nimport { config as cssConfig } from '../../../Theme';\nimport { useHMSPrebuiltContext } from '../../AppContext';\nimport { useRoomLayoutLeaveScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n\nexport const FEEBACK_INDEX = {\n THANK_YOU: -10,\n INIT: -1,\n};\nexport const FeedbackModal = ({\n ratings,\n index,\n setIndex,\n}: {\n ratings: Rating[];\n index: number;\n setIndex: (index: number) => void;\n}) => {\n const isMobile = useMedia(cssConfig.media.md);\n const onOpenChange = () => {\n setIndex(FEEBACK_INDEX.INIT);\n };\n const avoidDefaultDomBehavior = (e: Event) => {\n e.preventDefault();\n };\n if (isMobile) {\n return (\n <Sheet.Root open={index !== FEEBACK_INDEX.INIT} onOpenChange={onOpenChange}>\n <Sheet.Content\n css={{ bg: '$surface_dim', p: '$10', overflowY: 'auto' }}\n onPointerDownOutside={avoidDefaultDomBehavior}\n onInteractOutside={avoidDefaultDomBehavior}\n >\n <FeedbackContent ratings={ratings} indexSelected={index} setIndex={setIndex} />\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n return (\n <Dialog.Root open={index !== FEEBACK_INDEX.INIT} onOpenChange={onOpenChange}>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content\n css={{ bg: '$surface_dim', width: '528px', p: '$12' }}\n onPointerDownOutside={avoidDefaultDomBehavior}\n onInteractOutside={avoidDefaultDomBehavior}\n >\n <FeedbackContent ratings={ratings} indexSelected={index} setIndex={setIndex} />\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n\nexport const FeedbackContent = ({\n ratings,\n indexSelected,\n setIndex,\n}: {\n ratings: Rating[];\n indexSelected: number;\n setIndex: (index: number) => void;\n}) => {\n const { feedback } = useRoomLayoutLeaveScreen();\n const { endpoints } = useHMSPrebuiltContext();\n const isMobile = useMedia(cssConfig.media.md);\n const hmsActions = useHMSActions();\n const [comment, setComment] = useState('');\n const [selectedReasons, setSelectedReasons] = useState(new Set<number>());\n const handleCheckedChange = (checked: boolean | string, index: number) => {\n const newSelected = new Set(selectedReasons);\n if (checked) {\n newSelected.add(index);\n } else {\n newSelected.delete(index);\n }\n setSelectedReasons(newSelected);\n };\n const submitFeedback = async () => {\n if (indexSelected < 0 || ratings.length <= indexSelected) {\n return;\n }\n try {\n const reasons = [...selectedReasons].map((value: number) => ratings[indexSelected]?.reasons?.[value] || '');\n await hmsActions.submitSessionFeedback(\n {\n question: `${feedback?.title} | ${ratings[indexSelected].question || ''}`,\n rating: ratings[indexSelected].value || 1,\n min_rating: 1,\n max_rating: ratings.length,\n reasons: selectedReasons.size === 0 ? [] : reasons,\n comment: comment,\n },\n endpoints?.event,\n );\n } catch (e) {\n console.error(e);\n }\n // always submit and take it to thankyou page\n setIndex(FEEBACK_INDEX.THANK_YOU);\n };\n return (\n <Flex\n css={{\n p: indexSelected === FEEBACK_INDEX.INIT ? '$12 !important' : '0',\n bg: '$surface_dim',\n r: '$3',\n gap: '$10',\n }}\n direction=\"column\"\n >\n <FeedbackHeader\n ratings={ratings}\n indexSelected={indexSelected}\n onEmojiClicked={(value: number) => {\n setSelectedReasons(new Set<number>());\n setIndex(value);\n }}\n />\n <FeedbackForm\n rating={ratings[indexSelected]}\n comment={comment}\n setComment={setComment}\n selectedReasons={selectedReasons}\n handleCheckedChange={handleCheckedChange}\n />\n <Button\n type=\"submit\"\n icon\n css={{\n alignSelf: isMobile ? '' : 'end',\n }}\n onClick={submitFeedback}\n >\n {feedback?.submit_btn_label || 'Submit Feedback'}\n </Button>\n </Flex>\n );\n};\nexport const FeedbackHeader = ({\n onEmojiClicked,\n ratings,\n indexSelected = FEEBACK_INDEX.INIT,\n}: {\n onEmojiClicked: (index: number) => void;\n ratings: Rating[];\n indexSelected?: number;\n}) => {\n const isMobile = useMedia(cssConfig.media.md);\n const { feedback } = useRoomLayoutLeaveScreen();\n return (\n <>\n <Flex align=\"center\">\n <Flex\n direction=\"column\"\n css={{\n flex: '1 1 0',\n }}\n >\n <Text\n variant={isMobile ? 'h6' : 'h5'}\n css={{\n c: '$on_surface_high',\n fontStyle: 'normal',\n }}\n >\n {feedback?.title || 'How was your experience?'}\n </Text>\n <Text\n variant={isMobile ? 'body2' : 'body1'}\n css={{\n c: '$on_surface_medium',\n opacity: 0.9,\n fontWeight: '$regular',\n }}\n >\n {feedback?.sub_title || 'Your answers help us improve the quality.'}\n </Text>\n </Flex>\n {indexSelected !== FEEBACK_INDEX.INIT ? (\n <CrossIcon width=\"24px\" height=\"24px\" color=\"white\" onClick={() => onEmojiClicked(FEEBACK_INDEX.INIT)} />\n ) : null}\n </Flex>\n <Flex\n justify=\"between\"\n css={{\n gap: '$17',\n c: '$on_surface_high',\n '@md': {\n gap: '0',\n },\n }}\n >\n {ratings.map((element, index) => {\n return (\n <Flex\n align=\"center\"\n direction=\"column\"\n css={{\n c:\n indexSelected === index || indexSelected === FEEBACK_INDEX.INIT\n ? '$on_surface_high'\n : '$on_surface_default',\n gap: '$4',\n }}\n onClick={() => onEmojiClicked(index)}\n key={`${index}`}\n >\n <Text\n css={{\n fontWeight: '$semiBold',\n fontSize: '$h4',\n pb: '$1',\n cursor: 'pointer',\n opacity: indexSelected === index || indexSelected === FEEBACK_INDEX.INIT ? 1 : 0.2,\n '@md': {\n fontSize: '$h5',\n },\n }}\n >\n {element.emoji}\n </Text>\n <Text\n variant={isMobile ? 'body2' : 'body1'}\n css={{\n c:\n indexSelected === index || indexSelected === FEEBACK_INDEX.INIT\n ? '$on_surface_medium'\n : '$on_surface_low',\n fontWeight: '$regular',\n }}\n >\n {element.label}\n </Text>\n </Flex>\n );\n })}\n </Flex>\n </>\n );\n};\nexport const FeedbackForm = ({\n rating,\n comment,\n setComment,\n selectedReasons,\n handleCheckedChange,\n}: {\n rating: Rating;\n comment: string;\n setComment: (value: string) => void;\n selectedReasons: Set<number>;\n handleCheckedChange: (checked: string | boolean, index: number) => void;\n}) => {\n const { feedback } = useRoomLayoutLeaveScreen();\n return (\n <>\n {rating.reasons && rating.reasons.length > 0 && (\n <Flex\n direction=\"column\"\n css={{\n gap: '$4',\n }}\n >\n <Text\n variant=\"sub2\"\n css={{\n c: '$on_surface_high',\n fontWeight: '$semiBold',\n fontSize: '$sm',\n px: '$2',\n }}\n >\n {rating.question || 'What do you like/dislike here?'}\n </Text>\n <Flex\n css={{\n alignItems: 'flex-start',\n alignSelf: 'stretch',\n flexWrap: 'wrap',\n gap: '$6',\n flex: '1 1 calc(25% - 12px)',\n '@md': {\n flex: '1 1 calc(50% - 12px)',\n },\n '@sm': {\n flex: '1 1 100%',\n },\n }}\n >\n {rating.reasons.map((option: string, index: number) => {\n return (\n <Flex\n align=\"center\"\n gap=\"2\"\n key={index}\n css={{\n border: '1px solid $border_bright',\n r: '$1',\n p: '$6',\n }}\n >\n <Checkbox.Root\n id={`${option}-${index}`}\n checked={selectedReasons.has(index)}\n onCheckedChange={checked => handleCheckedChange(checked, index)}\n css={{\n cursor: 'pointer',\n flexShrink: 0,\n bg: '$on_secondary_low',\n border: '1px solid $border_bright',\n }}\n >\n <Checkbox.Indicator>\n <CheckIcon width={12} height={12} />\n </Checkbox.Indicator>\n </Checkbox.Root>\n <Label\n htmlFor={`${option}-${index}`}\n css={{\n color: '$on_surface_high',\n fontSize: '$sm',\n fontWeight: '$regular',\n lineHeight: '20px' /* 142.857% */,\n }}\n >\n {option}\n </Label>\n </Flex>\n );\n })}\n </Flex>\n </Flex>\n )}\n {feedback?.comment && (\n <Flex\n direction=\"column\"\n css={{\n gap: '$4',\n }}\n >\n <Text\n variant=\"body2\"\n css={{\n c: '$on_surface_high',\n fontWeight: '$regular',\n fontSize: '$sm',\n }}\n >\n {feedback?.comment.label || 'Additional comments (optional)'}\n </Text>\n <TextArea\n maxLength={1024}\n placeholder={feedback?.comment.placeholder || 'Tell us more...'}\n css={{\n backgroundColor: '$surface_bright',\n border: '1px solid $border_bright',\n resize: 'none',\n height: '$36',\n display: 'flex',\n }}\n value={comment}\n onChange={event => setComment(event.target.value.trimStart())}\n />\n </Flex>\n )}\n </>\n );\n};\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport { UserMusicIcon } from '@100mslive/react-icons';\nimport { Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\nimport { config as cssConfig } from '../../../Theme';\n\nexport const ThankyouView = () => {\n const isMobile = useMedia(cssConfig.media.md);\n return (\n <Flex\n direction={isMobile ? 'column' : 'row'}\n align=\"center\"\n css={{\n gap: '$10',\n border: '1px solid $border_default',\n borderRadius: !isMobile ? '$3' : '$3 $3 0 0',\n bg: '$surface_dim',\n w: !isMobile ? '528px' : '410px',\n p: '$12',\n pb: isMobile ? '$16' : '$12',\n '@md': {\n position: 'absolute',\n bottom: '0',\n },\n }}\n >\n <UserMusicIcon width=\"64px\" height=\"64px\" />\n <Flex direction=\"column\" align={isMobile ? 'center' : 'start'}>\n <Text variant=\"h5\">Thank you for your feedback</Text>\n <Text\n variant=\"body1\"\n css={{\n fontWeight: '$regular',\n fontSize: '$md',\n opacity: '0.9',\n }}\n >\n Your answers help us improve.\n </Text>\n </Flex>\n </Flex>\n );\n};\n"],
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,OAAOA,YAAW;AAClB,SAAS,gBAAgB;;;ACDzB;AAAA,OAAOC,UAAS,YAAAC,iBAAgB;AAChC,SAAS,YAAAC,iBAAgB;;;ACDzB;AAAA,OAAO,SAAS,gBAAgB;AAChC,SAAS,gBAAgB;AAEzB,SAAS,qBAAqB;AAC9B,SAAS,WAAW,iBAAiB;AAa9B,IAAM,gBAAgB;AAAA,EAC3B,WAAW;AAAA,EACX,MAAM;AACR;AACO,IAAM,gBAAgB,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AACF,MAIM;AACJ,QAAM,WAAW,SAAS,OAAU,MAAM,EAAE;AAC5C,QAAM,eAAe,MAAM;AACzB,aAAS,cAAc,IAAI;AAAA,EAC7B;AACA,QAAM,0BAA0B,CAAC,MAAa;AAC5C,MAAE,eAAe;AAAA,EACnB;AACA,MAAI,UAAU;AACZ,WACE,oCAAC,MAAM,MAAN,EAAW,MAAM,UAAU,cAAc,MAAM,gBAC9C;AAAA,MAAC,MAAM;AAAA,MAAN;AAAA,QACC,KAAK,EAAE,IAAI,gBAAgB,GAAG,OAAO,WAAW,OAAO;AAAA,QACvD,sBAAsB;AAAA,QACtB,mBAAmB;AAAA;AAAA,MAEnB,oCAAC,mBAAgB,SAAkB,eAAe,OAAO,UAAoB;AAAA,IAC/E,CACF;AAAA,EAEJ;AACA,SACE,oCAAC,OAAO,MAAP,EAAY,MAAM,UAAU,cAAc,MAAM,gBAC/C,oCAAC,OAAO,QAAP,MACC,oCAAC,OAAO,SAAP,IAAe,GAChB;AAAA,IAAC,OAAO;AAAA,IAAP;AAAA,MACC,KAAK,EAAE,IAAI,gBAAgB,OAAO,SAAS,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