analytica-frontend-lib 1.1.30 → 1.1.32
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 +294 -159
- package/dist/Accordation/index.js.map +1 -1
- package/dist/Accordation/index.mjs +285 -160
- package/dist/Accordation/index.mjs.map +1 -1
- package/dist/Card/index.d.mts +1 -1
- package/dist/Card/index.d.ts +1 -1
- package/dist/Card/index.js +288 -153
- package/dist/Card/index.js.map +1 -1
- package/dist/Card/index.mjs +279 -154
- package/dist/Card/index.mjs.map +1 -1
- package/dist/Quiz/index.js +561 -369
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs +552 -371
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/Quiz/useQuizStore/index.d.mts +12 -1
- package/dist/Quiz/useQuizStore/index.d.ts +12 -1
- package/dist/Quiz/useQuizStore/index.js +42 -0
- package/dist/Quiz/useQuizStore/index.js.map +1 -1
- package/dist/Quiz/useQuizStore/index.mjs +41 -0
- package/dist/Quiz/useQuizStore/index.mjs.map +1 -1
- package/dist/Select/index.js +3 -5
- package/dist/Select/index.js.map +1 -1
- package/dist/Select/index.mjs +3 -5
- package/dist/Select/index.mjs.map +1 -1
- package/dist/index.js +408 -349
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +409 -351
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/Quiz/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// src/components/Quiz/Quiz.tsx
|
|
@@ -966,10 +976,12 @@ var import_react12 = require("react");
|
|
|
966
976
|
// src/components/Quiz/useQuizStore.ts
|
|
967
977
|
var import_zustand2 = require("zustand");
|
|
968
978
|
var import_middleware = require("zustand/middleware");
|
|
979
|
+
var MINUTE_INTERVAL_MS = 6e4;
|
|
969
980
|
var useQuizStore = (0, import_zustand2.create)()(
|
|
970
981
|
(0, import_middleware.devtools)(
|
|
971
982
|
(set, get) => {
|
|
972
983
|
let timerInterval = null;
|
|
984
|
+
let minuteCallbackInterval = null;
|
|
973
985
|
const startTimer = () => {
|
|
974
986
|
if (get().isFinished) {
|
|
975
987
|
return;
|
|
@@ -988,6 +1000,35 @@ var useQuizStore = (0, import_zustand2.create)()(
|
|
|
988
1000
|
timerInterval = null;
|
|
989
1001
|
}
|
|
990
1002
|
};
|
|
1003
|
+
const setMinuteCallback = (callback) => {
|
|
1004
|
+
set({ minuteCallback: callback });
|
|
1005
|
+
};
|
|
1006
|
+
const startMinuteCallback = () => {
|
|
1007
|
+
const { minuteCallback, isFinished } = get();
|
|
1008
|
+
if (isFinished || !minuteCallback) {
|
|
1009
|
+
return;
|
|
1010
|
+
}
|
|
1011
|
+
if (minuteCallbackInterval) {
|
|
1012
|
+
clearInterval(minuteCallbackInterval);
|
|
1013
|
+
}
|
|
1014
|
+
minuteCallbackInterval = setInterval(() => {
|
|
1015
|
+
const {
|
|
1016
|
+
minuteCallback: currentCallback,
|
|
1017
|
+
isFinished: currentIsFinished
|
|
1018
|
+
} = get();
|
|
1019
|
+
if (currentIsFinished || !currentCallback) {
|
|
1020
|
+
stopMinuteCallback();
|
|
1021
|
+
return;
|
|
1022
|
+
}
|
|
1023
|
+
currentCallback();
|
|
1024
|
+
}, MINUTE_INTERVAL_MS);
|
|
1025
|
+
};
|
|
1026
|
+
const stopMinuteCallback = () => {
|
|
1027
|
+
if (minuteCallbackInterval) {
|
|
1028
|
+
clearInterval(minuteCallbackInterval);
|
|
1029
|
+
minuteCallbackInterval = null;
|
|
1030
|
+
}
|
|
1031
|
+
};
|
|
991
1032
|
return {
|
|
992
1033
|
// Initial State
|
|
993
1034
|
currentQuestionIndex: 0,
|
|
@@ -998,6 +1039,7 @@ var useQuizStore = (0, import_zustand2.create)()(
|
|
|
998
1039
|
isFinished: false,
|
|
999
1040
|
userId: "",
|
|
1000
1041
|
variant: "default",
|
|
1042
|
+
minuteCallback: null,
|
|
1001
1043
|
questionsResult: null,
|
|
1002
1044
|
currentQuestionResult: null,
|
|
1003
1045
|
// Setters
|
|
@@ -1232,13 +1274,16 @@ var useQuizStore = (0, import_zustand2.create)()(
|
|
|
1232
1274
|
startQuiz: () => {
|
|
1233
1275
|
set({ isStarted: true, timeElapsed: 0 });
|
|
1234
1276
|
startTimer();
|
|
1277
|
+
startMinuteCallback();
|
|
1235
1278
|
},
|
|
1236
1279
|
finishQuiz: () => {
|
|
1237
1280
|
set({ isFinished: true });
|
|
1238
1281
|
stopTimer();
|
|
1282
|
+
stopMinuteCallback();
|
|
1239
1283
|
},
|
|
1240
1284
|
resetQuiz: () => {
|
|
1241
1285
|
stopTimer();
|
|
1286
|
+
stopMinuteCallback();
|
|
1242
1287
|
set({
|
|
1243
1288
|
currentQuestionIndex: 0,
|
|
1244
1289
|
selectedAnswers: {},
|
|
@@ -1248,6 +1293,7 @@ var useQuizStore = (0, import_zustand2.create)()(
|
|
|
1248
1293
|
isFinished: false,
|
|
1249
1294
|
userId: "",
|
|
1250
1295
|
variant: "default",
|
|
1296
|
+
minuteCallback: null,
|
|
1251
1297
|
questionsResult: null,
|
|
1252
1298
|
currentQuestionResult: null
|
|
1253
1299
|
});
|
|
@@ -1256,6 +1302,10 @@ var useQuizStore = (0, import_zustand2.create)()(
|
|
|
1256
1302
|
updateTime: (time) => set({ timeElapsed: time }),
|
|
1257
1303
|
startTimer,
|
|
1258
1304
|
stopTimer,
|
|
1305
|
+
// Minute Callback
|
|
1306
|
+
setMinuteCallback,
|
|
1307
|
+
startMinuteCallback,
|
|
1308
|
+
stopMinuteCallback,
|
|
1259
1309
|
// Getters
|
|
1260
1310
|
getCurrentQuestion: () => {
|
|
1261
1311
|
const { currentQuestionIndex, getActiveQuiz } = get();
|
|
@@ -2039,12 +2089,10 @@ var SelectItem = (0, import_react6.forwardRef)(
|
|
|
2039
2089
|
const handleClick = (e) => {
|
|
2040
2090
|
const labelNode = getLabelAsNode(children);
|
|
2041
2091
|
if (!disabled) {
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
setValue(newValue);
|
|
2045
|
-
setSelectedLabel(newLabel);
|
|
2092
|
+
setValue(value);
|
|
2093
|
+
setSelectedLabel(labelNode);
|
|
2046
2094
|
setOpen(false);
|
|
2047
|
-
onValueChange?.(
|
|
2095
|
+
onValueChange?.(value);
|
|
2048
2096
|
}
|
|
2049
2097
|
props.onClick?.(e);
|
|
2050
2098
|
};
|
|
@@ -2559,7 +2607,132 @@ var ProgressBar_default = ProgressBar;
|
|
|
2559
2607
|
|
|
2560
2608
|
// src/components/Card/Card.tsx
|
|
2561
2609
|
var import_phosphor_react5 = require("phosphor-react");
|
|
2610
|
+
|
|
2611
|
+
// src/components/IconRender/IconRender.tsx
|
|
2612
|
+
var PhosphorIcons = __toESM(require("phosphor-react"));
|
|
2562
2613
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2614
|
+
var ChatPT = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2615
|
+
"svg",
|
|
2616
|
+
{
|
|
2617
|
+
width: size,
|
|
2618
|
+
height: size,
|
|
2619
|
+
viewBox: "0 0 32 32",
|
|
2620
|
+
fill: "none",
|
|
2621
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2622
|
+
children: [
|
|
2623
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2624
|
+
"path",
|
|
2625
|
+
{
|
|
2626
|
+
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",
|
|
2627
|
+
fill: color
|
|
2628
|
+
}
|
|
2629
|
+
),
|
|
2630
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2631
|
+
"path",
|
|
2632
|
+
{
|
|
2633
|
+
d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
|
|
2634
|
+
fill: color
|
|
2635
|
+
}
|
|
2636
|
+
),
|
|
2637
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2638
|
+
"path",
|
|
2639
|
+
{
|
|
2640
|
+
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",
|
|
2641
|
+
fill: color
|
|
2642
|
+
}
|
|
2643
|
+
)
|
|
2644
|
+
]
|
|
2645
|
+
}
|
|
2646
|
+
);
|
|
2647
|
+
var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2648
|
+
"svg",
|
|
2649
|
+
{
|
|
2650
|
+
width: size,
|
|
2651
|
+
height: size,
|
|
2652
|
+
viewBox: "0 0 32 32",
|
|
2653
|
+
fill: "none",
|
|
2654
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2655
|
+
children: [
|
|
2656
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2657
|
+
"path",
|
|
2658
|
+
{
|
|
2659
|
+
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",
|
|
2660
|
+
fill: color
|
|
2661
|
+
}
|
|
2662
|
+
),
|
|
2663
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2664
|
+
"path",
|
|
2665
|
+
{
|
|
2666
|
+
d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
|
|
2667
|
+
fill: color
|
|
2668
|
+
}
|
|
2669
|
+
),
|
|
2670
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2671
|
+
"path",
|
|
2672
|
+
{
|
|
2673
|
+
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",
|
|
2674
|
+
fill: color
|
|
2675
|
+
}
|
|
2676
|
+
)
|
|
2677
|
+
]
|
|
2678
|
+
}
|
|
2679
|
+
);
|
|
2680
|
+
var ChatES = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2681
|
+
"svg",
|
|
2682
|
+
{
|
|
2683
|
+
width: size,
|
|
2684
|
+
height: size,
|
|
2685
|
+
viewBox: "0 0 32 32",
|
|
2686
|
+
fill: "none",
|
|
2687
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2688
|
+
children: [
|
|
2689
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2690
|
+
"path",
|
|
2691
|
+
{
|
|
2692
|
+
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",
|
|
2693
|
+
fill: color
|
|
2694
|
+
}
|
|
2695
|
+
),
|
|
2696
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2697
|
+
"path",
|
|
2698
|
+
{
|
|
2699
|
+
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",
|
|
2700
|
+
fill: color
|
|
2701
|
+
}
|
|
2702
|
+
),
|
|
2703
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2704
|
+
"path",
|
|
2705
|
+
{
|
|
2706
|
+
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",
|
|
2707
|
+
fill: color
|
|
2708
|
+
}
|
|
2709
|
+
)
|
|
2710
|
+
]
|
|
2711
|
+
}
|
|
2712
|
+
);
|
|
2713
|
+
var IconRender = ({
|
|
2714
|
+
iconName,
|
|
2715
|
+
color = "#000000",
|
|
2716
|
+
size = 24,
|
|
2717
|
+
weight = "regular"
|
|
2718
|
+
}) => {
|
|
2719
|
+
switch (iconName) {
|
|
2720
|
+
case "Chat_PT":
|
|
2721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ChatPT, { size, color });
|
|
2722
|
+
case "Chat_EN":
|
|
2723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ChatEN, { size, color });
|
|
2724
|
+
case "Chat_ES":
|
|
2725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ChatES, { size, color });
|
|
2726
|
+
default: {
|
|
2727
|
+
const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
|
|
2728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(IconComponent, { size, color, weight });
|
|
2729
|
+
}
|
|
2730
|
+
}
|
|
2731
|
+
};
|
|
2732
|
+
var IconRender_default = IconRender;
|
|
2733
|
+
|
|
2734
|
+
// src/components/Card/Card.tsx
|
|
2735
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2563
2736
|
var CARD_BASE_CLASSES = {
|
|
2564
2737
|
default: "w-full bg-background border border-border-50 rounded-xl",
|
|
2565
2738
|
compact: "w-full bg-background border border-border-50 rounded-lg",
|
|
@@ -2609,7 +2782,7 @@ var CardBase = (0, import_react7.forwardRef)(
|
|
|
2609
2782
|
cursorClasses,
|
|
2610
2783
|
className
|
|
2611
2784
|
].filter(Boolean).join(" ");
|
|
2612
|
-
return /* @__PURE__ */ (0,
|
|
2785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { ref, className: combinedClasses, ...props, children });
|
|
2613
2786
|
}
|
|
2614
2787
|
);
|
|
2615
2788
|
var ACTION_CARD_CLASSES = {
|
|
@@ -2652,7 +2825,7 @@ var CardActivitiesResults = (0, import_react7.forwardRef)(
|
|
|
2652
2825
|
const actionIconClasses = ACTION_ICON_CLASSES[action];
|
|
2653
2826
|
const actionSubTitleClasses = ACTION_SUBTITLE_CLASSES[action];
|
|
2654
2827
|
const actionHeaderClasses = ACTION_HEADER_CLASSES[action];
|
|
2655
|
-
return /* @__PURE__ */ (0,
|
|
2828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2656
2829
|
"div",
|
|
2657
2830
|
{
|
|
2658
2831
|
ref,
|
|
@@ -2662,7 +2835,7 @@ var CardActivitiesResults = (0, import_react7.forwardRef)(
|
|
|
2662
2835
|
),
|
|
2663
2836
|
...props,
|
|
2664
2837
|
children: [
|
|
2665
|
-
/* @__PURE__ */ (0,
|
|
2838
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2666
2839
|
"div",
|
|
2667
2840
|
{
|
|
2668
2841
|
className: cn(
|
|
@@ -2671,7 +2844,7 @@ var CardActivitiesResults = (0, import_react7.forwardRef)(
|
|
|
2671
2844
|
extended ? "rounded-t-xl" : "rounded-xl"
|
|
2672
2845
|
),
|
|
2673
2846
|
children: [
|
|
2674
|
-
/* @__PURE__ */ (0,
|
|
2847
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2675
2848
|
"span",
|
|
2676
2849
|
{
|
|
2677
2850
|
className: cn(
|
|
@@ -2681,7 +2854,7 @@ var CardActivitiesResults = (0, import_react7.forwardRef)(
|
|
|
2681
2854
|
children: icon
|
|
2682
2855
|
}
|
|
2683
2856
|
),
|
|
2684
|
-
/* @__PURE__ */ (0,
|
|
2857
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2685
2858
|
Text_default,
|
|
2686
2859
|
{
|
|
2687
2860
|
size: "2xs",
|
|
@@ -2690,7 +2863,7 @@ var CardActivitiesResults = (0, import_react7.forwardRef)(
|
|
|
2690
2863
|
children: title
|
|
2691
2864
|
}
|
|
2692
2865
|
),
|
|
2693
|
-
/* @__PURE__ */ (0,
|
|
2866
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2694
2867
|
"p",
|
|
2695
2868
|
{
|
|
2696
2869
|
className: cn("text-lg font-bold truncate", actionSubTitleClasses),
|
|
@@ -2700,8 +2873,8 @@ var CardActivitiesResults = (0, import_react7.forwardRef)(
|
|
|
2700
2873
|
]
|
|
2701
2874
|
}
|
|
2702
2875
|
),
|
|
2703
|
-
extended && /* @__PURE__ */ (0,
|
|
2704
|
-
/* @__PURE__ */ (0,
|
|
2876
|
+
extended && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col items-center gap-2.5 pb-9.5 pt-2.5", children: [
|
|
2877
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2705
2878
|
"p",
|
|
2706
2879
|
{
|
|
2707
2880
|
className: cn(
|
|
@@ -2711,7 +2884,7 @@ var CardActivitiesResults = (0, import_react7.forwardRef)(
|
|
|
2711
2884
|
children: header
|
|
2712
2885
|
}
|
|
2713
2886
|
),
|
|
2714
|
-
/* @__PURE__ */ (0,
|
|
2887
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Badge_default, { size: "large", action: "info", children: description })
|
|
2715
2888
|
] })
|
|
2716
2889
|
]
|
|
2717
2890
|
}
|
|
@@ -2730,7 +2903,7 @@ var CardQuestions = (0, import_react7.forwardRef)(
|
|
|
2730
2903
|
const isDone = state === "done";
|
|
2731
2904
|
const stateLabel = isDone ? "Realizado" : "N\xE3o Realizado";
|
|
2732
2905
|
const buttonLabel = isDone ? "Ver Quest\xE3o" : "Responder";
|
|
2733
|
-
return /* @__PURE__ */ (0,
|
|
2906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2734
2907
|
CardBase,
|
|
2735
2908
|
{
|
|
2736
2909
|
ref,
|
|
@@ -2740,10 +2913,10 @@ var CardQuestions = (0, import_react7.forwardRef)(
|
|
|
2740
2913
|
className: cn("justify-between gap-4", className),
|
|
2741
2914
|
...props,
|
|
2742
2915
|
children: [
|
|
2743
|
-
/* @__PURE__ */ (0,
|
|
2744
|
-
/* @__PURE__ */ (0,
|
|
2745
|
-
/* @__PURE__ */ (0,
|
|
2746
|
-
/* @__PURE__ */ (0,
|
|
2916
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
2917
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "font-bold text-xs text-text-950 truncate", children: header }),
|
|
2918
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-row gap-6 items-center", children: [
|
|
2919
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2747
2920
|
Badge_default,
|
|
2748
2921
|
{
|
|
2749
2922
|
size: "medium",
|
|
@@ -2752,13 +2925,13 @@ var CardQuestions = (0, import_react7.forwardRef)(
|
|
|
2752
2925
|
children: stateLabel
|
|
2753
2926
|
}
|
|
2754
2927
|
),
|
|
2755
|
-
/* @__PURE__ */ (0,
|
|
2928
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex flex-row items-center gap-1 text-text-700 text-xs", children: [
|
|
2756
2929
|
isDone ? "Nota" : "Sem nota",
|
|
2757
|
-
isDone && /* @__PURE__ */ (0,
|
|
2930
|
+
isDone && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Badge_default, { size: "medium", action: "success", children: "00" })
|
|
2758
2931
|
] })
|
|
2759
2932
|
] })
|
|
2760
2933
|
] }),
|
|
2761
|
-
/* @__PURE__ */ (0,
|
|
2934
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2762
2935
|
Button_default,
|
|
2763
2936
|
{
|
|
2764
2937
|
size: "extra-small",
|
|
@@ -2789,19 +2962,19 @@ var CardProgress = (0, import_react7.forwardRef)(
|
|
|
2789
2962
|
}, ref) => {
|
|
2790
2963
|
const isHorizontal = direction === "horizontal";
|
|
2791
2964
|
const contentComponent = {
|
|
2792
|
-
horizontal: /* @__PURE__ */ (0,
|
|
2793
|
-
showDates && /* @__PURE__ */ (0,
|
|
2794
|
-
initialDate && /* @__PURE__ */ (0,
|
|
2795
|
-
/* @__PURE__ */ (0,
|
|
2796
|
-
/* @__PURE__ */ (0,
|
|
2965
|
+
horizontal: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
2966
|
+
showDates && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-row gap-6 items-center", children: [
|
|
2967
|
+
initialDate && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
2968
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-text-800 font-semibold", children: "In\xEDcio" }),
|
|
2969
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-text-600", children: initialDate })
|
|
2797
2970
|
] }),
|
|
2798
|
-
endDate && /* @__PURE__ */ (0,
|
|
2799
|
-
/* @__PURE__ */ (0,
|
|
2800
|
-
/* @__PURE__ */ (0,
|
|
2971
|
+
endDate && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
2972
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-text-800 font-semibold", children: "Fim" }),
|
|
2973
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-text-600", children: endDate })
|
|
2801
2974
|
] })
|
|
2802
2975
|
] }),
|
|
2803
|
-
/* @__PURE__ */ (0,
|
|
2804
|
-
/* @__PURE__ */ (0,
|
|
2976
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
2977
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2805
2978
|
ProgressBar_default,
|
|
2806
2979
|
{
|
|
2807
2980
|
size: "small",
|
|
@@ -2810,7 +2983,7 @@ var CardProgress = (0, import_react7.forwardRef)(
|
|
|
2810
2983
|
"data-testid": "progress-bar"
|
|
2811
2984
|
}
|
|
2812
2985
|
),
|
|
2813
|
-
/* @__PURE__ */ (0,
|
|
2986
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2814
2987
|
Text_default,
|
|
2815
2988
|
{
|
|
2816
2989
|
size: "xs",
|
|
@@ -2826,9 +2999,9 @@ var CardProgress = (0, import_react7.forwardRef)(
|
|
|
2826
2999
|
)
|
|
2827
3000
|
] })
|
|
2828
3001
|
] }),
|
|
2829
|
-
vertical: /* @__PURE__ */ (0,
|
|
3002
|
+
vertical: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-text-800", children: subhead })
|
|
2830
3003
|
};
|
|
2831
|
-
return /* @__PURE__ */ (0,
|
|
3004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2832
3005
|
CardBase,
|
|
2833
3006
|
{
|
|
2834
3007
|
ref,
|
|
@@ -2839,7 +3012,7 @@ var CardProgress = (0, import_react7.forwardRef)(
|
|
|
2839
3012
|
className: cn(isHorizontal ? "h-20" : "", className),
|
|
2840
3013
|
...props,
|
|
2841
3014
|
children: [
|
|
2842
|
-
/* @__PURE__ */ (0,
|
|
3015
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2843
3016
|
"div",
|
|
2844
3017
|
{
|
|
2845
3018
|
className: cn(
|
|
@@ -2852,7 +3025,7 @@ var CardProgress = (0, import_react7.forwardRef)(
|
|
|
2852
3025
|
children: icon
|
|
2853
3026
|
}
|
|
2854
3027
|
),
|
|
2855
|
-
/* @__PURE__ */ (0,
|
|
3028
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2856
3029
|
"div",
|
|
2857
3030
|
{
|
|
2858
3031
|
className: cn(
|
|
@@ -2860,7 +3033,7 @@ var CardProgress = (0, import_react7.forwardRef)(
|
|
|
2860
3033
|
!isHorizontal && "gap-4"
|
|
2861
3034
|
),
|
|
2862
3035
|
children: [
|
|
2863
|
-
/* @__PURE__ */ (0,
|
|
3036
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-950 truncate", children: header }),
|
|
2864
3037
|
contentComponent[direction]
|
|
2865
3038
|
]
|
|
2866
3039
|
}
|
|
@@ -2880,7 +3053,7 @@ var CardTopic = (0, import_react7.forwardRef)(
|
|
|
2880
3053
|
className = "",
|
|
2881
3054
|
...props
|
|
2882
3055
|
}, ref) => {
|
|
2883
|
-
return /* @__PURE__ */ (0,
|
|
3056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2884
3057
|
CardBase,
|
|
2885
3058
|
{
|
|
2886
3059
|
ref,
|
|
@@ -2891,13 +3064,13 @@ var CardTopic = (0, import_react7.forwardRef)(
|
|
|
2891
3064
|
className: cn("justify-center gap-2 py-2 px-4", className),
|
|
2892
3065
|
...props,
|
|
2893
3066
|
children: [
|
|
2894
|
-
subHead && /* @__PURE__ */ (0,
|
|
2895
|
-
/* @__PURE__ */ (0,
|
|
2896
|
-
index < subHead.length - 1 && /* @__PURE__ */ (0,
|
|
3067
|
+
subHead && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react7.Fragment, { children: [
|
|
3068
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: text }),
|
|
3069
|
+
index < subHead.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: "\u2022" })
|
|
2897
3070
|
] }, `${text} - ${index}`)) }),
|
|
2898
|
-
/* @__PURE__ */ (0,
|
|
2899
|
-
/* @__PURE__ */ (0,
|
|
2900
|
-
/* @__PURE__ */ (0,
|
|
3071
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-text-950 font-bold truncate", children: header }),
|
|
3072
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
3073
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2901
3074
|
ProgressBar_default,
|
|
2902
3075
|
{
|
|
2903
3076
|
size: "small",
|
|
@@ -2906,7 +3079,7 @@ var CardTopic = (0, import_react7.forwardRef)(
|
|
|
2906
3079
|
"data-testid": "progress-bar"
|
|
2907
3080
|
}
|
|
2908
3081
|
),
|
|
2909
|
-
showPercentage && /* @__PURE__ */ (0,
|
|
3082
|
+
showPercentage && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2910
3083
|
Text_default,
|
|
2911
3084
|
{
|
|
2912
3085
|
size: "xs",
|
|
@@ -2940,7 +3113,7 @@ var CardPerformance = (0, import_react7.forwardRef)(
|
|
|
2940
3113
|
...props
|
|
2941
3114
|
}, ref) => {
|
|
2942
3115
|
const hasProgress = progress !== void 0;
|
|
2943
|
-
return /* @__PURE__ */ (0,
|
|
3116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2944
3117
|
CardBase,
|
|
2945
3118
|
{
|
|
2946
3119
|
ref,
|
|
@@ -2954,10 +3127,10 @@ var CardPerformance = (0, import_react7.forwardRef)(
|
|
|
2954
3127
|
onClick: () => actionVariant == "caret" && onClickButton?.(valueButton),
|
|
2955
3128
|
...props,
|
|
2956
3129
|
children: [
|
|
2957
|
-
/* @__PURE__ */ (0,
|
|
2958
|
-
/* @__PURE__ */ (0,
|
|
2959
|
-
/* @__PURE__ */ (0,
|
|
2960
|
-
actionVariant === "button" && /* @__PURE__ */ (0,
|
|
3130
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
3131
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-row justify-between items-center gap-2", children: [
|
|
3132
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-lg font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
3133
|
+
actionVariant === "button" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2961
3134
|
Button_default,
|
|
2962
3135
|
{
|
|
2963
3136
|
variant: "outline",
|
|
@@ -2968,16 +3141,16 @@ var CardPerformance = (0, import_react7.forwardRef)(
|
|
|
2968
3141
|
}
|
|
2969
3142
|
)
|
|
2970
3143
|
] }),
|
|
2971
|
-
/* @__PURE__ */ (0,
|
|
3144
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2972
3145
|
ProgressBar_default,
|
|
2973
3146
|
{
|
|
2974
3147
|
value: progress,
|
|
2975
3148
|
label: `${progress}% ${labelProgress}`,
|
|
2976
3149
|
variant: progressVariant
|
|
2977
3150
|
}
|
|
2978
|
-
) : /* @__PURE__ */ (0,
|
|
3151
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs text-text-600 truncate", children: description }) })
|
|
2979
3152
|
] }),
|
|
2980
|
-
actionVariant == "caret" && /* @__PURE__ */ (0,
|
|
3153
|
+
actionVariant == "caret" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2981
3154
|
import_phosphor_react5.CaretRight,
|
|
2982
3155
|
{
|
|
2983
3156
|
className: "size-4.5 text-text-800 cursor-pointer",
|
|
@@ -3001,7 +3174,7 @@ var CardResults = (0, import_react7.forwardRef)(
|
|
|
3001
3174
|
...props
|
|
3002
3175
|
}, ref) => {
|
|
3003
3176
|
const isRow = direction == "row";
|
|
3004
|
-
return /* @__PURE__ */ (0,
|
|
3177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
3005
3178
|
CardBase,
|
|
3006
3179
|
{
|
|
3007
3180
|
ref,
|
|
@@ -3011,7 +3184,7 @@ var CardResults = (0, import_react7.forwardRef)(
|
|
|
3011
3184
|
className: cn("items-center cursor-pointer pr-4", className),
|
|
3012
3185
|
...props,
|
|
3013
3186
|
children: [
|
|
3014
|
-
/* @__PURE__ */ (0,
|
|
3187
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3015
3188
|
"div",
|
|
3016
3189
|
{
|
|
3017
3190
|
className: cn(
|
|
@@ -3020,10 +3193,10 @@ var CardResults = (0, import_react7.forwardRef)(
|
|
|
3020
3193
|
style: {
|
|
3021
3194
|
backgroundColor: color
|
|
3022
3195
|
},
|
|
3023
|
-
children: icon
|
|
3196
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconRender_default, { iconName: icon, color: "currentColor", size: 20 })
|
|
3024
3197
|
}
|
|
3025
3198
|
),
|
|
3026
|
-
/* @__PURE__ */ (0,
|
|
3199
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
3027
3200
|
"div",
|
|
3028
3201
|
{
|
|
3029
3202
|
className: cn(
|
|
@@ -3031,28 +3204,28 @@ var CardResults = (0, import_react7.forwardRef)(
|
|
|
3031
3204
|
isRow ? "flex-row items-center gap-2" : "flex-col"
|
|
3032
3205
|
),
|
|
3033
3206
|
children: [
|
|
3034
|
-
/* @__PURE__ */ (0,
|
|
3035
|
-
/* @__PURE__ */ (0,
|
|
3036
|
-
/* @__PURE__ */ (0,
|
|
3207
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
3208
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex flex-row gap-1 items-center", children: [
|
|
3209
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
3037
3210
|
Badge_default,
|
|
3038
3211
|
{
|
|
3039
3212
|
action: "success",
|
|
3040
3213
|
variant: "solid",
|
|
3041
3214
|
size: "large",
|
|
3042
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
3215
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.CheckCircle, {}),
|
|
3043
3216
|
children: [
|
|
3044
3217
|
correct_answers,
|
|
3045
3218
|
" Corretas"
|
|
3046
3219
|
]
|
|
3047
3220
|
}
|
|
3048
3221
|
),
|
|
3049
|
-
/* @__PURE__ */ (0,
|
|
3222
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
3050
3223
|
Badge_default,
|
|
3051
3224
|
{
|
|
3052
3225
|
action: "error",
|
|
3053
3226
|
variant: "solid",
|
|
3054
3227
|
size: "large",
|
|
3055
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
3228
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.XCircle, {}),
|
|
3056
3229
|
children: [
|
|
3057
3230
|
incorrect_answers,
|
|
3058
3231
|
" Incorretas"
|
|
@@ -3063,7 +3236,7 @@ var CardResults = (0, import_react7.forwardRef)(
|
|
|
3063
3236
|
]
|
|
3064
3237
|
}
|
|
3065
3238
|
),
|
|
3066
|
-
/* @__PURE__ */ (0,
|
|
3239
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.CaretRight, { className: "min-w-6 min-h-6 text-text-800" })
|
|
3067
3240
|
]
|
|
3068
3241
|
}
|
|
3069
3242
|
);
|
|
@@ -3083,7 +3256,7 @@ var CardStatus = (0, import_react7.forwardRef)(
|
|
|
3083
3256
|
return "Em branco";
|
|
3084
3257
|
}
|
|
3085
3258
|
};
|
|
3086
|
-
return /* @__PURE__ */ (0,
|
|
3259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3087
3260
|
CardBase,
|
|
3088
3261
|
{
|
|
3089
3262
|
ref,
|
|
@@ -3092,22 +3265,22 @@ var CardStatus = (0, import_react7.forwardRef)(
|
|
|
3092
3265
|
minHeight: "medium",
|
|
3093
3266
|
className: cn("items-center cursor-pointer", className),
|
|
3094
3267
|
...props,
|
|
3095
|
-
children: /* @__PURE__ */ (0,
|
|
3096
|
-
/* @__PURE__ */ (0,
|
|
3097
|
-
/* @__PURE__ */ (0,
|
|
3098
|
-
status && /* @__PURE__ */ (0,
|
|
3268
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex justify-between w-full h-full flex-row items-center gap-2", children: [
|
|
3269
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
3270
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex flex-row gap-1 items-center flex-shrink-0", children: [
|
|
3271
|
+
status && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3099
3272
|
Badge_default,
|
|
3100
3273
|
{
|
|
3101
3274
|
action: status == "correct" ? "success" : "error",
|
|
3102
3275
|
variant: "solid",
|
|
3103
3276
|
size: "medium",
|
|
3104
|
-
iconLeft: status == "correct" ? /* @__PURE__ */ (0,
|
|
3277
|
+
iconLeft: status == "correct" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.CheckCircle, {}) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.XCircle, {}),
|
|
3105
3278
|
children: getLabelBadge(status)
|
|
3106
3279
|
}
|
|
3107
3280
|
),
|
|
3108
|
-
label && /* @__PURE__ */ (0,
|
|
3281
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-text-800", children: label })
|
|
3109
3282
|
] }),
|
|
3110
|
-
/* @__PURE__ */ (0,
|
|
3283
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.CaretRight, { className: "min-w-6 min-h-6 text-text-800 cursor-pointer flex-shrink-0 ml-2" })
|
|
3111
3284
|
] })
|
|
3112
3285
|
}
|
|
3113
3286
|
);
|
|
@@ -3115,7 +3288,7 @@ var CardStatus = (0, import_react7.forwardRef)(
|
|
|
3115
3288
|
);
|
|
3116
3289
|
var CardSettings = (0, import_react7.forwardRef)(
|
|
3117
3290
|
({ header, className, icon, ...props }, ref) => {
|
|
3118
|
-
return /* @__PURE__ */ (0,
|
|
3291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
3119
3292
|
CardBase,
|
|
3120
3293
|
{
|
|
3121
3294
|
ref,
|
|
@@ -3128,9 +3301,9 @@ var CardSettings = (0, import_react7.forwardRef)(
|
|
|
3128
3301
|
),
|
|
3129
3302
|
...props,
|
|
3130
3303
|
children: [
|
|
3131
|
-
/* @__PURE__ */ (0,
|
|
3132
|
-
/* @__PURE__ */ (0,
|
|
3133
|
-
/* @__PURE__ */ (0,
|
|
3304
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "[&>svg]:size-6", children: icon }),
|
|
3305
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "w-full text-sm truncate", children: header }),
|
|
3306
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.CaretRight, { size: 24, className: "cursor-pointer" })
|
|
3134
3307
|
]
|
|
3135
3308
|
}
|
|
3136
3309
|
);
|
|
@@ -3138,7 +3311,7 @@ var CardSettings = (0, import_react7.forwardRef)(
|
|
|
3138
3311
|
);
|
|
3139
3312
|
var CardSupport = (0, import_react7.forwardRef)(
|
|
3140
3313
|
({ header, className, direction = "col", children, ...props }, ref) => {
|
|
3141
|
-
return /* @__PURE__ */ (0,
|
|
3314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
3142
3315
|
CardBase,
|
|
3143
3316
|
{
|
|
3144
3317
|
ref,
|
|
@@ -3151,7 +3324,7 @@ var CardSupport = (0, import_react7.forwardRef)(
|
|
|
3151
3324
|
),
|
|
3152
3325
|
...props,
|
|
3153
3326
|
children: [
|
|
3154
|
-
/* @__PURE__ */ (0,
|
|
3327
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
3155
3328
|
"div",
|
|
3156
3329
|
{
|
|
3157
3330
|
className: cn(
|
|
@@ -3159,12 +3332,12 @@ var CardSupport = (0, import_react7.forwardRef)(
|
|
|
3159
3332
|
direction == "col" ? "flex-col" : "flex-row items-center"
|
|
3160
3333
|
),
|
|
3161
3334
|
children: [
|
|
3162
|
-
/* @__PURE__ */ (0,
|
|
3163
|
-
/* @__PURE__ */ (0,
|
|
3335
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-text-950 font-bold truncate", children: header }) }),
|
|
3336
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "flex flex-row gap-1", children })
|
|
3164
3337
|
]
|
|
3165
3338
|
}
|
|
3166
3339
|
),
|
|
3167
|
-
/* @__PURE__ */ (0,
|
|
3340
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.CaretRight, { className: "text-text-800 cursor-pointer", size: 24 })
|
|
3168
3341
|
]
|
|
3169
3342
|
}
|
|
3170
3343
|
);
|
|
@@ -3184,7 +3357,7 @@ var CardForum = (0, import_react7.forwardRef)(
|
|
|
3184
3357
|
hour,
|
|
3185
3358
|
...props
|
|
3186
3359
|
}, ref) => {
|
|
3187
|
-
return /* @__PURE__ */ (0,
|
|
3360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
3188
3361
|
CardBase,
|
|
3189
3362
|
{
|
|
3190
3363
|
ref,
|
|
@@ -3195,7 +3368,7 @@ var CardForum = (0, import_react7.forwardRef)(
|
|
|
3195
3368
|
className: cn("w-auto h-auto gap-3", className),
|
|
3196
3369
|
...props,
|
|
3197
3370
|
children: [
|
|
3198
|
-
/* @__PURE__ */ (0,
|
|
3371
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3199
3372
|
"button",
|
|
3200
3373
|
{
|
|
3201
3374
|
type: "button",
|
|
@@ -3204,18 +3377,18 @@ var CardForum = (0, import_react7.forwardRef)(
|
|
|
3204
3377
|
className: "min-w-8 h-8 rounded-full bg-background-950"
|
|
3205
3378
|
}
|
|
3206
3379
|
),
|
|
3207
|
-
/* @__PURE__ */ (0,
|
|
3208
|
-
/* @__PURE__ */ (0,
|
|
3209
|
-
/* @__PURE__ */ (0,
|
|
3210
|
-
/* @__PURE__ */ (0,
|
|
3380
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
|
|
3381
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-row gap-1 items-center flex-wrap", children: [
|
|
3382
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs font-semibold text-primary-700 truncate", children: title }),
|
|
3383
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { className: "text-xs text-text-600", children: [
|
|
3211
3384
|
"\u2022 ",
|
|
3212
3385
|
date,
|
|
3213
3386
|
" \u2022 ",
|
|
3214
3387
|
hour
|
|
3215
3388
|
] })
|
|
3216
3389
|
] }),
|
|
3217
|
-
/* @__PURE__ */ (0,
|
|
3218
|
-
/* @__PURE__ */ (0,
|
|
3390
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-text-950 text-sm line-clamp-2 truncate", children: content }),
|
|
3391
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
3219
3392
|
"button",
|
|
3220
3393
|
{
|
|
3221
3394
|
type: "button",
|
|
@@ -3223,8 +3396,8 @@ var CardForum = (0, import_react7.forwardRef)(
|
|
|
3223
3396
|
onClick: () => onClickComments?.(valueComments),
|
|
3224
3397
|
className: "text-text-600 flex flex-row gap-2 items-center",
|
|
3225
3398
|
children: [
|
|
3226
|
-
/* @__PURE__ */ (0,
|
|
3227
|
-
/* @__PURE__ */ (0,
|
|
3399
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.ChatCircleText, { "aria-hidden": "true", size: 16 }),
|
|
3400
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { className: "text-xs", children: [
|
|
3228
3401
|
comments,
|
|
3229
3402
|
" respostas"
|
|
3230
3403
|
] })
|
|
@@ -3323,14 +3496,14 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
3323
3496
|
};
|
|
3324
3497
|
const getVolumeIcon = () => {
|
|
3325
3498
|
if (volume === 0) {
|
|
3326
|
-
return /* @__PURE__ */ (0,
|
|
3499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.SpeakerSimpleX, {});
|
|
3327
3500
|
}
|
|
3328
3501
|
if (volume < 0.5) {
|
|
3329
|
-
return /* @__PURE__ */ (0,
|
|
3502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.SpeakerLow, {});
|
|
3330
3503
|
}
|
|
3331
|
-
return /* @__PURE__ */ (0,
|
|
3504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.SpeakerHigh, {});
|
|
3332
3505
|
};
|
|
3333
|
-
return /* @__PURE__ */ (0,
|
|
3506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
3334
3507
|
CardBase,
|
|
3335
3508
|
{
|
|
3336
3509
|
ref,
|
|
@@ -3340,7 +3513,7 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
3340
3513
|
className: cn("w-auto h-14 items-center gap-2", className),
|
|
3341
3514
|
...props,
|
|
3342
3515
|
children: [
|
|
3343
|
-
/* @__PURE__ */ (0,
|
|
3516
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3344
3517
|
"audio",
|
|
3345
3518
|
{
|
|
3346
3519
|
ref: audioRef,
|
|
@@ -3352,7 +3525,7 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
3352
3525
|
onEnded: handleEnded,
|
|
3353
3526
|
"data-testid": "audio-element",
|
|
3354
3527
|
"aria-label": title,
|
|
3355
|
-
children: tracks ? tracks.map((track) => /* @__PURE__ */ (0,
|
|
3528
|
+
children: tracks ? tracks.map((track) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3356
3529
|
"track",
|
|
3357
3530
|
{
|
|
3358
3531
|
kind: track.kind,
|
|
@@ -3362,7 +3535,7 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
3362
3535
|
default: track.default
|
|
3363
3536
|
},
|
|
3364
3537
|
track.src
|
|
3365
|
-
)) : /* @__PURE__ */ (0,
|
|
3538
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3366
3539
|
"track",
|
|
3367
3540
|
{
|
|
3368
3541
|
kind: "captions",
|
|
@@ -3373,7 +3546,7 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
3373
3546
|
)
|
|
3374
3547
|
}
|
|
3375
3548
|
),
|
|
3376
|
-
/* @__PURE__ */ (0,
|
|
3549
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3377
3550
|
"button",
|
|
3378
3551
|
{
|
|
3379
3552
|
type: "button",
|
|
@@ -3381,14 +3554,14 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
3381
3554
|
disabled: !src,
|
|
3382
3555
|
className: "cursor-pointer text-text-950 hover:text-primary-600 disabled:text-text-400 disabled:cursor-not-allowed",
|
|
3383
3556
|
"aria-label": isPlaying ? "Pausar" : "Reproduzir",
|
|
3384
|
-
children: isPlaying ? /* @__PURE__ */ (0,
|
|
3385
|
-
/* @__PURE__ */ (0,
|
|
3386
|
-
/* @__PURE__ */ (0,
|
|
3387
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
3557
|
+
children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex gap-0.5", children: [
|
|
3558
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w-1 h-4 bg-current rounded-sm" }),
|
|
3559
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w-1 h-4 bg-current rounded-sm" })
|
|
3560
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.Play, { size: 24 })
|
|
3388
3561
|
}
|
|
3389
3562
|
),
|
|
3390
|
-
/* @__PURE__ */ (0,
|
|
3391
|
-
/* @__PURE__ */ (0,
|
|
3563
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-text-800 text-sm font-medium min-w-[2.5rem]", children: formatTime(currentTime) }),
|
|
3564
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex-1 relative", "data-testid": "progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3392
3565
|
"button",
|
|
3393
3566
|
{
|
|
3394
3567
|
type: "button",
|
|
@@ -3403,7 +3576,7 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
3403
3576
|
}
|
|
3404
3577
|
},
|
|
3405
3578
|
"aria-label": "Barra de progresso do \xE1udio",
|
|
3406
|
-
children: /* @__PURE__ */ (0,
|
|
3579
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3407
3580
|
"div",
|
|
3408
3581
|
{
|
|
3409
3582
|
className: "h-full bg-primary-600 rounded-full transition-all duration-100",
|
|
@@ -3414,19 +3587,19 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
3414
3587
|
)
|
|
3415
3588
|
}
|
|
3416
3589
|
) }),
|
|
3417
|
-
/* @__PURE__ */ (0,
|
|
3418
|
-
/* @__PURE__ */ (0,
|
|
3419
|
-
/* @__PURE__ */ (0,
|
|
3590
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-text-800 text-sm font-medium min-w-[2.5rem]", children: formatTime(duration) }),
|
|
3591
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "relative", children: [
|
|
3592
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3420
3593
|
"button",
|
|
3421
3594
|
{
|
|
3422
3595
|
type: "button",
|
|
3423
3596
|
onClick: toggleVolumeControl,
|
|
3424
3597
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
3425
3598
|
"aria-label": "Controle de volume",
|
|
3426
|
-
children: /* @__PURE__ */ (0,
|
|
3599
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w-6 h-6 flex items-center justify-center", children: getVolumeIcon() })
|
|
3427
3600
|
}
|
|
3428
3601
|
),
|
|
3429
|
-
showVolumeControl && /* @__PURE__ */ (0,
|
|
3602
|
+
showVolumeControl && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3430
3603
|
"button",
|
|
3431
3604
|
{
|
|
3432
3605
|
type: "button",
|
|
@@ -3436,7 +3609,7 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
3436
3609
|
setShowVolumeControl(false);
|
|
3437
3610
|
}
|
|
3438
3611
|
},
|
|
3439
|
-
children: /* @__PURE__ */ (0,
|
|
3612
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3440
3613
|
"input",
|
|
3441
3614
|
{
|
|
3442
3615
|
type: "range",
|
|
@@ -3477,22 +3650,22 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
3477
3650
|
}
|
|
3478
3651
|
)
|
|
3479
3652
|
] }),
|
|
3480
|
-
/* @__PURE__ */ (0,
|
|
3481
|
-
/* @__PURE__ */ (0,
|
|
3653
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "relative", children: [
|
|
3654
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3482
3655
|
"button",
|
|
3483
3656
|
{
|
|
3484
3657
|
type: "button",
|
|
3485
3658
|
onClick: toggleSpeedMenu,
|
|
3486
3659
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
3487
3660
|
"aria-label": "Op\xE7\xF5es de velocidade",
|
|
3488
|
-
children: /* @__PURE__ */ (0,
|
|
3661
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.DotsThreeVertical, { size: 24 })
|
|
3489
3662
|
}
|
|
3490
3663
|
),
|
|
3491
|
-
showSpeedMenu && /* @__PURE__ */ (0,
|
|
3664
|
+
showSpeedMenu && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "absolute bottom-full right-0 mb-2 p-2 bg-background border border-border-100 rounded-lg shadow-lg min-w-24 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-col gap-1", children: [
|
|
3492
3665
|
{ speed: 1, label: "1x" },
|
|
3493
3666
|
{ speed: 1.5, label: "1.5x" },
|
|
3494
3667
|
{ speed: 2, label: "2x" }
|
|
3495
|
-
].map(({ speed, label }) => /* @__PURE__ */ (0,
|
|
3668
|
+
].map(({ speed, label }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3496
3669
|
"button",
|
|
3497
3670
|
{
|
|
3498
3671
|
type: "button",
|
|
@@ -3520,7 +3693,7 @@ var SIMULADO_BACKGROUND_CLASSES = {
|
|
|
3520
3693
|
var CardSimulado = (0, import_react7.forwardRef)(
|
|
3521
3694
|
({ title, duration, info, backgroundColor, className, ...props }, ref) => {
|
|
3522
3695
|
const backgroundClass = SIMULADO_BACKGROUND_CLASSES[backgroundColor];
|
|
3523
|
-
return /* @__PURE__ */ (0,
|
|
3696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3524
3697
|
CardBase,
|
|
3525
3698
|
{
|
|
3526
3699
|
ref,
|
|
@@ -3533,18 +3706,18 @@ var CardSimulado = (0, import_react7.forwardRef)(
|
|
|
3533
3706
|
className
|
|
3534
3707
|
),
|
|
3535
3708
|
...props,
|
|
3536
|
-
children: /* @__PURE__ */ (0,
|
|
3537
|
-
/* @__PURE__ */ (0,
|
|
3538
|
-
/* @__PURE__ */ (0,
|
|
3539
|
-
/* @__PURE__ */ (0,
|
|
3540
|
-
duration && /* @__PURE__ */ (0,
|
|
3541
|
-
/* @__PURE__ */ (0,
|
|
3542
|
-
/* @__PURE__ */ (0,
|
|
3709
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex justify-between items-center w-full gap-4", children: [
|
|
3710
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
3711
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text_default, { size: "lg", weight: "bold", className: "text-text-950 truncate", children: title }),
|
|
3712
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-4 text-text-700", children: [
|
|
3713
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
3714
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.Clock, { size: 16, className: "flex-shrink-0" }),
|
|
3715
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text_default, { size: "sm", children: duration })
|
|
3543
3716
|
] }),
|
|
3544
|
-
/* @__PURE__ */ (0,
|
|
3717
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text_default, { size: "sm", className: "truncate", children: info })
|
|
3545
3718
|
] })
|
|
3546
3719
|
] }),
|
|
3547
|
-
/* @__PURE__ */ (0,
|
|
3720
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3548
3721
|
import_phosphor_react5.CaretRight,
|
|
3549
3722
|
{
|
|
3550
3723
|
size: 24,
|
|
@@ -3589,7 +3762,7 @@ var CardTest = (0, import_react7.forwardRef)(
|
|
|
3589
3762
|
const interactiveClasses = isSelectable ? "cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary-950 focus:ring-offset-2" : "";
|
|
3590
3763
|
const selectedClasses = selected ? "ring-2 ring-primary-950 ring-offset-2" : "";
|
|
3591
3764
|
if (isSelectable) {
|
|
3592
|
-
return /* @__PURE__ */ (0,
|
|
3765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3593
3766
|
"button",
|
|
3594
3767
|
{
|
|
3595
3768
|
ref,
|
|
@@ -3601,8 +3774,8 @@ var CardTest = (0, import_react7.forwardRef)(
|
|
|
3601
3774
|
onKeyDown: handleKeyDown,
|
|
3602
3775
|
"aria-pressed": selected,
|
|
3603
3776
|
...props,
|
|
3604
|
-
children: /* @__PURE__ */ (0,
|
|
3605
|
-
/* @__PURE__ */ (0,
|
|
3777
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
3778
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3606
3779
|
Text_default,
|
|
3607
3780
|
{
|
|
3608
3781
|
size: "md",
|
|
@@ -3611,10 +3784,10 @@ var CardTest = (0, import_react7.forwardRef)(
|
|
|
3611
3784
|
children: title
|
|
3612
3785
|
}
|
|
3613
3786
|
),
|
|
3614
|
-
/* @__PURE__ */ (0,
|
|
3615
|
-
duration && /* @__PURE__ */ (0,
|
|
3616
|
-
/* @__PURE__ */ (0,
|
|
3617
|
-
/* @__PURE__ */ (0,
|
|
3787
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
3788
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
3789
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.Clock, { size: 16, className: "text-text-700" }),
|
|
3790
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3618
3791
|
Text_default,
|
|
3619
3792
|
{
|
|
3620
3793
|
size: "sm",
|
|
@@ -3623,7 +3796,7 @@ var CardTest = (0, import_react7.forwardRef)(
|
|
|
3623
3796
|
}
|
|
3624
3797
|
)
|
|
3625
3798
|
] }),
|
|
3626
|
-
/* @__PURE__ */ (0,
|
|
3799
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3627
3800
|
Text_default,
|
|
3628
3801
|
{
|
|
3629
3802
|
size: "sm",
|
|
@@ -3636,14 +3809,14 @@ var CardTest = (0, import_react7.forwardRef)(
|
|
|
3636
3809
|
}
|
|
3637
3810
|
);
|
|
3638
3811
|
}
|
|
3639
|
-
return /* @__PURE__ */ (0,
|
|
3812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3640
3813
|
"div",
|
|
3641
3814
|
{
|
|
3642
3815
|
ref,
|
|
3643
3816
|
className: cn(`${baseClasses} ${className}`.trim()),
|
|
3644
3817
|
...props,
|
|
3645
|
-
children: /* @__PURE__ */ (0,
|
|
3646
|
-
/* @__PURE__ */ (0,
|
|
3818
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
3819
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3647
3820
|
Text_default,
|
|
3648
3821
|
{
|
|
3649
3822
|
size: "md",
|
|
@@ -3652,10 +3825,10 @@ var CardTest = (0, import_react7.forwardRef)(
|
|
|
3652
3825
|
children: title
|
|
3653
3826
|
}
|
|
3654
3827
|
),
|
|
3655
|
-
/* @__PURE__ */ (0,
|
|
3656
|
-
duration && /* @__PURE__ */ (0,
|
|
3657
|
-
/* @__PURE__ */ (0,
|
|
3658
|
-
/* @__PURE__ */ (0,
|
|
3828
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
3829
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
3830
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.Clock, { size: 16, className: "text-text-700" }),
|
|
3831
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3659
3832
|
Text_default,
|
|
3660
3833
|
{
|
|
3661
3834
|
size: "sm",
|
|
@@ -3664,7 +3837,7 @@ var CardTest = (0, import_react7.forwardRef)(
|
|
|
3664
3837
|
}
|
|
3665
3838
|
)
|
|
3666
3839
|
] }),
|
|
3667
|
-
/* @__PURE__ */ (0,
|
|
3840
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3668
3841
|
Text_default,
|
|
3669
3842
|
{
|
|
3670
3843
|
size: "sm",
|
|
@@ -3701,14 +3874,14 @@ var SIMULATION_TYPE_STYLES = {
|
|
|
3701
3874
|
}
|
|
3702
3875
|
};
|
|
3703
3876
|
var CardSimulationHistory = (0, import_react7.forwardRef)(({ data, onSimulationClick, className, ...props }, ref) => {
|
|
3704
|
-
return /* @__PURE__ */ (0,
|
|
3877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3705
3878
|
"div",
|
|
3706
3879
|
{
|
|
3707
3880
|
ref,
|
|
3708
3881
|
className: cn("w-full max-w-[992px] h-auto", className),
|
|
3709
3882
|
...props,
|
|
3710
|
-
children: /* @__PURE__ */ (0,
|
|
3711
|
-
data.map((section, sectionIndex) => /* @__PURE__ */ (0,
|
|
3883
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-0", children: [
|
|
3884
|
+
data.map((section, sectionIndex) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
3712
3885
|
"div",
|
|
3713
3886
|
{
|
|
3714
3887
|
className: cn(
|
|
@@ -3716,7 +3889,7 @@ var CardSimulationHistory = (0, import_react7.forwardRef)(({ data, onSimulationC
|
|
|
3716
3889
|
sectionIndex === 0 ? "rounded-t-3xl" : ""
|
|
3717
3890
|
),
|
|
3718
3891
|
children: [
|
|
3719
|
-
/* @__PURE__ */ (0,
|
|
3892
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3720
3893
|
Text_default,
|
|
3721
3894
|
{
|
|
3722
3895
|
size: "xs",
|
|
@@ -3725,9 +3898,9 @@ var CardSimulationHistory = (0, import_react7.forwardRef)(({ data, onSimulationC
|
|
|
3725
3898
|
children: section.date
|
|
3726
3899
|
}
|
|
3727
3900
|
),
|
|
3728
|
-
/* @__PURE__ */ (0,
|
|
3901
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
|
|
3729
3902
|
const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
|
|
3730
|
-
return /* @__PURE__ */ (0,
|
|
3903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3731
3904
|
CardBase,
|
|
3732
3905
|
{
|
|
3733
3906
|
layout: "horizontal",
|
|
@@ -3739,9 +3912,9 @@ var CardSimulationHistory = (0, import_react7.forwardRef)(({ data, onSimulationC
|
|
|
3739
3912
|
transition-shadow duration-200 h-auto min-h-[61px]`
|
|
3740
3913
|
),
|
|
3741
3914
|
onClick: () => onSimulationClick?.(simulation),
|
|
3742
|
-
children: /* @__PURE__ */ (0,
|
|
3743
|
-
/* @__PURE__ */ (0,
|
|
3744
|
-
/* @__PURE__ */ (0,
|
|
3915
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex justify-between items-center w-full gap-2", children: [
|
|
3916
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-wrap flex-col justify-between sm:flex-row gap-2 flex-1 min-w-0", children: [
|
|
3917
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3745
3918
|
Text_default,
|
|
3746
3919
|
{
|
|
3747
3920
|
size: "lg",
|
|
@@ -3750,8 +3923,8 @@ var CardSimulationHistory = (0, import_react7.forwardRef)(({ data, onSimulationC
|
|
|
3750
3923
|
children: simulation.title
|
|
3751
3924
|
}
|
|
3752
3925
|
),
|
|
3753
|
-
/* @__PURE__ */ (0,
|
|
3754
|
-
/* @__PURE__ */ (0,
|
|
3926
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3927
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3755
3928
|
Badge_default,
|
|
3756
3929
|
{
|
|
3757
3930
|
variant: "examsOutlined",
|
|
@@ -3760,10 +3933,10 @@ var CardSimulationHistory = (0, import_react7.forwardRef)(({ data, onSimulationC
|
|
|
3760
3933
|
children: typeStyles.text
|
|
3761
3934
|
}
|
|
3762
3935
|
),
|
|
3763
|
-
/* @__PURE__ */ (0,
|
|
3936
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text_default, { size: "sm", className: "text-text-800 truncate", children: simulation.info })
|
|
3764
3937
|
] })
|
|
3765
3938
|
] }),
|
|
3766
|
-
/* @__PURE__ */ (0,
|
|
3939
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3767
3940
|
import_phosphor_react5.CaretRight,
|
|
3768
3941
|
{
|
|
3769
3942
|
size: 24,
|
|
@@ -3779,14 +3952,14 @@ var CardSimulationHistory = (0, import_react7.forwardRef)(({ data, onSimulationC
|
|
|
3779
3952
|
]
|
|
3780
3953
|
}
|
|
3781
3954
|
) }, section.date)),
|
|
3782
|
-
data.length > 0 && /* @__PURE__ */ (0,
|
|
3955
|
+
data.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w-full h-6 bg-white rounded-b-3xl" })
|
|
3783
3956
|
] })
|
|
3784
3957
|
}
|
|
3785
3958
|
);
|
|
3786
3959
|
});
|
|
3787
3960
|
|
|
3788
3961
|
// src/components/ProgressCircle/ProgressCircle.tsx
|
|
3789
|
-
var
|
|
3962
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
3790
3963
|
var SIZE_CLASSES8 = {
|
|
3791
3964
|
small: {
|
|
3792
3965
|
container: "w-[90px] h-[90px]",
|
|
@@ -3868,7 +4041,7 @@ var ProgressCircle = ({
|
|
|
3868
4041
|
const strokeDashoffset = circumference - percentage / 100 * circumference;
|
|
3869
4042
|
const center = size === "small" ? 45 : 76;
|
|
3870
4043
|
const svgSize = size === "small" ? 90 : 152;
|
|
3871
|
-
return /* @__PURE__ */ (0,
|
|
4044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3872
4045
|
"div",
|
|
3873
4046
|
{
|
|
3874
4047
|
className: cn(
|
|
@@ -3878,7 +4051,7 @@ var ProgressCircle = ({
|
|
|
3878
4051
|
className
|
|
3879
4052
|
),
|
|
3880
4053
|
children: [
|
|
3881
|
-
/* @__PURE__ */ (0,
|
|
4054
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3882
4055
|
"svg",
|
|
3883
4056
|
{
|
|
3884
4057
|
className: "absolute inset-0 transform -rotate-90",
|
|
@@ -3887,7 +4060,7 @@ var ProgressCircle = ({
|
|
|
3887
4060
|
viewBox: `0 0 ${svgSize} ${svgSize}`,
|
|
3888
4061
|
"aria-hidden": "true",
|
|
3889
4062
|
children: [
|
|
3890
|
-
/* @__PURE__ */ (0,
|
|
4063
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3891
4064
|
"circle",
|
|
3892
4065
|
{
|
|
3893
4066
|
cx: center,
|
|
@@ -3898,7 +4071,7 @@ var ProgressCircle = ({
|
|
|
3898
4071
|
className: cn(variantClasses.background, "rounded-lg")
|
|
3899
4072
|
}
|
|
3900
4073
|
),
|
|
3901
|
-
/* @__PURE__ */ (0,
|
|
4074
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3902
4075
|
"circle",
|
|
3903
4076
|
{
|
|
3904
4077
|
cx: center,
|
|
@@ -3918,7 +4091,7 @@ var ProgressCircle = ({
|
|
|
3918
4091
|
]
|
|
3919
4092
|
}
|
|
3920
4093
|
),
|
|
3921
|
-
/* @__PURE__ */ (0,
|
|
4094
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3922
4095
|
"progress",
|
|
3923
4096
|
{
|
|
3924
4097
|
value: clampedValue,
|
|
@@ -3927,7 +4100,7 @@ var ProgressCircle = ({
|
|
|
3927
4100
|
className: "absolute opacity-0 w-0 h-0"
|
|
3928
4101
|
}
|
|
3929
4102
|
),
|
|
3930
|
-
/* @__PURE__ */ (0,
|
|
4103
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3931
4104
|
"div",
|
|
3932
4105
|
{
|
|
3933
4106
|
className: cn(
|
|
@@ -3936,7 +4109,7 @@ var ProgressCircle = ({
|
|
|
3936
4109
|
sizeClasses.contentWidth
|
|
3937
4110
|
),
|
|
3938
4111
|
children: [
|
|
3939
|
-
showPercentage && /* @__PURE__ */ (0,
|
|
4112
|
+
showPercentage && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3940
4113
|
Text_default,
|
|
3941
4114
|
{
|
|
3942
4115
|
size: sizeClasses.textSize,
|
|
@@ -3952,7 +4125,7 @@ var ProgressCircle = ({
|
|
|
3952
4125
|
]
|
|
3953
4126
|
}
|
|
3954
4127
|
),
|
|
3955
|
-
label && /* @__PURE__ */ (0,
|
|
4128
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3956
4129
|
Text_default,
|
|
3957
4130
|
{
|
|
3958
4131
|
as: "span",
|
|
@@ -3985,7 +4158,7 @@ var import_zustand4 = require("zustand");
|
|
|
3985
4158
|
// src/components/CheckBox/CheckBox.tsx
|
|
3986
4159
|
var import_react8 = require("react");
|
|
3987
4160
|
var import_phosphor_react6 = require("phosphor-react");
|
|
3988
|
-
var
|
|
4161
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3989
4162
|
var SIZE_CLASSES9 = {
|
|
3990
4163
|
small: {
|
|
3991
4164
|
checkbox: "w-4 h-4",
|
|
@@ -4086,7 +4259,7 @@ var CheckBox = (0, import_react8.forwardRef)(
|
|
|
4086
4259
|
);
|
|
4087
4260
|
const renderIcon = () => {
|
|
4088
4261
|
if (indeterminate) {
|
|
4089
|
-
return /* @__PURE__ */ (0,
|
|
4262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4090
4263
|
import_phosphor_react6.Minus,
|
|
4091
4264
|
{
|
|
4092
4265
|
size: sizeClasses.iconSize,
|
|
@@ -4096,7 +4269,7 @@ var CheckBox = (0, import_react8.forwardRef)(
|
|
|
4096
4269
|
);
|
|
4097
4270
|
}
|
|
4098
4271
|
if (checked) {
|
|
4099
|
-
return /* @__PURE__ */ (0,
|
|
4272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4100
4273
|
import_phosphor_react6.Check,
|
|
4101
4274
|
{
|
|
4102
4275
|
size: sizeClasses.iconSize,
|
|
@@ -4107,8 +4280,8 @@ var CheckBox = (0, import_react8.forwardRef)(
|
|
|
4107
4280
|
}
|
|
4108
4281
|
return null;
|
|
4109
4282
|
};
|
|
4110
|
-
return /* @__PURE__ */ (0,
|
|
4111
|
-
/* @__PURE__ */ (0,
|
|
4283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col", children: [
|
|
4284
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
4112
4285
|
"div",
|
|
4113
4286
|
{
|
|
4114
4287
|
className: cn(
|
|
@@ -4117,7 +4290,7 @@ var CheckBox = (0, import_react8.forwardRef)(
|
|
|
4117
4290
|
disabled ? "opacity-40" : ""
|
|
4118
4291
|
),
|
|
4119
4292
|
children: [
|
|
4120
|
-
/* @__PURE__ */ (0,
|
|
4293
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4121
4294
|
"input",
|
|
4122
4295
|
{
|
|
4123
4296
|
ref,
|
|
@@ -4130,15 +4303,15 @@ var CheckBox = (0, import_react8.forwardRef)(
|
|
|
4130
4303
|
...props
|
|
4131
4304
|
}
|
|
4132
4305
|
),
|
|
4133
|
-
/* @__PURE__ */ (0,
|
|
4134
|
-
label && /* @__PURE__ */ (0,
|
|
4306
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { htmlFor: inputId, className: checkboxClasses, children: renderIcon() }),
|
|
4307
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4135
4308
|
"div",
|
|
4136
4309
|
{
|
|
4137
4310
|
className: cn(
|
|
4138
4311
|
"flex flex-row items-center",
|
|
4139
4312
|
sizeClasses.labelHeight
|
|
4140
4313
|
),
|
|
4141
|
-
children: /* @__PURE__ */ (0,
|
|
4314
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4142
4315
|
Text_default,
|
|
4143
4316
|
{
|
|
4144
4317
|
as: "label",
|
|
@@ -4157,7 +4330,7 @@ var CheckBox = (0, import_react8.forwardRef)(
|
|
|
4157
4330
|
]
|
|
4158
4331
|
}
|
|
4159
4332
|
),
|
|
4160
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
4333
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4161
4334
|
Text_default,
|
|
4162
4335
|
{
|
|
4163
4336
|
size: "sm",
|
|
@@ -4167,7 +4340,7 @@ var CheckBox = (0, import_react8.forwardRef)(
|
|
|
4167
4340
|
children: errorMessage
|
|
4168
4341
|
}
|
|
4169
4342
|
),
|
|
4170
|
-
helperText && !errorMessage && /* @__PURE__ */ (0,
|
|
4343
|
+
helperText && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4171
4344
|
Text_default,
|
|
4172
4345
|
{
|
|
4173
4346
|
size: "sm",
|
|
@@ -4184,7 +4357,7 @@ CheckBox.displayName = "CheckBox";
|
|
|
4184
4357
|
var CheckBox_default = CheckBox;
|
|
4185
4358
|
|
|
4186
4359
|
// src/components/CheckBox/CheckboxList.tsx
|
|
4187
|
-
var
|
|
4360
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
4188
4361
|
var createCheckboxListStore = (name, defaultValues, disabled, onValuesChange) => (0, import_zustand4.create)((set, get) => ({
|
|
4189
4362
|
values: defaultValues,
|
|
4190
4363
|
setValues: (values) => {
|
|
@@ -4256,7 +4429,7 @@ var CheckboxList = (0, import_react9.forwardRef)(
|
|
|
4256
4429
|
(0, import_react9.useEffect)(() => {
|
|
4257
4430
|
store.setState({ disabled });
|
|
4258
4431
|
}, [disabled, store]);
|
|
4259
|
-
return /* @__PURE__ */ (0,
|
|
4432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4260
4433
|
"div",
|
|
4261
4434
|
{
|
|
4262
4435
|
ref,
|
|
@@ -4292,7 +4465,7 @@ var CheckboxListItem = (0, import_react9.forwardRef)(
|
|
|
4292
4465
|
const isChecked = groupValues.includes(value);
|
|
4293
4466
|
const isDisabled = groupDisabled || itemDisabled;
|
|
4294
4467
|
const currentState = isDisabled ? "disabled" : state;
|
|
4295
|
-
return /* @__PURE__ */ (0,
|
|
4468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4296
4469
|
CheckBox_default,
|
|
4297
4470
|
{
|
|
4298
4471
|
ref,
|
|
@@ -4319,7 +4492,7 @@ var CheckboxList_default = CheckboxList;
|
|
|
4319
4492
|
|
|
4320
4493
|
// src/components/MultipleChoice/MultipleChoice.tsx
|
|
4321
4494
|
var import_phosphor_react7 = require("phosphor-react");
|
|
4322
|
-
var
|
|
4495
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
4323
4496
|
var MultipleChoiceList = ({
|
|
4324
4497
|
disabled = false,
|
|
4325
4498
|
className = "",
|
|
@@ -4336,9 +4509,9 @@ var MultipleChoiceList = ({
|
|
|
4336
4509
|
const getStatusBadge2 = (status) => {
|
|
4337
4510
|
switch (status) {
|
|
4338
4511
|
case "correct":
|
|
4339
|
-
return /* @__PURE__ */ (0,
|
|
4512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_phosphor_react7.CheckCircle, {}), children: "Resposta correta" });
|
|
4340
4513
|
case "incorrect":
|
|
4341
|
-
return /* @__PURE__ */ (0,
|
|
4514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_phosphor_react7.XCircle, {}), children: "Resposta incorreta" });
|
|
4342
4515
|
default:
|
|
4343
4516
|
return null;
|
|
4344
4517
|
}
|
|
@@ -4359,14 +4532,14 @@ var MultipleChoiceList = ({
|
|
|
4359
4532
|
isSelected ? "border-primary-950 bg-primary-950 text-text" : "border-border-400 bg-background",
|
|
4360
4533
|
isDisabled && "opacity-40 cursor-not-allowed"
|
|
4361
4534
|
);
|
|
4362
|
-
return /* @__PURE__ */ (0,
|
|
4535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: checkboxClasses, children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_phosphor_react7.Check, { size: 16, weight: "bold" }) });
|
|
4363
4536
|
};
|
|
4364
4537
|
if (mode === "readonly") {
|
|
4365
|
-
return /* @__PURE__ */ (0,
|
|
4538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: cn("flex flex-col gap-2", className), children: choices.map((choice, i) => {
|
|
4366
4539
|
const isSelected = actualValue?.includes(choice.value) || false;
|
|
4367
4540
|
const statusStyles = getStatusStyles2(choice.status);
|
|
4368
4541
|
const statusBadge = getStatusBadge2(choice.status);
|
|
4369
|
-
return /* @__PURE__ */ (0,
|
|
4542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
4370
4543
|
"div",
|
|
4371
4544
|
{
|
|
4372
4545
|
className: cn(
|
|
@@ -4375,9 +4548,9 @@ var MultipleChoiceList = ({
|
|
|
4375
4548
|
choice.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
4376
4549
|
),
|
|
4377
4550
|
children: [
|
|
4378
|
-
/* @__PURE__ */ (0,
|
|
4551
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
4379
4552
|
renderVisualCheckbox(isSelected, choice.disabled || disabled),
|
|
4380
|
-
/* @__PURE__ */ (0,
|
|
4553
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
4381
4554
|
"span",
|
|
4382
4555
|
{
|
|
4383
4556
|
className: cn(
|
|
@@ -4389,14 +4562,14 @@ var MultipleChoiceList = ({
|
|
|
4389
4562
|
}
|
|
4390
4563
|
)
|
|
4391
4564
|
] }),
|
|
4392
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
4565
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
4393
4566
|
]
|
|
4394
4567
|
},
|
|
4395
4568
|
`readonly-${choice.value}-${i}`
|
|
4396
4569
|
);
|
|
4397
4570
|
}) });
|
|
4398
4571
|
}
|
|
4399
|
-
return /* @__PURE__ */ (0,
|
|
4572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
4400
4573
|
"div",
|
|
4401
4574
|
{
|
|
4402
4575
|
className: cn(
|
|
@@ -4404,7 +4577,7 @@ var MultipleChoiceList = ({
|
|
|
4404
4577
|
disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
4405
4578
|
className
|
|
4406
4579
|
),
|
|
4407
|
-
children: /* @__PURE__ */ (0,
|
|
4580
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
4408
4581
|
CheckboxList_default,
|
|
4409
4582
|
{
|
|
4410
4583
|
name,
|
|
@@ -4414,12 +4587,12 @@ var MultipleChoiceList = ({
|
|
|
4414
4587
|
onHandleSelectedValues?.(v);
|
|
4415
4588
|
},
|
|
4416
4589
|
disabled,
|
|
4417
|
-
children: choices.map((choice, i) => /* @__PURE__ */ (0,
|
|
4590
|
+
children: choices.map((choice, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
4418
4591
|
"div",
|
|
4419
4592
|
{
|
|
4420
4593
|
className: "flex flex-row gap-2 items-center",
|
|
4421
4594
|
children: [
|
|
4422
|
-
/* @__PURE__ */ (0,
|
|
4595
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
4423
4596
|
CheckboxListItem,
|
|
4424
4597
|
{
|
|
4425
4598
|
value: choice.value,
|
|
@@ -4427,7 +4600,7 @@ var MultipleChoiceList = ({
|
|
|
4427
4600
|
disabled: choice.disabled || disabled
|
|
4428
4601
|
}
|
|
4429
4602
|
),
|
|
4430
|
-
/* @__PURE__ */ (0,
|
|
4603
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
4431
4604
|
"label",
|
|
4432
4605
|
{
|
|
4433
4606
|
htmlFor: `interactive-${choice.value}-${i}`,
|
|
@@ -4452,7 +4625,7 @@ var MultipleChoiceList = ({
|
|
|
4452
4625
|
// src/components/TextArea/TextArea.tsx
|
|
4453
4626
|
var import_react11 = require("react");
|
|
4454
4627
|
var import_phosphor_react8 = require("phosphor-react");
|
|
4455
|
-
var
|
|
4628
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
4456
4629
|
var SIZE_CLASSES10 = {
|
|
4457
4630
|
small: {
|
|
4458
4631
|
textarea: "h-24 text-sm",
|
|
@@ -4546,8 +4719,8 @@ var TextArea = (0, import_react11.forwardRef)(
|
|
|
4546
4719
|
stateClasses.focus,
|
|
4547
4720
|
className
|
|
4548
4721
|
);
|
|
4549
|
-
return /* @__PURE__ */ (0,
|
|
4550
|
-
label && /* @__PURE__ */ (0,
|
|
4722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: `flex flex-col`, children: [
|
|
4723
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4551
4724
|
Text_default,
|
|
4552
4725
|
{
|
|
4553
4726
|
as: "label",
|
|
@@ -4559,7 +4732,7 @@ var TextArea = (0, import_react11.forwardRef)(
|
|
|
4559
4732
|
children: label
|
|
4560
4733
|
}
|
|
4561
4734
|
),
|
|
4562
|
-
/* @__PURE__ */ (0,
|
|
4735
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4563
4736
|
"textarea",
|
|
4564
4737
|
{
|
|
4565
4738
|
ref,
|
|
@@ -4573,12 +4746,12 @@ var TextArea = (0, import_react11.forwardRef)(
|
|
|
4573
4746
|
...props
|
|
4574
4747
|
}
|
|
4575
4748
|
),
|
|
4576
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
4577
|
-
/* @__PURE__ */ (0,
|
|
4749
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "flex gap-1 items-center text-sm text-indicator-error mt-1.5", children: [
|
|
4750
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_phosphor_react8.WarningCircle, { size: 16 }),
|
|
4578
4751
|
" ",
|
|
4579
4752
|
errorMessage
|
|
4580
4753
|
] }),
|
|
4581
|
-
helperMessage && !errorMessage && /* @__PURE__ */ (0,
|
|
4754
|
+
helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text_default, { size: "sm", weight: "normal", className: "mt-1.5 text-text-500", children: helperMessage })
|
|
4582
4755
|
] });
|
|
4583
4756
|
}
|
|
4584
4757
|
);
|
|
@@ -4589,13 +4762,13 @@ var TextArea_default = TextArea;
|
|
|
4589
4762
|
var mock_image_question_default = "../mock-image-question-HEZCLFDL.png";
|
|
4590
4763
|
|
|
4591
4764
|
// src/components/Quiz/Quiz.tsx
|
|
4592
|
-
var
|
|
4765
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
4593
4766
|
var getStatusBadge = (status) => {
|
|
4594
4767
|
switch (status) {
|
|
4595
4768
|
case "correct":
|
|
4596
|
-
return /* @__PURE__ */ (0,
|
|
4769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_phosphor_react9.CheckCircle, {}), children: "Resposta correta" });
|
|
4597
4770
|
case "incorrect":
|
|
4598
|
-
return /* @__PURE__ */ (0,
|
|
4771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_phosphor_react9.XCircle, {}), children: "Resposta incorreta" });
|
|
4599
4772
|
default:
|
|
4600
4773
|
return null;
|
|
4601
4774
|
}
|
|
@@ -4613,7 +4786,7 @@ var Quiz = (0, import_react12.forwardRef)(({ children, className, variant = "def
|
|
|
4613
4786
|
(0, import_react12.useEffect)(() => {
|
|
4614
4787
|
setVariant(variant);
|
|
4615
4788
|
}, [variant, setVariant]);
|
|
4616
|
-
return /* @__PURE__ */ (0,
|
|
4789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children });
|
|
4617
4790
|
});
|
|
4618
4791
|
var QuizHeaderResult = (0, import_react12.forwardRef)(
|
|
4619
4792
|
({ className, ...props }, ref) => {
|
|
@@ -4654,7 +4827,7 @@ var QuizHeaderResult = (0, import_react12.forwardRef)(
|
|
|
4654
4827
|
return "N\xE3o foi dessa vez...voc\xEA deixou a resposta em branco";
|
|
4655
4828
|
}
|
|
4656
4829
|
};
|
|
4657
|
-
return /* @__PURE__ */ (0,
|
|
4830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
4658
4831
|
"div",
|
|
4659
4832
|
{
|
|
4660
4833
|
ref,
|
|
@@ -4665,8 +4838,8 @@ var QuizHeaderResult = (0, import_react12.forwardRef)(
|
|
|
4665
4838
|
),
|
|
4666
4839
|
...props,
|
|
4667
4840
|
children: [
|
|
4668
|
-
/* @__PURE__ */ (0,
|
|
4669
|
-
/* @__PURE__ */ (0,
|
|
4841
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
|
|
4842
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-text-700 text-md", children: getLabelByAnswersStatus() })
|
|
4670
4843
|
]
|
|
4671
4844
|
}
|
|
4672
4845
|
);
|
|
@@ -4684,7 +4857,7 @@ var QuizTitle = (0, import_react12.forwardRef)(
|
|
|
4684
4857
|
} = useQuizStore();
|
|
4685
4858
|
const totalQuestions = getTotalQuestions();
|
|
4686
4859
|
const quizTitle = getQuizTitle();
|
|
4687
|
-
return /* @__PURE__ */ (0,
|
|
4860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
4688
4861
|
"div",
|
|
4689
4862
|
{
|
|
4690
4863
|
ref,
|
|
@@ -4694,11 +4867,11 @@ var QuizTitle = (0, import_react12.forwardRef)(
|
|
|
4694
4867
|
),
|
|
4695
4868
|
...props,
|
|
4696
4869
|
children: [
|
|
4697
|
-
/* @__PURE__ */ (0,
|
|
4698
|
-
/* @__PURE__ */ (0,
|
|
4699
|
-
/* @__PURE__ */ (0,
|
|
4870
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
4871
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
4872
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
4700
4873
|
] }),
|
|
4701
|
-
/* @__PURE__ */ (0,
|
|
4874
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "absolute right-2", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_phosphor_react9.Clock, {}), children: isStarted ? formatTime(timeElapsed) : "00:00" }) })
|
|
4702
4875
|
]
|
|
4703
4876
|
}
|
|
4704
4877
|
);
|
|
@@ -4706,13 +4879,13 @@ var QuizTitle = (0, import_react12.forwardRef)(
|
|
|
4706
4879
|
);
|
|
4707
4880
|
var QuizSubTitle = (0, import_react12.forwardRef)(
|
|
4708
4881
|
({ subTitle, ...props }, ref) => {
|
|
4709
|
-
return /* @__PURE__ */ (0,
|
|
4882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
|
|
4710
4883
|
}
|
|
4711
4884
|
);
|
|
4712
4885
|
var QuizHeader = () => {
|
|
4713
4886
|
const { getCurrentQuestion, currentQuestionIndex } = useQuizStore();
|
|
4714
4887
|
const currentQuestion = getCurrentQuestion();
|
|
4715
|
-
return /* @__PURE__ */ (0,
|
|
4888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4716
4889
|
HeaderAlternative,
|
|
4717
4890
|
{
|
|
4718
4891
|
title: currentQuestion ? `Quest\xE3o ${currentQuestionIndex + 1}` : "Quest\xE3o",
|
|
@@ -4722,7 +4895,7 @@ var QuizHeader = () => {
|
|
|
4722
4895
|
);
|
|
4723
4896
|
};
|
|
4724
4897
|
var QuizContainer = (0, import_react12.forwardRef)(({ children, className, ...props }, ref) => {
|
|
4725
|
-
return /* @__PURE__ */ (0,
|
|
4898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4726
4899
|
"div",
|
|
4727
4900
|
{
|
|
4728
4901
|
ref,
|
|
@@ -4748,7 +4921,7 @@ var QuizContent = (0, import_react12.forwardRef)(({ paddingBottom }) => {
|
|
|
4748
4921
|
["IMAGEM" /* IMAGEM */]: QuizImageQuestion
|
|
4749
4922
|
};
|
|
4750
4923
|
const QuestionComponent = currentQuestion ? questionComponents[currentQuestion.questionType] : null;
|
|
4751
|
-
return QuestionComponent ? /* @__PURE__ */ (0,
|
|
4924
|
+
return QuestionComponent ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuestionComponent, { paddingBottom }) : null;
|
|
4752
4925
|
});
|
|
4753
4926
|
var QuizAlternative = ({ paddingBottom }) => {
|
|
4754
4927
|
const {
|
|
@@ -4785,10 +4958,10 @@ var QuizAlternative = ({ paddingBottom }) => {
|
|
|
4785
4958
|
};
|
|
4786
4959
|
});
|
|
4787
4960
|
if (!alternatives)
|
|
4788
|
-
return /* @__PURE__ */ (0,
|
|
4789
|
-
return /* @__PURE__ */ (0,
|
|
4790
|
-
/* @__PURE__ */ (0,
|
|
4791
|
-
/* @__PURE__ */ (0,
|
|
4961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: "N\xE3o h\xE1 Alternativas" }) });
|
|
4962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
4963
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
4964
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4792
4965
|
AlternativesList,
|
|
4793
4966
|
{
|
|
4794
4967
|
mode: variant === "default" ? "interactive" : "readonly",
|
|
@@ -4886,10 +5059,10 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
4886
5059
|
};
|
|
4887
5060
|
});
|
|
4888
5061
|
if (!choices)
|
|
4889
|
-
return /* @__PURE__ */ (0,
|
|
4890
|
-
return /* @__PURE__ */ (0,
|
|
4891
|
-
/* @__PURE__ */ (0,
|
|
4892
|
-
/* @__PURE__ */ (0,
|
|
5062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: "N\xE3o h\xE1 Escolhas Multiplas" }) });
|
|
5063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
5064
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
5065
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4893
5066
|
MultipleChoiceList,
|
|
4894
5067
|
{
|
|
4895
5068
|
choices,
|
|
@@ -4935,12 +5108,12 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
4935
5108
|
adjustTextareaHeight();
|
|
4936
5109
|
}, [currentAnswer, adjustTextareaHeight]);
|
|
4937
5110
|
if (!currentQuestion) {
|
|
4938
|
-
return /* @__PURE__ */ (0,
|
|
5111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-text-600 text-md", children: "Nenhuma quest\xE3o dispon\xEDvel" }) });
|
|
4939
5112
|
}
|
|
4940
5113
|
const localAnswer = (variant == "result" ? currentQuestionResult?.answer : currentAnswer?.answer) || "";
|
|
4941
|
-
return /* @__PURE__ */ (0,
|
|
4942
|
-
/* @__PURE__ */ (0,
|
|
4943
|
-
/* @__PURE__ */ (0,
|
|
5114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
5115
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizSubTitle, { subTitle: "Resposta" }),
|
|
5116
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizContainer, { className: cn(variant != "result" && paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "space-y-4 max-h-[600px] overflow-y-auto", children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4944
5117
|
TextArea_default,
|
|
4945
5118
|
{
|
|
4946
5119
|
ref: textareaRef,
|
|
@@ -4950,10 +5123,10 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
4950
5123
|
rows: 4,
|
|
4951
5124
|
className: "min-h-[120px] max-h-[400px] resize-none overflow-y-auto"
|
|
4952
5125
|
}
|
|
4953
|
-
) }) : /* @__PURE__ */ (0,
|
|
4954
|
-
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ (0,
|
|
4955
|
-
/* @__PURE__ */ (0,
|
|
4956
|
-
/* @__PURE__ */ (0,
|
|
5126
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: localAnswer || "Nenhuma resposta fornecida" }) }) }) }),
|
|
5127
|
+
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
5128
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizSubTitle, { subTitle: "Observa\xE7\xE3o do professor" }),
|
|
5129
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime18.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." }) })
|
|
4957
5130
|
] })
|
|
4958
5131
|
] });
|
|
4959
5132
|
};
|
|
@@ -4979,16 +5152,16 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
4979
5152
|
];
|
|
4980
5153
|
const getLetterByIndex = (index) => String.fromCharCode(97 + index);
|
|
4981
5154
|
const isDefaultVariant = variant == "default";
|
|
4982
|
-
return /* @__PURE__ */ (0,
|
|
4983
|
-
/* @__PURE__ */ (0,
|
|
4984
|
-
/* @__PURE__ */ (0,
|
|
5155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
5156
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
5157
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
4985
5158
|
const variantCorrect = option.isCorrect ? "correct" : "incorrect";
|
|
4986
|
-
return /* @__PURE__ */ (0,
|
|
5159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
4987
5160
|
"section",
|
|
4988
5161
|
{
|
|
4989
5162
|
className: "flex flex-col gap-2",
|
|
4990
5163
|
children: [
|
|
4991
|
-
/* @__PURE__ */ (0,
|
|
5164
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
4992
5165
|
"div",
|
|
4993
5166
|
{
|
|
4994
5167
|
className: cn(
|
|
@@ -4996,20 +5169,20 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
4996
5169
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
4997
5170
|
),
|
|
4998
5171
|
children: [
|
|
4999
|
-
/* @__PURE__ */ (0,
|
|
5000
|
-
isDefaultVariant ? /* @__PURE__ */ (0,
|
|
5001
|
-
/* @__PURE__ */ (0,
|
|
5002
|
-
/* @__PURE__ */ (0,
|
|
5003
|
-
/* @__PURE__ */ (0,
|
|
5004
|
-
/* @__PURE__ */ (0,
|
|
5172
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index).concat(") ").concat(option.label) }),
|
|
5173
|
+
isDefaultVariant ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Select_default, { size: "medium", children: [
|
|
5174
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectValue, { placeholder: "Selecione opc\xE3o" }) }),
|
|
5175
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(SelectContent, { children: [
|
|
5176
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectItem, { value: "V", children: "Verdadeiro" }),
|
|
5177
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectItem, { value: "F", children: "Falso" })
|
|
5005
5178
|
] })
|
|
5006
|
-
] }) : /* @__PURE__ */ (0,
|
|
5179
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex-shrink-0", children: getStatusBadge(variantCorrect) })
|
|
5007
5180
|
]
|
|
5008
5181
|
}
|
|
5009
5182
|
),
|
|
5010
|
-
!isDefaultVariant && /* @__PURE__ */ (0,
|
|
5011
|
-
/* @__PURE__ */ (0,
|
|
5012
|
-
!option.isCorrect && /* @__PURE__ */ (0,
|
|
5183
|
+
!isDefaultVariant && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
5184
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-text-800 text-2xs", children: "Resposta selecionada: V" }),
|
|
5185
|
+
!option.isCorrect && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-text-800 text-2xs", children: "Resposta correta: F" })
|
|
5013
5186
|
] })
|
|
5014
5187
|
]
|
|
5015
5188
|
},
|
|
@@ -5099,13 +5272,13 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
5099
5272
|
const assignedDots = new Set(
|
|
5100
5273
|
userAnswers.map((a) => a.dotOption).filter(Boolean)
|
|
5101
5274
|
);
|
|
5102
|
-
return /* @__PURE__ */ (0,
|
|
5103
|
-
/* @__PURE__ */ (0,
|
|
5104
|
-
/* @__PURE__ */ (0,
|
|
5275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
5276
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
5277
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
5105
5278
|
const answer = userAnswers[index];
|
|
5106
5279
|
const variantCorrect = answer.isCorrect ? "correct" : "incorrect";
|
|
5107
|
-
return /* @__PURE__ */ (0,
|
|
5108
|
-
/* @__PURE__ */ (0,
|
|
5280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: "flex flex-col gap-2", children: [
|
|
5281
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
5109
5282
|
"div",
|
|
5110
5283
|
{
|
|
5111
5284
|
className: cn(
|
|
@@ -5113,30 +5286,30 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
5113
5286
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
5114
5287
|
),
|
|
5115
5288
|
children: [
|
|
5116
|
-
/* @__PURE__ */ (0,
|
|
5117
|
-
isDefaultVariant ? /* @__PURE__ */ (0,
|
|
5289
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index) + ") " + option.label }),
|
|
5290
|
+
isDefaultVariant ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
5118
5291
|
Select_default,
|
|
5119
5292
|
{
|
|
5120
5293
|
size: "medium",
|
|
5121
5294
|
value: answer.dotOption || void 0,
|
|
5122
5295
|
onValueChange: (value) => handleSelectDot(index, value),
|
|
5123
5296
|
children: [
|
|
5124
|
-
/* @__PURE__ */ (0,
|
|
5125
|
-
/* @__PURE__ */ (0,
|
|
5297
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
5298
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectContent, { children: dotsOptions.filter(
|
|
5126
5299
|
(dot) => !assignedDots.has(dot.label) || answer.dotOption === dot.label
|
|
5127
|
-
).map((dot) => /* @__PURE__ */ (0,
|
|
5300
|
+
).map((dot) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectItem, { value: dot.label, children: dot.label }, dot.label)) })
|
|
5128
5301
|
]
|
|
5129
5302
|
}
|
|
5130
|
-
) : /* @__PURE__ */ (0,
|
|
5303
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex-shrink-0", children: answer.isCorrect === null ? null : getStatusBadge(variantCorrect) })
|
|
5131
5304
|
]
|
|
5132
5305
|
}
|
|
5133
5306
|
),
|
|
5134
|
-
!isDefaultVariant && /* @__PURE__ */ (0,
|
|
5135
|
-
/* @__PURE__ */ (0,
|
|
5307
|
+
!isDefaultVariant && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
5308
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "text-text-800 text-2xs", children: [
|
|
5136
5309
|
"Resposta selecionada: ",
|
|
5137
5310
|
answer.dotOption || "Nenhuma"
|
|
5138
5311
|
] }),
|
|
5139
|
-
!answer.isCorrect && /* @__PURE__ */ (0,
|
|
5312
|
+
!answer.isCorrect && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "text-text-800 text-2xs", children: [
|
|
5140
5313
|
"Resposta correta: ",
|
|
5141
5314
|
answer.correctOption
|
|
5142
5315
|
] })
|
|
@@ -5203,18 +5376,18 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
5203
5376
|
const mockAnswer = mockUserAnswers.find(
|
|
5204
5377
|
(answer) => answer.selectId === selectId
|
|
5205
5378
|
);
|
|
5206
|
-
return /* @__PURE__ */ (0,
|
|
5379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "inline-flex mb-2.5 text-success-600 font-semibold text-md border-b-2 border-success-600", children: mockAnswer?.correctAnswer });
|
|
5207
5380
|
};
|
|
5208
5381
|
const renderDefaultElement = (selectId, startIndex, selectedValue, availableOptionsForThisSelect) => {
|
|
5209
|
-
return /* @__PURE__ */ (0,
|
|
5382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
5210
5383
|
Select_default,
|
|
5211
5384
|
{
|
|
5212
5385
|
value: selectedValue,
|
|
5213
5386
|
onValueChange: (value) => handleSelectChange(selectId, value),
|
|
5214
5387
|
className: "inline-flex mb-2.5",
|
|
5215
5388
|
children: [
|
|
5216
|
-
/* @__PURE__ */ (0,
|
|
5217
|
-
/* @__PURE__ */ (0,
|
|
5389
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectTrigger, { className: "inline-flex w-auto min-w-[140px] h-8 mx-1 bg-white border-gray-300", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
5390
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectContent, { children: availableOptionsForThisSelect.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectItem, { value: option, children: option }, `${option}-${index}`)) })
|
|
5218
5391
|
]
|
|
5219
5392
|
},
|
|
5220
5393
|
`${selectId}-${startIndex}`
|
|
@@ -5226,8 +5399,8 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
5226
5399
|
);
|
|
5227
5400
|
if (!mockAnswer) return null;
|
|
5228
5401
|
const action = mockAnswer.isCorrect ? "success" : "error";
|
|
5229
|
-
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ (0,
|
|
5230
|
-
return /* @__PURE__ */ (0,
|
|
5402
|
+
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_phosphor_react9.CheckCircle, {}) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_phosphor_react9.XCircle, {});
|
|
5403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5231
5404
|
Badge_default,
|
|
5232
5405
|
{
|
|
5233
5406
|
variant: "solid",
|
|
@@ -5235,7 +5408,7 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
5235
5408
|
iconRight: icon,
|
|
5236
5409
|
size: "large",
|
|
5237
5410
|
className: "py-3 w-[180px] justify-between mb-2.5",
|
|
5238
|
-
children: /* @__PURE__ */ (0,
|
|
5411
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-text-900", children: mockAnswer.userAnswer })
|
|
5239
5412
|
},
|
|
5240
5413
|
selectId
|
|
5241
5414
|
);
|
|
@@ -5291,25 +5464,25 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
5291
5464
|
}
|
|
5292
5465
|
return elements;
|
|
5293
5466
|
};
|
|
5294
|
-
return /* @__PURE__ */ (0,
|
|
5295
|
-
/* @__PURE__ */ (0,
|
|
5296
|
-
/* @__PURE__ */ (0,
|
|
5467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
5468
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
5469
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "space-y-6 px-4 h-auto", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5297
5470
|
"div",
|
|
5298
5471
|
{
|
|
5299
5472
|
className: cn(
|
|
5300
5473
|
"text-lg text-text-900 leading-8 h-auto",
|
|
5301
5474
|
variant != "result" && paddingBottom
|
|
5302
5475
|
),
|
|
5303
|
-
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ (0,
|
|
5476
|
+
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: element.element }, element.id))
|
|
5304
5477
|
}
|
|
5305
5478
|
) }) }),
|
|
5306
|
-
variant === "result" && /* @__PURE__ */ (0,
|
|
5307
|
-
/* @__PURE__ */ (0,
|
|
5308
|
-
/* @__PURE__ */ (0,
|
|
5479
|
+
variant === "result" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
5480
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizSubTitle, { subTitle: "Resultado" }),
|
|
5481
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "space-y-6 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5309
5482
|
"div",
|
|
5310
5483
|
{
|
|
5311
5484
|
className: cn("text-lg text-text-900 leading-8", paddingBottom),
|
|
5312
|
-
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ (0,
|
|
5485
|
+
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: element.element }, element.id))
|
|
5313
5486
|
}
|
|
5314
5487
|
) }) })
|
|
5315
5488
|
] })
|
|
@@ -5363,36 +5536,36 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
5363
5536
|
}
|
|
5364
5537
|
return "bg-success-600/70 border-white";
|
|
5365
5538
|
};
|
|
5366
|
-
return /* @__PURE__ */ (0,
|
|
5367
|
-
/* @__PURE__ */ (0,
|
|
5368
|
-
/* @__PURE__ */ (0,
|
|
5539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
5540
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizSubTitle, { subTitle: "Clique na \xE1rea correta" }),
|
|
5541
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
5369
5542
|
"div",
|
|
5370
5543
|
{
|
|
5371
5544
|
"data-testid": "quiz-image-container",
|
|
5372
5545
|
className: "space-y-6 p-3 relative inline-block",
|
|
5373
5546
|
children: [
|
|
5374
|
-
variant == "result" && /* @__PURE__ */ (0,
|
|
5547
|
+
variant == "result" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
5375
5548
|
"div",
|
|
5376
5549
|
{
|
|
5377
5550
|
"data-testid": "quiz-legend",
|
|
5378
5551
|
className: "flex items-center gap-4 text-xs",
|
|
5379
5552
|
children: [
|
|
5380
|
-
/* @__PURE__ */ (0,
|
|
5381
|
-
/* @__PURE__ */ (0,
|
|
5382
|
-
/* @__PURE__ */ (0,
|
|
5553
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5554
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w-3 h-3 rounded-full bg-indicator-primary/70 border border-[#F8CC2E]" }),
|
|
5555
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "\xC1rea correta" })
|
|
5383
5556
|
] }),
|
|
5384
|
-
/* @__PURE__ */ (0,
|
|
5385
|
-
/* @__PURE__ */ (0,
|
|
5386
|
-
/* @__PURE__ */ (0,
|
|
5557
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5558
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w-3 h-3 rounded-full bg-success-600/70 border border-white" }),
|
|
5559
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "Resposta correta" })
|
|
5387
5560
|
] }),
|
|
5388
|
-
/* @__PURE__ */ (0,
|
|
5389
|
-
/* @__PURE__ */ (0,
|
|
5390
|
-
/* @__PURE__ */ (0,
|
|
5561
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5562
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w-3 h-3 rounded-full bg-indicator-error/70 border border-white" }),
|
|
5563
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "Resposta incorreta" })
|
|
5391
5564
|
] })
|
|
5392
5565
|
]
|
|
5393
5566
|
}
|
|
5394
5567
|
),
|
|
5395
|
-
/* @__PURE__ */ (0,
|
|
5568
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
5396
5569
|
"button",
|
|
5397
5570
|
{
|
|
5398
5571
|
"data-testid": "quiz-image-button",
|
|
@@ -5407,7 +5580,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
5407
5580
|
},
|
|
5408
5581
|
"aria-label": "\xC1rea da imagem interativa",
|
|
5409
5582
|
children: [
|
|
5410
|
-
/* @__PURE__ */ (0,
|
|
5583
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5411
5584
|
"img",
|
|
5412
5585
|
{
|
|
5413
5586
|
"data-testid": "quiz-image",
|
|
@@ -5416,7 +5589,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
5416
5589
|
className: "w-full h-auto rounded-md"
|
|
5417
5590
|
}
|
|
5418
5591
|
),
|
|
5419
|
-
variant === "result" && /* @__PURE__ */ (0,
|
|
5592
|
+
variant === "result" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5420
5593
|
"div",
|
|
5421
5594
|
{
|
|
5422
5595
|
"data-testid": "quiz-correct-circle",
|
|
@@ -5431,7 +5604,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
5431
5604
|
}
|
|
5432
5605
|
}
|
|
5433
5606
|
),
|
|
5434
|
-
clickPositionRelative && /* @__PURE__ */ (0,
|
|
5607
|
+
clickPositionRelative && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5435
5608
|
"div",
|
|
5436
5609
|
{
|
|
5437
5610
|
"data-testid": "quiz-user-circle",
|
|
@@ -5499,18 +5672,18 @@ var QuizQuestionList = ({
|
|
|
5499
5672
|
return "Em branco";
|
|
5500
5673
|
}
|
|
5501
5674
|
};
|
|
5502
|
-
return /* @__PURE__ */ (0,
|
|
5503
|
-
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */ (0,
|
|
5675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-6 px-4 h-full", children: [
|
|
5676
|
+
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex items-center justify-center text-gray-500 py-8 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-lg", children: "Nenhum resultado" }) }),
|
|
5504
5677
|
Object.entries(filteredGroupedQuestions).map(
|
|
5505
|
-
([subjectId, questions]) => /* @__PURE__ */ (0,
|
|
5506
|
-
/* @__PURE__ */ (0,
|
|
5507
|
-
/* @__PURE__ */ (0,
|
|
5508
|
-
/* @__PURE__ */ (0,
|
|
5678
|
+
([subjectId, questions]) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: "flex flex-col gap-2", children: [
|
|
5679
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
|
|
5680
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_phosphor_react9.BookOpen, { size: 17, className: "text-white" }) }),
|
|
5681
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-text-800 font-bold text-lg", children: questions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" })
|
|
5509
5682
|
] }),
|
|
5510
|
-
/* @__PURE__ */ (0,
|
|
5683
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
|
|
5511
5684
|
const status = getQuestionStatus(question.id);
|
|
5512
5685
|
const questionNumber = getQuestionIndex(question.id);
|
|
5513
|
-
return /* @__PURE__ */ (0,
|
|
5686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5514
5687
|
CardStatus,
|
|
5515
5688
|
{
|
|
5516
5689
|
header: `Quest\xE3o ${questionNumber.toString().padStart(2, "0")}`,
|
|
@@ -5590,8 +5763,8 @@ var QuizFooter = (0, import_react12.forwardRef)(
|
|
|
5590
5763
|
return;
|
|
5591
5764
|
}
|
|
5592
5765
|
};
|
|
5593
|
-
return /* @__PURE__ */ (0,
|
|
5594
|
-
/* @__PURE__ */ (0,
|
|
5766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
5767
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5595
5768
|
"footer",
|
|
5596
5769
|
{
|
|
5597
5770
|
ref,
|
|
@@ -5600,17 +5773,17 @@ var QuizFooter = (0, import_react12.forwardRef)(
|
|
|
5600
5773
|
className
|
|
5601
5774
|
),
|
|
5602
5775
|
...props,
|
|
5603
|
-
children: variant === "default" ? /* @__PURE__ */ (0,
|
|
5604
|
-
/* @__PURE__ */ (0,
|
|
5605
|
-
/* @__PURE__ */ (0,
|
|
5776
|
+
children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
5777
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-row items-center gap-1", children: [
|
|
5778
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5606
5779
|
IconButton_default,
|
|
5607
5780
|
{
|
|
5608
|
-
icon: /* @__PURE__ */ (0,
|
|
5781
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_phosphor_react9.SquaresFour, { size: 24, className: "text-text-950" }),
|
|
5609
5782
|
size: "md",
|
|
5610
5783
|
onClick: () => setModalNavigateOpen(true)
|
|
5611
5784
|
}
|
|
5612
5785
|
),
|
|
5613
|
-
isFirstQuestion ? /* @__PURE__ */ (0,
|
|
5786
|
+
isFirstQuestion ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5614
5787
|
Button_default,
|
|
5615
5788
|
{
|
|
5616
5789
|
variant: "outline",
|
|
@@ -5621,13 +5794,13 @@ var QuizFooter = (0, import_react12.forwardRef)(
|
|
|
5621
5794
|
},
|
|
5622
5795
|
children: "Pular"
|
|
5623
5796
|
}
|
|
5624
|
-
) : /* @__PURE__ */ (0,
|
|
5797
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5625
5798
|
Button_default,
|
|
5626
5799
|
{
|
|
5627
5800
|
size: "medium",
|
|
5628
5801
|
variant: "link",
|
|
5629
5802
|
action: "primary",
|
|
5630
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
5803
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_phosphor_react9.CaretLeft, { size: 18 }),
|
|
5631
5804
|
onClick: () => {
|
|
5632
5805
|
goToPreviousQuestion();
|
|
5633
5806
|
},
|
|
@@ -5635,7 +5808,7 @@ var QuizFooter = (0, import_react12.forwardRef)(
|
|
|
5635
5808
|
}
|
|
5636
5809
|
)
|
|
5637
5810
|
] }),
|
|
5638
|
-
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */ (0,
|
|
5811
|
+
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5639
5812
|
Button_default,
|
|
5640
5813
|
{
|
|
5641
5814
|
size: "small",
|
|
@@ -5648,7 +5821,7 @@ var QuizFooter = (0, import_react12.forwardRef)(
|
|
|
5648
5821
|
children: "Pular"
|
|
5649
5822
|
}
|
|
5650
5823
|
),
|
|
5651
|
-
isLastQuestion ? /* @__PURE__ */ (0,
|
|
5824
|
+
isLastQuestion ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5652
5825
|
Button_default,
|
|
5653
5826
|
{
|
|
5654
5827
|
size: "medium",
|
|
@@ -5658,13 +5831,13 @@ var QuizFooter = (0, import_react12.forwardRef)(
|
|
|
5658
5831
|
onClick: handleFinishQuiz,
|
|
5659
5832
|
children: "Finalizar"
|
|
5660
5833
|
}
|
|
5661
|
-
) : /* @__PURE__ */ (0,
|
|
5834
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5662
5835
|
Button_default,
|
|
5663
5836
|
{
|
|
5664
5837
|
size: "medium",
|
|
5665
5838
|
variant: "link",
|
|
5666
5839
|
action: "primary",
|
|
5667
|
-
iconRight: /* @__PURE__ */ (0,
|
|
5840
|
+
iconRight: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_phosphor_react9.CaretRight, { size: 18 }),
|
|
5668
5841
|
disabled: !currentAnswer && !isCurrentQuestionSkipped,
|
|
5669
5842
|
onClick: () => {
|
|
5670
5843
|
goToNextQuestion();
|
|
@@ -5672,7 +5845,7 @@ var QuizFooter = (0, import_react12.forwardRef)(
|
|
|
5672
5845
|
children: "Avan\xE7ar"
|
|
5673
5846
|
}
|
|
5674
5847
|
)
|
|
5675
|
-
] }) : /* @__PURE__ */ (0,
|
|
5848
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex flex-row items-center justify-end w-full", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5676
5849
|
Button_default,
|
|
5677
5850
|
{
|
|
5678
5851
|
variant: "solid",
|
|
@@ -5684,7 +5857,7 @@ var QuizFooter = (0, import_react12.forwardRef)(
|
|
|
5684
5857
|
) })
|
|
5685
5858
|
}
|
|
5686
5859
|
),
|
|
5687
|
-
/* @__PURE__ */ (0,
|
|
5860
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5688
5861
|
AlertDialog,
|
|
5689
5862
|
{
|
|
5690
5863
|
isOpen: alertDialogOpen,
|
|
@@ -5696,7 +5869,7 @@ var QuizFooter = (0, import_react12.forwardRef)(
|
|
|
5696
5869
|
onSubmit: handleAlertSubmit
|
|
5697
5870
|
}
|
|
5698
5871
|
),
|
|
5699
|
-
/* @__PURE__ */ (0,
|
|
5872
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5700
5873
|
Modal_default,
|
|
5701
5874
|
{
|
|
5702
5875
|
isOpen: modalResultOpen,
|
|
@@ -5706,11 +5879,11 @@ var QuizFooter = (0, import_react12.forwardRef)(
|
|
|
5706
5879
|
closeOnEscape: false,
|
|
5707
5880
|
hideCloseButton: true,
|
|
5708
5881
|
size: "md",
|
|
5709
|
-
children: /* @__PURE__ */ (0,
|
|
5710
|
-
resultImageComponent ? /* @__PURE__ */ (0,
|
|
5711
|
-
/* @__PURE__ */ (0,
|
|
5712
|
-
/* @__PURE__ */ (0,
|
|
5713
|
-
/* @__PURE__ */ (0,
|
|
5882
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
5883
|
+
resultImageComponent ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
5884
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
5885
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: "Voc\xEA concluiu o simulado!" }),
|
|
5886
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "text-text-500 font-sm", children: [
|
|
5714
5887
|
"Voc\xEA acertou",
|
|
5715
5888
|
" ",
|
|
5716
5889
|
getQuestionResultStatistics()?.correctAnswers ?? "--",
|
|
@@ -5720,8 +5893,8 @@ var QuizFooter = (0, import_react12.forwardRef)(
|
|
|
5720
5893
|
" quest\xF5es."
|
|
5721
5894
|
] })
|
|
5722
5895
|
] }),
|
|
5723
|
-
/* @__PURE__ */ (0,
|
|
5724
|
-
/* @__PURE__ */ (0,
|
|
5896
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
|
|
5897
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5725
5898
|
Button_default,
|
|
5726
5899
|
{
|
|
5727
5900
|
variant: "outline",
|
|
@@ -5731,38 +5904,38 @@ var QuizFooter = (0, import_react12.forwardRef)(
|
|
|
5731
5904
|
children: "Ir para simulados"
|
|
5732
5905
|
}
|
|
5733
5906
|
),
|
|
5734
|
-
/* @__PURE__ */ (0,
|
|
5907
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })
|
|
5735
5908
|
] })
|
|
5736
5909
|
] })
|
|
5737
5910
|
}
|
|
5738
5911
|
),
|
|
5739
|
-
/* @__PURE__ */ (0,
|
|
5912
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5740
5913
|
Modal_default,
|
|
5741
5914
|
{
|
|
5742
5915
|
isOpen: modalNavigateOpen,
|
|
5743
5916
|
onClose: () => setModalNavigateOpen(false),
|
|
5744
5917
|
title: "Quest\xF5es",
|
|
5745
5918
|
size: "lg",
|
|
5746
|
-
children: /* @__PURE__ */ (0,
|
|
5747
|
-
/* @__PURE__ */ (0,
|
|
5748
|
-
/* @__PURE__ */ (0,
|
|
5749
|
-
/* @__PURE__ */ (0,
|
|
5750
|
-
/* @__PURE__ */ (0,
|
|
5919
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col w-full h-full", children: [
|
|
5920
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-row justify-between items-center py-6 pt-6 pb-4 border-b border-border-200", children: [
|
|
5921
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
|
|
5922
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "max-w-[266px]", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Select_default, { value: filterType, onValueChange: setFilterType, children: [
|
|
5923
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5751
5924
|
SelectTrigger,
|
|
5752
5925
|
{
|
|
5753
5926
|
variant: "rounded",
|
|
5754
5927
|
className: "max-w-[266px] min-w-[160px]",
|
|
5755
|
-
children: /* @__PURE__ */ (0,
|
|
5928
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" })
|
|
5756
5929
|
}
|
|
5757
5930
|
),
|
|
5758
|
-
/* @__PURE__ */ (0,
|
|
5759
|
-
/* @__PURE__ */ (0,
|
|
5760
|
-
/* @__PURE__ */ (0,
|
|
5761
|
-
/* @__PURE__ */ (0,
|
|
5931
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(SelectContent, { children: [
|
|
5932
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectItem, { value: "all", children: "Todas" }),
|
|
5933
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectItem, { value: "unanswered", children: "Em branco" }),
|
|
5934
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectItem, { value: "answered", children: "Respondidas" })
|
|
5762
5935
|
] })
|
|
5763
5936
|
] }) })
|
|
5764
5937
|
] }),
|
|
5765
|
-
/* @__PURE__ */ (0,
|
|
5938
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex flex-col gap-2 not-lg:h-[calc(100vh-200px)] lg:max-h-[687px] lg:h-[687px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5766
5939
|
QuizQuestionList,
|
|
5767
5940
|
{
|
|
5768
5941
|
filterType,
|
|
@@ -5772,7 +5945,7 @@ var QuizFooter = (0, import_react12.forwardRef)(
|
|
|
5772
5945
|
] })
|
|
5773
5946
|
}
|
|
5774
5947
|
),
|
|
5775
|
-
/* @__PURE__ */ (0,
|
|
5948
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5776
5949
|
Modal_default,
|
|
5777
5950
|
{
|
|
5778
5951
|
isOpen: modalResolutionOpen,
|
|
@@ -5785,17 +5958,33 @@ var QuizFooter = (0, import_react12.forwardRef)(
|
|
|
5785
5958
|
] });
|
|
5786
5959
|
}
|
|
5787
5960
|
);
|
|
5961
|
+
var QuizBadge = ({ subtype }) => {
|
|
5962
|
+
switch (subtype) {
|
|
5963
|
+
case "PROVA":
|
|
5964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: "Prova" });
|
|
5965
|
+
case "ENEM":
|
|
5966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: "Enem" });
|
|
5967
|
+
case "VESTIBULAR":
|
|
5968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: "Vestibular" });
|
|
5969
|
+
case "SIMULADO":
|
|
5970
|
+
case null:
|
|
5971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: "Simulado" });
|
|
5972
|
+
default:
|
|
5973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: subtype });
|
|
5974
|
+
}
|
|
5975
|
+
};
|
|
5788
5976
|
var QuizResultHeaderTitle = (0, import_react12.forwardRef)(({ className, ...props }, ref) => {
|
|
5789
|
-
const {
|
|
5790
|
-
|
|
5977
|
+
const { getActiveQuiz } = useQuizStore();
|
|
5978
|
+
const activeQuiz = getActiveQuiz();
|
|
5979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
5791
5980
|
"div",
|
|
5792
5981
|
{
|
|
5793
5982
|
ref,
|
|
5794
5983
|
className: cn("flex flex-row pt-4 justify-between", className),
|
|
5795
5984
|
...props,
|
|
5796
5985
|
children: [
|
|
5797
|
-
/* @__PURE__ */ (0,
|
|
5798
|
-
|
|
5986
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
|
|
5987
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(QuizBadge, { subtype: activeQuiz?.quiz.subtype || null })
|
|
5799
5988
|
]
|
|
5800
5989
|
}
|
|
5801
5990
|
);
|
|
@@ -5803,7 +5992,7 @@ var QuizResultHeaderTitle = (0, import_react12.forwardRef)(({ className, ...prop
|
|
|
5803
5992
|
var QuizResultTitle = (0, import_react12.forwardRef)(({ className, ...props }, ref) => {
|
|
5804
5993
|
const { getQuizTitle } = useQuizStore();
|
|
5805
5994
|
const quizTitle = getQuizTitle();
|
|
5806
|
-
return /* @__PURE__ */ (0,
|
|
5995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5807
5996
|
"p",
|
|
5808
5997
|
{
|
|
5809
5998
|
className: cn("pt-6 pb-4 text-text-950 font-bold text-lg", className),
|
|
@@ -5856,15 +6045,15 @@ var QuizResultPerformance = (0, import_react12.forwardRef)(
|
|
|
5856
6045
|
});
|
|
5857
6046
|
}
|
|
5858
6047
|
const percentage = totalQuestions > 0 ? Math.round(correctAnswers / totalQuestions * 100) : 0;
|
|
5859
|
-
return /* @__PURE__ */ (0,
|
|
6048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
5860
6049
|
"div",
|
|
5861
6050
|
{
|
|
5862
6051
|
className: "flex flex-row gap-6 p-6 rounded-xl bg-background justify-between",
|
|
5863
6052
|
ref,
|
|
5864
6053
|
...props,
|
|
5865
6054
|
children: [
|
|
5866
|
-
/* @__PURE__ */ (0,
|
|
5867
|
-
/* @__PURE__ */ (0,
|
|
6055
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "relative", children: [
|
|
6056
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5868
6057
|
ProgressCircle_default,
|
|
5869
6058
|
{
|
|
5870
6059
|
size: "medium",
|
|
@@ -5874,22 +6063,22 @@ var QuizResultPerformance = (0, import_react12.forwardRef)(
|
|
|
5874
6063
|
label: ""
|
|
5875
6064
|
}
|
|
5876
6065
|
),
|
|
5877
|
-
/* @__PURE__ */ (0,
|
|
5878
|
-
/* @__PURE__ */ (0,
|
|
5879
|
-
/* @__PURE__ */ (0,
|
|
5880
|
-
/* @__PURE__ */ (0,
|
|
6066
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
6067
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
6068
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_phosphor_react9.Clock, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
6069
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-2xs font-medium text-text-800", children: formatTime(timeElapsed) })
|
|
5881
6070
|
] }),
|
|
5882
|
-
/* @__PURE__ */ (0,
|
|
6071
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
|
|
5883
6072
|
getQuestionResultStatistics()?.correctAnswers ?? "--",
|
|
5884
6073
|
" de",
|
|
5885
6074
|
" ",
|
|
5886
6075
|
totalQuestions
|
|
5887
6076
|
] }),
|
|
5888
|
-
/* @__PURE__ */ (0,
|
|
6077
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
|
|
5889
6078
|
] })
|
|
5890
6079
|
] }),
|
|
5891
|
-
/* @__PURE__ */ (0,
|
|
5892
|
-
/* @__PURE__ */ (0,
|
|
6080
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
6081
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5893
6082
|
ProgressBar_default,
|
|
5894
6083
|
{
|
|
5895
6084
|
className: "w-full",
|
|
@@ -5903,7 +6092,7 @@ var QuizResultPerformance = (0, import_react12.forwardRef)(
|
|
|
5903
6092
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
5904
6093
|
}
|
|
5905
6094
|
),
|
|
5906
|
-
/* @__PURE__ */ (0,
|
|
6095
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5907
6096
|
ProgressBar_default,
|
|
5908
6097
|
{
|
|
5909
6098
|
className: "w-full",
|
|
@@ -5917,7 +6106,7 @@ var QuizResultPerformance = (0, import_react12.forwardRef)(
|
|
|
5917
6106
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
5918
6107
|
}
|
|
5919
6108
|
),
|
|
5920
|
-
/* @__PURE__ */ (0,
|
|
6109
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5921
6110
|
ProgressBar_default,
|
|
5922
6111
|
{
|
|
5923
6112
|
className: "w-full",
|
|
@@ -5954,7 +6143,9 @@ var QuizListResult = (0, import_react12.forwardRef)(({ className, onSubjectClick
|
|
|
5954
6143
|
return {
|
|
5955
6144
|
subject: {
|
|
5956
6145
|
name: questions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria",
|
|
5957
|
-
id: subjectId
|
|
6146
|
+
id: subjectId,
|
|
6147
|
+
color: questions?.[0]?.knowledgeMatrix?.[0]?.subject?.color ?? "",
|
|
6148
|
+
icon: questions?.[0]?.knowledgeMatrix?.[0]?.subject?.icon ?? ""
|
|
5958
6149
|
},
|
|
5959
6150
|
correct,
|
|
5960
6151
|
incorrect,
|
|
@@ -5962,9 +6153,9 @@ var QuizListResult = (0, import_react12.forwardRef)(({ className, onSubjectClick
|
|
|
5962
6153
|
};
|
|
5963
6154
|
}
|
|
5964
6155
|
);
|
|
5965
|
-
return /* @__PURE__ */ (0,
|
|
5966
|
-
/* @__PURE__ */ (0,
|
|
5967
|
-
/* @__PURE__ */ (0,
|
|
6156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { ref, className, ...props, children: [
|
|
6157
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
|
|
6158
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5968
6159
|
CardResults,
|
|
5969
6160
|
{
|
|
5970
6161
|
onClick: () => onSubjectClick?.(subject.subject.id),
|
|
@@ -5972,7 +6163,8 @@ var QuizListResult = (0, import_react12.forwardRef)(({ className, onSubjectClick
|
|
|
5972
6163
|
header: subject.subject.name,
|
|
5973
6164
|
correct_answers: subject.correct,
|
|
5974
6165
|
incorrect_answers: subject.incorrect,
|
|
5975
|
-
icon:
|
|
6166
|
+
icon: subject.subject.icon || "Book",
|
|
6167
|
+
color: subject.subject.color || void 0,
|
|
5976
6168
|
direction: "row"
|
|
5977
6169
|
}
|
|
5978
6170
|
) }, subject.subject.id)) })
|
|
@@ -5985,16 +6177,16 @@ var QuizListResultByMateria = ({
|
|
|
5985
6177
|
const { getQuestionsGroupedBySubject, getQuestionIndex } = useQuizStore();
|
|
5986
6178
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
5987
6179
|
const answeredQuestions = groupedQuestions[subject] || [];
|
|
5988
|
-
return /* @__PURE__ */ (0,
|
|
5989
|
-
/* @__PURE__ */ (0,
|
|
5990
|
-
/* @__PURE__ */ (0,
|
|
5991
|
-
/* @__PURE__ */ (0,
|
|
5992
|
-
/* @__PURE__ */ (0,
|
|
6180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col", children: [
|
|
6181
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: answeredQuestions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" }) }),
|
|
6182
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: "flex flex-col ", children: [
|
|
6183
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
6184
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "flex flex-col gap-2 pt-4", children: answeredQuestions.map((question) => {
|
|
5993
6185
|
const questionIndex = getQuestionIndex(
|
|
5994
6186
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5995
6187
|
question.questionId ?? question.id
|
|
5996
6188
|
);
|
|
5997
|
-
return /* @__PURE__ */ (0,
|
|
6189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5998
6190
|
CardStatus,
|
|
5999
6191
|
{
|
|
6000
6192
|
className: "max-w-full",
|