analytica-frontend-lib 1.1.94 → 1.1.96
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/CheckBox/index.d.mts +1 -1
- package/dist/CheckBox/index.d.ts +1 -1
- package/dist/Radio/index.d.mts +2 -2
- package/dist/Radio/index.d.ts +2 -2
- package/dist/Search/index.d.mts +1 -1
- package/dist/Search/index.d.ts +1 -1
- package/dist/StatisticsCard/index.d.mts +79 -0
- package/dist/StatisticsCard/index.d.ts +79 -0
- package/dist/StatisticsCard/index.js +623 -0
- package/dist/StatisticsCard/index.js.map +1 -0
- package/dist/StatisticsCard/index.mjs +604 -0
- package/dist/StatisticsCard/index.mjs.map +1 -0
- package/dist/index.css +43 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +474 -340
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +462 -329
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +43 -0
- package/dist/styles.css.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -8073,8 +8073,140 @@ var CardSimulationHistory = forwardRef17(({ data, onSimulationClick, className,
|
|
|
8073
8073
|
);
|
|
8074
8074
|
});
|
|
8075
8075
|
|
|
8076
|
-
// src/components/
|
|
8076
|
+
// src/components/StatisticsCard/StatisticsCard.tsx
|
|
8077
|
+
import { Plus } from "phosphor-react";
|
|
8077
8078
|
import { jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
8079
|
+
var VARIANT_STYLES = {
|
|
8080
|
+
high: "bg-success-background",
|
|
8081
|
+
medium: "bg-warning-background",
|
|
8082
|
+
low: "bg-error-background",
|
|
8083
|
+
total: "bg-info-background"
|
|
8084
|
+
};
|
|
8085
|
+
var VALUE_TEXT_COLORS = {
|
|
8086
|
+
high: "text-success-700",
|
|
8087
|
+
medium: "text-warning-600",
|
|
8088
|
+
low: "text-error-700",
|
|
8089
|
+
total: "text-info-700"
|
|
8090
|
+
};
|
|
8091
|
+
var StatCard = ({ item, showPlaceholder = false }) => {
|
|
8092
|
+
return /* @__PURE__ */ jsxs30(
|
|
8093
|
+
"div",
|
|
8094
|
+
{
|
|
8095
|
+
className: `rounded-xl py-[17px] px-6 min-h-[105px] flex flex-col justify-center items-start gap-1 ${VARIANT_STYLES[item.variant]}`,
|
|
8096
|
+
children: [
|
|
8097
|
+
/* @__PURE__ */ jsx42(
|
|
8098
|
+
Text_default,
|
|
8099
|
+
{
|
|
8100
|
+
size: "4xl",
|
|
8101
|
+
weight: "bold",
|
|
8102
|
+
className: `${VALUE_TEXT_COLORS[item.variant]} leading-[42px] tracking-[0.2px] self-stretch`,
|
|
8103
|
+
children: showPlaceholder ? "-" : item.value
|
|
8104
|
+
}
|
|
8105
|
+
),
|
|
8106
|
+
/* @__PURE__ */ jsx42(
|
|
8107
|
+
Text_default,
|
|
8108
|
+
{
|
|
8109
|
+
size: "xs",
|
|
8110
|
+
weight: "bold",
|
|
8111
|
+
className: "uppercase text-[8px] leading-[9px] text-text-800 self-stretch",
|
|
8112
|
+
children: item.label
|
|
8113
|
+
}
|
|
8114
|
+
)
|
|
8115
|
+
]
|
|
8116
|
+
}
|
|
8117
|
+
);
|
|
8118
|
+
};
|
|
8119
|
+
var getGridColumnsClass = (itemCount) => {
|
|
8120
|
+
if (itemCount === 4) return "lg:grid-cols-4";
|
|
8121
|
+
if (itemCount === 3) return "lg:grid-cols-3";
|
|
8122
|
+
if (itemCount === 2) return "lg:grid-cols-2";
|
|
8123
|
+
return "lg:grid-cols-1";
|
|
8124
|
+
};
|
|
8125
|
+
var StatisticsCard = ({
|
|
8126
|
+
title,
|
|
8127
|
+
data,
|
|
8128
|
+
showPlaceholder = false,
|
|
8129
|
+
emptyStateMessage,
|
|
8130
|
+
emptyStateButtonText,
|
|
8131
|
+
onEmptyStateButtonClick,
|
|
8132
|
+
dropdownOptions,
|
|
8133
|
+
selectedDropdownValue,
|
|
8134
|
+
onDropdownChange,
|
|
8135
|
+
selectPlaceholder = "Selecione um per\xEDodo",
|
|
8136
|
+
dropdownAriaLabel = "Filtro de per\xEDodo",
|
|
8137
|
+
className = ""
|
|
8138
|
+
}) => {
|
|
8139
|
+
const hasData = data && data.length > 0;
|
|
8140
|
+
const gridColumnsClass = hasData ? getGridColumnsClass(data.length) : "";
|
|
8141
|
+
return /* @__PURE__ */ jsxs30(
|
|
8142
|
+
"div",
|
|
8143
|
+
{
|
|
8144
|
+
className: `bg-background rounded-xl p-4 h-auto lg:h-[185px] flex flex-col gap-2 ${className}`,
|
|
8145
|
+
children: [
|
|
8146
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex flex-row justify-between items-center gap-4", children: [
|
|
8147
|
+
/* @__PURE__ */ jsx42(Text_default, { as: "h3", size: "sm", weight: "medium", color: "text-text-600", children: title }),
|
|
8148
|
+
dropdownOptions && dropdownOptions.length > 0 && /* @__PURE__ */ jsx42("div", { className: "w-[99px]", children: /* @__PURE__ */ jsxs30(
|
|
8149
|
+
Select_default,
|
|
8150
|
+
{
|
|
8151
|
+
value: selectedDropdownValue,
|
|
8152
|
+
onValueChange: onDropdownChange,
|
|
8153
|
+
size: "medium",
|
|
8154
|
+
children: [
|
|
8155
|
+
/* @__PURE__ */ jsx42(
|
|
8156
|
+
SelectTrigger,
|
|
8157
|
+
{
|
|
8158
|
+
className: "border border-border-300 rounded whitespace-nowrap",
|
|
8159
|
+
"aria-label": dropdownAriaLabel,
|
|
8160
|
+
children: /* @__PURE__ */ jsx42(SelectValue, { placeholder: selectPlaceholder })
|
|
8161
|
+
}
|
|
8162
|
+
),
|
|
8163
|
+
/* @__PURE__ */ jsx42(SelectContent, { children: dropdownOptions.map((option) => /* @__PURE__ */ jsx42(SelectItem, { value: option.value, children: option.label }, option.value)) })
|
|
8164
|
+
]
|
|
8165
|
+
}
|
|
8166
|
+
) })
|
|
8167
|
+
] }),
|
|
8168
|
+
hasData ? /* @__PURE__ */ jsx42(
|
|
8169
|
+
"div",
|
|
8170
|
+
{
|
|
8171
|
+
className: `grid grid-cols-1 sm:grid-cols-2 gap-[13px] ${gridColumnsClass}`,
|
|
8172
|
+
children: data.map((item, index) => /* @__PURE__ */ jsx42(
|
|
8173
|
+
StatCard,
|
|
8174
|
+
{
|
|
8175
|
+
item,
|
|
8176
|
+
showPlaceholder
|
|
8177
|
+
},
|
|
8178
|
+
`${item.variant}-${item.label}-${index}`
|
|
8179
|
+
))
|
|
8180
|
+
}
|
|
8181
|
+
) : /* @__PURE__ */ jsxs30("div", { className: "border border-dashed border-border-300 rounded-lg p-6 min-h-[105px] flex flex-col items-center justify-center gap-2", children: [
|
|
8182
|
+
/* @__PURE__ */ jsx42(
|
|
8183
|
+
Text_default,
|
|
8184
|
+
{
|
|
8185
|
+
size: "sm",
|
|
8186
|
+
color: "text-text-600",
|
|
8187
|
+
className: "text-center max-w-md",
|
|
8188
|
+
children: emptyStateMessage
|
|
8189
|
+
}
|
|
8190
|
+
),
|
|
8191
|
+
onEmptyStateButtonClick && /* @__PURE__ */ jsx42(
|
|
8192
|
+
Button_default,
|
|
8193
|
+
{
|
|
8194
|
+
variant: "outline",
|
|
8195
|
+
action: "primary",
|
|
8196
|
+
size: "small",
|
|
8197
|
+
onClick: onEmptyStateButtonClick,
|
|
8198
|
+
iconLeft: /* @__PURE__ */ jsx42(Plus, { size: 16, weight: "bold" }),
|
|
8199
|
+
children: emptyStateButtonText
|
|
8200
|
+
}
|
|
8201
|
+
)
|
|
8202
|
+
] })
|
|
8203
|
+
]
|
|
8204
|
+
}
|
|
8205
|
+
);
|
|
8206
|
+
};
|
|
8207
|
+
|
|
8208
|
+
// src/components/NotFound/NotFound.tsx
|
|
8209
|
+
import { jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
8078
8210
|
var NotFound = ({
|
|
8079
8211
|
title,
|
|
8080
8212
|
description,
|
|
@@ -8117,22 +8249,22 @@ var NotFound = ({
|
|
|
8117
8249
|
const errorTitle = title || getDefaultTitle();
|
|
8118
8250
|
const errorDescription = description || getDefaultDescription();
|
|
8119
8251
|
const errorCode = getErrorCode();
|
|
8120
|
-
return /* @__PURE__ */
|
|
8252
|
+
return /* @__PURE__ */ jsx43(
|
|
8121
8253
|
"div",
|
|
8122
8254
|
{
|
|
8123
8255
|
className: cn(
|
|
8124
8256
|
"flex flex-col w-full h-screen items-center justify-center bg-background-50 px-4",
|
|
8125
8257
|
className
|
|
8126
8258
|
),
|
|
8127
|
-
children: /* @__PURE__ */
|
|
8259
|
+
children: /* @__PURE__ */ jsx43(
|
|
8128
8260
|
"main",
|
|
8129
8261
|
{
|
|
8130
8262
|
role: "main",
|
|
8131
8263
|
"aria-labelledby": "error-title",
|
|
8132
8264
|
"aria-describedby": "error-description",
|
|
8133
8265
|
className: "flex flex-col items-center text-center max-w-md space-y-6",
|
|
8134
|
-
children: /* @__PURE__ */
|
|
8135
|
-
/* @__PURE__ */
|
|
8266
|
+
children: /* @__PURE__ */ jsxs31("section", { "aria-label": `Erro ${errorCode}`, children: [
|
|
8267
|
+
/* @__PURE__ */ jsx43(
|
|
8136
8268
|
"div",
|
|
8137
8269
|
{
|
|
8138
8270
|
className: "text-8xl font-bold text-primary-300 select-none",
|
|
@@ -8140,8 +8272,8 @@ var NotFound = ({
|
|
|
8140
8272
|
children: errorCode
|
|
8141
8273
|
}
|
|
8142
8274
|
),
|
|
8143
|
-
/* @__PURE__ */
|
|
8144
|
-
/* @__PURE__ */
|
|
8275
|
+
/* @__PURE__ */ jsxs31("header", { className: "space-y-2", children: [
|
|
8276
|
+
/* @__PURE__ */ jsx43(
|
|
8145
8277
|
Text_default,
|
|
8146
8278
|
{
|
|
8147
8279
|
size: "xl",
|
|
@@ -8152,9 +8284,9 @@ var NotFound = ({
|
|
|
8152
8284
|
children: errorTitle
|
|
8153
8285
|
}
|
|
8154
8286
|
),
|
|
8155
|
-
/* @__PURE__ */
|
|
8287
|
+
/* @__PURE__ */ jsx43(Text_default, { size: "md", className: "text-text-600", id: "error-description", children: errorDescription })
|
|
8156
8288
|
] }),
|
|
8157
|
-
onButtonClick && /* @__PURE__ */
|
|
8289
|
+
onButtonClick && /* @__PURE__ */ jsx43("nav", { "aria-label": "Navega\xE7\xE3o de erro", children: /* @__PURE__ */ jsx43(
|
|
8158
8290
|
Button_default,
|
|
8159
8291
|
{
|
|
8160
8292
|
onClick: handleButtonClick,
|
|
@@ -8196,7 +8328,7 @@ import {
|
|
|
8196
8328
|
// src/components/DownloadButton/DownloadButton.tsx
|
|
8197
8329
|
import { useCallback as useCallback2, useState as useState13 } from "react";
|
|
8198
8330
|
import { DownloadSimple } from "phosphor-react";
|
|
8199
|
-
import { jsx as
|
|
8331
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
8200
8332
|
var getMimeType = (url) => {
|
|
8201
8333
|
const extension = getFileExtension(url);
|
|
8202
8334
|
const mimeTypes = {
|
|
@@ -8353,10 +8485,10 @@ var DownloadButton = ({
|
|
|
8353
8485
|
if (!hasContent) {
|
|
8354
8486
|
return null;
|
|
8355
8487
|
}
|
|
8356
|
-
return /* @__PURE__ */
|
|
8488
|
+
return /* @__PURE__ */ jsx44("div", { className: cn("flex items-center", className), children: /* @__PURE__ */ jsx44(
|
|
8357
8489
|
IconButton_default,
|
|
8358
8490
|
{
|
|
8359
|
-
icon: /* @__PURE__ */
|
|
8491
|
+
icon: /* @__PURE__ */ jsx44(DownloadSimple, { size: 24 }),
|
|
8360
8492
|
onClick: handleDownload,
|
|
8361
8493
|
disabled: disabled || isDownloading,
|
|
8362
8494
|
"aria-label": (() => {
|
|
@@ -8377,7 +8509,7 @@ var DownloadButton = ({
|
|
|
8377
8509
|
var DownloadButton_default = DownloadButton;
|
|
8378
8510
|
|
|
8379
8511
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
8380
|
-
import { jsx as
|
|
8512
|
+
import { jsx as jsx45, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
8381
8513
|
var CONTROLS_HIDE_TIMEOUT = 3e3;
|
|
8382
8514
|
var LEAVE_HIDE_TIMEOUT = 1e3;
|
|
8383
8515
|
var INIT_DELAY = 100;
|
|
@@ -8393,7 +8525,7 @@ var ProgressBar2 = ({
|
|
|
8393
8525
|
progressPercentage,
|
|
8394
8526
|
onSeek,
|
|
8395
8527
|
className = "px-4 pb-2"
|
|
8396
|
-
}) => /* @__PURE__ */
|
|
8528
|
+
}) => /* @__PURE__ */ jsx45("div", { className, children: /* @__PURE__ */ jsx45(
|
|
8397
8529
|
"input",
|
|
8398
8530
|
{
|
|
8399
8531
|
type: "range",
|
|
@@ -8415,17 +8547,17 @@ var VolumeControls = ({
|
|
|
8415
8547
|
onToggleMute,
|
|
8416
8548
|
iconSize = 24,
|
|
8417
8549
|
showSlider = true
|
|
8418
|
-
}) => /* @__PURE__ */
|
|
8419
|
-
/* @__PURE__ */
|
|
8550
|
+
}) => /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2", children: [
|
|
8551
|
+
/* @__PURE__ */ jsx45(
|
|
8420
8552
|
IconButton_default,
|
|
8421
8553
|
{
|
|
8422
|
-
icon: isMuted ? /* @__PURE__ */
|
|
8554
|
+
icon: isMuted ? /* @__PURE__ */ jsx45(SpeakerSlash, { size: iconSize }) : /* @__PURE__ */ jsx45(SpeakerHigh2, { size: iconSize }),
|
|
8423
8555
|
onClick: onToggleMute,
|
|
8424
8556
|
"aria-label": isMuted ? "Unmute" : "Mute",
|
|
8425
8557
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
8426
8558
|
}
|
|
8427
8559
|
),
|
|
8428
|
-
showSlider && /* @__PURE__ */
|
|
8560
|
+
showSlider && /* @__PURE__ */ jsx45(
|
|
8429
8561
|
"input",
|
|
8430
8562
|
{
|
|
8431
8563
|
type: "range",
|
|
@@ -8482,7 +8614,7 @@ var SpeedMenu = ({
|
|
|
8482
8614
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
8483
8615
|
};
|
|
8484
8616
|
}, [showSpeedMenu, onToggleMenu]);
|
|
8485
|
-
const menuContent = /* @__PURE__ */
|
|
8617
|
+
const menuContent = /* @__PURE__ */ jsx45(
|
|
8486
8618
|
"div",
|
|
8487
8619
|
{
|
|
8488
8620
|
ref: speedMenuRef,
|
|
@@ -8493,7 +8625,7 @@ var SpeedMenu = ({
|
|
|
8493
8625
|
top: `${position.top}px`,
|
|
8494
8626
|
left: `${position.left}px`
|
|
8495
8627
|
},
|
|
8496
|
-
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */
|
|
8628
|
+
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */ jsxs32(
|
|
8497
8629
|
"button",
|
|
8498
8630
|
{
|
|
8499
8631
|
role: "menuitemradio",
|
|
@@ -8510,12 +8642,12 @@ var SpeedMenu = ({
|
|
|
8510
8642
|
}
|
|
8511
8643
|
);
|
|
8512
8644
|
const portalContent = showSpeedMenu && globalThis.window !== void 0 && globalThis.document !== void 0 && !!globalThis.document?.body ? createPortal(menuContent, globalThis.document.body) : null;
|
|
8513
|
-
return /* @__PURE__ */
|
|
8514
|
-
/* @__PURE__ */
|
|
8645
|
+
return /* @__PURE__ */ jsxs32("div", { className: "relative", ref: speedMenuContainerRef, children: [
|
|
8646
|
+
/* @__PURE__ */ jsx45(
|
|
8515
8647
|
IconButton_default,
|
|
8516
8648
|
{
|
|
8517
8649
|
ref: buttonRef,
|
|
8518
|
-
icon: /* @__PURE__ */
|
|
8650
|
+
icon: /* @__PURE__ */ jsx45(DotsThreeVertical3, { size: iconSize }),
|
|
8519
8651
|
onClick: onToggleMenu,
|
|
8520
8652
|
"aria-label": "Playback speed",
|
|
8521
8653
|
"aria-haspopup": "menu",
|
|
@@ -9031,10 +9163,10 @@ var VideoPlayer = ({
|
|
|
9031
9163
|
]
|
|
9032
9164
|
);
|
|
9033
9165
|
const groupedSubTitleValid = subtitles && subtitlesValidation === "valid";
|
|
9034
|
-
return /* @__PURE__ */
|
|
9035
|
-
(title || subtitleText) && /* @__PURE__ */
|
|
9036
|
-
/* @__PURE__ */
|
|
9037
|
-
title && /* @__PURE__ */
|
|
9166
|
+
return /* @__PURE__ */ jsxs32("div", { className: cn("flex flex-col", className), children: [
|
|
9167
|
+
(title || subtitleText) && /* @__PURE__ */ jsxs32("div", { className: "bg-subject-1 px-8 py-4 flex items-end justify-between min-h-20", children: [
|
|
9168
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-1", children: [
|
|
9169
|
+
title && /* @__PURE__ */ jsx45(
|
|
9038
9170
|
Text_default,
|
|
9039
9171
|
{
|
|
9040
9172
|
as: "h2",
|
|
@@ -9045,7 +9177,7 @@ var VideoPlayer = ({
|
|
|
9045
9177
|
children: title
|
|
9046
9178
|
}
|
|
9047
9179
|
),
|
|
9048
|
-
subtitleText && /* @__PURE__ */
|
|
9180
|
+
subtitleText && /* @__PURE__ */ jsx45(
|
|
9049
9181
|
Text_default,
|
|
9050
9182
|
{
|
|
9051
9183
|
as: "p",
|
|
@@ -9057,7 +9189,7 @@ var VideoPlayer = ({
|
|
|
9057
9189
|
}
|
|
9058
9190
|
)
|
|
9059
9191
|
] }),
|
|
9060
|
-
showDownloadButton && downloadContent && /* @__PURE__ */
|
|
9192
|
+
showDownloadButton && downloadContent && /* @__PURE__ */ jsx45(
|
|
9061
9193
|
DownloadButton_default,
|
|
9062
9194
|
{
|
|
9063
9195
|
content: downloadContent,
|
|
@@ -9069,7 +9201,7 @@ var VideoPlayer = ({
|
|
|
9069
9201
|
}
|
|
9070
9202
|
)
|
|
9071
9203
|
] }),
|
|
9072
|
-
/* @__PURE__ */
|
|
9204
|
+
/* @__PURE__ */ jsxs32(
|
|
9073
9205
|
"section",
|
|
9074
9206
|
{
|
|
9075
9207
|
className: cn(
|
|
@@ -9084,7 +9216,7 @@ var VideoPlayer = ({
|
|
|
9084
9216
|
onTouchStart: handleMouseEnter,
|
|
9085
9217
|
onMouseLeave: handleMouseLeave,
|
|
9086
9218
|
children: [
|
|
9087
|
-
/* @__PURE__ */
|
|
9219
|
+
/* @__PURE__ */ jsx45(
|
|
9088
9220
|
"video",
|
|
9089
9221
|
{
|
|
9090
9222
|
ref: videoRef,
|
|
@@ -9099,7 +9231,7 @@ var VideoPlayer = ({
|
|
|
9099
9231
|
onKeyDown: handleVideoKeyDown,
|
|
9100
9232
|
tabIndex: 0,
|
|
9101
9233
|
"aria-label": title ? `Video: ${title}` : "Video player",
|
|
9102
|
-
children: /* @__PURE__ */
|
|
9234
|
+
children: /* @__PURE__ */ jsx45(
|
|
9103
9235
|
"track",
|
|
9104
9236
|
{
|
|
9105
9237
|
ref: trackRef,
|
|
@@ -9112,17 +9244,17 @@ var VideoPlayer = ({
|
|
|
9112
9244
|
)
|
|
9113
9245
|
}
|
|
9114
9246
|
),
|
|
9115
|
-
!isPlaying && /* @__PURE__ */
|
|
9247
|
+
!isPlaying && /* @__PURE__ */ jsx45(
|
|
9116
9248
|
"div",
|
|
9117
9249
|
{
|
|
9118
9250
|
className: cn(
|
|
9119
9251
|
"absolute inset-0 flex bg-black/30 transition-opacity",
|
|
9120
9252
|
getCenterPlayButtonPosition()
|
|
9121
9253
|
),
|
|
9122
|
-
children: /* @__PURE__ */
|
|
9254
|
+
children: /* @__PURE__ */ jsx45(
|
|
9123
9255
|
IconButton_default,
|
|
9124
9256
|
{
|
|
9125
|
-
icon: /* @__PURE__ */
|
|
9257
|
+
icon: /* @__PURE__ */ jsx45(Play2, { size: 32, weight: "regular", className: "ml-1" }),
|
|
9126
9258
|
onClick: togglePlayPause,
|
|
9127
9259
|
"aria-label": "Play video",
|
|
9128
9260
|
className: "!bg-transparent !text-white !w-auto !h-auto hover:!bg-transparent hover:!text-gray-200"
|
|
@@ -9130,17 +9262,17 @@ var VideoPlayer = ({
|
|
|
9130
9262
|
)
|
|
9131
9263
|
}
|
|
9132
9264
|
),
|
|
9133
|
-
/* @__PURE__ */
|
|
9265
|
+
/* @__PURE__ */ jsx45(
|
|
9134
9266
|
"div",
|
|
9135
9267
|
{
|
|
9136
9268
|
className: cn(
|
|
9137
9269
|
"absolute top-0 left-0 right-0 p-4 bg-gradient-to-b from-black/70 to-transparent transition-opacity",
|
|
9138
9270
|
getTopControlsOpacity()
|
|
9139
9271
|
),
|
|
9140
|
-
children: /* @__PURE__ */
|
|
9272
|
+
children: /* @__PURE__ */ jsx45("div", { className: "flex justify-start", children: /* @__PURE__ */ jsx45(
|
|
9141
9273
|
IconButton_default,
|
|
9142
9274
|
{
|
|
9143
|
-
icon: isFullscreen ? /* @__PURE__ */
|
|
9275
|
+
icon: isFullscreen ? /* @__PURE__ */ jsx45(ArrowsInSimple, { size: 24 }) : /* @__PURE__ */ jsx45(ArrowsOutSimple, { size: 24 }),
|
|
9144
9276
|
onClick: toggleFullscreen,
|
|
9145
9277
|
"aria-label": isFullscreen ? "Exit fullscreen" : "Enter fullscreen",
|
|
9146
9278
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
@@ -9148,7 +9280,7 @@ var VideoPlayer = ({
|
|
|
9148
9280
|
) })
|
|
9149
9281
|
}
|
|
9150
9282
|
),
|
|
9151
|
-
/* @__PURE__ */
|
|
9283
|
+
/* @__PURE__ */ jsxs32(
|
|
9152
9284
|
"div",
|
|
9153
9285
|
{
|
|
9154
9286
|
className: cn(
|
|
@@ -9156,7 +9288,7 @@ var VideoPlayer = ({
|
|
|
9156
9288
|
getBottomControlsOpacity()
|
|
9157
9289
|
),
|
|
9158
9290
|
children: [
|
|
9159
|
-
/* @__PURE__ */
|
|
9291
|
+
/* @__PURE__ */ jsx45(
|
|
9160
9292
|
ProgressBar2,
|
|
9161
9293
|
{
|
|
9162
9294
|
currentTime,
|
|
@@ -9166,7 +9298,7 @@ var VideoPlayer = ({
|
|
|
9166
9298
|
className: getProgressBarPadding()
|
|
9167
9299
|
}
|
|
9168
9300
|
),
|
|
9169
|
-
/* @__PURE__ */
|
|
9301
|
+
/* @__PURE__ */ jsxs32(
|
|
9170
9302
|
"div",
|
|
9171
9303
|
{
|
|
9172
9304
|
className: cn(
|
|
@@ -9174,17 +9306,17 @@ var VideoPlayer = ({
|
|
|
9174
9306
|
getControlsPadding()
|
|
9175
9307
|
),
|
|
9176
9308
|
children: [
|
|
9177
|
-
/* @__PURE__ */
|
|
9178
|
-
/* @__PURE__ */
|
|
9309
|
+
/* @__PURE__ */ jsxs32("div", { className: cn("flex items-center", getControlsGap()), children: [
|
|
9310
|
+
/* @__PURE__ */ jsx45(
|
|
9179
9311
|
IconButton_default,
|
|
9180
9312
|
{
|
|
9181
|
-
icon: isPlaying ? /* @__PURE__ */
|
|
9313
|
+
icon: isPlaying ? /* @__PURE__ */ jsx45(Pause, { size: getIconSize2() }) : /* @__PURE__ */ jsx45(Play2, { size: getIconSize2() }),
|
|
9182
9314
|
onClick: togglePlayPause,
|
|
9183
9315
|
"aria-label": isPlaying ? "Pause" : "Play",
|
|
9184
9316
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
9185
9317
|
}
|
|
9186
9318
|
),
|
|
9187
|
-
/* @__PURE__ */
|
|
9319
|
+
/* @__PURE__ */ jsx45(
|
|
9188
9320
|
VolumeControls,
|
|
9189
9321
|
{
|
|
9190
9322
|
volume,
|
|
@@ -9195,10 +9327,10 @@ var VideoPlayer = ({
|
|
|
9195
9327
|
showSlider: !isUltraSmallMobile
|
|
9196
9328
|
}
|
|
9197
9329
|
),
|
|
9198
|
-
groupedSubTitleValid && /* @__PURE__ */
|
|
9330
|
+
groupedSubTitleValid && /* @__PURE__ */ jsx45(
|
|
9199
9331
|
IconButton_default,
|
|
9200
9332
|
{
|
|
9201
|
-
icon: /* @__PURE__ */
|
|
9333
|
+
icon: /* @__PURE__ */ jsx45(ClosedCaptioning, { size: getIconSize2() }),
|
|
9202
9334
|
onClick: toggleCaptions,
|
|
9203
9335
|
"aria-label": showCaptions ? "Hide captions" : "Show captions",
|
|
9204
9336
|
className: cn(
|
|
@@ -9207,13 +9339,13 @@ var VideoPlayer = ({
|
|
|
9207
9339
|
)
|
|
9208
9340
|
}
|
|
9209
9341
|
),
|
|
9210
|
-
/* @__PURE__ */
|
|
9342
|
+
/* @__PURE__ */ jsxs32(Text_default, { size: "sm", weight: "medium", color: "text-white", children: [
|
|
9211
9343
|
formatTime(currentTime),
|
|
9212
9344
|
" / ",
|
|
9213
9345
|
formatTime(duration)
|
|
9214
9346
|
] })
|
|
9215
9347
|
] }),
|
|
9216
|
-
/* @__PURE__ */
|
|
9348
|
+
/* @__PURE__ */ jsx45("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ jsx45(
|
|
9217
9349
|
SpeedMenu,
|
|
9218
9350
|
{
|
|
9219
9351
|
showSpeedMenu,
|
|
@@ -9241,7 +9373,7 @@ var VideoPlayer_default = VideoPlayer;
|
|
|
9241
9373
|
// src/components/Whiteboard/Whiteboard.tsx
|
|
9242
9374
|
import { useCallback as useCallback4, useState as useState15 } from "react";
|
|
9243
9375
|
import { ArrowsOut } from "phosphor-react";
|
|
9244
|
-
import { Fragment as Fragment9, jsx as
|
|
9376
|
+
import { Fragment as Fragment9, jsx as jsx46, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
9245
9377
|
var IMAGE_WIDTH = 225;
|
|
9246
9378
|
var IMAGE_HEIGHT = 90;
|
|
9247
9379
|
var Whiteboard = ({
|
|
@@ -9279,7 +9411,7 @@ var Whiteboard = ({
|
|
|
9279
9411
|
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
|
|
9280
9412
|
}[imagesPerRow];
|
|
9281
9413
|
if (!images || images.length === 0) {
|
|
9282
|
-
return /* @__PURE__ */
|
|
9414
|
+
return /* @__PURE__ */ jsx46(
|
|
9283
9415
|
"div",
|
|
9284
9416
|
{
|
|
9285
9417
|
className: cn(
|
|
@@ -9287,11 +9419,11 @@ var Whiteboard = ({
|
|
|
9287
9419
|
className
|
|
9288
9420
|
),
|
|
9289
9421
|
...rest,
|
|
9290
|
-
children: /* @__PURE__ */
|
|
9422
|
+
children: /* @__PURE__ */ jsx46("p", { className: "text-gray-400 text-sm", children: "Nenhuma imagem dispon\xEDvel" })
|
|
9291
9423
|
}
|
|
9292
9424
|
);
|
|
9293
9425
|
}
|
|
9294
|
-
return /* @__PURE__ */
|
|
9426
|
+
return /* @__PURE__ */ jsx46(
|
|
9295
9427
|
"div",
|
|
9296
9428
|
{
|
|
9297
9429
|
className: cn(
|
|
@@ -9299,7 +9431,7 @@ var Whiteboard = ({
|
|
|
9299
9431
|
className
|
|
9300
9432
|
),
|
|
9301
9433
|
...rest,
|
|
9302
|
-
children: /* @__PURE__ */
|
|
9434
|
+
children: /* @__PURE__ */ jsx46("div", { className: cn("grid gap-4", gridColsClass), children: images.map((image) => /* @__PURE__ */ jsxs33(
|
|
9303
9435
|
"div",
|
|
9304
9436
|
{
|
|
9305
9437
|
className: "relative group overflow-hidden bg-gray-100 rounded-lg",
|
|
@@ -9307,7 +9439,7 @@ var Whiteboard = ({
|
|
|
9307
9439
|
width: `${IMAGE_WIDTH}px`
|
|
9308
9440
|
},
|
|
9309
9441
|
children: [
|
|
9310
|
-
/* @__PURE__ */
|
|
9442
|
+
/* @__PURE__ */ jsx46(
|
|
9311
9443
|
"div",
|
|
9312
9444
|
{
|
|
9313
9445
|
className: "relative",
|
|
@@ -9315,8 +9447,8 @@ var Whiteboard = ({
|
|
|
9315
9447
|
width: `${IMAGE_WIDTH}px`,
|
|
9316
9448
|
height: `${IMAGE_HEIGHT}px`
|
|
9317
9449
|
},
|
|
9318
|
-
children: imageErrors.has(image.id) ? /* @__PURE__ */
|
|
9319
|
-
/* @__PURE__ */
|
|
9450
|
+
children: imageErrors.has(image.id) ? /* @__PURE__ */ jsx46("div", { className: "absolute inset-0 flex items-center justify-center bg-gray-200", children: /* @__PURE__ */ jsx46("p", { className: "text-gray-500 text-sm text-center px-2", children: "Imagem indispon\xEDvel" }) }) : /* @__PURE__ */ jsxs33(Fragment9, { children: [
|
|
9451
|
+
/* @__PURE__ */ jsx46(
|
|
9320
9452
|
"img",
|
|
9321
9453
|
{
|
|
9322
9454
|
src: image.imageUrl,
|
|
@@ -9326,18 +9458,18 @@ var Whiteboard = ({
|
|
|
9326
9458
|
onError: () => handleImageError(image.id)
|
|
9327
9459
|
}
|
|
9328
9460
|
),
|
|
9329
|
-
/* @__PURE__ */
|
|
9461
|
+
/* @__PURE__ */ jsx46("div", { className: "absolute inset-0 bg-gradient-to-t from-black/20 to-transparent" })
|
|
9330
9462
|
] })
|
|
9331
9463
|
}
|
|
9332
9464
|
),
|
|
9333
|
-
showDownload && /* @__PURE__ */
|
|
9465
|
+
showDownload && /* @__PURE__ */ jsx46(
|
|
9334
9466
|
"button",
|
|
9335
9467
|
{
|
|
9336
9468
|
type: "button",
|
|
9337
9469
|
onClick: () => handleDownload(image),
|
|
9338
9470
|
className: "cursor-pointer absolute bottom-3 right-3 flex items-center justify-center bg-black/20 backdrop-blur-sm rounded hover:bg-black/30 transition-colors duration-200 group/button w-6 h-6",
|
|
9339
9471
|
"aria-label": `Download ${image.title || "imagem"}`,
|
|
9340
|
-
children: /* @__PURE__ */
|
|
9472
|
+
children: /* @__PURE__ */ jsx46(
|
|
9341
9473
|
ArrowsOut,
|
|
9342
9474
|
{
|
|
9343
9475
|
size: 24,
|
|
@@ -9366,7 +9498,7 @@ import {
|
|
|
9366
9498
|
useMemo as useMemo4
|
|
9367
9499
|
} from "react";
|
|
9368
9500
|
import { useLocation, Navigate } from "react-router-dom";
|
|
9369
|
-
import { Fragment as Fragment10, jsx as
|
|
9501
|
+
import { Fragment as Fragment10, jsx as jsx47 } from "react/jsx-runtime";
|
|
9370
9502
|
var AuthContext = createContext(void 0);
|
|
9371
9503
|
var AuthProvider = ({
|
|
9372
9504
|
children,
|
|
@@ -9436,7 +9568,7 @@ var AuthProvider = ({
|
|
|
9436
9568
|
}),
|
|
9437
9569
|
[authState, checkAuth, signOut]
|
|
9438
9570
|
);
|
|
9439
|
-
return /* @__PURE__ */
|
|
9571
|
+
return /* @__PURE__ */ jsx47(AuthContext.Provider, { value: contextValue, children });
|
|
9440
9572
|
};
|
|
9441
9573
|
var useAuth = () => {
|
|
9442
9574
|
const context = useContext(AuthContext);
|
|
@@ -9452,9 +9584,9 @@ var ProtectedRoute = ({
|
|
|
9452
9584
|
additionalCheck
|
|
9453
9585
|
}) => {
|
|
9454
9586
|
const { isAuthenticated, isLoading, ...authState } = useAuth();
|
|
9455
|
-
const defaultLoadingComponent = /* @__PURE__ */
|
|
9587
|
+
const defaultLoadingComponent = /* @__PURE__ */ jsx47("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsx47("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
9456
9588
|
if (isLoading) {
|
|
9457
|
-
return /* @__PURE__ */
|
|
9589
|
+
return /* @__PURE__ */ jsx47(Fragment10, { children: loadingComponent || defaultLoadingComponent });
|
|
9458
9590
|
}
|
|
9459
9591
|
if (!isAuthenticated) {
|
|
9460
9592
|
if (typeof window !== "undefined") {
|
|
@@ -9465,12 +9597,12 @@ var ProtectedRoute = ({
|
|
|
9465
9597
|
return null;
|
|
9466
9598
|
}
|
|
9467
9599
|
}
|
|
9468
|
-
return /* @__PURE__ */
|
|
9600
|
+
return /* @__PURE__ */ jsx47(Navigate, { to: redirectTo, replace: true });
|
|
9469
9601
|
}
|
|
9470
9602
|
if (additionalCheck && !additionalCheck({ isAuthenticated, isLoading, ...authState })) {
|
|
9471
|
-
return /* @__PURE__ */
|
|
9603
|
+
return /* @__PURE__ */ jsx47(Navigate, { to: redirectTo, replace: true });
|
|
9472
9604
|
}
|
|
9473
|
-
return /* @__PURE__ */
|
|
9605
|
+
return /* @__PURE__ */ jsx47(Fragment10, { children });
|
|
9474
9606
|
};
|
|
9475
9607
|
var PublicRoute = ({
|
|
9476
9608
|
children,
|
|
@@ -9480,15 +9612,15 @@ var PublicRoute = ({
|
|
|
9480
9612
|
}) => {
|
|
9481
9613
|
const { isAuthenticated, isLoading } = useAuth();
|
|
9482
9614
|
if (checkAuthBeforeRender && isLoading) {
|
|
9483
|
-
return /* @__PURE__ */
|
|
9615
|
+
return /* @__PURE__ */ jsx47("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsx47("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
9484
9616
|
}
|
|
9485
9617
|
if (isAuthenticated && redirectIfAuthenticated) {
|
|
9486
|
-
return /* @__PURE__ */
|
|
9618
|
+
return /* @__PURE__ */ jsx47(Navigate, { to: redirectTo, replace: true });
|
|
9487
9619
|
}
|
|
9488
|
-
return /* @__PURE__ */
|
|
9620
|
+
return /* @__PURE__ */ jsx47(Fragment10, { children });
|
|
9489
9621
|
};
|
|
9490
9622
|
var withAuth = (Component, options = {}) => {
|
|
9491
|
-
return (props) => /* @__PURE__ */
|
|
9623
|
+
return (props) => /* @__PURE__ */ jsx47(ProtectedRoute, { ...options, children: /* @__PURE__ */ jsx47(Component, { ...props }) });
|
|
9492
9624
|
};
|
|
9493
9625
|
var useAuthGuard = (options = {}) => {
|
|
9494
9626
|
const authState = useAuth();
|
|
@@ -9503,7 +9635,7 @@ var useAuthGuard = (options = {}) => {
|
|
|
9503
9635
|
var useRouteAuth = (fallbackPath = "/") => {
|
|
9504
9636
|
const { isAuthenticated, isLoading } = useAuth();
|
|
9505
9637
|
const location = useLocation();
|
|
9506
|
-
const redirectToLogin = () => /* @__PURE__ */
|
|
9638
|
+
const redirectToLogin = () => /* @__PURE__ */ jsx47(Navigate, { to: fallbackPath, state: { from: location }, replace: true });
|
|
9507
9639
|
return {
|
|
9508
9640
|
isAuthenticated,
|
|
9509
9641
|
isLoading,
|
|
@@ -9543,7 +9675,7 @@ import {
|
|
|
9543
9675
|
useState as useState17
|
|
9544
9676
|
} from "react";
|
|
9545
9677
|
import { CaretRight as CaretRight4 } from "phosphor-react";
|
|
9546
|
-
import { jsx as
|
|
9678
|
+
import { jsx as jsx48, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
9547
9679
|
var CardAccordation = forwardRef18(
|
|
9548
9680
|
({
|
|
9549
9681
|
trigger,
|
|
@@ -9566,7 +9698,7 @@ var CardAccordation = forwardRef18(
|
|
|
9566
9698
|
handleToggle();
|
|
9567
9699
|
}
|
|
9568
9700
|
};
|
|
9569
|
-
return /* @__PURE__ */
|
|
9701
|
+
return /* @__PURE__ */ jsxs34(
|
|
9570
9702
|
CardBase,
|
|
9571
9703
|
{
|
|
9572
9704
|
ref,
|
|
@@ -9576,7 +9708,7 @@ var CardAccordation = forwardRef18(
|
|
|
9576
9708
|
className: cn("overflow-hidden", className),
|
|
9577
9709
|
...props,
|
|
9578
9710
|
children: [
|
|
9579
|
-
/* @__PURE__ */
|
|
9711
|
+
/* @__PURE__ */ jsxs34(
|
|
9580
9712
|
"button",
|
|
9581
9713
|
{
|
|
9582
9714
|
onClick: handleToggle,
|
|
@@ -9586,7 +9718,7 @@ var CardAccordation = forwardRef18(
|
|
|
9586
9718
|
"aria-controls": "accordion-content",
|
|
9587
9719
|
children: [
|
|
9588
9720
|
trigger,
|
|
9589
|
-
/* @__PURE__ */
|
|
9721
|
+
/* @__PURE__ */ jsx48(
|
|
9590
9722
|
CaretRight4,
|
|
9591
9723
|
{
|
|
9592
9724
|
size: 20,
|
|
@@ -9600,7 +9732,7 @@ var CardAccordation = forwardRef18(
|
|
|
9600
9732
|
]
|
|
9601
9733
|
}
|
|
9602
9734
|
),
|
|
9603
|
-
/* @__PURE__ */
|
|
9735
|
+
/* @__PURE__ */ jsx48(
|
|
9604
9736
|
"div",
|
|
9605
9737
|
{
|
|
9606
9738
|
id: contentId,
|
|
@@ -9609,7 +9741,7 @@ var CardAccordation = forwardRef18(
|
|
|
9609
9741
|
isExpanded ? "max-h-screen opacity-100" : "max-h-0 opacity-0"
|
|
9610
9742
|
),
|
|
9611
9743
|
"data-testid": "accordion-content",
|
|
9612
|
-
children: /* @__PURE__ */
|
|
9744
|
+
children: /* @__PURE__ */ jsx48("div", { className: "p-4 pt-0 border-border-50", children })
|
|
9613
9745
|
}
|
|
9614
9746
|
)
|
|
9615
9747
|
]
|
|
@@ -9621,7 +9753,7 @@ var CardAccordation = forwardRef18(
|
|
|
9621
9753
|
// src/components/Alternative/Alternative.tsx
|
|
9622
9754
|
import { CheckCircle as CheckCircle4, XCircle as XCircle3 } from "phosphor-react";
|
|
9623
9755
|
import { forwardRef as forwardRef19, useId as useId10, useState as useState18 } from "react";
|
|
9624
|
-
import { jsx as
|
|
9756
|
+
import { jsx as jsx49, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
9625
9757
|
var AlternativesList = ({
|
|
9626
9758
|
alternatives,
|
|
9627
9759
|
name,
|
|
@@ -9652,9 +9784,9 @@ var AlternativesList = ({
|
|
|
9652
9784
|
const getStatusBadge2 = (status) => {
|
|
9653
9785
|
switch (status) {
|
|
9654
9786
|
case "correct":
|
|
9655
|
-
return /* @__PURE__ */
|
|
9787
|
+
return /* @__PURE__ */ jsx49(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx49(CheckCircle4, {}), children: "Resposta correta" });
|
|
9656
9788
|
case "incorrect":
|
|
9657
|
-
return /* @__PURE__ */
|
|
9789
|
+
return /* @__PURE__ */ jsx49(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx49(XCircle3, {}), children: "Resposta incorreta" });
|
|
9658
9790
|
default:
|
|
9659
9791
|
return null;
|
|
9660
9792
|
}
|
|
@@ -9684,10 +9816,10 @@ var AlternativesList = ({
|
|
|
9684
9816
|
const renderRadio = () => {
|
|
9685
9817
|
const radioClasses = `w-6 h-6 rounded-full border-2 cursor-default transition-all duration-200 flex items-center justify-center ${isUserSelected ? "border-primary-950 bg-background" : "border-border-400 bg-background"}`;
|
|
9686
9818
|
const dotClasses = "w-3 h-3 rounded-full bg-primary-950 transition-all duration-200";
|
|
9687
|
-
return /* @__PURE__ */
|
|
9819
|
+
return /* @__PURE__ */ jsx49("div", { className: radioClasses, children: isUserSelected && /* @__PURE__ */ jsx49("div", { className: dotClasses }) });
|
|
9688
9820
|
};
|
|
9689
9821
|
if (layout === "detailed") {
|
|
9690
|
-
return /* @__PURE__ */
|
|
9822
|
+
return /* @__PURE__ */ jsx49(
|
|
9691
9823
|
"div",
|
|
9692
9824
|
{
|
|
9693
9825
|
className: cn(
|
|
@@ -9695,11 +9827,11 @@ var AlternativesList = ({
|
|
|
9695
9827
|
statusStyles,
|
|
9696
9828
|
alternative.disabled ? "opacity-50" : ""
|
|
9697
9829
|
),
|
|
9698
|
-
children: /* @__PURE__ */
|
|
9699
|
-
/* @__PURE__ */
|
|
9700
|
-
/* @__PURE__ */
|
|
9701
|
-
/* @__PURE__ */
|
|
9702
|
-
/* @__PURE__ */
|
|
9830
|
+
children: /* @__PURE__ */ jsxs35("div", { className: "flex items-start justify-between gap-3", children: [
|
|
9831
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
9832
|
+
/* @__PURE__ */ jsx49("div", { className: "mt-1", children: renderRadio() }),
|
|
9833
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex-1", children: [
|
|
9834
|
+
/* @__PURE__ */ jsx49(
|
|
9703
9835
|
"p",
|
|
9704
9836
|
{
|
|
9705
9837
|
className: cn(
|
|
@@ -9709,16 +9841,16 @@ var AlternativesList = ({
|
|
|
9709
9841
|
children: alternative.label
|
|
9710
9842
|
}
|
|
9711
9843
|
),
|
|
9712
|
-
alternative.description && /* @__PURE__ */
|
|
9844
|
+
alternative.description && /* @__PURE__ */ jsx49("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
9713
9845
|
] })
|
|
9714
9846
|
] }),
|
|
9715
|
-
statusBadge && /* @__PURE__ */
|
|
9847
|
+
statusBadge && /* @__PURE__ */ jsx49("div", { className: "flex-shrink-0", children: statusBadge })
|
|
9716
9848
|
] })
|
|
9717
9849
|
},
|
|
9718
9850
|
alternativeId
|
|
9719
9851
|
);
|
|
9720
9852
|
}
|
|
9721
|
-
return /* @__PURE__ */
|
|
9853
|
+
return /* @__PURE__ */ jsxs35(
|
|
9722
9854
|
"div",
|
|
9723
9855
|
{
|
|
9724
9856
|
className: cn(
|
|
@@ -9727,9 +9859,9 @@ var AlternativesList = ({
|
|
|
9727
9859
|
alternative.disabled ? "opacity-50" : ""
|
|
9728
9860
|
),
|
|
9729
9861
|
children: [
|
|
9730
|
-
/* @__PURE__ */
|
|
9862
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
9731
9863
|
renderRadio(),
|
|
9732
|
-
/* @__PURE__ */
|
|
9864
|
+
/* @__PURE__ */ jsx49(
|
|
9733
9865
|
"span",
|
|
9734
9866
|
{
|
|
9735
9867
|
className: cn(
|
|
@@ -9740,14 +9872,14 @@ var AlternativesList = ({
|
|
|
9740
9872
|
}
|
|
9741
9873
|
)
|
|
9742
9874
|
] }),
|
|
9743
|
-
statusBadge && /* @__PURE__ */
|
|
9875
|
+
statusBadge && /* @__PURE__ */ jsx49("div", { className: "flex-shrink-0", children: statusBadge })
|
|
9744
9876
|
]
|
|
9745
9877
|
},
|
|
9746
9878
|
alternativeId
|
|
9747
9879
|
);
|
|
9748
9880
|
};
|
|
9749
9881
|
if (isReadonly) {
|
|
9750
|
-
return /* @__PURE__ */
|
|
9882
|
+
return /* @__PURE__ */ jsx49(
|
|
9751
9883
|
"div",
|
|
9752
9884
|
{
|
|
9753
9885
|
className: cn("flex flex-col", getLayoutClasses(), "w-full", className),
|
|
@@ -9757,7 +9889,7 @@ var AlternativesList = ({
|
|
|
9757
9889
|
}
|
|
9758
9890
|
);
|
|
9759
9891
|
}
|
|
9760
|
-
return /* @__PURE__ */
|
|
9892
|
+
return /* @__PURE__ */ jsx49(
|
|
9761
9893
|
RadioGroup,
|
|
9762
9894
|
{
|
|
9763
9895
|
name: groupName,
|
|
@@ -9774,7 +9906,7 @@ var AlternativesList = ({
|
|
|
9774
9906
|
const statusStyles = getStatusStyles2(alternative.status, false);
|
|
9775
9907
|
const statusBadge = getStatusBadge2(alternative.status);
|
|
9776
9908
|
if (layout === "detailed") {
|
|
9777
|
-
return /* @__PURE__ */
|
|
9909
|
+
return /* @__PURE__ */ jsx49(
|
|
9778
9910
|
"div",
|
|
9779
9911
|
{
|
|
9780
9912
|
className: cn(
|
|
@@ -9782,9 +9914,9 @@ var AlternativesList = ({
|
|
|
9782
9914
|
statusStyles,
|
|
9783
9915
|
alternative.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
9784
9916
|
),
|
|
9785
|
-
children: /* @__PURE__ */
|
|
9786
|
-
/* @__PURE__ */
|
|
9787
|
-
/* @__PURE__ */
|
|
9917
|
+
children: /* @__PURE__ */ jsxs35("div", { className: "flex items-start justify-between gap-3", children: [
|
|
9918
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
9919
|
+
/* @__PURE__ */ jsx49(
|
|
9788
9920
|
RadioGroupItem,
|
|
9789
9921
|
{
|
|
9790
9922
|
value: alternative.value,
|
|
@@ -9793,8 +9925,8 @@ var AlternativesList = ({
|
|
|
9793
9925
|
className: "mt-1"
|
|
9794
9926
|
}
|
|
9795
9927
|
),
|
|
9796
|
-
/* @__PURE__ */
|
|
9797
|
-
/* @__PURE__ */
|
|
9928
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex-1", children: [
|
|
9929
|
+
/* @__PURE__ */ jsx49(
|
|
9798
9930
|
"label",
|
|
9799
9931
|
{
|
|
9800
9932
|
htmlFor: alternativeId,
|
|
@@ -9806,16 +9938,16 @@ var AlternativesList = ({
|
|
|
9806
9938
|
children: alternative.label
|
|
9807
9939
|
}
|
|
9808
9940
|
),
|
|
9809
|
-
alternative.description && /* @__PURE__ */
|
|
9941
|
+
alternative.description && /* @__PURE__ */ jsx49("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
9810
9942
|
] })
|
|
9811
9943
|
] }),
|
|
9812
|
-
statusBadge && /* @__PURE__ */
|
|
9944
|
+
statusBadge && /* @__PURE__ */ jsx49("div", { className: "flex-shrink-0", children: statusBadge })
|
|
9813
9945
|
] })
|
|
9814
9946
|
},
|
|
9815
9947
|
alternativeId
|
|
9816
9948
|
);
|
|
9817
9949
|
}
|
|
9818
|
-
return /* @__PURE__ */
|
|
9950
|
+
return /* @__PURE__ */ jsxs35(
|
|
9819
9951
|
"div",
|
|
9820
9952
|
{
|
|
9821
9953
|
className: cn(
|
|
@@ -9824,8 +9956,8 @@ var AlternativesList = ({
|
|
|
9824
9956
|
alternative.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
9825
9957
|
),
|
|
9826
9958
|
children: [
|
|
9827
|
-
/* @__PURE__ */
|
|
9828
|
-
/* @__PURE__ */
|
|
9959
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
9960
|
+
/* @__PURE__ */ jsx49(
|
|
9829
9961
|
RadioGroupItem,
|
|
9830
9962
|
{
|
|
9831
9963
|
value: alternative.value,
|
|
@@ -9833,7 +9965,7 @@ var AlternativesList = ({
|
|
|
9833
9965
|
disabled: alternative.disabled
|
|
9834
9966
|
}
|
|
9835
9967
|
),
|
|
9836
|
-
/* @__PURE__ */
|
|
9968
|
+
/* @__PURE__ */ jsx49(
|
|
9837
9969
|
"label",
|
|
9838
9970
|
{
|
|
9839
9971
|
htmlFor: alternativeId,
|
|
@@ -9846,7 +9978,7 @@ var AlternativesList = ({
|
|
|
9846
9978
|
}
|
|
9847
9979
|
)
|
|
9848
9980
|
] }),
|
|
9849
|
-
statusBadge && /* @__PURE__ */
|
|
9981
|
+
statusBadge && /* @__PURE__ */ jsx49("div", { className: "flex-shrink-0", children: statusBadge })
|
|
9850
9982
|
]
|
|
9851
9983
|
},
|
|
9852
9984
|
alternativeId
|
|
@@ -9857,7 +9989,7 @@ var AlternativesList = ({
|
|
|
9857
9989
|
};
|
|
9858
9990
|
var HeaderAlternative = forwardRef19(
|
|
9859
9991
|
({ className, title, subTitle, content, ...props }, ref) => {
|
|
9860
|
-
return /* @__PURE__ */
|
|
9992
|
+
return /* @__PURE__ */ jsxs35(
|
|
9861
9993
|
"div",
|
|
9862
9994
|
{
|
|
9863
9995
|
ref,
|
|
@@ -9867,11 +9999,11 @@ var HeaderAlternative = forwardRef19(
|
|
|
9867
9999
|
),
|
|
9868
10000
|
...props,
|
|
9869
10001
|
children: [
|
|
9870
|
-
/* @__PURE__ */
|
|
9871
|
-
/* @__PURE__ */
|
|
9872
|
-
/* @__PURE__ */
|
|
10002
|
+
/* @__PURE__ */ jsxs35("span", { className: "flex flex-col", children: [
|
|
10003
|
+
/* @__PURE__ */ jsx49("p", { className: "text-text-950 font-bold text-lg", children: title }),
|
|
10004
|
+
/* @__PURE__ */ jsx49("p", { className: "text-text-700 text-sm ", children: subTitle })
|
|
9873
10005
|
] }),
|
|
9874
|
-
/* @__PURE__ */
|
|
10006
|
+
/* @__PURE__ */ jsx49("p", { className: "text-text-950 text-md", children: content })
|
|
9875
10007
|
]
|
|
9876
10008
|
}
|
|
9877
10009
|
);
|
|
@@ -10669,7 +10801,7 @@ import {
|
|
|
10669
10801
|
// src/components/MultipleChoice/MultipleChoice.tsx
|
|
10670
10802
|
import { useEffect as useEffect18, useState as useState19 } from "react";
|
|
10671
10803
|
import { CheckCircle as CheckCircle5, XCircle as XCircle4, Check as Check5 } from "phosphor-react";
|
|
10672
|
-
import { jsx as
|
|
10804
|
+
import { jsx as jsx50, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
10673
10805
|
var MultipleChoiceList = ({
|
|
10674
10806
|
disabled = false,
|
|
10675
10807
|
className = "",
|
|
@@ -10686,9 +10818,9 @@ var MultipleChoiceList = ({
|
|
|
10686
10818
|
const getStatusBadge2 = (status) => {
|
|
10687
10819
|
switch (status) {
|
|
10688
10820
|
case "correct":
|
|
10689
|
-
return /* @__PURE__ */
|
|
10821
|
+
return /* @__PURE__ */ jsx50(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx50(CheckCircle5, {}), children: "Resposta correta" });
|
|
10690
10822
|
case "incorrect":
|
|
10691
|
-
return /* @__PURE__ */
|
|
10823
|
+
return /* @__PURE__ */ jsx50(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx50(XCircle4, {}), children: "Resposta incorreta" });
|
|
10692
10824
|
default:
|
|
10693
10825
|
return null;
|
|
10694
10826
|
}
|
|
@@ -10709,14 +10841,14 @@ var MultipleChoiceList = ({
|
|
|
10709
10841
|
isSelected ? "border-primary-950 bg-primary-950 text-text" : "border-border-400 bg-background",
|
|
10710
10842
|
isDisabled && "opacity-40 cursor-not-allowed"
|
|
10711
10843
|
);
|
|
10712
|
-
return /* @__PURE__ */
|
|
10844
|
+
return /* @__PURE__ */ jsx50("div", { className: checkboxClasses, children: isSelected && /* @__PURE__ */ jsx50(Check5, { size: 16, weight: "bold" }) });
|
|
10713
10845
|
};
|
|
10714
10846
|
if (mode === "readonly") {
|
|
10715
|
-
return /* @__PURE__ */
|
|
10847
|
+
return /* @__PURE__ */ jsx50("div", { className: cn("flex flex-col gap-2", className), children: choices.map((choice, i) => {
|
|
10716
10848
|
const isSelected = actualValue?.includes(choice.value) || false;
|
|
10717
10849
|
const statusStyles = getStatusStyles2(choice.status);
|
|
10718
10850
|
const statusBadge = getStatusBadge2(choice.status);
|
|
10719
|
-
return /* @__PURE__ */
|
|
10851
|
+
return /* @__PURE__ */ jsxs36(
|
|
10720
10852
|
"div",
|
|
10721
10853
|
{
|
|
10722
10854
|
className: cn(
|
|
@@ -10725,9 +10857,9 @@ var MultipleChoiceList = ({
|
|
|
10725
10857
|
choice.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
10726
10858
|
),
|
|
10727
10859
|
children: [
|
|
10728
|
-
/* @__PURE__ */
|
|
10860
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
10729
10861
|
renderVisualCheckbox(isSelected, choice.disabled || disabled),
|
|
10730
|
-
/* @__PURE__ */
|
|
10862
|
+
/* @__PURE__ */ jsx50(
|
|
10731
10863
|
"span",
|
|
10732
10864
|
{
|
|
10733
10865
|
className: cn(
|
|
@@ -10739,14 +10871,14 @@ var MultipleChoiceList = ({
|
|
|
10739
10871
|
}
|
|
10740
10872
|
)
|
|
10741
10873
|
] }),
|
|
10742
|
-
statusBadge && /* @__PURE__ */
|
|
10874
|
+
statusBadge && /* @__PURE__ */ jsx50("div", { className: "flex-shrink-0", children: statusBadge })
|
|
10743
10875
|
]
|
|
10744
10876
|
},
|
|
10745
10877
|
`readonly-${choice.value}-${i}`
|
|
10746
10878
|
);
|
|
10747
10879
|
}) });
|
|
10748
10880
|
}
|
|
10749
|
-
return /* @__PURE__ */
|
|
10881
|
+
return /* @__PURE__ */ jsx50(
|
|
10750
10882
|
"div",
|
|
10751
10883
|
{
|
|
10752
10884
|
className: cn(
|
|
@@ -10754,7 +10886,7 @@ var MultipleChoiceList = ({
|
|
|
10754
10886
|
disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
10755
10887
|
className
|
|
10756
10888
|
),
|
|
10757
|
-
children: /* @__PURE__ */
|
|
10889
|
+
children: /* @__PURE__ */ jsx50(
|
|
10758
10890
|
CheckboxList_default,
|
|
10759
10891
|
{
|
|
10760
10892
|
name,
|
|
@@ -10764,12 +10896,12 @@ var MultipleChoiceList = ({
|
|
|
10764
10896
|
onHandleSelectedValues?.(v);
|
|
10765
10897
|
},
|
|
10766
10898
|
disabled,
|
|
10767
|
-
children: choices.map((choice, i) => /* @__PURE__ */
|
|
10899
|
+
children: choices.map((choice, i) => /* @__PURE__ */ jsxs36(
|
|
10768
10900
|
"div",
|
|
10769
10901
|
{
|
|
10770
10902
|
className: "flex flex-row gap-2 items-center",
|
|
10771
10903
|
children: [
|
|
10772
|
-
/* @__PURE__ */
|
|
10904
|
+
/* @__PURE__ */ jsx50(
|
|
10773
10905
|
CheckboxListItem,
|
|
10774
10906
|
{
|
|
10775
10907
|
value: choice.value,
|
|
@@ -10777,7 +10909,7 @@ var MultipleChoiceList = ({
|
|
|
10777
10909
|
disabled: choice.disabled || disabled
|
|
10778
10910
|
}
|
|
10779
10911
|
),
|
|
10780
|
-
/* @__PURE__ */
|
|
10912
|
+
/* @__PURE__ */ jsx50(
|
|
10781
10913
|
"label",
|
|
10782
10914
|
{
|
|
10783
10915
|
htmlFor: `interactive-${choice.value}-${i}`,
|
|
@@ -10806,13 +10938,13 @@ import { CheckCircle as CheckCircle6, XCircle as XCircle5 } from "phosphor-react
|
|
|
10806
10938
|
var mock_image_question_default = "./mock-image-question-HEZCLFDL.png";
|
|
10807
10939
|
|
|
10808
10940
|
// src/components/Quiz/QuizContent.tsx
|
|
10809
|
-
import { Fragment as Fragment11, jsx as
|
|
10941
|
+
import { Fragment as Fragment11, jsx as jsx51, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
10810
10942
|
var getStatusBadge = (status) => {
|
|
10811
10943
|
switch (status) {
|
|
10812
10944
|
case "correct":
|
|
10813
|
-
return /* @__PURE__ */
|
|
10945
|
+
return /* @__PURE__ */ jsx51(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx51(CheckCircle6, {}), children: "Resposta correta" });
|
|
10814
10946
|
case "incorrect":
|
|
10815
|
-
return /* @__PURE__ */
|
|
10947
|
+
return /* @__PURE__ */ jsx51(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx51(XCircle5, {}), children: "Resposta incorreta" });
|
|
10816
10948
|
default:
|
|
10817
10949
|
return null;
|
|
10818
10950
|
}
|
|
@@ -10827,11 +10959,11 @@ var getStatusStyles = (variantCorrect) => {
|
|
|
10827
10959
|
};
|
|
10828
10960
|
var QuizSubTitle = forwardRef20(
|
|
10829
10961
|
({ subTitle, ...props }, ref) => {
|
|
10830
|
-
return /* @__PURE__ */
|
|
10962
|
+
return /* @__PURE__ */ jsx51("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ jsx51("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
|
|
10831
10963
|
}
|
|
10832
10964
|
);
|
|
10833
10965
|
var QuizContainer = forwardRef20(({ children, className, ...props }, ref) => {
|
|
10834
|
-
return /* @__PURE__ */
|
|
10966
|
+
return /* @__PURE__ */ jsx51(
|
|
10835
10967
|
"div",
|
|
10836
10968
|
{
|
|
10837
10969
|
ref,
|
|
@@ -10879,10 +11011,10 @@ var QuizAlternative = ({ paddingBottom }) => {
|
|
|
10879
11011
|
};
|
|
10880
11012
|
});
|
|
10881
11013
|
if (!alternatives)
|
|
10882
|
-
return /* @__PURE__ */
|
|
10883
|
-
return /* @__PURE__ */
|
|
10884
|
-
/* @__PURE__ */
|
|
10885
|
-
/* @__PURE__ */
|
|
11014
|
+
return /* @__PURE__ */ jsx51("div", { children: /* @__PURE__ */ jsx51("p", { children: "N\xE3o h\xE1 Alternativas" }) });
|
|
11015
|
+
return /* @__PURE__ */ jsxs37(Fragment11, { children: [
|
|
11016
|
+
/* @__PURE__ */ jsx51(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11017
|
+
/* @__PURE__ */ jsx51(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx51("div", { className: "space-y-4", children: /* @__PURE__ */ jsx51(
|
|
10886
11018
|
AlternativesList,
|
|
10887
11019
|
{
|
|
10888
11020
|
mode: variant === "default" ? "interactive" : "readonly",
|
|
@@ -10980,10 +11112,10 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
10980
11112
|
};
|
|
10981
11113
|
});
|
|
10982
11114
|
if (!choices)
|
|
10983
|
-
return /* @__PURE__ */
|
|
10984
|
-
return /* @__PURE__ */
|
|
10985
|
-
/* @__PURE__ */
|
|
10986
|
-
/* @__PURE__ */
|
|
11115
|
+
return /* @__PURE__ */ jsx51("div", { children: /* @__PURE__ */ jsx51("p", { children: "N\xE3o h\xE1 Escolhas Multiplas" }) });
|
|
11116
|
+
return /* @__PURE__ */ jsxs37(Fragment11, { children: [
|
|
11117
|
+
/* @__PURE__ */ jsx51(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11118
|
+
/* @__PURE__ */ jsx51(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx51("div", { className: "space-y-4", children: /* @__PURE__ */ jsx51(
|
|
10987
11119
|
MultipleChoiceList,
|
|
10988
11120
|
{
|
|
10989
11121
|
choices,
|
|
@@ -11029,12 +11161,12 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
11029
11161
|
adjustTextareaHeight();
|
|
11030
11162
|
}, [currentAnswer, adjustTextareaHeight]);
|
|
11031
11163
|
if (!currentQuestion) {
|
|
11032
|
-
return /* @__PURE__ */
|
|
11164
|
+
return /* @__PURE__ */ jsx51("div", { className: "space-y-4", children: /* @__PURE__ */ jsx51("p", { className: "text-text-600 text-md", children: "Nenhuma quest\xE3o dispon\xEDvel" }) });
|
|
11033
11165
|
}
|
|
11034
11166
|
const localAnswer = (variant == "result" ? currentQuestionResult?.answer : currentAnswer?.answer) || "";
|
|
11035
|
-
return /* @__PURE__ */
|
|
11036
|
-
/* @__PURE__ */
|
|
11037
|
-
/* @__PURE__ */
|
|
11167
|
+
return /* @__PURE__ */ jsxs37(Fragment11, { children: [
|
|
11168
|
+
/* @__PURE__ */ jsx51(QuizSubTitle, { subTitle: "Resposta" }),
|
|
11169
|
+
/* @__PURE__ */ jsx51(QuizContainer, { className: cn(variant != "result" && paddingBottom), children: /* @__PURE__ */ jsx51("div", { className: "space-y-4 max-h-[600px] overflow-y-auto", children: variant === "default" ? /* @__PURE__ */ jsx51("div", { className: "space-y-4", children: /* @__PURE__ */ jsx51(
|
|
11038
11170
|
TextArea_default,
|
|
11039
11171
|
{
|
|
11040
11172
|
ref: textareaRef,
|
|
@@ -11044,10 +11176,10 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
11044
11176
|
rows: 4,
|
|
11045
11177
|
className: "min-h-[120px] max-h-[400px] resize-none overflow-y-auto"
|
|
11046
11178
|
}
|
|
11047
|
-
) }) : /* @__PURE__ */
|
|
11048
|
-
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */
|
|
11049
|
-
/* @__PURE__ */
|
|
11050
|
-
/* @__PURE__ */
|
|
11179
|
+
) }) : /* @__PURE__ */ jsx51("div", { className: "space-y-4", children: /* @__PURE__ */ jsx51("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: localAnswer || "Nenhuma resposta fornecida" }) }) }) }),
|
|
11180
|
+
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ jsxs37(Fragment11, { children: [
|
|
11181
|
+
/* @__PURE__ */ jsx51(QuizSubTitle, { subTitle: "Observa\xE7\xE3o do professor" }),
|
|
11182
|
+
/* @__PURE__ */ jsx51(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx51("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: currentQuestionResult?.teacherFeedback }) })
|
|
11051
11183
|
] })
|
|
11052
11184
|
] });
|
|
11053
11185
|
};
|
|
@@ -11073,16 +11205,16 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
11073
11205
|
];
|
|
11074
11206
|
const getLetterByIndex = (index) => String.fromCharCode(97 + index);
|
|
11075
11207
|
const isDefaultVariant = variant == "default";
|
|
11076
|
-
return /* @__PURE__ */
|
|
11077
|
-
/* @__PURE__ */
|
|
11078
|
-
/* @__PURE__ */
|
|
11208
|
+
return /* @__PURE__ */ jsxs37(Fragment11, { children: [
|
|
11209
|
+
/* @__PURE__ */ jsx51(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11210
|
+
/* @__PURE__ */ jsx51(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx51("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
11079
11211
|
const variantCorrect = option.isCorrect ? "correct" : "incorrect";
|
|
11080
|
-
return /* @__PURE__ */
|
|
11212
|
+
return /* @__PURE__ */ jsxs37(
|
|
11081
11213
|
"section",
|
|
11082
11214
|
{
|
|
11083
11215
|
className: "flex flex-col gap-2",
|
|
11084
11216
|
children: [
|
|
11085
|
-
/* @__PURE__ */
|
|
11217
|
+
/* @__PURE__ */ jsxs37(
|
|
11086
11218
|
"div",
|
|
11087
11219
|
{
|
|
11088
11220
|
className: cn(
|
|
@@ -11090,20 +11222,20 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
11090
11222
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
11091
11223
|
),
|
|
11092
11224
|
children: [
|
|
11093
|
-
/* @__PURE__ */
|
|
11094
|
-
isDefaultVariant ? /* @__PURE__ */
|
|
11095
|
-
/* @__PURE__ */
|
|
11096
|
-
/* @__PURE__ */
|
|
11097
|
-
/* @__PURE__ */
|
|
11098
|
-
/* @__PURE__ */
|
|
11225
|
+
/* @__PURE__ */ jsx51("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index).concat(") ").concat(option.label) }),
|
|
11226
|
+
isDefaultVariant ? /* @__PURE__ */ jsxs37(Select_default, { size: "medium", children: [
|
|
11227
|
+
/* @__PURE__ */ jsx51(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ jsx51(SelectValue, { placeholder: "Selecione opc\xE3o" }) }),
|
|
11228
|
+
/* @__PURE__ */ jsxs37(SelectContent, { children: [
|
|
11229
|
+
/* @__PURE__ */ jsx51(SelectItem, { value: "V", children: "Verdadeiro" }),
|
|
11230
|
+
/* @__PURE__ */ jsx51(SelectItem, { value: "F", children: "Falso" })
|
|
11099
11231
|
] })
|
|
11100
|
-
] }) : /* @__PURE__ */
|
|
11232
|
+
] }) : /* @__PURE__ */ jsx51("div", { className: "flex-shrink-0", children: getStatusBadge(variantCorrect) })
|
|
11101
11233
|
]
|
|
11102
11234
|
}
|
|
11103
11235
|
),
|
|
11104
|
-
!isDefaultVariant && /* @__PURE__ */
|
|
11105
|
-
/* @__PURE__ */
|
|
11106
|
-
!option.isCorrect && /* @__PURE__ */
|
|
11236
|
+
!isDefaultVariant && /* @__PURE__ */ jsxs37("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
11237
|
+
/* @__PURE__ */ jsx51("p", { className: "text-text-800 text-2xs", children: "Resposta selecionada: V" }),
|
|
11238
|
+
!option.isCorrect && /* @__PURE__ */ jsx51("p", { className: "text-text-800 text-2xs", children: "Resposta correta: F" })
|
|
11107
11239
|
] })
|
|
11108
11240
|
]
|
|
11109
11241
|
},
|
|
@@ -11193,13 +11325,13 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
11193
11325
|
const assignedDots = new Set(
|
|
11194
11326
|
userAnswers.map((a) => a.dotOption).filter(Boolean)
|
|
11195
11327
|
);
|
|
11196
|
-
return /* @__PURE__ */
|
|
11197
|
-
/* @__PURE__ */
|
|
11198
|
-
/* @__PURE__ */
|
|
11328
|
+
return /* @__PURE__ */ jsxs37(Fragment11, { children: [
|
|
11329
|
+
/* @__PURE__ */ jsx51(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11330
|
+
/* @__PURE__ */ jsx51(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx51("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
11199
11331
|
const answer = userAnswers[index];
|
|
11200
11332
|
const variantCorrect = answer.isCorrect ? "correct" : "incorrect";
|
|
11201
|
-
return /* @__PURE__ */
|
|
11202
|
-
/* @__PURE__ */
|
|
11333
|
+
return /* @__PURE__ */ jsxs37("section", { className: "flex flex-col gap-2", children: [
|
|
11334
|
+
/* @__PURE__ */ jsxs37(
|
|
11203
11335
|
"div",
|
|
11204
11336
|
{
|
|
11205
11337
|
className: cn(
|
|
@@ -11207,30 +11339,30 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
11207
11339
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
11208
11340
|
),
|
|
11209
11341
|
children: [
|
|
11210
|
-
/* @__PURE__ */
|
|
11211
|
-
isDefaultVariant ? /* @__PURE__ */
|
|
11342
|
+
/* @__PURE__ */ jsx51("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index) + ") " + option.label }),
|
|
11343
|
+
isDefaultVariant ? /* @__PURE__ */ jsxs37(
|
|
11212
11344
|
Select_default,
|
|
11213
11345
|
{
|
|
11214
11346
|
size: "medium",
|
|
11215
11347
|
value: answer.dotOption || void 0,
|
|
11216
11348
|
onValueChange: (value) => handleSelectDot(index, value),
|
|
11217
11349
|
children: [
|
|
11218
|
-
/* @__PURE__ */
|
|
11219
|
-
/* @__PURE__ */
|
|
11350
|
+
/* @__PURE__ */ jsx51(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ jsx51(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
11351
|
+
/* @__PURE__ */ jsx51(SelectContent, { children: dotsOptions.filter(
|
|
11220
11352
|
(dot) => !assignedDots.has(dot.label) || answer.dotOption === dot.label
|
|
11221
|
-
).map((dot) => /* @__PURE__ */
|
|
11353
|
+
).map((dot) => /* @__PURE__ */ jsx51(SelectItem, { value: dot.label, children: dot.label }, dot.label)) })
|
|
11222
11354
|
]
|
|
11223
11355
|
}
|
|
11224
|
-
) : /* @__PURE__ */
|
|
11356
|
+
) : /* @__PURE__ */ jsx51("div", { className: "flex-shrink-0", children: answer.isCorrect === null ? null : getStatusBadge(variantCorrect) })
|
|
11225
11357
|
]
|
|
11226
11358
|
}
|
|
11227
11359
|
),
|
|
11228
|
-
!isDefaultVariant && /* @__PURE__ */
|
|
11229
|
-
/* @__PURE__ */
|
|
11360
|
+
!isDefaultVariant && /* @__PURE__ */ jsxs37("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
11361
|
+
/* @__PURE__ */ jsxs37("p", { className: "text-text-800 text-2xs", children: [
|
|
11230
11362
|
"Resposta selecionada: ",
|
|
11231
11363
|
answer.dotOption || "Nenhuma"
|
|
11232
11364
|
] }),
|
|
11233
|
-
!answer.isCorrect && /* @__PURE__ */
|
|
11365
|
+
!answer.isCorrect && /* @__PURE__ */ jsxs37("p", { className: "text-text-800 text-2xs", children: [
|
|
11234
11366
|
"Resposta correta: ",
|
|
11235
11367
|
answer.correctOption
|
|
11236
11368
|
] })
|
|
@@ -11297,18 +11429,18 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
11297
11429
|
const mockAnswer = mockUserAnswers.find(
|
|
11298
11430
|
(answer) => answer.selectId === selectId
|
|
11299
11431
|
);
|
|
11300
|
-
return /* @__PURE__ */
|
|
11432
|
+
return /* @__PURE__ */ jsx51("p", { className: "inline-flex mb-2.5 text-success-600 font-semibold text-md border-b-2 border-success-600", children: mockAnswer?.correctAnswer });
|
|
11301
11433
|
};
|
|
11302
11434
|
const renderDefaultElement = (selectId, startIndex, selectedValue, availableOptionsForThisSelect) => {
|
|
11303
|
-
return /* @__PURE__ */
|
|
11435
|
+
return /* @__PURE__ */ jsxs37(
|
|
11304
11436
|
Select_default,
|
|
11305
11437
|
{
|
|
11306
11438
|
value: selectedValue,
|
|
11307
11439
|
onValueChange: (value) => handleSelectChange(selectId, value),
|
|
11308
11440
|
className: "inline-flex mb-2.5",
|
|
11309
11441
|
children: [
|
|
11310
|
-
/* @__PURE__ */
|
|
11311
|
-
/* @__PURE__ */
|
|
11442
|
+
/* @__PURE__ */ jsx51(SelectTrigger, { className: "inline-flex w-auto min-w-[140px] h-8 mx-1 bg-background border-gray-300", children: /* @__PURE__ */ jsx51(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
11443
|
+
/* @__PURE__ */ jsx51(SelectContent, { children: availableOptionsForThisSelect.map((option, index) => /* @__PURE__ */ jsx51(SelectItem, { value: option, children: option }, `${option}-${index}`)) })
|
|
11312
11444
|
]
|
|
11313
11445
|
},
|
|
11314
11446
|
`${selectId}-${startIndex}`
|
|
@@ -11320,8 +11452,8 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
11320
11452
|
);
|
|
11321
11453
|
if (!mockAnswer) return null;
|
|
11322
11454
|
const action = mockAnswer.isCorrect ? "success" : "error";
|
|
11323
|
-
const icon = mockAnswer.isCorrect ? /* @__PURE__ */
|
|
11324
|
-
return /* @__PURE__ */
|
|
11455
|
+
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ jsx51(CheckCircle6, {}) : /* @__PURE__ */ jsx51(XCircle5, {});
|
|
11456
|
+
return /* @__PURE__ */ jsx51(
|
|
11325
11457
|
Badge_default,
|
|
11326
11458
|
{
|
|
11327
11459
|
variant: "solid",
|
|
@@ -11329,7 +11461,7 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
11329
11461
|
iconRight: icon,
|
|
11330
11462
|
size: "large",
|
|
11331
11463
|
className: "py-3 w-[180px] justify-between mb-2.5",
|
|
11332
|
-
children: /* @__PURE__ */
|
|
11464
|
+
children: /* @__PURE__ */ jsx51("span", { className: "text-text-900", children: mockAnswer.userAnswer })
|
|
11333
11465
|
},
|
|
11334
11466
|
selectId
|
|
11335
11467
|
);
|
|
@@ -11385,25 +11517,25 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
11385
11517
|
}
|
|
11386
11518
|
return elements;
|
|
11387
11519
|
};
|
|
11388
|
-
return /* @__PURE__ */
|
|
11389
|
-
/* @__PURE__ */
|
|
11390
|
-
/* @__PURE__ */
|
|
11520
|
+
return /* @__PURE__ */ jsxs37(Fragment11, { children: [
|
|
11521
|
+
/* @__PURE__ */ jsx51(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11522
|
+
/* @__PURE__ */ jsx51(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ jsx51("div", { className: "space-y-6 px-4 h-auto", children: /* @__PURE__ */ jsx51(
|
|
11391
11523
|
"div",
|
|
11392
11524
|
{
|
|
11393
11525
|
className: cn(
|
|
11394
11526
|
"text-lg text-text-900 leading-8 h-auto",
|
|
11395
11527
|
variant != "result" && paddingBottom
|
|
11396
11528
|
),
|
|
11397
|
-
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */
|
|
11529
|
+
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ jsx51("span", { children: element.element }, element.id))
|
|
11398
11530
|
}
|
|
11399
11531
|
) }) }),
|
|
11400
|
-
variant === "result" && /* @__PURE__ */
|
|
11401
|
-
/* @__PURE__ */
|
|
11402
|
-
/* @__PURE__ */
|
|
11532
|
+
variant === "result" && /* @__PURE__ */ jsxs37(Fragment11, { children: [
|
|
11533
|
+
/* @__PURE__ */ jsx51(QuizSubTitle, { subTitle: "Resultado" }),
|
|
11534
|
+
/* @__PURE__ */ jsx51(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ jsx51("div", { className: "space-y-6 px-4", children: /* @__PURE__ */ jsx51(
|
|
11403
11535
|
"div",
|
|
11404
11536
|
{
|
|
11405
11537
|
className: cn("text-lg text-text-900 leading-8", paddingBottom),
|
|
11406
|
-
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */
|
|
11538
|
+
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ jsx51("span", { children: element.element }, element.id))
|
|
11407
11539
|
}
|
|
11408
11540
|
) }) })
|
|
11409
11541
|
] })
|
|
@@ -11457,36 +11589,36 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11457
11589
|
}
|
|
11458
11590
|
return "bg-success-600/70 border-white";
|
|
11459
11591
|
};
|
|
11460
|
-
return /* @__PURE__ */
|
|
11461
|
-
/* @__PURE__ */
|
|
11462
|
-
/* @__PURE__ */
|
|
11592
|
+
return /* @__PURE__ */ jsxs37(Fragment11, { children: [
|
|
11593
|
+
/* @__PURE__ */ jsx51(QuizSubTitle, { subTitle: "Clique na \xE1rea correta" }),
|
|
11594
|
+
/* @__PURE__ */ jsx51(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsxs37(
|
|
11463
11595
|
"div",
|
|
11464
11596
|
{
|
|
11465
11597
|
"data-testid": "quiz-image-container",
|
|
11466
11598
|
className: "space-y-6 p-3 relative inline-block",
|
|
11467
11599
|
children: [
|
|
11468
|
-
variant == "result" && /* @__PURE__ */
|
|
11600
|
+
variant == "result" && /* @__PURE__ */ jsxs37(
|
|
11469
11601
|
"div",
|
|
11470
11602
|
{
|
|
11471
11603
|
"data-testid": "quiz-legend",
|
|
11472
11604
|
className: "flex items-center gap-4 text-xs",
|
|
11473
11605
|
children: [
|
|
11474
|
-
/* @__PURE__ */
|
|
11475
|
-
/* @__PURE__ */
|
|
11476
|
-
/* @__PURE__ */
|
|
11606
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2", children: [
|
|
11607
|
+
/* @__PURE__ */ jsx51("div", { className: "w-3 h-3 rounded-full bg-indicator-primary/70 border border-[#F8CC2E]" }),
|
|
11608
|
+
/* @__PURE__ */ jsx51("span", { className: "text-text-600 font-medium text-sm", children: "\xC1rea correta" })
|
|
11477
11609
|
] }),
|
|
11478
|
-
/* @__PURE__ */
|
|
11479
|
-
/* @__PURE__ */
|
|
11480
|
-
/* @__PURE__ */
|
|
11610
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2", children: [
|
|
11611
|
+
/* @__PURE__ */ jsx51("div", { className: "w-3 h-3 rounded-full bg-success-600/70 border border-white" }),
|
|
11612
|
+
/* @__PURE__ */ jsx51("span", { className: "text-text-600 font-medium text-sm", children: "Resposta correta" })
|
|
11481
11613
|
] }),
|
|
11482
|
-
/* @__PURE__ */
|
|
11483
|
-
/* @__PURE__ */
|
|
11484
|
-
/* @__PURE__ */
|
|
11614
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2", children: [
|
|
11615
|
+
/* @__PURE__ */ jsx51("div", { className: "w-3 h-3 rounded-full bg-indicator-error/70 border border-white" }),
|
|
11616
|
+
/* @__PURE__ */ jsx51("span", { className: "text-text-600 font-medium text-sm", children: "Resposta incorreta" })
|
|
11485
11617
|
] })
|
|
11486
11618
|
]
|
|
11487
11619
|
}
|
|
11488
11620
|
),
|
|
11489
|
-
/* @__PURE__ */
|
|
11621
|
+
/* @__PURE__ */ jsxs37(
|
|
11490
11622
|
"button",
|
|
11491
11623
|
{
|
|
11492
11624
|
"data-testid": "quiz-image-button",
|
|
@@ -11501,7 +11633,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11501
11633
|
},
|
|
11502
11634
|
"aria-label": "\xC1rea da imagem interativa",
|
|
11503
11635
|
children: [
|
|
11504
|
-
/* @__PURE__ */
|
|
11636
|
+
/* @__PURE__ */ jsx51(
|
|
11505
11637
|
"img",
|
|
11506
11638
|
{
|
|
11507
11639
|
"data-testid": "quiz-image",
|
|
@@ -11510,7 +11642,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11510
11642
|
className: "w-full h-auto rounded-md"
|
|
11511
11643
|
}
|
|
11512
11644
|
),
|
|
11513
|
-
variant === "result" && /* @__PURE__ */
|
|
11645
|
+
variant === "result" && /* @__PURE__ */ jsx51(
|
|
11514
11646
|
"div",
|
|
11515
11647
|
{
|
|
11516
11648
|
"data-testid": "quiz-correct-circle",
|
|
@@ -11525,7 +11657,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11525
11657
|
}
|
|
11526
11658
|
}
|
|
11527
11659
|
),
|
|
11528
|
-
clickPositionRelative && /* @__PURE__ */
|
|
11660
|
+
clickPositionRelative && /* @__PURE__ */ jsx51(
|
|
11529
11661
|
"div",
|
|
11530
11662
|
{
|
|
11531
11663
|
"data-testid": "quiz-user-circle",
|
|
@@ -11550,7 +11682,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11550
11682
|
};
|
|
11551
11683
|
|
|
11552
11684
|
// src/components/Quiz/Quiz.tsx
|
|
11553
|
-
import { Fragment as Fragment12, jsx as
|
|
11685
|
+
import { Fragment as Fragment12, jsx as jsx52, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
11554
11686
|
var getQuizTypeConfig = (type) => {
|
|
11555
11687
|
const QUIZ_TYPE_CONFIG = {
|
|
11556
11688
|
["SIMULADO" /* SIMULADO */]: {
|
|
@@ -11592,7 +11724,7 @@ var Quiz = forwardRef21(({ children, className, variant = "default", ...props },
|
|
|
11592
11724
|
useEffect20(() => {
|
|
11593
11725
|
setVariant(variant);
|
|
11594
11726
|
}, [variant, setVariant]);
|
|
11595
|
-
return /* @__PURE__ */
|
|
11727
|
+
return /* @__PURE__ */ jsx52("div", { ref, className: cn("flex flex-col", className), ...props, children });
|
|
11596
11728
|
});
|
|
11597
11729
|
var QuizTitle = forwardRef21(({ className, onBack, ...props }, ref) => {
|
|
11598
11730
|
const {
|
|
@@ -11628,8 +11760,8 @@ var QuizTitle = forwardRef21(({ className, onBack, ...props }, ref) => {
|
|
|
11628
11760
|
const handleCancelExit = () => {
|
|
11629
11761
|
setShowExitConfirmation(false);
|
|
11630
11762
|
};
|
|
11631
|
-
return /* @__PURE__ */
|
|
11632
|
-
/* @__PURE__ */
|
|
11763
|
+
return /* @__PURE__ */ jsxs38(Fragment12, { children: [
|
|
11764
|
+
/* @__PURE__ */ jsxs38(
|
|
11633
11765
|
"div",
|
|
11634
11766
|
{
|
|
11635
11767
|
ref,
|
|
@@ -11639,24 +11771,24 @@ var QuizTitle = forwardRef21(({ className, onBack, ...props }, ref) => {
|
|
|
11639
11771
|
),
|
|
11640
11772
|
...props,
|
|
11641
11773
|
children: [
|
|
11642
|
-
/* @__PURE__ */
|
|
11774
|
+
/* @__PURE__ */ jsx52(
|
|
11643
11775
|
IconButton_default,
|
|
11644
11776
|
{
|
|
11645
|
-
icon: /* @__PURE__ */
|
|
11777
|
+
icon: /* @__PURE__ */ jsx52(CaretLeft2, { size: 24 }),
|
|
11646
11778
|
size: "md",
|
|
11647
11779
|
"aria-label": "Voltar",
|
|
11648
11780
|
onClick: handleBackClick
|
|
11649
11781
|
}
|
|
11650
11782
|
),
|
|
11651
|
-
/* @__PURE__ */
|
|
11652
|
-
/* @__PURE__ */
|
|
11653
|
-
/* @__PURE__ */
|
|
11783
|
+
/* @__PURE__ */ jsxs38("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
11784
|
+
/* @__PURE__ */ jsx52("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
11785
|
+
/* @__PURE__ */ jsx52("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
11654
11786
|
] }),
|
|
11655
|
-
/* @__PURE__ */
|
|
11787
|
+
/* @__PURE__ */ jsx52("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ jsx52(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ jsx52(Clock2, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
|
|
11656
11788
|
]
|
|
11657
11789
|
}
|
|
11658
11790
|
),
|
|
11659
|
-
/* @__PURE__ */
|
|
11791
|
+
/* @__PURE__ */ jsx52(
|
|
11660
11792
|
AlertDialog,
|
|
11661
11793
|
{
|
|
11662
11794
|
isOpen: showExitConfirmation,
|
|
@@ -11674,7 +11806,7 @@ var QuizTitle = forwardRef21(({ className, onBack, ...props }, ref) => {
|
|
|
11674
11806
|
var QuizHeader = () => {
|
|
11675
11807
|
const { getCurrentQuestion, currentQuestionIndex } = useQuizStore();
|
|
11676
11808
|
const currentQuestion = getCurrentQuestion();
|
|
11677
|
-
return /* @__PURE__ */
|
|
11809
|
+
return /* @__PURE__ */ jsx52(
|
|
11678
11810
|
HeaderAlternative,
|
|
11679
11811
|
{
|
|
11680
11812
|
title: currentQuestion ? `Quest\xE3o ${currentQuestionIndex + 1}` : "Quest\xE3o",
|
|
@@ -11696,7 +11828,7 @@ var QuizContent = ({ paddingBottom }) => {
|
|
|
11696
11828
|
["IMAGEM" /* IMAGEM */]: QuizImageQuestion
|
|
11697
11829
|
};
|
|
11698
11830
|
const QuestionComponent = currentQuestion ? questionComponents[currentQuestion.questionType] : null;
|
|
11699
|
-
return QuestionComponent ? /* @__PURE__ */
|
|
11831
|
+
return QuestionComponent ? /* @__PURE__ */ jsx52(QuestionComponent, { paddingBottom }) : null;
|
|
11700
11832
|
};
|
|
11701
11833
|
var QuizQuestionList = ({
|
|
11702
11834
|
filterType = "all",
|
|
@@ -11743,18 +11875,18 @@ var QuizQuestionList = ({
|
|
|
11743
11875
|
return "Em branco";
|
|
11744
11876
|
}
|
|
11745
11877
|
};
|
|
11746
|
-
return /* @__PURE__ */
|
|
11747
|
-
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */
|
|
11878
|
+
return /* @__PURE__ */ jsxs38("div", { className: "space-y-6 px-4 h-full", children: [
|
|
11879
|
+
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */ jsx52("div", { className: "flex items-center justify-center text-gray-500 py-8 h-full", children: /* @__PURE__ */ jsx52("p", { className: "text-lg", children: "Nenhum resultado" }) }),
|
|
11748
11880
|
Object.entries(filteredGroupedQuestions).map(
|
|
11749
|
-
([subjectId, questions]) => /* @__PURE__ */
|
|
11750
|
-
/* @__PURE__ */
|
|
11751
|
-
/* @__PURE__ */
|
|
11752
|
-
/* @__PURE__ */
|
|
11881
|
+
([subjectId, questions]) => /* @__PURE__ */ jsxs38("section", { className: "flex flex-col gap-2", children: [
|
|
11882
|
+
/* @__PURE__ */ jsxs38("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
|
|
11883
|
+
/* @__PURE__ */ jsx52("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ jsx52(BookOpen, { size: 17, className: "text-white" }) }),
|
|
11884
|
+
/* @__PURE__ */ jsx52("p", { className: "text-text-800 font-bold text-lg", children: questions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" })
|
|
11753
11885
|
] }),
|
|
11754
|
-
/* @__PURE__ */
|
|
11886
|
+
/* @__PURE__ */ jsx52("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
|
|
11755
11887
|
const status = getQuestionStatus(question.id);
|
|
11756
11888
|
const questionNumber = getQuestionIndex(question.id);
|
|
11757
|
-
return /* @__PURE__ */
|
|
11889
|
+
return /* @__PURE__ */ jsx52(
|
|
11758
11890
|
CardStatus,
|
|
11759
11891
|
{
|
|
11760
11892
|
header: `Quest\xE3o ${questionNumber.toString().padStart(2, "0")}`,
|
|
@@ -11859,8 +11991,8 @@ var QuizFooter = forwardRef21(
|
|
|
11859
11991
|
return;
|
|
11860
11992
|
}
|
|
11861
11993
|
};
|
|
11862
|
-
return /* @__PURE__ */
|
|
11863
|
-
/* @__PURE__ */
|
|
11994
|
+
return /* @__PURE__ */ jsxs38(Fragment12, { children: [
|
|
11995
|
+
/* @__PURE__ */ jsx52(
|
|
11864
11996
|
"footer",
|
|
11865
11997
|
{
|
|
11866
11998
|
ref,
|
|
@@ -11869,17 +12001,17 @@ var QuizFooter = forwardRef21(
|
|
|
11869
12001
|
className
|
|
11870
12002
|
),
|
|
11871
12003
|
...props,
|
|
11872
|
-
children: variant === "default" ? /* @__PURE__ */
|
|
11873
|
-
/* @__PURE__ */
|
|
11874
|
-
/* @__PURE__ */
|
|
12004
|
+
children: variant === "default" ? /* @__PURE__ */ jsxs38(Fragment12, { children: [
|
|
12005
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex flex-row items-center gap-1", children: [
|
|
12006
|
+
/* @__PURE__ */ jsx52(
|
|
11875
12007
|
IconButton_default,
|
|
11876
12008
|
{
|
|
11877
|
-
icon: /* @__PURE__ */
|
|
12009
|
+
icon: /* @__PURE__ */ jsx52(SquaresFour, { size: 24, className: "text-text-950" }),
|
|
11878
12010
|
size: "md",
|
|
11879
12011
|
onClick: () => openModal("modalNavigate")
|
|
11880
12012
|
}
|
|
11881
12013
|
),
|
|
11882
|
-
isFirstQuestion ? /* @__PURE__ */
|
|
12014
|
+
isFirstQuestion ? /* @__PURE__ */ jsx52(
|
|
11883
12015
|
Button_default,
|
|
11884
12016
|
{
|
|
11885
12017
|
variant: "outline",
|
|
@@ -11890,13 +12022,13 @@ var QuizFooter = forwardRef21(
|
|
|
11890
12022
|
},
|
|
11891
12023
|
children: "Pular"
|
|
11892
12024
|
}
|
|
11893
|
-
) : /* @__PURE__ */
|
|
12025
|
+
) : /* @__PURE__ */ jsx52(
|
|
11894
12026
|
Button_default,
|
|
11895
12027
|
{
|
|
11896
12028
|
size: "medium",
|
|
11897
12029
|
variant: "link",
|
|
11898
12030
|
action: "primary",
|
|
11899
|
-
iconLeft: /* @__PURE__ */
|
|
12031
|
+
iconLeft: /* @__PURE__ */ jsx52(CaretLeft2, { size: 18 }),
|
|
11900
12032
|
onClick: () => {
|
|
11901
12033
|
goToPreviousQuestion();
|
|
11902
12034
|
},
|
|
@@ -11904,7 +12036,7 @@ var QuizFooter = forwardRef21(
|
|
|
11904
12036
|
}
|
|
11905
12037
|
)
|
|
11906
12038
|
] }),
|
|
11907
|
-
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */
|
|
12039
|
+
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */ jsx52(
|
|
11908
12040
|
Button_default,
|
|
11909
12041
|
{
|
|
11910
12042
|
size: "small",
|
|
@@ -11917,7 +12049,7 @@ var QuizFooter = forwardRef21(
|
|
|
11917
12049
|
children: "Pular"
|
|
11918
12050
|
}
|
|
11919
12051
|
),
|
|
11920
|
-
isLastQuestion ? /* @__PURE__ */
|
|
12052
|
+
isLastQuestion ? /* @__PURE__ */ jsx52(
|
|
11921
12053
|
Button_default,
|
|
11922
12054
|
{
|
|
11923
12055
|
size: "medium",
|
|
@@ -11927,13 +12059,13 @@ var QuizFooter = forwardRef21(
|
|
|
11927
12059
|
onClick: handleFinishQuiz,
|
|
11928
12060
|
children: "Finalizar"
|
|
11929
12061
|
}
|
|
11930
|
-
) : /* @__PURE__ */
|
|
12062
|
+
) : /* @__PURE__ */ jsx52(
|
|
11931
12063
|
Button_default,
|
|
11932
12064
|
{
|
|
11933
12065
|
size: "medium",
|
|
11934
12066
|
variant: "link",
|
|
11935
12067
|
action: "primary",
|
|
11936
|
-
iconRight: /* @__PURE__ */
|
|
12068
|
+
iconRight: /* @__PURE__ */ jsx52(CaretRight5, { size: 18 }),
|
|
11937
12069
|
disabled: !currentAnswer && !isCurrentQuestionSkipped,
|
|
11938
12070
|
onClick: () => {
|
|
11939
12071
|
goToNextQuestion();
|
|
@@ -11941,7 +12073,7 @@ var QuizFooter = forwardRef21(
|
|
|
11941
12073
|
children: "Avan\xE7ar"
|
|
11942
12074
|
}
|
|
11943
12075
|
)
|
|
11944
|
-
] }) : /* @__PURE__ */
|
|
12076
|
+
] }) : /* @__PURE__ */ jsx52("div", { className: "flex flex-row items-center justify-center w-full", children: /* @__PURE__ */ jsx52(
|
|
11945
12077
|
Button_default,
|
|
11946
12078
|
{
|
|
11947
12079
|
variant: "link",
|
|
@@ -11953,7 +12085,7 @@ var QuizFooter = forwardRef21(
|
|
|
11953
12085
|
) })
|
|
11954
12086
|
}
|
|
11955
12087
|
),
|
|
11956
|
-
/* @__PURE__ */
|
|
12088
|
+
/* @__PURE__ */ jsx52(
|
|
11957
12089
|
AlertDialog,
|
|
11958
12090
|
{
|
|
11959
12091
|
isOpen: isModalOpen("alertDialog"),
|
|
@@ -11965,7 +12097,7 @@ var QuizFooter = forwardRef21(
|
|
|
11965
12097
|
onSubmit: handleAlertSubmit
|
|
11966
12098
|
}
|
|
11967
12099
|
),
|
|
11968
|
-
/* @__PURE__ */
|
|
12100
|
+
/* @__PURE__ */ jsx52(
|
|
11969
12101
|
Modal_default,
|
|
11970
12102
|
{
|
|
11971
12103
|
isOpen: isModalOpen("modalResult"),
|
|
@@ -11974,11 +12106,11 @@ var QuizFooter = forwardRef21(
|
|
|
11974
12106
|
closeOnEscape: false,
|
|
11975
12107
|
hideCloseButton: true,
|
|
11976
12108
|
size: "md",
|
|
11977
|
-
children: /* @__PURE__ */
|
|
11978
|
-
resultImageComponent ? /* @__PURE__ */
|
|
11979
|
-
/* @__PURE__ */
|
|
11980
|
-
/* @__PURE__ */
|
|
11981
|
-
/* @__PURE__ */
|
|
12109
|
+
children: /* @__PURE__ */ jsxs38("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
12110
|
+
resultImageComponent ? /* @__PURE__ */ jsx52("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ jsx52("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ jsx52("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
12111
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
12112
|
+
/* @__PURE__ */ jsx52("h2", { className: "text-text-950 font-bold text-lg", children: getCompletionTitle(quizType) }),
|
|
12113
|
+
/* @__PURE__ */ jsxs38("p", { className: "text-text-500 font-sm", children: [
|
|
11982
12114
|
"Voc\xEA acertou ",
|
|
11983
12115
|
correctAnswers ?? "--",
|
|
11984
12116
|
" de ",
|
|
@@ -11987,8 +12119,8 @@ var QuizFooter = forwardRef21(
|
|
|
11987
12119
|
"quest\xF5es."
|
|
11988
12120
|
] })
|
|
11989
12121
|
] }),
|
|
11990
|
-
/* @__PURE__ */
|
|
11991
|
-
/* @__PURE__ */
|
|
12122
|
+
/* @__PURE__ */ jsxs38("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
|
|
12123
|
+
/* @__PURE__ */ jsx52(
|
|
11992
12124
|
Button_default,
|
|
11993
12125
|
{
|
|
11994
12126
|
variant: "outline",
|
|
@@ -11998,38 +12130,38 @@ var QuizFooter = forwardRef21(
|
|
|
11998
12130
|
children: quizTypeLabel === "Question\xE1rio" ? "Ir para aulas" : `Ir para ${quizTypeLabel.toLocaleLowerCase()}s`
|
|
11999
12131
|
}
|
|
12000
12132
|
),
|
|
12001
|
-
/* @__PURE__ */
|
|
12133
|
+
/* @__PURE__ */ jsx52(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })
|
|
12002
12134
|
] })
|
|
12003
12135
|
] })
|
|
12004
12136
|
}
|
|
12005
12137
|
),
|
|
12006
|
-
/* @__PURE__ */
|
|
12138
|
+
/* @__PURE__ */ jsx52(
|
|
12007
12139
|
Modal_default,
|
|
12008
12140
|
{
|
|
12009
12141
|
isOpen: isModalOpen("modalNavigate"),
|
|
12010
12142
|
onClose: closeModal,
|
|
12011
12143
|
title: "Quest\xF5es",
|
|
12012
12144
|
size: "lg",
|
|
12013
|
-
children: /* @__PURE__ */
|
|
12014
|
-
/* @__PURE__ */
|
|
12015
|
-
/* @__PURE__ */
|
|
12016
|
-
/* @__PURE__ */
|
|
12017
|
-
/* @__PURE__ */
|
|
12145
|
+
children: /* @__PURE__ */ jsxs38("div", { className: "flex flex-col w-full not-lg:h-[calc(100vh-200px)] lg:max-h-[687px] lg:h-[687px]", children: [
|
|
12146
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex flex-row justify-between items-center py-6 pt-6 pb-4 border-b border-border-200 flex-shrink-0", children: [
|
|
12147
|
+
/* @__PURE__ */ jsx52("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
|
|
12148
|
+
/* @__PURE__ */ jsx52("span", { className: "max-w-[266px]", children: /* @__PURE__ */ jsxs38(Select_default, { value: filterType, onValueChange: setFilterType, children: [
|
|
12149
|
+
/* @__PURE__ */ jsx52(
|
|
12018
12150
|
SelectTrigger,
|
|
12019
12151
|
{
|
|
12020
12152
|
variant: "rounded",
|
|
12021
12153
|
className: "max-w-[266px] min-w-[160px]",
|
|
12022
|
-
children: /* @__PURE__ */
|
|
12154
|
+
children: /* @__PURE__ */ jsx52(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" })
|
|
12023
12155
|
}
|
|
12024
12156
|
),
|
|
12025
|
-
/* @__PURE__ */
|
|
12026
|
-
/* @__PURE__ */
|
|
12027
|
-
/* @__PURE__ */
|
|
12028
|
-
/* @__PURE__ */
|
|
12157
|
+
/* @__PURE__ */ jsxs38(SelectContent, { children: [
|
|
12158
|
+
/* @__PURE__ */ jsx52(SelectItem, { value: "all", children: "Todas" }),
|
|
12159
|
+
/* @__PURE__ */ jsx52(SelectItem, { value: "unanswered", children: "Em branco" }),
|
|
12160
|
+
/* @__PURE__ */ jsx52(SelectItem, { value: "answered", children: "Respondidas" })
|
|
12029
12161
|
] })
|
|
12030
12162
|
] }) })
|
|
12031
12163
|
] }),
|
|
12032
|
-
/* @__PURE__ */
|
|
12164
|
+
/* @__PURE__ */ jsx52("div", { className: "flex flex-col gap-2 flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ jsx52(
|
|
12033
12165
|
QuizQuestionList,
|
|
12034
12166
|
{
|
|
12035
12167
|
filterType,
|
|
@@ -12039,7 +12171,7 @@ var QuizFooter = forwardRef21(
|
|
|
12039
12171
|
] })
|
|
12040
12172
|
}
|
|
12041
12173
|
),
|
|
12042
|
-
/* @__PURE__ */
|
|
12174
|
+
/* @__PURE__ */ jsx52(
|
|
12043
12175
|
Modal_default,
|
|
12044
12176
|
{
|
|
12045
12177
|
isOpen: isModalOpen("modalResolution"),
|
|
@@ -12049,7 +12181,7 @@ var QuizFooter = forwardRef21(
|
|
|
12049
12181
|
children: currentQuestion?.solutionExplanation
|
|
12050
12182
|
}
|
|
12051
12183
|
),
|
|
12052
|
-
/* @__PURE__ */
|
|
12184
|
+
/* @__PURE__ */ jsx52(
|
|
12053
12185
|
Modal_default,
|
|
12054
12186
|
{
|
|
12055
12187
|
isOpen: isModalOpen("modalQuestionnaireAllCorrect"),
|
|
@@ -12058,17 +12190,17 @@ var QuizFooter = forwardRef21(
|
|
|
12058
12190
|
closeOnEscape: false,
|
|
12059
12191
|
hideCloseButton: true,
|
|
12060
12192
|
size: "md",
|
|
12061
|
-
children: /* @__PURE__ */
|
|
12062
|
-
resultImageComponent ? /* @__PURE__ */
|
|
12063
|
-
/* @__PURE__ */
|
|
12064
|
-
/* @__PURE__ */
|
|
12065
|
-
/* @__PURE__ */
|
|
12193
|
+
children: /* @__PURE__ */ jsxs38("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
12194
|
+
resultImageComponent ? /* @__PURE__ */ jsx52("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ jsx52("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ jsx52("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
12195
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
12196
|
+
/* @__PURE__ */ jsx52("h2", { className: "text-text-950 font-bold text-lg", children: "\u{1F389} Parab\xE9ns!" }),
|
|
12197
|
+
/* @__PURE__ */ jsx52("p", { className: "text-text-500 font-sm", children: "Voc\xEA concluiu o m\xF3dulo Movimento Uniforme." })
|
|
12066
12198
|
] }),
|
|
12067
|
-
/* @__PURE__ */
|
|
12199
|
+
/* @__PURE__ */ jsx52("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: /* @__PURE__ */ jsx52(Button_default, { className: "w-full", onClick: onGoToNextModule, children: "Pr\xF3ximo m\xF3dulo" }) })
|
|
12068
12200
|
] })
|
|
12069
12201
|
}
|
|
12070
12202
|
),
|
|
12071
|
-
/* @__PURE__ */
|
|
12203
|
+
/* @__PURE__ */ jsx52(
|
|
12072
12204
|
Modal_default,
|
|
12073
12205
|
{
|
|
12074
12206
|
isOpen: isModalOpen("modalQuestionnaireAllIncorrect"),
|
|
@@ -12077,16 +12209,16 @@ var QuizFooter = forwardRef21(
|
|
|
12077
12209
|
closeOnEscape: false,
|
|
12078
12210
|
hideCloseButton: true,
|
|
12079
12211
|
size: "md",
|
|
12080
|
-
children: /* @__PURE__ */
|
|
12081
|
-
resultIncorrectImageComponent ? /* @__PURE__ */
|
|
12082
|
-
/* @__PURE__ */
|
|
12083
|
-
/* @__PURE__ */
|
|
12084
|
-
/* @__PURE__ */
|
|
12085
|
-
/* @__PURE__ */
|
|
12086
|
-
/* @__PURE__ */
|
|
12212
|
+
children: /* @__PURE__ */ jsxs38("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
12213
|
+
resultIncorrectImageComponent ? /* @__PURE__ */ jsx52("div", { className: "w-[282px] h-auto", children: resultIncorrectImageComponent }) : /* @__PURE__ */ jsx52("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ jsx52("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
12214
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
12215
|
+
/* @__PURE__ */ jsx52("h2", { className: "text-text-950 font-bold text-lg", children: "\u{1F615} N\xE3o foi dessa vez..." }),
|
|
12216
|
+
/* @__PURE__ */ jsx52("p", { className: "text-text-500 font-sm", children: "Voc\xEA tirou 0 no question\xE1rio, mas n\xE3o se preocupe! Isso \xE9 apenas uma oportunidade de aprendizado." }),
|
|
12217
|
+
/* @__PURE__ */ jsx52("p", { className: "text-text-500 font-sm", children: "Que tal tentar novamente para melhorar sua nota? Estamos aqui para te ajudar a entender o conte\xFAdo e evoluir." }),
|
|
12218
|
+
/* @__PURE__ */ jsx52("p", { className: "text-text-500 font-sm", children: "Clique em Repetir Question\xE1rio e mostre do que voc\xEA \xE9 capaz! \u{1F4AA}" })
|
|
12087
12219
|
] }),
|
|
12088
|
-
/* @__PURE__ */
|
|
12089
|
-
/* @__PURE__ */
|
|
12220
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex flex-row justify-center items-center gap-2 w-full", children: [
|
|
12221
|
+
/* @__PURE__ */ jsx52(
|
|
12090
12222
|
Button_default,
|
|
12091
12223
|
{
|
|
12092
12224
|
type: "button",
|
|
@@ -12100,7 +12232,7 @@ var QuizFooter = forwardRef21(
|
|
|
12100
12232
|
children: "Tentar depois"
|
|
12101
12233
|
}
|
|
12102
12234
|
),
|
|
12103
|
-
/* @__PURE__ */
|
|
12235
|
+
/* @__PURE__ */ jsx52(
|
|
12104
12236
|
Button_default,
|
|
12105
12237
|
{
|
|
12106
12238
|
variant: "outline",
|
|
@@ -12110,7 +12242,7 @@ var QuizFooter = forwardRef21(
|
|
|
12110
12242
|
children: "Detalhar resultado"
|
|
12111
12243
|
}
|
|
12112
12244
|
),
|
|
12113
|
-
/* @__PURE__ */
|
|
12245
|
+
/* @__PURE__ */ jsx52(
|
|
12114
12246
|
Button_default,
|
|
12115
12247
|
{
|
|
12116
12248
|
className: "w-auto",
|
|
@@ -12123,7 +12255,7 @@ var QuizFooter = forwardRef21(
|
|
|
12123
12255
|
] })
|
|
12124
12256
|
}
|
|
12125
12257
|
),
|
|
12126
|
-
/* @__PURE__ */
|
|
12258
|
+
/* @__PURE__ */ jsx52(
|
|
12127
12259
|
AlertDialog,
|
|
12128
12260
|
{
|
|
12129
12261
|
isOpen: isModalOpen("alertDialogTryLater"),
|
|
@@ -12149,24 +12281,24 @@ var QuizFooter = forwardRef21(
|
|
|
12149
12281
|
// src/components/Quiz/QuizResult.tsx
|
|
12150
12282
|
import { forwardRef as forwardRef22, useEffect as useEffect21, useState as useState22 } from "react";
|
|
12151
12283
|
import { Clock as Clock3 } from "phosphor-react";
|
|
12152
|
-
import { jsx as
|
|
12284
|
+
import { jsx as jsx53, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
12153
12285
|
var QuizBadge = ({
|
|
12154
12286
|
subtype
|
|
12155
12287
|
}) => {
|
|
12156
12288
|
switch (subtype) {
|
|
12157
12289
|
case "PROVA" /* PROVA */:
|
|
12158
|
-
return /* @__PURE__ */
|
|
12290
|
+
return /* @__PURE__ */ jsx53(Badge_default, { variant: "examsOutlined", action: "exam2", "data-testid": "quiz-badge", children: "Prova" });
|
|
12159
12291
|
case "ENEM_PROVA_1" /* ENEM_PROVA_1 */:
|
|
12160
12292
|
case "ENEM_PROVA_2" /* ENEM_PROVA_2 */:
|
|
12161
|
-
return /* @__PURE__ */
|
|
12293
|
+
return /* @__PURE__ */ jsx53(Badge_default, { variant: "examsOutlined", action: "exam1", "data-testid": "quiz-badge", children: "Enem" });
|
|
12162
12294
|
case "VESTIBULAR" /* VESTIBULAR */:
|
|
12163
|
-
return /* @__PURE__ */
|
|
12295
|
+
return /* @__PURE__ */ jsx53(Badge_default, { variant: "examsOutlined", action: "exam4", "data-testid": "quiz-badge", children: "Vestibular" });
|
|
12164
12296
|
case "SIMULADO" /* SIMULADO */:
|
|
12165
12297
|
case "SIMULADAO" /* SIMULADAO */:
|
|
12166
12298
|
case void 0:
|
|
12167
|
-
return /* @__PURE__ */
|
|
12299
|
+
return /* @__PURE__ */ jsx53(Badge_default, { variant: "examsOutlined", action: "exam3", "data-testid": "quiz-badge", children: "Simulad\xE3o" });
|
|
12168
12300
|
default:
|
|
12169
|
-
return /* @__PURE__ */
|
|
12301
|
+
return /* @__PURE__ */ jsx53(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: subtype });
|
|
12170
12302
|
}
|
|
12171
12303
|
};
|
|
12172
12304
|
var QuizHeaderResult = forwardRef22(
|
|
@@ -12211,7 +12343,7 @@ var QuizHeaderResult = forwardRef22(
|
|
|
12211
12343
|
return "N\xE3o foi dessa vez...voc\xEA deixou a resposta em branco";
|
|
12212
12344
|
}
|
|
12213
12345
|
};
|
|
12214
|
-
return /* @__PURE__ */
|
|
12346
|
+
return /* @__PURE__ */ jsxs39(
|
|
12215
12347
|
"div",
|
|
12216
12348
|
{
|
|
12217
12349
|
ref,
|
|
@@ -12222,8 +12354,8 @@ var QuizHeaderResult = forwardRef22(
|
|
|
12222
12354
|
),
|
|
12223
12355
|
...props,
|
|
12224
12356
|
children: [
|
|
12225
|
-
/* @__PURE__ */
|
|
12226
|
-
/* @__PURE__ */
|
|
12357
|
+
/* @__PURE__ */ jsx53("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
|
|
12358
|
+
/* @__PURE__ */ jsx53("p", { className: "text-text-700 text-md", children: getLabelByAnswersStatus() })
|
|
12227
12359
|
]
|
|
12228
12360
|
}
|
|
12229
12361
|
);
|
|
@@ -12231,7 +12363,7 @@ var QuizHeaderResult = forwardRef22(
|
|
|
12231
12363
|
);
|
|
12232
12364
|
var QuizResultHeaderTitle = forwardRef22(({ className, showBadge = true, onRepeat, canRetry, ...props }, ref) => {
|
|
12233
12365
|
const { quiz } = useQuizStore();
|
|
12234
|
-
return /* @__PURE__ */
|
|
12366
|
+
return /* @__PURE__ */ jsxs39(
|
|
12235
12367
|
"div",
|
|
12236
12368
|
{
|
|
12237
12369
|
ref,
|
|
@@ -12241,9 +12373,9 @@ var QuizResultHeaderTitle = forwardRef22(({ className, showBadge = true, onRepea
|
|
|
12241
12373
|
),
|
|
12242
12374
|
...props,
|
|
12243
12375
|
children: [
|
|
12244
|
-
/* @__PURE__ */
|
|
12245
|
-
/* @__PURE__ */
|
|
12246
|
-
canRetry && onRepeat && /* @__PURE__ */
|
|
12376
|
+
/* @__PURE__ */ jsx53("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
|
|
12377
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex flex-row gap-3 items-center", children: [
|
|
12378
|
+
canRetry && onRepeat && /* @__PURE__ */ jsx53(
|
|
12247
12379
|
Button_default,
|
|
12248
12380
|
{
|
|
12249
12381
|
variant: "solid",
|
|
@@ -12253,7 +12385,7 @@ var QuizResultHeaderTitle = forwardRef22(({ className, showBadge = true, onRepea
|
|
|
12253
12385
|
children: "Repetir question\xE1rio"
|
|
12254
12386
|
}
|
|
12255
12387
|
),
|
|
12256
|
-
showBadge && /* @__PURE__ */
|
|
12388
|
+
showBadge && /* @__PURE__ */ jsx53(QuizBadge, { subtype: quiz?.subtype || void 0 })
|
|
12257
12389
|
] })
|
|
12258
12390
|
]
|
|
12259
12391
|
}
|
|
@@ -12262,7 +12394,7 @@ var QuizResultHeaderTitle = forwardRef22(({ className, showBadge = true, onRepea
|
|
|
12262
12394
|
var QuizResultTitle = forwardRef22(({ className, ...props }, ref) => {
|
|
12263
12395
|
const { getQuizTitle } = useQuizStore();
|
|
12264
12396
|
const quizTitle = getQuizTitle();
|
|
12265
|
-
return /* @__PURE__ */
|
|
12397
|
+
return /* @__PURE__ */ jsx53(
|
|
12266
12398
|
"p",
|
|
12267
12399
|
{
|
|
12268
12400
|
className: cn("pt-6 pb-4 text-text-950 font-bold text-lg", className),
|
|
@@ -12314,7 +12446,7 @@ var QuizResultPerformance = forwardRef22(({ showDetails = true, ...props }, ref)
|
|
|
12314
12446
|
}
|
|
12315
12447
|
const percentage = totalQuestions > 0 ? Math.round(correctAnswers / totalQuestions * 100) : 0;
|
|
12316
12448
|
const classesJustifyBetween = showDetails ? "justify-between" : "justify-center";
|
|
12317
|
-
return /* @__PURE__ */
|
|
12449
|
+
return /* @__PURE__ */ jsxs39(
|
|
12318
12450
|
"div",
|
|
12319
12451
|
{
|
|
12320
12452
|
className: cn(
|
|
@@ -12324,8 +12456,8 @@ var QuizResultPerformance = forwardRef22(({ showDetails = true, ...props }, ref)
|
|
|
12324
12456
|
ref,
|
|
12325
12457
|
...props,
|
|
12326
12458
|
children: [
|
|
12327
|
-
/* @__PURE__ */
|
|
12328
|
-
/* @__PURE__ */
|
|
12459
|
+
/* @__PURE__ */ jsxs39("div", { className: "relative", children: [
|
|
12460
|
+
/* @__PURE__ */ jsx53(
|
|
12329
12461
|
ProgressCircle_default,
|
|
12330
12462
|
{
|
|
12331
12463
|
size: "medium",
|
|
@@ -12335,24 +12467,24 @@ var QuizResultPerformance = forwardRef22(({ showDetails = true, ...props }, ref)
|
|
|
12335
12467
|
label: ""
|
|
12336
12468
|
}
|
|
12337
12469
|
),
|
|
12338
|
-
/* @__PURE__ */
|
|
12339
|
-
showDetails && /* @__PURE__ */
|
|
12340
|
-
/* @__PURE__ */
|
|
12341
|
-
/* @__PURE__ */
|
|
12470
|
+
/* @__PURE__ */ jsxs39("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
12471
|
+
showDetails && /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
12472
|
+
/* @__PURE__ */ jsx53(Clock3, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
12473
|
+
/* @__PURE__ */ jsx53("span", { className: "text-2xs font-medium text-text-800", children: formatTime2(
|
|
12342
12474
|
(getQuestionResultStatistics()?.timeSpent ?? 0) * 60
|
|
12343
12475
|
) })
|
|
12344
12476
|
] }),
|
|
12345
|
-
/* @__PURE__ */
|
|
12477
|
+
/* @__PURE__ */ jsxs39("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
|
|
12346
12478
|
getQuestionResultStatistics()?.correctAnswers ?? "--",
|
|
12347
12479
|
" de",
|
|
12348
12480
|
" ",
|
|
12349
12481
|
totalQuestions
|
|
12350
12482
|
] }),
|
|
12351
|
-
/* @__PURE__ */
|
|
12483
|
+
/* @__PURE__ */ jsx53("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
|
|
12352
12484
|
] })
|
|
12353
12485
|
] }),
|
|
12354
|
-
showDetails && /* @__PURE__ */
|
|
12355
|
-
/* @__PURE__ */
|
|
12486
|
+
showDetails && /* @__PURE__ */ jsxs39("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
12487
|
+
/* @__PURE__ */ jsx53(
|
|
12356
12488
|
ProgressBar_default,
|
|
12357
12489
|
{
|
|
12358
12490
|
className: "w-full",
|
|
@@ -12366,7 +12498,7 @@ var QuizResultPerformance = forwardRef22(({ showDetails = true, ...props }, ref)
|
|
|
12366
12498
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
12367
12499
|
}
|
|
12368
12500
|
),
|
|
12369
|
-
/* @__PURE__ */
|
|
12501
|
+
/* @__PURE__ */ jsx53(
|
|
12370
12502
|
ProgressBar_default,
|
|
12371
12503
|
{
|
|
12372
12504
|
className: "w-full",
|
|
@@ -12380,7 +12512,7 @@ var QuizResultPerformance = forwardRef22(({ showDetails = true, ...props }, ref)
|
|
|
12380
12512
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
12381
12513
|
}
|
|
12382
12514
|
),
|
|
12383
|
-
/* @__PURE__ */
|
|
12515
|
+
/* @__PURE__ */ jsx53(
|
|
12384
12516
|
ProgressBar_default,
|
|
12385
12517
|
{
|
|
12386
12518
|
className: "w-full",
|
|
@@ -12427,9 +12559,9 @@ var QuizListResult = forwardRef22(({ className, onSubjectClick, ...props }, ref)
|
|
|
12427
12559
|
};
|
|
12428
12560
|
}
|
|
12429
12561
|
);
|
|
12430
|
-
return /* @__PURE__ */
|
|
12431
|
-
/* @__PURE__ */
|
|
12432
|
-
/* @__PURE__ */
|
|
12562
|
+
return /* @__PURE__ */ jsxs39("section", { ref, className, ...props, children: [
|
|
12563
|
+
/* @__PURE__ */ jsx53("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
|
|
12564
|
+
/* @__PURE__ */ jsx53("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ jsx53("li", { children: /* @__PURE__ */ jsx53(
|
|
12433
12565
|
CardResults,
|
|
12434
12566
|
{
|
|
12435
12567
|
onClick: () => onSubjectClick?.(subject.subject.id),
|
|
@@ -12453,16 +12585,16 @@ var QuizListResultByMateria = ({
|
|
|
12453
12585
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
12454
12586
|
const answeredQuestions = groupedQuestions[subject] || [];
|
|
12455
12587
|
const formattedQuestions = subject == "all" ? Object.values(groupedQuestions).flat() : answeredQuestions;
|
|
12456
|
-
return /* @__PURE__ */
|
|
12457
|
-
/* @__PURE__ */
|
|
12458
|
-
/* @__PURE__ */
|
|
12459
|
-
/* @__PURE__ */
|
|
12460
|
-
/* @__PURE__ */
|
|
12588
|
+
return /* @__PURE__ */ jsxs39("div", { className: "flex flex-col", children: [
|
|
12589
|
+
/* @__PURE__ */ jsx53("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ jsx53("p", { className: "text-text-950 font-bold text-2xl", children: subjectName || formattedQuestions?.[0]?.knowledgeMatrix?.[0]?.subject?.name || "Sem mat\xE9ria" }) }),
|
|
12590
|
+
/* @__PURE__ */ jsxs39("section", { className: "flex flex-col ", children: [
|
|
12591
|
+
/* @__PURE__ */ jsx53("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
12592
|
+
/* @__PURE__ */ jsx53("ul", { className: "flex flex-col gap-2 pt-4", children: formattedQuestions.map((question) => {
|
|
12461
12593
|
const questionIndex = getQuestionIndex(
|
|
12462
12594
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12463
12595
|
question.questionId ?? question.id
|
|
12464
12596
|
);
|
|
12465
|
-
return /* @__PURE__ */
|
|
12597
|
+
return /* @__PURE__ */ jsx53("li", { children: /* @__PURE__ */ jsx53(
|
|
12466
12598
|
CardStatus,
|
|
12467
12599
|
{
|
|
12468
12600
|
className: "max-w-full",
|
|
@@ -12488,7 +12620,7 @@ var QuizListResultByMateria = ({
|
|
|
12488
12620
|
|
|
12489
12621
|
// src/components/BreadcrumbMenu/BreadcrumbMenu.tsx
|
|
12490
12622
|
import { useNavigate } from "react-router-dom";
|
|
12491
|
-
import { jsx as
|
|
12623
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
12492
12624
|
var BreadcrumbMenu = ({
|
|
12493
12625
|
breadcrumbs,
|
|
12494
12626
|
onBreadcrumbClick,
|
|
@@ -12501,17 +12633,17 @@ var BreadcrumbMenu = ({
|
|
|
12501
12633
|
}
|
|
12502
12634
|
navigate(breadcrumb.url);
|
|
12503
12635
|
};
|
|
12504
|
-
return /* @__PURE__ */
|
|
12636
|
+
return /* @__PURE__ */ jsx54(
|
|
12505
12637
|
Menu,
|
|
12506
12638
|
{
|
|
12507
12639
|
value: `breadcrumb-${breadcrumbs.length - 1}`,
|
|
12508
12640
|
defaultValue: "breadcrumb-0",
|
|
12509
12641
|
variant: "breadcrumb",
|
|
12510
12642
|
className,
|
|
12511
|
-
children: /* @__PURE__ */
|
|
12643
|
+
children: /* @__PURE__ */ jsx54(MenuContent, { className: "w-full flex flex-row flex-wrap gap-2 !px-0", children: breadcrumbs.map((breadcrumb, index) => {
|
|
12512
12644
|
const isLast = index === breadcrumbs.length - 1;
|
|
12513
12645
|
const hasSeparator = !isLast;
|
|
12514
|
-
return /* @__PURE__ */
|
|
12646
|
+
return /* @__PURE__ */ jsx54(
|
|
12515
12647
|
MenuItem,
|
|
12516
12648
|
{
|
|
12517
12649
|
variant: "breadcrumb",
|
|
@@ -13106,6 +13238,7 @@ export {
|
|
|
13106
13238
|
SkeletonRounded,
|
|
13107
13239
|
SkeletonTable,
|
|
13108
13240
|
SkeletonText,
|
|
13241
|
+
StatisticsCard,
|
|
13109
13242
|
Stepper_default as Stepper,
|
|
13110
13243
|
SubjectEnum,
|
|
13111
13244
|
SubjectInfo,
|