analytica-frontend-lib 1.1.57 → 1.1.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordation/index.js +20 -2
- package/dist/Accordation/index.js.map +1 -1
- package/dist/Accordation/index.mjs +22 -3
- package/dist/Accordation/index.mjs.map +1 -1
- package/dist/Card/index.js +20 -2
- package/dist/Card/index.js.map +1 -1
- package/dist/Card/index.mjs +22 -3
- package/dist/Card/index.mjs.map +1 -1
- package/dist/DropdownMenu/index.js +1 -1
- package/dist/DropdownMenu/index.js.map +1 -1
- package/dist/DropdownMenu/index.mjs +1 -1
- package/dist/DropdownMenu/index.mjs.map +1 -1
- package/dist/NotificationCard/index.js +1 -1
- package/dist/NotificationCard/index.js.map +1 -1
- package/dist/NotificationCard/index.mjs +1 -1
- package/dist/NotificationCard/index.mjs.map +1 -1
- package/dist/Quiz/index.js +20 -2
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs +32 -13
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/Search/index.js +1 -1
- package/dist/Search/index.js.map +1 -1
- package/dist/Search/index.mjs +1 -1
- package/dist/Search/index.mjs.map +1 -1
- package/dist/SubjectInfo/index.d.mts +2 -0
- package/dist/SubjectInfo/index.d.ts +2 -0
- package/dist/SubjectInfo/index.js +313 -0
- package/dist/SubjectInfo/index.js.map +1 -0
- package/dist/SubjectInfo/index.mjs +293 -0
- package/dist/SubjectInfo/index.mjs.map +1 -0
- package/dist/SubjectInfo-DZvZ5alE.d.mts +37 -0
- package/dist/SubjectInfo-DZvZ5alE.d.ts +37 -0
- package/dist/VideoPlayer/index.js +20 -1
- package/dist/VideoPlayer/index.js.map +1 -1
- package/dist/VideoPlayer/index.mjs +20 -1
- package/dist/VideoPlayer/index.mjs.map +1 -1
- package/dist/index.css +73 -12
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +727 -382
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +758 -407
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +73 -12
- package/dist/styles.css.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -126,6 +126,8 @@ __export(src_exports, {
|
|
|
126
126
|
SkeletonTable: () => SkeletonTable,
|
|
127
127
|
SkeletonText: () => SkeletonText,
|
|
128
128
|
Stepper: () => Stepper_default,
|
|
129
|
+
SubjectEnum: () => SubjectEnum,
|
|
130
|
+
SubjectInfo: () => SubjectInfo,
|
|
129
131
|
Table: () => Table_default,
|
|
130
132
|
Text: () => Text_default,
|
|
131
133
|
TextArea: () => TextArea_default,
|
|
@@ -143,6 +145,10 @@ __export(src_exports, {
|
|
|
143
145
|
getDeviceType: () => getDeviceType,
|
|
144
146
|
getRootDomain: () => getRootDomain,
|
|
145
147
|
getStatusBadge: () => getStatusBadge,
|
|
148
|
+
getSubjectColorClass: () => getSubjectColorClass,
|
|
149
|
+
getSubjectData: () => getSubjectData,
|
|
150
|
+
getSubjectIcon: () => getSubjectIcon,
|
|
151
|
+
getSubjectName: () => getSubjectName,
|
|
146
152
|
useApiConfig: () => useApiConfig,
|
|
147
153
|
useAuth: () => useAuth,
|
|
148
154
|
useAuthGuard: () => useAuthGuard,
|
|
@@ -2617,7 +2623,7 @@ var ProfileMenuHeader = (0, import_react13.forwardRef)(({ className, name, email
|
|
|
2617
2623
|
className: cn("flex flex-row gap-4 items-center", className),
|
|
2618
2624
|
...props,
|
|
2619
2625
|
children: [
|
|
2620
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "size-16 bg-primary-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_phosphor_react9.User, { size: 34, className: "text-primary-
|
|
2626
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "size-16 bg-primary-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_phosphor_react9.User, { size: 34, className: "text-primary-800" }) }),
|
|
2621
2627
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-col ", children: [
|
|
2622
2628
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text_default, { size: "xl", weight: "bold", color: "text-text-950", children: name }),
|
|
2623
2629
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text_default, { size: "md", color: "text-text-600", children: email })
|
|
@@ -5261,6 +5267,8 @@ var CardAudio = (0, import_react16.forwardRef)(
|
|
|
5261
5267
|
const [showSpeedMenu, setShowSpeedMenu] = (0, import_react16.useState)(false);
|
|
5262
5268
|
const [playbackRate, setPlaybackRate] = (0, import_react16.useState)(1);
|
|
5263
5269
|
const audioRef = (0, import_react16.useRef)(null);
|
|
5270
|
+
const volumeControlRef = (0, import_react16.useRef)(null);
|
|
5271
|
+
const speedMenuRef = (0, import_react16.useRef)(null);
|
|
5264
5272
|
const formatTime2 = (time) => {
|
|
5265
5273
|
const minutes = Math.floor(time / 60);
|
|
5266
5274
|
const seconds = Math.floor(time % 60);
|
|
@@ -5312,9 +5320,11 @@ var CardAudio = (0, import_react16.forwardRef)(
|
|
|
5312
5320
|
};
|
|
5313
5321
|
const toggleVolumeControl = () => {
|
|
5314
5322
|
setShowVolumeControl(!showVolumeControl);
|
|
5323
|
+
setShowSpeedMenu(false);
|
|
5315
5324
|
};
|
|
5316
5325
|
const toggleSpeedMenu = () => {
|
|
5317
5326
|
setShowSpeedMenu(!showSpeedMenu);
|
|
5327
|
+
setShowVolumeControl(false);
|
|
5318
5328
|
};
|
|
5319
5329
|
const handleSpeedChange = (speed) => {
|
|
5320
5330
|
setPlaybackRate(speed);
|
|
@@ -5332,6 +5342,20 @@ var CardAudio = (0, import_react16.forwardRef)(
|
|
|
5332
5342
|
}
|
|
5333
5343
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.SpeakerHigh, { size: 24 });
|
|
5334
5344
|
};
|
|
5345
|
+
(0, import_react16.useEffect)(() => {
|
|
5346
|
+
const handleClickOutside = (event) => {
|
|
5347
|
+
if (volumeControlRef.current && !volumeControlRef.current.contains(event.target)) {
|
|
5348
|
+
setShowVolumeControl(false);
|
|
5349
|
+
}
|
|
5350
|
+
if (speedMenuRef.current && !speedMenuRef.current.contains(event.target)) {
|
|
5351
|
+
setShowSpeedMenu(false);
|
|
5352
|
+
}
|
|
5353
|
+
};
|
|
5354
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
5355
|
+
return () => {
|
|
5356
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
5357
|
+
};
|
|
5358
|
+
}, []);
|
|
5335
5359
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
5336
5360
|
CardBase,
|
|
5337
5361
|
{
|
|
@@ -5420,7 +5444,7 @@ var CardAudio = (0, import_react16.forwardRef)(
|
|
|
5420
5444
|
}
|
|
5421
5445
|
) }),
|
|
5422
5446
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime2(duration) }),
|
|
5423
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative h-6", children: [
|
|
5447
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative h-6", ref: volumeControlRef, children: [
|
|
5424
5448
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5425
5449
|
"button",
|
|
5426
5450
|
{
|
|
@@ -5482,7 +5506,7 @@ var CardAudio = (0, import_react16.forwardRef)(
|
|
|
5482
5506
|
}
|
|
5483
5507
|
)
|
|
5484
5508
|
] }),
|
|
5485
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative h-6", children: [
|
|
5509
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative h-6", ref: speedMenuRef, children: [
|
|
5486
5510
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5487
5511
|
"button",
|
|
5488
5512
|
{
|
|
@@ -6383,6 +6407,302 @@ var MultipleChoiceList = ({
|
|
|
6383
6407
|
);
|
|
6384
6408
|
};
|
|
6385
6409
|
|
|
6410
|
+
// src/assets/icons/subjects/BookOpenText.tsx
|
|
6411
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
6412
|
+
var BookOpenText = ({
|
|
6413
|
+
size,
|
|
6414
|
+
color
|
|
6415
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6416
|
+
"svg",
|
|
6417
|
+
{
|
|
6418
|
+
width: size,
|
|
6419
|
+
height: size,
|
|
6420
|
+
viewBox: "0 0 32 32",
|
|
6421
|
+
fill: "none",
|
|
6422
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6423
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6424
|
+
"path",
|
|
6425
|
+
{
|
|
6426
|
+
d: "M29 6H20C19.2238 6 18.4582 6.18073 17.7639 6.52786C17.0697 6.875 16.4657 7.37902 16 8C15.5343 7.37902 14.9303 6.875 14.2361 6.52786C13.5418 6.18073 12.7762 6 12 6H3C2.73478 6 2.48043 6.10536 2.29289 6.29289C2.10536 6.48043 2 6.73478 2 7V25C2 25.2652 2.10536 25.5196 2.29289 25.7071C2.48043 25.8946 2.73478 26 3 26H12C12.7956 26 13.5587 26.3161 14.1213 26.8787C14.6839 27.4413 15 28.2044 15 29C15 29.2652 15.1054 29.5196 15.2929 29.7071C15.4804 29.8946 15.7348 30 16 30C16.2652 30 16.5196 29.8946 16.7071 29.7071C16.8946 29.5196 17 29.2652 17 29C17 28.2044 17.3161 27.4413 17.8787 26.8787C18.4413 26.3161 19.2044 26 20 26H29C29.2652 26 29.5196 25.8946 29.7071 25.7071C29.8946 25.5196 30 25.2652 30 25V7C30 6.73478 29.8946 6.48043 29.7071 6.29289C29.5196 6.10536 29.2652 6 29 6ZM12 24H4V8H12C12.7956 8 13.5587 8.31607 14.1213 8.87868C14.6839 9.44129 15 10.2044 15 11V25C14.1353 24.3493 13.0821 23.9983 12 24ZM28 24H20C18.9179 23.9983 17.8647 24.3493 17 25V11C17 10.2044 17.3161 9.44129 17.8787 8.87868C18.4413 8.31607 19.2044 8 20 8H28V24ZM20 11H25C25.2652 11 25.5196 11.1054 25.7071 11.2929C25.8946 11.4804 26 11.7348 26 12C26 12.2652 25.8946 12.5196 25.7071 12.7071C25.5196 12.8946 25.2652 13 25 13H20C19.7348 13 19.4804 12.8946 19.2929 12.7071C19.1054 12.5196 19 12.2652 19 12C19 11.7348 19.1054 11.4804 19.2929 11.2929C19.4804 11.1054 19.7348 11 20 11ZM26 16C26 16.2652 25.8946 16.5196 25.7071 16.7071C25.5196 16.8946 25.2652 17 25 17H20C19.7348 17 19.4804 16.8946 19.2929 16.7071C19.1054 16.5196 19 16.2652 19 16C19 15.7348 19.1054 15.4804 19.2929 15.2929C19.4804 15.1054 19.7348 15 20 15H25C25.2652 15 25.5196 15.1054 25.7071 15.2929C25.8946 15.4804 26 15.7348 26 16ZM26 20C26 20.2652 25.8946 20.5196 25.7071 20.7071C25.5196 20.8946 25.2652 21 25 21H20C19.7348 21 19.4804 20.8946 19.2929 20.7071C19.1054 20.5196 19 20.2652 19 20C19 19.7348 19.1054 19.4804 19.2929 19.2929C19.4804 19.1054 19.7348 19 20 19H25C25.2652 19 25.5196 19.1054 25.7071 19.2929C25.8946 19.4804 26 19.7348 26 20Z",
|
|
6427
|
+
fill: color
|
|
6428
|
+
}
|
|
6429
|
+
)
|
|
6430
|
+
}
|
|
6431
|
+
);
|
|
6432
|
+
|
|
6433
|
+
// src/assets/icons/subjects/ChatEN.tsx
|
|
6434
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
6435
|
+
var ChatEN2 = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
6436
|
+
"svg",
|
|
6437
|
+
{
|
|
6438
|
+
width: size,
|
|
6439
|
+
height: size,
|
|
6440
|
+
viewBox: "0 0 32 32",
|
|
6441
|
+
fill: "none",
|
|
6442
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6443
|
+
children: [
|
|
6444
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6445
|
+
"path",
|
|
6446
|
+
{
|
|
6447
|
+
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
6448
|
+
fill: color
|
|
6449
|
+
}
|
|
6450
|
+
),
|
|
6451
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6452
|
+
"path",
|
|
6453
|
+
{
|
|
6454
|
+
d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
|
|
6455
|
+
fill: color
|
|
6456
|
+
}
|
|
6457
|
+
),
|
|
6458
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6459
|
+
"path",
|
|
6460
|
+
{
|
|
6461
|
+
d: "M14.584 19.3652V20.5312H10.0547V19.3652H14.584ZM10.4707 12V20.5312H9V12H10.4707ZM13.9922 15.5625V16.7109H10.0547V15.5625H13.9922ZM14.5547 12V13.1719H10.0547V12H14.5547Z",
|
|
6462
|
+
fill: color
|
|
6463
|
+
}
|
|
6464
|
+
)
|
|
6465
|
+
]
|
|
6466
|
+
}
|
|
6467
|
+
);
|
|
6468
|
+
|
|
6469
|
+
// src/assets/icons/subjects/ChatES.tsx
|
|
6470
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
6471
|
+
var ChatES2 = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
6472
|
+
"svg",
|
|
6473
|
+
{
|
|
6474
|
+
width: size,
|
|
6475
|
+
height: size,
|
|
6476
|
+
viewBox: "0 0 32 32",
|
|
6477
|
+
fill: "none",
|
|
6478
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6479
|
+
children: [
|
|
6480
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6481
|
+
"path",
|
|
6482
|
+
{
|
|
6483
|
+
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
6484
|
+
fill: color
|
|
6485
|
+
}
|
|
6486
|
+
),
|
|
6487
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6488
|
+
"path",
|
|
6489
|
+
{
|
|
6490
|
+
d: "M21.1426 17.8027C21.1426 17.627 21.1152 17.4707 21.0605 17.334C21.0098 17.1973 20.918 17.0723 20.7852 16.959C20.6523 16.8457 20.4648 16.7363 20.2227 16.6309C19.9844 16.5215 19.6797 16.4102 19.3086 16.2969C18.9023 16.1719 18.5273 16.0332 18.1836 15.8809C17.8438 15.7246 17.5469 15.5449 17.293 15.3418C17.0391 15.1348 16.8418 14.8984 16.7012 14.6328C16.5605 14.3633 16.4902 14.0527 16.4902 13.7012C16.4902 13.3535 16.5625 13.0371 16.707 12.752C16.8555 12.4668 17.0645 12.2207 17.334 12.0137C17.6074 11.8027 17.9297 11.6406 18.3008 11.5273C18.6719 11.4102 19.082 11.3516 19.5312 11.3516C20.1641 11.3516 20.709 11.4688 21.166 11.7031C21.627 11.9375 21.9805 12.252 22.2266 12.6465C22.4766 13.041 22.6016 13.4766 22.6016 13.9531H21.1426C21.1426 13.6719 21.082 13.4238 20.9609 13.209C20.8438 12.9902 20.6641 12.8184 20.4219 12.6934C20.1836 12.5684 19.8809 12.5059 19.5137 12.5059C19.166 12.5059 18.877 12.5586 18.6465 12.6641C18.416 12.7695 18.2441 12.9121 18.1309 13.0918C18.0176 13.2715 17.9609 13.4746 17.9609 13.7012C17.9609 13.8613 17.998 14.0078 18.0723 14.1406C18.1465 14.2695 18.2598 14.3906 18.4121 14.5039C18.5645 14.6133 18.7559 14.7168 18.9863 14.8145C19.2168 14.9121 19.4883 15.0059 19.8008 15.0957C20.2734 15.2363 20.6855 15.3926 21.0371 15.5645C21.3887 15.7324 21.6816 15.9238 21.916 16.1387C22.1504 16.3535 22.3262 16.5977 22.4434 16.8711C22.5605 17.1406 22.6191 17.4473 22.6191 17.791C22.6191 18.1504 22.5469 18.4746 22.4023 18.7637C22.2578 19.0488 22.0508 19.293 21.7812 19.4961C21.5156 19.6953 21.1953 19.8496 20.8203 19.959C20.4492 20.0645 20.0352 20.1172 19.5781 20.1172C19.168 20.1172 18.7637 20.0625 18.3652 19.9531C17.9707 19.8438 17.6113 19.6777 17.2871 19.4551C16.9629 19.2285 16.7051 18.9473 16.5137 18.6113C16.3223 18.2715 16.2266 17.875 16.2266 17.4219H17.6973C17.6973 17.6992 17.7441 17.9355 17.8379 18.1309C17.9355 18.3262 18.0703 18.4863 18.2422 18.6113C18.4141 18.7324 18.6133 18.8223 18.8398 18.8809C19.0703 18.9395 19.3164 18.9688 19.5781 18.9688C19.9219 18.9688 20.209 18.9199 20.4395 18.8223C20.6738 18.7246 20.8496 18.5879 20.9668 18.4121C21.084 18.2363 21.1426 18.0332 21.1426 17.8027Z",
|
|
6491
|
+
fill: color
|
|
6492
|
+
}
|
|
6493
|
+
),
|
|
6494
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6495
|
+
"path",
|
|
6496
|
+
{
|
|
6497
|
+
d: "M15.4512 18.834V20H10.9219V18.834H15.4512ZM11.3379 11.4688V20H9.86719V11.4688H11.3379ZM14.8594 15.0312V16.1797H10.9219V15.0312H14.8594ZM15.4219 11.4688V12.6406H10.9219V11.4688H15.4219Z",
|
|
6498
|
+
fill: color
|
|
6499
|
+
}
|
|
6500
|
+
)
|
|
6501
|
+
]
|
|
6502
|
+
}
|
|
6503
|
+
);
|
|
6504
|
+
|
|
6505
|
+
// src/assets/icons/subjects/ChatPT.tsx
|
|
6506
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
6507
|
+
var ChatPT2 = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
6508
|
+
"svg",
|
|
6509
|
+
{
|
|
6510
|
+
width: size,
|
|
6511
|
+
height: size,
|
|
6512
|
+
viewBox: "0 0 32 32",
|
|
6513
|
+
fill: "none",
|
|
6514
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6515
|
+
children: [
|
|
6516
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6517
|
+
"path",
|
|
6518
|
+
{
|
|
6519
|
+
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
6520
|
+
fill: color
|
|
6521
|
+
}
|
|
6522
|
+
),
|
|
6523
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6524
|
+
"path",
|
|
6525
|
+
{
|
|
6526
|
+
d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
|
|
6527
|
+
fill: color
|
|
6528
|
+
}
|
|
6529
|
+
),
|
|
6530
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6531
|
+
"path",
|
|
6532
|
+
{
|
|
6533
|
+
d: "M13.2402 17.3496H11.0195V16.1836H13.2402C13.627 16.1836 13.9395 16.1211 14.1777 15.9961C14.416 15.8711 14.5898 15.6992 14.6992 15.4805C14.8125 15.2578 14.8691 15.0039 14.8691 14.7188C14.8691 14.4492 14.8125 14.1973 14.6992 13.9629C14.5898 13.7246 14.416 13.5332 14.1777 13.3887C13.9395 13.2441 13.627 13.1719 13.2402 13.1719H11.4707V20.5312H10V12H13.2402C13.9004 12 14.4609 12.1172 14.9219 12.3516C15.3867 12.582 15.7402 12.9023 15.9824 13.3125C16.2246 13.7188 16.3457 14.1836 16.3457 14.707C16.3457 15.2578 16.2246 15.7305 15.9824 16.125C15.7402 16.5195 15.3867 16.8223 14.9219 17.0332C14.4609 17.2441 13.9004 17.3496 13.2402 17.3496Z",
|
|
6534
|
+
fill: color
|
|
6535
|
+
}
|
|
6536
|
+
)
|
|
6537
|
+
]
|
|
6538
|
+
}
|
|
6539
|
+
);
|
|
6540
|
+
|
|
6541
|
+
// src/assets/icons/subjects/HeadCircuit.tsx
|
|
6542
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
6543
|
+
var HeadCircuit = ({
|
|
6544
|
+
size,
|
|
6545
|
+
color
|
|
6546
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6547
|
+
"svg",
|
|
6548
|
+
{
|
|
6549
|
+
width: size,
|
|
6550
|
+
height: size,
|
|
6551
|
+
viewBox: "0 0 32 32",
|
|
6552
|
+
fill: "none",
|
|
6553
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6554
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6555
|
+
"path",
|
|
6556
|
+
{
|
|
6557
|
+
d: "M24.0625 21.4338C25.327 20.3715 26.3372 19.0392 27.0187 17.5348C27.7001 16.0304 28.0354 14.3924 28 12.7413C27.875 7.02751 23.2987 2.31626 17.595 2.01626C16.1233 1.93616 14.6506 2.15261 13.2642 2.65277C11.8778 3.15293 10.6061 3.92659 9.52453 4.92781C8.44297 5.92903 7.57365 7.13739 6.96819 8.48112C6.36272 9.82485 6.03347 11.2766 5.99997 12.75L3.19372 18.1475C3.18247 18.17 3.17122 18.1925 3.16122 18.215C2.96003 18.6839 2.94569 19.212 3.12114 19.6912C3.29659 20.1704 3.64855 20.5644 4.10497 20.7925L4.13622 20.8063L6.99997 22.1175V26C6.99997 26.5304 7.21068 27.0392 7.58576 27.4142C7.96083 27.7893 8.46954 28 8.99997 28H15C15.2652 28 15.5195 27.8947 15.7071 27.7071C15.8946 27.5196 16 27.2652 16 27C16 26.7348 15.8946 26.4804 15.7071 26.2929C15.5195 26.1054 15.2652 26 15 26H8.99997V21.4763C9.00011 21.2846 8.94517 21.0969 8.84168 20.9356C8.73818 20.7742 8.5905 20.646 8.41622 20.5663L4.99997 19L7.88372 13.4575C7.95889 13.3166 7.99878 13.1597 7.99997 13C7.99968 10.9604 8.69216 8.98124 9.96395 7.38674C11.2357 5.79224 13.0114 4.677 15 4.22376V6.17251C14.3328 6.4084 13.7704 6.87258 13.4123 7.48299C13.0543 8.0934 12.9235 8.81075 13.0432 9.50824C13.1628 10.2057 13.5252 10.8385 14.0663 11.2946C14.6074 11.7508 15.2923 12.0009 16 12.0009C16.7077 12.0009 17.3926 11.7508 17.9336 11.2946C18.4747 10.8385 18.8371 10.2057 18.9568 9.50824C19.0764 8.81075 18.9457 8.0934 18.5876 7.48299C18.2295 6.87258 17.6672 6.4084 17 6.17251V4.00001C17.1625 4.00001 17.325 4.00001 17.4875 4.01251C19.2608 4.11409 20.9649 4.73627 22.3864 5.80124C23.808 6.86621 24.8841 8.32669 25.48 10H23C22.8533 9.99995 22.7084 10.0322 22.5755 10.0944C22.4426 10.1566 22.3251 10.2473 22.2312 10.36L19.0425 14.1875C18.3774 13.9397 17.6462 13.9351 16.9781 14.1744C16.3099 14.4138 15.748 14.8817 15.3916 15.4954C15.0352 16.1092 14.9073 16.8292 15.0306 17.5281C15.1538 18.227 15.5203 18.8598 16.0652 19.3146C16.61 19.7694 17.2981 20.0168 18.0078 20.0132C18.7175 20.0095 19.4031 19.755 19.9432 19.2947C20.4834 18.8343 20.8433 18.1977 20.9594 17.4976C21.0754 16.7974 20.9402 16.0788 20.5775 15.4688L23.4687 12H25.9425C25.9725 12.26 25.9908 12.5225 25.9975 12.7875C26.0286 14.2198 25.7187 15.639 25.0931 16.9278C24.4676 18.2167 23.5445 19.3383 22.4 20.2C22.2589 20.3057 22.1484 20.4469 22.0794 20.6091C22.0105 20.7713 21.9857 20.9489 22.0075 21.1238L23.0075 29.1238C23.0379 29.3653 23.1554 29.5874 23.3379 29.7485C23.5203 29.9095 23.7553 29.9985 23.9987 29.9988C24.0405 29.9988 24.0822 29.9962 24.1237 29.9913C24.2541 29.975 24.3799 29.9333 24.4942 29.8684C24.6084 29.8035 24.7087 29.7168 24.7893 29.6131C24.87 29.5094 24.9295 29.3909 24.9643 29.2643C24.9992 29.1376 25.0087 29.0054 24.9925 28.875L24.0625 21.4338ZM16 10C15.8022 10 15.6088 9.94136 15.4444 9.83148C15.28 9.7216 15.1518 9.56542 15.0761 9.38269C15.0004 9.19997 14.9806 8.9989 15.0192 8.80492C15.0578 8.61094 15.153 8.43275 15.2929 8.2929C15.4327 8.15305 15.6109 8.05781 15.8049 8.01922C15.9989 7.98064 16.1999 8.00044 16.3827 8.07613C16.5654 8.15182 16.7216 8.27999 16.8314 8.44444C16.9413 8.60889 17 8.80223 17 9.00001C17 9.26523 16.8946 9.51958 16.7071 9.70712C16.5195 9.89465 16.2652 10 16 10ZM18 18C17.8022 18 17.6088 17.9414 17.4444 17.8315C17.28 17.7216 17.1518 17.5654 17.0761 17.3827C17.0004 17.2 16.9806 16.9989 17.0192 16.8049C17.0578 16.6109 17.153 16.4328 17.2929 16.2929C17.4327 16.153 17.6109 16.0578 17.8049 16.0192C17.9989 15.9806 18.1999 16.0004 18.3827 16.0761C18.5654 16.1518 18.7216 16.28 18.8314 16.4444C18.9413 16.6089 19 16.8022 19 17C19 17.2652 18.8946 17.5196 18.7071 17.7071C18.5195 17.8947 18.2652 18 18 18Z",
|
|
6558
|
+
fill: color
|
|
6559
|
+
}
|
|
6560
|
+
)
|
|
6561
|
+
}
|
|
6562
|
+
);
|
|
6563
|
+
|
|
6564
|
+
// src/assets/icons/subjects/Microscope.tsx
|
|
6565
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
6566
|
+
var Microscope = ({
|
|
6567
|
+
size,
|
|
6568
|
+
color
|
|
6569
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6570
|
+
"svg",
|
|
6571
|
+
{
|
|
6572
|
+
width: size,
|
|
6573
|
+
height: size,
|
|
6574
|
+
viewBox: "0 0 32 32",
|
|
6575
|
+
fill: "none",
|
|
6576
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6577
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6578
|
+
"path",
|
|
6579
|
+
{
|
|
6580
|
+
d: "M28 26H25.4925C26.7637 24.4552 27.5898 22.5932 27.882 20.6142C28.1743 18.6351 27.9216 16.6138 27.1511 14.7676C26.3806 12.9213 25.1215 11.32 23.5092 10.1358C21.8968 8.95153 19.9922 8.22913 18 8.04625V4C18 3.46957 17.7893 2.96086 17.4142 2.58579C17.0391 2.21071 16.5304 2 16 2H10C9.46957 2 8.96086 2.21071 8.58579 2.58579C8.21071 2.96086 8 3.46957 8 4V17C8 17.5304 8.21071 18.0391 8.58579 18.4142C8.96086 18.7893 9.46957 19 10 19H16C16.5304 19 17.0391 18.7893 17.4142 18.4142C17.7893 18.0391 18 17.5304 18 17V10.0575C19.7643 10.2552 21.4306 10.9703 22.7895 12.1128C24.1483 13.2553 25.1389 14.7742 25.6366 16.4783C26.1343 18.1824 26.1169 19.9957 25.5866 21.69C25.0563 23.3842 24.0368 24.8838 22.6562 26H4C3.73478 26 3.48043 26.1054 3.29289 26.2929C3.10536 26.4804 3 26.7348 3 27C3 27.2652 3.10536 27.5196 3.29289 27.7071C3.48043 27.8946 3.73478 28 4 28H28C28.2652 28 28.5196 27.8946 28.7071 27.7071C28.8946 27.5196 29 27.2652 29 27C29 26.7348 28.8946 26.4804 28.7071 26.2929C28.5196 26.1054 28.2652 26 28 26ZM16 17H10V4H16V17ZM9 23C8.73478 23 8.48043 22.8946 8.29289 22.7071C8.10536 22.5196 8 22.2652 8 22C8 21.7348 8.10536 21.4804 8.29289 21.2929C8.48043 21.1054 8.73478 21 9 21H17C17.2652 21 17.5196 21.1054 17.7071 21.2929C17.8946 21.4804 18 21.7348 18 22C18 22.2652 17.8946 22.5196 17.7071 22.7071C17.5196 22.8946 17.2652 23 17 23H9Z",
|
|
6581
|
+
fill: color
|
|
6582
|
+
}
|
|
6583
|
+
)
|
|
6584
|
+
}
|
|
6585
|
+
);
|
|
6586
|
+
|
|
6587
|
+
// src/enums/SubjectEnum.ts
|
|
6588
|
+
var SubjectEnum = /* @__PURE__ */ ((SubjectEnum2) => {
|
|
6589
|
+
SubjectEnum2["FISICA"] = "F\xEDsica";
|
|
6590
|
+
SubjectEnum2["HISTORIA"] = "Hist\xF3ria";
|
|
6591
|
+
SubjectEnum2["LITERATURA"] = "Literatura";
|
|
6592
|
+
SubjectEnum2["GEOGRAFIA"] = "Geografia";
|
|
6593
|
+
SubjectEnum2["BIOLOGIA"] = "Biologia";
|
|
6594
|
+
SubjectEnum2["PORTUGUES"] = "Portugu\xEAs";
|
|
6595
|
+
SubjectEnum2["QUIMICA"] = "Qu\xEDmica";
|
|
6596
|
+
SubjectEnum2["ARTES"] = "Artes";
|
|
6597
|
+
SubjectEnum2["MATEMATICA"] = "Matem\xE1tica";
|
|
6598
|
+
SubjectEnum2["FILOSOFIA"] = "Filosofia";
|
|
6599
|
+
SubjectEnum2["ESPANHOL"] = "Espanhol";
|
|
6600
|
+
SubjectEnum2["REDACAO"] = "Reda\xE7\xE3o";
|
|
6601
|
+
SubjectEnum2["SOCIOLOGIA"] = "Sociologia";
|
|
6602
|
+
SubjectEnum2["INGLES"] = "Ingl\xEAs";
|
|
6603
|
+
SubjectEnum2["EDUCACAO_FISICA"] = "Ed. F\xEDsica";
|
|
6604
|
+
SubjectEnum2["TRILHAS"] = "Trilhas";
|
|
6605
|
+
return SubjectEnum2;
|
|
6606
|
+
})(SubjectEnum || {});
|
|
6607
|
+
|
|
6608
|
+
// src/components/SubjectInfo/SubjectInfo.tsx
|
|
6609
|
+
var import_phosphor_react17 = require("phosphor-react");
|
|
6610
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6611
|
+
var SubjectInfo = {
|
|
6612
|
+
["F\xEDsica" /* FISICA */]: {
|
|
6613
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Atom, { size: 17 }),
|
|
6614
|
+
colorClass: "bg-subject-1",
|
|
6615
|
+
name: "F\xEDsica" /* FISICA */
|
|
6616
|
+
},
|
|
6617
|
+
["Hist\xF3ria" /* HISTORIA */]: {
|
|
6618
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Scroll, { size: 17 }),
|
|
6619
|
+
colorClass: "bg-subject-2",
|
|
6620
|
+
name: "Hist\xF3ria" /* HISTORIA */
|
|
6621
|
+
},
|
|
6622
|
+
["Literatura" /* LITERATURA */]: {
|
|
6623
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(BookOpenText, { size: 17, color: "#000000" }),
|
|
6624
|
+
colorClass: "bg-subject-3",
|
|
6625
|
+
name: "Literatura" /* LITERATURA */
|
|
6626
|
+
},
|
|
6627
|
+
["Geografia" /* GEOGRAFIA */]: {
|
|
6628
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.GlobeHemisphereWest, { size: 17 }),
|
|
6629
|
+
colorClass: "bg-subject-4",
|
|
6630
|
+
name: "Geografia" /* GEOGRAFIA */
|
|
6631
|
+
},
|
|
6632
|
+
["Biologia" /* BIOLOGIA */]: {
|
|
6633
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Microscope, { size: 17, color: "#000000" }),
|
|
6634
|
+
colorClass: "bg-subject-5",
|
|
6635
|
+
name: "Biologia" /* BIOLOGIA */
|
|
6636
|
+
},
|
|
6637
|
+
["Portugu\xEAs" /* PORTUGUES */]: {
|
|
6638
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChatPT2, { size: 17, color: "#000000" }),
|
|
6639
|
+
colorClass: "bg-subject-6",
|
|
6640
|
+
name: "Portugu\xEAs" /* PORTUGUES */
|
|
6641
|
+
},
|
|
6642
|
+
["Qu\xEDmica" /* QUIMICA */]: {
|
|
6643
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Flask, { size: 17 }),
|
|
6644
|
+
colorClass: "bg-subject-7",
|
|
6645
|
+
name: "Qu\xEDmica" /* QUIMICA */
|
|
6646
|
+
},
|
|
6647
|
+
["Artes" /* ARTES */]: {
|
|
6648
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Palette, { size: 17 }),
|
|
6649
|
+
colorClass: "bg-subject-8",
|
|
6650
|
+
name: "Artes" /* ARTES */
|
|
6651
|
+
},
|
|
6652
|
+
["Matem\xE1tica" /* MATEMATICA */]: {
|
|
6653
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.MathOperations, { size: 17 }),
|
|
6654
|
+
colorClass: "bg-subject-9",
|
|
6655
|
+
name: "Matem\xE1tica" /* MATEMATICA */
|
|
6656
|
+
},
|
|
6657
|
+
["Filosofia" /* FILOSOFIA */]: {
|
|
6658
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(HeadCircuit, { size: 17, color: "#000000" }),
|
|
6659
|
+
colorClass: "bg-subject-10",
|
|
6660
|
+
name: "Filosofia" /* FILOSOFIA */
|
|
6661
|
+
},
|
|
6662
|
+
["Espanhol" /* ESPANHOL */]: {
|
|
6663
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChatES2, { size: 17, color: "#000000" }),
|
|
6664
|
+
colorClass: "bg-subject-11",
|
|
6665
|
+
name: "Espanhol" /* ESPANHOL */
|
|
6666
|
+
},
|
|
6667
|
+
["Reda\xE7\xE3o" /* REDACAO */]: {
|
|
6668
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.ArticleNyTimes, { size: 17 }),
|
|
6669
|
+
colorClass: "bg-subject-12",
|
|
6670
|
+
name: "Reda\xE7\xE3o" /* REDACAO */
|
|
6671
|
+
},
|
|
6672
|
+
["Sociologia" /* SOCIOLOGIA */]: {
|
|
6673
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Person, { size: 17 }),
|
|
6674
|
+
colorClass: "bg-subject-13",
|
|
6675
|
+
name: "Sociologia" /* SOCIOLOGIA */
|
|
6676
|
+
},
|
|
6677
|
+
["Ingl\xEAs" /* INGLES */]: {
|
|
6678
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChatEN2, { size: 17, color: "#000000" }),
|
|
6679
|
+
colorClass: "bg-subject-14",
|
|
6680
|
+
name: "Ingl\xEAs" /* INGLES */
|
|
6681
|
+
},
|
|
6682
|
+
["Ed. F\xEDsica" /* EDUCACAO_FISICA */]: {
|
|
6683
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.DribbbleLogo, { size: 17 }),
|
|
6684
|
+
colorClass: "bg-subject-15",
|
|
6685
|
+
name: "Ed. F\xEDsica" /* EDUCACAO_FISICA */
|
|
6686
|
+
},
|
|
6687
|
+
["Trilhas" /* TRILHAS */]: {
|
|
6688
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.BookBookmark, { size: 17 }),
|
|
6689
|
+
colorClass: "bg-subject-16",
|
|
6690
|
+
name: "Trilhas" /* TRILHAS */
|
|
6691
|
+
}
|
|
6692
|
+
};
|
|
6693
|
+
var getSubjectData = (subject) => {
|
|
6694
|
+
return SubjectInfo[subject];
|
|
6695
|
+
};
|
|
6696
|
+
var getSubjectIcon = (subject) => {
|
|
6697
|
+
return SubjectInfo[subject].icon;
|
|
6698
|
+
};
|
|
6699
|
+
var getSubjectColorClass = (subject) => {
|
|
6700
|
+
return SubjectInfo[subject].colorClass;
|
|
6701
|
+
};
|
|
6702
|
+
var getSubjectName = (subject) => {
|
|
6703
|
+
return SubjectInfo[subject].name;
|
|
6704
|
+
};
|
|
6705
|
+
|
|
6386
6706
|
// src/hooks/useMobile.ts
|
|
6387
6707
|
var import_react21 = require("react");
|
|
6388
6708
|
var MOBILE_WIDTH = 500;
|
|
@@ -6443,8 +6763,8 @@ var useMobile = () => {
|
|
|
6443
6763
|
// src/components/Select/Select.tsx
|
|
6444
6764
|
var import_zustand5 = require("zustand");
|
|
6445
6765
|
var import_react22 = require("react");
|
|
6446
|
-
var
|
|
6447
|
-
var
|
|
6766
|
+
var import_phosphor_react18 = require("phosphor-react");
|
|
6767
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
6448
6768
|
var VARIANT_CLASSES4 = {
|
|
6449
6769
|
outlined: "border-2 rounded-lg focus:border-primary-950",
|
|
6450
6770
|
underlined: "border-b-2 focus:border-primary-950",
|
|
@@ -6504,7 +6824,7 @@ function getLabelAsNode(children) {
|
|
|
6504
6824
|
}
|
|
6505
6825
|
const flattened = import_react22.Children.toArray(children);
|
|
6506
6826
|
if (flattened.length === 1) return flattened[0];
|
|
6507
|
-
return /* @__PURE__ */ (0,
|
|
6827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: flattened });
|
|
6508
6828
|
}
|
|
6509
6829
|
var injectStore4 = (children, store, size, selectId) => {
|
|
6510
6830
|
return import_react22.Children.map(children, (child) => {
|
|
@@ -6615,8 +6935,8 @@ var Select = ({
|
|
|
6615
6935
|
}
|
|
6616
6936
|
}, [propValue]);
|
|
6617
6937
|
const sizeClasses = SIZE_CLASSES12[size];
|
|
6618
|
-
return /* @__PURE__ */ (0,
|
|
6619
|
-
label && /* @__PURE__ */ (0,
|
|
6938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: cn("w-full", className), children: [
|
|
6939
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6620
6940
|
"label",
|
|
6621
6941
|
{
|
|
6622
6942
|
htmlFor: selectId,
|
|
@@ -6624,11 +6944,11 @@ var Select = ({
|
|
|
6624
6944
|
children: label
|
|
6625
6945
|
}
|
|
6626
6946
|
),
|
|
6627
|
-
/* @__PURE__ */ (0,
|
|
6628
|
-
(helperText || errorMessage) && /* @__PURE__ */ (0,
|
|
6629
|
-
helperText && /* @__PURE__ */ (0,
|
|
6630
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
6631
|
-
/* @__PURE__ */ (0,
|
|
6947
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: cn("relative w-full"), ref: selectRef, children: injectStore4(children, store, size, selectId) }),
|
|
6948
|
+
(helperText || errorMessage) && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "mt-1.5 gap-1.5", children: [
|
|
6949
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-sm text-text-500", children: helperText }),
|
|
6950
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("p", { className: "flex gap-1 items-center text-sm text-indicator-error", children: [
|
|
6951
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_phosphor_react18.WarningCircle, { size: 16 }),
|
|
6632
6952
|
" ",
|
|
6633
6953
|
errorMessage
|
|
6634
6954
|
] })
|
|
@@ -6642,7 +6962,7 @@ var SelectValue = ({
|
|
|
6642
6962
|
const store = useSelectStore(externalStore);
|
|
6643
6963
|
const selectedLabel = (0, import_zustand5.useStore)(store, (s) => s.selectedLabel);
|
|
6644
6964
|
const value = (0, import_zustand5.useStore)(store, (s) => s.value);
|
|
6645
|
-
return /* @__PURE__ */ (0,
|
|
6965
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-inherit flex gap-2 items-center", children: selectedLabel || placeholder || value });
|
|
6646
6966
|
};
|
|
6647
6967
|
var SelectTrigger = (0, import_react22.forwardRef)(
|
|
6648
6968
|
({
|
|
@@ -6661,7 +6981,7 @@ var SelectTrigger = (0, import_react22.forwardRef)(
|
|
|
6661
6981
|
const variantClasses = VARIANT_CLASSES4[variant];
|
|
6662
6982
|
const heightClasses = HEIGHT_CLASSES[size];
|
|
6663
6983
|
const paddingClasses = PADDING_CLASSES[size];
|
|
6664
|
-
return /* @__PURE__ */ (0,
|
|
6984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
6665
6985
|
"button",
|
|
6666
6986
|
{
|
|
6667
6987
|
ref,
|
|
@@ -6683,8 +7003,8 @@ var SelectTrigger = (0, import_react22.forwardRef)(
|
|
|
6683
7003
|
...props,
|
|
6684
7004
|
children: [
|
|
6685
7005
|
props.children,
|
|
6686
|
-
/* @__PURE__ */ (0,
|
|
6687
|
-
|
|
7006
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7007
|
+
import_phosphor_react18.CaretDown,
|
|
6688
7008
|
{
|
|
6689
7009
|
className: cn(
|
|
6690
7010
|
"h-[1em] w-[1em] opacity-50 transition-transform",
|
|
@@ -6711,7 +7031,7 @@ var SelectContent = (0, import_react22.forwardRef)(
|
|
|
6711
7031
|
const open = (0, import_zustand5.useStore)(store, (s) => s.open);
|
|
6712
7032
|
if (!open) return null;
|
|
6713
7033
|
const getPositionClasses = () => `w-full min-w-full absolute ${SIDE_CLASSES2[side]} ${ALIGN_CLASSES2[align]}`;
|
|
6714
|
-
return /* @__PURE__ */ (0,
|
|
7034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6715
7035
|
"div",
|
|
6716
7036
|
{
|
|
6717
7037
|
role: "menu",
|
|
@@ -6755,7 +7075,7 @@ var SelectItem = (0, import_react22.forwardRef)(
|
|
|
6755
7075
|
}
|
|
6756
7076
|
props.onClick?.(e);
|
|
6757
7077
|
};
|
|
6758
|
-
return /* @__PURE__ */ (0,
|
|
7078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
6759
7079
|
"div",
|
|
6760
7080
|
{
|
|
6761
7081
|
role: "menuitem",
|
|
@@ -6775,7 +7095,7 @@ var SelectItem = (0, import_react22.forwardRef)(
|
|
|
6775
7095
|
tabIndex: disabled ? -1 : 0,
|
|
6776
7096
|
...props,
|
|
6777
7097
|
children: [
|
|
6778
|
-
/* @__PURE__ */ (0,
|
|
7098
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: selectedValue === value && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_phosphor_react18.Check, { className: "" }) }),
|
|
6779
7099
|
children
|
|
6780
7100
|
]
|
|
6781
7101
|
}
|
|
@@ -6788,8 +7108,8 @@ var Select_default = Select;
|
|
|
6788
7108
|
// src/components/Menu/Menu.tsx
|
|
6789
7109
|
var import_zustand6 = require("zustand");
|
|
6790
7110
|
var import_react23 = require("react");
|
|
6791
|
-
var
|
|
6792
|
-
var
|
|
7111
|
+
var import_phosphor_react19 = require("phosphor-react");
|
|
7112
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
6793
7113
|
var createMenuStore = (onValueChange) => (0, import_zustand6.create)((set) => ({
|
|
6794
7114
|
value: "",
|
|
6795
7115
|
setValue: (value) => {
|
|
@@ -6827,7 +7147,7 @@ var Menu = (0, import_react23.forwardRef)(
|
|
|
6827
7147
|
}, [defaultValue, propValue, setValue]);
|
|
6828
7148
|
const baseClasses = variant === "menu-overflow" ? "w-fit py-2 flex flex-row items-center justify-center" : "w-full py-2 flex flex-row items-center justify-center";
|
|
6829
7149
|
const variantClasses = VARIANT_CLASSES5[variant];
|
|
6830
|
-
return /* @__PURE__ */ (0,
|
|
7150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6831
7151
|
"div",
|
|
6832
7152
|
{
|
|
6833
7153
|
ref,
|
|
@@ -6847,7 +7167,7 @@ var MenuContent = (0, import_react23.forwardRef)(
|
|
|
6847
7167
|
({ className, children, variant = "menu", ...props }, ref) => {
|
|
6848
7168
|
const baseClasses = "w-full flex flex-row items-center gap-2";
|
|
6849
7169
|
const variantClasses = variant === "menu2" || variant === "menu-overflow" ? "overflow-x-auto scroll-smooth" : "";
|
|
6850
|
-
return /* @__PURE__ */ (0,
|
|
7170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6851
7171
|
"ul",
|
|
6852
7172
|
{
|
|
6853
7173
|
ref,
|
|
@@ -6899,7 +7219,7 @@ var MenuItem = (0, import_react23.forwardRef)(
|
|
|
6899
7219
|
...props
|
|
6900
7220
|
};
|
|
6901
7221
|
const variants = {
|
|
6902
|
-
menu: /* @__PURE__ */ (0,
|
|
7222
|
+
menu: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6903
7223
|
"li",
|
|
6904
7224
|
{
|
|
6905
7225
|
"data-variant": "menu",
|
|
@@ -6914,7 +7234,7 @@ var MenuItem = (0, import_react23.forwardRef)(
|
|
|
6914
7234
|
children
|
|
6915
7235
|
}
|
|
6916
7236
|
),
|
|
6917
|
-
menu2: /* @__PURE__ */ (0,
|
|
7237
|
+
menu2: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
6918
7238
|
"li",
|
|
6919
7239
|
{
|
|
6920
7240
|
"data-variant": "menu2",
|
|
@@ -6925,7 +7245,7 @@ var MenuItem = (0, import_react23.forwardRef)(
|
|
|
6925
7245
|
`,
|
|
6926
7246
|
...commonProps,
|
|
6927
7247
|
children: [
|
|
6928
|
-
/* @__PURE__ */ (0,
|
|
7248
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6929
7249
|
"span",
|
|
6930
7250
|
{
|
|
6931
7251
|
className: cn(
|
|
@@ -6935,11 +7255,11 @@ var MenuItem = (0, import_react23.forwardRef)(
|
|
|
6935
7255
|
children
|
|
6936
7256
|
}
|
|
6937
7257
|
),
|
|
6938
|
-
selectedValue === value && /* @__PURE__ */ (0,
|
|
7258
|
+
selectedValue === value && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "h-1 w-full bg-primary-950 rounded-lg" })
|
|
6939
7259
|
]
|
|
6940
7260
|
}
|
|
6941
7261
|
),
|
|
6942
|
-
"menu-overflow": /* @__PURE__ */ (0,
|
|
7262
|
+
"menu-overflow": /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
6943
7263
|
"li",
|
|
6944
7264
|
{
|
|
6945
7265
|
"data-variant": "menu-overflow",
|
|
@@ -6950,7 +7270,7 @@ var MenuItem = (0, import_react23.forwardRef)(
|
|
|
6950
7270
|
`,
|
|
6951
7271
|
...commonProps,
|
|
6952
7272
|
children: [
|
|
6953
|
-
/* @__PURE__ */ (0,
|
|
7273
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6954
7274
|
"span",
|
|
6955
7275
|
{
|
|
6956
7276
|
className: cn(
|
|
@@ -6960,11 +7280,11 @@ var MenuItem = (0, import_react23.forwardRef)(
|
|
|
6960
7280
|
children
|
|
6961
7281
|
}
|
|
6962
7282
|
),
|
|
6963
|
-
selectedValue === value && /* @__PURE__ */ (0,
|
|
7283
|
+
selectedValue === value && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "h-1 w-full bg-primary-950 rounded-lg" })
|
|
6964
7284
|
]
|
|
6965
7285
|
}
|
|
6966
7286
|
),
|
|
6967
|
-
breadcrumb: /* @__PURE__ */ (0,
|
|
7287
|
+
breadcrumb: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
6968
7288
|
"li",
|
|
6969
7289
|
{
|
|
6970
7290
|
"data-variant": "breadcrumb",
|
|
@@ -6976,7 +7296,7 @@ var MenuItem = (0, import_react23.forwardRef)(
|
|
|
6976
7296
|
`,
|
|
6977
7297
|
...commonProps,
|
|
6978
7298
|
children: [
|
|
6979
|
-
/* @__PURE__ */ (0,
|
|
7299
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6980
7300
|
"span",
|
|
6981
7301
|
{
|
|
6982
7302
|
className: cn(
|
|
@@ -6986,8 +7306,8 @@ var MenuItem = (0, import_react23.forwardRef)(
|
|
|
6986
7306
|
children
|
|
6987
7307
|
}
|
|
6988
7308
|
),
|
|
6989
|
-
separator && /* @__PURE__ */ (0,
|
|
6990
|
-
|
|
7309
|
+
separator && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
7310
|
+
import_phosphor_react19.CaretRight,
|
|
6991
7311
|
{
|
|
6992
7312
|
size: 16,
|
|
6993
7313
|
className: "text-text-600",
|
|
@@ -7041,25 +7361,25 @@ var MenuOverflow = ({
|
|
|
7041
7361
|
window.removeEventListener("resize", checkScroll);
|
|
7042
7362
|
};
|
|
7043
7363
|
}, []);
|
|
7044
|
-
return /* @__PURE__ */ (0,
|
|
7364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
7045
7365
|
"div",
|
|
7046
7366
|
{
|
|
7047
7367
|
"data-testid": "menu-overflow-wrapper",
|
|
7048
7368
|
className: cn("relative w-full overflow-hidden", className),
|
|
7049
7369
|
children: [
|
|
7050
|
-
showLeftArrow && /* @__PURE__ */ (0,
|
|
7370
|
+
showLeftArrow && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
7051
7371
|
"button",
|
|
7052
7372
|
{
|
|
7053
7373
|
onClick: () => internalScroll(containerRef.current, "left"),
|
|
7054
7374
|
className: "absolute left-0 top-1/2 -translate-y-1/2 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-white shadow-md cursor-pointer",
|
|
7055
7375
|
"data-testid": "scroll-left-button",
|
|
7056
7376
|
children: [
|
|
7057
|
-
/* @__PURE__ */ (0,
|
|
7058
|
-
/* @__PURE__ */ (0,
|
|
7377
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_phosphor_react19.CaretLeft, { size: 16 }),
|
|
7378
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "sr-only", children: "Scroll left" })
|
|
7059
7379
|
]
|
|
7060
7380
|
}
|
|
7061
7381
|
),
|
|
7062
|
-
/* @__PURE__ */ (0,
|
|
7382
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
7063
7383
|
Menu,
|
|
7064
7384
|
{
|
|
7065
7385
|
defaultValue,
|
|
@@ -7067,18 +7387,18 @@ var MenuOverflow = ({
|
|
|
7067
7387
|
value,
|
|
7068
7388
|
variant: "menu2",
|
|
7069
7389
|
...props,
|
|
7070
|
-
children: /* @__PURE__ */ (0,
|
|
7390
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(MenuContent, { ref: containerRef, variant: "menu2", children })
|
|
7071
7391
|
}
|
|
7072
7392
|
),
|
|
7073
|
-
showRightArrow && /* @__PURE__ */ (0,
|
|
7393
|
+
showRightArrow && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
7074
7394
|
"button",
|
|
7075
7395
|
{
|
|
7076
7396
|
onClick: () => internalScroll(containerRef.current, "right"),
|
|
7077
7397
|
className: "absolute right-0 top-1/2 -translate-y-1/2 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-white shadow-md cursor-pointer",
|
|
7078
7398
|
"data-testid": "scroll-right-button",
|
|
7079
7399
|
children: [
|
|
7080
|
-
/* @__PURE__ */ (0,
|
|
7081
|
-
/* @__PURE__ */ (0,
|
|
7400
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_phosphor_react19.CaretRight, { size: 16 }),
|
|
7401
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "sr-only", children: "Scroll right" })
|
|
7082
7402
|
]
|
|
7083
7403
|
}
|
|
7084
7404
|
)
|
|
@@ -7099,7 +7419,7 @@ var Menu_default = Menu;
|
|
|
7099
7419
|
|
|
7100
7420
|
// src/components/Skeleton/Skeleton.tsx
|
|
7101
7421
|
var import_react24 = require("react");
|
|
7102
|
-
var
|
|
7422
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
7103
7423
|
var SKELETON_ANIMATION_CLASSES = {
|
|
7104
7424
|
pulse: "animate-pulse",
|
|
7105
7425
|
none: ""
|
|
@@ -7136,13 +7456,13 @@ var Skeleton = (0, import_react24.forwardRef)(
|
|
|
7136
7456
|
height: typeof height === "number" ? `${height}px` : height
|
|
7137
7457
|
};
|
|
7138
7458
|
if (variant === "text" && lines > 1) {
|
|
7139
|
-
return /* @__PURE__ */ (0,
|
|
7459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7140
7460
|
"div",
|
|
7141
7461
|
{
|
|
7142
7462
|
ref,
|
|
7143
7463
|
className: cn("flex flex-col", spacingClass, className),
|
|
7144
7464
|
...props,
|
|
7145
|
-
children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ (0,
|
|
7465
|
+
children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7146
7466
|
"div",
|
|
7147
7467
|
{
|
|
7148
7468
|
className: cn(variantClass, animationClass),
|
|
@@ -7153,7 +7473,7 @@ var Skeleton = (0, import_react24.forwardRef)(
|
|
|
7153
7473
|
}
|
|
7154
7474
|
);
|
|
7155
7475
|
}
|
|
7156
|
-
return /* @__PURE__ */ (0,
|
|
7476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7157
7477
|
"div",
|
|
7158
7478
|
{
|
|
7159
7479
|
ref,
|
|
@@ -7166,11 +7486,11 @@ var Skeleton = (0, import_react24.forwardRef)(
|
|
|
7166
7486
|
}
|
|
7167
7487
|
);
|
|
7168
7488
|
var SkeletonText = (0, import_react24.forwardRef)(
|
|
7169
|
-
(props, ref) => /* @__PURE__ */ (0,
|
|
7489
|
+
(props, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Skeleton, { ref, variant: "text", ...props })
|
|
7170
7490
|
);
|
|
7171
|
-
var SkeletonCircle = (0, import_react24.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
7172
|
-
var SkeletonRectangle = (0, import_react24.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
7173
|
-
var SkeletonRounded = (0, import_react24.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
7491
|
+
var SkeletonCircle = (0, import_react24.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Skeleton, { ref, variant: "circular", ...props }));
|
|
7492
|
+
var SkeletonRectangle = (0, import_react24.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Skeleton, { ref, variant: "rectangular", ...props }));
|
|
7493
|
+
var SkeletonRounded = (0, import_react24.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Skeleton, { ref, variant: "rounded", ...props }));
|
|
7174
7494
|
var SkeletonCard = (0, import_react24.forwardRef)(
|
|
7175
7495
|
({
|
|
7176
7496
|
showAvatar = true,
|
|
@@ -7181,7 +7501,7 @@ var SkeletonCard = (0, import_react24.forwardRef)(
|
|
|
7181
7501
|
className = "",
|
|
7182
7502
|
...props
|
|
7183
7503
|
}, ref) => {
|
|
7184
|
-
return /* @__PURE__ */ (0,
|
|
7504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
7185
7505
|
"div",
|
|
7186
7506
|
{
|
|
7187
7507
|
ref,
|
|
@@ -7191,16 +7511,16 @@ var SkeletonCard = (0, import_react24.forwardRef)(
|
|
|
7191
7511
|
),
|
|
7192
7512
|
...props,
|
|
7193
7513
|
children: [
|
|
7194
|
-
/* @__PURE__ */ (0,
|
|
7195
|
-
showAvatar && /* @__PURE__ */ (0,
|
|
7196
|
-
/* @__PURE__ */ (0,
|
|
7197
|
-
showTitle && /* @__PURE__ */ (0,
|
|
7198
|
-
showDescription && /* @__PURE__ */ (0,
|
|
7514
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-start space-x-3", children: [
|
|
7515
|
+
showAvatar && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SkeletonCircle, { width: 40, height: 40 }),
|
|
7516
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
7517
|
+
showTitle && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SkeletonText, { width: "60%", height: 20 }),
|
|
7518
|
+
showDescription && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SkeletonText, { lines, spacing: "small" })
|
|
7199
7519
|
] })
|
|
7200
7520
|
] }),
|
|
7201
|
-
showActions && /* @__PURE__ */ (0,
|
|
7202
|
-
/* @__PURE__ */ (0,
|
|
7203
|
-
/* @__PURE__ */ (0,
|
|
7521
|
+
showActions && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex justify-end space-x-2 mt-4", children: [
|
|
7522
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SkeletonRectangle, { width: 80, height: 32 }),
|
|
7523
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SkeletonRectangle, { width: 80, height: 32 })
|
|
7204
7524
|
] })
|
|
7205
7525
|
]
|
|
7206
7526
|
}
|
|
@@ -7217,19 +7537,19 @@ var SkeletonList = (0, import_react24.forwardRef)(
|
|
|
7217
7537
|
className = "",
|
|
7218
7538
|
...props
|
|
7219
7539
|
}, ref) => {
|
|
7220
|
-
return /* @__PURE__ */ (0,
|
|
7221
|
-
showAvatar && /* @__PURE__ */ (0,
|
|
7222
|
-
/* @__PURE__ */ (0,
|
|
7223
|
-
showTitle && /* @__PURE__ */ (0,
|
|
7224
|
-
showDescription && /* @__PURE__ */ (0,
|
|
7540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-start space-x-3 p-3", children: [
|
|
7541
|
+
showAvatar && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SkeletonCircle, { width: 32, height: 32 }),
|
|
7542
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
7543
|
+
showTitle && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SkeletonText, { width: "40%", height: 16 }),
|
|
7544
|
+
showDescription && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SkeletonText, { lines, spacing: "small" })
|
|
7225
7545
|
] })
|
|
7226
7546
|
] }, index)) });
|
|
7227
7547
|
}
|
|
7228
7548
|
);
|
|
7229
7549
|
var SkeletonTable = (0, import_react24.forwardRef)(
|
|
7230
7550
|
({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
|
|
7231
|
-
return /* @__PURE__ */ (0,
|
|
7232
|
-
showHeader && /* @__PURE__ */ (0,
|
|
7551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { ref, className: cn("w-full", className), ...props, children: [
|
|
7552
|
+
showHeader && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7233
7553
|
SkeletonText,
|
|
7234
7554
|
{
|
|
7235
7555
|
width: `${100 / columns}%`,
|
|
@@ -7237,7 +7557,7 @@ var SkeletonTable = (0, import_react24.forwardRef)(
|
|
|
7237
7557
|
},
|
|
7238
7558
|
index
|
|
7239
7559
|
)) }),
|
|
7240
|
-
/* @__PURE__ */ (0,
|
|
7560
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "space-y-2", children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex space-x-2", children: Array.from({ length: columns }, (_2, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7241
7561
|
SkeletonText,
|
|
7242
7562
|
{
|
|
7243
7563
|
width: `${100 / columns}%`,
|
|
@@ -7250,7 +7570,7 @@ var SkeletonTable = (0, import_react24.forwardRef)(
|
|
|
7250
7570
|
);
|
|
7251
7571
|
|
|
7252
7572
|
// src/components/NotFound/NotFound.tsx
|
|
7253
|
-
var
|
|
7573
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
7254
7574
|
var NotFound = ({
|
|
7255
7575
|
title,
|
|
7256
7576
|
description,
|
|
@@ -7293,22 +7613,22 @@ var NotFound = ({
|
|
|
7293
7613
|
const errorTitle = title || getDefaultTitle();
|
|
7294
7614
|
const errorDescription = description || getDefaultDescription();
|
|
7295
7615
|
const errorCode = getErrorCode();
|
|
7296
|
-
return /* @__PURE__ */ (0,
|
|
7616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7297
7617
|
"div",
|
|
7298
7618
|
{
|
|
7299
7619
|
className: cn(
|
|
7300
7620
|
"flex flex-col w-full h-screen items-center justify-center bg-background-50 px-4",
|
|
7301
7621
|
className
|
|
7302
7622
|
),
|
|
7303
|
-
children: /* @__PURE__ */ (0,
|
|
7623
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7304
7624
|
"main",
|
|
7305
7625
|
{
|
|
7306
7626
|
role: "main",
|
|
7307
7627
|
"aria-labelledby": "error-title",
|
|
7308
7628
|
"aria-describedby": "error-description",
|
|
7309
7629
|
className: "flex flex-col items-center text-center max-w-md space-y-6",
|
|
7310
|
-
children: /* @__PURE__ */ (0,
|
|
7311
|
-
/* @__PURE__ */ (0,
|
|
7630
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("section", { "aria-label": `Erro ${errorCode}`, children: [
|
|
7631
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7312
7632
|
"div",
|
|
7313
7633
|
{
|
|
7314
7634
|
className: "text-8xl font-bold text-primary-300 select-none",
|
|
@@ -7316,8 +7636,8 @@ var NotFound = ({
|
|
|
7316
7636
|
children: errorCode
|
|
7317
7637
|
}
|
|
7318
7638
|
),
|
|
7319
|
-
/* @__PURE__ */ (0,
|
|
7320
|
-
/* @__PURE__ */ (0,
|
|
7639
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("header", { className: "space-y-2", children: [
|
|
7640
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7321
7641
|
Text_default,
|
|
7322
7642
|
{
|
|
7323
7643
|
size: "xl",
|
|
@@ -7328,9 +7648,9 @@ var NotFound = ({
|
|
|
7328
7648
|
children: errorTitle
|
|
7329
7649
|
}
|
|
7330
7650
|
),
|
|
7331
|
-
/* @__PURE__ */ (0,
|
|
7651
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text_default, { size: "md", className: "text-text-600", id: "error-description", children: errorDescription })
|
|
7332
7652
|
] }),
|
|
7333
|
-
onButtonClick && /* @__PURE__ */ (0,
|
|
7653
|
+
onButtonClick && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("nav", { "aria-label": "Navega\xE7\xE3o de erro", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7334
7654
|
Button_default,
|
|
7335
7655
|
{
|
|
7336
7656
|
onClick: handleButtonClick,
|
|
@@ -7353,8 +7673,8 @@ var NotFound_default = NotFound;
|
|
|
7353
7673
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
7354
7674
|
var import_react25 = require("react");
|
|
7355
7675
|
var import_react_dom = require("react-dom");
|
|
7356
|
-
var
|
|
7357
|
-
var
|
|
7676
|
+
var import_phosphor_react20 = require("phosphor-react");
|
|
7677
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
7358
7678
|
var CONTROLS_HIDE_TIMEOUT = 3e3;
|
|
7359
7679
|
var LEAVE_HIDE_TIMEOUT = 1e3;
|
|
7360
7680
|
var INIT_DELAY = 100;
|
|
@@ -7369,7 +7689,7 @@ var ProgressBar2 = ({
|
|
|
7369
7689
|
duration,
|
|
7370
7690
|
progressPercentage,
|
|
7371
7691
|
onSeek
|
|
7372
|
-
}) => /* @__PURE__ */ (0,
|
|
7692
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "px-4 pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7373
7693
|
"input",
|
|
7374
7694
|
{
|
|
7375
7695
|
type: "range",
|
|
@@ -7389,17 +7709,17 @@ var VolumeControls = ({
|
|
|
7389
7709
|
isMuted,
|
|
7390
7710
|
onVolumeChange,
|
|
7391
7711
|
onToggleMute
|
|
7392
|
-
}) => /* @__PURE__ */ (0,
|
|
7393
|
-
/* @__PURE__ */ (0,
|
|
7712
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
7713
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7394
7714
|
IconButton_default,
|
|
7395
7715
|
{
|
|
7396
|
-
icon: isMuted ? /* @__PURE__ */ (0,
|
|
7716
|
+
icon: isMuted ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.SpeakerSlash, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.SpeakerHigh, { size: 24 }),
|
|
7397
7717
|
onClick: onToggleMute,
|
|
7398
7718
|
"aria-label": isMuted ? "Unmute" : "Mute",
|
|
7399
7719
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
7400
7720
|
}
|
|
7401
7721
|
),
|
|
7402
|
-
/* @__PURE__ */ (0,
|
|
7722
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7403
7723
|
"input",
|
|
7404
7724
|
{
|
|
7405
7725
|
type: "range",
|
|
@@ -7423,6 +7743,8 @@ var SpeedMenu = ({
|
|
|
7423
7743
|
isFullscreen
|
|
7424
7744
|
}) => {
|
|
7425
7745
|
const buttonRef = (0, import_react25.useRef)(null);
|
|
7746
|
+
const speedMenuContainerRef = (0, import_react25.useRef)(null);
|
|
7747
|
+
const speedMenuRef = (0, import_react25.useRef)(null);
|
|
7426
7748
|
const getMenuPosition = () => {
|
|
7427
7749
|
if (!buttonRef.current) return { top: 0, left: 0 };
|
|
7428
7750
|
const rect = buttonRef.current.getBoundingClientRect();
|
|
@@ -7433,9 +7755,26 @@ var SpeedMenu = ({
|
|
|
7433
7755
|
};
|
|
7434
7756
|
};
|
|
7435
7757
|
const position = getMenuPosition();
|
|
7436
|
-
|
|
7758
|
+
(0, import_react25.useEffect)(() => {
|
|
7759
|
+
const handleClickOutside = (event) => {
|
|
7760
|
+
const target = event.target;
|
|
7761
|
+
const isOutsideContainer = speedMenuContainerRef.current && !speedMenuContainerRef.current.contains(target);
|
|
7762
|
+
const isOutsideMenu = speedMenuRef.current && !speedMenuRef.current.contains(target);
|
|
7763
|
+
if (isOutsideContainer && isOutsideMenu) {
|
|
7764
|
+
onToggleMenu();
|
|
7765
|
+
}
|
|
7766
|
+
};
|
|
7767
|
+
if (showSpeedMenu) {
|
|
7768
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
7769
|
+
}
|
|
7770
|
+
return () => {
|
|
7771
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
7772
|
+
};
|
|
7773
|
+
}, [showSpeedMenu, onToggleMenu]);
|
|
7774
|
+
const menuContent = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7437
7775
|
"div",
|
|
7438
7776
|
{
|
|
7777
|
+
ref: speedMenuRef,
|
|
7439
7778
|
role: "menu",
|
|
7440
7779
|
"aria-label": "Playback speed",
|
|
7441
7780
|
className: isFullscreen ? "absolute bottom-12 right-0 bg-black/90 rounded-lg p-2 min-w-20 z-[9999]" : "fixed bg-black/90 rounded-lg p-2 min-w-20 z-[9999]",
|
|
@@ -7443,7 +7782,7 @@ var SpeedMenu = ({
|
|
|
7443
7782
|
top: `${position.top}px`,
|
|
7444
7783
|
left: `${position.left}px`
|
|
7445
7784
|
} : void 0,
|
|
7446
|
-
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */ (0,
|
|
7785
|
+
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
7447
7786
|
"button",
|
|
7448
7787
|
{
|
|
7449
7788
|
role: "menuitemradio",
|
|
@@ -7460,12 +7799,12 @@ var SpeedMenu = ({
|
|
|
7460
7799
|
}
|
|
7461
7800
|
);
|
|
7462
7801
|
const portalContent = typeof window !== "undefined" && typeof document !== "undefined" ? (0, import_react_dom.createPortal)(menuContent, document.body) : null;
|
|
7463
|
-
return /* @__PURE__ */ (0,
|
|
7464
|
-
/* @__PURE__ */ (0,
|
|
7802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "relative", ref: speedMenuContainerRef, children: [
|
|
7803
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7465
7804
|
IconButton_default,
|
|
7466
7805
|
{
|
|
7467
7806
|
ref: buttonRef,
|
|
7468
|
-
icon: /* @__PURE__ */ (0,
|
|
7807
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.DotsThreeVertical, { size: 24 }),
|
|
7469
7808
|
onClick: onToggleMenu,
|
|
7470
7809
|
"aria-label": "Playback speed",
|
|
7471
7810
|
"aria-haspopup": "menu",
|
|
@@ -7860,9 +8199,9 @@ var VideoPlayer = ({
|
|
|
7860
8199
|
toggleFullscreen
|
|
7861
8200
|
]
|
|
7862
8201
|
);
|
|
7863
|
-
return /* @__PURE__ */ (0,
|
|
7864
|
-
(title || subtitleText) && /* @__PURE__ */ (0,
|
|
7865
|
-
title && /* @__PURE__ */ (0,
|
|
8202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: cn("flex flex-col", className), children: [
|
|
8203
|
+
(title || subtitleText) && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "bg-subject-1 px-8 py-4 flex items-end justify-between min-h-20", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
8204
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7866
8205
|
Text_default,
|
|
7867
8206
|
{
|
|
7868
8207
|
as: "h2",
|
|
@@ -7873,7 +8212,7 @@ var VideoPlayer = ({
|
|
|
7873
8212
|
children: title
|
|
7874
8213
|
}
|
|
7875
8214
|
),
|
|
7876
|
-
subtitleText && /* @__PURE__ */ (0,
|
|
8215
|
+
subtitleText && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7877
8216
|
Text_default,
|
|
7878
8217
|
{
|
|
7879
8218
|
as: "p",
|
|
@@ -7885,7 +8224,7 @@ var VideoPlayer = ({
|
|
|
7885
8224
|
}
|
|
7886
8225
|
)
|
|
7887
8226
|
] }) }),
|
|
7888
|
-
/* @__PURE__ */ (0,
|
|
8227
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
7889
8228
|
"section",
|
|
7890
8229
|
{
|
|
7891
8230
|
className: cn(
|
|
@@ -7900,7 +8239,7 @@ var VideoPlayer = ({
|
|
|
7900
8239
|
onTouchStart: handleMouseEnter,
|
|
7901
8240
|
onMouseLeave: handleMouseLeave,
|
|
7902
8241
|
children: [
|
|
7903
|
-
/* @__PURE__ */ (0,
|
|
8242
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7904
8243
|
"video",
|
|
7905
8244
|
{
|
|
7906
8245
|
ref: videoRef,
|
|
@@ -7914,7 +8253,7 @@ var VideoPlayer = ({
|
|
|
7914
8253
|
onKeyDown: handleVideoKeyDown,
|
|
7915
8254
|
tabIndex: 0,
|
|
7916
8255
|
"aria-label": title ? `Video: ${title}` : "Video player",
|
|
7917
|
-
children: /* @__PURE__ */ (0,
|
|
8256
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7918
8257
|
"track",
|
|
7919
8258
|
{
|
|
7920
8259
|
ref: trackRef,
|
|
@@ -7927,26 +8266,26 @@ var VideoPlayer = ({
|
|
|
7927
8266
|
)
|
|
7928
8267
|
}
|
|
7929
8268
|
),
|
|
7930
|
-
!isPlaying && /* @__PURE__ */ (0,
|
|
8269
|
+
!isPlaying && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "absolute inset-0 flex items-center justify-center bg-black/30 transition-opacity", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7931
8270
|
IconButton_default,
|
|
7932
8271
|
{
|
|
7933
|
-
icon: /* @__PURE__ */ (0,
|
|
8272
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.Play, { size: 32, weight: "regular", className: "ml-1" }),
|
|
7934
8273
|
onClick: togglePlayPause,
|
|
7935
8274
|
"aria-label": "Play video",
|
|
7936
8275
|
className: "!bg-transparent !text-white !w-auto !h-auto hover:!bg-transparent hover:!text-gray-200"
|
|
7937
8276
|
}
|
|
7938
8277
|
) }),
|
|
7939
|
-
/* @__PURE__ */ (0,
|
|
8278
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7940
8279
|
"div",
|
|
7941
8280
|
{
|
|
7942
8281
|
className: cn(
|
|
7943
8282
|
"absolute top-0 left-0 right-0 p-4 bg-gradient-to-b from-black/70 to-transparent transition-opacity",
|
|
7944
8283
|
getTopControlsOpacity()
|
|
7945
8284
|
),
|
|
7946
|
-
children: /* @__PURE__ */ (0,
|
|
8285
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7947
8286
|
IconButton_default,
|
|
7948
8287
|
{
|
|
7949
|
-
icon: isFullscreen ? /* @__PURE__ */ (0,
|
|
8288
|
+
icon: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.ArrowsInSimple, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.ArrowsOutSimple, { size: 24 }),
|
|
7950
8289
|
onClick: toggleFullscreen,
|
|
7951
8290
|
"aria-label": isFullscreen ? "Exit fullscreen" : "Enter fullscreen",
|
|
7952
8291
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
@@ -7954,7 +8293,7 @@ var VideoPlayer = ({
|
|
|
7954
8293
|
) })
|
|
7955
8294
|
}
|
|
7956
8295
|
),
|
|
7957
|
-
/* @__PURE__ */ (0,
|
|
8296
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
7958
8297
|
"div",
|
|
7959
8298
|
{
|
|
7960
8299
|
className: cn(
|
|
@@ -7962,7 +8301,7 @@ var VideoPlayer = ({
|
|
|
7962
8301
|
getBottomControlsOpacity()
|
|
7963
8302
|
),
|
|
7964
8303
|
children: [
|
|
7965
|
-
/* @__PURE__ */ (0,
|
|
8304
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7966
8305
|
ProgressBar2,
|
|
7967
8306
|
{
|
|
7968
8307
|
currentTime,
|
|
@@ -7971,18 +8310,18 @@ var VideoPlayer = ({
|
|
|
7971
8310
|
onSeek: handleSeek
|
|
7972
8311
|
}
|
|
7973
8312
|
),
|
|
7974
|
-
/* @__PURE__ */ (0,
|
|
7975
|
-
/* @__PURE__ */ (0,
|
|
7976
|
-
/* @__PURE__ */ (0,
|
|
8313
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-center justify-between px-4 pb-4", children: [
|
|
8314
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
8315
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7977
8316
|
IconButton_default,
|
|
7978
8317
|
{
|
|
7979
|
-
icon: isPlaying ? /* @__PURE__ */ (0,
|
|
8318
|
+
icon: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.Pause, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.Play, { size: 24 }),
|
|
7980
8319
|
onClick: togglePlayPause,
|
|
7981
8320
|
"aria-label": isPlaying ? "Pause" : "Play",
|
|
7982
8321
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
7983
8322
|
}
|
|
7984
8323
|
),
|
|
7985
|
-
/* @__PURE__ */ (0,
|
|
8324
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7986
8325
|
VolumeControls,
|
|
7987
8326
|
{
|
|
7988
8327
|
volume,
|
|
@@ -7991,10 +8330,10 @@ var VideoPlayer = ({
|
|
|
7991
8330
|
onToggleMute: toggleMute
|
|
7992
8331
|
}
|
|
7993
8332
|
),
|
|
7994
|
-
subtitles && /* @__PURE__ */ (0,
|
|
8333
|
+
subtitles && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7995
8334
|
IconButton_default,
|
|
7996
8335
|
{
|
|
7997
|
-
icon: /* @__PURE__ */ (0,
|
|
8336
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react20.ClosedCaptioning, { size: 24 }),
|
|
7998
8337
|
onClick: toggleCaptions,
|
|
7999
8338
|
"aria-label": showCaptions ? "Hide captions" : "Show captions",
|
|
8000
8339
|
className: cn(
|
|
@@ -8003,13 +8342,13 @@ var VideoPlayer = ({
|
|
|
8003
8342
|
)
|
|
8004
8343
|
}
|
|
8005
8344
|
),
|
|
8006
|
-
/* @__PURE__ */ (0,
|
|
8345
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text_default, { size: "sm", weight: "medium", color: "text-white", children: [
|
|
8007
8346
|
formatTime(currentTime),
|
|
8008
8347
|
" / ",
|
|
8009
8348
|
formatTime(duration)
|
|
8010
8349
|
] })
|
|
8011
8350
|
] }),
|
|
8012
|
-
/* @__PURE__ */ (0,
|
|
8351
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8013
8352
|
SpeedMenu,
|
|
8014
8353
|
{
|
|
8015
8354
|
showSpeedMenu,
|
|
@@ -8032,8 +8371,8 @@ var VideoPlayer_default = VideoPlayer;
|
|
|
8032
8371
|
|
|
8033
8372
|
// src/components/Whiteboard/Whiteboard.tsx
|
|
8034
8373
|
var import_react26 = require("react");
|
|
8035
|
-
var
|
|
8036
|
-
var
|
|
8374
|
+
var import_phosphor_react21 = require("phosphor-react");
|
|
8375
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
8037
8376
|
var IMAGE_WIDTH = 225;
|
|
8038
8377
|
var IMAGE_HEIGHT = 90;
|
|
8039
8378
|
var Whiteboard = ({
|
|
@@ -8071,7 +8410,7 @@ var Whiteboard = ({
|
|
|
8071
8410
|
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
|
|
8072
8411
|
}[imagesPerRow];
|
|
8073
8412
|
if (!images || images.length === 0) {
|
|
8074
|
-
return /* @__PURE__ */ (0,
|
|
8413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8075
8414
|
"div",
|
|
8076
8415
|
{
|
|
8077
8416
|
className: cn(
|
|
@@ -8079,11 +8418,11 @@ var Whiteboard = ({
|
|
|
8079
8418
|
className
|
|
8080
8419
|
),
|
|
8081
8420
|
...rest,
|
|
8082
|
-
children: /* @__PURE__ */ (0,
|
|
8421
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-gray-400 text-sm", children: "Nenhuma imagem dispon\xEDvel" })
|
|
8083
8422
|
}
|
|
8084
8423
|
);
|
|
8085
8424
|
}
|
|
8086
|
-
return /* @__PURE__ */ (0,
|
|
8425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8087
8426
|
"div",
|
|
8088
8427
|
{
|
|
8089
8428
|
className: cn(
|
|
@@ -8091,7 +8430,7 @@ var Whiteboard = ({
|
|
|
8091
8430
|
className
|
|
8092
8431
|
),
|
|
8093
8432
|
...rest,
|
|
8094
|
-
children: /* @__PURE__ */ (0,
|
|
8433
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: cn("grid gap-4", gridColsClass), children: images.map((image) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
8095
8434
|
"div",
|
|
8096
8435
|
{
|
|
8097
8436
|
className: "relative group overflow-hidden bg-gray-100 rounded-lg",
|
|
@@ -8099,7 +8438,7 @@ var Whiteboard = ({
|
|
|
8099
8438
|
width: `${IMAGE_WIDTH}px`
|
|
8100
8439
|
},
|
|
8101
8440
|
children: [
|
|
8102
|
-
/* @__PURE__ */ (0,
|
|
8441
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8103
8442
|
"div",
|
|
8104
8443
|
{
|
|
8105
8444
|
className: "relative",
|
|
@@ -8107,8 +8446,8 @@ var Whiteboard = ({
|
|
|
8107
8446
|
width: `${IMAGE_WIDTH}px`,
|
|
8108
8447
|
height: `${IMAGE_HEIGHT}px`
|
|
8109
8448
|
},
|
|
8110
|
-
children: imageErrors.has(image.id) ? /* @__PURE__ */ (0,
|
|
8111
|
-
/* @__PURE__ */ (0,
|
|
8449
|
+
children: imageErrors.has(image.id) ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "absolute inset-0 flex items-center justify-center bg-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-gray-500 text-sm text-center px-2", children: "Imagem indispon\xEDvel" }) }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
|
8450
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8112
8451
|
"img",
|
|
8113
8452
|
{
|
|
8114
8453
|
src: image.imageUrl,
|
|
@@ -8118,19 +8457,19 @@ var Whiteboard = ({
|
|
|
8118
8457
|
onError: () => handleImageError(image.id)
|
|
8119
8458
|
}
|
|
8120
8459
|
),
|
|
8121
|
-
/* @__PURE__ */ (0,
|
|
8460
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "absolute inset-0 bg-gradient-to-t from-black/20 to-transparent" })
|
|
8122
8461
|
] })
|
|
8123
8462
|
}
|
|
8124
8463
|
),
|
|
8125
|
-
showDownload && /* @__PURE__ */ (0,
|
|
8464
|
+
showDownload && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8126
8465
|
"button",
|
|
8127
8466
|
{
|
|
8128
8467
|
type: "button",
|
|
8129
8468
|
onClick: () => handleDownload(image),
|
|
8130
8469
|
className: "cursor-pointer absolute bottom-3 right-3 flex items-center justify-center bg-black/20 backdrop-blur-sm rounded hover:bg-black/30 transition-colors duration-200 group/button w-6 h-6",
|
|
8131
8470
|
"aria-label": `Download ${image.title || "imagem"}`,
|
|
8132
|
-
children: /* @__PURE__ */ (0,
|
|
8133
|
-
|
|
8471
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8472
|
+
import_phosphor_react21.ArrowsOut,
|
|
8134
8473
|
{
|
|
8135
8474
|
size: 24,
|
|
8136
8475
|
weight: "regular",
|
|
@@ -8151,7 +8490,7 @@ var Whiteboard_default = Whiteboard;
|
|
|
8151
8490
|
// src/components/Auth/Auth.tsx
|
|
8152
8491
|
var import_react27 = require("react");
|
|
8153
8492
|
var import_react_router_dom = require("react-router-dom");
|
|
8154
|
-
var
|
|
8493
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
8155
8494
|
var AuthContext = (0, import_react27.createContext)(void 0);
|
|
8156
8495
|
var AuthProvider = ({
|
|
8157
8496
|
children,
|
|
@@ -8221,7 +8560,7 @@ var AuthProvider = ({
|
|
|
8221
8560
|
}),
|
|
8222
8561
|
[authState, checkAuth, signOut]
|
|
8223
8562
|
);
|
|
8224
|
-
return /* @__PURE__ */ (0,
|
|
8563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(AuthContext.Provider, { value: contextValue, children });
|
|
8225
8564
|
};
|
|
8226
8565
|
var useAuth = () => {
|
|
8227
8566
|
const context = (0, import_react27.useContext)(AuthContext);
|
|
@@ -8237,9 +8576,9 @@ var ProtectedRoute = ({
|
|
|
8237
8576
|
additionalCheck
|
|
8238
8577
|
}) => {
|
|
8239
8578
|
const { isAuthenticated, isLoading, ...authState } = useAuth();
|
|
8240
|
-
const defaultLoadingComponent = /* @__PURE__ */ (0,
|
|
8579
|
+
const defaultLoadingComponent = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
8241
8580
|
if (isLoading) {
|
|
8242
|
-
return /* @__PURE__ */ (0,
|
|
8581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, { children: loadingComponent || defaultLoadingComponent });
|
|
8243
8582
|
}
|
|
8244
8583
|
if (!isAuthenticated) {
|
|
8245
8584
|
if (typeof window !== "undefined") {
|
|
@@ -8250,12 +8589,12 @@ var ProtectedRoute = ({
|
|
|
8250
8589
|
return null;
|
|
8251
8590
|
}
|
|
8252
8591
|
}
|
|
8253
|
-
return /* @__PURE__ */ (0,
|
|
8592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
8254
8593
|
}
|
|
8255
8594
|
if (additionalCheck && !additionalCheck({ isAuthenticated, isLoading, ...authState })) {
|
|
8256
|
-
return /* @__PURE__ */ (0,
|
|
8595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
8257
8596
|
}
|
|
8258
|
-
return /* @__PURE__ */ (0,
|
|
8597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, { children });
|
|
8259
8598
|
};
|
|
8260
8599
|
var PublicRoute = ({
|
|
8261
8600
|
children,
|
|
@@ -8265,15 +8604,15 @@ var PublicRoute = ({
|
|
|
8265
8604
|
}) => {
|
|
8266
8605
|
const { isAuthenticated, isLoading } = useAuth();
|
|
8267
8606
|
if (checkAuthBeforeRender && isLoading) {
|
|
8268
|
-
return /* @__PURE__ */ (0,
|
|
8607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
8269
8608
|
}
|
|
8270
8609
|
if (isAuthenticated && redirectIfAuthenticated) {
|
|
8271
|
-
return /* @__PURE__ */ (0,
|
|
8610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
8272
8611
|
}
|
|
8273
|
-
return /* @__PURE__ */ (0,
|
|
8612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, { children });
|
|
8274
8613
|
};
|
|
8275
8614
|
var withAuth = (Component, options = {}) => {
|
|
8276
|
-
return (props) => /* @__PURE__ */ (0,
|
|
8615
|
+
return (props) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ProtectedRoute, { ...options, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Component, { ...props }) });
|
|
8277
8616
|
};
|
|
8278
8617
|
var useAuthGuard = (options = {}) => {
|
|
8279
8618
|
const authState = useAuth();
|
|
@@ -8288,7 +8627,7 @@ var useAuthGuard = (options = {}) => {
|
|
|
8288
8627
|
var useRouteAuth = (fallbackPath = "/") => {
|
|
8289
8628
|
const { isAuthenticated, isLoading } = useAuth();
|
|
8290
8629
|
const location = (0, import_react_router_dom.useLocation)();
|
|
8291
|
-
const redirectToLogin = () => /* @__PURE__ */ (0,
|
|
8630
|
+
const redirectToLogin = () => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_router_dom.Navigate, { to: fallbackPath, state: { from: location }, replace: true });
|
|
8292
8631
|
return {
|
|
8293
8632
|
isAuthenticated,
|
|
8294
8633
|
isLoading,
|
|
@@ -8495,7 +8834,7 @@ function useApiConfig(api) {
|
|
|
8495
8834
|
}
|
|
8496
8835
|
|
|
8497
8836
|
// src/components/Quiz/Quiz.tsx
|
|
8498
|
-
var
|
|
8837
|
+
var import_phosphor_react22 = require("phosphor-react");
|
|
8499
8838
|
var import_react30 = require("react");
|
|
8500
8839
|
|
|
8501
8840
|
// src/components/Quiz/useQuizStore.ts
|
|
@@ -9132,13 +9471,13 @@ var useQuizStore = (0, import_zustand7.create)()(
|
|
|
9132
9471
|
var mock_image_question_default = "./mock-image-question-HEZCLFDL.png";
|
|
9133
9472
|
|
|
9134
9473
|
// src/components/Quiz/Quiz.tsx
|
|
9135
|
-
var
|
|
9474
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
9136
9475
|
var getStatusBadge = (status) => {
|
|
9137
9476
|
switch (status) {
|
|
9138
9477
|
case "correct":
|
|
9139
|
-
return /* @__PURE__ */ (0,
|
|
9478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.CheckCircle, {}), children: "Resposta correta" });
|
|
9140
9479
|
case "incorrect":
|
|
9141
|
-
return /* @__PURE__ */ (0,
|
|
9480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.XCircle, {}), children: "Resposta incorreta" });
|
|
9142
9481
|
default:
|
|
9143
9482
|
return null;
|
|
9144
9483
|
}
|
|
@@ -9156,7 +9495,7 @@ var Quiz = (0, import_react30.forwardRef)(({ children, className, variant = "def
|
|
|
9156
9495
|
(0, import_react30.useEffect)(() => {
|
|
9157
9496
|
setVariant(variant);
|
|
9158
9497
|
}, [variant, setVariant]);
|
|
9159
|
-
return /* @__PURE__ */ (0,
|
|
9498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children });
|
|
9160
9499
|
});
|
|
9161
9500
|
var QuizHeaderResult = (0, import_react30.forwardRef)(
|
|
9162
9501
|
({ className, ...props }, ref) => {
|
|
@@ -9197,7 +9536,7 @@ var QuizHeaderResult = (0, import_react30.forwardRef)(
|
|
|
9197
9536
|
return "N\xE3o foi dessa vez...voc\xEA deixou a resposta em branco";
|
|
9198
9537
|
}
|
|
9199
9538
|
};
|
|
9200
|
-
return /* @__PURE__ */ (0,
|
|
9539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
9201
9540
|
"div",
|
|
9202
9541
|
{
|
|
9203
9542
|
ref,
|
|
@@ -9208,8 +9547,8 @@ var QuizHeaderResult = (0, import_react30.forwardRef)(
|
|
|
9208
9547
|
),
|
|
9209
9548
|
...props,
|
|
9210
9549
|
children: [
|
|
9211
|
-
/* @__PURE__ */ (0,
|
|
9212
|
-
/* @__PURE__ */ (0,
|
|
9550
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
|
|
9551
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-700 text-md", children: getLabelByAnswersStatus() })
|
|
9213
9552
|
]
|
|
9214
9553
|
}
|
|
9215
9554
|
);
|
|
@@ -9242,8 +9581,8 @@ var QuizTitle = (0, import_react30.forwardRef)(
|
|
|
9242
9581
|
const handleCancelExit = () => {
|
|
9243
9582
|
setShowExitConfirmation(false);
|
|
9244
9583
|
};
|
|
9245
|
-
return /* @__PURE__ */ (0,
|
|
9246
|
-
/* @__PURE__ */ (0,
|
|
9584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
9585
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
9247
9586
|
"div",
|
|
9248
9587
|
{
|
|
9249
9588
|
ref,
|
|
@@ -9253,24 +9592,24 @@ var QuizTitle = (0, import_react30.forwardRef)(
|
|
|
9253
9592
|
),
|
|
9254
9593
|
...props,
|
|
9255
9594
|
children: [
|
|
9256
|
-
/* @__PURE__ */ (0,
|
|
9595
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9257
9596
|
IconButton_default,
|
|
9258
9597
|
{
|
|
9259
|
-
icon: /* @__PURE__ */ (0,
|
|
9598
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.CaretLeft, { size: 24 }),
|
|
9260
9599
|
size: "md",
|
|
9261
9600
|
"aria-label": "Voltar",
|
|
9262
9601
|
onClick: handleBackClick
|
|
9263
9602
|
}
|
|
9264
9603
|
),
|
|
9265
|
-
/* @__PURE__ */ (0,
|
|
9266
|
-
/* @__PURE__ */ (0,
|
|
9267
|
-
/* @__PURE__ */ (0,
|
|
9604
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
9605
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
9606
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
9268
9607
|
] }),
|
|
9269
|
-
/* @__PURE__ */ (0,
|
|
9608
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.Clock, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
|
|
9270
9609
|
]
|
|
9271
9610
|
}
|
|
9272
9611
|
),
|
|
9273
|
-
/* @__PURE__ */ (0,
|
|
9612
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9274
9613
|
AlertDialog,
|
|
9275
9614
|
{
|
|
9276
9615
|
isOpen: showExitConfirmation,
|
|
@@ -9288,13 +9627,13 @@ var QuizTitle = (0, import_react30.forwardRef)(
|
|
|
9288
9627
|
);
|
|
9289
9628
|
var QuizSubTitle = (0, import_react30.forwardRef)(
|
|
9290
9629
|
({ subTitle, ...props }, ref) => {
|
|
9291
|
-
return /* @__PURE__ */ (0,
|
|
9630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
|
|
9292
9631
|
}
|
|
9293
9632
|
);
|
|
9294
9633
|
var QuizHeader = () => {
|
|
9295
9634
|
const { getCurrentQuestion, currentQuestionIndex } = useQuizStore();
|
|
9296
9635
|
const currentQuestion = getCurrentQuestion();
|
|
9297
|
-
return /* @__PURE__ */ (0,
|
|
9636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9298
9637
|
HeaderAlternative,
|
|
9299
9638
|
{
|
|
9300
9639
|
title: currentQuestion ? `Quest\xE3o ${currentQuestionIndex + 1}` : "Quest\xE3o",
|
|
@@ -9304,7 +9643,7 @@ var QuizHeader = () => {
|
|
|
9304
9643
|
);
|
|
9305
9644
|
};
|
|
9306
9645
|
var QuizContainer = (0, import_react30.forwardRef)(({ children, className, ...props }, ref) => {
|
|
9307
|
-
return /* @__PURE__ */ (0,
|
|
9646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9308
9647
|
"div",
|
|
9309
9648
|
{
|
|
9310
9649
|
ref,
|
|
@@ -9330,7 +9669,7 @@ var QuizContent = (0, import_react30.forwardRef)(({ paddingBottom }) => {
|
|
|
9330
9669
|
["IMAGEM" /* IMAGEM */]: QuizImageQuestion
|
|
9331
9670
|
};
|
|
9332
9671
|
const QuestionComponent = currentQuestion ? questionComponents[currentQuestion.questionType] : null;
|
|
9333
|
-
return QuestionComponent ? /* @__PURE__ */ (0,
|
|
9672
|
+
return QuestionComponent ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuestionComponent, { paddingBottom }) : null;
|
|
9334
9673
|
});
|
|
9335
9674
|
var QuizAlternative = ({ paddingBottom }) => {
|
|
9336
9675
|
const {
|
|
@@ -9367,10 +9706,10 @@ var QuizAlternative = ({ paddingBottom }) => {
|
|
|
9367
9706
|
};
|
|
9368
9707
|
});
|
|
9369
9708
|
if (!alternatives)
|
|
9370
|
-
return /* @__PURE__ */ (0,
|
|
9371
|
-
return /* @__PURE__ */ (0,
|
|
9372
|
-
/* @__PURE__ */ (0,
|
|
9373
|
-
/* @__PURE__ */ (0,
|
|
9709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { children: "N\xE3o h\xE1 Alternativas" }) });
|
|
9710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
9711
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
9712
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9374
9713
|
AlternativesList,
|
|
9375
9714
|
{
|
|
9376
9715
|
mode: variant === "default" ? "interactive" : "readonly",
|
|
@@ -9468,10 +9807,10 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
9468
9807
|
};
|
|
9469
9808
|
});
|
|
9470
9809
|
if (!choices)
|
|
9471
|
-
return /* @__PURE__ */ (0,
|
|
9472
|
-
return /* @__PURE__ */ (0,
|
|
9473
|
-
/* @__PURE__ */ (0,
|
|
9474
|
-
/* @__PURE__ */ (0,
|
|
9810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { children: "N\xE3o h\xE1 Escolhas Multiplas" }) });
|
|
9811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
9812
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
9813
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9475
9814
|
MultipleChoiceList,
|
|
9476
9815
|
{
|
|
9477
9816
|
choices,
|
|
@@ -9517,12 +9856,12 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
9517
9856
|
adjustTextareaHeight();
|
|
9518
9857
|
}, [currentAnswer, adjustTextareaHeight]);
|
|
9519
9858
|
if (!currentQuestion) {
|
|
9520
|
-
return /* @__PURE__ */ (0,
|
|
9859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-600 text-md", children: "Nenhuma quest\xE3o dispon\xEDvel" }) });
|
|
9521
9860
|
}
|
|
9522
9861
|
const localAnswer = (variant == "result" ? currentQuestionResult?.answer : currentAnswer?.answer) || "";
|
|
9523
|
-
return /* @__PURE__ */ (0,
|
|
9524
|
-
/* @__PURE__ */ (0,
|
|
9525
|
-
/* @__PURE__ */ (0,
|
|
9862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
9863
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizSubTitle, { subTitle: "Resposta" }),
|
|
9864
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizContainer, { className: cn(variant != "result" && paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "space-y-4 max-h-[600px] overflow-y-auto", children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9526
9865
|
TextArea_default,
|
|
9527
9866
|
{
|
|
9528
9867
|
ref: textareaRef,
|
|
@@ -9532,10 +9871,10 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
9532
9871
|
rows: 4,
|
|
9533
9872
|
className: "min-h-[120px] max-h-[400px] resize-none overflow-y-auto"
|
|
9534
9873
|
}
|
|
9535
|
-
) }) : /* @__PURE__ */ (0,
|
|
9536
|
-
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ (0,
|
|
9537
|
-
/* @__PURE__ */ (0,
|
|
9538
|
-
/* @__PURE__ */ (0,
|
|
9874
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: localAnswer || "Nenhuma resposta fornecida" }) }) }) }),
|
|
9875
|
+
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
9876
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizSubTitle, { subTitle: "Observa\xE7\xE3o do professor" }),
|
|
9877
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Mauris euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim." }) })
|
|
9539
9878
|
] })
|
|
9540
9879
|
] });
|
|
9541
9880
|
};
|
|
@@ -9561,16 +9900,16 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
9561
9900
|
];
|
|
9562
9901
|
const getLetterByIndex = (index) => String.fromCharCode(97 + index);
|
|
9563
9902
|
const isDefaultVariant = variant == "default";
|
|
9564
|
-
return /* @__PURE__ */ (0,
|
|
9565
|
-
/* @__PURE__ */ (0,
|
|
9566
|
-
/* @__PURE__ */ (0,
|
|
9903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
9904
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
9905
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
9567
9906
|
const variantCorrect = option.isCorrect ? "correct" : "incorrect";
|
|
9568
|
-
return /* @__PURE__ */ (0,
|
|
9907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
9569
9908
|
"section",
|
|
9570
9909
|
{
|
|
9571
9910
|
className: "flex flex-col gap-2",
|
|
9572
9911
|
children: [
|
|
9573
|
-
/* @__PURE__ */ (0,
|
|
9912
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
9574
9913
|
"div",
|
|
9575
9914
|
{
|
|
9576
9915
|
className: cn(
|
|
@@ -9578,20 +9917,20 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
9578
9917
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
9579
9918
|
),
|
|
9580
9919
|
children: [
|
|
9581
|
-
/* @__PURE__ */ (0,
|
|
9582
|
-
isDefaultVariant ? /* @__PURE__ */ (0,
|
|
9583
|
-
/* @__PURE__ */ (0,
|
|
9584
|
-
/* @__PURE__ */ (0,
|
|
9585
|
-
/* @__PURE__ */ (0,
|
|
9586
|
-
/* @__PURE__ */ (0,
|
|
9920
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index).concat(") ").concat(option.label) }),
|
|
9921
|
+
isDefaultVariant ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Select_default, { size: "medium", children: [
|
|
9922
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectValue, { placeholder: "Selecione opc\xE3o" }) }),
|
|
9923
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(SelectContent, { children: [
|
|
9924
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectItem, { value: "V", children: "Verdadeiro" }),
|
|
9925
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectItem, { value: "F", children: "Falso" })
|
|
9587
9926
|
] })
|
|
9588
|
-
] }) : /* @__PURE__ */ (0,
|
|
9927
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex-shrink-0", children: getStatusBadge(variantCorrect) })
|
|
9589
9928
|
]
|
|
9590
9929
|
}
|
|
9591
9930
|
),
|
|
9592
|
-
!isDefaultVariant && /* @__PURE__ */ (0,
|
|
9593
|
-
/* @__PURE__ */ (0,
|
|
9594
|
-
!option.isCorrect && /* @__PURE__ */ (0,
|
|
9931
|
+
!isDefaultVariant && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
9932
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-800 text-2xs", children: "Resposta selecionada: V" }),
|
|
9933
|
+
!option.isCorrect && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-800 text-2xs", children: "Resposta correta: F" })
|
|
9595
9934
|
] })
|
|
9596
9935
|
]
|
|
9597
9936
|
},
|
|
@@ -9681,13 +10020,13 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
9681
10020
|
const assignedDots = new Set(
|
|
9682
10021
|
userAnswers.map((a) => a.dotOption).filter(Boolean)
|
|
9683
10022
|
);
|
|
9684
|
-
return /* @__PURE__ */ (0,
|
|
9685
|
-
/* @__PURE__ */ (0,
|
|
9686
|
-
/* @__PURE__ */ (0,
|
|
10023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
10024
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
10025
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
9687
10026
|
const answer = userAnswers[index];
|
|
9688
10027
|
const variantCorrect = answer.isCorrect ? "correct" : "incorrect";
|
|
9689
|
-
return /* @__PURE__ */ (0,
|
|
9690
|
-
/* @__PURE__ */ (0,
|
|
10028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("section", { className: "flex flex-col gap-2", children: [
|
|
10029
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
9691
10030
|
"div",
|
|
9692
10031
|
{
|
|
9693
10032
|
className: cn(
|
|
@@ -9695,30 +10034,30 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
9695
10034
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
9696
10035
|
),
|
|
9697
10036
|
children: [
|
|
9698
|
-
/* @__PURE__ */ (0,
|
|
9699
|
-
isDefaultVariant ? /* @__PURE__ */ (0,
|
|
10037
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index) + ") " + option.label }),
|
|
10038
|
+
isDefaultVariant ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
9700
10039
|
Select_default,
|
|
9701
10040
|
{
|
|
9702
10041
|
size: "medium",
|
|
9703
10042
|
value: answer.dotOption || void 0,
|
|
9704
10043
|
onValueChange: (value) => handleSelectDot(index, value),
|
|
9705
10044
|
children: [
|
|
9706
|
-
/* @__PURE__ */ (0,
|
|
9707
|
-
/* @__PURE__ */ (0,
|
|
10045
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
10046
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectContent, { children: dotsOptions.filter(
|
|
9708
10047
|
(dot) => !assignedDots.has(dot.label) || answer.dotOption === dot.label
|
|
9709
|
-
).map((dot) => /* @__PURE__ */ (0,
|
|
10048
|
+
).map((dot) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectItem, { value: dot.label, children: dot.label }, dot.label)) })
|
|
9710
10049
|
]
|
|
9711
10050
|
}
|
|
9712
|
-
) : /* @__PURE__ */ (0,
|
|
10051
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex-shrink-0", children: answer.isCorrect === null ? null : getStatusBadge(variantCorrect) })
|
|
9713
10052
|
]
|
|
9714
10053
|
}
|
|
9715
10054
|
),
|
|
9716
|
-
!isDefaultVariant && /* @__PURE__ */ (0,
|
|
9717
|
-
/* @__PURE__ */ (0,
|
|
10055
|
+
!isDefaultVariant && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
10056
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("p", { className: "text-text-800 text-2xs", children: [
|
|
9718
10057
|
"Resposta selecionada: ",
|
|
9719
10058
|
answer.dotOption || "Nenhuma"
|
|
9720
10059
|
] }),
|
|
9721
|
-
!answer.isCorrect && /* @__PURE__ */ (0,
|
|
10060
|
+
!answer.isCorrect && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("p", { className: "text-text-800 text-2xs", children: [
|
|
9722
10061
|
"Resposta correta: ",
|
|
9723
10062
|
answer.correctOption
|
|
9724
10063
|
] })
|
|
@@ -9785,18 +10124,18 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
9785
10124
|
const mockAnswer = mockUserAnswers.find(
|
|
9786
10125
|
(answer) => answer.selectId === selectId
|
|
9787
10126
|
);
|
|
9788
|
-
return /* @__PURE__ */ (0,
|
|
10127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "inline-flex mb-2.5 text-success-600 font-semibold text-md border-b-2 border-success-600", children: mockAnswer?.correctAnswer });
|
|
9789
10128
|
};
|
|
9790
10129
|
const renderDefaultElement = (selectId, startIndex, selectedValue, availableOptionsForThisSelect) => {
|
|
9791
|
-
return /* @__PURE__ */ (0,
|
|
10130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
9792
10131
|
Select_default,
|
|
9793
10132
|
{
|
|
9794
10133
|
value: selectedValue,
|
|
9795
10134
|
onValueChange: (value) => handleSelectChange(selectId, value),
|
|
9796
10135
|
className: "inline-flex mb-2.5",
|
|
9797
10136
|
children: [
|
|
9798
|
-
/* @__PURE__ */ (0,
|
|
9799
|
-
/* @__PURE__ */ (0,
|
|
10137
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectTrigger, { className: "inline-flex w-auto min-w-[140px] h-8 mx-1 bg-white border-gray-300", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
10138
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectContent, { children: availableOptionsForThisSelect.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectItem, { value: option, children: option }, `${option}-${index}`)) })
|
|
9800
10139
|
]
|
|
9801
10140
|
},
|
|
9802
10141
|
`${selectId}-${startIndex}`
|
|
@@ -9808,8 +10147,8 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
9808
10147
|
);
|
|
9809
10148
|
if (!mockAnswer) return null;
|
|
9810
10149
|
const action = mockAnswer.isCorrect ? "success" : "error";
|
|
9811
|
-
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ (0,
|
|
9812
|
-
return /* @__PURE__ */ (0,
|
|
10150
|
+
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.CheckCircle, {}) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.XCircle, {});
|
|
10151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9813
10152
|
Badge_default,
|
|
9814
10153
|
{
|
|
9815
10154
|
variant: "solid",
|
|
@@ -9817,7 +10156,7 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
9817
10156
|
iconRight: icon,
|
|
9818
10157
|
size: "large",
|
|
9819
10158
|
className: "py-3 w-[180px] justify-between mb-2.5",
|
|
9820
|
-
children: /* @__PURE__ */ (0,
|
|
10159
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-text-900", children: mockAnswer.userAnswer })
|
|
9821
10160
|
},
|
|
9822
10161
|
selectId
|
|
9823
10162
|
);
|
|
@@ -9873,25 +10212,25 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
9873
10212
|
}
|
|
9874
10213
|
return elements;
|
|
9875
10214
|
};
|
|
9876
|
-
return /* @__PURE__ */ (0,
|
|
9877
|
-
/* @__PURE__ */ (0,
|
|
9878
|
-
/* @__PURE__ */ (0,
|
|
10215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
10216
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
10217
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "space-y-6 px-4 h-auto", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9879
10218
|
"div",
|
|
9880
10219
|
{
|
|
9881
10220
|
className: cn(
|
|
9882
10221
|
"text-lg text-text-900 leading-8 h-auto",
|
|
9883
10222
|
variant != "result" && paddingBottom
|
|
9884
10223
|
),
|
|
9885
|
-
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ (0,
|
|
10224
|
+
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { children: element.element }, element.id))
|
|
9886
10225
|
}
|
|
9887
10226
|
) }) }),
|
|
9888
|
-
variant === "result" && /* @__PURE__ */ (0,
|
|
9889
|
-
/* @__PURE__ */ (0,
|
|
9890
|
-
/* @__PURE__ */ (0,
|
|
10227
|
+
variant === "result" && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
10228
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizSubTitle, { subTitle: "Resultado" }),
|
|
10229
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "space-y-6 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9891
10230
|
"div",
|
|
9892
10231
|
{
|
|
9893
10232
|
className: cn("text-lg text-text-900 leading-8", paddingBottom),
|
|
9894
|
-
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ (0,
|
|
10233
|
+
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { children: element.element }, element.id))
|
|
9895
10234
|
}
|
|
9896
10235
|
) }) })
|
|
9897
10236
|
] })
|
|
@@ -9945,36 +10284,36 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
9945
10284
|
}
|
|
9946
10285
|
return "bg-success-600/70 border-white";
|
|
9947
10286
|
};
|
|
9948
|
-
return /* @__PURE__ */ (0,
|
|
9949
|
-
/* @__PURE__ */ (0,
|
|
9950
|
-
/* @__PURE__ */ (0,
|
|
10287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
10288
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizSubTitle, { subTitle: "Clique na \xE1rea correta" }),
|
|
10289
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
9951
10290
|
"div",
|
|
9952
10291
|
{
|
|
9953
10292
|
"data-testid": "quiz-image-container",
|
|
9954
10293
|
className: "space-y-6 p-3 relative inline-block",
|
|
9955
10294
|
children: [
|
|
9956
|
-
variant == "result" && /* @__PURE__ */ (0,
|
|
10295
|
+
variant == "result" && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
9957
10296
|
"div",
|
|
9958
10297
|
{
|
|
9959
10298
|
"data-testid": "quiz-legend",
|
|
9960
10299
|
className: "flex items-center gap-4 text-xs",
|
|
9961
10300
|
children: [
|
|
9962
|
-
/* @__PURE__ */ (0,
|
|
9963
|
-
/* @__PURE__ */ (0,
|
|
9964
|
-
/* @__PURE__ */ (0,
|
|
10301
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
10302
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "w-3 h-3 rounded-full bg-indicator-primary/70 border border-[#F8CC2E]" }),
|
|
10303
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "\xC1rea correta" })
|
|
9965
10304
|
] }),
|
|
9966
|
-
/* @__PURE__ */ (0,
|
|
9967
|
-
/* @__PURE__ */ (0,
|
|
9968
|
-
/* @__PURE__ */ (0,
|
|
10305
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
10306
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "w-3 h-3 rounded-full bg-success-600/70 border border-white" }),
|
|
10307
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "Resposta correta" })
|
|
9969
10308
|
] }),
|
|
9970
|
-
/* @__PURE__ */ (0,
|
|
9971
|
-
/* @__PURE__ */ (0,
|
|
9972
|
-
/* @__PURE__ */ (0,
|
|
10309
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
10310
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "w-3 h-3 rounded-full bg-indicator-error/70 border border-white" }),
|
|
10311
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "Resposta incorreta" })
|
|
9973
10312
|
] })
|
|
9974
10313
|
]
|
|
9975
10314
|
}
|
|
9976
10315
|
),
|
|
9977
|
-
/* @__PURE__ */ (0,
|
|
10316
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
9978
10317
|
"button",
|
|
9979
10318
|
{
|
|
9980
10319
|
"data-testid": "quiz-image-button",
|
|
@@ -9989,7 +10328,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
9989
10328
|
},
|
|
9990
10329
|
"aria-label": "\xC1rea da imagem interativa",
|
|
9991
10330
|
children: [
|
|
9992
|
-
/* @__PURE__ */ (0,
|
|
10331
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9993
10332
|
"img",
|
|
9994
10333
|
{
|
|
9995
10334
|
"data-testid": "quiz-image",
|
|
@@ -9998,7 +10337,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
9998
10337
|
className: "w-full h-auto rounded-md"
|
|
9999
10338
|
}
|
|
10000
10339
|
),
|
|
10001
|
-
variant === "result" && /* @__PURE__ */ (0,
|
|
10340
|
+
variant === "result" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10002
10341
|
"div",
|
|
10003
10342
|
{
|
|
10004
10343
|
"data-testid": "quiz-correct-circle",
|
|
@@ -10013,7 +10352,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
10013
10352
|
}
|
|
10014
10353
|
}
|
|
10015
10354
|
),
|
|
10016
|
-
clickPositionRelative && /* @__PURE__ */ (0,
|
|
10355
|
+
clickPositionRelative && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10017
10356
|
"div",
|
|
10018
10357
|
{
|
|
10019
10358
|
"data-testid": "quiz-user-circle",
|
|
@@ -10081,18 +10420,18 @@ var QuizQuestionList = ({
|
|
|
10081
10420
|
return "Em branco";
|
|
10082
10421
|
}
|
|
10083
10422
|
};
|
|
10084
|
-
return /* @__PURE__ */ (0,
|
|
10085
|
-
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */ (0,
|
|
10423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "space-y-6 px-4 h-full", children: [
|
|
10424
|
+
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex items-center justify-center text-gray-500 py-8 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-lg", children: "Nenhum resultado" }) }),
|
|
10086
10425
|
Object.entries(filteredGroupedQuestions).map(
|
|
10087
|
-
([subjectId, questions]) => /* @__PURE__ */ (0,
|
|
10088
|
-
/* @__PURE__ */ (0,
|
|
10089
|
-
/* @__PURE__ */ (0,
|
|
10090
|
-
/* @__PURE__ */ (0,
|
|
10426
|
+
([subjectId, questions]) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("section", { className: "flex flex-col gap-2", children: [
|
|
10427
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
|
|
10428
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.BookOpen, { size: 17, className: "text-white" }) }),
|
|
10429
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-800 font-bold text-lg", children: questions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" })
|
|
10091
10430
|
] }),
|
|
10092
|
-
/* @__PURE__ */ (0,
|
|
10431
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
|
|
10093
10432
|
const status = getQuestionStatus(question.id);
|
|
10094
10433
|
const questionNumber = getQuestionIndex(question.id);
|
|
10095
|
-
return /* @__PURE__ */ (0,
|
|
10434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10096
10435
|
CardStatus,
|
|
10097
10436
|
{
|
|
10098
10437
|
header: `Quest\xE3o ${questionNumber.toString().padStart(2, "0")}`,
|
|
@@ -10172,8 +10511,8 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10172
10511
|
return;
|
|
10173
10512
|
}
|
|
10174
10513
|
};
|
|
10175
|
-
return /* @__PURE__ */ (0,
|
|
10176
|
-
/* @__PURE__ */ (0,
|
|
10514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
10515
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10177
10516
|
"footer",
|
|
10178
10517
|
{
|
|
10179
10518
|
ref,
|
|
@@ -10182,17 +10521,17 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10182
10521
|
className
|
|
10183
10522
|
),
|
|
10184
10523
|
...props,
|
|
10185
|
-
children: variant === "default" ? /* @__PURE__ */ (0,
|
|
10186
|
-
/* @__PURE__ */ (0,
|
|
10187
|
-
/* @__PURE__ */ (0,
|
|
10524
|
+
children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
10525
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-row items-center gap-1", children: [
|
|
10526
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10188
10527
|
IconButton_default,
|
|
10189
10528
|
{
|
|
10190
|
-
icon: /* @__PURE__ */ (0,
|
|
10529
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.SquaresFour, { size: 24, className: "text-text-950" }),
|
|
10191
10530
|
size: "md",
|
|
10192
10531
|
onClick: () => setModalNavigateOpen(true)
|
|
10193
10532
|
}
|
|
10194
10533
|
),
|
|
10195
|
-
isFirstQuestion ? /* @__PURE__ */ (0,
|
|
10534
|
+
isFirstQuestion ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10196
10535
|
Button_default,
|
|
10197
10536
|
{
|
|
10198
10537
|
variant: "outline",
|
|
@@ -10203,13 +10542,13 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10203
10542
|
},
|
|
10204
10543
|
children: "Pular"
|
|
10205
10544
|
}
|
|
10206
|
-
) : /* @__PURE__ */ (0,
|
|
10545
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10207
10546
|
Button_default,
|
|
10208
10547
|
{
|
|
10209
10548
|
size: "medium",
|
|
10210
10549
|
variant: "link",
|
|
10211
10550
|
action: "primary",
|
|
10212
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
10551
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.CaretLeft, { size: 18 }),
|
|
10213
10552
|
onClick: () => {
|
|
10214
10553
|
goToPreviousQuestion();
|
|
10215
10554
|
},
|
|
@@ -10217,7 +10556,7 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10217
10556
|
}
|
|
10218
10557
|
)
|
|
10219
10558
|
] }),
|
|
10220
|
-
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */ (0,
|
|
10559
|
+
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10221
10560
|
Button_default,
|
|
10222
10561
|
{
|
|
10223
10562
|
size: "small",
|
|
@@ -10230,7 +10569,7 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10230
10569
|
children: "Pular"
|
|
10231
10570
|
}
|
|
10232
10571
|
),
|
|
10233
|
-
isLastQuestion ? /* @__PURE__ */ (0,
|
|
10572
|
+
isLastQuestion ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10234
10573
|
Button_default,
|
|
10235
10574
|
{
|
|
10236
10575
|
size: "medium",
|
|
@@ -10240,13 +10579,13 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10240
10579
|
onClick: handleFinishQuiz,
|
|
10241
10580
|
children: "Finalizar"
|
|
10242
10581
|
}
|
|
10243
|
-
) : /* @__PURE__ */ (0,
|
|
10582
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10244
10583
|
Button_default,
|
|
10245
10584
|
{
|
|
10246
10585
|
size: "medium",
|
|
10247
10586
|
variant: "link",
|
|
10248
10587
|
action: "primary",
|
|
10249
|
-
iconRight: /* @__PURE__ */ (0,
|
|
10588
|
+
iconRight: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.CaretRight, { size: 18 }),
|
|
10250
10589
|
disabled: !currentAnswer && !isCurrentQuestionSkipped,
|
|
10251
10590
|
onClick: () => {
|
|
10252
10591
|
goToNextQuestion();
|
|
@@ -10254,7 +10593,7 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10254
10593
|
children: "Avan\xE7ar"
|
|
10255
10594
|
}
|
|
10256
10595
|
)
|
|
10257
|
-
] }) : /* @__PURE__ */ (0,
|
|
10596
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex flex-row items-center justify-end w-full", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10258
10597
|
Button_default,
|
|
10259
10598
|
{
|
|
10260
10599
|
variant: "solid",
|
|
@@ -10266,7 +10605,7 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10266
10605
|
) })
|
|
10267
10606
|
}
|
|
10268
10607
|
),
|
|
10269
|
-
/* @__PURE__ */ (0,
|
|
10608
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10270
10609
|
AlertDialog,
|
|
10271
10610
|
{
|
|
10272
10611
|
isOpen: alertDialogOpen,
|
|
@@ -10278,7 +10617,7 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10278
10617
|
onSubmit: handleAlertSubmit
|
|
10279
10618
|
}
|
|
10280
10619
|
),
|
|
10281
|
-
/* @__PURE__ */ (0,
|
|
10620
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10282
10621
|
Modal_default,
|
|
10283
10622
|
{
|
|
10284
10623
|
isOpen: modalResultOpen,
|
|
@@ -10287,11 +10626,11 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10287
10626
|
closeOnEscape: false,
|
|
10288
10627
|
hideCloseButton: true,
|
|
10289
10628
|
size: "md",
|
|
10290
|
-
children: /* @__PURE__ */ (0,
|
|
10291
|
-
resultImageComponent ? /* @__PURE__ */ (0,
|
|
10292
|
-
/* @__PURE__ */ (0,
|
|
10293
|
-
/* @__PURE__ */ (0,
|
|
10294
|
-
/* @__PURE__ */ (0,
|
|
10629
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
10630
|
+
resultImageComponent ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
10631
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
10632
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: "Voc\xEA concluiu o simulado!" }),
|
|
10633
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("p", { className: "text-text-500 font-sm", children: [
|
|
10295
10634
|
"Voc\xEA acertou",
|
|
10296
10635
|
" ",
|
|
10297
10636
|
getQuestionResultStatistics()?.correctAnswers ?? "--",
|
|
@@ -10301,8 +10640,8 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10301
10640
|
" quest\xF5es."
|
|
10302
10641
|
] })
|
|
10303
10642
|
] }),
|
|
10304
|
-
/* @__PURE__ */ (0,
|
|
10305
|
-
/* @__PURE__ */ (0,
|
|
10643
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
|
|
10644
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10306
10645
|
Button_default,
|
|
10307
10646
|
{
|
|
10308
10647
|
variant: "outline",
|
|
@@ -10312,38 +10651,38 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10312
10651
|
children: "Ir para simulados"
|
|
10313
10652
|
}
|
|
10314
10653
|
),
|
|
10315
|
-
/* @__PURE__ */ (0,
|
|
10654
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })
|
|
10316
10655
|
] })
|
|
10317
10656
|
] })
|
|
10318
10657
|
}
|
|
10319
10658
|
),
|
|
10320
|
-
/* @__PURE__ */ (0,
|
|
10659
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10321
10660
|
Modal_default,
|
|
10322
10661
|
{
|
|
10323
10662
|
isOpen: modalNavigateOpen,
|
|
10324
10663
|
onClose: () => setModalNavigateOpen(false),
|
|
10325
10664
|
title: "Quest\xF5es",
|
|
10326
10665
|
size: "lg",
|
|
10327
|
-
children: /* @__PURE__ */ (0,
|
|
10328
|
-
/* @__PURE__ */ (0,
|
|
10329
|
-
/* @__PURE__ */ (0,
|
|
10330
|
-
/* @__PURE__ */ (0,
|
|
10331
|
-
/* @__PURE__ */ (0,
|
|
10666
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col w-full not-lg:h-[calc(100vh-200px)] lg:max-h-[687px] lg:h-[687px]", children: [
|
|
10667
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-row justify-between items-center py-6 pt-6 pb-4 border-b border-border-200 flex-shrink-0", children: [
|
|
10668
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
|
|
10669
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "max-w-[266px]", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Select_default, { value: filterType, onValueChange: setFilterType, children: [
|
|
10670
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10332
10671
|
SelectTrigger,
|
|
10333
10672
|
{
|
|
10334
10673
|
variant: "rounded",
|
|
10335
10674
|
className: "max-w-[266px] min-w-[160px]",
|
|
10336
|
-
children: /* @__PURE__ */ (0,
|
|
10675
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" })
|
|
10337
10676
|
}
|
|
10338
10677
|
),
|
|
10339
|
-
/* @__PURE__ */ (0,
|
|
10340
|
-
/* @__PURE__ */ (0,
|
|
10341
|
-
/* @__PURE__ */ (0,
|
|
10342
|
-
/* @__PURE__ */ (0,
|
|
10678
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(SelectContent, { children: [
|
|
10679
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectItem, { value: "all", children: "Todas" }),
|
|
10680
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectItem, { value: "unanswered", children: "Em branco" }),
|
|
10681
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectItem, { value: "answered", children: "Respondidas" })
|
|
10343
10682
|
] })
|
|
10344
10683
|
] }) })
|
|
10345
10684
|
] }),
|
|
10346
|
-
/* @__PURE__ */ (0,
|
|
10685
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex flex-col gap-2 flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10347
10686
|
QuizQuestionList,
|
|
10348
10687
|
{
|
|
10349
10688
|
filterType,
|
|
@@ -10353,7 +10692,7 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10353
10692
|
] })
|
|
10354
10693
|
}
|
|
10355
10694
|
),
|
|
10356
|
-
/* @__PURE__ */ (0,
|
|
10695
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10357
10696
|
Modal_default,
|
|
10358
10697
|
{
|
|
10359
10698
|
isOpen: modalResolutionOpen,
|
|
@@ -10371,32 +10710,32 @@ var QuizBadge = ({
|
|
|
10371
10710
|
}) => {
|
|
10372
10711
|
switch (subtype) {
|
|
10373
10712
|
case "PROVA" /* PROVA */:
|
|
10374
|
-
return /* @__PURE__ */ (0,
|
|
10713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Badge_default, { variant: "examsOutlined", action: "exam2", "data-testid": "quiz-badge", children: "Prova" });
|
|
10375
10714
|
case "ENEM_PROVA_1" /* ENEM_PROVA_1 */:
|
|
10376
10715
|
case "ENEM_PROVA_2" /* ENEM_PROVA_2 */:
|
|
10377
|
-
return /* @__PURE__ */ (0,
|
|
10716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Badge_default, { variant: "examsOutlined", action: "exam1", "data-testid": "quiz-badge", children: "Enem" });
|
|
10378
10717
|
case "VESTIBULAR" /* VESTIBULAR */:
|
|
10379
|
-
return /* @__PURE__ */ (0,
|
|
10718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Badge_default, { variant: "examsOutlined", action: "exam4", "data-testid": "quiz-badge", children: "Vestibular" });
|
|
10380
10719
|
case "SIMULADO" /* SIMULADO */:
|
|
10381
10720
|
case "SIMULADAO" /* SIMULADAO */:
|
|
10382
10721
|
case void 0:
|
|
10383
|
-
return /* @__PURE__ */ (0,
|
|
10722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Badge_default, { variant: "examsOutlined", action: "exam3", "data-testid": "quiz-badge", children: "Simulad\xE3o" });
|
|
10384
10723
|
default:
|
|
10385
|
-
return /* @__PURE__ */ (0,
|
|
10724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: subtype });
|
|
10386
10725
|
}
|
|
10387
10726
|
};
|
|
10388
10727
|
var QuizResultHeaderTitle = (0, import_react30.forwardRef)(({ className, ...props }, ref) => {
|
|
10389
10728
|
const { getActiveQuiz } = useQuizStore();
|
|
10390
10729
|
const activeQuiz = getActiveQuiz();
|
|
10391
|
-
return /* @__PURE__ */ (0,
|
|
10730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
10392
10731
|
"div",
|
|
10393
10732
|
{
|
|
10394
10733
|
ref,
|
|
10395
10734
|
className: cn("flex flex-row pt-4 justify-between", className),
|
|
10396
10735
|
...props,
|
|
10397
10736
|
children: [
|
|
10398
|
-
/* @__PURE__ */ (0,
|
|
10399
|
-
/* @__PURE__ */ (0,
|
|
10737
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
|
|
10738
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizBadge, { subtype: activeQuiz?.quiz.subtype || void 0 })
|
|
10400
10739
|
]
|
|
10401
10740
|
}
|
|
10402
10741
|
);
|
|
@@ -10404,7 +10743,7 @@ var QuizResultHeaderTitle = (0, import_react30.forwardRef)(({ className, ...prop
|
|
|
10404
10743
|
var QuizResultTitle = (0, import_react30.forwardRef)(({ className, ...props }, ref) => {
|
|
10405
10744
|
const { getQuizTitle } = useQuizStore();
|
|
10406
10745
|
const quizTitle = getQuizTitle();
|
|
10407
|
-
return /* @__PURE__ */ (0,
|
|
10746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10408
10747
|
"p",
|
|
10409
10748
|
{
|
|
10410
10749
|
className: cn("pt-6 pb-4 text-text-950 font-bold text-lg", className),
|
|
@@ -10456,15 +10795,15 @@ var QuizResultPerformance = (0, import_react30.forwardRef)(
|
|
|
10456
10795
|
});
|
|
10457
10796
|
}
|
|
10458
10797
|
const percentage = totalQuestions > 0 ? Math.round(correctAnswers / totalQuestions * 100) : 0;
|
|
10459
|
-
return /* @__PURE__ */ (0,
|
|
10798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
10460
10799
|
"div",
|
|
10461
10800
|
{
|
|
10462
10801
|
className: "flex flex-row gap-6 p-6 rounded-xl bg-background justify-between",
|
|
10463
10802
|
ref,
|
|
10464
10803
|
...props,
|
|
10465
10804
|
children: [
|
|
10466
|
-
/* @__PURE__ */ (0,
|
|
10467
|
-
/* @__PURE__ */ (0,
|
|
10805
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "relative", children: [
|
|
10806
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10468
10807
|
ProgressCircle_default,
|
|
10469
10808
|
{
|
|
10470
10809
|
size: "medium",
|
|
@@ -10474,24 +10813,24 @@ var QuizResultPerformance = (0, import_react30.forwardRef)(
|
|
|
10474
10813
|
label: ""
|
|
10475
10814
|
}
|
|
10476
10815
|
),
|
|
10477
|
-
/* @__PURE__ */ (0,
|
|
10478
|
-
/* @__PURE__ */ (0,
|
|
10479
|
-
/* @__PURE__ */ (0,
|
|
10480
|
-
/* @__PURE__ */ (0,
|
|
10816
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
10817
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
10818
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.Clock, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
10819
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-2xs font-medium text-text-800", children: formatTime2(
|
|
10481
10820
|
(getQuestionResultStatistics()?.timeSpent ?? 0) * 60
|
|
10482
10821
|
) })
|
|
10483
10822
|
] }),
|
|
10484
|
-
/* @__PURE__ */ (0,
|
|
10823
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
|
|
10485
10824
|
getQuestionResultStatistics()?.correctAnswers ?? "--",
|
|
10486
10825
|
" de",
|
|
10487
10826
|
" ",
|
|
10488
10827
|
totalQuestions
|
|
10489
10828
|
] }),
|
|
10490
|
-
/* @__PURE__ */ (0,
|
|
10829
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
|
|
10491
10830
|
] })
|
|
10492
10831
|
] }),
|
|
10493
|
-
/* @__PURE__ */ (0,
|
|
10494
|
-
/* @__PURE__ */ (0,
|
|
10832
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
10833
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10495
10834
|
ProgressBar_default,
|
|
10496
10835
|
{
|
|
10497
10836
|
className: "w-full",
|
|
@@ -10505,7 +10844,7 @@ var QuizResultPerformance = (0, import_react30.forwardRef)(
|
|
|
10505
10844
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
10506
10845
|
}
|
|
10507
10846
|
),
|
|
10508
|
-
/* @__PURE__ */ (0,
|
|
10847
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10509
10848
|
ProgressBar_default,
|
|
10510
10849
|
{
|
|
10511
10850
|
className: "w-full",
|
|
@@ -10519,7 +10858,7 @@ var QuizResultPerformance = (0, import_react30.forwardRef)(
|
|
|
10519
10858
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
10520
10859
|
}
|
|
10521
10860
|
),
|
|
10522
|
-
/* @__PURE__ */ (0,
|
|
10861
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10523
10862
|
ProgressBar_default,
|
|
10524
10863
|
{
|
|
10525
10864
|
className: "w-full",
|
|
@@ -10566,9 +10905,9 @@ var QuizListResult = (0, import_react30.forwardRef)(({ className, onSubjectClick
|
|
|
10566
10905
|
};
|
|
10567
10906
|
}
|
|
10568
10907
|
);
|
|
10569
|
-
return /* @__PURE__ */ (0,
|
|
10570
|
-
/* @__PURE__ */ (0,
|
|
10571
|
-
/* @__PURE__ */ (0,
|
|
10908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("section", { ref, className, ...props, children: [
|
|
10909
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
|
|
10910
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10572
10911
|
CardResults,
|
|
10573
10912
|
{
|
|
10574
10913
|
onClick: () => onSubjectClick?.(subject.subject.id),
|
|
@@ -10590,16 +10929,16 @@ var QuizListResultByMateria = ({
|
|
|
10590
10929
|
const { getQuestionsGroupedBySubject, getQuestionIndex } = useQuizStore();
|
|
10591
10930
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
10592
10931
|
const answeredQuestions = groupedQuestions[subject] || [];
|
|
10593
|
-
return /* @__PURE__ */ (0,
|
|
10594
|
-
/* @__PURE__ */ (0,
|
|
10595
|
-
/* @__PURE__ */ (0,
|
|
10596
|
-
/* @__PURE__ */ (0,
|
|
10597
|
-
/* @__PURE__ */ (0,
|
|
10932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col", children: [
|
|
10933
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: answeredQuestions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" }) }),
|
|
10934
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("section", { className: "flex flex-col ", children: [
|
|
10935
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
10936
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("ul", { className: "flex flex-col gap-2 pt-4", children: answeredQuestions.map((question) => {
|
|
10598
10937
|
const questionIndex = getQuestionIndex(
|
|
10599
10938
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10600
10939
|
question.questionId ?? question.id
|
|
10601
10940
|
);
|
|
10602
|
-
return /* @__PURE__ */ (0,
|
|
10941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10603
10942
|
CardStatus,
|
|
10604
10943
|
{
|
|
10605
10944
|
className: "max-w-full",
|
|
@@ -10623,11 +10962,11 @@ var QuizListResultByMateria = ({
|
|
|
10623
10962
|
|
|
10624
10963
|
// src/components/LoadingModal/loadingModal.tsx
|
|
10625
10964
|
var import_react31 = require("react");
|
|
10626
|
-
var
|
|
10965
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
10627
10966
|
var LoadingModal = (0, import_react31.forwardRef)(
|
|
10628
10967
|
({ open, title = "Titulo...", subtitle = "Subtitulo...", ...props }, ref) => {
|
|
10629
10968
|
if (!open) return null;
|
|
10630
|
-
return /* @__PURE__ */ (0,
|
|
10969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10631
10970
|
"div",
|
|
10632
10971
|
{
|
|
10633
10972
|
ref,
|
|
@@ -10636,8 +10975,8 @@ var LoadingModal = (0, import_react31.forwardRef)(
|
|
|
10636
10975
|
"aria-describedby": "loading-modal-subtitle",
|
|
10637
10976
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-background/90 backdrop-blur-xs",
|
|
10638
10977
|
...props,
|
|
10639
|
-
children: /* @__PURE__ */ (0,
|
|
10640
|
-
/* @__PURE__ */ (0,
|
|
10978
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "w-full max-w-[364px] flex flex-col items-center justify-center gap-14", children: [
|
|
10979
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "animate-spin", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
10641
10980
|
"svg",
|
|
10642
10981
|
{
|
|
10643
10982
|
width: "102",
|
|
@@ -10648,14 +10987,14 @@ var LoadingModal = (0, import_react31.forwardRef)(
|
|
|
10648
10987
|
"aria-hidden": "true",
|
|
10649
10988
|
focusable: false,
|
|
10650
10989
|
children: [
|
|
10651
|
-
/* @__PURE__ */ (0,
|
|
10990
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10652
10991
|
"path",
|
|
10653
10992
|
{
|
|
10654
10993
|
d: "M101.5 51C101.5 78.8904 78.8904 101.5 51 101.5C23.1096 101.5 0.5 78.8904 0.5 51C0.5 23.1096 23.1096 0.5 51 0.5C78.8904 0.5 101.5 23.1096 101.5 51ZM8.62286 51C8.62286 74.4043 27.5957 93.3771 51 93.3771C74.4043 93.3771 93.3771 74.4043 93.3771 51C93.3771 27.5957 74.4043 8.62286 51 8.62286C27.5957 8.62286 8.62286 27.5957 8.62286 51Z",
|
|
10655
10994
|
className: "fill-primary-100"
|
|
10656
10995
|
}
|
|
10657
10996
|
),
|
|
10658
|
-
/* @__PURE__ */ (0,
|
|
10997
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10659
10998
|
"path",
|
|
10660
10999
|
{
|
|
10661
11000
|
d: "M97.4386 51C99.6816 51 101.517 52.8213 101.337 55.0571C100.754 62.2833 98.6212 69.3162 95.0643 75.6696C90.8444 83.207 84.7616 89.536 77.3975 94.0514C70.0333 98.5668 61.6339 101.118 53.0024 101.46C44.371 101.803 35.7959 99.9255 28.0971 96.0078C20.3982 92.0902 13.833 86.2631 9.02917 79.0838C4.22529 71.9045 1.34332 63.6129 0.658804 55.0017C-0.0257159 46.3906 1.51009 37.7479 5.1194 29.8997C8.16173 23.2845 12.5915 17.4202 18.0904 12.6959C19.7917 11.2341 22.3444 11.6457 23.6647 13.459C24.9851 15.2723 24.5702 17.7988 22.8916 19.2866C18.5048 23.1747 14.9608 27.9413 12.4992 33.2937C9.47048 39.8794 8.1817 47.132 8.75612 54.3581C9.33053 61.5841 11.7489 68.542 15.7801 74.5666C19.8113 80.5911 25.3205 85.4809 31.781 88.7684C38.2414 92.0559 45.4372 93.6312 52.6804 93.3438C59.9235 93.0564 66.9718 90.9158 73.1515 87.1267C79.3311 83.3375 84.4355 78.0266 87.9766 71.7015C90.8546 66.561 92.6217 60.8903 93.1827 55.0553C93.3973 52.8225 95.1955 51 97.4386 51Z",
|
|
@@ -10665,9 +11004,9 @@ var LoadingModal = (0, import_react31.forwardRef)(
|
|
|
10665
11004
|
]
|
|
10666
11005
|
}
|
|
10667
11006
|
) }),
|
|
10668
|
-
/* @__PURE__ */ (0,
|
|
10669
|
-
/* @__PURE__ */ (0,
|
|
10670
|
-
/* @__PURE__ */ (0,
|
|
11007
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "flex flex-col gap-4 text-center", children: [
|
|
11008
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { id: "loading-modal-title", className: "text-text-950 text-lg", children: title }),
|
|
11009
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { id: "loading-modal-subtitle", className: "text-text-600 text-lg", children: subtitle })
|
|
10671
11010
|
] })
|
|
10672
11011
|
] })
|
|
10673
11012
|
}
|
|
@@ -10677,7 +11016,7 @@ var LoadingModal = (0, import_react31.forwardRef)(
|
|
|
10677
11016
|
var loadingModal_default = LoadingModal;
|
|
10678
11017
|
|
|
10679
11018
|
// src/components/NotificationCard/NotificationCard.tsx
|
|
10680
|
-
var
|
|
11019
|
+
var import_phosphor_react23 = require("phosphor-react");
|
|
10681
11020
|
var import_react32 = require("react");
|
|
10682
11021
|
|
|
10683
11022
|
// src/store/notificationStore.ts
|
|
@@ -10925,14 +11264,14 @@ var createNotificationStore = (apiClient) => {
|
|
|
10925
11264
|
var mock_content_default = "./mock-content-K2CDVG6P.png";
|
|
10926
11265
|
|
|
10927
11266
|
// src/components/NotificationCard/NotificationCard.tsx
|
|
10928
|
-
var
|
|
11267
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
10929
11268
|
var NotificationEmpty = ({
|
|
10930
11269
|
emptyStateImage,
|
|
10931
11270
|
emptyStateTitle = "Nenhuma notifica\xE7\xE3o no momento",
|
|
10932
11271
|
emptyStateDescription = "Voc\xEA est\xE1 em dia com todas as novidades. Volte depois para conferir atualiza\xE7\xF5es!"
|
|
10933
11272
|
}) => {
|
|
10934
|
-
return /* @__PURE__ */ (0,
|
|
10935
|
-
emptyStateImage && /* @__PURE__ */ (0,
|
|
11273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col items-center justify-center gap-4 p-6 w-full", children: [
|
|
11274
|
+
emptyStateImage && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "w-20 h-20 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10936
11275
|
"img",
|
|
10937
11276
|
{
|
|
10938
11277
|
src: emptyStateImage,
|
|
@@ -10942,23 +11281,23 @@ var NotificationEmpty = ({
|
|
|
10942
11281
|
className: "object-contain"
|
|
10943
11282
|
}
|
|
10944
11283
|
) }),
|
|
10945
|
-
/* @__PURE__ */ (0,
|
|
10946
|
-
/* @__PURE__ */ (0,
|
|
11284
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h3", { className: "text-xl font-semibold text-text-950 text-center leading-[23px]", children: emptyStateTitle }),
|
|
11285
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm font-normal text-text-400 text-center max-w-[316px] leading-[21px]", children: emptyStateDescription })
|
|
10947
11286
|
] });
|
|
10948
11287
|
};
|
|
10949
11288
|
var NotificationHeader = ({
|
|
10950
11289
|
unreadCount,
|
|
10951
11290
|
variant = "modal"
|
|
10952
11291
|
}) => {
|
|
10953
|
-
return /* @__PURE__ */ (0,
|
|
10954
|
-
variant === "modal" ? /* @__PURE__ */ (0,
|
|
10955
|
-
unreadCount > 0 && /* @__PURE__ */ (0,
|
|
11292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
11293
|
+
variant === "modal" ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-950", children: "Notifica\xE7\xF5es" }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h3", { className: "text-sm font-semibold text-text-950", children: "Notifica\xE7\xF5es" }),
|
|
11294
|
+
unreadCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10956
11295
|
Badge_default,
|
|
10957
11296
|
{
|
|
10958
11297
|
variant: "solid",
|
|
10959
11298
|
action: "info",
|
|
10960
11299
|
size: "small",
|
|
10961
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
11300
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_phosphor_react23.Bell, { size: 12, "aria-hidden": "true", focusable: "false" }),
|
|
10962
11301
|
className: "border-0",
|
|
10963
11302
|
children: unreadCount === 1 ? "1 n\xE3o lida" : `${unreadCount} n\xE3o lidas`
|
|
10964
11303
|
}
|
|
@@ -10994,7 +11333,7 @@ var SingleNotificationCard = ({
|
|
|
10994
11333
|
onNavigate();
|
|
10995
11334
|
}
|
|
10996
11335
|
};
|
|
10997
|
-
return /* @__PURE__ */ (0,
|
|
11336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
10998
11337
|
"div",
|
|
10999
11338
|
{
|
|
11000
11339
|
className: cn(
|
|
@@ -11003,20 +11342,20 @@ var SingleNotificationCard = ({
|
|
|
11003
11342
|
className
|
|
11004
11343
|
),
|
|
11005
11344
|
children: [
|
|
11006
|
-
/* @__PURE__ */ (0,
|
|
11007
|
-
!isRead && /* @__PURE__ */ (0,
|
|
11008
|
-
/* @__PURE__ */ (0,
|
|
11009
|
-
/* @__PURE__ */ (0,
|
|
11010
|
-
/* @__PURE__ */ (0,
|
|
11345
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-2 w-full", children: [
|
|
11346
|
+
!isRead && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "w-[7px] h-[7px] bg-info-300 rounded-full flex-shrink-0" }),
|
|
11347
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h3", { className: "font-bold text-sm leading-4 text-text-950 flex-grow", children: title }),
|
|
11348
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenu_default, { children: [
|
|
11349
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11011
11350
|
DropdownMenuTrigger,
|
|
11012
11351
|
{
|
|
11013
11352
|
className: "flex-shrink-0 inline-flex items-center justify-center font-medium bg-transparent text-text-950 cursor-pointer hover:bg-info-50 w-6 h-6 rounded-lg",
|
|
11014
11353
|
"aria-label": "Menu de a\xE7\xF5es",
|
|
11015
|
-
children: /* @__PURE__ */ (0,
|
|
11354
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_phosphor_react23.DotsThreeVertical, { size: 24 })
|
|
11016
11355
|
}
|
|
11017
11356
|
),
|
|
11018
|
-
/* @__PURE__ */ (0,
|
|
11019
|
-
!isRead && /* @__PURE__ */ (0,
|
|
11357
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenuContent, { align: "end", className: "min-w-[160px]", children: [
|
|
11358
|
+
!isRead && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11020
11359
|
DropdownMenuItem,
|
|
11021
11360
|
{
|
|
11022
11361
|
onClick: handleMarkAsRead,
|
|
@@ -11024,14 +11363,14 @@ var SingleNotificationCard = ({
|
|
|
11024
11363
|
children: "Marcar como lida"
|
|
11025
11364
|
}
|
|
11026
11365
|
),
|
|
11027
|
-
/* @__PURE__ */ (0,
|
|
11366
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuItem, { onClick: handleDelete, className: "text-error-600", children: "Deletar" })
|
|
11028
11367
|
] })
|
|
11029
11368
|
] })
|
|
11030
11369
|
] }),
|
|
11031
|
-
/* @__PURE__ */ (0,
|
|
11032
|
-
/* @__PURE__ */ (0,
|
|
11033
|
-
/* @__PURE__ */ (0,
|
|
11034
|
-
onNavigate && actionLabel && /* @__PURE__ */ (0,
|
|
11370
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm leading-[21px] text-text-800 w-full", children: message }),
|
|
11371
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center justify-between w-full", children: [
|
|
11372
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-sm font-medium text-text-400", children: time }),
|
|
11373
|
+
onNavigate && actionLabel && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11035
11374
|
"button",
|
|
11036
11375
|
{
|
|
11037
11376
|
type: "button",
|
|
@@ -11071,9 +11410,9 @@ var NotificationList = ({
|
|
|
11071
11410
|
}
|
|
11072
11411
|
};
|
|
11073
11412
|
if (error) {
|
|
11074
|
-
return /* @__PURE__ */ (0,
|
|
11075
|
-
/* @__PURE__ */ (0,
|
|
11076
|
-
onRetry && /* @__PURE__ */ (0,
|
|
11413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: [
|
|
11414
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm text-error-600", children: error }),
|
|
11415
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11077
11416
|
"button",
|
|
11078
11417
|
{
|
|
11079
11418
|
type: "button",
|
|
@@ -11085,8 +11424,8 @@ var NotificationList = ({
|
|
|
11085
11424
|
] });
|
|
11086
11425
|
}
|
|
11087
11426
|
if (loading) {
|
|
11088
|
-
return /* @__PURE__ */ (0,
|
|
11089
|
-
(skeletonId) => /* @__PURE__ */ (0,
|
|
11427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex flex-col gap-0 w-full", children: ["skeleton-first", "skeleton-second", "skeleton-third"].map(
|
|
11428
|
+
(skeletonId) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11090
11429
|
SkeletonCard,
|
|
11091
11430
|
{
|
|
11092
11431
|
className: "p-4 border-b border-border-200"
|
|
@@ -11096,11 +11435,11 @@ var NotificationList = ({
|
|
|
11096
11435
|
) });
|
|
11097
11436
|
}
|
|
11098
11437
|
if (!groupedNotifications || groupedNotifications.length === 0) {
|
|
11099
|
-
return renderEmpty ? /* @__PURE__ */ (0,
|
|
11438
|
+
return renderEmpty ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "w-full", children: renderEmpty() }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NotificationEmpty, {});
|
|
11100
11439
|
}
|
|
11101
|
-
return /* @__PURE__ */ (0,
|
|
11102
|
-
groupedNotifications.map((group, idx) => /* @__PURE__ */ (0,
|
|
11103
|
-
/* @__PURE__ */ (0,
|
|
11440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: cn("flex flex-col gap-0 w-full", className), children: [
|
|
11441
|
+
groupedNotifications.map((group, idx) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col", children: [
|
|
11442
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex items-end px-4 py-6 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h4", { className: "text-lg font-bold text-text-500 flex-grow", children: group.label }) }),
|
|
11104
11443
|
group.notifications.map((notification) => {
|
|
11105
11444
|
const isGlobalNotification = !notification.entityType && !notification.entityId && !notification.activity && !notification.goal;
|
|
11106
11445
|
let navigationHandler;
|
|
@@ -11120,7 +11459,7 @@ var NotificationList = ({
|
|
|
11120
11459
|
notification.entityType ?? void 0
|
|
11121
11460
|
);
|
|
11122
11461
|
}
|
|
11123
|
-
return /* @__PURE__ */ (0,
|
|
11462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11124
11463
|
SingleNotificationCard,
|
|
11125
11464
|
{
|
|
11126
11465
|
title: notification.title,
|
|
@@ -11136,7 +11475,7 @@ var NotificationList = ({
|
|
|
11136
11475
|
);
|
|
11137
11476
|
})
|
|
11138
11477
|
] }, `${group.label}-${idx}`)),
|
|
11139
|
-
/* @__PURE__ */ (0,
|
|
11478
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11140
11479
|
Modal_default,
|
|
11141
11480
|
{
|
|
11142
11481
|
isOpen: globalNotificationModal.isOpen,
|
|
@@ -11186,7 +11525,7 @@ var NotificationCenter = ({
|
|
|
11186
11525
|
onFetchNotifications?.();
|
|
11187
11526
|
}
|
|
11188
11527
|
}, [isActive, onFetchNotifications]);
|
|
11189
|
-
const renderEmptyState = () => /* @__PURE__ */ (0,
|
|
11528
|
+
const renderEmptyState = () => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11190
11529
|
NotificationEmpty,
|
|
11191
11530
|
{
|
|
11192
11531
|
emptyStateImage,
|
|
@@ -11195,17 +11534,17 @@ var NotificationCenter = ({
|
|
|
11195
11534
|
}
|
|
11196
11535
|
);
|
|
11197
11536
|
if (isMobile) {
|
|
11198
|
-
return /* @__PURE__ */ (0,
|
|
11199
|
-
/* @__PURE__ */ (0,
|
|
11537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
11538
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11200
11539
|
IconButton_default,
|
|
11201
11540
|
{
|
|
11202
11541
|
active: isModalOpen,
|
|
11203
11542
|
onClick: handleMobileClick,
|
|
11204
|
-
icon: /* @__PURE__ */ (0,
|
|
11543
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_phosphor_react23.Bell, { size: 24, className: "text-primary" }),
|
|
11205
11544
|
className
|
|
11206
11545
|
}
|
|
11207
11546
|
),
|
|
11208
|
-
/* @__PURE__ */ (0,
|
|
11547
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11209
11548
|
Modal_default,
|
|
11210
11549
|
{
|
|
11211
11550
|
isOpen: isModalOpen,
|
|
@@ -11214,10 +11553,10 @@ var NotificationCenter = ({
|
|
|
11214
11553
|
size: "md",
|
|
11215
11554
|
hideCloseButton: false,
|
|
11216
11555
|
closeOnEscape: true,
|
|
11217
|
-
children: /* @__PURE__ */ (0,
|
|
11218
|
-
/* @__PURE__ */ (0,
|
|
11219
|
-
/* @__PURE__ */ (0,
|
|
11220
|
-
unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ (0,
|
|
11556
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col h-full max-h-[80vh]", children: [
|
|
11557
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "px-0 pb-3 border-b border-border-200", children: [
|
|
11558
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NotificationHeader, { unreadCount, variant: "modal" }),
|
|
11559
|
+
unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11221
11560
|
"button",
|
|
11222
11561
|
{
|
|
11223
11562
|
type: "button",
|
|
@@ -11227,7 +11566,7 @@ var NotificationCenter = ({
|
|
|
11227
11566
|
}
|
|
11228
11567
|
)
|
|
11229
11568
|
] }),
|
|
11230
|
-
/* @__PURE__ */ (0,
|
|
11569
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11231
11570
|
NotificationList,
|
|
11232
11571
|
{
|
|
11233
11572
|
groupedNotifications,
|
|
@@ -11257,15 +11596,15 @@ var NotificationCenter = ({
|
|
|
11257
11596
|
)
|
|
11258
11597
|
] });
|
|
11259
11598
|
}
|
|
11260
|
-
return /* @__PURE__ */ (0,
|
|
11261
|
-
/* @__PURE__ */ (0,
|
|
11262
|
-
/* @__PURE__ */ (0,
|
|
11599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
11600
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenu_default, { children: [
|
|
11601
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuTrigger, { className: "text-primary cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11263
11602
|
IconButton_default,
|
|
11264
11603
|
{
|
|
11265
11604
|
active: isActive,
|
|
11266
11605
|
onClick: handleDesktopClick,
|
|
11267
|
-
icon: /* @__PURE__ */ (0,
|
|
11268
|
-
|
|
11606
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11607
|
+
import_phosphor_react23.Bell,
|
|
11269
11608
|
{
|
|
11270
11609
|
size: 24,
|
|
11271
11610
|
className: isActive ? "text-primary-950" : "text-primary"
|
|
@@ -11274,22 +11613,22 @@ var NotificationCenter = ({
|
|
|
11274
11613
|
className
|
|
11275
11614
|
}
|
|
11276
11615
|
) }),
|
|
11277
|
-
/* @__PURE__ */ (0,
|
|
11616
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11278
11617
|
DropdownMenuContent,
|
|
11279
11618
|
{
|
|
11280
11619
|
className: "min-w-[320px] max-w-[400px] max-h-[500px] overflow-hidden",
|
|
11281
11620
|
side: "bottom",
|
|
11282
11621
|
align: "end",
|
|
11283
|
-
children: /* @__PURE__ */ (0,
|
|
11284
|
-
/* @__PURE__ */ (0,
|
|
11285
|
-
/* @__PURE__ */ (0,
|
|
11622
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col", children: [
|
|
11623
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "px-4 py-3 border-b border-border-200", children: [
|
|
11624
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11286
11625
|
NotificationHeader,
|
|
11287
11626
|
{
|
|
11288
11627
|
unreadCount,
|
|
11289
11628
|
variant: "dropdown"
|
|
11290
11629
|
}
|
|
11291
11630
|
),
|
|
11292
|
-
unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ (0,
|
|
11631
|
+
unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11293
11632
|
"button",
|
|
11294
11633
|
{
|
|
11295
11634
|
type: "button",
|
|
@@ -11299,7 +11638,7 @@ var NotificationCenter = ({
|
|
|
11299
11638
|
}
|
|
11300
11639
|
)
|
|
11301
11640
|
] }),
|
|
11302
|
-
/* @__PURE__ */ (0,
|
|
11641
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11303
11642
|
NotificationList,
|
|
11304
11643
|
{
|
|
11305
11644
|
groupedNotifications,
|
|
@@ -11324,7 +11663,7 @@ var NotificationCenter = ({
|
|
|
11324
11663
|
}
|
|
11325
11664
|
)
|
|
11326
11665
|
] }),
|
|
11327
|
-
/* @__PURE__ */ (0,
|
|
11666
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11328
11667
|
Modal_default,
|
|
11329
11668
|
{
|
|
11330
11669
|
isOpen: globalNotificationModal.isOpen,
|
|
@@ -11343,7 +11682,7 @@ var NotificationCenter = ({
|
|
|
11343
11682
|
var NotificationCard = (props) => {
|
|
11344
11683
|
switch (props.mode) {
|
|
11345
11684
|
case "single":
|
|
11346
|
-
return /* @__PURE__ */ (0,
|
|
11685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11347
11686
|
SingleNotificationCard,
|
|
11348
11687
|
{
|
|
11349
11688
|
title: props.title,
|
|
@@ -11358,7 +11697,7 @@ var NotificationCard = (props) => {
|
|
|
11358
11697
|
}
|
|
11359
11698
|
);
|
|
11360
11699
|
case "list":
|
|
11361
|
-
return /* @__PURE__ */ (0,
|
|
11700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11362
11701
|
NotificationList,
|
|
11363
11702
|
{
|
|
11364
11703
|
groupedNotifications: props.groupedNotifications ?? (props.notifications ? [
|
|
@@ -11381,9 +11720,9 @@ var NotificationCard = (props) => {
|
|
|
11381
11720
|
}
|
|
11382
11721
|
);
|
|
11383
11722
|
case "center":
|
|
11384
|
-
return /* @__PURE__ */ (0,
|
|
11723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NotificationCenter, { ...props });
|
|
11385
11724
|
default:
|
|
11386
|
-
return /* @__PURE__ */ (0,
|
|
11725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm text-text-600", children: "Modo de notifica\xE7\xE3o n\xE3o reconhecido" }) });
|
|
11387
11726
|
}
|
|
11388
11727
|
};
|
|
11389
11728
|
var NotificationCard_default = NotificationCard;
|
|
@@ -11601,6 +11940,8 @@ var createNotificationsHook = (apiClient) => {
|
|
|
11601
11940
|
SkeletonTable,
|
|
11602
11941
|
SkeletonText,
|
|
11603
11942
|
Stepper,
|
|
11943
|
+
SubjectEnum,
|
|
11944
|
+
SubjectInfo,
|
|
11604
11945
|
Table,
|
|
11605
11946
|
Text,
|
|
11606
11947
|
TextArea,
|
|
@@ -11618,6 +11959,10 @@ var createNotificationsHook = (apiClient) => {
|
|
|
11618
11959
|
getDeviceType,
|
|
11619
11960
|
getRootDomain,
|
|
11620
11961
|
getStatusBadge,
|
|
11962
|
+
getSubjectColorClass,
|
|
11963
|
+
getSubjectData,
|
|
11964
|
+
getSubjectIcon,
|
|
11965
|
+
getSubjectName,
|
|
11621
11966
|
useApiConfig,
|
|
11622
11967
|
useAuth,
|
|
11623
11968
|
useAuthGuard,
|